feat(emr_boarding_room_discharge): add entity to store discharge information for inpatient boarding rooms with relevant fields and relationships
This commit is contained in:
54
src/entity/emr/emr_boarding_room_discharge.ts
Normal file
54
src/entity/emr/emr_boarding_room_discharge.ts
Normal file
@ -0,0 +1,54 @@
|
||||
import {
|
||||
Entity,
|
||||
PrimaryGeneratedColumn,
|
||||
Column,
|
||||
CreateDateColumn,
|
||||
UpdateDateColumn,
|
||||
DeleteDateColumn,
|
||||
OneToOne,
|
||||
JoinColumn,
|
||||
} from "typeorm";
|
||||
import { EmrBoardingRoom } from "./emr_boarding_rooms";
|
||||
|
||||
/** Stores discharge information for inpatient boarding rooms. */
|
||||
@Entity("emr_boarding_room_discharge", { schema: "emr" })
|
||||
export class EmrBoardingRoomDischarge {
|
||||
@PrimaryGeneratedColumn("uuid")
|
||||
id: string;
|
||||
|
||||
@OneToOne(() => EmrBoardingRoom, { onDelete: "NO ACTION" })
|
||||
@JoinColumn()
|
||||
boarding_room: EmrBoardingRoom;
|
||||
|
||||
@Column({ nullable: true })
|
||||
discharge_at: Date;
|
||||
|
||||
/** pulang | dirujuk | pulang-paksa */
|
||||
@Column({ nullable: true, length: 64 })
|
||||
discharge_status: string;
|
||||
|
||||
/** berobat-jalan | lain-lain */
|
||||
@Column({ nullable: true, length: 64 })
|
||||
discharge_condition: string;
|
||||
|
||||
@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;
|
||||
}
|
||||
@ -12,6 +12,7 @@ export * from "../entity/emr/emr_boarding_rooms";
|
||||
export * from "../entity/emr/emr_boarding_room_doctor_histories";
|
||||
export * from "../entity/emr/emr_boarding_room_bed_histories";
|
||||
export * from "../entity/emr/emr_boarding_room_deceased";
|
||||
export * from "../entity/emr/emr_boarding_room_discharge";
|
||||
export * from "../entity/emr/emr_diagnosis";
|
||||
export * from "../entity/emr/emr_diagnostic_procedure";
|
||||
export * from "../entity/emr/emr_doctor_procedure";
|
||||
|
||||
Reference in New Issue
Block a user