From 4e29a5366dad707dd75e4b7663f910c059525c1b Mon Sep 17 00:00:00 2001 From: wayanrivan Date: Thu, 12 Feb 2026 13:38:06 +0700 Subject: [PATCH] emr: vital signs done --- src/entity/emr/emr_vital_signs.ts | 67 +++++++++++++++++++++++++++++++ src/enum/consciousness.ts | 8 ++++ src/schema/emr.ts | 1 + 3 files changed, 76 insertions(+) create mode 100644 src/entity/emr/emr_vital_signs.ts create mode 100644 src/enum/consciousness.ts diff --git a/src/entity/emr/emr_vital_signs.ts b/src/entity/emr/emr_vital_signs.ts new file mode 100644 index 0000000..97b5230 --- /dev/null +++ b/src/entity/emr/emr_vital_signs.ts @@ -0,0 +1,67 @@ +import { + Entity, + PrimaryGeneratedColumn, + Column, + CreateDateColumn, + UpdateDateColumn, + DeleteDateColumn, + ManyToOne, + OneToOne, + JoinColumn, +} from "typeorm"; + +import { consciousness } from "../../enum/consciousness"; +import { EmrRegistrationOutpatient } from "./emr_registration_outpatient"; + + +@Entity("emr_vital_signs", { schema: "emr" }) +export class EmrVitalSigns { + @PrimaryGeneratedColumn("uuid") + id: string; + + @ManyToOne(() => EmrRegistrationOutpatient, { onDelete: "CASCADE" }) + @JoinColumn() + id_emr_outpatient: EmrRegistrationOutpatient; + + /** Contoh: "08:00-12:00" atau "Pagi" */ + @Column({ nullable: true, length: 64 }) + blood_preasure: string; + + @Column({ nullable: true, length: 64 }) + heart_rate: string; + + @Column({ nullable: true, length: 64 }) + temperature: string; + + @Column({ nullable: true, length: 64 }) + respiratory_rate: string; + + @Column({ + type: "enum", + enum: consciousness, + nullable: false, + }) + consciousness: consciousness; + + @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; +} + diff --git a/src/enum/consciousness.ts b/src/enum/consciousness.ts new file mode 100644 index 0000000..d6f8784 --- /dev/null +++ b/src/enum/consciousness.ts @@ -0,0 +1,8 @@ +export enum consciousness { + COMPOSMENTIS = 'COMPOS MENTIS', + APATHETIC = 'APATHETIC', + SOMNOLENT = 'SOMNOLENT', + SOPOR = 'SOPOR', + COMA = 'COMA', + DOA = 'DOA' +} \ No newline at end of file diff --git a/src/schema/emr.ts b/src/schema/emr.ts index 9835137..edcb0c4 100644 --- a/src/schema/emr.ts +++ b/src/schema/emr.ts @@ -5,6 +5,7 @@ export * from "../entity/emr/emr_registration_inpatient"; export * from "../entity/emr/emr_registration_emergency"; export * from "../entity/emr/emr_registration_hemodialysis"; export * from "../entity/emr/emr_anamnesis"; +export * from "../entity/emr/emr_vital_signs"; export * from "../types/registration_type"; export * from "../types/registration_status";