feat: Add encounter list view with filter form and data table configurations for encounter management.
This commit is contained in:
@@ -11,7 +11,7 @@ import FileUpload from '~/components/pub/my-ui/form/file-field.vue'
|
||||
import { useSidebar } from '~/components/pub/ui/sidebar/utils'
|
||||
|
||||
// Constants
|
||||
import { paymentTypes } from '~/lib/constants.vclaim'
|
||||
import { paymentTypes, sepRefTypeCodes } from '~/lib/constants.vclaim'
|
||||
|
||||
// App libs
|
||||
import { getServicePosition } from '~/lib/roles' // previously getPositionAs
|
||||
@@ -70,10 +70,7 @@ const isRecordCancelOpen = ref(false)
|
||||
const uploadFile = ref<any>(null)
|
||||
const payments = ref<any>([])
|
||||
const units = ref<any>([])
|
||||
const visits = ref([
|
||||
{ label: 'Rujukan Internal', value: 'ri' },
|
||||
{ label: 'SEP Rujukan', value: 'sr' },
|
||||
])
|
||||
const sepsList = ref<any>([])
|
||||
|
||||
// Headers
|
||||
const hreaderPrep: CH.Config = {
|
||||
@@ -145,6 +142,10 @@ onMounted(async () => {
|
||||
value: item.toString(),
|
||||
label: paymentTypes[item],
|
||||
})) as any
|
||||
sepsList.value = Object.keys(sepRefTypeCodes).map((item) => ({
|
||||
value: item.toString(),
|
||||
label: sepRefTypeCodes[item],
|
||||
})) as any
|
||||
})
|
||||
|
||||
/////// Functions
|
||||
@@ -244,7 +245,8 @@ function handleViewFile(id: number, menu: string, subMenu: string) {
|
||||
|
||||
function handleFilterApply(filters: { personName: string; startDate: string; endDate: string }) {
|
||||
filterParams.value = {
|
||||
'person-name': filters.personName,
|
||||
// 'person-name': filters.personName,
|
||||
'patient-identifier': filters.personName,
|
||||
'start-date': filters.startDate,
|
||||
'end-date': filters.endDate,
|
||||
}
|
||||
@@ -358,6 +360,7 @@ function handleRemoveConfirmation() {
|
||||
<CH.ContentHeader v-bind="hreaderPrep">
|
||||
<FilterNav
|
||||
:active-positon="activeServicePosition"
|
||||
:enable-export="false"
|
||||
@apply="handleFilterApply"
|
||||
@click="() => (isFilterFormDialogOpen = true)"
|
||||
@onExportPdf="() => {}"
|
||||
@@ -381,7 +384,7 @@ function handleRemoveConfirmation() {
|
||||
<FilterForm
|
||||
:payments="payments"
|
||||
:units="units"
|
||||
:visits="visits"
|
||||
:visits="sepsList"
|
||||
@search="handleFilterSearch"
|
||||
@reset="handleFilterReset"
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user