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.
klhis/WEB-INF/conf/sysds_his_zyhs.xml

1733 lines
68 KiB

3 months ago
<?xml version="1.0" encoding="UTF-8"?>
<datasource>
<!-- 1 表示 sql语句dao 2表示存储过程dao 默认为sql语句dao -->
<!--调价单自动执行 -->
<dao id="newCanOutputYpExecOrderMxDao" log="true" type="1"
memo="用于手动增加住院退药单显示所有允许退药的执行医嘱明细dao">
<sql>
select distinct a.yzmx||'|'||a.QUERYCODE
flagcode,a.PKEY,a.JZPKEY,a.HZPKEY,a.YZMX,a.YZXPKEY,a.ZXFLAG,a.ZXR,a.ZXTIME,a.ZXRKS,a.ZXRWARD,a.PRINTFLAG,a.PRINTMAN,a.PRINTTIME,a.BBCJFLAG,a.BBCJMAN,a.BBCJTIME,a.BBTM,a.QUERYCODE,a.SFFLAG,a.ZXSL,a.ZXDW,a.ZXJE,a.YZBEGINSJ,a.YZZXBEGINSJ,a.YZTZSJ,a.YZMS,a.JZBZ,a.ZDZBPKEY,a.CXR,a.CXSJ,a.TZR,a.TZSJ,a.CJR,a.CJRQ,a.XGR,a.XGRQ,a.JGID,a.CFH,a.YZMC,a.ISACTION,e.PKEY
pybpkey,e.SFLYSH,e.SFYSSH,e.LYSHR,e.LYSHRQ,e.YSSHR,e.YSSHRQ,e.FYZT
,(select sum(YZSL) YZSL from HIS_YFFY_ZYFYMXB where PYBPKEY=e.pkey
and yzmx=e.yzmx and JGID=e.JGID) YZSL
,(select sum(TYSL) TYSL from
HIS_YFFY_ZYFYMXB where PYBPKEY=e.pkey and
yzmx=e.yzmx and JGID=e.JGID)
TYSL
,e.YPFL,e.FYKS,f.YZXZYS,f.YZLB,h.zyno,h.zybah,h.bed,i.xm,h.ward,a.TYDNUM,h.jjks,(select
sum(sqsl) sqsl from HIS_YFFY_ZYTYSQB where exepkey=a.pkey and
JGID=a.JGID) sqsl,''
SELECTFLAG,f.YPYZJBDW,j.fydw,j.SFBZDWFY,j.YPYZZHXS
from HIS_YZ_EXEC a
left join HIS_YFFY_PYB e on a.pkey=e.DFYPKEY and
a.JGID=e.JGID left
join HIS_YZ_MXB f on a.YZMX=f.pkey and
a.JGID=f.JGID left join
HIS_YFFY_ZYTYSQB g on a.pkey=g.exepkey and
a.JGID=g.JGID left join
HIS_JZ_BASEINFO h on a.jzpkey=h.pkey and
a.JGID=h.JGID left join
HIS_HZINFO i on a.hzpkey=i.pkey and
a.JGID=i.JGID left join
HIS_YFFY_ZYFYMXB j on j.PYBPKEY=e.pkey and
j.yzmx=e.yzmx and
j.JGID=e.JGID
where a.JGID=? #query# and (a.ZXFLAG=2 or a.ZXFLAG=3)
and e.FYZT=1 and
(h.JZLX='Z' or (h.JZLX='J' AND h.SFLG='1')) and
h.JZZT='Z' and
h.ISZZCWJS != '1' order by a.ZXTIME desc
</sql>
<tables>
<table name="HIS_YZ_EXEC" insert="true" update="true"
delete="true">
<primary>PKEY</primary>
<primary>ZXFLAG</primary>
<primary>SFFLAG</primary>
<primary>ISACTION</primary>
<primary>TYDNUM</primary>
</table>
</tables>
<fields>
<f name="FLAGCODE" type="12" />
<f name="PKEY" type="12" table="HIS_YZ_EXEC" />
<f name="JZPKEY" type="12" table="HIS_YZ_EXEC" />
<f name="HZPKEY" type="12" table="HIS_YZ_EXEC" />
<f name="YZMX" type="12" table="HIS_YZ_EXEC" />
<f name="YZXPKEY" type="12" table="HIS_YZ_EXEC" />
<f name="ZXFLAG" type="12" table="HIS_YZ_EXEC" />
<f name="ZXR" type="12" table="HIS_YZ_EXEC" />
<f name="ZXTIME" type="93" table="HIS_YZ_EXEC" />
<f name="ZXRKS" type="12" table="HIS_YZ_EXEC" />
<f name="ZXRWARD" type="12" table="HIS_YZ_EXEC" />
<f name="PRINTFLAG" type="12" table="HIS_YZ_EXEC" />
<f name="PRINTMAN" type="12" table="HIS_YZ_EXEC" />
<f name="PRINTTIME" type="93" table="HIS_YZ_EXEC" />
<f name="BBCJFLAG" type="12" table="HIS_YZ_EXEC" />
<f name="BBCJMAN" type="12" table="HIS_YZ_EXEC" />
<f name="BBCJTIME" type="93" table="HIS_YZ_EXEC" />
<f name="BBTM" type="12" table="HIS_YZ_EXEC" />
<f name="QUERYCODE" type="12" table="HIS_YZ_EXEC" />
<f name="SFFLAG" type="12" table="HIS_YZ_EXEC" />
<f name="ZXSL" type="8" table="HIS_YZ_EXEC" />
<f name="ZXDW" type="12" table="HIS_YZ_EXEC" />
<f name="ZXJE" type="8" table="HIS_YZ_EXEC" />
<f name="YZBEGINSJ" type="93" table="HIS_YZ_EXEC" />
<f name="YZZXBEGINSJ" type="93" table="HIS_YZ_EXEC" />
<f name="YZTZSJ" type="93" table="HIS_YZ_EXEC" />
<f name="YZMS" type="12" table="HIS_YZ_EXEC" />
<f name="JZBZ" type="12" table="HIS_YZ_EXEC" />
<f name="ZDZBPKEY" type="12" table="HIS_YZ_EXEC" />
<f name="CXR" type="12" table="HIS_YZ_EXEC" />
<f name="CXSJ" type="93" table="HIS_YZ_EXEC" />
<f name="TZR" type="12" table="HIS_YZ_EXEC" />
<f name="TZSJ" type="93" table="HIS_YZ_EXEC" />
<f name="CJR" type="12" table="HIS_YZ_EXEC" />
<f name="CJRQ" type="93" table="HIS_YZ_EXEC" />
<f name="XGR" type="12" table="HIS_YZ_EXEC" />
<f name="XGRQ" type="93" table="HIS_YZ_EXEC" />
<f name="JGID" type="12" table="HIS_YZ_EXEC" />
<f name="CFH" type="12" table="HIS_YZ_EXEC" />
<f name="YZMC" type="12" table="HIS_YZ_EXEC" />
<f name="ISACTION" type="12" table="HIS_YZ_EXEC" />
<f name="PYBPKEY" type="12" />
<f name="SFLYSH" type="12" />
<f name="SFYSSH" type="12" />
<f name="LYSHR" type="12" />
<f name="LYSHRQ" type="93" />
<f name="YSSHR" type="12" />
<f name="YSSHRQ" type="93" />
<f name="FYZT" type="12" />
<f name="YZSL" type="12" />
<f name="TYSL" type="12" />
<f name="YPFL" type="12" />
<f name="FYKS" type="12" />
<f name="YZXZYS" type="12" />
<f name="YZLB" type="12" />
<f name="ZYNO" type="12" table="HIS_YZ_EXEC" />
<f name="ZYBAH" type="12" />
<f name="BED" type="12" />
<f name="XM" type="12" />
<f name="WARD" type="12" />
<f name="TYDNUM" type="8" table="HIS_YZ_EXEC" />
<f name="JJKS" type="12" />
<f name="SQSL" type="4" />
<f name="SELECTFLAG" type="12" />
<f name="YPYZJBDW" type="12" />
<f name="fydw" type="12" />
<f name="SFBZDWFY" type="12" />
<f name="YPYZZHXS" type="12" />
</fields>
<parameter>
<p>12</p>
</parameter>
</dao>
<dao id="newZytySqdDao" log="true" type="1" memo="建立新的住院退药申请单dao">
<sql>select
PKEY,TYDH,HZPKEY,JZPKEY,ZYNO,BED,WARD,SQKS,JSKS,JJKS,EXEPKEY,PYBPKEY,YZMX,YZXPKEY,CFH,SQSL,YZDJ,YZJE,STATE,KDYS,SQR,CJR,CJRQ,XGR,XGRQ,JGID
from HIS_YFFY_ZYTYSQB where 1=2
</sql>
<tables>
<table name="HIS_YFFY_ZYTYSQB" insert="true" update="true"
delete="true">
<primary>PKEY</primary>
<primary>JGID</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_YFFY_ZYTYSQB" />
<f name="TYDH" type="12" table="HIS_YFFY_ZYTYSQB" />
<f name="HZPKEY" type="12" table="HIS_YFFY_ZYTYSQB" />
<f name="JZPKEY" type="12" table="HIS_YFFY_ZYTYSQB" />
<f name="ZYNO" type="12" table="HIS_YFFY_ZYTYSQB" />
<f name="BED" type="12" table="HIS_YFFY_ZYTYSQB" />
<f name="WARD" type="12" table="HIS_YFFY_ZYTYSQB" />
<f name="SQKS" type="12" table="HIS_YFFY_ZYTYSQB" />
<f name="JSKS" type="12" table="HIS_YFFY_ZYTYSQB" />
<f name="JJKS" type="12" table="HIS_YFFY_ZYTYSQB" />
<f name="EXEPKEY" type="12" table="HIS_YFFY_ZYTYSQB" />
<f name="PYBPKEY" type="12" table="HIS_YFFY_ZYTYSQB" />
<f name="YZMX" type="12" table="HIS_YFFY_ZYTYSQB" />
<f name="YZXPKEY" type="12" table="HIS_YFFY_ZYTYSQB" />
<f name="CFH" type="12" table="HIS_YFFY_ZYTYSQB" />
<f name="SQSL" type="12" table="HIS_YFFY_ZYTYSQB" />
<f name="YZDJ" type="12" table="HIS_YFFY_ZYTYSQB" />
<f name="YZJE" type="12" table="HIS_YFFY_ZYTYSQB" />
<f name="STATE" type="12" table="HIS_YFFY_ZYTYSQB" />
<f name="KDYS" type="12" table="HIS_YFFY_ZYTYSQB" />
<f name="SQR" type="12" table="HIS_YFFY_ZYTYSQB" />
<f name="CJR" type="12" table="HIS_YFFY_ZYTYSQB" />
<f name="CJRQ" type="93" table="HIS_YFFY_ZYTYSQB" />
<f name="XGR" type="12" table="HIS_YFFY_ZYTYSQB" />
<f name="XGRQ" type="93" table="HIS_YFFY_ZYTYSQB" />
<f name="JGID" type="12" table="HIS_YFFY_ZYTYSQB" />
</fields>
</dao>
<dao id="newZytySqdZBDao" log="true" type="1" memo="住院退药申请表主表dao">
<sql>select TYDH,CJR,CJRQ,JGID from HIS_YFFY_ZYTYSQBZB where 1=2</sql>
<tables>
<table name="HIS_YFFY_ZYTYSQBZB" insert="true" update="true"
delete="true">
<primary>TYDH</primary>
</table>
</tables>
<fields>
<f name="TYDH" type="12" table="HIS_YFFY_ZYTYSQBZB" />
<f name="CJR" type="12" table="HIS_YFFY_ZYTYSQBZB" />
<f name="CJRQ" type="93" table="HIS_YFFY_ZYTYSQBZB" />
<f name="JGID" type="12" table="HIS_YFFY_ZYTYSQBZB" />
</fields>
</dao>
<dao id="tyBySqdExecOrderMxDao" log="true" type="1"
memo="用于通过退药申请单退药显示所有允许退药的执行医嘱明细dao">
<sql>
select * from (select distinct a.yzmx||'|'||a.QUERYCODE
flagcode,a.PKEY,a.JZPKEY,a.HZPKEY,a.YZMX,a.YZXPKEY,a.ZXFLAG,a.ZXR,a.ZXTIME,a.ZXRKS,a.ZXRWARD,a.PRINTFLAG,a.PRINTMAN,a.PRINTTIME,a.BBCJFLAG,a.BBCJMAN,a.BBCJTIME,a.BBTM,a.QUERYCODE,a.SFFLAG,a.ZXSL,a.ZXDW,a.ZXJE,a.YZBEGINSJ,a.YZZXBEGINSJ,a.YZTZSJ,a.YZMS,a.JZBZ,a.ZDZBPKEY,a.CXR,a.CXSJ,a.TZR,a.TZSJ,a.CJR,a.CJRQ,a.XGR,a.XGRQ,a.JGID,a.CFH,a.YZMC,a.ISACTION,e.PKEY
pybpkey,e.SFLYSH,e.SFYSSH,e.LYSHR,e.LYSHRQ,e.YSSHR,e.YSSHRQ,e.FYZT
,(select sum(YZSL) YZSL from HIS_YFFY_ZYFYMXB where PYBPKEY=e.pkey
and yzmx=e.yzmx and JGID=e.JGID) FYMXBYZSL
,(select sum(TYSL) TYSL
from HIS_YFFY_ZYFYMXB where PYBPKEY=e.pkey and
yzmx=e.yzmx and
JGID=e.JGID) FYMXBTYSL
,e.YPFL,e.TYSL,e.FYKS,f.YZXZYS,f.YZLB,h.zyno,h.zybah,h.bed,i.xm,h.ward,a.TYDNUM,h.jjks,(select
sum(sqsl) sqsl from HIS_YFFY_ZYTYSQB where exepkey=a.pkey and
JGID=a.JGID and STATE != 2)
sqsl,ypxx.CSXX,ypxx.JX,f.YZJZZHXS,f.YPYZJBDW,g.TYDH,e.LOCKFLAG,d.fydw,d.SFBZDWFY,d.YPYZZHXS,d.YPFYSJMS
from HIS_YZ_EXEC a left join HIS_YFFY_PYB e on a.pkey=e.DFYPKEY and
a.JGID=e.JGID left join HIS_YZ_MXB f on a.YZMX=f.pkey and
a.JGID=f.JGID left join HIS_JZ_BASEINFO h on a.jzpkey=h.pkey and
a.JGID=h.JGID left join HIS_HZINFO i on a.hzpkey=i.pkey and
a.JGID=i.JGID left join HIS_YPXX ypxx on ypxx.bm=a.yzxpkey left join
HIS_YFFY_ZYTYSQB g on g.exepkey=a.pkey and g.JGID=a.JGID left join
HIS_YFFY_ZYFYMXB d on d.PYBPKEY=e.pkey and d.yzmx=e.yzmx and
d.JGID=e.JGID
where a.JGID=? #query# and (a.ZXFLAG=2 or a.ZXFLAG=3)
and e.FYZT=1 and
(h.JZLX='Z' or (h.JZLX='J' OR h.SFLG='1')) and
h.JZZT='Z' and
h.ISZZCWJS != '1' and g.state=0 order by a.ZXTIME desc
) where
(nvl(FYMXBYZSL,0)-nvl(FYMXBTYSL,0))>0 and nvl(sqsl,0) > 0
</sql>
<tables>
<table name="HIS_YFFY_PYB" insert="false" update="true"
delete="false">
<primary>TYSL</primary>
<primary>PYBPKEY</primary>
<primary>YZMX</primary>
<primary>JGID</primary>
</table>
<table name="HIS_YZ_EXEC" insert="false" update="true"
delete="true">
<primary>PKEY</primary>
<primary>SFFLAG</primary>
<primary>ISACTION</primary>
<primary>ZXFLAG</primary>
<primary>JGID</primary>
<primary>TYDNUM</primary>
</table>
</tables>
<fields>
<f name="FLAGCODE" type="12" />
<f name="PKEY" type="12" table="HIS_YZ_EXEC" />
<f name="JZPKEY" type="12" table="HIS_YFFY_PYB,HIS_YZ_EXEC" />
<f name="HZPKEY" type="12" table="HIS_YFFY_PYB,HIS_YZ_EXEC" />
<f name="YZMX" type="12" table="HIS_YFFY_PYB,HIS_YZ_EXEC" />
<f name="YZXPKEY" type="12" table="HIS_YZ_EXEC" />
<f name="ZXFLAG" type="12" table="HIS_YZ_EXEC" />
<f name="ZXR" type="12" table="HIS_YZ_EXEC" />
<f name="ZXTIME" type="93" table="HIS_YZ_EXEC" />
<f name="ZXRKS" type="12" table="HIS_YZ_EXEC" />
<f name="ZXRWARD" type="12" table="HIS_YZ_EXEC" />
<f name="PRINTFLAG" type="12" table="HIS_YZ_EXEC" />
<f name="PRINTMAN" type="12" table="HIS_YZ_EXEC" />
<f name="PRINTTIME" type="93" table="HIS_YZ_EXEC" />
<f name="BBCJFLAG" type="12" table="HIS_YZ_EXEC" />
<f name="BBCJMAN" type="12" table="HIS_YZ_EXEC" />
<f name="BBCJTIME" type="93" table="HIS_YZ_EXEC" />
<f name="BBTM" type="12" table="HIS_YZ_EXEC" />
<f name="QUERYCODE" type="12" table="HIS_YZ_EXEC" />
<f name="SFFLAG" type="12" table="HIS_YZ_EXEC" />
<f name="ZXSL" type="8" table="HIS_YZ_EXEC" />
<f name="ZXDW" type="12" table="HIS_YZ_EXEC" />
<f name="ZXJE" type="8" table="HIS_YZ_EXEC" />
<f name="YZBEGINSJ" type="93" table="HIS_YZ_EXEC" />
<f name="YZZXBEGINSJ" type="93" table="HIS_YZ_EXEC" />
<f name="YZTZSJ" type="93" table="HIS_YZ_EXEC" />
<f name="YZMS" type="12" table="HIS_YZ_EXEC" />
<f name="JZBZ" type="12" table="HIS_YZ_EXEC" />
<f name="ZDZBPKEY" type="12" table="HIS_YZ_EXEC" />
<f name="CXR" type="12" table="HIS_YZ_EXEC" />
<f name="CXSJ" type="93" table="HIS_YZ_EXEC" />
<f name="TZR" type="12" table="HIS_YZ_EXEC" />
<f name="TZSJ" type="93" table="HIS_YZ_EXEC" />
<f name="CJR" type="12" table="HIS_YFFY_PYB,HIS_YZ_EXEC" />
<f name="CJRQ" type="93" table="HIS_YFFY_PYB,HIS_YZ_EXEC" />
<f name="XGR" type="12" table="HIS_YFFY_PYB,HIS_YZ_EXEC" />
<f name="XGRQ" type="93" table="HIS_YFFY_PYB,HIS_YZ_EXEC" />
<f name="JGID" type="12" table="HIS_YFFY_PYB,HIS_YZ_EXEC" />
<f name="CFH" type="12" table="HIS_YZ_EXEC" />
<f name="YZMC" type="12" table="HIS_YZ_EXEC" />
<f name="ISACTION" type="12" table="HIS_YZ_EXEC" />
<f name="PYBPKEY" schemaname="pkey" type="12" table="HIS_YFFY_PYB" />
<f name="SFLYSH" type="12" table="HIS_YFFY_PYB" />
<f name="SFYSSH" type="12" table="HIS_YFFY_PYB" />
<f name="LYSHR" type="12" table="HIS_YFFY_PYB" />
<f name="LYSHRQ" type="93" table="HIS_YFFY_PYB" />
<f name="YSSHR" type="12" table="HIS_YFFY_PYB" />
<f name="YSSHRQ" type="93" table="HIS_YFFY_PYB" />
<f name="FYZT" type="12" table="HIS_YFFY_PYB" />
<f name="FYMXBYZSL" type="8" />
<f name="FYMXBTYSL" type="8" />
<f name="YPFL" type="12" table="HIS_YFFY_PYB" />
<f name="TYSL" type="12" table="HIS_YFFY_PYB" />
<f name="FYKS" type="12" table="HIS_YFFY_PYB" />
<f name="YZXZYS" type="12" />
<f name="YZLB" type="12" />
<f name="ZYNO" type="12" table="HIS_YZ_EXEC" />
<f name="ZYBAH" type="12" />
<f name="BED" type="12" />
<f name="XM" type="12" />
<f name="WARD" type="12" />
<f name="TYDNUM" type="8" table="HIS_YZ_EXEC" />
<f name="JJKS" type="12" />
<f name="SQSL" type="8" />
<f name="CSXX" type="12" />
<f name="JX" type="12" />
<f name="YZJZZHXS" type="12" />
<f name="YPYZJBDW" type="12" />
<f name="TYDH" type="12" />
<f name="LOCKFLAG" type="12" table="HIS_YFFY_PYB" />
<f name="fydw" type="12" />
<f name="SFBZDWFY" type="12" />
<f name="YPYZZHXS" type="12" />
<f name="YPFYSJMS" type="12" />
</fields>
<parameter>
<p>12</p>
</parameter>
</dao>
<dao id="zytyBySqdYphzDao" log="true" type="1"
memo="通过申请单进行住院退药的药品汇总信息dao">
<sql>select '' yzxpkey,'' YZMC,'' YZSL,'' TYSL,'' SQSL,'' dw,'' jx,''
cs,0 yzjzzhxs from dual where 1=2
</sql>
<fields>
<f name="YZXPKEY" type="1" />
<f name="YZMC" type="1" />
<f name="YZSL" type="1" />
<f name="TYSL" type="1" />
<f name="SQSL" type="1" />
<f name="DW" type="1" />
<f name="JX" type="1" />
<f name="CS" type="1" />
<f name="yzjzzhxs" type="8" />
</fields>
</dao>
<dao id="zyTyAllTySqdMxDao" log="true" type="1"
memo="通过退药申请单进行住院退药,获取所有执行医嘱对应的有效申请单dao">
<sql>
select
g.PKEY,g.TYDH,g.HZPKEY,g.JZPKEY,g.ZYNO,g.BED,g.WARD,g.SQKS,g.JSKS,g.JJKS,g.EXEPKEY,g.PYBPKEY,g.YZMX,g.YZXPKEY,g.CFH,g.SQSL,g.YZDJ,g.YZJE,g.STATE,g.KDYS,g.SQR,g.CJR,g.CJRQ,g.XGR,g.XGRQ,g.JGID,i.xm,g.TYR,g.TYRQ,g.LOCKFLAG
from HIS_YFFY_ZYTYSQB g
left join HIS_YZ_EXEC a on a.pkey=g.exepkey
and a.JGID=g.JGID
left join HIS_YFFY_PYB e on a.pkey=e.DFYPKEY and
a.JGID=e.JGID
left join HIS_JZ_BASEINFO h on a.jzpkey=h.pkey and
a.JGID=h.JGID
left join HIS_HZINFO i on a.hzpkey=i.pkey and
a.JGID=i.JGID
where a.JGID=? #query# and (a.ZXFLAG=2 or a.ZXFLAG=3)
and e.FYZT=1 and
h.JZLX='Z' and h.JZZT='Z' and h.ISZZCWJS != '1' and
g.STATE=0 order
by a.ZXTIME desc
</sql>
<tables>
<table name="HIS_YFFY_ZYTYSQB" insert="true" update="true"
delete="true">
<primary>PKEY</primary>
<primary>STATE</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_YFFY_ZYTYSQB" />
<f name="TYDH" type="12" table="HIS_YFFY_ZYTYSQB" />
<f name="HZPKEY" type="12" table="HIS_YFFY_ZYTYSQB" />
<f name="JZPKEY" type="12" table="HIS_YFFY_ZYTYSQB" />
<f name="ZYNO" type="12" table="HIS_YFFY_ZYTYSQB" />
<f name="BED" type="12" table="HIS_YFFY_ZYTYSQB" />
<f name="WARD" type="12" table="HIS_YFFY_ZYTYSQB" />
<f name="SQKS" type="12" table="HIS_YFFY_ZYTYSQB" />
<f name="JSKS" type="12" table="HIS_YFFY_ZYTYSQB" />
<f name="JJKS" type="12" table="HIS_YFFY_ZYTYSQB" />
<f name="EXEPKEY" type="12" table="HIS_YFFY_ZYTYSQB" />
<f name="PYBPKEY" type="12" table="HIS_YFFY_ZYTYSQB" />
<f name="YZMX" type="12" table="HIS_YFFY_ZYTYSQB" />
<f name="YZXPKEY" type="12" table="HIS_YFFY_ZYTYSQB" />
<f name="CFH" type="12" table="HIS_YFFY_ZYTYSQB" />
<f name="SQSL" type="12" table="HIS_YFFY_ZYTYSQB" />
<f name="YZDJ" type="12" table="HIS_YFFY_ZYTYSQB" />
<f name="YZJE" type="12" table="HIS_YFFY_ZYTYSQB" />
<f name="STATE" type="12" table="HIS_YFFY_ZYTYSQB" />
<f name="KDYS" type="12" table="HIS_YFFY_ZYTYSQB" />
<f name="SQR" type="12" table="HIS_YFFY_ZYTYSQB" />
<f name="CJR" type="12" table="HIS_YFFY_ZYTYSQB" />
<f name="CJRQ" type="93" table="HIS_YFFY_ZYTYSQB" />
<f name="XGR" type="12" table="HIS_YFFY_ZYTYSQB" />
<f name="XGRQ" type="93" table="HIS_YFFY_ZYTYSQB" />
<f name="JGID" type="12" table="HIS_YFFY_ZYTYSQB" />
<f name="XM" type="12" />
<f name="TYR" type="12" table="HIS_YFFY_ZYTYSQB" />
<f name="TYRQ" type="93" table="HIS_YFFY_ZYTYSQB" />
<f name="LOCKFLAG" type="8" table="HIS_YFFY_ZYTYSQB" />
</fields>
<parameter>
<p>12</p>
</parameter>
</dao>
<dao id="zyTyAllTyOrdFyMxDao" log="true" type="1">
<sql>
select
fymxb.PKEY,fymxb.FYBPKEY,fymxb.JZPKEY,fymxb.HZPKEY,fymxb.ZYNO,fymxb.CFH,fymxb.PYBPKEY,fymxb.YZXPKEY,fymxb.YZMX,fymxb.YZDJ,fymxb.YZSL,fymxb.BED,fymxb.YPFL,fymxb.YZDL,fymxb.TYSL,fymxb.KSKCPKEY,fymxb.KSKCPCPKEY,fymxb.CJR,fymxb.CJRQ,fymxb.XGR,fymxb.XGRQ,fymxb.JGID,fymxb.EXEPKEY,b.YZMC,b.YZDW,b.YZJL,b.YZJLDW,b.YZPC,b.YZLC,b.YZJE,b.YZBZ,b.YZXZYS,b.YZXZKS,b.YZDJSL,b.YZYF,b.YPYZJBDW
JBDW,b.YZJZZHXS,b.YPYZJBJG,i.XM,fymxb.LOCKFLAG,fymxb.SFSL,fymxb.FYDW,fymxb.PCSJ,fymxb.PCJBSJ,fymxb.SFBZDWFY,fymxb.YPYZZHXS,fymxb.FYJE,fymxb.YPFYSJMS,fymxb.TYJE,fymxb.STSL,fymxb.PCDJ,fymxb.PCJBDJ,fymxb.FYJJJE,fymxb.TYJJJE,fymxb.SFXPKEY,b.YPYZBZJG
from HIS_YFFY_ZYFYMXB fymxb
left join HIS_YZ_EXEC a on
a.pkey=fymxb.exepkey and a.JGID=fymxb.JGID
left join HIS_YFFY_PYB e on
a.pkey=e.DFYPKEY and a.JGID=e.JGID
left join HIS_JZ_BASEINFO h on
a.jzpkey=h.pkey and a.JGID=h.JGID
left join HIS_HZINFO i on
a.hzpkey=i.pkey and a.JGID=i.JGID
left join HIS_YZ_MXB b on
a.YZMX=b.PKEY and a.JGID=b.JGID
left join HIS_YFFY_ZYTYSQB g on
g.exepkey=a.pkey and g.JGID=a.JGID
where a.JGID=? #query# and
(a.ZXFLAG=2 or a.ZXFLAG=3) and e.FYZT=1 and
h.JZLX='Z' and h.JZZT='Z'
and g.STATE=0 and h.ISZZCWJS != '1' order
by a.ZXTIME desc
</sql>
<tables>
<table name="HIS_YFFY_ZYFYMXB" insert="true" update="true"
delete="true">
<primary>PKEY</primary>
<primary>JGID</primary>
<primary>EXEPKEY</primary>
<primary>TYSL</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_YFFY_ZYFYMXB" />
<f name="FYBPKEY" type="12" table="HIS_YFFY_ZYFYMXB" />
<f name="JZPKEY" type="12" table="HIS_YFFY_ZYFYMXB" />
<f name="HZPKEY" type="12" table="HIS_YFFY_ZYFYMXB" />
<f name="ZYNO" type="12" table="HIS_YFFY_ZYFYMXB" />
<f name="CFH" type="12" table="HIS_YFFY_ZYFYMXB" />
<f name="PYBPKEY" type="12" table="HIS_YFFY_ZYFYMXB" />
<f name="YZXPKEY" type="12" table="HIS_YFFY_ZYFYMXB" />
<f name="YZMX" type="12" table="HIS_YFFY_ZYFYMXB" />
<f name="YZDJ" type="12" table="HIS_YFFY_ZYFYMXB" />
<f name="YZSL" type="12" table="HIS_YFFY_ZYFYMXB" />
<f name="BED" type="12" table="HIS_YFFY_ZYFYMXB" />
<f name="YPFL" type="12" table="HIS_YFFY_ZYFYMXB" />
<f name="YZDL" type="12" table="HIS_YFFY_ZYFYMXB" />
<f name="TYSL" type="12" table="HIS_YFFY_ZYFYMXB" />
<f name="KSKCPKEY" type="12" table="HIS_YFFY_ZYFYMXB" />
<f name="KSKCPCPKEY" type="12" table="HIS_YFFY_ZYFYMXB" />
<f name="CJR" type="12" table="HIS_YFFY_ZYFYMXB" />
<f name="CJRQ" type="93" table="HIS_YFFY_ZYFYMXB" />
<f name="XGR" type="12" table="HIS_YFFY_ZYFYMXB" />
<f name="XGRQ" type="93" table="HIS_YFFY_ZYFYMXB" />
<f name="JGID" type="12" table="HIS_YFFY_ZYFYMXB" />
<f name="EXEPKEY" type="12" table="HIS_YFFY_ZYFYMXB" />
<f name="YZMC" type="12" />
<f name="YZDW" type="12" />
<f name="YZJL" type="12" />
<f name="YZJLDW" type="12" />
<f name="YZPC" type="12" />
<f name="YZLC" type="12" />
<f name="YZJE" type="12" />
<f name="YZBZ" type="12" />
<f name="YZXZYS" type="12" />
<f name="YZXZKS" type="12" />
<f name="YZDJSL" type="12" />
<f name="YZYF" type="12" />
<f name="JBDW" type="12" />
<f name="YZJZZHXS" type="12" />
<f name="YPYZJBJG" type="12" />
<f name="XM" type="12" />
<f name="LOCKFLAG" type="-5" table="HIS_YFFY_ZYFYMXB" />
<f name="SFSL" type="12" table="HIS_YFFY_ZYFYMXB" />
<f name="FYDW" type="12" table="HIS_YFFY_ZYFYMXB" />
<f name="PCSJ" type="8" table="HIS_YFFY_ZYFYMXB" />
<f name="PCJBSJ" type="8" table="HIS_YFFY_ZYFYMXB" />
<f name="SFBZDWFY" type="12" table="HIS_YFFY_ZYFYMXB" />
<f name="YPYZZHXS" type="12" table="HIS_YFFY_ZYFYMXB" />
<f name="FYJE" type="8" table="HIS_YFFY_ZYFYMXB" />
<f name="YPFYSJMS" type="12" table="HIS_YFFY_ZYFYMXB" />
<f name="TYJE" type="8" table="HIS_YFFY_ZYFYMXB" />
<f name="STSL" type="12" table="HIS_YFFY_ZYFYMXB" />
<f name="PCDJ" type="8" table="HIS_YFFY_ZYFYMXB" />
<f name="PCJBDJ" type="8" table="HIS_YFFY_ZYFYMXB" />
<f name="FYJJJE" type="8" table="HIS_YFFY_ZYFYMXB" />
<f name="TYJJJE" type="8" table="HIS_YFFY_ZYFYMXB" />
<f name="SFXPKEY" type="12" table="HIS_YFFY_ZYFYMXB" />
<f name="YPYZBZJG" type="12" />
</fields>
<parameter>
<p>12</p>
</parameter>
</dao>
<dao id="nurseHljgGlyzDao" log="true" cache="true" type="1"
memo="住院护理级别关联医嘱项dao">
<sql>select PKEY,FUNCTIONPKEY,YZXPKEY,CJR,CJRQ,XGR,XGRQ,JGID from
HIS_ZY_FUNCTION_ITEMS where JGID=? and (FUNCTIONPKEY='tjhl' or
FUNCTIONPKEY='yjhl' or FUNCTIONPKEY='ejhl' or FUNCTIONPKEY='sjhl')
order by pkey
</sql>
<tables>
<table name="HIS_ZY_FUNCTION_ITEMS" insert="true" update="true"
delete="true">
<primary>PKEY</primary>
<primary>FUNCTIONPKEY</primary>
<primary>YZXPKEY</primary>
<primary>JGID</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_ZY_FUNCTION_ITEMS" />
<f name="FUNCTIONPKEY" type="12" table="HIS_ZY_FUNCTION_ITEMS" />
<f name="YZXPKEY" type="12" table="HIS_ZY_FUNCTION_ITEMS" />
<f name="CJR" type="12" table="HIS_ZY_FUNCTION_ITEMS" />
<f name="CJRQ" type="93" table="HIS_ZY_FUNCTION_ITEMS" />
<f name="XGR" type="12" table="HIS_ZY_FUNCTION_ITEMS" />
<f name="XGRQ" type="93" table="HIS_ZY_FUNCTION_ITEMS" />
<f name="JGID" type="12" table="HIS_ZY_FUNCTION_ITEMS" />
</fields>
<parameter>
<p>12</p>
</parameter>
</dao>
<dao id="zyyzZyBQGlyzDao" log="true" cache="true" type="1"
memo="住院在院病情关联医嘱项dao">
<sql>select PKEY,FUNCTIONPKEY,YZXPKEY,CJR,CJRQ,XGR,XGRQ,JGID from
HIS_ZY_FUNCTION_ITEMS where JGID=? and (FUNCTIONPKEY='bzyz' or
FUNCTIONPKEY='bwyz' or FUNCTIONPKEY='bqzcyz') order by pkey
</sql>
<tables>
<table name="HIS_ZY_FUNCTION_ITEMS" insert="true" update="true"
delete="true">
<primary>PKEY</primary>
<primary>FUNCTIONPKEY</primary>
<primary>YZXPKEY</primary>
<primary>JGID</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_ZY_FUNCTION_ITEMS" />
<f name="FUNCTIONPKEY" type="12" table="HIS_ZY_FUNCTION_ITEMS" />
<f name="YZXPKEY" type="12" table="HIS_ZY_FUNCTION_ITEMS" />
<f name="CJR" type="12" table="HIS_ZY_FUNCTION_ITEMS" />
<f name="CJRQ" type="93" table="HIS_ZY_FUNCTION_ITEMS" />
<f name="XGR" type="12" table="HIS_ZY_FUNCTION_ITEMS" />
<f name="XGRQ" type="93" table="HIS_ZY_FUNCTION_ITEMS" />
<f name="JGID" type="12" table="HIS_ZY_FUNCTION_ITEMS" />
</fields>
<parameter>
<p>12</p>
</parameter>
</dao>
<dao id="getYzxNumByOneDayYzBd" log="true" type="1"
memo="用法绑定中判断某一个用法+医嘱项在一天中的使用数dao">
<sql><![CDATA[
select count(*) num from HIS_YZ_EXEC c where c.JGID=? and c.HZPKEY=? and c.JZPKEY =? and c.zxflag ='1' and c.BDYF=? and c.BDZC=? AND c.yzxpkey=? AND c.ZXTIME >=? and c.ZXTIME <=?
]]></sql>
<fields>
<f name="NUM" type="4" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>12</p>
<p>12</p>
<p>12</p>
<p>12</p>
<p>93</p>
<p>93</p>
</parameter>
</dao>
<dao id="yfbdExecMxDao" log="true" type="1" memo="用法绑定生成医嘱执行明细dao">
<sql>select
c.PKEY,c.JZPKEY,c.HZPKEY,c.ZYNO,c.YZMX,c.YZXPKEY,c.ZXFLAG,c.ZXR,c.ZXTIME,c.ZXRKS,c.ZXRWARD,c.PRINTFLAG,c.PRINTMAN,c.PRINTTIME,c.BBCJFLAG,c.BBCJMAN,c.BBCJTIME,c.BBTM,c.QUERYCODE,c.SFFLAG,c.ZXSL,c.ZXDW,c.ZXJE,c.YZBEGINSJ,c.YZZXBEGINSJ,c.YZTZSJ,c.YZMS,c.JZBZ,c.ZDZBPKEY,c.CXR,c.CXSJ,c.TZR,c.TZSJ,c.CJR,c.CJRQ,c.XGR,c.XGRQ,c.JGID,c.cfh,c.YZMC,c.ISACTION,a.YZZXKS
from HIS_YZ_EXEC c left join HIS_YZ_MXB a on c.yzmx=a.pkey and
c.jzpkey=a.jzpkey where a.JGID=? and a.HZPKEY=? and a.JZPKEY =? and
a.YZSHZT=1 and c.zxflag ='1' and a.yzlx='7' and a.BDEXECPKEY=? order
by c.ZXTIME
</sql>
<tables>
<table name="HIS_YZ_EXEC" insert="true" update="true"
delete="true">
<primary>PKEY</primary>
<primary>ZXFLAG</primary>
<primary>JGID</primary>
<primary>ISACTION</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_YZ_EXEC" />
<f name="JZPKEY" type="12" table="HIS_YZ_EXEC" />
<f name="HZPKEY" type="12" table="HIS_YZ_EXEC" />
<f name="ZYNO" type="12" table="HIS_YZ_EXEC" />
<f name="YZMX" type="12" table="HIS_YZ_EXEC" />
<f name="YZXPKEY" type="12" table="HIS_YZ_EXEC" />
<f name="ZXFLAG" type="12" table="HIS_YZ_EXEC" />
<f name="ZXR" type="12" table="HIS_YZ_EXEC" />
<f name="ZXTIME" type="93" table="HIS_YZ_EXEC" />
<f name="ZXRKS" type="12" table="HIS_YZ_EXEC" />
<f name="ZXRWARD" type="12" table="HIS_YZ_EXEC" />
<f name="PRINTFLAG" type="12" table="HIS_YZ_EXEC" />
<f name="PRINTMAN" type="12" table="HIS_YZ_EXEC" />
<f name="PRINTTIME" type="93" table="HIS_YZ_EXEC" />
<f name="BBCJFLAG" type="12" table="HIS_YZ_EXEC" />
<f name="BBCJMAN" type="12" table="HIS_YZ_EXEC" />
<f name="BBCJTIME" type="93" table="HIS_YZ_EXEC" />
<f name="BBTM" type="12" table="HIS_YZ_EXEC" />
<f name="QUERYCODE" type="12" table="HIS_YZ_EXEC" />
<f name="SFFLAG" type="12" table="HIS_YZ_EXEC" />
<f name="ZXSL" type="8" table="HIS_YZ_EXEC" />
<f name="ZXDW" type="12" table="HIS_YZ_EXEC" />
<f name="ZXJE" type="8" table="HIS_YZ_EXEC" />
<f name="YZBEGINSJ" type="93" table="HIS_YZ_EXEC" />
<f name="YZZXBEGINSJ" type="93" table="HIS_YZ_EXEC" />
<f name="YZTZSJ" type="93" table="HIS_YZ_EXEC" />
<f name="YZMS" type="12" table="HIS_YZ_EXEC" />
<f name="JZBZ" type="12" table="HIS_YZ_EXEC" />
<f name="ZDZBPKEY" type="12" table="HIS_YZ_EXEC" />
<f name="CXR" type="12" table="HIS_YZ_EXEC" />
<f name="CXSJ" type="93" table="HIS_YZ_EXEC" />
<f name="TZR" type="12" table="HIS_YZ_EXEC" />
<f name="TZSJ" type="93" table="HIS_YZ_EXEC" />
<f name="CJR" type="12" table="HIS_YZ_EXEC" />
<f name="CJRQ" type="93" table="HIS_YZ_EXEC" />
<f name="XGR" type="12" table="HIS_YZ_EXEC" />
<f name="XGRQ" type="93" table="HIS_YZ_EXEC" />
<f name="JGID" type="12" table="HIS_YZ_EXEC" />
<f name="CFH" type="12" table="HIS_YZ_EXEC" />
<f name="YZMC" type="12" table="HIS_YZ_EXEC" />
<f name="ISACTION" type="12" table="HIS_YZ_EXEC" />
<f name="YZZXKS" type="12" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>12</p>
<p>12</p>
</parameter>
</dao>
<dao id="yfbdnewExecMxDao" log="true" type="1"
memo="新的用法绑定医嘱执行明细的dao">
<sql>select ''
daystr,PKEY,JZPKEY,HZPKEY,ZYNO,YZMX,YZXPKEY,ZXFLAG,ZXR,ZXTIME,ZXRKS,ZXRWARD,PRINTFLAG,PRINTMAN,PRINTTIME,BBCJFLAG,BBCJMAN,BBCJTIME,BBTM,QUERYCODE,SFFLAG,ZXSL,ZXDW,ZXJE,YZBEGINSJ,YZZXBEGINSJ,YZTZSJ,YZMS,JZBZ,ZDZBPKEY,CXR,CXSJ,TZR,TZSJ,CJR,CJRQ,XGR,XGRQ,JGID,CFH,YZMC,ISACTION,YFBDZYZPKEY,BDYF,BDEXECPKEY,BDZC,CWJS,''
YZZXKS from HIS_YZ_EXEC where 1=2
</sql>
<tables>
<table name="HIS_YZ_EXEC" insert="true" update="true"
delete="true">
<primary>PKEY</primary>
<primary>SFFLAG</primary>
<primary>ZXFLAG</primary>
<primary>ISACTION</primary>
</table>
</tables>
<fields>
<f name="daystr" type="12" />
<f name="PKEY" type="12" table="HIS_YZ_EXEC" />
<f name="JZPKEY" type="12" table="HIS_YZ_EXEC" />
<f name="HZPKEY" type="12" table="HIS_YZ_EXEC" />
<f name="ZYNO" type="12" table="HIS_YZ_EXEC" />
<f name="YZMX" type="12" table="HIS_YZ_EXEC" />
<f name="YZXPKEY" type="12" table="HIS_YZ_EXEC" />
<f name="ZXFLAG" type="12" table="HIS_YZ_EXEC" />
<f name="ZXR" type="12" table="HIS_YZ_EXEC" />
<f name="ZXTIME" type="93" table="HIS_YZ_EXEC" />
<f name="ZXRKS" type="12" table="HIS_YZ_EXEC" />
<f name="ZXRWARD" type="12" table="HIS_YZ_EXEC" />
<f name="PRINTFLAG" type="12" table="HIS_YZ_EXEC" />
<f name="PRINTMAN" type="12" table="HIS_YZ_EXEC" />
<f name="PRINTTIME" type="93" table="HIS_YZ_EXEC" />
<f name="BBCJFLAG" type="12" table="HIS_YZ_EXEC" />
<f name="BBCJMAN" type="12" table="HIS_YZ_EXEC" />
<f name="BBCJTIME" type="93" table="HIS_YZ_EXEC" />
<f name="BBTM" type="12" table="HIS_YZ_EXEC" />
<f name="QUERYCODE" type="12" table="HIS_YZ_EXEC" />
<f name="SFFLAG" type="12" table="HIS_YZ_EXEC" />
<f name="ZXSL" type="8" table="HIS_YZ_EXEC" />
<f name="ZXDW" type="12" table="HIS_YZ_EXEC" />
<f name="ZXJE" type="8" table="HIS_YZ_EXEC" />
<f name="YZBEGINSJ" type="93" table="HIS_YZ_EXEC" />
<f name="YZZXBEGINSJ" type="93" table="HIS_YZ_EXEC" />
<f name="YZTZSJ" type="93" table="HIS_YZ_EXEC" />
<f name="YZMS" type="12" table="HIS_YZ_EXEC" />
<f name="JZBZ" type="12" table="HIS_YZ_EXEC" />
<f name="ZDZBPKEY" type="12" table="HIS_YZ_EXEC" />
<f name="CXR" type="12" table="HIS_YZ_EXEC" />
<f name="CXSJ" type="93" table="HIS_YZ_EXEC" />
<f name="TZR" type="12" table="HIS_YZ_EXEC" />
<f name="TZSJ" type="93" table="HIS_YZ_EXEC" />
<f name="CJR" type="12" table="HIS_YZ_EXEC" />
<f name="CJRQ" type="93" table="HIS_YZ_EXEC" />
<f name="XGR" type="12" table="HIS_YZ_EXEC" />
<f name="XGRQ" type="93" table="HIS_YZ_EXEC" />
<f name="JGID" type="12" table="HIS_YZ_EXEC" />
<f name="CFH" type="12" table="HIS_YZ_EXEC" />
<f name="YZMC" type="12" table="HIS_YZ_EXEC" />
<f name="ISACTION" type="12" table="HIS_YZ_EXEC" />
<f name="YFBDZYZPKEY" type="12" table="HIS_YZ_EXEC" />
<f name="BDYF" type="12" table="HIS_YZ_EXEC" />
<f name="BDEXECPKEY" type="12" table="HIS_YZ_EXEC" />
<f name="BDZC" type="12" table="HIS_YZ_EXEC" />
<f name="CWJS" type="12" table="HIS_YZ_EXEC" />
<f name="YZZXKS" type="12" />
</fields>
</dao>
<dao id="yfbdnewOrderDao" log="true" memo="新的用法绑定医嘱的dao">
<sql>
select
PKEY,HZPKEY,JZPKEY,JZH,CFH,YZCL,YZLB,YZLX,YZXPKEY,YZSHZT,YZJL,YZJLDW,YZPC,YZTS,YZYF,YZZCYYF,YZZCYYFMS,YZTZH,YZXZSJ,YZXZYS,YZLRYS,YZJE,YZSL,YZJX,YZBEGINJDSJ,YZENDJDSJ,YZBEGINZXSJ,YZZXSJ,YZYTZSJ,YZTZSJ,YZDJ,YZBEGINJDHS,YZENDJDHS,YZTZYS,YZZT,YZFYLB,YZDAYCS,YZJDBZ,YZYX,YZZDY,YZXZSXYS,YZTZSXYS,ZYCS,YZXZRLX,YZCXR,YZCXBZ,YZCXSJ,YZCXYY,YZFYZH,YZSFZYZ,YZSCZXCS,YZZTPKEY,YZDS,YZJJBZ,CJR,CJRQ,JGID,YZLC,YZGLYZ,YZSYCS,YZZXKS,YZKZXTS,PS,PSBZ,YZFJSM,YZFB,YZSYLS,YZLSDW,YZSFPY,YZCLTM,YZCLYY,YZBZ,YZBBLX,YZDW,YZXZKS,YZZL,YZJZJLXS,YZJZZHXS,YPYZJBJG,YPYZJBDW,YPYZBZJG,YPYZBZDW,YPYZDXDW,YPYZDXSL,YPYZZHXS,YZMC,YZSFZT,YZTFSL,YZDJSL,YZYL,YZZCYFSKEY,YZZCYFS,YZZCYJX,YZZCYDJF,ISDJJS,DJJSSL,ISZCYDJCL,IZZCYDJFJF,ISGFFJ,YZZCYBZ,SQDTYPE,SQDPKEY,SQDJSPKEY,SQDTFJE,ZYYZFL,YZSHYS,YZSHRQ,ISZPC,YZZPC,YZPCFFSJ,YZXH,PSJG,ZCYGLCZLX,YZZFR,YZZFSJ,YZZFYY,PSJGSJ,PSJGR,ISDPBCL,HZSZKS,LOCKFLAG,YFBDZYZPKEY,BDYF,BDEXECPKEY,BDZC,SFXSYZ,GLLX,OPAPKEY,ANESPKEY,ISOPAORDER,ISANESORDER,SMORDERPKEY,LMT_USED_FLAG,XZSYFW,CHRGITM_LV,YBBM,YBMC,YZGG,YZDXRL,YPFYSJMS,YPPCSJ,YPPCJBSJ,YPMRPC,YZZCYCFZT,SFYFJJFY,YZHOURBEGIN,YZHOUREND,DMJYZ,DMJSFZ,DMJDBRSFZ,DMJDBRXM,DMJDBRDH,YZCFLX,YZSFKS,YZSFYS,YZSFTIME,YZSFBZ,YZYWBZ,YZPSYPPC,YZPSDS,YZPSDSBEGIN,YZPSDSMINUTE,PSDSMAN,PSDSTIME,PSZXKS,DDD,YZTPKEY,SFQYSHCF,SHCFZT,DCZDJL,MTZDJL,ZDL,SZSYTS
from HIS_YZ_MXB where 1=2
</sql>
<tables>
<table name="HIS_YZ_MXB " insert="true" update="true"
delete="true">
<primary>PKEY</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_YZ_MXB " />
<f name="HZPKEY" type="12" table="HIS_YZ_MXB " />
<f name="JZPKEY" type="12" table="HIS_YZ_MXB " />
<f name="JZH" type="12" table="HIS_YZ_MXB " />
<f name="CFH" type="12" table="HIS_YZ_MXB " />
<f name="YZCL" type="12" table="HIS_YZ_MXB " />
<f name="YZLB" type="12" table="HIS_YZ_MXB " />
<f name="YZLX" type="12" table="HIS_YZ_MXB " />
<f name="YZXPKEY" type="12" table="HIS_YZ_MXB " />
<f name="YZSHZT" type="12" table="HIS_YZ_MXB " />
<f name="YZJL" type="12" table="HIS_YZ_MXB " />
<f name="YZJLDW" type="12" table="HIS_YZ_MXB " />
<f name="YZPC" type="12" table="HIS_YZ_MXB " />
<f name="YZTS" type="12" table="HIS_YZ_MXB " />
<f name="YZYF" type="12" table="HIS_YZ_MXB " />
<f name="YZZCYYF" type="12" table="HIS_YZ_MXB " />
<f name="YZZCYYFMS" type="12" table="HIS_YZ_MXB " />
<f name="YZTZH" type="12" table="HIS_YZ_MXB " />
<f name="YZXZSJ" type="93" table="HIS_YZ_MXB " />
<f name="YZXZYS" type="12" table="HIS_YZ_MXB " />
<f name="YZLRYS" type="12" table="HIS_YZ_MXB " />
<f name="YZJE" type="12" table="HIS_YZ_MXB " />
<f name="YZSL" type="12" table="HIS_YZ_MXB " />
<f name="YZJX" type="12" table="HIS_YZ_MXB " />
<f name="YZBEGINJDSJ" type="93" table="HIS_YZ_MXB " />
<f name="YZENDJDSJ" type="93" table="HIS_YZ_MXB " />
<f name="YZBEGINZXSJ" type="93" table="HIS_YZ_MXB " />
<f name="YZZXSJ" type="93" table="HIS_YZ_MXB " />
<f name="YZYTZSJ" type="93" table="HIS_YZ_MXB " />
<f name="YZTZSJ" type="93" table="HIS_YZ_MXB " />
<f name="YZDJ" type="12" table="HIS_YZ_MXB " />
<f name="YZBEGINJDHS" type="12" table="HIS_YZ_MXB " />
<f name="YZENDJDHS" type="12" table="HIS_YZ_MXB " />
<f name="YZTZYS" type="12" table="HIS_YZ_MXB " />
<f name="YZZT" type="12" table="HIS_YZ_MXB " />
<f name="YZFYLB" type="12" table="HIS_YZ_MXB " />
<f name="YZDAYCS" type="12" table="HIS_YZ_MXB " />
<f name="YZJDBZ" type="12" table="HIS_YZ_MXB " />
<f name="YZYX" type="12" table="HIS_YZ_MXB " />
<f name="YZZDY" type="12" table="HIS_YZ_MXB " />
<f name="YZXZSXYS" type="12" table="HIS_YZ_MXB " />
<f name="YZTZSXYS" type="12" table="HIS_YZ_MXB " />
<f name="ZYCS" type="12" table="HIS_YZ_MXB " />
<f name="YZXZRLX" type="12" table="HIS_YZ_MXB " />
<f name="YZCXR" type="12" table="HIS_YZ_MXB " />
<f name="YZCXBZ" type="12" table="HIS_YZ_MXB " />
<f name="YZCXSJ" type="93" table="HIS_YZ_MXB " />
<f name="YZCXYY" type="12" table="HIS_YZ_MXB " />
<f name="YZFYZH" type="12" table="HIS_YZ_MXB " />
<f name="YZSFZYZ" type="12" table="HIS_YZ_MXB " />
<f name="YZSCZXCS" type="12" table="HIS_YZ_MXB " />
<f name="YZZTPKEY" type="12" table="HIS_YZ_MXB " />
<f name="YZDS" type="12" table="HIS_YZ_MXB " />
<f name="YZJJBZ" type="12" table="HIS_YZ_MXB " />
<f name="CJR" type="12" table="HIS_YZ_MXB " />
<f name="CJRQ" type="93" table="HIS_YZ_MXB " />
<f name="JGID" type="12" table="HIS_YZ_MXB " />
<f name="YZLC" type="12" table="HIS_YZ_MXB " />
<f name="YZGLYZ" type="12" table="HIS_YZ_MXB " />
<f name="YZSYCS" type="12" table="HIS_YZ_MXB " />
<f name="YZZXKS" type="12" table="HIS_YZ_MXB " />
<f name="YZKZXTS" type="12" table="HIS_YZ_MXB " />
<f name="PS" type="12" table="HIS_YZ_MXB " />
<f name="PSBZ" type="12" table="HIS_YZ_MXB " />
<f name="YZFJSM" type="12" table="HIS_YZ_MXB " />
<f name="YZFB" type="12" table="HIS_YZ_MXB " />
<f name="YZSYLS" type="12" table="HIS_YZ_MXB " />
<f name="YZLSDW" type="12" table="HIS_YZ_MXB " />
<f name="YZSFPY" type="12" table="HIS_YZ_MXB " />
<f name="YZCLTM" type="12" table="HIS_YZ_MXB " />
<f name="YZCLYY" type="12" table="HIS_YZ_MXB " />
<f name="YZBZ" type="12" table="HIS_YZ_MXB " />
<f name="YZBBLX" type="12" table="HIS_YZ_MXB " />
<f name="YZDW" type="12" table="HIS_YZ_MXB " />
<f name="YZXZKS" type="12" table="HIS_YZ_MXB " />
<f name="YZZL" type="12" table="HIS_YZ_MXB " />
<f name="YZJZJLXS" type="12" table="HIS_YZ_MXB " />
<f name="YZJZZHXS" type="12" table="HIS_YZ_MXB " />
<f name="YPYZJBJG" type="12" table="HIS_YZ_MXB " />
<f name="YPYZJBDW" type="12" table="HIS_YZ_MXB " />
<f name="YPYZBZJG" type="12" table="HIS_YZ_MXB " />
<f name="YPYZBZDW" type="12" table="HIS_YZ_MXB " />
<f name="YPYZDXDW" type="12" table="HIS_YZ_MXB " />
<f name="YPYZDXSL" type="12" table="HIS_YZ_MXB " />
<f name="YPYZZHXS" type="12" table="HIS_YZ_MXB " />
<f name="YZMC" type="12" table="HIS_YZ_MXB " />
<f name="YZSFZT" type="12" table="HIS_YZ_MXB " />
<f name="YZTFSL" type="12" table="HIS_YZ_MXB " />
<f name="YZDJSL" type="12" table="HIS_YZ_MXB " />
<f name="YZYL" type="12" table="HIS_YZ_MXB " />
<f name="YZZCYFSKEY" type="12" table="HIS_YZ_MXB " />
<f name="YZZCYFS" type="12" table="HIS_YZ_MXB " />
<f name="YZZCYJX" type="12" table="HIS_YZ_MXB " />
<f name="YZZCYDJF" type="12" table="HIS_YZ_MXB " />
<f name="ISDJJS" type="12" table="HIS_YZ_MXB " />
<f name="DJJSSL" type="12" table="HIS_YZ_MXB " />
<f name="ISZCYDJCL" type="12" table="HIS_YZ_MXB " />
<f name="IZZCYDJFJF" type="12" table="HIS_YZ_MXB " />
<f name="ISGFFJ" type="12" table="HIS_YZ_MXB " />
<f name="YZZCYBZ" type="12" table="HIS_YZ_MXB " />
<f name="SQDTYPE" type="12" table="HIS_YZ_MXB " />
<f name="SQDPKEY" type="12" table="HIS_YZ_MXB " />
<f name="SQDJSPKEY" type="12" table="HIS_YZ_MXB " />
<f name="SQDTFJE" type="12" table="HIS_YZ_MXB " />
<f name="ZYYZFL" type="12" table="HIS_YZ_MXB " />
<f name="YZSHYS" type="12" table="HIS_YZ_MXB " />
<f name="YZSHRQ" type="93" table="HIS_YZ_MXB " />
<f name="ISZPC" type="12" table="HIS_YZ_MXB " />
<f name="YZZPC" type="12" table="HIS_YZ_MXB " />
<f name="YZPCFFSJ" type="12" table="HIS_YZ_MXB " />
<f name="YZXH" type="8" table="HIS_YZ_MXB " />
<f name="PSJG" type="12" table="HIS_YZ_MXB " />
<f name="ZCYGLCZLX" type="12" table="HIS_YZ_MXB " />
<f name="YZZFR" type="12" table="HIS_YZ_MXB " />
<f name="YZZFSJ" type="93" table="HIS_YZ_MXB " />
<f name="YZZFYY" type="12" table="HIS_YZ_MXB " />
<f name="PSJGSJ" type="93" table="HIS_YZ_MXB " />
<f name="PSJGR" type="12" table="HIS_YZ_MXB " />
<f name="ISDPBCL" type="12" table="HIS_YZ_MXB " />
<f name="HZSZKS" type="12" table="HIS_YZ_MXB " />
<f name="LOCKFLAG" type="-5" table="HIS_YZ_MXB " />
<f name="YFBDZYZPKEY" type="12" table="HIS_YZ_MXB " />
<f name="BDYF" type="12" table="HIS_YZ_MXB " />
<f name="BDEXECPKEY" type="12" table="HIS_YZ_MXB " />
<f name="BDZC" type="12" table="HIS_YZ_MXB " />
<f name="SFXSYZ" type="12" table="HIS_YZ_MXB " />
<f name="GLLX" type="12" table="HIS_YZ_MXB " />
<f name="OPAPKEY" type="12" table="HIS_YZ_MXB" />
<f name="ANESPKEY" type="12" table="HIS_YZ_MXB" />
<f name="ISOPAORDER" type="12" table="HIS_YZ_MXB" />
<f name="ISANESORDER" type="12" table="HIS_YZ_MXB" />
<f name="SMORDERPKEY" type="12" table="HIS_YZ_MXB" />
<f name="LMT_USED_FLAG" type="12" table="HIS_YZ_MXB" />
<f name="XZSYFW" type="12" table="HIS_YZ_MXB" />
<f name="CHRGITM_LV" type="12" table="HIS_YZ_MXB" />
<f name="YBBM" type="12" table="HIS_YZ_MXB" />
<f name="YBMC" type="12" table="HIS_YZ_MXB" />
<f name="YZGG" type="12" table="HIS_YZ_MXB" />
<f name="YZDXRL" type="8" table="HIS_YZ_MXB" />
<f name="YPFYSJMS" type="12" table="HIS_YZ_MXB" />
<f name="YPPCSJ" type="8" table="HIS_YZ_MXB" />
<f name="YPPCJBSJ" type="8" table="HIS_YZ_MXB" />
<f name="YPMRPC" type="12" table="HIS_YZ_MXB" />
<f name="YZZCYCFZT" type="12" table="HIS_YZ_MXB" />
<f name="SFYFJJFY" type="12" table="HIS_YZ_MXB" />
<f name="YZHOURBEGIN" type="93" table="HIS_YZ_MXB" />
<f name="YZHOUREND" type="93" table="HIS_YZ_MXB" />
<f name="DMJYZ" type="12" table="HIS_YZ_MXB" />
<f name="DMJSFZ" type="12" table="HIS_YZ_MXB" />
<f name="DMJDBRSFZ" type="12" table="HIS_YZ_MXB" />
<f name="DMJDBRXM" type="12" table="HIS_YZ_MXB" />
<f name="DMJDBRDH" type="12" table="HIS_YZ_MXB" />
<f name="YZCFLX" type="12" table="HIS_YZ_MXB" />
<f name="YZSFKS" type="12" table="HIS_YZ_MXB" />
<f name="YZSFYS" type="12" table="HIS_YZ_MXB" />
<f name="YZSFTIME" type="93" table="HIS_YZ_MXB" />
<f name="YZSFBZ" type="12" table="HIS_YZ_MXB" />
<f name="YZYWBZ" type="12" table="HIS_YZ_MXB" />
<f name="YZPSYPPC" type="12" table="HIS_YZ_MXB" />
<f name="YZPSDS" type="12" table="HIS_YZ_MXB" />
<f name="YZPSDSBEGIN" type="93" table="HIS_YZ_MXB" />
<f name="YZPSDSMINUTE" type="-5" table="HIS_YZ_MXB" />
<f name="PSDSMAN" type="12" table="HIS_YZ_MXB" />
<f name="PSDSTIME" type="93" table="HIS_YZ_MXB" />
<f name="PSZXKS" type="12" table="HIS_YZ_MXB" />
<f name="DDD" type="12" table="HIS_YZ_MXB" />
<f name="YZTPKEY" type="12" table="HIS_YZ_MXB" />
<f name="SFQYSHCF" type="12" table="HIS_YZ_MXB" />
<f name="SHCFZT" type="12" table="HIS_YZ_MXB" />
<f name="DCZDJL" type="12" table="HIS_YZ_MXB" />
<f name="MTZDJL" type="12" table="HIS_YZ_MXB" />
<f name="ZDL" type="12" table="HIS_YZ_MXB" />
<f name="SZSYTS" type="12" table="HIS_YZ_MXB" />
</fields>
</dao>
<dao id="getYzxExecNumDao" log="true" type="1"
memo="获取当前医嘱的所有正常已执行数量dao">
<sql><![CDATA[
select count(*) num from HIS_YZ_EXEC c where c.JGID=? and c.HZPKEY=? and c.JZPKEY =? and c.zxflag ='1' and c.YZMX=?
]]></sql>
<fields>
<f name="NUM" type="4" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>12</p>
<p>12</p>
</parameter>
</dao>
<dao id="getYzxNumByYzBdDao" log="true" type="1"
memo="用法绑定中判断某一个用法+医嘱项的附加执行总的使用数dao">
<sql><![CDATA[
select count(*) num from HIS_YZ_EXEC c where c.JGID=? and c.HZPKEY=? and c.JZPKEY =? and c.zxflag ='1' and c.YFBDZYZPKEY=? and c.BDZC=?
]]></sql>
<fields>
<f name="NUM" type="4" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>12</p>
<p>12</p>
<p>12</p>
</parameter>
</dao>
<dao id="HzAllYfbdExecMxDao" log="true" type="1"
memo="当前患者所有用法绑定生成医嘱执行明细dao">
<sql>
select
c.PKEY,c.JZPKEY,c.HZPKEY,c.ZYNO,c.YZMX,c.YZXPKEY,c.ZXFLAG,c.ZXR,c.ZXTIME,c.ZXRKS,c.ZXRWARD,c.PRINTFLAG,c.PRINTMAN,c.PRINTTIME,c.BBCJFLAG,c.BBCJMAN,c.BBCJTIME,c.BBTM,c.QUERYCODE,c.SFFLAG,c.ZXSL,c.ZXDW,c.ZXJE,c.YZBEGINSJ,c.YZZXBEGINSJ,c.YZTZSJ,c.YZMS,c.JZBZ,c.ZDZBPKEY,c.CXR,c.CXSJ,c.TZR,c.TZSJ,c.CJR,c.CJRQ,c.XGR,c.XGRQ,c.JGID,c.cfh,c.YZMC,c.ISACTION,c.YFBDZYZPKEY,c.BDYF,c.BDEXECPKEY,c.BDZC,c.CWJS
from HIS_YZ_EXEC c left join HIS_YZ_MXB a on c.yzmx=a.pkey and
c.jzpkey=a.jzpkey where a.JGID=? and a.HZPKEY=? and a.JZPKEY =? and
a.YZSHZT=1 and c.zxflag ='1' and a.yzlx='7' order by c.ZXTIME
</sql>
<tables>
<table name="HIS_YZ_EXEC" insert="true" update="true"
delete="true">
<primary>PKEY</primary>
<primary>ZXFLAG</primary>
<primary>JGID</primary>
<primary>ISACTION</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_YZ_EXEC" />
<f name="JZPKEY" type="12" table="HIS_YZ_EXEC" />
<f name="HZPKEY" type="12" table="HIS_YZ_EXEC" />
<f name="ZYNO" type="12" table="HIS_YZ_EXEC" />
<f name="YZMX" type="12" table="HIS_YZ_EXEC" />
<f name="YZXPKEY" type="12" table="HIS_YZ_EXEC" />
<f name="ZXFLAG" type="12" table="HIS_YZ_EXEC" />
<f name="ZXR" type="12" table="HIS_YZ_EXEC" />
<f name="ZXTIME" type="93" table="HIS_YZ_EXEC" />
<f name="ZXRKS" type="12" table="HIS_YZ_EXEC" />
<f name="ZXRWARD" type="12" table="HIS_YZ_EXEC" />
<f name="PRINTFLAG" type="12" table="HIS_YZ_EXEC" />
<f name="PRINTMAN" type="12" table="HIS_YZ_EXEC" />
<f name="PRINTTIME" type="93" table="HIS_YZ_EXEC" />
<f name="BBCJFLAG" type="12" table="HIS_YZ_EXEC" />
<f name="BBCJMAN" type="12" table="HIS_YZ_EXEC" />
<f name="BBCJTIME" type="93" table="HIS_YZ_EXEC" />
<f name="BBTM" type="12" table="HIS_YZ_EXEC" />
<f name="QUERYCODE" type="12" table="HIS_YZ_EXEC" />
<f name="SFFLAG" type="12" table="HIS_YZ_EXEC" />
<f name="ZXSL" type="8" table="HIS_YZ_EXEC" />
<f name="ZXDW" type="12" table="HIS_YZ_EXEC" />
<f name="ZXJE" type="8" table="HIS_YZ_EXEC" />
<f name="YZBEGINSJ" type="93" table="HIS_YZ_EXEC" />
<f name="YZZXBEGINSJ" type="93" table="HIS_YZ_EXEC" />
<f name="YZTZSJ" type="93" table="HIS_YZ_EXEC" />
<f name="YZMS" type="12" table="HIS_YZ_EXEC" />
<f name="JZBZ" type="12" table="HIS_YZ_EXEC" />
<f name="ZDZBPKEY" type="12" table="HIS_YZ_EXEC" />
<f name="CXR" type="12" table="HIS_YZ_EXEC" />
<f name="CXSJ" type="93" table="HIS_YZ_EXEC" />
<f name="TZR" type="12" table="HIS_YZ_EXEC" />
<f name="TZSJ" type="93" table="HIS_YZ_EXEC" />
<f name="CJR" type="12" table="HIS_YZ_EXEC" />
<f name="CJRQ" type="93" table="HIS_YZ_EXEC" />
<f name="XGR" type="12" table="HIS_YZ_EXEC" />
<f name="XGRQ" type="93" table="HIS_YZ_EXEC" />
<f name="JGID" type="12" table="HIS_YZ_EXEC" />
<f name="CFH" type="12" table="HIS_YZ_EXEC" />
<f name="YZMC" type="12" table="HIS_YZ_EXEC" />
<f name="ISACTION" type="12" table="HIS_YZ_EXEC" />
<f name="YFBDZYZPKEY" type="12" table="HIS_YZ_EXEC" />
<f name="BDYF" type="12" table="HIS_YZ_EXEC" />
<f name="BDEXECPKEY" type="12" table="HIS_YZ_EXEC" />
<f name="BDZC" type="12" table="HIS_YZ_EXEC" />
<f name="CWJS" type="12" table="HIS_YZ_EXEC" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>12</p>
</parameter>
</dao>
<dao id="HzAllYfbdExecMxByYzxDao" log="true" type="1"
memo="当前患者当前医嘱项绑定生成医嘱执行明细dao">
<sql><![CDATA[
select a.yzmx||a.QUERYCODE flagcode,a.PKEY,a.JZPKEY,a.HZPKEY,a.ZYNO,a.YZMX,a.YZXPKEY,a.ZXFLAG,a.ZXR,a.ZXTIME,a.ZXRKS,a.ZXRWARD,a.PRINTFLAG,a.PRINTMAN,a.PRINTTIME,a.BBCJFLAG,a.BBCJMAN,a.BBCJTIME,a.BBTM,a.QUERYCODE,a.SFFLAG,a.ZXSL,a.ZXDW,a.ZXJE,a.YZBEGINSJ,a.YZZXBEGINSJ,a.YZTZSJ,a.YZMS,a.JZBZ,a.ZDZBPKEY,a.CXR,a.CXSJ,a.TZR,a.TZSJ,a.CJR,a.CJRQ,a.XGR,a.XGRQ,a.JGID,a.CFH,a.YZMC,a.ISACTION,e.PKEY pybpkey,e.SFLYSH,e.SFYSSH,e.LYSHR,e.LYSHRQ,e.YSSHR,e.YSSHRQ,e.FYZT,(select sum(YZSL) from HIS_YFFY_ZYFYMXB where pybpkey=e.pkey and yzmx=e.yzmx and JGID=e.JGID) yzsl,(select sum(TYSL) from HIS_YFFY_ZYFYMXB where pybpkey=e.pkey and yzmx=e.yzmx and JGID=e.JGID) tysl,e.YPFL,e.FYKS,f.YZXZYS,f.YZLB,a.TYDNUM,f.yzcl,f.YZJZZHXS,a.YFBDZYZPKEY,a.BDYF,a.BDEXECPKEY,a.BDZC,a.CWJS,e.LOCKFLAG,f.gllx from HIS_YZ_EXEC a left join HIS_YFFY_PYB e on a.pkey=e.DFYPKEY and a.JGID=e.JGID left join HIS_YZ_MXB f on a.YZMX=f.pkey and a.JGID=f.JGID where a.JGID=? and a.hzpkey=? and a.jzpkey=? and a.YFBDZYZPKEY=? and (a.ZXFLAG=1 or a.ZXFLAG=2) order by a.ZXTIME desc
]]></sql>
<tables>
<table name="HIS_YFFY_PYB" insert="false" update="true"
delete="false">
<primary>PYBPKEY</primary>
<primary>JZPKEY</primary>
<primary>HZPKEY</primary>
<primary>YZMX</primary>
<primary>SFLYSH</primary>
<primary>SFYSSH</primary>
<primary>FYZT</primary>
<primary>LOCKFLAG</primary>
</table>
<table name="HIS_YZ_EXEC" insert="false" update="true"
delete="false">
<primary>PKEY</primary>
<primary>JZPKEY</primary>
<primary>SFFLAG</primary>
<primary>YZMX</primary>
<primary>JGID</primary>
<primary>TYDNUM</primary>
<primary>ZXFLAG</primary>
</table>
</tables>
<fields>
<f name="FLAGCODE" type="12" />
<f name="PKEY" type="12" table="HIS_YZ_EXEC" />
<f name="JZPKEY" type="12" table="HIS_YFFY_PYB,HIS_YZ_EXEC" />
<f name="HZPKEY" type="12" table="HIS_YFFY_PYB,HIS_YZ_EXEC" />
<f name="ZYNO" type="12" table="HIS_YZ_EXEC" />
<f name="YZMX" type="12" table="HIS_YFFY_PYB,HIS_YZ_EXEC" />
<f name="YZXPKEY" type="12" table="HIS_YZ_EXEC" />
<f name="ZXFLAG" type="12" table="HIS_YZ_EXEC" />
<f name="ZXR" type="12" table="HIS_YZ_EXEC" />
<f name="ZXTIME" type="93" table="HIS_YZ_EXEC" />
<f name="ZXRKS" type="12" table="HIS_YZ_EXEC" />
<f name="ZXRWARD" type="12" table="HIS_YZ_EXEC" />
<f name="PRINTFLAG" type="12" table="HIS_YZ_EXEC" />
<f name="PRINTMAN" type="12" table="HIS_YZ_EXEC" />
<f name="PRINTTIME" type="93" table="HIS_YZ_EXEC" />
<f name="BBCJFLAG" type="12" table="HIS_YZ_EXEC" />
<f name="BBCJMAN" type="12" table="HIS_YZ_EXEC" />
<f name="BBCJTIME" type="93" table="HIS_YZ_EXEC" />
<f name="BBTM" type="12" table="HIS_YZ_EXEC" />
<f name="QUERYCODE" type="12" table="HIS_YZ_EXEC" />
<f name="SFFLAG" type="12" table="HIS_YZ_EXEC" />
<f name="ZXSL" type="8" table="HIS_YZ_EXEC" />
<f name="ZXDW" type="12" table="HIS_YZ_EXEC" />
<f name="ZXJE" type="8" table="HIS_YZ_EXEC" />
<f name="YZBEGINSJ" type="93" table="HIS_YZ_EXEC" />
<f name="YZZXBEGINSJ" type="93" table="HIS_YZ_EXEC" />
<f name="YZTZSJ" type="93" table="HIS_YZ_EXEC" />
<f name="YZMS" type="12" table="HIS_YZ_EXEC" />
<f name="JZBZ" type="12" table="HIS_YZ_EXEC" />
<f name="ZDZBPKEY" type="12" table="HIS_YZ_EXEC" />
<f name="CXR" type="12" table="HIS_YZ_EXEC" />
<f name="CXSJ" type="93" table="HIS_YZ_EXEC" />
<f name="TZR" type="12" table="HIS_YZ_EXEC" />
<f name="TZSJ" type="93" table="HIS_YZ_EXEC" />
<f name="CJR" type="12" table="HIS_YFFY_PYB,HIS_YZ_EXEC" />
<f name="CJRQ" type="93" table="HIS_YFFY_PYB,HIS_YZ_EXEC" />
<f name="XGR" type="12" table="HIS_YFFY_PYB,HIS_YZ_EXEC" />
<f name="XGRQ" type="93" table="HIS_YFFY_PYB,HIS_YZ_EXEC" />
<f name="JGID" type="12" table="HIS_YFFY_PYB,HIS_YZ_EXEC" />
<f name="CFH" type="12" table="HIS_YZ_EXEC" />
<f name="YZMC" type="12" table="HIS_YZ_EXEC" />
<f name="ISACTION" type="12" table="HIS_YZ_EXEC" />
<f name="PYBPKEY" schemaname="PKEY" type="12" table="HIS_YFFY_PYB" />
<f name="SFLYSH" type="12" table="HIS_YFFY_PYB" />
<f name="SFYSSH" type="12" table="HIS_YFFY_PYB" />
<f name="LYSHR" type="12" table="HIS_YFFY_PYB" />
<f name="LYSHRQ" type="93" table="HIS_YFFY_PYB" />
<f name="YSSHR" type="12" table="HIS_YFFY_PYB" />
<f name="YSSHRQ" type="93" table="HIS_YFFY_PYB" />
<f name="FYZT" type="12" table="HIS_YFFY_PYB" />
<f name="YZSL" type="12" />
<f name="TYSL" type="12" />
<f name="YPFL" type="12" table="HIS_YFFY_PYB" />
<f name="FYKS" type="12" table="HIS_YFFY_PYB" />
<f name="YZXZYS" type="12" />
<f name="YZLB" type="12" />
<f name="TYDNUM" type="8" table="HIS_YZ_EXEC" />
<f name="YZCL" type="12" />
<f name="YZJZZHXS" type="12" />
<f name="YFBDZYZPKEY" type="12" table="HIS_YZ_EXEC" />
<f name="BDYF" type="12" table="HIS_YZ_EXEC" />
<f name="BDEXECPKEY" type="12" table="HIS_YZ_EXEC" />
<f name="BDZC" type="12" table="HIS_YZ_EXEC" />
<f name="CWJS" type="12" table="HIS_YZ_EXEC" />
<f name="LOCKFLAG" type="12" table="HIS_YFFY_PYB" />
<f name="GLLX" type="12" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>12</p>
<p>12</p>
</parameter>
</dao>
<dao id="bqfjlxdao" type="1" memo="住院病区房间类型dao">
<sql>select PKEY,BM,MC,MS,CJR,CJRQ,XGR,XGRQ,SCR,SCRQ,SCBZ,JGID from
HIS_BQFJLX where SCBZ = 1 and JGID = ? order by PKEY
</sql>
<tables>
<table name="HIS_BQFJLX" insert="true" update="true"
delete="true">
<primary>PKEY</primary>
<primary>BM</primary>
<primary>SCBZ</primary>
<primary>JGID</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_BQFJLX" />
<f name="BM" type="12" table="HIS_BQFJLX" />
<f name="MC" type="12" table="HIS_BQFJLX" />
<f name="MS" type="12" table="HIS_BQFJLX" />
<f name="CJR" type="12" table="HIS_BQFJLX" />
<f name="CJRQ" type="93" table="HIS_BQFJLX" />
<f name="XGR" type="12" table="HIS_BQFJLX" />
<f name="XGRQ" type="93" table="HIS_BQFJLX" />
<f name="SCR" type="12" table="HIS_BQFJLX" />
<f name="SCRQ" type="93" table="HIS_BQFJLX" />
<f name="SCBZ" type="12" table="HIS_BQFJLX" />
<f name="JGID" type="12" table="HIS_BQFJLX" />
</fields>
<parameter>
<p>12</p>
</parameter>
</dao>
<dao id="bqfjdao" type="1">
<sql>select
PKEY,BM,MC,MS,FJLX,FJTZXZ,CJR,CJRQ,XGR,XGRQ,SCR,SCRQ,SCBZ,JGID,BQPKEY
from HIS_BQFJ where SCBZ=1 and JGID=? order by bm
</sql>
<tables>
<table name="HIS_BQFJ" insert="true" update="true"
delete="true">
<primary>PKEY</primary>
<primary>BM</primary>
<primary>SCBZ</primary>
<primary>JGID</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_BQFJ" />
<f name="BM" type="12" table="HIS_BQFJ" />
<f name="MC" type="12" table="HIS_BQFJ" />
<f name="MS" type="12" table="HIS_BQFJ" />
<f name="FJLX" type="12" table="HIS_BQFJ" />
<f name="FJTZXZ" type="12" table="HIS_BQFJ" />
<f name="CJR" type="12" table="HIS_BQFJ" />
<f name="CJRQ" type="93" table="HIS_BQFJ" />
<f name="XGR" type="12" table="HIS_BQFJ" />
<f name="XGRQ" type="93" table="HIS_BQFJ" />
<f name="SCR" type="12" table="HIS_BQFJ" />
<f name="SCRQ" type="93" table="HIS_BQFJ" />
<f name="SCBZ" type="12" table="HIS_BQFJ" />
<f name="JGID" type="12" table="HIS_BQFJ" />
<f name="BQPKEY" type="12" table="HIS_BQFJ" />
</fields>
<parameter>
<p>12</p>
</parameter>
</dao>
<dao id="zyZKZQDao" log="true" type="1" memo="住院患者转科转区分床退床日志dao">
<sql>select
PKEY,HZPKEY,JZPKEY,TYPE,YKS,XKS,YBQ,XBQ,YCW,XCW,CZHS,CZRQ,CJR,CJRQ,XGR,XGRQ,JGID,LOCKFLAG
from HIS_ZY_ZKZQ_LOG where JGID=? and hzpkey=? and jzpkey=? order by
pkey desc
</sql>
<tables>
<table name="HIS_ZY_ZKZQ_LOG" insert="true" update="true"
delete="true">
<primary>PKEY</primary>
<primary>JGID</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_ZY_ZKZQ_LOG" />
<f name="HZPKEY" type="12" table="HIS_ZY_ZKZQ_LOG" />
<f name="JZPKEY" type="12" table="HIS_ZY_ZKZQ_LOG" />
<f name="TYPE" type="12" table="HIS_ZY_ZKZQ_LOG" />
<f name="YKS" type="12" table="HIS_ZY_ZKZQ_LOG" />
<f name="XKS" type="12" table="HIS_ZY_ZKZQ_LOG" />
<f name="YBQ" type="12" table="HIS_ZY_ZKZQ_LOG" />
<f name="XBQ" type="12" table="HIS_ZY_ZKZQ_LOG" />
<f name="YCW" type="12" table="HIS_ZY_ZKZQ_LOG" />
<f name="XCW" type="12" table="HIS_ZY_ZKZQ_LOG" />
<f name="CZHS" type="12" table="HIS_ZY_ZKZQ_LOG" />
<f name="CZRQ" type="93" table="HIS_ZY_ZKZQ_LOG" />
<f name="CJR" type="12" table="HIS_ZY_ZKZQ_LOG" />
<f name="CJRQ" type="93" table="HIS_ZY_ZKZQ_LOG" />
<f name="XGR" type="12" table="HIS_ZY_ZKZQ_LOG" />
<f name="XGRQ" type="93" table="HIS_ZY_ZKZQ_LOG" />
<f name="JGID" type="12" table="HIS_ZY_ZKZQ_LOG" />
<f name="LOCKFLAG" type="-5" table="HIS_ZY_ZKZQ_LOG" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>12</p>
</parameter>
</dao>
<dao id="zyNewZKZQDao" log="true" type="1" memo="新增住院患者转科专区分床日志dao">
<sql>select
PKEY,HZPKEY,JZPKEY,TYPE,YKS,XKS,YBQ,XBQ,YCW,XCW,CZHS,CZRQ,CJR,CJRQ,XGR,XGRQ,JGID,LOCKFLAG
from HIS_ZY_ZKZQ_LOG where 1=2
</sql>
<tables>
<table name="HIS_ZY_ZKZQ_LOG" insert="true" update="true"
delete="true">
<primary>PKEY</primary>
<primary>JGID</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_ZY_ZKZQ_LOG" />
<f name="HZPKEY" type="12" table="HIS_ZY_ZKZQ_LOG" />
<f name="JZPKEY" type="12" table="HIS_ZY_ZKZQ_LOG" />
<f name="TYPE" type="12" table="HIS_ZY_ZKZQ_LOG" />
<f name="YKS" type="12" table="HIS_ZY_ZKZQ_LOG" />
<f name="XKS" type="12" table="HIS_ZY_ZKZQ_LOG" />
<f name="YBQ" type="12" table="HIS_ZY_ZKZQ_LOG" />
<f name="XBQ" type="12" table="HIS_ZY_ZKZQ_LOG" />
<f name="YCW" type="12" table="HIS_ZY_ZKZQ_LOG" />
<f name="XCW" type="12" table="HIS_ZY_ZKZQ_LOG" />
<f name="CZHS" type="12" table="HIS_ZY_ZKZQ_LOG" />
<f name="CZRQ" type="93" table="HIS_ZY_ZKZQ_LOG" />
<f name="CJR" type="12" table="HIS_ZY_ZKZQ_LOG" />
<f name="CJRQ" type="93" table="HIS_ZY_ZKZQ_LOG" />
<f name="XGR" type="12" table="HIS_ZY_ZKZQ_LOG" />
<f name="XGRQ" type="93" table="HIS_ZY_ZKZQ_LOG" />
<f name="JGID" type="12" table="HIS_ZY_ZKZQ_LOG" />
<f name="LOCKFLAG" type="-5" table="HIS_ZY_ZKZQ_LOG" />
</fields>
</dao>
<dao id="zyfmLogDao" log="true" type="1" memo="住院分娩登记日志dao">
<sql>select PKEY,HZPKEY,JZPKEY,FMZT,CJR,CJRQ,XGR,XGRQ,JGID,LOCKFLAG
from HIS_ZY_FM_LOG where JGID=? and hzpkey=? and jzpkey=? order by
pkey
</sql>
<tables>
<table name="HIS_ZY_FM_LOG" insert="true" update="true"
delete="true">
<primary>PKEY</primary>
<primary>JGID</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_ZY_FM_LOG" />
<f name="HZPKEY" type="12" table="HIS_ZY_FM_LOG" />
<f name="JZPKEY" type="12" table="HIS_ZY_FM_LOG" />
<f name="FMZT" type="12" table="HIS_ZY_FM_LOG" />
<f name="CJR" type="12" table="HIS_ZY_FM_LOG" />
<f name="CJRQ" type="93" table="HIS_ZY_FM_LOG" />
<f name="XGR" type="12" table="HIS_ZY_FM_LOG" />
<f name="XGRQ" type="93" table="HIS_ZY_FM_LOG" />
<f name="JGID" type="12" table="HIS_ZY_FM_LOG" />
<f name="LOCKFLAG" type="-5" table="HIS_ZY_FM_LOG" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>12</p>
</parameter>
</dao>
<dao id="zyfmYeInfoDao" log="true" type="1" memo="住院分娩婴儿信息dao">
<sql>select
PKEY,MQHZPKEY,MQJZPKEY,YEHZPKEY,YEJZPKEY,YENO,YEFMJG,YEFMFS,YENAME,YENAMEJX,YEXB,YEBIRTHDAY,APGAR1,APGAR5,APGAR10,APGAR20,CJR,CJRQ,XGR,XGRQ,JGID,LOCKFLAG
from HIS_ZY_FM_YEINFO where JGID=? and mqhzpkey=? and mqjzpkey=?
order by yeno
</sql>
<tables>
<table name="HIS_ZY_FM_YEINFO" insert="true" update="true"
delete="true">
<primary>PKEY</primary>
<primary>JGID</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_ZY_FM_YEINFO" />
<f name="MQHZPKEY" type="12" table="HIS_ZY_FM_YEINFO" />
<f name="MQJZPKEY" type="12" table="HIS_ZY_FM_YEINFO" />
<f name="YEHZPKEY" type="12" table="HIS_ZY_FM_YEINFO" />
<f name="YEJZPKEY" type="12" table="HIS_ZY_FM_YEINFO" />
<f name="YENO" type="-5" table="HIS_ZY_FM_YEINFO" />
<f name="YEFMJG" type="12" table="HIS_ZY_FM_YEINFO" />
<f name="YEFMFS" type="12" table="HIS_ZY_FM_YEINFO" />
<f name="YENAME" type="12" table="HIS_ZY_FM_YEINFO" />
<f name="YENAMEJX" type="12" table="HIS_ZY_FM_YEINFO" />
<f name="YEXB" type="12" table="HIS_ZY_FM_YEINFO" />
<f name="YEBIRTHDAY" type="93" table="HIS_ZY_FM_YEINFO" />
<f name="APGAR1" type="12" table="HIS_ZY_FM_YEINFO" />
<f name="APGAR5" type="12" table="HIS_ZY_FM_YEINFO" />
<f name="APGAR10" type="12" table="HIS_ZY_FM_YEINFO" />
<f name="APGAR20" type="12" table="HIS_ZY_FM_YEINFO" />
<f name="CJR" type="12" table="HIS_ZY_FM_YEINFO" />
<f name="CJRQ" type="93" table="HIS_ZY_FM_YEINFO" />
<f name="XGR" type="12" table="HIS_ZY_FM_YEINFO" />
<f name="XGRQ" type="93" table="HIS_ZY_FM_YEINFO" />
<f name="JGID" type="12" table="HIS_ZY_FM_YEINFO" />
<f name="LOCKFLAG" type="-5" table="HIS_ZY_FM_YEINFO" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>12</p>
</parameter>
</dao>
<dao id="getZyfmBabyNumDao" log="true" type="1"
memo="获取住院分娩新生儿登记数量dao">
<sql>select count(*) num from HIS_ZY_FM_YEINFO where JGID=? and
MQHZPKEY=? and MQJZPKEY=?
</sql>
<fields>
<f name="NUM" type="4" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>12</p>
</parameter>
</dao>
<dao id="hzjjfyDao" log="true" type="1" memo="患者拒绝发药信息dao">
<sql>
select
a.PKEY,a.HZPKEY,a.JZPKEY,a.YZMX,a.JJFYR,a.JJFYRQ,a.JJFYYY,a.JJFYZT,a.CJR,a.CJRQ,a.XGR,a.XGRQ,a.JGID,a.LOCKFLAG,b.jjks,b.bed,b.ward,b.jzno,d.yzmc,d.yzzxks,d.YZXPKEY,d.yzsl,d.yzdw,c.xm,d.YZCL,b.zyno
from HIS_YFFY_JJFY a left join HIS_JZ_BASEINFO b on a.jzpkey=b.pkey
and a.JGID=b.JGID left join HIS_HZINFO c on a.hzpkey=c.pkey and
a.JGID=c.JGID left join his_yz_mxb d on a.yzmx=d.pkey and
a.JGID=d.JGID where a.JGID=? and a.hzpkey=? and a.jzpkey=? order by
a.JJFYRQ
</sql>
<tables>
<table name="HIS_YFFY_JJFY" insert="true" update="true"
delete="true">
<primary>PKEY</primary>
<primary>JGID</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_YFFY_JJFY" />
<f name="HZPKEY" type="12" table="HIS_YFFY_JJFY" />
<f name="JZPKEY" type="12" table="HIS_YFFY_JJFY" />
<f name="YZMX" type="12" table="HIS_YFFY_JJFY" />
<f name="JJFYR" type="12" table="HIS_YFFY_JJFY" />
<f name="JJFYRQ" type="93" table="HIS_YFFY_JJFY" />
<f name="JJFYYY" type="12" table="HIS_YFFY_JJFY" />
<f name="JJFYZT" type="-5" table="HIS_YFFY_JJFY" />
<f name="CJR" type="12" table="HIS_YFFY_JJFY" />
<f name="CJRQ" type="93" table="HIS_YFFY_JJFY" />
<f name="XGR" type="12" table="HIS_YFFY_JJFY" />
<f name="XGRQ" type="93" table="HIS_YFFY_JJFY" />
<f name="JGID" type="12" table="HIS_YFFY_JJFY" />
<f name="LOCKFLAG" type="-5" table="HIS_YFFY_JJFY" />
<f name="JJKS" type="12" />
<f name="BED" type="12" />
<f name="WARD" type="12" />
<f name="JZNO" type="12" />
<f name="YZMC" type="12" />
<f name="YZZXKS" type="12" />
<f name="YZXPKEY" type="12" />
<f name="YZSL" type="12" />
<f name="YZDW" type="12" />
<f name="XM" type="12" />
<f name="YZCL" type="12" />
<f name="ZYNO" type="12" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>12</p>
</parameter>
</dao>
<dao id="allhzjjfyDao" log="true" type="1" memo="所有患者拒绝发药信息dao">
<sql>
select
a.PKEY,a.HZPKEY,a.JZPKEY,a.YZMX,a.JJFYR,a.JJFYRQ,a.JJFYYY,a.JJFYZT,a.CJR,a.CJRQ,a.XGR,a.XGRQ,a.JGID,a.LOCKFLAG,b.jjks,b.bed,b.ward,b.jzno,d.yzmc,d.yzzxks,d.YZXPKEY,d.yzsl,d.yzdw,c.xm,d.YZCL,b.zyno
from HIS_YFFY_JJFY a left join HIS_JZ_BASEINFO b on a.jzpkey=b.pkey
and a.JGID=b.JGID left join HIS_HZINFO c on a.hzpkey=c.pkey and
a.JGID=c.JGID left join his_yz_mxb d on a.yzmx=d.pkey and
a.JGID=d.JGID where a.JGID=? order by a.JJFYRQ desc
</sql>
<tables>
<table name="HIS_YFFY_JJFY" insert="true" update="true"
delete="true">
<primary>PKEY</primary>
<primary>JGID</primary>
</table>
</tables>
<fields>
<f name="PKEY" type="12" table="HIS_YFFY_JJFY" />
<f name="HZPKEY" type="12" table="HIS_YFFY_JJFY" />
<f name="JZPKEY" type="12" table="HIS_YFFY_JJFY" />
<f name="YZMX" type="12" table="HIS_YFFY_JJFY" />
<f name="JJFYR" type="12" table="HIS_YFFY_JJFY" />
<f name="JJFYRQ" type="93" table="HIS_YFFY_JJFY" />
<f name="JJFYYY" type="12" table="HIS_YFFY_JJFY" />
<f name="JJFYZT" type="-5" table="HIS_YFFY_JJFY" />
<f name="CJR" type="12" table="HIS_YFFY_JJFY" />
<f name="CJRQ" type="93" table="HIS_YFFY_JJFY" />
<f name="XGR" type="12" table="HIS_YFFY_JJFY" />
<f name="XGRQ" type="93" table="HIS_YFFY_JJFY" />
<f name="JGID" type="12" table="HIS_YFFY_JJFY" />
<f name="LOCKFLAG" type="-5" table="HIS_YFFY_JJFY" />
<f name="JJKS" type="12" />
<f name="BED" type="12" />
<f name="WARD" type="12" />
<f name="JZNO" type="12" />
<f name="YZMC" type="12" />
<f name="YZZXKS" type="12" />
<f name="YZXPKEY" type="12" />
<f name="YZSL" type="12" />
<f name="YZDW" type="12" />
<f name="XM" type="12" />
<f name="YZCL" type="12" />
<f name="ZYNO" type="12" />
</fields>
<parameter>
<p>12</p>
</parameter>
</dao>
<dao id="hzjjfyNumDao" log="true" type="1" memo="患者拒绝发药数量dao">
<sql>
select count(1) num from HIS_YFFY_JJFY a left join
HIS_JZ_BASEINFO b on
a.jzpkey=b.pkey and a.JGID=b.JGID left join
HIS_HZINFO c on
a.hzpkey=c.pkey and a.JGID=c.JGID left join his_yz_mxb
d on
a.yzmx=d.pkey and a.JGID=d.JGID where a.JGID=? and a.hzpkey=? and
a.jzpkey=? and a.JJFYZT='1' order by a.JJFYRQ
</sql>
<fields>
<f name="num" type="12" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
<p>12</p>
</parameter>
</dao>
<dao id="allHzOrderSFXMxQueryDao" log="true" type="1">
<sql>
SELECT
'' jbmc,
'' jbbm,
to_char( jfrq, 'YYYY-MM-DD' ) jfrqstr,
PKEY,
ZDZBPKEY,
YZX,
YZMX,
SFX,
SFXDJ,
SFXSL,
SFXZKL,
SFXZFY,
SFXZKFY,
HZYBZF,
HZZFZF,
JFRQ,
CJR,
CJRQ,
JGID,
FYDL,
FYZL,
EXEPKEY,
ISHC,
HCDJPKEY,
JSZT,
ZYZFL,
BM,
MC,
ZXFLAG,
yzdw,
gg,
yzmc,
zxdw,
LOCKFLAG,
HZPKEY,
JZPKEY,
xzsyfw,
zyno,
mzno,
xm,
xb,
jznl,
sfzh,
jjrq,
cyrq,
jjks,
jjys,
yzxzys,
jzlx
FROM
(
SELECT
a.PKEY,
a.ZDZBPKEY,
a.YZX,
a.YZMX,
a.SFX,
a.SFXDJ,
a.SFXSL,
a.SFXZKL,
a.SFXZFY,
a.SFXZKFY,
a.HZYBZF,
a.HZZFZF,
a.JFRQ,
a.CJR,
a.CJRQ,
a.JGID,
a.FYDL,
a.FYZL,
a.EXEPKEY,
a.ISHC,
a.HCDJPKEY,
a.JSZT,
b.ZYZFL,
b.BM,
b.MC,
c.ZXFLAG,
d.yzdw,
y.gg,
d.yzmc,
c.zxdw,
a.LOCKFLAG,
a.HZPKEY,
a.JZPKEY,
g.xzsyfw,
e.zyno,
e.mzno,
f.xm,
f.xb,
e.jznl,
f.sfzh,
e.jjrq,
e.cyrq,
e.jjks,
e.jjys,
d.yzxzys,
e.jzlx
FROM
HIS_SFZD_SFXMXB a
LEFT JOIN HIS_SFX b ON
a.sfx = b.bm
AND a.JGID = b.JGID
LEFT JOIN HIS_YZ_EXEC c ON a.EXEPKEY =
c.pkey
AND a.JGID = c.JGID
LEFT JOIN HIS_YZ_MXB d ON a.yzmx = d.pkey
AND a.JGID = d.JGID
LEFT JOIN HIS_YPXX y ON d.yzxpkey = y.bm
LEFT JOIN
HIS_JZ_BASEINFO e ON a.jzpkey = e.pkey
AND a.JGID = e.JGID
LEFT JOIN
HIS_HZINFO f ON a.hzpkey = f.pkey
AND a.JGID = f.JGID
LEFT JOIN
his_yb_ml g ON b.YBPKEY = g.rid
WHERE
( b.gllx IS NULL OR b.gllx != 'W'
)
AND a.JGID =?
AND ( ( e.jzlx = 'Z' AND e.jzzt = 'C' ) OR e.jzlx = 'M'
)
AND c.zxflag LIKE '1'
union all
select
a.PKEY,a.ZDZBPKEY,a.YZX,a.YZMX,a.SFX,a.SFXDJ,a.SFXSL,a.SFXZKL,a.SFXZFY,a.SFXZKFY,a.HZYBZF,a.HZZFZF,a.JFRQ,a.CJR,a.CJRQ,a.JGID,a.FYDL,a.FYZL,a.EXEPKEY,a.ISHC,a.HCDJPKEY,a.JSZT,b.ZYZFL,b.BM,b.MC,c.ZXFLAG,d.yzdw,w.wzgg
gg,d.yzmc,c.zxdw,a.LOCKFLAG,a.HZPKEY,a.JZPKEY,g.xzsyfw,e.zyno,e.mzno,f.xm,f.xb,e.jznl,f.sfzh,e.jjrq,e.cyrq,e.jjks,e.jjys,d.yzxzys,e.jzlx
from HIS_SFZD_SFXMXB a left join HIS_SFX b on a.sfx=b.bm and
a.JGID=b.JGID left join HIS_YZ_EXEC c on a.EXEPKEY=c.pkey and
a.JGID=c.JGID left join HIS_YZ_MXB d on a.yzmx=d.pkey and
a.JGID=d.JGID left join HIS_MMS_WZZD w on b.glbm=w.wzbm and
b.JGID=w.JGID left join HIS_JZ_BASEINFO e on a.jzpkey=e.pkey and
a.JGID=e.JGID left join HIS_HZINFO f on a.hzpkey=f.pkey and
a.JGID=f.JGID left join his_yb_ml g on b.YBPKEY=g.rid where b.gllx =
'W' and a.JGID=? and ((e.jzlx='Z' and e.jzzt='C') or e.jzlx='M') and
c.zxflag like '1'
)order by jfrqstr,jzpkey,zyzfl,yzx,bm
</sql>
<fields>
<f name="JBMC" type="1" />
<f name="JBBM" type="1" />
<f name="JFRQSTR" type="12" />
<f name="PKEY" type="12" />
<f name="ZDZBPKEY" type="12" />
<f name="YZX" type="12" />
<f name="YZMX" type="12" />
<f name="SFX" type="12" />
<f name="SFXDJ" type="12" />
<f name="SFXSL" type="12" />
<f name="SFXZKL" type="12" />
<f name="SFXZFY" type="12" />
<f name="SFXZKFY" type="12" />
<f name="HZYBZF" type="12" />
<f name="HZZFZF" type="12" />
<f name="JFRQ" type="93" />
<f name="CJR" type="12" />
<f name="CJRQ" type="93" />
<f name="JGID" type="12" />
<f name="FYDL" type="12" />
<f name="FYZL" type="12" />
<f name="EXEPKEY" type="12" />
<f name="ISHC" type="12" />
<f name="HCDJPKEY" type="12" />
<f name="JSZT" type="12" />
<f name="ZYZFL" type="12" />
<f name="BM" type="12" />
<f name="MC" type="12" />
<f name="ZXFLAG" type="12" />
<f name="YZDW" type="12" />
<f name="GG" type="12" />
<f name="YZMC" type="12" />
<f name="ZXDW" type="12" />
<f name="LOCKFLAG" type="-5" />
<f name="HZPKEY" type="12" />
<f name="JZPKEY" type="12" />
<f name="XZSYFW" type="12" />
<f name="ZYNO" type="12" />
<f name="MZNO" type="12" />
<f name="XM" type="12" />
<f name="XB" type="12" />
<f name="JZNL" type="12" />
<f name="SFZH" type="12" />
<f name="JJRQ" type="93" />
<f name="CYRQ" type="93" />
<f name="JJKS" type="12" />
<f name="JJYS" type="12" />
<f name="YZXZYS" type="12" />
<f name="JZLX" type="12" />
</fields>
<parameter>
<p>12</p>
<p>12</p>
</parameter>
</dao>
</datasource>