|
@@ -4,29 +4,41 @@
|
|
|
|
|
|
<!-- 通用查询映射结果 -->
|
|
|
<resultMap id="BaseResultMap" type="com.diagbot.entity.MedLisInfo">
|
|
|
- <id column="rep_no" property="repNo" />
|
|
|
- <result column="hospital_id" property="hospitalId" />
|
|
|
- <result column="behospital_code" property="behospitalCode" />
|
|
|
- <result column="rep_type" property="repType" />
|
|
|
- <result column="rep_name" property="repName" />
|
|
|
- <result column="rep_type_name" property="repTypeName" />
|
|
|
- <result column="slide_type" property="slideType" />
|
|
|
- <result column="rep_date" property="repDate" />
|
|
|
- <result column="check_date" property="checkDate" />
|
|
|
- <result column="apply_doctor" property="applyDoctor" />
|
|
|
- <result column="dept_id" property="deptId" />
|
|
|
- <result column="dept_name" property="deptName" />
|
|
|
- <result column="register_flag" property="registerFlag" />
|
|
|
- <result column="is_deleted" property="isDeleted" />
|
|
|
- <result column="gmt_create" property="gmtCreate" />
|
|
|
- <result column="gmt_modified" property="gmtModified" />
|
|
|
- <result column="creator" property="creator" />
|
|
|
- <result column="modifier" property="modifier" />
|
|
|
+ <id column="rep_no" property="repNo"/>
|
|
|
+ <result column="hospital_id" property="hospitalId"/>
|
|
|
+ <result column="behospital_code" property="behospitalCode"/>
|
|
|
+ <result column="rep_type" property="repType"/>
|
|
|
+ <result column="rep_name" property="repName"/>
|
|
|
+ <result column="rep_type_name" property="repTypeName"/>
|
|
|
+ <result column="slide_type" property="slideType"/>
|
|
|
+ <result column="rep_date" property="repDate"/>
|
|
|
+ <result column="check_date" property="checkDate"/>
|
|
|
+ <result column="apply_doctor" property="applyDoctor"/>
|
|
|
+ <result column="dept_id" property="deptId"/>
|
|
|
+ <result column="dept_name" property="deptName"/>
|
|
|
+ <result column="register_flag" property="registerFlag"/>
|
|
|
+ <result column="is_deleted" property="isDeleted"/>
|
|
|
+ <result column="gmt_create" property="gmtCreate"/>
|
|
|
+ <result column="gmt_modified" property="gmtModified"/>
|
|
|
+ <result column="creator" property="creator"/>
|
|
|
+ <result column="modifier" property="modifier"/>
|
|
|
</resultMap>
|
|
|
|
|
|
+ <!-- 获取病人的出入院时间-->
|
|
|
+ <select id="getTime" resultType="java.util.HashMap">
|
|
|
+ select
|
|
|
+ t.behospital_date,
|
|
|
+ t.leave_hospital_date
|
|
|
+ from med_behospital_info t
|
|
|
+ where
|
|
|
+ t.is_deleted = 'N'
|
|
|
+ <if test="examineInfoVO.behospitalCode != null">
|
|
|
+ and t.behospital_code = #{examineInfoVO.behospitalCode}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
|
|
|
-<!--获取检验信息-->
|
|
|
- <select id="getExamineInfo" resultType="com.diagbot.dto.ExamineInfoDTO">
|
|
|
+ <!--获取检验信息-->
|
|
|
+ <select id="getExamineInfo" resultType="com.diagbot.dto.ExamineInfoDTO">
|
|
|
select
|
|
|
distinct
|
|
|
b.repNo,
|
|
@@ -42,7 +54,7 @@
|
|
|
t1.rep_no as repNo,
|
|
|
t1.rep_name as examineItemName,
|
|
|
t1.rep_type_name as examineItemType,
|
|
|
- CONCAT( t2.item_name, '(',DATE_FORMAT( t2.gmt_create,'%Y-%m-%d'),')')as info,
|
|
|
+ CONCAT( t2.item_name, '(',DATE_FORMAT( t1.check_date,'%Y-%m-%d'),')')as info,
|
|
|
DATE_FORMAT( t1.rep_date, '%Y-%m-%d %h:%i:%s' ) as rTime,
|
|
|
DATE_FORMAT( t1.check_date, '%Y-%m-%d %h:%i:%s' ) as cTime,
|
|
|
t1.apply_doctor as doctorName,
|
|
@@ -82,12 +94,17 @@
|
|
|
<![CDATA[ AND date_format(t1.check_date,'%Y-%m-%d %H:%i:%s') <= #{examineInfoVO.jyDateEnd}]]>
|
|
|
</if>
|
|
|
<if test="examineInfoVO.isPlacefile != null and examineInfoVO.isPlacefile == 1">
|
|
|
- <![CDATA[ AND date_format (t1.check_date,'%Y-%m-%d %H:%i:%s') <= t3.leave_hospital_date]]>
|
|
|
- <![CDATA[ AND date_format (t1.check_date,'%Y-%m-%d %H:%i:%s') >= t3.behospital_date]]>
|
|
|
+ <if test="examineInfoVO.leaveHospitalDate != null and examineInfoVO.behospitalDate != null">
|
|
|
+ <![CDATA[ AND date_format (t1.check_date,'%Y-%m-%d %H:%i:%s') <= #{examineInfoVO.leaveHospitalDate}]]>
|
|
|
+ <![CDATA[ AND date_format (t1.check_date,'%Y-%m-%d %H:%i:%s') >= #{examineInfoVO.behospitalDate}]]>
|
|
|
+ </if>
|
|
|
</if>
|
|
|
<if test="examineInfoVO.isPlacefile != null and examineInfoVO.isPlacefile == 0">
|
|
|
- <![CDATA[ AND date_format (t1.check_date,'%Y-%m-%d %H:%i:%s') >= t3.behospital_date]]>
|
|
|
- </if>) b
|
|
|
+ <if test="examineInfoVO.behospitalDate != null">
|
|
|
+ <![CDATA[ AND date_format (t1.check_date,'%Y-%m-%d %H:%i:%s') >= #{examineInfoVO.behospitalDate}]]>
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ ) b
|
|
|
where 1=1
|
|
|
<if test="examineInfoVO.examineType != null and examineInfoVO.examineType == 1">
|
|
|
<if test="infos != null and infos.size() > 0">
|