From 9b7a7192a04052abf2baf6c6196a5182a3ffe0fb Mon Sep 17 00:00:00 2001 From: Andrian Roshandy Date: Mon, 1 Dec 2025 08:31:14 +0700 Subject: [PATCH 1/3] feat/page-cleaning: menu adjustment --- app/handlers/encounter-init.handler.ts | 166 ++++++++++++++++--------- 1 file changed, 107 insertions(+), 59 deletions(-) diff --git a/app/handlers/encounter-init.handler.ts b/app/handlers/encounter-init.handler.ts index 886be1a1..3e1e85f3 100644 --- a/app/handlers/encounter-init.handler.ts +++ b/app/handlers/encounter-init.handler.ts @@ -55,23 +55,29 @@ const defaultKeys: Record = { classCode: ['ambulatory', 'emergency', 'inpatient'], unit: 'all', }, + 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', }, - rehabMedicalAssessment: { + earlyMedicalRehabAssessment: { id: 'rehab-medical-assessment', title: 'Pengkajian Awal Medis Rehabilitasi Medis', - classCode: ['ambulatory', 'emergency', 'inpatient'], + classCode: ['ambulatory'], unit: 'rehab', afterId: 'early-medical-assessment', }, functionAssessment: { id: 'function-assessment', title: 'Asesmen Fungsi', - classCode: ['ambulatory', 'emergency', 'inpatient'], + classCode: ['ambulatory'], unit: 'rehab', afterId: 'rehab-medical-assessment', }, @@ -102,16 +108,22 @@ const defaultKeys: Record = { classCode: ['ambulatory', 'emergency', 'inpatient'], unit: 'all', }, - consent: { - id: 'consent', + generalConsent: { + id: 'general-consent', title: 'General Consent', classCode: ['ambulatory', 'emergency', 'inpatient'], unit: 'all', }, - patientNote: { - id: 'patient-note', + patientAmbNote: { + id: 'patient-amb-note', title: 'CPRJ', - classCode: ['ambulatory', 'emergency', 'inpatient'], + classCode: ['ambulatory', 'emergency'], + unit: 'all', + }, + patientDevNote: { + id: 'patient-dev-note', + title: 'CPP', + classCode: ['inpatient'], unit: 'all', }, prescription: { @@ -120,38 +132,38 @@ const defaultKeys: Record = { classCode: ['ambulatory', 'emergency', 'inpatient'], unit: 'all', }, - device: { + deviceOrder: { id: 'device-order', title: 'Order Alkes', classCode: ['ambulatory', 'emergency', 'inpatient'], unit: 'all', }, - mcuRadiology: { - id: 'mcu-radiology', + radiologyOrder: { + id: 'radiology-order', title: 'Order Radiologi', classCode: ['ambulatory', 'emergency', 'inpatient'], unit: 'all', }, - mcuLabPc: { - id: 'mcu-lab-pc', + cpLabOrder: { + id: 'cp-lab-order', title: 'Order Lab PK', classCode: ['ambulatory', 'emergency', 'inpatient'], unit: 'all', }, - mcuLabMicro: { - id: 'mcu-lab-micro', + microLabOrder: { + id: 'micro-lab-order', title: 'Order Lab Mikro', classCode: ['ambulatory', 'emergency', 'inpatient'], unit: 'all', }, - mcuLabPa: { - id: 'mcu-lab-pa', + paLabOrder: { + id: 'pa-lab-order', title: 'Order Lab PA', classCode: ['ambulatory', 'emergency', 'inpatient'], unit: 'all', }, - medicalAction: { - id: 'medical-action', + actionRoomOrder: { + id: 'action-room-order', title: 'Order Ruang Tindakan', classCode: ['ambulatory', 'emergency', 'inpatient'], unit: 'all', @@ -162,24 +174,48 @@ const defaultKeys: Record = { classCode: ['ambulatory', 'emergency', 'inpatient'], unit: 'all', }, + actionReport: { + id: 'action-report', + title: 'Laporan Tindakan', + classCode: ['ambulatory', 'emergency', 'inpatient'], + unit: 'all', + }, + surgeryReport: { + id: 'surgery-report', + title: 'Laporan Operasi', + classCode: ['ambulatory', 'emergency', 'inpatient'], + unit: 'all', + }, + vacsinData: { + id: 'vacsin-data', + title: 'Data Vaksin', + classCode: ['ambulatory', 'emergency', 'inpatient'], + unit: 'all', + }, consultation: { id: 'consultation', title: 'Konsultasi', classCode: ['ambulatory', 'emergency', 'inpatient'], unit: 'all', }, - resume: { - id: 'resume', - title: 'Resume', - classCode: ['ambulatory', 'emergency', 'inpatient'], - unit: 'all', - }, - control: { - id: 'control', + controlLetter: { + id: 'control-letter', title: 'Surat Kontrol', classCode: ['ambulatory', 'emergency', 'inpatient'], unit: 'all', }, + inpatientLetter: { + id: 'inpatient-letter', + 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', @@ -190,7 +226,19 @@ const defaultKeys: Record = { id: 'supporting-document', title: 'Upload Dokumen Pendukung', classCode: ['ambulatory'], - unit: 'rehab', + unit: 'all', + }, + resume: { + id: 'resume', + title: 'Resume', + classCode: ['ambulatory', 'emergency', 'inpatient'], + unit: 'all', + }, + ambResume: { + id: 'amb-resume', + title: 'Resume Medis Rawat Jalan', + classCode: ['ambulatory', 'emergency', 'inpatient'], + unit: 'all', }, priceList: { id: 'price-list', @@ -244,12 +292,12 @@ export function injectComponents(id: string | number, data: EncounterListData, m label: currentKeys.earlyMedicalAssessment['title'], } } - if (currentKeys?.rehabMedicalAssessment) { - currentKeys.rehabMedicalAssessment['component'] = EarlyMedicalRehabListAsync - currentKeys.rehabMedicalAssessment['props'] = { + if (currentKeys?.earlyMedicalRehabAssessment) { + currentKeys.earlyMedicalRehabAssessment['component'] = EarlyMedicalRehabListAsync + currentKeys.earlyMedicalRehabAssessment['props'] = { encounter: data?.encounter, type: 'early-rehab', - label: currentKeys.rehabMedicalAssessment['title'], + label: currentKeys.earlyMedicalRehabAssessment['title'], } } if (currentKeys?.functionAssessment) { @@ -287,44 +335,44 @@ export function injectComponents(id: string | number, data: EncounterListData, m currentKeys.educationAssessment['component'] = null currentKeys.educationAssessment['props'] = { encounter_id: id } } - if (currentKeys?.consent) { - currentKeys.consent['component'] = GeneralConsentListAsync - currentKeys.consent['props'] = { encounter_id: id } + if (currentKeys?.generalConsent) { + currentKeys.generalConsent['component'] = GeneralConsentListAsync + currentKeys.generalConsent['props'] = { encounter_id: id } } - if (currentKeys?.patientNote) { - currentKeys.patientNote['component'] = CprjAsync - currentKeys.patientNote['props'] = { encounter_id: id } + if (currentKeys?.patientAmbNote) { + currentKeys.patientAmbNote['component'] = CprjAsync + currentKeys.patientAmbNote['props'] = { encounter_id: id } } if (currentKeys?.prescription) { currentKeys.prescription['component'] = PrescriptionAsync currentKeys.prescription['props'] = { encounter_id: id } } - if (currentKeys?.device) { - currentKeys.device['component'] = DeviceOrderAsync - currentKeys.device['props'] = { encounter_id: id } + if (currentKeys?.deviceOrder) { + currentKeys.deviceOrder['component'] = DeviceOrderAsync + currentKeys.deviceOrder['props'] = { encounter_id: id } } - if (currentKeys?.mcuRadiology) { - currentKeys.mcuRadiology['component'] = RadiologyAsync - currentKeys.mcuRadiology['props'] = { encounter_id: id } + if (currentKeys?.radiologyOrder) { + currentKeys.radiologyOrder['component'] = RadiologyAsync + currentKeys.radiologyOrder['props'] = { encounter_id: id } } - if (currentKeys?.mcuLabPc) { - currentKeys.mcuLabPc['component'] = CpLabOrderAsync - currentKeys.mcuLabPc['props'] = { encounter_id: id } + if (currentKeys?.cpLabOrder) { + currentKeys.cpLabOrder['component'] = CpLabOrderAsync + currentKeys.cpLabOrder['props'] = { encounter_id: id } } - if (currentKeys?.mcuLabMicro) { - // TODO: add component for mcuLabMicro - currentKeys.mcuLabMicro['component'] = null - currentKeys.mcuLabMicro['props'] = { encounter_id: id } + if (currentKeys?.microLabOrder) { + // TODO: add component for microLabOrder + currentKeys.microLabOrder['component'] = null + currentKeys.microLabOrder['props'] = { encounter_id: id } } - if (currentKeys?.mcuLabPa) { - // TODO: add component for mcuLabPa - currentKeys.mcuLabPa['component'] = null - currentKeys.mcuLabPa['props'] = { encounter_id: id } + if (currentKeys?.paLabOrder) { + // TODO: add component for paLabOrder + currentKeys.paLabOrder['component'] = null + currentKeys.paLabOrder['props'] = { encounter_id: id } } - if (currentKeys?.medicalAction) { - // TODO: add component for medicalAction - currentKeys.medicalAction['component'] = null - currentKeys.medicalAction['props'] = { encounter_id: id } + if (currentKeys?.actionRoomOrder) { + // TODO: add component for actionRoomOrder + currentKeys.actionRoomOrder['component'] = null + currentKeys.actionRoomOrder['props'] = { encounter_id: id } } if (currentKeys?.mcuResult) { // TODO: add component for mcuResult From 5659aba87594c38812b0464174333d7a7febbd4b Mon Sep 17 00:00:00 2001 From: Andrian Roshandy Date: Tue, 2 Dec 2025 03:23:26 +0700 Subject: [PATCH 2/3] feat/page-cleaning: adjust encounter quick info --- app/components/app/encounter/quick-info.vue | 56 +++++++++++++++------ 1 file changed, 40 insertions(+), 16 deletions(-) diff --git a/app/components/app/encounter/quick-info.vue b/app/components/app/encounter/quick-info.vue index 17e1053b..4705264b 100644 --- a/app/components/app/encounter/quick-info.vue +++ b/app/components/app/encounter/quick-info.vue @@ -7,17 +7,37 @@ const props = defineProps<{ data: Encounter }>() -let address = ref('') -if (props.data.patient.person.addresses) { - address.value = props.data.patient.person.addresses.map((a) => a.address).join(', ') -} +const addressText = computed(() => { + if (props.data.patient.person.addresses && props.data.patient.person.addresses.length > 0) { + return props.data.patient.person.addresses.map((a) => a.address).join(', ') + } + return '-' +}) -let dpjp = ref('') +const paymentMethodText = computed(() => { + const code = props.data.paymentMethod_code + if (!code) return '-' + + // Map payment method codes + if (code === 'insurance') { + return 'JKN' + } else if (code === 'jkn') { + return 'JKN' + } else if (code === 'jkmm') { + return 'JKMM' + } else if (code === 'spm') { + return 'SPM' + } else if (code === 'pks') { + return 'PKS' + } +}) + +let dpjpText = ref('') if (props.data.responsible_doctor) { const dp = props.data.responsible_doctor.employee.person - dpjp.value = `${dp.frontTitle} ${dp.name} ${dp.endTitle}` + dpjpText.value = `${dp.frontTitle} ${dp.name} ${dp.endTitle}` } else if (props.data.appointment_doctor) { - dpjp.value = props.data.appointment_doctor.employee.person.name + dpjpText.value = props.data.appointment_doctor.employee.person.name } @@ -31,7 +51,7 @@ if (props.data.responsible_doctor) {
- No. RM + Tgl. Lahir {{ data.patient.person.birthDate?.substring(0, 10) }} @@ -48,7 +68,7 @@ if (props.data.responsible_doctor) { Alamat -
+ {{ addressText }}
@@ -70,7 +90,7 @@ if (props.data.responsible_doctor) { - Klinik + Diagnosa {{ data.unit?.name }} @@ -84,17 +104,21 @@ if (props.data.responsible_doctor) { DPJP - {{ dpjp }} + {{ dpjpText }} - + Pembayaran + + + {{ paymentMethodText }} + + + + Billing - + Rp. 000.000 From 88a2dc5aba3a03fbecc5462776cc6e79729e4e56 Mon Sep 17 00:00:00 2001 From: Andrian Roshandy Date: Tue, 2 Dec 2025 10:02:00 +0700 Subject: [PATCH 3/3] feat/page-cleaning: adjust add encounter --- app/components/app/encounter/entry-form.vue | 338 ++++++------ .../app/encounter/entry-form.vue.backup | 499 ++++++++++++++++++ app/components/content/encounter/entry.vue | 61 ++- app/handlers/encounter-entry.handler.ts | 32 +- app/models/doctor.ts | 8 +- app/models/encounter.ts | 17 +- app/schemas/integration-encounter.schema.ts | 40 +- app/services/_crud-base.ts | 2 +- app/services/doctor.service.ts | 6 +- 9 files changed, 779 insertions(+), 224 deletions(-) create mode 100644 app/components/app/encounter/entry-form.vue.backup diff --git a/app/components/app/encounter/entry-form.vue b/app/components/app/encounter/entry-form.vue index 22acbbb8..66d2e4e3 100644 --- a/app/components/app/encounter/entry-form.vue +++ b/app/components/app/encounter/entry-form.vue @@ -1,43 +1,57 @@ + + diff --git a/app/components/content/encounter/entry.vue b/app/components/content/encounter/entry.vue index 228d165e..203d781a 100644 --- a/app/components/content/encounter/entry.vue +++ b/app/components/content/encounter/entry.vue @@ -8,8 +8,11 @@ import AppViewPatient from '~/components/app/patient/view-patient.vue' import { refDebounced } from '@vueuse/core' // Handlers +import { getDetail as getDoctorDetail } from '~/services/doctor.service' import { useEncounterEntry } from '~/handlers/encounter-entry.handler' +import { genDoctor, type Doctor } from '~/models/doctor' +// Props const props = defineProps<{ id: number classCode?: 'ambulatory' | 'emergency' | 'inpatient' | 'outpatient' @@ -54,7 +57,33 @@ const { } = useEncounterEntry(props) const debouncedSepNumber = refDebounced(sepNumber, 500) +const selectedDoctor = ref(genDoctor()) +provide('rec_select_id', recSelectId) +provide('table_data_loader', isLoading) + +watch(debouncedSepNumber, async (newValue) => { + await getValidateSepNumber(newValue) +}) + +watch( + () => formObjects.value?.paymentType, + (newValue) => { + isSepValid.value = false + if (newValue !== 'jkn') { + sepNumber.value = '' + } + }, +) + +onMounted(async () => { + await handleInit() + if (props.id > 0) { + await loadEncounterDetail() + } +}) + +///// Functions function handleSavePatient() { selectedPatientObject.value = null setTimeout(() => { @@ -100,29 +129,13 @@ async function handleEvent(menu: string, value?: any) { } } -provide('rec_select_id', recSelectId) -provide('table_data_loader', isLoading) - -watch(debouncedSepNumber, async (newValue) => { - await getValidateSepNumber(newValue) -}) - -watch( - () => formObjects.value?.paymentType, - (newValue) => { - isSepValid.value = false - if (newValue !== 'jkn') { - sepNumber.value = '' - } - }, -) - -onMounted(async () => { - await handleInit() - if (props.id > 0) { - await loadEncounterDetail() +async function getDoctorInfo(value: string) { + const resp = await getDoctorDetail(value, { includes: 'unit,specialist,subspecialist'}) + if (resp.success) { + selectedDoctor.value = resp.body.data + // console.log(selectedDoctor.value) } -}) +}