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