Skip to content

Commit

Permalink
Merge pull request #1209 from TIP-Global-Health/issue-1197
Browse files Browse the repository at this point in the history
ANC - additional diagnostics fixes
  • Loading branch information
anvmn authored Jun 16, 2024
2 parents e22118a + 7ec098b commit e482e77
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 11 deletions.
11 changes: 5 additions & 6 deletions client/src/elm/Pages/Prenatal/Activity/Utils.elm
Original file line number Diff line number Diff line change
Expand Up @@ -1929,8 +1929,7 @@ matchLabResultsAndExaminationPrenatalDiagnosis egaInWeeks dangerSigns assembled
(\egaWeeks ->
(egaWeeks >= 20)
&& (egaWeeks < 37)
&& moderatePreeclampsiaByMeasurementsInitialPhase
measurements
&& moderatePreeclampsiaByMeasurementsInitialPhase measurements
)

DiagnosisModeratePreeclampsiaRecurrentPhase ->
Expand All @@ -1942,7 +1941,7 @@ matchLabResultsAndExaminationPrenatalDiagnosis egaInWeeks dangerSigns assembled
(not <| diagnosedModeratePreeclampsiaPrevoiusly assembled)
&& -- If diagnosed Moderate Preeclampsia at initial stage, we do not
-- need to diagnose again.
(not <| diagnosed DiagnosisModeratePreeclampsiaInitialPhase assembled)
(not <| diagnosedAtInitalPhase DiagnosisModeratePreeclampsiaInitialPhase)
&& resolveEGAWeeksAndThen
(\egaWeeks ->
(egaWeeks >= 20)
Expand All @@ -1960,7 +1959,7 @@ matchLabResultsAndExaminationPrenatalDiagnosis egaInWeeks dangerSigns assembled
DiagnosisSeverePreeclampsiaRecurrentPhase ->
(-- If diagnosed Severe Preeclampsia at initial stage, we do not
-- need to diagnose again.
not <| diagnosed DiagnosisSeverePreeclampsiaInitialPhase assembled
not <| diagnosedAtInitalPhase DiagnosisSeverePreeclampsiaInitialPhase
)
&& resolveEGAWeeksAndThen
(\egaWeeks ->
Expand Down Expand Up @@ -2081,7 +2080,7 @@ matchLabResultsAndExaminationPrenatalDiagnosis egaInWeeks dangerSigns assembled
)

Backend.PrenatalEncounter.Types.DiagnosisDiabetesRecurrentPhase ->
(not <| diagnosed Backend.PrenatalEncounter.Types.DiagnosisDiabetesInitialPhase assembled)
(not <| diagnosedAtInitalPhase Backend.PrenatalEncounter.Types.DiagnosisDiabetesInitialPhase)
&& (not <| diagnosedPreviouslyAnyOf diabetesDiagnoses assembled)
&& resolveEGAWeeksAndThen
(\egaWeeks ->
Expand All @@ -2096,7 +2095,7 @@ matchLabResultsAndExaminationPrenatalDiagnosis egaInWeeks dangerSigns assembled
)

Backend.PrenatalEncounter.Types.DiagnosisGestationalDiabetesRecurrentPhase ->
(not <| diagnosed Backend.PrenatalEncounter.Types.DiagnosisGestationalDiabetesInitialPhase assembled)
(not <| diagnosedAtInitalPhase Backend.PrenatalEncounter.Types.DiagnosisGestationalDiabetesInitialPhase)
&& (not <| diagnosedPreviouslyAnyOf diabetesDiagnoses assembled)
&& resolveEGAWeeksAndThen
(\egaWeeks ->
Expand Down
2 changes: 1 addition & 1 deletion client/src/elm/Pages/Prenatal/ProgressReport/Update.elm
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ update msg model =
( updatedModel, Cmd.none, [] )

ReviewAndAcceptLabsResults personId encounterId labsResultsId value ->
( model
( { model | labResultsMode = Nothing, labResultsHistoryOrigin = Nothing }
, Cmd.none
, [ Backend.PrenatalEncounter.Model.SaveLabsResults personId (Just labsResultsId) { value | reviewState = Just LabsResultsReviewCompleted }
|> Backend.Model.MsgPrenatalEncounter encounterId
Expand Down
12 changes: 9 additions & 3 deletions client/src/elm/Pages/Prenatal/Utils.elm
Original file line number Diff line number Diff line change
Expand Up @@ -3913,11 +3913,17 @@ healthEducationFormInputsAndTasksForNurse language phase setBoolInputMsg assembl
if diagnosedAnyOf triggeringDiagnoses assembled then
let
header =
if diagnosed Backend.PrenatalEncounter.Types.DiagnosisDiabetesRecurrentPhase assembled then
Translate.PrenatalDiagnosis Backend.PrenatalEncounter.Types.DiagnosisDiabetesRecurrentPhase
if
diagnosedAnyOf
[ Backend.PrenatalEncounter.Types.DiagnosisDiabetesInitialPhase
, Backend.PrenatalEncounter.Types.DiagnosisDiabetesRecurrentPhase
]
assembled
then
Translate.Diabetes

else
Translate.PrenatalDiagnosis Backend.PrenatalEncounter.Types.DiagnosisGestationalDiabetesRecurrentPhase
Translate.GestationalDiabetes
in
( [ viewCustomLabel language header "" "label header"
, viewCustomLabel language Translate.PrenatalHealthEducationDiabetesInform "." "label paragraph"
Expand Down
2 changes: 1 addition & 1 deletion client/src/elm/Pages/Report/Utils.elm
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ randomBloodSugarResultNormal result =
value >= 74 && value <= 126

TestRunAfterMeal value ->
value >= 74 && value <= 200
value >= 74 && value < 200


hemoglobinResultNormal : Float -> Bool
Expand Down

0 comments on commit e482e77

Please sign in to comment.