From 7db394396f497a87e78e8e65457d65961174a365 Mon Sep 17 00:00:00 2001 From: Kavitha S Date: Thu, 24 Oct 2024 11:13:58 +0530 Subject: [PATCH] Kavitha,Bindu| add other to the allergens --- .../patientAlergies/PatientAlergiesControl.jsx | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/micro-frontends/src/next-ui/Containers/patientAlergies/PatientAlergiesControl.jsx b/micro-frontends/src/next-ui/Containers/patientAlergies/PatientAlergiesControl.jsx index 935ee7d44a..5777a8e58b 100644 --- a/micro-frontends/src/next-ui/Containers/patientAlergies/PatientAlergiesControl.jsx +++ b/micro-frontends/src/next-ui/Containers/patientAlergies/PatientAlergiesControl.jsx @@ -24,6 +24,7 @@ const AllergenKind = { DRUG: "Drug", FOOD: "Food", ENVIRONMENT: "Environment", + OTHER: "Other", }; export function PatientAlergiesControl(props) { const { hostData, appService } = props; @@ -69,7 +70,8 @@ export function PatientAlergiesControl(props) { const TransformAllergenData = ( medicationAllergenData, foodAllergenData, - environmentAllergenData + environmentAllergenData, + otherAllergenData ) => { const medicationAllergens = extractAllergenData( medicationAllergenData, @@ -83,11 +85,16 @@ export function PatientAlergiesControl(props) { foodAllergenData, AllergenKind.FOOD ); + const otherAllergens = extractAllergenData( + otherAllergenData, + AllergenKind.OTHER + ); return [ ...medicationAllergens, ...environmentalAllergens, ...foodAllergens, + ...otherAllergens, ]; }; @@ -152,6 +159,7 @@ export function PatientAlergiesControl(props) { allergyControlConceptIdMap.medicationAllergenUuid, allergyControlConceptIdMap.foodAllergenUuid, allergyControlConceptIdMap.environmentalAllergenUuid, + allergyControlConceptIdMap.otherAllergenUuid, allergyControlConceptIdMap.allergyReactionUuid, allergyControlConceptIdMap.allergySeverityUuid ]; @@ -162,13 +170,15 @@ export function PatientAlergiesControl(props) { medicationResponseData, foodResponseData, environmentalResponseData, + otherResponseData, reactionResponseData, severityResponseData ] = await Promise.all(urls.map((url) => fetchAllergensOrReactions(url))); const allergenData = TransformAllergenData( medicationResponseData, foodResponseData, - environmentalResponseData + environmentalResponseData, + otherResponseData ); const reactionsData = TransformReactionData(reactionResponseData);