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.
2297 lines
110 KiB
2297 lines
110 KiB
3 months ago
|
<?xml version="1.0" encoding="UTF-8"?>
|
||
|
<datasource>
|
||
|
<!-- 1 表示 sql语句dao 2表示存储过程dao 默认为sql语句dao -->
|
||
|
|
||
|
<dao id="ygyyMzjbqkfxShowDao" 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" />
|
||
|
<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="ygyyMzjbqkfxtwoShowDao" log="true" type="1"
|
||
|
memo="阳光用药-门诊基本情况分析2显示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" />
|
||
|
<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="ygyyMzjbqkfxMzrcAndJeDao" log="true" type="1"
|
||
|
memo="阳光用药-处方总人次,处方总金额,是按照病人挂号接诊时间为主,只要病人挂号交费并开有医生处方就算一个处方人次dao">
|
||
|
<sql><![CDATA[
|
||
|
select count(*) mzrc,sum(fy) fy,tjrq from (select sum(d.SFXSJZFY) fy,to_char(c.SFRQ,'yyyy-mm') tjrq,a.pkey from HIS_JZ_BASEINFO a left join HIS_SFZD_ZB b on a.pkey=b.jzpkey and a.companyid=b.companyid left join HIS_MZJS_MZFPZB c on b.pkey=c.GLZDBPKEY and b.companyid=c.companyid left join HIS_SFZD_SFXMXB d on b.pkey=d.ZDZBPKEY and b.companyid=d.companyid where a.companyid=? and c.SFRQ >=? and c.SFRQ <= ? and (a.JZLX='M' or a.JZLX='J' ) and c.SFZT = 1 and a.JZZT='J' group by to_char(c.SFRQ,'yyyy-mm'),a.pkey order by to_char(c.SFRQ,'yyyy-mm')) group by tjrq order by tjrq
|
||
|
|
||
|
]]></sql>
|
||
|
<fields>
|
||
|
<f name="mzrc" type="4" />
|
||
|
<f name="fy" type="12" />
|
||
|
<f name="tjrq" type="12" />
|
||
|
</fields>
|
||
|
<parameter>
|
||
|
<p>12</p>
|
||
|
<p>93</p>
|
||
|
<p>93</p>
|
||
|
</parameter>
|
||
|
</dao>
|
||
|
|
||
|
|
||
|
<dao id="ygyyMzjbqkfxCfzsAndJeDao" log="true" type="1"
|
||
|
memo="阳光用药-处方张数、处方金额,是按照以药房发药的为标准,部分退药的处方,不减处方张数,会减掉处方金额dao">
|
||
|
<sql><![CDATA[
|
||
|
select fyrq,sum(cfje) cfje,count(*) cfs from (select b.cfh,sum((nvl(a.YZSL,0)-nvl(a.TYSL,0))*a.YZDJ) cfje,to_char(b.FYRQ,'yyyy-mm') fyrq from HIS_YFFY_MZFYMXB a left join HIS_YFFY_MZFYZB b on a.FYBPKEY=b.pkey and a.companyid=b.companyid where a.companyid=? and b.FYRQ>=? and b.FYRQ<=? and b.FYZT=1 and (nvl(a.YZSL,0)-nvl(a.TYSL,0)) > 0 group by b.cfh,to_char(b.FYRQ,'yyyy-mm') order by to_char(b.FYRQ,'yyyy-mm')) group by fyrq order by fyrq
|
||
|
|
||
|
]]></sql>
|
||
|
<fields>
|
||
|
<f name="fyrq" type="12" />
|
||
|
<f name="cfje" type="12" />
|
||
|
<f name="cfs" type="12" />
|
||
|
</fields>
|
||
|
<parameter>
|
||
|
<p>12</p>
|
||
|
<p>93</p>
|
||
|
<p>93</p>
|
||
|
</parameter>
|
||
|
</dao>
|
||
|
|
||
|
|
||
|
|
||
|
<dao id="ygyyMzjbqkfxYpzsDao" log="true" type="1"
|
||
|
memo="阳光用药-药品总数,是按照每张处方药品品种数累加dao">
|
||
|
<sql><![CDATA[
|
||
|
select count(*) ypzs,fyrq from (select count(*) yps,to_char(b.FYRQ,'yyyy-mm') fyrq,a.yzx from HIS_YFFY_MZFYMXB a left join HIS_YFFY_MZFYZB b on a.FYBPKEY=b.pkey and a.companyid=b.companyid where a.companyid=? and b.FYRQ>=? and b.FYRQ<=? and b.FYZT=1 and (nvl(a.YZSL,0)-nvl(a.TYSL,0)) > 0 group by to_char(b.FYRQ,'yyyy-mm'),a.yzx order by to_char(b.FYRQ,'yyyy-mm')) group by fyrq order by fyrq
|
||
|
]]></sql>
|
||
|
<fields>
|
||
|
<f name="ypzs" type="12" />
|
||
|
<f name="fyrq" type="12" />
|
||
|
</fields>
|
||
|
<parameter>
|
||
|
<p>12</p>
|
||
|
<p>93</p>
|
||
|
<p>93</p>
|
||
|
</parameter>
|
||
|
</dao>
|
||
|
|
||
|
|
||
|
<dao id="ygyyMzjbqkfxYytsDao" log="true" type="1"
|
||
|
memo="阳光用药-处方用药天数,是按照每张处方最大用药天数之和dao">
|
||
|
<sql><![CDATA[
|
||
|
select fyrq,sum(maxts) yyts from (select fyrq,cfh,max(nvl(yzts,0)) maxts from (select to_char(b.FYRQ,'yyyy-mm') fyrq,b.cfh,a.yzx,c.yzts from HIS_YFFY_MZFYMXB a left join HIS_YFFY_MZFYZB b on a.FYBPKEY=b.pkey and a.companyid=b.companyid left join HIS_YZ_MXB c on a.yzmx=c.pkey and a.companyid=c.companyid where a.companyid=? and b.FYRQ>=? and b.FYRQ<=? and b.FYZT=1 and (nvl(a.YZSL,0)-nvl(a.TYSL,0)) > 0 ) group by fyrq,cfh order by fyrq,cfh) group by fyrq order by fyrq
|
||
|
|
||
|
|
||
|
]]></sql>
|
||
|
<fields>
|
||
|
<f name="fyrq" type="12" />
|
||
|
<f name="yyts" type="12" />
|
||
|
</fields>
|
||
|
<parameter>
|
||
|
<p>12</p>
|
||
|
<p>93</p>
|
||
|
<p>93</p>
|
||
|
</parameter>
|
||
|
</dao>
|
||
|
|
||
|
|
||
|
|
||
|
<dao id="ygyyMzjbqkfxJmgyRcAndJeDao" log="true" type="1"
|
||
|
memo="阳光用药-静脉给药人次和静脉给药金额,是按照是使用过静脉给药的门诊人次dao">
|
||
|
<sql><![CDATA[
|
||
|
select fyrq,sum(cfje) cfje,count(*) rc from (
|
||
|
select b.JZPKEY,sum((nvl(a.YZSL,0)-nvl(a.TYSL,0))*a.YZDJ) cfje,to_char(b.FYRQ,'yyyy-mm') fyrq from HIS_YFFY_MZFYMXB a left join HIS_YFFY_MZFYZB b on a.FYBPKEY=b.pkey and a.companyid=b.companyid left join HIS_YZ_MXB c on a.yzmx=c.pkey and a.companyid=c.companyid left join HIS_YZ_YPYF d on c.YZYF=d.BM and c.companyid=d.companyid where a.companyid=? and b.FYRQ >=? and b.FYRQ <= ? and b.FYZT=1 and (nvl(a.YZSL,0)-nvl(a.TYSL,0)) > 0 and d.ISJMGY=1 group by b.JZPKEY,to_char(b.FYRQ,'yyyy-mm') order by to_char(b.FYRQ,'yyyy-mm')) group by fyrq order by fyrq
|
||
|
|
||
|
|
||
|
]]></sql>
|
||
|
<fields>
|
||
|
<f name="fyrq" type="12" />
|
||
|
<f name="cfje" type="12" />
|
||
|
<f name="rc" type="12" />
|
||
|
</fields>
|
||
|
<parameter>
|
||
|
<p>12</p>
|
||
|
<p>93</p>
|
||
|
<p>93</p>
|
||
|
</parameter>
|
||
|
</dao>
|
||
|
|
||
|
<dao id="ygyyMzjbqkfxZsgyRcAndJeDao" log="true" type="1"
|
||
|
memo="阳光用药-注射给药人次和注射给药金额,是按照是使用过注射给药的门诊人次,静脉也是属于注射类dao">
|
||
|
<sql><![CDATA[
|
||
|
select fyrq,sum(cfje) cfje,count(*) rc from (
|
||
|
select b.JZPKEY,sum((nvl(a.YZSL,0)-nvl(a.TYSL,0))*a.YZDJ) cfje,to_char(b.FYRQ,'yyyy-mm') fyrq from HIS_YFFY_MZFYMXB a left join HIS_YFFY_MZFYZB b on a.FYBPKEY=b.pkey and a.companyid=b.companyid left join HIS_YZ_MXB c on a.yzmx=c.pkey and a.companyid=c.companyid left join HIS_YZ_YPYF d on c.YZYF=d.BM and c.companyid=d.companyid where a.companyid=? and b.FYRQ >=? and b.FYRQ <= ? and b.FYZT=1 and (nvl(a.YZSL,0)-nvl(a.TYSL,0)) > 0 and (d.ISZSGY=1 or d.ISJMGY=1) group by b.JZPKEY,to_char(b.FYRQ,'yyyy-mm') order by to_char(b.FYRQ,'yyyy-mm')) group by fyrq order by fyrq
|
||
|
|
||
|
|
||
|
]]></sql>
|
||
|
<fields>
|
||
|
<f name="fyrq" type="12" />
|
||
|
<f name="cfje" type="12" />
|
||
|
<f name="rc" type="12" />
|
||
|
</fields>
|
||
|
<parameter>
|
||
|
<p>12</p>
|
||
|
<p>93</p>
|
||
|
<p>93</p>
|
||
|
</parameter>
|
||
|
</dao>
|
||
|
|
||
|
|
||
|
|
||
|
<dao id="ygyyMzjbqkfxKjlywRcAndJeDao" log="true" type="1"
|
||
|
memo="阳光用药-抗菌药物门诊人次和金额,是按照使用过抗菌药物的门诊人次dao">
|
||
|
<sql><![CDATA[
|
||
|
select fyrq,sum(cfje) cfje,count(*) rc from (
|
||
|
select b.JZPKEY,sum((nvl(a.YZSL,0)-nvl(a.TYSL,0))*a.YZDJ) cfje,to_char(b.FYRQ,'yyyy-mm') fyrq from HIS_YFFY_MZFYMXB a left join HIS_YFFY_MZFYZB b on a.FYBPKEY=b.pkey and a.companyid=b.companyid left join HIS_YPXX e on a.yzx=e.BM where a.companyid=? and b.FYRQ >=? and b.FYRQ <= ? and b.FYZT=1 and (nvl(a.YZSL,0)-nvl(a.TYSL,0)) > 0 and (e.GZFL='KSS1' or e.GZFL='KZL1' or e.GZFL='KSS2') group by b.JZPKEY,to_char(b.FYRQ,'yyyy-mm') order by to_char(b.FYRQ,'yyyy-mm')) group by fyrq order by fyrq
|
||
|
]]></sql>
|
||
|
<fields>
|
||
|
<f name="fyrq" type="12" />
|
||
|
<f name="cfje" type="12" />
|
||
|
<f name="rc" type="12" />
|
||
|
</fields>
|
||
|
<parameter>
|
||
|
<p>12</p>
|
||
|
<p>93</p>
|
||
|
<p>93</p>
|
||
|
</parameter>
|
||
|
</dao>
|
||
|
|
||
|
<dao id="ygyyMzjbqkfxKjywCfzsAndJeDao" log="true" type="1"
|
||
|
memo="阳光用药-抗菌药物处方张数、处方金额,是按照以药房发药的为标准,部分退药的处方,不减处方张数,会减掉处方金额dao">
|
||
|
<sql><![CDATA[
|
||
|
select fyrq,sum(cfje) cfje,count(*) cfs from (select b.cfh,sum((nvl(a.YZSL,0)-nvl(a.TYSL,0))*a.YZDJ) cfje,to_char(b.FYRQ,'yyyy-mm') fyrq from HIS_YFFY_MZFYMXB a left join HIS_YFFY_MZFYZB b on a.FYBPKEY=b.pkey and a.companyid=b.companyid left join HIS_YPXX e on a.yzx=e.BM where a.companyid=? and b.FYRQ>=? and b.FYRQ<=? and b.FYZT=1 and (nvl(a.YZSL,0)-nvl(a.TYSL,0)) > 0 and (e.GZFL='KSS1' or e.GZFL='KZL1' or e.GZFL='KSS2') group by b.cfh,to_char(b.FYRQ,'yyyy-mm') order by to_char(b.FYRQ,'yyyy-mm')) group by fyrq order by fyrq
|
||
|
|
||
|
]]></sql>
|
||
|
<fields>
|
||
|
<f name="fyrq" type="12" />
|
||
|
<f name="cfje" type="12" />
|
||
|
<f name="cfs" type="12" />
|
||
|
</fields>
|
||
|
<parameter>
|
||
|
<p>12</p>
|
||
|
<p>93</p>
|
||
|
<p>93</p>
|
||
|
</parameter>
|
||
|
</dao>
|
||
|
|
||
|
|
||
|
<dao id="ygyyMzjbqkfxKjywYpzsDao" log="true" type="1"
|
||
|
memo="阳光用药-抗菌药物药品种数,是按照每张处方药品品种数累加dao">
|
||
|
<sql><![CDATA[
|
||
|
select count(*) ypzs,fyrq from (select count(*) yps,to_char(b.FYRQ,'yyyy-mm') fyrq,a.yzx from HIS_YFFY_MZFYMXB a left join HIS_YFFY_MZFYZB b on a.FYBPKEY=b.pkey and a.companyid=b.companyid left join HIS_YPXX e on a.yzx=e.BM where a.companyid=? and b.FYRQ>=? and b.FYRQ<=? and b.FYZT=1 and (nvl(a.YZSL,0)-nvl(a.TYSL,0)) > 0 and (e.GZFL='KSS1' or e.GZFL='KZL1' or e.GZFL='KSS2') group by to_char(b.FYRQ,'yyyy-mm'),a.yzx order by to_char(b.FYRQ,'yyyy-mm')) group by fyrq order by fyrq
|
||
|
]]></sql>
|
||
|
<fields>
|
||
|
<f name="ypzs" type="12" />
|
||
|
<f name="fyrq" type="12" />
|
||
|
</fields>
|
||
|
<parameter>
|
||
|
<p>12</p>
|
||
|
<p>93</p>
|
||
|
<p>93</p>
|
||
|
</parameter>
|
||
|
</dao>
|
||
|
|
||
|
|
||
|
<dao id="ygyyMzjbqkfxKjywYytsDao" log="true" type="1"
|
||
|
memo="阳光用药-抗菌药物处方用药天数,是按照每张处方最大用药天数之和dao">
|
||
|
<sql><![CDATA[
|
||
|
select fyrq,sum(maxts) yyts from (select fyrq,cfh,max(nvl(yzts,0)) maxts from (select to_char(b.FYRQ,'yyyy-mm') fyrq,b.cfh,a.yzx,c.yzts from HIS_YFFY_MZFYMXB a left join HIS_YFFY_MZFYZB b on a.FYBPKEY=b.pkey and a.companyid=b.companyid left join HIS_YZ_MXB c on a.yzmx=c.pkey and a.companyid=c.companyid left join HIS_YPXX e on a.yzx=e.BM where a.companyid=? and b.FYRQ>=? and b.FYRQ<=? and b.FYZT=1 and (nvl(a.YZSL,0)-nvl(a.TYSL,0)) > 0 and (e.GZFL='KSS1' or e.GZFL='KZL1' or e.GZFL='KSS2')) group by fyrq,cfh order by fyrq,cfh) group by fyrq order by fyrq
|
||
|
|
||
|
|
||
|
]]></sql>
|
||
|
<fields>
|
||
|
<f name="fyrq" type="12" />
|
||
|
<f name="yyts" type="12" />
|
||
|
</fields>
|
||
|
<parameter>
|
||
|
<p>12</p>
|
||
|
<p>93</p>
|
||
|
<p>93</p>
|
||
|
</parameter>
|
||
|
</dao>
|
||
|
|
||
|
|
||
|
<dao id="ygyyMzjbqkfxZsyyCfzsAndjeDao" log="true" type="1"
|
||
|
memo="阳光用药-注射用药处方张数、处方金额,是按照以药房发药的为标准,部分退药的处方,不减处方张数,会减掉处方金额dao">
|
||
|
<sql><![CDATA[
|
||
|
select fyrq,sum(cfje) cfje,count(*) cfs from (select b.cfh,sum((nvl(a.YZSL,0)-nvl(a.TYSL,0))*a.YZDJ) cfje,to_char(b.FYRQ,'yyyy-mm') fyrq from HIS_YFFY_MZFYMXB a left join HIS_YFFY_MZFYZB b on a.FYBPKEY=b.pkey and a.companyid=b.companyid left join HIS_YZ_MXB c on a.yzmx=c.pkey and a.companyid=c.companyid left join HIS_YZ_YPYF d on c.YZYF=d.BM and c.companyid=d.companyid where a.companyid=? and b.FYRQ>=? and b.FYRQ<=? and b.FYZT=1 and (nvl(a.YZSL,0)-nvl(a.TYSL,0)) > 0 and (d.ISZSGY=1 or d.ISJMGY=1) group by b.cfh,to_char(b.FYRQ,'yyyy-mm') order by to_char(b.FYRQ,'yyyy-mm')) group by fyrq order by fyrq
|
||
|
|
||
|
]]></sql>
|
||
|
<fields>
|
||
|
<f name="fyrq" type="12" />
|
||
|
<f name="cfje" type="12" />
|
||
|
<f name="cfs" type="12" />
|
||
|
</fields>
|
||
|
<parameter>
|
||
|
<p>12</p>
|
||
|
<p>93</p>
|
||
|
<p>93</p>
|
||
|
</parameter>
|
||
|
</dao>
|
||
|
|
||
|
|
||
|
<dao id="ygyyMzjbqkfxKjywZsgyRcAndJeDao" log="true" type="1"
|
||
|
memo="阳光用药-抗菌类注射给药人次和金额,是按照是使用过注射抗菌药物的门诊人次dao">
|
||
|
<sql><![CDATA[
|
||
|
select fyrq,sum(cfje) cfje,count(*) rc from (
|
||
|
select b.JZPKEY,sum((nvl(a.YZSL,0)-nvl(a.TYSL,0))*a.YZDJ) cfje,to_char(b.FYRQ,'yyyy-mm') fyrq from HIS_YFFY_MZFYMXB a left join HIS_YFFY_MZFYZB b on a.FYBPKEY=b.pkey and a.companyid=b.companyid left join HIS_YZ_MXB c on a.yzmx=c.pkey and a.companyid=c.companyid left join HIS_YZ_YPYF d on c.YZYF=d.BM and c.companyid=d.companyid left join HIS_YPXX e on a.yzx=e.BM where a.companyid=? and b.FYRQ >=? and b.FYRQ <= ? and b.FYZT=1 and (nvl(a.YZSL,0)-nvl(a.TYSL,0)) > 0 and (d.ISZSGY=1 or d.ISJMGY=1) and (e.GZFL='KSS1' or e.GZFL='KZL1' or e.GZFL='KSS2') group by b.JZPKEY,to_char(b.FYRQ,'yyyy-mm') order by to_char(b.FYRQ,'yyyy-mm')) group by fyrq order by fyrq
|
||
|
|
||
|
|
||
|
]]></sql>
|
||
|
<fields>
|
||
|
<f name="fyrq" type="12" />
|
||
|
<f name="cfje" type="12" />
|
||
|
<f name="rc" type="12" />
|
||
|
</fields>
|
||
|
<parameter>
|
||
|
<p>12</p>
|
||
|
<p>93</p>
|
||
|
<p>93</p>
|
||
|
</parameter>
|
||
|
</dao>
|
||
|
|
||
|
|
||
|
<dao id="ygyyMzjbqkfxKjywJmgyRcAndJeDao" log="true" type="1"
|
||
|
memo="阳光用药-抗菌类静脉给药人次和金额,是按照是使用过静脉抗菌药物的门诊人次dao">
|
||
|
<sql><![CDATA[
|
||
|
select fyrq,sum(cfje) cfje,count(*) rc from (
|
||
|
select b.JZPKEY,sum((nvl(a.YZSL,0)-nvl(a.TYSL,0))*a.YZDJ) cfje,to_char(b.FYRQ,'yyyy-mm') fyrq from HIS_YFFY_MZFYMXB a left join HIS_YFFY_MZFYZB b on a.FYBPKEY=b.pkey and a.companyid=b.companyid left join HIS_YZ_MXB c on a.yzmx=c.pkey and a.companyid=c.companyid left join HIS_YZ_YPYF d on c.YZYF=d.BM and c.companyid=d.companyid left join HIS_YPXX e on a.yzx=e.BM where a.companyid=? and b.FYRQ >=? and b.FYRQ <= ? and b.FYZT=1 and (nvl(a.YZSL,0)-nvl(a.TYSL,0)) > 0 and d.ISJMGY=1 and (e.GZFL='KSS1' or e.GZFL='KZL1' or e.GZFL='KSS2') group by b.JZPKEY,to_char(b.FYRQ,'yyyy-mm') order by to_char(b.FYRQ,'yyyy-mm')) group by fyrq order by fyrq
|
||
|
|
||
|
|
||
|
]]></sql>
|
||
|
<fields>
|
||
|
<f name="fyrq" type="12" />
|
||
|
<f name="cfje" type="12" />
|
||
|
<f name="rc" type="12" />
|
||
|
</fields>
|
||
|
<parameter>
|
||
|
<p>12</p>
|
||
|
<p>93</p>
|
||
|
<p>93</p>
|
||
|
</parameter>
|
||
|
</dao>
|
||
|
|
||
|
<dao id="ygyyMzjbqkfxZcyCfzsAndJeDao" log="true" type="1"
|
||
|
memo="阳光用药-中草药处方张数、处方金额,是按照以药房发药的为标准,部分退药的处方,不减处方张数,会减掉处方金额dao">
|
||
|
<sql><![CDATA[
|
||
|
select fyrq,sum(cfje) cfje,count(*) cfs from (select b.cfh,sum((nvl(a.YZSL,0)-nvl(a.TYSL,0))*a.YZDJ) cfje,to_char(b.FYRQ,'yyyy-mm') fyrq from HIS_YFFY_MZFYMXB a left join HIS_YFFY_MZFYZB b on a.FYBPKEY=b.pkey and a.companyid=b.companyid left join HIS_YZ_MXB c on a.yzmx=c.pkey and a.companyid=c.companyid where a.companyid=? and b.FYRQ>=? and b.FYRQ<=? and b.FYZT=1 and c.YZLB='03' and (nvl(a.YZSL,0)-nvl(a.TYSL,0)) > 0 group by b.cfh,to_char(b.FYRQ,'yyyy-mm') order by to_char(b.FYRQ,'yyyy-mm')) group by fyrq order by fyrq
|
||
|
|
||
|
]]></sql>
|
||
|
<fields>
|
||
|
<f name="fyrq" type="12" />
|
||
|
<f name="cfje" type="12" />
|
||
|
<f name="cfs" type="12" />
|
||
|
</fields>
|
||
|
<parameter>
|
||
|
<p>12</p>
|
||
|
<p>93</p>
|
||
|
<p>93</p>
|
||
|
</parameter>
|
||
|
</dao>
|
||
|
|
||
|
|
||
|
|
||
|
<dao id="ygyyMzksyyjkShowDao" 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" />
|
||
|
<f name="处方用药天数张数" type="1" />
|
||
|
</fields>
|
||
|
</dao>
|
||
|
|
||
|
<dao id="ygyyMzksyyjkSCfzsAndJeDao" log="true" type="1"
|
||
|
memo="阳光用药-门诊科室用药监控-处方张数、处方金额,是按照以药房发药的为标准,部分退药的处方,不减处方张数,会减掉处方金额dao">
|
||
|
<sql><![CDATA[
|
||
|
select jjks,cfje,cfs from (select jjks,sum(cfje) cfje,count(*) cfs from (select c.jjks,b.cfh,sum((nvl(a.YZSL,0)-nvl(a.TYSL,0))*a.YZDJ) cfje from HIS_YFFY_MZFYMXB a left join HIS_YFFY_MZFYZB b on a.FYBPKEY=b.pkey and a.companyid=b.companyid left join HIS_JZ_BASEINFO c on b.jzpkey=c.pkey and b.companyid=c.companyid where a.companyid=? and c.jjks like ? and b.FYRQ>=? and b.FYRQ<=? and b.FYZT=1 and (nvl(a.YZSL,0)-nvl(a.TYSL,0)) > 0 group by c.jjks,b.cfh) group by jjks )order by cfje desc
|
||
|
|
||
|
]]></sql>
|
||
|
<fields>
|
||
|
<f name="jjks" type="12" />
|
||
|
<f name="cfje" type="12" />
|
||
|
<f name="cfs" type="12" />
|
||
|
</fields>
|
||
|
<parameter>
|
||
|
<p>12</p>
|
||
|
<p>12</p>
|
||
|
<p>93</p>
|
||
|
<p>93</p>
|
||
|
</parameter>
|
||
|
</dao>
|
||
|
|
||
|
|
||
|
<dao id="ygyyMzksyyjkSYpzsDao" log="true" type="1"
|
||
|
memo="阳光用药-门诊科室用药监控-药品总数,是按照每张处方药品品种数累加dao">
|
||
|
<sql><![CDATA[
|
||
|
select count(*) ypzs,jjks from (select c.jjks,count(*) yps,a.yzx from HIS_YFFY_MZFYMXB a left join HIS_YFFY_MZFYZB b on a.FYBPKEY=b.pkey and a.companyid=b.companyid left join HIS_JZ_BASEINFO c on b.jzpkey=c.pkey and b.companyid=c.companyid where a.companyid=? and c.jjks like ? and b.FYRQ>=? and b.FYRQ<=? and b.FYZT=1 and (nvl(a.YZSL,0)-nvl(a.TYSL,0)) > 0 group by c.jjks,a.yzx) group by jjks
|
||
|
]]></sql>
|
||
|
<fields>
|
||
|
<f name="ypzs" 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="ygyyMzksyyjkSYytsDao" log="true" type="1"
|
||
|
memo="阳光用药-门诊科室用药监控-处方用药天数,是按照每张处方最大用药天数之和dao">
|
||
|
<sql><![CDATA[
|
||
|
select jjks,sum(maxts) yyts from (select jjks,cfh,max(nvl(yzts,0)) maxts from (select d.jjks,b.cfh,a.yzx,c.yzts from HIS_YFFY_MZFYMXB a left join HIS_YFFY_MZFYZB b on a.FYBPKEY=b.pkey and a.companyid=b.companyid left join HIS_YZ_MXB c on a.yzmx=c.pkey and a.companyid=c.companyid left join HIS_JZ_BASEINFO d on b.jzpkey=d.pkey and b.companyid=d.companyid where a.companyid=? and d.jjks like ? and b.FYRQ>=? and b.FYRQ<=? and b.FYZT=1 and (nvl(a.YZSL,0)-nvl(a.TYSL,0)) > 0 ) group by jjks,cfh order by jjks,cfh) group by jjks
|
||
|
|
||
|
|
||
|
]]></sql>
|
||
|
<fields>
|
||
|
<f name="jjks" type="12" />
|
||
|
<f name="yyts" type="12" />
|
||
|
</fields>
|
||
|
<parameter>
|
||
|
<p>12</p>
|
||
|
<p>12</p>
|
||
|
<p>93</p>
|
||
|
<p>93</p>
|
||
|
</parameter>
|
||
|
</dao>
|
||
|
|
||
|
<dao id="ygyyMzysyyjkShowDao" 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" />
|
||
|
<f name="处方用药天数张数" type="1" />
|
||
|
</fields>
|
||
|
</dao>
|
||
|
|
||
|
|
||
|
<dao id="ygyyMzysyyjkSCfzsAndJeDao" log="true" type="1"
|
||
|
memo="阳光用药-门诊医生用药监控-处方张数、处方金额,是按照以药房发药的为标准,部分退药的处方,不减处方张数,会减掉处方金额dao">
|
||
|
<sql><![CDATA[
|
||
|
select JJYS,cfje,cfs from (select JJYS,sum(cfje) cfje,count(*) cfs from (select c.JJYS,b.cfh,sum((nvl(a.YZSL,0)-nvl(a.TYSL,0))*a.YZDJ) cfje from HIS_YFFY_MZFYMXB a left join HIS_YFFY_MZFYZB b on a.FYBPKEY=b.pkey and a.companyid=b.companyid left join HIS_JZ_BASEINFO c on b.jzpkey=c.pkey and b.companyid=c.companyid where a.companyid=? and c.jjys like ? and b.FYRQ>=? and b.FYRQ<=? and b.FYZT=1 and (nvl(a.YZSL,0)-nvl(a.TYSL,0)) > 0 group by c.JJYS,b.cfh) group by JJYS )order by cfje desc
|
||
|
|
||
|
|
||
|
]]></sql>
|
||
|
<fields>
|
||
|
<f name="JJYS" type="12" />
|
||
|
<f name="cfje" type="12" />
|
||
|
<f name="cfs" type="12" />
|
||
|
</fields>
|
||
|
<parameter>
|
||
|
<p>12</p>
|
||
|
<p>12</p>
|
||
|
<p>93</p>
|
||
|
<p>93</p>
|
||
|
</parameter>
|
||
|
</dao>
|
||
|
|
||
|
|
||
|
<dao id="ygyyMzysyyjkSYpzsDao" log="true" type="1"
|
||
|
memo="阳光用药-门诊医生用药监控-药品总数,是按照每张处方药品品种数累加dao">
|
||
|
<sql><![CDATA[
|
||
|
select count(*) ypzs,JJYS from (select c.JJYS,count(*) yps,a.yzx from HIS_YFFY_MZFYMXB a left join HIS_YFFY_MZFYZB b on a.FYBPKEY=b.pkey and a.companyid=b.companyid left join HIS_JZ_BASEINFO c on b.jzpkey=c.pkey and b.companyid=c.companyid where a.companyid=? and c.jjys like ? and b.FYRQ>=? and b.FYRQ<=? and b.FYZT=1 and (nvl(a.YZSL,0)-nvl(a.TYSL,0)) > 0 group by c.JJYS,a.yzx) group by JJYS
|
||
|
|
||
|
|
||
|
]]></sql>
|
||
|
<fields>
|
||
|
<f name="ypzs" 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="ygyyMzysyyjkSYytsDao" log="true" type="1"
|
||
|
memo="阳光用药-门诊医生用药监控-处方用药天数,是按照每张处方最大用药天数之和dao">
|
||
|
<sql><![CDATA[
|
||
|
select JJYS,sum(maxts) yyts from (select JJYS,cfh,max(nvl(yzts,0)) maxts from (select d.JJYS,b.cfh,a.yzx,c.yzts from HIS_YFFY_MZFYMXB a left join HIS_YFFY_MZFYZB b on a.FYBPKEY=b.pkey and a.companyid=b.companyid left join HIS_YZ_MXB c on a.yzmx=c.pkey and a.companyid=c.companyid left join HIS_JZ_BASEINFO d on b.jzpkey=d.pkey and b.companyid=d.companyid where a.companyid=? and d.jjys like ? and b.FYRQ>=? and b.FYRQ<=? and b.FYZT=1 and (nvl(a.YZSL,0)-nvl(a.TYSL,0)) > 0 ) group by JJYS,cfh order by JJYS,cfh) group by JJYS
|
||
|
|
||
|
|
||
|
]]></sql>
|
||
|
<fields>
|
||
|
<f name="JJYS" type="12" />
|
||
|
<f name="yyts" type="12" />
|
||
|
</fields>
|
||
|
<parameter>
|
||
|
<p>12</p>
|
||
|
<p>12</p>
|
||
|
<p>93</p>
|
||
|
<p>93</p>
|
||
|
</parameter>
|
||
|
</dao>
|
||
|
|
||
|
|
||
|
<dao id="ygyyMzKsyyzhfxShowDao" 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" />
|
||
|
<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="ygyyMzKsyyzhfxMzrcAndJeDao" log="true" type="1"
|
||
|
memo="阳光用药-门诊科室用药综合分析-处方总人次,处方总金额,是按照病人挂号接诊时间为主,只要病人挂号交费并开有医生处方就算一个处方人次dao">
|
||
|
<sql><![CDATA[
|
||
|
select count(*) mzrc,sum(fy) fy,jjks from (select sum(d.SFXSJZFY) fy,a.jjks,a.pkey from HIS_JZ_BASEINFO a left join HIS_SFZD_ZB b on a.pkey=b.jzpkey and a.companyid=b.companyid left join HIS_MZJS_MZFPZB c on b.pkey=c.GLZDBPKEY and b.companyid=c.companyid left join HIS_SFZD_SFXMXB d on b.pkey=d.ZDZBPKEY and b.companyid=d.companyid where a.companyid=? and a.jjks like ? and c.SFRQ >=? and c.SFRQ <= ? and (a.JZLX='M' or a.JZLX='J' ) and c.SFZT = 1 and a.JZZT='J' group by a.jjks,a.pkey order by a.jjks) group by jjks order by jjks
|
||
|
|
||
|
]]></sql>
|
||
|
<fields>
|
||
|
<f name="mzrc" type="4" />
|
||
|
<f name="fy" 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="ygyyMzKsyyzhfxCfzsAndJeDao" log="true" type="1"
|
||
|
memo="阳光用药-门诊科室用药综合分析-处方张数、处方金额,是按照以药房发药的为标准,部分退药的处方,不减处方张数,会减掉处方金额dao">
|
||
|
<sql><![CDATA[
|
||
|
select jjks,sum(cfje) cfje,count(*) cfs from (select b.cfh,sum((nvl(a.YZSL,0)-nvl(a.TYSL,0))*a.YZDJ) cfje,c.jjks from HIS_YFFY_MZFYMXB a left join HIS_YFFY_MZFYZB b on a.FYBPKEY=b.pkey and a.companyid=b.companyid left join HIS_JZ_BASEINFO c on b.jzpkey=c.pkey and b.companyid=c.companyid where a.companyid=? and c.jjks like ? and b.FYRQ>=? and b.FYRQ<=? and b.FYZT=1 and (nvl(a.YZSL,0)-nvl(a.TYSL,0)) > 0 group by b.cfh,c.jjks order by c.jjks) group by jjks order by jjks
|
||
|
|
||
|
]]></sql>
|
||
|
<fields>
|
||
|
<f name="jjks" type="12" />
|
||
|
<f name="cfje" type="12" />
|
||
|
<f name="cfs" type="12" />
|
||
|
</fields>
|
||
|
<parameter>
|
||
|
<p>12</p>
|
||
|
<p>12</p>
|
||
|
<p>93</p>
|
||
|
<p>93</p>
|
||
|
</parameter>
|
||
|
</dao>
|
||
|
|
||
|
|
||
|
|
||
|
<dao id="ygyyMzKsyyzhfxYpzsDao" log="true" type="1"
|
||
|
memo="阳光用药-门诊科室用药综合分析-药品总数,是按照每张处方药品品种数累加dao">
|
||
|
<sql><![CDATA[
|
||
|
select count(*) ypzs,jjks from (select count(*) yps,c.jjks,a.yzx from HIS_YFFY_MZFYMXB a left join HIS_YFFY_MZFYZB b on a.FYBPKEY=b.pkey and a.companyid=b.companyid left join HIS_JZ_BASEINFO c on b.jzpkey=c.pkey and b.companyid=c.companyid where a.companyid=? and c.jjks like ? and b.FYRQ>=? and b.FYRQ<=? and b.FYZT=1 and (nvl(a.YZSL,0)-nvl(a.TYSL,0)) > 0 group by c.jjks,a.yzx order by c.jjks ) group by jjks order by jjks
|
||
|
]]></sql>
|
||
|
<fields>
|
||
|
<f name="ypzs" 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="ygyyMzKsyyzhfxYytsDao" log="true" type="1"
|
||
|
memo="阳光用药-门诊科室用药综合分析-处方用药天数,是按照每张处方最大用药天数之和dao">
|
||
|
<sql><![CDATA[
|
||
|
select jjks,sum(maxts) yyts from (select jjks,cfh,max(nvl(yzts,0)) maxts from (select d.jjks,b.cfh,a.yzx,c.yzts from HIS_YFFY_MZFYMXB a left join HIS_YFFY_MZFYZB b on a.FYBPKEY=b.pkey and a.companyid=b.companyid left join HIS_YZ_MXB c on a.yzmx=c.pkey and a.companyid=c.companyid left join HIS_JZ_BASEINFO d on b.jzpkey=d.pkey and b.companyid=d.companyid where a.companyid=? and d.jjks like ? and b.FYRQ>=? and b.FYRQ<=? and b.FYZT=1 and (nvl(a.YZSL,0)-nvl(a.TYSL,0)) > 0 ) group by jjks,cfh order by jjks,cfh) group by jjks order by jjks
|
||
|
|
||
|
|
||
|
]]></sql>
|
||
|
<fields>
|
||
|
<f name="jjks" type="12" />
|
||
|
<f name="yyts" type="12" />
|
||
|
</fields>
|
||
|
<parameter>
|
||
|
<p>12</p>
|
||
|
<p>12</p>
|
||
|
<p>93</p>
|
||
|
<p>93</p>
|
||
|
</parameter>
|
||
|
</dao>
|
||
|
|
||
|
<dao id="ygyyMzKsyyzhfxJmgyRcAndJeDao" log="true" type="1"
|
||
|
memo="阳光用药-门诊科室用药综合分析-静脉给药人次和静脉给药金额,是按照是使用过静脉给药的门诊人次dao">
|
||
|
<sql><![CDATA[
|
||
|
select jjks,sum(cfje) cfje,count(*) rc from (
|
||
|
select b.JZPKEY,sum((nvl(a.YZSL,0)-nvl(a.TYSL,0))*a.YZDJ) cfje,e.jjks from HIS_YFFY_MZFYMXB a left join HIS_YFFY_MZFYZB b on a.FYBPKEY=b.pkey and a.companyid=b.companyid left join HIS_YZ_MXB c on a.yzmx=c.pkey and a.companyid=c.companyid left join HIS_YZ_YPYF d on c.YZYF=d.BM and c.companyid=d.companyid left join HIS_JZ_BASEINFO e on b.jzpkey=e.pkey and b.companyid=e.companyid where a.companyid=? and e.jjks like ? and b.FYRQ >=? and b.FYRQ <= ? and b.FYZT=1 and (nvl(a.YZSL,0)-nvl(a.TYSL,0)) > 0 and d.ISJMGY=1 group by b.JZPKEY,e.jjks order by e.jjks) group by jjks order by jjks
|
||
|
|
||
|
|
||
|
]]></sql>
|
||
|
<fields>
|
||
|
<f name="jjks" type="12" />
|
||
|
<f name="cfje" type="12" />
|
||
|
<f name="rc" type="12" />
|
||
|
</fields>
|
||
|
<parameter>
|
||
|
<p>12</p>
|
||
|
<p>12</p>
|
||
|
<p>93</p>
|
||
|
<p>93</p>
|
||
|
</parameter>
|
||
|
</dao>
|
||
|
|
||
|
<dao id="ygyyMzKsyyzhfxZsgyRcAndJeDao" log="true" type="1"
|
||
|
memo="阳光用药-门诊科室用药综合分析-注射给药人次和注射给药金额,是按照是使用过注射给药的门诊人次,静脉也是属于注射类dao">
|
||
|
<sql><![CDATA[
|
||
|
select jjks,sum(cfje) cfje,count(*) rc from (
|
||
|
select b.JZPKEY,sum((nvl(a.YZSL,0)-nvl(a.TYSL,0))*a.YZDJ) cfje,e.jjks from HIS_YFFY_MZFYMXB a left join HIS_YFFY_MZFYZB b on a.FYBPKEY=b.pkey and a.companyid=b.companyid left join HIS_YZ_MXB c on a.yzmx=c.pkey and a.companyid=c.companyid left join HIS_YZ_YPYF d on c.YZYF=d.BM and c.companyid=d.companyid left join HIS_JZ_BASEINFO e on b.jzpkey=e.pkey and b.companyid=e.companyid where a.companyid=? and e.jjks like ? and b.FYRQ >=? and b.FYRQ <= ? and b.FYZT=1 and (nvl(a.YZSL,0)-nvl(a.TYSL,0)) > 0 and (d.ISZSGY=1 or d.ISJMGY=1) group by b.JZPKEY,e.jjks order by e.jjks) group by jjks order by jjks
|
||
|
|
||
|
|
||
|
]]></sql>
|
||
|
<fields>
|
||
|
<f name="jjks" type="12" />
|
||
|
<f name="cfje" type="12" />
|
||
|
<f name="rc" type="12" />
|
||
|
</fields>
|
||
|
<parameter>
|
||
|
<p>12</p>
|
||
|
<p>12</p>
|
||
|
<p>93</p>
|
||
|
<p>93</p>
|
||
|
</parameter>
|
||
|
</dao>
|
||
|
|
||
|
|
||
|
|
||
|
<dao id="ygyyMzKsyyzhfxKjlywRcAndJeDao" log="true" type="1"
|
||
|
memo="阳光用药-门诊科室用药综合分析-抗菌药物门诊人次和金额,是按照使用过抗菌药物的门诊人次dao">
|
||
|
<sql><![CDATA[
|
||
|
select jjks,sum(cfje) cfje,count(*) rc from (
|
||
|
select b.JZPKEY,sum((nvl(a.YZSL,0)-nvl(a.TYSL,0))*a.YZDJ) cfje,c.jjks from HIS_YFFY_MZFYMXB a left join HIS_YFFY_MZFYZB b on a.FYBPKEY=b.pkey and a.companyid=b.companyid left join HIS_YPXX e on a.yzx=e.BM left join HIS_JZ_BASEINFO c on b.jzpkey=c.pkey and b.companyid=c.companyid where a.companyid=? and c.jjks like ? and b.FYRQ >=? and b.FYRQ <= ? and b.FYZT=1 and (nvl(a.YZSL,0)-nvl(a.TYSL,0)) > 0 and (e.GZFL='KSS1' or e.GZFL='KZL1' or e.GZFL='KSS2') group by b.JZPKEY,c.jjks order by c.jjks) group by jjks order by jjks
|
||
|
]]></sql>
|
||
|
<fields>
|
||
|
<f name="jjks" type="12" />
|
||
|
<f name="cfje" type="12" />
|
||
|
<f name="rc" type="12" />
|
||
|
</fields>
|
||
|
<parameter>
|
||
|
<p>12</p>
|
||
|
<p>12</p>
|
||
|
<p>93</p>
|
||
|
<p>93</p>
|
||
|
</parameter>
|
||
|
</dao>
|
||
|
|
||
|
<dao id="ygyyMzKsyyzhfxKjywCfzsAndJeDao" log="true" type="1"
|
||
|
memo="阳光用药-门诊科室用药综合分析-抗菌药物处方张数、处方金额,是按照以药房发药的为标准,部分退药的处方,不减处方张数,会减掉处方金额dao">
|
||
|
<sql><![CDATA[
|
||
|
select jjks,sum(cfje) cfje,count(*) cfs from (select b.cfh,sum((nvl(a.YZSL,0)-nvl(a.TYSL,0))*a.YZDJ) cfje,c.jjks from HIS_YFFY_MZFYMXB a left join HIS_YFFY_MZFYZB b on a.FYBPKEY=b.pkey and a.companyid=b.companyid left join HIS_YPXX e on a.yzx=e.BM left join HIS_JZ_BASEINFO c on b.jzpkey=c.pkey and b.companyid=c.companyid where a.companyid=? and c.jjks like ? and b.FYRQ>=? and b.FYRQ<=? and b.FYZT=1 and (nvl(a.YZSL,0)-nvl(a.TYSL,0)) > 0 and (e.GZFL='KSS1' or e.GZFL='KZL1' or e.GZFL='KSS2') group by b.cfh,c.jjks order by c.jjks) group by jjks order by jjks
|
||
|
|
||
|
]]></sql>
|
||
|
<fields>
|
||
|
<f name="jjks" type="12" />
|
||
|
<f name="cfje" type="12" />
|
||
|
<f name="cfs" type="12" />
|
||
|
</fields>
|
||
|
<parameter>
|
||
|
<p>12</p>
|
||
|
<p>12</p>
|
||
|
<p>93</p>
|
||
|
<p>93</p>
|
||
|
</parameter>
|
||
|
</dao>
|
||
|
|
||
|
|
||
|
<dao id="ygyyMzKsyyzhfxKjywYpzsDao" log="true" type="1"
|
||
|
memo="阳光用药-门诊科室用药综合分析-抗菌药物药品种数,是按照每张处方药品品种数累加dao">
|
||
|
<sql><![CDATA[
|
||
|
select count(*) ypzs,jjks from (select count(*) yps,c.jjks,a.yzx from HIS_YFFY_MZFYMXB a left join HIS_YFFY_MZFYZB b on a.FYBPKEY=b.pkey and a.companyid=b.companyid left join HIS_YPXX e on a.yzx=e.BM left join HIS_JZ_BASEINFO c on b.jzpkey=c.pkey and b.companyid=c.companyid where a.companyid=? and c.jjks like ? and b.FYRQ>=? and b.FYRQ<=? and b.FYZT=1 and (nvl(a.YZSL,0)-nvl(a.TYSL,0)) > 0 and (e.GZFL='KSS1' or e.GZFL='KZL1' or e.GZFL='KSS2') group by c.jjks,a.yzx order by c.jjks) group by jjks order by jjks
|
||
|
]]></sql>
|
||
|
<fields>
|
||
|
<f name="ypzs" 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="ygyyMzKsyyzhfxKjywYytsDao" log="true" type="1"
|
||
|
memo="阳光用药-门诊科室用药综合分析-抗菌药物处方用药天数,是按照每张处方最大用药天数之和dao">
|
||
|
<sql><![CDATA[
|
||
|
select jjks,sum(maxts) yyts from (select jjks,cfh,max(nvl(yzts,0)) maxts from (select d.jjks,b.cfh,a.yzx,c.yzts from HIS_YFFY_MZFYMXB a left join HIS_YFFY_MZFYZB b on a.FYBPKEY=b.pkey and a.companyid=b.companyid left join HIS_YZ_MXB c on a.yzmx=c.pkey and a.companyid=c.companyid left join HIS_YPXX e on a.yzx=e.BM left join HIS_JZ_BASEINFO d on b.jzpkey=d.pkey and b.companyid=d.companyid where a.companyid=? and d.jjks like ? and b.FYRQ>=? and b.FYRQ<=? and b.FYZT=1 and (nvl(a.YZSL,0)-nvl(a.TYSL,0)) > 0 and (e.GZFL='KSS1' or e.GZFL='KZL1' or e.GZFL='KSS2')) group by jjks,cfh order by jjks,cfh) group by jjks order by jjks
|
||
|
|
||
|
|
||
|
]]></sql>
|
||
|
<fields>
|
||
|
<f name="jjks" type="12" />
|
||
|
<f name="yyts" type="12" />
|
||
|
</fields>
|
||
|
<parameter>
|
||
|
<p>12</p>
|
||
|
<p>12</p>
|
||
|
<p>93</p>
|
||
|
<p>93</p>
|
||
|
</parameter>
|
||
|
</dao>
|
||
|
|
||
|
|
||
|
<dao id="ygyyMzKsyyzhfxZsyyCfzsAndjeDao" log="true" type="1"
|
||
|
memo="阳光用药-门诊科室用药综合分析-注射用药处方张数、处方金额,是按照以药房发药的为标准,部分退药的处方,不减处方张数,会减掉处方金额dao">
|
||
|
<sql><![CDATA[
|
||
|
select jjks,sum(cfje) cfje,count(*) cfs from (select b.cfh,sum((nvl(a.YZSL,0)-nvl(a.TYSL,0))*a.YZDJ) cfje,e.jjks from HIS_YFFY_MZFYMXB a left join HIS_YFFY_MZFYZB b on a.FYBPKEY=b.pkey and a.companyid=b.companyid left join HIS_YZ_MXB c on a.yzmx=c.pkey and a.companyid=c.companyid left join HIS_YZ_YPYF d on c.YZYF=d.BM and c.companyid=d.companyid left join HIS_JZ_BASEINFO e on b.jzpkey=e.pkey and b.companyid=e.companyid where a.companyid=? and e.jjks like ? and b.FYRQ>=? and b.FYRQ<=? and b.FYZT=1 and (nvl(a.YZSL,0)-nvl(a.TYSL,0)) > 0 and (d.ISZSGY=1 or d.ISJMGY=1) group by b.cfh,e.jjks order by e.jjks) group by jjks order by jjks
|
||
|
|
||
|
]]></sql>
|
||
|
<fields>
|
||
|
<f name="jjks" type="12" />
|
||
|
<f name="cfje" type="12" />
|
||
|
<f name="cfs" type="12" />
|
||
|
</fields>
|
||
|
<parameter>
|
||
|
<p>12</p>
|
||
|
<p>12</p>
|
||
|
<p>93</p>
|
||
|
<p>93</p>
|
||
|
</parameter>
|
||
|
</dao>
|
||
|
|
||
|
|
||
|
<dao id="ygyyMzKsyyzhfxKjywZsgyRcAndJeDao" log="true" type="1"
|
||
|
memo="阳光用药-门诊科室用药综合分析-抗菌类注射给药人次和金额,是按照是使用过注射抗菌药物的门诊人次dao">
|
||
|
<sql><![CDATA[
|
||
|
select jjks,sum(cfje) cfje,count(*) rc from (
|
||
|
select b.JZPKEY,sum((nvl(a.YZSL,0)-nvl(a.TYSL,0))*a.YZDJ) cfje,f.jjks from HIS_YFFY_MZFYMXB a left join HIS_YFFY_MZFYZB b on a.FYBPKEY=b.pkey and a.companyid=b.companyid left join HIS_YZ_MXB c on a.yzmx=c.pkey and a.companyid=c.companyid left join HIS_YZ_YPYF d on c.YZYF=d.BM and c.companyid=d.companyid left join HIS_YPXX e on a.yzx=e.BM left join HIS_JZ_BASEINFO f on b.jzpkey=f.pkey and b.companyid=f.companyid where a.companyid=? and f.jjks like ? and b.FYRQ >=? and b.FYRQ <= ? and b.FYZT=1 and (nvl(a.YZSL,0)-nvl(a.TYSL,0)) > 0 and (d.ISZSGY=1 or d.ISJMGY=1) and (e.GZFL='KSS1' or e.GZFL='KZL1' or e.GZFL='KSS2') group by b.JZPKEY,f.jjks order by f.jjks) group by jjks order by jjks
|
||
|
|
||
|
|
||
|
]]></sql>
|
||
|
<fields>
|
||
|
<f name="jjks" type="12" />
|
||
|
<f name="cfje" type="12" />
|
||
|
<f name="rc" type="12" />
|
||
|
</fields>
|
||
|
<parameter>
|
||
|
<p>12</p>
|
||
|
<p>12</p>
|
||
|
<p>93</p>
|
||
|
<p>93</p>
|
||
|
</parameter>
|
||
|
</dao>
|
||
|
|
||
|
|
||
|
<dao id="ygyyMzKsyyzhfxKjywJmgyRcAndJeDao" log="true" type="1"
|
||
|
memo="阳光用药-门诊科室用药综合分析-抗菌类静脉给药人次和金额,是按照是使用过静脉抗菌药物的门诊人次dao">
|
||
|
<sql><![CDATA[
|
||
|
select jjks,sum(cfje) cfje,count(*) rc from (
|
||
|
select b.JZPKEY,sum((nvl(a.YZSL,0)-nvl(a.TYSL,0))*a.YZDJ) cfje,f.jjks from HIS_YFFY_MZFYMXB a left join HIS_YFFY_MZFYZB b on a.FYBPKEY=b.pkey and a.companyid=b.companyid left join HIS_YZ_MXB c on a.yzmx=c.pkey and a.companyid=c.companyid left join HIS_YZ_YPYF d on c.YZYF=d.BM and c.companyid=d.companyid left join HIS_YPXX e on a.yzx=e.BM left join HIS_JZ_BASEINFO f on b.jzpkey=f.pkey and b.companyid=f.companyid where a.companyid=? and f.jjks like ? and b.FYRQ >=? and b.FYRQ <= ? and b.FYZT=1 and (nvl(a.YZSL,0)-nvl(a.TYSL,0)) > 0 and d.ISJMGY=1 and (e.GZFL='KSS1' or e.GZFL='KZL1' or e.GZFL='KSS2') group by b.JZPKEY,f.jjks order by f.jjks) group by jjks order by jjks
|
||
|
|
||
|
|
||
|
]]></sql>
|
||
|
<fields>
|
||
|
<f name="jjks" type="12" />
|
||
|
<f name="cfje" type="12" />
|
||
|
<f name="rc" type="12" />
|
||
|
</fields>
|
||
|
<parameter>
|
||
|
<p>12</p>
|
||
|
<p>12</p>
|
||
|
<p>93</p>
|
||
|
<p>93</p>
|
||
|
</parameter>
|
||
|
</dao>
|
||
|
|
||
|
<dao id="ygyyMzKsyyzhfxZcyCfzsAndJeDao" log="true" type="1"
|
||
|
memo="阳光用药-门诊科室用药综合分析-中草药处方张数、处方金额,是按照以药房发药的为标准,部分退药的处方,不减处方张数,会减掉处方金额dao">
|
||
|
<sql><![CDATA[
|
||
|
select jjks,sum(cfje) cfje,count(*) cfs from (select b.cfh,sum((nvl(a.YZSL,0)-nvl(a.TYSL,0))*a.YZDJ) cfje,f.jjks from HIS_YFFY_MZFYMXB a left join HIS_YFFY_MZFYZB b on a.FYBPKEY=b.pkey and a.companyid=b.companyid left join HIS_YZ_MXB c on a.yzmx=c.pkey and a.companyid=c.companyid left join HIS_JZ_BASEINFO f on b.jzpkey=f.pkey and b.companyid=f.companyid where a.companyid=? and f.jjks like ? and b.FYRQ>=? and b.FYRQ<=? and b.FYZT=1 and c.YZLB='03' and (nvl(a.YZSL,0)-nvl(a.TYSL,0)) > 0 group by b.cfh,f.jjks order by f.jjks) group by jjks order by jjks
|
||
|
|
||
|
]]></sql>
|
||
|
<fields>
|
||
|
<f name="jjks" type="12" />
|
||
|
<f name="cfje" type="12" />
|
||
|
<f name="cfs" type="12" />
|
||
|
</fields>
|
||
|
<parameter>
|
||
|
<p>12</p>
|
||
|
<p>12</p>
|
||
|
<p>93</p>
|
||
|
<p>93</p>
|
||
|
</parameter>
|
||
|
</dao>
|
||
|
|
||
|
|
||
|
<dao id="ygyyMzYsyyzhfxShowDao" 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" />
|
||
|
<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="ygyyMzYsyyzhfxMzrcAndJeDao" log="true" type="1"
|
||
|
memo="阳光用药-门诊医生用药综合分析-处方总人次,处方总金额,是按照病人挂号接诊时间为主,只要病人挂号交费并开有医生处方就算一个处方人次dao">
|
||
|
<sql><![CDATA[
|
||
|
select count(*) mzrc,sum(fy) fy,jjys from (select sum(d.SFXSJZFY) fy,a.jjys,a.pkey from HIS_JZ_BASEINFO a left join HIS_SFZD_ZB b on a.pkey=b.jzpkey and a.companyid=b.companyid left join HIS_MZJS_MZFPZB c on b.pkey=c.GLZDBPKEY and b.companyid=c.companyid left join HIS_SFZD_SFXMXB d on b.pkey=d.ZDZBPKEY and b.companyid=d.companyid where a.companyid=? and a.jjys like ? and c.SFRQ >=? and c.SFRQ <= ? and (a.JZLX='M' or a.JZLX='J' ) and c.SFZT = 1 and a.JZZT='J' group by a.jjys,a.pkey order by a.jjys) group by jjys order by jjys
|
||
|
|
||
|
]]></sql>
|
||
|
<fields>
|
||
|
<f name="mzrc" type="4" />
|
||
|
<f name="fy" 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="ygyyMzYsyyzhfxCfzsAndJeDao" log="true" type="1"
|
||
|
memo="阳光用药-门诊医生用药综合分析-处方张数、处方金额,是按照以药房发药的为标准,部分退药的处方,不减处方张数,会减掉处方金额dao">
|
||
|
<sql><![CDATA[
|
||
|
select jjys,sum(cfje) cfje,count(*) cfs from (select b.cfh,sum((nvl(a.YZSL,0)-nvl(a.TYSL,0))*a.YZDJ) cfje,c.jjys from HIS_YFFY_MZFYMXB a left join HIS_YFFY_MZFYZB b on a.FYBPKEY=b.pkey and a.companyid=b.companyid left join HIS_JZ_BASEINFO c on b.jzpkey=c.pkey and b.companyid=c.companyid where a.companyid=? and c.jjys like ? and b.FYRQ>=? and b.FYRQ<=? and b.FYZT=1 and (nvl(a.YZSL,0)-nvl(a.TYSL,0)) > 0 group by b.cfh,c.jjys order by c.jjys) group by jjys order by jjys
|
||
|
|
||
|
]]></sql>
|
||
|
<fields>
|
||
|
<f name="jjys" type="12" />
|
||
|
<f name="cfje" type="12" />
|
||
|
<f name="cfs" type="12" />
|
||
|
</fields>
|
||
|
<parameter>
|
||
|
<p>12</p>
|
||
|
<p>12</p>
|
||
|
<p>93</p>
|
||
|
<p>93</p>
|
||
|
</parameter>
|
||
|
</dao>
|
||
|
|
||
|
|
||
|
|
||
|
<dao id="ygyyMzYsyyzhfxYpzsDao" log="true" type="1"
|
||
|
memo="阳光用药-门诊医生用药综合分析-药品总数,是按照每张处方药品品种数累加dao">
|
||
|
<sql><![CDATA[
|
||
|
select count(*) ypzs,jjys from (select count(*) yps,c.jjys,a.yzx from HIS_YFFY_MZFYMXB a left join HIS_YFFY_MZFYZB b on a.FYBPKEY=b.pkey and a.companyid=b.companyid left join HIS_JZ_BASEINFO c on b.jzpkey=c.pkey and b.companyid=c.companyid where a.companyid=? and c.jjys like ? and b.FYRQ>=? and b.FYRQ<=? and b.FYZT=1 and (nvl(a.YZSL,0)-nvl(a.TYSL,0)) > 0 group by c.jjys,a.yzx order by c.jjys ) group by jjys order by jjys
|
||
|
]]></sql>
|
||
|
<fields>
|
||
|
<f name="ypzs" 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="ygyyMzYsyyzhfxYytsDao" log="true" type="1"
|
||
|
memo="阳光用药-门诊医生用药综合分析-处方用药天数,是按照每张处方最大用药天数之和dao">
|
||
|
<sql><![CDATA[
|
||
|
select jjys,sum(maxts) yyts from (select jjys,cfh,max(nvl(yzts,0)) maxts from (select d.jjys,b.cfh,a.yzx,c.yzts from HIS_YFFY_MZFYMXB a left join HIS_YFFY_MZFYZB b on a.FYBPKEY=b.pkey and a.companyid=b.companyid left join HIS_YZ_MXB c on a.yzmx=c.pkey and a.companyid=c.companyid left join HIS_JZ_BASEINFO d on b.jzpkey=d.pkey and b.companyid=d.companyid where a.companyid=? and d.jjys like ? and b.FYRQ>=? and b.FYRQ<=? and b.FYZT=1 and (nvl(a.YZSL,0)-nvl(a.TYSL,0)) > 0 ) group by jjys,cfh order by jjys,cfh) group by jjys order by jjys
|
||
|
|
||
|
|
||
|
]]></sql>
|
||
|
<fields>
|
||
|
<f name="jjys" type="12" />
|
||
|
<f name="yyts" type="12" />
|
||
|
</fields>
|
||
|
<parameter>
|
||
|
<p>12</p>
|
||
|
<p>12</p>
|
||
|
<p>93</p>
|
||
|
<p>93</p>
|
||
|
</parameter>
|
||
|
</dao>
|
||
|
|
||
|
<dao id="ygyyMzYsyyzhfxJmgyRcAndJeDao" log="true" type="1"
|
||
|
memo="阳光用药-门诊医生用药综合分析-静脉给药人次和静脉给药金额,是按照是使用过静脉给药的门诊人次dao">
|
||
|
<sql><![CDATA[
|
||
|
select jjys,sum(cfje) cfje,count(*) rc from (
|
||
|
select b.JZPKEY,sum((nvl(a.YZSL,0)-nvl(a.TYSL,0))*a.YZDJ) cfje,e.jjys from HIS_YFFY_MZFYMXB a left join HIS_YFFY_MZFYZB b on a.FYBPKEY=b.pkey and a.companyid=b.companyid left join HIS_YZ_MXB c on a.yzmx=c.pkey and a.companyid=c.companyid left join HIS_YZ_YPYF d on c.YZYF=d.BM and c.companyid=d.companyid left join HIS_JZ_BASEINFO e on b.jzpkey=e.pkey and b.companyid=e.companyid where a.companyid=? and e.jjys like ? and b.FYRQ >=? and b.FYRQ <= ? and b.FYZT=1 and (nvl(a.YZSL,0)-nvl(a.TYSL,0)) > 0 and d.ISJMGY=1 group by b.JZPKEY,e.jjys order by e.jjys) group by jjys order by jjys
|
||
|
|
||
|
|
||
|
]]></sql>
|
||
|
<fields>
|
||
|
<f name="jjys" type="12" />
|
||
|
<f name="cfje" type="12" />
|
||
|
<f name="rc" type="12" />
|
||
|
</fields>
|
||
|
<parameter>
|
||
|
<p>12</p>
|
||
|
<p>12</p>
|
||
|
<p>93</p>
|
||
|
<p>93</p>
|
||
|
</parameter>
|
||
|
</dao>
|
||
|
|
||
|
<dao id="ygyyMzYsyyzhfxZsgyRcAndJeDao" log="true" type="1"
|
||
|
memo="阳光用药-门诊医生用药综合分析-注射给药人次和注射给药金额,是按照是使用过注射给药的门诊人次,静脉也是属于注射类dao">
|
||
|
<sql><![CDATA[
|
||
|
select jjys,sum(cfje) cfje,count(*) rc from (
|
||
|
select b.JZPKEY,sum((nvl(a.YZSL,0)-nvl(a.TYSL,0))*a.YZDJ) cfje,e.jjys from HIS_YFFY_MZFYMXB a left join HIS_YFFY_MZFYZB b on a.FYBPKEY=b.pkey and a.companyid=b.companyid left join HIS_YZ_MXB c on a.yzmx=c.pkey and a.companyid=c.companyid left join HIS_YZ_YPYF d on c.YZYF=d.BM and c.companyid=d.companyid left join HIS_JZ_BASEINFO e on b.jzpkey=e.pkey and b.companyid=e.companyid where a.companyid=? and e.jjys like ? and b.FYRQ >=? and b.FYRQ <= ? and b.FYZT=1 and (nvl(a.YZSL,0)-nvl(a.TYSL,0)) > 0 and (d.ISZSGY=1 or d.ISJMGY=1) group by b.JZPKEY,e.jjys order by e.jjys) group by jjys order by jjys
|
||
|
|
||
|
|
||
|
]]></sql>
|
||
|
<fields>
|
||
|
<f name="jjys" type="12" />
|
||
|
<f name="cfje" type="12" />
|
||
|
<f name="rc" type="12" />
|
||
|
</fields>
|
||
|
<parameter>
|
||
|
<p>12</p>
|
||
|
<p>12</p>
|
||
|
<p>93</p>
|
||
|
<p>93</p>
|
||
|
</parameter>
|
||
|
</dao>
|
||
|
|
||
|
|
||
|
|
||
|
<dao id="ygyyMzYsyyzhfxKjlywRcAndJeDao" log="true" type="1"
|
||
|
memo="阳光用药-门诊医生用药综合分析-抗菌药物门诊人次和金额,是按照使用过抗菌药物的门诊人次dao">
|
||
|
<sql><![CDATA[
|
||
|
select jjys,sum(cfje) cfje,count(*) rc from (
|
||
|
select b.JZPKEY,sum((nvl(a.YZSL,0)-nvl(a.TYSL,0))*a.YZDJ) cfje,c.jjys from HIS_YFFY_MZFYMXB a left join HIS_YFFY_MZFYZB b on a.FYBPKEY=b.pkey and a.companyid=b.companyid left join HIS_YPXX e on a.yzx=e.BM left join HIS_JZ_BASEINFO c on b.jzpkey=c.pkey and b.companyid=c.companyid where a.companyid=? and c.jjys like ? and b.FYRQ >=? and b.FYRQ <= ? and b.FYZT=1 and (nvl(a.YZSL,0)-nvl(a.TYSL,0)) > 0 and (e.GZFL='KSS1' or e.GZFL='KZL1' or e.GZFL='KSS2') group by b.JZPKEY,c.jjys order by c.jjys) group by jjys order by jjys
|
||
|
]]></sql>
|
||
|
<fields>
|
||
|
<f name="jjys" type="12" />
|
||
|
<f name="cfje" type="12" />
|
||
|
<f name="rc" type="12" />
|
||
|
</fields>
|
||
|
<parameter>
|
||
|
<p>12</p>
|
||
|
<p>12</p>
|
||
|
<p>93</p>
|
||
|
<p>93</p>
|
||
|
</parameter>
|
||
|
</dao>
|
||
|
|
||
|
<dao id="ygyyMzYsyyzhfxKjywCfzsAndJeDao" log="true" type="1"
|
||
|
memo="阳光用药-门诊医生用药综合分析-抗菌药物处方张数、处方金额,是按照以药房发药的为标准,部分退药的处方,不减处方张数,会减掉处方金额dao">
|
||
|
<sql><![CDATA[
|
||
|
select jjys,sum(cfje) cfje,count(*) cfs from (select b.cfh,sum((nvl(a.YZSL,0)-nvl(a.TYSL,0))*a.YZDJ) cfje,c.jjys from HIS_YFFY_MZFYMXB a left join HIS_YFFY_MZFYZB b on a.FYBPKEY=b.pkey and a.companyid=b.companyid left join HIS_YPXX e on a.yzx=e.BM left join HIS_JZ_BASEINFO c on b.jzpkey=c.pkey and b.companyid=c.companyid where a.companyid=? and c.jjys like ? and b.FYRQ>=? and b.FYRQ<=? and b.FYZT=1 and (nvl(a.YZSL,0)-nvl(a.TYSL,0)) > 0 and (e.GZFL='KSS1' or e.GZFL='KZL1' or e.GZFL='KSS2') group by b.cfh,c.jjys order by c.jjys) group by jjys order by jjys
|
||
|
|
||
|
]]></sql>
|
||
|
<fields>
|
||
|
<f name="jjys" type="12" />
|
||
|
<f name="cfje" type="12" />
|
||
|
<f name="cfs" type="12" />
|
||
|
</fields>
|
||
|
<parameter>
|
||
|
<p>12</p>
|
||
|
<p>12</p>
|
||
|
<p>93</p>
|
||
|
<p>93</p>
|
||
|
</parameter>
|
||
|
</dao>
|
||
|
|
||
|
|
||
|
<dao id="ygyyMzYsyyzhfxKjywYpzsDao" log="true" type="1"
|
||
|
memo="阳光用药-门诊医生用药综合分析-抗菌药物药品种数,是按照每张处方药品品种数累加dao">
|
||
|
<sql><![CDATA[
|
||
|
select count(*) ypzs,jjys from (select count(*) yps,c.jjys,a.yzx from HIS_YFFY_MZFYMXB a left join HIS_YFFY_MZFYZB b on a.FYBPKEY=b.pkey and a.companyid=b.companyid left join HIS_YPXX e on a.yzx=e.BM left join HIS_JZ_BASEINFO c on b.jzpkey=c.pkey and b.companyid=c.companyid where a.companyid=? and c.jjys like ? and b.FYRQ>=? and b.FYRQ<=? and b.FYZT=1 and (nvl(a.YZSL,0)-nvl(a.TYSL,0)) > 0 and (e.GZFL='KSS1' or e.GZFL='KZL1' or e.GZFL='KSS2') group by c.jjys,a.yzx order by c.jjys) group by jjys order by jjys
|
||
|
]]></sql>
|
||
|
<fields>
|
||
|
<f name="ypzs" 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="ygyyMzYsyyzhfxKjywYytsDao" log="true" type="1"
|
||
|
memo="阳光用药-门诊医生用药综合分析-抗菌药物处方用药天数,是按照每张处方最大用药天数之和dao">
|
||
|
<sql><![CDATA[
|
||
|
select jjys,sum(maxts) yyts from (select jjys,cfh,max(nvl(yzts,0)) maxts from (select d.jjys,b.cfh,a.yzx,c.yzts from HIS_YFFY_MZFYMXB a left join HIS_YFFY_MZFYZB b on a.FYBPKEY=b.pkey and a.companyid=b.companyid left join HIS_YZ_MXB c on a.yzmx=c.pkey and a.companyid=c.companyid left join HIS_YPXX e on a.yzx=e.BM left join HIS_JZ_BASEINFO d on b.jzpkey=d.pkey and b.companyid=d.companyid where a.companyid=? and d.jjys like ? and b.FYRQ>=? and b.FYRQ<=? and b.FYZT=1 and (nvl(a.YZSL,0)-nvl(a.TYSL,0)) > 0 and (e.GZFL='KSS1' or e.GZFL='KZL1' or e.GZFL='KSS2')) group by jjys,cfh order by jjys,cfh) group by jjys order by jjys
|
||
|
|
||
|
|
||
|
]]></sql>
|
||
|
<fields>
|
||
|
<f name="jjys" type="12" />
|
||
|
<f name="yyts" type="12" />
|
||
|
</fields>
|
||
|
<parameter>
|
||
|
<p>12</p>
|
||
|
<p>12</p>
|
||
|
<p>93</p>
|
||
|
<p>93</p>
|
||
|
</parameter>
|
||
|
</dao>
|
||
|
|
||
|
|
||
|
<dao id="ygyyMzYsyyzhfxZsyyCfzsAndjeDao" log="true" type="1"
|
||
|
memo="阳光用药-门诊医生用药综合分析-注射用药处方张数、处方金额,是按照以药房发药的为标准,部分退药的处方,不减处方张数,会减掉处方金额dao">
|
||
|
<sql><![CDATA[
|
||
|
select jjys,sum(cfje) cfje,count(*) cfs from (select b.cfh,sum((nvl(a.YZSL,0)-nvl(a.TYSL,0))*a.YZDJ) cfje,e.jjys from HIS_YFFY_MZFYMXB a left join HIS_YFFY_MZFYZB b on a.FYBPKEY=b.pkey and a.companyid=b.companyid left join HIS_YZ_MXB c on a.yzmx=c.pkey and a.companyid=c.companyid left join HIS_YZ_YPYF d on c.YZYF=d.BM and c.companyid=d.companyid left join HIS_JZ_BASEINFO e on b.jzpkey=e.pkey and b.companyid=e.companyid where a.companyid=? and e.jjys like ? and b.FYRQ>=? and b.FYRQ<=? and b.FYZT=1 and (nvl(a.YZSL,0)-nvl(a.TYSL,0)) > 0 and (d.ISZSGY=1 or d.ISJMGY=1) group by b.cfh,e.jjys order by e.jjys) group by jjys order by jjys
|
||
|
|
||
|
]]></sql>
|
||
|
<fields>
|
||
|
<f name="jjys" type="12" />
|
||
|
<f name="cfje" type="12" />
|
||
|
<f name="cfs" type="12" />
|
||
|
</fields>
|
||
|
<parameter>
|
||
|
<p>12</p>
|
||
|
<p>12</p>
|
||
|
<p>93</p>
|
||
|
<p>93</p>
|
||
|
</parameter>
|
||
|
</dao>
|
||
|
|
||
|
|
||
|
<dao id="ygyyMzYsyyzhfxKjywZsgyRcAndJeDao" log="true" type="1"
|
||
|
memo="阳光用药-门诊医生用药综合分析-抗菌类注射给药人次和金额,是按照是使用过注射抗菌药物的门诊人次dao">
|
||
|
<sql><![CDATA[
|
||
|
select jjys,sum(cfje) cfje,count(*) rc from (
|
||
|
select b.JZPKEY,sum((nvl(a.YZSL,0)-nvl(a.TYSL,0))*a.YZDJ) cfje,f.jjys from HIS_YFFY_MZFYMXB a left join HIS_YFFY_MZFYZB b on a.FYBPKEY=b.pkey and a.companyid=b.companyid left join HIS_YZ_MXB c on a.yzmx=c.pkey and a.companyid=c.companyid left join HIS_YZ_YPYF d on c.YZYF=d.BM and c.companyid=d.companyid left join HIS_YPXX e on a.yzx=e.BM left join HIS_JZ_BASEINFO f on b.jzpkey=f.pkey and b.companyid=f.companyid where a.companyid=? and f.jjys like ? and b.FYRQ >=? and b.FYRQ <= ? and b.FYZT=1 and (nvl(a.YZSL,0)-nvl(a.TYSL,0)) > 0 and (d.ISZSGY=1 or d.ISJMGY=1) and (e.GZFL='KSS1' or e.GZFL='KZL1' or e.GZFL='KSS2') group by b.JZPKEY,f.jjys order by f.jjys) group by jjys order by jjys
|
||
|
|
||
|
|
||
|
]]></sql>
|
||
|
<fields>
|
||
|
<f name="jjys" type="12" />
|
||
|
<f name="cfje" type="12" />
|
||
|
<f name="rc" type="12" />
|
||
|
</fields>
|
||
|
<parameter>
|
||
|
<p>12</p>
|
||
|
<p>12</p>
|
||
|
<p>93</p>
|
||
|
<p>93</p>
|
||
|
</parameter>
|
||
|
</dao>
|
||
|
|
||
|
|
||
|
<dao id="ygyyMzYsyyzhfxKjywJmgyRcAndJeDao" log="true" type="1"
|
||
|
memo="阳光用药-门诊医生用药综合分析-抗菌类静脉给药人次和金额,是按照是使用过静脉抗菌药物的门诊人次dao">
|
||
|
<sql><![CDATA[
|
||
|
select jjys,sum(cfje) cfje,count(*) rc from (
|
||
|
select b.JZPKEY,sum((nvl(a.YZSL,0)-nvl(a.TYSL,0))*a.YZDJ) cfje,f.jjys from HIS_YFFY_MZFYMXB a left join HIS_YFFY_MZFYZB b on a.FYBPKEY=b.pkey and a.companyid=b.companyid left join HIS_YZ_MXB c on a.yzmx=c.pkey and a.companyid=c.companyid left join HIS_YZ_YPYF d on c.YZYF=d.BM and c.companyid=d.companyid left join HIS_YPXX e on a.yzx=e.BM left join HIS_JZ_BASEINFO f on b.jzpkey=f.pkey and b.companyid=f.companyid where a.companyid=? and f.jjys like ? and b.FYRQ >=? and b.FYRQ <= ? and b.FYZT=1 and (nvl(a.YZSL,0)-nvl(a.TYSL,0)) > 0 and d.ISJMGY=1 and (e.GZFL='KSS1' or e.GZFL='KZL1' or e.GZFL='KSS2') group by b.JZPKEY,f.jjys order by f.jjys) group by jjys order by jjys
|
||
|
|
||
|
|
||
|
]]></sql>
|
||
|
<fields>
|
||
|
<f name="jjys" type="12" />
|
||
|
<f name="cfje" type="12" />
|
||
|
<f name="rc" type="12" />
|
||
|
</fields>
|
||
|
<parameter>
|
||
|
<p>12</p>
|
||
|
<p>12</p>
|
||
|
<p>93</p>
|
||
|
<p>93</p>
|
||
|
</parameter>
|
||
|
</dao>
|
||
|
|
||
|
<dao id="ygyyMzYsyyzhfxZcyCfzsAndJeDao" log="true" type="1"
|
||
|
memo="阳光用药-门诊医生用药综合分析-中草药处方张数、处方金额,是按照以药房发药的为标准,部分退药的处方,不减处方张数,会减掉处方金额dao">
|
||
|
<sql><![CDATA[
|
||
|
select jjys,sum(cfje) cfje,count(*) cfs from (select b.cfh,sum((nvl(a.YZSL,0)-nvl(a.TYSL,0))*a.YZDJ) cfje,f.jjys from HIS_YFFY_MZFYMXB a left join HIS_YFFY_MZFYZB b on a.FYBPKEY=b.pkey and a.companyid=b.companyid left join HIS_YZ_MXB c on a.yzmx=c.pkey and a.companyid=c.companyid left join HIS_JZ_BASEINFO f on b.jzpkey=f.pkey and b.companyid=f.companyid where a.companyid=? and f.jjys like ? and b.FYRQ>=? and b.FYRQ<=? and b.FYZT=1 and c.YZLB='03' and (nvl(a.YZSL,0)-nvl(a.TYSL,0)) > 0 group by b.cfh,f.jjys order by f.jjys) group by jjys order by jjys
|
||
|
|
||
|
]]></sql>
|
||
|
<fields>
|
||
|
<f name="jjys" type="12" />
|
||
|
<f name="cfje" type="12" />
|
||
|
<f name="cfs" type="12" />
|
||
|
</fields>
|
||
|
<parameter>
|
||
|
<p>12</p>
|
||
|
<p>12</p>
|
||
|
<p>93</p>
|
||
|
<p>93</p>
|
||
|
</parameter>
|
||
|
</dao>
|
||
|
|
||
|
|
||
|
<dao id="ygyymzypfyfzbDao" log="true" type="1">
|
||
|
<sql><![CDATA[
|
||
|
select 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 from HIS_YFFY_MZFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.companyid=b.companyid left join HIS_YPXX c on a.YZX=c.BM left join HIS_JZ_BASEINFO d on a.JZPKEY=d.pkey and a.companyid=d.companyid left join HIS_KSKC_PC e on a.KSKCPCPKEY=e.pkey and a.companyid=e.companyid left join HIS_SFX f on a.yzx=f.bm and a.companyid=f.companyid left join HIS_YFFY_MZFYZB g on a.FYBPKEY=g.pkey and a.companyid=g.companyid left join HIS_YFYK_RKD_MX rkmx on e.pkey=rkmx.KSKC_PC_PKEY and e.companyid=rkmx.companyid left join HIS_YFYK_RKD rkd on rkmx.djh=rkd.djh and rkmx.companyid=rkd.companyid where a.companyid=? #ypbm# and g.FYRQ >=? and g.FYRQ <=? order by d.JJYS
|
||
|
|
||
|
]]></sql>
|
||
|
<fields>
|
||
|
<f name="YZXPKEY" type="12" />
|
||
|
<f name="YZMC" type="12" />
|
||
|
<f name="GG" type="12" />
|
||
|
<f name="YZSL" type="12" />
|
||
|
<f name="TYSL" type="12" />
|
||
|
<f name="ZHXS" type="12" />
|
||
|
<f name="JBDW" type="12" />
|
||
|
<f name="RKDW" type="12" />
|
||
|
<f name="JJYS" type="12" />
|
||
|
<f name="JJKS" type="12" />
|
||
|
<f name="FYZL" type="12" />
|
||
|
<f name="JBDJ" type="8" />
|
||
|
<f name="YPYZJBJG" type="12" />
|
||
|
<f name="DWVIEW" type="12" />
|
||
|
<f name="YXQ" type="93" />
|
||
|
<f name="PH" type="12" />
|
||
|
<f name="ZCZH" type="12" />
|
||
|
<f name="CSXX" type="12" />
|
||
|
<f name="GYS" type="12" />
|
||
|
</fields>
|
||
|
<parameter>
|
||
|
<p>12</p>
|
||
|
<p>93</p>
|
||
|
<p>93</p>
|
||
|
</parameter>
|
||
|
</dao>
|
||
|
|
||
|
<dao id="ygyyzyypfyfzbDao" log="true" type="1">
|
||
|
<sql><![CDATA[
|
||
|
|
||
|
|
||
|
|
||
|
select 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 from HIS_YFFY_ZYFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.companyid=b.companyid left join HIS_YPXX c on a.YZXPKEY=c.BM left join HIS_JZ_BASEINFO d on a.JZPKEY=d.pkey and a.companyid=d.companyid left join HIS_KSKC_PC e on a.KSKCPCPKEY=e.pkey and a.companyid=e.companyid left join HIS_SFX f on a.yzxpkey=f.bm and a.companyid=f.companyid left join HIS_YFFY_ZYFYZB g on a.FYBPKEY=g.pkey and a.companyid=g.companyid left join HIS_YFYK_RKD_MX rkmx on e.pkey=rkmx.KSKC_PC_PKEY and e.companyid=rkmx.companyid left join HIS_YFYK_RKD rkd on rkmx.djh=rkd.djh and rkmx.companyid=rkd.companyid where a.companyid=? #ypbm# and g.FYTIME >=? and g.FYTIME <=? order by d.JJYS
|
||
|
]]></sql>
|
||
|
<fields>
|
||
|
<f name="YZXPKEY" type="12" />
|
||
|
<f name="YZMC" type="12" />
|
||
|
<f name="GG" type="12" />
|
||
|
<f name="YZSL" type="12" />
|
||
|
<f name="TYSL" type="12" />
|
||
|
<f name="ZHXS" type="12" />
|
||
|
<f name="JBDW" type="12" />
|
||
|
<f name="RKDW" type="12" />
|
||
|
<f name="JJYS" type="12" />
|
||
|
<f name="JJKS" type="12" />
|
||
|
<f name="FYZL" type="12" />
|
||
|
<f name="JBDJ" type="8" />
|
||
|
<f name="YPYZJBJG" type="12" />
|
||
|
<f name="DWVIEW" type="12" />
|
||
|
<f name="YXQ" type="93" />
|
||
|
<f name="PH" type="12" />
|
||
|
<f name="ZCZH" type="12" />
|
||
|
<f name="CSXX" type="12" />
|
||
|
<f name="GYS" type="12" />
|
||
|
</fields>
|
||
|
<parameter>
|
||
|
<p>12</p>
|
||
|
<p>93</p>
|
||
|
<p>93</p>
|
||
|
</parameter>
|
||
|
</dao>
|
||
|
|
||
|
|
||
|
<dao id="ygyyallypfyfzbDao" log="true" type="1">
|
||
|
<sql><![CDATA[
|
||
|
|
||
|
|
||
|
SELECT yzxpkey,yzmc,gg,YZSL,TYSL,ZHXS,JBDW,RKDW,JJYS,JJKS,FYZL,jbdj,YPYZJBJG,dwview,FYRQ,YXQ,PH,ZCZH,CSXX,GYS FROM
|
||
|
(
|
||
|
select 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,g.FYRQ,e.YXQ,e.PH,c.ZCZH,c.CSXX,rkd.GYS from HIS_YFFY_MZFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.companyid=b.companyid left join HIS_YPXX c on a.YZX=c.BM left join HIS_JZ_BASEINFO d on a.JZPKEY=d.pkey and a.companyid=d.companyid left join HIS_KSKC_PC e on a.KSKCPCPKEY=e.pkey and a.companyid=e.companyid left join HIS_SFX f on a.yzx=f.bm and a.companyid=f.companyid left join HIS_YFFY_MZFYZB g on a.FYBPKEY=g.pkey and a.companyid=g.companyid left join HIS_YFYK_RKD_MX rkmx on e.pkey=rkmx.KSKC_PC_PKEY and e.companyid=rkmx.companyid left join HIS_YFYK_RKD rkd on rkmx.djh=rkd.djh and rkmx.companyid=rkd.companyid where a.companyid=? #ypbm# and g.FYRQ >=? and g.FYRQ <=?
|
||
|
|
||
|
|
||
|
union all
|
||
|
|
||
|
select 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,g.FYTIME FYRQ,e.YXQ,e.PH,c.ZCZH,c.CSXX,rkd.GYS from HIS_YFFY_ZYFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.companyid=b.companyid left join HIS_YPXX c on a.YZXPKEY=c.BM left join HIS_JZ_BASEINFO d on a.JZPKEY=d.pkey and a.companyid=d.companyid left join HIS_KSKC_PC e on a.KSKCPCPKEY=e.pkey and a.companyid=e.companyid left join HIS_SFX f on a.yzxpkey=f.bm and a.companyid=f.companyid left join HIS_YFFY_ZYFYZB g on a.FYBPKEY=g.pkey and a.companyid=g.companyid left join HIS_YFYK_RKD_MX rkmx on e.pkey=rkmx.KSKC_PC_PKEY and e.companyid=rkmx.companyid left join HIS_YFYK_RKD rkd on rkmx.djh=rkd.djh and rkmx.companyid=rkd.companyid where a.companyid=? #ypbm# and g.FYTIME >=? and g.FYTIME <=?
|
||
|
|
||
|
) ORDER BY JJYS
|
||
|
|
||
|
|
||
|
]]></sql>
|
||
|
<fields>
|
||
|
<f name="YZXPKEY" type="12" />
|
||
|
<f name="YZMC" type="12" />
|
||
|
<f name="GG" type="12" />
|
||
|
<f name="YZSL" type="12" />
|
||
|
<f name="TYSL" type="12" />
|
||
|
<f name="ZHXS" type="12" />
|
||
|
<f name="JBDW" type="12" />
|
||
|
<f name="RKDW" type="12" />
|
||
|
<f name="JJYS" type="12" />
|
||
|
<f name="JJKS" type="12" />
|
||
|
<f name="FYZL" type="12" />
|
||
|
<f name="JBDJ" type="8" />
|
||
|
<f name="YPYZJBJG" type="12" />
|
||
|
<f name="DWVIEW" type="12" />
|
||
|
<f name="FYRQ" type="93" />
|
||
|
<f name="YXQ" type="93" />
|
||
|
<f name="PH" type="12" />
|
||
|
<f name="ZCZH" type="12" />
|
||
|
<f name="CSXX" type="12" />
|
||
|
<f name="GYS" 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="ygyyypxstjbymx" 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" />
|
||
|
</fields>
|
||
|
</dao>
|
||
|
|
||
|
<!-- <dao id="ygyyypxstjbyhz" 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" /> -->
|
||
|
<!-- </fields> -->
|
||
|
<!-- </dao> -->
|
||
|
|
||
|
<dao id="ygyyypxstjbyhz" 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" />
|
||
|
</fields>
|
||
|
</dao>
|
||
|
<dao id="ygyyallyphzbyJjysDao" log="true" type="1">
|
||
|
<sql><![CDATA[
|
||
|
|
||
|
SELECT yzxpkey,yzmc,gg,sum(fysl) fysl,sum(CBJE) cbje,sum(XSJE) xsje,ZHXS,JBDW,RKDW,JJYS,FYZL,dwview,YXQ,PH,ZCZH,CSXX,GYS FROM
|
||
|
(
|
||
|
select b.yzxpkey,b.yzmc,c.gg,a.yzsl,a.tysl,(nvl(a.YZSL,0)-nvl(a.TYSL,0)) fysl,(nvl(a.YZSL,0)-nvl(a.TYSL,0))*e.jbdj cbje,(nvl(a.YZSL,0)-nvl(a.TYSL,0))* b.YPYZJBJG xsje, f.ZHXS,c.JBDW,f.RKDW,d.JJYS,f.FYZL,f.dwview,e.YXQ,e.PH,c.ZCZH,c.CSXX,rkd.GYS from HIS_YFFY_MZFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.companyid=b.companyid left join HIS_YPXX c on a.YZX=c.BM left join HIS_JZ_BASEINFO d on a.JZPKEY=d.pkey and a.companyid=d.companyid left join HIS_KSKC_PC e on a.KSKCPCPKEY=e.pkey and a.companyid=e.companyid left join HIS_SFX f on a.yzx=f.bm and a.companyid=f.companyid left join HIS_YFFY_MZFYZB g on a.FYBPKEY=g.pkey and a.companyid=g.companyid left join HIS_YFYK_RKD_MX rkmx on e.pkey=rkmx.KSKC_PC_PKEY and e.companyid=rkmx.companyid left join HIS_YFYK_RKD rkd on rkmx.djh=rkd.djh and rkmx.companyid=rkd.companyid where a.companyid=? #ypbm# and g.FYRQ >=? and g.FYRQ <=?
|
||
|
|
||
|
|
||
|
union all
|
||
|
|
||
|
select b.yzxpkey,b.yzmc,c.gg,a.yzsl,a.tysl,(nvl(a.YZSL,0)-nvl(a.TYSL,0)) fysl,(nvl(a.YZSL,0)-nvl(a.TYSL,0))*e.jbdj cbje,(nvl(a.YZSL,0)-nvl(a.TYSL,0))* b.YPYZJBJG xsje,f.ZHXS,c.JBDW,f.RKDW,d.JJYS,f.FYZL,f.dwview,e.YXQ,e.PH,c.ZCZH,c.CSXX,rkd.GYS from HIS_YFFY_ZYFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.companyid=b.companyid left join HIS_YPXX c on a.YZXPKEY=c.BM left join HIS_JZ_BASEINFO d on a.JZPKEY=d.pkey and a.companyid=d.companyid left join HIS_KSKC_PC e on a.KSKCPCPKEY=e.pkey and a.companyid=e.companyid left join HIS_SFX f on a.yzxpkey=f.bm and a.companyid=f.companyid left join HIS_YFFY_ZYFYZB g on a.FYBPKEY=g.pkey and a.companyid=g.companyid left join HIS_YFYK_RKD_MX rkmx on e.pkey=rkmx.KSKC_PC_PKEY and e.companyid=rkmx.companyid left join HIS_YFYK_RKD rkd on rkmx.djh=rkd.djh and rkmx.companyid=rkd.companyid where a.companyid=? #ypbm# and g.FYTIME >=? and g.FYTIME <=?
|
||
|
|
||
|
) group by yzxpkey,yzmc,gg,ZHXS,JBDW,RKDW,JJYS,FYZL,dwview,yxq,ph,ZCZH,CSXX,GYS ORDER BY JJYS
|
||
|
|
||
|
|
||
|
]]></sql>
|
||
|
<fields>
|
||
|
<f name="YZXPKEY" type="12" />
|
||
|
<f name="YZMC" type="12" />
|
||
|
<f name="GG" type="12" />
|
||
|
<f name="FYSL" type="4" />
|
||
|
<f name="CBJE" type="4" />
|
||
|
<f name="XSJE" type="4" />
|
||
|
<f name="ZHXS" type="8" />
|
||
|
<f name="JBDW" type="12" />
|
||
|
<f name="RKDW" type="12" />
|
||
|
<f name="JJYS" type="12" />
|
||
|
<f name="FYZL" type="12" />
|
||
|
<f name="DWVIEW" type="12" />
|
||
|
<f name="YXQ" type="93" />
|
||
|
<f name="PH" type="12" />
|
||
|
<f name="ZCZH" type="12" />
|
||
|
<f name="CSXX" type="12" />
|
||
|
<f name="GYS" 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="ygyyzyyphzbyJjysDao" log="true" type="1">
|
||
|
<sql><![CDATA[
|
||
|
|
||
|
SELECT yzxpkey,yzmc,gg,sum(fysl) fysl,sum(CBJE) cbje,sum(XSJE) xsje,ZHXS,JBDW,RKDW,JJYS,FYZL,dwview,YXQ,PH,ZCZH,CSXX,GYS FROM
|
||
|
(
|
||
|
|
||
|
|
||
|
select b.yzxpkey,b.yzmc,c.gg,a.yzsl,a.tysl,(nvl(a.YZSL,0)-nvl(a.TYSL,0)) fysl,(nvl(a.YZSL,0)-nvl(a.TYSL,0))*e.jbdj cbje,(nvl(a.YZSL,0)-nvl(a.TYSL,0))* b.YPYZJBJG xsje,f.ZHXS,c.JBDW,f.RKDW,d.JJYS,f.FYZL,f.dwview,e.YXQ,e.PH,c.ZCZH,c.CSXX,rkd.GYS from HIS_YFFY_ZYFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.companyid=b.companyid left join HIS_YPXX c on a.YZXPKEY=c.BM left join HIS_JZ_BASEINFO d on a.JZPKEY=d.pkey and a.companyid=d.companyid left join HIS_KSKC_PC e on a.KSKCPCPKEY=e.pkey and a.companyid=e.companyid left join HIS_SFX f on a.yzxpkey=f.bm and a.companyid=f.companyid left join HIS_YFFY_ZYFYZB g on a.FYBPKEY=g.pkey and a.companyid=g.companyid left join HIS_YFYK_RKD_MX rkmx on e.pkey=rkmx.KSKC_PC_PKEY and e.companyid=rkmx.companyid left join HIS_YFYK_RKD rkd on rkmx.djh=rkd.djh and rkmx.companyid=rkd.companyid where a.companyid=? #ypbm# and g.FYTIME >=? and g.FYTIME <=?
|
||
|
|
||
|
) group by yzxpkey,yzmc,gg,ZHXS,JBDW,RKDW,JJYS,FYZL,dwview,yxq,ph,ZCZH,CSXX,GYS ORDER BY JJYS
|
||
|
|
||
|
|
||
|
]]></sql>
|
||
|
<fields>
|
||
|
<f name="YZXPKEY" type="12" />
|
||
|
<f name="YZMC" type="12" />
|
||
|
<f name="GG" type="12" />
|
||
|
<f name="FYSL" type="4" />
|
||
|
<f name="CBJE" type="4" />
|
||
|
<f name="XSJE" type="4" />
|
||
|
<f name="ZHXS" type="8" />
|
||
|
<f name="JBDW" type="12" />
|
||
|
<f name="RKDW" type="12" />
|
||
|
<f name="JJYS" type="12" />
|
||
|
<f name="FYZL" type="12" />
|
||
|
<f name="DWVIEW" type="12" />
|
||
|
<f name="YXQ" type="93" />
|
||
|
<f name="PH" type="12" />
|
||
|
<f name="ZCZH" type="12" />
|
||
|
<f name="CSXX" type="12" />
|
||
|
<f name="GYS" type="12" />
|
||
|
</fields>
|
||
|
<parameter>
|
||
|
<p>12</p>
|
||
|
<p>93</p>
|
||
|
<p>93</p>
|
||
|
</parameter>
|
||
|
</dao>
|
||
|
|
||
|
<dao id="ygyyMzyphzbyJjysDao" log="true" type="1">
|
||
|
<sql><![CDATA[
|
||
|
|
||
|
SELECT yzxpkey,yzmc,gg,sum(fysl) fysl,sum(CBJE) cbje,sum(XSJE) xsje,ZHXS,JBDW,RKDW,JJYS,FYZL,dwview,YXQ,PH,ZCZH,CSXX,GYS FROM
|
||
|
(
|
||
|
select b.yzxpkey,b.yzmc,c.gg,a.yzsl,a.tysl,(nvl(a.YZSL,0)-nvl(a.TYSL,0)) fysl,(nvl(a.YZSL,0)-nvl(a.TYSL,0))*e.jbdj cbje,(nvl(a.YZSL,0)-nvl(a.TYSL,0))* b.YPYZJBJG xsje, f.ZHXS,c.JBDW,f.RKDW,d.JJYS,f.FYZL,f.dwview,e.YXQ,e.PH,c.ZCZH,c.CSXX,rkd.GYS from HIS_YFFY_MZFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.companyid=b.companyid left join HIS_YPXX c on a.YZX=c.BM left join HIS_JZ_BASEINFO d on a.JZPKEY=d.pkey and a.companyid=d.companyid left join HIS_KSKC_PC e on a.KSKCPCPKEY=e.pkey and a.companyid=e.companyid left join HIS_SFX f on a.yzx=f.bm and a.companyid=f.companyid left join HIS_YFFY_MZFYZB g on a.FYBPKEY=g.pkey and a.companyid=g.companyid left join HIS_YFYK_RKD_MX rkmx on e.pkey=rkmx.KSKC_PC_PKEY and e.companyid=rkmx.companyid left join HIS_YFYK_RKD rkd on rkmx.djh=rkd.djh and rkmx.companyid=rkd.companyid where a.companyid=? #ypbm# and g.FYRQ >=? and g.FYRQ <=?
|
||
|
|
||
|
|
||
|
) group by yzxpkey,yzmc,gg,ZHXS,JBDW,RKDW,JJYS,FYZL,dwview,YXQ,PH,ZCZH,CSXX,GYS ORDER BY JJYS
|
||
|
|
||
|
|
||
|
]]></sql>
|
||
|
<fields>
|
||
|
<f name="YZXPKEY" type="12" />
|
||
|
<f name="YZMC" type="12" />
|
||
|
<f name="GG" type="12" />
|
||
|
<f name="FYSL" type="4" />
|
||
|
<f name="CBJE" type="4" />
|
||
|
<f name="XSJE" type="4" />
|
||
|
<f name="ZHXS" type="8" />
|
||
|
<f name="JBDW" type="12" />
|
||
|
<f name="RKDW" type="12" />
|
||
|
<f name="JJYS" type="12" />
|
||
|
<f name="FYZL" type="12" />
|
||
|
<f name="DWVIEW" type="12" />
|
||
|
<f name="YXQ" type="93" />
|
||
|
<f name="PH" type="12" />
|
||
|
<f name="ZCZH" type="12" />
|
||
|
<f name="CSXX" type="12" />
|
||
|
<f name="GYS" type="12" />
|
||
|
</fields>
|
||
|
<parameter>
|
||
|
<p>12</p>
|
||
|
<p>93</p>
|
||
|
<p>93</p>
|
||
|
</parameter>
|
||
|
</dao>
|
||
|
|
||
|
|
||
|
<dao id="ygyyallyphzbyJjksDao" log="true" type="1">
|
||
|
<sql><![CDATA[
|
||
|
|
||
|
SELECT yzxpkey,yzmc,gg,sum(fysl) fysl,sum(CBJE) cbje,sum(XSJE) xsje,ZHXS,JBDW,RKDW,JJKS,FYZL,dwview,YXQ,PH,ZCZH,CSXX,GYS FROM
|
||
|
(
|
||
|
select b.yzxpkey,b.yzmc,c.gg,a.yzsl,a.tysl,(nvl(a.YZSL,0)-nvl(a.TYSL,0)) fysl,(nvl(a.YZSL,0)-nvl(a.TYSL,0))*e.jbdj cbje,(nvl(a.YZSL,0)-nvl(a.TYSL,0))* b.YPYZJBJG xsje, f.ZHXS,c.JBDW,f.RKDW,d.JJKS,f.FYZL,f.dwview,e.YXQ,e.PH,c.ZCZH,c.CSXX,rkd.GYS from HIS_YFFY_MZFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.companyid=b.companyid left join HIS_YPXX c on a.YZX=c.BM left join HIS_JZ_BASEINFO d on a.JZPKEY=d.pkey and a.companyid=d.companyid left join HIS_KSKC_PC e on a.KSKCPCPKEY=e.pkey and a.companyid=e.companyid left join HIS_SFX f on a.yzx=f.bm and a.companyid=f.companyid left join HIS_YFFY_MZFYZB g on a.FYBPKEY=g.pkey and a.companyid=g.companyid left join HIS_YFYK_RKD_MX rkmx on e.pkey=rkmx.KSKC_PC_PKEY and e.companyid=rkmx.companyid left join HIS_YFYK_RKD rkd on rkmx.djh=rkd.djh and rkmx.companyid=rkd.companyid where a.companyid=? #ypbm# and g.FYRQ >=? and g.FYRQ <=?
|
||
|
|
||
|
|
||
|
union all
|
||
|
|
||
|
select b.yzxpkey,b.yzmc,c.gg,a.yzsl,a.tysl,(nvl(a.YZSL,0)-nvl(a.TYSL,0)) fysl,(nvl(a.YZSL,0)-nvl(a.TYSL,0))*e.jbdj cbje,(nvl(a.YZSL,0)-nvl(a.TYSL,0))* b.YPYZJBJG xsje,f.ZHXS,c.JBDW,f.RKDW,d.JJKS,f.FYZL,f.dwview,e.YXQ,e.PH,c.ZCZH,c.CSXX,rkd.GYS from HIS_YFFY_ZYFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.companyid=b.companyid left join HIS_YPXX c on a.YZXPKEY=c.BM left join HIS_JZ_BASEINFO d on a.JZPKEY=d.pkey and a.companyid=d.companyid left join HIS_KSKC_PC e on a.KSKCPCPKEY=e.pkey and a.companyid=e.companyid left join HIS_SFX f on a.yzxpkey=f.bm and a.companyid=f.companyid left join HIS_YFFY_ZYFYZB g on a.FYBPKEY=g.pkey and a.companyid=g.companyid left join HIS_YFYK_RKD_MX rkmx on e.pkey=rkmx.KSKC_PC_PKEY and e.companyid=rkmx.companyid left join HIS_YFYK_RKD rkd on rkmx.djh=rkd.djh and rkmx.companyid=rkd.companyid where a.companyid=? #ypbm# and g.FYTIME >=? and g.FYTIME <=?
|
||
|
|
||
|
) group by yzxpkey,yzmc,gg,ZHXS,JBDW,RKDW,JJKS,FYZL,dwview,YXQ,PH,ZCZH,CSXX,GYS ORDER BY JJKS
|
||
|
|
||
|
|
||
|
]]></sql>
|
||
|
<fields>
|
||
|
<f name="YZXPKEY" type="12" />
|
||
|
<f name="YZMC" type="12" />
|
||
|
<f name="GG" type="12" />
|
||
|
<f name="FYSL" type="4" />
|
||
|
<f name="CBJE" type="4" />
|
||
|
<f name="XSJE" type="4" />
|
||
|
<f name="ZHXS" type="8" />
|
||
|
<f name="JBDW" type="12" />
|
||
|
<f name="RKDW" type="12" />
|
||
|
<f name="JJKS" type="12" />
|
||
|
<f name="FYZL" type="12" />
|
||
|
<f name="DWVIEW" type="12" />
|
||
|
<f name="YXQ" type="93" />
|
||
|
<f name="PH" type="12" />
|
||
|
<f name="ZCZH" type="12" />
|
||
|
<f name="CSXX" type="12" />
|
||
|
<f name="GYS" 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="ygyyzyyphzbyJjksDao" log="true" type="1">
|
||
|
<sql><![CDATA[
|
||
|
|
||
|
SELECT yzxpkey,yzmc,gg,sum(fysl) fysl,sum(CBJE) cbje,sum(XSJE) xsje,ZHXS,JBDW,RKDW,JJKS,FYZL,dwview,YXQ,PH,ZCZH,CSXX,GYS FROM
|
||
|
(
|
||
|
|
||
|
|
||
|
select b.yzxpkey,b.yzmc,c.gg,a.yzsl,a.tysl,(nvl(a.YZSL,0)-nvl(a.TYSL,0)) fysl,(nvl(a.YZSL,0)-nvl(a.TYSL,0))*e.jbdj cbje,(nvl(a.YZSL,0)-nvl(a.TYSL,0))* b.YPYZJBJG xsje,f.ZHXS,c.JBDW,f.RKDW,d.JJKS,f.FYZL,f.dwview,e.YXQ,e.PH,c.ZCZH,c.CSXX,rkd.GYS from HIS_YFFY_ZYFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.companyid=b.companyid left join HIS_YPXX c on a.YZXPKEY=c.BM left join HIS_JZ_BASEINFO d on a.JZPKEY=d.pkey and a.companyid=d.companyid left join HIS_KSKC_PC e on a.KSKCPCPKEY=e.pkey and a.companyid=e.companyid left join HIS_SFX f on a.yzxpkey=f.bm and a.companyid=f.companyid left join HIS_YFFY_ZYFYZB g on a.FYBPKEY=g.pkey and a.companyid=g.companyid left join HIS_YFYK_RKD_MX rkmx on e.pkey=rkmx.KSKC_PC_PKEY and e.companyid=rkmx.companyid left join HIS_YFYK_RKD rkd on rkmx.djh=rkd.djh and rkmx.companyid=rkd.companyid where a.companyid=? #ypbm# and g.FYTIME >=? and g.FYTIME <=?
|
||
|
|
||
|
) group by yzxpkey,yzmc,gg,ZHXS,JBDW,RKDW,JJKS,FYZL,dwview,YXQ,PH,ZCZH,CSXX,GYS ORDER BY JJKS
|
||
|
|
||
|
|
||
|
]]></sql>
|
||
|
<fields>
|
||
|
<f name="YZXPKEY" type="12" />
|
||
|
<f name="YZMC" type="12" />
|
||
|
<f name="GG" type="12" />
|
||
|
<f name="FYSL" type="4" />
|
||
|
<f name="CBJE" type="4" />
|
||
|
<f name="XSJE" type="4" />
|
||
|
<f name="ZHXS" type="8" />
|
||
|
<f name="JBDW" type="12" />
|
||
|
<f name="RKDW" type="12" />
|
||
|
<f name="JJKS" type="12" />
|
||
|
<f name="FYZL" type="12" />
|
||
|
<f name="DWVIEW" type="12" />
|
||
|
<f name="YXQ" type="93" />
|
||
|
<f name="PH" type="12" />
|
||
|
<f name="ZCZH" type="12" />
|
||
|
<f name="CSXX" type="12" />
|
||
|
<f name="GYS" type="12" />
|
||
|
</fields>
|
||
|
<parameter>
|
||
|
<p>12</p>
|
||
|
<p>93</p>
|
||
|
<p>93</p>
|
||
|
</parameter>
|
||
|
</dao>
|
||
|
|
||
|
<dao id="ygyyMzyphzbyJjksDao" log="true" type="1">
|
||
|
<sql><![CDATA[
|
||
|
|
||
|
SELECT yzxpkey,yzmc,gg,sum(fysl) fysl,sum(CBJE) cbje,sum(XSJE) xsje,ZHXS,JBDW,RKDW,JJKS,FYZL,dwview,YXQ,PH,ZCZH,CSXX,GYS FROM
|
||
|
(
|
||
|
select b.yzxpkey,b.yzmc,c.gg,a.yzsl,a.tysl,(nvl(a.YZSL,0)-nvl(a.TYSL,0)) fysl,(nvl(a.YZSL,0)-nvl(a.TYSL,0))*e.jbdj cbje,(nvl(a.YZSL,0)-nvl(a.TYSL,0))* b.YPYZJBJG xsje, f.ZHXS,c.JBDW,f.RKDW,d.JJKS,f.FYZL,f.dwview,e.YXQ,e.PH,c.ZCZH,c.CSXX,rkd.GYS from HIS_YFFY_MZFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.companyid=b.companyid left join HIS_YPXX c on a.YZX=c.BM left join HIS_JZ_BASEINFO d on a.JZPKEY=d.pkey and a.companyid=d.companyid left join HIS_KSKC_PC e on a.KSKCPCPKEY=e.pkey and a.companyid=e.companyid left join HIS_SFX f on a.yzx=f.bm and a.companyid=f.companyid left join HIS_YFFY_MZFYZB g on a.FYBPKEY=g.pkey and a.companyid=g.companyid left join HIS_YFYK_RKD_MX rkmx on e.pkey=rkmx.KSKC_PC_PKEY and e.companyid=rkmx.companyid left join HIS_YFYK_RKD rkd on rkmx.djh=rkd.djh and rkmx.companyid=rkd.companyid where a.companyid=? #ypbm# and g.FYRQ >=? and g.FYRQ <=?
|
||
|
|
||
|
|
||
|
) group by yzxpkey,yzmc,gg,ZHXS,JBDW,RKDW,JJKS,FYZL,dwview,YXQ,PH,ZCZH,CSXX,GYS ORDER BY JJKS
|
||
|
|
||
|
|
||
|
]]></sql>
|
||
|
<fields>
|
||
|
<f name="YZXPKEY" type="12" />
|
||
|
<f name="YZMC" type="12" />
|
||
|
<f name="GG" type="12" />
|
||
|
<f name="FYSL" type="4" />
|
||
|
<f name="CBJE" type="4" />
|
||
|
<f name="XSJE" type="4" />
|
||
|
<f name="ZHXS" type="8" />
|
||
|
<f name="JBDW" type="12" />
|
||
|
<f name="RKDW" type="12" />
|
||
|
<f name="JJKS" type="12" />
|
||
|
<f name="FYZL" type="12" />
|
||
|
<f name="DWVIEW" type="12" />
|
||
|
<f name="YXQ" type="93" />
|
||
|
<f name="PH" type="12" />
|
||
|
<f name="ZCZH" type="12" />
|
||
|
<f name="CSXX" type="12" />
|
||
|
<f name="GYS" type="12" />
|
||
|
</fields>
|
||
|
<parameter>
|
||
|
<p>12</p>
|
||
|
<p>93</p>
|
||
|
<p>93</p>
|
||
|
</parameter>
|
||
|
</dao>
|
||
|
|
||
|
<dao id="ygyycgtjmxDao" type="1" memo="采购统计">
|
||
|
<sql><![CDATA[
|
||
|
select a.PKEY,a.COMPANYID,a.DJH,a.DPTID,a.XH,a.SFX_BM,a.KSKC_PC_PKEY,a.PH,a.YXQ,a.DW,a.SL,a.DJ,a.SJ,a.JE,a.SJJE,a.ZK,a.FPHM,a.FPJE,a.PCJG,a.DDMX_PKEY,a.BZ,b.MC,b.JBDW,b.ZHXS,c.CSXX,b.DWVIEW,b.RKDW,a.LOCKFLAG,c.GG
|
||
|
,'' 零进差价,d.value2 kclz,b.ybbm,b.ybmc,c.ZCZH,rkd.GYS,rkd.ZDRQ from HIS_YFYK_RKD_MX a
|
||
|
left join HIS_SFX b on a.COMPANYID=b.COMPANYID and a.SFX_BM=b.BM
|
||
|
left join HIS_YPXX c on c.BM=b.BM
|
||
|
left join MAIN_JGZDB d on B.kcfl=d.bh and d.jgzdlb_bh='Z00008' and d.companyid=b.companyid
|
||
|
left join HIS_YFYK_RKD rkd on a.djh=rkd.djh and a.companyid=rkd.companyid
|
||
|
where a.COMPANYID=? #select# and rkd.SHZT='1' and rkd.ZDRQ >= ? and rkd.ZDRQ <=? order by a.djh,a.pkey
|
||
|
|
||
|
]]></sql>
|
||
|
<tables>
|
||
|
<table name="HIS_YFYK_RKD_MX" insert="true" update="true"
|
||
|
delete="true">
|
||
|
<primary>PKEY</primary>
|
||
|
<primary>COMPANYID</primary>
|
||
|
</table>
|
||
|
</tables>
|
||
|
<fields>
|
||
|
<f name="PKEY" type="12" table="HIS_YFYK_RKD_MX" />
|
||
|
<f name="COMPANYID" type="12" table="HIS_YFYK_RKD_MX" />
|
||
|
<f name="DJH" type="12" table="HIS_YFYK_RKD_MX" />
|
||
|
<f name="DPTID" type="12" table="HIS_YFYK_RKD_MX" />
|
||
|
<f name="XH" type="-5" table="HIS_YFYK_RKD_MX" />
|
||
|
<f name="SFX_BM" type="12" table="HIS_YFYK_RKD_MX" />
|
||
|
<f name="KSKC_PC_PKEY" type="12" table="HIS_YFYK_RKD_MX" />
|
||
|
<f name="PH" type="12" table="HIS_YFYK_RKD_MX" />
|
||
|
<f name="YXQ" type="93" table="HIS_YFYK_RKD_MX" />
|
||
|
<f name="DW" type="12" table="HIS_YFYK_RKD_MX" />
|
||
|
<f name="SL" type="8" table="HIS_YFYK_RKD_MX" />
|
||
|
<f name="DJ" type="8" table="HIS_YFYK_RKD_MX" />
|
||
|
<f name="SJ" type="8" table="HIS_YFYK_RKD_MX" />
|
||
|
<f name="JE" type="8" table="HIS_YFYK_RKD_MX" />
|
||
|
<f name="SJJE" type="8" table="HIS_YFYK_RKD_MX" />
|
||
|
<f name="ZK" type="8" table="HIS_YFYK_RKD_MX" />
|
||
|
<f name="FPHM" type="12" table="HIS_YFYK_RKD_MX" />
|
||
|
<f name="FPJE" type="8" table="HIS_YFYK_RKD_MX" />
|
||
|
<f name="PCJG" type="8" table="HIS_YFYK_RKD_MX" />
|
||
|
<f name="DDMX_PKEY" type="12" table="HIS_YFYK_RKD_MX" />
|
||
|
<f name="BZ" type="12" table="HIS_YFYK_RKD_MX" />
|
||
|
<f name="MC" type="12" />
|
||
|
<f name="JBDW" type="12" />
|
||
|
<f name="ZHXS" type="8" />
|
||
|
<f name="CSXX" type="12" />
|
||
|
<f name="DWVIEW" type="12" />
|
||
|
<f name="RKDW" type="12" />
|
||
|
<f name="LOCKFLAG" type="-5" table="HIS_YFYK_RKD_MX" />
|
||
|
<f name="GG" type="12" />
|
||
|
<f name="零进差价" type="12" />
|
||
|
<f name="kclz" type="12" />
|
||
|
<f name="YBBM" type="12" />
|
||
|
<f name="YBMC" type="12" />
|
||
|
<f name="ZCZH" type="12" />
|
||
|
<f name="GYS" type="12" />
|
||
|
<f name="ZDRQ" type="93" />
|
||
|
</fields>
|
||
|
<parameter>
|
||
|
<p>12</p>
|
||
|
<p>93</p>
|
||
|
<p>93</p>
|
||
|
</parameter>
|
||
|
</dao>
|
||
|
|
||
|
<dao id="ygyyypcgtjbymx" 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" />
|
||
|
</fields>
|
||
|
</dao>
|
||
|
|
||
|
<dao id="ygyyypcgtjbyhz" 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" />
|
||
|
</fields>
|
||
|
</dao>
|
||
|
|
||
|
|
||
|
<dao id="ygyyallyphzbyJjysDaoBySales" log="true" type="1">
|
||
|
<sql><![CDATA[
|
||
|
|
||
|
SELECT yzxpkey,yzmc,gg,sum(fysl) fysl,sum(CBJE) cbje,sum(XSJE) xsje,ZHXS,JBDW,RKDW,JJYS,FYZL,dwview,YXQ,PH,ZCZH,CSXX,GYS FROM
|
||
|
(
|
||
|
select b.yzxpkey,b.yzmc,c.gg,a.yzsl,a.tysl,(nvl(a.YZSL,0)-nvl(a.TYSL,0)) fysl,(nvl(a.YZSL,0)-nvl(a.TYSL,0))*e.jbdj cbje,(nvl(a.YZSL,0)-nvl(a.TYSL,0))* b.YPYZJBJG xsje, f.ZHXS,c.JBDW,f.RKDW,d.JJYS,f.FYZL,f.dwview,e.YXQ,e.PH,c.ZCZH,c.CSXX,rkd.GYS from HIS_YFFY_MZFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.companyid=b.companyid left join HIS_YPXX c on a.YZX=c.BM left join HIS_JZ_BASEINFO d on a.JZPKEY=d.pkey and a.companyid=d.companyid left join HIS_KSKC_PC e on a.KSKCPCPKEY=e.pkey and a.companyid=e.companyid left join HIS_SFX f on a.yzx=f.bm and a.companyid=f.companyid left join HIS_YFFY_MZFYZB g on a.FYBPKEY=g.pkey and a.companyid=g.companyid left join HIS_YFYK_RKD_MX rkmx on e.pkey=rkmx.KSKC_PC_PKEY and e.companyid=rkmx.companyid left join HIS_YFYK_RKD rkd on rkmx.djh=rkd.djh and rkmx.companyid=rkd.companyid right join HIS_SFZD_YZMXB h on b.pkey=h.yzmx and b.companyid=h.companyid left join HIS_MZJS_MZFPZB fpb on h.ZDZBPKEY=fpb.GLZDBPKEY and h.companyid=fpb.companyid where a.companyid=? #ypbm# and fpb.SFRQ >=? and fpb.SFRQ <=?
|
||
|
|
||
|
|
||
|
union all
|
||
|
|
||
|
select b.yzxpkey,b.yzmc,c.gg,a.yzsl,a.tysl,(nvl(a.YZSL,0)-nvl(a.TYSL,0)) fysl,(nvl(a.YZSL,0)-nvl(a.TYSL,0))*e.jbdj cbje,(nvl(a.YZSL,0)-nvl(a.TYSL,0))* b.YPYZJBJG xsje,f.ZHXS,c.JBDW,f.RKDW,d.JJYS,f.FYZL,f.dwview,e.YXQ,e.PH,c.ZCZH,c.CSXX,rkd.GYS from HIS_YFFY_ZYFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.companyid=b.companyid left join HIS_YPXX c on a.YZXPKEY=c.BM left join HIS_JZ_BASEINFO d on a.JZPKEY=d.pkey and a.companyid=d.companyid left join HIS_KSKC_PC e on a.KSKCPCPKEY=e.pkey and a.companyid=e.companyid left join HIS_SFX f on a.yzxpkey=f.bm and a.companyid=f.companyid left join HIS_YFFY_ZYFYZB g on a.FYBPKEY=g.pkey and a.companyid=g.companyid left join HIS_YFYK_RKD_MX rkmx on e.pkey=rkmx.KSKC_PC_PKEY and e.companyid=rkmx.companyid left join HIS_YFYK_RKD rkd on rkmx.djh=rkd.djh and rkmx.companyid=rkd.companyid right join HIS_SFZD_YZMXB h on b.pkey=h.yzmx and b.companyid=h.companyid left join HIS_MZJS_MZFPZB fpb on h.ZDZBPKEY=fpb.GLZDBPKEY and h.companyid=fpb.companyid where a.companyid=? #ypbm# and fpb.SFRQ >=? and fpb.SFRQ <=?
|
||
|
|
||
|
) group by yzxpkey,yzmc,gg,ZHXS,JBDW,RKDW,JJYS,FYZL,dwview,yxq,ph,ZCZH,CSXX,GYS ORDER BY JJYS
|
||
|
|
||
|
|
||
|
]]></sql>
|
||
|
<fields>
|
||
|
<f name="YZXPKEY" type="12" />
|
||
|
<f name="YZMC" type="12" />
|
||
|
<f name="GG" type="12" />
|
||
|
<f name="FYSL" type="4" />
|
||
|
<f name="CBJE" type="4" />
|
||
|
<f name="XSJE" type="4" />
|
||
|
<f name="ZHXS" type="8" />
|
||
|
<f name="JBDW" type="12" />
|
||
|
<f name="RKDW" type="12" />
|
||
|
<f name="JJYS" type="12" />
|
||
|
<f name="FYZL" type="12" />
|
||
|
<f name="DWVIEW" type="12" />
|
||
|
<f name="YXQ" type="93" />
|
||
|
<f name="PH" type="12" />
|
||
|
<f name="ZCZH" type="12" />
|
||
|
<f name="CSXX" type="12" />
|
||
|
<f name="GYS" 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="ygyyzyyphzbyJjysDaoBySales" log="true" type="1">
|
||
|
<sql><![CDATA[
|
||
|
|
||
|
SELECT yzxpkey,yzmc,gg,sum(fysl) fysl,sum(CBJE) cbje,sum(XSJE) xsje,ZHXS,JBDW,RKDW,JJYS,FYZL,dwview,YXQ,PH,ZCZH,CSXX,GYS FROM
|
||
|
(
|
||
|
|
||
|
|
||
|
select b.yzxpkey,b.yzmc,c.gg,a.yzsl,a.tysl,(nvl(a.YZSL,0)-nvl(a.TYSL,0)) fysl,(nvl(a.YZSL,0)-nvl(a.TYSL,0))*e.jbdj cbje,(nvl(a.YZSL,0)-nvl(a.TYSL,0))* b.YPYZJBJG xsje,f.ZHXS,c.JBDW,f.RKDW,d.JJYS,f.FYZL,f.dwview,e.YXQ,e.PH,c.ZCZH,c.CSXX,rkd.GYS from HIS_YFFY_ZYFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.companyid=b.companyid left join HIS_YPXX c on a.YZXPKEY=c.BM left join HIS_JZ_BASEINFO d on a.JZPKEY=d.pkey and a.companyid=d.companyid left join HIS_KSKC_PC e on a.KSKCPCPKEY=e.pkey and a.companyid=e.companyid left join HIS_SFX f on a.yzxpkey=f.bm and a.companyid=f.companyid left join HIS_YFFY_ZYFYZB g on a.FYBPKEY=g.pkey and a.companyid=g.companyid left join HIS_YFYK_RKD_MX rkmx on e.pkey=rkmx.KSKC_PC_PKEY and e.companyid=rkmx.companyid left join HIS_YFYK_RKD rkd on rkmx.djh=rkd.djh and rkmx.companyid=rkd.companyid right join HIS_SFZD_YZMXB h on b.pkey=h.yzmx and b.companyid=h.companyid left join HIS_MZJS_MZFPZB fpb on h.ZDZBPKEY=fpb.GLZDBPKEY and h.companyid=fpb.companyid where a.companyid=? #ypbm# and fpb.SFRQ >=? and fpb.SFRQ <=?
|
||
|
|
||
|
) group by yzxpkey,yzmc,gg,ZHXS,JBDW,RKDW,JJYS,FYZL,dwview,yxq,ph,ZCZH,CSXX,GYS ORDER BY JJYS
|
||
|
|
||
|
|
||
|
]]></sql>
|
||
|
<fields>
|
||
|
<f name="YZXPKEY" type="12" />
|
||
|
<f name="YZMC" type="12" />
|
||
|
<f name="GG" type="12" />
|
||
|
<f name="FYSL" type="4" />
|
||
|
<f name="CBJE" type="4" />
|
||
|
<f name="XSJE" type="4" />
|
||
|
<f name="ZHXS" type="8" />
|
||
|
<f name="JBDW" type="12" />
|
||
|
<f name="RKDW" type="12" />
|
||
|
<f name="JJYS" type="12" />
|
||
|
<f name="FYZL" type="12" />
|
||
|
<f name="DWVIEW" type="12" />
|
||
|
<f name="YXQ" type="93" />
|
||
|
<f name="PH" type="12" />
|
||
|
<f name="ZCZH" type="12" />
|
||
|
<f name="CSXX" type="12" />
|
||
|
<f name="GYS" type="12" />
|
||
|
</fields>
|
||
|
<parameter>
|
||
|
<p>12</p>
|
||
|
<p>93</p>
|
||
|
<p>93</p>
|
||
|
</parameter>
|
||
|
</dao>
|
||
|
|
||
|
<dao id="ygyyMzyphzbyJjysDaooBySales" log="true" type="1">
|
||
|
<sql><![CDATA[
|
||
|
|
||
|
SELECT yzxpkey,yzmc,gg,sum(fysl) fysl,sum(CBJE) cbje,sum(XSJE) xsje,ZHXS,JBDW,RKDW,JJYS,FYZL,dwview,YXQ,PH,ZCZH,CSXX,GYS FROM
|
||
|
(
|
||
|
select b.yzxpkey,b.yzmc,c.gg,a.yzsl,a.tysl,(nvl(a.YZSL,0)-nvl(a.TYSL,0)) fysl,(nvl(a.YZSL,0)-nvl(a.TYSL,0))*e.jbdj cbje,(nvl(a.YZSL,0)-nvl(a.TYSL,0))* b.YPYZJBJG xsje, f.ZHXS,c.JBDW,f.RKDW,d.JJYS,f.FYZL,f.dwview,e.YXQ,e.PH,c.ZCZH,c.CSXX,rkd.GYS from HIS_YFFY_MZFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.companyid=b.companyid left join HIS_YPXX c on a.YZX=c.BM left join HIS_JZ_BASEINFO d on a.JZPKEY=d.pkey and a.companyid=d.companyid left join HIS_KSKC_PC e on a.KSKCPCPKEY=e.pkey and a.companyid=e.companyid left join HIS_SFX f on a.yzx=f.bm and a.companyid=f.companyid left join HIS_YFFY_MZFYZB g on a.FYBPKEY=g.pkey and a.companyid=g.companyid left join HIS_YFYK_RKD_MX rkmx on e.pkey=rkmx.KSKC_PC_PKEY and e.companyid=rkmx.companyid left join HIS_YFYK_RKD rkd on rkmx.djh=rkd.djh and rkmx.companyid=rkd.companyid right join HIS_SFZD_YZMXB h on b.pkey=h.yzmx and b.companyid=h.companyid left join HIS_MZJS_MZFPZB fpb on h.ZDZBPKEY=fpb.GLZDBPKEY and h.companyid=fpb.companyid where a.companyid=? #ypbm# and fpb.SFRQ >=? and fpb.SFRQ <=?
|
||
|
|
||
|
|
||
|
) group by yzxpkey,yzmc,gg,ZHXS,JBDW,RKDW,JJYS,FYZL,dwview,YXQ,PH,ZCZH,CSXX,GYS ORDER BY JJYS
|
||
|
|
||
|
|
||
|
]]></sql>
|
||
|
<fields>
|
||
|
<f name="YZXPKEY" type="12" />
|
||
|
<f name="YZMC" type="12" />
|
||
|
<f name="GG" type="12" />
|
||
|
<f name="FYSL" type="4" />
|
||
|
<f name="CBJE" type="4" />
|
||
|
<f name="XSJE" type="4" />
|
||
|
<f name="ZHXS" type="8" />
|
||
|
<f name="JBDW" type="12" />
|
||
|
<f name="RKDW" type="12" />
|
||
|
<f name="JJYS" type="12" />
|
||
|
<f name="FYZL" type="12" />
|
||
|
<f name="DWVIEW" type="12" />
|
||
|
<f name="YXQ" type="93" />
|
||
|
<f name="PH" type="12" />
|
||
|
<f name="ZCZH" type="12" />
|
||
|
<f name="CSXX" type="12" />
|
||
|
<f name="GYS" type="12" />
|
||
|
</fields>
|
||
|
<parameter>
|
||
|
<p>12</p>
|
||
|
<p>93</p>
|
||
|
<p>93</p>
|
||
|
</parameter>
|
||
|
</dao>
|
||
|
|
||
|
<dao id="ygyyallyphzbyJjksDaoBySales" log="true" type="1">
|
||
|
<sql><![CDATA[
|
||
|
|
||
|
SELECT yzxpkey,yzmc,gg,sum(fysl) fysl,sum(CBJE) cbje,sum(XSJE) xsje,ZHXS,JBDW,RKDW,JJKS,FYZL,dwview,YXQ,PH,ZCZH,CSXX,GYS FROM
|
||
|
(
|
||
|
select b.yzxpkey,b.yzmc,c.gg,a.yzsl,a.tysl,(nvl(a.YZSL,0)-nvl(a.TYSL,0)) fysl,(nvl(a.YZSL,0)-nvl(a.TYSL,0))*e.jbdj cbje,(nvl(a.YZSL,0)-nvl(a.TYSL,0))* b.YPYZJBJG xsje, f.ZHXS,c.JBDW,f.RKDW,d.JJKS,f.FYZL,f.dwview,e.YXQ,e.PH,c.ZCZH,c.CSXX,rkd.GYS from HIS_YFFY_MZFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.companyid=b.companyid left join HIS_YPXX c on a.YZX=c.BM left join HIS_JZ_BASEINFO d on a.JZPKEY=d.pkey and a.companyid=d.companyid left join HIS_KSKC_PC e on a.KSKCPCPKEY=e.pkey and a.companyid=e.companyid left join HIS_SFX f on a.yzx=f.bm and a.companyid=f.companyid left join HIS_YFFY_MZFYZB g on a.FYBPKEY=g.pkey and a.companyid=g.companyid left join HIS_YFYK_RKD_MX rkmx on e.pkey=rkmx.KSKC_PC_PKEY and e.companyid=rkmx.companyid left join HIS_YFYK_RKD rkd on rkmx.djh=rkd.djh and rkmx.companyid=rkd.companyid right join HIS_SFZD_YZMXB h on b.pkey=h.yzmx and b.companyid=h.companyid left join HIS_MZJS_MZFPZB fpb on h.ZDZBPKEY=fpb.GLZDBPKEY and h.companyid=fpb.companyid where a.companyid=? #ypbm# and fpb.SFRQ >=? and fpb.SFRQ <=?
|
||
|
|
||
|
|
||
|
union all
|
||
|
|
||
|
select b.yzxpkey,b.yzmc,c.gg,a.yzsl,a.tysl,(nvl(a.YZSL,0)-nvl(a.TYSL,0)) fysl,(nvl(a.YZSL,0)-nvl(a.TYSL,0))*e.jbdj cbje,(nvl(a.YZSL,0)-nvl(a.TYSL,0))* b.YPYZJBJG xsje,f.ZHXS,c.JBDW,f.RKDW,d.JJKS,f.FYZL,f.dwview,e.YXQ,e.PH,c.ZCZH,c.CSXX,rkd.GYS from HIS_YFFY_ZYFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.companyid=b.companyid left join HIS_YPXX c on a.YZXPKEY=c.BM left join HIS_JZ_BASEINFO d on a.JZPKEY=d.pkey and a.companyid=d.companyid left join HIS_KSKC_PC e on a.KSKCPCPKEY=e.pkey and a.companyid=e.companyid left join HIS_SFX f on a.yzxpkey=f.bm and a.companyid=f.companyid left join HIS_YFFY_ZYFYZB g on a.FYBPKEY=g.pkey and a.companyid=g.companyid left join HIS_YFYK_RKD_MX rkmx on e.pkey=rkmx.KSKC_PC_PKEY and e.companyid=rkmx.companyid left join HIS_YFYK_RKD rkd on rkmx.djh=rkd.djh and rkmx.companyid=rkd.companyid right join HIS_SFZD_YZMXB h on b.pkey=h.yzmx and b.companyid=h.companyid left join HIS_MZJS_MZFPZB fpb on h.ZDZBPKEY=fpb.GLZDBPKEY and h.companyid=fpb.companyid where a.companyid=? #ypbm# and fpb.SFRQ >=? and fpb.SFRQ <=?
|
||
|
|
||
|
) group by yzxpkey,yzmc,gg,ZHXS,JBDW,RKDW,JJKS,FYZL,dwview,YXQ,PH,ZCZH,CSXX,GYS ORDER BY JJKS
|
||
|
|
||
|
|
||
|
]]></sql>
|
||
|
<fields>
|
||
|
<f name="YZXPKEY" type="12" />
|
||
|
<f name="YZMC" type="12" />
|
||
|
<f name="GG" type="12" />
|
||
|
<f name="FYSL" type="4" />
|
||
|
<f name="CBJE" type="4" />
|
||
|
<f name="XSJE" type="4" />
|
||
|
<f name="ZHXS" type="8" />
|
||
|
<f name="JBDW" type="12" />
|
||
|
<f name="RKDW" type="12" />
|
||
|
<f name="JJKS" type="12" />
|
||
|
<f name="FYZL" type="12" />
|
||
|
<f name="DWVIEW" type="12" />
|
||
|
<f name="YXQ" type="93" />
|
||
|
<f name="PH" type="12" />
|
||
|
<f name="ZCZH" type="12" />
|
||
|
<f name="CSXX" type="12" />
|
||
|
<f name="GYS" 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="ygyyzyyphzbyJjksDaoBySales" log="true" type="1">
|
||
|
<sql><![CDATA[
|
||
|
|
||
|
SELECT yzxpkey,yzmc,gg,sum(fysl) fysl,sum(CBJE) cbje,sum(XSJE) xsje,ZHXS,JBDW,RKDW,JJKS,FYZL,dwview,YXQ,PH,ZCZH,CSXX,GYS FROM
|
||
|
(
|
||
|
|
||
|
|
||
|
select b.yzxpkey,b.yzmc,c.gg,a.yzsl,a.tysl,(nvl(a.YZSL,0)-nvl(a.TYSL,0)) fysl,(nvl(a.YZSL,0)-nvl(a.TYSL,0))*e.jbdj cbje,(nvl(a.YZSL,0)-nvl(a.TYSL,0))* b.YPYZJBJG xsje,f.ZHXS,c.JBDW,f.RKDW,d.JJKS,f.FYZL,f.dwview,e.YXQ,e.PH,c.ZCZH,c.CSXX,rkd.GYS from HIS_YFFY_ZYFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.companyid=b.companyid left join HIS_YPXX c on a.YZXPKEY=c.BM left join HIS_JZ_BASEINFO d on a.JZPKEY=d.pkey and a.companyid=d.companyid left join HIS_KSKC_PC e on a.KSKCPCPKEY=e.pkey and a.companyid=e.companyid left join HIS_SFX f on a.yzxpkey=f.bm and a.companyid=f.companyid left join HIS_YFFY_ZYFYZB g on a.FYBPKEY=g.pkey and a.companyid=g.companyid left join HIS_YFYK_RKD_MX rkmx on e.pkey=rkmx.KSKC_PC_PKEY and e.companyid=rkmx.companyid left join HIS_YFYK_RKD rkd on rkmx.djh=rkd.djh and rkmx.companyid=rkd.companyid right join HIS_SFZD_YZMXB h on b.pkey=h.yzmx and b.companyid=h.companyid left join HIS_MZJS_MZFPZB fpb on h.ZDZBPKEY=fpb.GLZDBPKEY and h.companyid=fpb.companyid where a.companyid=? #ypbm# and fpb.SFRQ >=? and fpb.SFRQ <=?
|
||
|
|
||
|
) group by yzxpkey,yzmc,gg,ZHXS,JBDW,RKDW,JJKS,FYZL,dwview,YXQ,PH,ZCZH,CSXX,GYS ORDER BY JJKS
|
||
|
|
||
|
|
||
|
]]></sql>
|
||
|
<fields>
|
||
|
<f name="YZXPKEY" type="12" />
|
||
|
<f name="YZMC" type="12" />
|
||
|
<f name="GG" type="12" />
|
||
|
<f name="FYSL" type="4" />
|
||
|
<f name="CBJE" type="4" />
|
||
|
<f name="XSJE" type="4" />
|
||
|
<f name="ZHXS" type="8" />
|
||
|
<f name="JBDW" type="12" />
|
||
|
<f name="RKDW" type="12" />
|
||
|
<f name="JJKS" type="12" />
|
||
|
<f name="FYZL" type="12" />
|
||
|
<f name="DWVIEW" type="12" />
|
||
|
<f name="YXQ" type="93" />
|
||
|
<f name="PH" type="12" />
|
||
|
<f name="ZCZH" type="12" />
|
||
|
<f name="CSXX" type="12" />
|
||
|
<f name="GYS" type="12" />
|
||
|
</fields>
|
||
|
<parameter>
|
||
|
<p>12</p>
|
||
|
<p>93</p>
|
||
|
<p>93</p>
|
||
|
</parameter>
|
||
|
</dao>
|
||
|
|
||
|
<dao id="ygyyMzyphzbyJjksDaoBySales" log="true" type="1">
|
||
|
<sql><![CDATA[
|
||
|
|
||
|
SELECT yzxpkey,yzmc,gg,sum(fysl) fysl,sum(CBJE) cbje,sum(XSJE) xsje,ZHXS,JBDW,RKDW,JJKS,FYZL,dwview,YXQ,PH,ZCZH,CSXX,GYS FROM
|
||
|
(
|
||
|
select b.yzxpkey,b.yzmc,c.gg,a.yzsl,a.tysl,(nvl(a.YZSL,0)-nvl(a.TYSL,0)) fysl,(nvl(a.YZSL,0)-nvl(a.TYSL,0))*e.jbdj cbje,(nvl(a.YZSL,0)-nvl(a.TYSL,0))* b.YPYZJBJG xsje, f.ZHXS,c.JBDW,f.RKDW,d.JJKS,f.FYZL,f.dwview,e.YXQ,e.PH,c.ZCZH,c.CSXX,rkd.GYS from HIS_YFFY_MZFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.companyid=b.companyid left join HIS_YPXX c on a.YZX=c.BM left join HIS_JZ_BASEINFO d on a.JZPKEY=d.pkey and a.companyid=d.companyid left join HIS_KSKC_PC e on a.KSKCPCPKEY=e.pkey and a.companyid=e.companyid left join HIS_SFX f on a.yzx=f.bm and a.companyid=f.companyid left join HIS_YFFY_MZFYZB g on a.FYBPKEY=g.pkey and a.companyid=g.companyid left join HIS_YFYK_RKD_MX rkmx on e.pkey=rkmx.KSKC_PC_PKEY and e.companyid=rkmx.companyid left join HIS_YFYK_RKD rkd on rkmx.djh=rkd.djh and rkmx.companyid=rkd.companyid right join HIS_SFZD_YZMXB h on b.pkey=h.yzmx and b.companyid=h.companyid left join HIS_MZJS_MZFPZB fpb on h.ZDZBPKEY=fpb.GLZDBPKEY and h.companyid=fpb.companyid where a.companyid=? #ypbm# and fpb.SFRQ >=? and fpb.SFRQ <=?
|
||
|
|
||
|
|
||
|
) group by yzxpkey,yzmc,gg,ZHXS,JBDW,RKDW,JJKS,FYZL,dwview,YXQ,PH,ZCZH,CSXX,GYS ORDER BY JJKS
|
||
|
|
||
|
|
||
|
]]></sql>
|
||
|
<fields>
|
||
|
<f name="YZXPKEY" type="12" />
|
||
|
<f name="YZMC" type="12" />
|
||
|
<f name="GG" type="12" />
|
||
|
<f name="FYSL" type="4" />
|
||
|
<f name="CBJE" type="4" />
|
||
|
<f name="XSJE" type="4" />
|
||
|
<f name="ZHXS" type="8" />
|
||
|
<f name="JBDW" type="12" />
|
||
|
<f name="RKDW" type="12" />
|
||
|
<f name="JJKS" type="12" />
|
||
|
<f name="FYZL" type="12" />
|
||
|
<f name="DWVIEW" type="12" />
|
||
|
<f name="YXQ" type="93" />
|
||
|
<f name="PH" type="12" />
|
||
|
<f name="ZCZH" type="12" />
|
||
|
<f name="CSXX" type="12" />
|
||
|
<f name="GYS" type="12" />
|
||
|
</fields>
|
||
|
<parameter>
|
||
|
<p>12</p>
|
||
|
<p>93</p>
|
||
|
<p>93</p>
|
||
|
</parameter>
|
||
|
</dao>
|
||
|
|
||
|
<dao id="ygyyallypfyfzbDaoBySales" log="true" type="1">
|
||
|
<sql><![CDATA[
|
||
|
|
||
|
|
||
|
SELECT yzxpkey,yzmc,gg,YZSL,TYSL,ZHXS,JBDW,RKDW,JJYS,JJKS,FYZL,jbdj,YPYZJBJG,dwview,FYRQ,YXQ,PH,ZCZH,CSXX,GYS FROM
|
||
|
(
|
||
|
select 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,g.FYRQ,e.YXQ,e.PH,c.ZCZH,c.CSXX,rkd.GYS from HIS_YFFY_MZFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.companyid=b.companyid left join HIS_YPXX c on a.YZX=c.BM left join HIS_JZ_BASEINFO d on a.JZPKEY=d.pkey and a.companyid=d.companyid left join HIS_KSKC_PC e on a.KSKCPCPKEY=e.pkey and a.companyid=e.companyid left join HIS_SFX f on a.yzx=f.bm and a.companyid=f.companyid left join HIS_YFFY_MZFYZB g on a.FYBPKEY=g.pkey and a.companyid=g.companyid left join HIS_YFYK_RKD_MX rkmx on e.pkey=rkmx.KSKC_PC_PKEY and e.companyid=rkmx.companyid left join HIS_YFYK_RKD rkd on rkmx.djh=rkd.djh and rkmx.companyid=rkd.companyid right join HIS_SFZD_YZMXB h on b.pkey=h.yzmx and b.companyid=h.companyid left join HIS_MZJS_MZFPZB fpb on h.ZDZBPKEY=fpb.GLZDBPKEY and h.companyid=fpb.companyid where a.companyid=? #ypbm# and fpb.SFRQ >=? and fpb.SFRQ <=?
|
||
|
|
||
|
|
||
|
union all
|
||
|
|
||
|
select 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,g.FYTIME FYRQ,e.YXQ,e.PH,c.ZCZH,c.CSXX,rkd.GYS from HIS_YFFY_ZYFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.companyid=b.companyid left join HIS_YPXX c on a.YZXPKEY=c.BM left join HIS_JZ_BASEINFO d on a.JZPKEY=d.pkey and a.companyid=d.companyid left join HIS_KSKC_PC e on a.KSKCPCPKEY=e.pkey and a.companyid=e.companyid left join HIS_SFX f on a.yzxpkey=f.bm and a.companyid=f.companyid left join HIS_YFFY_ZYFYZB g on a.FYBPKEY=g.pkey and a.companyid=g.companyid left join HIS_YFYK_RKD_MX rkmx on e.pkey=rkmx.KSKC_PC_PKEY and e.companyid=rkmx.companyid left join HIS_YFYK_RKD rkd on rkmx.djh=rkd.djh and rkmx.companyid=rkd.companyid right join HIS_SFZD_YZMXB h on b.pkey=h.yzmx and b.companyid=h.companyid left join HIS_MZJS_MZFPZB fpb on h.ZDZBPKEY=fpb.GLZDBPKEY and h.companyid=fpb.companyid where a.companyid=? #ypbm# and fpb.SFRQ >=? and fpb.SFRQ <=?
|
||
|
|
||
|
) ORDER BY JJYS
|
||
|
|
||
|
|
||
|
]]></sql>
|
||
|
<fields>
|
||
|
<f name="YZXPKEY" type="12" />
|
||
|
<f name="YZMC" type="12" />
|
||
|
<f name="GG" type="12" />
|
||
|
<f name="YZSL" type="12" />
|
||
|
<f name="TYSL" type="12" />
|
||
|
<f name="ZHXS" type="12" />
|
||
|
<f name="JBDW" type="12" />
|
||
|
<f name="RKDW" type="12" />
|
||
|
<f name="JJYS" type="12" />
|
||
|
<f name="JJKS" type="12" />
|
||
|
<f name="FYZL" type="12" />
|
||
|
<f name="JBDJ" type="8" />
|
||
|
<f name="YPYZJBJG" type="12" />
|
||
|
<f name="DWVIEW" type="12" />
|
||
|
<f name="FYRQ" type="93" />
|
||
|
<f name="YXQ" type="93" />
|
||
|
<f name="PH" type="12" />
|
||
|
<f name="ZCZH" type="12" />
|
||
|
<f name="CSXX" type="12" />
|
||
|
<f name="GYS" 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="ygyyzyypfyfzbDaoBySales" log="true" type="1">
|
||
|
<sql><![CDATA[
|
||
|
|
||
|
|
||
|
|
||
|
select 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 from HIS_YFFY_ZYFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.companyid=b.companyid left join HIS_YPXX c on a.YZXPKEY=c.BM left join HIS_JZ_BASEINFO d on a.JZPKEY=d.pkey and a.companyid=d.companyid left join HIS_KSKC_PC e on a.KSKCPCPKEY=e.pkey and a.companyid=e.companyid left join HIS_SFX f on a.yzxpkey=f.bm and a.companyid=f.companyid left join HIS_YFFY_ZYFYZB g on a.FYBPKEY=g.pkey and a.companyid=g.companyid left join HIS_YFYK_RKD_MX rkmx on e.pkey=rkmx.KSKC_PC_PKEY and e.companyid=rkmx.companyid left join HIS_YFYK_RKD rkd on rkmx.djh=rkd.djh and rkmx.companyid=rkd.companyid right join HIS_SFZD_YZMXB h on b.pkey=h.yzmx and b.companyid=h.companyid left join HIS_MZJS_MZFPZB fpb on h.ZDZBPKEY=fpb.GLZDBPKEY and h.companyid=fpb.companyid where a.companyid=? #ypbm# and fpb.SFRQ >=? and fpb.SFRQ <=? order by d.JJYS
|
||
|
]]></sql>
|
||
|
<fields>
|
||
|
<f name="YZXPKEY" type="12" />
|
||
|
<f name="YZMC" type="12" />
|
||
|
<f name="GG" type="12" />
|
||
|
<f name="YZSL" type="12" />
|
||
|
<f name="TYSL" type="12" />
|
||
|
<f name="ZHXS" type="12" />
|
||
|
<f name="JBDW" type="12" />
|
||
|
<f name="RKDW" type="12" />
|
||
|
<f name="JJYS" type="12" />
|
||
|
<f name="JJKS" type="12" />
|
||
|
<f name="FYZL" type="12" />
|
||
|
<f name="JBDJ" type="8" />
|
||
|
<f name="YPYZJBJG" type="12" />
|
||
|
<f name="DWVIEW" type="12" />
|
||
|
<f name="YXQ" type="93" />
|
||
|
<f name="PH" type="12" />
|
||
|
<f name="ZCZH" type="12" />
|
||
|
<f name="CSXX" type="12" />
|
||
|
<f name="GYS" type="12" />
|
||
|
</fields>
|
||
|
<parameter>
|
||
|
<p>12</p>
|
||
|
<p>93</p>
|
||
|
<p>93</p>
|
||
|
</parameter>
|
||
|
</dao>
|
||
|
|
||
|
|
||
|
<dao id="ygyymzypfyfzbDaoBySales" log="true" type="1">
|
||
|
<sql><![CDATA[
|
||
|
select 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 from HIS_YFFY_MZFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.companyid=b.companyid left join HIS_YPXX c on a.YZX=c.BM left join HIS_JZ_BASEINFO d on a.JZPKEY=d.pkey and a.companyid=d.companyid left join HIS_KSKC_PC e on a.KSKCPCPKEY=e.pkey and a.companyid=e.companyid left join HIS_SFX f on a.yzx=f.bm and a.companyid=f.companyid left join HIS_YFFY_MZFYZB g on a.FYBPKEY=g.pkey and a.companyid=g.companyid left join HIS_YFYK_RKD_MX rkmx on e.pkey=rkmx.KSKC_PC_PKEY and e.companyid=rkmx.companyid left join HIS_YFYK_RKD rkd on rkmx.djh=rkd.djh and rkmx.companyid=rkd.companyid right join HIS_SFZD_YZMXB h on b.pkey=h.yzmx and b.companyid=h.companyid left join HIS_MZJS_MZFPZB fpb on h.ZDZBPKEY=fpb.GLZDBPKEY and h.companyid=fpb.companyid where a.companyid=? #ypbm# and fpb.SFRQ >=? and fpb.SFRQ <=? order by d.JJYS
|
||
|
|
||
|
]]></sql>
|
||
|
<fields>
|
||
|
<f name="YZXPKEY" type="12" />
|
||
|
<f name="YZMC" type="12" />
|
||
|
<f name="GG" type="12" />
|
||
|
<f name="YZSL" type="12" />
|
||
|
<f name="TYSL" type="12" />
|
||
|
<f name="ZHXS" type="12" />
|
||
|
<f name="JBDW" type="12" />
|
||
|
<f name="RKDW" type="12" />
|
||
|
<f name="JJYS" type="12" />
|
||
|
<f name="JJKS" type="12" />
|
||
|
<f name="FYZL" type="12" />
|
||
|
<f name="JBDJ" type="8" />
|
||
|
<f name="YPYZJBJG" type="12" />
|
||
|
<f name="DWVIEW" type="12" />
|
||
|
<f name="YXQ" type="93" />
|
||
|
<f name="PH" type="12" />
|
||
|
<f name="ZCZH" type="12" />
|
||
|
<f name="CSXX" type="12" />
|
||
|
<f name="GYS" type="12" />
|
||
|
</fields>
|
||
|
<parameter>
|
||
|
<p>12</p>
|
||
|
<p>93</p>
|
||
|
<p>93</p>
|
||
|
</parameter>
|
||
|
</dao>
|
||
|
|
||
|
<dao id="mzjbypsytjbdao" log="true" type="1">
|
||
|
<sql><![CDATA[
|
||
|
SELECT
|
||
|
f.NAME 医生,
|
||
|
a.YZLB,
|
||
|
a.YZXPKEY,
|
||
|
b.MC 药品名称,
|
||
|
d.GG 规格,
|
||
|
sum( a.YZSL ) 发药数量,
|
||
|
sum( YZJE ) AS 总金额,
|
||
|
e.MC as 单位
|
||
|
|
||
|
FROM
|
||
|
his_yz_mxb a
|
||
|
LEFT JOIN HIS_YZX b ON b.JGID = a.JGID
|
||
|
AND b.BM = a.YZXPKEY
|
||
|
LEFT JOIN HIS_JZ_BASEINFO c ON c.hzpkey = a.hzpkey
|
||
|
LEFT JOIN HIS_YPXX d ON b.bm = d.BM
|
||
|
LEFT JOIN MAIN_ZDB e on a.YZDW = e.BH and e.ZDZB_BH='000014'
|
||
|
LEFT JOIN MAIN_YHXX f on a.YZXZYS = f.USERACCOUNT
|
||
|
LEFT JOIN HIS_YZ_EXEC g ON g.jgid = a.jgid
|
||
|
AND g.JZPKEY = a.JZPKEY
|
||
|
AND a.HZPKEY = g.HZPKEY
|
||
|
AND g.YZMX = a.PKEY
|
||
|
WHERE
|
||
|
YZXZYS IS NOT NULL
|
||
|
AND ( a.YZLB = '01' OR a.YZLB = '02' OR a.YZLB = '03' )
|
||
|
AND YZSHZT = '1' AND g.ZXFLAG = '1'
|
||
|
and a.jgid=? #jzlx# and a.YZXZSJ >=? and a.YZXZSJ <= ?
|
||
|
GROUP BY
|
||
|
f.NAME,
|
||
|
a.YZLB,
|
||
|
a.YZXPKEY,
|
||
|
b.MC,d.GG,
|
||
|
e.MC
|
||
|
order by f.NAME
|
||
|
]]></sql>
|
||
|
<parameter>
|
||
|
<p>12</p>
|
||
|
<p>93</p>
|
||
|
<p>93</p>
|
||
|
</parameter>
|
||
|
//医生,YZLB,YZXPKEY,药品名称,规格,发药数量,总金额,JZLX
|
||
|
<fields>
|
||
|
<f name="医生" type="12" />
|
||
|
<f name="YZLB" type="12" />
|
||
|
<f name="YZXPKEY" type="12" />
|
||
|
<f name="药品名称" type="12" />
|
||
|
<f name="规格" type="12" />
|
||
|
<f name="发药数量" type="4" />
|
||
|
<f name="总金额" type="4" />
|
||
|
<f name="单位" type="12" />
|
||
|
</fields>
|
||
|
</dao>
|
||
|
|
||
|
<dao id="qyksstjfkdao" log="true" type="1">
|
||
|
<sql><![CDATA[
|
||
|
SELECT
|
||
|
c.DPTNAME 科室,
|
||
|
a.YZXZYS 医生ID,
|
||
|
f.NAME 医生,
|
||
|
count( YZXZKS) 医嘱数,
|
||
|
sum( a.YZJE ) 医嘱金额,
|
||
|
count( CASE b.ISKJY WHEN '1' THEN 1 ELSE NULL END ) 抗生医嘱数 ,
|
||
|
sum( CASE b.ISKJY WHEN '1' THEN a.YZJE ELSE NULL END ) 抗生药医嘱金额,
|
||
|
ROUND((count( CASE ISKJY WHEN '1' THEN 1 ELSE NULL END ) / count(YZXZYS))* 100,2 )as 抗生医嘱占比,
|
||
|
ROUND((sum( CASE ISKJY WHEN '1' THEN a.YZJE ELSE NULL END) / sum(YZJE) )* 100,2) 抗生医嘱金额占比
|
||
|
FROM
|
||
|
HIS_YZ_MXB a
|
||
|
LEFT JOIN HIS_YPXX b ON b.BM = a.YZXPKEY
|
||
|
LEFT JOIN MAIN_KS c on c.DPTID =a.YZXZKS and c.JGID = a.JGID
|
||
|
LEFT JOIN MAIN_YHXX f on a.YZXZYS = f.USERACCOUNT
|
||
|
LEFT JOIN HIS_YZ_EXEC e ON e.jgid = a.jgid
|
||
|
AND e.JZPKEY = a.JZPKEY
|
||
|
AND a.HZPKEY = e.HZPKEY
|
||
|
AND e.YZMX = a.PKEY
|
||
|
WHERE
|
||
|
( a.YZZT != '0' OR a.YZZT != '5' OR a.YZZT != '6' OR a.YZZT != '21' )
|
||
|
AND a.YZSHZT = '1' AND e.ZXFLAG = '1'
|
||
|
and a.jgid=? #jzlx# and a.YZXZSJ >=? and a.YZXZSJ <= ?
|
||
|
AND ( a.YZLB = '01' OR a.YZLB = '02' OR a.YZLB = '03' )
|
||
|
GROUP BY
|
||
|
c.DPTNAME,
|
||
|
a.YZXZYS,
|
||
|
f.NAME
|
||
|
ORDER BY
|
||
|
c.DPTNAME
|
||
|
]]></sql>
|
||
|
<fields>
|
||
|
<f name="科室" type="12" />
|
||
|
<f name="医生ID" type="12" />
|
||
|
<f name="医生" type="12" />
|
||
|
<f name="医嘱数" type="12" />
|
||
|
<f name="医嘱金额" type="12" />
|
||
|
<f name="抗生医嘱数" type="12" />
|
||
|
<f name="抗生药医嘱金额" type="4" />
|
||
|
<f name="抗生医嘱占比" type="4" />
|
||
|
<f name="抗生医嘱金额占比" type="12" />
|
||
|
</fields>
|
||
|
<parameter>
|
||
|
<p>12</p>
|
||
|
<p>93</p>
|
||
|
<p>93</p>
|
||
|
</parameter>
|
||
|
</dao>
|
||
|
|
||
|
<dao id="qyksstjfzdao" log="true" type="1">
|
||
|
<sql><![CDATA[
|
||
|
SELECT
|
||
|
类型,编码,药品名称,规格,医嘱数量,药品数量,医嘱金额,
|
||
|
(ddd * 药品数量) 累计DDD值,单位
|
||
|
FROM
|
||
|
(
|
||
|
SELECT
|
||
|
CASE
|
||
|
c.JZLX
|
||
|
WHEN 'Z' THEN
|
||
|
'住院' ELSE '门诊'
|
||
|
END 类型,
|
||
|
a.YZXPKEY 编码,
|
||
|
b.mc 药品名称,
|
||
|
b.GG 规格,
|
||
|
count( a.YZXPKEY ) 医嘱数量,
|
||
|
sum( a.yzsl ) 药品数量,
|
||
|
sum( a.yzje ) 医嘱金额,
|
||
|
ddd,b.WHODDDDW 单位
|
||
|
FROM
|
||
|
HIS_YZ_MXB a
|
||
|
LEFT JOIN HIS_YPXX b ON b.BM = a.YZXPKEY
|
||
|
LEFT JOIN HIS_JZ_BASEINFO c ON c.PKEY = a.JZPKEY
|
||
|
AND a.JGID = c.JGID
|
||
|
AND c.HZPKEY = a.HZPKEY
|
||
|
LEFT JOIN HIS_YZ_EXEC e ON e.jgid = a.jgid
|
||
|
AND e.JZPKEY = a.JZPKEY
|
||
|
AND a.HZPKEY = e.HZPKEY
|
||
|
AND e.YZMX = a.PKEY
|
||
|
WHERE
|
||
|
( a.YZZT != '0' OR a.YZZT != '5' OR a.YZZT != '6' OR a.YZZT != '21' )
|
||
|
AND a.YZSHZT = '1'
|
||
|
AND b.iskjy = '1'
|
||
|
AND e.ZXFLAG = '1'
|
||
|
and a.jgid=? #jzlx# and a.YZXZSJ >=? and a.YZXZSJ <= ?
|
||
|
AND ( a.YZLB = '01' OR a.YZLB = '02' OR a.YZLB = '03' )
|
||
|
GROUP BY
|
||
|
c.JZLX,
|
||
|
a.YZXPKEY,
|
||
|
b.mc,
|
||
|
b.GG,b.ddd,b.WHODDDDW
|
||
|
ORDER BY
|
||
|
c.JZLX
|
||
|
) a
|
||
|
]]></sql>
|
||
|
<fields>
|
||
|
<f name="类型" type="12" />
|
||
|
<f name="编码" type="12" />
|
||
|
<f name="药品名称" type="12" />
|
||
|
<f name="规格" type="12" />
|
||
|
<f name="医嘱数量" type="12" />
|
||
|
<f name="药品数量" type="12" />
|
||
|
<f name="医嘱金额" type="4" />
|
||
|
<f name="累计DDD值" type="4" />
|
||
|
<f name="单位" type="12" />
|
||
|
</fields>
|
||
|
<parameter>
|
||
|
<p>12</p>
|
||
|
<p>93</p>
|
||
|
<p>93</p>
|
||
|
</parameter>
|
||
|
</dao>
|
||
|
|
||
|
<dao id="cybrypblhzdao" log="true" type="1">
|
||
|
<sql><![CDATA[
|
||
|
SELECT
|
||
|
b.DPTNAME 科室,
|
||
|
ROUND(sum( case when (a.YZLB='01' or a.YZLB='02' or a.YZLB='03') then a.YZJE else NULL END ),2 ) 药品总费用,
|
||
|
ROUND(sum( case when c.ISGJJBYW = 1 then a.YZJE else NULL END) ,2 ) 基本药品费,
|
||
|
ROUND((sum( case when c.ISGJJBYW = 1 then a.YZJE else NULL END) / sum( case when (a.YZLB='01' or a.YZLB='02' or a.YZLB='03') then a.YZJE else NULL END ))* 100,2 )as 比例,
|
||
|
ROUND(sum( CASE c.ISKJY WHEN '1' THEN a.YZJE ELSE NULL END ),2 ) 抗生药总费用,
|
||
|
ROUND((sum( case when c.ISKJY = '1' then a.YZJE else NULL END) / sum( case when (a.YZLB='01' or a.YZLB='02' or a.YZLB='03') then a.YZJE else NULL END ))* 100,2 )as 抗生药比例,
|
||
|
ROUND(sum( CASE WHEN (c.ISKJY='1' and (c.GZFL = 'KSS1' or c.GZFL = 'KSS2')) THEN a.YZJE ELSE NULL END ),2 ) 基本抗生药总费用,
|
||
|
ROUND((sum( CASE WHEN (c.ISKJY='1' and (c.GZFL = 'KSS1' or c.GZFL = 'KSS2')) THEN a.YZJE ELSE NULL END) / sum( CASE c.ISKJY WHEN '1' THEN a.YZJE ELSE NULL END ))* 100,2) 基本抗生素比例,
|
||
|
ROUND(sum( CASE WHEN (c.ISKJY='1' and c.GZFL = 'KSS3') THEN a.YZJE ELSE NULL END ),2 ) 特殊抗生药总费用,
|
||
|
ROUND((sum( CASE WHEN (c.ISKJY='1' and c.GZFL = 'KSS3') THEN a.YZJE ELSE NULL END) / sum( CASE c.ISKJY WHEN '1' THEN a.YZJE ELSE NULL END ))* 100,2) 特殊抗生素比例,
|
||
|
ROUND(sum( a.YZJE),2 ) 总费用,
|
||
|
ROUND((sum( case when (a.YZLB='01' or a.YZLB='02' or a.YZLB='03') then a.YZJE else NULL END) / sum( a.YZJE))* 100,2) 药品比例
|
||
|
FROM
|
||
|
HIS_YZ_MXB a
|
||
|
LEFT JOIN MAIN_KS b ON b.DPTID = a.YZXZKS
|
||
|
AND b.JGID = a.JGID
|
||
|
LEFT JOIN HIS_YPXX c ON c.BM = a.YZXPKEY
|
||
|
LEFT JOIN HIS_YZX f ON f.BM = a.YZXPKEY
|
||
|
LEFT JOIN HIS_JZ_BASEINFO d ON d.PKEY = a.JZPKEY
|
||
|
AND d.jgid = a.jgid
|
||
|
AND d.HZPKEY = a.HZPKEY
|
||
|
LEFT JOIN HIS_YZ_EXEC e ON e.jgid = a.jgid
|
||
|
AND e.JZPKEY = a.JZPKEY
|
||
|
AND a.HZPKEY = e.HZPKEY
|
||
|
AND e.YZMX = a.PKEY
|
||
|
WHERE
|
||
|
a.jgid = ? and d.CYRQ >=? and d.CYRQ <= ?
|
||
|
AND e.ZXFLAG = '1' AND JZZT = 'C'
|
||
|
GROUP BY
|
||
|
b.DPTNAME
|
||
|
ORDER BY
|
||
|
b.DPTNAME
|
||
|
]]></sql>
|
||
|
<fields>
|
||
|
<f name="DPTNAME" type="12" />
|
||
|
<f name="药品总费用" type="12" />
|
||
|
<f name="基本药品费" type="12" />
|
||
|
<f name="比例" type="12" />
|
||
|
<f name="抗生药总费用" type="12" />
|
||
|
<f name="抗生药比例" type="12" />
|
||
|
<f name="基本抗生药总费用" type="4" />
|
||
|
<f name="基本抗生素比例" type="4" />
|
||
|
<f name="特殊抗生药总费用" type="12" />
|
||
|
<f name="特殊抗生素比例" type="12" />
|
||
|
<f name="总费用" type="12" />
|
||
|
<f name="药品比例" type="12" />
|
||
|
</fields>
|
||
|
<parameter>
|
||
|
<p>12</p>
|
||
|
<p>93</p>
|
||
|
<p>93</p>
|
||
|
</parameter>
|
||
|
</dao>
|
||
|
|
||
|
|
||
|
</datasource>
|