refactor(encounter): streamline navigation logic and reintroduce patient list fetching on mount
This commit is contained in:
No files matched your search
@@ -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') {
|
||||
|
||||
Reference in New Issue
Block a user