select '' 科室,'' 科室人次,'' 费用类别,'' 费用,'' 人均费用 from dual where 1=2
=? and c.SFRQ <= ? and c.SFZT =1 and b.JSZT =1 group by sfx.fyzl,a.jjks order by a.jjks,sfx.fyzl
]]>
12
12
93
93
=? and c.SFRQ <= ? and c.SFZT =1 and b.JSZT =1 group by sfx.KJZFL,a.jjks order by a.jjks,sfx.KJZFL
]]>
12
12
93
93
=? and c.SFRQ <= ? and c.SFZT =1 and b.JSZT =1 group by sfx.HSZFL,a.jjks order by a.jjks,sfx.HSZFL
]]>
12
12
93
93
=? and c.SFRQ <= ? and c.SFZT =1 and b.JSZT =1 group by sfx.BASYFL,a.jjks order by a.jjks,sfx.BASYFL
]]>
12
12
93
93
=? and c.SFRQ <= ? and c.SFZT =1 and b.JSZT =1 group by d.fydl,a.jjks order by a.jjks,d.fydl
]]>
12
12
93
93
=? and c.SFRQ <= ? group by a.jjks order by a.jjks
]]>
12
12
93
93
select '' 科室,'' 医生,'' 费用类别,'' 费用 from dual where 1=2
=? and c.SFRQ <= ? and c.SFZT =1 and b.JSZT =1 group by sfx.fyzl,a.jjks,a.jjys order by a.jjks,a.jjys,sfx.fyzl
]]>
12
12
93
93
=? and c.SFRQ <= ? and c.SFZT =1 and b.JSZT =1 group by sfx.KJZFL,a.jjks,a.jjys order by a.jjks,a.jjys,sfx.KJZFL
]]>
12
12
93
93
=? and c.SFRQ <= ? and c.SFZT =1 and b.JSZT =1 group by sfx.HSZFL,a.jjks,a.jjys order by a.jjks,a.jjys,sfx.HSZFL
]]>
12
12
93
93
=? and c.SFRQ <= ? and c.SFZT =1 and b.JSZT =1 group by sfx.BASYFL,a.jjks,a.jjys order by a.jjks,a.jjys,sfx.BASYFL
]]>
12
12
93
93
=? and c.SFRQ <= ? and c.SFZT =1 and b.JSZT =1 group by d.fydl,a.jjks,a.jjys order by a.jjks,a.jjys,d.fydl
]]>
12
12
93
93
=? and c.SFRQ <= ? and b.JSZT =1 and e.gllx='Y' group by a.jjks,a.jjys order by a.jjks,a.jjys
]]>
12
12
93
93
select '' 科室,'' 人次,'' 费用类别,'' 费用 from dual where 1=2
=? and c.SFRQ <= ? and c.SFZT =1 and b.JSZT =1 group by sfx.fyzl,a.jjks order by a.jjks,sfx.fyzl
]]>
12
12
93
93
=? and c.SFRQ <= ? and c.SFZT =1 and b.JSZT =1 group by sfx.KJZFL,a.jjks order by a.jjks,sfx.KJZFL
]]>
12
12
93
93
=? and c.SFRQ <= ? and c.SFZT =1 and b.JSZT =1 group by sfx.HSZFL,a.jjks order by a.jjks,sfx.HSZFL
]]>
12
12
93
93
=? and c.SFRQ <= ? and c.SFZT =1 and b.JSZT =1 group by sfx.BASYFL,a.jjks order by a.jjks,sfx.BASYFL
]]>
12
12
93
93
=? and c.SFRQ <= ? and c.SFZT =1 and b.JSZT =1 group by d.fydl,a.jjks order by a.jjks,d.fydl
]]>
12
12
93
93
=? and c.SFRQ <= ? and b.JSZT =1 and e.gllx='Y' group by a.jjks order by a.jjks
]]>
12
12
93
93
=? and c.SFRQ <= ? and c.SFZT =1 and b.JSZT =1 group by sfx.fyzl,e.YZZXKS order by e.YZZXKS,sfx.fyzl
]]>
12
12
93
93
=? and c.SFRQ <= ? and c.SFZT =1 and b.JSZT =1 group by sfx.KJZFL,e.YZZXKS order by e.YZZXKS,sfx.KJZFL
]]>
12
12
93
93
=? and c.SFRQ <= ? and c.SFZT =1 and b.JSZT =1 group by sfx.HSZFL,e.YZZXKS order by e.YZZXKS,sfx.HSZFL
]]>
12
12
93
93
=? and c.SFRQ <= ? and c.SFZT =1 and b.JSZT =1 group by sfx.BASYFL,e.YZZXKS order by e.YZZXKS,sfx.BASYFL
]]>
12
12
93
93
=? and c.SFRQ <= ? and c.SFZT =1 and b.JSZT =1 group by d.fydl,e.YZZXKS order by e.YZZXKS,d.fydl
]]>
12
12
93
93
select '' 姓名,'' 就诊号,'' 急诊,'' 费用类别,'' 费用,'' 科室,'' 电话,'' 地址 from dual where 1=2
=? and c.SFRQ <= ? and c.PJZT = 1 group by sfx.fyzl,a.jjks,a.JZLX,a.hzpkey,a.pkey,a.jzno
union all
select sum(d.SFXSJZFY) fy,sfx.fyzl fylb,a.jjks,a.JZLX,a.hzpkey,a.pkey,a.jzno from HIS_JZ_BASEINFO a left join HIS_SFZD_ZB b on a.pkey=b.jzpkey and a.JGID=b.JGID left join HIS_MZJS_MZFPZB c on b.pkey=c.GLZDBPKEY and b.JGID=c.JGID left join HIS_SFZD_SFXMXB d on b.pkey=d.ZDZBPKEY and b.JGID=d.JGID left join HIS_SFX sfx on d.sfx=sfx.bm and d.JGID=sfx.JGID where a.JGID=? and (c.PJLX='MG' or c.PJLX='MS') and a.jjks like ? #select# and c.SFRQ >=? and c.SFRQ <= ? and c.CHPKEY is not null and c.SFZT != 0 group by sfx.fyzl,a.jjks,a.JZLX,a.hzpkey,a.pkey,a.jzno
)
group by fylb,jjks,JZLX,hzpkey,pkey,jzno
order by jjks,jzno,pkey,hzpkey,fylb
]]>
12
12
93
93
12
12
93
93
=? and c.SFRQ <= ? and c.PJZT = 1 group by sfx.KJZFL,a.jjks,a.JZLX,a.hzpkey,a.pkey,a.jzno
union all
select sum(d.SFXSJZFY) fy,sfx.KJZFL fylb,a.jjks,a.JZLX,a.hzpkey,a.pkey,a.jzno from HIS_JZ_BASEINFO a left join HIS_SFZD_ZB b on a.pkey=b.jzpkey and a.JGID=b.JGID left join HIS_MZJS_MZFPZB c on b.pkey=c.GLZDBPKEY and b.JGID=c.JGID left join HIS_SFZD_SFXMXB d on b.pkey=d.ZDZBPKEY and b.JGID=d.JGID left join HIS_SFX sfx on d.sfx=sfx.bm and d.JGID=sfx.JGID where a.JGID=? and (c.PJLX='MG' or c.PJLX='MS') and a.jjks like ? #select# and c.SFRQ >=? and c.SFRQ <= ? and c.CHPKEY is not null and c.SFZT != 0 group by sfx.KJZFL,a.jjks,a.JZLX,a.hzpkey,a.pkey,a.jzno
)
group by fylb,jjks,JZLX,hzpkey,pkey,jzno
order by jjks,jzno,pkey,hzpkey,fylb
]]>
12
12
93
93
12
12
93
93
? and c.sfRQ <= ? group by sfx.HSZFL,a.jjks,a.JZLX,a.hzpkey,a.pkey,a.jzno
union all
select sum(d.SFXSJZFY) fy,sfx.HSZFL fylb,a.jjks,a.JZLX,a.hzpkey,a.pkey,a.jzno from HIS_JZ_BASEINFO a left join HIS_SFZD_ZB b on a.pkey=b.jzpkey and a.JGID=b.JGID left join HIS_MZJS_MZFPZB c on b.pkey=c.GLZDBPKEY and b.JGID=c.JGID left join HIS_SFZD_SFXMXB d on b.pkey=d.ZDZBPKEY and b.JGID=d.JGID left join HIS_SFX sfx on d.sfx=sfx.bm and d.JGID=sfx.JGID where a.JGID=? and (c.PJLX='MG' or c.PJLX='MS') and c.CHPKEY is not null and c.SFZT != 0 and a.jjks like ? #select# and c.sfRQ > ? and c.sfRQ <= ? group by sfx.HSZFL,a.jjks,a.JZLX,a.hzpkey,a.pkey,a.jzno
)
group by fylb,jjks,JZLX,hzpkey,pkey,jzno
order by jjks,jzno,pkey,hzpkey,fylb
]]>
12
12
93
93
12
12
93
93
=? and c.SFRQ <= ? and c.PJZT = 1 group by sfx.BASYFL,a.jjks,a.JZLX,a.hzpkey,a.pkey,a.jzno
union all
select sum(d.SFXSJZFY) fy,sfx.BASYFL fylb,a.jjks,a.JZLX,a.hzpkey,a.pkey,a.jzno from HIS_JZ_BASEINFO a left join HIS_SFZD_ZB b on a.pkey=b.jzpkey and a.JGID=b.JGID left join HIS_MZJS_MZFPZB c on b.pkey=c.GLZDBPKEY and b.JGID=c.JGID left join HIS_SFZD_SFXMXB d on b.pkey=d.ZDZBPKEY and b.JGID=d.JGID left join HIS_SFX sfx on d.sfx=sfx.bm and d.JGID=sfx.JGID where a.JGID=? and (c.PJLX='MG' or c.PJLX='MS') and a.jjks like ? #select# and c.SFRQ >=? and c.SFRQ <= ? and c.CHPKEY is not null and c.SFZT != 0 group by sfx.BASYFL,a.jjks,a.JZLX,a.hzpkey,a.pkey,a.jzno
)
group by fylb,jjks,JZLX,hzpkey,pkey,jzno
order by jjks,jzno,pkey,hzpkey,fylb
]]>
12
12
93
93
12
12
93
93
=? and c.SFRQ <= ? and c.SFZT =1 and b.JSZT =1 group by d.fydl,a.jjks,a.JZLX,a.hzpkey,a.pkey,a.jzno order by a.jjks,a.jzno,a.pkey,a.hzpkey,d.fydl
]]>
12
12
93
93
=? and c.SFRQ <= ? and c.SFZT =1 and b.JSZT =1 and e.gllx='Y' group by a.jjks,a.JZLX,a.hzpkey,a.pkey,a.jzno order by a.jjks,a.jzno,a.pkey,a.hzpkey
]]>
12
12
93
93
? and c.SFRQ <= ? and c.PJZT = 1 group by sfx.fyzl,a.jjks
union all
select sum(d.SFXSJZFY) fy,sfx.fyzl fylb,a.jjks from HIS_JZ_BASEINFO a left join HIS_SFZD_ZB b on a.pkey=b.jzpkey and a.JGID=b.JGID left join HIS_MZJS_MZFPZB c on b.pkey=c.GLZDBPKEY and b.JGID=c.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_SFX sfx on d.sfx=sfx.bm and d.JGID=sfx.JGID where a.JGID=? and (c.PJLX='MG' or c.PJLX='MS') and nvl(a.jjks,'%') like ? and c.SFRQ > ? and c.SFRQ <= ? and c.CHPKEY is not null and c.SFZT != 0 group by sfx.fyzl,a.jjks
)
group by fylb,jjks
order by jjks,fylb
]]>
12
12
93
93
12
12
93
93
? and c.SFRQ <= ? and c.PJZT = 1 group by sfx.KJZFL,a.jjks
union all
select sum(d.SFXSJZFY) fy,sfx.KJZFL fylb,a.jjks from HIS_JZ_BASEINFO a left join HIS_SFZD_ZB b on a.pkey=b.jzpkey and a.JGID=b.JGID left join HIS_MZJS_MZFPZB c on b.pkey=c.GLZDBPKEY and b.JGID=c.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_SFX sfx on d.sfx=sfx.bm and d.JGID=sfx.JGID where a.JGID=? and (c.PJLX='MG' or c.PJLX='MS') and nvl(a.jjks,'%') like ? and c.SFRQ > ? and c.SFRQ <= ? and c.CHPKEY is not null and c.SFZT != 0 group by sfx.KJZFL,a.jjks
)
group by fylb,jjks
order by jjks,fylb
]]>
12
12
93
93
12
12
93
93
? and c.SFRQ <= ? and c.PJZT = 1 group by sfx.HSZFL,a.jjks
union all
select sum(d.SFXSJZFY) fy,sfx.HSZFL fylb,a.jjks from HIS_JZ_BASEINFO a left join HIS_SFZD_ZB b on a.pkey=b.jzpkey and a.JGID=b.JGID left join HIS_MZJS_MZFPZB c on b.pkey=c.GLZDBPKEY and b.JGID=c.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_SFX sfx on d.sfx=sfx.bm and d.JGID=sfx.JGID where a.JGID=? and (c.PJLX='MG' or c.PJLX='MS') and nvl(a.jjks,'%') like ? and c.SFRQ > ? and c.SFRQ <= ? and c.CHPKEY is not null and c.SFZT != 0 group by sfx.HSZFL,a.jjks
)
group by fylb,jjks
order by jjks,fylb
]]>
12
12
93
93
12
12
93
93
? and c.SFRQ <= ? and c.PJZT = 1 group by sfx.BASYFL,a.jjks
union all
select sum(d.SFXSJZFY) fy,sfx.BASYFL fylb,a.jjks from HIS_JZ_BASEINFO a left join HIS_SFZD_ZB b on a.pkey=b.jzpkey and a.JGID=b.JGID left join HIS_MZJS_MZFPZB c on b.pkey=c.GLZDBPKEY and b.JGID=c.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_SFX sfx on d.sfx=sfx.bm and d.JGID=sfx.JGID where a.JGID=? and (c.PJLX='MG' or c.PJLX='MS') and nvl(a.jjks,'%') like ? and c.SFRQ > ? and c.SFRQ <= ? and c.CHPKEY is not null and c.SFZT != 0 group by sfx.BASYFL,a.jjks
)
group by fylb,jjks
order by jjks,fylb
]]>
12
12
93
93
12
12
93
93
? and c.sfrq <=? ) group by jjks order by jjks
]]>
12
12
12
93
93
=? and a.sfrq <=?
group by sfx.fyzl,e.jjks order by e.jjks,sfx.fyzl
]]>
12
12
93
93
=? and a.sfrq <=?
group by sfx.KJZFL,e.jjks order by e.jjks,sfx.KJZFL
]]>
12
12
93
93
=? and a.sfrq <=?
group by sfx.HSZFL,e.jjks order by e.jjks,sfx.HSZFL
]]>
12
12
93
93
=? and a.sfrq <=?
group by sfx.BASYFL,e.jjks order by e.jjks,sfx.BASYFL
]]>
12
12
93
93
=? and a.sfrq <=?
group by e.jjks order by e.jjks
]]>
12
12
93
93
? and c.SFRQ <= ? and c.pjzt=1 group by jgzdb.value4,a.jjks,a.jjys order by a.jjks,a.jjys,jgzdb.value4
]]>
12
12
93
93
? and c.SFRQ <= ? and c.CHPKEY is not null and c.SFZT != 0 group by jgzdb.value4,a.jjks,a.jjys order by a.jjks,a.jjys,jgzdb.value4
]]>
12
12
93
93
? and c.SFRQ <= ? and c.pjzt=1 ) group by jjks,jjys order by jjks,jjys
]]>
12
12
93
93
=? and c.SFRQ <= ?
and c.SFZT != 0
--and c.SFZT =1 and b.JSZT =1
--and dj.djcxzt='0' and js.CXZT='0' and dj.MDTRT_ID is not null
group by sfx.fyzl,e.YZZXKS
order by e.YZZXKS,sfx.fyzl
]]>
12
12
93
93
=? and c.SFRQ <= ?
and c.SFZT != 0
--and c.SFZT =1 and b.JSZT =1
--and dj.djcxzt='0' and js.CXZT='0' and dj.MDTRT_ID is not null
group by sfx.KJZFL,e.YZZXKS
order by e.YZZXKS,sfx.KJZFL
]]>
12
12
93
93
=? and c.SFRQ <= ?
and c.SFZT != 0
--and c.SFZT =1 and b.JSZT =1
--and dj.djcxzt='0' and js.CXZT='0' and dj.MDTRT_ID is not null
group by sfx.HSZFL,e.YZZXKS
order by e.YZZXKS,sfx.HSZFL
]]>
12
12
93
93
=? and c.SFRQ <= ?
and c.SFZT != 0
--and c.SFZT =1 and b.JSZT =1
--and dj.djcxzt='0' and js.CXZT='0' and dj.MDTRT_ID is not null
group by sfx.BASYFL,e.YZZXKS
order by e.YZZXKS,sfx.BASYFL
]]>
12
12
93
93