-
-
- Tgl Order
-
- {{ item.issuedAt }}
-
-
-
-
- DPJP
-
-
-
-
- Status
-
- {{ item.status_code }}
-
-
-
-
- PPDS
-
-
-
-
+
+
+ Order #{{ data.length - idx }} - {{ item.issuedAt?.substring(0, 10) || item.createdAt?.substring(0, 10) }} - {{ item.status_code }}
-
-
+
+
+ DPJP
+
+ {{ item.doctor?.employee?.person?.name || '-' }}
+
+
+
+ PPDS
+
+ ...........
+
+
+
+
+
+
+
diff --git a/app/components/content/prescription/entry.vue b/app/components/content/prescription/entry.vue
index 6d76d685..4b3fa663 100644
--- a/app/components/content/prescription/entry.vue
+++ b/app/components/content/prescription/entry.vue
@@ -1,24 +1,87 @@
@@ -28,10 +91,42 @@ const headerPrep: HeaderPrep = {
class="mb-4 xl:mb-5"
/>
-
+
+
+
+
+
+
+
diff --git a/app/components/content/prescription/list.vue b/app/components/content/prescription/list.vue
index 92f6afeb..844cb04f 100644
--- a/app/components/content/prescription/list.vue
+++ b/app/components/content/prescription/list.vue
@@ -1,10 +1,10 @@
+
-
+ handleActionRemove(recId, getMyList, toast)"
+ @cancel=""
+ >
+
diff --git a/app/components/content/prescription/main.vue b/app/components/content/prescription/main.vue
index b2a17463..033d093f 100644
--- a/app/components/content/prescription/main.vue
+++ b/app/components/content/prescription/main.vue
@@ -7,10 +7,10 @@ const props = defineProps<{
encounter_id: number
}>()
-const { mode } = useQueryMode()
+const { mode } = useQueryCRUDMode()
-
+
diff --git a/app/models/prescription.ts b/app/models/prescription.ts
index 543724d2..12d5eb9d 100644
--- a/app/models/prescription.ts
+++ b/app/models/prescription.ts
@@ -1,10 +1,10 @@
+import { type Base, genBase } from "./_base";
import { type Encounter, genEncounter } from "./encounter";
import { type Doctor, genDoctor } from "./doctor";
import { type PrescriptionItem } from "./prescription-item";
import type { SpecialistIntern } from "./specialist-intern";
-export interface Prescription {
- id: number
+export interface Prescription extends Base {
encounter_id: number
encounter: Encounter
doctor_id: number
@@ -44,7 +44,7 @@ export interface DeleteDto {
export function genPresciption(): Prescription {
return {
- id: 0,
+ ...genBase(),
encounter_id: 0,
encounter: genEncounter(),
doctor_id: 0,
diff --git a/app/services/prescription.service.ts b/app/services/prescription.service.ts
index 87fe01e3..150357ab 100644
--- a/app/services/prescription.service.ts
+++ b/app/services/prescription.service.ts
@@ -1,6 +1,7 @@
import * as base from './_crud-base'
const path = '/api/v1/prescription'
+const name = 'prescription'
export function create(data: any) {
return base.create(path, data)
@@ -10,8 +11,8 @@ export function getList(params: any = null) {
return base.getList(path, params)
}
-export function getDetail(id: number | string) {
- return base.getDetail(path, id)
+export function getDetail(id: number | string, params?: any) {
+ return base.getDetail(path, id, name, params)
}
export function update(id: number | string, data: any) {