Merge branch 'migration' of github.com:dikstub-rssa/simrs-be into encounter-13

This commit is contained in:
dpurbosakti
2025-09-08 14:09:57 +07:00
2 changed files with 47 additions and 47 deletions
+23 -23
View File
@@ -83,29 +83,29 @@ type MetaDto struct {
type ResponseDto struct { type ResponseDto struct {
ecore.Main ecore.Main
Patient_Id *uint `json:"patient_id"` Patient_Id *uint `json:"patient_id"`
Patient *ep.Patient `json:"patient,omitempty"` Patient *ep.Patient `json:"patient,omitempty"`
RegisteredAt *time.Time `json:"registeredAt"` RegisteredAt *time.Time `json:"registeredAt"`
Class_Code ere.EncounterClassCode `json:"class_code"` Class_Code ere.EncounterClassCode `json:"class_code"`
Unit_Id *uint `json:"unit_id"` Unit_Id *uint `json:"unit_id"`
Specialist_Id *uint16 `json:"specialist_id"` Specialist_Id *uint16 `json:"specialist_id"`
Specialist *es.Specialist `json:"specialist,omitempty"` Specialist *es.Specialist `json:"specialist,omitempty"`
Subspecialist_Id *uint16 `json:"subspecialist_id"` Subspecialist_Id *uint16 `json:"subspecialist_id"`
Subspecialist *ess.Subspecialist `json:"subspecialist,omitempty"` Subspecialist *ess.Subspecialist `json:"subspecialist,omitempty"`
Unit *eu.Unit `json:"unit,omitempty"` Unit *eu.Unit `json:"unit,omitempty"`
VisitDate time.Time `json:"visitDate"` VisitDate time.Time `json:"visitDate"`
Appointment_Doctor_Id *uint `json:"assignment_doctor_id"` Appointment_Doctor_Id *uint `json:"assignment_doctor_id"`
Appointment_Doctor *ed.Doctor `json:"assignment_doctor,omitempty"` Appointment_Doctor *ed.Doctor `json:"assignment_doctor,omitempty"`
Responsible_Doctor_Id *uint `json:"responsible_doctor_id"` Responsible_Doctor_Id *uint `json:"responsible_doctor_id"`
Responsible_Doctor *ed.Doctor `json:"responsible_doctor,omitempty"` Responsible_Doctor *ed.Doctor `json:"responsible_doctor,omitempty"`
DischardeMethod_Code ere.DischargeMethodCode `json:"dischardeMethod_code"` DischardeMethod_Code *ere.DischargeMethodCode `json:"dischardeMethod_code"`
RefSource_Name *string `json:"refSource_name"` RefSource_Name *string `json:"refSource_name"`
Appointment_Id *uint `json:"appointment_id"` Appointment_Id *uint `json:"appointment_id"`
Appointment *ea.Appointment `json:"appointment,omitempty"` Appointment *ea.Appointment `json:"appointment,omitempty"`
EarlyEducation *string `json:"earlyEducation"` EarlyEducation *string `json:"earlyEducation"`
MedicalDischargeEducation *string `json:"medicalDischargeEducation"` MedicalDischargeEducation *string `json:"medicalDischargeEducation"`
AdmDischargeEducation *string `json:"admDischargeEducation"` AdmDischargeEducation *string `json:"admDischargeEducation"`
DischargeReason *string `json:"dischargeReason"` DischargeReason *string `json:"dischargeReason"`
} }
func (d Encounter) ToResponse() ResponseDto { func (d Encounter) ToResponse() ResponseDto {
@@ -13,28 +13,28 @@ import (
) )
type Encounter struct { type Encounter struct {
ecore.Main // adjust this according to the needs ecore.Main // adjust this according to the needs
Patient_Id *uint `json:"patient_id"` Patient_Id *uint `json:"patient_id"`
Patient *ep.Patient `json:"patient,omitempty" gorm:"foreignKey:Patient_Id;references:Id"` Patient *ep.Patient `json:"patient,omitempty" gorm:"foreignKey:Patient_Id;references:Id"`
RegisteredAt *time.Time `json:"registeredAt"` RegisteredAt *time.Time `json:"registeredAt"`
Class_Code ere.EncounterClassCode `json:"class_code" gorm:"not null;size:10"` Class_Code ere.EncounterClassCode `json:"class_code" gorm:"not null;size:10"`
Unit_Id *uint `json:"unit_id"` Unit_Id *uint `json:"unit_id"`
Unit *eu.Unit `json:"unit,omitempty" gorm:"foreignKey:Unit_Id;references:Id"` Unit *eu.Unit `json:"unit,omitempty" gorm:"foreignKey:Unit_Id;references:Id"`
Specialist_Id *uint16 `json:"specialist_id"` Specialist_Id *uint16 `json:"specialist_id"`
Specialist *es.Specialist `json:"specialist,omitempty" gorm:"foreignKey:Specialist_Id;references:Id"` Specialist *es.Specialist `json:"specialist,omitempty" gorm:"foreignKey:Specialist_Id;references:Id"`
Subspecialist_Id *uint16 `json:"subspecialist_id"` Subspecialist_Id *uint16 `json:"subspecialist_id"`
Subspecialist *ess.Subspecialist `json:"subspecialist,omitempty" gorm:"foreignKey:Subspecialist_Id;references:Id"` Subspecialist *ess.Subspecialist `json:"subspecialist,omitempty" gorm:"foreignKey:Subspecialist_Id;references:Id"`
VisitDate time.Time `json:"visitDate"` VisitDate time.Time `json:"visitDate"`
Appointment_Doctor_Id *uint `json:"appointment_doctor_id"` Appointment_Doctor_Id *uint `json:"appointment_doctor_id"`
Appointment_Doctor *ed.Doctor `json:"appointment_doctor,omitempty" gorm:"foreignKey:Appointment_Doctor_Id;references: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_Id *uint `json:"responsible_doctor_id"`
Responsible_Doctor *ed.Doctor `json:"responsible_doctor,omitempty" gorm:"foreignKey:Responsible_Doctor_Id;references: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"` DischardeMethod_Code *ere.DischargeMethodCode `json:"dischardeMethod_code" gorm:"size:10"`
RefSource_Name *string `json:"refSource_name" gorm:"size:100"` RefSource_Name *string `json:"refSource_name" gorm:"size:100"`
Appointment_Id *uint `json:"appointment_id"` Appointment_Id *uint `json:"appointment_id"`
Appointment *ea.Appointment `json:"appointment,omitempty" gorm:"foreignKey:Appointment_Id;references:Id"` Appointment *ea.Appointment `json:"appointment,omitempty" gorm:"foreignKey:Appointment_Id;references:Id"`
EarlyEducation *string `json:"earlyEducation"` EarlyEducation *string `json:"earlyEducation"`
MedicalDischargeEducation *string `json:"medicalDischargeEducation"` MedicalDischargeEducation *string `json:"medicalDischargeEducation"`
AdmDischargeEducation *string `json:"admDischargeEducation"` AdmDischargeEducation *string `json:"admDischargeEducation"`
DischargeReason *string `json:"dischargeReason"` DischargeReason *string `json:"dischargeReason"`
} }