From b000f52cc26969266068f62e631bde67f563c85f Mon Sep 17 00:00:00 2001 From: binduak Date: Tue, 5 Nov 2024 12:18:38 +0530 Subject: [PATCH] Bindu | Show reaction concepts based on the app locale --- .../patientAlergies/PatientAlergiesControl.jsx | 2 +- .../PatientAlergiesControl.spec.jsx | 17 +++++++---------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/micro-frontends/src/next-ui/Containers/patientAlergies/PatientAlergiesControl.jsx b/micro-frontends/src/next-ui/Containers/patientAlergies/PatientAlergiesControl.jsx index 5777a8e58b..289fc645ab 100644 --- a/micro-frontends/src/next-ui/Containers/patientAlergies/PatientAlergiesControl.jsx +++ b/micro-frontends/src/next-ui/Containers/patientAlergies/PatientAlergiesControl.jsx @@ -47,7 +47,7 @@ export function PatientAlergiesControl(props) { reactionData?.setMembers ?.filter((reaction) => reaction.display !== "Other non-coded") .map((reaction) => { - return { name: reaction.names[0].display, uuid: reaction.uuid }; + return { name: reaction.name.display, uuid: reaction.uuid }; }); const TransformReactionData = (reactionData) => { diff --git a/micro-frontends/src/next-ui/Containers/patientAlergies/PatientAlergiesControl.spec.jsx b/micro-frontends/src/next-ui/Containers/patientAlergies/PatientAlergiesControl.spec.jsx index 77d09b8f06..68f52c47f1 100644 --- a/micro-frontends/src/next-ui/Containers/patientAlergies/PatientAlergiesControl.spec.jsx +++ b/micro-frontends/src/next-ui/Containers/patientAlergies/PatientAlergiesControl.spec.jsx @@ -11,32 +11,29 @@ const mockMedicationResponseData = { { uuid: "100341AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", display: "Allergic to bee stings", - names: [ + name: { uuid: "100342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", display: "Bee sting", - }, - ], + } }, { uuid: "100342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", display: "Allergic to cats", - names: [ + name: { uuid: "100342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", display: "Cat", - }, - ], + } }, { uuid: "100343AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", display: "Allergic to dust", - names: [ + name: { uuid: "100343AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", display: "Dust", - }, - ], + } }, ], }; @@ -166,7 +163,7 @@ describe("PatientAlergiesControl", () => { ; - ); + ); await waitFor(() => { expect(screen.getByText("Allergies")).not.toBeNull(); });