已结算门诊病人医嘱执行科室费用:
先排除HIS_YB_DJ、HIS_YB_JSB条件
因为单纯的挂号会从此表排除
master
Xiao Ye 3 months ago
parent f3ec174941
commit 219e078798
  1. 2
      WEB-INF/classes/.gitignore
  2. 24
      WEB-INF/conf/sysds_jimureport_normal_mzsr.xml

@ -0,0 +1,2 @@
/com/
/compiler/

@ -1063,14 +1063,14 @@ select sum(d.SFXSJZFY) fy,a.jjks,a.jjys,jgzdb.value4 from HIS_JZ_BASEINFO a lef
left join HIS_SFZD_SFXMXB d on b.pkey=d.ZDZBPKEY and b.JGID=d.JGID left join HIS_SFZD_SFXMXB d on b.pkey=d.ZDZBPKEY and b.JGID=d.JGID
left join HIS_YZ_MXB e on d.YZMX=e.pkey and d.JGID=e.JGID left join HIS_YZ_MXB e on d.YZMX=e.pkey and d.JGID=e.JGID
left join HIS_SFX sfx on d.sfx=sfx.bm and d.JGID=sfx.JGID left join HIS_SFX sfx on d.sfx=sfx.bm and d.JGID=sfx.JGID
left join HIS_YB_DJ dj on b.pkey=dj.ZDZBPKEY and b.JGID=dj.JGID and dj.djcxzt='0' --left join HIS_YB_DJ dj on b.pkey=dj.ZDZBPKEY and b.JGID=dj.JGID and dj.djcxzt='0'
left join HIS_YB_JSB js on dj.JGID=js.JGID and dj.IPT_NO=js.IPT_NO and dj.MDTRT_ID=js.MDTRT_ID and js.CXZT='0' --left join HIS_YB_JSB js on dj.JGID=js.JGID and dj.IPT_NO=js.IPT_NO and dj.MDTRT_ID=js.MDTRT_ID and js.CXZT='0'
where a.JGID=? where a.JGID=?
and (c.PJLX='MG' or c.PJLX='MS') and (c.PJLX='MG' or c.PJLX='MS')
and nvl(e.YZZXKS,'%') like ? and nvl(e.YZZXKS,'%') like ?
and c.SFRQ >=? and c.SFRQ <= ? and c.SFRQ >=? and c.SFRQ <= ?
and c.SFZT =1 and b.JSZT =1 and c.SFZT =1 and b.JSZT =1
and dj.djcxzt='0' and js.CXZT='0' and dj.MDTRT_ID is not null --and dj.djcxzt='0' and js.CXZT='0' and dj.MDTRT_ID is not null
group by sfx.fyzl,e.YZZXKS group by sfx.fyzl,e.YZZXKS
order by e.YZZXKS,sfx.fyzl order by e.YZZXKS,sfx.fyzl
@ -1099,14 +1099,14 @@ select sum(d.SFXSJZFY) fy,a.jjks,a.jjys,jgzdb.value4 from HIS_JZ_BASEINFO a lef
left join HIS_SFZD_SFXMXB d on b.pkey=d.ZDZBPKEY and b.JGID=d.JGID left join HIS_SFZD_SFXMXB d on b.pkey=d.ZDZBPKEY and b.JGID=d.JGID
left join HIS_YZ_MXB e on d.YZMX=e.pkey and d.JGID=e.JGID left join HIS_YZ_MXB e on d.YZMX=e.pkey and d.JGID=e.JGID
left join HIS_SFX sfx on d.sfx=sfx.bm and d.JGID=sfx.JGID left join HIS_SFX sfx on d.sfx=sfx.bm and d.JGID=sfx.JGID
left join HIS_YB_DJ dj on b.pkey=dj.ZDZBPKEY and b.JGID=dj.JGID and dj.djcxzt='0' --left join HIS_YB_DJ dj on b.pkey=dj.ZDZBPKEY and b.JGID=dj.JGID and dj.djcxzt='0'
left join HIS_YB_JSB js on dj.JGID=js.JGID and dj.IPT_NO=js.IPT_NO and dj.MDTRT_ID=js.MDTRT_ID and js.CXZT='0' --left join HIS_YB_JSB js on dj.JGID=js.JGID and dj.IPT_NO=js.IPT_NO and dj.MDTRT_ID=js.MDTRT_ID and js.CXZT='0'
where a.JGID=? where a.JGID=?
and (c.PJLX='MG' or c.PJLX='MS') and (c.PJLX='MG' or c.PJLX='MS')
and nvl(e.YZZXKS,'%') like ? and nvl(e.YZZXKS,'%') like ?
and c.SFRQ >=? and c.SFRQ <= ? and c.SFRQ >=? and c.SFRQ <= ?
and c.SFZT =1 and b.JSZT =1 and c.SFZT =1 and b.JSZT =1
and dj.djcxzt='0' and js.CXZT='0' and dj.MDTRT_ID is not null --and dj.djcxzt='0' and js.CXZT='0' and dj.MDTRT_ID is not null
group by sfx.KJZFL,e.YZZXKS group by sfx.KJZFL,e.YZZXKS
order by e.YZZXKS,sfx.KJZFL order by e.YZZXKS,sfx.KJZFL
@ -1135,14 +1135,14 @@ select sum(d.SFXSJZFY) fy,a.jjks,a.jjys,jgzdb.value4 from HIS_JZ_BASEINFO a lef
left join HIS_SFZD_SFXMXB d on b.pkey=d.ZDZBPKEY and b.JGID=d.JGID left join HIS_SFZD_SFXMXB d on b.pkey=d.ZDZBPKEY and b.JGID=d.JGID
left join HIS_YZ_MXB e on d.YZMX=e.pkey and d.JGID=e.JGID left join HIS_YZ_MXB e on d.YZMX=e.pkey and d.JGID=e.JGID
left join HIS_SFX sfx on d.sfx=sfx.bm and d.JGID=sfx.JGID left join HIS_SFX sfx on d.sfx=sfx.bm and d.JGID=sfx.JGID
left join HIS_YB_DJ dj on b.pkey=dj.ZDZBPKEY and b.JGID=dj.JGID and dj.djcxzt='0' --left join HIS_YB_DJ dj on b.pkey=dj.ZDZBPKEY and b.JGID=dj.JGID and dj.djcxzt='0'
left join HIS_YB_JSB js on dj.JGID=js.JGID and dj.IPT_NO=js.IPT_NO and dj.MDTRT_ID=js.MDTRT_ID and js.CXZT='0' --left join HIS_YB_JSB js on dj.JGID=js.JGID and dj.IPT_NO=js.IPT_NO and dj.MDTRT_ID=js.MDTRT_ID and js.CXZT='0'
where a.JGID=? where a.JGID=?
and (c.PJLX='MG' or c.PJLX='MS') and (c.PJLX='MG' or c.PJLX='MS')
and nvl(e.YZZXKS,'%') like ? and nvl(e.YZZXKS,'%') like ?
and c.SFRQ >=? and c.SFRQ <= ? and c.SFRQ >=? and c.SFRQ <= ?
and c.SFZT =1 and b.JSZT =1 and c.SFZT =1 and b.JSZT =1
and dj.djcxzt='0' and js.CXZT='0' and dj.MDTRT_ID is not null --and dj.djcxzt='0' and js.CXZT='0' and dj.MDTRT_ID is not null
group by sfx.HSZFL,e.YZZXKS group by sfx.HSZFL,e.YZZXKS
order by e.YZZXKS,sfx.HSZFL order by e.YZZXKS,sfx.HSZFL
@ -1171,14 +1171,14 @@ select sum(d.SFXSJZFY) fy,a.jjks,a.jjys,jgzdb.value4 from HIS_JZ_BASEINFO a lef
left join HIS_SFZD_SFXMXB d on b.pkey=d.ZDZBPKEY and b.JGID=d.JGID left join HIS_SFZD_SFXMXB d on b.pkey=d.ZDZBPKEY and b.JGID=d.JGID
left join HIS_YZ_MXB e on d.YZMX=e.pkey and d.JGID=e.JGID left join HIS_YZ_MXB e on d.YZMX=e.pkey and d.JGID=e.JGID
left join HIS_SFX sfx on d.sfx=sfx.bm and d.JGID=sfx.JGID left join HIS_SFX sfx on d.sfx=sfx.bm and d.JGID=sfx.JGID
left join HIS_YB_DJ dj on b.pkey=dj.ZDZBPKEY and b.JGID=dj.JGID and dj.djcxzt='0' --left join HIS_YB_DJ dj on b.pkey=dj.ZDZBPKEY and b.JGID=dj.JGID and dj.djcxzt='0'
left join HIS_YB_JSB js on dj.JGID=js.JGID and dj.IPT_NO=js.IPT_NO and dj.MDTRT_ID=js.MDTRT_ID and js.CXZT='0' --left join HIS_YB_JSB js on dj.JGID=js.JGID and dj.IPT_NO=js.IPT_NO and dj.MDTRT_ID=js.MDTRT_ID and js.CXZT='0'
where a.JGID=? where a.JGID=?
and (c.PJLX='MG' or c.PJLX='MS') and (c.PJLX='MG' or c.PJLX='MS')
and nvl(e.YZZXKS,'%') like ? and nvl(e.YZZXKS,'%') like ?
and c.SFRQ >=? and c.SFRQ <= ? and c.SFRQ >=? and c.SFRQ <= ?
and c.SFZT =1 and b.JSZT =1 and c.SFZT =1 and b.JSZT =1
and dj.djcxzt='0' and js.CXZT='0' and dj.MDTRT_ID is not null --and dj.djcxzt='0' and js.CXZT='0' and dj.MDTRT_ID is not null
group by sfx.BASYFL,e.YZZXKS group by sfx.BASYFL,e.YZZXKS
order by e.YZZXKS,sfx.BASYFL order by e.YZZXKS,sfx.BASYFL

Loading…
Cancel
Save