feat/role-check: updat flow for input encounter
This commit is contained in:
@@ -15,13 +15,14 @@ import { useIntegrationSepEntry } from '~/handlers/integration-sep-entry.handler
|
||||
// Props
|
||||
const props = defineProps<{
|
||||
id: number
|
||||
classCode?: 'ambulatory' | 'emergency' | 'inpatient' | 'outpatient'
|
||||
subclassCode?: 'reg' | 'rehab' | 'chemo' | 'emg' | 'eon' | 'op' | 'icu' | 'hcu' | 'vk'
|
||||
classCode?: 'ambulatory' | 'emergency' | 'inpatient'
|
||||
subclassCode?: 'regular' | 'rehab' | 'chemo' | 'emg' | 'eon' | 'op' | 'icu' | 'hcu' | 'vk'
|
||||
formType: string
|
||||
}>()
|
||||
|
||||
const route = useRoute()
|
||||
const formRef = ref<InstanceType<typeof AppEncounterEntryForm> | null>(null)
|
||||
// const patientMode = ref<'new' | 'exists'>('exists')
|
||||
|
||||
const {
|
||||
paymentsList,
|
||||
@@ -56,7 +57,6 @@ const {
|
||||
getDoctorInfo,
|
||||
getValidateMember,
|
||||
getValidateSepNumber,
|
||||
handleFetchDoctors,
|
||||
} = useEncounterEntry(props)
|
||||
const { recSepId, openHistory, histories, getMonitoringHistoryMappers } = useIntegrationSepEntry()
|
||||
|
||||
@@ -82,11 +82,13 @@ function handleFetch(value?: any) {
|
||||
|
||||
async function handleEvent(menu: string, value?: any) {
|
||||
if (menu === 'search') {
|
||||
// patientMode.value = 'exists'
|
||||
getPatientsList({ 'page-size': 10, includes: 'person' }).then(() => {
|
||||
openPatient.value = true
|
||||
})
|
||||
} else if (menu === 'add') {
|
||||
navigateTo('/client/patient/add')
|
||||
// navigateTo('/client/patient/add')
|
||||
// patientMode.value = 'new'
|
||||
} else if (menu === 'add-sep') {
|
||||
if (isSepValid.value) {
|
||||
return
|
||||
@@ -167,6 +169,7 @@ onMounted(async () => {
|
||||
Kunjungan
|
||||
</div>
|
||||
|
||||
<!-- :patientMode="patientMode" -->
|
||||
<AppEncounterEntryForm
|
||||
ref="formRef"
|
||||
:mode="props.formType"
|
||||
@@ -226,10 +229,10 @@ onMounted(async () => {
|
||||
/>
|
||||
Batal
|
||||
</Button>
|
||||
<!-- :disabled="isSaveDisabled" -->
|
||||
<Button
|
||||
type="button"
|
||||
class="h-[40px] min-w-[120px] text-white"
|
||||
:disabled="isSaveDisabled"
|
||||
@click="handleSaveClick"
|
||||
>
|
||||
<Icon
|
||||
|
||||
@@ -35,7 +35,7 @@ import FilterForm from '~/components/app/encounter/filter-form.vue'
|
||||
// Props
|
||||
const props = defineProps<{
|
||||
classCode?: 'ambulatory' | 'emergency' | 'inpatient'
|
||||
subclassCode?: 'reg' | 'rehab' | 'chemo' | 'emg' | 'eon' | 'op' | 'icu' | 'hcu' | 'vk'
|
||||
subclassCode?: 'regular' | 'rehab' | 'chemo' | 'emg' | 'eon' | 'op' | 'icu' | 'hcu' | 'vk' | undefined
|
||||
canCreate?: boolean
|
||||
canUpdate?: boolean
|
||||
canDelete?: boolean
|
||||
@@ -162,7 +162,6 @@ async function getPatientList() {
|
||||
'Responsible_Doctor-employee',
|
||||
'Responsible_Doctor-employee-person',
|
||||
'EncounterDocuments',
|
||||
'unit',
|
||||
'vclaimReference', // vclaimReference | vclaimSep
|
||||
]
|
||||
const includesParams = includesParamsArrays.join(',')
|
||||
@@ -172,8 +171,11 @@ async function getPatientList() {
|
||||
if (props.classCode) {
|
||||
params['class-code'] = props.classCode
|
||||
}
|
||||
if (props.subclassCode) {
|
||||
params['subclass-code'] = props.subclassCode
|
||||
if (props.subclassCode == 'regular') {
|
||||
params['specialist-code'] = 'rehab'
|
||||
params['specialist-code-opt'] = 'ne'
|
||||
} else {
|
||||
params['specialist-code'] = 'rehab'
|
||||
}
|
||||
const result = await getEncounterList(params)
|
||||
if (result.success) {
|
||||
@@ -365,6 +367,7 @@ function handleRemoveConfirmation() {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
{{ subclassCode }}
|
||||
<CH.ContentHeader v-bind="hreaderPrep">
|
||||
<FilterNav
|
||||
:active-positon="activeServicePosition"
|
||||
|
||||
Reference in New Issue
Block a user