Skip to content

Commit a506b04

Browse files
authored
Bindu | Show reaction concepts based on the app locale (#1020)
1 parent 4d20f7e commit a506b04

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

micro-frontends/src/next-ui/Containers/patientAlergies/PatientAlergiesControl.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export function PatientAlergiesControl(props) {
4747
reactionData?.setMembers
4848
?.filter((reaction) => reaction.display !== "Other non-coded")
4949
.map((reaction) => {
50-
return { name: reaction.names[0].display, uuid: reaction.uuid };
50+
return { name: reaction.name.display, uuid: reaction.uuid };
5151
});
5252

5353
const TransformReactionData = (reactionData) => {

micro-frontends/src/next-ui/Containers/patientAlergies/PatientAlergiesControl.spec.jsx

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,32 +11,29 @@ const mockMedicationResponseData = {
1111
{
1212
uuid: "100341AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
1313
display: "Allergic to bee stings",
14-
names: [
14+
name:
1515
{
1616
uuid: "100342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
1717
display: "Bee sting",
18-
},
19-
],
18+
}
2019
},
2120
{
2221
uuid: "100342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
2322
display: "Allergic to cats",
24-
names: [
23+
name:
2524
{
2625
uuid: "100342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
2726
display: "Cat",
28-
},
29-
],
27+
}
3028
},
3129
{
3230
uuid: "100343AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
3331
display: "Allergic to dust",
34-
names: [
32+
name:
3533
{
3634
uuid: "100343AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
3735
display: "Dust",
38-
},
39-
],
36+
}
4037
},
4138
],
4239
};
@@ -166,7 +163,7 @@ describe("PatientAlergiesControl", () => {
166163
<IntlProvider locale="en">
167164
<PatientAlergiesControl hostData={testHostData} appService={mockAppService}/>;
168165
</IntlProvider>
169-
);
166+
);
170167
await waitFor(() => {
171168
expect(screen.getByText("Allergies")).not.toBeNull();
172169
});

0 commit comments

Comments
 (0)