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_yzcx_realt...

599 lines
27 KiB

3 months ago
<?xml version="1.0" encoding="UTF-8"?>
<datasource>
<!-- 1 表示 sql语句dao 2表示存储过程dao 默认为sql语句dao-->
<dao id="yzcxRealtimeMainDataDao" log="true" type="1" memo="实时查询-住院出院患者次均费用-病区明细">
<sql>
select '' 门诊人次,'' 急诊人次,'' 总挂号人次,'' 退号人次,'' 退号率,'' 挂号预约人次,'' 预约就诊率,'' 候诊人次,'' 发药金额,'' 入院人次,'' 出院人次,'' 在院人次,'' 退院人次,'' ICU人数,'' 危重人次,'' 死亡人次,'' 病床使用率,'' 计划手术例数 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="ICU人数" type="1" />
<f name="危重人次" type="1" />
<f name="死亡人次" type="1" />
<f name="病床使用率" type="1" />
<f name="计划手术例数" type="1" />
</fields>
</dao>
<dao id="yzcxRealtimeGhThrcDao" log="true" type="1" memo="查询挂号退号人次dao">
<sql><![CDATA[
select count(*) thrc 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.JZZT='T' and c.SFZT=3 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="yzcxRealtimeGhHzrcDao" log="true" type="1" memo="查询挂号候诊人次dao">
<sql><![CDATA[
select count(*) hzrc 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_GHQUEUE d on a.pkey=d.JZPKEY and a.JGID=d.JGID where a.JGID=? and (a.JZLX='M' or a.JZLX='J') AND d.PDZT='2' and c.SFRQ >=? and c.SFRQ <= ?
]]></sql>
<fields>
<f name="hzrc" type="4" />
</fields>
<parameter>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="yzcxRealtimeZyTyrcDao" log="true" type="1" memo="查询退院人次,包括急诊的留观和抢救dao">
<sql><![CDATA[
select count(*) tyrc from HIS_JZ_BASEINFO where JGID=? and (JZLX='Z' or (JZLX='J' and (JZZT='Z' or JZZT='C'))) and ISTY='1' and JJRQ >=? and JJRQ <= ?
]]></sql>
<fields>
<f name="tyrc" type="4" />
</fields>
<parameter>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="yzcxRealtimeZyWzrcDao" log="true" type="1" memo="查询危重人次,包括急诊的留观和抢救dao">
<sql><![CDATA[
select count(*) wzrc from HIS_JZ_BASEINFO where JGID=? and (JZLX='Z' or (JZLX='J' and (JZZT='Z' or JZZT='C'))) and (ZYBQ='02' or ZYBQ='03') and JJRQ >=? and JJRQ <= ?
]]></sql>
<fields>
<f name="wzrc" type="4" />
</fields>
<parameter>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="yzcxRealtimeZyICUrcDao" log="true" type="1" memo="查询ICU人次,包括急诊的留观和抢救dao">
<sql><![CDATA[
select count(*) icurc from HIS_JZ_BASEINFO where JGID=? and (JZLX='Z' or (JZLX='J' and (JZZT='Z' or JZZT='C'))) and ISICU ='1' and JJRQ >=? and JJRQ <= ?
]]></sql>
<fields>
<f name="icurc" type="4" />
</fields>
<parameter>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="yzcxRealtimeZyDeadrcDao" log="true" type="1" memo="查询死亡人次,包括急诊的留观和抢救dao">
<sql><![CDATA[
select count(*) deadrc from HIS_JZ_BASEINFO where JGID=? and (JZLX='Z' or (JZLX='J' and (JZZT='Z' or JZZT='C'))) and ISDEAD ='1' and JJRQ >=? and JJRQ <= ?
]]></sql>
<fields>
<f name="deadrc" type="4" />
</fields>
<parameter>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="yzcxRealtimeZyOparcDao" log="true" type="1" memo="查询手术例次,包括门诊、日间、住院手术dao">
<sql><![CDATA[
select count(*) ssrc from HIS_OPA_ORDER where JGID=? and OPASTATE !='001' and OPASTATE !='003' and OPASTATE !='004' and OPADATETIME >=? and OPADATETIME <=?
]]></sql>
<fields>
<f name="ssrc" type="4" />
</fields>
<parameter>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="yzcxRealtimeMzFyjeDao" log="true" type="1" memo="查询门诊药房发药金额dao">
<sql><![CDATA[
select sum(a.YZSL*YZDJ) fyje from HIS_YFFY_MZFYMXB a left join HIS_YFFY_MZFYZB b on a.FYBPKEY=b.pkey and a.JGID=b.JGID where a.JGID=? and b.FYZT='1' and a.TYPE='M' and b.FYRQ >=? and b.FYRQ <=?
]]></sql>
<fields>
<f name="fyje" type="12" />
</fields>
<parameter>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="yzcxRealtimeZyFyjeDao" log="true" type="1" memo="查询住院药房发药金额dao">
<sql><![CDATA[
select sum(a.YZSL*YZDJ) fyje from HIS_YFFY_ZYFYMXB a left join HIS_YFFY_ZYFYZB b on a.FYBPKEY=b.pkey and a.JGID=b.JGID where a.JGID=? and b.FYTIME >=? and b.FYTIME <=?
]]></sql>
<fields>
<f name="fyje" type="12" />
</fields>
<parameter>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="yzcxRealtimeGhksMxdateDao" 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" />
<f name="诊查费" type="1" />
<f name="费用合计" type="1" />
</fields>
</dao>
<dao id="yzcxRealtimeGhrcByHourdateDao" 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="yzcxRealtimeGhfyByKsdateDao" 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="yzcxRealtimeGhThrcByKsDao" log="true" type="1" memo="通过科室分组查询挂号退号人次dao">
<sql><![CDATA[
select count(*) thrc,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.JZZT='T' 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="yzcxRealtimeGhThrcByKsDao" log="true" type="1" memo="通过科室分组查询挂号退号人次dao">
<sql><![CDATA[
select count(*) thrc,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.JZZT='T' 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="yzcxRealtimeGhHzrcByKsDao" log="true" type="1" memo="通过科室分组查询挂号候诊人次dao">
<sql><![CDATA[
select count(*) hzrc,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_JZ_GHQUEUE d on a.pkey=d.JZPKEY and a.JGID=d.JGID where a.JGID=? and (a.JZLX='M' or a.JZLX='J') AND d.PDZT='2' and c.SFRQ >=? and c.SFRQ <= ? group by a.jjks order by a.jjks
]]></sql>
<fields>
<f name="hzrc" type="4" />
<f name="jjks" type="12" />
</fields>
<parameter>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="yzcxRealtimeMjzJzrcByHourDao" log="true" type="1" memo="通过挂号时段分组查询门急诊就诊人次dao">
<sql><![CDATA[
select count(*) jzrc,ghsd from (select substr(to_char(d.GHSJ,'yyyy-mm-dd hh24:mi:ss'),12,2) ghsd 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 a.JZLX=? and c.SFRQ >=? and c.SFRQ <= ? ) group by ghsd order by ghsd
]]></sql>
<fields>
<f name="JZRC" type="4" />
<f name="ghsd" type="12" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="yzcxRealtimeGhThrcByHourDao" log="true" type="1" memo="通过挂号时段分组查询挂号退号人次dao">
<sql><![CDATA[
select count(*) jzrc,ghsd from (select substr(to_char(d.GHSJ,'yyyy-mm-dd hh24:mi:ss'),12,2) ghsd 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 (a.JZLX='M' or a.JZLX='J') AND a.JZZT='T' and c.SFRQ >=? and c.SFRQ <= ? )group by ghsd order by ghsd
]]></sql>
<fields>
<f name="JZRC" type="4" />
<f name="ghsd" type="12" />
</fields>
<parameter>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="yzcxRealtimeZyrcybybqDao" log="true" type="1" memo="实时查询-病区入出院情况">
<sql>
select '' 病区,'' 入院人次,'' 出院人次,'' 在院人次,'' 退院人次,'' ICU人次,'' 危重人次,'' 死亡人次 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="ICU人次" type="1" />
<f name="危重人次" type="1" />
<f name="死亡人次" type="1" />
</fields>
</dao>
<dao id="yzcxRealtimeZyrcybyhourDao" 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="yzcxRealtimeZyzyysbybqDao" 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="yzcxRealtimeZyRyrcByBqDao" 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 order 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="yzcxRealtimeZyCyrcByBqDao" 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 order 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="yzcxRealtimeZyZyrcDao" log="true" type="1" memo="通过病区分组查询查询在院人次,包括急诊的留观和抢救dao,出院日期要大于查询时间段">
<sql><![CDATA[
select count(*) zyrc,ward from HIS_JZ_BASEINFO where JGID=? and (JZLX='Z' or (JZLX='J' and (JZZT='Z' or JZZT='C'))) and JJRQ >=? and JJRQ <= ? and (JZZT='Z' or (JZZT='C' and CYRQ > ?)) group by ward order 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>
<p>93</p>
</parameter>
</dao>
<dao id="yzcxRealtimeZyTyrcByBqDao" log="true" type="1" memo="通过病区分组查询退院人次,包括急诊的留观和抢救dao">
<sql><![CDATA[
select count(*) tyrc,ward from HIS_JZ_BASEINFO where JGID=? and (JZLX='Z' or (JZLX='J' and (JZZT='Z' or JZZT='C'))) and ISTY='1' and JJRQ >=? and JJRQ <= ? group by ward order by ward
]]></sql>
<fields>
<f name="tyrc" type="4" />
<f name="ward" type="12" />
</fields>
<parameter>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="yzcxRealtimeZyWzrcByBqDao" log="true" type="1" memo="通过病区分组查询危重人次,包括急诊的留观和抢救dao">
<sql><![CDATA[
select count(*) wzrc,ward from HIS_JZ_BASEINFO where JGID=? and (JZLX='Z' or (JZLX='J' and (JZZT='Z' or JZZT='C'))) and (ZYBQ='02' or ZYBQ='03') and JJRQ >=? and JJRQ <= ? group by ward order by ward
]]></sql>
<fields>
<f name="wzrc" type="4" />
<f name="ward" type="12" />
</fields>
<parameter>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="yzcxRealtimeZyICUrcByBqDao" log="true" type="1" memo="通过病区分组查询ICU人次,包括急诊的留观和抢救dao">
<sql><![CDATA[
select count(*) icurc,ward from HIS_JZ_BASEINFO where JGID=? and (JZLX='Z' or (JZLX='J' and (JZZT='Z' or JZZT='C'))) and ISICU ='1' and JJRQ >=? and JJRQ <= ? group by ward order by ward
]]></sql>
<fields>
<f name="icurc" type="4" />
<f name="ward" type="12" />
</fields>
<parameter>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="yzcxRealtimeZyDeadrcByBqDao" log="true" type="1" memo="通过病区分组查询死亡人次,包括急诊的留观和抢救dao">
<sql><![CDATA[
select count(*) deadrc,ward from HIS_JZ_BASEINFO where JGID=? and (JZLX='Z' or (JZLX='J' and (JZZT='Z' or JZZT='C'))) and ISDEAD ='1' and JJRQ >=? and JJRQ <= ? group by ward order by ward
]]></sql>
<fields>
<f name="deadrc" type="4" />
<f name="ward" type="12" />
</fields>
<parameter>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="yzcxRealtimeZyRyrcByHourDao" log="true" type="1" memo="通过小时分组查询入院人次,包括急诊的留观和抢救dao">
<sql><![CDATA[
select count(*) ryrc,sd from (select substr(to_char(JJRQ,'yyyy-mm-dd hh24:mi:ss'),12,2) sd from HIS_JZ_BASEINFO where JGID=? and (JZLX='Z' or (JZLX='J' and (JZZT='Z' or JZZT='C'))) and JJRQ >=? and JJRQ <= ? ) group by sd order by sd
]]></sql>
<fields>
<f name="ryrc" type="4" />
<f name="sd" type="12" />
</fields>
<parameter>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="yzcxRealtimeZyCyrcByHourDao" log="true" type="1" memo="通过小时分组查询出院人次,包括急诊的留观和抢救dao">
<sql><![CDATA[
select count(*) cyrc,sd from (select substr(to_char(CYRQ,'yyyy-mm-dd hh24:mi:ss'),12,2) sd from HIS_JZ_BASEINFO where JGID=? and JZZT='C' and CYRQ >=? and CYRQ <= ? ) group by sd order by sd
]]></sql>
<fields>
<f name="cyrc" type="4" />
<f name="sd" type="12" />
</fields>
<parameter>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="yzcxRealtimeZyTyrcByHourDao" log="true" type="1" memo="通过小时分组查询退院人次,包括急诊的留观和抢救dao">
<sql><![CDATA[
select count(*) tyrc,sd from (select substr(to_char(CYRQ,'yyyy-mm-dd hh24:mi:ss'),12,2) sd from HIS_JZ_BASEINFO where JGID=? and (JZLX='Z' or (JZLX='J' and (JZZT='Z' or JZZT='C'))) and ISTY='1' and JJRQ >=? and JJRQ <= ? ) group by sd order by sd
]]></sql>
<fields>
<f name="tyrc" type="4" />
<f name="sd" type="12" />
</fields>
<parameter>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="yzcxRealtimeMzFyjeByKsDao" log="true" type="1" memo="通过发药药房分组查询门诊药房发药金额dao">
<sql><![CDATA[
SELECT sum(FYJE) FYJE,sum(YZSL) yzsl,sum(TYJE) TYJE,sum(tysl) tysl,FYYF FROM
(
select distinct a.pkey,b.pkey yzmx,b.yzxpkey,b.yzmc,c.gg,a.YZSL,a.TYSL,f.ZHXS,c.JBDW,f.RKDW,d.JJYS,d.JJKS,f.FYZL,e.jbdj,b.YPYZJBJG,f.dwview,e.YXQ,e.PH,c.ZCZH,c.CSXX,rkd.GYS,g.fyrq,a.SFSL,a.FYDW,a.FYJE,0 TYJE,'' STSL,a.FYJJJE,0 TYJJJE,g.FYYF from HIS_YFFY_MZFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_YPXX c on a.YZX=c.BM left join HIS_JZ_BASEINFO d on a.JZPKEY=d.pkey and a.JGID=d.JGID left join HIS_KSKC_PC e on a.KSKCPCPKEY=e.pkey and a.JGID=e.JGID left join HIS_SFX f on a.yzx=f.bm and a.JGID=f.JGID left join HIS_YFFY_MZFYZB g on a.FYBPKEY=g.pkey and a.JGID=g.JGID left join HIS_YFYK_RKD_MX rkmx on e.pkey=rkmx.KSKC_PC_PKEY and e.JGID=rkmx.JGID left join HIS_YFYK_RKD rkd on rkmx.djh=rkd.djh and rkmx.JGID=rkd.JGID where a.JGID=? and g.fyrq >? and g.fyrq <=?
union all
select distinct a.pkey,b.pkey yzmx,b.yzxpkey,b.yzmc,c.gg,a.YZSL,a.TYSL,f.ZHXS,c.JBDW,f.RKDW,d.JJYS,d.JJKS,f.FYZL,e.jbdj,b.YPYZJBJG,f.dwview,e.YXQ,e.PH,c.ZCZH,c.CSXX,rkd.GYS,g.fyrq,'' SFSL,a.FYDW,0 FYJE,tymxb.TYJE,tymxb.STSL,0 FYJJJE,tymxb.TYJJJE,g.FYYF from HIS_YFFY_MZTYMXB tymxb left join HIS_YFFY_MZFYMXB a on tymxb.MZFYMXBPKEY=a.pkey and tymxb.JGID=a.JGID left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_YPXX c on a.YZX=c.BM left join HIS_JZ_BASEINFO d on a.JZPKEY=d.pkey and a.JGID=d.JGID left join HIS_KSKC_PC e on a.KSKCPCPKEY=e.pkey and a.JGID=e.JGID left join HIS_SFX f on a.yzx=f.bm and a.JGID=f.JGID left join HIS_YFFY_MZFYZB g on a.FYBPKEY=g.pkey and a.JGID=g.JGID left join HIS_YFYK_RKD_MX rkmx on e.pkey=rkmx.KSKC_PC_PKEY and e.JGID=rkmx.JGID left join HIS_YFYK_RKD rkd on rkmx.djh=rkd.djh and rkmx.JGID=rkd.JGID where a.JGID=? and tymxb.CJRQ >? and tymxb.CJRQ <=?
) group by FYYF ORDER BY FYYF
]]></sql>
<fields>
<f name="fyje" type="12" />
<f name="yzsl" type="12" />
<f name="tyje" type="12" />
<f name="tysl" type="12" />
<f name="fyyf" 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="yzcxRealtimeZyFyjeByKsDao" log="true" type="1" memo="通过发药药房分组查询住院药房发药金额dao">
<sql><![CDATA[
SELECT sum(FYJE) FYJE,sum(YZSL) yzsl,sum(TYJE) TYJE,sum(tysl) tysl,FYKS FROM
(
select distinct a.pkey,b.pkey yzmx,b.yzxpkey,b.yzmc,c.gg,a.YZSL,a.TYSL,f.ZHXS,c.JBDW,f.RKDW,d.JJYS,d.JJKS,f.FYZL,e.jbdj,b.YPYZJBJG,f.dwview,e.YXQ,e.PH,c.ZCZH,c.CSXX,rkd.GYS,g.FYTIME fyrq,a.SFSL,a.FYDW,a.FYJE,0 TYJE,'' STSL,a.FYJJJE,0 TYJJJE,g.FYTIME rq,b.YPYZBZJG,a.PCSJ,a.PCJBSJ,a.SFBZDWFY,a.YPYZZHXS,a.PCDJ,a.PCJBDJ,a.YPFYSJMS,g.FYKS from HIS_YFFY_ZYFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_YPXX c on a.YZXPKEY=c.BM left join HIS_JZ_BASEINFO d on a.JZPKEY=d.pkey and a.JGID=d.JGID left join HIS_KSKC_PC e on a.KSKCPCPKEY=e.pkey and a.JGID=e.JGID left join HIS_SFX f on a.yzxpkey=f.bm and a.JGID=f.JGID left join HIS_YFFY_ZYFYZB g on a.FYBPKEY=g.pkey and a.JGID=g.JGID left join HIS_YFYK_RKD_MX rkmx on e.pkey=rkmx.KSKC_PC_PKEY and e.JGID=rkmx.JGID left join HIS_YFYK_RKD rkd on rkmx.djh=rkd.djh and rkmx.JGID=rkd.JGID where a.JGID=? and g.FYTIME >? and g.FYTIME <=? and a.sfsl>0
union all
select distinct a.pkey,b.pkey yzmx,b.yzxpkey,b.yzmc,c.gg,a.YZSL,a.TYSL,f.ZHXS,c.JBDW,f.RKDW,d.JJYS,d.JJKS,f.FYZL,e.jbdj,b.YPYZJBJG,f.dwview,e.YXQ,e.PH,c.ZCZH,c.CSXX,rkd.GYS,g.FYTIME fyrq,'' SFSL,a.FYDW,0 FYJE,tymxb.TYJE,tymxb.STSL,0 FYJJJE,tymxb.TYJJJE,tymxb.CJRQ rq,b.YPYZBZJG,a.PCSJ,a.PCJBSJ,a.SFBZDWFY,a.YPYZZHXS,a.PCDJ,a.PCJBDJ,a.YPFYSJMS,g.FYKS from HIS_YFFY_MZTYMXB tymxb left join HIS_YFFY_ZYFYMXB a on tymxb.MZFYMXBPKEY=a.pkey and tymxb.JGID=a.JGID left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_YPXX c on a.YZXPKEY=c.BM left join HIS_JZ_BASEINFO d on a.JZPKEY=d.pkey and a.JGID=d.JGID left join HIS_KSKC_PC e on a.KSKCPCPKEY=e.pkey and a.JGID=e.JGID left join HIS_SFX f on a.yzxpkey=f.bm and a.JGID=f.JGID left join HIS_YFFY_ZYFYZB g on a.FYBPKEY=g.pkey and a.JGID=g.JGID left join HIS_YFYK_RKD_MX rkmx on e.pkey=rkmx.KSKC_PC_PKEY and e.JGID=rkmx.JGID left join HIS_YFYK_RKD rkd on rkmx.djh=rkd.djh and rkmx.JGID=rkd.JGID where a.JGID=? and tymxb.CJRQ >? and tymxb.CJRQ <=? and tymxb.stsl >0
) group by FYKS ORDER BY FYKS
]]></sql>
<fields>
<f name="fyje" type="12" />
<f name="yzsl" type="12" />
<f name="tyje" type="12" />
<f name="tysl" type="12" />
<f name="FYKS" 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="yzcxRealtimeYfqkbyKsDao" 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" />
</fields>
</dao>
<dao id="yzcxRealtimeYfFtyjeByKsDao" 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="opaListDao" log="true" type="1">
<sql><![CDATA[
select
c.JJKS,c.WARD,c.jznl,d.xm,d.xb,a.JZNO,a.OPAGL,a.OPADATETIME,f.OPAMC,f.OPAFJ
from HIS_OPA_ORDER a left join HIS_JZ_BASEINFO c on a.JGID=c.JGID and a.jzpkey=c.pkey left join HIS_HZINFO d on a.JGID=d.JGID and a.hzpkey=d.pkey left join HIS_OPA_ORDER_PLANOPA f on a.JGID=f.JGID and a.pkey=f.opapkey and f.ismain='1' where a.JGID=? and a.OPADATETIME >=? and a.OPADATETIME<=? order by a.OPADATETIME
]]></sql>
<fields>
<f name="JJKS" type="12" />
<f name="WARD" type="12" />
<f name="JZNL" type="12" />
<f name="XM" type="12" />
<f name="XB" type="12" />
<f name="JZNO" type="12" />
<f name="OPAGL" type="12" />
<f name="OPADATETIME" type="93" />
<f name="OPAMC" type="12" />
<f name="OPAFJ" type="12" />
</fields>
<parameter>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="yzcxRealtimeOpaksMxListDao" 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" />
<f name="手术级别" type="1" />
</fields>
</dao>
</datasource>