diff --git a/app/handlers/encounter-init.handler.ts b/app/handlers/encounter-init.handler.ts index 891f6e6c..240c071f 100644 --- a/app/handlers/encounter-init.handler.ts +++ b/app/handlers/encounter-init.handler.ts @@ -32,14 +32,17 @@ const StatusAsync = defineAsyncComponent(() => import('~/components/content/enco const AssesmentFunctionListAsync = defineAsyncComponent(() => import('~/components/content/soapi/entry.vue')) const EarlyMedicalAssesmentListAsync = defineAsyncComponent(() => import('~/components/content/soapi/entry.vue')) const EarlyMedicalRehabListAsync = defineAsyncComponent(() => import('~/components/content/soapi/entry.vue')) +const ChemoProtocolListAsync = defineAsyncComponent(() => import('~/components/app/chemotherapy/list.protocol.vue')) +const ChemoMedicineProtocolListAsync = defineAsyncComponent(() => import('~/components/app/chemotherapy/list.medicine.vue')) +const DeviceOrderAsync = defineAsyncComponent(() => import('~/components/content/device-order/main.vue')) const PrescriptionAsync = defineAsyncComponent(() => import('~/components/content/prescription/main.vue')) -// const PrescriptionListAsync = defineAsyncComponent(() => import('~/components/content/prescription/list.vue')) const CpLabOrderAsync = defineAsyncComponent(() => import('~/components/content/cp-lab-order/main.vue')) const RadiologyAsync = defineAsyncComponent(() => import('~/components/content/radiology-order/main.vue')) const ConsultationAsync = defineAsyncComponent(() => import('~/components/content/consultation/list.vue')) +const DocUploadListAsync = defineAsyncComponent(() => import('~/components/content/document-upload/list.vue')) +const GeneralConsentListAsync = defineAsyncComponent(() => import('~/components/content/general-consent/entry.vue')) +const ResumeListAsync = defineAsyncComponent(() => import('~/components/content/resume/list.vue')) const ControlLetterListAsync = defineAsyncComponent(() => import('~/components/content/control-letter/list.vue')) -const ProtocolListAsync = defineAsyncComponent(() => import('~/components/app/chemotherapy/list.protocol.vue')) -const MedicineProtocolListAsync = defineAsyncComponent(() => import('~/components/app/chemotherapy/list.medicine.vue')) const defaultKeys: Record = { status: { @@ -89,9 +92,15 @@ const defaultKeys: Record = { unit: 'chemo', afterId: 'chemotherapy-protocol', }, - report: { - id: 'report', - title: 'Laporan Tindakan', + educationAssessment: { + id: 'education-assessment', + title: 'Asesmen Kebutuhan Edukasi', + classCode: ['ambulatory', 'emergency', 'inpatient'], + unit: 'all', + }, + consent: { + id: 'consent', + title: 'General Consent', classCode: ['ambulatory', 'emergency', 'inpatient'], unit: 'all', }, @@ -101,18 +110,6 @@ const defaultKeys: Record = { classCode: ['ambulatory', 'emergency', 'inpatient'], unit: 'all', }, - educationAssessment: { - id: 'education-assessment', - title: 'Asesmen Kebutuhan Edukasi', - classCode: ['ambulatory', 'emergency', 'inpatient'], - unit: 'all', - }, - consent: { - id: 'consent', - title: 'General Consent', - classCode: ['ambulatory', 'emergency', 'inpatient'], - unit: 'all', - }, prescription: { id: 'prescription', title: 'Order Obat', @@ -120,7 +117,7 @@ const defaultKeys: Record = { unit: 'all', }, device: { - id: 'device', + id: 'device-order', title: 'Order Alkes', classCode: ['ambulatory', 'emergency', 'inpatient'], unit: 'all', @@ -260,32 +257,44 @@ export function injectComponents(id: string | number, data: EncounterListData, m } } if (currentKeys?.therapyProtocol) { - currentKeys.therapyProtocol['component'] = ProtocolListAsync + currentKeys.therapyProtocol['component'] = null currentKeys.therapyProtocol['props'] = { data: data?.protocolTheraphy, paginationMeta: meta?.protocolTheraphy, } } if (currentKeys?.chemotherapyProtocol) { - currentKeys.chemotherapyProtocol['component'] = ProtocolListAsync + currentKeys.chemotherapyProtocol['component'] = ChemoProtocolListAsync currentKeys.chemotherapyProtocol['props'] = { data: data?.protocolChemotherapy, paginationMeta: meta?.protocolChemotherapy, } } if (currentKeys?.chemotherapyMedicine) { - currentKeys.chemotherapyMedicine['component'] = MedicineProtocolListAsync + currentKeys.chemotherapyMedicine['component'] = ChemoMedicineProtocolListAsync currentKeys.chemotherapyMedicine['props'] = { data: data?.medicineProtocolChemotherapy, paginationMeta: meta?.medicineProtocolChemotherapy, } } + if (currentKeys?.educationAssessment) { + currentKeys.educationAssessment['component'] = null + currentKeys.educationAssessment['props'] = { encounter_id: id } + } + if (currentKeys?.consent) { + currentKeys.report['component'] = GeneralConsentListAsync + currentKeys.report['props'] = { encounter_id: id } + } + if (currentKeys?.patientNote) { + currentKeys.patientNote['component'] = null + currentKeys.patientNote['props'] = { encounter_id: id } + } if (currentKeys?.prescription) { currentKeys.prescription['component'] = PrescriptionAsync currentKeys.prescription['props'] = { encounter_id: id } } if (currentKeys?.device) { - currentKeys.device['component'] = null + currentKeys.device['component'] = DeviceOrderAsync currentKeys.device['props'] = { encounter_id: id } } if (currentKeys?.mcuRadiology) { @@ -317,7 +326,7 @@ export function injectComponents(id: string | number, data: EncounterListData, m currentKeys.consultation['props'] = { encounter: data?.consultation } } if (currentKeys?.resume) { - currentKeys.resume['component'] = null + currentKeys.resume['component'] = ResumeListAsync currentKeys.resume['props'] = { encounter_id: id } } if (currentKeys?.control) { @@ -329,29 +338,13 @@ export function injectComponents(id: string | number, data: EncounterListData, m currentKeys.screening['props'] = { encounter_id: id } } if (currentKeys?.supportingDocument) { - currentKeys.supportingDocument['component'] = null + currentKeys.supportingDocument['component'] = DocUploadListAsync currentKeys.supportingDocument['props'] = { encounter_id: id } } if (currentKeys?.priceList) { currentKeys.priceList['component'] = null currentKeys.priceList['props'] = { encounter_id: id } } - if (currentKeys?.patientNote) { - currentKeys.patientNote['component'] = null - currentKeys.patientNote['props'] = { encounter_id: id } - } - if (currentKeys?.educationAssessment) { - currentKeys.educationAssessment['component'] = null - currentKeys.educationAssessment['props'] = { encounter_id: id } - } - if (currentKeys?.consent) { - currentKeys.consent['component'] = null - currentKeys.consent['props'] = { encounter_id: id } - } - if (currentKeys?.report) { - currentKeys.report['component'] = null - currentKeys.report['props'] = { encounter_id: id } - } return currentKeys }