From 5659aba87594c38812b0464174333d7a7febbd4b Mon Sep 17 00:00:00 2001 From: Andrian Roshandy Date: Tue, 2 Dec 2025 03:23:26 +0700 Subject: [PATCH] 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