feat/micro-lab-order-50: added antibiotic

This commit is contained in:
Andrian Roshandy
2025-12-01 01:50:39 +07:00
parent 95e27a8b6f
commit 1ee0f39e7d
13 changed files with 242 additions and 1 deletions
+16
View File
@@ -0,0 +1,16 @@
import { type Base, genBase } from "./_base"
import type { AntibioticSrc } from "./antibiotic-src"
export interface AntibioticInUse extends Base {
mcuOrder_id: number
antibioticSrc_code: string
antibioticSrc: AntibioticSrc
}
export function genDevice(): Pick<AntibioticInUse, 'mcuOrder_id' | 'antibioticSrc_code'> {
return {
...genBase(),
mcuOrder_id: 0,
antibioticSrc_code: ''
}
}
+14
View File
@@ -0,0 +1,14 @@
import { type Base, genBase } from "./_base"
export interface AntibioticSrcCategory extends Base {
code: string
name: string
}
export function genDevice(): AntibioticSrcCategory {
return {
...genBase(),
code: '',
name: '',
}
}
+16
View File
@@ -0,0 +1,16 @@
import { type Base, genBase } from "./_base"
export interface AntibioticSrc extends Base {
code: string
name: string
antibioticSrcCategory_code: string
}
export function genDevice(): AntibioticSrc {
return {
...genBase(),
code: '',
name: '',
antibioticSrcCategory_code: ''
}
}
+4 -1
View File
@@ -1,4 +1,5 @@
import { type Base, genBase } from "./_base"
import type { AntibioticInUse } from "./antibiotic-in-use"
import { type Doctor, genDoctor } from "./doctor"
import type { McuOrderItem } from "./mcu-order-item"
@@ -13,6 +14,7 @@ export interface McuOrder extends Base {
temperature?: number
mcuUrgencyLevel_code?: string
items: McuOrderItem[]
antibioticInUseItems: AntibioticInUse[]
}
export function genMcuOrder(): McuOrder {
@@ -23,7 +25,8 @@ export function genMcuOrder(): McuOrder {
doctor: genDoctor(),
specimenPickTime: '',
examinationDate: '',
items: []
items: [],
antibioticInUseItems: [],
}
}