Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VHW adjustments #1413

Open
wants to merge 10 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion client/src/assets/scss/_new.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3018,6 +3018,17 @@ div.page-report.clinical .ui.unstackable.items {
}
}

.content.right {

p {
margin-bottom: 10px;
}

.lmp-warning {
color: $color-velvet;
}
}

.label {
font-weight: bold;
}
Expand Down Expand Up @@ -3180,6 +3191,10 @@ div.page-report.clinical .ui.unstackable.items {
}
}

.lmp-warning {
color: $color-velvet;
}

.timeline-section {

.indicators {
Expand Down Expand Up @@ -3334,7 +3349,6 @@ div.page-report.clinical .ui.unstackable.items {
}
}
}

}

.progress-photos .pane-content {
Expand Down
15 changes: 11 additions & 4 deletions client/src/elm/Backend/Person/Utils.elm
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,12 @@ ageInMonths currentDate person =


isAdult : NominalDate -> Maybe NominalDate -> Maybe Bool
isAdult currentDate maybeBirthDate =
maybeBirthDate
|> Maybe.map (\birthDate -> diffYears birthDate currentDate |> (<) 12)
isAdult currentDate =
Maybe.map
(\birthDate ->
diffYears birthDate currentDate
|> (\age -> age > 12)
)


isNewborn : NominalDate -> Person -> Maybe Bool
Expand All @@ -56,7 +59,11 @@ isPersonAFertileWoman currentDate person =

else
person.birthDate
|> Maybe.map (\birthDate -> diffYears birthDate currentDate |> (\age -> age > 12 && age < 45))
|> Maybe.map
(\birthDate ->
diffYears birthDate currentDate
|> (\age -> age > 12 && age < 50)
)
|> Maybe.withDefault False


Expand Down
89 changes: 13 additions & 76 deletions client/src/elm/GeoLocation/Utils.elm
Original file line number Diff line number Diff line change
Expand Up @@ -2862,86 +2862,23 @@ getGeoVillagesForRwanda =
getGeoVillagesForBurundi : Dict GeoLocationId GeoLocation
getGeoVillagesForBurundi =
Dict.fromList
[ ( toEntityId 5, GeoLocation "Gitega" (Just <| toEntityId 4) )
, ( toEntityId 6, GeoLocation "Mparaga" (Just <| toEntityId 4) )
, ( toEntityId 7, GeoLocation "Gako" (Just <| toEntityId 4) )
, ( toEntityId 8, GeoLocation "Mibaga" (Just <| toEntityId 4) )
, ( toEntityId 9, GeoLocation "Gatandu" (Just <| toEntityId 4) )
[ ( toEntityId 5, GeoLocation "Mushishi" (Just <| toEntityId 4) )
, ( toEntityId 11, GeoLocation "Mirango" (Just <| toEntityId 10) )
, ( toEntityId 12, GeoLocation "Kiziba" (Just <| toEntityId 10) )
, ( toEntityId 13, GeoLocation "Migezi" (Just <| toEntityId 10) )
, ( toEntityId 14, GeoLocation "Murago" (Just <| toEntityId 10) )
, ( toEntityId 16, GeoLocation "Mugano" (Just <| toEntityId 15) )
, ( toEntityId 17, GeoLocation "Kabuye" (Just <| toEntityId 15) )
, ( toEntityId 18, GeoLocation "Nyentonga" (Just <| toEntityId 15) )
, ( toEntityId 16, GeoLocation "Kabwayi" (Just <| toEntityId 15) )
, ( toEntityId 20, GeoLocation "Kigutu" (Just <| toEntityId 19) )
, ( toEntityId 21, GeoLocation "Nyentambwe" (Just <| toEntityId 19) )
, ( toEntityId 22, GeoLocation "Gitsinda" (Just <| toEntityId 19) )
, ( toEntityId 25, GeoLocation "Migera" (Just <| toEntityId 24) )
, ( toEntityId 26, GeoLocation "Kaganza" (Just <| toEntityId 24) )
, ( toEntityId 28, GeoLocation "Murago" (Just <| toEntityId 27) )
, ( toEntityId 29, GeoLocation "Karirimvya" (Just <| toEntityId 27) )
, ( toEntityId 34, GeoLocation "Kirongorokerwa i" (Just <| toEntityId 33) )
, ( toEntityId 35, GeoLocation "Kanyiriri" (Just <| toEntityId 33) )
, ( toEntityId 36, GeoLocation "Kirongorokerwa ii" (Just <| toEntityId 33) )
, ( toEntityId 37, GeoLocation "Nyakuguma i" (Just <| toEntityId 33) )
, ( toEntityId 38, GeoLocation "Gitaza" (Just <| toEntityId 33) )
, ( toEntityId 39, GeoLocation "Kompanyi" (Just <| toEntityId 33) )
, ( toEntityId 40, GeoLocation "Nyakuguma ii" (Just <| toEntityId 33) )
, ( toEntityId 42, GeoLocation "Gakamba" (Just <| toEntityId 41) )
, ( toEntityId 43, GeoLocation "Mukunde i" (Just <| toEntityId 41) )
, ( toEntityId 44, GeoLocation "Ruranga" (Just <| toEntityId 41) )
, ( toEntityId 45, GeoLocation "Mukunde ii" (Just <| toEntityId 41) )
, ( toEntityId 47, GeoLocation "Mayengo a" (Just <| toEntityId 46) )
, ( toEntityId 48, GeoLocation "Mayengo b & d" (Just <| toEntityId 46) )
, ( toEntityId 49, GeoLocation "Mayengo c & d" (Just <| toEntityId 46) )
, ( toEntityId 50, GeoLocation "Mayengo b" (Just <| toEntityId 46) )
, ( toEntityId 52, GeoLocation "Ngongo" (Just <| toEntityId 51) )
, ( toEntityId 53, GeoLocation "Gasangu" (Just <| toEntityId 51) )
, ( toEntityId 54, GeoLocation "Kirerama" (Just <| toEntityId 51) )
, ( toEntityId 55, GeoLocation "Kinindo" (Just <| toEntityId 51) )
, ( toEntityId 56, GeoLocation "Giheta" (Just <| toEntityId 51) )
, ( toEntityId 58, GeoLocation "Munanirra" (Just <| toEntityId 57) )
, ( toEntityId 59, GeoLocation "Rusengo i" (Just <| toEntityId 57) )
, ( toEntityId 60, GeoLocation "Buganga" (Just <| toEntityId 57) )
, ( toEntityId 61, GeoLocation "Munanira" (Just <| toEntityId 57) )
, ( toEntityId 62, GeoLocation "Nyamahongo" (Just <| toEntityId 57) )
, ( toEntityId 63, GeoLocation "Yerusalemu" (Just <| toEntityId 57) )
, ( toEntityId 64, GeoLocation "Rusengo ii" (Just <| toEntityId 57) )
, ( toEntityId 67, GeoLocation "Mutambara i" (Just <| toEntityId 66) )
, ( toEntityId 68, GeoLocation "Makombe" (Just <| toEntityId 66) )
, ( toEntityId 69, GeoLocation "Kigwati i" (Just <| toEntityId 66) )
, ( toEntityId 70, GeoLocation "Gahore" (Just <| toEntityId 66) )
, ( toEntityId 71, GeoLocation "Kayange" (Just <| toEntityId 66) )
, ( toEntityId 72, GeoLocation "Kigwati ii" (Just <| toEntityId 66) )
, ( toEntityId 73, GeoLocation "Mutambara ii" (Just <| toEntityId 66) )
, ( toEntityId 75, GeoLocation "Giharo" (Just <| toEntityId 74) )
, ( toEntityId 76, GeoLocation "Gatete" (Just <| toEntityId 74) )
, ( toEntityId 77, GeoLocation "Gafunzo" (Just <| toEntityId 74) )
, ( toEntityId 78, GeoLocation "Gasenyi" (Just <| toEntityId 74) )
, ( toEntityId 79, GeoLocation "Moderne" (Just <| toEntityId 74) )
, ( toEntityId 80, GeoLocation "Gisagara" (Just <| toEntityId 74) )
, ( toEntityId 28, GeoLocation "Karirimvya" (Just <| toEntityId 27) )
, ( toEntityId 34, GeoLocation "Nyakuguma" (Just <| toEntityId 33) )
, ( toEntityId 42, GeoLocation "Kanenge" (Just <| toEntityId 41) )
, ( toEntityId 47, GeoLocation "Mayengo" (Just <| toEntityId 46) )
, ( toEntityId 52, GeoLocation "Cabara" (Just <| toEntityId 51) )
, ( toEntityId 58, GeoLocation "Gashasha" (Just <| toEntityId 57) )
, ( toEntityId 67, GeoLocation "Mutambara" (Just <| toEntityId 66) )
, ( toEntityId 75, GeoLocation "Gatete" (Just <| toEntityId 74) )
, ( toEntityId 82, GeoLocation "Busebwa" (Just <| toEntityId 81) )
, ( toEntityId 83, GeoLocation "Kibanga" (Just <| toEntityId 81) )
, ( toEntityId 84, GeoLocation "Buhinda" (Just <| toEntityId 81) )
, ( toEntityId 85, GeoLocation "Buzimba" (Just <| toEntityId 81) )
, ( toEntityId 86, GeoLocation "Kayabazi" (Just <| toEntityId 81) )
, ( toEntityId 87, GeoLocation "Mahoro" (Just <| toEntityId 81) )
, ( toEntityId 89, GeoLocation "Ruremba" (Just <| toEntityId 88) )
, ( toEntityId 90, GeoLocation "Soko" (Just <| toEntityId 88) )
, ( toEntityId 91, GeoLocation "Muhuta" (Just <| toEntityId 88) )
, ( toEntityId 92, GeoLocation "Nyamiyaga" (Just <| toEntityId 88) )
, ( toEntityId 93, GeoLocation "Kavyiru" (Just <| toEntityId 88) )
, ( toEntityId 94, GeoLocation "Gakuyo" (Just <| toEntityId 88) )
, ( toEntityId 95, GeoLocation "Rera" (Just <| toEntityId 88) )
, ( toEntityId 98, GeoLocation "Ruhongo" (Just <| toEntityId 97) )
, ( toEntityId 99, GeoLocation "Musovu" (Just <| toEntityId 97) )
, ( toEntityId 100, GeoLocation "Buzimba" (Just <| toEntityId 97) )
, ( toEntityId 101, GeoLocation "Nyabiraba" (Just <| toEntityId 97) )
, ( toEntityId 103, GeoLocation "Mwagu" (Just <| toEntityId 102) )
, ( toEntityId 104, GeoLocation "Gafumbe" (Just <| toEntityId 102) )
, ( toEntityId 105, GeoLocation "Mambi" (Just <| toEntityId 102) )
, ( toEntityId 106, GeoLocation "Nyabigonzi" (Just <| toEntityId 102) )
, ( toEntityId 89, GeoLocation "Mugara" (Just <| toEntityId 88) )
, ( toEntityId 98, GeoLocation "Gitwe" (Just <| toEntityId 97) )
, ( toEntityId 103, GeoLocation "Karagara" (Just <| toEntityId 102) )
]


Expand Down
15 changes: 10 additions & 5 deletions client/src/elm/Pages/Person/View.elm
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ viewCreateEditForm language currentDate coordinates site features geoInfo revers
{ goBackPage = UserPage (IndividualEncounterParticipantsPage AntenatalEncounter)
, expectedAge = ExpectAdult
, expectedGender = ExpectFemale
, birthDateSelectorFrom = Date.add Years -45 today
, birthDateSelectorFrom = Date.add Years -50 today
, birthDateSelectorTo = Date.add Years -13 today
, title = Translate.People
}
Expand Down Expand Up @@ -637,7 +637,7 @@ viewCreateEditForm language currentDate coordinates site features geoInfo revers
{ goBackPage = UserPage (IndividualEncounterParticipantsPage NutritionEncounter)
, expectedAge = ExpectChild
, expectedGender = ExpectMaleOrFemale
, birthDateSelectorFrom = Date.add Years -5 today
, birthDateSelectorFrom = Date.add Years -13 today |> Date.add Days 1
, birthDateSelectorTo = today
, title = Translate.People
}
Expand Down Expand Up @@ -977,6 +977,7 @@ viewCreateEditForm language currentDate coordinates site features geoInfo revers
hivStatusInput =
viewSelectInput language Translate.HIVStatusLabel hivStatusOptions Backend.Person.Form.hivStatus "ten" "select-input" False personForm

-- Not in use anymore - not displayed on form.
numberOfChildrenUnder5Input =
let
options =
Expand All @@ -987,8 +988,14 @@ viewCreateEditForm language currentDate coordinates site features geoInfo revers
in
viewSelectInput language Translate.NumberOfChildrenUnder5 options Backend.Person.Form.numberOfChildren "ten" "select-input" False personForm

-- Used only on Rwanda site.
hmisNumberInput =
viewSelectInput language Translate.ChildHmisNumber hmisNumberOptions Backend.Person.Form.hmisNumber "ten" "select-input" False personForm
case site of
SiteRwanda ->
viewSelectInput language Translate.ChildHmisNumber hmisNumberOptions Backend.Person.Form.hmisNumber "ten" "select-input" False personForm

_ ->
emptyNode

firstNameInput =
viewTextInput language Translate.FirstName Backend.Person.Form.firstName False personForm
Expand Down Expand Up @@ -1028,7 +1035,6 @@ viewCreateEditForm language currentDate coordinates site features geoInfo revers
, hivStatusInput
, levelOfEducationInput
, maritalStatusInput
, numberOfChildrenUnder5Input
]

ExpectChild ->
Expand All @@ -1045,7 +1051,6 @@ viewCreateEditForm language currentDate coordinates site features geoInfo revers
, levelOfEducationInput
, maritalStatusInput
, modeOfDeliveryInput
, numberOfChildrenUnder5Input
]
)

Expand Down
Loading