From fc308809b848512a664659a51475e634e08f06f4 Mon Sep 17 00:00:00 2001 From: hasyim_kai Date: Wed, 29 Oct 2025 14:57:19 +0700 Subject: [PATCH 1/5] Feat: add UI Rehab Medik > Proses > Resume --- .../app/resume/_common/select-arrangement.vue | 72 +++++++ .../app/resume/_common/select-date.vue | 121 ++++++++++++ .../app/resume/_common/select-death-cause.vue | 71 +++++++ .../app/resume/_common/select-faskes.vue | 70 +++++++ .../_common/select-primary-diagnosis.vue | 70 +++++++ .../_common/select-secondary-diagnosis.vue | 71 +++++++ app/components/app/resume/add.vue | 185 ++++++++++++++++++ app/components/app/resume/list.cfg.ts | 93 +++++++++ app/components/app/resume/list.vue | 43 ++++ app/components/content/encounter/process.vue | 3 +- app/components/content/resume/add.vue | 104 ++++++++++ app/components/content/resume/list.vue | 151 ++++++++++++++ .../pub/my-ui/form/text-area-input.vue | 86 ++++++++ .../pub/my-ui/nav-footer/ba-dr-su.vue | 3 +- app/pages/(features)/resume/add.vue | 41 ++++ app/schemas/resume.schema.ts | 42 ++++ 16 files changed, 1224 insertions(+), 2 deletions(-) create mode 100644 app/components/app/resume/_common/select-arrangement.vue create mode 100644 app/components/app/resume/_common/select-date.vue create mode 100644 app/components/app/resume/_common/select-death-cause.vue create mode 100644 app/components/app/resume/_common/select-faskes.vue create mode 100644 app/components/app/resume/_common/select-primary-diagnosis.vue create mode 100644 app/components/app/resume/_common/select-secondary-diagnosis.vue create mode 100644 app/components/app/resume/add.vue create mode 100644 app/components/app/resume/list.cfg.ts create mode 100644 app/components/app/resume/list.vue create mode 100644 app/components/content/resume/add.vue create mode 100644 app/components/content/resume/list.vue create mode 100644 app/components/pub/my-ui/form/text-area-input.vue create mode 100644 app/pages/(features)/resume/add.vue create mode 100644 app/schemas/resume.schema.ts diff --git a/app/components/app/resume/_common/select-arrangement.vue b/app/components/app/resume/_common/select-arrangement.vue new file mode 100644 index 00000000..9a945d44 --- /dev/null +++ b/app/components/app/resume/_common/select-arrangement.vue @@ -0,0 +1,72 @@ + + + diff --git a/app/components/app/resume/_common/select-date.vue b/app/components/app/resume/_common/select-date.vue new file mode 100644 index 00000000..74245e7e --- /dev/null +++ b/app/components/app/resume/_common/select-date.vue @@ -0,0 +1,121 @@ + + + diff --git a/app/components/app/resume/_common/select-death-cause.vue b/app/components/app/resume/_common/select-death-cause.vue new file mode 100644 index 00000000..a155b139 --- /dev/null +++ b/app/components/app/resume/_common/select-death-cause.vue @@ -0,0 +1,71 @@ + + + diff --git a/app/components/app/resume/_common/select-faskes.vue b/app/components/app/resume/_common/select-faskes.vue new file mode 100644 index 00000000..0852195b --- /dev/null +++ b/app/components/app/resume/_common/select-faskes.vue @@ -0,0 +1,70 @@ + + + diff --git a/app/components/app/resume/_common/select-primary-diagnosis.vue b/app/components/app/resume/_common/select-primary-diagnosis.vue new file mode 100644 index 00000000..0852195b --- /dev/null +++ b/app/components/app/resume/_common/select-primary-diagnosis.vue @@ -0,0 +1,70 @@ + + + diff --git a/app/components/app/resume/_common/select-secondary-diagnosis.vue b/app/components/app/resume/_common/select-secondary-diagnosis.vue new file mode 100644 index 00000000..a155b139 --- /dev/null +++ b/app/components/app/resume/_common/select-secondary-diagnosis.vue @@ -0,0 +1,71 @@ + + + diff --git a/app/components/app/resume/add.vue b/app/components/app/resume/add.vue new file mode 100644 index 00000000..2e12f872 --- /dev/null +++ b/app/components/app/resume/add.vue @@ -0,0 +1,185 @@ + + + diff --git a/app/components/app/resume/list.cfg.ts b/app/components/app/resume/list.cfg.ts new file mode 100644 index 00000000..38f8f5d7 --- /dev/null +++ b/app/components/app/resume/list.cfg.ts @@ -0,0 +1,93 @@ +import type { Config } from '~/components/pub/my-ui/data-table' +import type { Patient } from '~/models/patient' +import { defineAsyncComponent } from 'vue' +import { educationCodes, genderCodes } from '~/lib/constants' +import { calculateAge } from '~/lib/utils' + +const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-dud.vue')) + +export const config: Config = { + cols: [{}, {}, {}, {}, {width: 3},], + + headers: [ + [ + { label: 'Tgl Rencana Kontrol' }, + { label: 'Spesialis/Sub Spesialis' }, + { label: 'DPJP' }, + { label: 'Status SEP' }, + { label: 'Action' }, + ], + ], + + keys: ['birth_date', 'number', 'person.name', 'birth_date', 'action'], + + delKeyNames: [ + { key: 'code', label: 'Kode' }, + { key: 'name', label: 'Nama' }, + ], + + parses: { + patientId: (rec: unknown): unknown => { + const patient = rec as Patient + return patient.number + }, + identity_number: (rec: unknown): unknown => { + const { person } = rec as Patient + + if (person.nationality == 'WNA') { + return person.passportNumber + } + + return person.residentIdentityNumber || '-' + }, + birth_date: (rec: unknown): unknown => { + const { person } = rec as Patient + + if (typeof person.birthDate == 'object' && person.birthDate) { + return (person.birthDate as Date).toLocaleDateString('id-ID') + } else if (typeof person.birthDate == 'string') { + return (person.birthDate as string).substring(0, 10) + } + return person.birthDate + }, + patient_age: (rec: unknown): unknown => { + const { person } = rec as Patient + return calculateAge(person.birthDate) + }, + gender: (rec: unknown): unknown => { + const { person } = rec as Patient + + if (typeof person.gender_code == 'number' && person.gender_code >= 0) { + return person.gender_code + } else if (typeof person.gender_code === 'string' && person.gender_code) { + return genderCodes[person.gender_code] || '-' + } + return '-' + }, + education: (rec: unknown): unknown => { + const { person } = rec as Patient + if (typeof person.education_code == 'number' && person.education_code >= 0) { + return person.education_code + } else if (typeof person.education_code === 'string' && person.education_code) { + return educationCodes[person.education_code] || '-' + } + return '-' + }, + }, + + components: { + action(rec, idx) { + return { + idx, + rec: rec as object, + component: action, + } + }, + }, + + htmls: { + patient_address(_rec) { + return '-' + }, + }, +} diff --git a/app/components/app/resume/list.vue b/app/components/app/resume/list.vue new file mode 100644 index 00000000..c4c101e5 --- /dev/null +++ b/app/components/app/resume/list.vue @@ -0,0 +1,43 @@ + + + diff --git a/app/components/content/encounter/process.vue b/app/components/content/encounter/process.vue index 71c7fe3d..9b6308f2 100644 --- a/app/components/content/encounter/process.vue +++ b/app/components/content/encounter/process.vue @@ -16,6 +16,7 @@ import EarlyMedicalAssesmentList from '~/components/content/soapi/entry.vue' import EarlyMedicalRehabList from '~/components/content/soapi/entry.vue' import PrescriptionList from '~/components/content/prescription/list.vue' import Consultation from '~/components/content/consultation/list.vue' +import ResumeList from '~/components/content/resume/list.vue' const route = useRoute() const router = useRouter() @@ -58,7 +59,7 @@ const tabs: TabItem[] = [ { value: 'medical-action', label: 'Order Ruang Tindakan' }, { value: 'mcu-result', label: 'Hasil Penunjang' }, { value: 'consultation', label: 'Konsultasi', component: Consultation, props: { encounter: data } }, - { value: 'resume', label: 'Resume' }, + { value: 'resume', label: 'Resume', component: ResumeList, props: { encounter: data } }, { value: 'control', label: 'Surat Kontrol' }, { value: 'screening', label: 'Skrinning MPP' }, { value: 'supporting-document', label: 'Upload Dokumen Pendukung' }, diff --git a/app/components/content/resume/add.vue b/app/components/content/resume/add.vue new file mode 100644 index 00000000..6df169c6 --- /dev/null +++ b/app/components/content/resume/add.vue @@ -0,0 +1,104 @@ + + + diff --git a/app/components/content/resume/list.vue b/app/components/content/resume/list.vue new file mode 100644 index 00000000..5c5e3658 --- /dev/null +++ b/app/components/content/resume/list.vue @@ -0,0 +1,151 @@ + + + \ No newline at end of file diff --git a/app/components/pub/my-ui/form/text-area-input.vue b/app/components/pub/my-ui/form/text-area-input.vue new file mode 100644 index 00000000..7747e727 --- /dev/null +++ b/app/components/pub/my-ui/form/text-area-input.vue @@ -0,0 +1,86 @@ + + +