feat(encounter): add patientId to formValues and reset recSelectId on add-sep event
This commit is contained in:
@@ -115,11 +115,12 @@ watch(props, (value) => {
|
|||||||
|
|
||||||
function onAddSep() {
|
function onAddSep() {
|
||||||
const formValues = {
|
const formValues = {
|
||||||
|
patientId: patientId.value || '',
|
||||||
doctorCode: doctorId.value,
|
doctorCode: doctorId.value,
|
||||||
subSpecialistCode: subSpecialistId.value,
|
subSpecialistCode: subSpecialistId.value,
|
||||||
registerDate: registerDate.value,
|
registerDate: registerDate.value,
|
||||||
paymentType: paymentType.value,
|
|
||||||
cardNumber: bpjsNumber.value,
|
cardNumber: bpjsNumber.value,
|
||||||
|
paymentType: paymentType.value,
|
||||||
sepType: sepType.value
|
sepType: sepType.value
|
||||||
}
|
}
|
||||||
emit('event', 'add-sep', formValues)
|
emit('event', 'add-sep', formValues)
|
||||||
|
|||||||
@@ -77,7 +77,6 @@ watch(debouncedSearch, (newValue) => {
|
|||||||
emit('fetch', { search: newValue })
|
emit('fetch', { search: newValue })
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ const sepsList = ref<Array<{ value: string; label: string }>>([])
|
|||||||
const participantGroupsList = ref<Array<{ value: string; label: string }>>([])
|
const participantGroupsList = ref<Array<{ value: string; label: string }>>([])
|
||||||
const specialistsTree = ref<TreeItem[]>([])
|
const specialistsTree = ref<TreeItem[]>([])
|
||||||
const doctorsList = ref<Array<{ value: string; label: string }>>([])
|
const doctorsList = ref<Array<{ value: string; label: string }>>([])
|
||||||
|
const recSelectId = ref<number | null>(null)
|
||||||
|
|
||||||
function handleSavePatient() {
|
function handleSavePatient() {
|
||||||
selectedPatientObject.value = null
|
selectedPatientObject.value = null
|
||||||
@@ -82,6 +83,7 @@ function handleEvent(menu: string, value?: any) {
|
|||||||
} else if (menu === 'add') {
|
} else if (menu === 'add') {
|
||||||
navigateTo('/client/patient/add')
|
navigateTo('/client/patient/add')
|
||||||
} else if (menu === 'add-sep') {
|
} else if (menu === 'add-sep') {
|
||||||
|
recSelectId.value = null
|
||||||
toNavigateSep({ sourcePath: route.path, resource: 'encounter', isService: 'false', ...value })
|
toNavigateSep({ sourcePath: route.path, resource: 'encounter', isService: 'false', ...value })
|
||||||
} else if (menu === 'save') {
|
} else if (menu === 'save') {
|
||||||
console.log('Save encounter:', value)
|
console.log('Save encounter:', value)
|
||||||
@@ -179,6 +181,7 @@ async function handleInit() {
|
|||||||
await handleFetchSpecialists()
|
await handleFetchSpecialists()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
provide('rec_select_id', recSelectId)
|
||||||
provide('table_data_loader', isLoading)
|
provide('table_data_loader', isLoading)
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user