feat (soapi): adjust list
This commit is contained in:
@@ -3,7 +3,7 @@ import { defineAsyncComponent } from 'vue'
|
|||||||
|
|
||||||
type SmallDetailDto = any
|
type SmallDetailDto = any
|
||||||
|
|
||||||
const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-ud.vue'))
|
const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-d.vue'))
|
||||||
|
|
||||||
export const config: Config = {
|
export const config: Config = {
|
||||||
cols: [{}, {}, {}, { width: 100 }, { width: 120 }, {}, {}, {}, { width: 100 }, { width: 100 }, {}, { width: 50 }],
|
cols: [{}, {}, {}, { width: 100 }, { width: 120 }, {}, {}, {}, { width: 100 }, { width: 100 }, {}, { width: 50 }],
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import RehabForm from './form-rehab.vue'
|
|||||||
import FunctionForm from './form-function.vue'
|
import FunctionForm from './form-function.vue'
|
||||||
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const type = computed(() => (route.query.tab as string) || 'early-medical-assessment')
|
const type = computed(() => (route.query.menu as string) || 'early-medical-assessment')
|
||||||
|
|
||||||
const { mode, goToEntry, backToList } = useQueryCRUDMode('mode')
|
const { mode, goToEntry, backToList } = useQueryCRUDMode('mode')
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,9 @@ import Dialog from '~/components/pub/my-ui/modal/dialog.vue'
|
|||||||
import { EarlyRehabSchema } from '~/schemas/soapi.schema'
|
import { EarlyRehabSchema } from '~/schemas/soapi.schema'
|
||||||
import { toast } from '~/components/pub/ui/toast'
|
import { toast } from '~/components/pub/ui/toast'
|
||||||
import { handleActionSave, handleActionEdit } from '~/handlers/soapi-early.handler'
|
import { handleActionSave, handleActionEdit } from '~/handlers/soapi-early.handler'
|
||||||
const { backToList } = useQueryMode('mode')
|
|
||||||
|
const { backToList } = useQueryCRUDMode('mode')
|
||||||
|
const { recordId } = useQueryCRUDRecordId('record-id')
|
||||||
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const isOpenProcedure = ref(false)
|
const isOpenProcedure = ref(false)
|
||||||
@@ -89,9 +91,19 @@ async function getProcedures() {
|
|||||||
isLoading.isTableLoading = false
|
isLoading.isTableLoading = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function getDetail() {
|
||||||
|
isLoading.isTableLoading = true
|
||||||
|
const resp = await xfetch(`/api/v1/soapi/${recordId.value}`)
|
||||||
|
if (resp.success) {
|
||||||
|
diagnoses.value = (resp.body as Record<string, any>).data
|
||||||
|
}
|
||||||
|
isLoading.isTableLoading = false
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getProcedures()
|
getProcedures()
|
||||||
getDiagnoses()
|
getDiagnoses()
|
||||||
|
getDetail()
|
||||||
})
|
})
|
||||||
|
|
||||||
function handleOpen(type: string) {
|
function handleOpen(type: string) {
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import { toast } from '~/components/pub/ui/toast'
|
|||||||
import { handleActionSave, handleActionEdit } from '~/handlers/soapi-early.handler'
|
import { handleActionSave, handleActionEdit } from '~/handlers/soapi-early.handler'
|
||||||
|
|
||||||
const { goToEntry, backToList } = useQueryCRUDMode('mode')
|
const { goToEntry, backToList } = useQueryCRUDMode('mode')
|
||||||
const { recordId } = useQueryCRUDMode('record-id')
|
const { recordId } = useQueryCRUDRecordId('record-id')
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const isOpenProcedure = ref(false)
|
const isOpenProcedure = ref(false)
|
||||||
const isOpenDiagnose = ref(false)
|
const isOpenDiagnose = ref(false)
|
||||||
@@ -45,11 +45,24 @@ const isLoading = reactive<DataTableLoader>({
|
|||||||
isTableLoading: false,
|
isTableLoading: false,
|
||||||
})
|
})
|
||||||
|
|
||||||
async function getDiagnoses() {
|
async function getDetail() {
|
||||||
isLoading.isTableLoading = true
|
isLoading.isTableLoading = true
|
||||||
const resp = await xfetch(`/api/v1/soapi/${recordId}`)
|
const resp = await xfetch(`/api/v1/soapi/${recordId.value}`)
|
||||||
if (resp.success) {
|
if (resp.success) {
|
||||||
diagnoses.value = (resp.body as Record<string, any>).data
|
const raw = (resp.body as Record<string, any>).data
|
||||||
|
const values = JSON.parse(raw.value)
|
||||||
|
console.log('values', values)
|
||||||
|
model.value = values
|
||||||
|
// diagnoses.value = (resp.body as Record<string, any>).data
|
||||||
|
}
|
||||||
|
isLoading.isTableLoading = false
|
||||||
|
}
|
||||||
|
|
||||||
|
async function getDiagnose() {
|
||||||
|
isLoading.isTableLoading = true
|
||||||
|
const resp = await xfetch('/api/v1/diagnose-src')
|
||||||
|
if (resp.success) {
|
||||||
|
procedures.value = (resp.body as Record<string, any>).data
|
||||||
}
|
}
|
||||||
isLoading.isTableLoading = false
|
isLoading.isTableLoading = false
|
||||||
}
|
}
|
||||||
@@ -64,8 +77,7 @@ async function getProcedures() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getProcedures()
|
getDetail()
|
||||||
getDiagnoses()
|
|
||||||
})
|
})
|
||||||
|
|
||||||
function handleOpen(type: string) {
|
function handleOpen(type: string) {
|
||||||
@@ -124,6 +136,7 @@ provide('table_data_loader', isLoading)
|
|||||||
provide('icdPreview', icdPreview)
|
provide('icdPreview', icdPreview)
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
|
{{ model }}
|
||||||
<Entry
|
<Entry
|
||||||
ref="entryRef"
|
ref="entryRef"
|
||||||
v-model="model"
|
v-model="model"
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ const hreaderPrep: HeaderPrep = {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
const type = computed(() => (route.query.tab as string) || 'early-medical-assessment')
|
const type = computed(() => (route.query.menu as string) || 'early-medical-assessment')
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await getMyList()
|
await getMyList()
|
||||||
|
|||||||
@@ -68,12 +68,12 @@ const defaultKeys: Record<string, any> = {
|
|||||||
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
||||||
unit: 'all',
|
unit: 'all',
|
||||||
},
|
},
|
||||||
earlyNurseryAssessment: {
|
// earlyNurseryAssessment: {
|
||||||
id: 'early-nursery-assessment',
|
// id: 'early-nursery-assessment',
|
||||||
title: 'Pengkajian Awal Keperawatan',
|
// title: 'Pengkajian Awal Keperawatan',
|
||||||
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
// classCode: ['ambulatory', 'emergency', 'inpatient'],
|
||||||
unit: 'all',
|
// unit: 'all',
|
||||||
},
|
// },
|
||||||
earlyMedicalAssessment: {
|
earlyMedicalAssessment: {
|
||||||
id: 'early-medical-assessment',
|
id: 'early-medical-assessment',
|
||||||
title: 'Pengkajian Awal Medis',
|
title: 'Pengkajian Awal Medis',
|
||||||
@@ -84,7 +84,9 @@ const defaultKeys: Record<string, any> = {
|
|||||||
id: 'rehab-medical-assessment',
|
id: 'rehab-medical-assessment',
|
||||||
title: 'Pengkajian Awal Medis Rehabilitasi Medis',
|
title: 'Pengkajian Awal Medis Rehabilitasi Medis',
|
||||||
classCode: ['ambulatory'],
|
classCode: ['ambulatory'],
|
||||||
unit: 'rehab',
|
// FIXME: just for now
|
||||||
|
// unit: 'rehab',
|
||||||
|
unit: 'all',
|
||||||
afterId: 'early-medical-assessment',
|
afterId: 'early-medical-assessment',
|
||||||
},
|
},
|
||||||
functionAssessment: {
|
functionAssessment: {
|
||||||
@@ -287,7 +289,7 @@ const defaultKeys: Record<string, any> = {
|
|||||||
title: 'Profil Ringkasan Medis',
|
title: 'Profil Ringkasan Medis',
|
||||||
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
||||||
unit: 'all',
|
unit: 'all',
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getItemsByClassCode(classCode: string, items: EncounterItem[]) {
|
export function getItemsByClassCode(classCode: string, items: EncounterItem[]) {
|
||||||
@@ -470,16 +472,6 @@ export function injectComponents(id: string | number, data: EncounterListData, m
|
|||||||
currentKeys.initialNursingStudy['props'] = { encounter: data?.encounter }
|
currentKeys.initialNursingStudy['props'] = { encounter: data?.encounter }
|
||||||
}
|
}
|
||||||
|
|
||||||
if (currentKeys?.initialNursingStudy) {
|
|
||||||
currentKeys.initialNursingStudy['component'] = InitialNursingStudyAsync
|
|
||||||
currentKeys.initialNursingStudy['props'] = { encounter: data?.encounter }
|
|
||||||
}
|
|
||||||
|
|
||||||
if (currentKeys?.initialNursingStudy) {
|
|
||||||
currentKeys.initialNursingStudy['component'] = InitialNursingStudyAsync
|
|
||||||
currentKeys.initialNursingStudy['props'] = { encounter: data?.encounter }
|
|
||||||
}
|
|
||||||
|
|
||||||
if (currentKeys?.actionReport) {
|
if (currentKeys?.actionReport) {
|
||||||
currentKeys.actionReport['component'] = ActionReportEntryAsync
|
currentKeys.actionReport['component'] = ActionReportEntryAsync
|
||||||
currentKeys.actionReport['props'] = {
|
currentKeys.actionReport['props'] = {
|
||||||
|
|||||||
Reference in New Issue
Block a user