update: education done

This commit is contained in:
wayanrivan
2026-04-29 10:20:15 +07:00
parent 61b99cf6b0
commit d4b4b71713
2 changed files with 95 additions and 0 deletions

View File

@ -0,0 +1,94 @@
import {
Entity,
OneToOne,
PrimaryGeneratedColumn,
Column,
CreateDateColumn,
UpdateDateColumn,
DeleteDateColumn,
ManyToOne,
JoinColumn,
ManyToMany
} from "typeorm";
import { EmrPatient } from "./emr_patient";
import { EmrRegistration } from "./emr_registration";
import { User } from "../users";
@Entity("emr_patient_education")
export class PatientEducation {
@PrimaryGeneratedColumn("uuid")
id: string;
@ManyToOne(() => User, { onDelete: "CASCADE" })
@JoinColumn()
user: User;
@ManyToOne(() => EmrRegistration, { onDelete: "CASCADE" })
@JoinColumn()
registration: EmrRegistration;
@ManyToOne(() => EmrPatient, { onDelete: "CASCADE" })
@JoinColumn()
patient: EmrPatient;
@Column({
nullable: true,
type: "text",
})
education_topics: string;
@Column({
nullable: true,
type: "text",
})
type: string;
@Column({
nullable: true,
type: "text",
})
education_recipients: string;
@Column({
nullable: true,
type: "text",
})
learning_methods: string;
@Column({
nullable: true,
type: "text",
})
educator_signature: string;
@Column({
nullable: true,
type: "text",
})
education_recipients_signature: string;
@Column({
nullable: true,
type: "text",
})
notes: string;
@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;
}

View File

@ -31,6 +31,7 @@ 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 "../entity/emr/emr_patient_education";
export * from "../types/registration_type";
export * from "../types/registration_status";