feat(emr_soap_notes): add entity for SOAP notes with relevant fields and relationships
This commit is contained in:
66
src/entity/emr/emr_soap_notes.ts
Normal file
66
src/entity/emr/emr_soap_notes.ts
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
import {
|
||||||
|
Entity,
|
||||||
|
PrimaryGeneratedColumn,
|
||||||
|
Column,
|
||||||
|
CreateDateColumn,
|
||||||
|
UpdateDateColumn,
|
||||||
|
DeleteDateColumn,
|
||||||
|
ManyToOne,
|
||||||
|
JoinColumn,
|
||||||
|
} from "typeorm";
|
||||||
|
|
||||||
|
import { EmrPatient } from "./emr_patient";
|
||||||
|
import { EmrRegistration } from "./emr_registration";
|
||||||
|
import { User } from "../users";
|
||||||
|
|
||||||
|
@Entity("emr_soap_notes")
|
||||||
|
export class EmrSoapNotes {
|
||||||
|
@PrimaryGeneratedColumn("uuid")
|
||||||
|
id: string;
|
||||||
|
|
||||||
|
@ManyToOne(() => EmrRegistration, { onDelete: "CASCADE" })
|
||||||
|
@JoinColumn()
|
||||||
|
registration: EmrRegistration;
|
||||||
|
|
||||||
|
@ManyToOne(() => EmrPatient, { onDelete: "CASCADE" })
|
||||||
|
@JoinColumn()
|
||||||
|
patient: EmrPatient;
|
||||||
|
|
||||||
|
@ManyToOne(() => User, { onDelete: "SET NULL", nullable: true })
|
||||||
|
@JoinColumn()
|
||||||
|
doctor: User | null;
|
||||||
|
|
||||||
|
@Column({ nullable: true, type: "timestamp" })
|
||||||
|
input_date: Date | null;
|
||||||
|
|
||||||
|
@Column({ nullable: true, type: "text" })
|
||||||
|
subjective: string | null;
|
||||||
|
|
||||||
|
@Column({ nullable: true, type: "text" })
|
||||||
|
objective: string | null;
|
||||||
|
|
||||||
|
@Column({ nullable: true, type: "text" })
|
||||||
|
assessment: string | null;
|
||||||
|
|
||||||
|
@Column({ nullable: true, type: "text" })
|
||||||
|
plan: string | null;
|
||||||
|
|
||||||
|
@CreateDateColumn()
|
||||||
|
created_at: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
created_by: string;
|
||||||
|
|
||||||
|
@UpdateDateColumn({ nullable: true })
|
||||||
|
updated_at: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
updated_by: string;
|
||||||
|
|
||||||
|
@DeleteDateColumn({ nullable: true })
|
||||||
|
deleted_at: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
deleted_by: string;
|
||||||
|
}
|
||||||
|
|
||||||
@ -43,6 +43,7 @@ export * from "../entity/emr/emr_doctor_order_emergency";
|
|||||||
export * from "../entity/emr/emr_atenatal_care";
|
export * from "../entity/emr/emr_atenatal_care";
|
||||||
export * from "../entity/emr/emr_nursing_assesment";
|
export * from "../entity/emr/emr_nursing_assesment";
|
||||||
export * from "../entity/emr/emr_patient_education";
|
export * from "../entity/emr/emr_patient_education";
|
||||||
|
export * from "../entity/emr/emr_soap_notes";
|
||||||
|
|
||||||
export * from "../types/registration_type";
|
export * from "../types/registration_type";
|
||||||
export * from "../types/registration_status";
|
export * from "../types/registration_status";
|
||||||
|
|||||||
Reference in New Issue
Block a user