enhance (soapi): update payload

This commit is contained in:
Abizrh
2025-10-20 20:26:01 +07:00
parent 77c26171bb
commit a6f1abb20f
4 changed files with 84 additions and 21 deletions
+27 -12
View File
@@ -1,6 +1,6 @@
<script setup lang="ts">
import * as DE from '~/components/pub/my-ui/doc-entry';
import type { Encounter } from '~/models/encounter';
import * as DE from '~/components/pub/my-ui/doc-entry'
import type { Encounter } from '~/models/encounter'
const props = defineProps<{
data: Encounter
@@ -8,27 +8,31 @@ const props = defineProps<{
let address = ''
if (props.data.patient.person.addresses) {
address = props.data.patient.person.addresses.map(a => a.address).join(', ')
address = props.data.patient.person.addresses.map((a) => a.address).join(', ')
}
let dpjp = '';
let dpjp = ''
if (props.data.responsible_doctor) {
const dp = props.data.responsible_doctor.employee.person
dpjp = `${dp.frontTitle} ${dp.name} ${dp.endTitle}`
} else if (props.data.appointment_doctor) {
dpjp = props.data.appointment_doctor.employee.person.name
}
</script>
<template>
<div class="w-full rounded-md border bg-white dark:bg-neutral-950 p-4 shadow-sm">
<div class="w-full rounded-md border bg-white p-4 shadow-sm dark:bg-neutral-950">
<!-- Data Pasien -->
<h2 class="mb-2 md:text-base 2xl:text-lg font-semibold">{{ data.patient.person.name }} - {{ data.patient.number }}</h2>
<h2 class="mb-2 font-semibold md:text-base 2xl:text-lg">
{{ data.patient.person.name }} - {{ data.patient.number }}
</h2>
<div class="grid grid-cols-3" >
<div class="grid grid-cols-3">
<div>
<DE.Block mode="preview" labelSize="large">
<DE.Block
mode="preview"
labelSize="large"
>
<DE.Cell>
<DE.Label class="font-semibold">No. RM</DE.Label>
<DE.Field>
@@ -50,7 +54,10 @@ if (props.data.responsible_doctor) {
</DE.Block>
</div>
<div>
<DE.Block mode="preview" labelSize="large">
<DE.Block
mode="preview"
labelSize="large"
>
<DE.Cell>
<DE.Label class="font-semibold">Tgl. Kunjungan</DE.Label>
<DE.Field>
@@ -72,9 +79,17 @@ if (props.data.responsible_doctor) {
</DE.Block>
</div>
<div>
<DE.Block mode="preview" labelSize="large">
<DE.Block
mode="preview"
labelSize="large"
>
<DE.Cell>
<DE.Label position="dynamic" class="!text-base 2xl:!text-lg font-semibold">Billing</DE.Label>
<DE.Label
position="dynamic"
class="!text-base font-semibold 2xl:!text-lg"
>
Billing
</DE.Label>
<DE.Field class="text-base 2xl:text-lg">
Rp. 000.000
<!-- {{ data }} -->