feat/role-check: wip
This commit is contained in:
No files matched your search
@@ -89,10 +89,10 @@ function proceedItem(action: string) {
|
|||||||
|
|
||||||
function getLinks() {
|
function getLinks() {
|
||||||
switch (activeServicePosition.value) {
|
switch (activeServicePosition.value) {
|
||||||
case 'medical':
|
case 'med':
|
||||||
linkItemsFiltered.value = baseLinkItems.filter((item) => item.groups?.includes('medical'))
|
linkItemsFiltered.value = baseLinkItems.filter((item) => item.groups?.includes('medical'))
|
||||||
break
|
break
|
||||||
case 'registration':
|
case 'reg':
|
||||||
linkItemsFiltered.value = baseLinkItems.filter((item) => item.groups?.includes('registration'))
|
linkItemsFiltered.value = baseLinkItems.filter((item) => item.groups?.includes('registration'))
|
||||||
break
|
break
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ import ConfirmationInfo from '~/components/app/device-order/confirmation-info.vu
|
|||||||
// Props
|
// Props
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
encounter_id: number
|
encounter_id: number
|
||||||
|
canUpdate?: boolean
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
const encounter_id = props.encounter_id
|
const encounter_id = props.encounter_id
|
||||||
@@ -153,7 +154,7 @@ function pickItem(): DeviceOrder | null {
|
|||||||
:pagination-meta="paginationMeta"
|
:pagination-meta="paginationMeta"
|
||||||
@page-change="handlePageChange"
|
@page-change="handlePageChange"
|
||||||
/>
|
/>
|
||||||
<!--
|
<!--
|
||||||
@cancel="cancel"
|
@cancel="cancel"
|
||||||
@edit="edit"
|
@edit="edit"
|
||||||
@submit="submit"
|
@submit="submit"
|
||||||
|
|||||||
@@ -15,6 +15,8 @@ import CheckOutView from '~/components/app/encounter/check-out-view.vue'
|
|||||||
import CheckOutEntry from '~/components/app/encounter/check-out-entry.vue'
|
import CheckOutEntry from '~/components/app/encounter/check-out-entry.vue'
|
||||||
import type { Encounter } from '~/models/encounter'
|
import type { Encounter } from '~/models/encounter'
|
||||||
import { checkIn } from '~/services/encounter.service'
|
import { checkIn } from '~/services/encounter.service'
|
||||||
|
import { getServicePosition } from '~/lib/roles'
|
||||||
|
import type { Item } from '~/components/pub/my-ui/combobox'
|
||||||
|
|
||||||
//
|
//
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
@@ -22,11 +24,24 @@ const props = defineProps<{
|
|||||||
canUpdate?: boolean
|
canUpdate?: boolean
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
|
//
|
||||||
|
const { user } = useUserStore()
|
||||||
|
const servicePosition = user.user_contractPosition_code == 'emp' ? getServicePosition('emp|'+user.employee_position_code) : null
|
||||||
|
// const subClassCode = servicePosition == 'chemo' ? 'chemo' : null
|
||||||
|
|
||||||
// doctors
|
// doctors
|
||||||
const localEncounter = ref<Encounter>(props.encounter)
|
const localEncounter = ref<Encounter>(props.encounter)
|
||||||
const doctors = await getDoctorValueLabelList({'includes': 'employee,employee-person'}, true)
|
const doctors = ref<Item[]>([])
|
||||||
const employees = await getEmployeeValueLabelList({'includes': 'person', 'position-code': 'reg'})
|
const employees = await getEmployeeValueLabelList({'includes': 'person', 'position-code': 'reg'})
|
||||||
const units = await getUnitValueLabelList()
|
const units = await getUnitValueLabelList()
|
||||||
|
const canUpdate = ref(true)
|
||||||
|
|
||||||
|
if (props.encounter.status_code == 'done') {
|
||||||
|
canUpdate.value = false
|
||||||
|
}
|
||||||
|
if (canUpdate.value) {
|
||||||
|
doctors.value = await getDoctorValueLabelList({'includes': 'employee,employee-person', 'unit-code': user.unit_code}, true)
|
||||||
|
}
|
||||||
|
|
||||||
// check in
|
// check in
|
||||||
const checkInValues = ref<any>({
|
const checkInValues = ref<any>({
|
||||||
@@ -94,6 +109,7 @@ function submitCheckOut(values: CheckOutFormData) {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Dialog
|
<Dialog
|
||||||
|
v-if="canUpdate"
|
||||||
v-model:open="checkInDialogOpen"
|
v-model:open="checkInDialogOpen"
|
||||||
title="Ubah Informasi Masuk"
|
title="Ubah Informasi Masuk"
|
||||||
size="md"
|
size="md"
|
||||||
@@ -103,7 +119,7 @@ function submitCheckOut(values: CheckOutFormData) {
|
|||||||
:schema="CheckInSchema"
|
:schema="CheckInSchema"
|
||||||
:values="checkInValues"
|
:values="checkInValues"
|
||||||
:encounter="encounter"
|
:encounter="encounter"
|
||||||
:doctors="doctors"
|
:doctors="doctors || []"
|
||||||
:employees="employees"
|
:employees="employees"
|
||||||
:is-loading="checkInIsLoading"
|
:is-loading="checkInIsLoading"
|
||||||
:is-readonly="checkInIsReadonly"
|
:is-readonly="checkInIsReadonly"
|
||||||
@@ -113,6 +129,7 @@ function submitCheckOut(values: CheckOutFormData) {
|
|||||||
</Dialog>
|
</Dialog>
|
||||||
|
|
||||||
<Dialog
|
<Dialog
|
||||||
|
v-if="canUpdate"
|
||||||
v-model:open="checkOutDialogOpen"
|
v-model:open="checkOutDialogOpen"
|
||||||
title="Ubah Informasi Keluar"
|
title="Ubah Informasi Keluar"
|
||||||
size="lg"
|
size="lg"
|
||||||
|
|||||||
@@ -7,9 +7,17 @@ import SoapiList from './list.vue'
|
|||||||
import EarlyForm from './form.vue'
|
import EarlyForm from './form.vue'
|
||||||
import RehabForm from './form-rehab.vue'
|
import RehabForm from './form-rehab.vue'
|
||||||
import FunctionForm from './form-function.vue'
|
import FunctionForm from './form-function.vue'
|
||||||
|
import type { Encounter } from '~/models/encounter'
|
||||||
|
|
||||||
|
interface Props {
|
||||||
|
encounter: Encounter
|
||||||
|
label: string
|
||||||
|
canUpdate?: boolean
|
||||||
|
}
|
||||||
|
const props = defineProps<Props>()
|
||||||
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const type = computed(() => (route.query.tab as string) || 'early-medical-assessment')
|
const type = computed(() => (route.query.menu as string) || 'early-medical-assessment')
|
||||||
|
|
||||||
const { mode, goToEntry, backToList } = useQueryCRUDMode('mode')
|
const { mode, goToEntry, backToList } = useQueryCRUDMode('mode')
|
||||||
|
|
||||||
@@ -23,8 +31,9 @@ const ActiveForm = computed(() => formMap[type.value] || EarlyForm)
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
<!-- {{ type }} -->
|
||||||
<div>
|
<div>
|
||||||
<SoapiList v-if="mode === 'list'" />
|
<SoapiList v-if="mode === 'list'" :label="label" :canUpdate="canUpdate" />
|
||||||
<component
|
<component
|
||||||
v-else
|
v-else
|
||||||
:is="ActiveForm"
|
:is="ActiveForm"
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import type { Encounter } from '~/models/encounter'
|
|||||||
interface Props {
|
interface Props {
|
||||||
encounter: Encounter
|
encounter: Encounter
|
||||||
label: string
|
label: string
|
||||||
|
canUpdate?: boolean
|
||||||
}
|
}
|
||||||
const props = defineProps<Props>()
|
const props = defineProps<Props>()
|
||||||
const emits = defineEmits(['add', 'edit'])
|
const emits = defineEmits(['add', 'edit'])
|
||||||
@@ -58,10 +59,12 @@ const typeCode = ref('')
|
|||||||
const hreaderPrep: HeaderPrep = {
|
const hreaderPrep: HeaderPrep = {
|
||||||
title: props.label,
|
title: props.label,
|
||||||
icon: 'i-lucide-users',
|
icon: 'i-lucide-users',
|
||||||
addNav: {
|
}
|
||||||
|
if(props.canUpdate) {
|
||||||
|
hreaderPrep['addNav'] = {
|
||||||
label: 'Tambah',
|
label: 'Tambah',
|
||||||
onClick: () => goToEntry(),
|
onClick: () => goToEntry(),
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const type = computed(() => (route.query.tab as string) || 'early-medical-assessment')
|
const type = computed(() => (route.query.tab as string) || 'early-medical-assessment')
|
||||||
@@ -169,6 +172,8 @@ provide('table_data_loader', isLoading)
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
<!-- {{ canUpdate }}
|
||||||
|
{{ hreaderPrep }} -->
|
||||||
<Header
|
<Header
|
||||||
:prep="{ ...hreaderPrep }"
|
:prep="{ ...hreaderPrep }"
|
||||||
:ref-search-nav="refSearchNav"
|
:ref-search-nav="refSearchNav"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
export interface Item {
|
export interface Item {
|
||||||
value: string | number
|
value: string
|
||||||
label: string
|
label: string
|
||||||
code?: string
|
code?: string
|
||||||
priority?: number
|
priority?: number
|
||||||
|
|||||||
@@ -1,40 +1,33 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
height?: number
|
height?: number
|
||||||
|
class?: string
|
||||||
activeTab?: 1 | 2
|
activeTab?: 1 | 2
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
|
const classVal = computed(() => {
|
||||||
|
return props.class ? props.class : ''
|
||||||
|
})
|
||||||
const activeTab = ref(props.activeTab || 1)
|
const activeTab = ref(props.activeTab || 1)
|
||||||
|
|
||||||
function handleClick(value: 1 | 2) {
|
function switchActiveTab() {
|
||||||
activeTab.value = value
|
activeTab.value = activeTab.value === 1 ? 2 : 1
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="content-switcher" :style="`height: ${height || 200}px`">
|
<div :class="`content-switcher ${classVal}`" :style="height ? `height:${200}px` : ''">
|
||||||
<div :class="`${activeTab === 1 ? 'active' : 'inactive'}`">
|
<div class="wrapper">
|
||||||
<div class="content-wrapper">
|
<div :class="`item item-1 ${activeTab === 1 ? 'active' : 'inactive'}`">
|
||||||
<div>
|
<slot name="content1" />
|
||||||
<slot name="content1" />
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="content-nav">
|
<div :class="`nav border-slate-300 ${ activeTab == 1 ? 'border-l' : 'border-r'}`">
|
||||||
<button @click="handleClick(1)">
|
<button @click="switchActiveTab()" class="!p-0 w-full h-full">
|
||||||
<Icon name="i-lucide-chevron-right" />
|
<Icon :name="activeTab == 1 ? 'i-lucide-chevron-left' : 'i-lucide-chevron-right'" class="text-3xl" />
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div :class="`item item-2 ${activeTab === 2 ? 'active' : 'inactive'}`">
|
||||||
<div :class="`${activeTab === 2 ? 'active' : 'inactive'}`">
|
<slot name="content2" />
|
||||||
<div class="content-nav">
|
|
||||||
<button @click="handleClick(2)">
|
|
||||||
<Icon name="i-lucide-chevron-left" />
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<div class="content-wrapper">
|
|
||||||
<div>
|
|
||||||
<slot name="content2" />
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -42,45 +35,24 @@ function handleClick(value: 1 | 2) {
|
|||||||
|
|
||||||
<style>
|
<style>
|
||||||
.content-switcher {
|
.content-switcher {
|
||||||
@apply flex overflow-hidden gap-3
|
@apply overflow-hidden
|
||||||
}
|
}
|
||||||
.content-switcher > * {
|
.wrapper {
|
||||||
@apply border border-slate-300 rounded-md flex overflow-hidden
|
@apply flex w-[200%] h-full
|
||||||
|
}
|
||||||
|
.item {
|
||||||
|
@apply w-[calc(50%-60px)]
|
||||||
}
|
}
|
||||||
|
|
||||||
.content-wrapper {
|
.item-1.active {
|
||||||
@apply p-4 2xl:p-5 overflow-hidden grow
|
@apply ms-0 transition-all duration-500 ease-in-out
|
||||||
}
|
}
|
||||||
.inactive .content-wrapper {
|
.item-1.inactive {
|
||||||
@apply p-0 w-0
|
@apply -ms-[calc(50%-60px)] transition-all duration-500 ease-in-out
|
||||||
}
|
}
|
||||||
|
|
||||||
.content-nav {
|
.nav {
|
||||||
@apply h-full flex flex-row items-center justify-center content-center !text-2xl overflow-hidden
|
@apply h-full w-[60px] flex flex-row items-center justify-center content-center !text-2xl overflow-hidden
|
||||||
}
|
}
|
||||||
|
|
||||||
.content-nav button {
|
|
||||||
@apply pt-2 px-2 h-full w-full
|
|
||||||
}
|
|
||||||
|
|
||||||
/* .content-switcher .inactive > .content-wrapper {
|
|
||||||
@apply w-0 p-0 opacity-0 transition-all duration-500 ease-in-out
|
|
||||||
} */
|
|
||||||
.content-switcher .inactive {
|
|
||||||
@apply w-16 transition-all duration-500 ease-in-out
|
|
||||||
}
|
|
||||||
.content-switcher .inactive > .content-nav {
|
|
||||||
@apply w-full transition-all duration-100 ease-in-out
|
|
||||||
}
|
|
||||||
|
|
||||||
.content-switcher .active {
|
|
||||||
@apply grow transition-all duration-500 ease-in-out
|
|
||||||
}
|
|
||||||
.content-switcher .active > .content-nav {
|
|
||||||
@apply w-0 transition-all duration-100 ease-in-out
|
|
||||||
}
|
|
||||||
/* .content-switcher .active > .content-wrapper {
|
|
||||||
@apply w-full delay-1000 transition-all duration-1000 ease-in-out
|
|
||||||
} */
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
@@ -4,6 +4,9 @@ import { type EncounterItem } from "~/handlers/encounter-init.handler";
|
|||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
initialActiveMenu: string
|
initialActiveMenu: string
|
||||||
data: EncounterItem[]
|
data: EncounterItem[]
|
||||||
|
canCreate?: boolean
|
||||||
|
canUpdate?: boolean
|
||||||
|
canDelete?: boolean
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
const activeMenu = ref(props.initialActiveMenu)
|
const activeMenu = ref(props.initialActiveMenu)
|
||||||
@@ -38,7 +41,11 @@ function changeMenu(value: string) {
|
|||||||
class="flex-1 rounded-md border bg-white p-4 shadow-sm dark:bg-neutral-950">
|
class="flex-1 rounded-md border bg-white p-4 shadow-sm dark:bg-neutral-950">
|
||||||
<component
|
<component
|
||||||
:is="data.find((m) => m.id === activeMenu)?.component"
|
:is="data.find((m) => m.id === activeMenu)?.component"
|
||||||
v-bind="data.find((m) => m.id === activeMenu)?.props" />
|
v-bind="data.find((m) => m.id === activeMenu)?.props"
|
||||||
|
:can-create="canCreate"
|
||||||
|
:can-update="canUpdate"
|
||||||
|
:can-delete="canDelete"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ export const permissions: Record<string, Record<string, Permission[]>> = {
|
|||||||
'emp|pha': ['R'],
|
'emp|pha': ['R'],
|
||||||
'emp|lab': ['R'],
|
'emp|lab': ['R'],
|
||||||
'emp|rad': ['R'],
|
'emp|rad': ['R'],
|
||||||
|
'emp|scr': ['R'],
|
||||||
},
|
},
|
||||||
'/ambulatory/encounter/add': {
|
'/ambulatory/encounter/add': {
|
||||||
'emp|reg': ['C', 'R', 'U', 'D'],
|
'emp|reg': ['C', 'R', 'U', 'D'],
|
||||||
@@ -34,6 +35,7 @@ export const permissions: Record<string, Record<string, Permission[]>> = {
|
|||||||
'emp|pha': ['R'],
|
'emp|pha': ['R'],
|
||||||
'emp|lab': ['R'],
|
'emp|lab': ['R'],
|
||||||
'emp|rad': ['R'],
|
'emp|rad': ['R'],
|
||||||
|
'emp|scr': ['R'],
|
||||||
},
|
},
|
||||||
'/ambulatory/encounter/[id]/edit': {
|
'/ambulatory/encounter/[id]/edit': {
|
||||||
'emp|reg': ['C', 'R', 'U', 'D'],
|
'emp|reg': ['C', 'R', 'U', 'D'],
|
||||||
@@ -47,6 +49,7 @@ export const permissions: Record<string, Record<string, Permission[]>> = {
|
|||||||
'emp|pha': ['R'],
|
'emp|pha': ['R'],
|
||||||
'emp|lab': ['R'],
|
'emp|lab': ['R'],
|
||||||
'emp|rad': ['R'],
|
'emp|rad': ['R'],
|
||||||
|
'emp|scr': ['R'],
|
||||||
},
|
},
|
||||||
'/ambulatory/encounter/[id]/process?menu=status': {
|
'/ambulatory/encounter/[id]/process?menu=status': {
|
||||||
'emp|doc': ['R'],
|
'emp|doc': ['R'],
|
||||||
@@ -57,6 +60,18 @@ export const permissions: Record<string, Record<string, Permission[]>> = {
|
|||||||
'emp|pha': ['R'],
|
'emp|pha': ['R'],
|
||||||
'emp|lab': ['R'],
|
'emp|lab': ['R'],
|
||||||
'emp|rad': ['R'],
|
'emp|rad': ['R'],
|
||||||
|
'emp|scr': ['R'],
|
||||||
|
},
|
||||||
|
'/ambulatory/encounter/[id]/process?menu=rehab-medical-assessment': {
|
||||||
|
'emp|doc': ['R', 'U'],
|
||||||
|
'emp|nur': ['R'],
|
||||||
|
'emp|thr': ['R'],
|
||||||
|
'emp|miw': ['R'],
|
||||||
|
'emp|nut': ['R'],
|
||||||
|
'emp|pha': ['R'],
|
||||||
|
'emp|lab': ['R'],
|
||||||
|
'emp|rad': ['R'],
|
||||||
|
'emp|scr': ['R'],
|
||||||
},
|
},
|
||||||
'/ambulatory/encounter/[id]/process?menu=early-medical-assessment': {
|
'/ambulatory/encounter/[id]/process?menu=early-medical-assessment': {
|
||||||
'emp|doc': ['R', 'U'],
|
'emp|doc': ['R', 'U'],
|
||||||
@@ -67,8 +82,20 @@ export const permissions: Record<string, Record<string, Permission[]>> = {
|
|||||||
'emp|pha': ['R'],
|
'emp|pha': ['R'],
|
||||||
'emp|lab': ['R'],
|
'emp|lab': ['R'],
|
||||||
'emp|rad': ['R'],
|
'emp|rad': ['R'],
|
||||||
|
'emp|scr': ['R'],
|
||||||
},
|
},
|
||||||
'/ambulatory/encounter/[id]/process?menu=fkr': {
|
'/ambulatory/encounter/[id]/process?menu=early-nurse-assessment': {
|
||||||
|
'emp|doc': ['R'],
|
||||||
|
'emp|nur': ['R', 'U'],
|
||||||
|
'emp|thr': ['R'],
|
||||||
|
'emp|miw': ['R'],
|
||||||
|
'emp|nut': ['R'],
|
||||||
|
'emp|pha': ['R'],
|
||||||
|
'emp|lab': ['R'],
|
||||||
|
'emp|rad': ['R'],
|
||||||
|
'emp|scr': ['R'],
|
||||||
|
},
|
||||||
|
'/ambulatory/encounter/[id]/process?menu=kfr': {
|
||||||
'emp|doc': ['R', 'U'],
|
'emp|doc': ['R', 'U'],
|
||||||
'emp|nur': ['R'],
|
'emp|nur': ['R'],
|
||||||
'emp|thr': ['R'],
|
'emp|thr': ['R'],
|
||||||
@@ -77,6 +104,7 @@ export const permissions: Record<string, Record<string, Permission[]>> = {
|
|||||||
'emp|pha': ['R'],
|
'emp|pha': ['R'],
|
||||||
'emp|lab': ['R'],
|
'emp|lab': ['R'],
|
||||||
'emp|rad': ['R'],
|
'emp|rad': ['R'],
|
||||||
|
'emp|scr': ['R'],
|
||||||
},
|
},
|
||||||
'/ambulatory/encounter/[id]/process?menu=education-assessment': {
|
'/ambulatory/encounter/[id]/process?menu=education-assessment': {
|
||||||
'emp|doc': ['R', 'U'],
|
'emp|doc': ['R', 'U'],
|
||||||
@@ -87,6 +115,7 @@ export const permissions: Record<string, Record<string, Permission[]>> = {
|
|||||||
'emp|pha': ['R'],
|
'emp|pha': ['R'],
|
||||||
'emp|lab': ['R'],
|
'emp|lab': ['R'],
|
||||||
'emp|rad': ['R'],
|
'emp|rad': ['R'],
|
||||||
|
'emp|scr': ['R'],
|
||||||
},
|
},
|
||||||
'/ambulatory/encounter/[id]/process?menu=general-consent': {
|
'/ambulatory/encounter/[id]/process?menu=general-consent': {
|
||||||
'emp|doc': ['R'],
|
'emp|doc': ['R'],
|
||||||
@@ -97,6 +126,7 @@ export const permissions: Record<string, Record<string, Permission[]>> = {
|
|||||||
'emp|pha': ['R'],
|
'emp|pha': ['R'],
|
||||||
'emp|lab': ['R'],
|
'emp|lab': ['R'],
|
||||||
'emp|rad': ['R'],
|
'emp|rad': ['R'],
|
||||||
|
'emp|scr': ['R'],
|
||||||
},
|
},
|
||||||
'/ambulatory/encounter/[id]/process?menu=patient-amb-note': {
|
'/ambulatory/encounter/[id]/process?menu=patient-amb-note': {
|
||||||
'emp|doc': ['R'],
|
'emp|doc': ['R'],
|
||||||
@@ -107,6 +137,7 @@ export const permissions: Record<string, Record<string, Permission[]>> = {
|
|||||||
'emp|pha': ['R'],
|
'emp|pha': ['R'],
|
||||||
'emp|lab': ['R'],
|
'emp|lab': ['R'],
|
||||||
'emp|rad': ['R'],
|
'emp|rad': ['R'],
|
||||||
|
'emp|scr': ['R'],
|
||||||
},
|
},
|
||||||
'/ambulatory/encounter/[id]/process?menu=prescription': {
|
'/ambulatory/encounter/[id]/process?menu=prescription': {
|
||||||
'emp|doc': ['R', 'U'],
|
'emp|doc': ['R', 'U'],
|
||||||
@@ -117,6 +148,7 @@ export const permissions: Record<string, Record<string, Permission[]>> = {
|
|||||||
'emp|pha': ['R'],
|
'emp|pha': ['R'],
|
||||||
'emp|lab': ['R'],
|
'emp|lab': ['R'],
|
||||||
'emp|rad': ['R'],
|
'emp|rad': ['R'],
|
||||||
|
'emp|scr': ['R'],
|
||||||
},
|
},
|
||||||
'/ambulatory/encounter/[id]/process?menu=device-order': {
|
'/ambulatory/encounter/[id]/process?menu=device-order': {
|
||||||
'emp|doc': ['R', 'U'],
|
'emp|doc': ['R', 'U'],
|
||||||
@@ -127,6 +159,7 @@ export const permissions: Record<string, Record<string, Permission[]>> = {
|
|||||||
'emp|pha': ['R'],
|
'emp|pha': ['R'],
|
||||||
'emp|lab': ['R'],
|
'emp|lab': ['R'],
|
||||||
'emp|rad': ['R'],
|
'emp|rad': ['R'],
|
||||||
|
'emp|scr': ['R'],
|
||||||
},
|
},
|
||||||
'/ambulatory/encounter/[id]/process?menu=radiology-order': {
|
'/ambulatory/encounter/[id]/process?menu=radiology-order': {
|
||||||
'emp|doc': ['R', 'U'],
|
'emp|doc': ['R', 'U'],
|
||||||
@@ -137,6 +170,7 @@ export const permissions: Record<string, Record<string, Permission[]>> = {
|
|||||||
'emp|pha': ['R'],
|
'emp|pha': ['R'],
|
||||||
'emp|lab': ['R'],
|
'emp|lab': ['R'],
|
||||||
'emp|rad': ['R'],
|
'emp|rad': ['R'],
|
||||||
|
'emp|scr': ['R'],
|
||||||
},
|
},
|
||||||
'/ambulatory/encounter/[id]/process?menu=cp-lab-order': {
|
'/ambulatory/encounter/[id]/process?menu=cp-lab-order': {
|
||||||
'emp|doc': ['R', 'U'],
|
'emp|doc': ['R', 'U'],
|
||||||
@@ -147,6 +181,7 @@ export const permissions: Record<string, Record<string, Permission[]>> = {
|
|||||||
'emp|pha': ['R'],
|
'emp|pha': ['R'],
|
||||||
'emp|lab': ['R'],
|
'emp|lab': ['R'],
|
||||||
'emp|rad': ['R'],
|
'emp|rad': ['R'],
|
||||||
|
'emp|scr': ['R'],
|
||||||
},
|
},
|
||||||
'/ambulatory/encounter/[id]/process?menu=micro-lab-order': {
|
'/ambulatory/encounter/[id]/process?menu=micro-lab-order': {
|
||||||
'emp|doc': ['R', 'U'],
|
'emp|doc': ['R', 'U'],
|
||||||
@@ -157,6 +192,7 @@ export const permissions: Record<string, Record<string, Permission[]>> = {
|
|||||||
'emp|pha': ['R'],
|
'emp|pha': ['R'],
|
||||||
'emp|lab': ['R'],
|
'emp|lab': ['R'],
|
||||||
'emp|rad': ['R'],
|
'emp|rad': ['R'],
|
||||||
|
'emp|scr': ['R'],
|
||||||
},
|
},
|
||||||
'/ambulatory/encounter/[id]/process?menu=ap-lab-order': {
|
'/ambulatory/encounter/[id]/process?menu=ap-lab-order': {
|
||||||
'emp|doc': ['R', 'U'],
|
'emp|doc': ['R', 'U'],
|
||||||
@@ -167,6 +203,161 @@ export const permissions: Record<string, Record<string, Permission[]>> = {
|
|||||||
'emp|pha': ['R'],
|
'emp|pha': ['R'],
|
||||||
'emp|lab': ['R'],
|
'emp|lab': ['R'],
|
||||||
'emp|rad': ['R'],
|
'emp|rad': ['R'],
|
||||||
|
'emp|scr': ['R'],
|
||||||
|
},
|
||||||
|
'/ambulatory/encounter/[id]/process?menu=inpatient-letter': {
|
||||||
|
'emp|doc': ['R', 'U'],
|
||||||
|
'emp|nur': ['R', 'U'],
|
||||||
|
'emp|thr': ['R'],
|
||||||
|
'emp|miw': ['R'],
|
||||||
|
'emp|nut': ['R'],
|
||||||
|
'emp|pha': ['R'],
|
||||||
|
'emp|lab': ['R'],
|
||||||
|
'emp|rad': ['R'],
|
||||||
|
'emp|scr': ['R'],
|
||||||
|
},
|
||||||
|
'/ambulatory/encounter/[id]/process?menu=reference-back': {
|
||||||
|
'emp|doc': ['R', 'U'],
|
||||||
|
'emp|nur': ['R', 'U'],
|
||||||
|
'emp|thr': ['R'],
|
||||||
|
'emp|miw': ['R'],
|
||||||
|
'emp|nut': ['R'],
|
||||||
|
'emp|pha': ['R'],
|
||||||
|
'emp|lab': ['R'],
|
||||||
|
'emp|rad': ['R'],
|
||||||
|
'emp|scr': ['R'],
|
||||||
|
},
|
||||||
|
'/ambulatory/encounter/[id]/process?menu=procedure-room-order': {
|
||||||
|
'emp|doc': ['R', 'U'],
|
||||||
|
'emp|nur': ['R', 'U'],
|
||||||
|
'emp|thr': ['R'],
|
||||||
|
'emp|miw': ['R'],
|
||||||
|
'emp|nut': ['R'],
|
||||||
|
'emp|pha': ['R'],
|
||||||
|
'emp|lab': ['R'],
|
||||||
|
'emp|rad': ['R'],
|
||||||
|
'emp|scr': ['R'],
|
||||||
|
},
|
||||||
|
'/ambulatory/encounter/[id]/process?menu=mcu-result': {
|
||||||
|
'emp|doc': ['R', 'U'],
|
||||||
|
'emp|nur': ['R', 'U'],
|
||||||
|
'emp|thr': ['R'],
|
||||||
|
'emp|miw': ['R'],
|
||||||
|
'emp|nut': ['R'],
|
||||||
|
'emp|pha': ['R'],
|
||||||
|
'emp|lab': ['R'],
|
||||||
|
'emp|rad': ['R'],
|
||||||
|
'emp|scr': ['R'],
|
||||||
|
},
|
||||||
|
'/ambulatory/encounter/[id]/process?menu=action-report': {
|
||||||
|
'emp|doc': ['R', 'U'],
|
||||||
|
'emp|nur': ['R', 'U'],
|
||||||
|
'emp|thr': ['R'],
|
||||||
|
'emp|miw': ['R'],
|
||||||
|
'emp|nut': ['R'],
|
||||||
|
'emp|pha': ['R'],
|
||||||
|
'emp|lab': ['R'],
|
||||||
|
'emp|rad': ['R'],
|
||||||
|
'emp|scr': ['R'],
|
||||||
|
},
|
||||||
|
'/ambulatory/encounter/[id]/process?menu=surgery-report': {
|
||||||
|
'emp|doc': ['R', 'U'],
|
||||||
|
'emp|nur': ['R', 'U'],
|
||||||
|
'emp|thr': ['R'],
|
||||||
|
'emp|miw': ['R'],
|
||||||
|
'emp|nut': ['R'],
|
||||||
|
'emp|pha': ['R'],
|
||||||
|
'emp|lab': ['R'],
|
||||||
|
'emp|rad': ['R'],
|
||||||
|
'emp|scr': ['R'],
|
||||||
|
},
|
||||||
|
'/ambulatory/encounter/[id]/process?menu=vaccine-data': {
|
||||||
|
'emp|doc': ['R', 'U'],
|
||||||
|
'emp|nur': ['R', 'U'],
|
||||||
|
'emp|thr': ['R'],
|
||||||
|
'emp|miw': ['R'],
|
||||||
|
'emp|nut': ['R'],
|
||||||
|
'emp|pha': ['R'],
|
||||||
|
'emp|lab': ['R'],
|
||||||
|
'emp|rad': ['R'],
|
||||||
|
'emp|scr': ['R'],
|
||||||
|
},
|
||||||
|
'/ambulatory/encounter/[id]/process?menu=consultation': {
|
||||||
|
'emp|doc': ['R', 'U'],
|
||||||
|
'emp|nur': ['R', 'U'],
|
||||||
|
'emp|thr': ['R'],
|
||||||
|
'emp|miw': ['R'],
|
||||||
|
'emp|nut': ['R'],
|
||||||
|
'emp|pha': ['R'],
|
||||||
|
'emp|lab': ['R'],
|
||||||
|
'emp|rad': ['R'],
|
||||||
|
'emp|scr': ['R'],
|
||||||
|
},
|
||||||
|
'/ambulatory/encounter/[id]/process?menu=control-letter': {
|
||||||
|
'emp|doc': ['R', 'U'],
|
||||||
|
'emp|nur': ['R', 'U'],
|
||||||
|
'emp|thr': ['R'],
|
||||||
|
'emp|miw': ['R'],
|
||||||
|
'emp|nut': ['R'],
|
||||||
|
'emp|pha': ['R'],
|
||||||
|
'emp|lab': ['R'],
|
||||||
|
'emp|rad': ['R'],
|
||||||
|
'emp|scr': ['R'],
|
||||||
|
},
|
||||||
|
'/ambulatory/encounter/[id]/process?menu=screening': {
|
||||||
|
'emp|doc': ['R'],
|
||||||
|
'emp|nur': ['R'],
|
||||||
|
'emp|thr': ['R'],
|
||||||
|
'emp|miw': ['R'],
|
||||||
|
'emp|nut': ['R'],
|
||||||
|
'emp|pha': ['R'],
|
||||||
|
'emp|lab': ['R'],
|
||||||
|
'emp|rad': ['R'],
|
||||||
|
'emp|scr': ['R', 'U'],
|
||||||
|
},
|
||||||
|
'/ambulatory/encounter/[id]/process?menu=supporting-document': {
|
||||||
|
'emp|doc': ['R', 'U'],
|
||||||
|
'emp|nur': ['R'],
|
||||||
|
'emp|thr': ['R'],
|
||||||
|
'emp|miw': ['R'],
|
||||||
|
'emp|nut': ['R'],
|
||||||
|
'emp|pha': ['R'],
|
||||||
|
'emp|lab': ['R'],
|
||||||
|
'emp|rad': ['R'],
|
||||||
|
'emp|scr': ['R'],
|
||||||
|
},
|
||||||
|
'/ambulatory/encounter/[id]/process?menu=resume': {
|
||||||
|
'emp|doc': ['R', 'U'],
|
||||||
|
'emp|nur': ['R'],
|
||||||
|
'emp|thr': ['R'],
|
||||||
|
'emp|miw': ['R'],
|
||||||
|
'emp|nut': ['R'],
|
||||||
|
'emp|pha': ['R'],
|
||||||
|
'emp|lab': ['R'],
|
||||||
|
'emp|rad': ['R'],
|
||||||
|
'emp|scr': ['R'],
|
||||||
|
},
|
||||||
|
'/ambulatory/encounter/[id]/process?menu=amb-resume': {
|
||||||
|
'emp|doc': ['R', 'U'],
|
||||||
|
'emp|nur': ['R'],
|
||||||
|
'emp|thr': ['R'],
|
||||||
|
'emp|miw': ['R'],
|
||||||
|
'emp|nut': ['R'],
|
||||||
|
'emp|pha': ['R'],
|
||||||
|
'emp|lab': ['R'],
|
||||||
|
'emp|rad': ['R'],
|
||||||
|
'emp|scr': ['R'],
|
||||||
|
},
|
||||||
|
'/ambulatory/encounter/[id]/process?menu=price-list': {
|
||||||
|
'emp|doc': ['R', 'U'],
|
||||||
|
'emp|nur': ['R'],
|
||||||
|
'emp|thr': ['R'],
|
||||||
|
'emp|miw': ['R'],
|
||||||
|
'emp|nut': ['R'],
|
||||||
|
'emp|pha': ['R'],
|
||||||
|
'emp|lab': ['R'],
|
||||||
|
'emp|rad': ['R'],
|
||||||
|
'emp|scr': ['R'],
|
||||||
},
|
},
|
||||||
'/ambulatory/consulation': {
|
'/ambulatory/consulation': {
|
||||||
'emp|doc': ['R'],
|
'emp|doc': ['R'],
|
||||||
|
|||||||
@@ -30,13 +30,12 @@ export interface EncounterListData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const StatusAsync = defineAsyncComponent(() => import('~/components/content/encounter/status.vue'))
|
const StatusAsync = defineAsyncComponent(() => import('~/components/content/encounter/status.vue'))
|
||||||
const AssesmentFunctionListAsync = defineAsyncComponent(() => import('~/components/content/soapi/entry.vue'))
|
const EarlyMedicalRehabAssessmentListAsync = defineAsyncComponent(() => import('~/components/content/soapi/entry.vue'))
|
||||||
const EarlyMedicalAssesmentListAsync = defineAsyncComponent(() => import('~/components/content/soapi/entry.vue'))
|
const EarlyMedicalAssesmentListAsync = defineAsyncComponent(() => import('~/components/content/soapi/entry.vue'))
|
||||||
const EarlyMedicalRehabListAsync = defineAsyncComponent(() => import('~/components/content/soapi/entry.vue'))
|
const initialNursesAssessmentAsync = defineAsyncComponent(() => import('~/components/content/initial-nursing/entry.vue'))
|
||||||
|
const AssesmentFunctionListAsync = defineAsyncComponent(() => import('~/components/content/soapi/entry.vue'))
|
||||||
const ChemoProtocolListAsync = defineAsyncComponent(() => import('~/components/app/chemotherapy/list.protocol.vue'))
|
const ChemoProtocolListAsync = defineAsyncComponent(() => import('~/components/app/chemotherapy/list.protocol.vue'))
|
||||||
const ChemoMedicineProtocolListAsync = defineAsyncComponent(
|
const ChemoMedicineProtocolListAsync = defineAsyncComponent(() => import('~/components/app/chemotherapy/list.medicine.vue'))
|
||||||
() => import('~/components/app/chemotherapy/list.medicine.vue'),
|
|
||||||
)
|
|
||||||
const DeviceOrderAsync = defineAsyncComponent(() => import('~/components/content/device-order/main.vue'))
|
const DeviceOrderAsync = defineAsyncComponent(() => import('~/components/content/device-order/main.vue'))
|
||||||
const PrescriptionAsync = defineAsyncComponent(() => import('~/components/content/prescription/main.vue'))
|
const PrescriptionAsync = defineAsyncComponent(() => import('~/components/content/prescription/main.vue'))
|
||||||
const CpLabOrderAsync = defineAsyncComponent(() => import('~/components/content/cp-lab-order/main.vue'))
|
const CpLabOrderAsync = defineAsyncComponent(() => import('~/components/content/cp-lab-order/main.vue'))
|
||||||
@@ -54,7 +53,6 @@ const KfrListAsync = defineAsyncComponent(() => import('~/components/content/kfr
|
|||||||
const PrbListAsync = defineAsyncComponent(() => import('~/components/content/prb/list.vue'))
|
const PrbListAsync = defineAsyncComponent(() => import('~/components/content/prb/list.vue'))
|
||||||
const SurgeryReportListAsync = defineAsyncComponent(() => import('~/components/content/surgery-report/list.vue'))
|
const SurgeryReportListAsync = defineAsyncComponent(() => import('~/components/content/surgery-report/list.vue'))
|
||||||
const VaccineDataListAsync = defineAsyncComponent(() => import('~/components/content/vaccine-data/list.vue'))
|
const VaccineDataListAsync = defineAsyncComponent(() => import('~/components/content/vaccine-data/list.vue'))
|
||||||
const InitialNursingStudyAsync = defineAsyncComponent(() => import('~/components/content/initial-nursing/entry.vue'))
|
|
||||||
const AssessmentEducationEntryAsync = defineAsyncComponent(
|
const AssessmentEducationEntryAsync = defineAsyncComponent(
|
||||||
() => import('~/components/content/assessment-education/entry.vue'),
|
() => import('~/components/content/assessment-education/entry.vue'),
|
||||||
)
|
)
|
||||||
@@ -68,18 +66,6 @@ const defaultKeys: Record<string, any> = {
|
|||||||
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
||||||
unit: 'all',
|
unit: 'all',
|
||||||
},
|
},
|
||||||
// earlyNurseryAssessment: {
|
|
||||||
// id: 'early-nursery-assessment',
|
|
||||||
// title: 'Pengkajian Awal Keperawatan',
|
|
||||||
// classCode: ['ambulatory', 'emergency', 'inpatient'],
|
|
||||||
// unit: 'all',
|
|
||||||
// },
|
|
||||||
earlyMedicalAssessment: {
|
|
||||||
id: 'early-medical-assessment',
|
|
||||||
title: 'Pengkajian Awal Medis',
|
|
||||||
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
|
||||||
unit: 'all',
|
|
||||||
},
|
|
||||||
earlyMedicalRehabAssessment: {
|
earlyMedicalRehabAssessment: {
|
||||||
id: 'rehab-medical-assessment',
|
id: 'rehab-medical-assessment',
|
||||||
title: 'Pengkajian Awal Medis Rehabilitasi Medis',
|
title: 'Pengkajian Awal Medis Rehabilitasi Medis',
|
||||||
@@ -87,21 +73,14 @@ const defaultKeys: Record<string, any> = {
|
|||||||
unit: 'rehab',
|
unit: 'rehab',
|
||||||
afterId: 'early-medical-assessment',
|
afterId: 'early-medical-assessment',
|
||||||
},
|
},
|
||||||
// functionAssessment: {
|
earlyMedicalAssessment: {
|
||||||
// id: 'function-assessment',
|
id: 'early-medical-assessment',
|
||||||
// title: 'Asesmen Fungsi',
|
title: 'Pengkajian Awal Medis',
|
||||||
// classCode: ['ambulatory'],
|
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
||||||
// unit: 'rehab',
|
unit: 'all',
|
||||||
// afterId: 'rehab-medical-assessment',
|
},
|
||||||
// },
|
initialNursesAssessment: {
|
||||||
// therapyProtocol: {
|
id: 'early-nurse-assessment',
|
||||||
// id: 'therapy-protocol',
|
|
||||||
// classCode: ['ambulatory'],
|
|
||||||
// title: 'Protokol Terapi',
|
|
||||||
// unit: 'rehab',
|
|
||||||
// afterId: 'function-assessment',
|
|
||||||
initialNursingStudy: {
|
|
||||||
id: 'initial-nursing-study',
|
|
||||||
title: 'Kajian Awal Keperawatan',
|
title: 'Kajian Awal Keperawatan',
|
||||||
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
||||||
unit: 'all',
|
unit: 'all',
|
||||||
@@ -270,7 +249,7 @@ const defaultKeys: Record<string, any> = {
|
|||||||
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
||||||
unit: 'all',
|
unit: 'all',
|
||||||
},
|
},
|
||||||
// initialNursingStudy: {
|
// initialNursesAssessment: {
|
||||||
// id: 'initial-nursing-study',
|
// id: 'initial-nursing-study',
|
||||||
// title: 'Kajian Awal Keperawatan',
|
// title: 'Kajian Awal Keperawatan',
|
||||||
// classCode: ['ambulatory', 'emergency', 'inpatient'],
|
// classCode: ['ambulatory', 'emergency', 'inpatient'],
|
||||||
@@ -329,7 +308,7 @@ export function injectComponents(id: string | number, data: EncounterListData, m
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (currentKeys?.earlyMedicalRehabAssessment) {
|
if (currentKeys?.earlyMedicalRehabAssessment) {
|
||||||
currentKeys.earlyMedicalRehabAssessment['component'] = EarlyMedicalRehabListAsync
|
currentKeys.earlyMedicalRehabAssessment['component'] = EarlyMedicalRehabAssessmentListAsync
|
||||||
currentKeys.earlyMedicalRehabAssessment['props'] = {
|
currentKeys.earlyMedicalRehabAssessment['props'] = {
|
||||||
encounter: data?.encounter,
|
encounter: data?.encounter,
|
||||||
type: 'early-rehab',
|
type: 'early-rehab',
|
||||||
@@ -459,21 +438,10 @@ export function injectComponents(id: string | number, data: EncounterListData, m
|
|||||||
currentKeys.priceList['props'] = { encounter_id: id }
|
currentKeys.priceList['props'] = { encounter_id: id }
|
||||||
}
|
}
|
||||||
|
|
||||||
if (currentKeys?.initialNursingStudy) {
|
if (currentKeys?.initialNursesAssessment) {
|
||||||
currentKeys.initialNursingStudy['component'] = InitialNursingStudyAsync
|
currentKeys.initialNursesAssessment['component'] = initialNursesAssessmentAsync
|
||||||
currentKeys.initialNursingStudy['props'] = { encounter: data?.encounter }
|
currentKeys.initialNursesAssessment['props'] = { encounter: data?.encounter }
|
||||||
}
|
}
|
||||||
|
|
||||||
if (currentKeys?.initialNursingStudy) {
|
|
||||||
currentKeys.initialNursingStudy['component'] = InitialNursingStudyAsync
|
|
||||||
currentKeys.initialNursingStudy['props'] = { encounter: data?.encounter }
|
|
||||||
}
|
|
||||||
|
|
||||||
if (currentKeys?.initialNursingStudy) {
|
|
||||||
currentKeys.initialNursingStudy['component'] = InitialNursingStudyAsync
|
|
||||||
currentKeys.initialNursingStudy['props'] = { encounter: data?.encounter }
|
|
||||||
}
|
|
||||||
|
|
||||||
if (currentKeys?.actionReport) {
|
if (currentKeys?.actionReport) {
|
||||||
currentKeys.actionReport['component'] = ActionReportEntryAsync
|
currentKeys.actionReport['component'] = ActionReportEntryAsync
|
||||||
currentKeys.actionReport['props'] = {
|
currentKeys.actionReport['props'] = {
|
||||||
@@ -537,6 +505,9 @@ export function mapResponseToEncounter(result: any): any {
|
|||||||
? result.visitDate
|
? result.visitDate
|
||||||
: result.registeredAt || result.patient?.registeredAt || null,
|
: result.registeredAt || result.patient?.registeredAt || null,
|
||||||
adm_employee_id: result.adm_employee_id || 0,
|
adm_employee_id: result.adm_employee_id || 0,
|
||||||
|
adm_employee: result.adm_employee || null,
|
||||||
|
responsible_nurse_id: result.responsible_nurse_id || null,
|
||||||
|
responsible_nurse: result.responsible_nurse || null,
|
||||||
appointment_doctor_id: result.appointment_doctor_id || null,
|
appointment_doctor_id: result.appointment_doctor_id || null,
|
||||||
responsible_doctor_id: result.responsible_doctor_id || null,
|
responsible_doctor_id: result.responsible_doctor_id || null,
|
||||||
appointment_doctor: result.appointment_doctor || null,
|
appointment_doctor: result.appointment_doctor || null,
|
||||||
@@ -599,7 +570,7 @@ export function getMenuItems(id: string | number, props: any, user: any, data: E
|
|||||||
const currentUnitItems: any = currentListItems[`${unitCode}`]
|
const currentUnitItems: any = currentListItems[`${unitCode}`]
|
||||||
if (!currentUnitItems) return []
|
if (!currentUnitItems) return []
|
||||||
let menus = []
|
let menus = []
|
||||||
if (currentUnitItems.roles && currentUnitItems.roles?.includes(user.activeRole)) {
|
if (currentUnitItems.roles && currentUnitItems.roles && user.activeRole in currentUnitItems.roles) {
|
||||||
menus = [...currentUnitItems.items]
|
menus = [...currentUnitItems.items]
|
||||||
} else {
|
} else {
|
||||||
menus = unitCode !== 'all' && currentUnitItems?.items ? [...currentUnitItems.items] : [...currentUnitItems]
|
menus = unitCode !== 'all' && currentUnitItems?.items ? [...currentUnitItems.items] : [...currentUnitItems]
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ export function genEncounter(): Encounter {
|
|||||||
patient: genPatient(),
|
patient: genPatient(),
|
||||||
registeredAt: '',
|
registeredAt: '',
|
||||||
class_code: '',
|
class_code: '',
|
||||||
unit_code: 0,
|
unit_code: '',
|
||||||
unit: genUnit(),
|
unit: genUnit(),
|
||||||
visitDate: '',
|
visitDate: '',
|
||||||
adm_employee_id: 0,
|
adm_employee_id: 0,
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
import { type Base, genBase } from "./_base"
|
import { type Base, genBase } from "./_base"
|
||||||
|
import type { Employee } from "./employee"
|
||||||
|
|
||||||
export interface Nurse extends Base {
|
export interface Nurse extends Base {
|
||||||
employee_id: number
|
employee_id: number
|
||||||
|
employee?: Employee
|
||||||
ihs_number?: string
|
ihs_number?: string
|
||||||
unit_id: number
|
unit_id: number
|
||||||
infra_id: number
|
infra_id: number
|
||||||
|
|||||||
@@ -31,12 +31,12 @@ useHead({
|
|||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const menu = computed(() => route.query.menu as string | undefined)
|
const menu = computed(() => route.query.menu as string | undefined)
|
||||||
const accessKey = computed(() => `/ambulatory/encounter/[id]/process` + (menu.value ? `?menu=${menu.value}` : ''))
|
const accessKey = computed(() => `/ambulatory/encounter/[id]/process` + (menu.value ? `?menu=${menu.value}` : ''))
|
||||||
const roleAccess: Record<string, Permission[]> = permissions[accessKey.value] || {}
|
const roleAccess = computed(() => permissions[accessKey.value] || {})
|
||||||
const hasAccess = getPageAccess(roleAccess, 'read') || true
|
const hasAccess = computed(() => getPageAccess(roleAccess.value, 'read'))
|
||||||
const canCreate = hasCreateAccess(roleAccess)
|
const canCreate = computed(() => getPageAccess(roleAccess.value, 'create'))
|
||||||
const canRead = hasReadAccess(roleAccess)
|
const canRead = computed(() => getPageAccess(roleAccess.value, 'read'))
|
||||||
const canUpdate = hasUpdateAccess(roleAccess)
|
const canUpdate = computed(() => getPageAccess(roleAccess.value, 'update'))
|
||||||
const canDelete = hasDeleteAccess(roleAccess)
|
const canDelete = computed(() => getPageAccess(roleAccess.value, 'delete'))
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|||||||
Reference in New Issue
Block a user