|
@@ -23,18 +23,18 @@ public interface YbStatDao {
|
|
|
@Select("<script>" +
|
|
|
"select psnCount=count(distinct a.setl_id), " +
|
|
|
"inDays=sum(datediff(day, zy.admiss_date, zy.dis_date)), " +
|
|
|
- "avgInDays=cast(round(sum(datediff(day, zy.admiss_date, zy.dis_date))/cast(count(distinct a.setl_id) as decimal(10,2)),2) as decimal(10,2)), " +
|
|
|
- "totalFee=cast(round(sum(a.medfee_sumamt),2) as decimal(10,2)), " +
|
|
|
- "fundPooling=cast(round(sum(a.hifp_pay),2) as decimal(10,2)), " +
|
|
|
- "acctPay=cast(round(sum(a.acct_pay),2) as decimal(10,2)), " +
|
|
|
- "bigIllFundPooling=cast(round(sum(a.hifmi_pay),2) as decimal(10,2)), " +
|
|
|
- "civilServiceFund=cast(round(sum(a.cvlserv_pay),2) as decimal(10,2)), " +
|
|
|
- "otherFunds=cast(round(sum(isnull(a.fund_pay_sumamt,0)-isnull(a.hifp_pay,0)-isnull(a.cvlserv_pay,0)-isnull(a.hifmi_pay,0)-isnull(a.maf_pay,0)-isnull(a.hifob_pay,0)-isnull(a.hifes_pay,0)),2) as decimal(10,2)), " +
|
|
|
- "allFunds=cast(round(sum(a.fund_pay_sumamt),2) as decimal(10,2)), " +
|
|
|
- "drugFee=cast(round(sum(isnull(a.charge_western_medicine,0) + isnull(a.charge_patent_medicine,0) + isnull(a.charge_herbal,0)),2) as decimal(10,2)), " +
|
|
|
- "drugFeeRatio=cast(round(sum(isnull(a.charge_western_medicine,0) + isnull(a.charge_patent_medicine,0) + isnull(a.charge_herbal,0))/sum(a.medfee_sumamt)*100,2) as decimal(10,2)), " +
|
|
|
- "matFee=cast(round(sum(a.charge_sanitary_material),2) as decimal(10,2)), " +
|
|
|
- "matFeeRatio=cast(round(sum(a.charge_sanitary_material)/sum(a.medfee_sumamt)*100,2) as decimal(10,2)) " +
|
|
|
+ "avgInDays=cast(round(sum(datediff(day, zy.admiss_date, zy.dis_date))/cast(count(distinct a.setl_id) as decimal(12,2)),2) as decimal(12,2)), " +
|
|
|
+ "totalFee=cast(round(sum(a.medfee_sumamt),2) as decimal(12,2)), " +
|
|
|
+ "fundPooling=cast(round(sum(a.hifp_pay),2) as decimal(12,2)), " +
|
|
|
+ "acctPay=cast(round(sum(a.acct_pay),2) as decimal(12,2)), " +
|
|
|
+ "bigIllFundPooling=cast(round(sum(a.hifmi_pay),2) as decimal(12,2)), " +
|
|
|
+ "civilServiceFund=cast(round(sum(a.cvlserv_pay),2) as decimal(12,2)), " +
|
|
|
+ "otherFunds=cast(round(sum(isnull(a.fund_pay_sumamt,0)-isnull(a.hifp_pay,0)-isnull(a.cvlserv_pay,0)-isnull(a.hifmi_pay,0)-isnull(a.maf_pay,0)-isnull(a.hifob_pay,0)-isnull(a.hifes_pay,0)),2) as decimal(12,2)), " +
|
|
|
+ "allFunds=cast(round(sum(a.fund_pay_sumamt),2) as decimal(12,2)), " +
|
|
|
+ "drugFee=cast(round(sum(isnull(a.charge_western_medicine,0) + isnull(a.charge_patent_medicine,0) + isnull(a.charge_herbal,0)),2) as decimal(12,2)), " +
|
|
|
+ "drugFeeRatio=cast(round(sum(isnull(a.charge_western_medicine,0) + isnull(a.charge_patent_medicine,0) + isnull(a.charge_herbal,0))/sum(a.medfee_sumamt)*100,2) as decimal(12,2)), " +
|
|
|
+ "matFee=cast(round(sum(a.charge_sanitary_material),2) as decimal(12,2)), " +
|
|
|
+ "matFeeRatio=cast(round(sum(a.charge_sanitary_material)/sum(a.medfee_sumamt)*100,2) as decimal(12,2)) " +
|
|
|
"from t_si_setlinfo a " +
|
|
|
"left join zy_inactpatient zy on (zy.inpatient_no = a.pat_no and zy.admiss_times = a.times) " +
|
|
|
"where a.revoked=0 and a.setl_type=#{setlType} and a.setl_time>=#{beginTime} and a.setl_time<=#{endTime} " +
|
|
@@ -64,18 +64,18 @@ public interface YbStatDao {
|
|
|
@Select("<script>" +
|
|
|
"select psnCount=count(distinct a.setl_id), " +
|
|
|
"inDays=sum(datediff(day, zy.admiss_date, zy.dis_date)), " +
|
|
|
- "avgInDays=cast(round(sum(datediff(day, zy.admiss_date, zy.dis_date))/cast(count(distinct a.setl_id) as decimal(10,2)),2) as decimal(10,2)), " +
|
|
|
- "totalFee=cast(round(sum(a.medfee_sumamt),2) as decimal(10,2)), " +
|
|
|
- "acctPay=cast(round(sum(a.acct_pay),2) as decimal(10,2)), " +
|
|
|
- "fundPooling=cast(round(sum(a.hifp_pay),2) as decimal(10,2)), " +
|
|
|
- "bigIllFundPooling=cast(round(sum(a.hifmi_pay),2) as decimal(10,2)), " +
|
|
|
- "civilServiceFund=cast(round(sum(a.cvlserv_pay),2) as decimal(10,2)), " +
|
|
|
- "otherFunds=cast(round(sum(isnull(a.fund_pay_sumamt,0)-isnull(a.hifp_pay,0)-isnull(a.cvlserv_pay,0)-isnull(a.hifmi_pay,0)-isnull(a.maf_pay,0)-isnull(a.hifob_pay,0)-isnull(a.hifes_pay,0)),2) as decimal(10,2)), " +
|
|
|
- "allFunds=cast(round(sum(a.fund_pay_sumamt),2) as decimal(10,2)), " +
|
|
|
- "drugFee=cast(round(sum(isnull(a.charge_western_medicine,0) + isnull(a.charge_patent_medicine,0) + isnull(a.charge_herbal,0)),2) as decimal(10,2)), " +
|
|
|
- "drugFeeRatio=cast(round(sum(isnull(a.charge_western_medicine,0) + isnull(a.charge_patent_medicine,0) + isnull(a.charge_herbal,0))/sum(a.medfee_sumamt)*100,2) as decimal(10,2)), " +
|
|
|
- "matFee=cast(round(sum(a.charge_sanitary_material),2) as decimal(10,2)), " +
|
|
|
- "matFeeRatio=cast(round(sum(a.charge_sanitary_material)/sum(a.medfee_sumamt)*100,2) as decimal(10,2)) " +
|
|
|
+ "avgInDays=cast(round(sum(datediff(day, zy.admiss_date, zy.dis_date))/cast(count(distinct a.setl_id) as decimal(12,2)),2) as decimal(12,2)), " +
|
|
|
+ "totalFee=cast(round(sum(a.medfee_sumamt),2) as decimal(12,2)), " +
|
|
|
+ "acctPay=cast(round(sum(a.acct_pay),2) as decimal(12,2)), " +
|
|
|
+ "fundPooling=cast(round(sum(a.hifp_pay),2) as decimal(12,2)), " +
|
|
|
+ "bigIllFundPooling=cast(round(sum(a.hifmi_pay),2) as decimal(12,2)), " +
|
|
|
+ "civilServiceFund=cast(round(sum(a.cvlserv_pay),2) as decimal(12,2)), " +
|
|
|
+ "otherFunds=cast(round(sum(isnull(a.fund_pay_sumamt,0)-isnull(a.hifp_pay,0)-isnull(a.cvlserv_pay,0)-isnull(a.hifmi_pay,0)-isnull(a.maf_pay,0)-isnull(a.hifob_pay,0)-isnull(a.hifes_pay,0)),2) as decimal(12,2)), " +
|
|
|
+ "allFunds=cast(round(sum(a.fund_pay_sumamt),2) as decimal(12,2)), " +
|
|
|
+ "drugFee=cast(round(sum(isnull(a.charge_western_medicine,0) + isnull(a.charge_patent_medicine,0) + isnull(a.charge_herbal,0)),2) as decimal(12,2)), " +
|
|
|
+ "drugFeeRatio=cast(round(sum(isnull(a.charge_western_medicine,0) + isnull(a.charge_patent_medicine,0) + isnull(a.charge_herbal,0))/sum(a.medfee_sumamt)*100,2) as decimal(12,2)), " +
|
|
|
+ "matFee=cast(round(sum(a.charge_sanitary_material),2) as decimal(12,2)), " +
|
|
|
+ "matFeeRatio=cast(round(sum(a.charge_sanitary_material)/sum(a.medfee_sumamt)*100,2) as decimal(12,2)) " +
|
|
|
"from t_si_setlinfo a " +
|
|
|
"left join zy_inactpatient zy on (zy.inpatient_no = a.pat_no and zy.admiss_times = a.times) " +
|
|
|
"where a.revoked=0 and a.setl_type=#{setlType} and a.setl_time>=#{beginTime} and a.setl_time<=#{endTime} " +
|
|
@@ -86,18 +86,18 @@ public interface YbStatDao {
|
|
|
@Select("<script>" +
|
|
|
"select psnCount=count(distinct a.setl_id), " +
|
|
|
"inDays=sum(datediff(day, zy.admiss_date, zy.dis_date)), " +
|
|
|
- "avgInDays=cast(round(sum(datediff(day, zy.admiss_date, zy.dis_date))/cast(count(distinct a.setl_id) as decimal(10,2)),2) as decimal(10,2)), " +
|
|
|
- "totalFee=cast(round(sum(a.medfee_sumamt),2) as decimal(10,2)), " +
|
|
|
- "acctPay=cast(round(sum(a.acct_pay),2) as decimal(10,2)), " +
|
|
|
- "fundPooling=cast(round(sum(a.hifp_pay),2) as decimal(10,2)), " +
|
|
|
- "bigIllFundPooling=cast(round(sum(a.hifmi_pay),2) as decimal(10,2)), " +
|
|
|
- "civilServiceFund=cast(round(sum(a.cvlserv_pay),2) as decimal(10,2)), " +
|
|
|
- "otherFunds=cast(round(sum(isnull(a.fund_pay_sumamt,0)-isnull(a.hifp_pay,0)-isnull(a.cvlserv_pay,0)-isnull(a.hifmi_pay,0)-isnull(a.maf_pay,0)-isnull(a.hifob_pay,0)-isnull(a.hifes_pay,0)),2) as decimal(10,2)), " +
|
|
|
- "allFunds=cast(round(sum(a.fund_pay_sumamt),2) as decimal(10,2)), " +
|
|
|
- "drugFee=cast(round(sum(isnull(a.charge_western_medicine,0) + isnull(a.charge_patent_medicine,0) + isnull(a.charge_herbal,0)),2) as decimal(10,2)), " +
|
|
|
- "drugFeeRatio=cast(round(sum(isnull(a.charge_western_medicine,0) + isnull(a.charge_patent_medicine,0) + isnull(a.charge_herbal,0))/sum(a.medfee_sumamt)*100,2) as decimal(10,2)), " +
|
|
|
- "matFee=cast(round(sum(a.charge_sanitary_material),2) as decimal(10,2)), " +
|
|
|
- "matFeeRatio=cast(round(sum(a.charge_sanitary_material)/sum(a.medfee_sumamt)*100,2) as decimal(10,2)) " +
|
|
|
+ "avgInDays=cast(round(sum(datediff(day, zy.admiss_date, zy.dis_date))/cast(count(distinct a.setl_id) as decimal(12,2)),2) as decimal(12,2)), " +
|
|
|
+ "totalFee=cast(round(sum(a.medfee_sumamt),2) as decimal(12,2)), " +
|
|
|
+ "acctPay=cast(round(sum(a.acct_pay),2) as decimal(12,2)), " +
|
|
|
+ "fundPooling=cast(round(sum(a.hifp_pay),2) as decimal(12,2)), " +
|
|
|
+ "bigIllFundPooling=cast(round(sum(a.hifmi_pay),2) as decimal(12,2)), " +
|
|
|
+ "civilServiceFund=cast(round(sum(a.cvlserv_pay),2) as decimal(12,2)), " +
|
|
|
+ "otherFunds=cast(round(sum(isnull(a.fund_pay_sumamt,0)-isnull(a.hifp_pay,0)-isnull(a.cvlserv_pay,0)-isnull(a.hifmi_pay,0)-isnull(a.maf_pay,0)-isnull(a.hifob_pay,0)-isnull(a.hifes_pay,0)),2) as decimal(12,2)), " +
|
|
|
+ "allFunds=cast(round(sum(a.fund_pay_sumamt),2) as decimal(12,2)), " +
|
|
|
+ "drugFee=cast(round(sum(isnull(a.charge_western_medicine,0) + isnull(a.charge_patent_medicine,0) + isnull(a.charge_herbal,0)),2) as decimal(12,2)), " +
|
|
|
+ "drugFeeRatio=cast(round(sum(isnull(a.charge_western_medicine,0) + isnull(a.charge_patent_medicine,0) + isnull(a.charge_herbal,0))/sum(a.medfee_sumamt)*100,2) as decimal(12,2)), " +
|
|
|
+ "matFee=cast(round(sum(a.charge_sanitary_material),2) as decimal(12,2)), " +
|
|
|
+ "matFeeRatio=cast(round(sum(a.charge_sanitary_material)/sum(a.medfee_sumamt)*100,2) as decimal(12,2)) " +
|
|
|
"from t_si_setlinfo a " +
|
|
|
"left join zy_inactpatient zy on (zy.inpatient_no = a.pat_no and zy.admiss_times = a.times) " +
|
|
|
"where a.revoked=0 and a.setl_type=#{setlType} and a.setl_time>=#{beginTime} and a.setl_time<=#{endTime} " +
|
|
@@ -108,18 +108,18 @@ public interface YbStatDao {
|
|
|
@Select("<script>" +
|
|
|
"select psnCount=count(distinct a.setl_id), " +
|
|
|
"inDays=sum(datediff(day, zy.admiss_date, zy.dis_date)), " +
|
|
|
- "avgInDays=cast(round(sum(datediff(day, zy.admiss_date, zy.dis_date))/cast(count(distinct a.setl_id) as decimal(10,2)),2) as decimal(10,2)), " +
|
|
|
- "totalFee=cast(round(sum(a.medfee_sumamt),2) as decimal(10,2)), " +
|
|
|
- "acctPay=cast(round(sum(a.acct_pay),2) as decimal(10,2)), " +
|
|
|
- "fundPooling=cast(round(sum(a.hifp_pay),2) as decimal(10,2)), " +
|
|
|
- "bigIllFundPooling=cast(round(sum(a.hifmi_pay),2) as decimal(10,2)), " +
|
|
|
- "civilServiceFund=cast(round(sum(a.cvlserv_pay),2) as decimal(10,2)), " +
|
|
|
- "otherFunds=cast(round(sum(isnull(a.fund_pay_sumamt,0)-isnull(a.hifp_pay,0)-isnull(a.cvlserv_pay,0)-isnull(a.hifmi_pay,0)-isnull(a.maf_pay,0)-isnull(a.hifob_pay,0)-isnull(a.hifes_pay,0)),2) as decimal(10,2)), " +
|
|
|
- "allFunds=cast(round(sum(a.fund_pay_sumamt),2) as decimal(10,2)), " +
|
|
|
- "drugFee=cast(round(sum(isnull(a.charge_western_medicine,0) + isnull(a.charge_patent_medicine,0) + isnull(a.charge_herbal,0)),2) as decimal(10,2)), " +
|
|
|
- "drugFeeRatio=cast(round(sum(isnull(a.charge_western_medicine,0) + isnull(a.charge_patent_medicine,0) + isnull(a.charge_herbal,0))/sum(a.medfee_sumamt)*100,2) as decimal(10,2)), " +
|
|
|
- "matFee=cast(round(sum(a.charge_sanitary_material),2) as decimal(10,2)), " +
|
|
|
- "matFeeRatio=cast(round(sum(a.charge_sanitary_material)/sum(a.medfee_sumamt)*100,2) as decimal(10,2)) " +
|
|
|
+ "avgInDays=cast(round(sum(datediff(day, zy.admiss_date, zy.dis_date))/cast(count(distinct a.setl_id) as decimal(12,2)),2) as decimal(12,2)), " +
|
|
|
+ "totalFee=cast(round(sum(a.medfee_sumamt),2) as decimal(12,2)), " +
|
|
|
+ "acctPay=cast(round(sum(a.acct_pay),2) as decimal(12,2)), " +
|
|
|
+ "fundPooling=cast(round(sum(a.hifp_pay),2) as decimal(12,2)), " +
|
|
|
+ "bigIllFundPooling=cast(round(sum(a.hifmi_pay),2) as decimal(12,2)), " +
|
|
|
+ "civilServiceFund=cast(round(sum(a.cvlserv_pay),2) as decimal(12,2)), " +
|
|
|
+ "otherFunds=cast(round(sum(isnull(a.fund_pay_sumamt,0)-isnull(a.hifp_pay,0)-isnull(a.cvlserv_pay,0)-isnull(a.hifmi_pay,0)-isnull(a.maf_pay,0)-isnull(a.hifob_pay,0)-isnull(a.hifes_pay,0)),2) as decimal(12,2)), " +
|
|
|
+ "allFunds=cast(round(sum(a.fund_pay_sumamt),2) as decimal(12,2)), " +
|
|
|
+ "drugFee=cast(round(sum(isnull(a.charge_western_medicine,0) + isnull(a.charge_patent_medicine,0) + isnull(a.charge_herbal,0)),2) as decimal(12,2)), " +
|
|
|
+ "drugFeeRatio=cast(round(sum(isnull(a.charge_western_medicine,0) + isnull(a.charge_patent_medicine,0) + isnull(a.charge_herbal,0))/sum(a.medfee_sumamt)*100,2) as decimal(12,2)), " +
|
|
|
+ "matFee=cast(round(sum(a.charge_sanitary_material),2) as decimal(12,2)), " +
|
|
|
+ "matFeeRatio=cast(round(sum(a.charge_sanitary_material)/sum(a.medfee_sumamt)*100,2) as decimal(12,2)) " +
|
|
|
"from t_si_setlinfo a " +
|
|
|
"left join zy_inactpatient zy on (zy.inpatient_no = a.pat_no and zy.admiss_times = a.times) " +
|
|
|
"where a.revoked=0 and a.setl_type=#{setlType} and a.setl_time>=#{beginTime} and a.setl_time<=#{endTime} " +
|
|
@@ -129,10 +129,10 @@ public interface YbStatDao {
|
|
|
|
|
|
@Select("<script>" +
|
|
|
"select yf=convert(varchar(7), a.setl_time, 120), " +
|
|
|
- "totalFee=cast(round(sum(a.medfee_sumamt),2) as decimal(10,2)), " +
|
|
|
- "allFunds=cast(round(sum(a.fund_pay_sumamt),2) as decimal(10,2)), " +
|
|
|
- "drugFee=cast(round(sum(isnull(a.charge_western_medicine,0) + isnull(a.charge_patent_medicine,0) + isnull(a.charge_herbal,0)),2) as decimal(10,2)), " +
|
|
|
- "matFee=cast(round(sum(a.charge_sanitary_material),2) as decimal(10,2)) " +
|
|
|
+ "totalFee=cast(round(sum(a.medfee_sumamt),2) as decimal(12,2)), " +
|
|
|
+ "allFunds=cast(round(sum(a.fund_pay_sumamt),2) as decimal(12,2)), " +
|
|
|
+ "drugFee=cast(round(sum(isnull(a.charge_western_medicine,0) + isnull(a.charge_patent_medicine,0) + isnull(a.charge_herbal,0)),2) as decimal(12,2)), " +
|
|
|
+ "matFee=cast(round(sum(a.charge_sanitary_material),2) as decimal(12,2)) " +
|
|
|
"from t_si_setlinfo a " +
|
|
|
"left join zy_inactpatient zy on (zy.inpatient_no = a.pat_no and zy.admiss_times = a.times) " +
|
|
|
"where a.revoked=0 and a.setl_type=#{setlType} and a.setl_time>=#{beginTime} and a.setl_time<=#{endTime} " +
|
|
@@ -141,10 +141,10 @@ public interface YbStatDao {
|
|
|
List<YbStatResult> selectYbStatRatio(@Param("beginTime") String beginTime, @Param("endTime") String endTime, @Param("setlType") String setlType);
|
|
|
|
|
|
@Select("<script>" +
|
|
|
- "select totalFee=cast(round(sum(a.medfee_sumamt),2) as decimal(10,2)), " +
|
|
|
- "allFunds=cast(round(sum(a.fund_pay_sumamt),2) as decimal(10,2)), " +
|
|
|
- "drugFee=cast(round(sum(isnull(a.charge_western_medicine,0) + isnull(a.charge_patent_medicine,0) + isnull(a.charge_herbal,0)),2) as decimal(10,2)), " +
|
|
|
- "matFee=cast(round(sum(a.charge_sanitary_material),2) as decimal(10,2)) " +
|
|
|
+ "select totalFee=cast(round(sum(a.medfee_sumamt),2) as decimal(12,2)), " +
|
|
|
+ "allFunds=cast(round(sum(a.fund_pay_sumamt),2) as decimal(12,2)), " +
|
|
|
+ "drugFee=cast(round(sum(isnull(a.charge_western_medicine,0) + isnull(a.charge_patent_medicine,0) + isnull(a.charge_herbal,0)),2) as decimal(12,2)), " +
|
|
|
+ "matFee=cast(round(sum(a.charge_sanitary_material),2) as decimal(12,2)) " +
|
|
|
"from t_si_setlinfo a " +
|
|
|
"left join zy_inactpatient zy on (zy.inpatient_no = a.pat_no and zy.admiss_times = a.times) " +
|
|
|
"where a.revoked=0 and a.setl_type=#{setlType} and a.setl_time>=#{beginTime} and a.setl_time<=#{endTime} " +
|
|
@@ -236,14 +236,14 @@ public interface YbStatDao {
|
|
|
"select yf=convert(varchar(7), a.setl_time, 120), a.medins_type, " +
|
|
|
"psnCount=count(distinct a.setl_id), " +
|
|
|
"inDays=sum(datediff(day, zy.admiss_date, zy.dis_date)), " +
|
|
|
- "totalFee=cast(round(sum(a.medfee_sumamt),2) as decimal(10,2)), " +
|
|
|
- "fundPooling=cast(round(sum(a.hifp_pay),2) as decimal(10,2)), " +
|
|
|
- "bigIllFundPooling=cast(round(sum(a.hifmi_pay),2) as decimal(10,2)), " +
|
|
|
- "civilServiceFund=cast(round(sum(a.cvlserv_pay),2) as decimal(10,2)), " +
|
|
|
- "otherFunds=cast(round(sum(isnull(a.fund_pay_sumamt,0)-isnull(a.hifp_pay,0)-isnull(a.cvlserv_pay,0)-isnull(a.hifmi_pay,0)-isnull(a.maf_pay,0)-isnull(a.hifob_pay,0)-isnull(a.hifes_pay,0)),2) as decimal(10,2)), " +
|
|
|
- "allFunds=cast(round(sum(a.fund_pay_sumamt),2) as decimal(10,2)), " +
|
|
|
- "drugFee=cast(round(sum(isnull(a.charge_western_medicine,0) + isnull(a.charge_patent_medicine,0) + isnull(a.charge_herbal,0)),2) as decimal(10,2)), " +
|
|
|
- "matFee=cast(round(isnull(sum(a.charge_sanitary_material),0),2) as decimal(10,2)) " +
|
|
|
+ "totalFee=cast(round(sum(a.medfee_sumamt),2) as decimal(12,2)), " +
|
|
|
+ "fundPooling=cast(round(sum(a.hifp_pay),2) as decimal(12,2)), " +
|
|
|
+ "bigIllFundPooling=cast(round(sum(a.hifmi_pay),2) as decimal(12,2)), " +
|
|
|
+ "civilServiceFund=cast(round(sum(a.cvlserv_pay),2) as decimal(12,2)), " +
|
|
|
+ "otherFunds=cast(round(sum(isnull(a.fund_pay_sumamt,0)-isnull(a.hifp_pay,0)-isnull(a.cvlserv_pay,0)-isnull(a.hifmi_pay,0)-isnull(a.maf_pay,0)-isnull(a.hifob_pay,0)-isnull(a.hifes_pay,0)),2) as decimal(12,2)), " +
|
|
|
+ "allFunds=cast(round(sum(a.fund_pay_sumamt),2) as decimal(12,2)), " +
|
|
|
+ "drugFee=cast(round(sum(isnull(a.charge_western_medicine,0) + isnull(a.charge_patent_medicine,0) + isnull(a.charge_herbal,0)),2) as decimal(12,2)), " +
|
|
|
+ "matFee=cast(round(isnull(sum(a.charge_sanitary_material),0),2) as decimal(12,2)) " +
|
|
|
"from t_si_setlinfo a " +
|
|
|
"left join zy_inactpatient zy on (zy.inpatient_no = a.pat_no and zy.admiss_times = a.times) " +
|
|
|
"where a.revoked=0 and a.setl_type=#{setlType} and a.setl_time>=#{beginTime} and a.setl_time<=#{endTime} " +
|