Merge branch 'dev' of github.com:dikstub-rssa/simrs-fe into feat/patient-63-adjustment

This commit is contained in:
Khafid Prayoga
2025-12-11 15:08:22 +07:00
49 changed files with 565 additions and 1449 deletions
+2 -1
View File
@@ -28,6 +28,7 @@ import ConfirmationInfo from '~/components/app/device-order/confirmation-info.vu
// Props
const props = defineProps<{
encounter_id: number
canUpdate?: boolean
}>()
const encounter_id = props.encounter_id
@@ -153,7 +154,7 @@ function pickItem(): DeviceOrder | null {
:pagination-meta="paginationMeta"
@page-change="handlePageChange"
/>
<!--
<!--
@cancel="cancel"
@edit="edit"
@submit="submit"
+4 -6
View File
@@ -16,7 +16,7 @@ import { useIntegrationSepEntry } from '~/handlers/integration-sep-entry.handler
const props = defineProps<{
id: number
classCode?: 'ambulatory' | 'emergency' | 'inpatient' | 'outpatient'
subClassCode?: 'reg' | 'rehab' | 'chemo' | 'emg' | 'eon' | 'op' | 'icu' | 'hcu' | 'vk'
subclassCode?: 'reg' | 'rehab' | 'chemo' | 'emg' | 'eon' | 'op' | 'icu' | 'hcu' | 'vk'
formType: string
}>()
@@ -77,9 +77,7 @@ function handleSaveClick() {
}
function handleFetch(value?: any) {
if (value?.subSpecialistId) {
handleFetchDoctors(value.subSpecialistId)
}
// handleFetchDoctors(props.subclassCode)
}
async function handleEvent(menu: string, value?: any) {
@@ -97,7 +95,7 @@ async function handleEvent(menu: string, value?: any) {
isService: 'false',
encounterId: props.id || null,
sourcePath: route.path,
resource: `${props.classCode}-${props.subClassCode}`,
resource: `${props.classCode}-${props.subclassCode}`,
...value,
})
} else if (menu === 'sep-number-changed') {
@@ -213,7 +211,7 @@ onMounted(async () => {
:is-action="true"
:histories="histories"
/>
<!-- Footer Actions -->
<div class="mt-6 flex justify-end gap-2 border-t border-t-slate-300 pt-4">
<Button
+3 -3
View File
@@ -35,7 +35,7 @@ import FilterForm from '~/components/app/encounter/filter-form.vue'
// Props
const props = defineProps<{
classCode?: 'ambulatory' | 'emergency' | 'inpatient'
subClassCode?: 'reg' | 'rehab' | 'chemo' | 'emg' | 'eon' | 'op' | 'icu' | 'hcu' | 'vk'
subclassCode?: 'reg' | 'rehab' | 'chemo' | 'emg' | 'eon' | 'op' | 'icu' | 'hcu' | 'vk'
canCreate?: boolean
canUpdate?: boolean
canDelete?: boolean
@@ -172,8 +172,8 @@ async function getPatientList() {
if (props.classCode) {
params['class-code'] = props.classCode
}
if (props.subClassCode) {
params['sub-class-code'] = props.subClassCode
if (props.subclassCode) {
params['subclass-code'] = props.subclassCode
}
const result = await getEncounterList(params)
if (result.success) {
+19 -2
View File
@@ -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 type { Encounter } from '~/models/encounter'
import { checkIn } from '~/services/encounter.service'
import { getServicePosition } from '~/lib/roles'
import type { Item } from '~/components/pub/my-ui/combobox'
//
const props = defineProps<{
@@ -22,11 +24,24 @@ const props = defineProps<{
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
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 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
const checkInValues = ref<any>({
@@ -94,6 +109,7 @@ function submitCheckOut(values: CheckOutFormData) {
</div>
<Dialog
v-if="canUpdate"
v-model:open="checkInDialogOpen"
title="Ubah Informasi Masuk"
size="md"
@@ -103,7 +119,7 @@ function submitCheckOut(values: CheckOutFormData) {
:schema="CheckInSchema"
:values="checkInValues"
:encounter="encounter"
:doctors="doctors"
:doctors="doctors || []"
:employees="employees"
:is-loading="checkInIsLoading"
:is-readonly="checkInIsReadonly"
@@ -113,6 +129,7 @@ function submitCheckOut(values: CheckOutFormData) {
</Dialog>
<Dialog
v-if="canUpdate"
v-model:open="checkOutDialogOpen"
title="Ubah Informasi Keluar"
size="lg"
+10 -1
View File
@@ -7,6 +7,14 @@ import SoapiList from './list.vue'
import EarlyForm from './form.vue'
import RehabForm from './form-rehab.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 type = computed(() => (route.query.menu as string) || 'early-medical-assessment')
@@ -23,8 +31,9 @@ const ActiveForm = computed(() => formMap[type.value] || EarlyForm)
</script>
<template>
<!-- {{ type }} -->
<div>
<SoapiList v-if="mode === 'list'" />
<SoapiList v-if="mode === 'list'" :label="label" :canUpdate="canUpdate" />
<component
v-else
:is="ActiveForm"
+7 -2
View File
@@ -21,6 +21,7 @@ import type { Encounter } from '~/models/encounter'
interface Props {
encounter: Encounter
label: string
canUpdate?: boolean
}
const props = defineProps<Props>()
const emits = defineEmits(['add', 'edit'])
@@ -58,10 +59,12 @@ const typeCode = ref('')
const hreaderPrep: HeaderPrep = {
title: props.label,
icon: 'i-lucide-users',
addNav: {
}
if(props.canUpdate) {
hreaderPrep['addNav'] = {
label: 'Tambah',
onClick: () => goToEntry(),
},
}
}
const type = computed(() => (route.query.menu as string) || 'early-medical-assessment')
@@ -169,6 +172,8 @@ provide('table_data_loader', isLoading)
</script>
<template>
<!-- {{ canUpdate }}
{{ hreaderPrep }} -->
<Header
:prep="{ ...hreaderPrep }"
:ref-search-nav="refSearchNav"