Merge branch 'dev' into feat/role-check

This commit is contained in:
2025-12-10 10:47:04 +07:00
6 changed files with 73 additions and 17 deletions
+6
View File
@@ -80,6 +80,7 @@ const isExcluded = (key: string) => props.excludeFields?.includes(key)
<RadioGroupItem
id="vaksin-yes"
value="yes"
class="mt-2"
/>
<Label for="vaksin-yes">Sudah</Label>
</div>
@@ -87,6 +88,7 @@ const isExcluded = (key: string) => props.excludeFields?.includes(key)
<RadioGroupItem
id="vaksin-no"
value="no"
class="mt-2"
/>
<Label for="vaksin-no">Belum</Label>
</div>
@@ -102,6 +104,7 @@ const isExcluded = (key: string) => props.excludeFields?.includes(key)
<RadioGroupItem
id="kasus-baru"
value="baru"
class="mt-2"
/>
<Label for="kasus-baru">Baru</Label>
</div>
@@ -109,6 +112,7 @@ const isExcluded = (key: string) => props.excludeFields?.includes(key)
<RadioGroupItem
id="kasus-lama"
value="lama"
class="mt-2"
/>
<Label for="kasus-lama">Lama</Label>
</div>
@@ -124,6 +128,7 @@ const isExcluded = (key: string) => props.excludeFields?.includes(key)
<RadioGroupItem
id="kunjungan-baru"
value="baru"
class="mt-2"
/>
<Label for="kunjungan-baru">Baru</Label>
</div>
@@ -131,6 +136,7 @@ const isExcluded = (key: string) => props.excludeFields?.includes(key)
<RadioGroupItem
id="kunjungan-lama"
value="lama"
class="mt-2"
/>
<Label for="kunjungan-lama">Lama</Label>
</div>
+1 -1
View File
@@ -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 }],
+19 -1
View File
@@ -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<DataTableLoader>({
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<string, any>).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)
</script>
<template>
<Entry
:key="formKey"
ref="entryRehabRef"
v-model="model"
:schema="schema"
+20 -6
View File
@@ -9,7 +9,7 @@ import { toast } from '~/components/pub/ui/toast'
import { handleActionSave, handleActionEdit } from '~/handlers/soapi-early.handler'
const { goToEntry, backToList } = useQueryCRUDMode('mode')
const { recordId } = useQueryCRUDMode('record-id')
const { recordId } = useQueryCRUDRecordId('record-id')
const route = useRoute()
const isOpenProcedure = ref(false)
const isOpenDiagnose = ref(false)
@@ -44,12 +44,26 @@ const model = ref({
const isLoading = reactive<DataTableLoader>({
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<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
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<string, any>).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)
</script>
<template>
<Entry
:key="formKey"
ref="entryRef"
v-model="model"
:schema="schema"
+1 -1
View File
@@ -67,7 +67,7 @@ if(props.canUpdate) {
}
}
const type = computed(() => (route.query.tab as string) || 'early-medical-assessment')
const type = computed(() => (route.query.menu as string) || 'early-medical-assessment')
onMounted(async () => {
await getMyList()
+26 -8
View File
@@ -66,6 +66,18 @@ const defaultKeys: Record<string, any> = {
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',
classCode: ['ambulatory', 'emergency', 'inpatient'],
unit: 'all',
},
earlyMedicalRehabAssessment: {
id: 'rehab-medical-assessment',
title: 'Pengkajian Awal Medis Rehabilitasi Medis',
@@ -73,12 +85,19 @@ const defaultKeys: Record<string, any> = {
unit: 'rehab',
afterId: 'early-medical-assessment',
},
earlyMedicalAssessment: {
id: 'early-medical-assessment',
title: 'Pengkajian Awal Medis',
classCode: ['ambulatory', 'emergency', 'inpatient'],
unit: 'all',
},
// functionAssessment: {
// id: 'function-assessment',
// title: 'Asesmen Fungsi',
// classCode: ['ambulatory'],
// unit: 'rehab',
// afterId: 'rehab-medical-assessment',
// },
// therapyProtocol: {
// id: 'therapy-protocol',
// classCode: ['ambulatory'],
// title: 'Protokol Terapi',
// unit: 'rehab',
// afterId: 'function-assessment',
initialNursesAssessment: {
id: 'early-nurse-assessment',
title: 'Kajian Awal Keperawatan',
@@ -260,7 +279,7 @@ const defaultKeys: Record<string, any> = {
title: 'Profil Ringkasan Medis',
classCode: ['ambulatory', 'emergency', 'inpatient'],
unit: 'all',
}
},
}
export function getItemsByClassCode(classCode: string, items: EncounterItem[]) {
@@ -437,7 +456,6 @@ export function injectComponents(id: string | number, data: EncounterListData, m
currentKeys.priceList['component'] = null
currentKeys.priceList['props'] = { encounter_id: id }
}
if (currentKeys?.initialNursesAssessment) {
currentKeys.initialNursesAssessment['component'] = initialNursesAssessmentAsync
currentKeys.initialNursesAssessment['props'] = { encounter: data?.encounter }