Skip to content

Commit

Permalink
(fix) add optional chaning on maritial status (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
donaldkibet committed Dec 17, 2024
1 parent 3a64a9a commit 1e01840
Show file tree
Hide file tree
Showing 4 changed files with 5,005 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ const HIEConfirmationModal: React.FC<HIEConfirmationModalProps> = ({ closeModal,
state={{ patientName: `${firstName} ${lastName}` }}
/>
<div style={{ width: '100%', marginLeft: '0.625rem' }}>
<PatientInfo label={t('healthID', 'HealthID')} value={patient.id} />
<PatientInfo label={t('healthID', 'HealthID')} value={patient?.id} />
<PatientInfo label={t('patientName', 'Patient name')} value={`${firstName} ${lastName}`} />
<PatientInfo label={t('age', 'Age')} value={age(patient?.birthDate)} />
<PatientInfo label={t('dateOfBirth', 'Date of birth')} value={formatDate(new Date(patient?.birthDate))} />
<PatientInfo label={t('gender', 'Gender')} value={capitalize(patient?.gender)} />
<PatientInfo
label={t('maritalStatus', 'Marital status')}
value={patient.maritalStatus.coding.map((m) => m.code).join('')}
value={patient?.maritalStatus?.coding?.map((m) => m.code).join('')}
/>
<PatientInfo label={t('dependents', 'Dependents')} value="--" />
</div>
Expand Down
2 changes: 1 addition & 1 deletion packages/esm-patient-registration-app/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"deleteIdentifierTooltip": "Delete",
"deleteRelationshipTooltipText": "Delete",
"demographicsSection": "Basic Info",
"dependants": "Dependants",
"dependents": "Dependents",
"discard": "Discard",
"dobToggleLabelText": "Date of Birth Known?",
"editIdentifierTooltip": "Edit",
Expand Down
Loading

0 comments on commit 1e01840

Please sign in to comment.