feat: Implement encounter add/edit forms for inpatient, outpatient, and emergency features, and remove outdated documentation.

This commit is contained in:
riefive
2025-12-02 12:09:48 +07:00
parent cfecd72d49
commit 4df67ed979
13 changed files with 19 additions and 3232 deletions
+10 -1
View File
@@ -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({