抄方 处方列表处理
This commit is contained in:
@@ -2,12 +2,13 @@ package dao
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"gorm.io/gorm"
|
||||
"hospital-admin-api/api/model"
|
||||
"hospital-admin-api/api/requests"
|
||||
"hospital-admin-api/global"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
type OrderPrescriptionDao struct {
|
||||
@@ -100,6 +101,15 @@ func (r *OrderPrescriptionDao) GetOrderPrescriptionPageSearch(req requests.GetOr
|
||||
// 处方关联疾病表
|
||||
query = query.Preload("OrderPrescriptionIcd")
|
||||
|
||||
// 处方关联问诊表(抄方用)
|
||||
query = query.Preload("OrderInquiry", func(db *gorm.DB) *gorm.DB {
|
||||
return db.Preload("UserDoctor", func(db *gorm.DB) *gorm.DB {
|
||||
return db.Omit("open_id", "union_id", "wx_session_key")
|
||||
}).Preload("TransferUserDoctor", func(db *gorm.DB) *gorm.DB {
|
||||
return db.Omit("open_id", "union_id", "wx_session_key")
|
||||
})
|
||||
})
|
||||
|
||||
// 患者家庭成员表
|
||||
query = query.Preload("PatientFamily")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user