|
|
|
@ -170,7 +170,7 @@
|
|
|
|
|
LEFT JOIN (select MasterID,COUNT(*) num from archive_printInfo group by MasterID) printTable
|
|
|
|
|
on m.id=printTable.MasterID
|
|
|
|
|
where 1=1
|
|
|
|
|
and patindex('%B%',m.inp_no) = 0 and inp_no not like 'LG%'
|
|
|
|
|
and patindex('%B%',m.inp_no) = 0 and inp_no not like 'LG%' and m.Is_Valid!=1
|
|
|
|
|
<if test="deptAdmissionTo!= null and deptAdmissionTo!= ''">
|
|
|
|
|
and (m.dept_admission_to in
|
|
|
|
|
<foreach item="item" collection="deptAdmissionTo.split(',')" open="(" separator="," close=")">
|
|
|
|
@ -293,7 +293,7 @@
|
|
|
|
|
LEFT JOIN (select zyh,jzh,COUNT(*) num from archive_other_ext where T2!='1801-02-03 00:00:00.000' group by zyh,jzh) extNurse
|
|
|
|
|
on m.inp_no=extNurse.zyh
|
|
|
|
|
and m.visit_id=extNurse.jzh
|
|
|
|
|
where 1=1 and ArchiveState in('归档中','提交','主任退回')
|
|
|
|
|
where 1=1 and ArchiveState in('归档中','提交','主任退回') and m.Is_Valid!=1
|
|
|
|
|
and patindex('%B%',m.inp_no) = 0 and inp_no not like 'LG%'
|
|
|
|
|
<if test="emrCmit!=null and emrCmit!=''">
|
|
|
|
|
<if test="emrCmit==1">
|
|
|
|
@ -427,7 +427,7 @@
|
|
|
|
|
and ao.sysFlag='1'
|
|
|
|
|
LEFT JOIN (select MasterID,COUNT(*) num from archive_printInfo group by MasterID) printTable
|
|
|
|
|
on m.id=printTable.MasterID
|
|
|
|
|
where 1=1 and ArchiveState in('初审')
|
|
|
|
|
where 1=1 and ArchiveState in('初审') and m.Is_Valid!=1
|
|
|
|
|
and patindex('%B%',m.inp_no) = 0 and inp_no not like 'LG%'
|
|
|
|
|
<if test="printNum != null and printNum != ''">
|
|
|
|
|
and m.id
|
|
|
|
@ -569,7 +569,7 @@
|
|
|
|
|
LEFT JOIN(select archive_detail_id,count(*) numb from emr_fault_detail where 1=1 and back_flag is not null GROUP BY archive_detail_id) s
|
|
|
|
|
on m.id=s.archive_detail_id
|
|
|
|
|
where 1=1
|
|
|
|
|
and m.ArchiveState not in('作废','已封存') and inp_no not like 'LG%'
|
|
|
|
|
and m.ArchiveState not in('作废','已封存') and m.Is_Valid!=1 and inp_no not like 'LG%'
|
|
|
|
|
<if test="id != null and id != ''">
|
|
|
|
|
and m.id = #{id,jdbcType=NVARCHAR}
|
|
|
|
|
</if>
|
|
|
|
@ -702,7 +702,7 @@
|
|
|
|
|
on m.id=printTable.MasterID
|
|
|
|
|
where 1=1
|
|
|
|
|
and patindex('%B%',m.inp_no) in (0,1)
|
|
|
|
|
and m.ArchiveState not in('作废','已封存') and inp_no not like 'LG%'
|
|
|
|
|
and m.ArchiveState not in('作废','已封存') and m.Is_Valid!=1 and inp_no not like 'LG%'
|
|
|
|
|
<if test="printNum != null and printNum != ''">
|
|
|
|
|
and m.id
|
|
|
|
|
<choose>
|
|
|
|
@ -842,7 +842,7 @@
|
|
|
|
|
LEFT JOIN (select MasterID,COUNT(*) num from archive_printInfo group by MasterID) printTable
|
|
|
|
|
on m.id=printTable.MasterID
|
|
|
|
|
where 1=1 and ArchiveState in('提交','主任退回','归档中','复审退回')
|
|
|
|
|
and patindex('%B%',m.inp_no) = 0 and inp_no not like 'LG%'
|
|
|
|
|
and patindex('%B%',m.inp_no) = 0 and inp_no not like 'LG%' and m.Is_Valid!=1
|
|
|
|
|
<if test="printNum != null and printNum != ''">
|
|
|
|
|
and m.id
|
|
|
|
|
<choose>
|
|
|
|
|