You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
klintersrv/WEB-INF/conf/sysds_jimureport_normal_mzs...

1199 lines
58 KiB

3 months ago
<?xml version="1.0" encoding="UTF-8"?>
<datasource>
<!-- 1 表示 sql语句dao 2表示存储过程dao 默认为sql语句dao-->
<dao id="normalMzsrMzrjfyShowDao" log="true" type="1" memo="查询门诊收入-门诊人均费用查询显示Dao">
<sql>
select '' 科室,'' 科室人次,'' 费用类别,'' 费用,'' 人均费用 from dual where 1=2
</sql>
<fields>
<f name="科室" type="1" />
<f name="科室人次" type="1" />
<f name="费用类别" type="1" />
<f name="费用" type="1" />
<f name="人均费用" type="1" />
<!-- <f name="小计" type="1" />-->
</fields>
</dao>
<dao id="normalMzsrMzrjfyByFyzlDao" log="true" type="1" memo="查询门诊收入-费用子类门诊人均费用查询,计算结算状态单据">
<sql><![CDATA[
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_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 ? and c.SFRQ >=? and c.SFRQ <= ? and c.SFZT =1 and b.JSZT =1 group by sfx.fyzl,a.jjks order by a.jjks,sfx.fyzl
]]></sql>
<fields>
<f name="fy" type="4" />
<f name="fylb" type="12" />
<f name="jjks" type="12" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="normalMzsrMzrjfyByKjzlDao" log="true" type="1" memo="查询门诊收入-会计子类门诊人均费用查询,计算结算状态单据">
<sql><![CDATA[
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_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 ? and c.SFRQ >=? and c.SFRQ <= ? and c.SFZT =1 and b.JSZT =1 group by sfx.KJZFL,a.jjks order by a.jjks,sfx.KJZFL
]]></sql>
<fields>
<f name="fy" type="4" />
<f name="fylb" type="12" />
<f name="jjks" type="12" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="normalMzsrMzrjfyByHszlDao" log="true" type="1" memo="查询门诊收入-核算子类门诊人均费用查询,计算结算状态单据">
<sql><![CDATA[
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_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 ? and c.SFRQ >=? and c.SFRQ <= ? and c.SFZT =1 and b.JSZT =1 group by sfx.HSZFL,a.jjks order by a.jjks,sfx.HSZFL
]]></sql>
<fields>
<f name="fy" type="4" />
<f name="fylb" type="12" />
<f name="jjks" type="12" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="normalMzsrMzrjfyByBaszlDao" log="true" type="1" memo="查询门诊收入-病案首页子类门诊人均费用查询,计算结算状态单据">
<sql><![CDATA[
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_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 ? and c.SFRQ >=? and c.SFRQ <= ? and c.SFZT =1 and b.JSZT =1 group by sfx.BASYFL,a.jjks order by a.jjks,sfx.BASYFL
]]></sql>
<fields>
<f name="fy" type="4" />
<f name="fylb" type="12" />
<f name="jjks" type="12" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="normalMzsrMzrjfyByFydlDao" log="true" type="1" memo="查询门诊收入-费用大类门诊人均费用查询">
<sql><![CDATA[
select sum(d.SFXSJZFY) fy,d.fydl 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 where a.JGID=? and (c.PJLX='MG' or c.PJLX='MS') and a.jjks like ? and c.SFRQ >=? and c.SFRQ <= ? and c.SFZT =1 and b.JSZT =1 group by d.fydl,a.jjks order by a.jjks,d.fydl
]]></sql>
<fields>
<f name="fy" type="4" />
<f name="fylb" type="12" />
<f name="jjks" type="12" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="normalMysrMzrcDao" log="true" type="1" memo="查询门诊收入-门诊人次dao">
<sql><![CDATA[
select count(*) rc,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 where a.JGID=? and (a.JZLX='M' or a.JZLX='J' ) and a.jjks like ? and c.SFZT = 1 and c.SFRQ >=? and c.SFRQ <= ? group by a.jjks order by a.jjks
]]></sql>
<fields>
<f name="rc" type="4" />
<f name="jjks" type="12" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="normalMzysfyyzbShowDao" log="true" type="1" memo="查询门诊收入-门诊医生费用药占比显示Dao">
<sql>
select '' 科室,'' 医生,'' 费用类别,'' 费用 from dual where 1=2
</sql>
<fields>
<f name="科室" type="1" />
<f name="医生" type="1" />
<f name="费用类别" type="1" />
<f name="费用" type="1" />
</fields>
</dao>
<dao id="normalMzysfyyzbByFyzlDao" log="true" type="1" memo="查询门诊收入-门诊医生费用药占比-费用子类,查询时间按发票结算时间为准">
<sql><![CDATA[
select sum(d.SFXSJZFY) fy,sfx.fyzl fylb,a.jjks,a.jjys 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 ? and c.SFRQ >=? 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
]]></sql>
<fields>
<f name="fy" type="4" />
<f name="fylb" type="12" />
<f name="jjks" type="12" />
<f name="jjys" type="12" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="normalMzysfyyzbByKjzlDao" log="true" type="1" memo="查询门诊收入-门诊医生费用药占比-会计子类,查询时间按发票结算时间为准">
<sql><![CDATA[
select sum(d.SFXSJZFY) fy,sfx.KJZFL fylb,a.jjks,a.jjys 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 ? and c.SFRQ >=? 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
]]></sql>
<fields>
<f name="fy" type="4" />
<f name="fylb" type="12" />
<f name="jjks" type="12" />
<f name="jjys" type="12" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="normalMzysfyyzbByHszlDao" log="true" type="1" memo="查询门诊收入-门诊医生费用药占比-核算子类,查询时间按发票结算时间为准">
<sql><![CDATA[
select sum(d.SFXSJZFY) fy,sfx.HSZFL fylb,a.jjks,a.jjys 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 ? and c.SFRQ >=? 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
]]></sql>
<fields>
<f name="fy" type="4" />
<f name="fylb" type="12" />
<f name="jjks" type="12" />
<f name="jjys" type="12" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="normalMzysfyyzbByBasyzlDao" log="true" type="1" memo="查询门诊收入-门诊医生费用药占比-病案首页子类,查询时间按发票结算时间为准">
<sql><![CDATA[
select sum(d.SFXSJZFY) fy,sfx.BASYFL fylb,a.jjks,a.jjys 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 ? and c.SFRQ >=? 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
]]></sql>
<fields>
<f name="fy" type="4" />
<f name="fylb" type="12" />
<f name="jjks" type="12" />
<f name="jjys" type="12" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="normalMzysfyyzbByFydlDao" log="true" type="1" memo="查询门诊收入-门诊医生费用药占比-费用大类,查询时间按发票结算时间为准">
<sql><![CDATA[
select sum(d.SFXSJZFY) fy,d.fydl fylb,a.jjks,a.jjys 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 where a.JGID=? and (c.PJLX='MG' or c.PJLX='MS') and a.jjks like ? and c.SFRQ >=? 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
]]></sql>
<fields>
<f name="fy" type="4" />
<f name="fylb" type="12" />
<f name="jjks" type="12" />
<f name="jjys" type="12" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="normalMzysfyyzbByYpDao" log="true" type="1" memo="查询门诊收入-门诊医生费用药占比-药品费用,查询时间按发票结算时间为准">
<sql><![CDATA[
select sum(d.SFXSJZFY) ypfy,a.jjks,a.jjys 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 e on d.SFX=e.bm and d.JGID=e.JGID where a.JGID=? and (c.PJLX='MG' or c.PJLX='MS') and c.SFZT =1 and a.jjks like ? and c.SFRQ >=? and c.SFRQ <= ? and b.JSZT =1 and e.gllx='Y' group by a.jjks,a.jjys order by a.jjks,a.jjys
]]></sql>
<fields>
<f name="ypfy" type="4" />
<f name="jjks" type="12" />
<f name="jjys" type="12" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="normalMzksfyYzbShowDao" log="true" type="1" memo="查询门诊收入-门诊科室费用药占比显示Dao">
<sql>
select '' 科室,'' 人次,'' 费用类别,'' 费用 from dual where 1=2
</sql>
<fields>
<f name="科室" type="1" />
<f name="人次" type="1" />
<f name="费用类别" type="1" />
<f name="费用" type="1" />
</fields>
</dao>
<dao id="normalMzksfyYzbByFyzlDao" log="true" type="1" memo="查询住院收入-门诊科室费用药占比-费用子类,查询时间按发票结算时间为准">
<sql><![CDATA[
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_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 ? and c.SFRQ >=? and c.SFRQ <= ? and c.SFZT =1 and b.JSZT =1 group by sfx.fyzl,a.jjks order by a.jjks,sfx.fyzl
]]></sql>
<fields>
<f name="fy" type="4" />
<f name="fylb" type="12" />
<f name="jjks" type="12" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="normalMzksfyYzbByKjzlDao" log="true" type="1" memo="查询住院收入-门诊科室费用药占比-会计子类,查询时间按发票结算时间为准">
<sql><![CDATA[
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_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 ? and c.SFRQ >=? and c.SFRQ <= ? and c.SFZT =1 and b.JSZT =1 group by sfx.KJZFL,a.jjks order by a.jjks,sfx.KJZFL
]]></sql>
<fields>
<f name="fy" type="4" />
<f name="fylb" type="12" />
<f name="jjks" type="12" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="normalMzksfyYzbByHszlDao" log="true" type="1" memo="查询住院收入-门诊科室费用药占比-核算子类,查询时间按发票结算时间为准">
<sql><![CDATA[
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_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 ? and c.SFRQ >=? and c.SFRQ <= ? and c.SFZT =1 and b.JSZT =1 group by sfx.HSZFL,a.jjks order by a.jjks,sfx.HSZFL
]]></sql>
<fields>
<f name="fy" type="4" />
<f name="fylb" type="12" />
<f name="jjks" type="12" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="normalMzksfyYzbByBasyzlDao" log="true" type="1" memo="查询住院收入-门诊科室费用药占比-病案首页子类,查询时间按发票结算时间为准">
<sql><![CDATA[
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_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 ? and c.SFRQ >=? and c.SFRQ <= ? and c.SFZT =1 and b.JSZT =1 group by sfx.BASYFL,a.jjks order by a.jjks,sfx.BASYFL
]]></sql>
<fields>
<f name="fy" type="4" />
<f name="fylb" type="12" />
<f name="jjks" type="12" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="normalMzksfyYzbByFydlDao" log="true" type="1" memo="查询住院收入-门诊科室费用药占比-费用大类,查询时间按发票结算时间为准">
<sql><![CDATA[
select sum(d.SFXSJZFY) fy,d.fydl 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 where a.JGID=? and (c.PJLX='MG' or c.PJLX='MS') and a.jjks like ? and c.SFRQ >=? and c.SFRQ <= ? and c.SFZT =1 and b.JSZT =1 group by d.fydl,a.jjks order by a.jjks,d.fydl
]]></sql>
<fields>
<f name="fy" type="4" />
<f name="fylb" type="12" />
<f name="jjks" type="12" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="normalMzksfyyzbByYpDao" log="true" type="1" memo="查询门诊收入-门诊科室费用药占比-药品费用,查询时间按发票结算时间为准">
<sql><![CDATA[
select sum(d.SFXSJZFY) ypfy,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_SFX e on d.SFX=e.bm and d.JGID=e.JGID where a.JGID=? and (c.PJLX='MG' or c.PJLX='MS') and c.SFZT =1 and a.jjks like ? and c.SFRQ >=? and c.SFRQ <= ? and b.JSZT =1 and e.gllx='Y' group by a.jjks order by a.jjks
]]></sql>
<fields>
<f name="ypfy" type="4" />
<f name="jjks" type="12" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="normalMzzxksfyByFyzlDao" log="true" type="1" memo="费用子类查询门诊收入-门诊病人医嘱执行科室费用">
<sql><![CDATA[
select sum(d.SFXSJZFY) fy,sfx.fyzl fylb,e.YZZXKS 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(e.YZZXKS,'%') like ? and c.SFRQ >=? and c.SFRQ <= ? and c.SFZT =1 and b.JSZT =1 group by sfx.fyzl,e.YZZXKS order by e.YZZXKS,sfx.fyzl
]]></sql>
<fields>
<f name="fy" type="4" />
<f name="fylb" type="12" />
<f name="jjks" type="12" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="normalMzzxksfyByKjzlDao" log="true" type="1" memo="会计子类查询门诊收入-门诊病人医嘱执行科室费用">
<sql><![CDATA[
select sum(d.SFXSJZFY) fy,sfx.KJZFL fylb,e.YZZXKS 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(e.YZZXKS,'%') like ? and c.SFRQ >=? and c.SFRQ <= ? and c.SFZT =1 and b.JSZT =1 group by sfx.KJZFL,e.YZZXKS order by e.YZZXKS,sfx.KJZFL
]]></sql>
<fields>
<f name="fy" type="4" />
<f name="fylb" type="12" />
<f name="jjks" type="12" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="normalMzzxksfyByHszlDao" log="true" type="1" memo="核算子类查询门诊收入-门诊病人医嘱执行科室费用">
<sql><![CDATA[
select sum(d.SFXSJZFY) fy,sfx.HSZFL fylb,e.YZZXKS 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(e.YZZXKS,'%') like ? and c.SFRQ >=? and c.SFRQ <= ? and c.SFZT =1 and b.JSZT =1 group by sfx.HSZFL,e.YZZXKS order by e.YZZXKS,sfx.HSZFL
]]></sql>
<fields>
<f name="fy" type="4" />
<f name="fylb" type="12" />
<f name="jjks" type="12" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="normalMzzxksfyByBasyzlDao" log="true" type="1" memo="病案首页子类查询门诊收入-门诊病人医嘱执行科室费用">
<sql><![CDATA[
select sum(d.SFXSJZFY) fy,sfx.BASYFL fylb,e.YZZXKS 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(e.YZZXKS,'%') like ? and c.SFRQ >=? and c.SFRQ <= ? and c.SFZT =1 and b.JSZT =1 group by sfx.BASYFL,e.YZZXKS order by e.YZZXKS,sfx.BASYFL
]]></sql>
<fields>
<f name="fy" type="4" />
<f name="fylb" type="12" />
<f name="jjks" type="12" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="normalMzzxksfyByFydlDao" log="true" type="1" memo="费用大类查询门诊收入-门诊病人医嘱执行科室费用">
<sql><![CDATA[
select sum(d.SFXSJZFY) fy,d.fydl fylb,e.YZZXKS 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 where a.JGID=? and (c.PJLX='MG' or c.PJLX='MS') and nvl(e.YZZXKS,'%') like ? and c.SFRQ >=? and c.SFRQ <= ? and c.SFZT =1 and b.JSZT =1 group by d.fydl,e.YZZXKS order by e.YZZXKS,d.fydl
]]></sql>
<fields>
<f name="fy" type="4" />
<f name="fylb" type="12" />
<f name="jjks" type="12" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="normalMzHzMxShowDao" log="true" type="1" memo="查询门诊收入-门急诊患者列表显示Dao">
<sql>
select '' 姓名,'' 就诊号,'' 急诊,'' 费用类别,'' 费用,'' 科室,'' 电话,'' 地址 from dual where 1=2
</sql>
<fields>
<f name="姓名" type="1" />
<f name="就诊号" type="1" />
<f name="急诊" type="1" />
<f name="费用类别" type="1" />
<f name="费用" type="1" />
<f name="科室" type="1" />
<f name="电话" type="1" />
<f name="地址" type="1" />
</fields>
</dao>
<dao id="normalMzHzMxByFyzlDao" log="true" type="1" memo="查询门诊收入-门急诊患者列表-费用子类,查询时间按患者就诊时间为准">
<sql><![CDATA[
select sum(fy) fy,fylb,jjks,JZLX,hzpkey,pkey,jzno from (
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.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
]]></sql>
<fields>
<f name="FY" type="4" />
<f name="FYLB" type="12" />
<f name="JJKS" type="12" />
<f name="JZLX" type="12" />
<f name="HZPKEY" type="12" />
<f name="PKEY" type="12" />
<f name="JZNO" type="12" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>93</p>
<p>93</p>
<p>12</p>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="normalMzHzMxByKjzlDao" log="true" type="1" memo="查询门诊收入-门急诊患者列表-会计子类,查询时间按患者就诊时间为准">
<sql><![CDATA[
select sum(fy) fy,fylb,jjks,JZLX,hzpkey,pkey,jzno from (
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.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
]]></sql>
<fields>
<f name="FY" type="4" />
<f name="FYLB" type="12" />
<f name="JJKS" type="12" />
<f name="JZLX" type="12" />
<f name="HZPKEY" type="12" />
<f name="PKEY" type="12" />
<f name="JZNO" type="12" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>93</p>
<p>93</p>
<p>12</p>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="normalMzHzMxByHszlDao" log="true" type="1" memo="查询门诊收入-门急诊患者列表-核算子类,查询时间按患者就诊时间为准">
<sql><![CDATA[
select sum(fy) fy,fylb,jjks,JZLX,hzpkey,pkey,jzno from (
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.PJZT = 1 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
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
]]></sql>
<fields>
<f name="FY" type="4" />
<f name="FYLB" type="12" />
<f name="JJKS" type="12" />
<f name="JZLX" type="12" />
<f name="HZPKEY" type="12" />
<f name="PKEY" type="12" />
<f name="JZNO" type="12" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>93</p>
<p>93</p>
<p>12</p>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="normalMzHzMxByBasyzlDao" log="true" type="1" memo="查询门诊收入-门急诊患者列表-病案首页子类,查询时间按患者就诊时间为准">
<sql><![CDATA[
select sum(fy) fy,fylb,jjks,JZLX,hzpkey,pkey,jzno from (
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.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
]]></sql>
<fields>
<f name="FY" type="4" />
<f name="FYLB" type="12" />
<f name="JJKS" type="12" />
<f name="JZLX" type="12" />
<f name="HZPKEY" type="12" />
<f name="PKEY" type="12" />
<f name="JZNO" type="12" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>93</p>
<p>93</p>
<p>12</p>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="normalMzHzMxByFydlDao" log="true" type="1" memo="查询门诊收入-门急诊患者列表-费用大类,查询时间按患者就诊时间为准">
<sql><![CDATA[
select sum(d.SFXSJZFY) fy,d.fydl 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 where a.JGID=? and (c.PJLX='MG' or c.PJLX='MS') and a.jjks like ? #select# and c.SFRQ >=? 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
]]></sql>
<fields>
<f name="FY" type="4" />
<f name="FYLB" type="12" />
<f name="JJKS" type="12" />
<f name="JZLX" type="12" />
<f name="HZPKEY" type="12" />
<f name="PKEY" type="12" />
<f name="JZNO" type="12" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="normalMzHzMxByYpDao" log="true" type="1" memo="查询门诊收入-门急诊患者列表-药品费用,查询时间按患者就诊时间为准">
<sql><![CDATA[
select sum(d.SFXSJZFY) ypfy,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 e on d.SFX=e.bm and d.JGID=e.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.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
]]></sql>
<fields>
<f name="ypfy" type="4" />
<f name="JJKS" type="12" />
<f name="JZLX" type="12" />
<f name="HZPKEY" type="12" />
<f name="PKEY" type="12" />
<f name="JZNO" type="12" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="normalMzksfyByFyzlDao" log="true" type="1" memo="费用子类查询门诊收入-门诊病人科室费用">
<sql><![CDATA[
select sum(fy) fy,fylb,jjks from (
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.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
]]></sql>
<fields>
<f name="fy" type="4" />
<f name="fylb" type="12" />
<f name="jjks" type="12" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>93</p>
<p>93</p>
<p>12</p>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="normalMzksfyByKjzlDao" log="true" type="1" memo="会计子类查询门诊收入-门诊病人科室费用">
<sql><![CDATA[
select sum(fy) fy,fylb,jjks from (
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.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
]]></sql>
<fields>
<f name="fy" type="4" />
<f name="fylb" type="12" />
<f name="jjks" type="12" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>93</p>
<p>93</p>
<p>12</p>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="normalMzksfyByHszlDao" log="true" type="1" memo="核算子类查询门诊收入-门诊病人科室费用">
<sql><![CDATA[
select sum(fy) fy,fylb,jjks from (
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.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
]]></sql>
<fields>
<f name="fy" type="4" />
<f name="fylb" type="12" />
<f name="jjks" type="12" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>93</p>
<p>93</p>
<p>12</p>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="normalMzksfyByBasyzlDao" log="true" type="1" memo="病案首页子类查询门诊收入-门诊病人科室费用">
<sql><![CDATA[
select sum(fy) fy,fylb,jjks from (
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.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
]]></sql>
<fields>
<f name="fy" type="4" />
<f name="fylb" type="12" />
<f name="jjks" type="12" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>93</p>
<p>93</p>
<p>12</p>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="normalMzksrcDao" log="true" type="1" memo="结算人次-已结算门诊病人">
<sql><![CDATA[
select count(*) rc,jjks from (select distinct a.pkey,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 where a.JGID=? and nvl(a.jjks,'%') like ? and a.jzlx='M' and c.PJZT=? and c.sfrq > ? and c.sfrq <=? ) group by jjks order by jjks
]]></sql>
<fields>
<f name="rc" type="4" />
<f name="jjks" type="12" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="normalMzksYjsfyByFyzlDao" log="true" type="1" memo="费用子类查询门诊收入-已结算门诊病人科室费用">
<sql><![CDATA[
select sum(DET_ITEM_FEE_SUMAMT) fy,sfx.fyzl fylb,e.jjks
from HIS_MZJS_MZFPZB a
left join HIS_SFZD_ZB b on a.GLZDBPKEY=b.pkey and a.JGID=b.JGID
left join HIS_YB_DJ c on b.pkey=c.ZDZBPKEY and b.JGID=c.JGID
left join HIS_YB_JSB j on c.JGID=j.JGID and c.IPT_NO=j.IPT_NO and c.MDTRT_ID=j.MDTRT_ID
left join HIS_YB_SCMX d on d.MDTRT_ID=j.MDTRT_ID and d.JGID=j.JGID and d.SETL_ID=j.SETL_ID
left join HIS_JZ_BASEINFO e on b.jzpkey=e.pkey and b.JGID=e.JGID
left join HIS_SFX sfx on d.MEDINS_LIST_CODG=sfx.bm and d.JGID=sfx.JGID
where a.JGID=? and nvl(e.jjks,'%') like ? and e.jzlx='M' and a.PJLX='MS' and a.SFZT !='0' and c.djcxzt='0' and j.CXZT='0' and c.MDTRT_ID is not null and a.sfrq >=? and a.sfrq <=?
group by sfx.fyzl,e.jjks order by e.jjks,sfx.fyzl
]]></sql>
<fields>
<f name="fy" type="4" />
<f name="fylb" type="12" />
<f name="jjks" type="12" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="normalMzksYjsfyByKjzlDao" log="true" type="1" memo="会计子类查询门诊收入-已结算门诊病人科室费用">
<sql><![CDATA[
select sum(DET_ITEM_FEE_SUMAMT) fy,sfx.KJZFL fylb,e.jjks
from HIS_MZJS_MZFPZB a
left join HIS_SFZD_ZB b on a.GLZDBPKEY=b.pkey and a.JGID=b.JGID
left join HIS_YB_DJ c on b.pkey=c.ZDZBPKEY and b.JGID=c.JGID
left join HIS_YB_JSB j on c.JGID=j.JGID and c.IPT_NO=j.IPT_NO and c.MDTRT_ID=j.MDTRT_ID
left join HIS_YB_SCMX d on d.MDTRT_ID=j.MDTRT_ID and d.JGID=j.JGID and d.SETL_ID=j.SETL_ID
left join HIS_JZ_BASEINFO e on b.jzpkey=e.pkey and b.JGID=e.JGID
left join HIS_SFX sfx on d.MEDINS_LIST_CODG=sfx.bm and d.JGID=sfx.JGID
where a.JGID=? and nvl(e.jjks,'%') like ? and e.jzlx='M' and a.PJLX='MS' and a.SFZT !='0' and c.djcxzt='0' and j.CXZT='0' and c.MDTRT_ID is not null and a.sfrq >=? and a.sfrq <=?
group by sfx.KJZFL,e.jjks order by e.jjks,sfx.KJZFL
]]></sql>
<fields>
<f name="fy" type="4" />
<f name="fylb" type="12" />
<f name="jjks" type="12" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="normalMzksYjsfyByHszlDao" log="true" type="1" memo="核算子类查询门诊收入-已结算门诊病人科室费用">
<sql><![CDATA[
select sum(DET_ITEM_FEE_SUMAMT) fy,sfx.HSZFL fylb,e.jjks
from HIS_MZJS_MZFPZB a
left join HIS_SFZD_ZB b on a.GLZDBPKEY=b.pkey and a.JGID=b.JGID
left join HIS_YB_DJ c on b.pkey=c.ZDZBPKEY and b.JGID=c.JGID
left join HIS_YB_JSB j on c.JGID=j.JGID and c.IPT_NO=j.IPT_NO and c.MDTRT_ID=j.MDTRT_ID
left join HIS_YB_SCMX d on d.MDTRT_ID=j.MDTRT_ID and d.JGID=j.JGID and d.SETL_ID=j.SETL_ID
left join HIS_JZ_BASEINFO e on b.jzpkey=e.pkey and b.JGID=e.JGID
left join HIS_SFX sfx on d.MEDINS_LIST_CODG=sfx.bm and d.JGID=sfx.JGID
where a.JGID=? and nvl(e.jjks,'%') like ? and e.jzlx='M' and a.PJLX='MS' and a.SFZT !='0' and c.djcxzt='0' and j.CXZT='0' and c.MDTRT_ID is not null and a.sfrq >=? and a.sfrq <=?
group by sfx.HSZFL,e.jjks order by e.jjks,sfx.HSZFL
]]></sql>
<fields>
<f name="fy" type="4" />
<f name="fylb" type="12" />
<f name="jjks" type="12" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="normalMzksYjsfyByBasyzlDao" log="true" type="1" memo="病案首页子类查询门诊收入-已结算门诊病人科室费用">
<sql><![CDATA[
select sum(DET_ITEM_FEE_SUMAMT) fy,sfx.BASYFL fylb,e.jjks
from HIS_MZJS_MZFPZB a
left join HIS_SFZD_ZB b on a.GLZDBPKEY=b.pkey and a.JGID=b.JGID
left join HIS_YB_DJ c on b.pkey=c.ZDZBPKEY and b.JGID=c.JGID
left join HIS_YB_JSB j on c.JGID=j.JGID and c.IPT_NO=j.IPT_NO and c.MDTRT_ID=j.MDTRT_ID
left join HIS_YB_SCMX d on d.MDTRT_ID=j.MDTRT_ID and d.JGID=j.JGID and d.SETL_ID=j.SETL_ID
left join HIS_JZ_BASEINFO e on b.jzpkey=e.pkey and b.JGID=e.JGID
left join HIS_SFX sfx on d.MEDINS_LIST_CODG=sfx.bm and d.JGID=sfx.JGID
where a.JGID=? and nvl(e.jjks,'%') like ? and e.jzlx='M' and a.PJLX='MS' and a.SFZT !='0' and c.djcxzt='0' and j.CXZT='0' and c.MDTRT_ID is not null and a.sfrq >=? and a.sfrq <=?
group by sfx.BASYFL,e.jjks order by e.jjks,sfx.BASYFL
]]></sql>
<fields>
<f name="fy" type="4" />
<f name="fylb" type="12" />
<f name="jjks" type="12" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="normalAllZysrYjsMzbrksRsDao" log="true" type="1" memo="结算人次-已结算门诊病人">
<sql><![CDATA[
select count(*) rc,e.jjks
from HIS_MZJS_MZFPZB a
left join HIS_SFZD_ZB b on a.GLZDBPKEY=b.pkey and a.JGID=b.JGID
left join HIS_YB_DJ c on b.pkey=c.ZDZBPKEY and b.JGID=c.JGID
left join HIS_YB_JSB j on c.JGID=j.JGID and c.IPT_NO=j.IPT_NO and c.MDTRT_ID=j.MDTRT_ID
left join HIS_JZ_BASEINFO e on b.jzpkey=e.pkey and b.JGID=e.JGID
where a.JGID=? and nvl(e.jjks,'%') like ? and e.jzlx='M' and a.PJLX='MS' and a.SFZT !='0' and c.djcxzt='0' and j.CXZT='0' and a.sfrq >=? and a.sfrq <=?
group by e.jjks order by e.jjks
]]></sql>
<fields>
<f name="rc" type="4" />
<f name="jjks" type="12" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="ksgzltjMzDao" log="true" type="1" memo="科室工作量收入-门诊">
<sql><![CDATA[
select sum(d.SFXSJZFY) fy,a.jjks,a.jjys,jgzdb.value4 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 left join MAIN_JGZDB jgzdb on sfx.fyzl=jgzdb.bh and sfx.JGID=jgzdb.JGID and jgzdb.JGZDLB_BH='Z00004' where a.JGID=? and (c.PJLX='MG' or c.PJLX='MS') and nvl(a.jjks,'%') like ? and c.SFRQ > ? and c.SFRQ <= ? and c.pjzt=1 group by jgzdb.value4,a.jjks,a.jjys order by a.jjks,a.jjys,jgzdb.value4
]]></sql>
<fields>
<f name="FY" type="4" />
<f name="JJKS" type="12" />
<f name="JJYS" type="12" />
<f name="VALUE4" type="12" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="ksgzltjMzHcDao" log="true" type="1" memo="科室工作量红冲收入-门诊">
<sql><![CDATA[
select sum(d.SFXSJZFY) fy,a.jjks,a.jjys,jgzdb.value4 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 left join MAIN_JGZDB jgzdb on sfx.fyzl=jgzdb.bh and sfx.JGID=jgzdb.JGID and jgzdb.JGZDLB_BH='Z00004' 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 jgzdb.value4,a.jjks,a.jjys order by a.jjks,a.jjys,jgzdb.value4
]]></sql>
<fields>
<f name="FY" type="4" />
<f name="JJKS" type="12" />
<f name="JJYS" type="12" />
<f name="VALUE4" type="12" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="ksgzltjnumMzDao" log="true" type="1" memo="科室工作量人次-门诊">
<sql><![CDATA[
select count(*) num,jjks,jjys from (select distinct a.jjks,a.jjys,a.pkey 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 where a.JGID=? and (c.PJLX='MG' or c.PJLX='MS') and nvl(a.jjks,'%') like ? and c.SFRQ > ? and c.SFRQ <= ? and c.pjzt=1 ) group by jjks,jjys order by jjks,jjys
]]></sql>
<fields>
<f name="NUM" type="4" />
<f name="JJKS" type="12" />
<f name="jjys" type="12" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="normalMzzxksYjsfyByFyzlDao" log="true" type="1" memo="费用子类查询门诊收入-已结算门诊病人医嘱执行科室费用">
<sql><![CDATA[
select sum(d.SFXSJZFY) fy,sfx.fyzl fylb,e.YZZXKS 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
--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'
3 months ago
where a.JGID=?
and (c.PJLX='MG' or c.PJLX='MS')
and nvl(e.YZZXKS,'%') like ?
and c.SFRQ >=? and c.SFRQ <= ?
and c.SFZT =1 and b.JSZT =1
--and dj.djcxzt='0' and js.CXZT='0' and dj.MDTRT_ID is not null
3 months ago
group by sfx.fyzl,e.YZZXKS
order by e.YZZXKS,sfx.fyzl
]]></sql>
<fields>
<f name="fy" type="4" />
<f name="fylb" type="12" />
<f name="jjks" type="12" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="normalMzzxksYjsfyByKjzlDao" log="true" type="1" memo="会计子类查询门诊收入-已结算门诊病人医嘱执行科室费用">
<sql><![CDATA[
select sum(d.SFXSJZFY) fy,sfx.KJZFL fylb,e.YZZXKS 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
--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'
3 months ago
where a.JGID=?
and (c.PJLX='MG' or c.PJLX='MS')
and nvl(e.YZZXKS,'%') like ?
and c.SFRQ >=? and c.SFRQ <= ?
and c.SFZT =1 and b.JSZT =1
--and dj.djcxzt='0' and js.CXZT='0' and dj.MDTRT_ID is not null
3 months ago
group by sfx.KJZFL,e.YZZXKS
order by e.YZZXKS,sfx.KJZFL
]]></sql>
<fields>
<f name="fy" type="4" />
<f name="fylb" type="12" />
<f name="jjks" type="12" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="normalMzzxksYjsfyByHszlDao" log="true" type="1" memo="核算子类查询门诊收入-已结算门诊病人医嘱执行科室费用">
<sql><![CDATA[
select sum(d.SFXSJZFY) fy,sfx.HSZFL fylb,e.YZZXKS 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
--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'
3 months ago
where a.JGID=?
and (c.PJLX='MG' or c.PJLX='MS')
and nvl(e.YZZXKS,'%') like ?
and c.SFRQ >=? and c.SFRQ <= ?
and c.SFZT =1 and b.JSZT =1
--and dj.djcxzt='0' and js.CXZT='0' and dj.MDTRT_ID is not null
3 months ago
group by sfx.HSZFL,e.YZZXKS
order by e.YZZXKS,sfx.HSZFL
]]></sql>
<fields>
<f name="fy" type="4" />
<f name="fylb" type="12" />
<f name="jjks" type="12" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="normalMzzxksYjsfyByBasyzlDao" log="true" type="1" memo="病案首页子类查询门诊收入-门诊病人医嘱执行科室费用">
<sql><![CDATA[
select sum(d.SFXSJZFY) fy,sfx.BASYFL fylb,e.YZZXKS 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
--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'
3 months ago
where a.JGID=?
and (c.PJLX='MG' or c.PJLX='MS')
and nvl(e.YZZXKS,'%') like ?
and c.SFRQ >=? and c.SFRQ <= ?
and c.SFZT =1 and b.JSZT =1
--and dj.djcxzt='0' and js.CXZT='0' and dj.MDTRT_ID is not null
3 months ago
group by sfx.BASYFL,e.YZZXKS
order by e.YZZXKS,sfx.BASYFL
]]></sql>
<fields>
<f name="fy" type="4" />
<f name="fylb" type="12" />
<f name="jjks" type="12" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
</datasource>