SELECT d.RECEIPT_NUM, c.PAT_NAME, --病人姓名 b.PAT_MEDCARDNO, --医疗证号 b.DIAGNOSIS_DATE, --就诊时间 c.WORKUNIT_NAME, --单位名称 sum(a.SUM_TOTAL) mzfy, --门诊费用 sum(a.SUM_RECEIVABLE) tczf --统筹支付 FROM op.OP_CHGNOTE a, op.OP_MEDILIST_LOG b, op.OP_VISIT c, OP.OP_CHGNOTE_PAY_MASTER d WHERE (a.VISIT_ID = b.VISIT_ID) and (b.VISIT_ID = c.VISIT_ID) and d.CHGNOTE_ID = a.CHGNOTE_ID and a.REFUND_ORIGIN is null and a.REFUND_REVERSE is null and a.SUSER_ID = b.OPERATOR_ID and b.ACCOUNT_SIGN = '2'
2 回答
慕田峪9158850
TA贡献1794条经验 获得超7个赞
SELECT d.RECEIPT_NUM, c.PAT_NAME, --病人姓名 b.PAT_MEDCARDNO, --医疗证号 b.DIAGNOSIS_DATE, --就诊时间 c.WORKUNIT_NAME, --单位名称 sum(a.SUM_TOTAL) mzfy, --门诊费用 sum(a.SUM_RECEIVABLE) tczf --统筹支付 FROM op.OP_CHGNOTE a, op.OP_MEDILIST_LOG b, op.OP_VISIT c, OP.OP_CHGNOTE_PAY_MASTER d WHERE (a.VISIT_ID = b.VISIT_ID) and (b.VISIT_ID = c.VISIT_ID) and d.CHGNOTE_ID = a.CHGNOTE_ID and a.REFUND_ORIGIN is null and a.REFUND_REVERSE is null and a.SUSER_ID = b.OPERATOR_ID and b.ACCOUNT_SIGN = '2'
group by c.PAT_NAME,b.PAT_MEDCARDNO, b.DIAGNOSIS_DATE, c.WORKUNIT_NAME
- 2 回答
- 0 关注
- 441 浏览
添加回答
举报
0/150
提交
取消