✨ feat (soapi): integrate early,rehab,function
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
import { useQueryMode } from '@/composables/useQueryMode' // asumsikan ini ada
|
||||
import { useQueryMode } from '@/composables/useQueryMode'
|
||||
|
||||
import SoapiList from './list.vue'
|
||||
import EarlyForm from './form.vue'
|
||||
|
||||
@@ -1,9 +1,54 @@
|
||||
<script setup lang="ts">
|
||||
import { z } from 'zod'
|
||||
import Entry from '~/components/app/soapi/entry.vue'
|
||||
import Action from '~/components/pub/my-ui/nav-footer/ba-dr-su.vue'
|
||||
import Dialog from '~/components/pub/my-ui/modal/dialog.vue'
|
||||
import { FunctionSoapiSchema } from '~/schemas/soapi.schema'
|
||||
import { toast } from '~/components/pub/ui/toast'
|
||||
import { handleActionSave, handleActionEdit } from '~/handlers/soapi-early.handler'
|
||||
|
||||
const isOpen = ref(false)
|
||||
const data = ref([])
|
||||
const schema = FunctionSoapiSchema
|
||||
const model = ref({
|
||||
'prim-compl': '',
|
||||
'past-disease': '',
|
||||
'current-disease': '',
|
||||
gcs: '',
|
||||
'respiratory-rate': '',
|
||||
'respiratory-rate-type': '',
|
||||
pulse: '',
|
||||
'pulse-type': '',
|
||||
'right-arm-bp': '',
|
||||
'left-arm-bp': '',
|
||||
'axillary-temp': '',
|
||||
'rektal-temp': '',
|
||||
skin: '',
|
||||
head: '',
|
||||
ear: '',
|
||||
nose: '',
|
||||
'oral-cavity': '',
|
||||
eye: '',
|
||||
'other-body-part': '',
|
||||
neck: '',
|
||||
thyroid: '',
|
||||
thorax: '',
|
||||
heart: '',
|
||||
lung: '',
|
||||
abdomen: '',
|
||||
heart2: '',
|
||||
lien: '',
|
||||
back: '',
|
||||
extremity: '',
|
||||
gender: '',
|
||||
rectum: '',
|
||||
'system-syaraf': '',
|
||||
'nervous-system': '',
|
||||
'cardio-respiratory': '',
|
||||
imaging: '',
|
||||
laboratory: '',
|
||||
})
|
||||
|
||||
const isLoading = reactive<DataTableLoader>({
|
||||
isTableLoading: false,
|
||||
})
|
||||
@@ -21,19 +66,36 @@ onMounted(() => {
|
||||
getPatientList()
|
||||
})
|
||||
|
||||
function handleClick(type: string) {
|
||||
function handleOpen(type: string) {
|
||||
console.log(type)
|
||||
isOpen.value = true
|
||||
}
|
||||
|
||||
const entryRehabRef = ref()
|
||||
async function actionHandler(type: string) {
|
||||
console.log(type)
|
||||
const result = await entryRehabRef.value?.validate()
|
||||
if (result?.valid) {
|
||||
console.log('✅ Valid data:', result.data)
|
||||
handleActionSave(result.data, {}, toast)
|
||||
} else {
|
||||
console.log('❌ Ada error di form', result)
|
||||
}
|
||||
}
|
||||
|
||||
provide('table_data_loader', isLoading)
|
||||
</script>
|
||||
<template>
|
||||
<Entry
|
||||
ref="entryRehabRef"
|
||||
v-model="model"
|
||||
:schema="schema"
|
||||
type="function"
|
||||
:exclude-fields="['prim-compl', 'sec-compl']"
|
||||
@click="handleClick"
|
||||
@modal="handleOpen"
|
||||
/>
|
||||
<div class="my-2 flex justify-end py-2">
|
||||
<Action @click="actionHandler" />
|
||||
</div>
|
||||
<Dialog
|
||||
v-model:open="isOpen"
|
||||
title="Pilih Prosedur"
|
||||
|
||||
@@ -1,9 +1,59 @@
|
||||
<script setup lang="ts">
|
||||
import { z } from 'zod'
|
||||
import Entry from '~/components/app/soapi/entry.vue'
|
||||
import Action from '~/components/pub/my-ui/nav-footer/ba-dr-su.vue'
|
||||
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 isOpen = ref(false)
|
||||
const data = ref([])
|
||||
const schema = EarlyRehabSchema
|
||||
const model = ref({
|
||||
'prim-compl': '',
|
||||
'medical-plan': '',
|
||||
'diagnosis-medical': '',
|
||||
'rehab-trouble': '',
|
||||
'medical-trouble': '',
|
||||
'physic-modal': '',
|
||||
exercise: '',
|
||||
'ortho-pesa': '',
|
||||
education: '',
|
||||
other: '',
|
||||
cranialis: '',
|
||||
sensoris: '',
|
||||
'reflect-fisio': '',
|
||||
'reflect-pato': '',
|
||||
otonom: '',
|
||||
localis: '',
|
||||
'medical-trial': '',
|
||||
therapy: '',
|
||||
'syst-bp': '',
|
||||
'diast-bp': '',
|
||||
pulse: '',
|
||||
gcs: '',
|
||||
'respiratory-rate': '',
|
||||
temperature: '',
|
||||
ambulance: '',
|
||||
gait: '',
|
||||
'neck-rom': '',
|
||||
'body-rom': '',
|
||||
'aga-rom': '',
|
||||
'agb-rom': '',
|
||||
'neck-mmt': '',
|
||||
'body-mmt': '',
|
||||
'aga-mmt': '',
|
||||
'agb-mmt': '',
|
||||
localis: '',
|
||||
'medical-trouble': '',
|
||||
'rehab-trouble': '',
|
||||
temp: '',
|
||||
spo2: '',
|
||||
weight: '',
|
||||
height: '',
|
||||
})
|
||||
|
||||
const isLoading = reactive<DataTableLoader>({
|
||||
isTableLoading: false,
|
||||
})
|
||||
@@ -21,19 +71,36 @@ onMounted(() => {
|
||||
getPatientList()
|
||||
})
|
||||
|
||||
function handleClick(type: string) {
|
||||
function handleOpen(type: string) {
|
||||
console.log(type)
|
||||
isOpen.value = true
|
||||
}
|
||||
|
||||
const entryRehabRef = ref()
|
||||
async function actionHandler(type: string) {
|
||||
console.log(type)
|
||||
const result = await entryRehabRef.value?.validate()
|
||||
if (result?.valid) {
|
||||
console.log('✅ Valid data:', result.data)
|
||||
handleActionSave(result.data, {}, toast)
|
||||
} else {
|
||||
console.log('❌ Ada error di form', result)
|
||||
}
|
||||
}
|
||||
|
||||
provide('table_data_loader', isLoading)
|
||||
</script>
|
||||
<template>
|
||||
<Entry
|
||||
ref="entryRehabRef"
|
||||
v-model="model"
|
||||
:schema="schema"
|
||||
type="early-rehab"
|
||||
:exclude-fields="['prim-compl', 'sec-compl']"
|
||||
@click="handleClick"
|
||||
@modal="handleOpen"
|
||||
/>
|
||||
<div class="my-2 flex justify-end py-2">
|
||||
<Action @click="actionHandler" />
|
||||
</div>
|
||||
<Dialog
|
||||
v-model:open="isOpen"
|
||||
title="Pilih Prosedur"
|
||||
|
||||
@@ -1,9 +1,32 @@
|
||||
<script setup lang="ts">
|
||||
import { z } from 'zod'
|
||||
import Entry from '~/components/app/soapi/entry.vue'
|
||||
import Action from '~/components/pub/my-ui/nav-footer/ba-dr-su.vue'
|
||||
import Dialog from '~/components/pub/my-ui/modal/dialog.vue'
|
||||
import { EarlySchema } from '~/schemas/soapi.schema'
|
||||
import { toast } from '~/components/pub/ui/toast'
|
||||
import { handleActionSave, handleActionEdit } from '~/handlers/soapi-early.handler'
|
||||
|
||||
const isOpen = ref(false)
|
||||
const data = ref([])
|
||||
const schema = EarlySchema
|
||||
|
||||
const model = ref({
|
||||
'prim-compl': '',
|
||||
'cur-disea-hist': '',
|
||||
'syst-bp': '',
|
||||
'diast-bp': '',
|
||||
pulse: '',
|
||||
'resp-rate': '',
|
||||
temp: '',
|
||||
weight: '',
|
||||
height: '',
|
||||
'reflect-fisio': '',
|
||||
'reflect-pato': '',
|
||||
'autonom-neuron': '',
|
||||
'medical-act': '',
|
||||
therapy: '',
|
||||
})
|
||||
const isLoading = reactive<DataTableLoader>({
|
||||
isTableLoading: false,
|
||||
})
|
||||
@@ -21,16 +44,42 @@ onMounted(() => {
|
||||
getPatientList()
|
||||
})
|
||||
|
||||
function handleClick(type: string) {
|
||||
function handleOpen(type: string) {
|
||||
console.log(type)
|
||||
isOpen.value = true
|
||||
}
|
||||
|
||||
const entryRef = ref()
|
||||
async function actionHandler(type: string) {
|
||||
console.log(type)
|
||||
const result = await entryRef.value?.validate()
|
||||
if (result?.valid) {
|
||||
console.log('✅ Valid data:', result.data)
|
||||
handleActionSave(result.data, {}, toast)
|
||||
} else {
|
||||
console.log('❌ Ada error di form', result)
|
||||
}
|
||||
}
|
||||
|
||||
provide('table_data_loader', isLoading)
|
||||
</script>
|
||||
<template>
|
||||
<Entry type="early" :exclude-fields="['prim-compl', 'sec-compl']" @click="handleClick" />
|
||||
<Dialog v-model:open="isOpen" title="Pilih Prosedur" size="xl" prevent-outside>
|
||||
<Entry
|
||||
ref="entryRef"
|
||||
v-model="model"
|
||||
:schema="schema"
|
||||
type="early"
|
||||
@modal="handleOpen"
|
||||
/>
|
||||
<div class="my-2 flex justify-end py-2">
|
||||
<Action @click="actionHandler" />
|
||||
</div>
|
||||
<Dialog
|
||||
v-model:open="isOpen"
|
||||
title="Pilih Prosedur"
|
||||
size="xl"
|
||||
prevent-outside
|
||||
>
|
||||
<AppIcdMultiselectPicker :data="data" />
|
||||
</Dialog>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user