Skip to content

Commit

Permalink
(fix) O3-3828: Patient search crashes with Uncaught RangeError (#1288)
Browse files Browse the repository at this point in the history
* O3-3828: resolved age calculation error on patient search by checking for missing date of birth

* Update packages/esm-patient-search-app/src/compact-patient-search/compact-patient-banner.component.tsx

---------

Co-authored-by: Brandon Istenes <[email protected]>
  • Loading branch information
chimanwadike and brandones authored Aug 20, 2024
1 parent aed444f commit 8fecf37
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ const CompactPatientBanner = forwardRef<HTMLDivElement, CompactPatientBannerProp
/>
</div>
<div className={styles.demographics}>
{getGender(patient.gender)} <span className={styles.middot}>&middot;</span> {age(patient.birthDate)}
{getGender(patient.gender)} <span className={styles.middot}>&middot;</span>{' '}
{patient.birthDate && age(patient.birthDate)}
<span className={styles.middot}>&middot;</span>
{patientIdentifiers.map((identifier) => (
<IdentifierTag key={identifier.uuid} identifier={identifier} />
Expand Down

0 comments on commit 8fecf37

Please sign in to comment.