Files
simrsx-fe/app/components/content/sep/entry.vue
2025-09-11 13:33:26 +07:00

85 lines
1.8 KiB
Vue

<script setup lang="ts">
const openPatient = ref(false)
const openLetter = ref(false)
const selectedPatient = ref('3456512345678880')
const selectedLetter = ref('SK22334442')
const patients = [
{
ktp: '3456512345678880',
rm: 'RM23311224',
bpjs: '334423213214',
nama: 'Ahmad Baidowi',
},
{
ktp: '345678804565123',
rm: 'RM23455667',
bpjs: '33442367656',
nama: 'Bian Maulana',
},
]
const letters = [
{
noSurat: 'SK22334442',
tglRencana: '12 Agustus 2025',
noSep: 'SEP3232332',
namaPasien: 'Ahmad Baidowi',
noBpjs: '33442331214',
klinik: 'Penyakit Dalam',
dokter: 'dr. Andi Prasetyo, Sp.PD-KHOM',
},
{
noSurat: 'SK99120039',
tglRencana: '12 Agustus 2025',
noSep: 'SEP4443232',
namaPasien: 'Bian Maulana',
noBpjs: '33442367656',
klinik: 'Gigi',
dokter: 'dr. Achmad Suparjo',
},
]
function handleSavePatient() {
console.log('Pasien dipilih:', selectedPatient.value)
}
function handleSaveLetter() {
console.log('Letter dipilih:', selectedLetter.value)
}
function handleEvent(value: string) {
if (value === 'search-patient') {
openPatient.value = true
return
}
if (value === 'search-letter') {
openLetter.value = true
return
}
if (value === 'back') {
navigateTo('/bpjs/sep')
}
}
</script>
<template>
<div class="mb-5 border-b border-b-slate-300 pb-3 text-lg xl:text-xl">
<Icon name="i-lucide-panel-bottom" class="me-2" />
<span class="font-semibold">Tambah</span> SEP
</div>
<AppSepEntryForm @event="handleEvent" />
<AppSepSearchPatient
v-model:open="openPatient"
v-model:selected="selectedPatient"
:patients="patients"
@save="handleSavePatient"
/>
<AppSepSearchLetter
v-model:open="openLetter"
v-model:selected="selectedLetter"
:letters="letters"
@save="handleSaveLetter"
/>
</template>