feat(cemo): add mode adm + series

This commit is contained in:
riefive
2025-11-03 15:52:35 +07:00
parent 89b2fb9cd9
commit fb7731188d
8 changed files with 75 additions and 15 deletions
@@ -10,11 +10,19 @@ import type { TabItem } from '~/components/pub/my-ui/comp-tab/type'
import CompTab from '~/components/pub/my-ui/comp-tab/comp-tab.vue' import CompTab from '~/components/pub/my-ui/comp-tab/comp-tab.vue'
// PLASE ORDER BY TAB POSITION // PLASE ORDER BY TAB POSITION
import Status from '~/components/content/encounter/status.vue'
import EarlyMedicalAssesmentList from '~/components/content/soapi/entry.vue'
import EarlyMedicalRehabList from '~/components/content/soapi/entry.vue'
import PrescriptionList from '~/components/content/prescription/list.vue'
import Consultation from '~/components/content/consultation/list.vue'
import ProtocolList from '~/components/app/chemotherapy/list.protocol.vue' import ProtocolList from '~/components/app/chemotherapy/list.protocol.vue'
import MedicineProtocolList from '~/components/app/chemotherapy/list.medicine.vue' import MedicineProtocolList from '~/components/app/chemotherapy/list.medicine.vue'
const route = useRoute() const route = useRoute()
const router = useRouter() const router = useRouter()
const mode = computed(() => {
return route.query.mode as string || 'series'
})
// activeTab selalu sinkron dengan query param // activeTab selalu sinkron dengan query param
const activeTab = computed({ const activeTab = computed({
@@ -25,12 +33,32 @@ const activeTab = computed({
}) })
const id = typeof route.params.id == 'string' ? parseInt(route.params.id) : 0 const id = typeof route.params.id == 'string' ? parseInt(route.params.id) : 0
const dataRes = await getDetail(id, { // const dataRes = await getDetail(id, {
includes: // includes:
'patient,patient-person,patient-person-addresses,unit,Appointment_Doctor,Appointment_Doctor-employee,Appointment_Doctor-employee-person', // 'patient,patient-person,patient-person-addresses,unit,Appointment_Doctor,Appointment_Doctor-employee,Appointment_Doctor-employee-person',
// })
// const dataResBody = dataRes.body ?? null
// const data = dataResBody?.data ?? null
// Dummy data so AppEncounterQuickInfo can render in development/storybook
// Replace with real API result when available (see commented fetch below)
const data = ref<any>({
patient: {
number: 'RM-2025-0001',
person: {
name: 'John Doe',
birthDate: '1980-01-01T00:00:00Z',
gender_code: 'M',
addresses: [{ address: 'Jl. Contoh No.1, Jakarta' }],
frontTitle: '',
endTitle: '',
},
},
visitDate: new Date().toISOString(),
unit: { name: 'Onkologi' },
responsible_doctor: null,
appointment_doctor: { employee: { person: { name: 'Dr. Clara Smith', frontTitle: 'Dr.', endTitle: 'Sp.OG' } } },
}) })
const dataResBody = dataRes.body ?? null
const data = dataResBody?.data ?? null
// Dummy rows for ProtocolList (matches keys expected by list-cfg.protocol) // Dummy rows for ProtocolList (matches keys expected by list-cfg.protocol)
const protocolRows = [ const protocolRows = [
@@ -62,8 +90,40 @@ const paginationMeta = {
} }
const tabs: TabItem[] = [ const tabs: TabItem[] = [
{ value: 'chemotherapy-protocol', label: 'Protokol Kemoterapi', component: ProtocolList, props: { data: protocolRows, paginationMeta } }, { value: 'status', label: 'Status Masuk/Keluar', component: Status, props: { encounter: data } },
{ value: 'chemotherapy-medicine', label: 'Protokol Obat Kemoterapi', component: MedicineProtocolList, props: { data: protocolRows, paginationMeta } }, { value: 'early-medical-assessment', label: 'Pengkajian Awal Medis', component: EarlyMedicalAssesmentList },
{
value: 'rehab-medical-assessment',
label: 'Pengkajian Awal Medis Rehabilitasi Medis',
component: EarlyMedicalRehabList,
},
{
value: 'chemotherapy-protocol',
label: 'Protokol Kemoterapi',
component: ProtocolList,
props: { data: protocolRows, paginationMeta },
},
{
value: 'chemotherapy-medicine',
label: 'Protokol Obat Kemoterapi',
component: MedicineProtocolList,
props: { data: protocolRows, paginationMeta },
},
{ value: 'report', label: 'Laporan Tindakan' },
{ value: 'patient-note', label: 'CPRJ' },
{ value: 'prescription', label: 'Order Obat', component: PrescriptionList },
{ value: 'device', label: 'Order Alkes' },
{ value: 'mcu-radiology', label: 'Order Radiologi' },
{ value: 'mcu-lab-pc', label: 'Order Lab PK' },
{ value: 'mcu-lab-micro', label: 'Order Lab Mikro' },
{ value: 'mcu-lab-pa', label: 'Order Lab PA' },
{ value: 'medical-action', label: 'Order Ruang Tindakan' },
{ value: 'mcu-result', label: 'Hasil Penunjang' },
{ value: 'consultation', label: 'Konsultasi', component: Consultation, props: { encounter: data } },
{ value: 'resume', label: 'Resume' },
{ value: 'control', label: 'Surat Kontrol' },
{ value: 'screening', label: 'Skrinning MPP' },
{ value: 'price-list', label: 'Tarif Tindakan' },
] ]
</script> </script>
@@ -74,10 +134,10 @@ const tabs: TabItem[] = [
</div> </div>
<AppEncounterQuickInfo :data="data" /> <AppEncounterQuickInfo :data="data" />
<CompTab <CompTab
v-if="mode === 'series'"
:data="tabs" :data="tabs"
:initial-active-tab="activeTab" :initial-active-tab="activeTab"
@change-tab="activeTab = $event" @change-tab="activeTab = $event"
/> />
</div> </div>
</template> </template>
@@ -1,7 +1,7 @@
<script setup lang="ts"> <script setup lang="ts">
// Redirect to list page - the process page is now at [id]/index.vue // Redirect to list page - the process page is now at [id]/index.vue
const route = useRoute() const route = useRoute()
navigateTo('/outpatient-action/chemotherapy/list') navigateTo('/outpation-action/chemotherapy/list')
</script> </script>
<template> <template>
+2 -2
View File
@@ -84,12 +84,12 @@
{ {
"title": "Kemoterapi", "title": "Kemoterapi",
"icon": "i-lucide-droplets", "icon": "i-lucide-droplets",
"link": "/outpatient-action/chemotherapy" "link": "/outpation-action/chemotherapy"
}, },
{ {
"title": "Hemofilia", "title": "Hemofilia",
"icon": "i-lucide-droplet-off", "icon": "i-lucide-droplet-off",
"link": "/outpatient-action/hemophilia/encounter" "link": "/outpation-action/hemophilia"
} }
] ]
}, },
+1 -1
View File
@@ -63,7 +63,7 @@
{ {
"title": "Kemoterapi", "title": "Kemoterapi",
"icon": "i-lucide-droplets", "icon": "i-lucide-droplets",
"link": "/outpatient-action/chemotherapy" "link": "/outpation-action/chemotherapy"
}, },
{ {
"title": "Hemofilia", "title": "Hemofilia",
+2 -2
View File
@@ -35,12 +35,12 @@
{ {
"title": "Kemoterapi", "title": "Kemoterapi",
"icon": "i-lucide-droplets", "icon": "i-lucide-droplets",
"link": "/outpatient-action/chemotherapy" "link": "/outpation-action/chemotherapy"
}, },
{ {
"title": "Hemofilia", "title": "Hemofilia",
"icon": "i-lucide-droplet-off", "icon": "i-lucide-droplet-off",
"link": "/outpatient-action/hemophilia" "link": "/outpation-action/hemophilia"
} }
] ]
}, },
+1 -1
View File
@@ -139,7 +139,7 @@
{ {
"title": "Kemoterapi", "title": "Kemoterapi",
"icon": "i-lucide-droplets", "icon": "i-lucide-droplets",
"link": "/outpatient-action/chemotherapy" "link": "/outpation-action/chemotherapy"
}, },
{ {
"title": "Hemofilia", "title": "Hemofilia",