update
This commit is contained in:
@ -1,17 +1,8 @@
|
||||
import {
|
||||
Entity,
|
||||
PrimaryGeneratedColumn,
|
||||
Column,
|
||||
CreateDateColumn,
|
||||
UpdateDateColumn,
|
||||
DeleteDateColumn,
|
||||
ManyToOne,
|
||||
OneToOne,
|
||||
JoinColumn,
|
||||
} from "typeorm";
|
||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, ManyToOne, OneToOne, JoinColumn } from "typeorm";
|
||||
|
||||
import { EmrRegistration } from "./emr_registration";
|
||||
import { Room } from "../room";
|
||||
import { EmrBoardingRoom } from "./emr_boarding_rooms";
|
||||
|
||||
/**
|
||||
* Detail registrasi rawat inap (inpatient).
|
||||
@ -19,47 +10,44 @@ import { Room } from "../room";
|
||||
*/
|
||||
@Entity("emr_registration_inpatient", { schema: "emr" })
|
||||
export class EmrRegistrationInpatient {
|
||||
@PrimaryGeneratedColumn("uuid")
|
||||
id: string;
|
||||
@PrimaryGeneratedColumn("uuid")
|
||||
id: string;
|
||||
|
||||
@OneToOne(() => EmrRegistration, { onDelete: "CASCADE" })
|
||||
@JoinColumn()
|
||||
registration: EmrRegistration;
|
||||
@OneToOne(() => EmrRegistration, { onDelete: "CASCADE" })
|
||||
@JoinColumn()
|
||||
registration: EmrRegistration;
|
||||
|
||||
@ManyToOne(() => Room, { onDelete: "NO ACTION" })
|
||||
@JoinColumn()
|
||||
room: Room;
|
||||
@ManyToOne(() => EmrBoardingRoom, { onDelete: "NO ACTION" })
|
||||
@JoinColumn()
|
||||
boarding_room: EmrBoardingRoom;
|
||||
|
||||
@Column({ nullable: true, length: 32 })
|
||||
bed_number: string;
|
||||
@Column({ type: "date", nullable: false })
|
||||
admission_date: Date;
|
||||
|
||||
@Column({ type: "date", nullable: false })
|
||||
admission_date: Date;
|
||||
@Column({ type: "date", nullable: true })
|
||||
planned_discharge_date: Date;
|
||||
|
||||
@Column({ type: "date", nullable: true })
|
||||
planned_discharge_date: Date;
|
||||
@Column({ type: "text", nullable: true })
|
||||
admission_notes: string;
|
||||
|
||||
@Column({ type: "text", nullable: true })
|
||||
admission_notes: string;
|
||||
@Column()
|
||||
@CreateDateColumn()
|
||||
created_at: Date;
|
||||
|
||||
@Column()
|
||||
@CreateDateColumn()
|
||||
created_at: Date;
|
||||
@Column({ nullable: true, length: 256 })
|
||||
created_by: string;
|
||||
|
||||
@Column({ nullable: true, length: 256 })
|
||||
created_by: string;
|
||||
@Column({ nullable: true })
|
||||
@UpdateDateColumn()
|
||||
updated_at: Date;
|
||||
|
||||
@Column({ nullable: true })
|
||||
@UpdateDateColumn()
|
||||
updated_at: Date;
|
||||
@Column({ nullable: true, length: 256 })
|
||||
updated_by: string;
|
||||
|
||||
@Column({ nullable: true, length: 256 })
|
||||
updated_by: string;
|
||||
@Column({ nullable: true })
|
||||
@DeleteDateColumn()
|
||||
deleted_at: Date;
|
||||
|
||||
@Column({ nullable: true })
|
||||
@DeleteDateColumn()
|
||||
deleted_at: Date;
|
||||
|
||||
@Column({ nullable: true, length: 256 })
|
||||
deleted_by: string;
|
||||
@Column({ nullable: true, length: 256 })
|
||||
deleted_by: string;
|
||||
}
|
||||
|
||||
@ -1,138 +0,0 @@
|
||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, ManyToOne, JoinColumn } from "typeorm";
|
||||
import { InpatientRoomBed } from "./inpatient_room_beds";
|
||||
import { Room } from "./room";
|
||||
|
||||
@Entity("inpatient_room_bed_details")
|
||||
export class InpatientRoomBedDetail {
|
||||
@PrimaryGeneratedColumn("uuid")
|
||||
id: string;
|
||||
|
||||
@ManyToOne(() => InpatientRoomBed, { onDelete: "NO ACTION" })
|
||||
@JoinColumn()
|
||||
inpatient_room_bed: InpatientRoomBed;
|
||||
|
||||
@Column({ type: "timestamp", nullable: true })
|
||||
admission_datetime: Date;
|
||||
|
||||
@ManyToOne(() => Room, { onDelete: "NO ACTION" })
|
||||
@JoinColumn()
|
||||
origin_room: Room;
|
||||
|
||||
@ManyToOne(() => Room, { onDelete: "NO ACTION" })
|
||||
@JoinColumn()
|
||||
destination_room: Room;
|
||||
|
||||
@Column({ type: "timestamp", nullable: true })
|
||||
transfer_datetime: Date;
|
||||
|
||||
@Column({ nullable: true, type: "text" })
|
||||
admission_indication: string;
|
||||
|
||||
@Column({ nullable: true, type: "text" })
|
||||
primary_attending_physician: string;
|
||||
|
||||
@Column({ nullable: true, type: "text", array: true })
|
||||
additional_attending_physicians: string[];
|
||||
|
||||
@Column({ nullable: true, type: "text" })
|
||||
primary_diagnosis: string;
|
||||
|
||||
@Column({ nullable: true, type: "text", array: true })
|
||||
secondary_diagnoses: string[];
|
||||
|
||||
@Column({ nullable: true, type: "boolean", default: false })
|
||||
transfer_reason_condition_worsening: boolean;
|
||||
|
||||
@Column({ nullable: true, type: "boolean", default: false })
|
||||
transfer_reason_staff_needed: boolean;
|
||||
|
||||
@Column({ nullable: true, type: "boolean", default: false })
|
||||
transfer_reason_facility_needed: boolean;
|
||||
|
||||
@Column({ nullable: true, type: "boolean", default: false })
|
||||
transfer_reason_supporting_exam: boolean;
|
||||
|
||||
@Column({ nullable: true, type: "boolean", default: false })
|
||||
transfer_reason_other: boolean;
|
||||
|
||||
@Column({ nullable: true, type: "text" })
|
||||
transfer_reason_other_text: string;
|
||||
|
||||
@Column({ nullable: true, type: "text" })
|
||||
medical_history: string;
|
||||
|
||||
@Column({ nullable: true, type: "boolean", default: false })
|
||||
transfer_method_wheelchair: boolean;
|
||||
|
||||
@Column({ nullable: true, type: "boolean", default: false })
|
||||
transfer_method_stretcher: boolean;
|
||||
|
||||
@Column({ nullable: true, type: "boolean", default: false })
|
||||
transfer_method_bed: boolean;
|
||||
|
||||
@Column({ nullable: true, type: "boolean", default: false })
|
||||
transfer_risk_respiratory_arrest: boolean;
|
||||
|
||||
@Column({ nullable: true, type: "boolean", default: false })
|
||||
transfer_risk_cardiac_arrest: boolean;
|
||||
|
||||
@Column({ nullable: true, type: "boolean", default: false })
|
||||
transfer_risk_vomiting: boolean;
|
||||
|
||||
@Column({ nullable: true, type: "boolean", default: false })
|
||||
transfer_risk_bleeding: boolean;
|
||||
|
||||
@Column({ nullable: true, type: "boolean", default: false })
|
||||
transfer_risk_seizure: boolean;
|
||||
|
||||
@Column({ nullable: true, type: "boolean", default: false })
|
||||
transfer_risk_other: boolean;
|
||||
|
||||
@Column({ nullable: true, type: "text" })
|
||||
transfer_risk_other_text: string;
|
||||
|
||||
@Column({ nullable: true, type: "text" })
|
||||
fall_risk: string;
|
||||
|
||||
@Column({ nullable: true, type: "text" })
|
||||
pain: string;
|
||||
|
||||
@Column({ nullable: true, type: "boolean", default: false })
|
||||
transfer_consent: boolean;
|
||||
|
||||
@Column({ nullable: true, type: "text" })
|
||||
consenter_name: string;
|
||||
|
||||
@Column({ nullable: true, type: "text" })
|
||||
consenter_relationship: string;
|
||||
|
||||
@Column({ nullable: true, type: "text" })
|
||||
category_patient: string;
|
||||
|
||||
@Column({ nullable: true, type: "text" })
|
||||
patient_or_family_signature: string;
|
||||
|
||||
@Column({ nullable: true, type: "text" })
|
||||
staff_signature: 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;
|
||||
}
|
||||
@ -2,12 +2,13 @@
|
||||
* Workflow status untuk registrasi EMR (bukan status Y/N).
|
||||
*/
|
||||
export enum RegistrationStatus {
|
||||
SCHEDULED = "scheduled", // sudah didaftarkan, belum dipanggil
|
||||
ONGOING = "ongoing", // sedang dalam proses (pasien sedang dilayani)
|
||||
COMPLETED = "completed", // layanan sudah selesai
|
||||
CANCELED = "canceled", // dibatalkan
|
||||
RESERVED = "reserved", // sudah didaftarkan, belum dipanggil
|
||||
REGISTERED = "registered", // sudah didaftarkan
|
||||
UNREGISTERED = "unregistered", // belum didaftarkan
|
||||
SCHEDULED = "scheduled", // sudah didaftarkan, belum dipanggil
|
||||
ONGOING = "ongoing", // sedang dalam proses (pasien sedang dilayani)
|
||||
COMPLETED = "completed", // layanan sudah selesai
|
||||
CANCELED = "canceled", // dibatalkan
|
||||
RESERVED = "reserved", // sudah didaftarkan, belum dipanggil
|
||||
REGISTERED = "registered", // sudah didaftarkan
|
||||
UNREGISTERED = "unregistered", // belum didaftarkan
|
||||
BOARDING = "boarding",
|
||||
BOOKED = "booked",
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user