refactor(encounter): streamline navigation logic and reintroduce patient list fetching on mount

This commit is contained in:
riefive
2025-11-09 19:17:13 +07:00
parent df110912b8
commit a8bc3647a1
2 changed files with 11 additions and 13 deletions

No files matched your search

+4 -6
View File
@@ -34,8 +34,6 @@ import {
// Stores
import { useUserStore } from '~/stores/user'
const props = defineProps<{
id: number
classCode?: 'ambulatory' | 'emergency' | 'inpatient' | 'outpatient'
@@ -68,12 +66,12 @@ function getListPath(): string {
if (props.classCode === 'ambulatory' && props.subClassCode === 'rehab') {
return '/rehab/encounter'
}
if (props.classCode === 'ambulatory' && props.subClassCode === 'reg') {
return '/outpatient/encounter'
}
if (props.classCode === 'emergency') {
return '/emergency/encounter'
}
if (props.classCode === 'outpatient') {
return '/outpatient/encounter'
}
if (props.classCode === 'inpatient') {
return '/inpatient/encounter'
}
@@ -164,7 +162,7 @@ async function handleSaveEncounter(formValues: any) {
}
if (subspecialist_id) {
payload.subspecialist_id = subspecialist_id
}
}
let paymentMethod = 'cash'
if (formValues.paymentType === 'jkn' || formValues.paymentType === 'jkmm') {