Merge branch 'dev' into feat/things-munaja

This commit is contained in:
2025-12-04 19:31:30 +07:00
73 changed files with 4245 additions and 109 deletions

No files matched your search

+38 -6
View File
@@ -49,6 +49,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 InitialNursingStudyAsync = defineAsyncComponent(() => import('~/components/content/initial-nursing/entry.vue'))
const defaultKeys: Record<string, any> = {
@@ -189,8 +193,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',
@@ -213,6 +217,12 @@ const defaultKeys: Record<string, any> = {
classCode: ['ambulatory', 'emergency'],
unit: 'all',
},
fkr: {
id: 'fkr',
title: 'FKR',
classCode: ['ambulatory', 'emergency', 'inpatient'],
unit: 'all',
},
refBack: {
id: 'reference-back',
title: 'PRB',
@@ -394,15 +404,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?.fkr) {
currentKeys.fkr['component'] = KfrListAsync
currentKeys.fkr['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 }
@@ -497,7 +523,13 @@ 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,
) {
// const normalClassCode = props.classCode === 'ambulatory' ? 'outpatient' : props.classCode
const normalClassCode = props.classCode === 'ambulatory' ? 'ambulatory' : props.classCode
const currentKeys = injectComponents(id, data, meta)