diff --git a/app/components/app/soapi/early-entry.vue b/app/components/app/soapi/early-entry.vue
index 4d2367be..687d2425 100644
--- a/app/components/app/soapi/early-entry.vue
+++ b/app/components/app/soapi/early-entry.vue
@@ -80,6 +80,7 @@ const isExcluded = (key: string) => props.excludeFields?.includes(key)
@@ -87,6 +88,7 @@ const isExcluded = (key: string) => props.excludeFields?.includes(key)
@@ -102,6 +104,7 @@ const isExcluded = (key: string) => props.excludeFields?.includes(key)
@@ -109,6 +112,7 @@ const isExcluded = (key: string) => props.excludeFields?.includes(key)
@@ -124,6 +128,7 @@ const isExcluded = (key: string) => props.excludeFields?.includes(key)
@@ -131,6 +136,7 @@ const isExcluded = (key: string) => props.excludeFields?.includes(key)
diff --git a/app/components/app/soapi/list-cfg.ts b/app/components/app/soapi/list-cfg.ts
index 3db1b24a..b73651bd 100644
--- a/app/components/app/soapi/list-cfg.ts
+++ b/app/components/app/soapi/list-cfg.ts
@@ -3,7 +3,7 @@ import { defineAsyncComponent } from 'vue'
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 = {
cols: [{}, {}, {}, { width: 100 }, { width: 120 }, {}, {}, {}, { width: 100 }, { width: 100 }, {}, { width: 50 }],
diff --git a/app/components/content/soapi/entry.vue b/app/components/content/soapi/entry.vue
index d4e960f3..9d01720f 100644
--- a/app/components/content/soapi/entry.vue
+++ b/app/components/content/soapi/entry.vue
@@ -9,7 +9,7 @@ import RehabForm from './form-rehab.vue'
import FunctionForm from './form-function.vue'
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')
diff --git a/app/components/content/soapi/form-rehab.vue b/app/components/content/soapi/form-rehab.vue
index 4130f562..15531e5e 100644
--- a/app/components/content/soapi/form-rehab.vue
+++ b/app/components/content/soapi/form-rehab.vue
@@ -7,7 +7,9 @@ import Dialog from '~/components/pub/my-ui/modal/dialog.vue'
import { EarlyRehabSchema } from '~/schemas/soapi.schema'
import { toast } from '~/components/pub/ui/toast'
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 isOpenProcedure = ref(false)
@@ -66,6 +68,7 @@ const model = ref({
weight: '',
height: '',
})
+const formKey = ref(0)
const isLoading = reactive({
isTableLoading: false,
@@ -89,9 +92,23 @@ async function getProcedures() {
isLoading.isTableLoading = false
}
+async function getDetail() {
+ isLoading.isTableLoading = true
+ const resp = await xfetch(`/api/v1/soapi/${recordId.value}`)
+ if (resp.success) {
+ const raw = (resp.body as Record).data
+ const values = JSON.parse(raw.value)
+ console.log('values', values)
+ model.value = values
+ formKey.value++ // Force re-render with new data
+ }
+ isLoading.isTableLoading = false
+}
+
onMounted(() => {
getProcedures()
getDiagnoses()
+ getDetail()
})
function handleOpen(type: string) {
@@ -146,6 +163,7 @@ provide('icdPreview', icdPreview)
({
isTableLoading: false,
})
+const formKey = ref(0)
-async function getDiagnoses() {
+async function getDetail() {
isLoading.isTableLoading = true
- const resp = await xfetch(`/api/v1/soapi/${recordId}`)
+ const resp = await xfetch(`/api/v1/soapi/${recordId.value}`)
if (resp.success) {
- diagnoses.value = (resp.body as Record).data
+ const raw = (resp.body as Record).data
+ const values = JSON.parse(raw.value)
+ console.log('values', values)
+ model.value = values
+ formKey.value++ // Force re-render with new 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).data
}
isLoading.isTableLoading = false
}
@@ -64,8 +78,7 @@ async function getProcedures() {
}
onMounted(() => {
- getProcedures()
- getDiagnoses()
+ getDetail()
})
function handleOpen(type: string) {
@@ -125,6 +138,7 @@ provide('icdPreview', icdPreview)
(route.query.tab as string) || 'early-medical-assessment')
+const type = computed(() => (route.query.menu as string) || 'early-medical-assessment')
onMounted(async () => {
await getMyList()
diff --git a/app/handlers/encounter-init.handler.ts b/app/handlers/encounter-init.handler.ts
index 83cdb529..033d6d7f 100644
--- a/app/handlers/encounter-init.handler.ts
+++ b/app/handlers/encounter-init.handler.ts
@@ -68,12 +68,12 @@ const defaultKeys: Record = {
classCode: ['ambulatory', 'emergency', 'inpatient'],
unit: 'all',
},
- earlyNurseryAssessment: {
- id: 'early-nursery-assessment',
- title: 'Pengkajian Awal Keperawatan',
- classCode: ['ambulatory', 'emergency', 'inpatient'],
- unit: 'all',
- },
+ // earlyNurseryAssessment: {
+ // id: 'early-nursery-assessment',
+ // title: 'Pengkajian Awal Keperawatan',
+ // classCode: ['ambulatory', 'emergency', 'inpatient'],
+ // unit: 'all',
+ // },
earlyMedicalAssessment: {
id: 'early-medical-assessment',
title: 'Pengkajian Awal Medis',
@@ -287,7 +287,7 @@ const defaultKeys: Record = {
title: 'Profil Ringkasan Medis',
classCode: ['ambulatory', 'emergency', 'inpatient'],
unit: 'all',
- }
+ },
}
export function getItemsByClassCode(classCode: string, items: EncounterItem[]) {
@@ -470,16 +470,6 @@ export function injectComponents(id: string | number, data: EncounterListData, m
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) {
currentKeys.actionReport['component'] = ActionReportEntryAsync
currentKeys.actionReport['props'] = {