From 38e40416d3122524461d96ff11bb6572c8e0e4e5 Mon Sep 17 00:00:00 2001 From: Abizrh Date: Wed, 3 Sep 2025 20:33:19 +0700 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat=20(medicine):=20add=20medicine?= =?UTF-8?q?=20management=20modules?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/medicine-group/entry-form.vue | 90 +++++++++++++ app/components/app/medicine-group/list-cfg.ts | 114 +++++++++++++++++ app/components/app/medicine-group/list.vue | 19 +++ app/components/app/medicine-group/picker.vue | 0 app/components/app/medicine-group/search.vue | 0 .../app/medicine-group/status-badge.vue | 29 +++++ .../app/medicine-method/entry-form.vue | 90 +++++++++++++ .../app/medicine-method/list-cfg.ts | 114 +++++++++++++++++ app/components/app/medicine-method/list.vue | 19 +++ app/components/app/medicine-method/picker.vue | 0 app/components/app/medicine-method/search.vue | 0 .../app/medicine-method/status-badge.vue | 29 +++++ app/components/app/medicine/entry-form.vue | 90 +++++++++++++ app/components/app/medicine/list-cfg.ts | 114 +++++++++++++++++ app/components/app/medicine/list.vue | 19 +++ app/components/app/medicine/picker.vue | 0 app/components/app/medicine/search.vue | 0 app/components/app/medicine/status-badge.vue | 29 +++++ app/components/flow/medicine-group/add.vue | 9 ++ app/components/flow/medicine-group/list.vue | 121 ++++++++++++++++++ app/components/flow/medicine-method/add.vue | 9 ++ app/components/flow/medicine-method/list.vue | 121 ++++++++++++++++++ app/components/flow/medicine/entry.vue | 9 ++ app/components/flow/medicine/list.vue | 121 ++++++++++++++++++ .../medicine-method/index.vue | 40 ++++++ .../medicine-type/index.vue | 40 ++++++ .../medicine/[id]/edit.vue | 41 ++++++ .../tools-equipment-src/medicine/add.vue | 41 ++++++ .../tools-equipment-src/medicine/index.vue | 40 ++++++ 29 files changed, 1348 insertions(+) create mode 100644 app/components/app/medicine-group/entry-form.vue create mode 100644 app/components/app/medicine-group/list-cfg.ts create mode 100644 app/components/app/medicine-group/list.vue create mode 100644 app/components/app/medicine-group/picker.vue create mode 100644 app/components/app/medicine-group/search.vue create mode 100644 app/components/app/medicine-group/status-badge.vue create mode 100644 app/components/app/medicine-method/entry-form.vue create mode 100644 app/components/app/medicine-method/list-cfg.ts create mode 100644 app/components/app/medicine-method/list.vue create mode 100644 app/components/app/medicine-method/picker.vue create mode 100644 app/components/app/medicine-method/search.vue create mode 100644 app/components/app/medicine-method/status-badge.vue create mode 100644 app/components/app/medicine/entry-form.vue create mode 100644 app/components/app/medicine/list-cfg.ts create mode 100644 app/components/app/medicine/list.vue create mode 100644 app/components/app/medicine/picker.vue create mode 100644 app/components/app/medicine/search.vue create mode 100644 app/components/app/medicine/status-badge.vue create mode 100644 app/components/flow/medicine-group/add.vue create mode 100644 app/components/flow/medicine-group/list.vue create mode 100644 app/components/flow/medicine-method/add.vue create mode 100644 app/components/flow/medicine-method/list.vue create mode 100644 app/components/flow/medicine/entry.vue create mode 100644 app/components/flow/medicine/list.vue create mode 100644 app/pages/(features)/tools-equipment-src/medicine-method/index.vue create mode 100644 app/pages/(features)/tools-equipment-src/medicine-type/index.vue create mode 100644 app/pages/(features)/tools-equipment-src/medicine/[id]/edit.vue create mode 100644 app/pages/(features)/tools-equipment-src/medicine/add.vue create mode 100644 app/pages/(features)/tools-equipment-src/medicine/index.vue diff --git a/app/components/app/medicine-group/entry-form.vue b/app/components/app/medicine-group/entry-form.vue new file mode 100644 index 00000000..5aec1ba3 --- /dev/null +++ b/app/components/app/medicine-group/entry-form.vue @@ -0,0 +1,90 @@ + + + diff --git a/app/components/app/medicine-group/list-cfg.ts b/app/components/app/medicine-group/list-cfg.ts new file mode 100644 index 00000000..0cff0cce --- /dev/null +++ b/app/components/app/medicine-group/list-cfg.ts @@ -0,0 +1,114 @@ +import type { + Col, + KeyLabel, + RecComponent, + RecStrFuncComponent, + RecStrFuncUnknown, + Th, +} from '~/components/pub/custom-ui/data/types' +import { defineAsyncComponent } from 'vue' + +type SmallDetailDto = any + +const action = defineAsyncComponent(() => import('~/components/pub/custom-ui/data/dropdown-action-dud.vue')) +const statusBadge = defineAsyncComponent(() => import('./status-badge.vue')) + +const _doctorStatus = { + 0: 'Tidak Aktif', + 1: 'Aktif', +} + +export const cols: Col[] = [ + { width: 100 }, + { width: 250 }, + {}, + { width: 100 }, + { width: 100 }, + {}, + {}, + {}, + { width: 120 }, + { width: 100 }, + {}, + {}, +] + +export const header: Th[][] = [ + [ + { label: 'Kode JKN' }, + { label: 'Nama' }, + { label: 'No KTP' }, + { label: 'No SIP' }, + { label: 'No IHS' }, + { label: 'Telpon' }, + { label: 'Fee Ranap' }, + { label: 'Fee Rajal' }, + { label: 'Status' }, + { label: '' }, + ], +] + +export const keys = [ + 'bpjs_code', + 'name', + 'identity_number', + 'sip_no', + 'ihs_number', + 'phone', + 'inPatient_itemPrice', + 'outPatient_itemPrice', + '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.frontTitle} ${recX.name} ${recX.endTitle}`.trim() + }, + 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 + }, + inPatient_itemPrice: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + return Number(recX.inPatient_itemPrice.price).toLocaleString('id-ID') + }, + outPatient_itemPrice: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + return Number(recX.outPatient_itemPrice.price).toLocaleString('id-ID') + }, +} + +export const funcComponent: RecStrFuncComponent = { + action(rec, idx) { + const res: RecComponent = { + idx, + rec: rec as object, + component: action, + } + return res + }, + status(rec, idx) { + const res: RecComponent = { + idx, + rec: rec as object, + component: statusBadge, + } + return res + }, +} + +export const funcHtml: RecStrFuncUnknown = { + patient_address(_rec) { + return '-' + }, +} diff --git a/app/components/app/medicine-group/list.vue b/app/components/app/medicine-group/list.vue new file mode 100644 index 00000000..5b8778d9 --- /dev/null +++ b/app/components/app/medicine-group/list.vue @@ -0,0 +1,19 @@ + + + diff --git a/app/components/app/medicine-group/picker.vue b/app/components/app/medicine-group/picker.vue new file mode 100644 index 00000000..e69de29b diff --git a/app/components/app/medicine-group/search.vue b/app/components/app/medicine-group/search.vue new file mode 100644 index 00000000..e69de29b diff --git a/app/components/app/medicine-group/status-badge.vue b/app/components/app/medicine-group/status-badge.vue new file mode 100644 index 00000000..32cdfbca --- /dev/null +++ b/app/components/app/medicine-group/status-badge.vue @@ -0,0 +1,29 @@ + + + diff --git a/app/components/app/medicine-method/entry-form.vue b/app/components/app/medicine-method/entry-form.vue new file mode 100644 index 00000000..5aec1ba3 --- /dev/null +++ b/app/components/app/medicine-method/entry-form.vue @@ -0,0 +1,90 @@ + + + diff --git a/app/components/app/medicine-method/list-cfg.ts b/app/components/app/medicine-method/list-cfg.ts new file mode 100644 index 00000000..0cff0cce --- /dev/null +++ b/app/components/app/medicine-method/list-cfg.ts @@ -0,0 +1,114 @@ +import type { + Col, + KeyLabel, + RecComponent, + RecStrFuncComponent, + RecStrFuncUnknown, + Th, +} from '~/components/pub/custom-ui/data/types' +import { defineAsyncComponent } from 'vue' + +type SmallDetailDto = any + +const action = defineAsyncComponent(() => import('~/components/pub/custom-ui/data/dropdown-action-dud.vue')) +const statusBadge = defineAsyncComponent(() => import('./status-badge.vue')) + +const _doctorStatus = { + 0: 'Tidak Aktif', + 1: 'Aktif', +} + +export const cols: Col[] = [ + { width: 100 }, + { width: 250 }, + {}, + { width: 100 }, + { width: 100 }, + {}, + {}, + {}, + { width: 120 }, + { width: 100 }, + {}, + {}, +] + +export const header: Th[][] = [ + [ + { label: 'Kode JKN' }, + { label: 'Nama' }, + { label: 'No KTP' }, + { label: 'No SIP' }, + { label: 'No IHS' }, + { label: 'Telpon' }, + { label: 'Fee Ranap' }, + { label: 'Fee Rajal' }, + { label: 'Status' }, + { label: '' }, + ], +] + +export const keys = [ + 'bpjs_code', + 'name', + 'identity_number', + 'sip_no', + 'ihs_number', + 'phone', + 'inPatient_itemPrice', + 'outPatient_itemPrice', + '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.frontTitle} ${recX.name} ${recX.endTitle}`.trim() + }, + 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 + }, + inPatient_itemPrice: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + return Number(recX.inPatient_itemPrice.price).toLocaleString('id-ID') + }, + outPatient_itemPrice: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + return Number(recX.outPatient_itemPrice.price).toLocaleString('id-ID') + }, +} + +export const funcComponent: RecStrFuncComponent = { + action(rec, idx) { + const res: RecComponent = { + idx, + rec: rec as object, + component: action, + } + return res + }, + status(rec, idx) { + const res: RecComponent = { + idx, + rec: rec as object, + component: statusBadge, + } + return res + }, +} + +export const funcHtml: RecStrFuncUnknown = { + patient_address(_rec) { + return '-' + }, +} diff --git a/app/components/app/medicine-method/list.vue b/app/components/app/medicine-method/list.vue new file mode 100644 index 00000000..5b8778d9 --- /dev/null +++ b/app/components/app/medicine-method/list.vue @@ -0,0 +1,19 @@ + + + diff --git a/app/components/app/medicine-method/picker.vue b/app/components/app/medicine-method/picker.vue new file mode 100644 index 00000000..e69de29b diff --git a/app/components/app/medicine-method/search.vue b/app/components/app/medicine-method/search.vue new file mode 100644 index 00000000..e69de29b diff --git a/app/components/app/medicine-method/status-badge.vue b/app/components/app/medicine-method/status-badge.vue new file mode 100644 index 00000000..32cdfbca --- /dev/null +++ b/app/components/app/medicine-method/status-badge.vue @@ -0,0 +1,29 @@ + + + diff --git a/app/components/app/medicine/entry-form.vue b/app/components/app/medicine/entry-form.vue new file mode 100644 index 00000000..5aec1ba3 --- /dev/null +++ b/app/components/app/medicine/entry-form.vue @@ -0,0 +1,90 @@ + + + diff --git a/app/components/app/medicine/list-cfg.ts b/app/components/app/medicine/list-cfg.ts new file mode 100644 index 00000000..0cff0cce --- /dev/null +++ b/app/components/app/medicine/list-cfg.ts @@ -0,0 +1,114 @@ +import type { + Col, + KeyLabel, + RecComponent, + RecStrFuncComponent, + RecStrFuncUnknown, + Th, +} from '~/components/pub/custom-ui/data/types' +import { defineAsyncComponent } from 'vue' + +type SmallDetailDto = any + +const action = defineAsyncComponent(() => import('~/components/pub/custom-ui/data/dropdown-action-dud.vue')) +const statusBadge = defineAsyncComponent(() => import('./status-badge.vue')) + +const _doctorStatus = { + 0: 'Tidak Aktif', + 1: 'Aktif', +} + +export const cols: Col[] = [ + { width: 100 }, + { width: 250 }, + {}, + { width: 100 }, + { width: 100 }, + {}, + {}, + {}, + { width: 120 }, + { width: 100 }, + {}, + {}, +] + +export const header: Th[][] = [ + [ + { label: 'Kode JKN' }, + { label: 'Nama' }, + { label: 'No KTP' }, + { label: 'No SIP' }, + { label: 'No IHS' }, + { label: 'Telpon' }, + { label: 'Fee Ranap' }, + { label: 'Fee Rajal' }, + { label: 'Status' }, + { label: '' }, + ], +] + +export const keys = [ + 'bpjs_code', + 'name', + 'identity_number', + 'sip_no', + 'ihs_number', + 'phone', + 'inPatient_itemPrice', + 'outPatient_itemPrice', + '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.frontTitle} ${recX.name} ${recX.endTitle}`.trim() + }, + 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 + }, + inPatient_itemPrice: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + return Number(recX.inPatient_itemPrice.price).toLocaleString('id-ID') + }, + outPatient_itemPrice: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + return Number(recX.outPatient_itemPrice.price).toLocaleString('id-ID') + }, +} + +export const funcComponent: RecStrFuncComponent = { + action(rec, idx) { + const res: RecComponent = { + idx, + rec: rec as object, + component: action, + } + return res + }, + status(rec, idx) { + const res: RecComponent = { + idx, + rec: rec as object, + component: statusBadge, + } + return res + }, +} + +export const funcHtml: RecStrFuncUnknown = { + patient_address(_rec) { + return '-' + }, +} diff --git a/app/components/app/medicine/list.vue b/app/components/app/medicine/list.vue new file mode 100644 index 00000000..5b8778d9 --- /dev/null +++ b/app/components/app/medicine/list.vue @@ -0,0 +1,19 @@ + + + diff --git a/app/components/app/medicine/picker.vue b/app/components/app/medicine/picker.vue new file mode 100644 index 00000000..e69de29b diff --git a/app/components/app/medicine/search.vue b/app/components/app/medicine/search.vue new file mode 100644 index 00000000..e69de29b diff --git a/app/components/app/medicine/status-badge.vue b/app/components/app/medicine/status-badge.vue new file mode 100644 index 00000000..32cdfbca --- /dev/null +++ b/app/components/app/medicine/status-badge.vue @@ -0,0 +1,29 @@ + + + diff --git a/app/components/flow/medicine-group/add.vue b/app/components/flow/medicine-group/add.vue new file mode 100644 index 00000000..fd42e0a6 --- /dev/null +++ b/app/components/flow/medicine-group/add.vue @@ -0,0 +1,9 @@ + + + diff --git a/app/components/flow/medicine-group/list.vue b/app/components/flow/medicine-group/list.vue new file mode 100644 index 00000000..7c849395 --- /dev/null +++ b/app/components/flow/medicine-group/list.vue @@ -0,0 +1,121 @@ + + + diff --git a/app/components/flow/medicine-method/add.vue b/app/components/flow/medicine-method/add.vue new file mode 100644 index 00000000..fd42e0a6 --- /dev/null +++ b/app/components/flow/medicine-method/add.vue @@ -0,0 +1,9 @@ + + + diff --git a/app/components/flow/medicine-method/list.vue b/app/components/flow/medicine-method/list.vue new file mode 100644 index 00000000..7c849395 --- /dev/null +++ b/app/components/flow/medicine-method/list.vue @@ -0,0 +1,121 @@ + + + diff --git a/app/components/flow/medicine/entry.vue b/app/components/flow/medicine/entry.vue new file mode 100644 index 00000000..fd42e0a6 --- /dev/null +++ b/app/components/flow/medicine/entry.vue @@ -0,0 +1,9 @@ + + + diff --git a/app/components/flow/medicine/list.vue b/app/components/flow/medicine/list.vue new file mode 100644 index 00000000..7c849395 --- /dev/null +++ b/app/components/flow/medicine/list.vue @@ -0,0 +1,121 @@ + + + diff --git a/app/pages/(features)/tools-equipment-src/medicine-method/index.vue b/app/pages/(features)/tools-equipment-src/medicine-method/index.vue new file mode 100644 index 00000000..1b080470 --- /dev/null +++ b/app/pages/(features)/tools-equipment-src/medicine-method/index.vue @@ -0,0 +1,40 @@ + + + diff --git a/app/pages/(features)/tools-equipment-src/medicine-type/index.vue b/app/pages/(features)/tools-equipment-src/medicine-type/index.vue new file mode 100644 index 00000000..db352cb4 --- /dev/null +++ b/app/pages/(features)/tools-equipment-src/medicine-type/index.vue @@ -0,0 +1,40 @@ + + + diff --git a/app/pages/(features)/tools-equipment-src/medicine/[id]/edit.vue b/app/pages/(features)/tools-equipment-src/medicine/[id]/edit.vue new file mode 100644 index 00000000..9c1697fc --- /dev/null +++ b/app/pages/(features)/tools-equipment-src/medicine/[id]/edit.vue @@ -0,0 +1,41 @@ + + + diff --git a/app/pages/(features)/tools-equipment-src/medicine/add.vue b/app/pages/(features)/tools-equipment-src/medicine/add.vue new file mode 100644 index 00000000..9c1697fc --- /dev/null +++ b/app/pages/(features)/tools-equipment-src/medicine/add.vue @@ -0,0 +1,41 @@ + + + diff --git a/app/pages/(features)/tools-equipment-src/medicine/index.vue b/app/pages/(features)/tools-equipment-src/medicine/index.vue new file mode 100644 index 00000000..877b5c78 --- /dev/null +++ b/app/pages/(features)/tools-equipment-src/medicine/index.vue @@ -0,0 +1,40 @@ + + +