diff --git a/app/components/app/division-position/entry.vue b/app/components/app/division-position/entry.vue new file mode 100644 index 00000000..da4782c0 --- /dev/null +++ b/app/components/app/division-position/entry.vue @@ -0,0 +1,192 @@ + + + diff --git a/app/components/app/division-position/list-cfg.ts b/app/components/app/division-position/list-cfg.ts index e35627d2..cc153cc5 100644 --- a/app/components/app/division-position/list-cfg.ts +++ b/app/components/app/division-position/list-cfg.ts @@ -1,5 +1,6 @@ import type { Config, RecComponent } from '~/components/pub/my-ui/data-table' import { defineAsyncComponent } from 'vue' +import type { DivisionPosition } from '~/models/division-position' type SmallDetailDto = any @@ -10,9 +11,9 @@ export const config: Config = { headers: [ [ - { label: 'Kode' }, - { label: 'Nama' }, - { label: 'Divisi Induk' }, + { label: 'Kode Posisi' }, + { label: 'Nama Posisi' }, + { label: 'Nama Divisi ' }, { label: 'Karyawan' }, { label: 'Status Kepala' }, { label: '' }, @@ -32,8 +33,13 @@ export const config: Config = { return recX.division?.name || '-' }, employee: (rec: unknown): unknown => { - const recX = rec as SmallDetailDto - return recX.employee?.name || '-' + const recX = rec as DivisionPosition + const fullName = [recX.employee?.person.frontTitle, recX.employee?.person.name, recX.employee?.person.endTitle] + .filter(Boolean) + .join(' ') + .trim() + + return fullName || '-' }, head: (rec: unknown): unknown => { const recX = rec as SmallDetailDto diff --git a/app/components/app/division/detail/index.vue b/app/components/app/division/detail/index.vue new file mode 100644 index 00000000..dd5a4c59 --- /dev/null +++ b/app/components/app/division/detail/index.vue @@ -0,0 +1,34 @@ + + + + + diff --git a/app/components/app/division/detail/list-cfg.ts b/app/components/app/division/detail/list-cfg.ts new file mode 100644 index 00000000..76c3b9c8 --- /dev/null +++ b/app/components/app/division/detail/list-cfg.ts @@ -0,0 +1,65 @@ +import type { Config, RecComponent } from '~/components/pub/my-ui/data-table' +import { defineAsyncComponent } from 'vue' +import type { DivisionPosition } from '~/models/division-position' + +type SmallDetailDto = any + +const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-ud.vue')) + +export const config: Config = { + cols: [{}, {}, {}, {}, {}, { width: 50 }], + + headers: [ + [ + { label: '#' }, + { label: 'Kode Jabatan' }, + { label: 'Nama Jabatan' }, + { label: 'Pengisi Jabatan' }, + { label: 'Status Kepala' }, + { label: '' }, + ], + ], + + keys: ['index', 'code', 'name', 'employee', 'head', 'action'], + + delKeyNames: [ + { key: 'code', label: 'Kode' }, + { key: 'name', label: 'Nama' }, + ], + + parses: { + division: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + return recX.division?.name || '-' + }, + employee: (rec: unknown): unknown => { + const recX = rec as DivisionPosition + const fullName = [recX.employee?.person.frontTitle, recX.employee?.person.name, recX.employee?.person.endTitle] + .filter(Boolean) + .join(' ') + .trim() + + return fullName || '-' + }, + head: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + return recX.headStatus ? 'Ya' : 'Tidak' + }, + }, + + components: { + action(rec, idx) { + const res: RecComponent = { + idx, + rec: rec as object, + component: action, + props: { + size: 'sm', + }, + } + return res + }, + }, + + htmls: {}, +} diff --git a/app/components/app/division/detail/list.vue b/app/components/app/division/detail/list.vue new file mode 100644 index 00000000..4bbebb57 --- /dev/null +++ b/app/components/app/division/detail/list.vue @@ -0,0 +1,45 @@ + + + diff --git a/app/components/app/division/list-cfg.ts b/app/components/app/division/list-cfg.ts index 54ed06a6..2d7f93ba 100644 --- a/app/components/app/division/list-cfg.ts +++ b/app/components/app/division/list-cfg.ts @@ -3,17 +3,12 @@ import { defineAsyncComponent } from 'vue' type SmallDetailDto = any -const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-ud.vue')) +const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-dud.vue')) export const config: Config = { cols: [{}, {}, {}, { width: 50 }], - headers: [[ - { label: 'Kode' }, - { label: 'Nama' }, - { label: 'Divisi Induk' }, - { label: '' }, - ]], + headers: [[{ label: 'Kode' }, { label: 'Nama' }, { label: 'Divisi Induk' }, { label: '' }]], keys: ['code', 'name', 'parent', 'action'], @@ -44,4 +39,4 @@ export const config: Config = { }, htmls: {}, -} \ No newline at end of file +} diff --git a/app/components/app/encounter/entry-form.vue b/app/components/app/encounter/entry-form.vue index 25bdf9d8..9c24a0c6 100644 --- a/app/components/app/encounter/entry-form.vue +++ b/app/components/app/encounter/entry-form.vue @@ -1,354 +1,493 @@ diff --git a/app/components/app/icd/list-cfg.ts b/app/components/app/icd/list-cfg.ts index c413e737..44a43eb4 100644 --- a/app/components/app/icd/list-cfg.ts +++ b/app/components/app/icd/list-cfg.ts @@ -7,94 +7,18 @@ const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dr const statusBadge = defineAsyncComponent(() => import('./status-badge.vue')) export const config: Config = { - cols: [ - {}, - {}, - {}, - { width: 100 }, - { width: 120 }, - {}, - {}, - {}, - { width: 100 }, - { width: 100 }, - {}, - { width: 50 }, - ], + cols: [{}, {}, {}, {}], - headers: [ - [ - { label: 'Nama' }, - { label: 'Rekam Medis' }, - { label: 'KTP' }, - { label: 'Tgl Lahir' }, - { label: 'Umur' }, - { label: 'JK' }, - { label: 'Pendidikan' }, - { label: 'Status' }, - { label: '' }, - ], - ], + headers: [[{ label: 'Kode' }, { label: 'Nama (FHIR)' }, { label: 'Nama (ID)' }, { label: '' }]], - keys: [ - 'name', - 'medicalRecord_number', - 'identity_number', - 'birth_date', - 'patient_age', - 'gender', - 'education', - 'status', - 'action', - ], + keys: ['code', 'name', 'indName', 'action'], delKeyNames: [ { key: 'code', label: 'Kode' }, { key: 'name', label: 'Nama' }, ], - parses: { - 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 '-' - }, - }, + parses: {}, components: { action(rec, idx) { diff --git a/app/components/app/icd/multiselect-picker.vue b/app/components/app/icd/multiselect-picker.vue index ce4dbd80..e8f03084 100644 --- a/app/components/app/icd/multiselect-picker.vue +++ b/app/components/app/icd/multiselect-picker.vue @@ -2,7 +2,7 @@ import { config } from './list-cfg' defineProps<{ data: any[] }>() -const modelValue = defineModel() +const modelValue = defineModel('modelValue', { default: [] }) diff --git a/app/components/app/mcu-order-item/list-entry.cfg.ts b/app/components/app/mcu-order-item/list-entry.cfg.ts new file mode 100644 index 00000000..89d85dce --- /dev/null +++ b/app/components/app/mcu-order-item/list-entry.cfg.ts @@ -0,0 +1,43 @@ +import type { Config } from '~/components/pub/my-ui/data-table' +import { defineAsyncComponent } from 'vue' + +const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-dud.vue')) +const input = defineAsyncComponent(() => import('~/components/pub/ui/input/Input.vue')) + +export const config: Config = { + cols: [{}, {}, { classVal: '!p-0.5' }, { width: 50 }], + + headers: [ + [ + { label: 'Nama' }, + { label: 'Jenis' }, + { label: 'Catatan' }, + { label: '' }, + ], + ], + + keys: ['mcuSrc.name', 'mcuSrc.mcuSrcCategory.name', 'note'], + + delKeyNames: [ + { key: 'mcuSrc.name', label: 'Nama' }, + ], + + components: { + note(rec, idx) { + return { + idx, + rec: rec as object, + component: input, + } + }, + action(rec, idx) { + return { + idx, + rec: rec as object, + component: action, + } + }, + }, + + htmls: {}, +} diff --git a/app/components/app/mcu-order-item/list-entry.vue b/app/components/app/mcu-order-item/list-entry.vue new file mode 100644 index 00000000..6c93c5ac --- /dev/null +++ b/app/components/app/mcu-order-item/list-entry.vue @@ -0,0 +1,26 @@ + + + diff --git a/app/components/app/mcu-order-item/list.cfg.ts b/app/components/app/mcu-order-item/list.cfg.ts new file mode 100644 index 00000000..2b054379 --- /dev/null +++ b/app/components/app/mcu-order-item/list.cfg.ts @@ -0,0 +1,18 @@ +import type { Config } from '~/components/pub/my-ui/data-table' + +export const config: Config = { + cols: [{}, {}], + + headers: [ + [ + { label: 'Nama' }, + { label: 'Jenis' }, + ], + ], + + keys: ['mcuSrc.name', 'mcuSrcCategory.name'], + + delKeyNames: [ + { key: 'mcuSrc.name', label: 'Nama' }, + ], +} diff --git a/app/components/app/mcu-order-item/list.vue b/app/components/app/mcu-order-item/list.vue new file mode 100644 index 00000000..ef7438c6 --- /dev/null +++ b/app/components/app/mcu-order-item/list.vue @@ -0,0 +1,20 @@ + + + diff --git a/app/components/app/mcu-order/detail.vue b/app/components/app/mcu-order/detail.vue new file mode 100644 index 00000000..fe161595 --- /dev/null +++ b/app/components/app/mcu-order/detail.vue @@ -0,0 +1,32 @@ + + + \ No newline at end of file diff --git a/app/components/app/mcu-order/entry.vue b/app/components/app/mcu-order/entry.vue new file mode 100644 index 00000000..e69de29b diff --git a/app/components/app/mcu-order/list-pk.vue b/app/components/app/mcu-order/list-pk.vue new file mode 100644 index 00000000..df296419 --- /dev/null +++ b/app/components/app/mcu-order/list-pk.vue @@ -0,0 +1,64 @@ + + + diff --git a/app/components/app/mcu-order/list.vue b/app/components/app/mcu-order/list.vue new file mode 100644 index 00000000..df296419 --- /dev/null +++ b/app/components/app/mcu-order/list.vue @@ -0,0 +1,64 @@ + + + diff --git a/app/components/app/mcu-src-category/switcher.vue b/app/components/app/mcu-src-category/switcher.vue new file mode 100644 index 00000000..78c54acb --- /dev/null +++ b/app/components/app/mcu-src-category/switcher.vue @@ -0,0 +1,35 @@ + + + diff --git a/app/components/app/mcu-src/picker-accordion.vue b/app/components/app/mcu-src/picker-accordion.vue new file mode 100644 index 00000000..a42834f9 --- /dev/null +++ b/app/components/app/mcu-src/picker-accordion.vue @@ -0,0 +1,49 @@ + + + diff --git a/app/components/app/medicine-mix/list-entry.ts b/app/components/app/medicine-mix/list-entry.ts new file mode 100644 index 00000000..03202670 --- /dev/null +++ b/app/components/app/medicine-mix/list-entry.ts @@ -0,0 +1,50 @@ +import type { + Col, + KeyLabel, + RecComponent, + RecStrFuncComponent, + RecStrFuncUnknown, + Th, +} from '~/components/pub/my-ui/data/types' +import { defineAsyncComponent } from 'vue' + +type SmallDetailDto = any + +const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-dud.vue')) + +export const cols: Col[] = [{}, {}, {}, {}, {}, {}, { width: 50 }] + +export const header: Th[][] = [ + [ + { label: 'Nama' }, + { label: "Dosis" }, + { label: 'Satuan' }, + { label: '' }, + ], +] + +export const keys = ['name', 'dose', 'uom.name', 'action'] + +export const delKeyNames: KeyLabel[] = [ + { key: 'code', label: 'Kode' }, + { key: 'name', label: 'Nama' }, +] + +export const funcParsed: RecStrFuncUnknown = { + group: (rec: unknown): unknown => { + return (rec as SmallDetailDto).medicineGroup_code || '-' + }, +} + +export const funcComponent: RecStrFuncComponent = { + action: (rec: unknown, idx: number): RecComponent => { + const res: RecComponent = { + idx, + rec: rec as object, + component: action, + } + return res + }, +} + +export const funcHtml: RecStrFuncUnknown = {} diff --git a/app/components/app/medicine-mix/list-entry.vue b/app/components/app/medicine-mix/list-entry.vue new file mode 100644 index 00000000..ba0fa689 --- /dev/null +++ b/app/components/app/medicine-mix/list-entry.vue @@ -0,0 +1,35 @@ + + + diff --git a/app/components/app/patient/list-cfg.patient.ts b/app/components/app/patient/list-cfg.patient.ts new file mode 100644 index 00000000..3c77bfaa --- /dev/null +++ b/app/components/app/patient/list-cfg.patient.ts @@ -0,0 +1,41 @@ +import type { Config } from '~/components/pub/my-ui/data-table' +import { defineAsyncComponent } from 'vue' + +const SelectedRadio = defineAsyncComponent(() => import('~/components/pub/my-ui/data/select-radio.vue')) + +export interface PatientData { + id: string + identity: string + number: string + bpjs: string + name: string +} + +export const config: Config = { + cols: [{ width: 50 }, { width: 100 }, { width: 100 }, { width: 100 }, { width: 100 }], + + headers: [ + [{ label: '' }, { label: 'NO. KTP' }, { label: 'NO. RM' }, { label: 'NO. KARTU BPJS' }, { label: 'NAMA PASIEN' }], + ], + + keys: ['check', 'identity', 'number', 'bpjs', 'name'], + + delKeyNames: [ + { key: 'code', label: 'Kode' }, + { key: 'name', label: 'Nama' }, + ], + + parses: {}, + + components: { + check(rec, idx) { + return { + idx, + rec: { ...rec as object, menu: 'patient' }, + component: SelectedRadio, + } + }, + }, + + htmls: {}, +} diff --git a/app/components/app/patient/list-patient.vue b/app/components/app/patient/list-patient.vue new file mode 100644 index 00000000..2b9902f2 --- /dev/null +++ b/app/components/app/patient/list-patient.vue @@ -0,0 +1,38 @@ + + + diff --git a/app/components/app/patient/view-patient.vue b/app/components/app/patient/view-patient.vue new file mode 100644 index 00000000..e24554b7 --- /dev/null +++ b/app/components/app/patient/view-patient.vue @@ -0,0 +1,126 @@ + + + diff --git a/app/components/app/prescription-item/list-entry.vue b/app/components/app/prescription-item/list-entry.vue index 5b496b2b..422ebba7 100644 --- a/app/components/app/prescription-item/list-entry.vue +++ b/app/components/app/prescription-item/list-entry.vue @@ -1,14 +1,30 @@ diff --git a/app/components/app/prescription-item/list.cfg.ts b/app/components/app/prescription-item/list.cfg.ts new file mode 100644 index 00000000..fd980bb1 --- /dev/null +++ b/app/components/app/prescription-item/list.cfg.ts @@ -0,0 +1,41 @@ +import type { Config } from '~/components/pub/my-ui/data-table' +import { defineAsyncComponent } from 'vue' + +type SmallDetailDto = any + +export const config: Config = { + cols: [{}, {}, {}, {}, {}, {}], + + headers: [ + [ + { label: 'Nama' }, + { label: 'Bentuk' }, + { label: 'Freq' }, + { label: 'Dosis' }, + { label: 'Interval' }, + { label: 'Total' }, + ], + ], + + keys: ['name', 'uom_code', 'frequency', 'multiplier', 'interval', 'total'], + + delKeyNames: [ + { key: 'code', label: 'Kode' }, + { key: 'name', label: 'Nama' }, + ], + + parses: { + cateogry: (rec: unknown): unknown => { + return (rec as SmallDetailDto).medicineCategory?.name || '-' + }, + group: (rec: unknown): unknown => { + return (rec as SmallDetailDto).medicineGroup?.name || '-' + }, + method: (rec: unknown): unknown => { + return (rec as SmallDetailDto).medicineMethod?.name || '-' + }, + unit: (rec: unknown): unknown => { + return (rec as SmallDetailDto).medicineUnit?.name || '-' + }, + }, +} diff --git a/app/components/app/prescription-item/list.vue b/app/components/app/prescription-item/list.vue new file mode 100644 index 00000000..ed64b09e --- /dev/null +++ b/app/components/app/prescription-item/list.vue @@ -0,0 +1,20 @@ + + + diff --git a/app/components/app/prescription-item/mix-entry.vue b/app/components/app/prescription-item/mix-entry.vue new file mode 100644 index 00000000..d9b4881e --- /dev/null +++ b/app/components/app/prescription-item/mix-entry.vue @@ -0,0 +1,113 @@ + + + diff --git a/app/components/app/prescription-item/non-mix-entry.vue b/app/components/app/prescription-item/non-mix-entry.vue new file mode 100644 index 00000000..25970646 --- /dev/null +++ b/app/components/app/prescription-item/non-mix-entry.vue @@ -0,0 +1,90 @@ + + + diff --git a/app/components/app/prescription/detail.vue b/app/components/app/prescription/detail.vue new file mode 100644 index 00000000..694eb9a1 --- /dev/null +++ b/app/components/app/prescription/detail.vue @@ -0,0 +1,32 @@ + + + \ No newline at end of file diff --git a/app/components/app/prescription/entry.vue b/app/components/app/prescription/entry.vue index 3b4acf28..ef8756e8 100644 --- a/app/components/app/prescription/entry.vue +++ b/app/components/app/prescription/entry.vue @@ -1,32 +1,36 @@ diff --git a/app/components/app/prescription/list-entry.vue b/app/components/app/prescription/list-entry.vue new file mode 100644 index 00000000..aa768000 --- /dev/null +++ b/app/components/app/prescription/list-entry.vue @@ -0,0 +1,88 @@ + + + + + + diff --git a/app/components/app/prescription/list-with-sub.vue b/app/components/app/prescription/list-with-sub.vue new file mode 100644 index 00000000..14bc1785 --- /dev/null +++ b/app/components/app/prescription/list-with-sub.vue @@ -0,0 +1,56 @@ + + + diff --git a/app/components/app/prescription/list.vue b/app/components/app/prescription/list.vue index 6fe27d39..ae5126ca 100644 --- a/app/components/app/prescription/list.vue +++ b/app/components/app/prescription/list.vue @@ -1,5 +1,37 @@ + + diff --git a/app/components/app/sep/entry-form.vue b/app/components/app/sep/entry-form.vue index e48d23ec..35956ad7 100644 --- a/app/components/app/sep/entry-form.vue +++ b/app/components/app/sep/entry-form.vue @@ -1,91 +1,245 @@