diff --git a/app/components/app/summary-medic/entry.vue b/app/components/app/summary-medic/entry.vue new file mode 100644 index 00000000..53dae0d0 --- /dev/null +++ b/app/components/app/summary-medic/entry.vue @@ -0,0 +1,145 @@ + + + + + + + + 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 02fc7495..2222c893 100644 --- a/app/components/content/encounter/process.vue +++ b/app/components/content/encounter/process.vue @@ -24,6 +24,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' @@ -76,6 +77,7 @@ const tabs: TabItem[] = [ { 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 } }, 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..511d2510 --- /dev/null +++ b/app/components/content/summary-medic/form.vue @@ -0,0 +1,185 @@ + + + + + + + + + + diff --git a/app/components/content/summary-medic/list.vue b/app/components/content/summary-medic/list.vue new file mode 100644 index 00000000..0961b1f6 --- /dev/null +++ b/app/components/content/summary-medic/list.vue @@ -0,0 +1,179 @@ + + + + + + + + + handleActionRemove(recId, getMyList, toast)" + @cancel="" + > + + + + ID: + {{ record?.id }} + + + Nama: + {{ record.name }} + + + Kode: + {{ record.code }} + + + + + 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/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 }} +