Skip to content

Commit

Permalink
Merge pull request #173 from jembi/COM-921
Browse files Browse the repository at this point in the history
COM-921 Clear the field 'other outcome' when the outcome field changes
  • Loading branch information
tmvumbi2 authored Oct 5, 2020
2 parents 44ce35e + f34576e commit 50db486
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 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
Expand Up @@ -60,6 +60,7 @@
</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>
Expand Down

0 comments on commit 50db486

Please sign in to comment.