From 7e674a3bbdfc1ec3910df0ebd030e554ffebb365 Mon Sep 17 00:00:00 2001 From: anvmn Date: Thu, 13 Jun 2024 14:06:00 +0300 Subject: [PATCH 1/3] Fix for https://github.com/TIP-Global-Health/eheza-app/issues/1197#issue-2333398714, point 1 [ci skip] --- client/src/elm/Pages/Prenatal/Activity/Utils.elm | 11 +++++------ client/src/elm/Pages/Prenatal/Utils.elm | 12 +++++++++--- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/client/src/elm/Pages/Prenatal/Activity/Utils.elm b/client/src/elm/Pages/Prenatal/Activity/Utils.elm index 17a8f88680..39f30f2a17 100644 --- a/client/src/elm/Pages/Prenatal/Activity/Utils.elm +++ b/client/src/elm/Pages/Prenatal/Activity/Utils.elm @@ -1929,8 +1929,7 @@ matchLabResultsAndExaminationPrenatalDiagnosis egaInWeeks dangerSigns assembled (\egaWeeks -> (egaWeeks >= 20) && (egaWeeks < 37) - && moderatePreeclampsiaByMeasurementsInitialPhase - measurements + && moderatePreeclampsiaByMeasurementsInitialPhase measurements ) DiagnosisModeratePreeclampsiaRecurrentPhase -> @@ -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) @@ -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 -> @@ -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 -> @@ -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 -> diff --git a/client/src/elm/Pages/Prenatal/Utils.elm b/client/src/elm/Pages/Prenatal/Utils.elm index 4874de07e3..4a61532acf 100644 --- a/client/src/elm/Pages/Prenatal/Utils.elm +++ b/client/src/elm/Pages/Prenatal/Utils.elm @@ -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" From 80640e6054f4cb721edbb962654891297f618f39 Mon Sep 17 00:00:00 2001 From: anvmn Date: Thu, 13 Jun 2024 14:18:23 +0300 Subject: [PATCH 2/3] Fix for https://github.com/TIP-Global-Health/eheza-app/issues/1197#issue-2333398714, poin 4 [ci skip] --- client/src/elm/Pages/Report/Utils.elm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/elm/Pages/Report/Utils.elm b/client/src/elm/Pages/Report/Utils.elm index 7d0e70b607..fd6888f8cf 100644 --- a/client/src/elm/Pages/Report/Utils.elm +++ b/client/src/elm/Pages/Report/Utils.elm @@ -101,7 +101,7 @@ randomBloodSugarResultNormal result = value >= 74 && value <= 126 TestRunAfterMeal value -> - value >= 74 && value <= 200 + value >= 74 && value < 200 hemoglobinResultNormal : Float -> Bool From 7ec098bbbd02b64a11f53980243bf34451fa3795 Mon Sep 17 00:00:00 2001 From: anvmn Date: Thu, 13 Jun 2024 22:10:04 +0300 Subject: [PATCH 3/3] Fix for https://github.com/TIP-Global-Health/eheza-app/issues/1202#issue-2337643150 --- client/src/elm/Pages/Prenatal/ProgressReport/Update.elm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/elm/Pages/Prenatal/ProgressReport/Update.elm b/client/src/elm/Pages/Prenatal/ProgressReport/Update.elm index 9d32c074e5..061345cd87 100644 --- a/client/src/elm/Pages/Prenatal/ProgressReport/Update.elm +++ b/client/src/elm/Pages/Prenatal/ProgressReport/Update.elm @@ -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