diff --git a/ui/app/registration/controllers/searchPatientController.js b/ui/app/registration/controllers/searchPatientController.js index 1b99e719f9..8a342e57dc 100644 --- a/ui/app/registration/controllers/searchPatientController.js +++ b/ui/app/registration/controllers/searchPatientController.js @@ -5,8 +5,12 @@ angular.module('bahmni.registration') 'messagingService', '$translate', '$filter', function ($rootScope, $scope, $location, $window, spinner, patientService, appService, messagingService, $translate, $filter) { $scope.results = []; + var searchDisplayOptions = appService.getAppDescriptor().getConfigValue("patientSearchResultOptions") || {}; + var ignoredIdentifiers = new Set(searchDisplayOptions.ignorePatientIdentifiers || []); + $scope.showAge = searchDisplayOptions.showAge != null ? searchDisplayOptions.showAge : true; + $scope.showDOB = searchDisplayOptions.showDOB != null ? searchDisplayOptions.showDOB : false; $scope.extraIdentifierTypes = _.filter($rootScope.patientConfiguration.identifierTypes, function (identifierType) { - return !identifierType.primary; + return !identifierType.primary && !ignoredIdentifiers.has(identifierType.name); }); var searching = false; var maxAttributesFromConfig = 5; diff --git a/ui/app/registration/views/search.html b/ui/app/registration/views/search.html index 9e23de8a12..91ea7a714d 100644 --- a/ui/app/registration/views/search.html +++ b/ui/app/registration/views/search.html @@ -2,7 +2,7 @@