update registration inpatient

This commit is contained in:
Shibly Teknologi Solusi
2026-05-13 13:00:38 +07:00
parent 6f67232884
commit 911175b9c1

View File

@ -15,11 +15,11 @@ export class EmrRegistrationInpatient {
@PrimaryGeneratedColumn("uuid")
id: string;
@OneToOne(() => EmrRegistration, { onDelete: "CASCADE" })
@OneToOne(() => EmrRegistration, { onDelete: "CASCADE", nullable: true })
@JoinColumn()
registration: EmrRegistration;
@ManyToOne(() => InpatientRoom, { onDelete: "NO ACTION" })
@ManyToOne(() => InpatientRoom, { onDelete: "NO ACTION", nullable: true })
@JoinColumn()
inpatient_room: InpatientRoom;
@ -27,7 +27,7 @@ export class EmrRegistrationInpatient {
@JoinColumn()
inpatient_room_bed: InpatientRoomBed | null;
@ManyToOne(() => EmrPatient, { onDelete: "NO ACTION" })
@ManyToOne(() => EmrPatient, { onDelete: "NO ACTION", nullable: true })
@JoinColumn()
patient: EmrPatient;
@ -37,7 +37,7 @@ export class EmrRegistrationInpatient {
@Column({ nullable: true, length: 32 })
bed_number: string;
@Column({ type: "date", nullable: false })
@Column({ type: "date", nullable: true })
admission_date: Date;
@Column({ type: "text", nullable: true })