SELECT
 his_order.psn_name AS '姓名',
 count(his_order.id) AS '次数',
 sum(his_order.medfee_sumamt) AS '医疗费总额',
 sum(his_order.fund_pay_sumamt) AS '基金支付金额',
 sum(his_order.acct_pay) AS '个人账户支付',
 sum(his_order.psn_cash_pay) AS '个人支付金额',
 sum(his_order.hifp_pay) AS '基金统筹支付金额',
 sum(his_order.hifob_pay) AS '大额基金支付金额',
 sum(his_order.maf_pay) AS '医疗救助基金',
 sum(his_order.hifes_pay) AS '企业补充医疗保险基金支出',
 sum(his_order.hifmi_pay) AS '居民大病基金支出',
 sum(his_order.medfee_sumamt) AS '费用总额',
 sum(his_order.fulamt_ownpay_amt) AS '全自费总额',
 sum(his_order.overlmt_self_pay) AS '超限价自费费用',
 sum(his_order.preselfpay_amt) AS '先行自付费用',
 sum(his_order.psn_part_amt) AS '个人负担',
 sum(his_order.acct_pay) AS '个人账户支出',
 sum(his_order.psn_cash_pay) AS '个人现金支出',
 sum(his_order.hosp_part_amt) AS '医院负担金额',
 sum(his_order.acct_mulaid_pay) AS '个人账户共计支付',
sum(his_order.oth_pay) AS '其他支付'
FROM
 his_order
WHERE
 his_order.user_org_id = 10088
 AND his_order.order_status = 2
 AND his_order.setl_time >= '2023-01-01 00:00:00'
 AND his_order.setl_time <= '2023-01-31 23:59:59'
 AND his_order.STATUS = 1
GROUP BY
 his_order.patient_id


