fix: debug encounter
This commit is contained in:
@@ -3,8 +3,8 @@
|
||||
import AppViewPatient from '~/components/app/patient/view-patient.vue'
|
||||
|
||||
// Types
|
||||
import type { PaginationMeta } from '~/components/pub/my-ui/pagination/pagination.type'
|
||||
import type { DataTableLoader } from '~/components/pub/my-ui/data-table/type'
|
||||
import type { PatientEntity } from '~/models/patient'
|
||||
|
||||
// Handlers
|
||||
import {
|
||||
@@ -14,6 +14,7 @@ import {
|
||||
paginationMeta,
|
||||
getPatientsList,
|
||||
getPatientCurrent,
|
||||
getPatientByIdentifierSearch,
|
||||
} from '~/handlers/patient.handler'
|
||||
|
||||
const props = defineProps<{
|
||||
@@ -78,6 +79,8 @@ function onClick(e: 'search' | 'add' | 'add-sep', formValues?: any) {
|
||||
} else if (e === 'add') {
|
||||
navigateTo('/client/patient/add')
|
||||
} else if (e === 'add-sep') {
|
||||
selectedPatientObject.value = {} as PatientEntity
|
||||
console.log('formValues', formValues)
|
||||
toNavigateSep({ resource: 'encounter', is_service: 'false', ...formValues })
|
||||
}
|
||||
}
|
||||
@@ -94,7 +97,7 @@ provide('table_data_loader', isLoading)
|
||||
<span class="font-semibold">{{ props.formType }}</span>
|
||||
Kunjungan
|
||||
</div>
|
||||
|
||||
|
||||
<AppEncounterEntryForm
|
||||
:division="division"
|
||||
:items="items"
|
||||
@@ -111,7 +114,17 @@ provide('table_data_loader', isLoading)
|
||||
v-model:selected="selectedPatient"
|
||||
:patients="patients"
|
||||
:pagination-meta="paginationMeta"
|
||||
@fetch="(value) => getPatientsList({ ...value, 'page-size': 10, includes: 'person' })"
|
||||
@fetch="
|
||||
(value) => {
|
||||
if (value.search && value.search.length >= 3) {
|
||||
// Use identifier search for specific searches (NIK, RM, etc.)
|
||||
getPatientByIdentifierSearch(value.search)
|
||||
} else {
|
||||
// Use regular search for general searches
|
||||
getPatientsList({ ...value, 'page-size': 10, includes: 'person' })
|
||||
}
|
||||
}
|
||||
"
|
||||
@save="handleSavePatient"
|
||||
/>
|
||||
</template>
|
||||
|
||||
@@ -46,7 +46,8 @@ import {
|
||||
selectedPatientObject,
|
||||
paginationMeta,
|
||||
getPatientsList,
|
||||
getPatientCurrent
|
||||
getPatientCurrent,
|
||||
getPatientByIdentifierSearch,
|
||||
} from '~/handlers/patient.handler'
|
||||
|
||||
const route = useRoute()
|
||||
@@ -386,7 +387,15 @@ onMounted(async () => {
|
||||
v-model:selected="selectedPatient"
|
||||
:patients="patients"
|
||||
:pagination-meta="paginationMeta"
|
||||
@fetch="(value) => getPatientsList({ ...value, 'page-size': 10, includes: 'person' })"
|
||||
@fetch="(value) => {
|
||||
if (value.search && value.search.length >= 3) {
|
||||
// Use identifier search for specific searches (NIK, RM, etc.)
|
||||
getPatientByIdentifierSearch(value.search)
|
||||
} else {
|
||||
// Use regular search for general searches
|
||||
getPatientsList({ ...value, 'page-size': 10, includes: 'person' })
|
||||
}
|
||||
}"
|
||||
@save="handleSavePatient"
|
||||
/>
|
||||
<AppSepTableSearchLetter
|
||||
|
||||
Reference in New Issue
Block a user