feat (encounter): update wip
This commit is contained in:
@@ -37,6 +37,15 @@ func setData[T *e.CreateDto | *e.UpdateDto](input T, data *e.Encounter) {
|
||||
data.Appointment_Id = inputSrc.Appointment_Id
|
||||
}
|
||||
|
||||
func setDataUpdate(src e.UpdateDto, dst *e.Encounter) {
|
||||
dst.Appointment_Doctor_Id = src.Appointment_Doctor_Id
|
||||
dst.Responsible_Doctor_Id = src.Responsible_Doctor_Id
|
||||
dst.Unit_Id = src.Unit_Id
|
||||
dst.Specialist_Id = src.Specialist_Id
|
||||
dst.Subspecialist_Id = src.Subspecialist_Id
|
||||
dst.VisitDate = src.VisitDate
|
||||
}
|
||||
|
||||
func setDataDischarge(src e.DischargeDto, dst *e.Encounter) {
|
||||
dst.DischargeMethod_Code = src.DischargeMethod_Code
|
||||
dst.EarlyEducation = src.EarlyEducation
|
||||
|
||||
@@ -108,7 +108,7 @@ func ReadDetailData(input e.ReadDetailDto, event *pl.Event, dbx ...*gorm.DB) (*e
|
||||
|
||||
func UpdateData(input e.UpdateDto, data *e.Encounter, event *pl.Event, dbx ...*gorm.DB) error {
|
||||
pl.SetLogInfo(event, data, "started", "DBUpdate")
|
||||
setData(&input, data)
|
||||
setDataUpdate(input, data)
|
||||
|
||||
var tx *gorm.DB
|
||||
if len(dbx) > 0 {
|
||||
|
||||
Reference in New Issue
Block a user