Skip to content

Commit

Permalink
Merge pull request #175 from jembi/dev
Browse files Browse the repository at this point in the history
Release v1.7.0
  • Loading branch information
tmvumbi2 authored Oct 30, 2020
2 parents f474380 + 2bcde0c commit 1f5607e
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,12 @@ angular.module('bahmni.common.uicontrols.programmanagment')
return !_.isEmpty($scope.endedPrograms);
};

$scope.programOutcomeChanged = function (_value) {
if (_value) {
_value.PROGRAM_MANAGEMENT_OTHER_PROGRAM_OUTCOME = "";
}
};

$scope.enrollPatient = function () {
if (!isProgramSelected()) {
messagingService.showMessage("error", "PROGRAM_MANAGEMENT_SELECT_PROGRAM_MESSAGE_KEY");
Expand Down
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 @@ -60,10 +60,16 @@
</div>
<div class="field-value">
<select ng-model="patientProgram.outcomeData"
ng-change="programOutcomeChanged(patientProgram.patientProgramAttributes)"
ng-options="outcomeSelected.names[0].display for outcomeSelected in ::patientProgram.program.outcomesConcept.setMembers">
<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
2 changes: 1 addition & 1 deletion ui/app/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.6.0
v1.7.0
2 changes: 1 addition & 1 deletion ui/test/unit/clinical/models/drugOrderViewModel.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ describe("drugOrderViewModel", function () {

treatment.durationUnit = "Mois";
treatment.calculateDurationInDays();
expect(treatment.durationInDays >= 182 && treatment.durationInDays < 185).toBeTruthy();
expect(treatment.durationInDays >= 181 && treatment.durationInDays < 185).toBeTruthy();

treatment.durationUnit = "Day(s)"
treatment.calculateDurationInDays();
Expand Down

0 comments on commit 1f5607e

Please sign in to comment.