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.
6143 lines
303 KiB
6143 lines
303 KiB
<?xml version="1.0" encoding="UTF-8"?>
|
|
<datasource>
|
|
<dao id="yffySetupParamTypeDao" log="true" type="1" cache="true" memo="药房发药基础配置参数类型">
|
|
<sql>select PKEY,MC,MS,TYPE,KJTYPE,CJR,CJRQ,XGR,XGRQ,XH,SZ,BM from HIS_YFFY_CSGL order by xh</sql>
|
|
<tables>
|
|
<table name="HIS_YFFY_CSGL" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_YFFY_CSGL" />
|
|
<f name="MC" type="12" table="HIS_YFFY_CSGL" />
|
|
<f name="MS" type="12" table="HIS_YFFY_CSGL" />
|
|
<f name="TYPE" type="12" table="HIS_YFFY_CSGL" />
|
|
<f name="KJTYPE" type="12" table="HIS_YFFY_CSGL" />
|
|
<f name="CJR" type="12" table="HIS_YFFY_CSGL" />
|
|
<f name="CJRQ" type="93" table="HIS_YFFY_CSGL" />
|
|
<f name="XGR" type="12" table="HIS_YFFY_CSGL" />
|
|
<f name="XGRQ" type="93" table="HIS_YFFY_CSGL" />
|
|
<f name="XH" type="8" table="HIS_YFFY_CSGL" />
|
|
<f name="SZ" type="12" table="HIS_YFFY_CSGL" />
|
|
<f name="BM" type="12" table="HIS_YFFY_CSGL" />
|
|
</fields>
|
|
</dao>
|
|
<dao id="yffySetupParamDao" log="true" cache="true" type="1" memo="药房发药医疗机构配置参数类型">
|
|
<sql>select A.PKEY,A.VALUE,A.CJR,A.CJRQ,A.XGR,A.XGRQ,A.JGID,B.MC,B.MS,B.TYPE,B.KJTYPE,B.XH,B.SZ,B.BM from HIS_YFFY_CSZ A left join HIS_YFFY_CSGL B ON A.PKEY=B.PKEY WHERE A.JGID=? ORDER BY B.XH</sql>
|
|
<tables>
|
|
<table name="HIS_YFFY_CSGL" insert="false" update="false" delete="false">
|
|
<primary>PKEY</primary>
|
|
<primary>BM</primary>
|
|
</table>
|
|
<table name="HIS_YFFY_CSZ" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_YFFY_CSZ" />
|
|
<f name="VALUE" type="12" table="HIS_YFFY_CSZ" />
|
|
<f name="CJR" type="12" table="HIS_YFFY_CSZ" />
|
|
<f name="CJRQ" type="93" table="HIS_YFFY_CSZ" />
|
|
<f name="XGR" type="12" table="HIS_YFFY_CSZ" />
|
|
<f name="XGRQ" type="93" table="HIS_YFFY_CSZ" />
|
|
<f name="JGID" type="12" table="HIS_YFFY_CSZ" />
|
|
<f name="MC" type="12" table="HIS_YFFY_CSGL" />
|
|
<f name="MS" type="12" table="HIS_YFFY_CSGL" />
|
|
<f name="TYPE" type="12" table="HIS_YFFY_CSGL" />
|
|
<f name="KJTYPE" type="12" table="HIS_YFFY_CSGL" />
|
|
<f name="XH" type="8" table="HIS_YFFY_CSGL" />
|
|
<f name="SZ" type="12" table="HIS_YFFY_CSGL" />
|
|
<f name="BM" type="12" table="HIS_YFFY_CSGL" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
<dao id="kcglFyksPopDao" cache="true" type="1" memo="库存管理发药科室dao,包含了标准的药房和药库,以及住院的基数药科室,专门用于库存管理">
|
|
<sql>
|
|
|
|
|
|
select * from
|
|
|
|
(select DPTID,DPTCODE,DPTNAME,DPTZJM,JGID from MAIN_KS where JGID=? and (DPTTYPE = 4 or DPTTYPE = 5) and DPTFLAG=1
|
|
|
|
union
|
|
|
|
|
|
select b.DPTID,b.DPTCODE,b.DPTNAME,b.DPTZJM,b.JGID from HIS_YFFY_ZYFYKS_SETUP a left join MAIN_KS b on a.kskey=b.DPTID and a.JGID=b.JGID where a.JGID=?
|
|
|
|
) order by DPTCODE
|
|
|
|
|
|
|
|
</sql>
|
|
<tables>
|
|
<table delete="true" insert="true" name="MAIN_KS" update="true">
|
|
<primary>DPTID</primary>
|
|
<primary>DPTCODE</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="DPTID" table="MAIN_KS" type="12" />
|
|
<f name="DPTCODE" table="MAIN_KS" type="12" />
|
|
<f name="DPTNAME" table="MAIN_KS" type="12" />
|
|
<f name="DPTZJM" table="MAIN_KS" type="12" />
|
|
<f name="JGID" table="MAIN_KS" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
<dao id="kcglAllKsPopDao" cache="true" type="1" memo="库存管理 所有科室含药房药库">
|
|
<sql>
|
|
select
|
|
DPTID
|
|
,DPTCODE
|
|
,DPTNAME
|
|
,DPTZJM
|
|
,JGID
|
|
from MAIN_KS
|
|
where JGID=?
|
|
and DPTFLAG=1
|
|
order by DPTTYPE,DPTNAME
|
|
</sql>
|
|
<tables>
|
|
<table name="MAIN_KS" delete="false" insert="false" update="false">
|
|
<primary>DPTID</primary>
|
|
<primary>DPTCODE</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="DPTID" table="MAIN_KS" type="12" />
|
|
<f name="DPTCODE" table="MAIN_KS" type="12" />
|
|
<f name="DPTNAME" table="MAIN_KS" type="12" />
|
|
<f name="DPTZJM" table="MAIN_KS" type="12" />
|
|
<f name="JGID" table="MAIN_KS" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
<dao id="kcglNoYfYkPopDao" cache="true" type="1" memo="库存管理 非药房药库">
|
|
<sql>
|
|
select
|
|
DPTID
|
|
,DPTCODE
|
|
,DPTNAME
|
|
,DPTZJM
|
|
,JGID
|
|
from MAIN_KS
|
|
where JGID=?
|
|
and DPTTYPE not in ('4','5') --非药房药库
|
|
and DPTFLAG=1
|
|
order by DPTTYPE,DPTNAME
|
|
</sql>
|
|
<tables>
|
|
<table name="MAIN_KS" delete="false" insert="false" update="false">
|
|
<primary>DPTID</primary>
|
|
<primary>DPTCODE</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="DPTID" table="MAIN_KS" type="12" />
|
|
<f name="DPTCODE" table="MAIN_KS" type="12" />
|
|
<f name="DPTNAME" table="MAIN_KS" type="12" />
|
|
<f name="DPTZJM" table="MAIN_KS" type="12" />
|
|
<f name="JGID" table="MAIN_KS" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
<dao id="kcglYfPopDao" cache="true" type="1" memo="库存管理 药房">
|
|
<sql>
|
|
select
|
|
DPTID
|
|
,DPTCODE
|
|
,DPTNAME
|
|
,DPTZJM
|
|
,JGID
|
|
from MAIN_KS
|
|
where JGID=?
|
|
and DPTTYPE = 4 --药房
|
|
and DPTFLAG=1
|
|
order by DPTTYPE,DPTNAME
|
|
</sql>
|
|
<tables>
|
|
<table name="MAIN_KS" delete="false" insert="false" update="false">
|
|
<primary>DPTID</primary>
|
|
<primary>DPTCODE</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="DPTID" table="MAIN_KS" type="12" />
|
|
<f name="DPTCODE" table="MAIN_KS" type="12" />
|
|
<f name="DPTNAME" table="MAIN_KS" type="12" />
|
|
<f name="DPTZJM" table="MAIN_KS" type="12" />
|
|
<f name="JGID" table="MAIN_KS" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
<dao id="kcglYkPopDao" cache="true" type="1" memo="库存管理 药库">
|
|
<sql>
|
|
select
|
|
DPTID
|
|
,DPTCODE
|
|
,DPTNAME
|
|
,DPTZJM
|
|
,JGID
|
|
from MAIN_KS
|
|
where JGID=?
|
|
and DPTTYPE = 5 --药库
|
|
and DPTFLAG=1
|
|
order by DPTTYPE,DPTNAME
|
|
</sql>
|
|
<tables>
|
|
<table name="MAIN_KS" delete="false" insert="false" update="false">
|
|
<primary>DPTID</primary>
|
|
<primary>DPTCODE</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="DPTID" table="MAIN_KS" type="12" />
|
|
<f name="DPTCODE" table="MAIN_KS" type="12" />
|
|
<f name="DPTNAME" table="MAIN_KS" type="12" />
|
|
<f name="DPTZJM" table="MAIN_KS" type="12" />
|
|
<f name="JGID" table="MAIN_KS" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
<dao id="kcglYfYkPopDao" cache="true" type="1" memo="库存管理 药房药库">
|
|
<sql>
|
|
select
|
|
DPTID
|
|
,DPTCODE
|
|
,DPTNAME
|
|
,DPTZJM
|
|
,JGID
|
|
from MAIN_KS
|
|
where JGID=?
|
|
and DPTTYPE in ('4','5') --药房药库
|
|
and DPTFLAG=1
|
|
order by DPTTYPE,DPTNAME
|
|
</sql>
|
|
<tables>
|
|
<table name="MAIN_KS" delete="false" insert="false" update="false">
|
|
<primary>DPTID</primary>
|
|
<primary>DPTCODE</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="DPTID" table="MAIN_KS" type="12" />
|
|
<f name="DPTCODE" table="MAIN_KS" type="12" />
|
|
<f name="DPTNAME" table="MAIN_KS" type="12" />
|
|
<f name="DPTZJM" table="MAIN_KS" type="12" />
|
|
<f name="JGID" table="MAIN_KS" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
<dao id="yfpopDao" cache="true" type="1" memo="药房popDao">
|
|
<sql>
|
|
|
|
|
|
select DPTID,DPTCODE,DPTNAME,DPTRMARK,DPTADDR,DPTLAYER,DPTTYPE,DPTGPID,DPTSEX,DPTZJM,DPTBAGE,DPTEAGE,DPTTXMJC,DPTYBCODE,CJR,CJRQ,XGR,XGRQ,JGID,DPTFLAG from MAIN_KS where JGID=? and DPTTYPE = 4 and DPTFLAG=1 and (DPTZJM like ? or DPTNAME like ?) order by DPTCODE
|
|
|
|
|
|
</sql>
|
|
<tables>
|
|
<table delete="true" insert="true" name="MAIN_KS" update="true">
|
|
<primary>DPTID</primary>
|
|
<primary>DPTCODE</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="DPTID" table="MAIN_KS" type="12" />
|
|
<f name="DPTCODE" table="MAIN_KS" type="12" />
|
|
<f name="DPTNAME" table="MAIN_KS" type="12" />
|
|
<f name="DPTRMARK" table="MAIN_KS" type="12" />
|
|
<f name="DPTADDR" table="MAIN_KS" type="12" />
|
|
<f name="DPTLAYER" table="MAIN_KS" type="12" />
|
|
<f name="DPTTYPE" table="MAIN_KS" type="12" />
|
|
<f name="DPTGPID" table="MAIN_KS" type="12" />
|
|
<f name="DPTSEX" table="MAIN_KS" type="12" />
|
|
<f name="DPTZJM" table="MAIN_KS" type="12" />
|
|
<f name="DPTBAGE" table="MAIN_KS" type="12" />
|
|
<f name="DPTEAGE" table="MAIN_KS" type="12" />
|
|
<f name="DPTTXMJC" table="MAIN_KS" type="12" />
|
|
<f name="DPTYBCODE" table="MAIN_KS" type="12" />
|
|
<f name="CJR" table="MAIN_KS" type="12" />
|
|
<f name="CJRQ" table="MAIN_KS" type="93" />
|
|
<f name="XGR" table="MAIN_KS" type="12" />
|
|
<f name="XGRQ" table="MAIN_KS" type="93" />
|
|
<f name="JGID" table="MAIN_KS" type="12" />
|
|
<f name="DPTFLAG" table="MAIN_KS" type="-5" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
|
|
<dao id="mzfyyfsetupDao" log="true" type="1" memo="门诊发药科室参数设置">
|
|
<sql>select PKEY,KSKEY,QYSF,CFSH,TQBY,PYQR,ZDDYPYD,PY,KKSTY,CJR,CJRQ,XGR,XGRQ,JGID,ZCY from HIS_YFFY_MZFYKS_SETUP where JGID=? order by pkey</sql>
|
|
<tables>
|
|
<table name="HIS_YFFY_MZFYKS_SETUP" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>KSKEY</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_YFFY_MZFYKS_SETUP" />
|
|
<f name="KSKEY" type="12" table="HIS_YFFY_MZFYKS_SETUP" />
|
|
<f name="QYSF" type="12" table="HIS_YFFY_MZFYKS_SETUP" />
|
|
<f name="CFSH" type="12" table="HIS_YFFY_MZFYKS_SETUP" />
|
|
<f name="TQBY" type="12" table="HIS_YFFY_MZFYKS_SETUP" />
|
|
<f name="PYQR" type="12" table="HIS_YFFY_MZFYKS_SETUP" />
|
|
<f name="ZDDYPYD" type="12" table="HIS_YFFY_MZFYKS_SETUP" />
|
|
<f name="PY" type="12" table="HIS_YFFY_MZFYKS_SETUP" />
|
|
<f name="KKSTY" type="12" table="HIS_YFFY_MZFYKS_SETUP" />
|
|
<f name="CJR" type="12" table="HIS_YFFY_MZFYKS_SETUP" />
|
|
<f name="CJRQ" type="93" table="HIS_YFFY_MZFYKS_SETUP" />
|
|
<f name="XGR" type="12" table="HIS_YFFY_MZFYKS_SETUP" />
|
|
<f name="XGRQ" type="93" table="HIS_YFFY_MZFYKS_SETUP" />
|
|
<f name="JGID" type="12" table="HIS_YFFY_MZFYKS_SETUP" />
|
|
<f name="ZCY" type="12" table="HIS_YFFY_MZFYKS_SETUP" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
|
|
<dao id="yffyckDao" log="true" type="1">
|
|
<sql>select PKEY,YFPKEY,CKMC,CKLX,SFMR,SFYX,CJR,CJRQ,XGR,XGRQ,JGID from HIS_YFFY_YFFYCK where JGID=? order by YFPKEY</sql>
|
|
<tables>
|
|
<table name="HIS_YFFY_YFFYCK" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>YFPKEY</primary>
|
|
<primary>SFMR</primary>
|
|
<primary>SFYX</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_YFFY_YFFYCK" />
|
|
<f name="YFPKEY" type="12" table="HIS_YFFY_YFFYCK" />
|
|
<f name="CKMC" type="12" table="HIS_YFFY_YFFYCK" />
|
|
<f name="CKLX" type="12" table="HIS_YFFY_YFFYCK" />
|
|
<f name="SFMR" type="12" table="HIS_YFFY_YFFYCK" />
|
|
<f name="SFYX" type="12" table="HIS_YFFY_YFFYCK" />
|
|
<f name="CJR" type="12" table="HIS_YFFY_YFFYCK" />
|
|
<f name="CJRQ" type="93" table="HIS_YFFY_YFFYCK" />
|
|
<f name="XGR" type="12" table="HIS_YFFY_YFFYCK" />
|
|
<f name="XGRQ" type="93" table="HIS_YFFY_YFFYCK" />
|
|
<f name="JGID" type="12" table="HIS_YFFY_YFFYCK" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
|
|
<dao id="yfckglksDao" log="true" type="1">
|
|
<sql>select PKEY,YFCKPKEY,KSPKEY,CJR,CJRQ,XGR,XGRQ,JGID from HIS_YFFY_YFFYCK_GLKS where JGID=? and YFCKPKEY=? order by KSPKEY </sql>
|
|
<tables>
|
|
<table name="HIS_YFFY_YFFYCK_GLKS" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>YFCKPKEY</primary>
|
|
<primary>KSPKEY</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_YFFY_YFFYCK_GLKS" />
|
|
<f name="YFCKPKEY" type="12" table="HIS_YFFY_YFFYCK_GLKS" />
|
|
<f name="KSPKEY" type="12" table="HIS_YFFY_YFFYCK_GLKS" />
|
|
<f name="CJR" type="12" table="HIS_YFFY_YFFYCK_GLKS" />
|
|
<f name="CJRQ" type="93" table="HIS_YFFY_YFFYCK_GLKS" />
|
|
<f name="XGR" type="12" table="HIS_YFFY_YFFYCK_GLKS" />
|
|
<f name="XGRQ" type="93" table="HIS_YFFY_YFFYCK_GLKS" />
|
|
<f name="JGID" type="12" table="HIS_YFFY_YFFYCK_GLKS" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="yfdic" cache="true" type="1" memo="药房字典">
|
|
<sql>select DPTID,DPTCODE,DPTNAME,DPTRMARK,DPTADDR,DPTLAYER,DPTTYPE,DPTGPID,DPTSEX,DPTZJM,DPTBAGE,DPTEAGE,DPTTXMJC,DPTYBCODE,CJR,CJRQ,XGR,XGRQ,JGID,DPTFLAG from MAIN_KS where JGID=? and DPTTYPE = 4 and DPTFLAG=1 order by DPTCODE</sql>
|
|
<tables>
|
|
<table delete="true" insert="true" name="MAIN_KS" update="true">
|
|
<primary>DPTID</primary>
|
|
<primary>DPTCODE</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="DPTID" table="MAIN_KS" type="12"/>
|
|
<f name="DPTCODE" table="MAIN_KS" type="12"/>
|
|
<f name="DPTNAME" table="MAIN_KS" type="12"/>
|
|
<f name="DPTRMARK" table="MAIN_KS" type="12"/>
|
|
<f name="DPTADDR" table="MAIN_KS" type="12"/>
|
|
<f name="DPTLAYER" table="MAIN_KS" type="12"/>
|
|
<f name="DPTTYPE" table="MAIN_KS" type="12"/>
|
|
<f name="DPTGPID" table="MAIN_KS" type="12"/>
|
|
<f name="DPTSEX" table="MAIN_KS" type="12"/>
|
|
<f name="DPTZJM" table="MAIN_KS" type="12"/>
|
|
<f name="DPTBAGE" table="MAIN_KS" type="12"/>
|
|
<f name="DPTEAGE" table="MAIN_KS" type="12"/>
|
|
<f name="DPTTXMJC" table="MAIN_KS" type="12"/>
|
|
<f name="DPTYBCODE" table="MAIN_KS" type="12"/>
|
|
<f name="CJR" table="MAIN_KS" type="12"/>
|
|
<f name="CJRQ" table="MAIN_KS" type="93"/>
|
|
<f name="XGR" table="MAIN_KS" type="12"/>
|
|
<f name="XGRQ" table="MAIN_KS" type="93"/>
|
|
<f name="JGID" table="MAIN_KS" type="12"/>
|
|
<f name="DPTFLAG" table="MAIN_KS" type="-5"/>
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="mzyfbyckDao" log="true" type="1" memo="门诊药房配药窗口">
|
|
<sql>select PKEY,YFPKEY,CKMC,YKS,CJR,CJRQ,XGR,XGRQ,JGID from HIS_YFFY_YFBYCK where JGID=? order by pkey</sql>
|
|
<tables>
|
|
<table name="HIS_YFFY_YFBYCK" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>YFPKEY</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_YFFY_YFBYCK" />
|
|
<f name="YFPKEY" type="12" table="HIS_YFFY_YFBYCK" />
|
|
<f name="CKMC" type="12" table="HIS_YFFY_YFBYCK" />
|
|
<f name="YKS" type="8" table="HIS_YFFY_YFBYCK" />
|
|
<f name="CJR" type="12" table="HIS_YFFY_YFBYCK" />
|
|
<f name="CJRQ" type="93" table="HIS_YFFY_YFBYCK" />
|
|
<f name="XGR" type="12" table="HIS_YFFY_YFBYCK" />
|
|
<f name="XGRQ" type="93" table="HIS_YFFY_YFBYCK" />
|
|
<f name="JGID" type="12" table="HIS_YFFY_YFBYCK" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
|
|
<dao id="mzfybyglDao" log="true" type="1" memo="门诊发药窗口与摆药窗口关联dao">
|
|
<sql>select PKEY,YFPKEY,FYCK,BYCK,CJR,CJRQ,XGR,XGRQ,JGID from HIS_YFFY_YFFYBYGL where JGID=? order by pkey</sql>
|
|
<tables>
|
|
<table name="HIS_YFFY_YFFYBYGL" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>YFPKEY</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
</tables>
|
|
//PKEY,YFPKEY,FYCK,BYCK,CJR,CJRQ,XGR,XGRQ,JGID
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_YFFY_YFFYBYGL" />
|
|
<f name="YFPKEY" type="12" table="HIS_YFFY_YFFYBYGL" />
|
|
<f name="FYCK" type="12" table="HIS_YFFY_YFFYBYGL" />
|
|
<f name="BYCK" type="12" table="HIS_YFFY_YFFYBYGL" />
|
|
<f name="CJR" type="12" table="HIS_YFFY_YFFYBYGL" />
|
|
<f name="CJRQ" type="93" table="HIS_YFFY_YFFYBYGL" />
|
|
<f name="XGR" type="12" table="HIS_YFFY_YFFYBYGL" />
|
|
<f name="XGRQ" type="93" table="HIS_YFFY_YFFYBYGL" />
|
|
<f name="JGID" type="12" table="HIS_YFFY_YFFYBYGL" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
<dao id="yffyckByYfDao" log="true" type="1">
|
|
<sql>select PKEY,YFPKEY,CKMC,CKLX,SFMR,SFYX,CJR,CJRQ,XGR,XGRQ,JGID from HIS_YFFY_YFFYCK where JGID=? and YFPKEY=? order by YFPKEY</sql>
|
|
<tables>
|
|
<table name="HIS_YFFY_YFFYCK" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>YFPKEY</primary>
|
|
<primary>SFMR</primary>
|
|
<primary>SFYX</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_YFFY_YFFYCK" />
|
|
<f name="YFPKEY" type="12" table="HIS_YFFY_YFFYCK" />
|
|
<f name="CKMC" type="12" table="HIS_YFFY_YFFYCK" />
|
|
<f name="CKLX" type="12" table="HIS_YFFY_YFFYCK" />
|
|
<f name="SFMR" type="12" table="HIS_YFFY_YFFYCK" />
|
|
<f name="SFYX" type="12" table="HIS_YFFY_YFFYCK" />
|
|
<f name="CJR" type="12" table="HIS_YFFY_YFFYCK" />
|
|
<f name="CJRQ" type="93" table="HIS_YFFY_YFFYCK" />
|
|
<f name="XGR" type="12" table="HIS_YFFY_YFFYCK" />
|
|
<f name="XGRQ" type="93" table="HIS_YFFY_YFFYCK" />
|
|
<f name="JGID" type="12" table="HIS_YFFY_YFFYCK" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="mzyfbyckByYfDao" log="true" type="1" memo="门诊药房配药窗口">
|
|
<sql>select PKEY,YFPKEY,CKMC,YKS,CJR,CJRQ,XGR,XGRQ,JGID from HIS_YFFY_YFBYCK where JGID=? and YFPKEY=? order by pkey</sql>
|
|
<tables>
|
|
<table name="HIS_YFFY_YFBYCK" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>YFPKEY</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_YFFY_YFBYCK" />
|
|
<f name="YFPKEY" type="12" table="HIS_YFFY_YFBYCK" />
|
|
<f name="CKMC" type="12" table="HIS_YFFY_YFBYCK" />
|
|
<f name="YKS" type="8" table="HIS_YFFY_YFBYCK" />
|
|
<f name="CJR" type="12" table="HIS_YFFY_YFBYCK" />
|
|
<f name="CJRQ" type="93" table="HIS_YFFY_YFBYCK" />
|
|
<f name="XGR" type="12" table="HIS_YFFY_YFBYCK" />
|
|
<f name="XGRQ" type="93" table="HIS_YFFY_YFBYCK" />
|
|
<f name="JGID" type="12" table="HIS_YFFY_YFBYCK" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
<dao id="mzfyUserQxDao" log="true" type="1">
|
|
<sql> select a.YFPKEY,a.RYPKEY,a.SH,a.PY,a.FY,a.YX,a.CJR,a.CJRQ,a.XGR,a.XGRQ,a.JGID,b.NAME,b.USERACCOUNT from HIS_YFFY_YFRYQX a left join MAIN_YHXX b on a.RYPKEY=b.USERACCOUNT where a.JGID=? and a.YFPKEY=? order by a.RYPKEY</sql>
|
|
<tables>
|
|
<table name="HIS_YFFY_YFRYQX " insert="true" update="true" delete="true">
|
|
<primary>YFPKEY</primary>
|
|
<primary>RYPKEY</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
</tables>
|
|
//YFPKEY,RYPKEY,SH,PY,FY,YX,CJR,CJRQ,XGR,XGRQ,JGID
|
|
<fields>
|
|
<f name="YFPKEY" type="12" table="HIS_YFFY_YFRYQX " />
|
|
<f name="RYPKEY" type="12" table="HIS_YFFY_YFRYQX " />
|
|
<f name="SH" type="12" table="HIS_YFFY_YFRYQX " />
|
|
<f name="PY" type="12" table="HIS_YFFY_YFRYQX " />
|
|
<f name="FY" type="12" table="HIS_YFFY_YFRYQX " />
|
|
<f name="YX" type="12" table="HIS_YFFY_YFRYQX " />
|
|
<f name="CJR" type="12" table="HIS_YFFY_YFRYQX " />
|
|
<f name="CJRQ" type="93" table="HIS_YFFY_YFRYQX " />
|
|
<f name="XGR" type="12" table="HIS_YFFY_YFRYQX " />
|
|
<f name="XGRQ" type="93" table="HIS_YFFY_YFRYQX " />
|
|
<f name="JGID" type="12" table="HIS_YFFY_YFRYQX " />
|
|
<f name="NAME" type="12" />
|
|
<f name="USERACCOUNT" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
|
|
<dao id="mzfyZxdDao" log="true" type="1" memo="门诊发药打印标签关联的执行单">
|
|
<sql>select YFPKEY,ZXDPKEY,CJR,CJRQ,XGR,XGRQ,JGID from HIS_YFFY_ZXDPRINT where JGID=? order by yfpkey,zxdpkey </sql>
|
|
<tables>
|
|
<table name="HIS_YFFY_ZXDPRINT" insert="true" update="true" delete="true">
|
|
<primary>YFPKEY</primary>
|
|
<primary>ZXDPKEY</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="YFPKEY" type="12" table="HIS_YFFY_ZXDPRINT" />
|
|
<f name="ZXDPKEY" type="12" table="HIS_YFFY_ZXDPRINT" />
|
|
<f name="CJR" type="12" table="HIS_YFFY_ZXDPRINT" />
|
|
<f name="CJRQ" type="93" table="HIS_YFFY_ZXDPRINT" />
|
|
<f name="XGR" type="12" table="HIS_YFFY_ZXDPRINT" />
|
|
<f name="XGRQ" type="93" table="HIS_YFFY_ZXDPRINT" />
|
|
<f name="JGID" type="12" table="HIS_YFFY_ZXDPRINT" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
|
|
<dao id="mzdfyzbnewdao" log="true" type="1" memo="门诊待发药主表">
|
|
<sql>select PKEY,HZPKEY,JZPKEY,MZFPPKEY,ZDZBPKEY,FYCK,FYYF,FYZT,SFDY,SFTY,CFH,PYZT,SHZT,CJR,CJRQ,XGR,XGRQ,JGID,PYR,PYRQ,SHR,SHRQ,FYR,FYRQ,LOCKFLAG from HIS_YFFY_MZDFYZB where 1=2</sql>
|
|
<tables>
|
|
<table name="HIS_YFFY_MZDFYZB" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="HZPKEY" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="JZPKEY" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="MZFPPKEY" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="ZDZBPKEY" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="FYCK" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="FYYF" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="FYZT" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="SFDY" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="SFTY" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="CFH" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="PYZT" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="SHZT" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="CJR" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="CJRQ" type="93" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="XGR" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="XGRQ" type="93" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="JGID" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="PYR" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="PYRQ" type="93" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="SHR" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="SHRQ" type="93" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="FYR" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="FYRQ" type="93" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_YFFY_MZDFYZB" />
|
|
</fields>
|
|
</dao>
|
|
|
|
|
|
|
|
<dao id="fypybnewDao" log="true" type="1" memo="门诊,住院待发药配药表">
|
|
<sql>select PKEY,YZX,YZMX,YZDJ,YZSL,DFYPKEY,FYMXPKEY,HZBQ,HZKS,FYKS,HZPKEY,YPFL,JZPKEY,TYPE,CJR,CJRQ,XGR,XGRQ,JGID,YZDL,TYSL,SFSL,SFLYSH,SFYSSH,LYSHR,LYSHRQ,YSSHR,YSSHRQ,FYZT,FYCX,PYLX,JSYBH,LOCKFLAG,YPFYSJMS,DFYZJE from HIS_YFFY_PYB where 1=2</sql>
|
|
<tables>
|
|
<table name="HIS_YFFY_PYB" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="YZX" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="YZMX" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="YZDJ" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="YZSL" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="DFYPKEY" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="FYMXPKEY" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="HZBQ" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="HZKS" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="FYKS" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="HZPKEY" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="YPFL" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="JZPKEY" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="TYPE" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="CJR" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="CJRQ" type="93" table="HIS_YFFY_PYB" />
|
|
<f name="XGR" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="XGRQ" type="93" table="HIS_YFFY_PYB" />
|
|
<f name="JGID" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="YZDL" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="TYSL" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="SFSL" 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="FYCX" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="PYLX" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="JSYBH" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_YFFY_PYB" />
|
|
<f name="YPFYSJMS" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="DFYZJE" type="12" table="HIS_YFFY_PYB" />
|
|
</fields>
|
|
</dao>
|
|
|
|
|
|
|
|
|
|
<dao id="mzfyDfyRylbDao" log="true" type="1" memo="门诊发药的待发药人员列表">
|
|
<sql><![CDATA[
|
|
|
|
select distinct JZNO,XM,JZKH,JJKS,JZPKEY,HZPKEY from (select c.jzno,b.xm,c.JZKH,a.CJRQ,c.JJKS,a.JZPKEY,a.hzpkey from HIS_YFFY_MZDFYZB a left join HIS_HZINFO b on a.hzpkey=b.pkey left join HIS_JZ_BASEINFO c on a.jzpkey=c.pkey left join HIS_MZJS_MZFPZB d on a.MZFPPKEY=d.pkey and a.JGID=d.JGID where a.FYZT=? and a.JGID=? and a.FYYF=? and d.SFZT=1 and a.CJRQ >=? and a.CJRQ <=? order by c.ISJZ desc,a.CJRQ)
|
|
|
|
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="JZNO" type="12" />
|
|
<f name="XM" type="12" />
|
|
<f name="JZKH" type="12" />
|
|
<!-- <f name="CJRQ" type="93" />-->
|
|
<f name="JJKS" type="12" />
|
|
<f name="JZPKEY" type="12" />
|
|
<f name="HZPKEY" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
|
|
<dao id="kskcDJDao" log="true" type="1" memo="科室库存冻结及解冻操作dao">
|
|
<sql>select PKEY,JGID,SFX_BM,DPTID,SL,KYSL,DJSL,HWM_BM,KCXX,KCSX,BZKC,BCKCFS,LOCKFLAG from HIS_KSKC where JGID=? and SFX_BM= ? and DPTID=? </sql>
|
|
<tables>
|
|
<table name="HIS_KSKC" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>JGID</primary>
|
|
<primary>SFX_BM</primary>
|
|
<primary>DPTID</primary>
|
|
<primary>SL</primary>
|
|
<primary>KYSL</primary>
|
|
<primary>DJSL</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_KSKC" />
|
|
<f name="JGID" type="12" table="HIS_KSKC" />
|
|
<f name="SFX_BM" type="12" table="HIS_KSKC" />
|
|
<f name="DPTID" type="12" table="HIS_KSKC" />
|
|
<f name="SL" type="8" table="HIS_KSKC" />
|
|
<f name="KYSL" type="8" table="HIS_KSKC" />
|
|
<f name="DJSL" type="8" table="HIS_KSKC" />
|
|
<f name="HWM_BM" type="12" table="HIS_KSKC" />
|
|
<f name="KCXX" type="8" table="HIS_KSKC" />
|
|
<f name="KCSX" type="8" table="HIS_KSKC" />
|
|
<f name="BZKC" type="8" table="HIS_KSKC" />
|
|
<f name="BCKCFS" type="12" table="HIS_KSKC" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_KSKC" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
|
|
<dao id="mzfyDfyLbDao" log="true" type="1" memo="门诊发药待发药列表dao">
|
|
<sql>
|
|
select c2.NAME,
|
|
b.xm,
|
|
c.JZKH,
|
|
a.PKEY,
|
|
a.CJRQ,
|
|
c.JJKS,
|
|
a.cfh,
|
|
a.FYCK,
|
|
a.FYYF,
|
|
a.FYZT,
|
|
a.SFDY,
|
|
a.SFTY,
|
|
a.PYZT,
|
|
a.SHZT,
|
|
b.XB,
|
|
c.JZNL,
|
|
c.ISJZ,
|
|
a.JGID,
|
|
a.HZPKEY,
|
|
a.JZPKEY,
|
|
a.MZFPPKEY,
|
|
a.ZDZBPKEY,
|
|
a.PYR,
|
|
a.PYRQ,
|
|
a.SHR,
|
|
a.SHRQ,
|
|
a.LOCKFLAG
|
|
from HIS_YFFY_MZDFYZB a
|
|
left join HIS_HZINFO b on a.hzpkey = b.pkey
|
|
left join HIS_JZ_BASEINFO c on a.jzpkey = c.pkey
|
|
left join HIS_MZJS_MZFPZB d on a.MZFPPKEY = d.pkey and a.JGID = d.JGID
|
|
left join MAIN_YHXX c2 on c.JJYS = c2.USERACCOUNT
|
|
where a.JGID = ?
|
|
and a.JZPKEY = ?
|
|
and a.FYYF = ?
|
|
and d.SFZT = 1
|
|
and a.FYZT = 0
|
|
order by c.ISJZ desc, a.cfh
|
|
</sql>
|
|
<tables>
|
|
<table name="HIS_YFFY_MZDFYZB" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="NAME" type="12" />
|
|
<f name="XM" type="12" />
|
|
<f name="JZKH" type="12" />
|
|
<f name="PKEY" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="CJRQ" type="93" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="JJKS" type="12" />
|
|
<f name="CFH" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="FYCK" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="FYYF" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="FYZT" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="SFDY" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="SFTY" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="PYZT" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="SHZT" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="XB" type="12" />
|
|
<f name="JZNL" type="12" />
|
|
<f name="ISJZ" type="12" />
|
|
<f name="JGID" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="HZPKEY" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="JZPKEY" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="MZFPPKEY" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="ZDZBPKEY" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="PYR" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="PYRQ" type="93" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="SHR" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="SHRQ" type="93" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_YFFY_MZDFYZB" />
|
|
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
|
|
<dao id="mzfyDfyMxLbDao" log="true" type="1" memo="待发药明细列表">
|
|
<sql>
|
|
|
|
select a.PKEY,a.YZX,a.YZMX,a.YZDJ,a.YZSL,a.DFYPKEY,a.FYMXPKEY,a.HZBQ,a.HZKS,a.FYKS,a.HZPKEY,a.YPFL,a.JZPKEY,a.TYPE,a.CJR,a.CJRQ,a.XGR,a.XGRQ,a.JGID,a.YZDL,b.YZMC,b.YZDW,b.YZJL,b.YZJLDW,b.YZPC,b.YZLC,b.YZJE,b.YZBZ,b.YZXZYS,b.YZXZKS,b.YZDJSL,c.GG,c.CSXX,b.PKEY YZPKEY,b.YZYF,c.JBDW,b.YZJZZHXS,b.YPYZJBJG,a.TYSL,a.SFSL,a.FYZT,a.LOCKFLAG,c.ybbm,c.ybmc,a.YPFYSJMS,b.YPYZBZJG,b.YPYZBZDW,b.YPYZJBDW,b.YPYZZHXS,a.DFYZJE,b.SFQYSHCF,b.SHCFZT,a.ZSMCJ,e.pkey execpkey,b.YZXPKEY from HIS_YFFY_PYB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_YPXX c on a.YZX=c.BM left join HIS_YZ_EXEC e on a.DFYPKEY=e.pkey and a.JGID=e.JGID where a.JGID=? and a.DFYPKEY=? order by a.pkey
|
|
|
|
|
|
|
|
|
|
</sql>
|
|
<tables>
|
|
<table name="HIS_YZ_MXB" insert="true" update="true" delete="true">
|
|
<primary>YZPKEY</primary>
|
|
<primary>YZDJSL</primary>
|
|
<primary>HZPKEY</primary>
|
|
<primary>JZPKEY</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
<table name="HIS_YFFY_PYB" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>YZX</primary>
|
|
<primary>YZMX</primary>
|
|
<primary>JGID</primary>
|
|
<primary>HZPKEY</primary>
|
|
<primary>JZPKEY</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="YZX" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="YZMX" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="YZDJ" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="YZSL" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="DFYPKEY" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="FYMXPKEY" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="HZBQ" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="HZKS" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="FYKS" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="HZPKEY" type="12" table="HIS_YZ_MXB,HIS_YFFY_PYB" />
|
|
<f name="YPFL" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="JZPKEY" type="12" table="HIS_YZ_MXB,HIS_YFFY_PYB" />
|
|
<f name="TYPE" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="CJR" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="CJRQ" type="93" table="HIS_YFFY_PYB" />
|
|
<f name="XGR" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="XGRQ" type="93" table="HIS_YFFY_PYB" />
|
|
<f name="JGID" type="12" table="HIS_YZ_MXB,HIS_YFFY_PYB" />
|
|
<f name="YZDL" type="12" table="HIS_YFFY_PYB" />
|
|
<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" table="HIS_YZ_MXB" />
|
|
<f name="GG" type="12" />
|
|
<f name="CSXX" type="12" />
|
|
<f name="YZPKEY" schemaname="PKEY" type="12" table="HIS_YZ_MXB" />
|
|
<f name="YZYF" type="12" table="HIS_YZ_MXB" />
|
|
<f name="JBDW" type="12" />
|
|
<f name="YZJZZHXS" type="12" table="HIS_YZ_MXB" />
|
|
<f name="YPYZJBJG" type="12" table="HIS_YZ_MXB" />
|
|
<f name="TYSL" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="SFSL" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="FYZT" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="LOCKFLAG" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="YBBM" type="12" />
|
|
<f name="YBMC" type="12" />
|
|
<f name="YPFYSJMS" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="YPYZBZJG" type="12" table="HIS_YZ_MXB" />
|
|
<f name="YPYZBZDW" type="12" table="HIS_YZ_MXB" />
|
|
<f name="YPYZJBDW" type="12" table="HIS_YZ_MXB" />
|
|
<f name="YPYZZHXS" type="12" table="HIS_YZ_MXB" />
|
|
<f name="DFYZJE" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="SFQYSHCF" type="12" table="HIS_YZ_MXB" />
|
|
<f name="SHCFZT" type="12" table="HIS_YZ_MXB" />
|
|
<f name="ZSMCJ" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="execpkey" type="12" />
|
|
<f name="YZXPKEY" type="12" table="HIS_YZ_MXB"/>
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="mzfyDfyLbByPkeyDao" log="true" type="1" memo="门诊发药待发药列表实际进行发药dao">
|
|
<sql>select b.xm,c.JZKH,a.PKEY,a.CJRQ,c.JJKS,a.cfh,a.FYCK,a.FYYF,a.FYZT,a.SFDY,a.SFTY,a.PYZT,a.SHZT,b.XB,c.JZNL,c.ISJZ,a.JGID,a.HZPKEY,a.JZPKEY,a.MZFPPKEY,a.ZDZBPKEY,a.PYR,a.PYRQ,a.SHR,a.SHRQ,a.FYR,a.FYRQ,a.LOCKFLAG from HIS_YFFY_MZDFYZB a left join HIS_HZINFO b on a.hzpkey=b.pkey left join HIS_JZ_BASEINFO c on a.jzpkey=c.pkey where a.JGID=? and a.PKEY=? </sql>
|
|
<tables>
|
|
<table name="HIS_YFFY_MZDFYZB" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="XM" type="12" />
|
|
<f name="JZKH" type="12" />
|
|
<f name="PKEY" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="CJRQ" type="93" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="JJKS" type="12" />
|
|
<f name="CFH" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="FYCK" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="FYYF" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="FYZT" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="SFDY" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="SFTY" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="PYZT" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="SHZT" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="XB" type="12" />
|
|
<f name="JZNL" type="12" />
|
|
<f name="ISJZ" type="12" />
|
|
<f name="JGID" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="HZPKEY" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="JZPKEY" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="MZFPPKEY" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="ZDZBPKEY" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="PYR" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="PYRQ" type="93" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="SHR" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="SHRQ" type="93" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="FYR" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="FYRQ" type="93" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_YFFY_MZDFYZB" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="yffyKskcKckjDao" log="true" type="1" memo="专门用于药房发药的科室库存扣减dao">
|
|
<sql>select PKEY,JGID,SFX_BM,DPTID,SL,KYSL,DJSL,HWM_BM,KCXX,KCSX,BZKC,BCKCFS,LOCKFLAG from HIS_KSKC where JGID=? and SFX_BM=? and DPTID=?</sql>
|
|
<tables>
|
|
<table name="HIS_KSKC" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>JGID</primary>
|
|
<primary>SFX_BM</primary>
|
|
<primary>SL</primary>
|
|
<primary>KYSL</primary>
|
|
<primary>DJSL</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_KSKC" />
|
|
<f name="JGID" type="12" table="HIS_KSKC" />
|
|
<f name="SFX_BM" type="12" table="HIS_KSKC" />
|
|
<f name="DPTID" type="12" table="HIS_KSKC" />
|
|
<f name="SL" type="8" table="HIS_KSKC" />
|
|
<f name="KYSL" type="8" table="HIS_KSKC" />
|
|
<f name="DJSL" type="8" table="HIS_KSKC" />
|
|
<f name="HWM_BM" type="12" table="HIS_KSKC" />
|
|
<f name="KCXX" type="8" table="HIS_KSKC" />
|
|
<f name="KCSX" type="8" table="HIS_KSKC" />
|
|
<f name="BZKC" type="8" table="HIS_KSKC" />
|
|
<f name="BCKCFS" type="12" table="HIS_KSKC" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_KSKC" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="yffykskcpcKckjDao" log="true" type="1" memo="专门用于药房发药的科室批次库存扣减(效期优先)dao">
|
|
<sql>select PKEY,JGID,KSKC_PKEY,PH,YXQ,SL,KYSL,DJSL,LOCKFLAG,SJ,JBSJ,DJ,JBDJ from HIS_KSKC_PC where JGID=? and KSKC_PKEY=? order by YXQ,ph</sql>
|
|
<tables>
|
|
<table name="HIS_KSKC_PC" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>JGID</primary>
|
|
<primary>KSKC_PKEY</primary>
|
|
<primary>SL</primary>
|
|
<primary>KYSL</primary>
|
|
<primary>DJSL</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_KSKC_PC" />
|
|
<f name="JGID" type="12" table="HIS_KSKC_PC" />
|
|
<f name="KSKC_PKEY" type="12" table="HIS_KSKC_PC" />
|
|
<f name="PH" type="12" table="HIS_KSKC_PC" />
|
|
<f name="YXQ" type="93" table="HIS_KSKC_PC" />
|
|
<f name="SL" type="8" table="HIS_KSKC_PC" />
|
|
<f name="KYSL" type="8" table="HIS_KSKC_PC" />
|
|
<f name="DJSL" type="8" table="HIS_KSKC_PC" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_KSKC_PC" />
|
|
<f name="SJ" type="8" table="HIS_KSKC_PC" />
|
|
<f name="JBSJ" type="8" table="HIS_KSKC_PC" />
|
|
<f name="DJ" type="8" table="HIS_KSKC_PC" />
|
|
<f name="JBDJ" type="8" table="HIS_KSKC_PC" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
<dao id="yffykskcpcKckjByXjxcDao" log="true" type="1" memo="专门用于药房发药的科室批次库存扣减(先进先出)dao">
|
|
<sql>select PKEY,JGID,KSKC_PKEY,PH,YXQ,SL,KYSL,DJSL,LOCKFLAG,CGSHRQ,SJ,JBSJ,DJ,JBDJ from HIS_KSKC_PC where JGID=? and KSKC_PKEY=? order by CGSHRQ,ph</sql>
|
|
<tables>
|
|
<table name="HIS_KSKC_PC" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>JGID</primary>
|
|
<primary>KSKC_PKEY</primary>
|
|
<primary>SL</primary>
|
|
<primary>KYSL</primary>
|
|
<primary>DJSL</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_KSKC_PC" />
|
|
<f name="JGID" type="12" table="HIS_KSKC_PC" />
|
|
<f name="KSKC_PKEY" type="12" table="HIS_KSKC_PC" />
|
|
<f name="PH" type="12" table="HIS_KSKC_PC" />
|
|
<f name="YXQ" type="93" table="HIS_KSKC_PC" />
|
|
<f name="SL" type="8" table="HIS_KSKC_PC" />
|
|
<f name="KYSL" type="8" table="HIS_KSKC_PC" />
|
|
<f name="DJSL" type="8" table="HIS_KSKC_PC" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_KSKC_PC" />
|
|
<f name="CGSHRQ" type="93" table="HIS_KSKC_PC" />
|
|
<f name="SJ" type="8" table="HIS_KSKC_PC" />
|
|
<f name="JBSJ" type="8" table="HIS_KSKC_PC" />
|
|
<f name="DJ" type="8" table="HIS_KSKC_PC" />
|
|
<f name="JBDJ" type="8" table="HIS_KSKC_PC" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="yffyKsrkcpcKskjDao" log="true" type="1" memo="专门用于药房发药的科室日库存批次库存扣减dao">
|
|
<sql>select PKEY,JGID,SFX_BM,DPTID,KSKC_PC_PKEY,KSSL,JSSL,RQ,RQVERSION,LOCKFLAG from HIS_KSRKC_PC where JGID=? and DPTID=? and SFX_BM=? and KSKC_PC_PKEY=? and RQVERSION=?</sql>
|
|
<tables>
|
|
<table name="HIS_KSRKC_PC" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>JGID</primary>
|
|
<primary>SFX_BM</primary>
|
|
<primary>DPTID</primary>
|
|
<primary>KSKC_PC_PKEY</primary>
|
|
<primary>KSSL</primary>
|
|
<primary>JSSL</primary>
|
|
<primary>RQVERSION</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_KSRKC_PC" />
|
|
<f name="JGID" type="12" table="HIS_KSRKC_PC" />
|
|
<f name="SFX_BM" type="12" table="HIS_KSRKC_PC" />
|
|
<f name="DPTID" type="12" table="HIS_KSRKC_PC" />
|
|
<f name="KSKC_PC_PKEY" type="12" table="HIS_KSRKC_PC" />
|
|
<f name="KSSL" type="8" table="HIS_KSRKC_PC" />
|
|
<f name="JSSL" type="8" table="HIS_KSRKC_PC" />
|
|
<f name="RQ" type="93" table="HIS_KSRKC_PC" />
|
|
<f name="RQVERSION" type="12" table="HIS_KSRKC_PC" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_KSRKC_PC" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
<dao id="mzfymxbDao" log="true" type="1" memo="专门用于门诊发药的门诊发药明细表dao">
|
|
<sql>
|
|
|
|
select PKEY,YZX,YZMX,YZDJ,YZSL,FYBPKEY,HZBQ,HZKS,FYKS,HZPKEY,YPFL,JZPKEY,TYPE,YZDL,TYSL,CJR,CJRQ,XGR,XGRQ,JGID,KSKCPKEY,KSKCPCPKEY,LOCKFLAG,SFSL,FYDW,PCSJ,PCJBSJ,SFBZDWFY,YPYZZHXS,FYJE,YPFYSJMS,TYJE,STSL,FYJJJE,TYJJJE,PCDJ,PCJBDJ,SFXPKEY,ZSMCJ from HIS_YFFY_MZFYMXB where 1=2
|
|
|
|
|
|
</sql>
|
|
<tables>
|
|
<table name="HIS_YFFY_MZFYMXB" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="YZX" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="YZMX" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="YZDJ" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="YZSL" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="FYBPKEY" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="HZBQ" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="HZKS" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="FYKS" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="HZPKEY" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="YPFL" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="JZPKEY" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="TYPE" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="YZDL" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="TYSL" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="CJR" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="CJRQ" type="93" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="XGR" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="XGRQ" type="93" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="JGID" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="KSKCPKEY" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="KSKCPCPKEY" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="SFSL" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="FYDW" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="PCSJ" type="8" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="PCJBSJ" type="8" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="SFBZDWFY" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="YPYZZHXS" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="FYJE" type="8" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="YPFYSJMS" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="TYJE" type="8" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="STSL" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="FYJJJE" type="8" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="TYJJJE" type="8" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="PCDJ" type="8" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="PCJBDJ" type="8" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="SFXPKEY" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="ZSMCJ" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
</fields>
|
|
</dao>
|
|
|
|
|
|
<dao id="yffyKsrkcKskjDao" log="true" type="1" memo="用于发药的科室日库存扣减表dao">
|
|
<sql>select PKEY,JGID,SFX_BM,DPTID,KSSL,JSSL,RQ,RQVERSION,LOCKFLAG from HIS_KSRKC where JGID=? and DPTID=? and SFX_BM=? and RQVERSION=?</sql>
|
|
<tables>
|
|
<table name="HIS_KSRKC" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>JGID</primary>
|
|
<primary>SFX_BM</primary>
|
|
<primary>DPTID</primary>
|
|
<primary>KSSL</primary>
|
|
<primary>JSSL</primary>
|
|
</table>
|
|
</tables>
|
|
//PKEY,JGID,SFX_BM,DPTID,KSSL,JSSL,RQ,RQVERSION
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_KSRKC" />
|
|
<f name="JGID" type="12" table="HIS_KSRKC" />
|
|
<f name="SFX_BM" type="12" table="HIS_KSRKC" />
|
|
<f name="DPTID" type="12" table="HIS_KSRKC" />
|
|
<f name="KSSL" type="8" table="HIS_KSRKC" />
|
|
<f name="JSSL" type="8" table="HIS_KSRKC" />
|
|
<f name="RQ" type="93" table="HIS_KSRKC" />
|
|
<f name="RQVERSION" type="12" table="HIS_KSRKC" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_KSRKC" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
<dao id="mzfyZbDao" log="true" type="1" memo="门诊发药主表">
|
|
<sql>select PKEY,HZPKEY,JZPKEY,MZFPPKEY,ZDZBPKEY,FYCK,FYYF,FYZT,SFDY,SFTY,CFH,PYZT,SHZT,PYR,PYRQ,SHR,SHRQ,DFYBPKEY,CJR,CJRQ,XGR,XGRQ,JGID,FYR,FYRQ,LOCKFLAG from HIS_YFFY_MZFYZB where 1=2</sql>
|
|
<tables>
|
|
<table name="HIS_YFFY_MZFYZB" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_YFFY_MZFYZB" />
|
|
<f name="HZPKEY" type="12" table="HIS_YFFY_MZFYZB" />
|
|
<f name="JZPKEY" type="12" table="HIS_YFFY_MZFYZB" />
|
|
<f name="MZFPPKEY" type="12" table="HIS_YFFY_MZFYZB" />
|
|
<f name="ZDZBPKEY" type="12" table="HIS_YFFY_MZFYZB" />
|
|
<f name="FYCK" type="12" table="HIS_YFFY_MZFYZB" />
|
|
<f name="FYYF" type="12" table="HIS_YFFY_MZFYZB" />
|
|
<f name="FYZT" type="12" table="HIS_YFFY_MZFYZB" />
|
|
<f name="SFDY" type="12" table="HIS_YFFY_MZFYZB" />
|
|
<f name="SFTY" type="12" table="HIS_YFFY_MZFYZB" />
|
|
<f name="CFH" type="12" table="HIS_YFFY_MZFYZB" />
|
|
<f name="PYZT" type="12" table="HIS_YFFY_MZFYZB" />
|
|
<f name="SHZT" type="12" table="HIS_YFFY_MZFYZB" />
|
|
<f name="PYR" type="12" table="HIS_YFFY_MZFYZB" />
|
|
<f name="PYRQ" type="93" table="HIS_YFFY_MZFYZB" />
|
|
<f name="SHR" type="12" table="HIS_YFFY_MZFYZB" />
|
|
<f name="SHRQ" type="93" table="HIS_YFFY_MZFYZB" />
|
|
<f name="DFYBPKEY" type="12" table="HIS_YFFY_MZFYZB" />
|
|
<f name="CJR" type="12" table="HIS_YFFY_MZFYZB" />
|
|
<f name="CJRQ" type="93" table="HIS_YFFY_MZFYZB" />
|
|
<f name="XGR" type="12" table="HIS_YFFY_MZFYZB" />
|
|
<f name="XGRQ" type="93" table="HIS_YFFY_MZFYZB" />
|
|
<f name="JGID" type="12" table="HIS_YFFY_MZFYZB" />
|
|
<f name="FYR" type="12" table="HIS_YFFY_MZFYZB" />
|
|
<f name="FYRQ" type="93" table="HIS_YFFY_MZFYZB" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_YFFY_MZFYZB" />
|
|
</fields>
|
|
</dao>
|
|
|
|
|
|
<dao id="mzfyyfyMxLbDao" log="true" type="1" memo="已发药明细列表">
|
|
<sql>
|
|
select a.YZMX,a.YZDJ,sum(a.SFSL) YZSL,a.FYBPKEY,a.HZBQ,a.HZKS,a.FYKS,a.HZPKEY,a.YPFL,a.JZPKEY,a.TYPE,a.JGID,a.YZDL,b.YZMC,b.YZDW,b.YZJL,b.YZJLDW,b.YZPC,b.YZLC,b.YZJE,b.YZBZ,b.YZXZYS,b.YZXZKS,b.YZDJSL,c.GG,c.CSXX,b.PKEY YZPKEY,b.YZYF,c.JBDW,b.YZJZZHXS,b.YPYZJBJG,sum(a.STSL) TYSL,c.ybbm,c.ybmc,a.FYJE,a.TYJE,a.FYDW,b.YZXPKEY from HIS_YFFY_MZFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_YPXX c on a.YZX=c.BM where a.JGID=? and a.FYBPKEY=? group by a.YZX,a.YZMX,a.YZDJ,a.FYBPKEY,a.HZBQ,a.HZKS,a.FYKS,a.HZPKEY,a.YPFL,a.JZPKEY,a.TYPE,a.JGID,a.YZDL,b.YZMC,b.YZDW,b.YZJL,b.YZJLDW,b.YZPC,b.YZLC,b.YZJE,b.YZBZ,b.YZXZYS,b.YZXZKS,b.YZDJSL,c.GG,c.CSXX,b.PKEY,b.YZYF,c.JBDW,b.YZJZZHXS,b.YPYZJBJG,c.ybbm,c.ybmc,a.FYJE,a.TYJE,a.FYDW,b.YZXPKEY order by b.pkey
|
|
|
|
|
|
|
|
</sql>
|
|
<fields>
|
|
<f name="YZMX" type="12" />
|
|
<f name="YZDJ" type="12" />
|
|
<f name="YZSL" type="4" />
|
|
<f name="FYBPKEY" type="12" />
|
|
<f name="HZBQ" type="12" />
|
|
<f name="HZKS" type="12" />
|
|
<f name="FYKS" type="12" />
|
|
<f name="HZPKEY" type="12" />
|
|
<f name="YPFL" type="12" />
|
|
<f name="JZPKEY" type="12" />
|
|
<f name="TYPE" type="12" />
|
|
<f name="JGID" type="12" />
|
|
<f name="YZDL" type="12" />
|
|
<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="GG" type="12" />
|
|
<f name="CSXX" type="12" />
|
|
<f name="YZPKEY" type="12" />
|
|
<f name="YZYF" type="12" />
|
|
<f name="JBDW" type="12" />
|
|
<f name="YZJZZHXS" type="12" />
|
|
<f name="YPYZJBJG" type="12" />
|
|
<f name="TYSL" type="4" />
|
|
<f name="YBBM" type="12" />
|
|
<f name="YBMC" type="12" />
|
|
<f name="FYJE" type="12" />
|
|
<f name="TYJE" type="12" />
|
|
<f name="FYDW" type="12" />
|
|
<f name="YZXPKEY" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="mzfyYfyLbDao" log="true" type="1" memo="门诊发药已发药列表dao">
|
|
<sql>
|
|
select c2.NAME,b.xm,
|
|
c.JZKH,
|
|
a.PKEY,
|
|
a.CJRQ,
|
|
c.JJKS,
|
|
a.cfh,
|
|
a.FYCK,
|
|
a.FYYF,
|
|
a.FYZT,
|
|
a.SFDY,
|
|
a.SFTY,
|
|
a.PYZT,
|
|
a.SHZT,
|
|
b.XB,
|
|
c.JZNL,
|
|
c.ISJZ,
|
|
a.JGID,
|
|
a.HZPKEY,
|
|
a.JZPKEY,
|
|
a.MZFPPKEY,
|
|
a.ZDZBPKEY,
|
|
a.PYR,
|
|
a.PYRQ,
|
|
a.SHR,
|
|
a.SHRQ,
|
|
a.fyr,
|
|
a.fyrq,
|
|
a.LOCKFLAG
|
|
from HIS_YFFY_MZFYZB a
|
|
left join HIS_HZINFO b on a.hzpkey = b.pkey
|
|
left join HIS_JZ_BASEINFO c on a.jzpkey = c.pkey
|
|
left join MAIN_YHXX c2 on c.JJYS = c2.USERACCOUNT
|
|
where a.JGID = ?
|
|
and a.JZPKEY = ?
|
|
and a.FYYF = ?
|
|
order by c.ISJZ desc, a.cfh
|
|
</sql>
|
|
<tables>
|
|
<table name="HIS_YFFY_MZFYZB" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="NAME" type="12" />
|
|
<f name="XM" type="12" />
|
|
<f name="JZKH" type="12" />
|
|
<f name="PKEY" type="12" table="HIS_YFFY_MZFYZB" />
|
|
<f name="CJRQ" type="93" table="HIS_YFFY_MZFYZB" />
|
|
<f name="JJKS" type="12" />
|
|
<f name="CFH" type="12" table="HIS_YFFY_MZFYZB" />
|
|
<f name="FYCK" type="12" table="HIS_YFFY_MZFYZB" />
|
|
<f name="FYYF" type="12" table="HIS_YFFY_MZFYZB" />
|
|
<f name="FYZT" type="12" table="HIS_YFFY_MZFYZB" />
|
|
<f name="SFDY" type="12" table="HIS_YFFY_MZFYZB" />
|
|
<f name="SFTY" type="12" table="HIS_YFFY_MZFYZB" />
|
|
<f name="PYZT" type="12" table="HIS_YFFY_MZFYZB" />
|
|
<f name="SHZT" type="12" table="HIS_YFFY_MZFYZB" />
|
|
<f name="XB" type="12" />
|
|
<f name="JZNL" type="12" />
|
|
<f name="ISJZ" type="12" />
|
|
<f name="JGID" type="12" table="HIS_YFFY_MZFYZB" />
|
|
<f name="HZPKEY" type="12" table="HIS_YFFY_MZFYZB" />
|
|
<f name="JZPKEY" type="12" table="HIS_YFFY_MZFYZB" />
|
|
<f name="MZFPPKEY" type="12" table="HIS_YFFY_MZFYZB" />
|
|
<f name="ZDZBPKEY" type="12" table="HIS_YFFY_MZFYZB" />
|
|
<f name="PYR" type="12" table="HIS_YFFY_MZFYZB" />
|
|
<f name="PYRQ" type="93" table="HIS_YFFY_MZFYZB" />
|
|
<f name="SHR" type="12" table="HIS_YFFY_MZFYZB" />
|
|
<f name="SHRQ" type="93" table="HIS_YFFY_MZFYZB" />
|
|
<f name="FYR" type="12" table="HIS_YFFY_MZFYZB" />
|
|
<f name="FYRQ" type="93" table="HIS_YFFY_MZFYZB" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_YFFY_MZFYZB" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
<dao id="mztfpybtyDao" log="true" type="1">
|
|
<sql>select a.PKEY,a.YZX,a.YZMX,a.YZDJ,a.YZSL,a.JGID,a.TYSL,a.SFSL,b.pkey DFYPKEY,b.HZPKEY,b.JZPKEY,b.MZFPPKEY,b.ZDZBPKEY,b.FYZT,a.LOCKFLAG from HIS_YFFY_PYB a left join HIS_YFFY_MZDFYZB b on a.DFYPKEY=b.pkey and a.HZPKEY=b.HZPKEY and a.JZPKEY=b.JZPKEY and a.JGID=b.JGID where a.YZMX=? and a.JGID=? and b.FYZT=0 </sql>
|
|
<tables>
|
|
<table name="HIS_YFFY_PYB" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>YZMX</primary>
|
|
<primary>YZSL</primary>
|
|
<primary>JGID</primary>
|
|
<primary>TYSL</primary>
|
|
<primary>SFSL</primary>
|
|
</table>
|
|
<table name="HIS_YFFY_MZDFYZB" insert="true" update="true" delete="true">
|
|
<primary>DFYPKEY</primary>
|
|
<primary>JGID</primary>
|
|
<primary>HZPKEY</primary>
|
|
<primary>JZPKEY</primary>
|
|
<primary>MZFPPKEY</primary>
|
|
<primary>ZDZBPKEY</primary>
|
|
<primary>FYZT</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_YFFY_PYB,HIS_YFFY_MZDFYZB" />
|
|
<f name="YZX" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="YZMX" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="YZDJ" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="YZSL" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="JGID" type="12" table="HIS_YFFY_PYB,HIS_YFFY_MZDFYZB" />
|
|
<f name="TYSL" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="SFSL" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="DFYPKEY" schemaname="PKEY" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="HZPKEY" type="12" table="HIS_YFFY_PYB,HIS_YFFY_MZDFYZB" />
|
|
<f name="JZPKEY" type="12" table="HIS_YFFY_PYB,HIS_YFFY_MZDFYZB" />
|
|
<f name="MZFPPKEY" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="ZDZBPKEY" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="FYZT" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="LOCKFLAG" type="12" table="HIS_YFFY_PYB" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
|
|
<dao id="mztyHzcfDao" log="true" type="1" memo="门诊退费退药通过患者处方进行退费的dao">
|
|
<sql>select a.cfh,a.PKEY FYBPKEY,a.CJRQ FYRQ,c.pkey MZFPPKEY,b.HZPKEY,b.JZPKEY,b.pkey ZDZBPKEY from HIS_YFFY_MZFYZB a left join HIS_SFZD_ZB b on b.JZZDPKEY=a.ZDZBPKEY and a.JGID=b.JGID left join HIS_MZJS_MZFPZB c on b.PKEY=c.GLZDBPKEY and b.JGID=c.JGID where b.JSZT=1 and b.ISHC=0 and a.JGID=? and a.HZPKEY=? order by a.CJRQ desc </sql>
|
|
<fields>
|
|
<f name="CFH" type="12" />
|
|
<f name="FYBPKEY" type="12" />
|
|
<f name="FYRQ" type="93" />
|
|
<f name="MZFPPKEY" type="12"/>
|
|
<f name="HZPKEY" type="12"/>
|
|
<f name="JZPKEY" type="12"/>
|
|
<f name="ZDZBPKEY" type="12"/>
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
|
|
|
|
<dao id="mztftySqdDao" log="true" type="1" memo="门诊退费退药通过患者退费申请单进行退费的dao">
|
|
<sql>
|
|
|
|
select * from (select a.MZFPPKEY,a.SQZT,a.SQRY,a.SQRQ,a.SHZT,a.SHRY,a.SHRQ,a.ZXZT,a.ZXRY,a.ZXRQ,a.CJR,a.CJRQ,a.JGID,a.SHBHBZ,a.TFYY,a.HZPKEY,a.JZPKEY,a.ZDZBPKEY,c.PKEY FYBPKEY,c.cfh,(select sum(tfsl) from HIS_SFZD_YZMXB where JGID=a.JGID and cfh=c.cfh) tfsl,a.LOCKFLAG from HIS_MZJS_MZFPCHSQ a left join HIS_SFZD_ZB b on a.ZDZBPKEY=b.PKEY and a.JGID=b.JGID left join HIS_YFFY_MZFYZB c on b.JZZDPKEY=c.ZDZBPKEY where a.JGID=? and (1=? or c.FYYF=?) and a.ZXZT=0 and a.HZPKEY=? order by a.SQRQ desc) where tfsl > 0
|
|
|
|
</sql>
|
|
<tables>
|
|
<table name="HIS_MZJS_MZFPCHSQ" insert="true" update="true" delete="true">
|
|
<primary>MZFPPKEY</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="MZFPPKEY" type="12" table="HIS_MZJS_MZFPCHSQ" />
|
|
<f name="SQZT" type="12" table="HIS_MZJS_MZFPCHSQ" />
|
|
<f name="SQRY" type="12" table="HIS_MZJS_MZFPCHSQ" />
|
|
<f name="SQRQ" type="93" table="HIS_MZJS_MZFPCHSQ" />
|
|
<f name="SHZT" type="12" table="HIS_MZJS_MZFPCHSQ" />
|
|
<f name="SHRY" type="12" table="HIS_MZJS_MZFPCHSQ" />
|
|
<f name="SHRQ" type="93" table="HIS_MZJS_MZFPCHSQ" />
|
|
<f name="ZXZT" type="12" table="HIS_MZJS_MZFPCHSQ" />
|
|
<f name="ZXRY" type="12" table="HIS_MZJS_MZFPCHSQ" />
|
|
<f name="ZXRQ" type="93" table="HIS_MZJS_MZFPCHSQ" />
|
|
<f name="CJR" type="12" table="HIS_MZJS_MZFPCHSQ" />
|
|
<f name="CJRQ" type="93" table="HIS_MZJS_MZFPCHSQ" />
|
|
<f name="JGID" type="12" table="HIS_MZJS_MZFPCHSQ" />
|
|
<f name="SHBHBZ" type="12" table="HIS_MZJS_MZFPCHSQ" />
|
|
<f name="TFYY" type="12" table="HIS_MZJS_MZFPCHSQ" />
|
|
<f name="HZPKEY" type="12" table="HIS_MZJS_MZFPCHSQ" />
|
|
<f name="JZPKEY" type="12" table="HIS_MZJS_MZFPCHSQ" />
|
|
<f name="ZDZBPKEY" type="12" table="HIS_MZJS_MZFPCHSQ" />
|
|
<f name="FYBPKEY" type="12" />
|
|
<f name="CFH" type="12" />
|
|
<f name="TFSL" type="8" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_MZJS_MZFPCHSQ" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
|
|
<dao id="mztftyFymxbDao" log="true" type="1" memo="门诊退费退药患者已发药明细dao">
|
|
<sql>
|
|
|
|
select a.PKEY,a.YZX,a.YZMX,a.YZDJ,a.YZSL,a.FYBPKEY,a.HZBQ,a.HZKS,a.FYKS,a.HZPKEY,a.YPFL,a.JZPKEY,a.TYPE,a.YZDL,a.TYSL,a.CJR,a.CJRQ,a.XGR,a.XGRQ,a.JGID,a.KSKCPKEY,a.KSKCPCPKEY,b.CFH,b.YZMC,b.YZDW,b.YZJL,b.YZJLDW,b.YZPC,b.YZLC,b.YZJE,b.YZBZ,b.YZXZYS,b.YZXZKS,b.YZDJSL,c.GG,c.CSXX,b.PKEY YZPKEY,b.YZYF,b.YPYZJBDW JBDW,b.YZJZZHXS,b.YPYZJBJG,a.LOCKFLAG,a.SFSL,a.FYDW,a.PCSJ,a.PCJBSJ,a.SFBZDWFY,a.YPYZZHXS,a.FYJE,a.YPFYSJMS,b.YPYZBZJG,a.TYJE,a.STSL,a.FYJJJE,a.TYJJJE,a.PCDJ,a.PCJBDJ,a.SFXPKEY from HIS_YFFY_MZFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_YPXX c on a.YZX=c.BM where a.JGID=? and a.FYBPKEY=? order by b.cfh,a.pkey
|
|
|
|
|
|
|
|
</sql>
|
|
<tables>
|
|
<table name="HIS_YFFY_MZFYMXB" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>JGID</primary>
|
|
<primary>YZSL</primary>
|
|
<primary>FYBPKEY</primary>
|
|
<primary>TYSL</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="YZX" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="YZMX" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="YZDJ" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="YZSL" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="FYBPKEY" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="HZBQ" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="HZKS" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="FYKS" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="HZPKEY" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="YPFL" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="JZPKEY" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="TYPE" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="YZDL" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="TYSL" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="CJR" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="CJRQ" type="93" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="XGR" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="XGRQ" type="93" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="JGID" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="KSKCPKEY" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="KSKCPCPKEY" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="CFH" type="12" />
|
|
<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="GG" type="12" />
|
|
<f name="CSXX" type="12" />
|
|
<f name="YZPKEY" type="12" />
|
|
<f name="YZYF" type="12" />
|
|
<f name="JBDW" type="12" />
|
|
<f name="YZJZZHXS" type="12" />
|
|
<f name="YPYZJBJG" type="12" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="SFSL" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="FYDW" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="PCSJ" type="8" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="PCJBSJ" type="8" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="SFBZDWFY" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="YPYZZHXS" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="FYJE" type="8" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="YPFYSJMS" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="YPYZBZJG" type="12" />
|
|
<f name="TYJE" type="8" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="STSL" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="FYJJJE" type="8" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="TYJJJE" type="8" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="PCDJ" type="8" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="PCJBDJ" type="8" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="SFXPKEY" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
|
|
<dao id="mzyfParamsControlDao" cache="true" log="true" type="1" memo="门诊药房控制参数dao">
|
|
<sql>select PKEY,KSKEY,QYSF,CFSH,TQBY,PYQR,ZDDYPYD,PY,KKSTY,CJR,CJRQ,XGR,XGRQ,JGID,ZCY from HIS_YFFY_MZFYKS_SETUP where JGID=? and KSKEY=?</sql>
|
|
<tables>
|
|
<table name="HIS_YFFY_MZFYKS_SETUP" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_YFFY_MZFYKS_SETUP" />
|
|
<f name="KSKEY" type="12" table="HIS_YFFY_MZFYKS_SETUP" />
|
|
<f name="QYSF" type="12" table="HIS_YFFY_MZFYKS_SETUP" />
|
|
<f name="CFSH" type="12" table="HIS_YFFY_MZFYKS_SETUP" />
|
|
<f name="TQBY" type="12" table="HIS_YFFY_MZFYKS_SETUP" />
|
|
<f name="PYQR" type="12" table="HIS_YFFY_MZFYKS_SETUP" />
|
|
<f name="ZDDYPYD" type="12" table="HIS_YFFY_MZFYKS_SETUP" />
|
|
<f name="PY" type="12" table="HIS_YFFY_MZFYKS_SETUP" />
|
|
<f name="KKSTY" type="12" table="HIS_YFFY_MZFYKS_SETUP" />
|
|
<f name="CJR" type="12" table="HIS_YFFY_MZFYKS_SETUP" />
|
|
<f name="CJRQ" type="93" table="HIS_YFFY_MZFYKS_SETUP" />
|
|
<f name="XGR" type="12" table="HIS_YFFY_MZFYKS_SETUP" />
|
|
<f name="XGRQ" type="93" table="HIS_YFFY_MZFYKS_SETUP" />
|
|
<f name="JGID" type="12" table="HIS_YFFY_MZFYKS_SETUP" />
|
|
<f name="ZCY" type="12" table="HIS_YFFY_MZFYKS_SETUP" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
|
|
<dao id="mztftySfzdyzmxDao" log="true" type="1" memo="门诊退药,通过账单表获取到当前账单的医嘱明细,用来获取当前退费数量Dao">
|
|
<sql>select PKEY,ZDZBPKEY,YZX,YZMX,YZDJ,YZSL,TFSL,YZZFY,YZZKFY,HZYBZF,HZZFZF,YZSJ,CJR,CJRQ,JGID,LOCKFLAG from HIS_SFZD_YZMXB where JGID=? and ZDZBPKEY=? </sql>
|
|
<tables>
|
|
<table name="HIS_SFZD_YZMXB" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>ZDZBPKEY</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_SFZD_YZMXB" />
|
|
<f name="ZDZBPKEY" type="12" table="HIS_SFZD_YZMXB" />
|
|
<f name="YZX" type="12" table="HIS_SFZD_YZMXB" />
|
|
<f name="YZMX" type="12" table="HIS_SFZD_YZMXB" />
|
|
<f name="YZDJ" type="12" table="HIS_SFZD_YZMXB" />
|
|
<f name="YZSL" type="12" table="HIS_SFZD_YZMXB" />
|
|
<f name="TFSL" type="12" table="HIS_SFZD_YZMXB" />
|
|
<f name="YZZFY" type="12" table="HIS_SFZD_YZMXB" />
|
|
<f name="YZZKFY" type="12" table="HIS_SFZD_YZMXB" />
|
|
<f name="HZYBZF" type="12" table="HIS_SFZD_YZMXB" />
|
|
<f name="HZZFZF" type="12" table="HIS_SFZD_YZMXB" />
|
|
<f name="YZSJ" type="93" table="HIS_SFZD_YZMXB" />
|
|
<f name="CJR" type="12" table="HIS_SFZD_YZMXB" />
|
|
<f name="CJRQ" type="93" table="HIS_SFZD_YZMXB" />
|
|
<f name="JGID" type="12" table="HIS_SFZD_YZMXB" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_SFZD_YZMXB" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
|
|
<dao id="mztyDqdjYjtyDao" log="true" type="1" memo="当前需退费账单关联的退药数量dao">
|
|
<sql>select a.YZX,a.YZMX,a.TYKS,a.TYSL from HIS_YFFY_MZTYMXB a left join HIS_YFFY_MZTYZB b on a.TYBPKEY=b.pkey and a.JGID=b.JGID where b.ISCX=0 AND b.JGID=? and b.ZDZBPKEY=?</sql>
|
|
<fields>
|
|
<f name="YZX" type="12" />
|
|
<f name="YZMX" type="12" />
|
|
<f name="TYKS" type="12" />
|
|
<f name="TYSL" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
<dao id="mztyDQZDZBDao" log="true" type="1" memo="门诊退药判断当前账单主表有效性dao">
|
|
<sql>select a.PKEY,a.HZPKEY,a.JZPKEY,a.MZFPPKEY,a.ZDZBPKEY,a.FYCK,a.FYYF,a.FYZT,a.SFDY,a.SFTY,a.CFH,a.PYZT,a.SHZT,a.PYR,a.PYRQ,a.SHR,a.SHRQ,a.DFYBPKEY,a.CJR,a.CJRQ,a.XGR,a.XGRQ,a.JGID,b.JZZDPKEY,a.LOCKFLAG from HIS_YFFY_MZFYZB a left join HIS_SFZD_ZB b on b.JZZDPKEY=a.ZDZBPKEY and a.JGID=b.JGID where b.JSZT=1 and b.ISHC=0 and a.JGID=? and a.pkey=? order by a.CJRQ desc </sql>
|
|
<tables>
|
|
<table name="HIS_YFFY_MZFYZB" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>HZPKEY</primary>
|
|
<primary>JZPKEY</primary>
|
|
<primary>MZFPPKEY</primary>
|
|
<primary>JGID</primary>
|
|
<primary>SFTY</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_YFFY_MZFYZB" />
|
|
<f name="HZPKEY" type="12" table="HIS_YFFY_MZFYZB" />
|
|
<f name="JZPKEY" type="12" table="HIS_YFFY_MZFYZB" />
|
|
<f name="MZFPPKEY" type="12" table="HIS_YFFY_MZFYZB" />
|
|
<f name="ZDZBPKEY" type="12" table="HIS_YFFY_MZFYZB" />
|
|
<f name="FYCK" type="12" table="HIS_YFFY_MZFYZB" />
|
|
<f name="FYYF" type="12" table="HIS_YFFY_MZFYZB" />
|
|
<f name="FYZT" type="12" table="HIS_YFFY_MZFYZB" />
|
|
<f name="SFDY" type="12" table="HIS_YFFY_MZFYZB" />
|
|
<f name="SFTY" type="12" table="HIS_YFFY_MZFYZB" />
|
|
<f name="CFH" type="12" table="HIS_YFFY_MZFYZB" />
|
|
<f name="PYZT" type="12" table="HIS_YFFY_MZFYZB" />
|
|
<f name="SHZT" type="12" table="HIS_YFFY_MZFYZB" />
|
|
<f name="PYR" type="12" table="HIS_YFFY_MZFYZB" />
|
|
<f name="PYRQ" type="93" table="HIS_YFFY_MZFYZB" />
|
|
<f name="SHR" type="12" table="HIS_YFFY_MZFYZB" />
|
|
<f name="SHRQ" type="93" table="HIS_YFFY_MZFYZB" />
|
|
<f name="DFYBPKEY" type="12" table="HIS_YFFY_MZFYZB" />
|
|
<f name="CJR" type="12" table="HIS_YFFY_MZFYZB" />
|
|
<f name="CJRQ" type="93" table="HIS_YFFY_MZFYZB" />
|
|
<f name="XGR" type="12" table="HIS_YFFY_MZFYZB" />
|
|
<f name="XGRQ" type="93" table="HIS_YFFY_MZFYZB" />
|
|
<f name="JGID" type="12" table="HIS_YFFY_MZFYZB" />
|
|
<f name="JZZDPKEY" type="12"/>
|
|
<f name="LOCKFLAG" type="-5" table="HIS_YFFY_MZFYZB" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="mztynewTyZBDao" log="true" type="1" memo="新增门诊退药的门诊退药主表dao">
|
|
<sql>select PKEY,HZPKEY,JZPKEY,MZFPPKEY,ZDZBPKEY,JZZDPKEY,JZMZFPPKEY,MZFYBPKEY,TYYF,TYRY,FYYF,TYYY,CJR,CJRQ,XGR,XGRQ,JGID,FYRQ,ISCX,CFH,LOCKFLAG from HIS_YFFY_MZTYZB where 1=2</sql>
|
|
<tables>
|
|
<table name="HIS_YFFY_MZTYZB" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_YFFY_MZTYZB" />
|
|
<f name="HZPKEY" type="12" table="HIS_YFFY_MZTYZB" />
|
|
<f name="JZPKEY" type="12" table="HIS_YFFY_MZTYZB" />
|
|
<f name="MZFPPKEY" type="12" table="HIS_YFFY_MZTYZB" />
|
|
<f name="ZDZBPKEY" type="12" table="HIS_YFFY_MZTYZB" />
|
|
<f name="JZZDPKEY" type="12" table="HIS_YFFY_MZTYZB" />
|
|
<f name="JZMZFPPKEY" type="12" table="HIS_YFFY_MZTYZB" />
|
|
<f name="MZFYBPKEY" type="12" table="HIS_YFFY_MZTYZB" />
|
|
<f name="TYYF" type="12" table="HIS_YFFY_MZTYZB" />
|
|
<f name="TYRY" type="12" table="HIS_YFFY_MZTYZB" />
|
|
<f name="FYYF" type="12" table="HIS_YFFY_MZTYZB" />
|
|
<f name="TYYY" type="12" table="HIS_YFFY_MZTYZB" />
|
|
<f name="CJR" type="12" table="HIS_YFFY_MZTYZB" />
|
|
<f name="CJRQ" type="93" table="HIS_YFFY_MZTYZB" />
|
|
<f name="XGR" type="12" table="HIS_YFFY_MZTYZB" />
|
|
<f name="XGRQ" type="93" table="HIS_YFFY_MZTYZB" />
|
|
<f name="JGID" type="12" table="HIS_YFFY_MZTYZB" />
|
|
<f name="FYRQ" type="93" table="HIS_YFFY_MZTYZB" />
|
|
<f name="ISCX" type="12" table="HIS_YFFY_MZTYZB" />
|
|
<f name="CFH" type="12" table="HIS_YFFY_MZTYZB" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_YFFY_MZTYZB" />
|
|
</fields>
|
|
</dao>
|
|
|
|
|
|
|
|
<dao id="mztnewTyMxbDao" log="true" type="1" memo="门诊退药的门诊退药明细表,这里住院退药也采用此dao">
|
|
<sql>
|
|
select PKEY,YZX,YZMX,YZDJ,TYSL,HZBQ,HZKS,TYKS,HZPKEY,YPFL,JZPKEY,TYBPKEY,TYPE,KSKCPKEY,KSKCPCPKEY,CJR,CJRQ,XGR,XGRQ,JGID,MZFYMXBPKEY,PYBPKEY,TYDH,TYYY,BED,CFH,ZYNO,LOCKFLAG,FYDW,PCSJ,PCJBSJ,SFBZDWFY,YPYZZHXS,YPFYSJMS,TYJE,STSL,TYJJJE,PCDJ,PCJBDJ,ZSMCJ from HIS_YFFY_MZTYMXB where 1=2
|
|
</sql>
|
|
<tables>
|
|
<table name="HIS_YFFY_MZTYMXB" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
</tables>
|
|
//PKEY,YZX,YZMX,YZDJ,TYSL,HZBQ,HZKS,TYKS,HZPKEY,YPFL,JZPKEY,TYBPKEY,TYPE,KSKCPKEY,KSKCPCPKEY,CJR,CJRQ,XGR,XGRQ,JGID,MZFYMXBPKEY,PYBPKEY,TYDH,TYYY,BED,CFH,ZYNO,LOCKFLAG,FYDW,PCSJ,PCJBSJ,SFBZDWFY,YPYZZHXS,YPFYSJMS,TYJE,STSL,TYJJJE,PCDJ,PCJBDJ
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_YFFY_MZTYMXB" />
|
|
<f name="YZX" type="12" table="HIS_YFFY_MZTYMXB" />
|
|
<f name="YZMX" type="12" table="HIS_YFFY_MZTYMXB" />
|
|
<f name="YZDJ" type="12" table="HIS_YFFY_MZTYMXB" />
|
|
<f name="TYSL" type="12" table="HIS_YFFY_MZTYMXB" />
|
|
<f name="HZBQ" type="12" table="HIS_YFFY_MZTYMXB" />
|
|
<f name="HZKS" type="12" table="HIS_YFFY_MZTYMXB" />
|
|
<f name="TYKS" type="12" table="HIS_YFFY_MZTYMXB" />
|
|
<f name="HZPKEY" type="12" table="HIS_YFFY_MZTYMXB" />
|
|
<f name="YPFL" type="12" table="HIS_YFFY_MZTYMXB" />
|
|
<f name="JZPKEY" type="12" table="HIS_YFFY_MZTYMXB" />
|
|
<f name="TYBPKEY" type="12" table="HIS_YFFY_MZTYMXB" />
|
|
<f name="TYPE" type="12" table="HIS_YFFY_MZTYMXB" />
|
|
<f name="KSKCPKEY" type="12" table="HIS_YFFY_MZTYMXB" />
|
|
<f name="KSKCPCPKEY" type="12" table="HIS_YFFY_MZTYMXB" />
|
|
<f name="CJR" type="12" table="HIS_YFFY_MZTYMXB" />
|
|
<f name="CJRQ" type="93" table="HIS_YFFY_MZTYMXB" />
|
|
<f name="XGR" type="12" table="HIS_YFFY_MZTYMXB" />
|
|
<f name="XGRQ" type="93" table="HIS_YFFY_MZTYMXB" />
|
|
<f name="JGID" type="12" table="HIS_YFFY_MZTYMXB" />
|
|
<f name="MZFYMXBPKEY" type="12" table="HIS_YFFY_MZTYMXB" />
|
|
<f name="PYBPKEY" type="12" table="HIS_YFFY_MZTYMXB" />
|
|
<f name="TYDH" type="12" table="HIS_YFFY_MZTYMXB" />
|
|
<f name="TYYY" type="12" table="HIS_YFFY_MZTYMXB" />
|
|
<f name="BED" type="12" table="HIS_YFFY_MZTYMXB" />
|
|
<f name="CFH" type="12" table="HIS_YFFY_MZTYMXB" />
|
|
<f name="ZYNO" type="12" table="HIS_YFFY_MZTYMXB" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_YFFY_MZTYMXB" />
|
|
<f name="FYDW" type="12" table="HIS_YFFY_MZTYMXB" />
|
|
<f name="PCSJ" type="8" table="HIS_YFFY_MZTYMXB" />
|
|
<f name="PCJBSJ" type="8" table="HIS_YFFY_MZTYMXB" />
|
|
<f name="SFBZDWFY" type="12" table="HIS_YFFY_MZTYMXB" />
|
|
<f name="YPYZZHXS" type="12" table="HIS_YFFY_MZTYMXB" />
|
|
<f name="YPFYSJMS" type="12" table="HIS_YFFY_MZTYMXB" />
|
|
<f name="TYJE" type="8" table="HIS_YFFY_MZTYMXB" />
|
|
<f name="STSL" type="12" table="HIS_YFFY_MZTYMXB" />
|
|
<f name="TYJJJE" type="8" table="HIS_YFFY_MZTYMXB" />
|
|
<f name="PCDJ" type="8" table="HIS_YFFY_MZTYMXB" />
|
|
<f name="PCJBDJ" type="8" table="HIS_YFFY_MZTYMXB" />
|
|
<f name="ZSMCJ" type="12" table="HIS_YFFY_MZTYMXB" />
|
|
</fields>
|
|
</dao>
|
|
|
|
|
|
<dao id="yffykskcpcKckjByPcpkeyDao" log="true" type="1" memo="专门用于药房发药的科室批次库存扣减By库存批次主键">
|
|
<sql>select PKEY,JGID,KSKC_PKEY,PH,YXQ,SL,KYSL,DJSL,LOCKFLAG from HIS_KSKC_PC where JGID=? and PKEY=? order by YXQ,ph</sql>
|
|
<tables>
|
|
<table name="HIS_KSKC_PC" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>JGID</primary>
|
|
<primary>KSKC_PKEY</primary>
|
|
<primary>SL</primary>
|
|
<primary>KYSL</primary>
|
|
<primary>DJSL</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_KSKC_PC" />
|
|
<f name="JGID" type="12" table="HIS_KSKC_PC" />
|
|
<f name="KSKC_PKEY" type="12" table="HIS_KSKC_PC" />
|
|
<f name="PH" type="12" table="HIS_KSKC_PC" />
|
|
<f name="YXQ" type="93" table="HIS_KSKC_PC" />
|
|
<f name="SL" type="8" table="HIS_KSKC_PC" />
|
|
<f name="KYSL" type="8" table="HIS_KSKC_PC" />
|
|
<f name="DJSL" type="8" table="HIS_KSKC_PC" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_KSKC_PC" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="mzyfAllTydDao" log="true" type="1" memo="门诊药房所有退药单查询dao">
|
|
<sql>select a.PKEY,a.HZPKEY,a.JZPKEY,a.MZFPPKEY,a.ZDZBPKEY,a.JZZDPKEY,a.JZMZFPPKEY,a.MZFYBPKEY,a.TYYF,a.TYRY,a.FYYF,a.TYYY,a.CJR,a.CJRQ,a.XGR,a.XGRQ,a.JGID,a.FYRQ,a.ISCX,a.CXRY,a.CXRQ,a.CFH,c.JZKH,b.XM,b.XB,c.JJKS,c.JJYS,d.JSZT,a.LOCKFLAG from HIS_YFFY_MZTYZB a left join HIS_HZINFO b on a.HZPKEY=b.pkey left join HIS_JZ_BASEINFO c on a.JZPKEY=c.pkey and a.JGID=c.JGID left join HIS_SFZD_ZB d on a.ZDZBPKEY=d.pkey where d.ISHC=0 and a.JGID =? order by a.CJRQ desc</sql>
|
|
<tables>
|
|
<table name="HIS_YFFY_MZTYZB" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>JGID</primary>
|
|
<primary>ISCX</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_YFFY_MZTYZB" />
|
|
<f name="HZPKEY" type="12" table="HIS_YFFY_MZTYZB" />
|
|
<f name="JZPKEY" type="12" table="HIS_YFFY_MZTYZB" />
|
|
<f name="MZFPPKEY" type="12" table="HIS_YFFY_MZTYZB" />
|
|
<f name="ZDZBPKEY" type="12" table="HIS_YFFY_MZTYZB" />
|
|
<f name="JZZDPKEY" type="12" table="HIS_YFFY_MZTYZB" />
|
|
<f name="JZMZFPPKEY" type="12" table="HIS_YFFY_MZTYZB" />
|
|
<f name="MZFYBPKEY" type="12" table="HIS_YFFY_MZTYZB" />
|
|
<f name="TYYF" type="12" table="HIS_YFFY_MZTYZB" />
|
|
<f name="TYRY" type="12" table="HIS_YFFY_MZTYZB" />
|
|
<f name="FYYF" type="12" table="HIS_YFFY_MZTYZB" />
|
|
<f name="TYYY" type="12" table="HIS_YFFY_MZTYZB" />
|
|
<f name="CJR" type="12" table="HIS_YFFY_MZTYZB" />
|
|
<f name="CJRQ" type="93" table="HIS_YFFY_MZTYZB" />
|
|
<f name="XGR" type="12" table="HIS_YFFY_MZTYZB" />
|
|
<f name="XGRQ" type="93" table="HIS_YFFY_MZTYZB" />
|
|
<f name="JGID" type="12" table="HIS_YFFY_MZTYZB" />
|
|
<f name="FYRQ" type="93" table="HIS_YFFY_MZTYZB" />
|
|
<f name="ISCX" type="12" table="HIS_YFFY_MZTYZB" />
|
|
<f name="CXRY" type="12" table="HIS_YFFY_MZTYZB" />
|
|
<f name="CXRQ" type="93" table="HIS_YFFY_MZTYZB" />
|
|
<f name="CFH" type="12" table="HIS_YFFY_MZTYZB" />
|
|
<f name="JZKH" type="12" />
|
|
<f name="XM" type="12" />
|
|
<f name="XB" type="12" />
|
|
<f name="JJKS" type="12" />
|
|
<f name="JJYS" type="12" />
|
|
<f name="JSZT" type="12" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_YFFY_MZTYZB" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
|
|
<dao id="mzyfTydMxDao" log="true" type="1" memo="门诊药房退药单明细dao">
|
|
<sql>select '' YZDJC,'' TYSLC,'' TYJEC,a.PKEY,a.YZX,a.YZMX,a.YZDJ,a.TYSL,a.HZBQ,a.HZKS,a.TYKS,a.HZPKEY,a.YPFL,a.JZPKEY,a.TYBPKEY,a.TYPE,a.KSKCPKEY,a.KSKCPCPKEY,a.CJR,a.CJRQ,a.XGR,a.XGRQ,a.JGID,a.MZFYMXBPKEY,b.YZMC,b.YZDW,b.YZJZZHXS,c.PH,c.YXQ,b.YPYZJBDW JBDW,b.YPYZJBJG,a.LOCKFLAG from HIS_YFFY_MZTYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_KSKC_PC c on a.KSKCPCPKEY=c.pkey where a.JGID=? and a.TYBPKEY=? order by a.pkey</sql>
|
|
<tables>
|
|
<table name="HIS_YFFY_MZTYMXB" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="YZDJC" type="12"/>
|
|
<f name="TYSLC" type="12"/>
|
|
<f name="TYJEC" type="12"/>
|
|
<f name="PKEY" type="12" table="HIS_YFFY_MZTYMXB" />
|
|
<f name="YZX" type="12" table="HIS_YFFY_MZTYMXB" />
|
|
<f name="YZMX" type="12" table="HIS_YFFY_MZTYMXB" />
|
|
<f name="YZDJ" type="12" table="HIS_YFFY_MZTYMXB" />
|
|
<f name="TYSL" type="12" table="HIS_YFFY_MZTYMXB" />
|
|
<f name="HZBQ" type="12" table="HIS_YFFY_MZTYMXB" />
|
|
<f name="HZKS" type="12" table="HIS_YFFY_MZTYMXB" />
|
|
<f name="TYKS" type="12" table="HIS_YFFY_MZTYMXB" />
|
|
<f name="HZPKEY" type="12" table="HIS_YFFY_MZTYMXB" />
|
|
<f name="YPFL" type="12" table="HIS_YFFY_MZTYMXB" />
|
|
<f name="JZPKEY" type="12" table="HIS_YFFY_MZTYMXB" />
|
|
<f name="TYBPKEY" type="12" table="HIS_YFFY_MZTYMXB" />
|
|
<f name="TYPE" type="12" table="HIS_YFFY_MZTYMXB" />
|
|
<f name="KSKCPKEY" type="12" table="HIS_YFFY_MZTYMXB" />
|
|
<f name="KSKCPCPKEY" type="12" table="HIS_YFFY_MZTYMXB" />
|
|
<f name="CJR" type="12" table="HIS_YFFY_MZTYMXB" />
|
|
<f name="CJRQ" type="93" table="HIS_YFFY_MZTYMXB" />
|
|
<f name="XGR" type="12" table="HIS_YFFY_MZTYMXB" />
|
|
<f name="XGRQ" type="93" table="HIS_YFFY_MZTYMXB" />
|
|
<f name="JGID" type="12" table="HIS_YFFY_MZTYMXB" />
|
|
<f name="MZFYMXBPKEY" type="12" table="HIS_YFFY_MZTYMXB" />
|
|
<f name="YZMC" type="12" />
|
|
<f name="YZDW" type="12" />
|
|
<f name="YZJZZHXS" type="12" />
|
|
<f name="PH" type="12" />
|
|
<f name="YXQ" type="93" />
|
|
<f name="JBDW" type="12" />
|
|
<f name="YPYZJBJG" type="12" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_YFFY_MZTYMXB" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
<dao id="mzyfTydDao" log="true" type="1" memo="门诊药房退药单dao">
|
|
<sql>select a.PKEY,a.HZPKEY,a.JZPKEY,a.MZFPPKEY,a.ZDZBPKEY,a.JZZDPKEY,a.JZMZFPPKEY,a.MZFYBPKEY,a.TYYF,a.TYRY,a.FYYF,a.TYYY,a.CJR,a.CJRQ,a.XGR,a.XGRQ,a.JGID,a.FYRQ,a.ISCX,a.CXRY,a.CXRQ,a.CFH,c.JZKH,b.XM,b.XB,c.JJKS,c.JJYS,d.JSZT,a.LOCKFLAG from HIS_YFFY_MZTYZB a left join HIS_HZINFO b on a.HZPKEY=b.pkey left join HIS_JZ_BASEINFO c on a.JZPKEY=c.pkey and a.JGID=c.JGID left join HIS_SFZD_ZB d on a.ZDZBPKEY=d.pkey where d.ISHC=0 and a.JGID =? and a.PKEY=? order by a.CJR desc</sql>
|
|
<tables>
|
|
<table name="HIS_YFFY_MZTYZB" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>JGID</primary>
|
|
<primary>ISCX</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_YFFY_MZTYZB" />
|
|
<f name="HZPKEY" type="12" table="HIS_YFFY_MZTYZB" />
|
|
<f name="JZPKEY" type="12" table="HIS_YFFY_MZTYZB" />
|
|
<f name="MZFPPKEY" type="12" table="HIS_YFFY_MZTYZB" />
|
|
<f name="ZDZBPKEY" type="12" table="HIS_YFFY_MZTYZB" />
|
|
<f name="JZZDPKEY" type="12" table="HIS_YFFY_MZTYZB" />
|
|
<f name="JZMZFPPKEY" type="12" table="HIS_YFFY_MZTYZB" />
|
|
<f name="MZFYBPKEY" type="12" table="HIS_YFFY_MZTYZB" />
|
|
<f name="TYYF" type="12" table="HIS_YFFY_MZTYZB" />
|
|
<f name="TYRY" type="12" table="HIS_YFFY_MZTYZB" />
|
|
<f name="FYYF" type="12" table="HIS_YFFY_MZTYZB" />
|
|
<f name="TYYY" type="12" table="HIS_YFFY_MZTYZB" />
|
|
<f name="CJR" type="12" table="HIS_YFFY_MZTYZB" />
|
|
<f name="CJRQ" type="93" table="HIS_YFFY_MZTYZB" />
|
|
<f name="XGR" type="12" table="HIS_YFFY_MZTYZB" />
|
|
<f name="XGRQ" type="93" table="HIS_YFFY_MZTYZB" />
|
|
<f name="JGID" type="12" table="HIS_YFFY_MZTYZB" />
|
|
<f name="FYRQ" type="93" table="HIS_YFFY_MZTYZB" />
|
|
<f name="ISCX" type="12" table="HIS_YFFY_MZTYZB" />
|
|
<f name="CXRY" type="12" table="HIS_YFFY_MZTYZB" />
|
|
<f name="CXRQ" type="93" table="HIS_YFFY_MZTYZB" />
|
|
<f name="CFH" type="12" table="HIS_YFFY_MZTYZB" />
|
|
<f name="JZKH" type="12" />
|
|
<f name="XM" type="12" />
|
|
<f name="XB" type="12" />
|
|
<f name="JJKS" type="12" />
|
|
<f name="JJYS" type="12" />
|
|
<f name="JSZT" type="12" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_YFFY_MZTYZB" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="mzZcyPopyfDao" log="true" type="1" memo="门诊中草药pop药房列表字典">
|
|
<sql>select a.DPTID,a.DPTCODE,a.DPTNAME,b.CJR,b.CJRQ,b.XGR,b.XGRQ,b.JGID,b.KSKEY,b.QYSF,b.CFSH,b.TQBY,b.PYQR,b.ZDDYPYD,b.PY,b.KKSTY,b.ZCY,a.DPTZJM from HIS_YFFY_MZFYKS_SETUP b left join MAIN_KS a on a.DPTID=b.KSKEY and a.JGID=b.JGID where b.ZCY = 1 and b.JGID=? and (a.DPTZJM like ? or a.DPTNAME like ?) order by a.DPTCODE</sql>
|
|
<tables>
|
|
<table name="HIS_YFFY_MZFYKS_SETUP" insert="true" update="true" delete="true">
|
|
<primary>JGID</primary>
|
|
<primary>YFPKEY</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="DPTID" type="12" />
|
|
<f name="DPTCODE" type="12" />
|
|
<f name="DPTNAME" type="12" />
|
|
<f name="CJR" type="12" table="HIS_YFFY_MZFYKS_SETUP" />
|
|
<f name="CJRQ" type="93" table="HIS_YFFY_MZFYKS_SETUP" />
|
|
<f name="XGR" type="12" table="HIS_YFFY_MZFYKS_SETUP" />
|
|
<f name="XGRQ" type="93" table="HIS_YFFY_MZFYKS_SETUP" />
|
|
<f name="JGID" type="12" table="HIS_YFFY_MZFYKS_SETUP" />
|
|
<f name="KSKEY" type="12" table="HIS_YFFY_MZFYKS_SETUP" />
|
|
<f name="QYSF" type="12" table="HIS_YFFY_MZFYKS_SETUP" />
|
|
<f name="CFSH" type="12" table="HIS_YFFY_MZFYKS_SETUP" />
|
|
<f name="TQBY" type="12" table="HIS_YFFY_MZFYKS_SETUP" />
|
|
<f name="PYQR" type="12" table="HIS_YFFY_MZFYKS_SETUP" />
|
|
<f name="ZDDYPYD" type="12" table="HIS_YFFY_MZFYKS_SETUP" />
|
|
<f name="PY" type="12" table="HIS_YFFY_MZFYKS_SETUP" />
|
|
<f name="KKSTY" type="12" table="HIS_YFFY_MZFYKS_SETUP" />
|
|
<f name="ZCY" type="12" table="HIS_YFFY_MZFYKS_SETUP" />
|
|
<f name="DPTZJM" type="12" />
|
|
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
<dao id="yffylbGlYzzlDao" log="true" type="1" memo="药房发药类别关联的医嘱子类dao">
|
|
<sql>select a.PKEY,a.YFLBPKEY,a.YZZLPKEY,a.ISZZFY,a.CJR,a.CJRQ,a.XGR,a.XGRQ,a.JGID from HIS_YFFY_FYLB_GLZL a where a.JGID=? and a.YFLBPKEY=? order by a.pkey</sql>
|
|
<tables>
|
|
<table name="HIS_YFFY_FYLB_GLZL" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>YFLBPKEY</primary>
|
|
<primary>YZZLPKEY</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_YFFY_FYLB_GLZL" />
|
|
<f name="YFLBPKEY" type="12" table="HIS_YFFY_FYLB_GLZL" />
|
|
<f name="YZZLPKEY" type="12" table="HIS_YFFY_FYLB_GLZL" />
|
|
<f name="ISZZFY" type="12" table="HIS_YFFY_FYLB_GLZL" />
|
|
<f name="CJR" type="12" table="HIS_YFFY_FYLB_GLZL" />
|
|
<f name="CJRQ" type="93" table="HIS_YFFY_FYLB_GLZL" />
|
|
<f name="XGR" type="12" table="HIS_YFFY_FYLB_GLZL" />
|
|
<f name="XGRQ" type="93" table="HIS_YFFY_FYLB_GLZL" />
|
|
<f name="JGID" type="12" table="HIS_YFFY_FYLB_GLZL" />
|
|
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
|
|
<dao id="findAllShowLbglzlDao" log="true" type="1" memo="显示所有发药类别可以关联的医嘱子类,包括已经关联和没有关联的医嘱子类">
|
|
<sql>select a.JGID,a.JGZDLB_BH,a.BH,a.MC,a.PYM,a.WBM,a.VALUE1,a.VALUE2,a.XH,a.ZT,a.VALUE3,a.VALUE4,a.VALUE5,b.YFLBPKEY from MAIN_JGZDB a left join HIS_YFFY_FYLB_GLZL b on b.YZZLPKEY=a.BH and a.JGZDLB_BH='Z00002' and a.JGID=b.JGID where a.JGID=? and a.JGZDLB_BH='Z00002' and (a.value2='01' or a.value2='02' or a.value2='03') and (b.YFLBPKEY is null or b.YFLBPKEY=?) order by a.XH asc,a.BH asc</sql>
|
|
<fields>
|
|
<f name="JGID" type="12" />
|
|
<f name="JGZDLB_BH" type="12" />
|
|
<f name="BH" type="12" />
|
|
<f name="MC" type="12" />
|
|
<f name="PYM" type="12" />
|
|
<f name="WBM" type="12" />
|
|
<f name="VALUE1" type="12" />
|
|
<f name="VALUE2" type="12" />
|
|
<f name="XH" type="-5" />
|
|
<f name="ZT" type="12" />
|
|
<f name="VALUE3" type="12" />
|
|
<f name="VALUE4" type="12" />
|
|
<f name="VALUE5" type="12" />
|
|
<f name="YFLBPKEY" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
|
|
<dao id="zyfykssetupDao" log="true" type="1" memo="住院发药科室基础参数设置dao">
|
|
<sql>
|
|
|
|
select PKEY,KSKEY,MRXSLX,MRBEGINDATE,MRKSSJ,MRENDDATE,MRJSSJ,HSSH,KZQF,MRXZFYLB,XYSSH,LRFYR,LRBYR,ISINAREAYP,CJR,CJRQ,XGR,XGRQ,JGID from HIS_YFFY_ZYFYKS_SETUP where JGID=? order by pkey
|
|
|
|
|
|
</sql>
|
|
<tables>
|
|
<table name="HIS_YFFY_ZYFYKS_SETUP" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>KSKEY</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_YFFY_ZYFYKS_SETUP" />
|
|
<f name="KSKEY" type="12" table="HIS_YFFY_ZYFYKS_SETUP" />
|
|
<f name="MRXSLX" type="12" table="HIS_YFFY_ZYFYKS_SETUP" />
|
|
<f name="MRBEGINDATE" type="-5" table="HIS_YFFY_ZYFYKS_SETUP" />
|
|
<f name="MRKSSJ" type="93" table="HIS_YFFY_ZYFYKS_SETUP" />
|
|
<f name="MRENDDATE" type="-5" table="HIS_YFFY_ZYFYKS_SETUP" />
|
|
<f name="MRJSSJ" type="93" table="HIS_YFFY_ZYFYKS_SETUP" />
|
|
<f name="HSSH" type="12" table="HIS_YFFY_ZYFYKS_SETUP" />
|
|
<f name="KZQF" type="12" table="HIS_YFFY_ZYFYKS_SETUP" />
|
|
<f name="MRXZFYLB" type="12" table="HIS_YFFY_ZYFYKS_SETUP" />
|
|
<f name="XYSSH" type="12" table="HIS_YFFY_ZYFYKS_SETUP" />
|
|
<f name="LRFYR" type="12" table="HIS_YFFY_ZYFYKS_SETUP" />
|
|
<f name="LRBYR" type="12" table="HIS_YFFY_ZYFYKS_SETUP" />
|
|
<f name="ISINAREAYP" type="12" table="HIS_YFFY_ZYFYKS_SETUP" />
|
|
<f name="CJR" type="12" table="HIS_YFFY_ZYFYKS_SETUP" />
|
|
<f name="CJRQ" type="93" table="HIS_YFFY_ZYFYKS_SETUP" />
|
|
<f name="XGR" type="12" table="HIS_YFFY_ZYFYKS_SETUP" />
|
|
<f name="XGRQ" type="93" table="HIS_YFFY_ZYFYKS_SETUP" />
|
|
<f name="JGID" type="12" table="HIS_YFFY_ZYFYKS_SETUP" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
|
|
<dao id="zyfyksfylbDao" log="true" type="1" memo="住院科室发药允许的发药类别Dao">
|
|
<sql>select PKEY,ZYFYKSPKEY,FYLBPKEY,ISJZSQTY,CJR,CJRQ,XGR,XGRQ,JGID from HIS_YFFY_ZYFYKS_FYLB where JGID=? and ZYFYKSPKEY=? order by pkey</sql>
|
|
<tables>
|
|
<table name="HIS_YFFY_ZYFYKS_FYLB" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>ZYFYKSPKEY</primary>
|
|
<primary>FYLBPKEY</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_YFFY_ZYFYKS_FYLB" />
|
|
<f name="ZYFYKSPKEY" type="12" table="HIS_YFFY_ZYFYKS_FYLB" />
|
|
<f name="FYLBPKEY" type="12" table="HIS_YFFY_ZYFYKS_FYLB" />
|
|
<f name="ISJZSQTY" type="12" table="HIS_YFFY_ZYFYKS_FYLB" />
|
|
<f name="CJR" type="12" table="HIS_YFFY_ZYFYKS_FYLB" />
|
|
<f name="CJRQ" type="93" table="HIS_YFFY_ZYFYKS_FYLB" />
|
|
<f name="XGR" type="12" table="HIS_YFFY_ZYFYKS_FYLB" />
|
|
<f name="XGRQ" type="93" table="HIS_YFFY_ZYFYKS_FYLB" />
|
|
<f name="JGID" type="12" table="HIS_YFFY_ZYFYKS_FYLB" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
|
|
<dao id="zyfyksflyshyzzlDao" log="true" type="1" memo="住院发药科室不需要领药审核的医嘱子类dao">
|
|
<sql>select PKEY,ZYFYKSPKEY,YZZLPKEY,CJR,CJRQ,XGR,XGRQ,JGID from HIS_YFFY_ZYFYKS_FLYSHYZZL where JGID=? and ZYFYKSPKEY=? order by pkey</sql>
|
|
<tables>
|
|
<table name="HIS_YFFY_ZYFYKS_FLYSHYZZL" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>ZYFYKSPKEY</primary>
|
|
<primary>YZZLPKEY</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_YFFY_ZYFYKS_FLYSHYZZL" />
|
|
<f name="ZYFYKSPKEY" type="12" table="HIS_YFFY_ZYFYKS_FLYSHYZZL" />
|
|
<f name="YZZLPKEY" type="12" table="HIS_YFFY_ZYFYKS_FLYSHYZZL" />
|
|
<f name="CJR" type="12" table="HIS_YFFY_ZYFYKS_FLYSHYZZL" />
|
|
<f name="CJRQ" type="93" table="HIS_YFFY_ZYFYKS_FLYSHYZZL" />
|
|
<f name="XGR" type="12" table="HIS_YFFY_ZYFYKS_FLYSHYZZL" />
|
|
<f name="XGRQ" type="93" table="HIS_YFFY_ZYFYKS_FLYSHYZZL" />
|
|
<f name="JGID" type="12" table="HIS_YFFY_ZYFYKS_FLYSHYZZL" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
|
|
<dao id="zyhslyshhzDao" log="true" type="1" memo="护士领药审核汇总数据区dao">
|
|
<sql><![CDATA[
|
|
|
|
select yzxpkey,ward,YZZXKS,YPYZJBDW,YZJZZHXS,sum(yzsl) yzsl,YZMC,GG,kc,yswf,tsbz,YZLX,YZZCYFS,dwview from (select b.yzxpkey,d.ward,b.YZZXKS,b.YPYZJBDW,b.YZJZZHXS,a.yzsl*b.YZJZZHXS yzsl,b.YZMC,c.GG,(select kysl from HIS_KSKC where sfx_bm=b.yzxpkey and dptid=b.yzzxks and JGID=a.JGID) kc,0 yswf,'' tsbz,b.YZLX,b.YZZCYFS,f.dwview from HIS_YFFY_PYB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_YPXX c on a.YZX=c.BM left join HIS_JZ_BASEINFO d on a.JZPKEY=d.pkey and a.JGID=d.JGID left join HIS_YZ_EXEC e on a.DFYPKEY=e.pkey and a.JGID=e.JGID left join HIS_SFX f on a.YZX=f.BM and a.JGID=f.JGID where a.TYPE='Z' and a.FYCX=0 and (d.JZLX='Z' or (d.JZLX='J' AND d.sflg='1')) AND d.JZZT='Z' and a.JGID=? and a.JZPKEY in(#jzpkey#) #yzcl# #yf# #yp# #ypfy# #ypsh# and e.zxflag=1 and e.zxtime >=? and e.zxtime <= ? ) group by yzxpkey,ward,YZZXKS,YPYZJBDW,YZJZZHXS,YZMC,gg,kc,yswf,tsbz,YZLX,YZZCYFS,dwview order by ward,YZZXKS,yzxpkey
|
|
|
|
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="YZXPKEY" type="12" />
|
|
<f name="WARD" type="12" />
|
|
<f name="YZZXKS" type="12" />
|
|
<f name="YPYZJBDW" type="12" />
|
|
<f name="YZJZZHXS" type="12" />
|
|
<f name="YZSL" type="4" />
|
|
<f name="YZMC" type="12" />
|
|
<f name="GG" type="12" />
|
|
<f name="KC" type="8" />
|
|
<f name="YSWF" type="8" />
|
|
<f name="TSBZ" type="1" />
|
|
<f name="YZLX" type="12" />
|
|
<f name="YZZCYFS" type="12" />
|
|
<f name="DWVIEW" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
|
|
<dao id="zyhslyshmxDao" log="true" type="1" memo="护士领药审核明细数据区dao">
|
|
<sql><![CDATA[
|
|
|
|
select a.PKEY,a.YZX,a.YZMX,a.YZDJ,a.YZSL,a.DFYPKEY,a.FYMXPKEY,a.HZBQ,a.HZKS,a.FYKS,a.HZPKEY,a.YPFL,a.JZPKEY,a.TYPE,a.CJR,a.CJRQ,a.XGR,a.XGRQ,a.JGID,a.YZDL,a.TYSL,a.SFSL,a.SFLYSH,a.SFYSSH,a.LYSHR,a.LYSHRQ,a.YSSHR,a.YSSHRQ,a.FYZT,d.ward,d.bed,d.jjys,f.xm,e.zxtime,a.yzsl*b.YZJZZHXS jzyzsl,b.YPYZJBDW,b.YZJZZHXS,b.YZMC,c.GG,b.YZJL,b.YZJLDW,b.YZPC,b.yzcl,e.zxflag,a.FYCX,a.LOCKFLAG,b.ps,b.psjg,b.psbz,b.yzlb,b.YZSCZXCS,b.YZKZXTS,b.YZDAYCS,b.YZDW,b.cfh from HIS_YFFY_PYB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_YPXX c on a.YZX=c.BM left join HIS_JZ_BASEINFO d on a.JZPKEY=d.pkey and a.JGID=d.JGID left join HIS_YZ_EXEC e on a.DFYPKEY=e.pkey and a.JGID=e.JGID left join HIS_HZINFO f on a.hzpkey=f.pkey and a.JGID=f.JGID where a.TYPE='Z' and (d.JZLX='Z' or (d.JZLX='J' AND d.SFLG='1')) AND d.JZZT='Z' and a.FYCX=0 and a.JGID=? and a.JZPKEY in(#jzpkey#) #yzcl# #yf# #yp# #ypfy# #ypsh# and e.zxflag=1 and e.zxtime >=? and e.zxtime <= ? and d.ward=? and b.YZZXKS=? and a.yzx=?
|
|
|
|
|
|
|
|
]]></sql>
|
|
|
|
<tables>
|
|
<table name="HIS_YFFY_PYB" insert="false" update="true" delete="false">
|
|
<primary>PKEY</primary>
|
|
<primary>YZX</primary>
|
|
<primary>YZMX</primary>
|
|
<primary>JGID</primary>
|
|
<primary>SFYSSH</primary>
|
|
<primary>SFLYSH</primary>
|
|
<primary>FYZT</primary>
|
|
<primary>FYCX</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="YZX" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="YZMX" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="YZDJ" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="YZSL" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="DFYPKEY" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="FYMXPKEY" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="HZBQ" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="HZKS" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="FYKS" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="HZPKEY" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="YPFL" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="JZPKEY" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="TYPE" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="CJR" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="CJRQ" type="93" table="HIS_YFFY_PYB" />
|
|
<f name="XGR" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="XGRQ" type="93" table="HIS_YFFY_PYB" />
|
|
<f name="JGID" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="YZDL" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="TYSL" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="SFSL" 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="WARD" type="12" />
|
|
<f name="BED" type="12" />
|
|
<f name="JJYS" type="12" />
|
|
<f name="XM" type="12" />
|
|
<f name="ZXTIME" type="93" />
|
|
<f name="JZYZSL" type="4" />
|
|
<f name="YPYZJBDW" type="12" />
|
|
<f name="YZJZZHXS" type="12" />
|
|
<f name="YZMC" type="12" />
|
|
<f name="GG" type="12" />
|
|
<f name="YZJL" type="12" />
|
|
<f name="YZJLDW" type="12" />
|
|
<f name="YZPC" type="12" />
|
|
<f name="YZCL" type="12" />
|
|
<f name="ZXFLAG" type="12" />
|
|
<f name="FYCX" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="LOCKFLAG" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="PS" type="12" />
|
|
<f name="PSJG" type="12" />
|
|
<f name="PSBZ" type="12" />
|
|
<f name="YZLB" type="12" />
|
|
<f name="YZSCZXCS" type="12" />
|
|
<f name="YZKZXTS" type="12" />
|
|
<f name="YZDAYCS" type="12" />
|
|
<f name="YZDW" type="12" />
|
|
<f name="CFH" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
|
|
<dao id="yffylbglyzzlDic" log="true" cache="true" type="1" memo="药房发药类别关联医嘱子类字典">
|
|
<sql>SELECT PKEY,YFLBPKEY,YZZLPKEY,ISZZFY,CJR,CJRQ,XGR,XGRQ,JGID FROM HIS_YFFY_FYLB_GLZL WHERE JGID=? ORDER BY PKEY</sql>
|
|
<tables>
|
|
<table name="HIS_YFFY_FYLB_GLZL" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>YFLBPKEY</primary>
|
|
<primary>YZZLPKEY</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_YFFY_FYLB_GLZL" />
|
|
<f name="YFLBPKEY" type="12" table="HIS_YFFY_FYLB_GLZL" />
|
|
<f name="YZZLPKEY" type="12" table="HIS_YFFY_FYLB_GLZL" />
|
|
<f name="ISZZFY" type="12" table="HIS_YFFY_FYLB_GLZL" />
|
|
<f name="CJR" type="12" table="HIS_YFFY_FYLB_GLZL" />
|
|
<f name="CJRQ" type="93" table="HIS_YFFY_FYLB_GLZL" />
|
|
<f name="XGR" type="12" table="HIS_YFFY_FYLB_GLZL" />
|
|
<f name="XGRQ" type="93" table="HIS_YFFY_FYLB_GLZL" />
|
|
<f name="JGID" type="12" table="HIS_YFFY_FYLB_GLZL" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
|
|
<dao id="zyyffyPybMxDao" log="true" type="1" memo="住院药房发药的发药明细dao">
|
|
<sql><![CDATA[
|
|
|
|
select 0 flag,b.cfh,d.JJKS,d.ZYNO,a.PKEY,a.YZX,a.YZMX,a.YZDJ,a.YZSL,a.DFYPKEY,a.FYMXPKEY,a.HZBQ,a.HZKS,a.FYKS,a.HZPKEY,a.YPFL,a.JZPKEY,a.TYPE,a.CJR,a.CJRQ,a.XGR,a.XGRQ,a.JGID,a.YZDL,a.TYSL,a.SFSL,a.SFLYSH,a.SFYSSH,a.LYSHR,a.LYSHRQ,a.YSSHR,a.YSSHRQ,a.FYZT,d.ward,d.bed,d.jjys,f.xm,e.zxtime,a.yzsl*b.YZJZZHXS jzyzsl,b.YPYZJBDW,b.YZJZZHXS,b.YZMC,c.GG,b.YZJL,b.YZJLDW,b.YZPC,b.yzcl,e.pkey execpkey,e.SFFLAG,b.YPYZJBJG,a.yzsl*b.yzjzzhxs*b.YPYZJBJG je,b.YZJX,a.SFSL*b.YZJZZHXS jzsfsl,e.zxsl,e.zxje,b.yzxpkey,b.YZXZSJ,e.ISACTION,b.YZLX,b.YZZCYFS,b.YZYF,a.FYCX,e.ZXFLAG,a.LOCKFLAG,g.dwview,g.ybbm,g.ybmc,(select count(1) num from HIS_SFZD_SFXMXB where a.YZMX=yzmx and e.pkey=EXEPKEY and (JSZT='1' or JSZT='0') and a.JGID=JGID) sfxnum,a.YPFYSJMS,b.YPYZBZJG,b.YPYZBZDW,b.YZDW,b.YPYZZHXS,a.DFYZJE,c.bm,b.SFYFJJFY,b.pkey yzmxpkey,d.jjrq,f.xb,d.jznl,d.JZZDNAMELIST from HIS_YFFY_PYB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_YPXX c on a.YZX=c.BM left join HIS_JZ_BASEINFO d on a.JZPKEY=d.pkey and a.JGID=d.JGID left join HIS_YZ_EXEC e on a.DFYPKEY=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_SFX g on a.YZX=g.bm and a.JGID=g.JGID where #FYZT# AND a.TYPE='Z' AND a.FYCX=0 and (d.JZLX='Z' or (d.JZLX='J' AND d.SFLG='1')) AND d.JZZT='Z' AND a.FYCX=0 and a.PYLX='1' and b.SFYFJJFY !='1' and a.JGID=? #ward# #yzcl# #yf# #ypfl# #ypbm# #zyno# #yplysh# and e.zxtime >=? and e.zxtime <= ? order by d.zyno,b.cfh,a.yzx
|
|
|
|
|
|
|
|
]]></sql>
|
|
<tables>
|
|
<table name="HIS_YFFY_PYB" insert="false" update="true" delete="false">
|
|
<primary>PKEY</primary>
|
|
<primary>YZMX</primary>
|
|
<primary>FYMXPKEY</primary>
|
|
<primary>FYZT</primary>
|
|
<primary>FYCX</primary>
|
|
</table>
|
|
<table name="HIS_YZ_EXEC" insert="false" update="true" delete="false">
|
|
<primary>EXECPKEY</primary>
|
|
<primary>YZMX</primary>
|
|
<primary>JZPKEY</primary>
|
|
<primary>SFFLAG</primary>
|
|
<primary>ISACTION</primary>
|
|
<primary>ZXFLAG</primary>
|
|
</table>
|
|
<table name="HIS_YZ_MXB" insert="false" update="true" delete="false">
|
|
<primary>SFYFJJFY</primary>
|
|
<primary>yzmxpkey</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="flag" type="8" />
|
|
<f name="CFH" type="12" />
|
|
<f name="JJKS" type="12" />
|
|
<f name="ZYNO" type="12" />
|
|
<f name="PKEY" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="YZX" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="YZMX" type="12" table="HIS_YFFY_PYB,HIS_YZ_EXEC" />
|
|
<f name="YZDJ" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="YZSL" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="DFYPKEY" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="FYMXPKEY" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="HZBQ" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="HZKS" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="FYKS" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="HZPKEY" type="12" table="HIS_YFFY_PYB,HIS_YZ_EXEC" />
|
|
<f name="YPFL" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="JZPKEY" type="12" table="HIS_YFFY_PYB,HIS_YZ_EXEC" />
|
|
<f name="TYPE" type="12" table="HIS_YFFY_PYB" />
|
|
<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,HIS_YZ_MXB" />
|
|
<f name="YZDL" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="TYSL" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="SFSL" 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="WARD" type="12" />
|
|
<f name="BED" type="12" />
|
|
<f name="JJYS" type="12" />
|
|
<f name="XM" type="12" />
|
|
<f name="ZXTIME" type="93" table="HIS_YZ_EXEC" />
|
|
<f name="JZYZSL" type="4" />
|
|
<f name="YPYZJBDW" type="12" />
|
|
<f name="YZJZZHXS" type="12" />
|
|
<f name="YZMC" type="12" table="HIS_YZ_EXEC" />
|
|
<f name="GG" type="12" />
|
|
<f name="YZJL" type="12" />
|
|
<f name="YZJLDW" type="12" />
|
|
<f name="YZPC" type="12" />
|
|
<f name="YZCL" type="12" />
|
|
<f name="EXECPKEY" schemaname="PKEY" type="12" table="HIS_YZ_EXEC" />
|
|
<f name="SFFLAG" type="12" table="HIS_YZ_EXEC" />
|
|
<f name="YPYZJBJG" type="12" />
|
|
<f name="JE" type="12" />
|
|
<f name="YZJX" type="12" />
|
|
<f name="JZSFSL" type="12" />
|
|
<f name="zxsl" type="12" table="HIS_YZ_EXEC" />
|
|
<f name="zxje" type="12" table="HIS_YZ_EXEC" />
|
|
<f name="yzxpkey" type="12" />
|
|
<f name="YZXZSJ" type="93" />
|
|
<f name="ISACTION" type="12" table="HIS_YZ_EXEC" />
|
|
<f name="YZLX" type="12" />
|
|
<f name="YZZCYFS" type="12" />
|
|
<f name="YZYF" type="12" />
|
|
<f name="FYCX" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="ZXFLAG" type="12" table="HIS_YZ_EXEC" />
|
|
<f name="LOCKFLAG" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="DWVIEW" type="12" />
|
|
<f name="YBBM" type="12" />
|
|
<f name="YBMC" type="12" />
|
|
<f name="sfxnum" type="8" />
|
|
<f name="YPFYSJMS" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="YPYZBZJG" type="12" />
|
|
<f name="YPYZBZDW" type="12" />
|
|
<f name="YZDW" type="12" />
|
|
<f name="YPYZZHXS" type="12" />
|
|
<f name="DFYZJE" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="BM" type="12" />
|
|
<f name="SFYFJJFY" type="12" table="HIS_YZ_MXB" />
|
|
<f name="yzmxpkey" schemaname="PKEY" type="12" table="HIS_YZ_MXB" />
|
|
<f name="JJRQ" type="93" />
|
|
<f name="XB" type="12" />
|
|
<f name="JZNL" type="12" />
|
|
<f name="JZZDNAMELIST" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
<dao id="zyyffyhzDao" log="true" type="1">
|
|
<sql><![CDATA[
|
|
select yzx,
|
|
ward,
|
|
YZMC,
|
|
sum(jzyzsl) sl,
|
|
YPYZJBDW,
|
|
YZJX,
|
|
'' glmx,
|
|
gg,
|
|
'' cs,
|
|
YPFL,
|
|
YZLX,
|
|
dwview,
|
|
ybbm,
|
|
ybmc,
|
|
YPYZBZDW,
|
|
YPYZZHXS,
|
|
JJKS,
|
|
bm
|
|
from (select a.PKEY,
|
|
a.YZX,
|
|
a.YZMX,
|
|
a.YZDJ,
|
|
a.YZSL,
|
|
a.DFYPKEY,
|
|
a.FYMXPKEY,
|
|
a.HZBQ,
|
|
a.HZKS,
|
|
a.FYKS,
|
|
a.HZPKEY,
|
|
a.YPFL,
|
|
a.JZPKEY,
|
|
a.TYPE,
|
|
a.CJR,
|
|
a.CJRQ,
|
|
a.XGR,
|
|
a.XGRQ,
|
|
a.JGID,
|
|
a.YZDL,
|
|
a.TYSL,
|
|
a.SFSL,
|
|
a.SFLYSH,
|
|
a.SFYSSH,
|
|
a.LYSHR,
|
|
a.LYSHRQ,
|
|
a.YSSHR,
|
|
a.YSSHRQ,
|
|
a.FYZT,
|
|
d.ward,
|
|
d.bed,
|
|
d.jjys,
|
|
f.xm,
|
|
e.zxtime,
|
|
a.yzsl * b.YZJZZHXS jzyzsl,
|
|
b.YPYZJBDW,
|
|
b.YZJZZHXS,
|
|
b.YZMC,
|
|
c.GG,
|
|
b.YZJL,
|
|
b.YZJLDW,
|
|
b.YZPC,
|
|
b.yzcl,
|
|
e.pkey execpkey,
|
|
e.SFFLAG,
|
|
b.YPYZJBJG,
|
|
a.yzsl * b.yzjzzhxs * b.YPYZJBJG je,
|
|
b.YZJX,
|
|
b.YZLX,
|
|
g.dwview,
|
|
g.ybbm,
|
|
g.ybmc,
|
|
a.YPFYSJMS,
|
|
b.YPYZBZJG,
|
|
b.YPYZBZDW,
|
|
b.YPYZZHXS,
|
|
d.JJKS,
|
|
c.bm
|
|
from HIS_YFFY_PYB a
|
|
left join HIS_YZ_MXB b on a.YZMX = b.PKEY and a.JGID = b.JGID
|
|
left join HIS_YPXX c on a.YZX = c.BM
|
|
left join HIS_JZ_BASEINFO d on a.JZPKEY = d.pkey and a.JGID = d.JGID
|
|
left join HIS_YZ_EXEC e on a.DFYPKEY = 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_SFX g on a.YZX = g.bm and a.JGID = g.JGID
|
|
|
|
where #FYZT#
|
|
AND a.TYPE = 'Z'
|
|
and (d.JZLX = 'Z' or (d.JZLX = 'J' AND d.SFLG = '1'))
|
|
AND d.JZZT = 'Z'
|
|
AND a.FYCX = 0
|
|
and a.PYLX = '1'
|
|
and b.SFYFJJFY != '1'
|
|
and a.JGID = ? #ward# #yzcl# #yf# #ypfl# #ypbm# #zyno# #yplysh# and e.zxtime >=? and e.zxtime <= ?)
|
|
group by ward, YZMC, YPYZJBDW, YZJX, gg, YPFL, yzx, YZLX, dwview, ybbm, ybmc, YPYZBZDW, YPYZZHXS, JJKS, bm
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="YZX" type="12" />
|
|
<f name="WARD" type="12" />
|
|
<f name="YZMC" type="12" />
|
|
<f name="SL" type="4" />
|
|
<f name="YPYZJBDW" type="12" />
|
|
<f name="YZJX" type="12" />
|
|
<f name="GLMX" type="1" />
|
|
<f name="GG" type="12" />
|
|
<f name="CS" type="1" />
|
|
<f name="YPFL" type="12" />
|
|
<f name="YZLX" type="12" />
|
|
<f name="DWVIEW" type="12" />
|
|
<f name="YBBM" type="12" />
|
|
<f name="YBMC" type="12" />
|
|
<f name="YPYZBZDW" type="12" />
|
|
<f name="YPYZZHXS" type="12" />
|
|
<f name="JJKS" type="12" />
|
|
<f name="BM" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="zyfybydjhDao" log="true" type="1" memo="用于住院发药按住院登记号进行处理dao">
|
|
<sql>
|
|
|
|
select a.PKEY,a.HZPKEY,a.GHPKEY,a.JZLX,a.JZZT,a.JZZB,a.HZFB,a.JZJS,a.ISYB,a.ISZZ,a.YYLX,a.ISLG,a.ISGSSJJ,a.HZYBLX,a.JJKS,a.JJRQ,a.JJYS,a.FBRQ,a.ZYNUM,a.WARD,a.ROOM,a.BED,a.KZRQ,a.JSRQ,a.THRY,a.HDYY,a.HDRQ,a.MZNUM,a.CJR,a.CJRQ,a.JGID,a.JZNO,a.MZNO,a.ZYNO,a.JZKH,a.CARDPKEY,a.JZNL,a.ISJZ,a.ZYLX,a.ZYHZLY,a.ZYYYRQ,a.CYRQ,a.CYYS,a.ZYNOOLD,a.SCZYRQ,a.ISGL,a.ISSJ,a.HZLX,a.GRLX,a.QTGRLX,a.CWFJLX,a.YSLX,a.MQJZINFO,a.ZKRQ,a.RYTJ,a.RYBQ,a.RYJZINFO,a.RYYS,a.RYQK,a.JZZL,a.JYYJ,a.ZYBZ,a.RYZD,a.RYZDMS,a.ZYBAH,a.RYNL,a.RYXSENLD,a.RYXSENLH,a.RYXSENLS,a.ZYZH,a.JZKLX,a.CRFS,a.OTHERCRFS,a.MAINBLYS,a.MAINBLXS,a.MOTHERJZPKEY,a.ZKDATE,a.RQDATE,a.CYKS,a.CYWARD,a.CYBED,b.xm,b.xb from HIS_JZ_BASEINFO a left join HIS_HZINFO b on a.hzpkey=b.pkey and a.JGID=b.JGID where (a.JZLX='Z' or (a.JZLX='J' AND a.SFLG='1')) and a.JZZT='Z' and a.JGID=?
|
|
|
|
</sql>
|
|
<tables>
|
|
<table name="HIS_JZ_BASEINFO" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>HZPKEY</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_JZ_BASEINFO" />
|
|
<f name="HZPKEY" type="12" table="HIS_JZ_BASEINFO" />
|
|
<f name="GHPKEY" type="12" table="HIS_JZ_BASEINFO" />
|
|
<f name="JZLX" type="12" table="HIS_JZ_BASEINFO" />
|
|
<f name="JZZT" type="12" table="HIS_JZ_BASEINFO" />
|
|
<f name="JZZB" type="12" table="HIS_JZ_BASEINFO" />
|
|
<f name="HZFB" type="12" table="HIS_JZ_BASEINFO" />
|
|
<f name="JZJS" type="12" table="HIS_JZ_BASEINFO" />
|
|
<f name="ISYB" type="12" table="HIS_JZ_BASEINFO" />
|
|
<f name="ISZZ" type="12" table="HIS_JZ_BASEINFO" />
|
|
<f name="YYLX" type="12" table="HIS_JZ_BASEINFO" />
|
|
<f name="ISLG" type="12" table="HIS_JZ_BASEINFO" />
|
|
<f name="ISGSSJJ" type="12" table="HIS_JZ_BASEINFO" />
|
|
<f name="HZYBLX" type="12" table="HIS_JZ_BASEINFO" />
|
|
<f name="JJKS" type="12" table="HIS_JZ_BASEINFO" />
|
|
<f name="JJRQ" type="93" table="HIS_JZ_BASEINFO" />
|
|
<f name="JJYS" type="12" table="HIS_JZ_BASEINFO" />
|
|
<f name="FBRQ" type="93" table="HIS_JZ_BASEINFO" />
|
|
<f name="ZYNUM" type="8" table="HIS_JZ_BASEINFO" />
|
|
<f name="WARD" type="12" table="HIS_JZ_BASEINFO" />
|
|
<f name="ROOM" type="12" table="HIS_JZ_BASEINFO" />
|
|
<f name="BED" type="12" table="HIS_JZ_BASEINFO" />
|
|
<f name="KZRQ" type="93" table="HIS_JZ_BASEINFO" />
|
|
<f name="JSRQ" type="93" table="HIS_JZ_BASEINFO" />
|
|
<f name="THRY" type="12" table="HIS_JZ_BASEINFO" />
|
|
<f name="HDYY" type="12" table="HIS_JZ_BASEINFO" />
|
|
<f name="HDRQ" type="93" table="HIS_JZ_BASEINFO" />
|
|
<f name="MZNUM" type="8" table="HIS_JZ_BASEINFO" />
|
|
<f name="CJR" type="12" table="HIS_JZ_BASEINFO" />
|
|
<f name="CJRQ" type="93" table="HIS_JZ_BASEINFO" />
|
|
<f name="JGID" type="12" table="HIS_JZ_BASEINFO" />
|
|
<f name="JZNO" type="12" table="HIS_JZ_BASEINFO" />
|
|
<f name="MZNO" type="12" table="HIS_JZ_BASEINFO" />
|
|
<f name="ZYNO" type="12" table="HIS_JZ_BASEINFO" />
|
|
<f name="JZKH" type="12" table="HIS_JZ_BASEINFO" />
|
|
<f name="CARDPKEY" type="12" table="HIS_JZ_BASEINFO" />
|
|
<f name="JZNL" type="12" table="HIS_JZ_BASEINFO" />
|
|
<f name="ISJZ" type="12" table="HIS_JZ_BASEINFO" />
|
|
<f name="ZYLX" type="12" table="HIS_JZ_BASEINFO" />
|
|
<f name="ZYHZLY" type="12" table="HIS_JZ_BASEINFO" />
|
|
<f name="ZYYYRQ" type="93" table="HIS_JZ_BASEINFO" />
|
|
<f name="CYRQ" type="93" table="HIS_JZ_BASEINFO" />
|
|
<f name="CYYS" type="12" table="HIS_JZ_BASEINFO" />
|
|
<f name="ZYNOOLD" type="12" table="HIS_JZ_BASEINFO" />
|
|
<f name="SCZYRQ" type="93" table="HIS_JZ_BASEINFO" />
|
|
<f name="ISGL" type="12" table="HIS_JZ_BASEINFO" />
|
|
<f name="ISSJ" type="12" table="HIS_JZ_BASEINFO" />
|
|
<f name="HZLX" type="12" table="HIS_JZ_BASEINFO" />
|
|
<f name="GRLX" type="12" table="HIS_JZ_BASEINFO" />
|
|
<f name="QTGRLX" type="12" table="HIS_JZ_BASEINFO" />
|
|
<f name="CWFJLX" type="12" table="HIS_JZ_BASEINFO" />
|
|
<f name="YSLX" type="12" table="HIS_JZ_BASEINFO" />
|
|
<f name="MQJZINFO" type="12" table="HIS_JZ_BASEINFO" />
|
|
<f name="ZKRQ" type="93" table="HIS_JZ_BASEINFO" />
|
|
<f name="RYTJ" type="12" table="HIS_JZ_BASEINFO" />
|
|
<f name="RYBQ" type="12" table="HIS_JZ_BASEINFO" />
|
|
<f name="RYJZINFO" type="12" table="HIS_JZ_BASEINFO" />
|
|
<f name="RYYS" type="12" table="HIS_JZ_BASEINFO" />
|
|
<f name="RYQK" type="12" table="HIS_JZ_BASEINFO" />
|
|
<f name="JZZL" type="12" table="HIS_JZ_BASEINFO" />
|
|
<f name="JYYJ" type="-5" table="HIS_JZ_BASEINFO" />
|
|
<f name="ZYBZ" type="12" table="HIS_JZ_BASEINFO" />
|
|
<f name="RYZD" type="12" table="HIS_JZ_BASEINFO" />
|
|
<f name="RYZDMS" type="12" table="HIS_JZ_BASEINFO" />
|
|
<f name="ZYBAH" type="12" table="HIS_JZ_BASEINFO" />
|
|
<f name="RYNL" type="12" table="HIS_JZ_BASEINFO" />
|
|
<f name="RYXSENLD" type="-5" table="HIS_JZ_BASEINFO" />
|
|
<f name="RYXSENLH" type="-5" table="HIS_JZ_BASEINFO" />
|
|
<f name="RYXSENLS" type="-5" table="HIS_JZ_BASEINFO" />
|
|
<f name="ZYZH" type="12" table="HIS_JZ_BASEINFO" />
|
|
<f name="JZKLX" type="12" table="HIS_JZ_BASEINFO" />
|
|
<f name="CRFS" type="12" table="HIS_JZ_BASEINFO" />
|
|
<f name="OTHERCRFS" type="12" table="HIS_JZ_BASEINFO" />
|
|
<f name="MAINBLYS" type="12" table="HIS_JZ_BASEINFO" />
|
|
<f name="MAINBLXS" type="12" table="HIS_JZ_BASEINFO" />
|
|
<f name="MOTHERJZPKEY" type="12" table="HIS_JZ_BASEINFO" />
|
|
<f name="ZKDATE" type="93" table="HIS_JZ_BASEINFO" />
|
|
<f name="RQDATE" type="93" table="HIS_JZ_BASEINFO" />
|
|
<f name="CYKS" type="12" table="HIS_JZ_BASEINFO" />
|
|
<f name="CYWARD" type="12" table="HIS_JZ_BASEINFO" />
|
|
<f name="CYBED" type="12" table="HIS_JZ_BASEINFO" />
|
|
<f name="XM" type="12" />
|
|
<f name="XB" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
|
|
<dao id="zyfyParamsDao" log="true" type="1" memo="住院发药参数dao">
|
|
<sql>select PKEY,KSKEY,MRXSLX,MRBEGINDATE,MRKSSJ,MRENDDATE,MRJSSJ,HSSH,KZQF,MRXZFYLB,XYSSH,LRFYR,LRBYR,ISINAREAYP,CJR,CJRQ,XGR,XGRQ,JGID from HIS_YFFY_ZYFYKS_SETUP where JGID=? and KSKEY=?</sql>
|
|
<tables>
|
|
<table name="HIS_YFFY_ZYFYKS_SETUP" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>KSKEY</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_YFFY_ZYFYKS_SETUP" />
|
|
<f name="KSKEY" type="12" table="HIS_YFFY_ZYFYKS_SETUP" />
|
|
<f name="MRXSLX" type="12" table="HIS_YFFY_ZYFYKS_SETUP" />
|
|
<f name="MRBEGINDATE" type="-5" table="HIS_YFFY_ZYFYKS_SETUP" />
|
|
<f name="MRKSSJ" type="93" table="HIS_YFFY_ZYFYKS_SETUP" />
|
|
<f name="MRENDDATE" type="-5" table="HIS_YFFY_ZYFYKS_SETUP" />
|
|
<f name="MRJSSJ" type="93" table="HIS_YFFY_ZYFYKS_SETUP" />
|
|
<f name="HSSH" type="12" table="HIS_YFFY_ZYFYKS_SETUP" />
|
|
<f name="KZQF" type="12" table="HIS_YFFY_ZYFYKS_SETUP" />
|
|
<f name="MRXZFYLB" type="12" table="HIS_YFFY_ZYFYKS_SETUP" />
|
|
<f name="XYSSH" type="12" table="HIS_YFFY_ZYFYKS_SETUP" />
|
|
<f name="LRFYR" type="12" table="HIS_YFFY_ZYFYKS_SETUP" />
|
|
<f name="LRBYR" type="12" table="HIS_YFFY_ZYFYKS_SETUP" />
|
|
<f name="ISINAREAYP" type="12" table="HIS_YFFY_ZYFYKS_SETUP" />
|
|
<f name="CJR" type="12" table="HIS_YFFY_ZYFYKS_SETUP" />
|
|
<f name="CJRQ" type="93" table="HIS_YFFY_ZYFYKS_SETUP" />
|
|
<f name="XGR" type="12" table="HIS_YFFY_ZYFYKS_SETUP" />
|
|
<f name="XGRQ" type="93" table="HIS_YFFY_ZYFYKS_SETUP" />
|
|
<f name="JGID" type="12" table="HIS_YFFY_ZYFYKS_SETUP" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
|
|
<dao id="zyfylbParamsDao" log="true" type="1" memo="住院发药类别dao">
|
|
<sql>select a.ZYFYKSPKEY,a.FYLBPKEY,a.ISJZSQTY,b.BM,b.MC,b.ISDYMX,b.ISDYHZ,b.ISYL,b.ISCJTY,b.ISFSBZFY,b.ISJTYSQD,b.pkey from HIS_YFFY_ZYFYKS_FYLB a left join HIS_YFFY_FYLB b on a.FYLBPKEY=b.pkey where a.JGID=? and a.ZYFYKSPKEY=? order by b.pkey</sql>
|
|
<tables>
|
|
<table name="HIS_YFFY_FYLB" insert="true" update="true" delete="true">
|
|
<primary>BM</primary>
|
|
</table>
|
|
<table name="HIS_YFFY_ZYFYKS_FYLB" insert="true" update="true" delete="true">
|
|
<primary>ZYFYKSPKEY</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="ZYFYKSPKEY" type="12" table="HIS_YFFY_ZYFYKS_FYLB" />
|
|
<f name="FYLBPKEY" type="12" table="HIS_YFFY_ZYFYKS_FYLB" />
|
|
<f name="ISJZSQTY" type="12" table="HIS_YFFY_ZYFYKS_FYLB" />
|
|
<f name="BM" type="12" table="HIS_YFFY_FYLB" />
|
|
<f name="MC" type="12" table="HIS_YFFY_FYLB" />
|
|
<f name="ISDYMX" type="12" table="HIS_YFFY_FYLB" />
|
|
<f name="ISDYHZ" type="12" table="HIS_YFFY_FYLB" />
|
|
<f name="ISYL" type="12" table="HIS_YFFY_FYLB" />
|
|
<f name="ISCJTY" type="12" table="HIS_YFFY_FYLB" />
|
|
<f name="ISFSBZFY" type="12" table="HIS_YFFY_FYLB" />
|
|
<f name="ISJTYSQD" type="12" table="HIS_YFFY_FYLB" />
|
|
<f name="PKEY" type="12" table="HIS_YFFY_FYLB" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
|
|
<dao id="zyfymxbdao" log="true" type="1" memo="住院药房发药明细dao">
|
|
<sql>
|
|
select PKEY,FYBPKEY,JZPKEY,HZPKEY,ZYNO,CFH,PYBPKEY,YZXPKEY,YZMX,YZDJ,YZSL,BED,YPFL,YZDL,TYSL,KSKCPKEY,KSKCPCPKEY,CJR,CJRQ,XGR,XGRQ,JGID,EXEPKEY,LOCKFLAG,SFSL,FYDW,PCSJ,PCJBSJ,SFBZDWFY,YPYZZHXS,FYJE,YPFYSJMS,TYJE,STSL,PCDJ,PCJBDJ,FYJJJE,TYJJJE,SFXPKEY from HIS_YFFY_ZYFYMXB where 1=2
|
|
|
|
</sql>
|
|
<tables>
|
|
<table name="HIS_YFFY_ZYFYMXB" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>FYBPKEY</primary>
|
|
<primary>JZPKEY</primary>
|
|
<primary>JGID</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="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" />
|
|
</fields>
|
|
</dao>
|
|
|
|
|
|
|
|
<dao id="zyfyzbdao" log="true" type="1" memo="住院发药主表dao">
|
|
<sql>select PKEY,FYR,FYKS,FYTIME,HZBQ,PRINTFLAG,PRINTTIME,FYLB,FYKSSJ,FYJSSJ,FYDH,FYITEMS,CJR,CJRQ,XGR,XGRQ,JGID,HZKS,LOCKFLAG from HIS_YFFY_ZYFYZB where 1=2</sql>
|
|
<tables>
|
|
<table name="HIS_YFFY_ZYFYZB" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_YFFY_ZYFYZB" />
|
|
<f name="FYR" type="12" table="HIS_YFFY_ZYFYZB" />
|
|
<f name="FYKS" type="12" table="HIS_YFFY_ZYFYZB" />
|
|
<f name="FYTIME" type="93" table="HIS_YFFY_ZYFYZB" />
|
|
<f name="HZBQ" type="12" table="HIS_YFFY_ZYFYZB" />
|
|
<f name="PRINTFLAG" type="12" table="HIS_YFFY_ZYFYZB" />
|
|
<f name="PRINTTIME" type="93" table="HIS_YFFY_ZYFYZB" />
|
|
<f name="FYLB" type="12" table="HIS_YFFY_ZYFYZB" />
|
|
<f name="FYKSSJ" type="93" table="HIS_YFFY_ZYFYZB" />
|
|
<f name="FYJSSJ" type="93" table="HIS_YFFY_ZYFYZB" />
|
|
<f name="FYDH" type="12" table="HIS_YFFY_ZYFYZB" />
|
|
<f name="FYITEMS" type="-5" table="HIS_YFFY_ZYFYZB" />
|
|
<f name="CJR" type="12" table="HIS_YFFY_ZYFYZB" />
|
|
<f name="CJRQ" type="93" table="HIS_YFFY_ZYFYZB" />
|
|
<f name="XGR" type="12" table="HIS_YFFY_ZYFYZB" />
|
|
<f name="XGRQ" type="93" table="HIS_YFFY_ZYFYZB" />
|
|
<f name="JGID" type="12" table="HIS_YFFY_ZYFYZB" />
|
|
<f name="HZKS" type="12" table="HIS_YFFY_ZYFYZB" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_YFFY_ZYFYZB" />
|
|
</fields>
|
|
</dao>
|
|
|
|
|
|
|
|
<dao id="cydyzbdao" log="true" type="1" memo="出院带药主表dao">
|
|
<sql>select PKEY,JZPKEY,HZPKEY,WARD,BED,FYR,FYTIME,FYKS,CJR,CJRQ,XGR,XGRQ,JGID from HIS_YFFY_CYDYZB where 1=2</sql>
|
|
<tables>
|
|
<table name="HIS_YFFY_CYDYZB" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>JZPKEY</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_YFFY_CYDYZB" />
|
|
<f name="JZPKEY" type="12" table="HIS_YFFY_CYDYZB" />
|
|
<f name="HZPKEY" type="12" table="HIS_YFFY_CYDYZB" />
|
|
<f name="WARD" type="12" table="HIS_YFFY_CYDYZB" />
|
|
<f name="BED" type="12" table="HIS_YFFY_CYDYZB" />
|
|
<f name="FYR" type="12" table="HIS_YFFY_CYDYZB" />
|
|
<f name="FYTIME" type="93" table="HIS_YFFY_CYDYZB" />
|
|
<f name="FYKS" type="12" table="HIS_YFFY_CYDYZB" />
|
|
<f name="CJR" type="12" table="HIS_YFFY_CYDYZB" />
|
|
<f name="CJRQ" type="93" table="HIS_YFFY_CYDYZB" />
|
|
<f name="XGR" type="12" table="HIS_YFFY_CYDYZB" />
|
|
<f name="XGRQ" type="93" table="HIS_YFFY_CYDYZB" />
|
|
<f name="JGID" type="12" table="HIS_YFFY_CYDYZB" />
|
|
</fields>
|
|
</dao>
|
|
|
|
|
|
|
|
<dao id="cydymxbdao" log="true" type="1" memo="出院带药明细表dao">
|
|
<sql>select PKEY,CYDYPKEY,FYMXPKEY,CJR,CJRQ,XGR,XGRQ,JGID from HIS_YFFY_CYDYMXB where 1=2</sql>
|
|
<tables>
|
|
<table name="HIS_YFFY_CYDYMXB" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>CYDYPKEY</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_YFFY_CYDYMXB" />
|
|
<f name="CYDYPKEY" type="12" table="HIS_YFFY_CYDYMXB" />
|
|
<f name="FYMXPKEY" type="12" table="HIS_YFFY_CYDYMXB" />
|
|
<f name="CJR" type="12" table="HIS_YFFY_CYDYMXB" />
|
|
<f name="CJRQ" type="93" table="HIS_YFFY_CYDYMXB" />
|
|
<f name="XGR" type="12" table="HIS_YFFY_CYDYMXB" />
|
|
<f name="XGRQ" type="93" table="HIS_YFFY_CYDYMXB" />
|
|
<f name="JGID" type="12" table="HIS_YFFY_CYDYMXB" />
|
|
</fields>
|
|
</dao>
|
|
|
|
|
|
|
|
<dao id="mzdfybBymzfppkeyDao" log="true" type="1">
|
|
<sql>select PKEY,HZPKEY,JZPKEY,MZFPPKEY,ZDZBPKEY,FYCK,FYYF,FYZT,SFDY,SFTY,CFH,PYZT,SHZT,CJR,CJRQ,XGR,XGRQ,JGID,PYR,PYRQ,SHR,SHRQ,FYR,FYRQ,LOCKFLAG from HIS_YFFY_MZDFYZB where JGID=? and hzpkey=? and jzpkey =? and MZFPPKEY=?</sql>
|
|
<tables>
|
|
<table name="HIS_YFFY_MZDFYZB" insert="false" update="true" delete="false">
|
|
<primary>PKEY</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="HZPKEY" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="JZPKEY" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="MZFPPKEY" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="ZDZBPKEY" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="FYCK" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="FYYF" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="FYZT" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="SFDY" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="SFTY" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="CFH" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="PYZT" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="SHZT" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="CJR" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="CJRQ" type="93" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="XGR" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="XGRQ" type="93" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="JGID" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="PYR" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="PYRQ" type="93" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="SHR" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="SHRQ" type="93" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="FYR" type="12" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="FYRQ" type="93" table="HIS_YFFY_MZDFYZB" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_YFFY_MZDFYZB" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
|
|
<dao id="mzfykspopDao" log="true" type="1" memo="门诊发药科室dao">
|
|
<sql>select b.DPTID,b.DPTCODE,b.DPTNAME,b.DPTRMARK,b.DPTADDR,b.DPTLAYER,b.DPTTYPE,b.DPTGPID,b.DPTSEX,b.DPTZJM,b.DPTBAGE,b.DPTEAGE,b.DPTTXMJC,b.DPTYBCODE,b.CJR,b.CJRQ,b.XGR,b.XGRQ,b.JGID,b.DPTFLAG,b.SCRQ,b.SCR,b.ISMZ,b.ISJZ,b.ISZY,b.ISTJ from HIS_YFFY_MZFYKS_SETUP a left join MAIN_KS b on a.kskey=b.DPTID and a.JGID=b.JGID where a.JGID=? order by a.kskey</sql>
|
|
<tables>
|
|
<table name="MAIN_KS" insert="true" update="true" delete="true">
|
|
<primary>DPTID</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="DPTID" type="12" table="MAIN_KS" />
|
|
<f name="DPTCODE" type="12" table="MAIN_KS" />
|
|
<f name="DPTNAME" type="12" table="MAIN_KS" />
|
|
<f name="DPTRMARK" type="12" table="MAIN_KS" />
|
|
<f name="DPTADDR" type="12" table="MAIN_KS" />
|
|
<f name="DPTLAYER" type="12" table="MAIN_KS" />
|
|
<f name="DPTTYPE" type="12" table="MAIN_KS" />
|
|
<f name="DPTGPID" type="12" table="MAIN_KS" />
|
|
<f name="DPTSEX" type="12" table="MAIN_KS" />
|
|
<f name="DPTZJM" type="12" table="MAIN_KS" />
|
|
<f name="DPTBAGE" type="12" table="MAIN_KS" />
|
|
<f name="DPTEAGE" type="12" table="MAIN_KS" />
|
|
<f name="DPTTXMJC" type="12" table="MAIN_KS" />
|
|
<f name="DPTYBCODE" type="12" table="MAIN_KS" />
|
|
<f name="CJR" type="12" table="MAIN_KS" />
|
|
<f name="CJRQ" type="93" table="MAIN_KS" />
|
|
<f name="XGR" type="12" table="MAIN_KS" />
|
|
<f name="XGRQ" type="93" table="MAIN_KS" />
|
|
<f name="JGID" type="12" table="MAIN_KS" />
|
|
<f name="DPTFLAG" type="-5" table="MAIN_KS" />
|
|
<f name="SCRQ" type="93" table="MAIN_KS" />
|
|
<f name="SCR" type="12" table="MAIN_KS" />
|
|
<f name="ISMZ" type="12" table="MAIN_KS" />
|
|
<f name="ISJZ" type="12" table="MAIN_KS" />
|
|
<f name="ISZY" type="12" table="MAIN_KS" />
|
|
<f name="ISTJ" type="12" table="MAIN_KS" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="zyfykspopDao" log="true" type="1" memo="住院发药科室">
|
|
<sql>select b.DPTID,b.DPTCODE,b.DPTNAME,b.DPTRMARK,b.DPTADDR,b.DPTLAYER,b.DPTTYPE,b.DPTGPID,b.DPTSEX,b.DPTZJM,b.DPTBAGE,b.DPTEAGE,b.DPTTXMJC,b.DPTYBCODE,b.CJR,b.CJRQ,b.XGR,b.XGRQ,b.JGID,b.DPTFLAG,b.SCRQ,b.SCR,b.ISMZ,b.ISJZ,b.ISZY,b.ISTJ from HIS_YFFY_ZYFYKS_SETUP a left join MAIN_KS b on a.kskey=b.DPTID and a.JGID=b.JGID where a.JGID=? order by a.kskey</sql>
|
|
<tables>
|
|
<table name="MAIN_KS" insert="true" update="true" delete="true">
|
|
<primary>DPTID</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="DPTID" type="12" table="MAIN_KS" />
|
|
<f name="DPTCODE" type="12" table="MAIN_KS" />
|
|
<f name="DPTNAME" type="12" table="MAIN_KS" />
|
|
<f name="DPTRMARK" type="12" table="MAIN_KS" />
|
|
<f name="DPTADDR" type="12" table="MAIN_KS" />
|
|
<f name="DPTLAYER" type="12" table="MAIN_KS" />
|
|
<f name="DPTTYPE" type="12" table="MAIN_KS" />
|
|
<f name="DPTGPID" type="12" table="MAIN_KS" />
|
|
<f name="DPTSEX" type="12" table="MAIN_KS" />
|
|
<f name="DPTZJM" type="12" table="MAIN_KS" />
|
|
<f name="DPTBAGE" type="12" table="MAIN_KS" />
|
|
<f name="DPTEAGE" type="12" table="MAIN_KS" />
|
|
<f name="DPTTXMJC" type="12" table="MAIN_KS" />
|
|
<f name="DPTYBCODE" type="12" table="MAIN_KS" />
|
|
<f name="CJR" type="12" table="MAIN_KS" />
|
|
<f name="CJRQ" type="93" table="MAIN_KS" />
|
|
<f name="XGR" type="12" table="MAIN_KS" />
|
|
<f name="XGRQ" type="93" table="MAIN_KS" />
|
|
<f name="JGID" type="12" table="MAIN_KS" />
|
|
<f name="DPTFLAG" type="-5" table="MAIN_KS" />
|
|
<f name="SCRQ" type="93" table="MAIN_KS" />
|
|
<f name="SCR" type="12" table="MAIN_KS" />
|
|
<f name="ISMZ" type="12" table="MAIN_KS" />
|
|
<f name="ISJZ" type="12" table="MAIN_KS" />
|
|
<f name="ISZY" type="12" table="MAIN_KS" />
|
|
<f name="ISTJ" type="12" table="MAIN_KS" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="zyZcyPopyfDao" log="true" type="1" memo="住院中草药发药药房popdao">
|
|
<sql>select a.DPTID,a.DPTCODE,a.DPTNAME from HIS_YFFY_ZYFYKS_SETUP b inner join HIS_YFFY_ZYFYKS_FYLB d on b.PKEY=d.ZYFYKSPKEY and b.JGID=d.JGID inner join HIS_YFFY_FYLB c on c.pkey=d.FYLBPKEY and c.JGID=d.JGID left join MAIN_KS a on a.DPTID=b.KSKEY and a.JGID=b.JGID where c.BM='ZCY' and a.DPTTYPE = 4 and b.JGID=? and (a.DPTZJM like ? or a.DPTNAME like ?) order by a.DPTCODE</sql>
|
|
<fields>
|
|
<f name="DPTID" type="12" />
|
|
<f name="DPTCODE" type="12" />
|
|
<f name="DPTNAME" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
<dao id="zyyfzbSelectDao" log="true" type="1" memo="住院已经发药的发药主表dao">
|
|
<sql>select PKEY,FYR,FYKS,FYTIME,HZBQ,PRINTFLAG,PRINTTIME,FYLB,FYKSSJ,FYJSSJ,FYDH,FYITEMS,CJR,CJRQ,XGR,XGRQ,JGID,HZKS,LOCKFLAG from HIS_YFFY_ZYFYZB where JGID=? order by fydh</sql>
|
|
<tables>
|
|
<table name="HIS_YFFY_ZYFYZB" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_YFFY_ZYFYZB" />
|
|
<f name="FYR" type="12" table="HIS_YFFY_ZYFYZB" />
|
|
<f name="FYKS" type="12" table="HIS_YFFY_ZYFYZB" />
|
|
<f name="FYTIME" type="93" table="HIS_YFFY_ZYFYZB" />
|
|
<f name="HZBQ" type="12" table="HIS_YFFY_ZYFYZB" />
|
|
<f name="PRINTFLAG" type="12" table="HIS_YFFY_ZYFYZB" />
|
|
<f name="PRINTTIME" type="93" table="HIS_YFFY_ZYFYZB" />
|
|
<f name="FYLB" type="12" table="HIS_YFFY_ZYFYZB" />
|
|
<f name="FYKSSJ" type="93" table="HIS_YFFY_ZYFYZB" />
|
|
<f name="FYJSSJ" type="93" table="HIS_YFFY_ZYFYZB" />
|
|
<f name="FYDH" type="12" table="HIS_YFFY_ZYFYZB" />
|
|
<f name="FYITEMS" type="-5" table="HIS_YFFY_ZYFYZB" />
|
|
<f name="CJR" type="12" table="HIS_YFFY_ZYFYZB" />
|
|
<f name="CJRQ" type="93" table="HIS_YFFY_ZYFYZB" />
|
|
<f name="XGR" type="12" table="HIS_YFFY_ZYFYZB" />
|
|
<f name="XGRQ" type="93" table="HIS_YFFY_ZYFYZB" />
|
|
<f name="JGID" type="12" table="HIS_YFFY_ZYFYZB" />
|
|
<f name="HZKS" type="12" table="HIS_YFFY_ZYFYZB" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_YFFY_ZYFYZB" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
<dao id="zyyfzbSelectForPrintByFydhDao" log="true" type="1" memo="住院已经发药的发药主表dao 用于按发药单号打印">
|
|
<sql>select PKEY,FYR,FYKS,FYTIME,HZBQ,PRINTFLAG,PRINTTIME,FYLB,FYKSSJ,FYJSSJ,FYDH,FYITEMS,CJR,CJRQ,XGR,XGRQ,JGID,HZKS,LOCKFLAG from HIS_YFFY_ZYFYZB where JGID=? and FYDH=? order by fydh</sql>
|
|
<tables>
|
|
<table name="HIS_YFFY_ZYFYZB" insert="false" update="false" delete="false">
|
|
<primary>PKEY</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_YFFY_ZYFYZB" />
|
|
<f name="FYR" type="12" table="HIS_YFFY_ZYFYZB" />
|
|
<f name="FYKS" type="12" table="HIS_YFFY_ZYFYZB" />
|
|
<f name="FYTIME" type="93" table="HIS_YFFY_ZYFYZB" />
|
|
<f name="HZBQ" type="12" table="HIS_YFFY_ZYFYZB" />
|
|
<f name="PRINTFLAG" type="12" table="HIS_YFFY_ZYFYZB" />
|
|
<f name="PRINTTIME" type="93" table="HIS_YFFY_ZYFYZB" />
|
|
<f name="FYLB" type="12" table="HIS_YFFY_ZYFYZB" />
|
|
<f name="FYKSSJ" type="93" table="HIS_YFFY_ZYFYZB" />
|
|
<f name="FYJSSJ" type="93" table="HIS_YFFY_ZYFYZB" />
|
|
<f name="FYDH" type="12" table="HIS_YFFY_ZYFYZB" />
|
|
<f name="FYITEMS" type="-5" table="HIS_YFFY_ZYFYZB" />
|
|
<f name="CJR" type="12" table="HIS_YFFY_ZYFYZB" />
|
|
<f name="CJRQ" type="93" table="HIS_YFFY_ZYFYZB" />
|
|
<f name="XGR" type="12" table="HIS_YFFY_ZYFYZB" />
|
|
<f name="XGRQ" type="93" table="HIS_YFFY_ZYFYZB" />
|
|
<f name="JGID" type="12" table="HIS_YFFY_ZYFYZB" />
|
|
<f name="HZKS" type="12" table="HIS_YFFY_ZYFYZB" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_YFFY_ZYFYZB" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
|
|
<dao id="zyfxmxGroupSelectDao" log="true" type="1" memo="住院发药明细汇总表的dao">
|
|
<sql>
|
|
|
|
select yzxpkey,ward,YZMC,sum(jzyzsl) sl,YPYZJBDW,sum(fyje) zje,YZJX,gg,YPFL,YZLX,YZZCYFS,YZJZZHXS,YPYZBZDW,ypyzzhxs from (select a.PKEY,a.FYBPKEY,a.JZPKEY,a.HZPKEY,a.ZYNO,a.CFH,a.PYBPKEY,a.YZXPKEY,a.YZMX,a.YZDJ,a.YZSL,a.BED,a.YPFL,a.YZDL,a.TYSL,a.KSKCPKEY,a.KSKCPCPKEY,a.CJR,a.CJRQ,a.XGR,a.XGRQ,a.JGID,a.EXEPKEY,d.ward,d.bed,d.jjys,f.xm,e.zxtime,a.yzsl jzyzsl,b.YPYZJBDW,b.YZJZZHXS,b.YZMC,c.GG,b.YZJL,b.YZJLDW,b.YZPC,b.yzcl,e.pkey execpkey,e.SFFLAG,b.YPYZJBJG,a.yzsl*b.YPYZJBJG je ,b.YZJX,b.YZLX,b.YZZCYFS,a.fyje,b.YPYZBZDW,b.ypyzzhxs from HIS_YFFY_ZYFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_YPXX c on a.YZXPKEY=c.BM left join HIS_JZ_BASEINFO d on a.JZPKEY=d.pkey and a.JGID=d.JGID left join HIS_YZ_EXEC e on a.EXEPKEY=e.pkey and a.JGID=e.JGID left join HIS_HZINFO f on a.hzpkey=f.pkey and a.JGID=f.JGID where a.JGID=? and a.FYBPKEY=? and a.YZSL>0 order by d.bed,a.YZMX) group by ward,YZMC,YPYZJBDW,YZJX,gg,YPFL,yzxpkey,YZLX,YZZCYFS,YZJZZHXS,YPYZBZDW,ypyzzhxs
|
|
|
|
|
|
</sql>
|
|
<fields>
|
|
<f name="YZXPKEY" type="12" />
|
|
<f name="WARD" type="12" />
|
|
<f name="YZMC" type="12" />
|
|
<f name="SL" type="4" />
|
|
<f name="YPYZJBDW" type="12" />
|
|
<f name="ZJE" type="4" />
|
|
<f name="YZJX" type="12" />
|
|
<f name="GG" type="12" />
|
|
<f name="YPFL" type="12" />
|
|
<f name="YZLX" type="12" />
|
|
<f name="YZZCYFS" type="12" />
|
|
<f name="YZJZZHXS" type="12" />
|
|
<f name="YPYZBZDW" type="12" />
|
|
<f name="YPYZZHXS" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
|
|
<dao id="zyfxmxSelectDao" log="true" type="1" memo="住院发药明细表的dao">
|
|
<sql>
|
|
select d.JJKS,
|
|
a.PKEY,
|
|
a.FYBPKEY,
|
|
a.JZPKEY,
|
|
a.HZPKEY,
|
|
a.ZYNO,
|
|
a.CFH,
|
|
a.PYBPKEY,
|
|
a.YZXPKEY,
|
|
a.YZMX,
|
|
a.YZDJ,
|
|
a.YZSL,
|
|
a.BED,
|
|
a.YPFL,
|
|
a.YZDL,
|
|
a.TYSL,
|
|
a.KSKCPKEY,
|
|
a.KSKCPCPKEY,
|
|
a.CJR,
|
|
a.CJRQ,
|
|
a.XGR,
|
|
a.XGRQ,
|
|
a.JGID,
|
|
a.EXEPKEY,
|
|
d.ward,
|
|
d.jjys,
|
|
f.xm,
|
|
e.zxtime,
|
|
a.yzsl jzyzsl,
|
|
b.YPYZJBDW,
|
|
b.YZJZZHXS,
|
|
b.YZMC,
|
|
c.GG,
|
|
b.YZJL,
|
|
b.YZJLDW,
|
|
b.YZPC,
|
|
b.yzcl,
|
|
e.pkey execpkey,
|
|
e.SFFLAG,
|
|
b.YPYZJBJG,
|
|
a.yzsl * b.YPYZJBJG je,
|
|
b.YZJX,
|
|
a.YZSL jzsfsl,
|
|
e.zxsl,
|
|
e.zxje,
|
|
b.YZXZSJ,
|
|
e.ISACTION,
|
|
b.YZLX,
|
|
b.YZZCYFS,
|
|
b.YZYF,
|
|
a.SFSL,
|
|
a.FYDW,
|
|
a.FYJE,
|
|
a.STSL,
|
|
a.TYJE,
|
|
wmsys.wm_concat(case when h.SFZZD='1' and h.ZDLX='001' then h.JBMC else '' end ) ryzzd
|
|
,wmsys.wm_concat(case when h.SFZZD='1' and h.ZDLX='002' then h.JBMC else '' end ) cyzdd
|
|
,wmsys.wm_concat(case when h.SFZZD='0' and h.ZDLX='001' then h.JBMC else '' end ) ryqtzd
|
|
,wmsys.wm_concat(case when h.SFZZD='0' and h.ZDLX='002' then h.JBMC else '' end ) cyqtzd,
|
|
b.YZXZYS,
|
|
f.XB,
|
|
f.NL,
|
|
d.JZNL,
|
|
d.JZZDNAMELIST
|
|
from HIS_YFFY_ZYFYMXB a
|
|
left join HIS_YZ_MXB b on a.YZMX = b.PKEY and a.JGID = b.JGID
|
|
left join HIS_YPXX c on a.YZXPKEY = c.BM
|
|
left join HIS_JZ_BASEINFO d on a.JZPKEY = d.pkey and a.JGID = d.JGID
|
|
left join HIS_YZ_EXEC e on a.EXEPKEY = 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_JZ_MZZD h on h.JGID=d.JGID AND H.HZPKEY=d.HZPKEY AND h.JZPKEY=d.PKEY
|
|
where a.JGID =?
|
|
and a.FYBPKEY = ?
|
|
and a.YZSL > 0
|
|
group by d.JJKS,
|
|
a.PKEY,
|
|
a.FYBPKEY,
|
|
a.JZPKEY,
|
|
a.HZPKEY,
|
|
a.ZYNO,
|
|
a.CFH,
|
|
a.PYBPKEY,
|
|
a.YZXPKEY,
|
|
a.YZMX,
|
|
a.YZDJ,
|
|
a.YZSL,
|
|
a.BED,
|
|
a.YPFL,
|
|
a.YZDL,
|
|
a.TYSL,
|
|
a.KSKCPKEY,
|
|
a.KSKCPCPKEY,
|
|
a.CJR,
|
|
a.CJRQ,
|
|
a.XGR,
|
|
a.XGRQ,
|
|
a.JGID,
|
|
a.EXEPKEY,
|
|
d.ward,
|
|
d.jjys,
|
|
f.xm,
|
|
e.zxtime,
|
|
a.yzsl ,
|
|
b.YPYZJBDW,
|
|
b.YZJZZHXS,
|
|
b.YZMC,
|
|
c.GG,
|
|
b.YZJL,
|
|
b.YZJLDW,
|
|
b.YZPC,
|
|
b.yzcl,
|
|
e.pkey ,
|
|
e.SFFLAG,
|
|
b.YPYZJBJG,
|
|
b.YZJX,
|
|
a.YZSL ,
|
|
e.zxsl,
|
|
e.zxje,
|
|
b.YZXZSJ,
|
|
e.ISACTION,
|
|
b.YZLX,
|
|
b.YZZCYFS,
|
|
b.YZYF,
|
|
a.SFSL,
|
|
a.FYDW,
|
|
a.FYJE,
|
|
a.STSL,
|
|
a.TYJE,
|
|
b.YZXZYS,
|
|
f.XB,
|
|
f.NL,
|
|
d.JZNL,
|
|
d.JZZDNAMELIST
|
|
order by a.bed, a.YZMX, e.zxtime
|
|
</sql>
|
|
<fields>
|
|
<f name="JJKS" type="12" />
|
|
<f name="PKEY" type="12" />
|
|
<f name="FYBPKEY" type="12" />
|
|
<f name="JZPKEY" type="12" />
|
|
<f name="HZPKEY" type="12" />
|
|
<f name="ZYNO" type="12" />
|
|
<f name="CFH" type="12" />
|
|
<f name="PYBPKEY" type="12" />
|
|
<f name="YZXPKEY" type="12" />
|
|
<f name="YZMX" type="12" />
|
|
<f name="YZDJ" type="12" />
|
|
<f name="YZSL" type="12" />
|
|
<f name="BED" type="12" />
|
|
<f name="YPFL" type="12" />
|
|
<f name="YZDL" type="12" />
|
|
<f name="TYSL" type="12" />
|
|
<f name="KSKCPKEY" type="12" />
|
|
<f name="KSKCPCPKEY" type="12" />
|
|
<f name="CJR" type="12" />
|
|
<f name="CJRQ" type="93" />
|
|
<f name="XGR" type="12" />
|
|
<f name="XGRQ" type="93" />
|
|
<f name="JGID" type="12" />
|
|
<f name="EXEPKEY" type="12" />
|
|
<f name="WARD" type="12" />
|
|
<f name="JJYS" type="12" />
|
|
<f name="XM" type="12" />
|
|
<f name="ZXTIME" type="93" />
|
|
<f name="JZYZSL" type="12" />
|
|
<f name="YPYZJBDW" type="12" />
|
|
<f name="YZJZZHXS" type="12" />
|
|
<f name="YZMC" type="12" />
|
|
<f name="GG" type="12" />
|
|
<f name="YZJL" type="12" />
|
|
<f name="YZJLDW" type="12" />
|
|
<f name="YZPC" type="12" />
|
|
<f name="YZCL" type="12" />
|
|
<f name="EXECPKEY" type="12" />
|
|
<f name="SFFLAG" type="12" />
|
|
<f name="YPYZJBJG" type="12" />
|
|
<f name="JE" type="4" />
|
|
<f name="YZJX" type="12" />
|
|
<f name="JZSFSL" type="12" />
|
|
<f name="ZXSL" type="8" />
|
|
<f name="ZXJE" type="8" />
|
|
<f name="YZXZSJ" type="93" />
|
|
<f name="ISACTION" type="12" />
|
|
<f name="YZLX" type="12" />
|
|
<f name="YZZCYFS" type="12" />
|
|
<f name="YZYF" type="12" />
|
|
<f name="SFSL" type="12" />
|
|
<f name="FYDW" type="12" />
|
|
<f name="FYJE" type="8" />
|
|
<f name="STSL" type="12" />
|
|
<f name="TYJE" type="8" />
|
|
<f name="ryzzd" type="12" />
|
|
<f name="cyzdd" type="12" />
|
|
<f name="ryqtzd" type="12" />
|
|
<f name="cyqtzd" type="12" />
|
|
<f name="YZXZYS" type="12" />
|
|
<f name="XB" type="12" />
|
|
<f name="NL" type="12" />
|
|
<f name="JZNL" type="12" />
|
|
<f name="JZZDNAMELIST" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
<dao id="tyBySqdMxDao" log="true" type="1" memo="用于通过退药申请单退药的明细dao">
|
|
<sql><![CDATA[
|
|
|
|
select a.PKEY,a.FYBPKEY,a.JZPKEY,a.HZPKEY,a.ZYNO,a.CFH,a.PYBPKEY,a.YZXPKEY,a.YZMX,a.YZDJ,a.YZSL,a.YPFL,a.YZDL,a.TYSL,a.KSKCPKEY,a.KSKCPCPKEY,a.CJR,a.CJRQ,a.XGR,a.XGRQ,a.JGID,a.EXEPKEY,e.zxtime,a.yzsl jzyzsl,b.YPYZJBDW,b.YZJZZHXS,b.YZMC,c.GG,b.YZJL,b.YZJLDW,b.YZPC,b.yzcl,e.pkey execpkey,e.SFFLAG,b.YPYZJBJG,a.yzsl*b.YPYZJBJG je,b.YZJX,a.YZSL jzsfsl,e.zxsl,e.zxje,b.YZXZSJ,e.ISACTION,b.YZLX,b.YZZCYFS,b.YZYF,c.CSXX,g.FYR,g.FYKS,g.FYTIME,g.HZBQ,g.HZKS,f.xm,g.FYLB,c.JX
|
|
,tyd.TYDH,tyd.WARD,tyd.BED,tyd.SQKS,tyd.JSKS,tyd.JJKS,b.YZXZYS,tyd.SQR,tyd.TYR,tyd.TYRQ,tyd.SQSL SQSL,e.zxrward,a.SFSL,a.FYDW,a.SFBZDWFY,a.YPYZZHXS,a.FYJE,a.YPFYSJMS,a.TYJE,a.STSL,a.PCSJ,a.PCJBSJ,b.YPYZBZJG,e.CXSJ
|
|
from HIS_YFFY_ZYFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_YPXX c on a.YZXPKEY=c.BM left join HIS_YZ_EXEC e on a.EXEPKEY=e.pkey and a.JGID=e.JGID left join HIS_YFFY_ZYFYZB g on a.FYBPKEY=g.pkey and a.JGID=g.JGID left join HIS_HZINFO f on a.hzpkey=f.pkey and a.JGID=f.JGID left join HIS_YFFY_ZYTYSQB tyd on tyd.exepkey=e.pkey and tyd.JGID=e.JGID where a.JGID=? and nvl(a.YZSL,0)>0 and nvl(a.TYSL,0) > 0 and tyd.STATE=1 order by a.bed,a.YZMX,e.zxtime
|
|
|
|
|
|
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="PKEY" type="12" />
|
|
<f name="FYBPKEY" type="12" />
|
|
<f name="JZPKEY" type="12" />
|
|
<f name="HZPKEY" type="12" />
|
|
<f name="ZYNO" type="12" />
|
|
<f name="CFH" type="12" />
|
|
<f name="PYBPKEY" type="12" />
|
|
<f name="YZXPKEY" type="12" />
|
|
<f name="YZMX" type="12" />
|
|
<f name="YZDJ" type="12" />
|
|
<f name="YZSL" type="12" />
|
|
<f name="YPFL" type="12" />
|
|
<f name="YZDL" type="12" />
|
|
<f name="TYSL" type="12" />
|
|
<f name="KSKCPKEY" type="12" />
|
|
<f name="KSKCPCPKEY" type="12" />
|
|
<f name="CJR" type="12" />
|
|
<f name="CJRQ" type="93" />
|
|
<f name="XGR" type="12" />
|
|
<f name="XGRQ" type="93" />
|
|
<f name="JGID" type="12" />
|
|
<f name="EXEPKEY" type="12" />
|
|
<f name="ZXTIME" type="93" />
|
|
<f name="JZYZSL" type="12" />
|
|
<f name="YPYZJBDW" type="12" />
|
|
<f name="YZJZZHXS" type="12" />
|
|
<f name="YZMC" type="12" />
|
|
<f name="GG" type="12" />
|
|
<f name="YZJL" type="12" />
|
|
<f name="YZJLDW" type="12" />
|
|
<f name="YZPC" type="12" />
|
|
<f name="YZCL" type="12" />
|
|
<f name="EXECPKEY" type="12" />
|
|
<f name="SFFLAG" type="12" />
|
|
<f name="YPYZJBJG" type="12" />
|
|
<f name="JE" type="4" />
|
|
<f name="YZJX" type="12" />
|
|
<f name="JZSFSL" type="12" />
|
|
<f name="ZXSL" type="8" />
|
|
<f name="ZXJE" type="8" />
|
|
<f name="YZXZSJ" type="93" />
|
|
<f name="ISACTION" type="12" />
|
|
<f name="YZLX" type="12" />
|
|
<f name="YZZCYFS" type="12" />
|
|
<f name="YZYF" type="12" />
|
|
<f name="CSXX" type="12" />
|
|
<f name="FYR" type="12" />
|
|
<f name="FYKS" type="12" />
|
|
<f name="FYTIME" type="93" />
|
|
<f name="HZBQ" type="12" />
|
|
<f name="HZKS" type="12" />
|
|
<f name="XM" type="12" />
|
|
<f name="FYLB" type="12" />
|
|
<f name="JX" type="12" />
|
|
<f name="TYDH" type="12" />
|
|
<f name="WARD" type="12" />
|
|
<f name="BED" type="12" />
|
|
<f name="SQKS" type="12" />
|
|
<f name="JSKS" type="12" />
|
|
<f name="JJKS" type="12" />
|
|
<f name="YZXZYS" type="12" />
|
|
<f name="SQR" type="12" />
|
|
<f name="TYR" type="12" />
|
|
<f name="TYRQ" type="93" />
|
|
<f name="SQSL" type="12" />
|
|
<f name="ZXRWARD" type="12" />
|
|
<f name="SFSL" type="12" />
|
|
<f name="FYDW" type="12" />
|
|
<f name="SFBZDWFY" type="12" />
|
|
<f name="YPYZZHXS" type="12" />
|
|
<f name="FYJE" type="8" />
|
|
<f name="YPFYSJMS" type="12" />
|
|
<f name="TYJE" type="8" />
|
|
<f name="STSL" type="12" />
|
|
<f name="PCSJ" type="8" />
|
|
<f name="PCJBSJ" type="8" />
|
|
<f name="YPYZBZJG" type="12" />
|
|
<f name="CXSJ" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<!-- <dao id="tyBySqdMxDao" 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) 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,g.bed,i.xm,g.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,tymc.JX,f.YZJZZHXS,f.YPYZJBDW,g.TYDH,g.SQR,g.TYR,g.TYRQ,g.YZDJ,g.JSKS,e.TYSL*g.YZDJ tyje,g.SQKS,f.YZZCYFS -->
|
|
<!-- -->
|
|
<!-- 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_TYMC tymc on ypxx.tym=tymc.bm left join HIS_YFFY_ZYTYSQB g on g.exepkey=a.pkey and g.JGID=a.JGID-->
|
|
<!-- -->
|
|
<!-- where a.JGID=? and e.FYZT=1 and h.JZLX='Z' and h.JZZT='Z' and g.state=1 order by a.ZXTIME desc -->
|
|
<!-- -->
|
|
<!-- -->
|
|
<!-- -->
|
|
<!-- </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="SQR" type="12" />-->
|
|
<!-- <f name="TYR" type="12" />-->
|
|
<!-- <f name="TYRQ" type="93" />-->
|
|
<!-- <f name="YZDJ" type="12" />-->
|
|
<!-- <f name="JSKS" type="12" />-->
|
|
<!-- <f name="TYJE" type="12" />-->
|
|
<!-- <f name="SQKS" type="12" />-->
|
|
<!-- <f name="YZZCYFS" type="12" />-->
|
|
<!-- </fields>-->
|
|
<!-- <parameter>-->
|
|
<!-- <p>12</p>-->
|
|
<!-- </parameter>-->
|
|
<!-- </dao>-->
|
|
|
|
|
|
<dao id="zyyffymxAllDao" log="true" type="1" memo="住院药房发药统计查询的发药明细dao">
|
|
<sql><![CDATA[
|
|
|
|
|
|
select a.PKEY,a.FYBPKEY,a.JZPKEY,a.HZPKEY,a.ZYNO,a.CFH,a.PYBPKEY,a.YZXPKEY,a.YZMX,a.YZDJ,a.YZSL,a.BED,a.YPFL,a.YZDL,a.TYSL,a.KSKCPKEY,a.KSKCPCPKEY,a.CJR,a.CJRQ,a.XGR,a.XGRQ,a.JGID,a.EXEPKEY,e.zxtime,a.yzsl jzyzsl,b.YPYZJBDW,b.YZJZZHXS,b.YZMC,c.GG,b.YZJL,b.YZJLDW,b.YZPC,b.yzcl,e.pkey execpkey,e.SFFLAG,b.YPYZJBJG,a.yzsl*b.YPYZJBJG je,b.YZJX,a.YZSL jzsfsl,e.zxsl,e.zxje,b.YZXZSJ,e.ISACTION,b.YZLX,b.YZZCYFS,b.YZYF,c.CSXX,g.FYR,g.FYKS,g.FYTIME,g.HZBQ,g.HZKS,f.xm,g.FYLB,c.JX,a.YZSL/b.YZJZZHXS*h.DJ jjje,a.SFSL,a.FYDW,a.SFBZDWFY,a.YPYZZHXS,a.FYJE,a.YPFYSJMS,a.TYJE,a.STSL,a.PCSJ,a.PCJBSJ,b.YPYZBZJG ,a.PCDJ,a.PCJBDJ,a.FYJJJE,a.TYJJJE from HIS_YFFY_ZYFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_YPXX c on a.YZXPKEY=c.BM left join HIS_YZ_EXEC e on a.EXEPKEY=e.pkey and a.JGID=e.JGID left join HIS_YFFY_ZYFYZB g on a.FYBPKEY=g.pkey and a.JGID=g.JGID left join HIS_HZINFO f on a.hzpkey=f.pkey and a.JGID=f.JGID left join HIS_KSKC_PC h on a.KSKCPCPKEY=h.pkey and a.JGID=h.JGID where a.JGID=? and nvl(a.YZSL,0)>0 #hzbq# and g.FYTIME >=? and g.FYTIME <=? order by a.bed,a.YZMX,e.zxtime
|
|
|
|
|
|
|
|
|
|
]]></sql>
|
|
<tables>
|
|
<table name="HIS_YZ_MXB" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
</table>
|
|
<table name="HIS_YPXX" insert="false" update="false" delete="false">
|
|
<primary>GG</primary>
|
|
</table>
|
|
<table name="HIS_YFFY_ZYFYZB" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
</table>
|
|
<table name="HIS_YFFY_ZYFYMXB" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
</table>
|
|
<table name="HIS_YZ_EXEC" insert="false" update="false" delete="false">
|
|
<primary>PKEY</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_YZ_MXB,HIS_YFFY_ZYFYZB,HIS_YFFY_ZYFYMXB" />
|
|
<f name="FYBPKEY" type="12" table="HIS_YFFY_ZYFYMXB" />
|
|
<f name="JZPKEY" type="12" table="HIS_YZ_MXB,HIS_YFFY_ZYFYMXB" />
|
|
<f name="HZPKEY" type="12" table="HIS_YZ_MXB,HIS_YFFY_ZYFYMXB" />
|
|
<f name="ZYNO" type="12" table="HIS_YFFY_ZYFYMXB" />
|
|
<f name="CFH" type="12" table="HIS_YZ_MXB,HIS_YFFY_ZYFYMXB" />
|
|
<f name="PYBPKEY" type="12" table="HIS_YFFY_ZYFYMXB" />
|
|
<f name="YZXPKEY" type="12" table="HIS_YZ_MXB,HIS_YFFY_ZYFYMXB" />
|
|
<f name="YZMX" type="12" table="HIS_YFFY_ZYFYMXB" />
|
|
<f name="YZDJ" type="12" table="HIS_YZ_MXB,HIS_YFFY_ZYFYMXB" />
|
|
<f name="YZSL" type="12" table="HIS_YZ_MXB,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_YZ_MXB,HIS_YFFY_ZYFYZB,HIS_YFFY_ZYFYMXB" />
|
|
<f name="CJRQ" type="93" table="HIS_YZ_MXB,HIS_YFFY_ZYFYZB,HIS_YFFY_ZYFYMXB" />
|
|
<f name="XGR" type="12" table="HIS_YFFY_ZYFYZB,HIS_YFFY_ZYFYMXB" />
|
|
<f name="XGRQ" type="93" table="HIS_YFFY_ZYFYZB,HIS_YFFY_ZYFYMXB" />
|
|
<f name="JGID" type="12" table="HIS_YZ_MXB,HIS_YFFY_ZYFYZB,HIS_YFFY_ZYFYMXB" />
|
|
<f name="EXEPKEY" type="12" table="HIS_YFFY_ZYFYMXB" />
|
|
<f name="ZXTIME" type="93" />
|
|
<f name="JZYZSL" type="12" />
|
|
<f name="YPYZJBDW" type="12" table="HIS_YZ_MXB" />
|
|
<f name="YZJZZHXS" type="12" table="HIS_YZ_MXB" />
|
|
<f name="YZMC" type="12" table="HIS_YZ_MXB" />
|
|
<f name="GG" type="12" />
|
|
<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="YZCL" type="12" table="HIS_YZ_MXB" />
|
|
<f name="EXECPKEY" type="12" />
|
|
<f name="SFFLAG" type="12" />
|
|
<f name="YPYZJBJG" type="12" table="HIS_YZ_MXB" />
|
|
<f name="JE" type="4" />
|
|
<f name="YZJX" type="12" table="HIS_YZ_MXB" />
|
|
<f name="JZSFSL" type="12" />
|
|
<f name="ZXSL" type="8" />
|
|
<f name="ZXJE" type="8" />
|
|
<f name="YZXZSJ" type="93" table="HIS_YZ_MXB" />
|
|
<f name="ISACTION" type="12" />
|
|
<f name="YZLX" type="12" table="HIS_YZ_MXB" />
|
|
<f name="YZZCYFS" type="12" table="HIS_YZ_MXB" />
|
|
<f name="YZYF" type="12" table="HIS_YZ_MXB" />
|
|
<f name="CSXX" type="12" />
|
|
<f name="FYR" type="12" table="HIS_YFFY_ZYFYZB" />
|
|
<f name="FYKS" type="12" table="HIS_YFFY_ZYFYZB" />
|
|
<f name="FYTIME" type="93" table="HIS_YFFY_ZYFYZB" />
|
|
<f name="HZBQ" type="12" table="HIS_YFFY_ZYFYZB" />
|
|
<f name="HZKS" type="12" table="HIS_YFFY_ZYFYZB" />
|
|
<f name="XM" type="12" />
|
|
<f name="FYLB" type="12" />
|
|
<f name="JX" type="12" />
|
|
<f name="JJJE" type="12" />
|
|
<f name="SFSL" type="12" table="HIS_YFFY_ZYFYMXB" />
|
|
<f name="FYDW" type="12" table="HIS_YFFY_ZYFYMXB" />
|
|
<f name="SFBZDWFY" type="12" table="HIS_YFFY_ZYFYMXB" />
|
|
<f name="YPYZZHXS" type="12" table="HIS_YZ_MXB,HIS_YFFY_ZYFYMXB" />
|
|
<f name="FYJE" type="8" table="HIS_YFFY_ZYFYMXB" />
|
|
<f name="YPFYSJMS" type="12" table="HIS_YZ_MXB,HIS_YFFY_ZYFYMXB" />
|
|
<f name="TYJE" type="8" table="HIS_YFFY_ZYFYMXB" />
|
|
<f name="STSL" 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="YPYZBZJG" type="12" table="HIS_YZ_MXB" />
|
|
<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" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="zyyffyhzAllDao" type="1" memo="住院药房发药统计查询的发药汇总dao">
|
|
<sql>select '' 药品代码,'' 药品名称,'' 发药数量,'' 退药数量,'' 合计数量,'' 规格,'' 厂商,'' 剂型 ,'' 进价金额,'' 销售金额 from dual where 1=2</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="12" />
|
|
<f name="剂型" type="12" />
|
|
<f name="进价金额" type="12" />
|
|
<f name="销售金额" type="12" />
|
|
</fields>
|
|
</dao>
|
|
|
|
|
|
<dao id="zyyfgzltjByRy" type="1" memo="住院药房工作量按人员dao">
|
|
<sql>select '' 发药人,'' 药品品种,'' 发药金额,'' 处方张数,'' 处方剂数,'' 退药品种,'' 退药金额,'' 退药处方张数,'' 退药处方剂数,'' 出院带药处方张数,'' 出院带药处方剂数 from dual where 1=2</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="12" />
|
|
<f name="退药处方张数" type="12" />
|
|
<f name="退药处方剂数" type="12" />
|
|
<f name="出院带药处方张数" type="12" />
|
|
<f name="出院带药处方剂数" type="12" />
|
|
</fields>
|
|
</dao>
|
|
|
|
<dao id="zyyfgzltjByhzbq" type="1" memo="住院药房工作量按病区dao">
|
|
<sql>select '' 患者病区,'' 药品品种,'' 发药金额,'' 处方张数,'' 处方剂数,'' 退药品种,'' 退药金额,'' 退药处方张数,'' 退药处方剂数,'' 出院带药处方张数,'' 出院带药处方剂数 from dual where 1=2</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="12" />
|
|
<f name="退药处方张数" type="12" />
|
|
<f name="退药处方剂数" type="12" />
|
|
<f name="出院带药处方张数" type="12" />
|
|
<f name="出院带药处方剂数" type="12" />
|
|
</fields>
|
|
</dao>
|
|
<dao id="zyyfgzlByCfhByManDao" log="true" type="1" memo="住院药房工作量人,处方数,方剂数dao">
|
|
<sql><![CDATA[
|
|
|
|
select fyr,count(*) cfs,sum(fs) fs from (select g.FYR,a.cfh,sum(b.yzzcyfs) fs from HIS_YFFY_ZYFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_YPXX c on a.YZXPKEY=c.BM left join HIS_YZ_EXEC e on a.EXEPKEY=e.pkey and a.JGID=e.JGID left join HIS_YFFY_ZYFYZB g on a.FYBPKEY=g.pkey and a.JGID=g.JGID left join HIS_HZINFO f on a.hzpkey=f.pkey and a.JGID=f.JGID left join HIS_TYMC tymc on c.tym=tymc.bm where a.JGID=? and (1=? or g.FYKS=?) and g.FYTIME >=? and g.FYTIME <=? and nvl(a.YZSL,0)>0 group by g.FYR,a.CFH) group by fyr
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="FYR" type="12" />
|
|
<f name="CFS" type="4" />
|
|
<f name="FS" type="4" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
<dao id="zyyfgzlByYzmxByManDao" log="true" type="1" memo="住院药房工作量人,单品数,金额dao">
|
|
<sql><![CDATA[
|
|
|
|
select fyr,count(*) num,sum(je) je from (select b.yzmc,g.FYR,sum(a.yzsl*b.YPYZJBJG) je from HIS_YFFY_ZYFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_YPXX c on a.YZXPKEY=c.BM left join HIS_YZ_EXEC e on a.EXEPKEY=e.pkey and a.JGID=e.JGID left join HIS_YFFY_ZYFYZB g on a.FYBPKEY=g.pkey and a.JGID=g.JGID left join HIS_HZINFO f on a.hzpkey=f.pkey and a.JGID=f.JGID left join HIS_TYMC tymc on c.tym=tymc.bm where a.JGID=? and (1=? or g.FYKS=?) and g.FYTIME >=? and g.FYTIME <=? and nvl(a.YZSL,0)>0 group by g.FYR,a.YZXPKEY,b.yzmc) group by fyr
|
|
|
|
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="FYR" type="12" />
|
|
<f name="num" type="4" />
|
|
<f name="je" type="4" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="zyyfgzlByCfhByHzbqDao" log="true" type="1" memo="住院药房工作量病区 处方数,方剂数dao">
|
|
<sql><![CDATA[
|
|
|
|
select hzbq,count(*) cfs,sum(fs) fs from (select g.hzbq,a.cfh,sum(b.yzzcyfs) fs from HIS_YFFY_ZYFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_YPXX c on a.YZXPKEY=c.BM left join HIS_YZ_EXEC e on a.EXEPKEY=e.pkey and a.JGID=e.JGID left join HIS_YFFY_ZYFYZB g on a.FYBPKEY=g.pkey and a.JGID=g.JGID left join HIS_HZINFO f on a.hzpkey=f.pkey and a.JGID=f.JGID left join HIS_TYMC tymc on c.tym=tymc.bm where a.JGID=? and (1=? or g.FYKS=?) and g.FYTIME >=? and g.FYTIME <=? and nvl(a.YZSL,0)>0 group by g.hzbq,a.CFH) group by hzbq
|
|
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="hzbq" type="12" />
|
|
<f name="cfs" type="4" />
|
|
<f name="fs" type="4" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
<dao id="zyyfgzlByYzmxByHzbqDao" log="true" type="1" memo="住院药房工作量病区,单品数,金额dao">
|
|
<sql><![CDATA[
|
|
|
|
select hzbq,count(*) num,sum(je) je from (select b.yzmc,g.hzbq,sum(a.yzsl*b.YPYZJBJG) je from HIS_YFFY_ZYFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_YPXX c on a.YZXPKEY=c.BM left join HIS_YZ_EXEC e on a.EXEPKEY=e.pkey and a.JGID=e.JGID left join HIS_YFFY_ZYFYZB g on a.FYBPKEY=g.pkey and a.JGID=g.JGID left join HIS_HZINFO f on a.hzpkey=f.pkey and a.JGID=f.JGID left join HIS_TYMC tymc on c.tym=tymc.bm where a.JGID=? and (1=? or g.FYKS=?) and g.FYTIME >=? and g.FYTIME <=? and nvl(a.YZSL,0)>0 group by g.hzbq,a.YZXPKEY,b.yzmc) group by hzbq
|
|
|
|
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="hzbq" type="12" />
|
|
<f name="num" type="4" />
|
|
<f name="je" type="4" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
|
|
<dao id="TyzyyfgzlByCfhByManDao" log="true" type="1" memo="住院药房退药工作量人,处方数,方剂数dao">
|
|
<sql><![CDATA[
|
|
|
|
select fyr,count(*) cfs,sum(fs) fs from (select g.FYR,a.cfh,sum(b.yzzcyfs) fs from HIS_YFFY_ZYFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_YPXX c on a.YZXPKEY=c.BM left join HIS_YZ_EXEC e on a.EXEPKEY=e.pkey and a.JGID=e.JGID left join HIS_YFFY_ZYFYZB g on a.FYBPKEY=g.pkey and a.JGID=g.JGID left join HIS_HZINFO f on a.hzpkey=f.pkey and a.JGID=f.JGID left join HIS_TYMC tymc on c.tym=tymc.bm left join HIS_YFFY_ZYTYSQB tyd on tyd.exepkey=e.pkey and tyd.JGID=e.JGID where a.JGID=? and (1=? or g.FYKS=?) and g.FYTIME >=? and g.FYTIME <=? and nvl(a.YZSL,0)>0 and nvl(a.TYSL,0) > 0 and tyd.STATE=1 group by g.FYR,a.CFH) group by fyr
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="FYR" type="12" />
|
|
<f name="CFS" type="4" />
|
|
<f name="FS" type="4" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
<dao id="TyzyyfgzlByYzmxByManDao" log="true" type="1" memo="住院药房退药工作量人,单品数,金额dao">
|
|
<sql><![CDATA[
|
|
|
|
select fyr,count(*) num,sum(je) je from (select b.yzmc,g.FYR,sum(a.yzsl*b.YPYZJBJG) je from HIS_YFFY_ZYFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_YPXX c on a.YZXPKEY=c.BM left join HIS_YZ_EXEC e on a.EXEPKEY=e.pkey and a.JGID=e.JGID left join HIS_YFFY_ZYFYZB g on a.FYBPKEY=g.pkey and a.JGID=g.JGID left join HIS_HZINFO f on a.hzpkey=f.pkey and a.JGID=f.JGID left join HIS_TYMC tymc on c.tym=tymc.bm left join HIS_YFFY_ZYTYSQB tyd on tyd.exepkey=e.pkey and tyd.JGID=e.JGID where a.JGID=? and (1=? or g.FYKS=?) and g.FYTIME >=? and g.FYTIME <=? and nvl(a.YZSL,0)>0 and nvl(a.TYSL,0) > 0 and tyd.STATE=1 group by g.FYR,a.YZXPKEY,b.yzmc) group by fyr
|
|
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="FYR" type="12" />
|
|
<f name="num" type="4" />
|
|
<f name="je" type="4" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
<dao id="TyzyyfgzlByCfhByHzbqDao" log="true" type="1" memo="住院药房退药工作量病区,处方数,方剂数dao">
|
|
<sql><![CDATA[
|
|
|
|
select hzbq,count(*) cfs,sum(fs) fs from (select g.hzbq,a.cfh,sum(b.yzzcyfs) fs from HIS_YFFY_ZYFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_YPXX c on a.YZXPKEY=c.BM left join HIS_YZ_EXEC e on a.EXEPKEY=e.pkey and a.JGID=e.JGID left join HIS_YFFY_ZYFYZB g on a.FYBPKEY=g.pkey and a.JGID=g.JGID left join HIS_HZINFO f on a.hzpkey=f.pkey and a.JGID=f.JGID left join HIS_TYMC tymc on c.tym=tymc.bm left join HIS_YFFY_ZYTYSQB tyd on tyd.exepkey=e.pkey and tyd.JGID=e.JGID where a.JGID=? and (1=? or g.FYKS=?) and g.FYTIME >=? and g.FYTIME <=? and nvl(a.YZSL,0)>0 and nvl(a.TYSL,0) > 0 and tyd.STATE=1 group by g.hzbq,a.CFH) group by hzbq
|
|
|
|
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="hzbq" type="12" />
|
|
<f name="CFS" type="4" />
|
|
<f name="FS" type="4" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
<dao id="TyzyyfgzlByYzmxByHzbqDao" log="true" type="1" memo="住院药房退药工作量病区,单品数,金额dao">
|
|
<sql><![CDATA[
|
|
|
|
select hzbq,count(*) num,sum(je) je from (select b.yzmc,g.hzbq,sum(a.yzsl*b.YPYZJBJG) je from HIS_YFFY_ZYFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_YPXX c on a.YZXPKEY=c.BM left join HIS_YZ_EXEC e on a.EXEPKEY=e.pkey and a.JGID=e.JGID left join HIS_YFFY_ZYFYZB g on a.FYBPKEY=g.pkey and a.JGID=g.JGID left join HIS_HZINFO f on a.hzpkey=f.pkey and a.JGID=f.JGID left join HIS_TYMC tymc on c.tym=tymc.bm left join HIS_YFFY_ZYTYSQB tyd on tyd.exepkey=e.pkey and tyd.JGID=e.JGID where a.JGID=? and (1=? or g.FYKS=?) and g.FYTIME >=? and g.FYTIME <=? and nvl(a.YZSL,0)>0 and nvl(a.TYSL,0) > 0 and tyd.STATE=1 group by g.hzbq,a.YZXPKEY,b.yzmc) group by hzbq
|
|
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="hzbq" type="12" />
|
|
<f name="num" type="4" />
|
|
<f name="je" type="4" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
<dao id="CydyZyyfgzlByCfhByManDao" log="true" type="1" memo="住院药房出院带药工作量人,处方数,方剂数dao">
|
|
<sql><![CDATA[
|
|
|
|
select fyr,count(*) cfs,sum(fs) fs from (select b.FYR,c.cfh,sum(d.yzzcyfs) fs from HIS_YFFY_CYDYMXB a left join HIS_YFFY_CYDYZB b on a.CYDYPKEY=b.pkey and a.JGID=b.JGID left join HIS_YFFY_ZYFYMXB c on a.FYMXPKEY=c.pkey and a.JGID=c.JGID left join HIS_YZ_MXB d on c.YZMX=d.PKEY and c.JGID=d.JGID left join HIS_YFFY_ZYFYZB g on c.FYBPKEY=g.pkey and c.JGID=g.JGID where c.JGID=? and (1=? or g.FYKS=?) and g.FYTIME >=? and g.FYTIME <=? group by b.FYR,c.cfh) group by fyr
|
|
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="FYR" type="12" />
|
|
<f name="CFS" type="4" />
|
|
<f name="FS" type="4" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
<dao id="CydyZyyfgzlByYzmxByManDao" log="true" type="1" memo="住院药房出院带药工作量人,单品数,金额dao">
|
|
<sql><![CDATA[
|
|
|
|
select fyr,count(*) num,sum(je) je from (select d.yzmc,b.FYR,sum(c.yzsl*d.YPYZJBJG) je from HIS_YFFY_CYDYMXB a left join HIS_YFFY_CYDYZB b on a.CYDYPKEY=b.pkey and a.JGID=b.JGID left join HIS_YFFY_ZYFYMXB c on a.FYMXPKEY=c.pkey and a.JGID=c.JGID left join HIS_YZ_MXB d on c.YZMX=d.PKEY and c.JGID=d.JGID left join HIS_YFFY_ZYFYZB g on c.FYBPKEY=g.pkey and c.JGID=g.JGID where c.JGID=? and (1=? or g.FYKS=?) and g.FYTIME >=? and g.FYTIME <=? group by b.FYR,d.YZXPKEY,d.yzmc) group by fyr
|
|
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="FYR" type="12" />
|
|
<f name="num" type="4" />
|
|
<f name="je" type="4" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
|
|
<dao id="CydyZyyfgzlByCfhByHzbqDao" log="true" type="1" memo="住院药房出院带药工作量病区,处方数,方剂数dao">
|
|
<sql><![CDATA[
|
|
|
|
select hzbq,count(*) cfs,sum(fs) fs from (select b.WARD hzbq,c.cfh,sum(d.yzzcyfs) fs from HIS_YFFY_CYDYMXB a left join HIS_YFFY_CYDYZB b on a.CYDYPKEY=b.pkey and a.JGID=b.JGID left join HIS_YFFY_ZYFYMXB c on a.FYMXPKEY=c.pkey and a.JGID=c.JGID left join HIS_YZ_MXB d on c.YZMX=d.PKEY and c.JGID=d.JGID left join HIS_YFFY_ZYFYZB g on c.FYBPKEY=g.pkey and c.JGID=g.JGID where c.JGID=? and (1=? or g.FYKS=?) and g.FYTIME >=? and g.FYTIME <=? group by b.WARD,c.cfh) group by hzbq
|
|
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="hzbq" type="12" />
|
|
<f name="CFS" type="4" />
|
|
<f name="FS" type="4" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
<dao id="CydyZyyfgzlByYzmxByHzbqDao" log="true" type="1" memo="住院药房出院带药工作量病区,单品数,金额dao">
|
|
<sql><![CDATA[
|
|
|
|
select hzbq,count(*) num,sum(je) je from (select d.yzmc,b.WARD hzbq,sum(c.yzsl*d.YPYZJBJG) je from HIS_YFFY_CYDYMXB a left join HIS_YFFY_CYDYZB b on a.CYDYPKEY=b.pkey and a.JGID=b.JGID left join HIS_YFFY_ZYFYMXB c on a.FYMXPKEY=c.pkey and a.JGID=c.JGID left join HIS_YZ_MXB d on c.YZMX=d.PKEY and c.JGID=d.JGID left join HIS_YFFY_ZYFYZB g on c.FYBPKEY=g.pkey and c.JGID=g.JGID where c.JGID=? and (1=? or g.FYKS=?) and g.FYTIME >=? and g.FYTIME <=? group by b.WARD,d.YZXPKEY,d.yzmc) group by hzbq
|
|
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="hzbq" type="12" />
|
|
<f name="num" type="4" />
|
|
<f name="je" type="4" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
<dao id="zyyfTyhzDao" log="true" type="1">
|
|
<sql><![CDATA[
|
|
|
|
select a.YZXPKEY,a.YZDJ,b.YPYZJBDW,sum(a.TYSL) tysl,b.YZMC,sum(a.TYSL*a.YZDJ) tyje
|
|
from HIS_YFFY_ZYFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_YPXX c on a.YZXPKEY=c.BM left join HIS_YZ_EXEC e on a.EXEPKEY=e.pkey and a.JGID=e.JGID left join HIS_YFFY_ZYFYZB g on a.FYBPKEY=g.pkey and a.JGID=g.JGID left join HIS_HZINFO f on a.hzpkey=f.pkey and a.JGID=f.JGID left join HIS_TYMC tymc on c.tym=tymc.bm left join HIS_YFFY_ZYTYSQB tyd on tyd.exepkey=e.pkey and tyd.JGID=e.JGID where a.JGID=? and tyd.TYRQ >=? and tyd.TYRQ <=? #select# and nvl(a.YZSL,0)>0 and nvl(a.TYSL,0) > 0 and tyd.STATE=1 group by a.YZXPKEY,a.yzdj,b.YPYZJBDW,b.yzmc
|
|
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="YZXPKEY" type="12" />
|
|
<f name="YZDJ" type="12" />
|
|
<f name="YPYZJBDW" type="12" />
|
|
<f name="TYSL" type="4" />
|
|
<f name="YZMC" type="12" />
|
|
<f name="TYJE" type="4" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
|
|
<dao id="zyBqFTYTjForm" log="true" type="1" memo="病区发退药统计dao" >
|
|
<sql><![CDATA[
|
|
|
|
|
|
select * from (select * from (
|
|
|
|
|
|
select '退药' state,tyd.WARD hzbq,tyd.TYRQ rq,a.TYSL*a.YZDJ je,a.YZXPKEY,b.YZMC,a.TYSL sl,b.YPYZJBDW dw,tyd.TYDH dh
|
|
from HIS_YFFY_ZYFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_YZ_EXEC e on a.EXEPKEY=e.pkey and a.JGID=e.JGID left join HIS_YFFY_ZYFYZB g on a.FYBPKEY=g.pkey and a.JGID=g.JGID left join HIS_YFFY_ZYTYSQB tyd on tyd.exepkey=e.pkey and tyd.JGID=e.JGID where a.JGID=? and tyd.WARD=? #tyks# and nvl(a.YZSL,0)>0 and nvl(a.TYSL,0) > 0 and tyd.STATE=1 and tyd.TYRQ >=? and tyd.TYRQ <=? order by tyd.TYRQ
|
|
|
|
|
|
)
|
|
|
|
|
|
union all
|
|
|
|
select * from ( select '发药' state,g.HZBQ,g.FYTIME rq,a.yzsl*b.YPYZJBJG je,a.YZXPKEY,b.YZMC,a.YZSL sl,b.YPYZJBDW dw,g.FYDH dh
|
|
|
|
from HIS_YFFY_ZYFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_YFFY_ZYFYZB g on a.FYBPKEY=g.pkey and a.JGID=g.JGID left join HIS_HZINFO f on a.hzpkey=f.pkey and a.JGID=f.JGID where a.JGID=? and g.HZBQ=? #fyks# and nvl(a.YZSL,0)>0 and g.FYTIME >=? and g.FYTIME <=? order by g.FYTIME )
|
|
)
|
|
|
|
order by rq
|
|
|
|
|
|
|
|
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="STATE" type="12" />
|
|
<f name="HZBQ" type="12" />
|
|
<f name="RQ" type="93" />
|
|
<f name="JE" type="8" />
|
|
<f name="YZXPKEY" type="12" />
|
|
<f name="YZMC" type="12" />
|
|
<f name="SL" type="12" />
|
|
<f name="DW" type="12" />
|
|
<f name="DH" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
|
|
<dao id="zyyfGzypTjDao" log="true" type="1" memo="住院药房管制药品统计dao">
|
|
<sql><![CDATA[
|
|
|
|
select g.FYR,g.FYKS,g.FYTIME,a.PKEY,a.FYBPKEY,a.JZPKEY,a.HZPKEY,a.ZYNO,a.CFH,f.xm,f.XB,jzinfo.jznl,jzinfo.zybah,f.sfzh,zdb.JBMC,a.YZSL,b.YPYZJBDW,b.YZXZYS,b.YZJL,b.YZJLDW,b.YZPC,c.JX,jzinfo.JJKS,b.YZMC from HIS_YFFY_ZYFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_YPXX c on a.YZXPKEY=c.BM left join HIS_YZ_EXEC e on a.EXEPKEY=e.pkey and a.JGID=e.JGID left join HIS_YFFY_ZYFYZB g on a.FYBPKEY=g.pkey and a.JGID=g.JGID left join HIS_HZINFO f on a.hzpkey=f.pkey and a.JGID=f.JGID left join HIS_JZ_MZZD zdb on a.hzpkey=zdb.hzpkey and a.jzpkey=zdb.jzpkey and a.JGID=zdb.JGID and zdb.SFZZD=1 left join HIS_JZ_BASEINFO jzinfo on a.jzpkey=jzinfo.pkey and a.JGID=jzinfo.JGID where a.JGID=? and c.GZFL=? and g.FYTIME>=? and g.FYTIME<=? and nvl(a.YZSL,0)>0 order by g.FYTIME
|
|
|
|
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="FYR" type="12" />
|
|
<f name="FYKS" type="12" />
|
|
<f name="FYTIME" type="93" />
|
|
<f name="PKEY" type="12" />
|
|
<f name="FYBPKEY" type="12" />
|
|
<f name="JZPKEY" type="12" />
|
|
<f name="HZPKEY" type="12" />
|
|
<f name="ZYNO" type="12" />
|
|
<f name="CFH" type="12" />
|
|
<f name="XM" type="12" />
|
|
<f name="XB" type="12" />
|
|
<f name="JZNL" type="12" />
|
|
<f name="ZYBAH" type="12" />
|
|
<f name="SFZH" type="12" />
|
|
<f name="JBMC" type="12" />
|
|
<f name="YZSL" type="12" />
|
|
<f name="YPYZJBDW" type="12" />
|
|
<f name="YZXZYS" type="12" />
|
|
<f name="YZJL" type="12" />
|
|
<f name="YZJLDW" type="12" />
|
|
<f name="YZPC" type="12" />
|
|
<f name="JX" type="12" />
|
|
<f name="JJKS" type="12" />
|
|
<f name="YZMC" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
<dao id="zyksfyPybMxDao" log="true" type="1" memo="住院科室发药的发药明细dao">
|
|
<sql><![CDATA[
|
|
|
|
select b.cfh,d.JJKS,d.ZYNO,a.PKEY,a.YZX,a.YZMX,a.YZDJ,a.YZSL,a.DFYPKEY,a.FYMXPKEY,a.HZBQ,a.HZKS,a.FYKS,a.HZPKEY,a.YPFL,a.JZPKEY,a.TYPE,a.CJR,a.CJRQ,a.XGR,a.XGRQ,a.JGID,a.YZDL,a.TYSL,a.SFSL,a.SFLYSH,a.SFYSSH,a.LYSHR,a.LYSHRQ,a.YSSHR,a.YSSHRQ,a.FYZT,d.ward,d.bed,d.jjys,f.xm,e.zxtime,a.yzsl*b.YZJZZHXS jzyzsl,b.YPYZJBDW,b.YZJZZHXS,b.YZMC,c.GG,b.YZJL,b.YZJLDW,b.YZPC,b.yzcl,e.pkey execpkey,e.SFFLAG,b.YPYZJBJG,a.yzsl*b.yzjzzhxs*b.YPYZJBJG je,b.YZJX,a.SFSL*b.YZJZZHXS jzsfsl,e.zxsl,e.zxje,b.yzxpkey,b.YZXZSJ,e.ISACTION,b.YZLX,b.YZZCYFS,b.YZYF,a.FYCX,e.ZXFLAG,a.LOCKFLAG,e.ZXRKS,g.dwview,h.pkey sfxpkey,g.ybbm,g.ybmc,(select count(1) num from HIS_SFZD_SFXMXB where a.YZMX=yzmx and e.pkey=EXEPKEY and (JSZT='1' or JSZT='0') and a.JGID=JGID) sfxnum,a.YPFYSJMS,b.YPYZBZJG,b.YPYZBZDW,b.YZDW,b.YPYZZHXS,a.DFYZJE from HIS_YFFY_PYB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_YPXX c on a.YZX=c.BM left join HIS_JZ_BASEINFO d on a.JZPKEY=d.pkey and a.JGID=d.JGID left join HIS_YZ_EXEC e on a.DFYPKEY=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_SFX g on a.YZX=g.bm and a.JGID=g.JGID LEFT JOIN HIS_SFZD_SFXMXB h on a.YZMX=h.yzmx and e.pkey=h.EXEPKEY and (h.JSZT='1' or h.JSZT='0') and a.JGID=h.JGID where #FYZT# AND a.TYPE='Z' AND a.FYCX=0 and (d.JZLX='Z' or (d.JZLX='J' AND d.SFLG='1')) AND d.JZZT='Z' AND a.FYCX=0 and a.PYLX='2' and a.JGID=? #ward# #yzcl# #yf# #ypfl# #ypbm# #zyno# #yplysh# and e.zxtime >=? and e.zxtime <= ?
|
|
|
|
|
|
]]></sql>
|
|
<tables>
|
|
<table name="HIS_YFFY_PYB" insert="false" update="true" delete="false">
|
|
<primary>PKEY</primary>
|
|
<primary>YZMX</primary>
|
|
<primary>FYMXPKEY</primary>
|
|
<primary>FYZT</primary>
|
|
<primary>FYCX</primary>
|
|
</table>
|
|
<table name="HIS_YZ_EXEC" insert="false" update="true" delete="false">
|
|
<primary>EXECPKEY</primary>
|
|
<primary>YZMX</primary>
|
|
<primary>JZPKEY</primary>
|
|
<primary>SFFLAG</primary>
|
|
<primary>ISACTION</primary>
|
|
<primary>ZXFLAG</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="CFH" type="12" />
|
|
<f name="JJKS" type="12" />
|
|
<f name="ZYNO" type="12" />
|
|
<f name="PKEY" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="YZX" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="YZMX" type="12" table="HIS_YFFY_PYB,HIS_YZ_EXEC" />
|
|
<f name="YZDJ" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="YZSL" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="DFYPKEY" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="FYMXPKEY" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="HZBQ" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="HZKS" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="FYKS" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="HZPKEY" type="12" table="HIS_YFFY_PYB,HIS_YZ_EXEC" />
|
|
<f name="YPFL" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="JZPKEY" type="12" table="HIS_YFFY_PYB,HIS_YZ_EXEC" />
|
|
<f name="TYPE" type="12" table="HIS_YFFY_PYB" />
|
|
<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="YZDL" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="TYSL" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="SFSL" 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="WARD" type="12" />
|
|
<f name="BED" type="12" />
|
|
<f name="JJYS" type="12" />
|
|
<f name="XM" type="12" />
|
|
<f name="ZXTIME" type="93" table="HIS_YZ_EXEC" />
|
|
<f name="JZYZSL" type="4" />
|
|
<f name="YPYZJBDW" type="12" />
|
|
<f name="YZJZZHXS" type="12" />
|
|
<f name="YZMC" type="12" table="HIS_YZ_EXEC" />
|
|
<f name="GG" type="12" />
|
|
<f name="YZJL" type="12" />
|
|
<f name="YZJLDW" type="12" />
|
|
<f name="YZPC" type="12" />
|
|
<f name="YZCL" type="12" />
|
|
<f name="EXECPKEY" schemaname="PKEY" type="12" table="HIS_YZ_EXEC" />
|
|
<f name="SFFLAG" type="12" table="HIS_YZ_EXEC" />
|
|
<f name="YPYZJBJG" type="12" />
|
|
<f name="JE" type="12" />
|
|
<f name="YZJX" type="12" />
|
|
<f name="JZSFSL" type="12" />
|
|
<f name="zxsl" type="12" table="HIS_YZ_EXEC" />
|
|
<f name="zxje" type="12" table="HIS_YZ_EXEC" />
|
|
<f name="yzxpkey" type="12" />
|
|
<f name="YZXZSJ" type="93" />
|
|
<f name="ISACTION" type="12" table="HIS_YZ_EXEC" />
|
|
<f name="YZLX" type="12" />
|
|
<f name="YZZCYFS" type="12" />
|
|
<f name="YZYF" type="12" />
|
|
<f name="FYCX" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="ZXFLAG" type="12" table="HIS_YZ_EXEC" />
|
|
<f name="LOCKFLAG" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="ZXRKS" type="12" table="HIS_YZ_EXEC" />
|
|
<f name="DWVIEW" type="12" />
|
|
<f name="sfxpkey" type="12" />
|
|
<f name="YBBM" type="12" />
|
|
<f name="YBMC" type="12" />
|
|
<f name="SFXNUM" type="4" />
|
|
<f name="YPFYSJMS" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="YPYZBZJG" type="12" />
|
|
<f name="YPYZBZDW" type="12" />
|
|
<f name="YZDW" type="12" />
|
|
<f name="YPYZZHXS" type="12" />
|
|
<f name="DFYZJE" type="8" table="HIS_YFFY_PYB" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
<dao id="zyksfyhzDao" log="true" type="1" memo="住院科室发药的发药汇总dao">
|
|
<sql><![CDATA[
|
|
|
|
|
|
select yzx,zxrks,YZMC,sum(jzyzsl) sl,YPYZJBDW,YPYZJBJG,sum(JE) zje,YZJX,'' glmx,gg,'' cs,YPFL,YZLX,YZZCYFS,dwview from (select a.PKEY,a.YZX,a.YZMX,a.YZDJ,a.YZSL,a.DFYPKEY,a.FYMXPKEY,a.HZBQ,a.HZKS,a.FYKS,a.HZPKEY,a.YPFL,a.JZPKEY,a.TYPE,a.CJR,a.CJRQ,a.XGR,a.XGRQ,a.JGID,a.YZDL,a.TYSL,a.SFSL,a.SFLYSH,a.SFYSSH,a.LYSHR,a.LYSHRQ,a.YSSHR,a.YSSHRQ,a.FYZT,d.ward,d.bed,d.jjys,f.xm,e.zxtime,a.yzsl*b.YZJZZHXS jzyzsl,b.YPYZJBDW,b.YZJZZHXS,b.YZMC,c.GG,b.YZJL,b.YZJLDW,b.YZPC,b.yzcl,e.pkey execpkey,e.SFFLAG,b.YPYZJBJG,a.yzsl*b.yzjzzhxs*b.YPYZJBJG je ,b.YZJX,b.YZLX,b.YZZCYFS,e.ZXRKS,g.dwview from HIS_YFFY_PYB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_YPXX c on a.YZX=c.BM left join HIS_JZ_BASEINFO d on a.JZPKEY=d.pkey and a.JGID=d.JGID left join HIS_YZ_EXEC e on a.DFYPKEY=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_SFX g on a.YZX=g.bm and a.JGID=g.JGID where #FYZT# AND a.TYPE='Z' and d.JZLX='Z' AND d.JZZT='Z' AND a.FYCX=0 and a.PYLX='2' and a.JGID=? #ward# #yzcl# #yf# #ypfl# #ypbm# #zyno# #yplysh# and e.zxtime >=? and e.zxtime <= ? ) group by zxrks,YZMC,YPYZJBDW,YPYZJBJG,YZJX,gg,YPFL,yzx,YZLX,YZZCYFS,dwview
|
|
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="yzx" type="12" />
|
|
<f name="ZXRKS" type="12" />
|
|
<f name="YPMC" type="12" />
|
|
<f name="SL" type="8" />
|
|
<f name="YPYZJBDW" type="12" />
|
|
<f name="YPYZJBJG" type="8" />
|
|
<f name="zje" type="8" />
|
|
<f name="YZJX" type="12" />
|
|
<f name="GLMX" type="12" />
|
|
<f name="GG" type="12" />
|
|
<f name="CS" type="12" />
|
|
<f name="YPFL" type="12" />
|
|
<f name="YZLX" type="12" />
|
|
<f name="YZZCYFS" type="12" />
|
|
<f name="dwview" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="zyjsyAutofyPybMxDao" log="true" type="1" memo="住院基数药自动发药的发药明细dao">
|
|
<sql><![CDATA[
|
|
|
|
select b.cfh,d.JJKS,d.ZYNO,a.PKEY,a.YZX,a.YZMX,a.YZDJ,a.YZSL,a.DFYPKEY,a.FYMXPKEY,a.HZBQ,a.HZKS,a.FYKS,a.HZPKEY,a.YPFL,a.JZPKEY,a.TYPE,a.CJR,a.CJRQ,a.XGR,a.XGRQ,a.JGID,a.YZDL,a.TYSL,a.SFSL,a.SFLYSH,a.SFYSSH,a.LYSHR,a.LYSHRQ,a.YSSHR,a.YSSHRQ,a.FYZT,d.ward,d.bed,d.jjys,f.xm,e.zxtime,a.yzsl*b.YZJZZHXS jzyzsl,b.YPYZJBDW,b.YZJZZHXS,b.YZMC,c.GG,b.YZJL,b.YZJLDW,b.YZPC,b.yzcl,e.pkey execpkey,e.SFFLAG,b.YPYZJBJG,a.yzsl*b.yzjzzhxs*b.YPYZJBJG je,b.YZJX,a.SFSL*b.YZJZZHXS jzsfsl,e.zxsl,e.zxje,b.yzxpkey,b.YZXZSJ,e.ISACTION,b.YZLX,b.YZZCYFS,b.YZYF,a.FYCX,e.ZXFLAG,a.LOCKFLAG,e.ZXRKS from HIS_YFFY_PYB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_YPXX c on a.YZX=c.BM left join HIS_JZ_BASEINFO d on a.JZPKEY=d.pkey and a.JGID=d.JGID left join HIS_YZ_EXEC e on a.DFYPKEY=e.pkey and a.JGID=e.JGID left join HIS_HZINFO f on a.hzpkey=f.pkey and a.JGID=f.JGID where #FYZT# AND a.TYPE='Z' AND a.FYCX=0 and d.JZLX='Z' AND d.JZZT='Z' AND a.PYLX='3' and a.JGID=? #ward# #yzcl# #yf# #ypfl# #ypbm# #zyno# #yplysh# and e.zxtime >=? and e.zxtime <= ?
|
|
|
|
|
|
]]></sql>
|
|
<tables>
|
|
<table name="HIS_YFFY_PYB" insert="false" update="true" delete="false">
|
|
<primary>PKEY</primary>
|
|
<primary>YZMX</primary>
|
|
<primary>FYMXPKEY</primary>
|
|
<primary>FYZT</primary>
|
|
<primary>FYCX</primary>
|
|
</table>
|
|
<table name="HIS_YZ_EXEC" insert="false" update="true" delete="false">
|
|
<primary>EXECPKEY</primary>
|
|
<primary>YZMX</primary>
|
|
<primary>JZPKEY</primary>
|
|
<primary>SFFLAG</primary>
|
|
<primary>ISACTION</primary>
|
|
<primary>ZXFLAG</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="CFH" type="12" />
|
|
<f name="JJKS" type="12" />
|
|
<f name="ZYNO" type="12" />
|
|
<f name="PKEY" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="YZX" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="YZMX" type="12" table="HIS_YFFY_PYB,HIS_YZ_EXEC" />
|
|
<f name="YZDJ" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="YZSL" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="DFYPKEY" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="FYMXPKEY" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="HZBQ" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="HZKS" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="FYKS" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="HZPKEY" type="12" table="HIS_YFFY_PYB,HIS_YZ_EXEC" />
|
|
<f name="YPFL" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="JZPKEY" type="12" table="HIS_YFFY_PYB,HIS_YZ_EXEC" />
|
|
<f name="TYPE" type="12" table="HIS_YFFY_PYB" />
|
|
<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="YZDL" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="TYSL" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="SFSL" 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="WARD" type="12" />
|
|
<f name="BED" type="12" />
|
|
<f name="JJYS" type="12" />
|
|
<f name="XM" type="12" />
|
|
<f name="ZXTIME" type="93" table="HIS_YZ_EXEC" />
|
|
<f name="JZYZSL" type="4" />
|
|
<f name="YPYZJBDW" type="12" />
|
|
<f name="YZJZZHXS" type="12" />
|
|
<f name="YZMC" type="12" table="HIS_YZ_EXEC" />
|
|
<f name="GG" type="12" />
|
|
<f name="YZJL" type="12" />
|
|
<f name="YZJLDW" type="12" />
|
|
<f name="YZPC" type="12" />
|
|
<f name="YZCL" type="12" />
|
|
<f name="EXECPKEY" schemaname="PKEY" type="12" table="HIS_YZ_EXEC" />
|
|
<f name="SFFLAG" type="12" table="HIS_YZ_EXEC" />
|
|
<f name="YPYZJBJG" type="12" />
|
|
<f name="JE" type="12" />
|
|
<f name="YZJX" type="12" />
|
|
<f name="JZSFSL" type="12" />
|
|
<f name="zxsl" type="12" table="HIS_YZ_EXEC" />
|
|
<f name="zxje" type="12" table="HIS_YZ_EXEC" />
|
|
<f name="yzxpkey" type="12" />
|
|
<f name="YZXZSJ" type="93" />
|
|
<f name="ISACTION" type="12" table="HIS_YZ_EXEC" />
|
|
<f name="YZLX" type="12" />
|
|
<f name="YZZCYFS" type="12" />
|
|
<f name="YZYF" type="12" />
|
|
<f name="FYCX" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="ZXFLAG" type="12" table="HIS_YZ_EXEC" />
|
|
<f name="LOCKFLAG" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="ZXRKS" type="12" table="HIS_YZ_EXEC" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
<dao id="mztfDfyMxLbByMzfpDao" log="true" type="1" memo="通过门诊发票号获取待发药明细列表">
|
|
<sql>
|
|
|
|
select a.PKEY,a.YZX,a.YZMX,a.YZDJ,a.YZSL,a.DFYPKEY,a.FYMXPKEY,a.HZBQ,a.HZKS,a.FYKS,a.HZPKEY,a.YPFL,a.JZPKEY,a.TYPE,a.CJR,a.CJRQ,a.XGR,a.XGRQ,a.JGID,a.YZDL,b.YZMC,b.YZDW,b.YZJL,b.YZJLDW,b.YZPC,b.YZLC,b.YZJE,b.YZBZ,b.YZXZYS,b.YZXZKS,b.YZDJSL,c.GG,c.CSXX,b.PKEY YZPKEY,b.YZYF,c.JBDW,b.YZJZZHXS,b.YPYZJBJG,a.TYSL,a.SFSL,a.FYZT,a.LOCKFLAG from HIS_YFFY_PYB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_YPXX c on a.YZX=c.BM left join HIS_YFFY_MZDFYZB d on d.pkey=a.DFYPKEY and a.JGID=d.JGID where a.JGID=? and d.MZFPPKEY=? order by a.pkey
|
|
|
|
|
|
</sql>
|
|
<tables>
|
|
<table name="HIS_YZ_MXB" insert="true" update="true" delete="true">
|
|
<primary>YZPKEY</primary>
|
|
<primary>YZDJSL</primary>
|
|
<primary>HZPKEY</primary>
|
|
<primary>JZPKEY</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
<table name="HIS_YFFY_PYB" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>YZX</primary>
|
|
<primary>YZMX</primary>
|
|
<primary>JGID</primary>
|
|
<primary>HZPKEY</primary>
|
|
<primary>JZPKEY</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="YZX" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="YZMX" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="YZDJ" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="YZSL" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="DFYPKEY" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="FYMXPKEY" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="HZBQ" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="HZKS" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="FYKS" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="HZPKEY" type="12" table="HIS_YZ_MXB,HIS_YFFY_PYB" />
|
|
<f name="YPFL" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="JZPKEY" type="12" table="HIS_YZ_MXB,HIS_YFFY_PYB" />
|
|
<f name="TYPE" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="CJR" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="CJRQ" type="93" table="HIS_YFFY_PYB" />
|
|
<f name="XGR" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="XGRQ" type="93" table="HIS_YFFY_PYB" />
|
|
<f name="JGID" type="12" table="HIS_YZ_MXB,HIS_YFFY_PYB" />
|
|
<f name="YZDL" type="12" table="HIS_YFFY_PYB" />
|
|
<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" table="HIS_YZ_MXB" />
|
|
<f name="GG" type="12" />
|
|
<f name="CSXX" type="12" />
|
|
<f name="YZPKEY" schemaname="PKEY" type="12" table="HIS_YZ_MXB" />
|
|
<f name="YZYF" type="12" table="HIS_YZ_MXB" />
|
|
<f name="JBDW" type="12" />
|
|
<f name="YZJZZHXS" type="12" table="HIS_YZ_MXB" />
|
|
<f name="YPYZJBJG" type="12" table="HIS_YZ_MXB" />
|
|
<f name="TYSL" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="SFSL" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="FYZT" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="LOCKFLAG" type="12" table="HIS_YFFY_PYB" />
|
|
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
|
|
<dao id="mzfyyfyAllDao" log="true" type="1" memo="已发药明细列表">
|
|
<sql><![CDATA[
|
|
|
|
select a.PKEY,a.YZX,a.YZMX,a.YZDJ,a.YZSL/b.YZJZZHXS YZSL,a.FYBPKEY,a.HZBQ,a.HZKS,a.FYKS,a.HZPKEY,a.YPFL,a.JZPKEY,a.TYPE,a.CJR,a.CJRQ,a.XGR,a.XGRQ,a.JGID,a.YZDL,b.YZMC,b.YZDW,b.YZJL,b.YZJLDW,b.YZPC,b.YZLC,b.YZJE,b.YZBZ,b.YZXZYS,b.YZXZKS,b.YZDJSL,c.GG,c.CSXX,b.PKEY YZPKEY,b.YZYF,c.JBDW,b.YZJZZHXS,b.YPYZJBJG,a.TYSL/b.YZJZZHXS TYSL,b.cfh,f.xm,a.YZSL/b.YZJZZHXS*h.DJ jjje,a.SFSL,a.FYDW,a.FYJE,a.TYJE,a.STSL,a.FYJJJE,a.TYJJJE,a.PCDJ,a.PCJBDJ from HIS_YFFY_MZFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_YPXX c on a.YZX=c.BM left join HIS_YFFY_MZFYZB g on a.FYBPKEY=g.pkey and a.JGID=g.JGID left join HIS_HZINFO f on a.hzpkey=f.pkey and a.JGID=f.JGID left join HIS_KSKC_PC h on a.KSKCPCPKEY=h.pkey and a.JGID=h.JGID where a.JGID=? #hzbq# and g.FYRQ >=? and g.FYRQ <=? and a.SFSL > 0 order by g.FYRQ
|
|
|
|
|
|
|
|
]]></sql>
|
|
<tables>
|
|
<table name="HIS_YZ_MXB" insert="true" update="true" delete="true">
|
|
<primary>YZPKEY</primary>
|
|
<primary>YZDJSL</primary>
|
|
<primary>HZPKEY</primary>
|
|
<primary>JZPKEY</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
<table name="HIS_YFFY_MZFYMXB" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>YZX</primary>
|
|
<primary>YZMX</primary>
|
|
<primary>JGID</primary>
|
|
<primary>HZPKEY</primary>
|
|
<primary>JZPKEY</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="YZX" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="YZMX" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="YZDJ" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="YZSL" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="FYBPKEY" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="HZBQ" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="HZKS" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="FYKS" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="HZPKEY" type="12" table="HIS_YZ_MXB,HIS_YFFY_MZFYMXB" />
|
|
<f name="YPFL" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="JZPKEY" type="12" table="HIS_YZ_MXB,HIS_YFFY_MZFYMXB" />
|
|
<f name="TYPE" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="CJR" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="CJRQ" type="93" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="XGR" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="XGRQ" type="93" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="JGID" type="12" table="HIS_YZ_MXB,HIS_YFFY_MZFYMXB" />
|
|
<f name="YZDL" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<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" table="HIS_YZ_MXB" />
|
|
<f name="GG" type="12" />
|
|
<f name="CSXX" type="12" />
|
|
<f name="YZPKEY" schemaname="PKEY" type="12" table="HIS_YZ_MXB" />
|
|
<f name="YZYF" type="12" table="HIS_YZ_MXB" />
|
|
<f name="JBDW" type="12" />
|
|
<f name="YZJZZHXS" type="12" table="HIS_YZ_MXB" />
|
|
<f name="YPYZJBJG" type="12" table="HIS_YZ_MXB" />
|
|
<f name="TYSL" type="12"/>
|
|
<f name="CFH" type="12"/>
|
|
<f name="XM" type="12"/>
|
|
<f name="JJJE" type="4" />
|
|
<f name="SFSL" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="FYDW" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="FYJE" type="8" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="TYJE" type="8" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="STSL" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="FYJJJE" type="8" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="TYJJJE" type="8" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="PCDJ" type="8" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="PCJBDJ" type="8" table="HIS_YFFY_MZFYMXB" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="zyyffyHzHzmxDao" log="true" type="1" memo="患者住院发药汇总明细">
|
|
<sql><![CDATA[
|
|
|
|
|
|
select yzx,ward,YZMC,sum(jzyzsl) sl,YPYZJBDW,YPYZJBJG,sum(DFYZJE) zje,YZJX,'' glmx,gg,'' cs,YPFL,YZLX,YZZCYFS,dwview,xm,zyno,YPFYSJMS,YPYZBZJG,YPYZBZDW,YZDW,YPYZZHXS,DFYZJE,JJKS,bm,xb,jznl,JZZDNAMELIST from (select a.PKEY,a.YZX,a.YZMX,a.YZDJ,a.YZSL,a.DFYPKEY,a.FYMXPKEY,a.HZBQ,a.HZKS,a.FYKS,a.HZPKEY,a.YPFL,a.JZPKEY,a.TYPE,a.CJR,a.CJRQ,a.XGR,a.XGRQ,a.JGID,a.YZDL,a.TYSL,a.SFSL,a.SFLYSH,a.SFYSSH,a.LYSHR,a.LYSHRQ,a.YSSHR,a.YSSHRQ,a.FYZT,d.ward,d.bed,d.jjys,f.xm,e.zxtime,a.yzsl*b.YZJZZHXS jzyzsl,b.YPYZJBDW,b.YZJZZHXS,b.YZMC,c.GG,b.YZJL,b.YZJLDW,b.YZPC,b.yzcl,e.pkey execpkey,e.SFFLAG,b.YPYZJBJG,a.yzsl*b.yzjzzhxs*b.YPYZJBJG je ,b.YZJX,b.YZLX,b.YZZCYFS,g.dwview,d.zyno,a.YPFYSJMS,b.YPYZBZJG,b.YPYZBZDW,b.YZDW,b.YPYZZHXS,a.DFYZJE,d.JJKS,c.bm,f.xb,d.jznl,d.JZZDNAMELIST from HIS_YFFY_PYB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_YPXX c on a.YZX=c.BM left join HIS_JZ_BASEINFO d on a.JZPKEY=d.pkey and a.JGID=d.JGID left join HIS_YZ_EXEC e on a.DFYPKEY=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_SFX g on a.YZX=g.bm and a.JGID=g.JGID where #FYZT# AND a.TYPE='Z' and (d.JZLX='Z' or (d.JZLX='J' AND d.SFLG='1')) AND d.JZZT='Z' AND a.FYCX=0 and a.PYLX='1' and b.SFYFJJFY !='1' and a.JGID=? #ward# #yzcl# #yf# #ypfl# #ypbm# #zyno# #yplysh# and e.zxtime >=? and e.zxtime <= ? ) group by ward,YZMC,YPYZJBDW,YPYZJBJG,YZJX,gg,YPFL,yzx,YZLX,YZZCYFS,dwview,xm,zyno,YPFYSJMS,YPYZBZJG,YPYZBZDW,YZDW,YPYZZHXS,DFYZJE,JJKS,bm,xb,jznl,JZZDNAMELIST order by zyno,yzx,JJKS,bm
|
|
|
|
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="yzx" type="12" />
|
|
<f name="ward" type="12" />
|
|
<f name="YZMC" type="12" />
|
|
<f name="SL" type="8" />
|
|
<f name="YPYZJBDW" type="12" />
|
|
<f name="YPYZJBJG" type="8" />
|
|
<f name="zje" type="8" />
|
|
<f name="YZJX" type="12" />
|
|
<f name="GLMX" type="12" />
|
|
<f name="GG" type="12" />
|
|
<f name="CS" type="12" />
|
|
<f name="YPFL" type="12" />
|
|
<f name="YZLX" type="12" />
|
|
<f name="YZZCYFS" type="12" />
|
|
<f name="dwview" type="12" />
|
|
<f name="xm" type="12" />
|
|
<f name="zyno" type="12" />
|
|
<f name="YPFYSJMS" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="YPYZBZJG" type="12" />
|
|
<f name="YPYZBZDW" type="12" />
|
|
<f name="YZDW" type="12" />
|
|
<f name="YPYZZHXS" type="12" />
|
|
<f name="DFYZJE" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="JJKS" type="12" />
|
|
<f name="BM" type="12" />
|
|
<f name="XB" type="12" />
|
|
<f name="JZNL" type="12" />
|
|
<f name="JZZDNAMELIST" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
<dao id="zypybNotSendNumDao" log="true" type="1" memo="这里先只是获取住院部分的,门诊的有进行冻结数量">
|
|
<sql>
|
|
select sum(a.yzsl*b.YZJZZHXS) jzyzsl,a.yzx||'|'||b.yzzxks flag from HIS_YFFY_PYB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID where a.FYZT=0 AND a.TYPE='Z' AND a.FYCX=0 and a.JGID=? group by a.YZX,b.yzzxks
|
|
</sql>
|
|
<fields>
|
|
<f name="jzyzsl" type="4" />
|
|
<f name="flag" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="zypybSingleYpNotSendNumDao" log="true" type="1" memo="单个药品-这里先只是获取住院部分的,门诊的有进行冻结数量">
|
|
<sql>
|
|
select sum(a.yzsl*b.YZJZZHXS) jzyzsl,a.yzx||'|'||b.yzzxks flag from HIS_YFFY_PYB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID where a.FYZT=0 AND a.TYPE='Z' AND a.FYCX=0 and a.JGID=? and a.yzx=? and b.yzzxks=? group by a.YZX,b.yzzxks
|
|
</sql>
|
|
<fields>
|
|
<f name="jzyzsl" type="4" />
|
|
<f name="flag" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="allKskcxxdao" log="true" type="1">
|
|
<sql> select a.JGID,a.PKEY,a.SFX_BM,a.SL,a.KYSL,a.DJSL,a.HWM_BM,b.MC,b.JBDW,b.ZHXS,b.RKDW,b.JG,b.JBJG,c.GG,c.CSXX,b.DWVIEW,a.DPTID,b.ybbm,b.ybmc,a.LOCKFLAG
|
|
from HIS_KSKC a
|
|
left join HIS_SFX b on a.JGID=b.JGID and a.SFX_BM=b.BM
|
|
left join HIS_YPXX c on c.BM=b.BM
|
|
where a.JGID=? and b.GLLX='Y'</sql>
|
|
<tables>
|
|
<table name="HIS_KSKC" insert="false" update="true" delete="false">
|
|
<primary>JGID</primary>
|
|
<primary>PKEY</primary>
|
|
<primary>SFX_BM</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="JGID" type="12" table="HIS_KSKC" />
|
|
<f name="PKEY" type="12" table="HIS_KSKC" />
|
|
<f name="SFX_BM" type="12" table="HIS_KSKC" />
|
|
<f name="SL" type="8" table="HIS_KSKC" />
|
|
<f name="KYSL" type="8" table="HIS_KSKC" />
|
|
<f name="DJSL" type="8" table="HIS_KSKC" />
|
|
<f name="HWM_BM" type="12" table="HIS_KSKC" />
|
|
<f name="MC" type="12" />
|
|
<f name="JBDW" type="12" />
|
|
<f name="ZHXS" type="8" />
|
|
<f name="RKDW" type="12" />
|
|
<f name="JG" type="8" />
|
|
<f name="JBJG" type="8" />
|
|
<f name="GG" type="12" />
|
|
<f name="CSXX" type="12" />
|
|
<f name="DWVIEW" type="12" />
|
|
<f name="DPTID" type="12" table="HIS_KSKC" />
|
|
<f name="YBBM" type="12" />
|
|
<f name="YBMC" type="12" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_KSKC" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
<dao id="fypymxbnewDao" log="true" type="1" memo="发药配药明细表数据,用于批次售价模式">
|
|
<sql>
|
|
select PKEY,HZPKEY,JZPKEY,YZMX,YZXPKEY,PYBPKEY,KSKCPKEY,KSKCPCPKEY,DFSL,FYDW,PCSJ,PCJBSJ,SFBZDWFY,YPYZZHXS,CJR,CJRQ,XGR,XGRQ,JGID,LOCKFLAG,FYZT,SFXPKEY,DJSL from HIS_YFFY_PYB_MX where 1=2
|
|
</sql>
|
|
<tables>
|
|
<table name="HIS_YFFY_PYB_MX" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_YFFY_PYB_MX" />
|
|
<f name="HZPKEY" type="12" table="HIS_YFFY_PYB_MX" />
|
|
<f name="JZPKEY" type="12" table="HIS_YFFY_PYB_MX" />
|
|
<f name="YZMX" type="12" table="HIS_YFFY_PYB_MX" />
|
|
<f name="YZXPKEY" type="12" table="HIS_YFFY_PYB_MX" />
|
|
<f name="PYBPKEY" type="12" table="HIS_YFFY_PYB_MX" />
|
|
<f name="KSKCPKEY" type="12" table="HIS_YFFY_PYB_MX" />
|
|
<f name="KSKCPCPKEY" type="12" table="HIS_YFFY_PYB_MX" />
|
|
<f name="DFSL" type="12" table="HIS_YFFY_PYB_MX" />
|
|
<f name="FYDW" type="12" table="HIS_YFFY_PYB_MX" />
|
|
<f name="PCSJ" type="8" table="HIS_YFFY_PYB_MX" />
|
|
<f name="PCJBSJ" type="8" table="HIS_YFFY_PYB_MX" />
|
|
<f name="SFBZDWFY" type="12" table="HIS_YFFY_PYB_MX" />
|
|
<f name="YPYZZHXS" type="12" table="HIS_YFFY_PYB_MX" />
|
|
<f name="CJR" type="12" table="HIS_YFFY_PYB_MX" />
|
|
<f name="CJRQ" type="93" table="HIS_YFFY_PYB_MX" />
|
|
<f name="XGR" type="12" table="HIS_YFFY_PYB_MX" />
|
|
<f name="XGRQ" type="93" table="HIS_YFFY_PYB_MX" />
|
|
<f name="JGID" type="12" table="HIS_YFFY_PYB_MX" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_YFFY_PYB_MX" />
|
|
<f name="FYZT" type="12" table="HIS_YFFY_PYB_MX" />
|
|
<f name="SFXPKEY" type="12" table="HIS_YFFY_PYB_MX" />
|
|
<f name="DJSL" type="12" table="HIS_YFFY_PYB_MX" />
|
|
</fields>
|
|
</dao>
|
|
|
|
|
|
<dao id="fypymxbByJzpkeyDao" log="true" type="1" memo="发药配药明细表数据,用于批次售价模式">
|
|
<sql>
|
|
select PKEY,HZPKEY,JZPKEY,YZMX,YZXPKEY,PYBPKEY,KSKCPKEY,KSKCPCPKEY,DFSL,FYDW,PCSJ,PCJBSJ,SFBZDWFY,YPYZZHXS,CJR,CJRQ,XGR,XGRQ,JGID,LOCKFLAG,FYZT,SFXPKEY,DJSL from HIS_YFFY_PYB_MX where JGID=? and hzpkey=? and jzpkey=?
|
|
</sql>
|
|
<tables>
|
|
<table name="HIS_YFFY_PYB_MX" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_YFFY_PYB_MX" />
|
|
<f name="HZPKEY" type="12" table="HIS_YFFY_PYB_MX" />
|
|
<f name="JZPKEY" type="12" table="HIS_YFFY_PYB_MX" />
|
|
<f name="YZMX" type="12" table="HIS_YFFY_PYB_MX" />
|
|
<f name="YZXPKEY" type="12" table="HIS_YFFY_PYB_MX" />
|
|
<f name="PYBPKEY" type="12" table="HIS_YFFY_PYB_MX" />
|
|
<f name="KSKCPKEY" type="12" table="HIS_YFFY_PYB_MX" />
|
|
<f name="KSKCPCPKEY" type="12" table="HIS_YFFY_PYB_MX" />
|
|
<f name="DFSL" type="12" table="HIS_YFFY_PYB_MX" />
|
|
<f name="FYDW" type="12" table="HIS_YFFY_PYB_MX" />
|
|
<f name="PCSJ" type="8" table="HIS_YFFY_PYB_MX" />
|
|
<f name="PCJBSJ" type="8" table="HIS_YFFY_PYB_MX" />
|
|
<f name="SFBZDWFY" type="12" table="HIS_YFFY_PYB_MX" />
|
|
<f name="YPYZZHXS" type="12" table="HIS_YFFY_PYB_MX" />
|
|
<f name="CJR" type="12" table="HIS_YFFY_PYB_MX" />
|
|
<f name="CJRQ" type="93" table="HIS_YFFY_PYB_MX" />
|
|
<f name="XGR" type="12" table="HIS_YFFY_PYB_MX" />
|
|
<f name="XGRQ" type="93" table="HIS_YFFY_PYB_MX" />
|
|
<f name="JGID" type="12" table="HIS_YFFY_PYB_MX" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_YFFY_PYB_MX" />
|
|
<f name="FYZT" type="12" table="HIS_YFFY_PYB_MX" />
|
|
<f name="SFXPKEY" type="12" table="HIS_YFFY_PYB_MX" />
|
|
<f name="DJSL" type="12" table="HIS_YFFY_PYB_MX" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
|
|
<dao id="fypybByJzpkeyDao" log="true" type="1" memo="用于批次售价模式下的门诊,住院待发药配药表">
|
|
<sql>select PKEY,YZX,YZMX,YZDJ,YZSL,DFYPKEY,FYMXPKEY,HZBQ,HZKS,FYKS,HZPKEY,YPFL,JZPKEY,TYPE,CJR,CJRQ,XGR,XGRQ,JGID,YZDL,TYSL,SFSL,SFLYSH,SFYSSH,LYSHR,LYSHRQ,YSSHR,YSSHRQ,FYZT,FYCX,PYLX,JSYBH,LOCKFLAG,YPFYSJMS from HIS_YFFY_PYB where JGID=? and hzpkey=? and jzpkey=? </sql>
|
|
<tables>
|
|
<table name="HIS_YFFY_PYB" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="YZX" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="YZMX" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="YZDJ" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="YZSL" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="DFYPKEY" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="FYMXPKEY" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="HZBQ" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="HZKS" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="FYKS" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="HZPKEY" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="YPFL" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="JZPKEY" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="TYPE" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="CJR" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="CJRQ" type="93" table="HIS_YFFY_PYB" />
|
|
<f name="XGR" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="XGRQ" type="93" table="HIS_YFFY_PYB" />
|
|
<f name="JGID" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="YZDL" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="TYSL" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="SFSL" 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="FYCX" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="PYLX" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="JSYBH" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_YFFY_PYB" />
|
|
<f name="YPFYSJMS" type="12" table="HIS_YFFY_PYB" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="mzfymxbByJzpkeyDao" log="true" type="1" memo="患者当前就诊的所有门诊发药明细表数据dao">
|
|
<sql>
|
|
select PKEY,YZX,YZMX,YZDJ,YZSL,FYBPKEY,HZBQ,HZKS,FYKS,HZPKEY,YPFL,JZPKEY,TYPE,YZDL,TYSL,CJR,CJRQ,XGR,XGRQ,JGID,KSKCPKEY,KSKCPCPKEY,LOCKFLAG,SFSL,FYDW,PCSJ,PCJBSJ,SFBZDWFY,YPYZZHXS,FYJE,YPFYSJMS,TYJE,STSL from HIS_YFFY_MZFYMXB where JGID=? and hzpkey=? and jzpkey=?
|
|
</sql>
|
|
<tables>
|
|
<table name="HIS_YFFY_MZFYMXB" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="YZX" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="YZMX" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="YZDJ" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="YZSL" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="FYBPKEY" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="HZBQ" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="HZKS" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="FYKS" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="HZPKEY" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="YPFL" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="JZPKEY" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="TYPE" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="YZDL" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="TYSL" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="CJR" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="CJRQ" type="93" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="XGR" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="XGRQ" type="93" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="JGID" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="KSKCPKEY" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="KSKCPCPKEY" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="SFSL" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="FYDW" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="PCSJ" type="8" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="PCJBSJ" type="8" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="SFBZDWFY" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="YPYZZHXS" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="FYJE" type="8" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="YPFYSJMS" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="TYJE" type="8" table="HIS_YFFY_MZFYMXB" />
|
|
<f name="STSL" type="12" table="HIS_YFFY_MZFYMXB" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
|
|
<dao id="getSfxMxPkeyDao" log="true" type="1">
|
|
<sql>
|
|
select pkey from HIS_SFZD_SFXMXB where JGID=? and YZMX=? and EXEPKEY =? and (JSZT='1' or JSZT='0')
|
|
</sql>
|
|
<fields>
|
|
<f name="PKEY" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
<dao id="fypymxbByPybpkeyDao" log="true" type="1" memo="发药配药明细表数据,用配药表主键获取,用于批次售价模式">
|
|
<sql>
|
|
select PKEY,HZPKEY,JZPKEY,YZMX,YZXPKEY,PYBPKEY,KSKCPKEY,KSKCPCPKEY,DFSL,FYDW,PCSJ,PCJBSJ,SFBZDWFY,YPYZZHXS,CJR,CJRQ,XGR,XGRQ,JGID,LOCKFLAG,FYZT,SFXPKEY from HIS_YFFY_PYB_MX where JGID=? and hzpkey=? and jzpkey=? and PYBPKEY=?
|
|
</sql>
|
|
<tables>
|
|
<table name="HIS_YFFY_PYB_MX" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_YFFY_PYB_MX" />
|
|
<f name="HZPKEY" type="12" table="HIS_YFFY_PYB_MX" />
|
|
<f name="JZPKEY" type="12" table="HIS_YFFY_PYB_MX" />
|
|
<f name="YZMX" type="12" table="HIS_YFFY_PYB_MX" />
|
|
<f name="YZXPKEY" type="12" table="HIS_YFFY_PYB_MX" />
|
|
<f name="PYBPKEY" type="12" table="HIS_YFFY_PYB_MX" />
|
|
<f name="KSKCPKEY" type="12" table="HIS_YFFY_PYB_MX" />
|
|
<f name="KSKCPCPKEY" type="12" table="HIS_YFFY_PYB_MX" />
|
|
<f name="DFSL" type="12" table="HIS_YFFY_PYB_MX" />
|
|
<f name="FYDW" type="12" table="HIS_YFFY_PYB_MX" />
|
|
<f name="PCSJ" type="8" table="HIS_YFFY_PYB_MX" />
|
|
<f name="PCJBSJ" type="8" table="HIS_YFFY_PYB_MX" />
|
|
<f name="SFBZDWFY" type="12" table="HIS_YFFY_PYB_MX" />
|
|
<f name="YPYZZHXS" type="12" table="HIS_YFFY_PYB_MX" />
|
|
<f name="CJR" type="12" table="HIS_YFFY_PYB_MX" />
|
|
<f name="CJRQ" type="93" table="HIS_YFFY_PYB_MX" />
|
|
<f name="XGR" type="12" table="HIS_YFFY_PYB_MX" />
|
|
<f name="XGRQ" type="93" table="HIS_YFFY_PYB_MX" />
|
|
<f name="JGID" type="12" table="HIS_YFFY_PYB_MX" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_YFFY_PYB_MX" />
|
|
<f name="FYZT" type="12" table="HIS_YFFY_PYB_MX" />
|
|
<f name="SFXPKEY" type="12" table="HIS_YFFY_PYB_MX" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="clearKcpcDjslDao" log="true" type="1" memo="清理医嘱产生的冻结数量的医嘱dao">
|
|
<sql><![CDATA[
|
|
select a.PKEY,a.HZPKEY,a.JZPKEY,a.YZMX,a.YZXPKEY,a.PYBPKEY,a.KSKCPKEY,a.KSKCPCPKEY,a.DFSL,a.FYDW,a.PCSJ,a.PCJBSJ,a.SFBZDWFY,a.YPYZZHXS,a.CJR,a.CJRQ,a.XGR,a.XGRQ,a.JGID,a.LOCKFLAG,a.FYZT,a.SFXPKEY,a.DJSL,YZTFSL from HIS_YFFY_PYB_MX a left join his_yffy_pyb b on a.PYBPKEY=b.pkey and a.JGID=b.JGID
|
|
LEFT JOIN HIS_YZ_MXB c on c.JGID = a.JGID and c.PKEY = a.YZMX and c.JZPKEY = a.JZPKEY
|
|
where a.JGID=? and (a.SFXPKEY is null or (c.YZTFSL >= a.DJSL)) and a.FYZT=0 and b.type='M' and a.CJRQ < ?
|
|
]]></sql>
|
|
<tables>
|
|
<table name="HIS_YFFY_PYB_MX" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="PKEY" type="12" table="HIS_YFFY_PYB_MX" />
|
|
<f name="HZPKEY" type="12" table="HIS_YFFY_PYB_MX" />
|
|
<f name="JZPKEY" type="12" table="HIS_YFFY_PYB_MX" />
|
|
<f name="YZMX" type="12" table="HIS_YFFY_PYB_MX" />
|
|
<f name="YZXPKEY" type="12" table="HIS_YFFY_PYB_MX" />
|
|
<f name="PYBPKEY" type="12" table="HIS_YFFY_PYB_MX" />
|
|
<f name="KSKCPKEY" type="12" table="HIS_YFFY_PYB_MX" />
|
|
<f name="KSKCPCPKEY" type="12" table="HIS_YFFY_PYB_MX" />
|
|
<f name="DFSL" type="12" table="HIS_YFFY_PYB_MX" />
|
|
<f name="FYDW" type="12" table="HIS_YFFY_PYB_MX" />
|
|
<f name="PCSJ" type="8" table="HIS_YFFY_PYB_MX" />
|
|
<f name="PCJBSJ" type="8" table="HIS_YFFY_PYB_MX" />
|
|
<f name="SFBZDWFY" type="12" table="HIS_YFFY_PYB_MX" />
|
|
<f name="YPYZZHXS" type="12" table="HIS_YFFY_PYB_MX" />
|
|
<f name="CJR" type="12" table="HIS_YFFY_PYB_MX" />
|
|
<f name="CJRQ" type="93" table="HIS_YFFY_PYB_MX" />
|
|
<f name="XGR" type="12" table="HIS_YFFY_PYB_MX" />
|
|
<f name="XGRQ" type="93" table="HIS_YFFY_PYB_MX" />
|
|
<f name="JGID" type="12" table="HIS_YFFY_PYB_MX" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_YFFY_PYB_MX" />
|
|
<f name="FYZT" type="12" table="HIS_YFFY_PYB_MX" />
|
|
<f name="SFXPKEY" type="12" table="HIS_YFFY_PYB_MX" />
|
|
<f name="DJSL" type="12" table="HIS_YFFY_PYB_MX" />
|
|
<f name="YZTFSL" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
<dao id="zyfxmxSelectByJzpkeyDao" log="true" type="1" memo="个人住院发药明细表的dao">
|
|
<sql><![CDATA[
|
|
|
|
select '' SEL,d.JJKS,a.PKEY,a.FYBPKEY,d.pkey JZPKEY,a.HZPKEY,a.ZYNO,a.CFH,a.PYBPKEY,a.YZXPKEY,a.YZMX,a.YZDJ,a.YZSL,a.BED,a.YPFL,a.YZDL,a.TYSL,a.KSKCPKEY,a.KSKCPCPKEY,a.CJR,a.CJRQ,a.XGR,a.XGRQ,a.JGID,a.EXEPKEY,d.ward,d.jjys,f.xm,e.zxtime,a.yzsl jzyzsl,b.YPYZJBDW,b.YZJZZHXS,b.YZMC,c.GG,b.YZJL,b.YZJLDW,b.YZPC,b.yzcl,e.pkey execpkey,e.SFFLAG,b.YPYZJBJG,a.yzsl*b.YPYZJBJG je,b.YZJX,a.YZSL jzsfsl,e.zxsl,e.zxje,b.YZXZSJ,e.ISACTION,b.YZLX,b.YZZCYFS,b.YZYF,a.SFSL,a.FYDW,a.FYJE,a.STSL,a.TYJE,f.xb,d.rynl,b.YZZCYJX,b.YZZCYYF,b.YZZCYFSKEY,b.yzdw,b.YZGG,b.YZJE,b.YZXZKS,b.YZZXKS,g.FYTIME,g.FYKS,g.FYR,g.FYLB,a.LOCKFLAG,a.HSBYZT,a.HSBYR,a.HSBYSJ,a.HSBYBQ,a.HSBYKS from HIS_YFFY_ZYFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_YPXX c on a.YZXPKEY=c.BM left join HIS_JZ_BASEINFO d on a.JZPKEY=d.pkey and a.JGID=d.JGID left join HIS_YZ_EXEC e on a.EXEPKEY=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_YFFY_ZYFYZB g on a.FYBPKEY=g.pkey and a.JGID=g.JGID where a.JGID=? and a.YZSL>0 and a.HSBYZT=0 #select# order by a.JZPKEY,a.bed,g.FYTIME,a.YZMX
|
|
|
|
|
|
]]></sql>
|
|
<tables>
|
|
<table name="HIS_YFFY_ZYFYMXB" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="SEL" type="1" />
|
|
<f name="JJKS" type="12" />
|
|
<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="WARD" type="12" />
|
|
<f name="JJYS" type="12" />
|
|
<f name="XM" type="12" />
|
|
<f name="ZXTIME" type="93" />
|
|
<f name="JZYZSL" type="12" />
|
|
<f name="YPYZJBDW" type="12" />
|
|
<f name="YZJZZHXS" type="12" />
|
|
<f name="YZMC" type="12" />
|
|
<f name="GG" type="12" />
|
|
<f name="YZJL" type="12" />
|
|
<f name="YZJLDW" type="12" />
|
|
<f name="YZPC" type="12" />
|
|
<f name="YZCL" type="12" />
|
|
<f name="EXECPKEY" type="12" />
|
|
<f name="SFFLAG" type="12" />
|
|
<f name="YPYZJBJG" type="12" />
|
|
<f name="JE" type="4" />
|
|
<f name="YZJX" type="12" />
|
|
<f name="JZSFSL" type="12" />
|
|
<f name="ZXSL" type="8" />
|
|
<f name="ZXJE" type="8" />
|
|
<f name="YZXZSJ" type="93" />
|
|
<f name="ISACTION" type="12" />
|
|
<f name="YZLX" type="12" />
|
|
<f name="YZZCYFS" type="12" />
|
|
<f name="YZYF" type="12" />
|
|
<f name="SFSL" type="12" table="HIS_YFFY_ZYFYMXB" />
|
|
<f name="FYDW" type="12" table="HIS_YFFY_ZYFYMXB" />
|
|
<f name="FYJE" type="8" table="HIS_YFFY_ZYFYMXB" />
|
|
<f name="STSL" type="12" table="HIS_YFFY_ZYFYMXB" />
|
|
<f name="TYJE" type="8" table="HIS_YFFY_ZYFYMXB" />
|
|
<f name="XB" type="12" />
|
|
<f name="RYNL" type="12" />
|
|
<f name="YZZCYJX" type="12" />
|
|
<f name="YZZCYYF" type="12" />
|
|
<f name="YZZCYFSKEY" type="12" />
|
|
<f name="YZDW" type="12" />
|
|
<f name="YZGG" type="12" />
|
|
<f name="YZJE" type="12" />
|
|
<f name="YZXZKS" type="12" />
|
|
<f name="YZZXKS" type="12" />
|
|
<f name="FYTIME" type="93" />
|
|
<f name="FYKS" type="12" />
|
|
<f name="FYR" type="12" />
|
|
<f name="FYLB" type="12" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_YFFY_ZYFYMXB" />
|
|
<f name="HSBYZT" type="12" table="HIS_YFFY_ZYFYMXB" />
|
|
<f name="HSBYR" type="12" table="HIS_YFFY_ZYFYMXB" />
|
|
<f name="HSBYSJ" type="93" table="HIS_YFFY_ZYFYMXB" />
|
|
<f name="HSBYBQ" type="12" table="HIS_YFFY_ZYFYMXB" />
|
|
<f name="HSBYKS" type="12" table="HIS_YFFY_ZYFYMXB" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="zyfyhzlistdao" log="true" type="1" memo="住院发药患者列表dao">
|
|
<sql>
|
|
select '' 姓名,'' 性别,'' 床位,'' 科室,'' 病区,'' 住院号,'' jzpkey 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="JZPKEY" type="1" />
|
|
</fields>
|
|
</dao>
|
|
|
|
<dao id="zyyffyHzHzmxByZcyDao" log="true" type="1" memo="患者住院发药按中草药处方汇总明细">
|
|
<sql><![CDATA[
|
|
|
|
|
|
select ward,YPFL,xm,zyno,JJKS,cfh,bed,hzpkey,jzpkey from (select a.PKEY,a.YZX,a.YZMX,a.YZDJ,a.YZSL,a.DFYPKEY,a.FYMXPKEY,a.HZBQ,a.HZKS,a.FYKS,a.HZPKEY,a.YPFL,a.JZPKEY,a.TYPE,a.CJR,a.CJRQ,a.XGR,a.XGRQ,a.JGID,a.YZDL,a.TYSL,a.SFSL,a.SFLYSH,a.SFYSSH,a.LYSHR,a.LYSHRQ,a.YSSHR,a.YSSHRQ,a.FYZT,d.ward,d.bed,d.jjys,f.xm,e.zxtime,a.yzsl*b.YZJZZHXS jzyzsl,b.YPYZJBDW,b.YZJZZHXS,b.YZMC,c.GG,b.YZJL,b.YZJLDW,b.YZPC,b.yzcl,e.pkey execpkey,e.SFFLAG,b.YPYZJBJG,a.yzsl*b.yzjzzhxs*b.YPYZJBJG je ,b.YZJX,b.YZLX,b.YZZCYFS,g.dwview,d.zyno,a.YPFYSJMS,b.YPYZBZJG,b.YPYZBZDW,b.YZDW,b.YPYZZHXS,a.DFYZJE,d.JJKS,c.bm,b.cfh from HIS_YFFY_PYB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_YPXX c on a.YZX=c.BM left join HIS_JZ_BASEINFO d on a.JZPKEY=d.pkey and a.JGID=d.JGID left join HIS_YZ_EXEC e on a.DFYPKEY=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_SFX g on a.YZX=g.bm and a.JGID=g.JGID where #FYZT# AND a.TYPE='Z' and (d.JZLX='Z' or (d.JZLX='J' AND d.SFLG='1')) AND d.JZZT='Z' AND a.FYCX=0 and a.PYLX='1' and b.SFYFJJFY !='1' and a.JGID=? #ward# #yzcl# #yf# #ypfl# #ypbm# #zyno# #yplysh# and e.zxtime >=? and e.zxtime <= ? ) group by ward,YPFL,xm,zyno,JJKS,cfh,bed,HZPKEY,JZPKEY order by zyno,cfh,bed,JJKS,HZPKEY,JZPKEY
|
|
|
|
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="WARD" type="12" />
|
|
<f name="YPFL" type="12" />
|
|
<f name="XM" type="12" />
|
|
<f name="ZYNO" type="12" />
|
|
<f name="JJKS" type="12" />
|
|
<f name="CFH" type="12" />
|
|
<f name="BED" type="12" />
|
|
<f name="HZPKEY" type="12" />
|
|
<f name="JZPKEY" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
<dao id="newJJfyDao" log="true" type="1" memo="药房拒绝发药日志">
|
|
<sql>
|
|
select PKEY,HZPKEY,JZPKEY,YZMX,JJFYR,JJFYRQ,JJFYYY,JJFYZT,CJR,CJRQ,XGR,XGRQ,JGID,LOCKFLAG from HIS_YFFY_JJFY where 1=2
|
|
</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" />
|
|
</fields>
|
|
</dao>
|
|
|
|
<dao id="selectYzxByPkeyDao" log="true" type="1" memo="根据医嘱项主键查询医嘱项dao">
|
|
<sql>select '0' scflag,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,SFYFJJFY from HIS_YZ_MXB where JGID=? and PKEY=?</sql>
|
|
<tables>
|
|
<table name="HIS_YZ_MXB" insert="true" update="true" delete="true">
|
|
<primary>PKEY</primary>
|
|
<primary>SFYFJJFY</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="SCFLAG" type="1" />
|
|
<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="SFYFJJFY" type="12" table="HIS_YZ_MXB" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="mzcfhnumDao" 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" />
|
|
</fields>
|
|
</dao>
|
|
|
|
|
|
|
|
<dao id="mzCfhNumByFyDao" log="true" type="1" memo="门诊发药处方数dao">
|
|
<sql><![CDATA[
|
|
select yzxzys,count(*) cfs,sum(fs) fs,sum(fyje) fyje from (select b.yzxzys,b.cfh,sum(b.yzzcyfs) fs,sum(a.FYJE) fyje from HIS_YFFY_MZFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_YPXX c on a.YZX=c.BM left join HIS_YFFY_MZFYZB g on a.FYBPKEY=g.pkey and a.JGID=g.JGID left join HIS_HZINFO f on a.hzpkey=f.pkey and a.JGID=f.JGID left join HIS_TYMC tymc on c.tym=tymc.bm left join his_sfx sfx on b.yzxpkey=sfx.bm and b.JGID=sfx.JGID where a.JGID=? #ks# #ry# and g.FYZT=1 and b.yzlb=? and g.FYRQ >=? and g.FYRQ <=? and nvl(a.YZSL,0)>0 group by b.yzxzys,b.CFH) group by yzxzys
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="YZXZYS" type="12" />
|
|
<f name="CFS" type="4" />
|
|
<f name="FS" type="4" />
|
|
<f name="FYJE" type="4" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
|
|
<dao id="mzCfhNumByTyDao" log="true" type="1" memo="门诊退药处方数dao">
|
|
<sql><![CDATA[
|
|
select yzxzys,count(*) cfs,sum(fs) fs,sum(tyje) tyje from (select b.yzxzys,b.cfh,sum(b.yzzcyfs) fs,sum(a.TYJE) tyje from HIS_YFFY_MZTYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_YPXX c on a.YZX=c.BM left join HIS_YFFY_MZTYZB g on a.TYBPKEY=g.pkey and a.JGID=g.JGID left join HIS_HZINFO f on a.hzpkey=f.pkey and a.JGID=f.JGID left join HIS_TYMC tymc on c.tym=tymc.bm left join his_sfx sfx on b.yzxpkey=sfx.bm and b.JGID=sfx.JGID where a.JGID=? #ks# #ry# and b.yzlb=? and nvl(a.TYSL,0) > 0 and g.FYRQ >=? and g.FYRQ <=? group by b.yzxzys,b.CFH) group by yzxzys
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="YZXZYS" type="12" />
|
|
<f name="CFS" type="4" />
|
|
<f name="FS" type="4" />
|
|
<f name="TYJE" type="4" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="cfjJzksYbmcBayJzpkeyDao" log="true" type="1" memo="获取就诊号就诊科室医保名称dao">
|
|
<sql>
|
|
<![CDATA[
|
|
select
|
|
ks.DPTYBCODE
|
|
,ks.DPTYBMC
|
|
from HIS_JZ_BASEINFO t
|
|
left join MAIN_KS ks on ks.JGID = t.JGID and ks.DPTID = t.JJKS
|
|
where 1 = 1
|
|
and t.JGID = ?
|
|
and t.PKEY = ?
|
|
]]>
|
|
</sql>
|
|
<fields>
|
|
<f name="DPTYBCODE" type="12" />
|
|
<f name="DPTYBMC" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
<dao id="zyyfbqhzdDao" log="true" type="1">
|
|
<sql><![CDATA[
|
|
select yzxpkey,ward,YZMC,sum(jzyzsl) sl,YPYZJBDW,sum(fyje) zje,YZJX,gg,YPFL,YZLX,YZZCYFS,YZJZZHXS,YPYZBZDW,ypyzzhxs,FYKS,HZBQ,HZKS,FYLB from
|
|
(select a.PKEY,a.FYBPKEY,a.JZPKEY,a.HZPKEY,a.ZYNO,a.CFH,a.PYBPKEY,a.YZXPKEY,a.YZMX,a.YZDJ,a.YZSL,a.BED,a.YPFL,a.YZDL,a.TYSL,a.KSKCPKEY,a.KSKCPCPKEY,a.CJR,a.CJRQ,
|
|
a.XGR,a.XGRQ,a.JGID,a.EXEPKEY,d.ward,d.jjys,f.xm,e.zxtime,a.yzsl jzyzsl,b.YPYZJBDW,b.YZJZZHXS,b.YZMC,c.GG,b.YZJL,b.YZJLDW,b.YZPC,b.yzcl,e.pkey execpkey,
|
|
e.SFFLAG,b.YPYZJBJG,a.yzsl*b.YPYZJBJG je ,b.YZJX,b.YZLX,b.YZZCYFS,a.fyje,b.YPYZBZDW,b.ypyzzhxs,
|
|
z.FYTIME,z.FYR,z.FYKS,z.HZBQ,z.HZKS,z.FYLB
|
|
from HIS_YFFY_ZYFYMXB a
|
|
LEFT JOIN HIS_YFFY_ZYFYZB z ON a.jgid=z.jgid AND a.FYBPKEY=z.PKEY
|
|
left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID
|
|
left join HIS_YPXX c on a.YZXPKEY=c.BM
|
|
left join HIS_JZ_BASEINFO d on a.JZPKEY=d.pkey and a.JGID=d.JGID
|
|
left join HIS_YZ_EXEC e on a.EXEPKEY=e.pkey and a.JGID=e.JGID
|
|
left join HIS_HZINFO f on a.hzpkey=f.pkey and a.JGID=f.JGID
|
|
where a.JGID=? and a.YZSL>0
|
|
and z.FYTIME>=?
|
|
and z.FYTIME<=?
|
|
order by d.bed,a.YZMX)
|
|
group by ward,YZMC,YPYZJBDW,YZJX,gg,YPFL,yzxpkey,YZLX,YZZCYFS,YZJZZHXS,YPYZBZDW,ypyzzhxs,FYKS,HZBQ,HZKS,FYLB
|
|
]]></sql>
|
|
//PKEY,FYBPKEY,JZPKEY,HZPKEY,ZYNO,CFH,PYBPKEY,YZXPKEY,YZMX,YZDJ,YZSL,BED,YPFL,YZDL,TYSL,KSKCPKEY,KSKCPCPKEY,CJR,CJRQ,XGR,XGRQ,JGID,EXEPKEY,WARD,JJYS,XM,ZXTIME,JZYZSL,YPYZJBDW,YZJZZHXS,YZMC,GG,YZJL,YZJLDW,YZPC,YZCL,EXECPKEY,SFFLAG,YPYZJBJG,JE,YZJX,YZLX,YZZCYFS,FYJE,YPYZBZDW,YPYZZHXS
|
|
<fields>
|
|
<f name="YZXPKEY" type="12" />
|
|
<f name="WARD" type="12" />
|
|
<f name="YZMC" type="12" />
|
|
<f name="SL" type="4" />
|
|
<f name="YPYZJBDW" type="12" />
|
|
<f name="ZJE" type="4" />
|
|
<f name="YZJX" type="12" />
|
|
<f name="GG" type="12" />
|
|
<f name="YPFL" type="12" />
|
|
<f name="YZLX" type="12" />
|
|
<f name="YZZCYFS" type="12" />
|
|
<f name="YZJZZHXS" type="12" />
|
|
<f name="YPYZBZDW" type="12" />
|
|
<f name="YPYZZHXS" type="12" />
|
|
<f name="FYKS" type="12" />
|
|
<f name="HZBQ" type="12" />
|
|
<f name="HZKS" type="12" />
|
|
<f name="FYLB" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
<dao id="zyyfbqhzmxDao" log="true" type="1" memo="住院发药明细表的dao">
|
|
<sql><![CDATA[
|
|
select d.JJKS,
|
|
a.PKEY,
|
|
a.FYBPKEY,
|
|
a.JZPKEY,
|
|
a.HZPKEY,
|
|
a.ZYNO,
|
|
a.CFH,
|
|
a.PYBPKEY,
|
|
a.YZXPKEY,
|
|
a.YZMX,
|
|
a.YZDJ,
|
|
a.YZSL,
|
|
a.BED,
|
|
a.YPFL,
|
|
a.YZDL,
|
|
a.TYSL,
|
|
a.KSKCPKEY,
|
|
a.KSKCPCPKEY,
|
|
a.CJR,
|
|
a.CJRQ,
|
|
a.XGR,
|
|
a.XGRQ,
|
|
a.JGID,
|
|
a.EXEPKEY,
|
|
d.ward,
|
|
d.jjys,
|
|
f.xm,
|
|
e.zxtime,
|
|
a.yzsl jzyzsl,
|
|
b.YPYZJBDW,
|
|
b.YZJZZHXS,
|
|
b.YZMC,
|
|
c.GG,
|
|
b.YZJL,
|
|
b.YZJLDW,
|
|
b.YZPC,
|
|
b.yzcl,
|
|
e.pkey execpkey,
|
|
e.SFFLAG,
|
|
b.YPYZJBJG,
|
|
a.yzsl * b.YPYZJBJG je,
|
|
b.YZJX,
|
|
a.YZSL jzsfsl,
|
|
e.zxsl,
|
|
e.zxje,
|
|
b.YZXZSJ,
|
|
e.ISACTION,
|
|
b.YZLX,
|
|
b.YZZCYFS,
|
|
b.YZYF,
|
|
a.SFSL,
|
|
a.FYDW,
|
|
a.FYJE,
|
|
a.STSL,
|
|
a.TYJE,
|
|
wmsys.wm_concat(case when h.SFZZD='1' and h.ZDLX='001' then h.JBMC else '' end ) ryzzd
|
|
,wmsys.wm_concat(case when h.SFZZD='1' and h.ZDLX='002' then h.JBMC else '' end ) cyzdd
|
|
,wmsys.wm_concat(case when h.SFZZD='0' and h.ZDLX='001' then h.JBMC else '' end ) ryqtzd
|
|
,wmsys.wm_concat(case when h.SFZZD='0' and h.ZDLX='002' then h.JBMC else '' end ) cyqtzd,
|
|
b.YZXZYS,
|
|
f.XB,
|
|
f.NL,
|
|
z.FYKS,z.HZBQ,z.HZKS,z.FYLB
|
|
from HIS_YFFY_ZYFYMXB a
|
|
left join HIS_YFFY_ZYFYZB z ON a.jgid=z.jgid AND a.FYBPKEY=z.PKEY
|
|
left join HIS_YZ_MXB b on a.YZMX = b.PKEY and a.JGID = b.JGID
|
|
left join HIS_YPXX c on a.YZXPKEY = c.BM
|
|
left join HIS_JZ_BASEINFO d on a.JZPKEY = d.pkey and a.JGID = d.JGID
|
|
left join HIS_YZ_EXEC e on a.EXEPKEY = 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_JZ_MZZD h on h.JGID=d.JGID AND H.HZPKEY=d.HZPKEY AND h.JZPKEY=d.PKEY
|
|
where a.JGID =?
|
|
and a.YZSL > 0
|
|
and z.FYTIME>=?
|
|
and z.FYTIME<=?
|
|
group by d.JJKS,
|
|
a.PKEY,
|
|
a.FYBPKEY,
|
|
a.JZPKEY,
|
|
a.HZPKEY,
|
|
a.ZYNO,
|
|
a.CFH,
|
|
a.PYBPKEY,
|
|
a.YZXPKEY,
|
|
a.YZMX,
|
|
a.YZDJ,
|
|
a.YZSL,
|
|
a.BED,
|
|
a.YPFL,
|
|
a.YZDL,
|
|
a.TYSL,
|
|
a.KSKCPKEY,
|
|
a.KSKCPCPKEY,
|
|
a.CJR,
|
|
a.CJRQ,
|
|
a.XGR,
|
|
a.XGRQ,
|
|
a.JGID,
|
|
a.EXEPKEY,
|
|
d.ward,
|
|
d.jjys,
|
|
f.xm,
|
|
e.zxtime,
|
|
a.yzsl ,
|
|
b.YPYZJBDW,
|
|
b.YZJZZHXS,
|
|
b.YZMC,
|
|
c.GG,
|
|
b.YZJL,
|
|
b.YZJLDW,
|
|
b.YZPC,
|
|
b.yzcl,
|
|
e.pkey ,
|
|
e.SFFLAG,
|
|
b.YPYZJBJG,
|
|
b.YZJX,
|
|
a.YZSL ,
|
|
e.zxsl,
|
|
e.zxje,
|
|
b.YZXZSJ,
|
|
e.ISACTION,
|
|
b.YZLX,
|
|
b.YZZCYFS,
|
|
b.YZYF,
|
|
a.SFSL,
|
|
a.FYDW,
|
|
a.FYJE,
|
|
a.STSL,
|
|
a.TYJE,
|
|
b.YZXZYS,
|
|
f.XB,
|
|
f.NL,
|
|
z.FYKS,z.HZBQ,z.HZKS,z.FYLB
|
|
order by a.bed, a.YZMX, e.zxtime
|
|
]]></sql>
|
|
<fields>
|
|
<f name="JJKS" type="12" />
|
|
<f name="PKEY" type="12" />
|
|
<f name="FYBPKEY" type="12" />
|
|
<f name="JZPKEY" type="12" />
|
|
<f name="HZPKEY" type="12" />
|
|
<f name="ZYNO" type="12" />
|
|
<f name="CFH" type="12" />
|
|
<f name="PYBPKEY" type="12" />
|
|
<f name="YZXPKEY" type="12" />
|
|
<f name="YZMX" type="12" />
|
|
<f name="YZDJ" type="12" />
|
|
<f name="YZSL" type="12" />
|
|
<f name="BED" type="12" />
|
|
<f name="YPFL" type="12" />
|
|
<f name="YZDL" type="12" />
|
|
<f name="TYSL" type="12" />
|
|
<f name="KSKCPKEY" type="12" />
|
|
<f name="KSKCPCPKEY" type="12" />
|
|
<f name="CJR" type="12" />
|
|
<f name="CJRQ" type="93" />
|
|
<f name="XGR" type="12" />
|
|
<f name="XGRQ" type="93" />
|
|
<f name="JGID" type="12" />
|
|
<f name="EXEPKEY" type="12" />
|
|
<f name="WARD" type="12" />
|
|
<f name="JJYS" type="12" />
|
|
<f name="XM" type="12" />
|
|
<f name="ZXTIME" type="93" />
|
|
<f name="JZYZSL" type="12" />
|
|
<f name="YPYZJBDW" type="12" />
|
|
<f name="YZJZZHXS" type="12" />
|
|
<f name="YZMC" type="12" />
|
|
<f name="GG" type="12" />
|
|
<f name="YZJL" type="12" />
|
|
<f name="YZJLDW" type="12" />
|
|
<f name="YZPC" type="12" />
|
|
<f name="YZCL" type="12" />
|
|
<f name="EXECPKEY" type="12" />
|
|
<f name="SFFLAG" type="12" />
|
|
<f name="YPYZJBJG" type="12" />
|
|
<f name="JE" type="4" />
|
|
<f name="YZJX" type="12" />
|
|
<f name="JZSFSL" type="12" />
|
|
<f name="ZXSL" type="8" />
|
|
<f name="ZXJE" type="8" />
|
|
<f name="YZXZSJ" type="93" />
|
|
<f name="ISACTION" type="12" />
|
|
<f name="YZLX" type="12" />
|
|
<f name="YZZCYFS" type="12" />
|
|
<f name="YZYF" type="12" />
|
|
<f name="SFSL" type="12" />
|
|
<f name="FYDW" type="12" />
|
|
<f name="FYJE" type="8" />
|
|
<f name="STSL" type="12" />
|
|
<f name="TYJE" type="8" />
|
|
<f name="ryzzd" type="12" />
|
|
<f name="cyzdd" type="12" />
|
|
<f name="ryqtzd" type="12" />
|
|
<f name="cyqtzd" type="12" />
|
|
<f name="YZXZYS" type="12" />
|
|
<f name="XB" type="12" />
|
|
<f name="NL" type="12" />
|
|
<f name="FYKS" type="12" />
|
|
<f name="HZBQ" type="12" />
|
|
<f name="HZKS" type="12" />
|
|
<f name="FYLB" type="12" />
|
|
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="zyyfbqSelectDao" log="true" type="1" memo="住院病区发药主表dao">
|
|
<sql>
|
|
select '' JGID,'' HZKS,'' BQ,'' FYLB,'' KSRQ,'' JSRQ,'' CJR from dual where 1=2
|
|
</sql>
|
|
|
|
<fields>
|
|
<f name="JGID" type="1" />
|
|
<f name="HZKS" type="1" />
|
|
<f name="BQ" type="1" />
|
|
<f name="FYLB" type="1" />
|
|
<f name="KSRQ" type="1" />
|
|
<f name="JSRQ" type="1" />
|
|
<f name="CJR" type="1" />
|
|
</fields>
|
|
</dao>
|
|
|
|
|
|
<dao id="zyyfhzfymxDao" log="true" type="1" memo="住院发药明细表的dao">
|
|
<sql><![CDATA[
|
|
select
|
|
d.HZPKEY,a.BED,f.xm,b.YZMC,sum(a.SFSL) sl,a.FYDW,sum(a.FYJE) je,c.GG,
|
|
kcpc.PH,a.YPFL,a.YZDL,b.YZJZZHXS,a.KSKCPKEY,a.KSKCPCPKEY,sum(b.YZZCYFS) FS,z.FYKS,z.HZBQ,z.FYLB,
|
|
b.YZXZYS,z.FYTIME,
|
|
(SELECT h.JBMC FROM HIS_JZ_MZZD h WHERE h.JGID=d.JGID AND H.HZPKEY=d.HZPKEY AND h.JZPKEY=d.PKEY AND h.SFZZD='1' and h.ZDLX='001' ) RYZZD,
|
|
(SELECT h.JBMC FROM HIS_JZ_MZZD h WHERE h.JGID=d.JGID AND H.HZPKEY=d.HZPKEY AND h.JZPKEY=d.PKEY AND h.SFZZD='1' and h.ZDLX='002' ) CYZZD
|
|
from HIS_YFFY_ZYFYMXB a
|
|
left join HIS_YFFY_ZYFYZB z ON a.jgid=z.jgid AND a.FYBPKEY=z.PKEY
|
|
left join HIS_YZ_MXB b on a.YZMX = b.PKEY and a.JGID = b.JGID
|
|
left join HIS_YPXX c on a.YZXPKEY = c.BM
|
|
left join HIS_JZ_BASEINFO d on a.JZPKEY = d.pkey and a.JGID = d.JGID
|
|
left join HIS_YZ_EXEC e on a.EXEPKEY = 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_KSKC_PC kcpc on a.KSKCPCPKEY=kcpc.PKEY
|
|
where a.JGID =?
|
|
and a.YZSL > 0
|
|
and z.FYTIME>=?
|
|
and z.FYTIME<=?
|
|
group by d.JGID,d.PKEY,d.HZPKEY,a.BED,f.xm,b.YZMC,a.FYDW,c.GG,kcpc.PH,a.YPFL,a.YZDL,b.YZJZZHXS,a.KSKCPKEY,a.KSKCPCPKEY,z.FYKS,z.HZBQ,z.FYLB,b.YZXZYS,z.FYTIME
|
|
order by a.bed
|
|
]]></sql>
|
|
<fields>
|
|
<f name="HZPKEY" type="12" />
|
|
<f name="BED" type="12" />
|
|
<f name="xm" type="12" />
|
|
<f name="YZMC" type="12" />
|
|
<f name="SL" type="12" />
|
|
<f name="FYDW" type="12" />
|
|
<f name="JE" type="12" />
|
|
<f name="GG" type="12" />
|
|
<f name="PH" type="12" />
|
|
<f name="YPFL" type="12" />
|
|
<f name="YZDL" type="12" />
|
|
<f name="YZJZZHXS" type="12" />
|
|
<f name="KSKCPKEY" type="12" />
|
|
<f name="KSKCPCPKEY" type="12" />
|
|
<f name="FS" type="12" />
|
|
<f name="FYKS" type="12" />
|
|
<f name="HZBQ" type="12" />
|
|
<f name="FYLB" type="12" />
|
|
<f name="YZXZYS" type="12" />
|
|
<f name="FYTIME" type="93" />
|
|
<f name="RYZZD" type="12" />
|
|
<f name="CYZZD" type="12" />
|
|
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
<dao id="ZylydFyksPopDao" cache="true" type="1" memo="用于住院领药单,发药科室">
|
|
<sql>
|
|
select b.DPTID,b.DPTCODE,b.DPTNAME,b.DPTZJM,b.JGID from HIS_YFFY_ZYFYKS_SETUP a left join MAIN_KS b on a.kskey=b.DPTID and a.JGID=b.JGID where a.JGID=?
|
|
and b.DPTTYPE='4'
|
|
order by DPTCODE
|
|
|
|
|
|
|
|
</sql>
|
|
<tables>
|
|
<table delete="true" insert="true" name="MAIN_KS" update="true">
|
|
<primary>DPTID</primary>
|
|
<primary>DPTCODE</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="DPTID" table="MAIN_KS" type="12" />
|
|
<f name="DPTCODE" table="MAIN_KS" type="12" />
|
|
<f name="DPTNAME" table="MAIN_KS" type="12" />
|
|
<f name="DPTZJM" table="MAIN_KS" type="12" />
|
|
<f name="JGID" table="MAIN_KS" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="zyyldfyMxDao" log="true" type="1" memo="住院领药单发药明细dao">
|
|
<sql><![CDATA[
|
|
|
|
select 0 flag,b.cfh,d.JJKS,d.ZYNO,a.PKEY,a.YZX,a.YZMX,a.YZDJ,a.YZSL,a.DFYPKEY,a.FYMXPKEY,a.HZBQ,a.HZKS,a.FYKS,a.HZPKEY,a.YPFL,a.JZPKEY,a.TYPE,a.CJR,a.CJRQ,a.XGR,a.XGRQ,a.JGID,a.YZDL,a.TYSL,a.SFSL,a.SFLYSH,a.SFYSSH,a.LYSHR,a.LYSHRQ,a.YSSHR,a.YSSHRQ,a.FYZT,d.ward,d.bed,d.jjys,f.xm,e.zxtime,a.yzsl*b.YZJZZHXS jzyzsl,b.YPYZJBDW,b.YZJZZHXS,b.YZMC,c.GG,b.YZJL,b.YZJLDW,b.YZPC,b.yzcl,e.pkey execpkey,e.SFFLAG,b.YPYZJBJG,a.yzsl*b.yzjzzhxs*b.YPYZJBJG je,b.YZJX,a.SFSL*b.YZJZZHXS jzsfsl,e.zxsl,e.zxje,b.yzxpkey,b.YZXZSJ,e.ISACTION,b.YZLX,b.YZZCYFS,b.YZYF,a.FYCX,e.ZXFLAG,a.LOCKFLAG,g.dwview,g.ybbm,g.ybmc,(select count(1) num from HIS_SFZD_SFXMXB where a.YZMX=yzmx and e.pkey=EXEPKEY and (JSZT='1' or JSZT='0') and a.JGID=JGID) sfxnum,a.YPFYSJMS,b.YPYZBZJG,b.YPYZBZDW,b.YZDW,b.YPYZZHXS,a.DFYZJE,c.bm,b.SFYFJJFY,b.pkey yzmxpkey from HIS_YFFY_PYB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_YPXX c on a.YZX=c.BM left join HIS_JZ_BASEINFO d on a.JZPKEY=d.pkey and a.JGID=d.JGID left join HIS_YZ_EXEC e on a.DFYPKEY=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_SFX g on a.YZX=g.bm and a.JGID=g.JGID where #FYZT# AND a.TYPE='Z' AND a.FYCX=0 and (d.JZLX='Z' or (d.JZLX='J' AND d.SFLG='1')) AND d.JZZT='Z' AND a.FYCX=0 and a.PYLX='1' and b.SFYFJJFY !='1' and a.JGID=? #ward# #yzcl# #yf# #ypfl# #ypbm# #zyno# #yplysh# and e.zxtime >=? and e.zxtime <= ? order by d.zyno,b.cfh,a.yzx
|
|
|
|
|
|
|
|
]]></sql>
|
|
<tables>
|
|
<table name="HIS_YFFY_PYB" insert="false" update="true" delete="false">
|
|
<primary>PKEY</primary>
|
|
<primary>YZMX</primary>
|
|
<primary>FYMXPKEY</primary>
|
|
<primary>FYZT</primary>
|
|
<primary>FYCX</primary>
|
|
</table>
|
|
<table name="HIS_YZ_EXEC" insert="false" update="true" delete="false">
|
|
<primary>EXECPKEY</primary>
|
|
<primary>YZMX</primary>
|
|
<primary>JZPKEY</primary>
|
|
<primary>SFFLAG</primary>
|
|
<primary>ISACTION</primary>
|
|
<primary>ZXFLAG</primary>
|
|
</table>
|
|
<table name="HIS_YZ_MXB" insert="false" update="true" delete="false">
|
|
<primary>SFYFJJFY</primary>
|
|
<primary>yzmxpkey</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="flag" type="8" />
|
|
<f name="CFH" type="12" />
|
|
<f name="JJKS" type="12" />
|
|
<f name="ZYNO" type="12" />
|
|
<f name="PKEY" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="YZX" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="YZMX" type="12" table="HIS_YFFY_PYB,HIS_YZ_EXEC" />
|
|
<f name="YZDJ" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="YZSL" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="DFYPKEY" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="FYMXPKEY" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="HZBQ" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="HZKS" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="FYKS" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="HZPKEY" type="12" table="HIS_YFFY_PYB,HIS_YZ_EXEC" />
|
|
<f name="YPFL" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="JZPKEY" type="12" table="HIS_YFFY_PYB,HIS_YZ_EXEC" />
|
|
<f name="TYPE" type="12" table="HIS_YFFY_PYB" />
|
|
<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,HIS_YZ_MXB" />
|
|
<f name="YZDL" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="TYSL" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="SFSL" 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="WARD" type="12" />
|
|
<f name="BED" type="12" />
|
|
<f name="JJYS" type="12" />
|
|
<f name="XM" type="12" />
|
|
<f name="ZXTIME" type="93" table="HIS_YZ_EXEC" />
|
|
<f name="JZYZSL" type="4" />
|
|
<f name="YPYZJBDW" type="12" />
|
|
<f name="YZJZZHXS" type="12" />
|
|
<f name="YZMC" type="12" table="HIS_YZ_EXEC" />
|
|
<f name="GG" type="12" />
|
|
<f name="YZJL" type="12" />
|
|
<f name="YZJLDW" type="12" />
|
|
<f name="YZPC" type="12" />
|
|
<f name="YZCL" type="12" />
|
|
<f name="EXECPKEY" schemaname="PKEY" type="12" table="HIS_YZ_EXEC" />
|
|
<f name="SFFLAG" type="12" table="HIS_YZ_EXEC" />
|
|
<f name="YPYZJBJG" type="12" />
|
|
<f name="JE" type="12" />
|
|
<f name="YZJX" type="12" />
|
|
<f name="JZSFSL" type="12" />
|
|
<f name="zxsl" type="12" table="HIS_YZ_EXEC" />
|
|
<f name="zxje" type="12" table="HIS_YZ_EXEC" />
|
|
<f name="yzxpkey" type="12" />
|
|
<f name="YZXZSJ" type="93" />
|
|
<f name="ISACTION" type="12" table="HIS_YZ_EXEC" />
|
|
<f name="YZLX" type="12" />
|
|
<f name="YZZCYFS" type="12" />
|
|
<f name="YZYF" type="12" />
|
|
<f name="FYCX" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="ZXFLAG" type="12" table="HIS_YZ_EXEC" />
|
|
<f name="LOCKFLAG" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="DWVIEW" type="12" />
|
|
<f name="YBBM" type="12" />
|
|
<f name="YBMC" type="12" />
|
|
<f name="sfxnum" type="8" />
|
|
<f name="YPFYSJMS" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="YPYZBZJG" type="12" />
|
|
<f name="YPYZBZDW" type="12" />
|
|
<f name="YZDW" type="12" />
|
|
<f name="YPYZZHXS" type="12" />
|
|
<f name="DFYZJE" type="12" table="HIS_YFFY_PYB" />
|
|
<f name="BM" type="12" />
|
|
<f name="SFYFJJFY" type="12" table="HIS_YZ_MXB" />
|
|
<f name="yzmxpkey" schemaname="PKEY" type="12" table="HIS_YZ_MXB" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
|
|
<dao id="zylydfyhzDao" log="true" type="1" memo="住院领药单发药汇总dao">
|
|
<sql><![CDATA[
|
|
select
|
|
0 flag,
|
|
yzx,
|
|
ward,
|
|
YZMC,
|
|
sum(jzyzsl) sl,
|
|
YPYZJBDW,
|
|
YZJX,
|
|
'' glmx,
|
|
gg,
|
|
'' cs,
|
|
YPFL,
|
|
YZLX,
|
|
dwview,
|
|
ybbm,
|
|
ybmc,
|
|
YPYZBZDW,
|
|
YPYZZHXS,
|
|
JJKS,
|
|
bm,jbmc,YZDJ
|
|
from (select a.PKEY,
|
|
a.YZX,
|
|
a.YZMX,
|
|
a.YZDJ,
|
|
a.YZSL,
|
|
a.DFYPKEY,
|
|
a.FYMXPKEY,
|
|
a.HZBQ,
|
|
a.HZKS,
|
|
a.FYKS,
|
|
a.HZPKEY,
|
|
a.YPFL,
|
|
a.JZPKEY,
|
|
a.TYPE,
|
|
a.CJR,
|
|
a.CJRQ,
|
|
a.XGR,
|
|
a.XGRQ,
|
|
a.JGID,
|
|
a.YZDL,
|
|
a.TYSL,
|
|
a.SFSL,
|
|
a.SFLYSH,
|
|
a.SFYSSH,
|
|
a.LYSHR,
|
|
a.LYSHRQ,
|
|
a.YSSHR,
|
|
a.YSSHRQ,
|
|
a.FYZT,
|
|
d.ward,
|
|
d.bed,
|
|
d.jjys,
|
|
f.xm,
|
|
e.zxtime,
|
|
a.yzsl * b.YZJZZHXS jzyzsl,
|
|
b.YPYZJBDW,
|
|
b.YZJZZHXS,
|
|
b.YZMC,
|
|
c.GG,
|
|
b.YZJL,
|
|
b.YZJLDW,
|
|
b.YZPC,
|
|
b.yzcl,
|
|
e.pkey execpkey,
|
|
e.SFFLAG,
|
|
b.YPYZJBJG,
|
|
a.yzsl * b.yzjzzhxs * b.YPYZJBJG je,
|
|
b.YZJX,
|
|
b.YZLX,
|
|
g.dwview,
|
|
g.ybbm,
|
|
g.ybmc,
|
|
a.YPFYSJMS,
|
|
b.YPYZBZJG,
|
|
b.YPYZBZDW,
|
|
b.YPYZZHXS,
|
|
d.JJKS,
|
|
c.bm,h.jbmc
|
|
from HIS_YFFY_PYB a
|
|
left join HIS_YZ_MXB b on a.YZMX = b.PKEY and a.JGID = b.JGID
|
|
left join HIS_YPXX c on a.YZX = c.BM
|
|
left join HIS_JZ_BASEINFO d on a.JZPKEY = d.pkey and a.JGID = d.JGID
|
|
left join HIS_YZ_EXEC e on a.DFYPKEY = 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_SFX g on a.YZX = g.bm and a.JGID = g.JGID
|
|
left join HIS_JZ_MZZD h on h.JGID=d.JGID and f.PKEY=d.HZPKEY and d.PKEY=h.JZPKEY and h.SFZZD='1' and h.ZDLX='001'
|
|
where #FYZT#
|
|
AND a.TYPE = 'Z'
|
|
and (d.JZLX = 'Z' or (d.JZLX = 'J' AND d.SFLG = '1'))
|
|
AND d.JZZT = 'Z'
|
|
AND a.FYCX = 0
|
|
and a.PYLX = '1'
|
|
and b.SFYFJJFY != '1'
|
|
and a.JGID = ? #ward# #yzcl# #yf# #ypfl# #ypbm# #zyno# #yplysh# and e.zxtime >=? and e.zxtime <= ?)
|
|
group by ward, YZMC, YPYZJBDW, YZJX, gg, YPFL, yzx, YZLX, dwview, ybbm, ybmc, YPYZBZDW, YPYZZHXS, JJKS, bm,jbmc,YZDJ
|
|
|
|
]]></sql>
|
|
<fields>
|
|
<f name="flag" type="8" />
|
|
<f name="YZX" type="12" />
|
|
<f name="WARD" type="12" />
|
|
<f name="YZMC" type="12" />
|
|
<f name="SL" type="4" />
|
|
<f name="YPYZJBDW" type="12" />
|
|
<f name="YZJX" type="12" />
|
|
<f name="GLMX" type="1" />
|
|
<f name="GG" type="12" />
|
|
<f name="CS" type="1" />
|
|
<f name="YPFL" type="12" />
|
|
<f name="YZLX" type="12" />
|
|
<f name="DWVIEW" type="12" />
|
|
<f name="YBBM" type="12" />
|
|
<f name="YBMC" type="12" />
|
|
<f name="YPYZBZDW" type="12" />
|
|
<f name="YPYZZHXS" type="12" />
|
|
<f name="JJKS" type="12" />
|
|
<f name="BM" type="12" />
|
|
<f name="jbmc" type="12" />
|
|
<f name="YZDJ" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="zyHsTySqActionDao" log="true" type="1" memo="住院药房对退药申请的处理dao">
|
|
<sql><![CDATA[
|
|
select 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.LOCKFLAG,f.YZFJSM,a.SFXSYZ,f.gllx,f.YPFYSJMS,f.SFYFJJFY,a.YZHOURBEGIN,a.YZHOUREND,a.ZXZJL,a.ZXDDD,a.TYSQZT,a.TYSQR,a.TYSQSJ,a.TYSHR,a.TYSHSJ,b.bed,b.cybed,b.jjks,b.ward,c.xm,c.xb 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 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 where a.JGID=? and b.jzlx='Z' and b.JZZT != 'C' and (a.TYSQZT=1 or a.TYSQZT=2 or a.TYSQZT=3) and e.FYKS=? and a.TYSQSJ >= ? and a.TYSQSJ <= ? order by a.TYSQSJ desc
|
|
|
|
]]></sql>
|
|
<tables>
|
|
<table name="HIS_YZ_EXEC" insert="false" update="true" delete="false">
|
|
<primary>PKEY</primary>
|
|
<primary>JZPKEY</primary>
|
|
<primary>HZPKEY</primary>
|
|
<primary>JGID</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="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="4" />
|
|
<f name="TYSL" type="4" />
|
|
<f name="YPFL" type="12" />
|
|
<f name="FYKS" type="12" />
|
|
<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="LOCKFLAG" type="-5" table="HIS_YZ_EXEC" />
|
|
<f name="YZFJSM" type="12" />
|
|
<f name="SFXSYZ" type="12" table="HIS_YZ_EXEC" />
|
|
<f name="GLLX" type="12" />
|
|
<f name="YPFYSJMS" type="12" />
|
|
<f name="SFYFJJFY" type="12" />
|
|
<f name="YZHOURBEGIN" type="93" table="HIS_YZ_EXEC" />
|
|
<f name="YZHOUREND" type="93" table="HIS_YZ_EXEC" />
|
|
<f name="ZXZJL" type="12" table="HIS_YZ_EXEC" />
|
|
<f name="ZXDDD" type="12" table="HIS_YZ_EXEC" />
|
|
<f name="TYSQZT" type="12" table="HIS_YZ_EXEC" />
|
|
<f name="TYSQR" type="12" table="HIS_YZ_EXEC" />
|
|
<f name="TYSQSJ" type="93" table="HIS_YZ_EXEC" />
|
|
<f name="TYSHR" type="12" table="HIS_YZ_EXEC" />
|
|
<f name="TYSHSJ" type="93" table="HIS_YZ_EXEC" />
|
|
<f name="BED" type="12" />
|
|
<f name="CYBED" type="12" />
|
|
<f name="JJKS" type="12" />
|
|
<f name="WARD" type="12" />
|
|
<f name="XM" type="12" />
|
|
<f name="XB" type="12" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="zyfxmxSelectByJzpkeyByAllHsByDao" log="true" type="1" memo="住院发药明细表已经摆药的dao">
|
|
<sql><![CDATA[
|
|
|
|
select '' sel,d.JJKS,a.PKEY,a.FYBPKEY,d.pkey JZPKEY,a.HZPKEY,a.ZYNO,a.CFH,a.PYBPKEY,a.YZXPKEY,a.YZMX,a.YZDJ,a.YZSL,a.BED,a.YPFL,a.YZDL,a.TYSL,a.KSKCPKEY,a.KSKCPCPKEY,a.CJR,a.CJRQ,a.XGR,a.XGRQ,a.JGID,a.EXEPKEY,d.ward,d.jjys,f.xm,e.zxtime,a.yzsl jzyzsl,b.YPYZJBDW,b.YZJZZHXS,b.YZMC,c.GG,b.YZJL,b.YZJLDW,b.YZPC,b.yzcl,e.pkey execpkey,e.SFFLAG,b.YPYZJBJG,a.yzsl*b.YPYZJBJG je,b.YZJX,a.YZSL jzsfsl,e.zxsl,e.zxje,b.YZXZSJ,e.ISACTION,b.YZLX,b.YZZCYFS,b.YZYF,a.SFSL,a.FYDW,a.FYJE,a.STSL,a.TYJE,f.xb,d.rynl,b.YZZCYJX,b.YZZCYYF,b.YZZCYFSKEY,b.yzdw,b.YZGG,b.YZJE,b.YZXZKS,b.YZZXKS,g.FYTIME,g.FYKS,g.FYR,g.FYLB,a.LOCKFLAG,a.HSBYZT,a.HSBYR,a.HSBYSJ,a.HSBYBQ,a.HSBYKS from HIS_YFFY_ZYFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_YPXX c on a.YZXPKEY=c.BM left join HIS_JZ_BASEINFO d on a.JZPKEY=d.pkey and a.JGID=d.JGID left join HIS_YZ_EXEC e on a.EXEPKEY=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_YFFY_ZYFYZB g on a.FYBPKEY=g.pkey and a.JGID=g.JGID where a.JGID=? and a.YZSL>0 and a.HSBYZT=1 #select# order by a.JZPKEY,a.bed,g.FYTIME,a.YZMX
|
|
|
|
|
|
]]></sql>
|
|
<tables>
|
|
<table name="HIS_YFFY_ZYFYMXB" insert="false" update="true" delete="false">
|
|
<primary>PKEY</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="SEL" type="1" />
|
|
<f name="JJKS" type="12" />
|
|
<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="WARD" type="12" />
|
|
<f name="JJYS" type="12" />
|
|
<f name="XM" type="12" />
|
|
<f name="ZXTIME" type="93" />
|
|
<f name="JZYZSL" type="12" />
|
|
<f name="YPYZJBDW" type="12" />
|
|
<f name="YZJZZHXS" type="12" />
|
|
<f name="YZMC" type="12" />
|
|
<f name="GG" type="12" />
|
|
<f name="YZJL" type="12" />
|
|
<f name="YZJLDW" type="12" />
|
|
<f name="YZPC" type="12" />
|
|
<f name="YZCL" type="12" />
|
|
<f name="EXECPKEY" type="12" />
|
|
<f name="SFFLAG" type="12" />
|
|
<f name="YPYZJBJG" type="12" />
|
|
<f name="JE" type="4" />
|
|
<f name="YZJX" type="12" />
|
|
<f name="JZSFSL" type="12" />
|
|
<f name="ZXSL" type="8" />
|
|
<f name="ZXJE" type="8" />
|
|
<f name="YZXZSJ" type="93" />
|
|
<f name="ISACTION" type="12" />
|
|
<f name="YZLX" type="12" />
|
|
<f name="YZZCYFS" type="12" />
|
|
<f name="YZYF" type="12" />
|
|
<f name="SFSL" type="12" table="HIS_YFFY_ZYFYMXB" />
|
|
<f name="FYDW" type="12" table="HIS_YFFY_ZYFYMXB" />
|
|
<f name="FYJE" type="8" table="HIS_YFFY_ZYFYMXB" />
|
|
<f name="STSL" type="12" table="HIS_YFFY_ZYFYMXB" />
|
|
<f name="TYJE" type="8" table="HIS_YFFY_ZYFYMXB" />
|
|
<f name="XB" type="12" />
|
|
<f name="RYNL" type="12" />
|
|
<f name="YZZCYJX" type="12" />
|
|
<f name="YZZCYYF" type="12" />
|
|
<f name="YZZCYFSKEY" type="12" />
|
|
<f name="YZDW" type="12" />
|
|
<f name="YZGG" type="12" />
|
|
<f name="YZJE" type="12" />
|
|
<f name="YZXZKS" type="12" />
|
|
<f name="YZZXKS" type="12" />
|
|
<f name="FYTIME" type="93" />
|
|
<f name="FYKS" type="12" />
|
|
<f name="FYR" type="12" />
|
|
<f name="FYLB" type="12" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_YFFY_ZYFYMXB" />
|
|
<f name="HSBYZT" type="12" table="HIS_YFFY_ZYFYMXB" />
|
|
<f name="HSBYR" type="12" table="HIS_YFFY_ZYFYMXB" />
|
|
<f name="HSBYSJ" type="93" table="HIS_YFFY_ZYFYMXB" />
|
|
<f name="HSBYBQ" type="12" table="HIS_YFFY_ZYFYMXB" />
|
|
<f name="HSBYKS" type="12" table="HIS_YFFY_ZYFYMXB" />
|
|
</fields>
|
|
<parameter>
|
|
<p>12</p>
|
|
<p>93</p>
|
|
<p>93</p>
|
|
</parameter>
|
|
</dao>
|
|
|
|
<dao id="zyhsbyFymxTemplateDao" log="true" type="1" memo="住院发药明细摆药单打印dao">
|
|
<sql><![CDATA[
|
|
|
|
select '' sel,d.JJKS,a.PKEY,a.FYBPKEY,d.pkey JZPKEY,a.HZPKEY,a.ZYNO,a.CFH,a.PYBPKEY,a.YZXPKEY,a.YZMX,a.YZDJ,a.YZSL,a.BED,a.YPFL,a.YZDL,a.TYSL,a.KSKCPKEY,a.KSKCPCPKEY,a.CJR,a.CJRQ,a.XGR,a.XGRQ,a.JGID,a.EXEPKEY,d.ward,d.jjys,f.xm,e.zxtime,a.yzsl jzyzsl,b.YPYZJBDW,b.YZJZZHXS,b.YZMC,c.GG,b.YZJL,b.YZJLDW,b.YZPC,b.yzcl,e.pkey execpkey,e.SFFLAG,b.YPYZJBJG,a.yzsl*b.YPYZJBJG je,b.YZJX,a.YZSL jzsfsl,e.zxsl,e.zxje,b.YZXZSJ,e.ISACTION,b.YZLX,b.YZZCYFS,b.YZYF,a.SFSL,a.FYDW,a.FYJE,a.STSL,a.TYJE,f.xb,d.rynl,b.YZZCYJX,b.YZZCYYF,b.YZZCYFSKEY,b.yzdw,b.YZGG,b.YZJE,b.YZXZKS,b.YZZXKS,g.FYTIME,g.FYKS,g.FYR,g.FYLB,a.LOCKFLAG,a.HSBYZT,a.HSBYR,a.HSBYSJ,a.HSBYBQ,a.HSBYKS from HIS_YFFY_ZYFYMXB a left join HIS_YZ_MXB b on a.YZMX=b.PKEY and a.JGID=b.JGID left join HIS_YPXX c on a.YZXPKEY=c.BM left join HIS_JZ_BASEINFO d on a.JZPKEY=d.pkey and a.JGID=d.JGID left join HIS_YZ_EXEC e on a.EXEPKEY=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_YFFY_ZYFYZB g on a.FYBPKEY=g.pkey and a.JGID=g.JGID where 1=2
|
|
|
|
|
|
]]></sql>
|
|
<tables>
|
|
<table name="HIS_YFFY_ZYFYMXB" insert="false" update="true" delete="false">
|
|
<primary>PKEY</primary>
|
|
<primary>JGID</primary>
|
|
</table>
|
|
</tables>
|
|
<fields>
|
|
<f name="SEL" type="1" />
|
|
<f name="JJKS" type="12" />
|
|
<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="WARD" type="12" />
|
|
<f name="JJYS" type="12" />
|
|
<f name="XM" type="12" />
|
|
<f name="ZXTIME" type="93" />
|
|
<f name="JZYZSL" type="12" />
|
|
<f name="YPYZJBDW" type="12" />
|
|
<f name="YZJZZHXS" type="12" />
|
|
<f name="YZMC" type="12" />
|
|
<f name="GG" type="12" />
|
|
<f name="YZJL" type="12" />
|
|
<f name="YZJLDW" type="12" />
|
|
<f name="YZPC" type="12" />
|
|
<f name="YZCL" type="12" />
|
|
<f name="EXECPKEY" type="12" />
|
|
<f name="SFFLAG" type="12" />
|
|
<f name="YPYZJBJG" type="12" />
|
|
<f name="JE" type="4" />
|
|
<f name="YZJX" type="12" />
|
|
<f name="JZSFSL" type="12" />
|
|
<f name="ZXSL" type="8" />
|
|
<f name="ZXJE" type="8" />
|
|
<f name="YZXZSJ" type="93" />
|
|
<f name="ISACTION" type="12" />
|
|
<f name="YZLX" type="12" />
|
|
<f name="YZZCYFS" type="12" />
|
|
<f name="YZYF" type="12" />
|
|
<f name="SFSL" type="12" table="HIS_YFFY_ZYFYMXB" />
|
|
<f name="FYDW" type="12" table="HIS_YFFY_ZYFYMXB" />
|
|
<f name="FYJE" type="8" table="HIS_YFFY_ZYFYMXB" />
|
|
<f name="STSL" type="12" table="HIS_YFFY_ZYFYMXB" />
|
|
<f name="TYJE" type="8" table="HIS_YFFY_ZYFYMXB" />
|
|
<f name="XB" type="12" />
|
|
<f name="RYNL" type="12" />
|
|
<f name="YZZCYJX" type="12" />
|
|
<f name="YZZCYYF" type="12" />
|
|
<f name="YZZCYFSKEY" type="12" />
|
|
<f name="YZDW" type="12" />
|
|
<f name="YZGG" type="12" />
|
|
<f name="YZJE" type="12" />
|
|
<f name="YZXZKS" type="12" />
|
|
<f name="YZZXKS" type="12" />
|
|
<f name="FYTIME" type="93" />
|
|
<f name="FYKS" type="12" />
|
|
<f name="FYR" type="12" />
|
|
<f name="FYLB" type="12" />
|
|
<f name="LOCKFLAG" type="-5" table="HIS_YFFY_ZYFYMXB" />
|
|
<f name="HSBYZT" type="12" table="HIS_YFFY_ZYFYMXB" />
|
|
<f name="HSBYR" type="12" table="HIS_YFFY_ZYFYMXB" />
|
|
<f name="HSBYSJ" type="93" table="HIS_YFFY_ZYFYMXB" />
|
|
<f name="HSBYBQ" type="12" table="HIS_YFFY_ZYFYMXB" />
|
|
<f name="HSBYKS" type="12" table="HIS_YFFY_ZYFYMXB" />
|
|
</fields>
|
|
|
|
</dao>
|
|
|
|
</datasource>
|
|
|