diff --git a/app/assets/svg/wavey-fingerprint.svg b/app/assets/svg/wavey-fingerprint.svg new file mode 100644 index 00000000..b281297f --- /dev/null +++ b/app/assets/svg/wavey-fingerprint.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/components/app/bpjs/control-letter/_common/dropdown-action.vue b/app/components/app/bpjs/control-letter/_common/dropdown-action.vue new file mode 100644 index 00000000..9086c883 --- /dev/null +++ b/app/components/app/bpjs/control-letter/_common/dropdown-action.vue @@ -0,0 +1,90 @@ + + + diff --git a/app/components/app/bpjs/control-letter/_common/history-dialog.vue b/app/components/app/bpjs/control-letter/_common/history-dialog.vue new file mode 100644 index 00000000..00d7b32f --- /dev/null +++ b/app/components/app/bpjs/control-letter/_common/history-dialog.vue @@ -0,0 +1,49 @@ + + + \ No newline at end of file diff --git a/app/components/app/bpjs/control-letter/_common/select-date-range.vue b/app/components/app/bpjs/control-letter/_common/select-date-range.vue new file mode 100644 index 00000000..114f8542 --- /dev/null +++ b/app/components/app/bpjs/control-letter/_common/select-date-range.vue @@ -0,0 +1,104 @@ + + + diff --git a/app/components/app/bpjs/control-letter/_common/select-destination-polyclinic.vue b/app/components/app/bpjs/control-letter/_common/select-destination-polyclinic.vue new file mode 100644 index 00000000..0852195b --- /dev/null +++ b/app/components/app/bpjs/control-letter/_common/select-destination-polyclinic.vue @@ -0,0 +1,70 @@ + + + diff --git a/app/components/app/bpjs/control-letter/_common/select-origin-polyclinic.vue b/app/components/app/bpjs/control-letter/_common/select-origin-polyclinic.vue new file mode 100644 index 00000000..0852195b --- /dev/null +++ b/app/components/app/bpjs/control-letter/_common/select-origin-polyclinic.vue @@ -0,0 +1,70 @@ + + + diff --git a/app/components/app/bpjs/control-letter/filter.vue b/app/components/app/bpjs/control-letter/filter.vue new file mode 100644 index 00000000..50005069 --- /dev/null +++ b/app/components/app/bpjs/control-letter/filter.vue @@ -0,0 +1,128 @@ + + + diff --git a/app/components/app/bpjs/control-letter/list.cfg.ts b/app/components/app/bpjs/control-letter/list.cfg.ts new file mode 100644 index 00000000..8eb7e5f4 --- /dev/null +++ b/app/components/app/bpjs/control-letter/list.cfg.ts @@ -0,0 +1,108 @@ +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('./_common/dropdown-action.vue')) +const statusBadge = defineAsyncComponent(() => import('~/components/pub/my-ui/badge/status-badge.vue')) + +export const config: Config = { + cols: [{}, {}, {}, {},{}, {}, {}, {}, {}, {width: 90},{width: 10},], + + headers: [ + [ + { label: 'No Surat' }, + { label: 'No MR' }, + { label: 'Nama' }, + { label: 'Tgl Rencana Kontrol' }, + { label: 'Tgl Penerbitan' }, + { label: 'Klinik Asal' }, + { label: 'Klinik Tujuan' }, + { label: 'DPJP' }, + { label: 'No SEP Asal' }, + { label: 'Status' }, + { label: 'Action' }, + ], + ], + + keys: ['birth_date', 'number', 'person.name', 'birth_date', 'birth_date', + 'birth_date', 'number', 'person.name', 'birth_date', 'status', '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, + } + }, + status(rec, idx) { + return { + idx, + rec: rec as object, + component: statusBadge, + } + }, + }, + + htmls: { + patient_address(_rec) { + return '-' + }, + }, +} diff --git a/app/components/app/bpjs/control-letter/list.vue b/app/components/app/bpjs/control-letter/list.vue new file mode 100644 index 00000000..8274e752 --- /dev/null +++ b/app/components/app/bpjs/control-letter/list.vue @@ -0,0 +1,31 @@ + + + diff --git a/app/components/app/chemotherapy/action-proses.vue b/app/components/app/chemotherapy/action-proses.vue new file mode 100644 index 00000000..4e2efeb3 --- /dev/null +++ b/app/components/app/chemotherapy/action-proses.vue @@ -0,0 +1,30 @@ + + + + diff --git a/app/components/app/chemotherapy/dialog-verification.vue b/app/components/app/chemotherapy/dialog-verification.vue new file mode 100644 index 00000000..2d617445 --- /dev/null +++ b/app/components/app/chemotherapy/dialog-verification.vue @@ -0,0 +1,164 @@ + + + + diff --git a/app/components/app/chemotherapy/dropdown-action-process.vue b/app/components/app/chemotherapy/dropdown-action-process.vue new file mode 100644 index 00000000..56e14886 --- /dev/null +++ b/app/components/app/chemotherapy/dropdown-action-process.vue @@ -0,0 +1,63 @@ + + + diff --git a/app/components/app/chemotherapy/entry-form.vue b/app/components/app/chemotherapy/entry-form.vue new file mode 100644 index 00000000..39113d63 --- /dev/null +++ b/app/components/app/chemotherapy/entry-form.vue @@ -0,0 +1,302 @@ + + + diff --git a/app/components/app/chemotherapy/list-admin.vue b/app/components/app/chemotherapy/list-admin.vue new file mode 100644 index 00000000..a201f2a1 --- /dev/null +++ b/app/components/app/chemotherapy/list-admin.vue @@ -0,0 +1,37 @@ + + + + diff --git a/app/components/app/chemotherapy/list-cfg.admin.ts b/app/components/app/chemotherapy/list-cfg.admin.ts new file mode 100644 index 00000000..38d77121 --- /dev/null +++ b/app/components/app/chemotherapy/list-cfg.admin.ts @@ -0,0 +1,80 @@ +import type { Config, RecComponent } from '~/components/pub/my-ui/data-table' +import { defineAsyncComponent } from 'vue' + +type SmallDetailDto = any + +const action = defineAsyncComponent(() => import('./dropdown-action-process.vue')) + +export const config: Config = { + cols: [ + { width: 120 }, + { width: 120 }, + { width: 120 }, + { width: 120 }, + { width: 120 }, + { width: 120 }, + { width: 120 }, + { width: 120 }, + { width: 120 }, + { width: 120 }, + { width: 120 }, + { width: 50 }, + ], + + headers: [ + [ + { label: 'TANGGAL' }, + { label: 'NO. RM' }, + { label: 'NO. BILL' }, + { label: 'JK' }, + { label: 'ALAMAT' }, + { label: 'KLINIK ASAL' }, + { label: 'NAMA DOKTER' }, + { label: 'CARA BAYAR' }, + { label: 'RUJUKAN' }, + { label: 'KET. RUJUKAN' }, + { label: 'ASAL' }, + { label: '' }, + ], + ], + + keys: [ + 'tanggal', + 'noRm', + 'noBill', + 'jk', + 'alamat', + 'klinik', + 'dokter', + 'caraBayar', + 'rujukan', + 'ketRujukan', + 'asal', + 'action', + ], + + delKeyNames: [ + { key: 'code', label: 'Kode' }, + { key: 'name', label: 'Nama' }, + ], + + parses: { + parent: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + return recX.parent?.name || '-' + }, + }, + + components: { + action(rec, idx) { + const res: RecComponent = { + idx, + rec: rec as object, + component: action, + } + return res + }, + }, + + htmls: {}, +} diff --git a/app/components/app/chemotherapy/list-cfg.medicine.ts b/app/components/app/chemotherapy/list-cfg.medicine.ts new file mode 100644 index 00000000..103452f5 --- /dev/null +++ b/app/components/app/chemotherapy/list-cfg.medicine.ts @@ -0,0 +1,69 @@ +import type { Config, RecComponent } from '~/components/pub/my-ui/data-table' +import { defineAsyncComponent } from 'vue' + +type SmallDetailDto = any + +const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-dud.vue')) + +export const config: Config = { + cols: [ + { width: 60 }, + { width: 200 }, + { width: 100 }, + { width: 100 }, + { width: 150 }, + { width: 80 }, + { width: 200 }, + { width: 120 }, + ], + + headers: [ + [ + { label: 'NO.' }, + { label: 'NAMA OBAT' }, + { label: 'DOSIS' }, + { label: 'SATUAN' }, + { label: 'RUTE PEMBERIAN' }, + { label: 'HARI' }, + { label: 'CATATAN' }, + { label: '' }, + ], + ], + + keys: [ + 'number', + 'namaObat', + 'dosis', + 'satuan', + 'rute', + 'hari', + 'catatan', + 'action', + ], + + delKeyNames: [ + { key: 'code', label: 'Kode' }, + { key: 'name', label: 'Nama' }, + ], + + parses: { + parent: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + return recX.parent?.name || '-' + }, + }, + + components: { + action(rec, idx) { + const res: RecComponent = { + idx, + rec: rec as object, + component: action, + } + return res + }, + }, + + htmls: {}, +} + diff --git a/app/components/app/chemotherapy/list-cfg.protocol.ts b/app/components/app/chemotherapy/list-cfg.protocol.ts new file mode 100644 index 00000000..da678c0f --- /dev/null +++ b/app/components/app/chemotherapy/list-cfg.protocol.ts @@ -0,0 +1,62 @@ +import type { Config, RecComponent } from '~/components/pub/my-ui/data-table' +import { defineAsyncComponent } from 'vue' + +type SmallDetailDto = any + +const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-dud.vue')) + +export const config: Config = { + cols: [ + { width: 120 }, + { width: 120 }, + { width: 120 }, + { width: 120 }, + { width: 120 }, + { width: 50 }, + ], + + headers: [ + [ + { label: 'NO.' }, + { label: 'TANGGAL' }, + { label: 'SIKLUS' }, + { label: 'PERIODE KEMOTERAPI' }, + { label: 'KEHADIRAN' }, + { label: '' }, + ], + ], + + keys: [ + 'number', + 'tanggal', + 'siklus', + 'periode', + 'kehadiran', + 'action', + ], + + delKeyNames: [ + { key: 'code', label: 'Kode' }, + { key: 'name', label: 'Nama' }, + ], + + parses: { + parent: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + return recX.parent?.name || '-' + }, + }, + + components: { + action(rec, idx) { + const res: RecComponent = { + idx, + rec: rec as object, + component: action, + } + return res + }, + }, + + htmls: {}, +} diff --git a/app/components/app/chemotherapy/list-cfg.ts b/app/components/app/chemotherapy/list-cfg.ts new file mode 100644 index 00000000..29c24e6f --- /dev/null +++ b/app/components/app/chemotherapy/list-cfg.ts @@ -0,0 +1,80 @@ +import type { Config, RecComponent } from '~/components/pub/my-ui/data-table' +import { defineAsyncComponent } from 'vue' + +type SmallDetailDto = any + +const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-dud.vue')) + +export const config: Config = { + cols: [ + { width: 120 }, + { width: 120 }, + { width: 120 }, + { width: 120 }, + { width: 120 }, + { width: 120 }, + { width: 120 }, + { width: 120 }, + { width: 120 }, + { width: 120 }, + { width: 120 }, + { width: 50 }, + ], + + headers: [ + [ + { label: 'TANGGAL' }, + { label: 'NO. RM' }, + { label: 'NO. BILL' }, + { label: 'JK' }, + { label: 'ALAMAT' }, + { label: 'KLINIK ASAL' }, + { label: 'NAMA DOKTER' }, + { label: 'CARA BAYAR' }, + { label: 'RUJUKAN' }, + { label: 'KET. RUJUKAN' }, + { label: 'ASAL' }, + { label: '' }, + ], + ], + + keys: [ + 'tanggal', + 'noRm', + 'noBill', + 'jk', + 'alamat', + 'klinik', + 'dokter', + 'caraBayar', + 'rujukan', + 'ketRujukan', + 'asal', + 'action', + ], + + delKeyNames: [ + { key: 'code', label: 'Kode' }, + { key: 'name', label: 'Nama' }, + ], + + parses: { + parent: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + return recX.parent?.name || '-' + }, + }, + + components: { + action(rec, idx) { + const res: RecComponent = { + idx, + rec: rec as object, + component: action, + } + return res + }, + }, + + htmls: {}, +} diff --git a/app/components/app/chemotherapy/list-cfg.verification.ts b/app/components/app/chemotherapy/list-cfg.verification.ts new file mode 100644 index 00000000..e75aa615 --- /dev/null +++ b/app/components/app/chemotherapy/list-cfg.verification.ts @@ -0,0 +1,78 @@ +import type { Config, RecComponent } from '~/components/pub/my-ui/data-table' +import { defineAsyncComponent } from 'vue' + +type SmallDetailDto = any + +const statusBadge = defineAsyncComponent(() => import('./status-badge.vue')) +const verifyButton = defineAsyncComponent(() => import('./verify-button.vue')) + +export const config: Config = { + cols: [ + { width: 120 }, + { width: 150 }, + { width: 150 }, + { width: 150 }, + { width: 150 }, + { width: 180 }, + { width: 150 }, + { width: 100 }, + ], + + headers: [ + [ + { label: 'TANGGAL MASUK' }, + { label: 'PJ BERKAS RM' }, + { label: 'DOKTER' }, + { label: 'JENIS RUANGAN' }, + { label: 'JENIS TINDAKAN' }, + { label: 'TANGGAL JADWAL TINDAKAN' }, + { label: 'STATUS' }, + { label: 'AKSI' }, + ], + ], + + keys: [ + 'tanggalMasuk', + 'pjBerkasRm', + 'dokter', + 'jenisRuangan', + 'jenisTindakan', + 'tanggalJadwalTindakan', + 'status', + 'action', + ], + + delKeyNames: [ + { key: 'code', label: 'Kode' }, + { key: 'name', label: 'Nama' }, + ], + + parses: { + parent: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + return recX.parent?.name || '-' + }, + }, + + components: { + status(rec, idx) { + const res: RecComponent = { + idx, + rec: rec as object, + component: statusBadge, + } + return res + }, + action(rec, idx) { + const res: RecComponent = { + idx, + rec: rec as object, + component: verifyButton, + } + return res + }, + }, + + htmls: {}, +} + diff --git a/app/components/app/chemotherapy/list-cfg.visit.ts b/app/components/app/chemotherapy/list-cfg.visit.ts new file mode 100644 index 00000000..cb242d62 --- /dev/null +++ b/app/components/app/chemotherapy/list-cfg.visit.ts @@ -0,0 +1,99 @@ +import type { Config, RecComponent } from '~/components/pub/my-ui/data-table' +import { defineAsyncComponent } from 'vue' +import { format, parseISO } from 'date-fns' +import { id as localeID } from 'date-fns/locale' + +type VisitDto = any + +const statusBadge = defineAsyncComponent(() => import('./status-badge.vue')) +const verifyButton = defineAsyncComponent(() => import('./verify-button.vue')) + +export const config: Config = { + cols: [ + { width: 150 }, // TANGGAL MASUK + { width: 180 }, // PJ BERKAS RM + { width: 200 }, // DOKTER + { width: 150 }, // JENIS RUANGAN + { width: 150 }, // JENIS TINDAKAN + { width: 180 }, // TANGGAL JADWAL TINDAKAN + { width: 150 }, // STATUS + { width: 120 }, // AKSI + ], + + headers: [ + [ + { label: 'TANGGAL MASUK' }, + { label: 'PJ BERKAS RM' }, + { label: 'DOKTER' }, + { label: 'JENIS RUANGAN' }, + { label: 'JENIS TINDAKAN' }, + { label: 'TANGGAL JADWAL TINDAKAN' }, + { label: 'STATUS' }, + { label: 'AKSI' }, + ], + ], + + keys: [ + 'tanggal_masuk', + 'pj_berkas_rm', + 'dokter', + 'jenis_ruangan', + 'jenis_tindakan', + 'tanggal_jadwal_tindakan', + 'status', + 'action', + ], + + delKeyNames: [ + { key: 'id', label: 'ID' }, + { key: 'nama', label: 'Nama' }, + ], + + parses: { + tanggal_masuk: (rec: unknown): string => { + const recX = rec as VisitDto + if (!recX.tanggal_masuk) return '-' + try { + const date = typeof recX.tanggal_masuk === 'string' ? parseISO(recX.tanggal_masuk) : recX.tanggal_masuk + return format(date, 'dd MMMM yyyy', { locale: localeID }) + } catch { + return recX.tanggal_masuk.toString() + } + }, + tanggal_jadwal_tindakan: (rec: unknown): string => { + const recX = rec as VisitDto + if (!recX.tanggal_jadwal_tindakan) return '-' + try { + const date = + typeof recX.tanggal_jadwal_tindakan === 'string' + ? parseISO(recX.tanggal_jadwal_tindakan) + : recX.tanggal_jadwal_tindakan + return format(date, 'dd MMMM yyyy', { locale: localeID }) + } catch { + return recX.tanggal_jadwal_tindakan.toString() + } + }, + }, + + components: { + status(rec, idx) { + const res: RecComponent = { + idx, + rec: rec as object, + component: statusBadge, + } + return res + }, + action(rec, idx) { + const res: RecComponent = { + idx, + rec: rec as object, + component: verifyButton, + } + return res + }, + }, + + htmls: {}, +} + diff --git a/app/components/app/chemotherapy/list-verification.vue b/app/components/app/chemotherapy/list-verification.vue new file mode 100644 index 00000000..93120f69 --- /dev/null +++ b/app/components/app/chemotherapy/list-verification.vue @@ -0,0 +1,37 @@ + + + + diff --git a/app/components/app/chemotherapy/list.medicine.vue b/app/components/app/chemotherapy/list.medicine.vue new file mode 100644 index 00000000..748c8cb9 --- /dev/null +++ b/app/components/app/chemotherapy/list.medicine.vue @@ -0,0 +1,76 @@ + + + + diff --git a/app/components/app/chemotherapy/list.protocol.vue b/app/components/app/chemotherapy/list.protocol.vue new file mode 100644 index 00000000..7b5c3234 --- /dev/null +++ b/app/components/app/chemotherapy/list.protocol.vue @@ -0,0 +1,75 @@ + + + diff --git a/app/components/app/chemotherapy/list.register.vue b/app/components/app/chemotherapy/list.register.vue new file mode 100644 index 00000000..131afc04 --- /dev/null +++ b/app/components/app/chemotherapy/list.register.vue @@ -0,0 +1,71 @@ + + + diff --git a/app/components/app/chemotherapy/list.visit.vue b/app/components/app/chemotherapy/list.visit.vue new file mode 100644 index 00000000..de451f31 --- /dev/null +++ b/app/components/app/chemotherapy/list.visit.vue @@ -0,0 +1,45 @@ + + + + diff --git a/app/components/app/chemotherapy/list.vue b/app/components/app/chemotherapy/list.vue new file mode 100644 index 00000000..19642581 --- /dev/null +++ b/app/components/app/chemotherapy/list.vue @@ -0,0 +1,36 @@ + + + \ No newline at end of file diff --git a/app/components/app/chemotherapy/sample.ts b/app/components/app/chemotherapy/sample.ts new file mode 100644 index 00000000..082cde66 --- /dev/null +++ b/app/components/app/chemotherapy/sample.ts @@ -0,0 +1,49 @@ +export type ChemotherapyData = { + id: number + tanggal: string + noRm: string + noBill: string + nama: string + jk: string + alamat: string + klinik: string + dokter: string + caraBayar: string + rujukan: string + ketRujukan: string + asal: string +} + +export const sampleRows: ChemotherapyData[] = [ + { + id: 1, + tanggal: '12 Agustus 2025', + noRm: 'RM23311224', + noBill: '-', + nama: 'Ahmad Baidowi', + jk: 'L', + alamat: 'Jl Jaksa Agung S. No. 9', + klinik: 'Penyakit dalam', + dokter: 'Dr. Andreas Sutaji', + caraBayar: 'JKN', + rujukan: 'Faskes BPJS', + ketRujukan: 'RUMAH SAKIT - RS Lawang Medika - Malang', + asal: 'Rawat Jalan Reguler', + }, + { + id: 2, + tanggal: '11 Agustus 2025', + noRm: 'RM23455667', + noBill: '-', + nama: 'Abraham Sulaiman', + jk: 'L', + alamat: 'Purwantoro, Blimbing', + klinik: 'Penyakit dalam', + dokter: 'Dr. Andreas Sutaji', + caraBayar: 'JKN', + rujukan: 'Faskes BPJS', + ketRujukan: 'RUMAH SAKIT - RS Lawang Medika - Malang', + asal: 'Rawat Jalan Reguler', + }, + // tambahkan lebih banyak baris contoh jika perlu +] diff --git a/app/components/app/chemotherapy/status-badge.vue b/app/components/app/chemotherapy/status-badge.vue new file mode 100644 index 00000000..1a7d94ca --- /dev/null +++ b/app/components/app/chemotherapy/status-badge.vue @@ -0,0 +1,28 @@ + + + + diff --git a/app/components/app/chemotherapy/verify-button.vue b/app/components/app/chemotherapy/verify-button.vue new file mode 100644 index 00000000..1d9c2d3a --- /dev/null +++ b/app/components/app/chemotherapy/verify-button.vue @@ -0,0 +1,31 @@ + + + + diff --git a/app/components/app/control-letter/_common/select-date.vue b/app/components/app/control-letter/_common/select-date.vue new file mode 100644 index 00000000..057d0a63 --- /dev/null +++ b/app/components/app/control-letter/_common/select-date.vue @@ -0,0 +1,116 @@ + + + diff --git a/app/components/app/control-letter/_common/select-dpjp.vue b/app/components/app/control-letter/_common/select-dpjp.vue new file mode 100644 index 00000000..2053ebdb --- /dev/null +++ b/app/components/app/control-letter/_common/select-dpjp.vue @@ -0,0 +1,98 @@ + + + diff --git a/app/components/app/control-letter/_common/select-specialist.vue b/app/components/app/control-letter/_common/select-specialist.vue new file mode 100644 index 00000000..cd5ee923 --- /dev/null +++ b/app/components/app/control-letter/_common/select-specialist.vue @@ -0,0 +1,98 @@ + + + diff --git a/app/components/app/control-letter/_common/select-subspecialist.vue b/app/components/app/control-letter/_common/select-subspecialist.vue new file mode 100644 index 00000000..61567c0c --- /dev/null +++ b/app/components/app/control-letter/_common/select-subspecialist.vue @@ -0,0 +1,97 @@ + + + diff --git a/app/components/app/control-letter/_common/select-unit.vue b/app/components/app/control-letter/_common/select-unit.vue new file mode 100644 index 00000000..afe0ca0a --- /dev/null +++ b/app/components/app/control-letter/_common/select-unit.vue @@ -0,0 +1,85 @@ + + + diff --git a/app/components/app/control-letter/entry-form.vue b/app/components/app/control-letter/entry-form.vue new file mode 100644 index 00000000..2517e8b1 --- /dev/null +++ b/app/components/app/control-letter/entry-form.vue @@ -0,0 +1,94 @@ + + + diff --git a/app/components/app/control-letter/list.cfg.ts b/app/components/app/control-letter/list.cfg.ts new file mode 100644 index 00000000..3eb7bd84 --- /dev/null +++ b/app/components/app/control-letter/list.cfg.ts @@ -0,0 +1,64 @@ +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: 180}, {}, {}, {}, {}, {width: 30},], + + headers: [ + [ + { label: 'Tgl Rencana Kontrol' }, + { label: 'Spesialis' }, + { label: 'Sub Spesialis' }, + { label: 'DPJP' }, + { label: 'Status SEP' }, + { label: 'Action' }, + ], + ], + + keys: ['date', 'specialist.name', 'subspecialist.name', 'doctor.employee.person.name', 'sep_status', 'action'], + + delKeyNames: [ + { key: 'code', label: 'Kode' }, + { key: 'name', label: 'Nama' }, + ], + + parses: { + date: (rec: unknown): unknown => { + const date = (rec as any).date + if (typeof date == 'object' && date) { + return (date as Date).toLocaleDateString('id-ID') + } else if (typeof date == 'string') { + return (date as string).substring(0, 10) + } + return date + }, + specialist_subspecialist: (rec: unknown): unknown => { + return '-' + }, + dpjp: (rec: unknown): unknown => { + // const { person } = rec as Patient + return '-' + }, + }, + + components: { + action(rec, idx) { + return { + idx, + rec: rec as object, + component: action, + } + }, + }, + + htmls: { + sep_status(_rec) { + return 'SEP Internal' + }, + }, +} diff --git a/app/components/app/control-letter/list.vue b/app/components/app/control-letter/list.vue new file mode 100644 index 00000000..8274e752 --- /dev/null +++ b/app/components/app/control-letter/list.vue @@ -0,0 +1,31 @@ + + + diff --git a/app/components/app/control-letter/preview.vue b/app/components/app/control-letter/preview.vue new file mode 100644 index 00000000..e10a2b91 --- /dev/null +++ b/app/components/app/control-letter/preview.vue @@ -0,0 +1,54 @@ + + + + + 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/general-consent/entry.vue b/app/components/app/general-consent/entry.vue new file mode 100644 index 00000000..75e30cec --- /dev/null +++ b/app/components/app/general-consent/entry.vue @@ -0,0 +1,214 @@ + + + diff --git a/app/components/app/general-consent/list.cfg.ts b/app/components/app/general-consent/list.cfg.ts new file mode 100644 index 00000000..c2f57c54 --- /dev/null +++ b/app/components/app/general-consent/list.cfg.ts @@ -0,0 +1,82 @@ +import type { Config, RecComponent, RecStrFuncComponent, RecStrFuncUnknown } from '~/components/pub/my-ui/data-table' +import { defineAsyncComponent } from 'vue' +import type { GeneralConsent } from '~/models/general-consent' + +type SmallDetailDto = any + +const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-ud.vue')) +export const config: Config = { + cols: [{ width: 100 }, {}, {}, {}, { width: 50 }], + headers: [ + [ + { label: 'Tanggal' }, + { label: 'Anggota Keluarga' }, + { label: 'Penanggung Jawab' }, + { label: 'Pemberi Informasi' }, + { label: 'Saksi 1' }, + { label: 'Saksi 2' }, + { label: '' }, + ], + ], + keys: ['date', 'relatives', 'responsible', 'informant', 'witness1', 'witness2', 'action'], + delKeyNames: [ + { key: 'data', label: 'Tanggal' }, + { key: 'dstDoctor.name', label: 'Dokter' }, + ], + parses: { + date(rec) { + const recX = rec as GeneralConsent + return recX?.createdAt?.substring(0, 10) || '-' + }, + relatives(rec) { + const recX = rec as GeneralConsent + const parsed = JSON.parse(recX?.value || '{}') + return parsed?.relatives?.join(', ') || '-' + }, + responsible(rec) { + const recX = rec as GeneralConsent + const parsed = JSON.parse(recX?.value || '{}') + return parsed?.responsible || '-' + }, + informant(rec) { + const recX = rec as GeneralConsent + const parsed = JSON.parse(recX?.value || '{}') + return parsed?.informant || '-' + }, + witness1(rec) { + const recX = rec as GeneralConsent + const parsed = JSON.parse(recX?.value || '{}') + return parsed?.witness1 || '-' + }, + witness2(rec) { + const recX = rec as GeneralConsent + const parsed = JSON.parse(recX?.value || '{}') + return parsed?.witness2 || '-' + }, + action(rec, idx) { + const res: RecComponent = { + idx, + rec: rec as object, + component: action, + props: { + size: 'sm', + }, + } + return res + }, + }, + components: { + action(rec, idx) { + const res: RecComponent = { + idx, + rec: rec as object, + component: action, + props: { + size: 'sm', + }, + } + return res + }, + } as RecStrFuncComponent, + htmls: {} as RecStrFuncUnknown, +} diff --git a/app/components/app/general-consent/list.vue b/app/components/app/general-consent/list.vue new file mode 100644 index 00000000..46f595f5 --- /dev/null +++ b/app/components/app/general-consent/list.vue @@ -0,0 +1,34 @@ + + + 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/resume/_common/print-btn.vue b/app/components/app/resume/_common/print-btn.vue new file mode 100644 index 00000000..5688d007 --- /dev/null +++ b/app/components/app/resume/_common/print-btn.vue @@ -0,0 +1,22 @@ + + + \ No newline at end of file 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..7e236ff0 --- /dev/null +++ b/app/components/app/resume/_common/select-arrangement.vue @@ -0,0 +1,70 @@ + + + diff --git a/app/components/app/resume/_common/select-concious-level.vue b/app/components/app/resume/_common/select-concious-level.vue new file mode 100644 index 00000000..0852195b --- /dev/null +++ b/app/components/app/resume/_common/select-concious-level.vue @@ -0,0 +1,70 @@ + + + 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-following-arrangement.vue b/app/components/app/resume/_common/select-following-arrangement.vue new file mode 100644 index 00000000..0852195b --- /dev/null +++ b/app/components/app/resume/_common/select-following-arrangement.vue @@ -0,0 +1,70 @@ + + + diff --git a/app/components/app/resume/_common/select-hospital-leave-condition.vue b/app/components/app/resume/_common/select-hospital-leave-condition.vue new file mode 100644 index 00000000..0852195b --- /dev/null +++ b/app/components/app/resume/_common/select-hospital-leave-condition.vue @@ -0,0 +1,70 @@ + + + diff --git a/app/components/app/resume/_common/select-hospital-leave-method.vue b/app/components/app/resume/_common/select-hospital-leave-method.vue new file mode 100644 index 00000000..0852195b --- /dev/null +++ b/app/components/app/resume/_common/select-hospital-leave-method.vue @@ -0,0 +1,70 @@ + + + diff --git a/app/components/app/resume/_common/select-icd-10.vue b/app/components/app/resume/_common/select-icd-10.vue new file mode 100644 index 00000000..0852195b --- /dev/null +++ b/app/components/app/resume/_common/select-icd-10.vue @@ -0,0 +1,70 @@ + + + diff --git a/app/components/app/resume/_common/select-icd-9.vue b/app/components/app/resume/_common/select-icd-9.vue new file mode 100644 index 00000000..0852195b --- /dev/null +++ b/app/components/app/resume/_common/select-icd-9.vue @@ -0,0 +1,70 @@ + + + diff --git a/app/components/app/resume/_common/select-national-program-service-status.vue b/app/components/app/resume/_common/select-national-program-service-status.vue new file mode 100644 index 00000000..0852195b --- /dev/null +++ b/app/components/app/resume/_common/select-national-program-service-status.vue @@ -0,0 +1,70 @@ + + + diff --git a/app/components/app/resume/_common/select-national-program-service.vue b/app/components/app/resume/_common/select-national-program-service.vue new file mode 100644 index 00000000..0852195b --- /dev/null +++ b/app/components/app/resume/_common/select-national-program-service.vue @@ -0,0 +1,70 @@ + + + diff --git a/app/components/app/resume/_common/select-pain-scale.vue b/app/components/app/resume/_common/select-pain-scale.vue new file mode 100644 index 00000000..0852195b --- /dev/null +++ b/app/components/app/resume/_common/select-pain-scale.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/_common/verify-badge.vue b/app/components/app/resume/_common/verify-badge.vue new file mode 100644 index 00000000..8a999895 --- /dev/null +++ b/app/components/app/resume/_common/verify-badge.vue @@ -0,0 +1,67 @@ + + + \ No newline at end of file diff --git a/app/components/app/resume/add.vue b/app/components/app/resume/add.vue new file mode 100644 index 00000000..d5fa3370 --- /dev/null +++ b/app/components/app/resume/add.vue @@ -0,0 +1,482 @@ + + + diff --git a/app/components/app/resume/history-list/action-history-dialog.vue b/app/components/app/resume/history-list/action-history-dialog.vue new file mode 100644 index 00000000..5602016e --- /dev/null +++ b/app/components/app/resume/history-list/action-history-dialog.vue @@ -0,0 +1,66 @@ + + + \ No newline at end of file diff --git a/app/components/app/resume/history-list/action-list.cfg.ts b/app/components/app/resume/history-list/action-list.cfg.ts new file mode 100644 index 00000000..2dad3e6a --- /dev/null +++ b/app/components/app/resume/history-list/action-list.cfg.ts @@ -0,0 +1,94 @@ +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-dvvp.vue')) + +export const config: Config = { + cols: [{width: 140}, {}, {}, {width: 140}, {width: 10},], + + headers: [ + [ + { label: 'Tanggal/Jam' }, + { label: 'Dokter' }, + { label: 'Tempat Layanan' }, + { label: 'Jenis' }, + { label: 'Jenis Pemeriksaan' }, + { label: 'Tanggal/Jam' }, + ], + ], + + keys: ['birth_date', 'person.name', 'person.name', 'person.name', 'person.name', 'birth_date',], + + 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/history-list/consultation-history-dialog.vue b/app/components/app/resume/history-list/consultation-history-dialog.vue new file mode 100644 index 00000000..ad1e777e --- /dev/null +++ b/app/components/app/resume/history-list/consultation-history-dialog.vue @@ -0,0 +1,66 @@ + + + \ No newline at end of file diff --git a/app/components/app/resume/history-list/consultation-list.cfg.ts b/app/components/app/resume/history-list/consultation-list.cfg.ts new file mode 100644 index 00000000..196c208c --- /dev/null +++ b/app/components/app/resume/history-list/consultation-list.cfg.ts @@ -0,0 +1,51 @@ +import type { Config } from '~/components/pub/my-ui/data-table' +import type { Patient } from '~/models/patient' +import { defineAsyncComponent } from 'vue' + +const lampiranBtn = defineAsyncComponent(() => import('../_common/print-btn.vue')) + +export const config: Config = { + cols: [{}, {}, {}, {}, {},], + + headers: [ + [ + { label: 'Tanggal/Jam' }, + { label: 'Dokter' }, + { label: 'Tempat Layanan' }, + { label: 'KSM' }, + { label: 'Tanggal/Jam' }, + { label: 'Tujuan' }, + { label: 'Dokter' }, + { label: 'Berkas' }, + ], + ], + + keys: ['birth_date', 'person.name', 'person.name', 'person.name', 'person.name', 'birth_date','person.name', 'action', ], + + parses: { + 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 + }, + }, + + components: { + action(rec, idx) { + return { + idx, + rec: rec as object, + component: lampiranBtn, + } + }, + }, + + htmls: { + + }, +} diff --git a/app/components/app/resume/history-list/farmacy-history-dialog.vue b/app/components/app/resume/history-list/farmacy-history-dialog.vue new file mode 100644 index 00000000..53bf3875 --- /dev/null +++ b/app/components/app/resume/history-list/farmacy-history-dialog.vue @@ -0,0 +1,66 @@ + + + \ No newline at end of file diff --git a/app/components/app/resume/history-list/farmacy-list.cfg.ts b/app/components/app/resume/history-list/farmacy-list.cfg.ts new file mode 100644 index 00000000..75ea1e80 --- /dev/null +++ b/app/components/app/resume/history-list/farmacy-list.cfg.ts @@ -0,0 +1,39 @@ +import type { Config } from '~/components/pub/my-ui/data-table' +import type { Patient } from '~/models/patient' + +export const config: Config = { + cols: [{}, {}, {}, {}, {},], + + headers: [ + [ + { label: 'Tanggal Order' }, + { label: 'No Resep' }, + { label: 'Tempat Layanan' }, + { label: 'Nama Obat' }, + { label: 'Tanggal Disetujui' }, + ], + ], + + keys: ['birth_date', 'person.name', 'person.name', 'person.name', 'birth_date',], + + parses: { + 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 + }, + }, + + components: { + + }, + + htmls: { + + }, +} diff --git a/app/components/app/resume/history-list/national-program-history-dialog.vue b/app/components/app/resume/history-list/national-program-history-dialog.vue new file mode 100644 index 00000000..cc702227 --- /dev/null +++ b/app/components/app/resume/history-list/national-program-history-dialog.vue @@ -0,0 +1,65 @@ + + + \ No newline at end of file diff --git a/app/components/app/resume/history-list/national-program-list.cfg.ts b/app/components/app/resume/history-list/national-program-list.cfg.ts new file mode 100644 index 00000000..fe6d3ea0 --- /dev/null +++ b/app/components/app/resume/history-list/national-program-list.cfg.ts @@ -0,0 +1,30 @@ +import type { Config } from '~/components/pub/my-ui/data-table' +import type { Patient } from '~/models/patient' + +export const config: Config = { + cols: [{}, {}, {}, {}, {},], + + headers: [ + [ + { label: 'Nomor' }, + { label: 'Layanan Program Nasional' }, + { label: 'Status' }, + ], + ], + + keys: ['person.name', 'person.name', 'person.name',], + + parses: { + // birth_date: (rec: unknown): unknown => { + + // }, + }, + + components: { + + }, + + htmls: { + + }, +} diff --git a/app/components/app/resume/history-list/supporting-history-dialog.vue b/app/components/app/resume/history-list/supporting-history-dialog.vue new file mode 100644 index 00000000..32fb4508 --- /dev/null +++ b/app/components/app/resume/history-list/supporting-history-dialog.vue @@ -0,0 +1,66 @@ + + + \ No newline at end of file diff --git a/app/components/app/resume/history-list/supporting-list.cfg.ts b/app/components/app/resume/history-list/supporting-list.cfg.ts new file mode 100644 index 00000000..f005042d --- /dev/null +++ b/app/components/app/resume/history-list/supporting-list.cfg.ts @@ -0,0 +1,39 @@ +import type { Config } from '~/components/pub/my-ui/data-table' +import type { Patient } from '~/models/patient' + +export const config: Config = { + cols: [{}, {}, {}, {}, {},], + + headers: [ + [ + { label: 'Tanggal Order' }, + { label: 'No Lab' }, + { label: 'Nama Pemeriksaan' }, + { label: 'Tanggal Pemeriksaan' }, + ], + ], + + keys: ['birth_date', 'person.name', 'person.name', 'birth_date',], + + parses: { + 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 + }, + }, + + components: { + }, + + htmls: { + // patient_address(_rec) { + // return '-' + // }, + }, +} diff --git a/app/components/app/resume/list.cfg.ts b/app/components/app/resume/list.cfg.ts new file mode 100644 index 00000000..b756b1ee --- /dev/null +++ b/app/components/app/resume/list.cfg.ts @@ -0,0 +1,101 @@ +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-dvvp.vue')) +const statusBadge = defineAsyncComponent(() => import('./_common/verify-badge.vue')) + +export const config: Config = { + cols: [{width: 140}, {}, {}, {width: 140}, {width: 10},], + + headers: [ + [ + { label: 'Tgl Simpan' }, + { label: 'DPJP' }, + { label: 'KSM' }, + { label: 'Status' }, + { label: 'Action' }, + ], + ], + + keys: ['birth_date', 'number', 'person.name', 'status', '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, + } + }, + status(rec, idx) { + return { + idx, + rec: rec as object, + component: statusBadge, + } + }, + }, + + 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..0d62cc6c --- /dev/null +++ b/app/components/app/resume/list.vue @@ -0,0 +1,31 @@ + + + \ No newline at end of file diff --git a/app/components/app/resume/verify-dialog.vue b/app/components/app/resume/verify-dialog.vue new file mode 100644 index 00000000..ca4fb554 --- /dev/null +++ b/app/components/app/resume/verify-dialog.vue @@ -0,0 +1,98 @@ + + + \ No newline at end of file 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 @@