Skip to content

Commit

Permalink
update icd11 model
Browse files Browse the repository at this point in the history
  • Loading branch information
rithviknishad committed Sep 25, 2023
1 parent b2076e3 commit 52d37eb
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 25 deletions.
42 changes: 18 additions & 24 deletions src/Components/Facility/ConsultationDetails/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -379,13 +379,7 @@ export const ConsultationDetails = (props: any) => {
<ShowDiagnosis
diagnoses={[
...(consultationData?.diagnosis
? [
{
id: "0",
label: consultationData?.diagnosis,
parentId: null,
},
]
? [{ id: "0", label: consultationData?.diagnosis }]
: []),
...(consultationData?.icd11_diagnoses_object ?? []),
]}
Expand Down
1 change: 0 additions & 1 deletion src/Components/Facility/models.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -223,5 +223,4 @@ export interface CurrentBed {
export type ICD11DiagnosisModel = {
id: string;
label: string;
parentId: string | null;
};

0 comments on commit 52d37eb

Please sign in to comment.