feat(sep): implement save sep
This commit is contained in:
@@ -74,6 +74,7 @@ const [supportCode, supportCodeAttrs] = defineField('supportCode')
|
||||
// Submit handler
|
||||
const onSubmit = handleSubmit((values) => {
|
||||
console.log('✅ Validated form values:', values)
|
||||
emit('event', 'save-sep', values)
|
||||
})
|
||||
|
||||
watch(props, (value) => {
|
||||
@@ -256,6 +257,7 @@ watch(props, (value) => {
|
||||
/>
|
||||
<Button
|
||||
variant="outline"
|
||||
type="button"
|
||||
class="h-[40px] rounded-md border-orange-400 text-orange-400 hover:bg-green-50"
|
||||
@click="emit('event', 'search-letter')"
|
||||
>
|
||||
@@ -504,8 +506,8 @@ watch(props, (value) => {
|
||||
<!-- Actions -->
|
||||
<div class="mt-6 flex justify-end gap-2">
|
||||
<Button
|
||||
type="button"
|
||||
variant="ghost"
|
||||
type="button"
|
||||
class="h-[40px] min-w-[120px] text-orange-400 hover:bg-green-50"
|
||||
@click="emit('event', 'history-sep')"
|
||||
>
|
||||
@@ -516,8 +518,8 @@ watch(props, (value) => {
|
||||
Riwayat SEP
|
||||
</Button>
|
||||
<Button
|
||||
type="button"
|
||||
variant="outline"
|
||||
type="button"
|
||||
class="h-[40px] min-w-[120px] rounded-md border-orange-400 text-orange-400 hover:bg-green-50 hover:text-orange-400"
|
||||
>
|
||||
<Icon
|
||||
|
||||
@@ -21,6 +21,7 @@ import { getValueLabelList as getDiagnoseLabelList } from '~/services/vclaim-dia
|
||||
import { getList as getDiagnoseReferralList } from '~/services/vclaim-diagnose-referral.service'
|
||||
import { getList as geMonitoringVisitList } from '~/services/vclaim-monitoring-visit.service'
|
||||
import { getList as getMonitoringHistoryList } from '~/services/vclaim-monitoring-history.service'
|
||||
import { create as createSep, createPayload as createSepPayload } from '~/services/vclaim-sep.service'
|
||||
|
||||
const openPatient = ref(false)
|
||||
const openLetter = ref(false)
|
||||
@@ -228,6 +229,11 @@ function handleEvent(menu: string, value: string) {
|
||||
if (menu === 'back') {
|
||||
navigateTo('/bpjs/sep')
|
||||
}
|
||||
if (menu === 'save-sep') {
|
||||
createSep(createSepPayload()).then(() => {
|
||||
navigateTo('/bpjs/sep')
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
// Base
|
||||
import * as base from './_crud-base'
|
||||
|
||||
const path = '/api/vclaim/sep'
|
||||
const name = 'sep'
|
||||
|
||||
export function create(data: any) {
|
||||
return base.create(path, data, name)
|
||||
}
|
||||
|
||||
export function createPayload() {
|
||||
const content = {
|
||||
noKartu: '0001116500714',
|
||||
tglSep: '2025-08-21',
|
||||
ppkPelayanan: '1323R001',
|
||||
jnsPelayanan: '2',
|
||||
klsRawat: {
|
||||
klsRawatHak: '2',
|
||||
klsRawatNaik: '',
|
||||
pembiayaan: '',
|
||||
penanggungJawab: '',
|
||||
},
|
||||
noMR: 'MR9835',
|
||||
rujukan: {
|
||||
asalRujukan: '1',
|
||||
tglRujukan: '2025-08-20',
|
||||
noRujukan: 'RJKMR9835001',
|
||||
ppkRujukan: '0301R011',
|
||||
},
|
||||
catatan: 'testinsert RI',
|
||||
diagAwal: 'E10',
|
||||
poli: {
|
||||
tujuan: '',
|
||||
eksekutif: '0',
|
||||
},
|
||||
cob: {
|
||||
cob: '0',
|
||||
},
|
||||
katarak: {
|
||||
katarak: '0',
|
||||
},
|
||||
tujuanKunj: '0',
|
||||
flagProcedure: '',
|
||||
kdPenunjang: '',
|
||||
assesmentPel: '',
|
||||
skdp: {
|
||||
noSurat: '0208R0060825K000001',
|
||||
kodeDPJP: '6546',
|
||||
},
|
||||
dpjpLayan: '000002',
|
||||
noTelp: '081111111101',
|
||||
user: 'Coba Ws',
|
||||
jaminan: {
|
||||
lakaLantas: '0',
|
||||
noLP: '12345',
|
||||
penjamin: {
|
||||
tglKejadian: '',
|
||||
keterangan: '',
|
||||
suplesi: {
|
||||
suplesi: '0',
|
||||
noSepSuplesi: '',
|
||||
lokasiLaka: {
|
||||
kdPropinsi: '',
|
||||
kdKabupaten: '',
|
||||
kdKecamatan: '',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
return {
|
||||
request: {
|
||||
t_sep: content,
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -9,11 +9,7 @@ export default defineNuxtConfig({
|
||||
VCLAIM: process.env.NUXT_API_VCLAIM || 'http://localhost:3000',
|
||||
public: {
|
||||
API_ORIGIN: process.env.NUXT_API_ORIGIN || 'http://localhost:3000',
|
||||
<<<<<<< HEAD
|
||||
VCLAIM: process.env.NUXT_API_VCLAIM || 'http://localhost:3000',
|
||||
=======
|
||||
VCLAIM: process.env.NUXT_API_VCLAIM || 'http://localhost:3000',
|
||||
>>>>>>> 22d163931e46c93ba5a466182d4a37b9f0aff85a
|
||||
}
|
||||
},
|
||||
ssr: false,
|
||||
|
||||
Reference in New Issue
Block a user