1746
|
-func GetCallHisPrescriptions(start_time int64, end_time int64, org_id int64, patient_id int64, p_type int64) (advice []*VMOtherHisPrescriptionInfo, err error) {
|
|
|
|
|
1746
|
+func GetCallHisPrescriptions(start_time int64, end_time int64, org_id int64, patient_id int64, p_type int64) (advice []VMOtherHisPrescriptionInfo, err error) {
|
1747
|
err = readDb.Model(&VMOtherHisPrescriptionInfo{}).Where("patient_id = ? AND user_org_id = ? AND status=1 AND record_date >= ? AND record_date <= ? AND p_type = ?", patient_id, org_id, start_time, end_time, p_type).
|
1747
|
err = readDb.Model(&VMOtherHisPrescriptionInfo{}).Where("patient_id = ? AND user_org_id = ? AND status=1 AND record_date >= ? AND record_date <= ? AND p_type = ?", patient_id, org_id, start_time, end_time, p_type).
|
1748
|
Preload("VMHisPrescription", func(db *gorm.DB) *gorm.DB {
|
1748
|
Preload("VMHisPrescription", func(db *gorm.DB) *gorm.DB {
|
1749
|
return db.Where("status = 1 AND user_org_id = ?", org_id).
|
1749
|
return db.Where("status = 1 AND user_org_id = ?", org_id).
|