1fbd20d9ae
todo: manage state readonly ke komponen app prosedur pager-nav: scroll x on small screen form-schema: catatan opsional feat(treatment-report): add datetime validation and duration calculation - Change operator team fields from IDs to names in schema and form - Modify blood input schema to use type-based amount selection - Update form fields to match new schema structure - Simplify radio bloods component logic and styling - Add validation for ISO datetime format in treatment report schema - Implement duration calculation for operation and anesthesia times - Update input fields to use datetime-local type - Add disabled state for radio bloods component
95 lines
2.4 KiB
Vue
95 lines
2.4 KiB
Vue
<script setup lang="ts">
|
|
// type
|
|
import { genDoctor, type Doctor } from '~/models/doctor'
|
|
import type { TreatmentReportFormData } from '~/schemas/treatment-report.schema'
|
|
|
|
// components
|
|
import { toast } from '~/components/pub/ui/toast'
|
|
import AppTreatmentReportEntry from '~/components/app/treatment-report/entry-form.vue'
|
|
import ArrangementProcedurePicker from '~/components/app/therapy-protocol/picker-dialog/arrangement-procedure/procedure-picker.vue'
|
|
|
|
const doctors = ref<Doctor[]>([])
|
|
|
|
// TODO: dummy data
|
|
;(() => {
|
|
doctors.value = [genDoctor()]
|
|
})()
|
|
</script>
|
|
|
|
<template>
|
|
<AppTreatmentReportEntry
|
|
:isLoading="false"
|
|
@submit="(val) => console.log(val)"
|
|
@error="
|
|
(err: Error) => {
|
|
toast({
|
|
title: 'Terjadi Kesalahan',
|
|
description: err.message,
|
|
variant: 'destructive',
|
|
})
|
|
}
|
|
"
|
|
:doctors="doctors"
|
|
:initialValues="
|
|
{
|
|
operatorTeam: {
|
|
dpjpId: -1,
|
|
operatorName: 'Julian',
|
|
assistantOperatorName: 'Amar',
|
|
instrumentNurseName: 'Anang',
|
|
surgeryDate: '2025-11-13T14:29',
|
|
actionDiagnosis: 'Omon Omon Saja',
|
|
},
|
|
procedures: [
|
|
{
|
|
id: -1,
|
|
name: 'Ndase mumet',
|
|
code: 'CX1',
|
|
},
|
|
],
|
|
operationExecution: {
|
|
surgeryType: 'khusus',
|
|
billingCode: 'local',
|
|
operationSystem: 'cito',
|
|
surgeryCleanType: 'kotor',
|
|
surgeryNumber: 'retry',
|
|
birthPlaceNote: 'out3',
|
|
personWeight: 100,
|
|
operationDescription: 'asdsadsa1',
|
|
birthRemark: 'lahir_hidup',
|
|
},
|
|
bloodInput: {
|
|
type: 'tc',
|
|
amount: {
|
|
prc: null,
|
|
wb: null,
|
|
ffp: null,
|
|
tc: 3243324,
|
|
},
|
|
},
|
|
implant: {
|
|
brand: 'Samsung',
|
|
name: 'S.komedi',
|
|
companionName: 'When ya',
|
|
},
|
|
specimen: {
|
|
destination: 'pa',
|
|
},
|
|
tissueNotes: [
|
|
{
|
|
note: 'Anjai',
|
|
},
|
|
],
|
|
} as unknown as TreatmentReportFormData
|
|
"
|
|
>
|
|
<template #procedures>
|
|
<ArrangementProcedurePicker
|
|
field-name="procedures"
|
|
title="Tindakan Operatif/Non-Operatif Lain"
|
|
sub-title="Pilih Prosedur"
|
|
/>
|
|
</template>
|
|
</AppTreatmentReportEntry>
|
|
</template>
|