From 47b6dacaec444be1400d19f5b754157a2ef2c72c Mon Sep 17 00:00:00 2001 From: Amjith Titus Date: Mon, 6 Jan 2025 20:51:53 +0530 Subject: [PATCH] Unique queryKey --- .../Facility/ConsultationDetails/StructuredResponseView.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/Facility/ConsultationDetails/StructuredResponseView.tsx b/src/components/Facility/ConsultationDetails/StructuredResponseView.tsx index 3b087d7fecf..0ed4e71dc82 100644 --- a/src/components/Facility/ConsultationDetails/StructuredResponseView.tsx +++ b/src/components/Facility/ConsultationDetails/StructuredResponseView.tsx @@ -37,19 +37,19 @@ export function StructuredResponseView({ }); const symptomQuery = useQuery({ - queryKey: ["symptom"], + queryKey: ["symptom", id], queryFn: query(symptomApi.retrieveSymptom, getParams("symptomId")), enabled: type === "symptom" && !!id, }); const diagnosisQuery = useQuery({ - queryKey: ["diagnosis"], + queryKey: ["diagnosis", id], queryFn: query(diagnosisApi.retrieveDiagnosis, getParams("diagnosisId")), enabled: type === "diagnosis" && !!id, }); const allergyQuery = useQuery({ - queryKey: ["allergy_intolerance"], + queryKey: ["allergy_intolerance", id], queryFn: query(allergyApi.retrieveAllergy, getParams("allergyId")), enabled: type === "allergy_intolerance" && !!id, });