Skip to content

Commit

Permalink
Merge pull request #1660 from arodidev/patient-list-cohort-issue
Browse files Browse the repository at this point in the history
OHRI-1882: Fix HIV Care and Treatment Dashboard on the home screen
  • Loading branch information
arodidev authored Oct 13, 2023
2 parents d9efd99 + e450970 commit 1bcc3c7
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ export const CohortPatientList: React.FC<CohortPatientListProps> = ({
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
Expand Down

0 comments on commit 1bcc3c7

Please sign in to comment.