diff --git a/src/Components/Facility/ConsultationDetails/index.tsx b/src/Components/Facility/ConsultationDetails/index.tsx index 356257f9ac6..c23bf071fa1 100644 --- a/src/Components/Facility/ConsultationDetails/index.tsx +++ b/src/Components/Facility/ConsultationDetails/index.tsx @@ -50,10 +50,26 @@ export interface ConsultationTabProps { patientData: PatientModel; } +const TABS = { + UPDATES: ConsultationUpdatesTab, + FEED: ConsultationFeedTab, + SUMMARY: ConsultationSummaryTab, + MEDICINES: ConsultationMedicinesTab, + FILES: ConsultationFilesTab, + INVESTIGATIONS: ConsultationInvestigationsTab, + ABG: ConsultationABGTab, + NURSING: ConsultationNursingTab, + NEUROLOGICAL_MONITORING: ConsultationNeurologicalMonitoringTab, + VENTILATOR: ConsultationVentilatorTab, + NUTRITION: ConsultationNursingTab, + PRESSURE_SORE: ConsultationPressureSoreTab, + DIALYSIS: ConsultationDialysisTab, +}; + export const ConsultationDetails = (props: any) => { const { t } = useTranslation(); const { facilityId, patientId, consultationId } = props; - const tab = props.tab.toUpperCase(); + const tab = props.tab.toUpperCase() as keyof typeof TABS; const dispatch: any = useDispatch(); const [isLoading, setIsLoading] = useState(false); const [showDoctors, setShowDoctors] = useState(false); @@ -142,22 +158,6 @@ export const ConsultationDetails = (props: any) => { }); }, []); - const TABS = { - UPDATES: ConsultationUpdatesTab, - FEED: ConsultationFeedTab, - SUMMARY: ConsultationSummaryTab, - MEDICINES: ConsultationMedicinesTab, - FILES: ConsultationFilesTab, - INVESTIGATIONS: ConsultationInvestigationsTab, - ABG: ConsultationABGTab, - NURSING: ConsultationNursingTab, - NEUROLOGICAL_MONITORING: ConsultationNeurologicalMonitoringTab, - VENTILATOR: ConsultationVentilatorTab, - NUTRITION: ConsultationNursingTab, - PRESSURE_SORE: ConsultationPressureSoreTab, - DIALYSIS: ConsultationDialysisTab, - }; - const consultationTabProps: ConsultationTabProps = { consultationId, facilityId, @@ -379,13 +379,7 @@ export const ConsultationDetails = (props: any) => {