-
Notifications
You must be signed in to change notification settings - Fork 294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BAH-3052 | Refactor. search using extraIdentiervalues and display configured identifier in patientList #603
base: master
Are you sure you want to change the base?
Conversation
…figured identifier in patientList
@@ -207,6 +207,17 @@ angular.module('bahmni.common.patientSearch') | |||
}); | |||
} | |||
}; | |||
$scope.getIdentifierValue = function (patient) { | |||
if (preferredExtraIdInPatientList !== null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this can be better written as
if (preferredExtraIdInPatientList && patient.extraIdentifiers) { ... }
if (preferredExtraIdInPatientList !== null) { | ||
var identifierIndex = patient.extraIdentifiers !== undefined ? patient.extraIdentifiers.split(",").indexOf(preferredExtraIdInPatientList) : -1; | ||
if (identifierIndex >= 0) { | ||
if (patient.extraIdentifierVal !== undefined && patient.extraIdentifierVal) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can just check
if (patient.extraIdentifierVal) { .. }
@SanoferSameera I think there is a bigger question here
|
No description provided.