|
|
|
@ -57,6 +57,10 @@
|
|
|
|
|
<if test="patientId != null and patientId != ''">
|
|
|
|
|
and id=#{patientId,jdbcType=VARCHAR}
|
|
|
|
|
</if>)+'%'
|
|
|
|
|
and visit_id=(select visit_id from Archive_Master where 1=1
|
|
|
|
|
<if test="patientId != null and patientId != ''">
|
|
|
|
|
and id=#{patientId,jdbcType=VARCHAR}
|
|
|
|
|
</if>)
|
|
|
|
|
and patindex('%B%',inp_no) != 0
|
|
|
|
|
and id!=#{patientId,jdbcType=VARCHAR}
|
|
|
|
|
)
|
|
|
|
@ -79,6 +83,10 @@
|
|
|
|
|
<if test="patientId != null and patientId != ''">
|
|
|
|
|
and id=#{patientId,jdbcType=VARCHAR}
|
|
|
|
|
</if>)+'%'
|
|
|
|
|
and visit_id=(select visit_id from Archive_Master where 1=1
|
|
|
|
|
<if test="patientId != null and patientId != ''">
|
|
|
|
|
and id=#{patientId,jdbcType=VARCHAR}
|
|
|
|
|
</if>)
|
|
|
|
|
and patindex('%B%',inp_no) != 0
|
|
|
|
|
and id!=#{patientId,jdbcType=VARCHAR}
|
|
|
|
|
)
|
|
|
|
@ -183,7 +191,12 @@
|
|
|
|
|
select inp_no from archive_master where 1=1
|
|
|
|
|
<if test="patientId != null and patientId != ''">
|
|
|
|
|
and id=#{patientId,jdbcType=VARCHAR}
|
|
|
|
|
</if>)+'%'
|
|
|
|
|
</if>
|
|
|
|
|
and visit_id=(select visit_id from Archive_Master where 1=1
|
|
|
|
|
<if test="patientId != null and patientId != ''">
|
|
|
|
|
and id=#{patientId,jdbcType=VARCHAR}
|
|
|
|
|
</if>)
|
|
|
|
|
)+'%'
|
|
|
|
|
and patindex('%B%',inp_no) != 0
|
|
|
|
|
union
|
|
|
|
|
select id from archive_master where id=#{patientId,jdbcType=VARCHAR}
|
|
|
|
@ -197,7 +210,11 @@
|
|
|
|
|
select inp_no from archive_master where 1=1
|
|
|
|
|
<if test="patientId != null and patientId != ''">
|
|
|
|
|
and id=#{patientId,jdbcType=VARCHAR}
|
|
|
|
|
</if>)+'%'
|
|
|
|
|
</if>
|
|
|
|
|
<if test="visit != null and patientId != ''">
|
|
|
|
|
and id=#{patientId,jdbcType=VARCHAR}
|
|
|
|
|
</if>
|
|
|
|
|
)+'%'
|
|
|
|
|
and patindex('%B%',inp_no) != 0
|
|
|
|
|
union
|
|
|
|
|
select id from archive_master where id=#{patientId,jdbcType=VARCHAR}
|
|
|
|
|