feat (soapi): display encounter class code in soapi list

This commit is contained in:
Abizrh
2025-11-21 16:00:52 +07:00
parent 4f8407f978
commit 6e42bb5283
3 changed files with 7 additions and 3 deletions
+5 -1
View File
@@ -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 ?? {}
+1 -1
View File
@@ -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,
+1 -1
View File
@@ -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