|
@@ -1217,18 +1217,20 @@ func CreateExportPatient(patient *models.Patients, contagions []int64, org_creat
|
1217
|
1217
|
return
|
1218
|
1218
|
}
|
1219
|
1219
|
|
1220
|
|
- var dryWeight models.SgjPatientDryweight
|
1221
|
|
- dryWeight.PatientId = patient.ID
|
1222
|
|
- dryWeight.UserOrgId = patient.UserOrgId
|
1223
|
|
- dryWeight.Status = 1
|
1224
|
|
- dryWeight.AdjustedValue = "/"
|
1225
|
|
- dryWeight.Creator = org_creator
|
1226
|
|
- dryWeight.UserId = org_creator
|
1227
|
|
- dryWeight.Ctime = time.Now().Unix()
|
1228
|
|
- dryWeight.Mtime = time.Now().Unix()
|
1229
|
|
- dryWeight.DryWeight = patient.DryWeight
|
1230
|
|
- dryWeight.Remakes = ""
|
1231
|
|
- err = utx.Create(&dryWeight).Error
|
|
1220
|
+ if patient.DryWeight > 0 {
|
|
1221
|
+ var dryWeight models.SgjPatientDryweight
|
|
1222
|
+ dryWeight.PatientId = patient.ID
|
|
1223
|
+ dryWeight.UserOrgId = patient.UserOrgId
|
|
1224
|
+ dryWeight.Status = 1
|
|
1225
|
+ dryWeight.AdjustedValue = "/"
|
|
1226
|
+ dryWeight.Creator = org_creator
|
|
1227
|
+ dryWeight.UserId = org_creator
|
|
1228
|
+ dryWeight.Ctime = time.Now().Unix()
|
|
1229
|
+ dryWeight.Mtime = time.Now().Unix()
|
|
1230
|
+ dryWeight.DryWeight = patient.DryWeight
|
|
1231
|
+ dryWeight.Remakes = ""
|
|
1232
|
+ err = utx.Create(&dryWeight).Error
|
|
1233
|
+ }
|
1232
|
1234
|
|
1233
|
1235
|
var lapseto models.PatientLapseto
|
1234
|
1236
|
lapseto.PatientId = patient.ID
|