|
|
|
@ -112,6 +112,9 @@
|
|
|
|
|
<result column="overTime2" jdbcType="INTEGER" property="overTime2" />
|
|
|
|
|
<result column="flag" jdbcType="INTEGER" property="flag" />
|
|
|
|
|
<result column="countNum" jdbcType="INTEGER" property="countNum" />
|
|
|
|
|
<result column="C1" jdbcType="NVARCHAR" property="C1" />
|
|
|
|
|
<result column="C9" jdbcType="NVARCHAR" property="C9" />
|
|
|
|
|
<result column="T3" jdbcType="NVARCHAR" property="T3" />
|
|
|
|
|
</resultMap>
|
|
|
|
|
<sql id="Base_Column_List">
|
|
|
|
|
id, patient_id, inp_no, visit_id, name, sex, dept_name, discharge_date_time, ArchiveState,
|
|
|
|
@ -2217,5 +2220,43 @@
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectArchiveMasterVoAndExt" parameterType="com.emr.entity.Archive_Master_Vo" resultMap="BaseResultMap2">
|
|
|
|
|
select m.inp_no inpNo, m.visit_id visitId,m.name name,m.discharge_date_time dischargeDateTime,
|
|
|
|
|
ex.C1 C1, ex.C9 C9, ex.T3 T3
|
|
|
|
|
from archive_master m LEFT JOIN archive_other_ext ex on m.id = ex.MID
|
|
|
|
|
<where>
|
|
|
|
|
1=1
|
|
|
|
|
<if test="inpNo != null and inpNo != ''">
|
|
|
|
|
AND inp_no LIKE '%' + #{inpNo} + '%'
|
|
|
|
|
</if>
|
|
|
|
|
<if test="name != null and name != ''">
|
|
|
|
|
AND name LIKE '%' + #{name} + '%'
|
|
|
|
|
</if>
|
|
|
|
|
<if test="visitId != null and visitId != ''">
|
|
|
|
|
AND visit_id LIKE '%' + #{visitId} + '%'
|
|
|
|
|
</if>
|
|
|
|
|
<!-- <if test="startDate != null and startDate != ''">-->
|
|
|
|
|
<!-- and m.discharge_date_time >= CONVERT(VARCHAR(10),#{startDate,jdbcType=NCHAR},120)-->
|
|
|
|
|
<!-- </if>-->
|
|
|
|
|
<!-- <if test="endDate != null and endDate != ''">-->
|
|
|
|
|
<!-- and m.discharge_date_time <= #{endDate,jdbcType=NCHAR}+ ' 23:59:59'-->
|
|
|
|
|
<!-- </if>-->
|
|
|
|
|
|
|
|
|
|
<if test="dischargeDateTime != null">
|
|
|
|
|
and m.discharge_date_time = #{dischargeDateTime,jdbcType=NVARCHAR}
|
|
|
|
|
</if>
|
|
|
|
|
<choose>
|
|
|
|
|
<when test="startDateTo != null and startDateTo != '' and endDateTo != null and endDateTo != ''">
|
|
|
|
|
and m.discharge_date_time between CONVERT(VARCHAR(10),#{startDateTo,jdbcType=NCHAR},120) and
|
|
|
|
|
#{endDateTo,jdbcType=NCHAR}+ ' 23:59:59'
|
|
|
|
|
</when>
|
|
|
|
|
<when test="startDateTo != null and startDateTo != ''">
|
|
|
|
|
and m.discharge_date_time >= CONVERT(VARCHAR(10),#{startDateTo,jdbcType=NCHAR},120)
|
|
|
|
|
</when>
|
|
|
|
|
<when test="endDateTo != null and endDateTo != ''">
|
|
|
|
|
and m.discharge_date_time <= #{endDateTo,jdbcType=NCHAR}+ ' 23:59:59'
|
|
|
|
|
</when>
|
|
|
|
|
</choose>
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
</mapper>
|