Skip to content

Commit

Permalink
COM-921 Add field "other program outcome" to defaulter program
Browse files Browse the repository at this point in the history
The new field is displayed only when the outcome 'others' is selected
  • Loading branch information
tmvumbi2 committed Sep 3, 2020
1 parent a1cea26 commit 595be52
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="form-field" ng-repeat="attributeType in programAttributeTypes" ng-show="!patientProgram.editing" ng-if="isIncluded(attributeType) && !attributeType.name.includes('PROGRAM_MANAGEMENT_7')">
<div class="form-field" ng-repeat="attributeType in programAttributeTypes" ng-show="!patientProgram.editing" ng-if="isIncluded(attributeType) && !attributeType.name.includes('PROGRAM_MANAGEMENT_7') && !attributeType.name.includes('PROGRAM_MANAGEMENT_OTHER_PROGRAM_OUTCOME')">
<div class="field-attribute">
<label>{{attributeType.description | translate}} : </label>
</div>
Expand Down Expand Up @@ -26,7 +26,7 @@
</div>

<div ng-show="patientProgram.editing" class="programEditing">
<article class="form-field" ng-repeat="attributeType in programAttributeTypes" ng-if="isIncluded(attributeType) && !attributeType.name.includes('PROGRAM_MANAGEMENT_7')">
<article class="form-field" ng-repeat="attributeType in programAttributeTypes" ng-if="isIncluded(attributeType) && !attributeType.name.includes('PROGRAM_MANAGEMENT_7') && !attributeType.name.includes('PROGRAM_MANAGEMENT_OTHER_PROGRAM_OUTCOME')">
<attribute-types target-model="patientProgram.patientProgramAttributes" attribute="attributeType"></attribute-types>
</article>
<div ng-if="patientProgram.program.name === 'HIV_DEFAULTERS_PROGRAM_KEY'"><br><b>{{'PROGRAM_MANAGEMENT_REASON_FOR_DEFAULTING' | translate}} :</b></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
</div>
</article>

<article class="fl" ng-repeat="attribute in programAttributeTypes" ng-if="isIncluded(attribute) && programSelected.name && !attribute.name.includes('PROGRAM_MANAGEMENT_7')">
<article class="fl" ng-repeat="attribute in programAttributeTypes" ng-if="isIncluded(attribute) && programSelected.name && !attribute.name.includes('PROGRAM_MANAGEMENT_7') && !attribute.name.includes('PROGRAM_MANAGEMENT_OTHER_PROGRAM_OUTCOME')">
<attribute-types target-model="patientProgramAttributes" attribute="attribute"
is-form="true"></attribute-types>
</article>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@
<option value="">{{::'PROGRAM_MANAGEMENT_LABEL_CHOOSE_OUTCOME' | translate}}</option>
</select>
</div>
<div class="field-value" ng-show="patientProgram.outcomeData.display==='Others'">
<article class="form-field" ng-repeat="attributeType in programAttributeTypes" ng-if="isIncluded(attributeType) && attributeType.name.includes('PROGRAM_MANAGEMENT_OTHER_PROGRAM_OUTCOME')">
<attribute-types target-model="patientProgram.patientProgramAttributes" attribute="attributeType"></attribute-types>
</article>
</div>
</div>
</div>
</form>
Expand Down
1 change: 1 addition & 0 deletions ui/app/i18n/clinical/locale_en.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
"PROGRAM_MANAGEMENT_712_FEELS_HEALTHY" : "Feels healthy",
"PROGRAM_MANAGEMENT_713_INSECURITY" : "Insecurity",
"PROGRAM_MANAGEMENT_714_OTHER_DEFAULTING_REASON" : "Other reason for defaulting",
"PROGRAM_MANAGEMENT_OTHER_PROGRAM_OUTCOME" : "Other Program Outcome",
"PROGRAM_MANAGEMENT_2_LAST_FAILED_APPOINTMENT_DATE": "Date of last failed appointment",
"PROGRAM_MANAGEMENT_DEFAULTING_OUTCOME": "Program Outcome",
"PROGRAM_MANAGEMENT_3_PRETRACKING_OUTCOME": "Pretracking outcome",
Expand Down
1 change: 1 addition & 0 deletions ui/app/i18n/clinical/locale_fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
"PROGRAM_MANAGEMENT_712_FEELS_HEALTHY" : "Se sens en santé",
"PROGRAM_MANAGEMENT_713_INSECURITY" : "Insecurité",
"PROGRAM_MANAGEMENT_714_OTHER_DEFAULTING_REASON" : "Autre raison de l'absence",
"PROGRAM_MANAGEMENT_OTHER_PROGRAM_OUTCOME" : "Autre résultat du programme",
"PROGRAM_MANAGEMENT_2_LAST_FAILED_APPOINTMENT_DATE": "Date de rendez-vous manqué",
"PROGRAM_MANAGEMENT_DEFAULTING_OUTCOME": "Résultat du programme",
"PROGRAM_MANAGEMENT_3_PRETRACKING_OUTCOME": "Situation du patient avant traçage",
Expand Down

0 comments on commit 595be52

Please sign in to comment.