diff --git a/src/Components/Facility/ConsultationDetails/index.tsx b/src/Components/Facility/ConsultationDetails/index.tsx index f5b79efdb86..eace53c18af 100644 --- a/src/Components/Facility/ConsultationDetails/index.tsx +++ b/src/Components/Facility/ConsultationDetails/index.tsx @@ -176,7 +176,7 @@ export const ConsultationDetails = (props: any) => { useAbortableEffect((status: statusType) => { fetchData(status); triggerGoal("Patient Consultation Viewed", { - facilityId: consultationData.facility, + facilityId: facilityId, consultationId: consultationId, userId: authUser.id, }); @@ -258,10 +258,8 @@ export const ConsultationDetails = (props: any) => { title="Patient Dashboard" className="sm:m-0 sm:p-0" crumbsReplacements={{ - [consultationData.facility || ""]: { - name: consultationData.facility_name, - }, - [patientData?.id || ""]: { name: patientData?.name }, + [facilityId]: { name: patientData?.facility_object?.name }, + [patientId]: { name: patientData?.name }, [consultationId]: { name: consultationData.suggestion === "A"