feat/prescription: integrated non-mix
This commit is contained in:
@@ -1,10 +1,17 @@
|
||||
import type { MedicineFormData } from "~/schemas/medicine.schema"
|
||||
import { type Base, genBase } from "./_base"
|
||||
import type { MedicineGroup } from "./medicine-group"
|
||||
import type { MedicineMethod } from "./medicine-method"
|
||||
|
||||
export interface Medicine extends Base {
|
||||
code: string
|
||||
name: string
|
||||
medicineGroup_code: string
|
||||
medicineMethod_code: string
|
||||
medicineGroup_code?: string
|
||||
medicineGroup?: MedicineGroup
|
||||
medicineMethod_code?: string
|
||||
medicineMethod?: MedicineMethod
|
||||
medicineForm_code?: string
|
||||
medicineForm?: MedicineFormData
|
||||
uom_code: string
|
||||
infra_id?: string | null
|
||||
stock: number
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { type Base, genBase } from "./_base"
|
||||
import { type Medicine, genMedicine } from "./medicine";
|
||||
|
||||
interface MedicinemixItem extends Base {
|
||||
export interface MedicinemixItem extends Base {
|
||||
id: number
|
||||
medicineMix_id: number
|
||||
medicine_id: number
|
||||
@@ -35,7 +35,7 @@ export interface DeleteDto {
|
||||
id: number
|
||||
}
|
||||
|
||||
export function MedicinemixItem(): MedicinemixItem {
|
||||
export function genMedicinemixItem(): MedicinemixItem {
|
||||
return {
|
||||
...genBase(),
|
||||
medicineMix_id: 0,
|
||||
|
||||
@@ -5,10 +5,10 @@ export interface PrescriptionItem {
|
||||
id: number;
|
||||
prescription_id: number;
|
||||
isMix: boolean;
|
||||
medicine_id: number;
|
||||
medicine: Medicine;
|
||||
medicineMix_id: number;
|
||||
medicineMix: Medicinemix
|
||||
medicine_code?: string;
|
||||
medicine?: Medicine;
|
||||
medicineMix_id?: number;
|
||||
medicineMix?: Medicinemix
|
||||
frequency: number;
|
||||
dose: number;
|
||||
interval: number;
|
||||
@@ -29,35 +29,35 @@ export interface CreateDto {
|
||||
quantity: number;
|
||||
usage: string;
|
||||
}
|
||||
|
||||
|
||||
export interface GetListDto {
|
||||
page: number
|
||||
size: number
|
||||
name?: string
|
||||
// code?: string
|
||||
}
|
||||
|
||||
|
||||
export interface GetDetailDto {
|
||||
id?: string
|
||||
}
|
||||
|
||||
|
||||
export interface UpdateDto extends CreateDto {
|
||||
id?: number
|
||||
}
|
||||
|
||||
|
||||
export interface DeleteDto {
|
||||
id?: string
|
||||
}
|
||||
|
||||
export function genPresciptionItem(): PrescriptionItem {
|
||||
|
||||
export function genPrescriptionItem(): PrescriptionItem {
|
||||
return {
|
||||
id: 0,
|
||||
prescription_id: 0,
|
||||
isMix: false,
|
||||
medicine_id: 0,
|
||||
medicine: genMedicine(),
|
||||
medicineMix_id: 0,
|
||||
medicineMix: genMedicinemix(),
|
||||
// medicine_code: '',
|
||||
// medicine: genMedicine(),
|
||||
// medicineMix_id: 0,
|
||||
// medicineMix: genMedicinemix(),
|
||||
frequency: 0,
|
||||
dose: 0,
|
||||
interval: 0,
|
||||
@@ -66,4 +66,3 @@ export function genPresciptionItem(): PrescriptionItem {
|
||||
usage: ''
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user