add entity for hemodialysis
This commit is contained in:
80
src/entity/emr/emr_hemodialysis_plan.ts
Normal file
80
src/entity/emr/emr_hemodialysis_plan.ts
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
import {
|
||||||
|
Entity,
|
||||||
|
PrimaryGeneratedColumn,
|
||||||
|
Column,
|
||||||
|
CreateDateColumn,
|
||||||
|
UpdateDateColumn,
|
||||||
|
DeleteDateColumn,
|
||||||
|
ManyToOne,
|
||||||
|
JoinColumn,
|
||||||
|
} from "typeorm";
|
||||||
|
import { EmrPatient } from "./emr_patient";
|
||||||
|
import { EmrRegistrationOutpatient } from "./emr_registration_outpatient";
|
||||||
|
|
||||||
|
export enum HemodialysisPlanStatus {
|
||||||
|
DRAFT = "draft",
|
||||||
|
ACTIVE = "active",
|
||||||
|
}
|
||||||
|
|
||||||
|
@Entity("emr_hemodialysis_plans", { schema: "emr" })
|
||||||
|
export class HemodialysisPlan {
|
||||||
|
@PrimaryGeneratedColumn("uuid")
|
||||||
|
id: string;
|
||||||
|
|
||||||
|
@ManyToOne(() => EmrPatient, { onDelete: "NO ACTION", nullable: false })
|
||||||
|
@JoinColumn({ name: "patient_id" })
|
||||||
|
patient: EmrPatient;
|
||||||
|
|
||||||
|
@ManyToOne(() => EmrRegistrationOutpatient, { onDelete: "SET NULL", nullable: true })
|
||||||
|
@JoinColumn({ name: "opd_visit_id" })
|
||||||
|
opd_visit: EmrRegistrationOutpatient | null;
|
||||||
|
|
||||||
|
@Column({ type: "smallint", nullable: false })
|
||||||
|
sessions_per_week: number;
|
||||||
|
|
||||||
|
@Column({ type: "decimal", precision: 5, scale: 2, nullable: false })
|
||||||
|
duration_hours: number;
|
||||||
|
|
||||||
|
@Column({ type: "decimal", precision: 6, scale: 2, nullable: true })
|
||||||
|
dry_weight: number | null;
|
||||||
|
|
||||||
|
@Column({ type: "int", nullable: true })
|
||||||
|
blood_flow_rate_qb: number | null;
|
||||||
|
|
||||||
|
@Column({ type: "int", nullable: true })
|
||||||
|
dialysate_flow_rate_qd: number | null;
|
||||||
|
|
||||||
|
@Column({ type: "varchar", length: 256, nullable: true })
|
||||||
|
dialyzer_type: string | null;
|
||||||
|
|
||||||
|
@Column({ type: "varchar", length: 256, nullable: true })
|
||||||
|
anticoagulant_dose: string | null;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
type: "enum",
|
||||||
|
enum: HemodialysisPlanStatus,
|
||||||
|
default: HemodialysisPlanStatus.DRAFT,
|
||||||
|
})
|
||||||
|
status: HemodialysisPlanStatus;
|
||||||
|
|
||||||
|
@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;
|
||||||
|
}
|
||||||
37
src/entity/emr/emr_hemodialysis_settings.ts
Normal file
37
src/entity/emr/emr_hemodialysis_settings.ts
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
import {
|
||||||
|
Entity,
|
||||||
|
PrimaryGeneratedColumn,
|
||||||
|
Column,
|
||||||
|
CreateDateColumn,
|
||||||
|
UpdateDateColumn,
|
||||||
|
DeleteDateColumn,
|
||||||
|
} from "typeorm";
|
||||||
|
|
||||||
|
@Entity("emr_hemodialysis_settings", { schema: "emr" })
|
||||||
|
export class HemodialysisSettings {
|
||||||
|
@PrimaryGeneratedColumn("uuid")
|
||||||
|
id: string;
|
||||||
|
|
||||||
|
@Column({ type: "int", nullable: false })
|
||||||
|
daily_quota_limit: number;
|
||||||
|
|
||||||
|
@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;
|
||||||
|
}
|
||||||
@ -4,6 +4,8 @@ export * from "../entity/emr/emr_registration_outpatient";
|
|||||||
export * from "../entity/emr/emr_registration_inpatient";
|
export * from "../entity/emr/emr_registration_inpatient";
|
||||||
export * from "../entity/emr/emr_registration_emergency";
|
export * from "../entity/emr/emr_registration_emergency";
|
||||||
export * from "../entity/emr/emr_registration_hemodialysis";
|
export * from "../entity/emr/emr_registration_hemodialysis";
|
||||||
|
export * from "../entity/emr/emr_hemodialysis_settings";
|
||||||
|
export * from "../entity/emr/emr_hemodialysis_plan";
|
||||||
export * from "../entity/emr/emr_anamnesis";
|
export * from "../entity/emr/emr_anamnesis";
|
||||||
export * from "../entity/emr/emr_vital_signs";
|
export * from "../entity/emr/emr_vital_signs";
|
||||||
export * from "../entity/emr/emr_physical_examination";
|
export * from "../entity/emr/emr_physical_examination";
|
||||||
|
|||||||
Reference in New Issue
Block a user