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 authored Aug 26, 2024
1 parent 31f605a commit aeef67b
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 @@ -33,7 +33,7 @@
"deleteIdentifierTooltip": "Delete",
"deleteRelationshipTooltipText": "Delete",
"demographicsSection": "Basic Info",
"dependants": "Dependants",
"dependents": "Dependents",
"discard": "Discard",
"discardModalBody": "The changes you made to this patient's details have not been saved. Discard changes?",
"discardModalHeader": "Confirm Discard Changes",
Expand Down
Loading

0 comments on commit aeef67b

Please sign in to comment.