From e4509704ebf431250cdc08c3c7b32702a6bd3ccf Mon Sep 17 00:00:00 2001 From: arodidev <51090527+arodidev@users.noreply.github.com> Date: Thu, 12 Oct 2023 09:31:55 +0300 Subject: [PATCH] Update patient-list-cohort.component.tsx --- .../patient-list-cohort/patient-list-cohort.component.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/esm-commons-lib/src/components/patient-list-cohort/patient-list-cohort.component.tsx b/packages/esm-commons-lib/src/components/patient-list-cohort/patient-list-cohort.component.tsx index 2e289df46..a16206f60 100644 --- a/packages/esm-commons-lib/src/components/patient-list-cohort/patient-list-cohort.component.tsx +++ b/packages/esm-commons-lib/src/components/patient-list-cohort/patient-list-cohort.component.tsx @@ -79,7 +79,9 @@ export const CohortPatientList: React.FC = ({ const dashboard = launchableForm?.targetDashboard ? `/${launchableForm?.targetDashboard}` : ''; return { uuid: patientUuid, - id: isReportingCohort ? rawPatient.identifiers[0].identifier : rawPatient.patient.identifiers[0].identifier, + id: isReportingCohort + ? rawPatient?.identifiers[0]?.identifier + : rawPatient?.patient?.identifiers[0]?.identifier, age: isReportingCohort ? rawPatient.person.age : rawPatient.patient.person.age, name: isReportingCohort ? rawPatient.person.display : rawPatient.patient.person.display, birthdate: isReportingCohort