@@ -643,7 +643,7 @@ func GetPrescriptionByAnticoagulant(page int64, limit int64, orgid int64, antico
func GetPrescriptionByDialyzer(page int64, limit int64, orgid int64, dialyzer string, start_time int64, end_time int64) (solution []*models.DialysisPrescription, total int64, err error) {
- db := XTReadDB().Model(&models.DialysisPrescription{}).Where("status = 1")
+ db := XTReadDB().Model(&models.DialysisPrescription{}).Preload("QCPatients", "status = 1 and user_org_id = ?", orgid).Where("status = 1")
if len(dialyzer) > 0 {
db = db.Where("dialysis_dialyszers = ?", dialyzer)
}