Merge branch 'dev' of https://github.com/dikstub-rssa/simrs-fe into feat/rm-rajal-183

This commit is contained in:
Abizrh
2025-12-06 09:31:18 +07:00
226 changed files with 9442 additions and 1162 deletions

No files matched your search

+84 -37
View File
@@ -40,6 +40,8 @@ const ChemoMedicineProtocolListAsync = defineAsyncComponent(
const DeviceOrderAsync = defineAsyncComponent(() => import('~/components/content/device-order/main.vue'))
const PrescriptionAsync = defineAsyncComponent(() => import('~/components/content/prescription/main.vue'))
const CpLabOrderAsync = defineAsyncComponent(() => import('~/components/content/cp-lab-order/main.vue'))
const ProcedureRoomOrderAsync = defineAsyncComponent(() => import('~/components/content/procedure-room-order/main.vue'))
const MicroLabOrderAsync = defineAsyncComponent(() => import('~/components/content/micro-lab-order/main.vue'))
const CprjAsync = defineAsyncComponent(() => import('~/components/content/cprj/entry.vue'))
const RadiologyAsync = defineAsyncComponent(() => import('~/components/content/radiology-order/main.vue'))
const ConsultationAsync = defineAsyncComponent(() => import('~/components/content/consultation/list.vue'))
@@ -47,6 +49,11 @@ 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 SummaryMedicAsync = defineAsyncComponent(() => import('~/components/content/summary-medic/entry.vue'))
const defaultKeys: Record<string, any> = {
@@ -56,17 +63,19 @@ const defaultKeys: Record<string, any> = {
classCode: ['ambulatory', 'emergency', 'inpatient'],
unit: 'all',
},
earlyNurseryAssessment: {
id: 'early-nursery-assessment',
title: 'Pengkajian Awal Keperawatan',
classCode: ['ambulatory', 'emergency', 'inpatient'],
unit: 'all',
},
// NOTE : HIDDEN UNTIL IT IS READY
// earlyNurseryAssessment: {
// id: 'early-nursery-assessment',
// title: 'Pengkajian Awal Keperawatan',
// classCode: ['ambulatory', 'emergency', 'inpatient'],
// unit: 'all',
// },
earlyMedicalAssessment: {
id: 'early-medical-assessment',
title: 'Pengkajian Awal Medis',
classCode: ['ambulatory', 'emergency', 'inpatient'],
unit: 'all',
afterId: 'early-medical-assessment',
},
earlyMedicalRehabAssessment: {
id: 'rehab-medical-assessment',
@@ -75,20 +84,27 @@ const defaultKeys: Record<string, any> = {
unit: 'rehab',
afterId: 'early-medical-assessment',
},
functionAssessment: {
id: 'function-assessment',
title: 'Asesmen Fungsi',
classCode: ['ambulatory'],
unit: 'rehab',
afterId: 'rehab-medical-assessment',
},
therapyProtocol: {
id: 'therapy-protocol',
classCode: ['ambulatory'],
title: 'Protokol Terapi',
unit: 'rehab',
afterId: 'function-assessment',
fkr: {
id: 'fkr',
title: 'FKR',
classCode: ['ambulatory', 'emergency', 'inpatient'],
unit: 'all',
},
// NOTE: Replaced by FRK
// functionAssessment: {
// id: 'function-assessment',
// title: 'Asesmen Fungsi',
// classCode: ['ambulatory'],
// unit: 'rehab',
// afterId: 'rehab-medical-assessment',
// },
// therapyProtocol: {
// id: 'therapy-protocol',
// classCode: ['ambulatory'],
// title: 'Protokol Terapi',
// unit: 'rehab',
// afterId: 'function-assessment',
// },
chemotherapyProtocol: {
id: 'chemotherapy-protocol',
title: 'Protokol Kemoterapi',
@@ -163,8 +179,8 @@ const defaultKeys: Record<string, any> = {
classCode: ['ambulatory', 'emergency', 'inpatient'],
unit: 'all',
},
actionRoomOrder: {
id: 'action-room-order',
procedureRoomOrder: {
id: 'procedure-room-order',
title: 'Order Ruang Tindakan',
classCode: ['ambulatory', 'emergency', 'inpatient'],
unit: 'all',
@@ -187,8 +203,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',
@@ -253,6 +269,12 @@ const defaultKeys: Record<string, any> = {
classCode: ['ambulatory', 'emergency', 'inpatient'],
unit: 'all',
},
initialNursingStudy: {
id: 'initial-nursing-study',
title: 'Kajian Awal Keperawatan',
classCode: ['ambulatory', 'emergency', 'inpatient'],
unit: 'all',
},
}
export function getItemsByClassCode(classCode: string, items: EncounterItem[]) {
@@ -367,8 +389,7 @@ export function injectComponents(id: string | number, data: EncounterListData, m
currentKeys.cpLabOrder['props'] = { encounter_id: id }
}
if (currentKeys?.microLabOrder) {
// TODO: add component for microLabOrder
currentKeys.microLabOrder['component'] = null
currentKeys.microLabOrder['component'] = MicroLabOrderAsync
currentKeys.microLabOrder['props'] = { encounter_id: id }
}
if (currentKeys?.paLabOrder) {
@@ -376,10 +397,9 @@ export function injectComponents(id: string | number, data: EncounterListData, m
currentKeys.paLabOrder['component'] = null
currentKeys.paLabOrder['props'] = { encounter_id: id }
}
if (currentKeys?.actionRoomOrder) {
// TODO: add component for actionRoomOrder
currentKeys.actionRoomOrder['component'] = null
currentKeys.actionRoomOrder['props'] = { encounter_id: id }
if (currentKeys?.procedureRoomOrder) {
currentKeys.procedureRoomOrder['component'] = ProcedureRoomOrderAsync
currentKeys.procedureRoomOrder['props'] = { encounter_id: id }
}
if (currentKeys?.mcuResult) {
// TODO: add component for mcuResult
@@ -394,15 +414,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 }
@@ -412,11 +448,14 @@ export function injectComponents(id: string | number, data: EncounterListData, m
currentKeys.priceList['component'] = null
currentKeys.priceList['props'] = { encounter_id: id }
}
if (currentKeys?.summaryMedic) {
currentKeys.summaryMedic['component'] = SummaryMedicAsync
currentKeys.summaryMedic['props'] = { encounter_id: id }
}
if (currentKeys?.initialNursingStudy) {
currentKeys.initialNursingStudy['component'] = InitialNursingStudyAsync
currentKeys.initialNursingStudy['props'] = { encounter: data?.encounter }
}
return currentKeys
}
@@ -473,9 +512,12 @@ export function mapResponseToEncounter(result: any): any {
? result.visitDate
: result.registeredAt || result.patient?.registeredAt || null,
adm_employee_id: result.adm_employee_id || 0,
appointment_doctor_id: result.appointment_doctor_id || null,
responsible_doctor_id: result.responsible_doctor_id || null,
adm_employee: result.adm_employee || null,
responsible_nurse_code: result.responsible_nurse_code || null,
responsible_nurse: result.responsible_nurse || null,
appointment_doctor_code: result.appointment_doctor_code || null,
appointment_doctor: result.appointment_doctor || null,
responsible_doctor_code: result.responsible_doctor_id || null,
responsible_doctor: result.responsible_doctor || null,
refSource_name: result.refSource_name || null,
appointment_id: result.appointment_id || null,
@@ -497,8 +539,13 @@ export function mapResponseToEncounter(result: any): any {
return mapped
}
export function getMenuItems(id: string | number, props: any, user: any, data: EncounterListData, meta: any) {
console.log(props)
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)