Skip to content

Commit

Permalink
Bindu | Show reaction concepts based on the app locale (#1020)
Browse files Browse the repository at this point in the history
  • Loading branch information
binduak authored Nov 5, 2024
1 parent 4d20f7e commit a506b04
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
],
}
},
],
};
Expand Down Expand Up @@ -166,7 +163,7 @@ describe("PatientAlergiesControl", () => {
<IntlProvider locale="en">
<PatientAlergiesControl hostData={testHostData} appService={mockAppService}/>;
</IntlProvider>
);
);
await waitFor(() => {
expect(screen.getByText("Allergies")).not.toBeNull();
});
Expand Down

0 comments on commit a506b04

Please sign in to comment.