fix: add queue number on pharmacy order
This commit is contained in:
@ -19,7 +19,7 @@ import { EmrPatient } from "./emr_patient";
|
||||
import { PharmacyOrderStatus } from "../../types/pharmacy_order_status";
|
||||
|
||||
@Entity("emr_pharmacy_order", { schema: "emr" })
|
||||
@Index(["code"], { unique: true })
|
||||
@Index(["code", "queue_number"], { unique: true })
|
||||
export class EmrPharmacyOrder {
|
||||
@PrimaryGeneratedColumn("uuid")
|
||||
id: string;
|
||||
@ -27,6 +27,9 @@ export class EmrPharmacyOrder {
|
||||
@Column({ type: "varchar", unique: true })
|
||||
code: string;
|
||||
|
||||
@Column({ nullable: true, type: "varchar", length: 256, unique: true })
|
||||
queue_number?: string;
|
||||
|
||||
@ManyToOne(() => EmrRegistration, { onDelete: "CASCADE" })
|
||||
@JoinColumn({ name: "registration_id" })
|
||||
registration: EmrRegistration | null;
|
||||
|
||||
@ -8,8 +8,8 @@
|
||||
*/
|
||||
export enum PharmacyOrderStatus {
|
||||
WAITING = "waiting",
|
||||
PREPARING = "preparing",
|
||||
READY = "ready",
|
||||
ORDERED = "ordered",
|
||||
VERIFIED = "verified",
|
||||
COMPLETED = "completed",
|
||||
CANCELED = "canceled",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user