feat/page-cleaning: adjust encounter quick info

This commit is contained in:
Andrian Roshandy
2025-12-02 03:23:26 +07:00
parent 9b7a7192a0
commit 5659aba875
+40 -16
View File
@@ -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
}
</script>
@@ -31,7 +51,7 @@ if (props.data.responsible_doctor) {
<div>
<DE.Block mode="preview">
<DE.Cell>
<DE.Label class="font-semibold">No. RM</DE.Label>
<DE.Label class="font-semibold">Tgl. Lahir</DE.Label>
<DE.Colon />
<DE.Field>
{{ data.patient.person.birthDate?.substring(0, 10) }}
@@ -48,7 +68,7 @@ if (props.data.responsible_doctor) {
<DE.Label class="font-semibold">Alamat</DE.Label>
<DE.Colon />
<DE.Field>
<div v-html="address"></div>
{{ addressText }}
</DE.Field>
</DE.Cell>
</DE.Block>
@@ -70,7 +90,7 @@ if (props.data.responsible_doctor) {
</DE.Field>
</DE.Cell>
<DE.Cell>
<DE.Label position="dynamic" class="font-semibold">Klinik</DE.Label>
<DE.Label position="dynamic" class="font-semibold">Diagnosa</DE.Label>
<DE.Colon />
<DE.Field>
{{ data.unit?.name }}
@@ -84,17 +104,21 @@ if (props.data.responsible_doctor) {
<DE.Label position="dynamic" class="font-semibold">DPJP</DE.Label>
<DE.Colon />
<DE.Field>
{{ dpjp }}
{{ dpjpText }}
</DE.Field>
</DE.Cell>
<DE.Cell>
<DE.Label
position="dynamic"
class="!text-base font-semibold 2xl:!text-lg"
>
<DE.Label position="dynamic" class="font-semibold">Pembayaran</DE.Label>
<DE.Colon />
<DE.Field>
{{ paymentMethodText }}
</DE.Field>
</DE.Cell>
<DE.Cell>
<DE.Label position="dynamic" class="!text-base !font-semibold 2xl:!text-lg">
Billing
</DE.Label>
<DE.Colon class="pt-1" />
<DE.Colon class="pt-1"/>
<DE.Field class="text-base 2xl:text-lg">
Rp. 000.000
<!-- {{ data }} -->