This commit is contained in:
2026-04-28 16:31:38 +07:00
parent dc0e8800ff
commit 5fa0da97f3
4 changed files with 69 additions and 0 deletions

View File

@ -0,0 +1,51 @@
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, ManyToOne, JoinColumn } from "typeorm";
import { InpatientRoom } from "./inpatient_rooms";
import { EmrBoardingRoom } from "./emr/emr_boarding_rooms";
import { InpatientRoomBedStatus } from "../types/public";
@Entity("inpatient_room_beds")
export class InpatientRoomBed {
@PrimaryGeneratedColumn("uuid")
id: string;
@ManyToOne(() => InpatientRoom, { onDelete: "NO ACTION" })
@JoinColumn()
inpatient_room: InpatientRoom;
@ManyToOne(() => EmrBoardingRoom, { onDelete: "NO ACTION" })
@JoinColumn()
boarding_room: EmrBoardingRoom;
@Column({
nullable: false,
type: "int",
})
order_number: number;
@Column({
nullable: false,
length: 64,
})
status: InpatientRoomBedStatus;
@Column()
@CreateDateColumn()
created_at: Date;
@Column({ nullable: true, length: 256 })
created_by: string;
@Column({ nullable: true })
@UpdateDateColumn()
updated_at: Date;
@Column({ nullable: true, length: 256 })
updated_by: string;
@Column({ nullable: true })
@DeleteDateColumn()
deleted_at: Date;
@Column({ nullable: true, length: 256 })
deleted_by: string;
}

View File

@ -11,6 +11,7 @@ export * from "../entity/suco";
export * from "../entity/application";
export * from "../entity/currencies";
export * from "../entity/inpatient_rooms";
export * from "../entity/inpatient_room_beds";
export * from "../entity/nationality";
export * from "../entity/diagnosis";
export * from "../entity/diagnostic_procedure";
@ -51,6 +52,7 @@ export * from "../entity/ward";
export * from "../entity/responsible_party_consent";
export * from "../entity/foster_care_history";
export * from "../types/public";
export * from "../types/action";
export * from "../types/error";
export * from "../types/paging";

16
src/types/public.ts Normal file
View File

@ -0,0 +1,16 @@
export enum InpatientRoomBedStatus {
"Green" = "green",
"Red" = "red",
"Pink" = "pink",
"Yellow" = "yellow",
"Gray" = "gray",
"Blue" = "blue",
"Purple" = "purple",
"Orange" = "orange",
"White" = "white",
"Brown" = "brown",
"DarkBlue" = "dark_blue",
"PeachPuff" = "peachpuff",
"PinkIntermittent" = "pink_intermittent",
"PinkContinues" = "pink_continues",
}