feat(encounter): add patientId to formValues and reset recSelectId on add-sep event

This commit is contained in:
riefive
2025-11-06 14:30:38 +07:00
parent d5c06add1d
commit 48b8ee5d2c
3 changed files with 5 additions and 2 deletions
@@ -43,6 +43,7 @@ const sepsList = ref<Array<{ value: string; label: string }>>([])
const participantGroupsList = ref<Array<{ value: string; label: string }>>([])
const specialistsTree = ref<TreeItem[]>([])
const doctorsList = ref<Array<{ value: string; label: string }>>([])
const recSelectId = ref<number | null>(null)
function handleSavePatient() {
selectedPatientObject.value = null
@@ -82,6 +83,7 @@ function handleEvent(menu: string, value?: any) {
} else if (menu === 'add') {
navigateTo('/client/patient/add')
} else if (menu === 'add-sep') {
recSelectId.value = null
toNavigateSep({ sourcePath: route.path, resource: 'encounter', isService: 'false', ...value })
} else if (menu === 'save') {
console.log('Save encounter:', value)
@@ -179,6 +181,7 @@ async function handleInit() {
await handleFetchSpecialists()
}
provide('rec_select_id', recSelectId)
provide('table_data_loader', isLoading)
onMounted(async () => {