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 index 294232f0..89d85dce 100644 --- a/app/components/app/mcu-order-item/list-entry.cfg.ts +++ b/app/components/app/mcu-order-item/list-entry.cfg.ts @@ -2,9 +2,10 @@ 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: [{}, {}, {}, { width: 50 }], + cols: [{}, {}, { classVal: '!p-0.5' }, { width: 50 }], headers: [ [ @@ -22,6 +23,13 @@ export const config: Config = { ], components: { + note(rec, idx) { + return { + idx, + rec: rec as object, + component: input, + } + }, action(rec, idx) { return { idx, diff --git a/app/components/app/mcu-order-item/list.cfg.ts b/app/components/app/mcu-order-item/list.cfg.ts index 852bee25..2b054379 100644 --- a/app/components/app/mcu-order-item/list.cfg.ts +++ b/app/components/app/mcu-order-item/list.cfg.ts @@ -1,7 +1,4 @@ import type { Config } from '~/components/pub/my-ui/data-table' -import { defineAsyncComponent } from 'vue' - -type SmallDetailDto = any export const config: Config = { cols: [{}, {}], 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/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 @@