bind to new encounter init
This commit is contained in:
@@ -47,6 +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 defaultKeys: Record<string, any> = {
|
||||
status: {
|
||||
@@ -209,13 +210,13 @@ const defaultKeys: Record<string, any> = {
|
||||
title: 'SPRI',
|
||||
classCode: ['ambulatory', 'emergency'],
|
||||
unit: 'all',
|
||||
},
|
||||
},
|
||||
refBack: {
|
||||
id: 'reference-back',
|
||||
title: 'PRB',
|
||||
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
||||
unit: 'all',
|
||||
},
|
||||
},
|
||||
screening: {
|
||||
id: 'screening',
|
||||
title: 'Skrinning MPP',
|
||||
@@ -246,6 +247,12 @@ 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[]) {
|
||||
@@ -406,6 +413,15 @@ 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'] = {
|
||||
encounter: data?.encounter,
|
||||
type: 'treatment-report',
|
||||
label: currentKeys.treatmentReport['title'],
|
||||
}
|
||||
}
|
||||
|
||||
return currentKeys
|
||||
}
|
||||
|
||||
@@ -485,13 +501,7 @@ export function mapResponseToEncounter(result: any): any {
|
||||
return mapped
|
||||
}
|
||||
|
||||
export function getMenuItems(
|
||||
id: string | number,
|
||||
props: any,
|
||||
user: any,
|
||||
data: EncounterListData,
|
||||
meta: any,
|
||||
) {
|
||||
export function getMenuItems(id: string | number, props: any, user: any, data: EncounterListData, meta: any) {
|
||||
console.log(props)
|
||||
// const normalClassCode = props.classCode === 'ambulatory' ? 'outpatient' : props.classCode
|
||||
const normalClassCode = props.classCode === 'ambulatory' ? 'ambulatory' : props.classCode
|
||||
|
||||
Reference in New Issue
Block a user