select '' 日期,'' 处方人次,'' 抗菌药物人次,'' 注射药物人次,'' 抗菌注射药物人次,'' 静脉给药人次,''
抗菌静脉给药人次,'' 处方张数,'' 处方金额,'' 处方药品种数,'' 处方用药天数,'' 抗菌药物处方张数,''
抗菌药物处方金额,'' 抗菌处方用药品种数,'' 抗菌处方用药天数,'' 抗菌注射药物金额,'' 注射剂处方张数,'' 注射药物金额,''
抗菌静脉药物金额,'' 中草药处方张数,'' 中草药处方金额,'' 药占比,'' 药占比警戒线 from dual where 1=2
select '' 日期,'' 处方张数人次,'' 处方金额人次,'' 处方平均金额,'' 处方平均用药品种数,'' 处方平均用药天数,''
抗菌处方平均金额,'' 抗菌处方平均用药品种数,'' 抗菌处方平均用药天数,'' 抗菌药物使用率,'' 抗菌处方张数占比,''
抗菌处方金额占比,'' 抗菌注射剂使用率,'' 抗菌注射药物金额占比,'' 注射剂使用率,'' 抗菌静脉给药率,'' 注射剂金额占比,''
门诊静脉给药率,'' 抗菌药占比警戒线,'' 门诊抗菌药物处方人次使用率 from dual where 1=2
=? 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
]]>
12
93
93
=? 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
]]>
12
93
93
=? 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
]]>
12
93
93
=? 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
]]>
12
93
93
=? 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
]]>
12
93
93
=? 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
]]>
12
93
93
=? 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
]]>
12
93
93
=? 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
]]>
12
93
93
=? 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
]]>
12
93
93
=? 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
]]>
12
93
93
=? 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
]]>
12
93
93
=? 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
]]>
12
93
93
=? 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
]]>
12
93
93
=? 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
]]>
12
93
93
select '' 排名,'' 科室,'' 处方张数,'' 处方金额,'' 处方金额张数,'' 处方药品种数,'' 处方药品种数张数,''
处方用药天数,'' 处方用药天数张数 from dual where 1=2
=? 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
]]>
12
12
93
93
=? 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
]]>
12
12
93
93
=? 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
]]>
12
12
93
93
select '' 排名,'' 医生,'' 处方张数,'' 处方金额,'' 处方金额张数,'' 处方药品种数,'' 处方药品种数张数,''
处方用药天数,'' 处方用药天数张数 from dual where 1=2
=? 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
]]>
12
12
93
93
=? 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
]]>
12
12
93
93
=? 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
]]>
12
12
93
93
select '' 科室,'' 就诊人次,'' 使用抗菌药物人次,'' 门诊抗菌药物使用率,'' 门诊抗菌药物使用率警戒,'' 处方张数,''
处方金额,'' 处方药品种数,'' 处方用药天数,'' 抗菌药物处方张数,'' 抗菌药物处方金额,'' 抗菌处方用药品种数,''
抗菌处方用药天数,'' 抗菌注射药物金额,'' 注射剂处方张数,'' 注射药物金额,'' 处方平均金额,'' 处方平均用药品种数,''
平均用药天数,'' 抗菌处方占比,'' 抗菌处方金额占比,'' 抗菌处方平均用药品种数,'' 抗菌处方平均用药天数,''
抗菌注射药物金额比例,'' 注射药物金额比例,'' 抗菌药占比警戒,'' 中草药处方张数,'' 中草药处方金额,''
抗菌注射药物人次,'' 注射药物人次 from dual where 1=2
=? 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
]]>
12
12
93
93
=? 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
]]>
12
12
93
93
=? 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
]]>
12
12
93
93
=? 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
]]>
12
12
93
93
=? 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
]]>
12
12
93
93
=? 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
]]>
12
12
93
93
=? 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
]]>
12
12
93
93
=? 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
]]>
12
12
93
93
=? 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
]]>
12
12
93
93
=? 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
]]>
12
12
93
93
=? 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
]]>
12
12
93
93
=? 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
]]>
12
12
93
93
=? 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
]]>
12
12
93
93
=? 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
]]>
12
12
93
93
select '' 医生,'' 就诊人次,'' 使用抗菌药物人次,'' 门诊抗菌药物使用率,'' 门诊抗菌药物使用率警戒,'' 处方张数,''
处方金额,'' 处方药品种数,'' 处方用药天数,'' 抗菌药物处方张数,'' 抗菌药物处方金额,'' 抗菌处方用药品种数,''
抗菌处方用药天数,'' 抗菌注射药物金额,'' 注射剂处方张数,'' 注射药物金额,'' 处方平均金额,'' 处方平均用药品种数,''
平均用药天数,'' 抗菌处方占比,'' 抗菌处方金额占比,'' 抗菌处方平均用药品种数,'' 抗菌处方平均用药天数,''
抗菌注射药物金额比例,'' 注射药物金额比例,'' 抗菌药占比警戒,'' 中草药处方张数,'' 中草药处方金额,''
抗菌注射药物人次,'' 注射药物人次 from dual where 1=2
=? 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
]]>
12
12
93
93
=? 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
]]>
12
12
93
93
=? 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
]]>
12
12
93
93
=? 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
]]>
12
12
93
93
=? 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
]]>
12
12
93
93
=? 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
]]>
12
12
93
93
=? 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
]]>
12
12
93
93
=? 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
]]>
12
12
93
93
=? 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
]]>
12
12
93
93
=? 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
]]>
12
12
93
93
=? 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
]]>
12
12
93
93
=? 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
]]>
12
12
93
93
=? 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
]]>
12
12
93
93
=? 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
]]>
12
12
93
93
=? and g.FYRQ <=? order by d.JJYS
]]>
12
93
93
=? and g.FYTIME <=? order by d.JJYS
]]>
12
93
93
=? 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
]]>
12
93
93
12
93
93
select '' 编码, '' 药品名称, '' 规格, '' 单位数量,'' 单位, '' 成本单价, '' 成本金额, '' 零售单价 ,''
零售金额, '' 单价差额, '' 总金额差, '' 医生,'' 科室, '' 费用类别,'' 有效期,'' 批次,'' 批准文号,''
生产厂家,'' 供应商 from dual where 1=2
select '' 编码, '' 药品名称, '' 规格, '' 单位数量,'' 单位,'' 成本金额, '' 零售金额, '' 总金额差, ''
组织结构,'' 费用类别,'' 有效期,'' 批次,'' 批准文号,'' 生产厂家,'' 供应商 from dual where 1=2
=? 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
]]>
12
93
93
12
93
93
=? and g.FYTIME <=?
) group by yzxpkey,yzmc,gg,ZHXS,JBDW,RKDW,JJYS,FYZL,dwview,yxq,ph,ZCZH,CSXX,GYS ORDER BY JJYS
]]>
12
93
93
=? and g.FYRQ <=?
) group by yzxpkey,yzmc,gg,ZHXS,JBDW,RKDW,JJYS,FYZL,dwview,YXQ,PH,ZCZH,CSXX,GYS ORDER BY JJYS
]]>
12
93
93
=? 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
]]>
12
93
93
12
93
93
=? and g.FYTIME <=?
) group by yzxpkey,yzmc,gg,ZHXS,JBDW,RKDW,JJKS,FYZL,dwview,YXQ,PH,ZCZH,CSXX,GYS ORDER BY JJKS
]]>
12
93
93
=? and g.FYRQ <=?
) group by yzxpkey,yzmc,gg,ZHXS,JBDW,RKDW,JJKS,FYZL,dwview,YXQ,PH,ZCZH,CSXX,GYS ORDER BY JJKS
]]>
12
93
93
= ? and rkd.ZDRQ <=? order by a.djh,a.pkey
]]>
12
93
93
select '' 科室,'' 采购日期, '' 编码, '' 药品名称, '' 规格, '' 单位数量,'' 包装,'' 进价, '' 进货金额,
'' 有效期,'' 批次,'' 批准文号,'' 生产厂家,'' 供应商,'' 单据号,'' 售价, '' 售价金额,'' 差额 from
dual where 1=2
select '' 编码, '' 药品名称, '' 规格, '' 单位数量,'' 包装,'' 批准文号,'' 生产厂家,'' 供应商,'' 单据号
from dual where 1=2
=? 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
]]>
12
93
93
12
93
93
=? and fpb.SFRQ <=?
) group by yzxpkey,yzmc,gg,ZHXS,JBDW,RKDW,JJYS,FYZL,dwview,yxq,ph,ZCZH,CSXX,GYS ORDER BY JJYS
]]>
12
93
93
=? and fpb.SFRQ <=?
) group by yzxpkey,yzmc,gg,ZHXS,JBDW,RKDW,JJYS,FYZL,dwview,YXQ,PH,ZCZH,CSXX,GYS ORDER BY JJYS
]]>
12
93
93
=? 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
]]>
12
93
93
12
93
93
=? and fpb.SFRQ <=?
) group by yzxpkey,yzmc,gg,ZHXS,JBDW,RKDW,JJKS,FYZL,dwview,YXQ,PH,ZCZH,CSXX,GYS ORDER BY JJKS
]]>
12
93
93
=? and fpb.SFRQ <=?
) group by yzxpkey,yzmc,gg,ZHXS,JBDW,RKDW,JJKS,FYZL,dwview,YXQ,PH,ZCZH,CSXX,GYS ORDER BY JJKS
]]>
12
93
93
=? 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
]]>
12
93
93
12
93
93
=? and fpb.SFRQ <=? order by d.JJYS
]]>
12
93
93
=? and fpb.SFRQ <=? order by d.JJYS
]]>
12
93
93
=? and a.YZXZSJ <= ?
GROUP BY
f.NAME,
a.YZLB,
a.YZXPKEY,
b.MC,d.GG,
e.MC
order by f.NAME
]]>
12
93
93
//医生,YZLB,YZXPKEY,药品名称,规格,发药数量,总金额,JZLX
=? 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
]]>
12
93
93
=? 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
]]>
12
93
93
=? and d.CYRQ <= ?
AND e.ZXFLAG = '1' AND JZZT = 'C'
GROUP BY
b.DPTNAME
ORDER BY
b.DPTNAME
]]>
12
93
93