update: add emr nursing assesment entity and route
This commit is contained in:
172
src/entity/emr/emr_nursing_assesment.ts
Normal file
172
src/entity/emr/emr_nursing_assesment.ts
Normal file
@ -0,0 +1,172 @@
|
||||
import {
|
||||
Entity,
|
||||
PrimaryGeneratedColumn,
|
||||
Column,
|
||||
CreateDateColumn,
|
||||
UpdateDateColumn,
|
||||
DeleteDateColumn,
|
||||
OneToOne,
|
||||
JoinColumn,
|
||||
ManyToOne,
|
||||
} from "typeorm";
|
||||
|
||||
import { EmrRegistration } from "./emr_registration";
|
||||
import { FosterCareHistory } from "../foster_care_history";
|
||||
import { Room } from "../room";
|
||||
|
||||
interface FluidsAndMedication {
|
||||
datetime: string;
|
||||
fluid_type: string;
|
||||
bottle_number: string;
|
||||
medication: string;
|
||||
dose: string;
|
||||
rute: string;
|
||||
family_signature: string;
|
||||
oral: string;
|
||||
drain: string;
|
||||
ngt: string;
|
||||
urine: string;
|
||||
poop: string;
|
||||
}
|
||||
|
||||
interface NursingAction {
|
||||
datetime: string;
|
||||
nurse_action: string;
|
||||
name: string;
|
||||
}
|
||||
|
||||
interface VitalSign {
|
||||
compos_mentis: string;
|
||||
blood_pressure: string;
|
||||
pulse: string;
|
||||
heart_rate: string;
|
||||
respiratory_rate: string;
|
||||
saturation: string;
|
||||
temperature: string;
|
||||
}
|
||||
|
||||
@Entity("emr_nursing_assesment", { schema: "emr" })
|
||||
export class EmrNursingAssesment {
|
||||
@PrimaryGeneratedColumn("uuid")
|
||||
id: string;
|
||||
|
||||
@OneToOne(() => EmrRegistration, (registration) => registration.emergency, { onDelete: "CASCADE" })
|
||||
@JoinColumn()
|
||||
registration: EmrRegistration;
|
||||
|
||||
@ManyToOne(() => FosterCareHistory, { onDelete: "CASCADE" })
|
||||
@JoinColumn()
|
||||
foster_care_history: FosterCareHistory;
|
||||
|
||||
@Column({ nullable: true, type: "text", array: true })
|
||||
airway: string[];
|
||||
|
||||
@Column({ nullable: true, type: "text", array: true })
|
||||
breathing: string[];
|
||||
|
||||
@Column({ nullable: true, type: "text" })
|
||||
pulse: string;
|
||||
|
||||
@Column({ nullable: true, type: "text" })
|
||||
crt: string;
|
||||
|
||||
@Column({ nullable: true, type: "text" })
|
||||
skin_color: string;
|
||||
|
||||
@Column({ nullable: true, type: "boolean" })
|
||||
bleeding: boolean;
|
||||
|
||||
@Column({ nullable: true, type: "boolean" })
|
||||
wound: boolean;
|
||||
|
||||
@Column({ nullable: true, type: "text" })
|
||||
wound_input: string;
|
||||
|
||||
@Column({ nullable: true, type: "boolean" })
|
||||
pitchiae: boolean;
|
||||
|
||||
@Column({ nullable: true, type: "text" })
|
||||
pitchiae_input: string;
|
||||
|
||||
@Column({ nullable: true, type: "text" })
|
||||
consciousness: string;
|
||||
|
||||
@Column({ nullable: true, type: "int2" })
|
||||
motor: number;
|
||||
|
||||
@Column({ nullable: true, type: "int2" })
|
||||
vision: number;
|
||||
|
||||
@Column({ nullable: true, type: "int2" })
|
||||
eye: number;
|
||||
|
||||
@Column({ nullable: true, type: "text" })
|
||||
location_of_pain: string;
|
||||
|
||||
@Column({ nullable: true, type: "int2" })
|
||||
pain_scale: number;
|
||||
|
||||
@Column({ nullable: true, type: "boolean" })
|
||||
way_of_walking: boolean;
|
||||
|
||||
@Column({ nullable: true, type: "boolean" })
|
||||
way_of_sit: boolean;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
type: 'jsonb',
|
||||
default: [],
|
||||
})
|
||||
fluids_and_medication: FluidsAndMedication[];
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
type: 'jsonb',
|
||||
default: [],
|
||||
})
|
||||
nursing_action: NursingAction[];
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
type: 'jsonb',
|
||||
default: [],
|
||||
})
|
||||
vital_sign: VitalSign[];
|
||||
|
||||
@Column({ nullable: true, type: "boolean" })
|
||||
discharge_planning: boolean;
|
||||
|
||||
@Column({ nullable: true, type: "text", array: true })
|
||||
inpatient_check: string[];
|
||||
|
||||
@ManyToOne(() => Room, { onDelete: "CASCADE" })
|
||||
@JoinColumn()
|
||||
inpatientroom: Room;
|
||||
|
||||
@Column({ nullable: true, type: "text", array: true })
|
||||
outapatient_check: string[];
|
||||
|
||||
@Column({ nullable: true, type: "boolean" })
|
||||
discharge: boolean;
|
||||
|
||||
@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;
|
||||
}
|
||||
@ -30,6 +30,7 @@ export * from "../entity/emr/emr_discharge_status_emergency";
|
||||
export * from "../entity/emr/emr_physical_examination_emergency";
|
||||
export * from "../entity/emr/emr_doctor_order_emergency";
|
||||
export * from "../entity/emr/emr_atenatal_care";
|
||||
export * from "../entity/emr/emr_nursing_assesment";
|
||||
|
||||
export * from "../types/registration_type";
|
||||
export * from "../types/registration_status";
|
||||
|
||||
Reference in New Issue
Block a user