Browse Source

耗材参数

XMLWAN 3 years ago
parent
commit
8da447207d
1 changed files with 3 additions and 1 deletions
  1. 3 1
      service/his_project_service.go

+ 3 - 1
service/his_project_service.go View File

@@ -398,7 +398,9 @@ func GetHistPatient(orgid int64, keyword string) (hisPatient []*models.HisPatien
398 398
 
399 399
 func GetDoctorAdvicePrint(his_patient_id int64, recorddate int64, schIDs []string, orgid int64) (prescription []*models.HisPrescription, err error) {
400 400
 
401
-	err = XTReadDB().Model(&prescription).Where("patient_id = ? and record_date = ? and id in(?) and  status = 1 ", his_patient_id, recorddate, schIDs).Preload("Patients", "status = 1 and user_org_id = ?", orgid).Preload("HisDoctorAdviceInfo", "status = 1 and user_org_id = ?", orgid).Preload("HisPrescriptionProject", func(db *gorm.DB) *gorm.DB {
401
+	err = XTReadDB().Model(&prescription).Where("patient_id = ? and record_date = ? and id in(?) and  status = 1 ", his_patient_id, recorddate, schIDs).Preload("Patients", "status = 1 and user_org_id = ?", orgid).Preload("HisDoctorAdviceInfo", func(db *gorm.DB) *gorm.DB {
402
+		return db.Where("status = 1 and user_org_id = ?", orgid).Preload("Drug", "status = 1")
403
+	}).Preload("HisPrescriptionProject", func(db *gorm.DB) *gorm.DB {
402 404
 		return db.Where("status = 1 AND user_org_id = ?", orgid).Preload("HisProject").Preload("GoodInfo", "status=1")
403 405
 	}).Preload("VMHisPrescriptionInfo", "status =1 and user_org_id = ?", orgid).Preload("XtHisAdditionalCharge", "status = 1 and user_org_id = ?", orgid).Find(&prescription).Error
404 406