feat: Implement encounter add/edit forms for inpatient, outpatient, and emergency features, and remove outdated documentation.
This commit is contained in:
@@ -137,9 +137,18 @@ watch(
|
||||
},
|
||||
)
|
||||
|
||||
watch(
|
||||
() => props.id,
|
||||
async (newId) => {
|
||||
if (props.formType === 'edit' && newId > 0) {
|
||||
await getFetchEncounterDetail()
|
||||
}
|
||||
},
|
||||
)
|
||||
|
||||
onMounted(async () => {
|
||||
await handleInit()
|
||||
if (props.id > 0) {
|
||||
if (props.formType === 'edit' && props.id > 0) {
|
||||
await getFetchEncounterDetail()
|
||||
}
|
||||
})
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
import type { PagePermission } from '~/models/role'
|
||||
import Error from '~/components/pub/my-ui/error/error.vue'
|
||||
import { PAGE_PERMISSIONS } from '~/lib/page-permission'
|
||||
import Content from '~/components/content/encounter/entry.vue'
|
||||
|
||||
definePageMeta({
|
||||
middleware: ['rbac'],
|
||||
@@ -13,7 +14,7 @@ definePageMeta({
|
||||
const route = useRoute()
|
||||
|
||||
useHead({
|
||||
title: () => `${route.meta.title}`, // backtick to avoid the ts-plugin(2322) warning
|
||||
title: () => `${route.meta.title}`,
|
||||
})
|
||||
|
||||
const roleAccess: PagePermission = PAGE_PERMISSIONS['/emergency/encounter']
|
||||
@@ -41,7 +42,7 @@ const encounterId = computed(() => {
|
||||
|
||||
<template>
|
||||
<div v-if="canUpdate">
|
||||
<ContentEncounterEntry
|
||||
<Content
|
||||
:id="encounterId"
|
||||
class-code="emergency"
|
||||
sub-class-code="emg"
|
||||
@@ -53,4 +54,3 @@ const encounterId = computed(() => {
|
||||
:status-code="403"
|
||||
/>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
import type { PagePermission } from '~/models/role'
|
||||
import Error from '~/components/pub/my-ui/error/error.vue'
|
||||
import { PAGE_PERMISSIONS } from '~/lib/page-permission'
|
||||
import Content from '~/components/content/encounter/entry.vue'
|
||||
|
||||
definePageMeta({
|
||||
middleware: ['rbac'],
|
||||
@@ -13,7 +14,7 @@ definePageMeta({
|
||||
const route = useRoute()
|
||||
|
||||
useHead({
|
||||
title: () => `${route.meta.title}`, // backtick to avoid the ts-plugin(2322) warning
|
||||
title: () => `${route.meta.title}`,
|
||||
})
|
||||
|
||||
const roleAccess: PagePermission = PAGE_PERMISSIONS['/inpatient/encounter']
|
||||
@@ -41,7 +42,7 @@ const encounterId = computed(() => {
|
||||
|
||||
<template>
|
||||
<div v-if="canUpdate">
|
||||
<ContentEncounterEntry
|
||||
<Content
|
||||
:id="encounterId"
|
||||
class-code="inpatient"
|
||||
sub-class-code="icu"
|
||||
@@ -53,4 +54,3 @@ const encounterId = computed(() => {
|
||||
:status-code="403"
|
||||
/>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
import type { PagePermission } from '~/models/role'
|
||||
import Error from '~/components/pub/my-ui/error/error.vue'
|
||||
import { PAGE_PERMISSIONS } from '~/lib/page-permission'
|
||||
import Content from '~/components/content/encounter/entry.vue'
|
||||
|
||||
definePageMeta({
|
||||
middleware: ['rbac'],
|
||||
@@ -13,7 +14,7 @@ definePageMeta({
|
||||
const route = useRoute()
|
||||
|
||||
useHead({
|
||||
title: () => `${route.meta.title}`, // backtick to avoid the ts-plugin(2322) warning
|
||||
title: () => `${route.meta.title}`,
|
||||
})
|
||||
|
||||
const roleAccess: PagePermission = PAGE_PERMISSIONS['/outpatient/encounter']
|
||||
@@ -41,7 +42,7 @@ const encounterId = computed(() => {
|
||||
|
||||
<template>
|
||||
<div v-if="canUpdate">
|
||||
<ContentEncounterEntry
|
||||
<Content
|
||||
:id="encounterId"
|
||||
class-code="ambulatory"
|
||||
sub-class-code="reg"
|
||||
@@ -53,4 +54,3 @@ const encounterId = computed(() => {
|
||||
:status-code="403"
|
||||
/>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
import type { Permission } from '~/models/role'
|
||||
import { permissions } from '~/const/page-permission/outpatient'
|
||||
import Error from '~/components/pub/my-ui/error/error.vue'
|
||||
|
||||
import Content from '~/components/content/encounter/entry.vue'
|
||||
|
||||
definePageMeta({
|
||||
|
||||
Reference in New Issue
Block a user