Squashed commit of the following:
commit9f5ede3aeaMerge:16858dcdbe8e34Author: Munawwirul Jamal <57973347+munaja@users.noreply.github.com> Date: Fri Dec 5 09:26:33 2025 +0700 Merge pull request #213 from dikstub-rssa/feat/things-munaja Feat/things munaja commitdbe8e34d07Author: Munawwirul Jamal <munawwirul.jamal@gmail.com> Date: Fri Dec 5 09:26:00 2025 +0700 feat/things-munaja: fix enc status commit786107ddd9Author: Munawwirul Jamal <munawwirul.jamal@gmail.com> Date: Thu Dec 4 22:57:33 2025 +0700 feat/things-munaja: content switcher commit4450cb943eMerge:913609316858dcAuthor: Munawwirul Jamal <munawwirul.jamal@gmail.com> Date: Thu Dec 4 19:31:30 2025 +0700 Merge branch 'dev' into feat/things-munaja commit9136093fd6Author: Munawwirul Jamal <munawwirul.jamal@gmail.com> Date: Thu Dec 4 18:02:14 2025 +0700 feat/things-munaja: cleaning commit16858dc2a0Merge:82e33c667a5154Author: Munawwirul Jamal <57973347+munaja@users.noreply.github.com> Date: Thu Dec 4 14:30:35 2025 +0700 Merge pull request #212 from dikstub-rssa/feat/encounter-adjustment-163 Enhancement SEP commit67a515478cAuthor: riefive <rie.five@gmail.com> Date: Thu Dec 4 13:39:36 2025 +0700 fix: save sep commit82e33c6dbfMerge:f96cbdbeba740aAuthor: Munawwirul Jamal <57973347+munaja@users.noreply.github.com> Date: Thu Dec 4 13:21:37 2025 +0700 Merge pull request #209 from dikstub-rssa/feat/move-kai-ui-to-sidebar-195 Feat/move kai UI to sidebar 195 commite6b74a4949Author: riefive <rie.five@gmail.com> Date: Thu Dec 4 12:36:53 2025 +0700 fix: encounter update form commit434f8471ceAuthor: riefive <rie.five@gmail.com> Date: Thu Dec 4 12:20:07 2025 +0700 fix: update save again commitbae087aa6dAuthor: riefive <rie.five@gmail.com> Date: Thu Dec 4 12:19:37 2025 +0700 fix: update save commitf96cbdb173Merge:5de005762556a5Author: Munawwirul Jamal <57973347+munaja@users.noreply.github.com> Date: Thu Dec 4 12:07:25 2025 +0700 Merge pull request #210 from dikstub-rssa/feat/procedure-room-order Feat/procedure room order commit62556a5c7dMerge:93a294d5de0057Author: Munawwirul Jamal <57973347+munaja@users.noreply.github.com> Date: Thu Dec 4 12:07:18 2025 +0700 Merge branch 'dev' into feat/procedure-room-order commit5da439720fAuthor: riefive <rie.five@gmail.com> Date: Thu Dec 4 11:59:37 2025 +0700 feat: implement encounter entry form for patient, doctor, payment, and SEP management commit5de0057278Merge:71ca7f9782034cAuthor: Andsky <andrianovsky95@gmail.com> Date: Thu Dec 4 11:56:31 2025 +0700 Merge pull request #211 from dikstub-rssa/feat/micro-lab-order-50 Feat/micro lab order 50 commit93a294d8d0Merge:6c2636726365bbAuthor: Andrian Roshandy <andrianovsky95@gmail.com> Date: Thu Dec 4 11:18:49 2025 +0700 Merge branch 'dev' into feat/procedure-room-order commit26365bbd2eMerge:b6b56d1e7cab6cAuthor: Andrian Roshandy <andrianovsky95@gmail.com> Date: Thu Dec 4 11:18:33 2025 +0700 Merge branch 'dev' of github.com:dikstub-rssa/simrs-fe into dev commit6c26367c1dAuthor: Andrian Roshandy <andrianovsky95@gmail.com> Date: Thu Dec 4 10:51:40 2025 +0700 feat/procedure-room-order: added item commitd2ceda37bfAuthor: riefive <rie.five@gmail.com> Date: Thu Dec 4 10:58:16 2025 +0700 feat: Implement encounter list management with search, date range filtering, and record actions. commita0dfd214e5Author: Andrian Roshandy <andrianovsky95@gmail.com> Date: Thu Dec 4 10:25:50 2025 +0700 feat/procedure-room-order: finishing commitacb573e279Author: Andrian Roshandy <andrianovsky95@gmail.com> Date: Thu Dec 4 10:25:35 2025 +0700 feat/procedure-room-order: adjust procedure-room-order commit9adb77d10bAuthor: Andrian Roshandy <andrianovsky95@gmail.com> Date: Thu Dec 4 10:24:52 2025 +0700 feat/procedure-room-order: adjust material-package commit52454a019eMerge:0a0fb73b6b56d1Author: Andrian Roshandy <andrianovsky95@gmail.com> Date: Thu Dec 4 10:23:14 2025 +0700 Merge branch 'dev' into feat/procedure-room-order commitb6b56d186dAuthor: Munawwirul Jamal <munawwirul.jamal@gmail.com> Date: Thu Dec 4 10:17:16 2025 +0700 dev: hotfix, cleaning some pubs commitacc45b205fAuthor: riefive <rie.five@gmail.com> Date: Wed Dec 3 16:25:15 2025 +0700 fix: upload sep + sipp file commit0a0fb73483Author: Munawwirul Jamal <munawwirul.jamal@gmail.com> Date: Wed Dec 3 14:33:13 2025 +0700 feat/procedure-room-order: flow for procedure room commit7b4b4eecf9Merge:9f72e1db172125Author: Andrian Roshandy <andrianovsky95@gmail.com> Date: Wed Dec 3 10:18:15 2025 +0700 Merge branch 'feat/mcu-order' into feat/procedure-room-order commit782034c2b1Merge:bae0a22b80ee5aAuthor: Andrian Roshandy <andrianovsky95@gmail.com> Date: Wed Dec 3 10:16:45 2025 +0700 Merge branch 'dev' into feat/micro-lab-order-50 commit9f72e1df47Merge:fa0ae98b80ee5aAuthor: Andrian Roshandy <andrianovsky95@gmail.com> Date: Wed Dec 3 10:02:57 2025 +0700 Merge branch 'dev' into feat/procedure-room-order commitfa0ae9866eAuthor: Andrian Roshandy <andrianovsky95@gmail.com> Date: Wed Dec 3 09:44:33 2025 +0700 feat/procedure-room-order: wip #3 commitce93f996d9Author: Andrian Roshandy <andrianovsky95@gmail.com> Date: Wed Dec 3 09:43:36 2025 +0700 feat/procedure-room-order: wip #2 + procedure-room commit4444e87cb3Author: Andrian Roshandy <andrianovsky95@gmail.com> Date: Wed Dec 3 09:42:31 2025 +0700 feat/procedure-room-order: wip #1 + material-package + material-package-item commitb172125d99Merge:b2d3c149b7a719Author: Andrian Roshandy <andrianovsky95@gmail.com> Date: Mon Dec 1 20:41:58 2025 +0700 Merge branch 'feat/page-cleaning' into feat/mcu-order commitbae0a222b8Author: Andrian Roshandy <andrianovsky95@gmail.com> Date: Mon Dec 1 01:51:04 2025 +0700 feat/micro-lab-order-50: adjust for antibiotic commit1ee0f39e7dAuthor: Andrian Roshandy <andrianovsky95@gmail.com> Date: Mon Dec 1 01:50:39 2025 +0700 feat/micro-lab-order-50: added antibiotic commit95e27a8b6fAuthor: Andrian Roshandy <andrianovsky95@gmail.com> Date: Sun Nov 30 13:00:04 2025 +0700 feat/micro-lab-order-50: wip commita002ef6c6eMerge:fb2f01bb2d3c14Author: Andrian Roshandy <andrianovsky95@gmail.com> Date: Sun Nov 30 12:50:31 2025 +0700 Merge branch 'feat/mcu-order' into feat/micro-lab-order-50 commitb2d3c14ddcAuthor: Andrian Roshandy <andrianovsky95@gmail.com> Date: Sun Nov 30 12:48:11 2025 +0700 feat/mcu-order: adjustment commitfb2f01bd36Merge:9a481fe5c92f8bAuthor: Andrian Roshandy <andrianovsky95@gmail.com> Date: Sun Nov 30 12:43:11 2025 +0700 Merge branch 'feat/mcu-order' into feat/micro-lab-order-50 commit5c92f8b946Author: Andrian Roshandy <andrianovsky95@gmail.com> Date: Sun Nov 30 12:30:19 2025 +0700 feat/mcu-order: added the components commit9a481fec14Merge:425123978fc289Author: Andrian Roshandy <andrianovsky95@gmail.com> Date: Fri Nov 28 21:18:10 2025 +0700 Merge branch 'dev' into feat/micro-lab-order-50 commit4251239f7cAuthor: Andrian Roshandy <andrianovsky95@gmail.com> Date: Fri Nov 28 21:17:18 2025 +0700 feat/micro-lab-order-50: wip commitcf5789549eAuthor: Munawwirul Jamal <munawwirul.jamal@gmail.com> Date: Sun Nov 23 15:56:31 2025 +0700 feat/mcu: improved wip commita40eac35f8Merge:3211972baf6ab1Author: Andrian Roshandy <andrianovsky95@gmail.com> Date: Wed Nov 19 22:23:18 2025 +0700 Merge branch 'dev' into feat/radiology-order-54 commit3211972a84Merge:e3fc1e4ccabe01Author: Andrian Roshandy <andrianovsky95@gmail.com> Date: Sat Nov 15 20:15:07 2025 +0700 Merge branch 'dev' into feat/radiology-order-54 commite3fc1e4ab9Author: Andrian Roshandy <andrianovsky95@gmail.com> Date: Sat Nov 15 20:14:38 2025 +0700 feat/radiology-order-54: adjust wip
This commit is contained in:
@@ -13,7 +13,11 @@ import { useSidebar } from '~/components/pub/ui/sidebar/utils'
|
||||
import { getServicePosition } from '~/lib/roles' // previously getPositionAs
|
||||
|
||||
// Services
|
||||
import { getList as getEncounterList, remove as removeEncounter, cancel as cancelEncounter } from '~/services/encounter.service'
|
||||
import {
|
||||
getList as getEncounterList,
|
||||
remove as removeEncounter,
|
||||
cancel as cancelEncounter,
|
||||
} from '~/services/encounter.service'
|
||||
|
||||
// Apps
|
||||
import Content from '~/components/app/encounter/list.vue'
|
||||
@@ -40,6 +44,7 @@ const { getActiveRole } = useUserStore()
|
||||
// Main data
|
||||
const data = ref([])
|
||||
const dataFiltered = ref([])
|
||||
const filterParams = ref<any>({})
|
||||
const activeServicePosition = ref(getServicePosition(getActiveRole()))
|
||||
const isLoading = reactive<DataTableLoader>({
|
||||
summary: false,
|
||||
@@ -99,27 +104,30 @@ provide('rec_action', recAction)
|
||||
provide('rec_item', recItem)
|
||||
provide('table_data_loader', isLoading)
|
||||
|
||||
watch(getActiveRole, (role? : string) => {
|
||||
watch(getActiveRole, (role?: string) => {
|
||||
activeServicePosition.value = getServicePosition(role)
|
||||
})
|
||||
|
||||
watch(() => recAction.value, () => {
|
||||
const basePath = `/${props.classCode}/encounter`
|
||||
if (recAction.value === ActionEvents.showConfirmDelete) {
|
||||
isRecordConfirmationOpen.value = true
|
||||
} else if (recAction.value === ActionEvents.showCancel) {
|
||||
isRecordCancelOpen.value = true
|
||||
} else if (recAction.value === ActionEvents.showDetail) {
|
||||
navigateTo(`${basePath}/${recId.value}/detail`)
|
||||
} else if (recAction.value === ActionEvents.showEdit) {
|
||||
navigateTo(`${basePath}/${recId.value}/edit`)
|
||||
} else if (recAction.value === ActionEvents.showProcess) {
|
||||
navigateTo(`${basePath}/${recId.value}/process`)
|
||||
} else if (recAction.value === ActionEvents.showConfirmDelete) {
|
||||
isRecordConfirmationOpen.value = true
|
||||
}
|
||||
recAction.value = '' // reset
|
||||
})
|
||||
watch(
|
||||
() => recAction.value,
|
||||
() => {
|
||||
const basePath = `/${props.classCode}/encounter`
|
||||
if (recAction.value === ActionEvents.showConfirmDelete) {
|
||||
isRecordConfirmationOpen.value = true
|
||||
} else if (recAction.value === ActionEvents.showCancel) {
|
||||
isRecordCancelOpen.value = true
|
||||
} else if (recAction.value === ActionEvents.showDetail) {
|
||||
navigateTo(`${basePath}/${recId.value}/detail`)
|
||||
} else if (recAction.value === ActionEvents.showEdit) {
|
||||
navigateTo(`${basePath}/${recId.value}/edit`)
|
||||
} else if (recAction.value === ActionEvents.showProcess) {
|
||||
navigateTo(`${basePath}/${recId.value}/process`)
|
||||
} else if (recAction.value === ActionEvents.showConfirmDelete) {
|
||||
isRecordConfirmationOpen.value = true
|
||||
}
|
||||
recAction.value = '' // reset
|
||||
},
|
||||
)
|
||||
|
||||
onMounted(() => {
|
||||
getPatientList()
|
||||
@@ -128,13 +136,16 @@ onMounted(() => {
|
||||
/////// Functions
|
||||
async function getPatientList() {
|
||||
isLoading.isTableLoading = true
|
||||
const includesParams =
|
||||
'patient,patient-person,patient-person-addresses,unit,Appointment_Doctor,Appointment_Doctor-employee,Appointment_Doctor-employee-person,Responsible_Doctor,Responsible_Doctor-employee,Responsible_Doctor-employee-person'
|
||||
data.value = []
|
||||
try {
|
||||
const params: any = { includes: 'patient,patient-person' }
|
||||
const params: any = { includes: includesParams, ...filterParams.value }
|
||||
if (props.classCode) {
|
||||
params['class-code'] = props.classCode
|
||||
params.class_code = props.classCode
|
||||
}
|
||||
if (props.subClassCode) {
|
||||
params['sub-class-code'] = props.subClassCode
|
||||
params.sub_class_code = props.subClassCode
|
||||
}
|
||||
const result = await getEncounterList(params)
|
||||
if (result.success) {
|
||||
@@ -148,6 +159,15 @@ async function getPatientList() {
|
||||
}
|
||||
}
|
||||
|
||||
function handleFilterApply(filters: { personName: string; startDate: string; endDate: string }) {
|
||||
filterParams.value = {
|
||||
'person-name': filters.personName,
|
||||
'start-date': filters.startDate,
|
||||
'end-date': filters.endDate,
|
||||
}
|
||||
getPatientList()
|
||||
}
|
||||
|
||||
// Handle confirmation result
|
||||
async function handleConfirmCancel(record: any, action: string) {
|
||||
if (action === 'deactivate' && record?.id) {
|
||||
@@ -243,7 +263,7 @@ function handleRemoveConfirmation() {
|
||||
<CH.ContentHeader v-bind="hreaderPrep">
|
||||
<FilterNav
|
||||
:active-positon="activeServicePosition"
|
||||
@onFilterClick="() => isFilterFormDialogOpen = true"
|
||||
@apply="handleFilterApply"
|
||||
@onExportPdf="() => {}"
|
||||
@onExportExcel="() => {}"
|
||||
@nExportCsv="() => {}"
|
||||
@@ -259,7 +279,7 @@ function handleRemoveConfirmation() {
|
||||
size="lg"
|
||||
prevent-outside
|
||||
>
|
||||
<FilterForm v-bind="filter" />
|
||||
<FilterForm v-bind="filter" />
|
||||
</Dialog>
|
||||
|
||||
<!-- Batal -->
|
||||
|
||||
@@ -43,6 +43,10 @@ import EncounterHistoryButtonMenu from '~/components/app/encounter/quick-shortcu
|
||||
const props = defineProps<{
|
||||
classCode: EncounterProps['classCode']
|
||||
subClassCode?: EncounterProps['subClassCode']
|
||||
canCreate?: boolean
|
||||
canRead?: boolean
|
||||
canUpdate?: boolean
|
||||
canDelete?: boolean
|
||||
}>()
|
||||
|
||||
// Common preparations
|
||||
@@ -107,8 +111,8 @@ const protocolRows = [
|
||||
{ value: 'prescription', label: 'Order Obat', component: Prescription, props: { encounter_id: data.value.id } },
|
||||
{ value: 'device-order', label: 'Order Alkes', component: DeviceOrder, props: { encounter_id: data.value.id } },
|
||||
{ value: 'device', label: 'Order Alkes' },
|
||||
{ value: 'mcu-radiology', label: 'Order Radiologi', component: Radiology, props: { encounter_id: data.id } },
|
||||
{ value: 'mcu-lab-cp', label: 'Order Lab PK', component: CpLabOrder, props: { encounter_id: data.id } },
|
||||
{ value: 'mcu-radiology', label: 'Order Radiologi', component: Radiology, props: { encounter_id: data.value.id } },
|
||||
{ value: 'mcu-lab-cp', label: 'Order Lab PK', component: CpLabOrder, props: { encounter_id: data.value.id } },
|
||||
{ value: 'mcu-lab-micro', label: 'Order Lab Mikro' },
|
||||
{ value: 'mcu-lab-pa', label: 'Order Lab PA' },
|
||||
{ value: 'medical-action', label: 'Order Ruang Tindakan' },
|
||||
@@ -154,7 +158,7 @@ onMounted(async () => {
|
||||
///// Functions
|
||||
function handleClick(type: string) {
|
||||
if (type === 'draft') {
|
||||
router.back()
|
||||
router.push(`/${props.classCode}/encounter`)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -181,27 +185,13 @@ async function getData() {
|
||||
|
||||
<template>
|
||||
<div class="w-full">
|
||||
<div class="bg-white p-4 dark:bg-slate-800 2xl:p-5">
|
||||
<div class="mb-4 flex">
|
||||
<div>
|
||||
<ContentNavBa
|
||||
label="Kembali"
|
||||
@click="handleClick"
|
||||
/>
|
||||
</div>
|
||||
<!-- <div class="ms-auto pe-3 pt-1 text-end text-xl 2xl:text-2xl font-semibold">
|
||||
Pasien: {{ data.patient.person.name }} --- No. RM: {{ data.patient.number }}
|
||||
</div> -->
|
||||
<div class="bg-white dark:bg-slate-800">
|
||||
<div class="p-3 2xl:p-4 border-b border-slate-300 dark:border-slate-700">
|
||||
<ContentNavBa label="Kembali Ke Daftar" @click="handleClick" />
|
||||
</div>
|
||||
<ContentSwitcher
|
||||
:active="1"
|
||||
:height="150"
|
||||
>
|
||||
<ContentSwitcher :active="1" class="h-[130px] 2xl:h-[160px]">
|
||||
<template v-slot:content1>
|
||||
<EncounterPatientInfo
|
||||
v-if="isShowPatient"
|
||||
:data="data"
|
||||
/>
|
||||
<EncounterPatientInfo v-if="isShowPatient" :data="data" />
|
||||
</template>
|
||||
<template v-slot:content2>
|
||||
<EncounterHistoryButtonMenu v-if="isShowPatient" />
|
||||
@@ -212,6 +202,10 @@ async function getData() {
|
||||
:data="menus"
|
||||
:initial-active-menu="activeMenu"
|
||||
@change-menu="activeMenu = $event"
|
||||
:can-create="canCreate"
|
||||
:can-read="canRead"
|
||||
:can-update="canUpdate"
|
||||
:can-delete="canDelete"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
@@ -5,6 +5,7 @@ import { getValueLabelList as getEmployeeValueLabelList } from '~/services/emplo
|
||||
import { getValueLabelList as getUnitValueLabelList } from '~/services/unit.service'
|
||||
import type { CheckInFormData, CheckOutFormData } from '~/schemas/encounter.schema'
|
||||
import { CheckInSchema, CheckOutSchema } from '~/schemas/encounter.schema'
|
||||
import { getEncounterData } from '~/handlers/encounter-process.handler'
|
||||
|
||||
//
|
||||
import Dialog from '~/components/pub/my-ui/modal/dialog.vue'
|
||||
@@ -18,10 +19,12 @@ import { checkIn } from '~/services/encounter.service'
|
||||
//
|
||||
const props = defineProps<{
|
||||
encounter: Encounter
|
||||
canUpdate?: boolean
|
||||
}>()
|
||||
|
||||
// doctors
|
||||
const doctors = await getDoctorValueLabelList({'includes': 'employee,employee-person'})
|
||||
const localEncounter = ref<Encounter>(props.encounter)
|
||||
const doctors = await getDoctorValueLabelList({'includes': 'employee,employee-person'}, true)
|
||||
const employees = await getEmployeeValueLabelList({'includes': 'person', 'position-code': 'reg'})
|
||||
const units = await getUnitValueLabelList()
|
||||
|
||||
@@ -32,7 +35,7 @@ const checkInValues = ref<any>({
|
||||
// registeredAt: '',
|
||||
})
|
||||
const checkInIsLoading = ref(false)
|
||||
const checkInIsReadonly = ref(false)
|
||||
const checkInIsReadonly = ref(props.canUpdate )
|
||||
const checkInDialogOpen = ref(false)
|
||||
|
||||
// check out
|
||||
@@ -49,8 +52,15 @@ function editCheckIn() {
|
||||
checkInDialogOpen.value = true
|
||||
}
|
||||
|
||||
function submitCheckIn(values: CheckInFormData) {
|
||||
checkIn(props.encounter.id, values)
|
||||
async function submitCheckIn(values: CheckInFormData) {
|
||||
const res = await checkIn(props.encounter.id, values)
|
||||
if (res.success) {
|
||||
checkInDialogOpen.value = false
|
||||
const resEnc = await getEncounterData(props.encounter.id)
|
||||
if (resEnc.success) {
|
||||
localEncounter.value = resEnc.body.data
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function editCheckOut() {
|
||||
@@ -67,9 +77,8 @@ function submitCheckOut(values: CheckOutFormData) {
|
||||
<div class="border-r lg:pe-4 xl:pe-5 mb-10">
|
||||
<div class="mb-4 xl:mb-5 text-base text-center font-semibold">Informasi Masuk</div>
|
||||
<CheckInView
|
||||
:encounter="encounter"
|
||||
:is-loading="checkInIsLoading"
|
||||
:is-readonly="checkInIsReadonly"
|
||||
:encounter="localEncounter"
|
||||
:can-update="canUpdate"
|
||||
@edit="editCheckIn"
|
||||
/>
|
||||
</div>
|
||||
@@ -77,9 +86,8 @@ function submitCheckOut(values: CheckOutFormData) {
|
||||
<Separator class="lg:hidden my-4 xl:my-5" />
|
||||
<div class="mb-4 xl:mb-5 text-base text-center font-semibold">Informasi Keluar</div>
|
||||
<CheckOutView
|
||||
:encounter="encounter"
|
||||
:is-loading="checkOutIsLoading"
|
||||
:is-readonly="checkOutIsReadonly"
|
||||
:encounter="localEncounter"
|
||||
:can-update="canUpdate"
|
||||
@edit="editCheckOut"
|
||||
/>
|
||||
</div>
|
||||
@@ -122,4 +130,4 @@ function submitCheckOut(values: CheckOutFormData) {
|
||||
@cancel="checkInDialogOpen = false"
|
||||
/>
|
||||
</Dialog>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user