@ -931,10 +931,11 @@ WHERE a.JGID = ? AND (a.YZLX = '0' OR a.YZLX = '1') and a.YZLB IN ('01','02','0
<daoid="his_mzQtmxbDao"type="1"memo="门诊其他处方明细">
<sql><![CDATA[
SELECT a.PKEY,a.CFH,a.JZPKEY,a.HZPKEY,a.JZH,a.YZXZKS,a.YZXZYS,c.XM,c.XB,c.NL,a.yzje,a.YZLB,a.YZZL,a.YZTZH,a.YZSFZT,a.YZCXBZ,a.YZXPKEY,a.YZMC FROM HIS_YZ_MXB a
SELECT a.PKEY,a.CFH,a.JZPKEY,a.HZPKEY,a.JZH,a.YZXZKS,a.YZXZYS,c.XM,c.XB,c.NL,a.yzje,a.YZLB,a.YZZL,a.YZTZH,a.YZSFZT,a.YZCXBZ,a.YZXPKEY,a.YZMC,a.CJRQ FROM HIS_YZ_MXB a
left join HIS_JZ_BASEINFO b on a.jzpkey=b.pkey and a.JGID=b.JGID
left join HIS_HZINFO c on c.JGID = b.JGID AND c.PKEY = b.HZPKEY
WHERE a.JGID = ? AND a.CJRQ >= ? AND a.CJRQ <= ? and a.YZLX = '5' and a.YZSHZT='1' AND a.YZSFZT = '1' AND a.YZCXBZ = '0' and b.JZLX = 'M' group by a.PKEY,a.CFH,a.JZPKEY,a.HZPKEY,a.JZH,a.YZXZKS,a.YZXZYS,c.XM,c.XB,c.NL,a.yzje,a.YZLB,a.YZZL,a.YZTZH,a.YZSFZT,a.YZCXBZ,a.YZXPKEY,a.YZMC
WHERE a.JGID = ? AND a.CJRQ >= ? AND a.CJRQ <= ? and a.YZLX = '5' and a.YZSHZT='1' AND a.YZSFZT = '1' AND a.YZCXBZ = '0' and b.JZLX = 'M' group by a.PKEY,a.CFH,a.JZPKEY,a.HZPKEY,
left join HIS_JZ_BASEINFO b on a.jzpkey=b.pkey and a.JGID=b.JGID
left join HIS_HZINFO c on c.JGID = b.JGID AND c.PKEY = b.HZPKEY
LEFT JOIN HIS_JZ_MZZD d on d.JGID = b.JGID AND d.JZPKEY = b.PKEY AND d.HZPKEY = b.HZPKEY
where b.JGID = ? and b.JJRQ >= ? and b.JJRQ <= ?
where b.JGID = ? and b.CJRQ >= ? and b.CJRQ <= ?
AND b.JZLX = 'Z' AND (b.JZZT = 'Z' OR b.JZZT = 'C') AND b.MOTHERJZPKEY is null AND (a.YZZT = 3 or a.YZZT = 6) and a.YZLX IN (0,3,5,6,7,9) group by a.CFH,a.JZPKEY,a.HZPKEY,a.YZXZKS,c.XM,c.XB,c.NL,b.JJKS,b.WARD,a.YZZT,a.YZCL
,a.YZSHRQ,b.ZYNO
]]></sql>
@ -1501,6 +1503,7 @@ AND b.JZLX = 'Z' AND (b.JZZT = 'Z' OR b.JZZT = 'C') AND b.MOTHERJZPKEY is null A
<fname="YZCL"type="12"/>
<fname="YZSHRQ"type="93"/>
<fname="ZYNO"type="12"/>
<fname="CJRQ"type="93"/>
</fields>
<parameter>
<p>12</p>
@ -1577,16 +1580,16 @@ AND b.JZLX = 'Z' AND (b.JZZT = 'Z' OR b.JZZT = 'C') AND b.MOTHERJZPKEY is null A
left join HIS_JZ_BASEINFO b on a.jzpkey=b.pkey and a.JGID=b.JGID
left join HIS_HZINFO c on c.JGID = b.JGID AND c.PKEY = b.HZPKEY
LEFT JOIN HIS_JZ_MZZD d on d.JGID = b.JGID AND d.JZPKEY = b.PKEY AND d.HZPKEY = b.HZPKEY
where b.JGID = ? and b.JJRQ >= ? and b.JJRQ <= ?
where b.JGID = ? and a.CJRQ >= ? and a.CJRQ <= ?
AND b.JZLX = 'Z' AND (b.JZZT = 'Z' OR b.JZZT = 'C') AND b.MOTHERJZPKEY is null AND (a.YZZT = 3 or a.YZZT = 6 or a.YZZT = 40 or a.YZZT = 41 OR a.YZZT = 6) and a.YZLX IN (0,3,5,6,7,9) AND a.YZLB in ('01','02','03')
group by a.CFH,a.JZPKEY,a.HZPKEY,a.YZXZKS,a.YZXZYS,c.XM,c.XB,c.NL,
left join HIS_JZ_BASEINFO b on a.jzpkey=b.pkey and a.JGID=b.JGID
left join HIS_HZINFO c on c.JGID = b.JGID AND c.PKEY = b.HZPKEY
LEFT JOIN HIS_JZ_MZZD d on d.JGID = b.JGID AND d.JZPKEY = b.PKEY AND d.HZPKEY = b.HZPKEY
where b.JGID = ? and b.JJRQ >= ? and b.JJRQ <= ?
where b.JGID = ? and a.CJRQ >= ? and a.CJRQ <= ?
AND b.JZLX = 'Z' AND (b.JZZT = 'Z' OR b.JZZT = 'C') AND b.MOTHERJZPKEY is null AND (a.YZZT = 3 or a.YZZT = 6 or a.YZZT = 40 or a.YZZT = 41 OR a.YZZT = 6) and a.YZLX IN (0,3,5,6,7,9) AND a.YZLB NOT in ('01','02','03')
group by a.CFH,a.JZPKEY,a.HZPKEY,a.YZXZKS,a.YZXZYS,c.XM,c.XB,c.NL,