Skip to content

Commit

Permalink
Merge pull request #1042 from TIP-Global-Health/develop
Browse files Browse the repository at this point in the history
WIP: Developments starting March 10, 2024
  • Loading branch information
anvmn authored Mar 21, 2024
2 parents c63e65e + 15f94b8 commit a4b28a5
Show file tree
Hide file tree
Showing 148 changed files with 12,018 additions and 1,428 deletions.
4 changes: 4 additions & 0 deletions .ddev/config.local.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,8 @@ hooks:
- exec: "cd .. && rm -f hedley/modules/custom/hedley_migrate/csv/health_center.csv"
- exec: "cd .. && rm -f hedley/modules/custom/hedley_migrate/csv/person.csv"
- exec: "cd .. && rm -f hedley/modules/custom/hedley_migrate/csv/village.csv"
# Enabling features:
- exec: drush vset hedley_admin_feature_ncda_enabled 1
- exec: drush vset hedley_admin_feature_stock_management_enabled 1
- exec: drush vset hedley_admin_feature_tuberculosis_management_enabled 1
- exec: drush uli
1 change: 1 addition & 0 deletions client/src/assets/images/icon-dot-gray.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions client/src/assets/images/icon-dot-white.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions client/src/assets/scss/_custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,11 @@ h3.ui.header {
background-size: 92px 92px;
}

.icon-task-diagnostics {
background-image: url(#{$img-path}icon-medication-distribution-white.svg);
background-size: 86px 86px;
}

// Tasks horizontal scroll

.ui.task.segment {
Expand Down Expand Up @@ -2984,6 +2989,20 @@ input::placeholder {
}
}

.icon-dot {
.active &:after {
background-image: url(#{$img-path}icon-dot-white.svg);
}

.completed &:after {
background-image: url(#{$img-path}icon-dot-white.svg), url(#{$img-path}icon-completed-circle.svg);
}

&:after {
background-image: url(#{$img-path}icon-dot-gray.svg);
}
}

// Lists

.ui.list {
Expand Down
68 changes: 64 additions & 4 deletions client/src/assets/scss/_new.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1273,6 +1273,10 @@ div.page-activity.trace-contact {
min-height: 210px;
}

.symptoms-form.respiratory .cough-period label {
font-size: 22px;
}

.symptoms-form.gi .symptoms {
margin-bottom: 30px;
}
Expand Down Expand Up @@ -2328,7 +2332,8 @@ div.page-activity.prenatal {
}

div.page-activity.ncd,
div.page-activity.well-child {
div.page-activity.well-child,
div.page-activity.tuberculosis {

.ui.full.segment .full.content {

Expand Down Expand Up @@ -2477,6 +2482,58 @@ div.page-activity.child-scoreboard {
}
}

div.page-activity.tuberculosis {

.ui.full.segment .full.content {

.ui.form.dot .prescribed-medications {
padding: 20px;

p {
margin-bottom: 5px;
}
}

.ui.form.health-education .follow-up-testing-table {
border: 1px solid black;
margin-bottom: 20px;

.row {
border-bottom: 1px solid black;
display: flex;
justify-content: center;

.item {
float: left;
font-size: 18px;
line-height: 24px;
padding: 10px;
}

.item.label {
border-right: 1px solid black;
margin-bottom: 0;
width: 14%;
}

.item.test {
border-right: 1px solid black;
width: 30%;
}

.item.guidance {
width: 55%;
}
}

.row:last-child {
border-bottom: none;
}
}
}

}

div.page-outcome {

.tasks-count {
Expand Down Expand Up @@ -3770,7 +3827,9 @@ div.page-encounter.ncd,
div.page-activity.ncd,
div.page-encounter.child-scoreboard,
div.page-activity.child-scoreboard,
div.page-report.child-scoreboard {
div.page-report.child-scoreboard,
div.page-encounter.tuberculosis,
div.page-activity.tuberculosis {

.details {
padding-left: 25px;
Expand Down Expand Up @@ -4198,9 +4257,10 @@ div.page-report.child-scoreboard {
background-color: $color-white;
border-radius: 3px;
color: $color-dark-gray;
font-size: 24px;
font-size: 20px;
font-weight: 600;
padding: 15px;
margin-right: 0;
padding: 10px;
text-transform: none;
}

Expand Down
20 changes: 20 additions & 0 deletions client/src/elm/App/Fetch.elm
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ import Pages.Relationship.Fetch
import Pages.Session.Fetch
import Pages.StockManagement.Fetch
import Pages.TraceContact.Fetch
import Pages.Tuberculosis.Activity.Fetch
import Pages.Tuberculosis.Encounter.Fetch
import Pages.Tuberculosis.Participant.Fetch
import Pages.WellChild.Activity.Fetch
import Pages.WellChild.Encounter.Fetch
import Pages.WellChild.Participant.Fetch
Expand Down Expand Up @@ -222,6 +225,15 @@ fetch model =
)
|> Maybe.withDefault []

UserPage (TuberculosisParticipantPage personId) ->
getLoggedInData model
|> Maybe.map
(\_ ->
Pages.Tuberculosis.Participant.Fetch.fetch personId model.indexedDb
|> List.map MsgIndexedDb
)
|> Maybe.withDefault []

UserPage (IndividualEncounterParticipantsPage encounterType) ->
getLoggedInData model
|> Maybe.map
Expand Down Expand Up @@ -338,6 +350,14 @@ fetch model =
Pages.ChildScoreboard.Activity.Fetch.fetch encounterId model.indexedDb
|> List.map MsgIndexedDb

UserPage (TuberculosisEncounterPage id) ->
Pages.Tuberculosis.Encounter.Fetch.fetch id model.indexedDb
|> List.map MsgIndexedDb

UserPage (TuberculosisActivityPage id _) ->
Pages.Tuberculosis.Activity.Fetch.fetch id model.indexedDb
|> List.map MsgIndexedDb

UserPage (NutritionProgressReportPage id) ->
Pages.Nutrition.ProgressReport.Fetch.fetch id model.indexedDb
|> List.map MsgIndexedDb
Expand Down
9 changes: 9 additions & 0 deletions client/src/elm/App/Model.elm
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import Backend.NCDActivity.Model exposing (NCDActivity, NCDRecurrentActivity)
import Backend.Nurse.Model exposing (Nurse)
import Backend.NutritionActivity.Model exposing (NutritionActivity)
import Backend.PrenatalActivity.Model exposing (PrenatalActivity, PrenatalRecurrentActivity)
import Backend.TuberculosisActivity.Model exposing (TuberculosisActivity)
import Backend.WellChildActivity.Model exposing (WellChildActivity)
import Browser
import Browser.Navigation as Nav
Expand Down Expand Up @@ -72,6 +73,8 @@ import Pages.Relationship.Model
import Pages.Session.Model
import Pages.StockManagement.Model
import Pages.TraceContact.Model
import Pages.Tuberculosis.Activity.Model
import Pages.Tuberculosis.Encounter.Model
import Pages.WellChild.Activity.Model
import Pages.WellChild.Encounter.Model
import Pages.WellChild.ProgressReport.Model
Expand Down Expand Up @@ -302,6 +305,8 @@ type alias LoggedInModel =
, childScoreboardEncounterPages : Dict ChildScoreboardEncounterId Pages.ChildScoreboard.Encounter.Model.Model
, childScoreboardActivityPages : Dict ( ChildScoreboardEncounterId, ChildScoreboardActivity ) Pages.ChildScoreboard.Activity.Model.Model
, childScoreboardReportPages : Dict ChildScoreboardEncounterId Pages.ChildScoreboard.ProgressReport.Model.Model
, tuberculosisEncounterPages : Dict TuberculosisEncounterId Pages.Tuberculosis.Encounter.Model.Model
, tuberculosisActivityPages : Dict ( TuberculosisEncounterId, TuberculosisActivity ) Pages.Tuberculosis.Activity.Model.Model
, traceContactPages : Dict AcuteIllnessTraceContactId Pages.TraceContact.Model.Model
, clinicalProgressReportPages : Dict PrenatalEncounterId Pages.Prenatal.ProgressReport.Model.Model
, patientRecordPages : Dict PersonId Pages.PatientRecord.Model.Model
Expand Down Expand Up @@ -350,6 +355,8 @@ emptyLoggedInModel site villageId nurse =
, childScoreboardEncounterPages = Dict.empty
, childScoreboardActivityPages = Dict.empty
, childScoreboardReportPages = Dict.empty
, tuberculosisEncounterPages = Dict.empty
, tuberculosisActivityPages = Dict.empty
, traceContactPages = Dict.empty
, clinicalProgressReportPages = Dict.empty
, patientRecordPages = Dict.empty
Expand Down Expand Up @@ -413,6 +420,7 @@ type MsgLoggedIn
| MsgPageNCDEncounter NCDEncounterId Pages.NCD.Encounter.Model.Msg
| MsgPageNCDRecurrentEncounter NCDEncounterId Pages.NCD.RecurrentEncounter.Model.Msg
| MsgPageChildScoreboardEncounter ChildScoreboardEncounterId Pages.ChildScoreboard.Encounter.Model.Msg
| MsgPageTuberculosisEncounter TuberculosisEncounterId Pages.Tuberculosis.Encounter.Model.Msg
| MsgPagePrenatalActivity PrenatalEncounterId PrenatalActivity Pages.Prenatal.Activity.Model.Msg
| MsgPagePrenatalRecurrentActivity PrenatalEncounterId PrenatalRecurrentActivity Pages.Prenatal.RecurrentActivity.Model.Msg
| MsgPagePrenatalLabsHistory PrenatalEncounterId PrenatalEncounterId LaboratoryTest Pages.Prenatal.RecurrentActivity.Model.Msg
Expand All @@ -423,6 +431,7 @@ type MsgLoggedIn
| MsgPageNCDActivity NCDEncounterId NCDActivity Pages.NCD.Activity.Model.Msg
| MsgPageNCDRecurrentActivity NCDEncounterId NCDRecurrentActivity Pages.NCD.RecurrentActivity.Model.Msg
| MsgPageChildScoreboardActivity ChildScoreboardEncounterId ChildScoreboardActivity Pages.ChildScoreboard.Activity.Model.Msg
| MsgPageTuberculosisActivity TuberculosisEncounterId TuberculosisActivity Pages.Tuberculosis.Activity.Model.Msg
| MsgPagePregnancyOutcome IndividualEncounterParticipantId Pages.Prenatal.Outcome.Model.Msg
| MsgPageAcuteIllnessProgressReport AcuteIllnessEncounterId Pages.AcuteIllness.ProgressReport.Model.Msg
| MsgPageNutritionProgressReport NutritionEncounterId Pages.Nutrition.ProgressReport.Model.Msg
Expand Down
30 changes: 30 additions & 0 deletions client/src/elm/App/Update.elm
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ import Pages.Session.Update
import Pages.StockManagement.Update
import Pages.TraceContact.Model
import Pages.TraceContact.Update
import Pages.Tuberculosis.Activity.Model
import Pages.Tuberculosis.Activity.Update
import Pages.Tuberculosis.Encounter.Model
import Pages.Tuberculosis.Encounter.Update
import Pages.WellChild.Activity.Model
import Pages.WellChild.Activity.Update
import Pages.WellChild.Encounter.Model
Expand Down Expand Up @@ -558,6 +562,19 @@ update msg model =
, extraMsgs
)

MsgPageTuberculosisEncounter id subMsg ->
let
( subModel, subCmd, extraMsgs ) =
data.tuberculosisEncounterPages
|> Dict.get id
|> Maybe.withDefault Pages.Tuberculosis.Encounter.Model.emptyModel
|> Pages.Tuberculosis.Encounter.Update.update subMsg
in
( { data | tuberculosisEncounterPages = Dict.insert id subModel data.tuberculosisEncounterPages }
, Cmd.map (MsgLoggedIn << MsgPageTuberculosisEncounter id) subCmd
, extraMsgs
)

MsgPagePrenatalActivity id activity subMsg ->
let
( subModel, subCmd, extraMsgs ) =
Expand Down Expand Up @@ -699,6 +716,19 @@ update msg model =
, extraMsgs
)

MsgPageTuberculosisActivity id activity subMsg ->
let
( subModel, subCmd, extraMsgs ) =
data.tuberculosisActivityPages
|> Dict.get ( id, activity )
|> Maybe.withDefault Pages.Tuberculosis.Activity.Model.emptyModel
|> Pages.Tuberculosis.Activity.Update.update currentDate id model.indexedDb subMsg
in
( { data | tuberculosisActivityPages = Dict.insert ( id, activity ) subModel data.tuberculosisActivityPages }
, Cmd.map (MsgLoggedIn << MsgPageTuberculosisActivity id activity) subCmd
, extraMsgs
)

MsgPagePregnancyOutcome id subMsg ->
let
( subModel, subCmd, appMsgs ) =
Expand Down
Loading

0 comments on commit a4b28a5

Please sign in to comment.