feat(emr): add patient and doctor relations to procedure
This commit is contained in:
@ -12,6 +12,8 @@ import {
|
||||
import { Service } from "../service";
|
||||
import { ServiceType } from "../service_type";
|
||||
import { EmrRegistration } from "./emr_registration";
|
||||
import { EmrPatient } from "./emr_patient";
|
||||
import { User } from "../users";
|
||||
|
||||
@Entity('emr_doctor_procedure', { schema: "emr" })
|
||||
export class EmrDoctorProcedure {
|
||||
@ -22,9 +24,13 @@ export class EmrDoctorProcedure {
|
||||
@JoinColumn()
|
||||
registration: EmrRegistration;
|
||||
|
||||
@ManyToOne(() => ServiceType, { onDelete: 'NO ACTION' })
|
||||
@ManyToOne(() => EmrPatient, { onDelete: "CASCADE" })
|
||||
@JoinColumn()
|
||||
serviceType: ServiceType;
|
||||
patient: EmrPatient;
|
||||
|
||||
@ManyToOne(() => User, { onDelete: "CASCADE" })
|
||||
@JoinColumn()
|
||||
doctor: User;
|
||||
|
||||
@ManyToOne(() => Service, { onDelete: 'NO ACTION' })
|
||||
@JoinColumn()
|
||||
|
||||
Reference in New Issue
Block a user