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.
1398 lines
67 KiB
1398 lines
67 KiB
<?xml version="1.0" encoding="UTF-8"?>
|
|
<datasource>
|
|
<!-- 1 表示 sql语句dao 2表示存储过程dao 默认为sql语句dao-->
|
|
<dao id="yzcxHistoryMaindateDao" log="true" type="1">
|
|
<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" />
|
|
<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" />
|
|
<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" />
|
|
<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="reportMjzJzrcDao" log="true" type="1" memo="查询门急诊就诊人次dao">
|
|
<sql><![CDATA[
|
|
select count(*) jzrc from (select distinct 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 a.JZLX=? and c.PJZT = 1 and c.SFRQ >? and c.SFRQ <= ? )
|
|
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="JZRC" type="4" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="reportYyghJzrcDao" log="true" type="1" memo="查询预约挂号就诊人次dao">
|
|
<sql><![CDATA[
|
|
select count(*) jzrc 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.ISYYGH='1' and c.PJZT = 1 and c.SFRQ >? and c.SFRQ <= ?
|
|
]]></sql>
|
|
<fields>
|
|
<f name="JZRC" type="4" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
<dao id="reportZyRyrcDao" log="true" type="1" memo="查询入院人次,包括急诊的留观和抢救dao">
|
|
<sql><![CDATA[
|
|
select count(*) ryrc from HIS_JZ_BASEINFO where JGID=? and (JZLX='Z' or (JZLX='J' and (JZZT='Z' or JZZT='C'))) and JJRQ >=? and JJRQ <= ?
|
|
]]></sql>
|
|
<fields>
|
|
<f name="ryrc" type="4" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
<dao id="reportZyCyrcDao" log="true" type="1" memo="查询出院人次,包括急诊的留观和抢救dao">
|
|
<sql><![CDATA[
|
|
select count(*) cyrc from HIS_JZ_BASEINFO where JGID=? and JZZT='C' and CYRQ >=? and CYRQ <= ?
|
|
]]></sql>
|
|
<fields>
|
|
<f name="cyrc" type="4" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
<dao id="reportZyZyrcDao" log="true" type="1" memo="查询在院人次,包括急诊的留观和抢救dao,入院日期要大于等于入院日期,出院日期要大于结束查询日期">
|
|
<sql><![CDATA[
|
|
select count(*) zyrc from (select distinct pkey from HIS_JZ_BASEINFO where JGID=? and (JZZT='Z' or (JZZT='C' and JJRQ >=? and CYRQ > ?)))
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="zyrc" type="4" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
<dao id="reportMzZsrDao" log="true" type="1" memo="查询门诊总收入dao">
|
|
<sql><![CDATA[
|
|
select sum(fy) mzzsr from (
|
|
|
|
select sum(d.SFXSJZFY) fy 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 c.SFRQ > ? and c.SFRQ <= ? and c.PJZT = 1
|
|
union all
|
|
|
|
select sum(d.SFXSJZFY) fy 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 c.SFRQ > ? and c.SFRQ <= ? and c.CHPKEY is not null and c.SFZT != 0
|
|
)
|
|
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="mzzsr" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="reportMzYpsrDao" log="true" type="1" memo="查询门诊药品收入dao">
|
|
<sql><![CDATA[
|
|
select sum(fy) mzypsr from (
|
|
|
|
select sum(d.SFXSJZFY) fy 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 c.SFRQ > ? and c.SFRQ <= ? and c.PJZT = 1 and sfx.gllx='Y'
|
|
union all
|
|
|
|
select sum(d.SFXSJZFY) fy 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 c.SFRQ > ? and c.SFRQ <= ? and c.CHPKEY is not null and c.SFZT != 0 and sfx.gllx='Y'
|
|
)
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="mzypsr" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="reportMzZyYpsrDao" log="true" type="1" memo="查询门诊藏医药品收入dao">
|
|
<sql><![CDATA[
|
|
select sum(fy) mzzyypsr from (
|
|
|
|
select sum(d.SFXSJZFY) fy 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 c.SFRQ > ? and c.SFRQ <= ? and c.PJZT = 1 and sfx.gllx='Y' and sfx.FYZL='27'
|
|
union all
|
|
|
|
select sum(d.SFXSJZFY) fy 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 c.SFRQ > ? and c.SFRQ <= ? and c.CHPKEY is not null and c.SFZT != 0 and sfx.gllx='Y' and sfx.FYZL='27'
|
|
)
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="mzzyypsr" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
<dao id="reportMzZyYprcDao" log="true" type="1" memo="查询门诊藏医药品人次dao">
|
|
<sql><![CDATA[
|
|
select count(1) mzzyyprc from (select distinct hzpkey from (
|
|
|
|
select distinct a.hzpkey 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 c.SFRQ > ? and c.SFRQ <= ? and c.PJZT = 1 and sfx.gllx='Y' and sfx.FYZL='27'
|
|
union all
|
|
|
|
select distinct a.hzpkey 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 c.SFRQ > ? and c.SFRQ <= ? and c.CHPKEY is not null and c.SFZT != 0 and sfx.gllx='Y' and sfx.FYZL='27'
|
|
)
|
|
)
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="mzzyyprc" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="reportMzZyXmsrDao" log="true" type="1" memo="查询门诊藏医项目收入dao">
|
|
<sql><![CDATA[
|
|
select sum(fy) mzzyxmsr from (
|
|
|
|
select sum(d.SFXSJZFY) fy 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 c.SFRQ > ? and c.SFRQ <= ? and c.PJZT = 1 and (sfx.FYZL='32' or sfx.FYZL='33')
|
|
union all
|
|
|
|
select sum(d.SFXSJZFY) fy 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 c.SFRQ > ? and c.SFRQ <= ? and c.CHPKEY is not null and c.SFZT != 0 and (sfx.FYZL='32' or sfx.FYZL='33')
|
|
)
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="mzzyxmsr" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="reportMzZyXmrcDao" log="true" type="1" memo="查询门诊藏医项目人次dao">
|
|
<sql><![CDATA[
|
|
select count(1) mzzyxmrc from (select distinct hzpkey from (
|
|
|
|
select distinct a.hzpkey 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 c.SFRQ > ? and c.SFRQ <= ? and c.PJZT = 1 and (sfx.FYZL='32' or sfx.FYZL='33')
|
|
union all
|
|
|
|
select distinct a.hzpkey 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 c.SFRQ > ? and c.SFRQ <= ? and c.CHPKEY is not null and c.SFZT != 0 and (sfx.FYZL='32' or sfx.FYZL='33')
|
|
)
|
|
)
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="mzzyxmrc" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="reportZyZsrDao" log="true" type="1" memo="查询住院总收入dao,包括急诊的留观和抢救">
|
|
<sql><![CDATA[
|
|
select sum(c.SFXSJZFY) zsr from HIS_JZ_BASEINFO a left join HIS_YZ_MXB b on a.pkey=b.jzpkey and a.JGID=b.JGID left join HIS_SFZD_SFXMXB c on b.pkey=c.yzmx and b.JGID=c.JGID left join HIS_SFX sfx on c.sfx=sfx.bm and c.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 (a.JZLX='Z' or a.JZLX='J' ) and a.jjrq >=? and a.jjrq <=?
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="ZSR" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
<dao id="reportZyYpsrDao" log="true" type="1" memo="查询住院药品收入,包括急诊的留观和抢救dao">
|
|
<sql><![CDATA[
|
|
select sum(c.SFXSJZFY) ypsr from HIS_JZ_BASEINFO a left join HIS_YZ_MXB b on a.pkey=b.jzpkey and a.JGID=b.JGID left join HIS_SFZD_SFXMXB c on b.pkey=c.yzmx and b.JGID=c.JGID left join HIS_SFX sfx on c.sfx=sfx.bm and c.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 sfx.GLLX='Y' and (a.JZLX='Z' or a.JZLX='J' ) and a.jjrq >=? and a.jjrq <=?
|
|
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="ypsr" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
<dao id="reportZyZyYpsrDao" log="true" type="1" memo="查询住院藏医药品收入,包括急诊的留观和抢救dao">
|
|
<sql><![CDATA[
|
|
select sum(c.SFXSJZFY) zyypsr from HIS_JZ_BASEINFO a left join HIS_YZ_MXB b on a.pkey=b.jzpkey and a.JGID=b.JGID left join HIS_SFZD_SFXMXB c on b.pkey=c.yzmx and b.JGID=c.JGID left join HIS_SFX sfx on c.sfx=sfx.bm and c.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 sfx.GLLX='Y' and (a.JZLX='Z' or a.JZLX='J' ) and sfx.FYZL='27' and a.jjrq >=? and a.jjrq <=?
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="zyypsr" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="reportZyZyXmsrDao" log="true" type="1" memo="查询住院藏医项目收入dao">
|
|
<sql><![CDATA[
|
|
select sum(c.SFXSJZFY) zyxmsr from HIS_JZ_BASEINFO a left join HIS_YZ_MXB b on a.pkey=b.jzpkey and a.JGID=b.JGID left join HIS_SFZD_SFXMXB c on b.pkey=c.yzmx and b.JGID=c.JGID left join HIS_SFX sfx on c.sfx=sfx.bm and c.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 (a.JZLX='Z' or a.JZLX='J' ) and (sfx.FYZL='32' or sfx.FYZL='33') and a.jjrq >=? and a.jjrq <=?
|
|
]]></sql>
|
|
<fields>
|
|
<f name="zyxmsr" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="reportZyZyYprcDao" log="true" type="1" memo="查询住院藏医药品人次,包括急诊的留观和抢救dao">
|
|
<sql><![CDATA[
|
|
|
|
select count(1) zyzyyprc from (select distinct a.hzpkey from HIS_JZ_BASEINFO a left join HIS_YZ_MXB b on a.pkey=b.jzpkey and a.JGID=b.JGID left join HIS_SFZD_SFXMXB c on b.pkey=c.yzmx and b.JGID=c.JGID left join HIS_SFX sfx on c.sfx=sfx.bm and c.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 sfx.GLLX='Y' and (a.JZLX='Z' or a.JZLX='J' ) and sfx.FYZL='27' and a.jjrq >=? and a.jjrq <=?)
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="zyzyyprc" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="reportZyZyXmrcDao" log="true" type="1" memo="查询住院藏医项目人次,包括急诊的留观和抢救dao">
|
|
<sql><![CDATA[
|
|
|
|
select count(1) zyzyxmrc from (select distinct a.hzpkey from HIS_JZ_BASEINFO a left join HIS_YZ_MXB b on a.pkey=b.jzpkey and a.JGID=b.JGID left join HIS_SFZD_SFXMXB c on b.pkey=c.yzmx and b.JGID=c.JGID left join HIS_SFX sfx on c.sfx=sfx.bm and c.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 (a.JZLX='Z' or a.JZLX='J' ) and (sfx.FYZL='32' or sfx.FYZL='33') and a.jjrq >=? and a.jjrq <=?)
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="zyzyxmrc" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="reportZyCyZsrDao" log="true" type="1" memo="查询出院患者总费用,包括急诊的留观和抢救dao">
|
|
<sql><![CDATA[
|
|
select sum(zsr) zsr,count(JZPKEY) cyrc from (select sum(SFXZFY) zsr,b.JZPKEY from HIS_SFZD_SFXMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_JZ_BASEINFO c on b.JZPKEY=c.pkey and a.JGID=c.JGID left join HIS_SFZD_ZB d on a.ZDZBPKEY=d.pkey and a.JGID=d.JGID where a.JGID=? and c.JZZT='C' and d.JSZT=1 and c.cyrq >=? and c.cyrq <=? group by b.JZPKEY)
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="ZSR" type="12" />
|
|
<f name="cyrc" type="4" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="bedAllJhLogDao" log="true" type="1" memo="用于记录床位激活和取消激活的所有床位日志dao">
|
|
<sql>
|
|
select a.PKEY,a.HZPKEY,a.JZPKEY,a.BED,a.ZT,a.SFJS,a.KSSJ,a.JSSJ,a.CJR,a.CJRQ,a.XGR,a.XGRQ,a.JGID,a.LOCKFLAG,b.ssbq,b.ssks from HIS_BQCW_LOG a left join HIS_BQCW b on a.bed=b.pkey and a.JGID=b.JGID where a.JGID=? and a.ZT='1'
|
|
</sql>
|
|
<tables>
|
|
<table name="HIS_BQCW_LOG" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>BED</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_BQCW_LOG" />
|
|
<f name="HZPKEY" type="12" table="HIS_BQCW_LOG" />
|
|
<f name="JZPKEY" type="12" table="HIS_BQCW_LOG" />
|
|
<f name="BED" type="12" table="HIS_BQCW_LOG" />
|
|
<f name="ZT" type="12" table="HIS_BQCW_LOG" />
|
|
<f name="SFJS" type="12" table="HIS_BQCW_LOG" />
|
|
<f name="KSSJ" type="93" table="HIS_BQCW_LOG" />
|
|
<f name="JSSJ" type="93" table="HIS_BQCW_LOG" />
|
|
<f name="CJR" type="12" table="HIS_BQCW_LOG" />
|
|
<f name="CJRQ" type="93" table="HIS_BQCW_LOG" />
|
|
<f name="XGR" type="12" table="HIS_BQCW_LOG" />
|
|
<f name="XGRQ" type="93" table="HIS_BQCW_LOG" />
|
|
<f name="JGID" type="12" table="HIS_BQCW_LOG" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_BQCW_LOG" />
|
|
<f name="ssbq" type="12" table="HIS_BQCW_LOG" />
|
|
<f name="ssks" type="12" table="HIS_BQCW_LOG" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
<dao id="bedAllZyLogDao" log="true" type="1" memo="用于记录床位住院分配和取消分配的所有床位日志dao">
|
|
<sql><![CDATA[
|
|
select PKEY,HZPKEY,JZPKEY,BED,ZT,SFJS,KSSJ,JSSJ,CJR,CJRQ,XGR,XGRQ,JGID,LOCKFLAG,JJKS,WARD from HIS_BQCW_LOG where JGID=? and ZT='2' and (KSSJ <= ? or JSSJ >= ?)
|
|
]]></sql>
|
|
<tables>
|
|
<table name="HIS_BQCW_LOG" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>BED</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_BQCW_LOG" />
|
|
<f name="HZPKEY" type="12" table="HIS_BQCW_LOG" />
|
|
<f name="JZPKEY" type="12" table="HIS_BQCW_LOG" />
|
|
<f name="BED" type="12" table="HIS_BQCW_LOG" />
|
|
<f name="ZT" type="12" table="HIS_BQCW_LOG" />
|
|
<f name="SFJS" type="12" table="HIS_BQCW_LOG" />
|
|
<f name="KSSJ" type="93" table="HIS_BQCW_LOG" />
|
|
<f name="JSSJ" type="93" table="HIS_BQCW_LOG" />
|
|
<f name="CJR" type="12" table="HIS_BQCW_LOG" />
|
|
<f name="CJRQ" type="93" table="HIS_BQCW_LOG" />
|
|
<f name="XGR" type="12" table="HIS_BQCW_LOG" />
|
|
<f name="XGRQ" type="93" table="HIS_BQCW_LOG" />
|
|
<f name="JGID" type="12" table="HIS_BQCW_LOG" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_BQCW_LOG" />
|
|
<f name="JJKS" type="12" table="HIS_BQCW_LOG" />
|
|
<f name="WARD" type="12" table="HIS_BQCW_LOG" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
<dao id="yzcxHistoryGhksMxdateDao" log="true" type="1" memo="历史查询-挂号科室明细">
|
|
<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="yzcxHistoryGhksZrcdateDao" log="true" type="1" memo="历史查询-挂号总人次科室-图例,name:挂号科室,value:总挂号人次">
|
|
<sql>
|
|
select '' name,'' value from dual where 1=2
|
|
</sql>
|
|
<fields>
|
|
<f name="name" type="1" />
|
|
<f name="value" type="1" />
|
|
</fields>
|
|
</dao>
|
|
|
|
<dao id="yzcxHistoryGhhbZrcdateDao" log="true" type="1" memo="历史查询-挂号号别明细-图例,name:挂号号别,value:总挂号人次">
|
|
<sql>
|
|
select '' name,'' value from dual where 1=2
|
|
</sql>
|
|
<fields>
|
|
<f name="name" type="1" />
|
|
<f name="value" type="1" />
|
|
</fields>
|
|
</dao>
|
|
|
|
|
|
<dao id="reportMjzJzrcByksDao" log="true" type="1" memo="通过科室分组查询门急诊就诊人次dao">
|
|
<sql><![CDATA[
|
|
select count(*) jzrc,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 a.JZLX=? and c.PJZT = 1 and c.SFRQ >? and c.SFRQ <= ? ) group by jjks order by jjks
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="JZRC" 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="reportYyghJzrcByksDao" log="true" type="1" memo="通过科室分组查询预约挂号就诊人次dao">
|
|
<sql><![CDATA[
|
|
select count(*) jzrc,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.ISYYGH='1' and c.SFRQ >=? and c.SFRQ <= ? group by a.jjks order by a.jjks
|
|
]]></sql>
|
|
<fields>
|
|
<f name="JZRC" type="4" />
|
|
<f name="jjks" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="reportMjzJzrcByhbDao" log="true" type="1" memo="通过号别分组查询门急诊就诊人次dao">
|
|
<sql><![CDATA[
|
|
select count(*) jzrc,GHLB from (select distinct a.pkey,d.GHLB 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_JZ_GHB d on a.GHPKEY=d.pkey and a.JGID=d.JGID where a.JGID=? and c.PJZT = 1 and c.SFRQ >? and c.SFRQ <= ? ) group by GHLB order by GHLB
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="JZRC" type="4" />
|
|
<f name="GHLB" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="reportMjzGhfyByksDao" log="true" type="1" memo="通过科室分组查询门急诊挂号费用dao">
|
|
<sql><![CDATA[
|
|
select c.jjks,sum(SFXZFY) zfy from HIS_MZJS_MZFPZB a left join HIS_SFZD_ZB b on a.JGID=b.JGID and a.GLZDBPKEY=b.pkey left join HIS_JZ_BASEINFO c on b.jzpkey=c.pkey 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 a.PJZT = 1 and (c.JZLX='M' or c.JZLX='J') and e.sfghf='1' and a.SFRQ>=? and a.SFRQ<=? group by c.jjks
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="jjks" type="12" />
|
|
<f name="zfy" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="reportMjzZcfyByksDao" log="true" type="1" memo="通过科室分组查询门急诊挂号诊察费dao">
|
|
<sql><![CDATA[
|
|
select c.jjks,sum(SFXZFY) zfy from HIS_MZJS_MZFPZB a left join HIS_SFZD_ZB b on a.JGID=b.JGID and a.GLZDBPKEY=b.pkey left join HIS_JZ_BASEINFO c on b.jzpkey=c.pkey 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 a.PJZT = 1 and (c.JZLX='M' or c.JZLX='J') and e.HSZFL=? and a.SFRQ>=? and a.SFRQ<=? group by c.jjks
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="jjks" type="12" />
|
|
<f name="zfy" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
<dao id="yzcxHistoryGhysMxdateDao" log="true" type="1" memo="历史查询-挂号医生明细">
|
|
<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="yzcxHistoryGhysZrcdateDao" log="true" type="1" memo="历史查询-挂号总人次医生-图例,name:挂号医生,value:总挂号人次">
|
|
<sql>
|
|
select '' name,'' value from dual where 1=2
|
|
</sql>
|
|
<fields>
|
|
<f name="name" type="1" />
|
|
<f name="value" type="1" />
|
|
</fields>
|
|
</dao>
|
|
|
|
<dao id="reportMjzJzrcByysDao" log="true" type="1" memo="通过医生分组查询门急诊就诊人次dao">
|
|
<sql><![CDATA[
|
|
select count(*) jzrc,JJYS from (select distinct a.pkey,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 where a.JGID=? and a.JZLX=? and c.PJZT = 1 and c.SFRQ >? and c.SFRQ <= ? ) group by JJYS order by JJYS
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="JZRC" type="4" />
|
|
<f name="JJYS" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
<dao id="reportYyghJzrcByysDao" log="true" type="1" memo="通过医生分组查询预约挂号就诊人次dao">
|
|
<sql><![CDATA[
|
|
select count(*) jzrc,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 where a.JGID=? and (a.JZLX='M' or a.JZLX='J') AND a.ISYYGH='1' and c.SFRQ >=? and c.SFRQ <= ? group by a.JJYS order by a.JJYS
|
|
]]></sql>
|
|
<fields>
|
|
<f name="JZRC" type="4" />
|
|
<f name="JJYS" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="reportMjzGhfyByysDao" log="true" type="1" memo="通过医生分组查询门急诊挂号费用dao">
|
|
<sql><![CDATA[
|
|
select c.JJYS,sum(SFXZFY) zfy from HIS_MZJS_MZFPZB a left join HIS_SFZD_ZB b on a.JGID=b.JGID and a.GLZDBPKEY=b.pkey left join HIS_JZ_BASEINFO c on b.jzpkey=c.pkey 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 a.PJZT = 1 and (c.JZLX='M' or c.JZLX='J') and e.HSZFL=? and a.SFRQ>=? and a.SFRQ<=? group by c.JJYS
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="JJYS" type="12" />
|
|
<f name="zfy" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
<dao id="yzcxHistoryMzzsrByKsDao" log="true" type="1" memo="历史查询-门诊科室收入情况">
|
|
<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" />
|
|
</fields>
|
|
</dao>
|
|
|
|
<dao id="yzcxHistoryMzzsrHsflDao" log="true" type="1" memo="历史查询-门诊科室收入情况-核算分类-图例,name:核算分类,value:总收入">
|
|
<sql>
|
|
select '' name,'' value from dual where 1=2
|
|
</sql>
|
|
<fields>
|
|
<f name="name" type="1" />
|
|
<f name="value" type="1" />
|
|
</fields>
|
|
</dao>
|
|
|
|
<dao id="yzcxHistoryMzzsrKsDao" log="true" type="1" memo="历史查询-门诊科室收入情况-科室-图例,name:科室,value:总收入">
|
|
<sql>
|
|
select '' name,'' value from dual where 1=2
|
|
</sql>
|
|
<fields>
|
|
<f name="name" type="1" />
|
|
<f name="value" type="1" />
|
|
</fields>
|
|
</dao>
|
|
|
|
<dao id="yzcxHistoryMzzsrBrsfDao" log="true" type="1" memo="历史查询-门诊科室收入情况-病人身份-图例,name:病人身份,value:总收入">
|
|
<sql>
|
|
select '' name,'' value from dual where 1=2
|
|
</sql>
|
|
<fields>
|
|
<f name="name" type="1" />
|
|
<f name="value" type="1" />
|
|
</fields>
|
|
</dao>
|
|
|
|
|
|
<dao id="reportMzZsrByKsDao" log="true" type="1" memo="通过科室分组查询门诊总收入dao">
|
|
<sql><![CDATA[
|
|
select sum(sfxmxb.SFXZFY) mzzsr,jzb.jjks from HIS_MZJS_MZFPZB fpzb left join HIS_SFZD_ZB sfzb on fpzb.JGID=sfzb.JGID and fpzb.GLZDBPKEY=sfzb.pkey left join HIS_JZ_BASEINFO jzb on sfzb.jzpkey=jzb.pkey and sfzb.JGID=jzb.JGID left join HIS_SFZD_SFXMXB sfxmxb on sfzb.pkey=sfxmxb.ZDZBPKEY and sfzb.JGID=sfxmxb.JGID left join HIS_YZ_MXB yzmxb on sfxmxb.yzmx=yzmxb.pkey and sfxmxb.JGID=yzmxb.JGID where fpzb.JGID=? and fpzb.SFZT != 0 and (fpzb.PJLX='MG' or fpzb.PJLX='MS') and fpzb.SFRQ>=? and fpzb.SFRQ<=? group by jzb.jjks order by jzb.jjks
|
|
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="mzzsr" type="12" />
|
|
<f name="jjks" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
<dao id="reportMzYpsrByKsDao" log="true" type="1" memo="通过科室分组查询门诊药品dao">
|
|
<sql><![CDATA[
|
|
select sum(sfxmxb.SFXZFY) mzypsr,jzb.jjks from HIS_MZJS_MZFPZB fpzb left join HIS_SFZD_ZB sfzb on fpzb.JGID=sfzb.JGID and fpzb.GLZDBPKEY=sfzb.pkey left join HIS_JZ_BASEINFO jzb on sfzb.jzpkey=jzb.pkey and sfzb.JGID=jzb.JGID left join HIS_SFZD_SFXMXB sfxmxb on sfzb.pkey=sfxmxb.ZDZBPKEY and sfzb.JGID=sfxmxb.JGID left join HIS_YZ_MXB yzmxb on sfxmxb.yzmx=yzmxb.pkey and sfxmxb.JGID=yzmxb.JGID where fpzb.JGID=? and fpzb.SFZT != 0 and (fpzb.PJLX='MG' or fpzb.PJLX='MS') and (yzmxb.yzlb='01' or yzmxb.yzlb='02' or yzmxb.yzlb='03') and fpzb.SFRQ>=? and fpzb.SFRQ<=? group by jzb.jjks order by jzb.jjks
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="mzypsr" type="12" />
|
|
<f name="jjks" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
<dao id="reportMzHcsrByKsDao" log="true" type="1" memo="通过科室分组查询门诊耗材dao">
|
|
<sql><![CDATA[
|
|
select sum(sfxmxb.SFXZFY) mzhcsr,jzb.jjks from HIS_MZJS_MZFPZB fpzb left join HIS_SFZD_ZB sfzb on fpzb.JGID=sfzb.JGID and fpzb.GLZDBPKEY=sfzb.pkey left join HIS_JZ_BASEINFO jzb on sfzb.jzpkey=jzb.pkey and sfzb.JGID=jzb.JGID left join HIS_SFZD_SFXMXB sfxmxb on sfzb.pkey=sfxmxb.ZDZBPKEY and sfzb.JGID=sfxmxb.JGID left join HIS_YZ_MXB yzmxb on sfxmxb.yzmx=yzmxb.pkey and sfxmxb.JGID=yzmxb.JGID where fpzb.JGID=? and fpzb.SFZT != 0 and (fpzb.PJLX='MG' or fpzb.PJLX='MS') and yzmxb.gllx='W' and fpzb.SFRQ>=? and fpzb.SFRQ<=? group by jzb.jjks order by jzb.jjks
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="mzhcsr" type="12" />
|
|
<f name="jjks" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="reportMzSqdsrByKsDao" log="true" type="1" memo="通过科室分组查询门诊申请单dao">
|
|
<sql><![CDATA[
|
|
select sum(sfxmxb.SFXZFY) mzsqdsr,jzb.jjks from HIS_MZJS_MZFPZB fpzb left join HIS_SFZD_ZB sfzb on fpzb.JGID=sfzb.JGID and fpzb.GLZDBPKEY=sfzb.pkey left join HIS_JZ_BASEINFO jzb on sfzb.jzpkey=jzb.pkey and sfzb.JGID=jzb.JGID left join HIS_SFZD_SFXMXB sfxmxb on sfzb.pkey=sfxmxb.ZDZBPKEY and sfzb.JGID=sfxmxb.JGID left join HIS_YZ_MXB yzmxb on sfxmxb.yzmx=yzmxb.pkey and sfxmxb.JGID=yzmxb.JGID where fpzb.JGID=? and fpzb.SFZT != 0 and (fpzb.PJLX='MG' or fpzb.PJLX='MS') and (yzmxb.yzlx='5' or yzmxb.yzlx='6') and fpzb.SFRQ>=? and fpzb.SFRQ<=? group by jzb.jjks order by jzb.jjks
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="mzsqdsr" type="12" />
|
|
<f name="jjks" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="reportMzZsrByHsflDao" log="true" type="1" memo="通过核算分类分组查询门诊总收入dao">
|
|
<sql><![CDATA[
|
|
select sum(a.FYLBJE) mzzsr,a.FYLBBM from HIS_MZJS_MZFPSFLBB a left join HIS_MZJS_MZFPZB b on a.JGID=b.JGID and a.MZFPPKEY=b.pkey left join HIS_SFZD_ZB c on b.JGID=c.JGID and b.GLZDBPKEY=c.pkey left join HIS_JZ_BASEINFO d on c.jzpkey=d.pkey and c.JGID=d.JGID where a.JGID=? and b.SFZT != 0 and (b.PJLX='MG' or b.PJLX='MS') and b.SFRQ>=? and b.SFRQ<=? group by a.FYLBBM order by a.FYLBBM
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="mzzsr" type="12" />
|
|
<f name="FYLBBM" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
<dao id="reportMzZsrByBrsfDao" log="true" type="1" memo="通过病人身份分组查询门诊总收入dao">
|
|
<sql><![CDATA[
|
|
select sum(a.FYLBJE) mzzsr,e.HZLX from HIS_MZJS_MZFPSFLBB a left join HIS_MZJS_MZFPZB b on a.JGID=b.JGID and a.MZFPPKEY=b.pkey left join HIS_SFZD_ZB c on b.JGID=c.JGID and b.GLZDBPKEY=c.pkey left join HIS_JZ_BASEINFO d on c.jzpkey=d.pkey and c.JGID=d.JGID left join HIS_HZINFO e on d.hzpkey=e.pkey and d.JGID=e.JGID where a.JGID=? and b.SFZT != 0 and (b.PJLX='MG' or b.PJLX='MS') and b.SFRQ>=? and b.SFRQ<=? group by e.HZLX order by e.HZLX
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="mzzsr" type="12" />
|
|
<f name="HZLX" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
<dao id="yzcxHistoryMzzsrByYsDao" log="true" type="1" memo="历史查询-门诊医生收入情况">
|
|
<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" />
|
|
</fields>
|
|
</dao>
|
|
|
|
|
|
<dao id="yzcxHistoryMzzsrYsDao" log="true" type="1" memo="历史查询-门诊医生收入情况-医生-图例,name:医生,value:总收入">
|
|
<sql>
|
|
select '' name,'' value from dual where 1=2
|
|
</sql>
|
|
<fields>
|
|
<f name="name" type="1" />
|
|
<f name="value" type="1" />
|
|
</fields>
|
|
</dao>
|
|
|
|
<dao id="reportMzZsrByYsDao" log="true" type="1" memo="通过医生分组查询门诊总收入dao">
|
|
<sql><![CDATA[
|
|
select sum(sfxmxb.SFXZFY) mzzsr,jzb.jjys from HIS_MZJS_MZFPZB fpzb left join HIS_SFZD_ZB sfzb on fpzb.JGID=sfzb.JGID and fpzb.GLZDBPKEY=sfzb.pkey left join HIS_JZ_BASEINFO jzb on sfzb.jzpkey=jzb.pkey and sfzb.JGID=jzb.JGID left join HIS_SFZD_SFXMXB sfxmxb on sfzb.pkey=sfxmxb.ZDZBPKEY and sfzb.JGID=sfxmxb.JGID left join HIS_YZ_MXB yzmxb on sfxmxb.yzmx=yzmxb.pkey and sfxmxb.JGID=yzmxb.JGID where fpzb.JGID=? and fpzb.SFZT != 0 and (fpzb.PJLX='MG' or fpzb.PJLX='MS') and fpzb.SFRQ>=? and fpzb.SFRQ<=? group by jzb.jjys order by jzb.jjys
|
|
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="mzzsr" type="12" />
|
|
<f name="jjys" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="reportMzYpsrByYsDao" log="true" type="1" memo="通过医生分组查询门诊药品dao">
|
|
<sql><![CDATA[
|
|
select sum(sfxmxb.SFXZFY) mzypsr,jzb.jjys from HIS_MZJS_MZFPZB fpzb left join HIS_SFZD_ZB sfzb on fpzb.JGID=sfzb.JGID and fpzb.GLZDBPKEY=sfzb.pkey left join HIS_JZ_BASEINFO jzb on sfzb.jzpkey=jzb.pkey and sfzb.JGID=jzb.JGID left join HIS_SFZD_SFXMXB sfxmxb on sfzb.pkey=sfxmxb.ZDZBPKEY and sfzb.JGID=sfxmxb.JGID left join HIS_YZ_MXB yzmxb on sfxmxb.yzmx=yzmxb.pkey and sfxmxb.JGID=yzmxb.JGID where fpzb.JGID=? and fpzb.SFZT != 0 and (fpzb.PJLX='MG' or fpzb.PJLX='MS') and (yzmxb.yzlb='01' or yzmxb.yzlb='02' or yzmxb.yzlb='03') and fpzb.SFRQ>=? and fpzb.SFRQ<=? group by jzb.jjys order by jzb.jjys
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="mzypsr" type="12" />
|
|
<f name="jjys" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
<dao id="reportMzHcsrByYsDao" log="true" type="1" memo="通过医生分组查询门诊耗材dao">
|
|
<sql><![CDATA[
|
|
select sum(sfxmxb.SFXZFY) mzhcsr,jzb.jjys from HIS_MZJS_MZFPZB fpzb left join HIS_SFZD_ZB sfzb on fpzb.JGID=sfzb.JGID and fpzb.GLZDBPKEY=sfzb.pkey left join HIS_JZ_BASEINFO jzb on sfzb.jzpkey=jzb.pkey and sfzb.JGID=jzb.JGID left join HIS_SFZD_SFXMXB sfxmxb on sfzb.pkey=sfxmxb.ZDZBPKEY and sfzb.JGID=sfxmxb.JGID left join HIS_YZ_MXB yzmxb on sfxmxb.yzmx=yzmxb.pkey and sfxmxb.JGID=yzmxb.JGID where fpzb.JGID=? and fpzb.SFZT != 0 and (fpzb.PJLX='MG' or fpzb.PJLX='MS') and yzmxb.gllx='W' and fpzb.SFRQ>=? and fpzb.SFRQ<=? group by jzb.jjys order by jzb.jjys
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="mzhcsr" type="12" />
|
|
<f name="jjys" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
|
|
<dao id="reportMzSqdsrByYsDao" log="true" type="1" memo="通过医生分组查询门诊申请单dao">
|
|
<sql><![CDATA[
|
|
select sum(sfxmxb.SFXZFY) mzsqdsr,jzb.jjys from HIS_MZJS_MZFPZB fpzb left join HIS_SFZD_ZB sfzb on fpzb.JGID=sfzb.JGID and fpzb.GLZDBPKEY=sfzb.pkey left join HIS_JZ_BASEINFO jzb on sfzb.jzpkey=jzb.pkey and sfzb.JGID=jzb.JGID left join HIS_SFZD_SFXMXB sfxmxb on sfzb.pkey=sfxmxb.ZDZBPKEY and sfzb.JGID=sfxmxb.JGID left join HIS_YZ_MXB yzmxb on sfxmxb.yzmx=yzmxb.pkey and sfxmxb.JGID=yzmxb.JGID where fpzb.JGID=? and fpzb.SFZT != 0 and (fpzb.PJLX='MG' or fpzb.PJLX='MS') and (yzmxb.yzlx='5' or yzmxb.yzlx='6') and fpzb.SFRQ>=? and fpzb.SFRQ<=? group by jzb.jjys order by jzb.jjys
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="mzsqdsr" type="12" />
|
|
<f name="jjys" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
<dao id="reportMzZsrByYsDao" log="true" type="1" memo="通过医生分组查询门诊总收入dao">
|
|
<sql><![CDATA[
|
|
select sum(a.FYLBJE) mzzsr,d.jjys from HIS_MZJS_MZFPSFLBB a left join HIS_MZJS_MZFPZB b on a.JGID=b.JGID and a.MZFPPKEY=b.pkey left join HIS_SFZD_ZB c on b.JGID=c.JGID and b.GLZDBPKEY=c.pkey left join HIS_JZ_BASEINFO d on c.jzpkey=d.pkey and c.JGID=d.JGID where a.JGID=? and b.SFZT != 0 and (b.PJLX='MG' or b.PJLX='MS') and b.SFRQ>=? and b.SFRQ<=? group by d.jjys order by d.jjys
|
|
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="mzzsr" type="12" />
|
|
<f name="jjys" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="yzcxHistoryMzcjfyMxDataByKsDao" log="true" type="1" memo="历史查询-门诊科室次均费用-科室明细">
|
|
<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="yzcxHistoryMzcjfyByKsDao" log="true" type="1" memo="历史查询-门诊科室次均费用-科室-图例,name:医生,value:收入">
|
|
<sql>
|
|
select '' name,'' value from dual where 1=2
|
|
</sql>
|
|
<fields>
|
|
<f name="name" type="1" />
|
|
<f name="value" type="1" />
|
|
</fields>
|
|
</dao>
|
|
|
|
|
|
<dao id="yzcxHistoryMzcjfyMxDataByYsDao" log="true" type="1" memo="历史查询-门诊医生次均费用-医生明细">
|
|
<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="yzcxHistoryMzcjfyByYsDao" log="true" type="1" memo="历史查询-门诊医生次均费用-医生-图例,name:医生,value:收入,type:类型">
|
|
<sql>
|
|
select '' name,'' value,'' type from dual where 1=2
|
|
</sql>
|
|
<fields>
|
|
<f name="name" type="1" />
|
|
<f name="value" type="1" />
|
|
<f name="type" type="1" />
|
|
</fields>
|
|
</dao>
|
|
|
|
|
|
<dao id="yzcxHistoryZyRcyqkByBqDao" log="true" type="1" memo="历史查询-科室入出院情况-病区明细">
|
|
<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="yzcxHistoryZyRqrsByBqDao" log="true" type="1" memo="历史查询-科室入出院情况-入区人数病区-图例,name:病区,value:入区人数">
|
|
<sql>
|
|
select '' name,'' value from dual where 1=2
|
|
</sql>
|
|
<fields>
|
|
<f name="name" type="1" />
|
|
<f name="value" type="1" />
|
|
</fields>
|
|
</dao>
|
|
|
|
<dao id="yzcxHistoryZyBcsylByBqDao" log="true" type="1" memo="历史查询-科室入出院情况-病床使用率病区-图例,name:病区,value:病床使用率">
|
|
<sql>
|
|
select '' name,'' value from dual where 1=2
|
|
</sql>
|
|
<fields>
|
|
<f name="name" type="1" />
|
|
<f name="value" type="1" />
|
|
</fields>
|
|
</dao>
|
|
|
|
|
|
<dao id="reportZyRyrcByBqDao" log="true" type="1" memo="通过病区分组查询入院人次,包括急诊的留观和抢救dao">
|
|
<sql><![CDATA[
|
|
select count(*) ryrc,ward from HIS_JZ_BASEINFO where JGID=? and (JZLX='Z' or (JZLX='J' and (JZZT='Z' or JZZT='C'))) and JJRQ >=? and JJRQ <= ? group by ward
|
|
]]></sql>
|
|
<fields>
|
|
<f name="ryrc" type="4" />
|
|
<f name="ward" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
<dao id="reportZyCyrcByBqDao" log="true" type="1" memo="通过病区分组查询出院人次,包括急诊的留观和抢救dao">
|
|
<sql><![CDATA[
|
|
select count(*) cyrc,ward from HIS_JZ_BASEINFO where JGID=? and JZZT='C' and CYRQ >=? and CYRQ <= ? group by ward
|
|
]]></sql>
|
|
<fields>
|
|
<f name="cyrc" type="4" />
|
|
<f name="ward" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
<dao id="reportZyZyrcByBqDao" log="true" type="1" memo="通过病区分组查询在院人次,包括急诊的留观和抢救dao,出院日期要大于查询时间段">
|
|
<sql><![CDATA[
|
|
select count(*) zyrc,ward from HIS_JZ_BASEINFO where JGID=? and (JZZT='Z' or (JZZT='C' and JJRQ >=? and CYRQ > ?)) group by ward
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="zyrc" type="4" />
|
|
<f name="ward" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="reportZyZyGdcwsBqDao" log="true" type="1" memo="通过病区分组查询某一个时间段有效的固定床位数">
|
|
<sql><![CDATA[
|
|
select count(*) cws,SSBQ from HIS_BQCW where JGID=? and QYSJ < ? and TYSJ >? group by SSBQ order by SSBQ
|
|
]]></sql>
|
|
<fields>
|
|
<f name="cws" type="4" />
|
|
<f name="SSBQ" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
<dao id="yzcxHistoryZySrqkByKsDao" log="true" type="1" memo="历史查询-住院科室收入情况-科室明细">
|
|
<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" />
|
|
</fields>
|
|
</dao>
|
|
|
|
|
|
<dao id="yzcxHistoryZyzsrHsflDao" log="true" type="1" memo="历史查询-住院科室收入情况-总收入-核算分类-图例,name:核算分类,value:收入">
|
|
<sql>
|
|
select '' name,'' value from dual where 1=2
|
|
</sql>
|
|
<fields>
|
|
<f name="name" type="1" />
|
|
<f name="value" type="1" />
|
|
</fields>
|
|
</dao>
|
|
|
|
<dao id="yzcxHistoryZyzsrByKsDao" log="true" type="1" memo="历史查询-住院科室收入情况-总收入-科室-图例,name:科室,value:收入">
|
|
<sql>
|
|
select '' name,'' value from dual where 1=2
|
|
</sql>
|
|
<fields>
|
|
<f name="name" type="1" />
|
|
<f name="value" type="1" />
|
|
</fields>
|
|
</dao>
|
|
|
|
<dao id="yzcxHistoryZyzsrByBrsfDao" log="true" type="1" memo="历史查询-住院科室收入情况-总收入-病人身份-图例,name:病人身份,value:收入">
|
|
<sql>
|
|
select '' name,'' value from dual where 1=2
|
|
</sql>
|
|
<fields>
|
|
<f name="name" type="1" />
|
|
<f name="value" type="1" />
|
|
</fields>
|
|
</dao>
|
|
|
|
<dao id="reportZyZsrByKsDao" log="true" type="1" memo="通过科室分组查询住院总收入dao,包括急诊的留观和抢救">
|
|
<sql><![CDATA[
|
|
select sum(SFXZFY) zsr,c.JJKS from HIS_SFZD_SFXMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_JZ_BASEINFO c on b.JZPKEY=c.pkey and b.JGID=c.JGID where a.JGID=? and (c.JZLX='Z' or (c.JZLX='J' and (c.JZZT='Z' or c.JZZT='C'))) and a.JFRQ>=? and a.JFRQ<=? group by c.JJKS
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="ZSR" type="4" />
|
|
<f name="JJKS" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="reportZyYpsrByKsDao" log="true" type="1" memo="通过科室分组查询住院药品收入,包括急诊的留观和抢救dao">
|
|
<sql><![CDATA[
|
|
select sum(SFXZFY) ypsr,c.JJKS from HIS_SFZD_SFXMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_JZ_BASEINFO c on b.JZPKEY=c.pkey and b.JGID=c.JGID left join HIS_SFX f on a.SFX=f.BM and a.JGID=f.JGID where a.JGID=? and (b.yzlb='01' or b.yzlb='02' or b.yzlb='03' ) and (c.JZLX='Z' or (c.JZLX='J' and (c.JZZT='Z' or c.JZZT='C'))) and a.JFRQ>=? and a.JFRQ<=? group by c.JJKS
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="ypsr" type="12" />
|
|
<f name="JJKS" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
<dao id="reportZyHcsrByKsDao" log="true" type="1" memo="通过科室分组查询住院耗材收入,包括急诊的留观和抢救dao">
|
|
<sql><![CDATA[
|
|
select sum(SFXZFY) hcsr,c.JJKS from HIS_SFZD_SFXMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_JZ_BASEINFO c on b.JZPKEY=c.pkey and b.JGID=c.JGID left join HIS_SFX f on a.SFX=f.BM and a.JGID=f.JGID where a.JGID=? and b.gllx='W' and (c.JZLX='Z' or (c.JZLX='J' and (c.JZZT='Z' or c.JZZT='C'))) and a.JFRQ>=? and a.JFRQ<=? group by c.JJKS
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="hcsr" type="12" />
|
|
<f name="JJKS" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
<dao id="reportZySqdsrByKsDao" log="true" type="1" memo="通过科室分组查询住院申请单收入,包括急诊的留观和抢救dao">
|
|
<sql><![CDATA[
|
|
select sum(SFXZFY) sqdsr,c.JJKS from HIS_SFZD_SFXMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_JZ_BASEINFO c on b.JZPKEY=c.pkey and b.JGID=c.JGID left join HIS_SFX f on a.SFX=f.BM and a.JGID=f.JGID where a.JGID=? and (b.yzlx='5' or b.yzlx='6') and (c.JZLX='Z' or (c.JZLX='J' and (c.JZZT='Z' or c.JZZT='C'))) and a.JFRQ>=? and a.JFRQ<=? group by c.JJKS
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="sqdsr" type="12" />
|
|
<f name="JJKS" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="reportZyZsrByHsflDao" log="true" type="1" memo="通过核算分类分组查询住院总收入dao">
|
|
<sql><![CDATA[
|
|
select sum(SFXZFY) zyzsr,a.FYZL from HIS_SFZD_SFXMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_JZ_BASEINFO c on b.JZPKEY=c.pkey and b.JGID=c.JGID where a.JGID=? and (c.JZLX='Z' or (c.JZLX='J' and (c.JZZT='Z' or c.JZZT='C'))) and a.JFRQ>=? and a.JFRQ<=? group by a.FYZL
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="zyzsr" type="12" />
|
|
<f name="FYZL" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="reportZyZsrByBrsfDao" log="true" type="1" memo="通过病人身份分组查询住院总收入dao">
|
|
<sql><![CDATA[
|
|
select sum(SFXZFY) zyzsr,c.HZLX from HIS_SFZD_SFXMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_JZ_BASEINFO c on b.JZPKEY=c.pkey and b.JGID=c.JGID where a.JGID=? and (c.JZLX='Z' or (c.JZLX='J' and (c.JZZT='Z' or c.JZZT='C'))) and a.JFRQ>=? and a.JFRQ<=? group by c.HZLX
|
|
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="zyzsr" type="12" />
|
|
<f name="HZLX" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="yzcxHistoryZyCyCjfyDao" log="true" type="1" memo="历史查询-住院出院患者次均费用-病区明细">
|
|
<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" />
|
|
</fields>
|
|
</dao>
|
|
|
|
<dao id="yzcxHistoryZyCyCjfyByBqDao" log="true" type="1" memo="历史查询-住院出院患者次均费用-病区-图例,name:病区,value:收入">
|
|
<sql>
|
|
select '' name,'' value from dual where 1=2
|
|
</sql>
|
|
<fields>
|
|
<f name="name" type="1" />
|
|
<f name="value" type="1" />
|
|
</fields>
|
|
</dao>
|
|
|
|
<dao id="yzcxHistoryZyCyYzbByBqDao" log="true" type="1" memo="历史查询-住院出院患者药占比-病区-图例,name:病区,value:药占比">
|
|
<sql>
|
|
select '' name,'' value from dual where 1=2
|
|
</sql>
|
|
<fields>
|
|
<f name="name" type="1" />
|
|
<f name="value" type="1" />
|
|
</fields>
|
|
</dao>
|
|
|
|
<dao id="reportZyCyZsrByBqDao" log="true" type="1" memo="查询出院患者总费用,包括急诊的留观和抢救dao">
|
|
<sql><![CDATA[
|
|
select sum(SFXSJZFY) cyzsr,d.WARD from HIS_SFZD_SFXMXB a left join HIS_SFZD_ZB b on a.ZDZBPKEY=b.pkey and a.JGID=b.JGID left join HIS_YZ_MXB c on a.YZMX=c.pkey and a.JGID=c.JGID left join HIS_JZ_BASEINFO d on c.jzpkey=d.pkey and c.JGID=d.JGID where a.JGID=? and (d.JZLX='Z' or d.JZLX='J' ) and d.JZZT='C' and d.cyrq >=? and d.cyrq <=? and b.JSZT !='0' group by d.WARD order by d.WARD
|
|
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="cyzsr" type="12" />
|
|
<f name="WARD" type="4" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="reportZyYpsrByBqDao" log="true" type="1" memo="通过病区分组查询出院患者药品收入,包括急诊的留观和抢救dao">
|
|
<sql><![CDATA[
|
|
select sum(SFXSJZFY) ypsr,d.WARD from HIS_SFZD_SFXMXB a left join HIS_SFZD_ZB b on a.ZDZBPKEY=b.pkey and a.JGID=b.JGID left join HIS_YZ_MXB c on a.YZMX=c.pkey and a.JGID=c.JGID left join HIS_JZ_BASEINFO d on c.jzpkey=d.pkey and c.JGID=d.JGID left join HIS_SFX e on a.SFX=e.BM and a.JGID=e.JGID where a.JGID=? and (d.JZLX='Z' or d.JZLX='J' ) and d.JZZT='C' and d.cyrq >=? and d.cyrq <=? and e.GLLX='Y' and b.JSZT !='0' group by d.WARD order by d.WARD
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="ypsr" type="12" />
|
|
<f name="ward" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
<dao id="reportMzZsrByJsKsDao" log="true" type="1" memo="通过接收科室分组查询门诊总收入dao">
|
|
<sql><![CDATA[
|
|
select sum(sfxmxb.SFXZFY) mzzsr,yzmxb.yzzxks from HIS_MZJS_MZFPZB fpzb left join HIS_SFZD_ZB sfzb on fpzb.JGID=sfzb.JGID and fpzb.GLZDBPKEY=sfzb.pkey left join HIS_JZ_BASEINFO jzb on sfzb.jzpkey=jzb.pkey and sfzb.JGID=jzb.JGID left join HIS_SFZD_SFXMXB sfxmxb on sfzb.pkey=sfxmxb.ZDZBPKEY and sfzb.JGID=sfxmxb.JGID left join HIS_YZ_MXB yzmxb on sfxmxb.yzmx=yzmxb.pkey and sfxmxb.JGID=yzmxb.JGID where fpzb.JGID=? and fpzb.SFZT != 0 and (fpzb.PJLX='MG' or fpzb.PJLX='MS') and fpzb.SFRQ>=? and fpzb.SFRQ<=? group by yzmxb.yzzxks order by yzmxb.yzzxks
|
|
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="mzzsr" type="12" />
|
|
<f name="yzzxks" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
<dao id="reportMzYpsrByJsKsDao" log="true" type="1" memo="通过接收科室分组查询门诊药品dao">
|
|
<sql><![CDATA[
|
|
select sum(sfxmxb.SFXZFY) mzypsr,yzmxb.yzzxks from HIS_MZJS_MZFPZB fpzb left join HIS_SFZD_ZB sfzb on fpzb.JGID=sfzb.JGID and fpzb.GLZDBPKEY=sfzb.pkey left join HIS_JZ_BASEINFO jzb on sfzb.jzpkey=jzb.pkey and sfzb.JGID=jzb.JGID left join HIS_SFZD_SFXMXB sfxmxb on sfzb.pkey=sfxmxb.ZDZBPKEY and sfzb.JGID=sfxmxb.JGID left join HIS_YZ_MXB yzmxb on sfxmxb.yzmx=yzmxb.pkey and sfxmxb.JGID=yzmxb.JGID where fpzb.JGID=? and fpzb.SFZT != 0 and (fpzb.PJLX='MG' or fpzb.PJLX='MS') and (yzmxb.yzlb='01' or yzmxb.yzlb='02' or yzmxb.yzlb='03') and fpzb.SFRQ>=? and fpzb.SFRQ<=? group by yzmxb.yzzxks order by yzmxb.yzzxks
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="mzypsr" type="12" />
|
|
<f name="yzzxks" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
<dao id="reportMzHcsrByJsKsDao" log="true" type="1" memo="通过接收科室分组查询门诊耗材dao">
|
|
<sql><![CDATA[
|
|
select sum(sfxmxb.SFXZFY) mzhcsr,yzmxb.yzzxks from HIS_MZJS_MZFPZB fpzb left join HIS_SFZD_ZB sfzb on fpzb.JGID=sfzb.JGID and fpzb.GLZDBPKEY=sfzb.pkey left join HIS_JZ_BASEINFO jzb on sfzb.jzpkey=jzb.pkey and sfzb.JGID=jzb.JGID left join HIS_SFZD_SFXMXB sfxmxb on sfzb.pkey=sfxmxb.ZDZBPKEY and sfzb.JGID=sfxmxb.JGID left join HIS_YZ_MXB yzmxb on sfxmxb.yzmx=yzmxb.pkey and sfxmxb.JGID=yzmxb.JGID where fpzb.JGID=? and fpzb.SFZT != 0 and (fpzb.PJLX='MG' or fpzb.PJLX='MS') and yzmxb.gllx='W' and fpzb.SFRQ>=? and fpzb.SFRQ<=? group by yzmxb.yzzxks order by yzmxb.yzzxks
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="mzhcsr" type="12" />
|
|
<f name="yzzxks" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="reportMzSqdsrByJsKsDao" log="true" type="1" memo="通过接收科室分组查询门诊申请单dao">
|
|
<sql><![CDATA[
|
|
select sum(sfxmxb.SFXZFY) mzsqdsr,yzmxb.yzzxks from HIS_MZJS_MZFPZB fpzb left join HIS_SFZD_ZB sfzb on fpzb.JGID=sfzb.JGID and fpzb.GLZDBPKEY=sfzb.pkey left join HIS_JZ_BASEINFO jzb on sfzb.jzpkey=jzb.pkey and sfzb.JGID=jzb.JGID left join HIS_SFZD_SFXMXB sfxmxb on sfzb.pkey=sfxmxb.ZDZBPKEY and sfzb.JGID=sfxmxb.JGID left join HIS_YZ_MXB yzmxb on sfxmxb.yzmx=yzmxb.pkey and sfxmxb.JGID=yzmxb.JGID where fpzb.JGID=? and fpzb.SFZT != 0 and (fpzb.PJLX='MG' or fpzb.PJLX='MS') and (yzmxb.yzlx='5' or yzmxb.yzlx='6') and fpzb.SFRQ>=? and fpzb.SFRQ<=? group by yzmxb.yzzxks order by yzmxb.yzzxks
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="mzsqdsr" type="12" />
|
|
<f name="yzzxks" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
<dao id="reportZyZsrByJsKsDao" log="true" type="1" memo="通过接收科室分组查询住院总收入dao,包括急诊的留观和抢救">
|
|
<sql><![CDATA[
|
|
select sum(SFXZFY) zsr,b.YZZXKS from HIS_SFZD_SFXMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_JZ_BASEINFO c on b.JZPKEY=c.pkey and b.JGID=c.JGID where a.JGID=? and (c.JZLX='Z' or (c.JZLX='J' and (c.JZZT='Z' or c.JZZT='C'))) and a.JFRQ>=? and a.JFRQ<=? group by b.YZZXKS order by b.YZZXKS
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="ZSR" type="4" />
|
|
<f name="YZZXKS" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="reportZyYpsrByJsKsDao" log="true" type="1" memo="通过接收科室分组查询住院药品收入,包括急诊的留观和抢救dao">
|
|
<sql><![CDATA[
|
|
select sum(SFXZFY) ypsr,b.YZZXKS from HIS_SFZD_SFXMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_JZ_BASEINFO c on b.JZPKEY=c.pkey and b.JGID=c.JGID left join HIS_SFX f on a.SFX=f.BM and a.JGID=f.JGID where a.JGID=? and (b.yzlb='01' or b.yzlb='02' or b.yzlb='03' ) and (c.JZLX='Z' or (c.JZLX='J' and (c.JZZT='Z' or c.JZZT='C'))) and a.JFRQ>=? and a.JFRQ<=? group by b.YZZXKS order by b.YZZXKS
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="ypsr" type="12" />
|
|
<f name="YZZXKS" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
<dao id="reportZyHcsrByJsKsDao" log="true" type="1" memo="通过接收科室分组查询住院耗材收入,包括急诊的留观和抢救dao">
|
|
<sql><![CDATA[
|
|
select sum(SFXZFY) hcsr,b.YZZXKS from HIS_SFZD_SFXMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_JZ_BASEINFO c on b.JZPKEY=c.pkey and b.JGID=c.JGID left join HIS_SFX f on a.SFX=f.BM and a.JGID=f.JGID where a.JGID=? and b.gllx='W' and (c.JZLX='Z' or (c.JZLX='J' and (c.JZZT='Z' or c.JZZT='C'))) and a.JFRQ>=? and a.JFRQ<=? group by b.YZZXKS order by b.YZZXKS
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="hcsr" type="12" />
|
|
<f name="YZZXKS" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
<dao id="reportZySqdsrByJsKsDao" log="true" type="1" memo="通过接收科室分组查询住院申请单收入,包括急诊的留观和抢救dao">
|
|
<sql><![CDATA[
|
|
select sum(SFXZFY) sqdsr,b.YZZXKS from HIS_SFZD_SFXMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_JZ_BASEINFO c on b.JZPKEY=c.pkey and b.JGID=c.JGID left join HIS_SFX f on a.SFX=f.BM and a.JGID=f.JGID where a.JGID=? and (b.yzlx='5' or b.yzlx='6') and (c.JZLX='Z' or (c.JZLX='J' and (c.JZZT='Z' or c.JZZT='C'))) and a.JFRQ>=? and a.JFRQ<=? group by b.YZZXKS order by b.YZZXKS
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="sqdsr" type="12" />
|
|
<f name="YZZXKS" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
</datasource>
|
|
|