diff --git a/internal/domain/main-entities/encounter/dto.go b/internal/domain/main-entities/encounter/dto.go index d128ac51..fa359ee1 100644 --- a/internal/domain/main-entities/encounter/dto.go +++ b/internal/domain/main-entities/encounter/dto.go @@ -83,29 +83,29 @@ type MetaDto struct { type ResponseDto struct { ecore.Main - Patient_Id *uint `json:"patient_id"` - Patient *ep.Patient `json:"patient,omitempty"` - RegisteredAt *time.Time `json:"registeredAt"` - Class_Code ere.EncounterClassCode `json:"class_code"` - Unit_Id *uint `json:"unit_id"` - Specialist_Id *uint16 `json:"specialist_id"` - Specialist *es.Specialist `json:"specialist,omitempty"` - Subspecialist_Id *uint16 `json:"subspecialist_id"` - Subspecialist *ess.Subspecialist `json:"subspecialist,omitempty"` - Unit *eu.Unit `json:"unit,omitempty"` - VisitDate time.Time `json:"visitDate"` - Appointment_Doctor_Id *uint `json:"assignment_doctor_id"` - Appointment_Doctor *ed.Doctor `json:"assignment_doctor,omitempty"` - Responsible_Doctor_Id *uint `json:"responsible_doctor_id"` - Responsible_Doctor *ed.Doctor `json:"responsible_doctor,omitempty"` - DischardeMethod_Code ere.DischargeMethodCode `json:"dischardeMethod_code"` - RefSource_Name *string `json:"refSource_name"` - Appointment_Id *uint `json:"appointment_id"` - Appointment *ea.Appointment `json:"appointment,omitempty"` - EarlyEducation *string `json:"earlyEducation"` - MedicalDischargeEducation *string `json:"medicalDischargeEducation"` - AdmDischargeEducation *string `json:"admDischargeEducation"` - DischargeReason *string `json:"dischargeReason"` + Patient_Id *uint `json:"patient_id"` + Patient *ep.Patient `json:"patient,omitempty"` + RegisteredAt *time.Time `json:"registeredAt"` + Class_Code ere.EncounterClassCode `json:"class_code"` + Unit_Id *uint `json:"unit_id"` + Specialist_Id *uint16 `json:"specialist_id"` + Specialist *es.Specialist `json:"specialist,omitempty"` + Subspecialist_Id *uint16 `json:"subspecialist_id"` + Subspecialist *ess.Subspecialist `json:"subspecialist,omitempty"` + Unit *eu.Unit `json:"unit,omitempty"` + VisitDate time.Time `json:"visitDate"` + Appointment_Doctor_Id *uint `json:"assignment_doctor_id"` + Appointment_Doctor *ed.Doctor `json:"assignment_doctor,omitempty"` + Responsible_Doctor_Id *uint `json:"responsible_doctor_id"` + Responsible_Doctor *ed.Doctor `json:"responsible_doctor,omitempty"` + DischardeMethod_Code *ere.DischargeMethodCode `json:"dischardeMethod_code"` + RefSource_Name *string `json:"refSource_name"` + Appointment_Id *uint `json:"appointment_id"` + Appointment *ea.Appointment `json:"appointment,omitempty"` + EarlyEducation *string `json:"earlyEducation"` + MedicalDischargeEducation *string `json:"medicalDischargeEducation"` + AdmDischargeEducation *string `json:"admDischargeEducation"` + DischargeReason *string `json:"dischargeReason"` } func (d Encounter) ToResponse() ResponseDto { diff --git a/internal/domain/main-entities/encounter/entity.go b/internal/domain/main-entities/encounter/entity.go index 91df9883..3a6ce0e3 100644 --- a/internal/domain/main-entities/encounter/entity.go +++ b/internal/domain/main-entities/encounter/entity.go @@ -13,28 +13,28 @@ import ( ) type Encounter struct { - ecore.Main // adjust this according to the needs - Patient_Id *uint `json:"patient_id"` - Patient *ep.Patient `json:"patient,omitempty" gorm:"foreignKey:Patient_Id;references:Id"` - RegisteredAt *time.Time `json:"registeredAt"` - Class_Code ere.EncounterClassCode `json:"class_code" gorm:"not null;size:10"` - Unit_Id *uint `json:"unit_id"` - Unit *eu.Unit `json:"unit,omitempty" gorm:"foreignKey:Unit_Id;references:Id"` - Specialist_Id *uint16 `json:"specialist_id"` - Specialist *es.Specialist `json:"specialist,omitempty" gorm:"foreignKey:Specialist_Id;references:Id"` - Subspecialist_Id *uint16 `json:"subspecialist_id"` - Subspecialist *ess.Subspecialist `json:"subspecialist,omitempty" gorm:"foreignKey:Subspecialist_Id;references:Id"` - VisitDate time.Time `json:"visitDate"` - Appointment_Doctor_Id *uint `json:"appointment_doctor_id"` - Appointment_Doctor *ed.Doctor `json:"appointment_doctor,omitempty" gorm:"foreignKey:Appointment_Doctor_Id;references:Id"` - Responsible_Doctor_Id *uint `json:"responsible_doctor_id"` - Responsible_Doctor *ed.Doctor `json:"responsible_doctor,omitempty" gorm:"foreignKey:Responsible_Doctor_Id;references:Id"` - DischardeMethod_Code ere.DischargeMethodCode `json:"dischardeMethod_code" gorm:"size:10"` - RefSource_Name *string `json:"refSource_name" gorm:"size:100"` - Appointment_Id *uint `json:"appointment_id"` - Appointment *ea.Appointment `json:"appointment,omitempty" gorm:"foreignKey:Appointment_Id;references:Id"` - EarlyEducation *string `json:"earlyEducation"` - MedicalDischargeEducation *string `json:"medicalDischargeEducation"` - AdmDischargeEducation *string `json:"admDischargeEducation"` - DischargeReason *string `json:"dischargeReason"` + ecore.Main // adjust this according to the needs + Patient_Id *uint `json:"patient_id"` + Patient *ep.Patient `json:"patient,omitempty" gorm:"foreignKey:Patient_Id;references:Id"` + RegisteredAt *time.Time `json:"registeredAt"` + Class_Code ere.EncounterClassCode `json:"class_code" gorm:"not null;size:10"` + Unit_Id *uint `json:"unit_id"` + Unit *eu.Unit `json:"unit,omitempty" gorm:"foreignKey:Unit_Id;references:Id"` + Specialist_Id *uint16 `json:"specialist_id"` + Specialist *es.Specialist `json:"specialist,omitempty" gorm:"foreignKey:Specialist_Id;references:Id"` + Subspecialist_Id *uint16 `json:"subspecialist_id"` + Subspecialist *ess.Subspecialist `json:"subspecialist,omitempty" gorm:"foreignKey:Subspecialist_Id;references:Id"` + VisitDate time.Time `json:"visitDate"` + Appointment_Doctor_Id *uint `json:"appointment_doctor_id"` + Appointment_Doctor *ed.Doctor `json:"appointment_doctor,omitempty" gorm:"foreignKey:Appointment_Doctor_Id;references:Id"` + Responsible_Doctor_Id *uint `json:"responsible_doctor_id"` + Responsible_Doctor *ed.Doctor `json:"responsible_doctor,omitempty" gorm:"foreignKey:Responsible_Doctor_Id;references:Id"` + DischardeMethod_Code *ere.DischargeMethodCode `json:"dischardeMethod_code" gorm:"size:10"` + RefSource_Name *string `json:"refSource_name" gorm:"size:100"` + Appointment_Id *uint `json:"appointment_id"` + Appointment *ea.Appointment `json:"appointment,omitempty" gorm:"foreignKey:Appointment_Id;references:Id"` + EarlyEducation *string `json:"earlyEducation"` + MedicalDischargeEducation *string `json:"medicalDischargeEducation"` + AdmDischargeEducation *string `json:"admDischargeEducation"` + DischargeReason *string `json:"dischargeReason"` }