update entity
This commit is contained in:
@ -11,9 +11,10 @@ import {
|
||||
} from "typeorm";
|
||||
|
||||
import { EmrRegistration } from "./emr_registration";
|
||||
import { Department } from "../department";
|
||||
import { Room } from "../room";
|
||||
import { User } from "../users";
|
||||
import { DoctorSchedule } from "../doctor_schedule";
|
||||
import { RegistrationOutPatientStatus } from "../../enum/registrationOutPatientStatus";
|
||||
|
||||
/**
|
||||
* Detail registrasi rawat jalan (outpatient).
|
||||
@ -25,13 +26,13 @@ export class EmrRegistrationOutpatient {
|
||||
@PrimaryGeneratedColumn("uuid")
|
||||
id: string;
|
||||
|
||||
@OneToOne(() => EmrRegistration, { onDelete: "CASCADE" })
|
||||
@ManyToOne(() => EmrRegistration, { onDelete: "CASCADE" })
|
||||
@JoinColumn()
|
||||
registration: EmrRegistration;
|
||||
|
||||
@ManyToOne(() => Department, { onDelete: "NO ACTION" })
|
||||
@ManyToOne(() => Room, { onDelete: "NO ACTION" })
|
||||
@JoinColumn()
|
||||
department: Department;
|
||||
room: Room;
|
||||
|
||||
@ManyToOne(() => User, { onDelete: "NO ACTION" })
|
||||
@JoinColumn()
|
||||
@ -49,6 +50,22 @@ export class EmrRegistrationOutpatient {
|
||||
@Column({ type: "date", nullable: true })
|
||||
visit_date: Date;
|
||||
|
||||
@Column({
|
||||
type: "enum",
|
||||
enum: RegistrationOutPatientStatus,
|
||||
nullable: true,
|
||||
})
|
||||
registration_status: RegistrationOutPatientStatus;
|
||||
|
||||
@Column({ nullable: true, length: 256 })
|
||||
qeue_number: string;
|
||||
|
||||
@Column({ nullable: true, length: 256 })
|
||||
room_status: string;
|
||||
|
||||
@Column({ nullable: true, length: 256 })
|
||||
registration_number: string;
|
||||
|
||||
@Column()
|
||||
@CreateDateColumn()
|
||||
created_at: Date;
|
||||
|
||||
4
src/enum/registrationOutPatientStatus.ts
Normal file
4
src/enum/registrationOutPatientStatus.ts
Normal file
@ -0,0 +1,4 @@
|
||||
export enum RegistrationOutPatientStatus {
|
||||
RESERVED = "RESERVED",
|
||||
REGISTERED = "REGISTERED",
|
||||
}
|
||||
@ -6,5 +6,6 @@ export enum RegistrationStatus {
|
||||
ONGOING = "ongoing", // sedang dalam proses (pasien sedang dilayani)
|
||||
COMPLETED = "completed", // layanan sudah selesai
|
||||
CANCELED = "canceled", // dibatalkan
|
||||
RESERVED = "reserved", // sudah didaftarkan, belum dipanggil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user