update: emergency registration done
This commit is contained in:
@ -7,7 +7,8 @@ import {
|
||||
DeleteDateColumn,
|
||||
ManyToOne,
|
||||
JoinColumn,
|
||||
OneToOne
|
||||
OneToOne,
|
||||
ManyToMany
|
||||
} from "typeorm";
|
||||
|
||||
import { RegistrationType } from "../../types/registration_type";
|
||||
@ -15,6 +16,7 @@ import { RegistrationStatus } from "../../types/registration_status";
|
||||
import { EmrPatient } from "./emr_patient";
|
||||
import { PatientGuarantor } from "../patient_guarantor";
|
||||
import { EmrRegistrationOutpatient } from "./emr_registration_outpatient";
|
||||
import {EmrRegistrationEmergency} from "./emr_registration_emergency";
|
||||
|
||||
/**
|
||||
* Registrasi base: data umum untuk semua tipe (rawat jalan, rawat inap, emergency, hemodialysis).
|
||||
@ -29,6 +31,9 @@ export class EmrRegistration {
|
||||
@OneToOne(() => EmrRegistrationOutpatient, (out) => out.registration)
|
||||
outpatient: EmrRegistrationOutpatient;
|
||||
|
||||
@OneToOne(() => EmrRegistrationEmergency, (emergency) => emergency.registration)
|
||||
emergency: EmrRegistrationEmergency;
|
||||
|
||||
@ManyToOne(() => EmrPatient, { onDelete: "NO ACTION" })
|
||||
@JoinColumn()
|
||||
patient: EmrPatient;
|
||||
@ -59,6 +64,15 @@ export class EmrRegistration {
|
||||
@Column({ type: "date", nullable: true })
|
||||
visit_date: Date;
|
||||
|
||||
@Column({ nullable: true, type: "text" })
|
||||
fullname: string;
|
||||
|
||||
@Column({ nullable: true, type: "date" })
|
||||
birthdate: Date;
|
||||
|
||||
@Column({ nullable: true, type: "text" })
|
||||
idcard: string;
|
||||
|
||||
@Column()
|
||||
@CreateDateColumn()
|
||||
created_at: Date;
|
||||
|
||||
@ -53,6 +53,15 @@ export class EmrRegistrationEmergencyResponsible {
|
||||
@JoinColumn({ referencedColumnName: "code" })
|
||||
ward: Ward;
|
||||
|
||||
@Column({ nullable: true, type: "text" })
|
||||
patientfullname: string;
|
||||
|
||||
@Column({ nullable: true, type: "text" })
|
||||
patientnik: string;
|
||||
|
||||
@Column({ type: "date", nullable: true })
|
||||
patientbirthdate: Date;
|
||||
|
||||
/** Tingkat keparahan / triage (e.g. merah, kuning, hijau) */
|
||||
@Column({ nullable: true, type: "text" })
|
||||
fullname: string;
|
||||
@ -69,6 +78,9 @@ export class EmrRegistrationEmergencyResponsible {
|
||||
@Column({ nullable: true, type: "text" })
|
||||
address: string;
|
||||
|
||||
@Column({ nullable: true, type: "boolean", default: false })
|
||||
consent: boolean;
|
||||
|
||||
@Column()
|
||||
@CreateDateColumn()
|
||||
created_at: Date;
|
||||
|
||||
@ -7,5 +7,7 @@ export enum RegistrationStatus {
|
||||
COMPLETED = "completed", // layanan sudah selesai
|
||||
CANCELED = "canceled", // dibatalkan
|
||||
RESERVED = "reserved", // sudah didaftarkan, belum dipanggil
|
||||
REGISTERED = "registered", // sudah didaftarkan
|
||||
UNREGISTERED = "unregistered", // belum didaftarkan
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user