57 lines
1.1 KiB
TypeScript
57 lines
1.1 KiB
TypeScript
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 extends Base {
|
|
encounter_id: number
|
|
encounter: Encounter
|
|
doctor_id: number
|
|
doctor: Doctor
|
|
specialistIntern_id?: number
|
|
specialistIntern?: SpecialistIntern
|
|
issuedAt: string
|
|
status_code: string
|
|
items: PrescriptionItem[]
|
|
}
|
|
|
|
export interface CreateDto {
|
|
encounter_id: number
|
|
doctor_id: number
|
|
issuedAt: string
|
|
status_code: string
|
|
}
|
|
|
|
export interface GetListDto {
|
|
encounter_id: number
|
|
doctor_id: number
|
|
issuedAt: string
|
|
status_code: string
|
|
}
|
|
|
|
export interface GetDetailDto {
|
|
id?: string
|
|
}
|
|
|
|
export interface UpdateDto extends CreateDto {
|
|
id?: number
|
|
}
|
|
|
|
export interface DeleteDto {
|
|
id?: string
|
|
}
|
|
|
|
export function genPresciption(): Prescription {
|
|
return {
|
|
...genBase(),
|
|
encounter_id: 0,
|
|
encounter: genEncounter(),
|
|
doctor_id: 0,
|
|
doctor: genDoctor(),
|
|
issuedAt: '',
|
|
status_code: '',
|
|
items: [],
|
|
}
|
|
}
|