-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1969: Remove the deprecated filter into patient registry r=jniles In this PR : - The deprecated filter is removed from the patient registry file, - The search modal was also updated to follow the new standard - A new component was implemented ```bhPatientGroupSelect``` and its test This PR references #1942
- Loading branch information
Showing
10 changed files
with
172 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
angular.module('bhima.components') | ||
.component('bhPatientGroupSelect', { | ||
templateUrl : 'modules/templates/bhPatientGroupSelect.tmpl.html', | ||
controller : PatientGroupSelectController, | ||
transclude : true, | ||
bindings : { | ||
patientGroupUuid : '<', | ||
onSelectCallback : '&', | ||
label : '@?', | ||
required : '<?', | ||
validateTrigger : '<?', | ||
}, | ||
}); | ||
|
||
PatientGroupSelectController.$inject = [ | ||
'PatientGroupService', 'NotifyService' | ||
]; | ||
|
||
/** | ||
* Patient Group selection component | ||
* | ||
*/ | ||
function PatientGroupSelectController(PatientGroups, Notify) { | ||
var $ctrl = this; | ||
|
||
$ctrl.$onInit = function onInit() { | ||
// default for label | ||
$ctrl.label = $ctrl.label || 'PATIENT_GROUP.PATIENT_GROUP'; | ||
|
||
// load all patient groups | ||
PatientGroups.read() | ||
.then(function (pgs) { | ||
$ctrl.patientGroups = pgs; | ||
}) | ||
.catch(Notify.handleError); | ||
}; | ||
|
||
$ctrl.onSelect = function ($item, $model) { | ||
$ctrl.onSelectCallback({ patientGroup : $item }); | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.