feat(sep): refactor schema
This commit is contained in:
@@ -10,6 +10,9 @@ import type { PatientEntity } from '~/models/patient'
|
||||
import type { SepHistoryData } from '~/components/app/sep/list-cfg.history'
|
||||
import type { SepVisitData } from '~/components/app/sep/list-cfg.visit'
|
||||
|
||||
// Constants
|
||||
import { supportCodes } from '~/lib/constants'
|
||||
|
||||
// Services
|
||||
import { getPatientDetail, getPatients } from '~/services/patient.service'
|
||||
import { getList as getProvinceList } from '~/services/vclaim-region-province.service'
|
||||
@@ -35,6 +38,7 @@ const patients = ref<Array<{ id: string; identity: string; number: string; bpjs:
|
||||
const doctors = ref<Array<{ value: string | number; label: string }>>([])
|
||||
const diagnoses = ref<Array<{ value: string | number; label: string }>>([])
|
||||
const facilities = ref<Array<{ value: string | number; label: string }>>([])
|
||||
const supportCodesList = ref<Array<{ value: string; label: string }>>([])
|
||||
const isPatientsLoading = ref(false)
|
||||
const paginationMeta = ref<PaginationMeta>({
|
||||
recordCount: 0,
|
||||
@@ -203,7 +207,7 @@ function handleSaveLetter() {
|
||||
console.log('Letter dipilih:', selectedLetter.value)
|
||||
}
|
||||
|
||||
function handleEvent(menu: string, value: string) {
|
||||
function handleEvent(menu: string, value: any) {
|
||||
if (menu === 'admission-type') {
|
||||
console.log('service-type:', value)
|
||||
return
|
||||
@@ -230,7 +234,7 @@ function handleEvent(menu: string, value: string) {
|
||||
navigateTo('/integration/bpjs/sep')
|
||||
}
|
||||
if (menu === 'save-sep') {
|
||||
createSep(createSepPayload()).then(() => {
|
||||
createSep(createSepPayload(value)).then(() => {
|
||||
navigateTo('/integration/bpjs/sep')
|
||||
})
|
||||
}
|
||||
@@ -270,6 +274,7 @@ onMounted(async () => {
|
||||
getDiagnoseReferralList().then((value) => {
|
||||
console.log('value:', value)
|
||||
})
|
||||
supportCodesList.value = Object.keys(supportCodes).map((item) => ({ value: item.toString(), label: supportCodes[item] })) as any
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -287,6 +292,7 @@ onMounted(async () => {
|
||||
:diagnoses="diagnoses"
|
||||
:facilities="facilities"
|
||||
:patient="selectedPatientObject"
|
||||
:support-codes="supportCodesList"
|
||||
@fetch="handleFetch"
|
||||
@event="handleEvent"
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user