From 746d39ea146e71cf74b0569ed7c16e3b628254c5 Mon Sep 17 00:00:00 2001 From: Abizrh Date: Thu, 21 Aug 2025 06:31:17 +0700 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat=20(rehab):=20implement=20sep?= =?UTF-8?q?=20prosedur=20registration=20flow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../registration/sep-prosedur/entry-form.vue | 47 ++++++++ .../registration/sep-prosedur/list-cfg.ts | 112 ++++++++++++++++++ .../rehab/registration/sep-prosedur/list.vue | 19 +++ .../registration/sep-prosedur/picker.vue | 0 .../registration/sep-prosedur/search.vue | 0 .../flow/rehab/registration/home.vue | 57 +++++++++ .../rehab/registration/sep-prosedur/add.vue | 3 + .../rehab/registration/sep-prosedur/list.vue | 64 ++++++++++ .../rehab/registration-queue/index.vue | 4 +- .../registration-queue/sep-prosedur/add.vue | 40 +++++++ 10 files changed, 345 insertions(+), 1 deletion(-) create mode 100644 app/components/app/rehab/registration/sep-prosedur/entry-form.vue create mode 100644 app/components/app/rehab/registration/sep-prosedur/list-cfg.ts create mode 100644 app/components/app/rehab/registration/sep-prosedur/list.vue create mode 100644 app/components/app/rehab/registration/sep-prosedur/picker.vue create mode 100644 app/components/app/rehab/registration/sep-prosedur/search.vue create mode 100644 app/components/flow/rehab/registration/home.vue create mode 100644 app/components/flow/rehab/registration/sep-prosedur/add.vue create mode 100644 app/components/flow/rehab/registration/sep-prosedur/list.vue create mode 100644 app/pages/(features)/rehab/registration-queue/sep-prosedur/add.vue diff --git a/app/components/app/rehab/registration/sep-prosedur/entry-form.vue b/app/components/app/rehab/registration/sep-prosedur/entry-form.vue new file mode 100644 index 00000000..5768c6a0 --- /dev/null +++ b/app/components/app/rehab/registration/sep-prosedur/entry-form.vue @@ -0,0 +1,47 @@ + + + diff --git a/app/components/app/rehab/registration/sep-prosedur/list-cfg.ts b/app/components/app/rehab/registration/sep-prosedur/list-cfg.ts new file mode 100644 index 00000000..0e1fe7f4 --- /dev/null +++ b/app/components/app/rehab/registration/sep-prosedur/list-cfg.ts @@ -0,0 +1,112 @@ +import type { Col, KeyLabel, RecComponent, RecStrFuncComponent, RecStrFuncUnknown, Th } from '../../pub/nav/types' +import { defineAsyncComponent } from 'vue' + +type SmallDetailDto = any + +const action = defineAsyncComponent(() => import('~/components/pub/nav/dropdown-action-dud.vue')) + +export const cols: Col[] = [ + {}, + {}, + {}, + { width: 100 }, + { width: 120 }, + {}, + {}, + {}, + { width: 100 }, + { width: 100 }, + {}, + { width: 50 }, +] + +export const header: Th[][] = [ + [ + { label: 'Nama' }, + { label: 'Rekam Medis' }, + { label: 'KTP' }, + { label: 'Tgl Lahir' }, + { label: 'Umur' }, + { label: 'JK' }, + { label: 'Pendidikan' }, + { label: 'Status' }, + { label: '' }, + ], +] + +export const keys = [ + 'name', + 'medicalRecord_number', + 'identity_number', + 'birth_date', + 'patient_age', + 'gender', + 'education', + 'status', + 'action', +] + +export const delKeyNames: KeyLabel[] = [ + { key: 'code', label: 'Kode' }, + { key: 'name', label: 'Nama' }, +] + +export const funcParsed: RecStrFuncUnknown = { + name: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + return `${recX.firstName} ${recX.middleName || ''} ${recX.lastName || ''}` + }, + identity_number: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + if (recX.identity_number?.substring(0, 5) === 'BLANK') { + return '(TANPA NIK)' + } + return recX.identity_number + }, + birth_date: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + if (typeof recX.birth_date == 'object' && recX.birth_date) { + return (recX.birth_date as Date).toLocaleDateString() + } else if (typeof recX.birth_date == 'string') { + return (recX.birth_date as string).substring(0, 10) + } + return recX.birth_date + }, + patient_age: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + return recX.birth_date?.split('T')[0] + }, + gender: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + if (typeof recX?.gender_code !== 'number' && recX?.gender_code !== '') { + return 'Tidak Diketahui' + } + return recX.gender_code + }, + education: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + if (typeof recX.education_code == 'number' && recX.education_code >= 0) { + return recX.education_code + } else if (typeof recX.education_code) { + return recX.education_code + } + return '-' + }, +} + +export const funcComponent: RecStrFuncComponent = { + action(rec, idx) { + const res: RecComponent = { + idx, + rec: rec as object, + component: action, + } + return res + }, +} + +export const funcHtml: RecStrFuncUnknown = { + patient_address(_rec) { + return '-' + }, +} diff --git a/app/components/app/rehab/registration/sep-prosedur/list.vue b/app/components/app/rehab/registration/sep-prosedur/list.vue new file mode 100644 index 00000000..5b8778d9 --- /dev/null +++ b/app/components/app/rehab/registration/sep-prosedur/list.vue @@ -0,0 +1,19 @@ + + + diff --git a/app/components/app/rehab/registration/sep-prosedur/picker.vue b/app/components/app/rehab/registration/sep-prosedur/picker.vue new file mode 100644 index 00000000..e69de29b diff --git a/app/components/app/rehab/registration/sep-prosedur/search.vue b/app/components/app/rehab/registration/sep-prosedur/search.vue new file mode 100644 index 00000000..e69de29b diff --git a/app/components/flow/rehab/registration/home.vue b/app/components/flow/rehab/registration/home.vue new file mode 100644 index 00000000..7fe1e669 --- /dev/null +++ b/app/components/flow/rehab/registration/home.vue @@ -0,0 +1,57 @@ + + + + + diff --git a/app/components/flow/rehab/registration/sep-prosedur/add.vue b/app/components/flow/rehab/registration/sep-prosedur/add.vue new file mode 100644 index 00000000..128cf74a --- /dev/null +++ b/app/components/flow/rehab/registration/sep-prosedur/add.vue @@ -0,0 +1,3 @@ + diff --git a/app/components/flow/rehab/registration/sep-prosedur/list.vue b/app/components/flow/rehab/registration/sep-prosedur/list.vue new file mode 100644 index 00000000..fa4c029e --- /dev/null +++ b/app/components/flow/rehab/registration/sep-prosedur/list.vue @@ -0,0 +1,64 @@ + + + +/template> diff --git a/app/pages/(features)/rehab/registration-queue/index.vue b/app/pages/(features)/rehab/registration-queue/index.vue index 053b5233..d06e73ad 100644 --- a/app/pages/(features)/rehab/registration-queue/index.vue +++ b/app/pages/(features)/rehab/registration-queue/index.vue @@ -1,3 +1,5 @@ + + diff --git a/app/pages/(features)/rehab/registration-queue/sep-prosedur/add.vue b/app/pages/(features)/rehab/registration-queue/sep-prosedur/add.vue new file mode 100644 index 00000000..368b4f40 --- /dev/null +++ b/app/pages/(features)/rehab/registration-queue/sep-prosedur/add.vue @@ -0,0 +1,40 @@ + + +