diff --git a/app/components/app/outpatient/encounter/_common/select-date.vue b/app/components/app/outpatient/encounter/_common/select-date.vue new file mode 100644 index 00000000..5ab4ffc1 --- /dev/null +++ b/app/components/app/outpatient/encounter/_common/select-date.vue @@ -0,0 +1,117 @@ + + + diff --git a/app/components/app/outpatient/encounter/_common/select-dpjp.vue b/app/components/app/outpatient/encounter/_common/select-dpjp.vue new file mode 100644 index 00000000..0852195b --- /dev/null +++ b/app/components/app/outpatient/encounter/_common/select-dpjp.vue @@ -0,0 +1,70 @@ + + + diff --git a/app/components/app/outpatient/encounter/_common/select-speciality.vue b/app/components/app/outpatient/encounter/_common/select-speciality.vue new file mode 100644 index 00000000..0852195b --- /dev/null +++ b/app/components/app/outpatient/encounter/_common/select-speciality.vue @@ -0,0 +1,70 @@ + + + diff --git a/app/components/app/outpatient/encounter/entry-form.vue b/app/components/app/outpatient/encounter/entry-form.vue new file mode 100644 index 00000000..b9d77b9e --- /dev/null +++ b/app/components/app/outpatient/encounter/entry-form.vue @@ -0,0 +1,69 @@ + + + diff --git a/app/components/app/outpatient/encounter/list.cfg.ts b/app/components/app/outpatient/encounter/list.cfg.ts new file mode 100644 index 00000000..38f8f5d7 --- /dev/null +++ b/app/components/app/outpatient/encounter/list.cfg.ts @@ -0,0 +1,93 @@ +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: 3},], + + headers: [ + [ + { label: 'Tgl Rencana Kontrol' }, + { label: 'Spesialis/Sub Spesialis' }, + { label: 'DPJP' }, + { label: 'Status SEP' }, + { label: 'Action' }, + ], + ], + + keys: ['birth_date', 'number', 'person.name', 'birth_date', '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, + } + }, + }, + + htmls: { + patient_address(_rec) { + return '-' + }, + }, +} diff --git a/app/components/app/outpatient/encounter/list.vue b/app/components/app/outpatient/encounter/list.vue new file mode 100644 index 00000000..8274e752 --- /dev/null +++ b/app/components/app/outpatient/encounter/list.vue @@ -0,0 +1,31 @@ + + + diff --git a/app/components/app/outpatient/encounter/preview.vue b/app/components/app/outpatient/encounter/preview.vue new file mode 100644 index 00000000..5ee6e2bd --- /dev/null +++ b/app/components/app/outpatient/encounter/preview.vue @@ -0,0 +1,94 @@ + + + + + diff --git a/app/components/content/encounter/process.vue b/app/components/content/encounter/process.vue index 4779f6ec..ecca42ba 100644 --- a/app/components/content/encounter/process.vue +++ b/app/components/content/encounter/process.vue @@ -15,6 +15,7 @@ import EarlyMedicalRehabList from '~/components/content/soapi/entry.vue' import PrescriptionList from '~/components/content/prescription/list.vue' import Status from '~/components/app/encounter/status.vue' import Consultation from '~/components/content/consultation/list.vue' +import EncounterList from '~/components/content/outpatient/encounter/list.vue' const route = useRoute() const router = useRouter() @@ -58,7 +59,7 @@ const tabs: TabItem[] = [ { value: 'mcu-result', label: 'Hasil Penunjang' }, { value: 'consultation', label: 'Konsultasi', component: Consultation, props: { encounter: data } }, { value: 'resume', label: 'Resume' }, - { value: 'control', label: 'Surat Kontrol' }, + { value: 'control', label: 'Surat Kontrol', component: EncounterList, props: { encounter: data } }, { value: 'screening', label: 'Skrinning MPP' }, { value: 'supporting-document', label: 'Upload Dokumen Pendukung' }, ] diff --git a/app/components/content/outpatient/encounter/add.vue b/app/components/content/outpatient/encounter/add.vue new file mode 100644 index 00000000..5e10c374 --- /dev/null +++ b/app/components/content/outpatient/encounter/add.vue @@ -0,0 +1,131 @@ + + + + + diff --git a/app/components/content/outpatient/encounter/detail.vue b/app/components/content/outpatient/encounter/detail.vue new file mode 100644 index 00000000..7ba1c7ef --- /dev/null +++ b/app/components/content/outpatient/encounter/detail.vue @@ -0,0 +1,78 @@ + + + diff --git a/app/components/content/outpatient/encounter/edit.vue b/app/components/content/outpatient/encounter/edit.vue new file mode 100644 index 00000000..067720fe --- /dev/null +++ b/app/components/content/outpatient/encounter/edit.vue @@ -0,0 +1,150 @@ + + + + + diff --git a/app/components/content/outpatient/encounter/list.vue b/app/components/content/outpatient/encounter/list.vue new file mode 100644 index 00000000..c087768e --- /dev/null +++ b/app/components/content/outpatient/encounter/list.vue @@ -0,0 +1,181 @@ + + + diff --git a/app/components/content/sep/list.vue b/app/components/content/sep/list.vue index 9a6cd8db..bb4165a0 100644 --- a/app/components/content/sep/list.vue +++ b/app/components/content/sep/list.vue @@ -123,7 +123,7 @@ const headerPrep: HeaderPrep = { addNav: { label: 'Tambah', onClick: () => { - navigateTo('/bpjs/sep/add') + navigateTo('/integration/bpjs/sep/add') }, }, } diff --git a/app/components/pub/my-ui/confirmation/confirmation.vue b/app/components/pub/my-ui/confirmation/confirmation.vue index 590f328d..b5c328aa 100644 --- a/app/components/pub/my-ui/confirmation/confirmation.vue +++ b/app/components/pub/my-ui/confirmation/confirmation.vue @@ -71,7 +71,7 @@ function handleCancel() {
-
+

diff --git a/app/components/pub/my-ui/nav-footer/ba-dr-su.vue b/app/components/pub/my-ui/nav-footer/ba-dr-su.vue index 17dbd6dc..e5bbc8f1 100644 --- a/app/components/pub/my-ui/nav-footer/ba-dr-su.vue +++ b/app/components/pub/my-ui/nav-footer/ba-dr-su.vue @@ -1,6 +1,14 @@ + + diff --git a/app/pages/(features)/outpatient/encounter/[id]/index.vue b/app/pages/(features)/outpatient/encounter/[id]/index.vue new file mode 100644 index 00000000..1864cf2c --- /dev/null +++ b/app/pages/(features)/outpatient/encounter/[id]/index.vue @@ -0,0 +1,41 @@ + + + diff --git a/app/pages/(features)/outpatient/encounter/add.vue b/app/pages/(features)/outpatient/encounter/add.vue new file mode 100644 index 00000000..2da7d15e --- /dev/null +++ b/app/pages/(features)/outpatient/encounter/add.vue @@ -0,0 +1,42 @@ + + + diff --git a/app/pages/(features)/outpatient/encounter/index.vue b/app/pages/(features)/outpatient/encounter/index.vue index 50485cec..0ecdfda8 100644 --- a/app/pages/(features)/outpatient/encounter/index.vue +++ b/app/pages/(features)/outpatient/encounter/index.vue @@ -1,10 +1,41 @@ diff --git a/app/pages/(features)/rehab/encounter/[id]/process.vue b/app/pages/(features)/rehab/encounter/[id]/process.vue index 3fa7525a..abd0efa7 100644 --- a/app/pages/(features)/rehab/encounter/[id]/process.vue +++ b/app/pages/(features)/rehab/encounter/[id]/process.vue @@ -22,15 +22,15 @@ const { checkRole, hasCreateAccess } = useRBAC() // Check if user has access to this page const hasAccess = checkRole(roleAccess) -if (!hasAccess) { - throw createError({ - statusCode: 403, - statusMessage: 'Access denied', - }) -} +// if (!hasAccess) { +// throw createError({ +// statusCode: 403, +// statusMessage: 'Access denied', +// }) +// } // Define permission-based computed properties -const canCreate = hasCreateAccess(roleAccess) +const canCreate = true // hasCreateAccess(roleAccess)