12
This commit is contained in:
parent
ffbc1c83c2
commit
92781a3624
@ -345,10 +345,11 @@ func (r *OrderPrescriptionDao) GetOrderPrescriptionTransferPageSearch(req reques
|
|||||||
Select("doctor_id").
|
Select("doctor_id").
|
||||||
Where(gorm.Expr("user_id IN (?)", transferDoctorUserSubQuery))
|
Where(gorm.Expr("user_id IN (?)", transferDoctorUserSubQuery))
|
||||||
|
|
||||||
// 使用 OR 条件:患者匹配 OR 抄方医生匹配 OR 就诊人匹配
|
// 使用 OR 条件:患者匹配 OR 抄方医生匹配 OR 就诊人匹配(整体加括号)
|
||||||
query = query.Where(prescriptionTable+".patient_id IN (?)", patientSubQuery).
|
query = query.Where(
|
||||||
Or(inquiryTable+".doctor_id IN (?)", transferDoctorSubQuery).
|
gorm.Expr("("+prescriptionTable+".patient_id IN (?) OR "+inquiryTable+".doctor_id IN (?) OR "+prescriptionTable+".family_id IN (?))",
|
||||||
Or(prescriptionTable+".family_id IN (?)", patientFamilySubQuery)
|
patientSubQuery, transferDoctorSubQuery, patientFamilySubQuery),
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 处方状态
|
// 处方状态
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user