Skip to content

Commit

Permalink
Merge pull request #35 from gitcliff/card
Browse files Browse the repository at this point in the history
card:Implement a condition card to display the risk category depending on the total score in the level of care assessment form
  • Loading branch information
mozzy11 authored Apr 5, 2022
2 parents 5f05d0a + 6a4ce14 commit c3f9dd4
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 1 deletion.
17 changes: 17 additions & 0 deletions config/contact-summary.templated.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,23 @@ var fields = [
];

var cards = [
{
label: 'task.risk.status',
appliesToType: 'report',
appliesIf: function(r){
return r.form === 'care' && contact.type === 'person';
},
fields: [
{
label: 'task.risk.category',
value: function(r) {
var risk = r.fields.care.category;
return risk;
},
width: 6
},
]
},
{
label: 'contact.profile.pregnancy',
appliesToType: 'report',
Expand Down
Binary file modified config/forms/app/care.xlsx
Binary file not shown.
2 changes: 1 addition & 1 deletion config/forms/app/care.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
<bind nodeset="/care/inputs" relevant="./source = 'user'"/>
<bind nodeset="/care/inputs/source" type="string"/>
<bind nodeset="/care/inputs/source_id" type="string"/>
<bind nodeset="/care/inputs/contact/_id" type="db:person"/>
<bind nodeset="/care/inputs/contact/_id" type="db:person" required="true()"/>
<bind nodeset="/care/inputs/contact/patient_id" type="string"/>
<bind nodeset="/care/inputs/contact/name" type="string"/>
<bind nodeset="/care/inputs/contact/date_of_birth" type="string"/>
Expand Down
2 changes: 2 additions & 0 deletions config/translations/messages-en.properties
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ task.postnatal_missing_visit.title = Missing postnatal visit
task.immunization_missing_visit.title = Missing immunization visit
task.warning.danger_sign = Danger Signs
task.warning.high_risk = High Risk
task.risk.category = Risk Category
task.risk.status = Category
task.warning.home_birth = Home Birth
task.nutrition_screening.title = Malnutrition review referral visit
task.nutrition_screening_missing.title = Missing malnutrition referral visit
Expand Down

0 comments on commit c3f9dd4

Please sign in to comment.