Feat: add UIs to sidebar
This commit is contained in:
No files matched your search
@@ -47,6 +47,10 @@ 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 KfrListAsync = defineAsyncComponent(() => import('~/components/content/kfr/list.vue'))
|
||||
const PrbListAsync = defineAsyncComponent(() => import('~/components/content/prb/list.vue'))
|
||||
const SurgeryReportListAsync = defineAsyncComponent(() => import('~/components/content/surgery-report/list.vue'))
|
||||
const VaccineDataListAsync = defineAsyncComponent(() => import('~/components/content/vaccine-data/list.vue'))
|
||||
|
||||
const defaultKeys: Record<string, any> = {
|
||||
status: {
|
||||
@@ -186,8 +190,8 @@ const defaultKeys: Record<string, any> = {
|
||||
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
||||
unit: 'all',
|
||||
},
|
||||
vacsinData: {
|
||||
id: 'vacsin-data',
|
||||
vaccineData: {
|
||||
id: 'vaccine-data',
|
||||
title: 'Data Vaksin',
|
||||
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
||||
unit: 'all',
|
||||
@@ -210,6 +214,12 @@ const defaultKeys: Record<string, any> = {
|
||||
classCode: ['ambulatory', 'emergency'],
|
||||
unit: 'all',
|
||||
},
|
||||
kfr: {
|
||||
id: 'kfr',
|
||||
title: 'KFR',
|
||||
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
||||
unit: 'all',
|
||||
},
|
||||
refBack: {
|
||||
id: 'reference-back',
|
||||
title: 'PRB',
|
||||
@@ -387,15 +397,31 @@ export function injectComponents(id: string | number, data: EncounterListData, m
|
||||
currentKeys.resume['component'] = ResumeListAsync
|
||||
currentKeys.resume['props'] = { encounter_id: id }
|
||||
}
|
||||
if (currentKeys?.control) {
|
||||
currentKeys.control['component'] = ControlLetterListAsync
|
||||
currentKeys.control['props'] = { encounter: data?.encounter }
|
||||
if (currentKeys?.controlLetter) {
|
||||
currentKeys.controlLetter['component'] = ControlLetterListAsync
|
||||
currentKeys.controlLetter['props'] = { encounter: data?.encounter }
|
||||
}
|
||||
if (currentKeys?.refBack) {
|
||||
currentKeys.refBack['component'] = PrbListAsync
|
||||
currentKeys.refBack['props'] = { encounter: data?.encounter }
|
||||
}
|
||||
if (currentKeys?.kfr) {
|
||||
currentKeys.kfr['component'] = KfrListAsync
|
||||
currentKeys.kfr['props'] = { encounter: data?.encounter }
|
||||
}
|
||||
if (currentKeys?.screening) {
|
||||
// TODO: add component for screening
|
||||
currentKeys.screening['component'] = null
|
||||
currentKeys.screening['props'] = { encounter_id: id }
|
||||
}
|
||||
if (currentKeys?.surgeryReport) {
|
||||
currentKeys.surgeryReport['component'] = SurgeryReportListAsync
|
||||
currentKeys.surgeryReport['props'] = { encounter: data?.encounter }
|
||||
}
|
||||
if (currentKeys?.vaccineData) {
|
||||
currentKeys.vaccineData['component'] = VaccineDataListAsync
|
||||
currentKeys.vaccineData['props'] = { encounter: data?.encounter }
|
||||
}
|
||||
if (currentKeys?.supportingDocument) {
|
||||
currentKeys.supportingDocument['component'] = DocUploadListAsync
|
||||
currentKeys.supportingDocument['props'] = { encounter_id: id }
|
||||
@@ -492,7 +518,6 @@ export function getMenuItems(
|
||||
data: EncounterListData,
|
||||
meta: any,
|
||||
) {
|
||||
console.log(props)
|
||||
// const normalClassCode = props.classCode === 'ambulatory' ? 'outpatient' : props.classCode
|
||||
const normalClassCode = props.classCode === 'ambulatory' ? 'ambulatory' : props.classCode
|
||||
const currentKeys = injectComponents(id, data, meta)
|
||||
|
||||
Reference in New Issue
Block a user