|
@@ -9,7 +9,7 @@ import (
|
9
|
9
|
func GetHisSummaryDetailList(keyword string, item_type int64, patient_id int64, org_id int64, start_time int64, end_time int64) (patients []*models.ChargePatient, err error) {
|
10
|
10
|
|
11
|
11
|
err = XTReadDB().Table("xt_patients as p").Select("p.id,p.user_org_id,p.name,p.lapseto,p.status").Joins("JOIN his_order AS orders ON orders.patient_id = p.id AND orders.status = 1 AND orders.ctime >= ? AND orders.ctime <= ? AND orders.user_org_id = ? AND orders.order_status = 2 and orders.patient_id = ?", start_time, end_time, org_id, patient_id).Preload("HisChargeOrder", func(db *gorm.DB) *gorm.DB {
|
12
|
|
- return db.Select("id,user_org_id,his_patient_id,settle_accounts_date,status,number,order_status,mdtrt_id,patient_id,psn_cash_pay,acct_pay,fund_pay_sumamt,is_medicine_insurance,medfee_sumamt,maf_pay,hifes_pay").
|
|
12
|
+ return db.Select("id,user_org_id,his_patient_id,settle_accounts_date,status,number,order_status,mdtrt_id,patient_id,psn_cash_pay,acct_pay,fund_pay_sumamt,is_medicine_insurance,medfee_sumamt,maf_pay,hifes_pay,hifp_pay,hifmi_pay").
|
13
|
13
|
Preload("HisChargeOrderInfo", func(db *gorm.DB) *gorm.DB {
|
14
|
14
|
return db.Select("id,order_number,advice_id,det_item_fee_sumamt,cnt,pric,med_chrgitm_type,status,chld_medc_flag,chrgitm_lv,user_org_id,project_id,type,fulamt_ownpay_amt,overlmt_amt,preselfpay_amt,pric_uplmt_amt").Where("status = 1").
|
15
|
15
|
Preload("HisChargeDoctorAdviceInfo", func(db *gorm.DB) *gorm.DB {
|