feat(sep): add navigate back to encounter
This commit is contained in:
@@ -37,7 +37,6 @@ import { getValueLabelList as getDiagnoseLabelList } from '~/services/vclaim-dia
|
||||
import { getList as geMonitoringVisitList } from '~/services/vclaim-monitoring-visit.service'
|
||||
import { getList as getMonitoringHistoryList } from '~/services/vclaim-monitoring-history.service'
|
||||
import { create as createSep, makeSepData } from '~/services/vclaim-sep.service'
|
||||
import { se } from 'date-fns/locale'
|
||||
|
||||
const route = useRoute()
|
||||
const openPatient = ref(false)
|
||||
@@ -71,6 +70,7 @@ const classPaySourcesList = ref<Array<{ value: string; label: string }>>([])
|
||||
const isPatientsLoading = ref(false)
|
||||
const isServiceHidden = ref(false)
|
||||
const isSaveLoading = ref(false)
|
||||
const resourceType = ref('')
|
||||
const paginationMeta = ref<PaginationMeta>({
|
||||
recordCount: 0,
|
||||
page: 1,
|
||||
@@ -278,9 +278,14 @@ async function handleEvent(menu: string, value: any) {
|
||||
const message = res?.metaData?.message
|
||||
if (code && code !== '200') {
|
||||
toast({ title: 'Gagal', description: message || 'Gagal membuat SEP', variant: 'destructive' })
|
||||
} else {
|
||||
toast({ title: 'Berhasil', description: 'SEP berhasil dibuat', variant: 'default' })
|
||||
return
|
||||
}
|
||||
toast({ title: 'Berhasil', description: 'SEP berhasil dibuat', variant: 'default' })
|
||||
if (resourceType.value === 'encounter') {
|
||||
navigateTo('/rehab/encounter/add')
|
||||
return
|
||||
}
|
||||
navigateTo('/integration/bpjs/sep')
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error('Failed to save SEP:', err)
|
||||
@@ -375,10 +380,6 @@ async function handleInit() {
|
||||
value: item.toString(),
|
||||
label: classPaySources[item],
|
||||
})) as any
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
await handleInit()
|
||||
if (route.query) {
|
||||
// resource=encounter®ister-date=2025-10-23&payment-type=bpjs&bpjs-number=121212121222&sep-type=ri
|
||||
const queries = route.query as any
|
||||
@@ -394,8 +395,13 @@ onMounted(async () => {
|
||||
if (queries['payment-type']) selectedObjects.value['paymentType'] = queries['payment-type']
|
||||
if (queries['medical_record_number'])
|
||||
selectedObjects.value['medicalRecordNumber'] = queries['medical_record_number']
|
||||
if (queries['resource']) resourceType.value = queries['resource']
|
||||
delete selectedObjects.value['is-service']
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
await handleInit()
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user