From 845fa061d22f7663f873cf52055933a38f23c2e5 Mon Sep 17 00:00:00 2001 From: Miguel Date: Mon, 21 Jun 2021 18:03:13 -0500 Subject: [PATCH] 'Patient Identifier column' --- .../scripts/patientsearch/patientSearchWidget.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/omod/src/main/webapp/resources/scripts/patientsearch/patientSearchWidget.js b/omod/src/main/webapp/resources/scripts/patientsearch/patientSearchWidget.js index de5e12998..0cafcc5ce 100644 --- a/omod/src/main/webapp/resources/scripts/patientsearch/patientSearchWidget.js +++ b/omod/src/main/webapp/resources/scripts/patientsearch/patientSearchWidget.js @@ -355,6 +355,19 @@ function PatientSearchWidget(configuration){ } }); } + /* Added Identifier type for the patient list in the main dashboard */ + else { + const identifiersFiltered = patient.identifiers.filter(i => i.identifierType.uuid === "ffbd60fb-599a-4a57-b2f1-4b55847cd938" || i.identifierType.uuid === "3fa0990e-900d-4a80-a4c1-dcf01a0d4f9c"); + if (identifiersFiltered.length > 0) { + const identifierFiltered = identifiersFiltered[0]; + if (column.type === "identifierType") { + columnValue = identifierFiltered.identifierType.name; + } + else if (column.type === "identifierNumber") { + columnValue = identifierFiltered.identifier; + } + } + } if (index === 0) { if(_.contains(initialPatientUuids, patient.uuid)){ columnValue += "" + config.messages.recent + "";