From d574d09a33505e9c73f23d1775fddc8809b75e59 Mon Sep 17 00:00:00 2001 From: Donald Kibet Date: Tue, 26 Nov 2024 18:28:56 +0300 Subject: [PATCH] (fix) KHP3-7120 : Fix isDead property validation error --- .../client-registry/hie-client-registry/hie-resource.ts | 8 ++++---- .../esm-patient-registration-app/translations/en.json | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/esm-patient-registration-app/src/client-registry/hie-client-registry/hie-resource.ts b/packages/esm-patient-registration-app/src/client-registry/hie-client-registry/hie-resource.ts index 4f1cbbe10..ada13cd52 100644 --- a/packages/esm-patient-registration-app/src/client-registry/hie-client-registry/hie-resource.ts +++ b/packages/esm-patient-registration-app/src/client-registry/hie-client-registry/hie-resource.ts @@ -42,11 +42,11 @@ class PatientMapper extends Mapper { 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 || '', diff --git a/packages/esm-patient-registration-app/translations/en.json b/packages/esm-patient-registration-app/translations/en.json index bf123f389..e6102949a 100644 --- a/packages/esm-patient-registration-app/translations/en.json +++ b/packages/esm-patient-registration-app/translations/en.json @@ -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", @@ -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",