add new entity:emr_doctor_procedure

This commit is contained in:
wayanrivan
2026-02-13 14:59:45 +07:00
parent d9aae10f0d
commit 1016e20b15
2 changed files with 54 additions and 0 deletions

View File

@ -0,0 +1,53 @@
import {
Entity,
PrimaryGeneratedColumn,
Column,
CreateDateColumn,
UpdateDateColumn,
DeleteDateColumn,
ManyToOne,
JoinColumn,
} from "typeorm";
import { Service } from "../service";
import { ServiceType } from "../service_type";
import { EmrRegistrationOutpatient } from "./emr_registration_outpatient";
@Entity('emr_doctor_procedure',{ schema: "emr" })
export class EmrDoctorProcedure {
@PrimaryGeneratedColumn('uuid')
id: string;
@ManyToOne(() => EmrRegistrationOutpatient, { onDelete: "CASCADE" })
@JoinColumn()
id_emr_outpatient: EmrRegistrationOutpatient;
@ManyToOne(() => ServiceType, { onDelete: 'NO ACTION' })
@JoinColumn()
serviceType: ServiceType;
@ManyToOne(() => Service, { onDelete: 'NO ACTION' })
@JoinColumn()
service: Service;
@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;
}

View File

@ -10,6 +10,7 @@ export * from "../entity/emr/emr_physical_examination";
export * from "../entity/emr/emr_diet";
export * from "../entity/emr/emr_diagnosis";
export * from "../entity/emr/emr_diagnostic_procedure";
export * from "../entity/emr/emr_doctor_procedure";
export * from "../types/registration_type";
export * from "../types/registration_status";