Skip to content

Commit

Permalink
Merge pull request #1346 from TIP-Global-Health/issue-1336
Browse files Browse the repository at this point in the history
ANC, History step 2 - drop 3 questions
  • Loading branch information
anvmn authored Sep 26, 2024
2 parents 3d4a13d + 241c287 commit 94ecdbc
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 62 deletions.
6 changes: 0 additions & 6 deletions client/src/elm/Pages/Prenatal/Activity/Model.elm
Original file line number Diff line number Diff line change
Expand Up @@ -762,9 +762,6 @@ type alias ObstetricFormSecondStep =
, cSectionReason : Maybe CSectionReason
, cSectionReasonDirty : Bool
, previousDeliveryPeriod : Maybe PreviousDeliveryPeriod
, successiveAbortions : Maybe Bool
, successivePrematureDeliveries : Maybe Bool
, stillbornPreviousDelivery : Maybe Bool
, babyDiedOnDayOfBirthPreviousDelivery : Maybe Bool
, partialPlacentaPreviousDelivery : Maybe Bool
, severeHemorrhagingPreviousDelivery : Maybe Bool
Expand All @@ -784,9 +781,6 @@ emptyObstetricFormSecondStep =
, cSectionReason = Nothing
, cSectionReasonDirty = False
, previousDeliveryPeriod = Nothing
, successiveAbortions = Nothing
, successivePrematureDeliveries = Nothing
, stillbornPreviousDelivery = Nothing
, babyDiedOnDayOfBirthPreviousDelivery = Nothing
, partialPlacentaPreviousDelivery = Nothing
, severeHemorrhagingPreviousDelivery = Nothing
Expand Down
8 changes: 1 addition & 7 deletions client/src/elm/Pages/Prenatal/Activity/Utils.elm
Original file line number Diff line number Diff line change
Expand Up @@ -4114,9 +4114,6 @@ obstetricHistoryStep2FormWithDefault form saved =
(Maybe.map EverySet.toList value.cSectionReason |> Maybe.andThen List.head)
, cSectionReasonDirty = form.cSectionReasonDirty
, previousDeliveryPeriod = or form.previousDeliveryPeriod (value.previousDeliveryPeriod |> EverySet.toList |> List.head)
, successiveAbortions = or form.successiveAbortions (EverySet.member SuccessiveAbortions value.obstetricHistory |> Just)
, successivePrematureDeliveries = or form.successivePrematureDeliveries (EverySet.member SuccessivePrematureDeliveries value.obstetricHistory |> Just)
, stillbornPreviousDelivery = or form.stillbornPreviousDelivery (EverySet.member StillbornPreviousDelivery value.previousDelivery |> Just)
, babyDiedOnDayOfBirthPreviousDelivery = or form.babyDiedOnDayOfBirthPreviousDelivery (EverySet.member BabyDiedOnDayOfBirthPreviousDelivery value.previousDelivery |> Just)
, partialPlacentaPreviousDelivery = or form.partialPlacentaPreviousDelivery (EverySet.member PartialPlacentaPreviousDelivery value.previousDelivery |> Just)
, severeHemorrhagingPreviousDelivery = or form.severeHemorrhagingPreviousDelivery (EverySet.member SevereHemorrhagingPreviousDelivery value.previousDelivery |> Just)
Expand All @@ -4141,7 +4138,6 @@ toObstetricHistoryStep2Value form =
previousDeliverySet =
[ Maybe.map (ifTrue CSectionInPast) form.cSectionInPast
, ifNullableTrue CSectionInPreviousDelivery form.cSectionInPreviousDelivery
, Maybe.map (ifTrue StillbornPreviousDelivery) form.stillbornPreviousDelivery
, Maybe.map (ifTrue BabyDiedOnDayOfBirthPreviousDelivery) form.babyDiedOnDayOfBirthPreviousDelivery
, Maybe.map (ifTrue PartialPlacentaPreviousDelivery) form.partialPlacentaPreviousDelivery
, Maybe.map (ifTrue SevereHemorrhagingPreviousDelivery) form.severeHemorrhagingPreviousDelivery
Expand All @@ -4152,9 +4148,7 @@ toObstetricHistoryStep2Value form =
|> Maybe.map (List.foldl EverySet.union EverySet.empty >> ifEverySetEmpty NoPreviousDeliverySign)

obstetricHistorySet =
[ Maybe.map (ifTrue SuccessiveAbortions) form.successiveAbortions
, Maybe.map (ifTrue SuccessivePrematureDeliveries) form.successivePrematureDeliveries
, Maybe.map (ifTrue PreeclampsiaPreviousPregnancy) form.preeclampsiaPreviousPregnancy
[ Maybe.map (ifTrue PreeclampsiaPreviousPregnancy) form.preeclampsiaPreviousPregnancy
, Maybe.map (ifTrue GestationalDiabetesPreviousPregnancy) form.gestationalDiabetesPreviousPregnancy
, Maybe.map (ifTrue IncompleteCervixPreviousPregnancy) form.incompleteCervixPreviousPregnancy
]
Expand Down
48 changes: 0 additions & 48 deletions client/src/elm/Pages/Prenatal/Activity/View.elm
Original file line number Diff line number Diff line change
Expand Up @@ -2822,15 +2822,6 @@ obstetricFormSecondStepInputsAndTasks language currentDate assembled form =
, maybeToBoolTask form.cSectionInPast :: derivedTasks
)

successiveAbortionsUpdateFunc value form_ =
{ form_ | successiveAbortions = Just value }

successivePrematureDeliveriesUpdateFunc value form_ =
{ form_ | successivePrematureDeliveries = Just value }

stillbornPreviousDeliveryUpdateFunc value form_ =
{ form_ | stillbornPreviousDelivery = Just value }

babyDiedOnDayOfBirthPreviousDeliveryUpdateFunc value form_ =
{ form_ | babyDiedOnDayOfBirthPreviousDelivery = Just value }

Expand Down Expand Up @@ -2873,42 +2864,6 @@ obstetricFormSecondStepInputsAndTasks language currentDate assembled form =
]
++ cSectionsHtml
++ [ div [ class "ui grid" ]
[ div [ class "twelve wide column" ]
[ viewCustomLabel language Translate.SuccessiveAbortions "?" "label successive-abortions" ]
, div [ class "four wide column" ]
[ viewRedAlertForBool form.successiveAbortions False ]
]
, viewBoolInput
language
form.successiveAbortions
(SetOBBoolInput successiveAbortionsUpdateFunc)
"successive-abortions"
Nothing
, div [ class "ui grid" ]
[ div [ class "twelve wide column" ]
[ viewLabel language Translate.SuccessivePrematureDeliveries ]
, div [ class "four wide column" ]
[ viewRedAlertForBool form.successivePrematureDeliveries False ]
]
, viewBoolInput
language
form.successivePrematureDeliveries
(SetOBBoolInput successivePrematureDeliveriesUpdateFunc)
"successive-primature-deliveries"
Nothing
, div [ class "ui grid" ]
[ div [ class "twelve wide column" ]
[ viewLabel language Translate.StillbornPreviousDelivery ]
, div [ class "four wide column" ]
[ viewRedAlertForBool form.stillbornPreviousDelivery False ]
]
, viewBoolInput
language
form.stillbornPreviousDelivery
(SetOBBoolInput stillbornPreviousDeliveryUpdateFunc)
"stillborn-previous-delivery"
Nothing
, div [ class "ui grid" ]
[ div [ class "twelve wide column" ]
[ viewLabel language Translate.BabyDiedOnDayOfBirthPreviousDelivery ]
, div [ class "four wide column" ]
Expand Down Expand Up @@ -3007,9 +2962,6 @@ obstetricFormSecondStepInputsAndTasks language currentDate assembled form =
]
, cSectionsTasks
++ [ maybeToBoolTask form.previousDeliveryPeriod
, form.successiveAbortions
, form.successivePrematureDeliveries
, form.stillbornPreviousDelivery
, form.babyDiedOnDayOfBirthPreviousDelivery
, form.partialPlacentaPreviousDelivery
, form.severeHemorrhagingPreviousDelivery
Expand Down
2 changes: 1 addition & 1 deletion client/src/elm/Translate.elm
Original file line number Diff line number Diff line change
Expand Up @@ -12618,7 +12618,7 @@ translationSet trans =
}

NotIndicated ->
{ english = "Not indicated"
{ english = "Not Indicated"
, kinyarwanda = Just "Ikizamini nticyasabwe"
, kirundi = Just "Ntivyerekanywe"
}
Expand Down

0 comments on commit 94ecdbc

Please sign in to comment.