feat: add emr_observation_record
This commit is contained in:
82
src/entity/emr/emr_observation_record.ts
Normal file
82
src/entity/emr/emr_observation_record.ts
Normal file
@ -0,0 +1,82 @@
|
||||
import {
|
||||
Entity,
|
||||
PrimaryGeneratedColumn,
|
||||
Column,
|
||||
CreateDateColumn,
|
||||
UpdateDateColumn,
|
||||
DeleteDateColumn,
|
||||
ManyToOne,
|
||||
JoinColumn,
|
||||
Index,
|
||||
} from "typeorm";
|
||||
|
||||
import { Avpu } from "../../enum/avpu";
|
||||
import { User } from "../users";
|
||||
import { EmrRegistration } from "./emr_registration";
|
||||
|
||||
@Entity("emr_observation_record", { schema: "emr" })
|
||||
@Index("idx_emr_observation_record_registration", ["registration"])
|
||||
export class ObservationRecord {
|
||||
@PrimaryGeneratedColumn("uuid")
|
||||
id: string;
|
||||
|
||||
@ManyToOne(() => EmrRegistration, { onDelete: "CASCADE" })
|
||||
@JoinColumn({ name: "registration_id" })
|
||||
registration: EmrRegistration;
|
||||
|
||||
@Column({ length: 5 })
|
||||
oras: string;
|
||||
|
||||
@Column({ nullable: true, type: "int2" })
|
||||
respirasi: number | null;
|
||||
|
||||
@Column({ nullable: true, type: "int2" })
|
||||
spo2: number | null;
|
||||
|
||||
@Column({ nullable: true, type: "int2" })
|
||||
hr: number | null;
|
||||
|
||||
@Column({ nullable: true, type: "int2" })
|
||||
bp_systolic: number | null;
|
||||
|
||||
@Column({ nullable: true, type: "int2" })
|
||||
bp_diastolic: number | null;
|
||||
|
||||
@Column({ nullable: true, type: "float" })
|
||||
temperatura: number | null;
|
||||
|
||||
@Column({
|
||||
type: "enum",
|
||||
enum: Avpu,
|
||||
nullable: true,
|
||||
})
|
||||
avpu: Avpu | null;
|
||||
|
||||
@Column({ nullable: true, type: "float" })
|
||||
todan: number | null;
|
||||
|
||||
@ManyToOne(() => User, { onDelete: "NO ACTION" })
|
||||
@JoinColumn({ name: "assina_uuid" })
|
||||
assina: User;
|
||||
|
||||
@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;
|
||||
}
|
||||
6
src/enum/avpu.ts
Normal file
6
src/enum/avpu.ts
Normal file
@ -0,0 +1,6 @@
|
||||
export enum Avpu {
|
||||
A = "A",
|
||||
V = "V",
|
||||
P = "P",
|
||||
U = "U",
|
||||
}
|
||||
@ -55,6 +55,7 @@ export * from "../entity/treatment/treatment_plan";
|
||||
export * from "../entity/treatment/treatment_plan_session";
|
||||
export * from "../entity/emr/emr_registration_treatment";
|
||||
export * from "../entity/emr/emr_ancillary_service_order";
|
||||
export * from "../entity/emr/emr_observation_record";
|
||||
|
||||
export * from "../types/registration_type";
|
||||
export * from "../types/registration_status";
|
||||
@ -63,6 +64,7 @@ export * from "../types/prescription_pharmacy_status";
|
||||
export * from "../types/radiology_order_status";
|
||||
export * from "../types/laboratory_order_status";
|
||||
export * from "../enum/consciousness";
|
||||
export * from "../enum/avpu";
|
||||
export * from "../types/patient_category";
|
||||
export * from "../types/citizen";
|
||||
export * from "../types/treatment_session";
|
||||
|
||||
Reference in New Issue
Block a user