diff --git a/app/components/app/summary-medic/entry.vue b/app/components/app/summary-medic/entry.vue new file mode 100644 index 00000000..f75e918e --- /dev/null +++ b/app/components/app/summary-medic/entry.vue @@ -0,0 +1,147 @@ + + + + + + + + Tanggal + + + + + + Dokter + + + + + + + + Diagnosis Penting + + + + + + Uraian Klinik Penting + + + + + + + + Rencana Penting + + + + + + Catatan + + + + + + + + + + diff --git a/app/components/app/summary-medic/list.cfg.ts b/app/components/app/summary-medic/list.cfg.ts new file mode 100644 index 00000000..c2f57c54 --- /dev/null +++ b/app/components/app/summary-medic/list.cfg.ts @@ -0,0 +1,82 @@ +import type { Config, RecComponent, RecStrFuncComponent, RecStrFuncUnknown } from '~/components/pub/my-ui/data-table' +import { defineAsyncComponent } from 'vue' +import type { GeneralConsent } from '~/models/general-consent' + +type SmallDetailDto = any + +const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-ud.vue')) +export const config: Config = { + cols: [{ width: 100 }, {}, {}, {}, { width: 50 }], + headers: [ + [ + { label: 'Tanggal' }, + { label: 'Anggota Keluarga' }, + { label: 'Penanggung Jawab' }, + { label: 'Pemberi Informasi' }, + { label: 'Saksi 1' }, + { label: 'Saksi 2' }, + { label: '' }, + ], + ], + keys: ['date', 'relatives', 'responsible', 'informant', 'witness1', 'witness2', 'action'], + delKeyNames: [ + { key: 'data', label: 'Tanggal' }, + { key: 'dstDoctor.name', label: 'Dokter' }, + ], + parses: { + date(rec) { + const recX = rec as GeneralConsent + return recX?.createdAt?.substring(0, 10) || '-' + }, + relatives(rec) { + const recX = rec as GeneralConsent + const parsed = JSON.parse(recX?.value || '{}') + return parsed?.relatives?.join(', ') || '-' + }, + responsible(rec) { + const recX = rec as GeneralConsent + const parsed = JSON.parse(recX?.value || '{}') + return parsed?.responsible || '-' + }, + informant(rec) { + const recX = rec as GeneralConsent + const parsed = JSON.parse(recX?.value || '{}') + return parsed?.informant || '-' + }, + witness1(rec) { + const recX = rec as GeneralConsent + const parsed = JSON.parse(recX?.value || '{}') + return parsed?.witness1 || '-' + }, + witness2(rec) { + const recX = rec as GeneralConsent + const parsed = JSON.parse(recX?.value || '{}') + return parsed?.witness2 || '-' + }, + action(rec, idx) { + const res: RecComponent = { + idx, + rec: rec as object, + component: action, + props: { + size: 'sm', + }, + } + return res + }, + }, + components: { + action(rec, idx) { + const res: RecComponent = { + idx, + rec: rec as object, + component: action, + props: { + size: 'sm', + }, + } + return res + }, + } as RecStrFuncComponent, + htmls: {} as RecStrFuncUnknown, +} diff --git a/app/components/app/summary-medic/list.vue b/app/components/app/summary-medic/list.vue new file mode 100644 index 00000000..46f595f5 --- /dev/null +++ b/app/components/app/summary-medic/list.vue @@ -0,0 +1,34 @@ + + + + + + + + + diff --git a/app/components/content/encounter/process.vue b/app/components/content/encounter/process.vue index fcfc3671..58b26000 100644 --- a/app/components/content/encounter/process.vue +++ b/app/components/content/encounter/process.vue @@ -31,6 +31,7 @@ import Consultation from '~/components/content/consultation/list.vue' import Cprj from '~/components/content/cprj/entry.vue' import DocUploadList from '~/components/content/document-upload/list.vue' import GeneralConsentList from '~/components/content/general-consent/entry.vue' +import SummaryMedic from '~/components/content/summary-medic/entry.vue' import ResumeList from '~/components/content/resume/list.vue' import ControlLetterList from '~/components/content/control-letter/list.vue' import InitialNursingStudy from '~/components/content/initial-nursing/entry.vue' @@ -101,6 +102,13 @@ const protocolRows = [ { value: 'therapy-protocol', label: 'Protokol Terapi' }, { value: 'education-assessment', label: 'Asesmen Kebutuhan Edukasi' }, { value: 'patient-note', label: 'CPRJ', component: Cprj, props: { encounter: data } }, + { value: 'summary-medic', label: 'Profil Ringkasan Medis', component: SummaryMedic, props: { encounter: data } }, + { value: 'consent', label: 'General Consent', component: GeneralConsentList, props: { encounter: data } }, + { value: 'prescription', label: 'Order Obat', component: Prescription, props: { encounter_id: data.value.id } }, + { value: 'device-order', label: 'Order Alkes', component: DeviceOrder, props: { encounter_id: data.value.id } }, + { value: 'device', label: 'Order Alkes' }, + { value: 'mcu-radiology', label: 'Order Radiologi', component: Radiology, props: { encounter_id: data.id } }, + { value: 'mcu-lab-cp', label: 'Order Lab PK', component: CpLabOrder, props: { encounter_id: data.id } }, { value: 'consent', label: 'General Consent', component: GeneralConsentList, props: { encounter: data } }, { value: 'initial-nursing-study', @@ -108,11 +116,6 @@ const protocolRows = [ component: InitialNursingStudy, props: { encounter: data }, }, - { value: 'prescription', label: 'Order Obat', component: Prescription, props: { encounter_id: data.value.id } }, - { value: 'device-order', label: 'Order Alkes', component: DeviceOrder, props: { encounter_id: data.value.id } }, - { value: 'device', label: 'Order Alkes' }, - { value: 'mcu-radiology', label: 'Order Radiologi', component: Radiology, props: { encounter_id: data.value.id } }, - { value: 'mcu-lab-cp', label: 'Order Lab PK', component: CpLabOrder, props: { encounter_id: data.value.id } }, { value: 'mcu-lab-micro', label: 'Order Lab Mikro' }, { value: 'mcu-lab-pa', label: 'Order Lab PA' }, { value: 'medical-action', label: 'Order Ruang Tindakan' }, @@ -208,4 +211,4 @@ async function getData() { :can-delete="canDelete" /> - + \ No newline at end of file diff --git a/app/components/content/summary-medic/entry.vue b/app/components/content/summary-medic/entry.vue new file mode 100644 index 00000000..5769e967 --- /dev/null +++ b/app/components/content/summary-medic/entry.vue @@ -0,0 +1,36 @@ + + + + + + + + diff --git a/app/components/content/summary-medic/form.vue b/app/components/content/summary-medic/form.vue new file mode 100644 index 00000000..998270d9 --- /dev/null +++ b/app/components/content/summary-medic/form.vue @@ -0,0 +1,163 @@ + + + + + + + + + + diff --git a/app/components/content/summary-medic/list.vue b/app/components/content/summary-medic/list.vue new file mode 100644 index 00000000..5d7d3117 --- /dev/null +++ b/app/components/content/summary-medic/list.vue @@ -0,0 +1,185 @@ + + + + + + + + + handleActionRemove(recId, getMyList, toast)" + @cancel="" + > + + + + ID: + {{ record?.id }} + + + Nama: + {{ record.name }} + + + Kode: + {{ record.code }} + + + + + diff --git a/app/handlers/encounter-init.handler.ts b/app/handlers/encounter-init.handler.ts index 99eccfef..d70db428 100644 --- a/app/handlers/encounter-init.handler.ts +++ b/app/handlers/encounter-init.handler.ts @@ -54,6 +54,7 @@ const PrbListAsync = defineAsyncComponent(() => import('~/components/content/prb const SurgeryReportListAsync = defineAsyncComponent(() => import('~/components/content/surgery-report/main.vue')) const VaccineDataListAsync = defineAsyncComponent(() => import('~/components/content/vaccine-data/main.vue')) const InitialNursingStudyAsync = defineAsyncComponent(() => import('~/components/content/initial-nursing/entry.vue')) +const SummaryMedicAsync = defineAsyncComponent(() => import('~/components/content/summary-medic/entry.vue')) const defaultKeys: Record = { status: { @@ -262,6 +263,12 @@ const defaultKeys: Record = { classCode: ['ambulatory', 'emergency', 'inpatient'], unit: 'all', }, + summaryMedic: { + id: 'summary-medic', + title: 'Profil Ringkasan Medis', + classCode: ['ambulatory', 'emergency', 'inpatient'], + unit: 'all', + }, initialNursingStudy: { id: 'initial-nursing-study', title: 'Kajian Awal Keperawatan', @@ -441,7 +448,10 @@ export function injectComponents(id: string | number, data: EncounterListData, m currentKeys.priceList['component'] = null currentKeys.priceList['props'] = { encounter_id: id } } - + if (currentKeys?.summaryMedic) { + currentKeys.summaryMedic['component'] = SummaryMedicAsync + currentKeys.summaryMedic['props'] = { encounter_id: id } + } if (currentKeys?.initialNursingStudy) { currentKeys.initialNursingStudy['component'] = InitialNursingStudyAsync currentKeys.initialNursingStudy['props'] = { encounter: data?.encounter } diff --git a/app/handlers/summary-medic.handler.ts b/app/handlers/summary-medic.handler.ts new file mode 100644 index 00000000..50e404a7 --- /dev/null +++ b/app/handlers/summary-medic.handler.ts @@ -0,0 +1,24 @@ +// Handlers +import { genCrudHandler } from '~/handlers/_handler' + +// Services +import { create, update, remove } from '~/services/summary-medic.service' + +export const { + recId, + recAction, + recItem, + isReadonly, + isProcessing, + isFormEntryDialogOpen, + isRecordConfirmationOpen, + onResetState, + handleActionSave, + handleActionEdit, + handleActionRemove, + handleCancelForm, +} = genCrudHandler({ + create, + update, + remove, +}) diff --git a/app/schemas/soapi.schema.ts b/app/schemas/soapi.schema.ts index 1d4faaba..73a43814 100644 --- a/app/schemas/soapi.schema.ts +++ b/app/schemas/soapi.schema.ts @@ -153,6 +153,15 @@ export const ObjectSchema = z.object({ 'head-to-toe': z.record(z.string()).default({}), }) +export const SummaryMedicSchema = z.object({ + date: z.string().default(''), + doctor: z.string().default(''), + diagnosis: z.string().default(''), + essay: z.string().default(''), + plan: z.string().default(''), + note: z.string().default(''), +}) + export const InitialNursingSchema = z.object({ 'pri-complain': z.string().default(''), 'med-type': z.string().default(''), diff --git a/app/services/summary-medic.service.ts b/app/services/summary-medic.service.ts new file mode 100644 index 00000000..2a6611fc --- /dev/null +++ b/app/services/summary-medic.service.ts @@ -0,0 +1,23 @@ +import * as base from './_crud-base' + +const path = '/api/v1/general-consent' + +export function create(data: any) { + return base.create(path, data) +} + +export function getList(params: any = null) { + return base.getList(path, params) +} + +export function getDetail(id: number | string) { + return base.getDetail(path, id) +} + +export function update(id: number | string, data: any) { + return base.update(path, id, data) +} + +export function remove(id: number | string) { + return base.remove(path, id) +}
+ ID: + {{ record?.id }} +
+ Nama: + {{ record.name }} +
+ Kode: + {{ record.code }} +