|
@@ -250,7 +250,7 @@ func GetDialysisCountMode(starttime int64, endtime int64, orgid int64, lapsetoty
|
250
|
250
|
if sourcetype > 0 {
|
251
|
251
|
db = db.Where("p.source = ?", sourcetype)
|
252
|
252
|
}
|
253
|
|
- err = db.Select("s.mode_id,count(s.mode_id) as count").Joins("join xt_dialysis_prescription as s on s.patient_id = o.patient_id and s.record_date = o.dialysis_date and s.status= 1 AND s.record_date >= ? AND s.record_date <= ? AND AND s.mode_id > 0 ", starttime, endtime).Joins("left join xt_patients as p on o.patient_id = p.id").Group("s.mode_id").Scan(&counts).Error
|
|
253
|
+ err = db.Select("s.mode_id,count(s.mode_id) as count").Joins("join xt_dialysis_prescription as s on s.patient_id = o.patient_id and s.record_date = o.dialysis_date and s.status= 1 AND s.record_date >= ? AND s.record_date <= ? AND s.mode_id > 0 ", starttime, endtime).Joins("left join xt_patients as p on o.patient_id = p.id").Group("s.mode_id").Scan(&counts).Error
|
254
|
254
|
return counts, err
|
255
|
255
|
}
|
256
|
256
|
|