Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(fix) KHP3-7120 : Fix isDead property validation error #60

Merged
merged 1 commit into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ class PatientMapper extends Mapper<HIEPatientResponse, FormValues> {
const telecomAttributes = this.mapTelecomToAttributes(telecom);
const updatedIdentifiers = this.mapIdentifiers(hiePatient, currentFormValues);
const extensionAddressEntries = this.mapExtensionsToAddress(hiePatient?.entry[0]?.resource.extension);

// TODO: In the event isDead is true, additional information such as caused of death, date e.tc is required
return {
isDead: hiePatient?.entry[0]?.resource?.active || false,
gender: hiePatient?.entry[0]?.resource.gender || '',
birthdate: hiePatient?.entry[0]?.resource?.birthDate || '',
isDead: hiePatient?.entry[0]?.resource?.active ? false : true,
gender: hiePatient?.entry[0]?.resource.gender ?? '',
birthdate: hiePatient?.entry[0]?.resource?.birthDate ?? '',
givenName,
familyName,
telephoneNumber: telecom.find((t) => t.system === 'phone')?.value || '',
Expand Down
2 changes: 2 additions & 0 deletions packages/esm-patient-registration-app/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"cancel": "Cancel",
"causeOfDeathInputLabel": "Cause of death",
"clientRegistryEmpty": "Create & Post Patient",
"clientRegistryEmptys": "Create Patient",
"clientRegistryError": "Error occurred while reaching the client registry",
"clientRegistryErrorSubtitle": "Please proceed with registration contact system admin and try again later",
"clientVerificationWithClientRegistry": "Client verification with client registry",
Expand Down Expand Up @@ -109,6 +110,7 @@
"patientName": "Patient name",
"patientNameKnown": "Patient's Name is Known?",
"patientNotFound": "The patient records could not be found in Client registry, do you want to continue to create and post patient to registry",
"patientNotFounds": "The patient records could not be found in the client registry, proceed to create patient or try again.",
"patientPhoneNUmber": "Patient Phone number",
"patientRegistrationBreadcrumb": "Patient Registration",
"patientVerificationFromHIE": "Patient verification from HIE",
Expand Down