mv treatment-report to action-report based on encounter menu id list

This commit is contained in:
Khafid Prayoga
2025-12-03 17:38:15 +07:00
parent 8fa1f61b19
commit da26790513
26 changed files with 45 additions and 52 deletions
+6 -13
View File
@@ -47,7 +47,7 @@ const DocUploadListAsync = defineAsyncComponent(() => import('~/components/conte
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 TreatmentReportEntryAsync = defineAsyncComponent(() => import('~/components/content/treatment-report/entry.vue'))
const ActionReportEntryAsync = defineAsyncComponent(() => import('~/components/content/action-report/entry.vue'))
const defaultKeys: Record<string, any> = {
status: {
@@ -247,12 +247,6 @@ const defaultKeys: Record<string, any> = {
classCode: ['ambulatory', 'emergency', 'inpatient'],
unit: 'all',
},
treatmentReport: {
id: 'treatment-report',
title: 'Laporan Tindakan',
classCode: ['ambulatory', 'emergency', 'inpatient'],
unit: 'all',
},
}
export function getItemsByClassCode(classCode: string, items: EncounterItem[]) {
@@ -413,15 +407,14 @@ export function injectComponents(id: string | number, data: EncounterListData, m
currentKeys.priceList['props'] = { encounter_id: id }
}
if (currentKeys?.treatmentReport) {
currentKeys.treatmentReport['component'] = TreatmentReportEntryAsync
currentKeys.treatmentReport['props'] = {
if (currentKeys?.actionReport) {
currentKeys.actionReport['component'] = ActionReportEntryAsync
currentKeys.actionReport['props'] = {
encounter: data?.encounter,
type: 'treatment-report',
label: currentKeys.treatmentReport['title'],
type: 'action-report',
label: currentKeys.actionReport['title'],
}
}
return currentKeys
}