|
|
|
@ -92,20 +92,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!--在院-->
|
|
|
|
|
<select id="selectByCol" parameterType="com.emr.entity.Archive_Master_Vo" resultMap="BaseResultMap">
|
|
|
|
|
select m.id,m.patient_id,m.inp_no,m.visit_id,m.name,m.sex,f.name
|
|
|
|
|
dept_name,m.discharge_date_time,m.ArchiveState,m.admission_date_time,d.name dept_admission_to
|
|
|
|
|
<select id="selectByCol" parameterType="com.emr.entity.Archive_Master_Vo" resultMap="BaseResultMap2">
|
|
|
|
|
select m.id,m.patient_id,m.inp_no,m.visit_id,m.name,m.sex,
|
|
|
|
|
dept_name,m.discharge_date_time,m.ArchiveState,m.admission_date_time,dept_admission_to
|
|
|
|
|
,m.check_doctor,m.checked_datetime,m.checked_doctor,m.LockInfo,m.DOCTOR_IN_CHARGE,m.ID_NO,m.DISCHARGE_DISPOSITION,m.dept_code_lend
|
|
|
|
|
from archive_master m
|
|
|
|
|
LEFT JOIN (select code,name from emr_dictionary where parent_id=(select id from emr_dictionary where
|
|
|
|
|
typeCode='dept_code' )) d
|
|
|
|
|
on m.dept_admission_to=d.code
|
|
|
|
|
LEFT JOIN (select code,name from emr_dictionary where parent_id=(select id from emr_dictionary where
|
|
|
|
|
typeCode='dept_code' )) f
|
|
|
|
|
on m.dept_name=f.code
|
|
|
|
|
where 1=1
|
|
|
|
|
<if test="deptAdmissionTo!= null and deptAdmissionTo!= ''">
|
|
|
|
|
and m.dept_admission_to in
|
|
|
|
|
and m.dept_name in
|
|
|
|
|
<foreach item="item" collection="deptAdmissionTo.split(',')" open="(" separator="," close=")">
|
|
|
|
|
#{item}
|
|
|
|
|
</foreach>
|
|
|
|
@ -131,12 +125,6 @@
|
|
|
|
|
<if test="sex != null and sex != ''">
|
|
|
|
|
and m.sex = #{sex,jdbcType=NVARCHAR}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="deptName!= null and deptName!= ''">
|
|
|
|
|
and m.dept_name in
|
|
|
|
|
<foreach item="item" collection="deptName.split(',')" open="(" separator="," close=")">
|
|
|
|
|
#{item}
|
|
|
|
|
</foreach>
|
|
|
|
|
</if>
|
|
|
|
|
<if test="dischargeDateTime != null and dischargeDateTime != ''">
|
|
|
|
|
and m.discharge_date_time = #{dischargeDateTime,jdbcType=NVARCHAR}
|
|
|
|
|
</if>
|
|
|
|
|