diff --git a/app/components/app/prb/_common/btn-history.vue b/app/components/app/prb/_common/btn-history.vue new file mode 100644 index 00000000..972eab8e --- /dev/null +++ b/app/components/app/prb/_common/btn-history.vue @@ -0,0 +1,21 @@ + + + \ No newline at end of file diff --git a/app/components/app/prb/_common/filter.vue b/app/components/app/prb/_common/filter.vue new file mode 100644 index 00000000..d5e99b30 --- /dev/null +++ b/app/components/app/prb/_common/filter.vue @@ -0,0 +1,73 @@ + + + diff --git a/app/components/app/prb/_common/select-date.vue b/app/components/app/prb/_common/select-date.vue new file mode 100644 index 00000000..d94d04eb --- /dev/null +++ b/app/components/app/prb/_common/select-date.vue @@ -0,0 +1,119 @@ + + + diff --git a/app/components/app/prb/_common/select-dpjp.vue b/app/components/app/prb/_common/select-dpjp.vue new file mode 100644 index 00000000..9e83e64f --- /dev/null +++ b/app/components/app/prb/_common/select-dpjp.vue @@ -0,0 +1,86 @@ + + + diff --git a/app/components/app/prb/_common/select-medicine-form.vue b/app/components/app/prb/_common/select-medicine-form.vue new file mode 100644 index 00000000..9e83e64f --- /dev/null +++ b/app/components/app/prb/_common/select-medicine-form.vue @@ -0,0 +1,86 @@ + + + diff --git a/app/components/app/prb/_common/select-medicine.vue b/app/components/app/prb/_common/select-medicine.vue new file mode 100644 index 00000000..9e83e64f --- /dev/null +++ b/app/components/app/prb/_common/select-medicine.vue @@ -0,0 +1,86 @@ + + + diff --git a/app/components/app/prb/_common/select-program.vue b/app/components/app/prb/_common/select-program.vue new file mode 100644 index 00000000..cde3fb66 --- /dev/null +++ b/app/components/app/prb/_common/select-program.vue @@ -0,0 +1,77 @@ + + + diff --git a/app/components/app/prb/bpjs-list.cfg.ts b/app/components/app/prb/bpjs-list.cfg.ts new file mode 100644 index 00000000..92d68f73 --- /dev/null +++ b/app/components/app/prb/bpjs-list.cfg.ts @@ -0,0 +1,60 @@ +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-upd.vue')) + +export const config: Config = { + cols: [{}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {width: 50}, ], + + headers: [ + [ + { label: 'No. PRB' }, + { label: 'No. RM' }, + { label: 'Nama Pasien' }, + { label: 'Jenis Kelamin' }, + { label: 'Alamat' }, + { label: 'Klinik' }, + { label: 'Nama Dokter' }, + { label: 'Tanggal' }, + { label: 'Program PRB' }, + { label: 'No. SEP' }, + { label: 'Action' }, + ], + ], + + keys: ['date', 'name1', 'name2', 'name3', 'name4', 'name5', 'name6', 'name7', 'name8', 'name9', '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 + }, + }, + + components: { + action(rec, idx) { + return { + idx, + rec: rec as object, + component: action, + } + }, + }, + + htmls: { + + }, +} diff --git a/app/components/app/prb/detail.vue b/app/components/app/prb/detail.vue new file mode 100644 index 00000000..7e40366d --- /dev/null +++ b/app/components/app/prb/detail.vue @@ -0,0 +1,62 @@ + + + + + diff --git a/app/components/app/prb/entry.vue b/app/components/app/prb/entry.vue new file mode 100644 index 00000000..4658578a --- /dev/null +++ b/app/components/app/prb/entry.vue @@ -0,0 +1,102 @@ + + + diff --git a/app/components/app/prb/history-list.cfg.ts b/app/components/app/prb/history-list.cfg.ts new file mode 100644 index 00000000..6f571af3 --- /dev/null +++ b/app/components/app/prb/history-list.cfg.ts @@ -0,0 +1,62 @@ +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-print.vue')) +const statusBadge = defineAsyncComponent(() => import('~/components/pub/my-ui/badge/status-badge.vue')) + +export const config: Config = { + cols: [{}, {}, {}, {}, {}, {}, {width: 100}, {width: 50}, ], + + headers: [ + [ + { label: 'Tgl Diterbitkan' }, + { label: 'Kode Obat' }, + { label: 'Nama Obat' }, + { label: 'Signa' }, + { label: 'Jumlah' }, + { label: 'Durasi Pemberian' }, + { label: 'status' }, + { label: 'Action' }, + ], + ], + + keys: ['date', 'name1', 'name2', 'name3', 'name4', 'name5', '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 + }, + }, + + components: { + action(rec, idx) { + return { + idx, + rec: rec as object, + component: action, + } + }, + status(rec, idx) { + return { + idx, + rec: rec as object, + component: statusBadge, + } + }, + }, + + htmls: { + + }, +} diff --git a/app/components/app/prb/history-list.vue b/app/components/app/prb/history-list.vue new file mode 100644 index 00000000..20cc7eaf --- /dev/null +++ b/app/components/app/prb/history-list.vue @@ -0,0 +1,35 @@ + + + \ No newline at end of file diff --git a/app/components/app/prb/list.cfg.ts b/app/components/app/prb/list.cfg.ts new file mode 100644 index 00000000..4da07cdd --- /dev/null +++ b/app/components/app/prb/list.cfg.ts @@ -0,0 +1,56 @@ +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-upd.vue')) + +export const config: Config = { + cols: [{}, {}, {}, {}, {}, {}, {width: 50}, ], + + headers: [ + [ + { label: 'Tgl Diterbitkan' }, + { label: 'Kode Obat' }, + { label: 'Nama Obat' }, + { label: 'Signa' }, + { label: 'Jumlah' }, + { label: 'Durasi Pemberian' }, + { label: 'Action' }, + ], + ], + + keys: ['date', 'name1', 'name2', 'name3', 'name4', 'name5', '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 + }, + }, + + components: { + action(rec, idx) { + return { + idx, + rec: rec as object, + component: action, + } + }, + }, + + htmls: { + + }, +} diff --git a/app/components/app/prb/list.vue b/app/components/app/prb/list.vue new file mode 100644 index 00000000..5e51b50f --- /dev/null +++ b/app/components/app/prb/list.vue @@ -0,0 +1,34 @@ + + + diff --git a/app/components/app/prb/obat-picker/form.vue b/app/components/app/prb/obat-picker/form.vue new file mode 100644 index 00000000..510cae69 --- /dev/null +++ b/app/components/app/prb/obat-picker/form.vue @@ -0,0 +1,114 @@ + + + \ No newline at end of file diff --git a/app/components/app/prb/obat-picker/picker-dialog.vue b/app/components/app/prb/obat-picker/picker-dialog.vue new file mode 100644 index 00000000..69ea3b90 --- /dev/null +++ b/app/components/app/prb/obat-picker/picker-dialog.vue @@ -0,0 +1,140 @@ + + + diff --git a/app/components/app/prb/sep-picker/list.cfg.ts b/app/components/app/prb/sep-picker/list.cfg.ts new file mode 100644 index 00000000..5a928e2d --- /dev/null +++ b/app/components/app/prb/sep-picker/list.cfg.ts @@ -0,0 +1,83 @@ +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-choose.vue')) +const statusBadge = defineAsyncComponent(() => import('~/components/pub/my-ui/badge/status-badge.vue')) + +export const config: Config = { + cols: [ + { width: 120 }, // TGL. SEP + { width: 150 }, // NO. SEP + { width: 120 }, // PELAYANAN + { width: 100 }, // JALUR + { width: 150 }, // NO. RM + { width: 200 }, // NAMA PASIEN + { width: 150 }, // NO. KARTU BPJS + { width: 150 }, // NO. SURAT KONTROL + { width: 150 }, // TGL SURAT KONTROL + { width: 150 }, // KLINIK TUJUAN + { width: 200 }, // DPJP + { width: 200 }, // DIAGNOSIS AWAL + { width: 100 }, // AKSI + ], + + headers: [ + [ + { label: 'TGL. SEP' }, + { label: 'NO. SEP' }, + { label: 'PELAYANAN' }, + { label: 'JALUR' }, + { label: 'NO. RM' }, + { label: 'NAMA PASIEN' }, + { label: 'NO. KARTU BPJS' }, + { label: 'NO. SURAT KONTROL' }, + { label: 'TGL SURAT KONTROL' }, + { label: 'KLINIK TUJUAN' }, + { label: 'DPJP' }, + { label: 'DIAGNOSIS AWAL' }, + { label: 'AKSI' }, + ], + ], + + keys: [ + 'letterDate', + 'letterNumber', + 'serviceType', + 'flow', + 'medicalRecordNumber', + 'patientName', + 'cardNumber', + 'controlLetterNumber', + 'controlLetterDate', + 'clinicDestination', + 'attendingDoctor', + 'diagnosis', + 'action', + ], + + delKeyNames: [ + { key: 'letterNumber', label: 'NO. SEP' }, + { key: 'patientName', label: 'Nama Pasien' }, + ], + + parses: {}, + + components: { + action(rec, idx) { + return { + idx, + rec: rec as object, + component: action, + } + }, + status(rec, idx) { + return { + idx, + rec: rec as object, + component: statusBadge, + } + }, + }, + + htmls: {}, +} \ No newline at end of file diff --git a/app/components/app/prb/sep-picker/list.vue b/app/components/app/prb/sep-picker/list.vue new file mode 100644 index 00000000..9c8aa593 --- /dev/null +++ b/app/components/app/prb/sep-picker/list.vue @@ -0,0 +1,53 @@ + + + diff --git a/app/components/app/prb/sep-picker/picker-dialog.vue b/app/components/app/prb/sep-picker/picker-dialog.vue new file mode 100644 index 00000000..efb32023 --- /dev/null +++ b/app/components/app/prb/sep-picker/picker-dialog.vue @@ -0,0 +1,141 @@ + + + diff --git a/app/components/app/vaccine-data/_common/select-date.vue b/app/components/app/vaccine-data/_common/select-date.vue new file mode 100644 index 00000000..d94d04eb --- /dev/null +++ b/app/components/app/vaccine-data/_common/select-date.vue @@ -0,0 +1,119 @@ + + + diff --git a/app/components/app/vaccine-data/_common/select-vaccine-type.vue b/app/components/app/vaccine-data/_common/select-vaccine-type.vue new file mode 100644 index 00000000..cde3fb66 --- /dev/null +++ b/app/components/app/vaccine-data/_common/select-vaccine-type.vue @@ -0,0 +1,77 @@ + + + diff --git a/app/components/app/vaccine-data/detail.vue b/app/components/app/vaccine-data/detail.vue new file mode 100644 index 00000000..2c79e461 --- /dev/null +++ b/app/components/app/vaccine-data/detail.vue @@ -0,0 +1,68 @@ + + + + + diff --git a/app/components/app/vaccine-data/entry.vue b/app/components/app/vaccine-data/entry.vue new file mode 100644 index 00000000..4b8f291b --- /dev/null +++ b/app/components/app/vaccine-data/entry.vue @@ -0,0 +1,82 @@ + + + diff --git a/app/components/app/vaccine-data/list-doctor.cfg.ts b/app/components/app/vaccine-data/list-doctor.cfg.ts new file mode 100644 index 00000000..be938aa5 --- /dev/null +++ b/app/components/app/vaccine-data/list-doctor.cfg.ts @@ -0,0 +1,53 @@ +import type { Config } from '~/components/pub/my-ui/data-table' +import { defineAsyncComponent } from 'vue' +import actionDoctor from '~/components/pub/my-ui/data/dropdown-action-dd.vue' +import actionNursePhysio from '~/components/pub/my-ui/data/dropdown-action-detail.vue' + +const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-dd.vue')) + +export const config: Config = { + cols: [{}, {}, {}, {}, {width: 50}, ], + + headers: [ + [ + { label: 'Jenis Vaksin' }, + { label: 'Tanggal Pemberian Vaksin' }, + { label: 'Tanggal Kedaluwarsa Vaksin' }, + { label: 'Dosis Ke' }, + { label: 'Action' }, + ], + ], + + keys: ['name1', 'date', 'date', 'name2', '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 + }, + }, + + components: { + action(rec, idx) { + return { + idx, + rec: rec as object, + component: action, + } + }, + }, + + htmls: { + + }, +} diff --git a/app/components/app/vaccine-data/list-nurse-physio.cfg.ts b/app/components/app/vaccine-data/list-nurse-physio.cfg.ts new file mode 100644 index 00000000..acfc698c --- /dev/null +++ b/app/components/app/vaccine-data/list-nurse-physio.cfg.ts @@ -0,0 +1,53 @@ +import type { Config } from '~/components/pub/my-ui/data-table' +import { defineAsyncComponent } from 'vue' +import actionDoctor from '~/components/pub/my-ui/data/dropdown-action-dd.vue' +import actionNursePhysio from '~/components/pub/my-ui/data/dropdown-action-detail.vue' + +const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-detail.vue')) + +export const config: Config = { + cols: [{}, {}, {}, {}, {width: 50}, ], + + headers: [ + [ + { label: 'Jenis Vaksin' }, + { label: 'Tanggal Pemberian Vaksin' }, + { label: 'Tanggal Kedaluwarsa Vaksin' }, + { label: 'Dosis Ke' }, + { label: 'Action' }, + ], + ], + + keys: ['name1', 'date', 'date', 'name2', '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 + }, + }, + + components: { + action(rec, idx) { + return { + idx, + rec: rec as object, + component: action, + } + }, + }, + + htmls: { + + }, +} diff --git a/app/components/app/vaccine-data/list.vue b/app/components/app/vaccine-data/list.vue new file mode 100644 index 00000000..7960112b --- /dev/null +++ b/app/components/app/vaccine-data/list.vue @@ -0,0 +1,41 @@ + + + diff --git a/app/components/content/control-letter/list.vue b/app/components/content/control-letter/list.vue index 9be22012..5a879eb4 100644 --- a/app/components/content/control-letter/list.vue +++ b/app/components/content/control-letter/list.vue @@ -143,7 +143,7 @@ watch([recId, recAction, timestamp], () => { break case ActionEvents.showEdit: - if(pagePermission.canUpdate){ + if(pagePermission.canUpdate){ navigateTo({ name: 'rehab-encounter-id-control-letter-control_letter_id-edit', params: { id: encounterId, "control_letter_id": recId.value }, @@ -186,7 +186,7 @@ watch([recId, recAction, timestamp], () => { @click="isHistoryDialogOpen = true"> Riwayat Program Nasional - + @@ -212,7 +212,7 @@ watch([recId, recAction, timestamp], () => { - + diff --git a/app/components/content/encounter/process.vue b/app/components/content/encounter/process.vue index b7513be1..b298c92f 100644 --- a/app/components/content/encounter/process.vue +++ b/app/components/content/encounter/process.vue @@ -214,4 +214,4 @@ async function getData() { @change-menu="activeMenu = $event" /> - + \ No newline at end of file diff --git a/app/components/content/prb/bpjs-list.vue b/app/components/content/prb/bpjs-list.vue new file mode 100644 index 00000000..8ce0d050 --- /dev/null +++ b/app/components/content/prb/bpjs-list.vue @@ -0,0 +1,225 @@ + + + diff --git a/app/components/content/prb/detail.vue b/app/components/content/prb/detail.vue new file mode 100644 index 00000000..4de8f260 --- /dev/null +++ b/app/components/content/prb/detail.vue @@ -0,0 +1,65 @@ + + + diff --git a/app/components/content/prb/entry.vue b/app/components/content/prb/entry.vue new file mode 100644 index 00000000..244c49b0 --- /dev/null +++ b/app/components/content/prb/entry.vue @@ -0,0 +1,160 @@ + + + + + diff --git a/app/components/content/prb/list.vue b/app/components/content/prb/list.vue new file mode 100644 index 00000000..a1c09696 --- /dev/null +++ b/app/components/content/prb/list.vue @@ -0,0 +1,202 @@ + + + diff --git a/app/components/content/vaccine-data/detail.vue b/app/components/content/vaccine-data/detail.vue new file mode 100644 index 00000000..fd977b39 --- /dev/null +++ b/app/components/content/vaccine-data/detail.vue @@ -0,0 +1,65 @@ + + + diff --git a/app/components/content/vaccine-data/entry.vue b/app/components/content/vaccine-data/entry.vue new file mode 100644 index 00000000..60fe3775 --- /dev/null +++ b/app/components/content/vaccine-data/entry.vue @@ -0,0 +1,159 @@ + + + + + diff --git a/app/components/content/vaccine-data/list.vue b/app/components/content/vaccine-data/list.vue new file mode 100644 index 00000000..a701271e --- /dev/null +++ b/app/components/content/vaccine-data/list.vue @@ -0,0 +1,165 @@ + + + diff --git a/app/components/pub/my-ui/data/dropdown-action-choose.vue b/app/components/pub/my-ui/data/dropdown-action-choose.vue new file mode 100644 index 00000000..8fb63f33 --- /dev/null +++ b/app/components/pub/my-ui/data/dropdown-action-choose.vue @@ -0,0 +1,30 @@ + + + diff --git a/app/components/pub/my-ui/data/dropdown-action-detail.vue b/app/components/pub/my-ui/data/dropdown-action-detail.vue new file mode 100644 index 00000000..b695fb5c --- /dev/null +++ b/app/components/pub/my-ui/data/dropdown-action-detail.vue @@ -0,0 +1,30 @@ + + + diff --git a/app/components/pub/my-ui/data/dropdown-action-print.vue b/app/components/pub/my-ui/data/dropdown-action-print.vue new file mode 100644 index 00000000..99a7da03 --- /dev/null +++ b/app/components/pub/my-ui/data/dropdown-action-print.vue @@ -0,0 +1,31 @@ + + + diff --git a/app/components/pub/my-ui/data/dropdown-action-upd.vue b/app/components/pub/my-ui/data/dropdown-action-upd.vue new file mode 100644 index 00000000..611e53d2 --- /dev/null +++ b/app/components/pub/my-ui/data/dropdown-action-upd.vue @@ -0,0 +1,94 @@ + + + diff --git a/app/handlers/encounter-init.handler.ts b/app/handlers/encounter-init.handler.ts index e198a89a..b015b357 100644 --- a/app/handlers/encounter-init.handler.ts +++ b/app/handlers/encounter-init.handler.ts @@ -49,6 +49,10 @@ const DocUploadListAsync = defineAsyncComponent(() => import('~/components/conte const GeneralConsentListAsync = defineAsyncComponent(() => import('~/components/content/general-consent/entry.vue')) const ResumeListAsync = defineAsyncComponent(() => import('~/components/content/resume/list.vue')) const ControlLetterListAsync = defineAsyncComponent(() => import('~/components/content/control-letter/list.vue')) +const KfrListAsync = defineAsyncComponent(() => import('~/components/content/kfr/list.vue')) +const PrbListAsync = defineAsyncComponent(() => import('~/components/content/prb/list.vue')) +const SurgeryReportListAsync = defineAsyncComponent(() => import('~/components/content/surgery-report/list.vue')) +const VaccineDataListAsync = defineAsyncComponent(() => import('~/components/content/vaccine-data/list.vue')) const InitialNursingStudyAsync = defineAsyncComponent(() => import('~/components/content/initial-nursing/entry.vue')) const defaultKeys: Record = { @@ -189,8 +193,8 @@ const defaultKeys: Record = { classCode: ['ambulatory', 'emergency', 'inpatient'], unit: 'all', }, - vacsinData: { - id: 'vacsin-data', + vaccineData: { + id: 'vaccine-data', title: 'Data Vaksin', classCode: ['ambulatory', 'emergency', 'inpatient'], unit: 'all', @@ -212,7 +216,13 @@ const defaultKeys: Record = { title: 'SPRI', classCode: ['ambulatory', 'emergency'], unit: 'all', - }, + }, + kfr: { + id: 'kfr', + title: 'KFR', + classCode: ['ambulatory', 'emergency', 'inpatient'], + unit: 'all', + }, refBack: { id: 'reference-back', title: 'PRB', @@ -394,15 +404,31 @@ export function injectComponents(id: string | number, data: EncounterListData, m currentKeys.resume['component'] = ResumeListAsync currentKeys.resume['props'] = { encounter_id: id } } - if (currentKeys?.control) { - currentKeys.control['component'] = ControlLetterListAsync - currentKeys.control['props'] = { encounter: data?.encounter } + if (currentKeys?.controlLetter) { + currentKeys.controlLetter['component'] = ControlLetterListAsync + currentKeys.controlLetter['props'] = { encounter: data?.encounter } + } + if (currentKeys?.refBack) { + currentKeys.refBack['component'] = PrbListAsync + currentKeys.refBack['props'] = { encounter: data?.encounter } + } + if (currentKeys?.kfr) { + currentKeys.kfr['component'] = KfrListAsync + currentKeys.kfr['props'] = { encounter: data?.encounter } } if (currentKeys?.screening) { // TODO: add component for screening currentKeys.screening['component'] = null currentKeys.screening['props'] = { encounter_id: id } } + if (currentKeys?.surgeryReport) { + currentKeys.surgeryReport['component'] = SurgeryReportListAsync + currentKeys.surgeryReport['props'] = { encounter: data?.encounter } + } + if (currentKeys?.vaccineData) { + currentKeys.vaccineData['component'] = VaccineDataListAsync + currentKeys.vaccineData['props'] = { encounter: data?.encounter } + } if (currentKeys?.supportingDocument) { currentKeys.supportingDocument['component'] = DocUploadListAsync currentKeys.supportingDocument['props'] = { encounter_id: id } @@ -497,8 +523,13 @@ export function mapResponseToEncounter(result: any): any { return mapped } -export function getMenuItems(id: string | number, props: any, user: any, data: EncounterListData, meta: any) { - console.log(props) +export function getMenuItems( + id: string | number, + props: any, + user: any, + data: EncounterListData, + meta: any, +) { // const normalClassCode = props.classCode === 'ambulatory' ? 'outpatient' : props.classCode const normalClassCode = props.classCode === 'ambulatory' ? 'ambulatory' : props.classCode const currentKeys = injectComponents(id, data, meta) diff --git a/app/handlers/prb.handler.ts b/app/handlers/prb.handler.ts new file mode 100644 index 00000000..bfff163b --- /dev/null +++ b/app/handlers/prb.handler.ts @@ -0,0 +1,24 @@ +// Handlers +import { genCrudHandler } from '~/handlers/_handler' + +// Services +import { create, update, remove } from '~/services/prb.service' + +export const { + recId, + recAction, + recItem, + isReadonly, + isProcessing, + isFormEntryDialogOpen, + isRecordConfirmationOpen, + onResetState, + handleActionSave, + handleActionEdit, + handleActionRemove, + handleCancelForm, +} = genCrudHandler({ + create, + update, + remove, +}) diff --git a/app/handlers/vaccine-data.handler.ts b/app/handlers/vaccine-data.handler.ts new file mode 100644 index 00000000..7f5fa1b6 --- /dev/null +++ b/app/handlers/vaccine-data.handler.ts @@ -0,0 +1,24 @@ +// Handlers +import { genCrudHandler } from '~/handlers/_handler' + +// Services +import { create, update, remove } from '~/services/vaccine-data.service' + +export const { + recId, + recAction, + recItem, + isReadonly, + isProcessing, + isFormEntryDialogOpen, + isRecordConfirmationOpen, + onResetState, + handleActionSave, + handleActionEdit, + handleActionRemove, + handleCancelForm, +} = genCrudHandler({ + create, + update, + remove, +}) diff --git a/app/lib/constants.ts b/app/lib/constants.ts index cd62f150..b827ef40 100644 --- a/app/lib/constants.ts +++ b/app/lib/constants.ts @@ -488,4 +488,16 @@ export const SpecimenTypeOptList: { label: string; value: SpecimenType }[] = [ { label: 'Mikrobiologi', value: 'mikrobiologi' }, { label: 'Laborat', value: 'laborat' }, { label: 'Tidak perlu', value: 'tidak perlu' }, +] + +export type PrbProgramType = "ashma" | "diabetes mellitus" | "hipertensi" | "penyakit jantung" | "ppok" | "schizopherenia" | "stroke" | "systemic lupus erythematosus" +export const PrbProgramTypeOptList: { label: string; value: PrbProgramType }[] = [ + { label: 'ASHMA', value: 'ashma' }, + { label: 'Diabetes Mellitus', value: 'diabetes mellitus' }, + { label: 'Hipertensi', value: 'hipertensi' }, + { label: 'Penyakit Jantung', value: 'penyakit jantung' }, + { label: 'PPOK (Penyakit Paru Obstruktif Kronik)', value: 'ppok' }, + { label: 'Schizopherenia', value: 'schizopherenia' }, + { label: 'Stroke', value: 'stroke' }, + { label: 'Systemic Lupus Erythematosus', value: 'systemic lupus erythematosus' }, ] \ No newline at end of file diff --git a/app/lib/utils.ts b/app/lib/utils.ts index e201a439..180320ae 100644 --- a/app/lib/utils.ts +++ b/app/lib/utils.ts @@ -1,5 +1,6 @@ import type { ClassValue } from 'clsx' import { clsx } from 'clsx' +import { format } from 'date-fns' import { twMerge } from 'tailwind-merge' import { toast } from '~/components/pub/ui/toast' @@ -106,6 +107,11 @@ export function calculateAge(birthDate: Date | string | null | undefined): strin } } +export function formatDateToDatetimeLocal(inputDate: Date) { + const formattedString = format(inputDate, "yyyy-MM-dd'T'HH:mm") + return formattedString +} + /** * Converts a plain JavaScript object (including File objects) into a FormData instance. diff --git a/app/models/prb.ts b/app/models/prb.ts new file mode 100644 index 00000000..2997b5b3 --- /dev/null +++ b/app/models/prb.ts @@ -0,0 +1,37 @@ +import { type Base, genBase } from "./_base" +import { genDoctor, type Doctor } from "./doctor" +import { genEncounter, type Encounter } from "./encounter" +import { genSpecialist, type Specialist } from "./specialist" +import { genSubspecialist, type Subspecialist } from "./subspecialist" +import { genUnit, type Unit } from "./unit" + +export interface Prb extends Base { + encounter_id: number + encounter: Encounter + unit_id: number + unit: Unit + specialist_id: number + specialist: Specialist + subspecialist_id: number + subspecialist: Subspecialist + doctor_id: number + doctor: Doctor + date: '' +} + +export function genPrb(): Prb { + return { + ...genBase(), + encounter_id: 0, + encounter: genEncounter(), + unit_id: 0, + unit: genUnit(), + specialist_id: 0, + specialist: genSpecialist(), + subspecialist_id: 0, + subspecialist: genSubspecialist(), + doctor_id: 0, + doctor: genDoctor(), + date: '' + } +} diff --git a/app/models/vaccine-data.ts b/app/models/vaccine-data.ts new file mode 100644 index 00000000..86032b2a --- /dev/null +++ b/app/models/vaccine-data.ts @@ -0,0 +1,37 @@ +import { type Base, genBase } from "./_base" +import { genDoctor, type Doctor } from "./doctor" +import { genEncounter, type Encounter } from "./encounter" +import { genSpecialist, type Specialist } from "./specialist" +import { genSubspecialist, type Subspecialist } from "./subspecialist" +import { genUnit, type Unit } from "./unit" + +export interface VaccineData extends Base { + encounter_id: number + encounter: Encounter + unit_id: number + unit: Unit + specialist_id: number + specialist: Specialist + subspecialist_id: number + subspecialist: Subspecialist + doctor_id: number + doctor: Doctor + date: '' +} + +export function genVaccineData(): VaccineData { + return { + ...genBase(), + encounter_id: 0, + encounter: genEncounter(), + unit_id: 0, + unit: genUnit(), + specialist_id: 0, + specialist: genSpecialist(), + subspecialist_id: 0, + subspecialist: genSubspecialist(), + doctor_id: 0, + doctor: genDoctor(), + date: '' + } +} diff --git a/app/pages/(features)/integration/bpjs/prb/[prb_id]/edit.vue b/app/pages/(features)/integration/bpjs/prb/[prb_id]/edit.vue new file mode 100644 index 00000000..abf741bf --- /dev/null +++ b/app/pages/(features)/integration/bpjs/prb/[prb_id]/edit.vue @@ -0,0 +1,41 @@ + + + diff --git a/app/pages/(features)/integration/bpjs/prb/[prb_id]/index.vue b/app/pages/(features)/integration/bpjs/prb/[prb_id]/index.vue new file mode 100644 index 00000000..1d66b563 --- /dev/null +++ b/app/pages/(features)/integration/bpjs/prb/[prb_id]/index.vue @@ -0,0 +1,41 @@ + + + diff --git a/app/pages/(features)/integration/bpjs/prb/add.vue b/app/pages/(features)/integration/bpjs/prb/add.vue new file mode 100644 index 00000000..19b029f9 --- /dev/null +++ b/app/pages/(features)/integration/bpjs/prb/add.vue @@ -0,0 +1,41 @@ + + + diff --git a/app/pages/(features)/integration/bpjs/prb/index.vue b/app/pages/(features)/integration/bpjs/prb/index.vue new file mode 100644 index 00000000..7a6ca683 --- /dev/null +++ b/app/pages/(features)/integration/bpjs/prb/index.vue @@ -0,0 +1,41 @@ + + + diff --git a/app/pages/(features)/rehab/encounter/[id]/document-upload/[document_id]/edit.vue b/app/pages/(features)/rehab/encounter/[id]/document-upload/[document_id]/edit.vue new file mode 100644 index 00000000..e06920ba --- /dev/null +++ b/app/pages/(features)/rehab/encounter/[id]/document-upload/[document_id]/edit.vue @@ -0,0 +1,41 @@ + + + \ No newline at end of file diff --git a/app/pages/(features)/rehab/encounter/[id]/document-upload/add.vue b/app/pages/(features)/rehab/encounter/[id]/document-upload/add.vue new file mode 100644 index 00000000..fcc7432e --- /dev/null +++ b/app/pages/(features)/rehab/encounter/[id]/document-upload/add.vue @@ -0,0 +1,42 @@ + + + \ No newline at end of file diff --git a/app/pages/(features)/rehab/encounter/[id]/prb/[prb_id]/edit.vue b/app/pages/(features)/rehab/encounter/[id]/prb/[prb_id]/edit.vue new file mode 100644 index 00000000..e1059769 --- /dev/null +++ b/app/pages/(features)/rehab/encounter/[id]/prb/[prb_id]/edit.vue @@ -0,0 +1,41 @@ + + + diff --git a/app/pages/(features)/rehab/encounter/[id]/prb/[prb_id]/index.vue b/app/pages/(features)/rehab/encounter/[id]/prb/[prb_id]/index.vue new file mode 100644 index 00000000..1d66b563 --- /dev/null +++ b/app/pages/(features)/rehab/encounter/[id]/prb/[prb_id]/index.vue @@ -0,0 +1,41 @@ + + + diff --git a/app/pages/(features)/rehab/encounter/[id]/prb/add.vue b/app/pages/(features)/rehab/encounter/[id]/prb/add.vue new file mode 100644 index 00000000..b168fcb5 --- /dev/null +++ b/app/pages/(features)/rehab/encounter/[id]/prb/add.vue @@ -0,0 +1,41 @@ + + + diff --git a/app/pages/(features)/rehab/encounter/[id]/process.vue b/app/pages/(features)/rehab/encounter/[id]/process.vue index 68cc7c02..49a5dd6d 100644 --- a/app/pages/(features)/rehab/encounter/[id]/process.vue +++ b/app/pages/(features)/rehab/encounter/[id]/process.vue @@ -35,7 +35,7 @@ const pagePermission = getPagePermissions(roleAccess)