|
@@ -34,11 +77,17 @@ const isExcluded = (key: string) => props.excludeFields?.includes(key)
-
+
-
+
@@ -50,11 +99,17 @@ const isExcluded = (key: string) => props.excludeFields?.includes(key)
-
+
-
+
@@ -66,11 +121,17 @@ const isExcluded = (key: string) => props.excludeFields?.includes(key)
-
+
-
+
@@ -79,88 +140,141 @@ const isExcluded = (key: string) => props.excludeFields?.includes(key)
|
-
-
-
+
+
|
|
-
+
|
-
+
|
-
+
|
-
+
|
-
+
|
-
+
|
-
+
|
-
+
|
-
+
|
-
+
|
@@ -171,9 +285,10 @@ const isExcluded = (key: string) => props.excludeFields?.includes(key)
+ + Pilih Diagnosa
+
@@ -183,9 +298,10 @@ const isExcluded = (key: string) => props.excludeFields?.includes(key)
+ + Pilih Prosedur
+
@@ -199,21 +315,30 @@ const isExcluded = (key: string) => props.excludeFields?.includes(key)
-
+
|
-
+
|
-
+
|
diff --git a/app/components/app/soapi/early-rehab-entry.vue b/app/components/app/soapi/early-rehab-entry.vue
index 61beb0f3..2cafbcac 100644
--- a/app/components/app/soapi/early-rehab-entry.vue
+++ b/app/components/app/soapi/early-rehab-entry.vue
@@ -4,24 +4,88 @@ import Cell from '~/components/pub/my-ui/doc-entry/cell.vue'
import Field from '~/components/pub/my-ui/doc-entry/field.vue'
import Label from '~/components/pub/my-ui/doc-entry/label.vue'
+// Helpers
+import type z from 'zod'
+import { toTypedSchema } from '@vee-validate/zod'
+import { useForm } from 'vee-validate'
+import { genBase } from '~/models/_base'
+
const props = defineProps<{
+ modelValue: any
+ schema: z.ZodSchema
excludeFields?: string[]
+ isReadonly?: boolean
}>()
-const emits = defineEmits(['click'])
+const emit = defineEmits<{
+ (e: 'update:modelValue', val: any): void
+ (e: 'submit', val: any): void
+}>()
-const subject = ref({
- 'prim-compl': '',
- 'sec-compl': '',
- 'cur-disea-hist': '',
- 'pas-disea-hist': '',
- 'fam-disea-hist': '',
- 'alg-hist': '',
- 'alg-react': '',
- 'med-hist': '',
- 'blood-type': '',
+// Setup form
+const {
+ validate: _validate,
+ defineField,
+ handleSubmit,
+ errors,
+ values,
+} = useForm({
+ validationSchema: toTypedSchema(props.schema),
+ initialValues: props.modelValue,
})
+watch(values, (val) => emit('update:modelValue', val), { deep: true })
+
+const [primaryComplaint, primaryComplaintAttrs] = defineField('prim-compl')
+const [medicalPlan, medicalPlanAttrs] = defineField('medical-plan')
+const [diagnosisMedical, diagnosisMedicalAttrs] = defineField('diagnosis-medical')
+const [rehabTrouble, rehabTroubleAttrs] = defineField('rehab-trouble')
+const [medicalTrouble, medicalTroubleAttrs] = defineField('medical-trouble')
+const [physicModal, physicModalAttrs] = defineField('physic-modal')
+const [exercise, exerciseAttrs] = defineField('exercise')
+const [orthoPesa, orthoPesaAttrs] = defineField('ortho-pesa')
+const [education, educationAttrs] = defineField('education')
+const [other, otherAttrs] = defineField('other')
+const [cranialis, cranialisAttrs] = defineField('cranialis')
+const [sensoris, sensorisAttrs] = defineField('sensoris')
+const [reflectFisio, reflectFisioAttrs] = defineField('reflect-fisio')
+const [reflectPato, reflectPatoAttrs] = defineField('reflect-pato')
+const [otonom, otonomAttrs] = defineField('otonom')
+const [localis, localisAttrs] = defineField('localis')
+const [medicalTrial, medicalTrialAttrs] = defineField('medical-trial')
+const [therapy, therapyAttrs] = defineField('therapy')
+const [systolic, systolicAttrs] = defineField('syst-bp')
+const [diastolic, diastolicAttrs] = defineField('diast-bp')
+const [pulse, pulseAttrs] = defineField('pulse')
+const [gcs, gcsAttrs] = defineField('gcs')
+const [respiratoryRate, respiratoryRateAttrs] = defineField('respiratory-rate')
+const [temperature, temperatureAttrs] = defineField('temperature')
+const [weight, weightAttrs] = defineField('weight')
+const [height, heightAttrs] = defineField('height')
+const [ambulance, ambulanceAttrs] = defineField('ambulance')
+const [gait, gaitAttrs] = defineField('gait')
+const [neckRom, neckRomAttrs] = defineField('neck-rom')
+const [bodyRom, bodyRomAttrs] = defineField('body-rom')
+const [agaRom, agaRomAttrs] = defineField('aga-rom')
+const [agbRom, agbRomAttrs] = defineField('agb-rom')
+const [neckMmt, neckMmtAttrs] = defineField('neck-mmt')
+const [bodyMmt, bodyMmtAttrs] = defineField('body-mmt')
+const [agaMmt, agaMmtAttrs] = defineField('aga-mmt')
+const [agbMmt, agbMmtAttrs] = defineField('agb-mmt')
+
+const validate = async () => {
+ const result = await _validate()
+ console.log('Component validate() result:', result)
+
+ return {
+ valid: true,
+ data: result.values,
+ errors: result.errors,
+ }
+}
+
+defineExpose({ validate })
+
const isExcluded = (key: string) => props.excludeFields?.includes(key)
@@ -36,8 +100,11 @@ const isExcluded = (key: string) => props.excludeFields?.includes(key)
-
-
+
+
|
@@ -46,21 +113,30 @@ const isExcluded = (key: string) => props.excludeFields?.includes(key)
-
+
|
-
+
|
-
+
|
@@ -77,22 +153,36 @@ const isExcluded = (key: string) => props.excludeFields?.includes(key)
-
-
+
+
|
-
+
|
-
+
|
@@ -100,14 +190,21 @@ const isExcluded = (key: string) => props.excludeFields?.includes(key)
-
+
|
-
+
props.excludeFields?.includes(key)
|
-
+
|
@@ -144,21 +244,30 @@ const isExcluded = (key: string) => props.excludeFields?.includes(key)
-
+
|
-
+
|
-
+
|
@@ -166,13 +275,19 @@ const isExcluded = (key: string) => props.excludeFields?.includes(key)
-
+
|
-
+
|
@@ -187,13 +302,19 @@ const isExcluded = (key: string) => props.excludeFields?.includes(key)
-
+
|
-
+
|
@@ -201,13 +322,19 @@ const isExcluded = (key: string) => props.excludeFields?.includes(key)
-
+
|
-
+
|
@@ -222,13 +349,19 @@ const isExcluded = (key: string) => props.excludeFields?.includes(key)
-
+
|
-
+
|
@@ -236,13 +369,19 @@ const isExcluded = (key: string) => props.excludeFields?.includes(key)
-
+
|
-
+
|
@@ -256,7 +395,10 @@ const isExcluded = (key: string) => props.excludeFields?.includes(key)
-
+
|
@@ -271,7 +413,10 @@ const isExcluded = (key: string) => props.excludeFields?.includes(key)
-
+
|
@@ -286,13 +431,19 @@ const isExcluded = (key: string) => props.excludeFields?.includes(key)
-
+
|
-
+
|
@@ -316,21 +467,30 @@ const isExcluded = (key: string) => props.excludeFields?.includes(key)
-
+
|
-
+
|
-
+
|
@@ -338,13 +498,19 @@ const isExcluded = (key: string) => props.excludeFields?.includes(key)
-
+
|
-
+
|
diff --git a/app/components/app/soapi/entry.vue b/app/components/app/soapi/entry.vue
index ced3e3d8..2ee2cefb 100644
--- a/app/components/app/soapi/entry.vue
+++ b/app/components/app/soapi/entry.vue
@@ -1,28 +1,47 @@
-
+
diff --git a/app/components/app/soapi/function-entry.vue b/app/components/app/soapi/function-entry.vue
index 98d35663..3e192c47 100644
--- a/app/components/app/soapi/function-entry.vue
+++ b/app/components/app/soapi/function-entry.vue
@@ -4,24 +4,88 @@ import Cell from '~/components/pub/my-ui/doc-entry/cell.vue'
import Field from '~/components/pub/my-ui/doc-entry/field.vue'
import Label from '~/components/pub/my-ui/doc-entry/label.vue'
+// Helpers
+import type z from 'zod'
+import { toTypedSchema } from '@vee-validate/zod'
+import { useForm } from 'vee-validate'
+import { genBase } from '~/models/_base'
+
const props = defineProps<{
+ modelValue: any
+ schema: z.ZodSchema
excludeFields?: string[]
+ isReadonly?: boolean
}>()
-const emits = defineEmits(['click'])
+const emit = defineEmits<{
+ (e: 'update:modelValue', val: any): void
+ (e: 'submit', val: any): void
+}>()
-const subject = ref({
- 'prim-compl': '',
- 'sec-compl': '',
- 'cur-disea-hist': '',
- 'pas-disea-hist': '',
- 'fam-disea-hist': '',
- 'alg-hist': '',
- 'alg-react': '',
- 'med-hist': '',
- 'blood-type': '',
+// Setup form
+const {
+ validate: _validate,
+ defineField,
+ handleSubmit,
+ errors,
+ values,
+} = useForm({
+ validationSchema: toTypedSchema(props.schema),
+ initialValues: props.modelValue,
})
+watch(values, (val) => emit('update:modelValue', val), { deep: true })
+
+const [primaryComplaint, primaryComplaintAttrs] = defineField('prim-compl')
+const [pastDisease, pastDiseaseAttrs] = defineField('past-disease')
+const [currentDisease, currentDiseaseAttrs] = defineField('current-disease')
+const [gcs, gcsAttrs] = defineField('gcs')
+const [respiratoryRate, respiratoryRateAttrs] = defineField('respiratory-rate')
+const [respiratoryRateType, respiratoryRateTypeAttrs] = defineField('respiratory-rate-type')
+const [pulse, pulseAttrs] = defineField('pulse')
+const [pulseType, pulseTypeAttrs] = defineField('pulse-type')
+const [rightArmBp, rightArmBpAttrs] = defineField('right-arm-bp')
+const [leftArmBp, leftArmBpAttrs] = defineField('left-arm-bp')
+const [axillaryTemp, axillaryTempAttrs] = defineField('axillary-temp')
+const [rektalTemp, rektalTempAttrs] = defineField('rektal-temp')
+const [skin, skinAttrs] = defineField('skin')
+const [head, headAttrs] = defineField('head')
+const [ear, earAttrs] = defineField('ear')
+const [nose, noseAttrs] = defineField('nose')
+const [oralCavity, oralCavityAttrs] = defineField('oral-cavity')
+const [eye, eyeAttrs] = defineField('eye')
+const [otherBodyPart, otherBodyPartAttrs] = defineField('other-body-part')
+const [neck, neckAttrs] = defineField('neck')
+const [thyroid, thyroidAttrs] = defineField('thyroid')
+const [thorax, thoraxAttrs] = defineField('thorax')
+const [heart, heartAttrs] = defineField('heart')
+const [lung, lungAttrs] = defineField('lung')
+const [abdomen, abdomenAttrs] = defineField('abdomen')
+const [heart2, heart2Attrs] = defineField('heart2')
+const [lien, lienAttrs] = defineField('lien')
+const [back, backAttrs] = defineField('back')
+const [extremity, extremityAttrs] = defineField('extremity')
+const [gender, genderAttrs] = defineField('gender')
+const [rectum, rectumAttrs] = defineField('rectum')
+const [systemSyaraf, systemSyarafAttrs] = defineField('system-syaraf')
+const [nervousSystem, nervousSystemAttrs] = defineField('nervous-system')
+const [cardioRespiratory, cardioRespiratoryAttrs] = defineField('cardio-respiratory')
+const [imaging, imagingAttrs] = defineField('imaging')
+const [laboratory, laboratoryAttrs] = defineField('laboratory')
+
+const validate = async () => {
+ const result = await _validate()
+ console.log('Component validate() result:', result)
+
+ return {
+ valid: true,
+ data: result.values,
+ errors: result.errors,
+ }
+}
+
+defineExpose({ validate })
+
const isExcluded = (key: string) => props.excludeFields?.includes(key)
const disorders = ref([])
const therapies = ref([])
@@ -55,8 +119,11 @@ const therapyOptions = ['Terapi Latihan', 'Modalitas Fisik', 'Protesa/Ortosa', '
-
-
+
+
|
@@ -65,14 +132,20 @@ const therapyOptions = ['Terapi Latihan', 'Modalitas Fisik', 'Protesa/Ortosa', '
-
+
|
-
+
|
@@ -86,7 +159,7 @@ const therapyOptions = ['Terapi Latihan', 'Modalitas Fisik', 'Protesa/Ortosa', '
-
+
|
@@ -100,7 +173,10 @@ const therapyOptions = ['Terapi Latihan', 'Modalitas Fisik', 'Protesa/Ortosa', '
-
+
|
@@ -108,14 +184,20 @@ const therapyOptions = ['Terapi Latihan', 'Modalitas Fisik', 'Protesa/Ortosa', '
-
+
|
-
+
|
@@ -123,13 +205,19 @@ const therapyOptions = ['Terapi Latihan', 'Modalitas Fisik', 'Protesa/Ortosa', '
-
+
|
-
+
|
@@ -137,13 +225,19 @@ const therapyOptions = ['Terapi Latihan', 'Modalitas Fisik', 'Protesa/Ortosa', '
-
+
|
-
+
|
@@ -151,13 +245,19 @@ const therapyOptions = ['Terapi Latihan', 'Modalitas Fisik', 'Protesa/Ortosa', '
-
+
|
-
+
|
@@ -172,7 +272,10 @@ const therapyOptions = ['Terapi Latihan', 'Modalitas Fisik', 'Protesa/Ortosa', '
-
+
|
@@ -183,19 +286,28 @@ const therapyOptions = ['Terapi Latihan', 'Modalitas Fisik', 'Protesa/Ortosa', '
-
+
|
-
+
|
-
+
|
@@ -204,19 +316,28 @@ const therapyOptions = ['Terapi Latihan', 'Modalitas Fisik', 'Protesa/Ortosa', '
-
+
|
-
+
|
-
+
|
@@ -227,13 +348,19 @@ const therapyOptions = ['Terapi Latihan', 'Modalitas Fisik', 'Protesa/Ortosa', '
-
+
|
-
+
|
@@ -250,19 +377,28 @@ const therapyOptions = ['Terapi Latihan', 'Modalitas Fisik', 'Protesa/Ortosa', '
|
-
+
|
-
+
|
-
+
|
@@ -281,19 +417,28 @@ const therapyOptions = ['Terapi Latihan', 'Modalitas Fisik', 'Protesa/Ortosa', '
-
+
|
-
+
|
-
+
|
@@ -312,19 +457,28 @@ const therapyOptions = ['Terapi Latihan', 'Modalitas Fisik', 'Protesa/Ortosa', '
-
+
|
-
+
|
-
+
|
@@ -332,13 +486,19 @@ const therapyOptions = ['Terapi Latihan', 'Modalitas Fisik', 'Protesa/Ortosa', '
-
+
|
-
+
|
@@ -348,13 +508,19 @@ const therapyOptions = ['Terapi Latihan', 'Modalitas Fisik', 'Protesa/Ortosa', '
-
+
|
-
+
|
@@ -369,13 +535,19 @@ const therapyOptions = ['Terapi Latihan', 'Modalitas Fisik', 'Protesa/Ortosa', '
-
+
|
-
+
|
diff --git a/app/components/content/encounter/list.vue b/app/components/content/encounter/list.vue
index f218444a..fe229e7c 100644
--- a/app/components/content/encounter/list.vue
+++ b/app/components/content/encounter/list.vue
@@ -49,7 +49,7 @@ const refSearchNav: RefSearchNav = {
async function getPatientList() {
isLoading.isTableLoading = true
- const resp = await xfetch('/api/v1/encounter')
+ const resp = await xfetch('/api/v1/patient')
if (resp.success) {
data.value = (resp.body as Record).data
}
@@ -95,14 +95,22 @@ provide('table_data_loader', isLoading)
-
+
- | |