✨ feat (soapi): display encounter class code in soapi list
This commit is contained in:
@@ -20,7 +20,7 @@ export const config: Config = {
|
||||
],
|
||||
],
|
||||
|
||||
keys: ['time', 'employee_id', 'main_complaint', 'encounter_id', 'diagnose', 'status', 'action'],
|
||||
keys: ['time', 'employee_id', 'main_complaint', 'encounter', 'diagnose', 'status', 'action'],
|
||||
|
||||
delKeyNames: [
|
||||
{ key: 'code', label: 'Kode' },
|
||||
@@ -44,6 +44,10 @@ export const config: Config = {
|
||||
return '-'
|
||||
}
|
||||
},
|
||||
encounter(rec: any) {
|
||||
const data = rec?.encounter ?? {}
|
||||
return data?.class_code || '-'
|
||||
},
|
||||
diagnose(rec: any) {
|
||||
const { value } = rec ?? {}
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ const {
|
||||
fetchFn: async ({ page, search }) => {
|
||||
const result = await getList({
|
||||
'encounter-id': id,
|
||||
'type-code': 'dev-record',
|
||||
typeCode: 'dev-record',
|
||||
includes: 'encounter',
|
||||
search,
|
||||
page,
|
||||
|
||||
@@ -71,7 +71,7 @@ onMounted(async () => {
|
||||
})
|
||||
|
||||
async function getMyList() {
|
||||
const url = `/api/v1/soapi?type-code=${typeCode.value}&includes=encounter&encounter-id=${route.params.id}`
|
||||
const url = `/api/v1/soapi?typeCode=${typeCode.value}&includes=encounter,employee&encounter-id=${route.params.id}`
|
||||
const resp = await xfetch(url)
|
||||
if (resp.success) {
|
||||
data.value = (resp.body as Record<string, any>).data
|
||||
|
||||
Reference in New Issue
Block a user