|
@@ -789,7 +789,7 @@ func DrugWithdrawal(orgid, patient_id, stime, etime, creater int64) (err error)
|
789
|
789
|
var hids []*models.TmpID
|
790
|
790
|
var xids []*models.TmpID
|
791
|
791
|
//var hid,xid []int64//查询已发药的药品
|
792
|
|
- err = tx.Raw("select id,dispensing_time from his_doctor_advice_info where status = 1 and created_time >= ? and created_time <= ? "+
|
|
792
|
+ err = tx.Raw("select id,dispensing_time from his_doctor_advice_info where status = 1 and advice_date >= ? and advice_date <= ? "+
|
793
|
793
|
"and user_org_id = ? and patient_id = ? and is_medicine = 1 and drug_id in (select id from xt_base_drug where org_id = ? and status = 1)", stime, etime, orgid, patient_id, orgid).Scan(&hids).Error
|
794
|
794
|
if err != nil {
|
795
|
795
|
return
|