-
diff --git a/app/pages/(features)/outpatient/polyclinic-queue/index.vue b/app/pages/(features)/outpatient/encounter-queue/index.vue
similarity index 100%
rename from app/pages/(features)/outpatient/polyclinic-queue/index.vue
rename to app/pages/(features)/outpatient/encounter-queue/index.vue
diff --git a/app/pages/(features)/outpatient/encounter/[id]/process.vue b/app/pages/(features)/outpatient/encounter/[id]/process.vue
new file mode 100644
index 00000000..dfe36eed
--- /dev/null
+++ b/app/pages/(features)/outpatient/encounter/[id]/process.vue
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+
diff --git a/app/pages/(features)/outpatient/encounter/add.vue b/app/pages/(features)/outpatient/encounter/add.vue
index 948b16c6..3f2c8245 100644
--- a/app/pages/(features)/outpatient/encounter/add.vue
+++ b/app/pages/(features)/outpatient/encounter/add.vue
@@ -1,41 +1,43 @@
-
-import type { PagePermission } from '~/models/role'
+import type { Permission } from '~/models/role'
+import { permissions } from '~/const/page-permission/outpatient'
import Error from '~/components/pub/my-ui/error/error.vue'
-import { PAGE_PERMISSIONS } from '~/lib/page-permission'
+
+import Content from '~/components/content/encounter/list.vue'
definePageMeta({
middleware: ['rbac'],
- roles: ['system', 'doctor', 'nurse', 'admisi', 'pharmacy', 'billing', 'management'],
+ roles: ['emp|reg', 'emp|nur', 'emp|doc', 'emp|miw', 'emp|thr', 'emp|nut', 'emp|pha', 'emp|lab'],
title: 'Daftar Kunjungan',
contentFrame: 'cf-full-width',
})
-const route = useRoute()
-
-useHead({
- title: () => route.meta.title as string,
-})
-
-const roleAccess: PagePermission = PAGE_PERMISSIONS['/outpatient/encounter']
-
+// Preps role checking
+const roleAccess: Record = permissions['/outpatient/encounter'] || {}
const { checkRole, hasReadAccess } = useRBAC()
// Check if user has access to this page
@@ -28,15 +24,28 @@ if (!hasAccess) {
// Define permission-based computed properties
const canRead = hasReadAccess(roleAccess)
+
+// Page needs
+const route = useRoute()
+useHead({
+ title: () => route.meta.title as string,
+})
+
+const { user, getActiveRole } = useUserStore()
+// const activeRole = getActiveRole()
+// const activeRoleParts = activeRole ? activeRole.split('|') : ['', '']
+// const activeRolePos = activeRoleParts[0] // reaching this page means it is already set
+// const activeRoleType = activeRoleParts[1] == 'rehab' ? activeRoleParts[1] : ''
+const subClassCode = user.unit_code == 'rehab' ? 'rehab' : 'reg'
+