feat: Add encounter list view with filter form and data table configurations for encounter management.
This commit is contained in:
No files matched your search
@@ -93,9 +93,9 @@ function handleSearch() {
|
|||||||
Reset
|
Reset
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
variant="outline"
|
variant="default"
|
||||||
type="button"
|
type="button"
|
||||||
class="h-[40px] rounded-md border-orange-400 text-orange-400 hover:bg-green-50"
|
class="h-[40px]"
|
||||||
@click="handleSearch"
|
@click="handleSearch"
|
||||||
>
|
>
|
||||||
<Icon
|
<Icon
|
||||||
|
|||||||
@@ -167,7 +167,7 @@ export const ambulatoryConfig: Config = {
|
|||||||
},
|
},
|
||||||
address: (rec: unknown): unknown => {
|
address: (rec: unknown): unknown => {
|
||||||
const recX = rec as Encounter
|
const recX = rec as Encounter
|
||||||
const addresses = recX.patient.person.addresses
|
const addresses = recX.patient?.person?.addresses || []
|
||||||
const resident = addresses?.find((addr) => addr.locationType_code === 'domicile')
|
const resident = addresses?.find((addr) => addr.locationType_code === 'domicile')
|
||||||
const text = resident ? formatAddress(resident) : '-'
|
const text = resident ? formatAddress(resident) : '-'
|
||||||
return text.length > 20 ? text.substring(0, 17) + '...' : text
|
return text.length > 20 ? text.substring(0, 17) + '...' : text
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import FileUpload from '~/components/pub/my-ui/form/file-field.vue'
|
|||||||
import { useSidebar } from '~/components/pub/ui/sidebar/utils'
|
import { useSidebar } from '~/components/pub/ui/sidebar/utils'
|
||||||
|
|
||||||
// Constants
|
// Constants
|
||||||
import { paymentTypes } from '~/lib/constants.vclaim'
|
import { paymentTypes, sepRefTypeCodes } from '~/lib/constants.vclaim'
|
||||||
|
|
||||||
// App libs
|
// App libs
|
||||||
import { getServicePosition } from '~/lib/roles' // previously getPositionAs
|
import { getServicePosition } from '~/lib/roles' // previously getPositionAs
|
||||||
@@ -70,10 +70,7 @@ const isRecordCancelOpen = ref(false)
|
|||||||
const uploadFile = ref<any>(null)
|
const uploadFile = ref<any>(null)
|
||||||
const payments = ref<any>([])
|
const payments = ref<any>([])
|
||||||
const units = ref<any>([])
|
const units = ref<any>([])
|
||||||
const visits = ref([
|
const sepsList = ref<any>([])
|
||||||
{ label: 'Rujukan Internal', value: 'ri' },
|
|
||||||
{ label: 'SEP Rujukan', value: 'sr' },
|
|
||||||
])
|
|
||||||
|
|
||||||
// Headers
|
// Headers
|
||||||
const hreaderPrep: CH.Config = {
|
const hreaderPrep: CH.Config = {
|
||||||
@@ -145,6 +142,10 @@ onMounted(async () => {
|
|||||||
value: item.toString(),
|
value: item.toString(),
|
||||||
label: paymentTypes[item],
|
label: paymentTypes[item],
|
||||||
})) as any
|
})) as any
|
||||||
|
sepsList.value = Object.keys(sepRefTypeCodes).map((item) => ({
|
||||||
|
value: item.toString(),
|
||||||
|
label: sepRefTypeCodes[item],
|
||||||
|
})) as any
|
||||||
})
|
})
|
||||||
|
|
||||||
/////// Functions
|
/////// Functions
|
||||||
@@ -244,7 +245,8 @@ function handleViewFile(id: number, menu: string, subMenu: string) {
|
|||||||
|
|
||||||
function handleFilterApply(filters: { personName: string; startDate: string; endDate: string }) {
|
function handleFilterApply(filters: { personName: string; startDate: string; endDate: string }) {
|
||||||
filterParams.value = {
|
filterParams.value = {
|
||||||
'person-name': filters.personName,
|
// 'person-name': filters.personName,
|
||||||
|
'patient-identifier': filters.personName,
|
||||||
'start-date': filters.startDate,
|
'start-date': filters.startDate,
|
||||||
'end-date': filters.endDate,
|
'end-date': filters.endDate,
|
||||||
}
|
}
|
||||||
@@ -358,6 +360,7 @@ function handleRemoveConfirmation() {
|
|||||||
<CH.ContentHeader v-bind="hreaderPrep">
|
<CH.ContentHeader v-bind="hreaderPrep">
|
||||||
<FilterNav
|
<FilterNav
|
||||||
:active-positon="activeServicePosition"
|
:active-positon="activeServicePosition"
|
||||||
|
:enable-export="false"
|
||||||
@apply="handleFilterApply"
|
@apply="handleFilterApply"
|
||||||
@click="() => (isFilterFormDialogOpen = true)"
|
@click="() => (isFilterFormDialogOpen = true)"
|
||||||
@onExportPdf="() => {}"
|
@onExportPdf="() => {}"
|
||||||
@@ -381,7 +384,7 @@ function handleRemoveConfirmation() {
|
|||||||
<FilterForm
|
<FilterForm
|
||||||
:payments="payments"
|
:payments="payments"
|
||||||
:units="units"
|
:units="units"
|
||||||
:visits="visits"
|
:visits="sepsList"
|
||||||
@search="handleFilterSearch"
|
@search="handleFilterSearch"
|
||||||
@reset="handleFilterReset"
|
@reset="handleFilterReset"
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user