|
@@ -23,5 +23,113 @@
|
|
|
<result column="creator" property="creator" />
|
|
|
<result column="modifier" property="modifier" />
|
|
|
</resultMap>
|
|
|
+<!--获取检验信息-->
|
|
|
+ <select id="getExamineInfo" resultType="com.diagbot.dto.ExamineInfoDTO">
|
|
|
+ select b.*
|
|
|
+ from(
|
|
|
+ SELECT
|
|
|
+ t1.rep_name as examineItemName,
|
|
|
+ t1.rep_type_name as examineItemType,
|
|
|
+ CONCAT( t1.rep_name, '(',DATE_FORMAT( t1.check_date,'%Y-%m-%d'),')')as info,
|
|
|
+ t1.rep_date as rTime,
|
|
|
+ t1.check_date as cTime,
|
|
|
+ t1.apply_doctor as doctorName,
|
|
|
+ t1.hospital_id as hospitalId,
|
|
|
+ t1.behospital_code as behospitalCode
|
|
|
+ FROM
|
|
|
+ med_lis_info t1
|
|
|
+ WHERE
|
|
|
+ t1.is_deleted = "N"
|
|
|
+ AND t1.check_date IS NOT NULL
|
|
|
+ <if test="examineInfoVO.hospitalId != null">
|
|
|
+ and t1.hospital_id = #{examineInfoVO.hospitalId}
|
|
|
+ </if>
|
|
|
+ <if test="examineInfoVO.behospitalCode != null and examineInfoVO.behospitalCode != ''">
|
|
|
+ and t1.behospital_code = #{examineInfoVO.behospitalCode}
|
|
|
+ </if>
|
|
|
+ <if test="examineInfoVO.examineItemType != null and examineInfoVO.examineItemType != ''">
|
|
|
+ and t1.rep_type_name like CONCAT('%',#{examineInfoVO.examineItemType},'%')
|
|
|
+ </if>
|
|
|
+ <if test="examineInfoVO.examineItemName != null and examineInfoVO.examineItemName != ''">
|
|
|
+ and t1.rep_name like CONCAT('%',#{examineInfoVO.examineItemName},'%')
|
|
|
+ </if>
|
|
|
+ <if test="examineInfoVO.jyNewDateStart != null">
|
|
|
+ <![CDATA[ AND t1.check_date >= #{examineInfoVO.jyNewDateStart}]]>
|
|
|
+ </if>
|
|
|
+ <if test="examineInfoVO.jyNewDateEnd != null">
|
|
|
+ <![CDATA[ AND t1.check_date <= #{examineInfoVO.jyNewDateEnd}]]>
|
|
|
+ </if>) b
|
|
|
+ where 1=1
|
|
|
+ <if test="examineInfoVO.examineType != null and examineInfoVO.examineType == 1">
|
|
|
+ <if test="infos != null and infos.size() > 0">
|
|
|
+ and b.info in
|
|
|
+ <foreach collection="infos" open="(" separator="," close=")" item="item">
|
|
|
+ '${item}'
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="infos = null || infos.size() == 0">
|
|
|
+ and b.info in('000000ASDQWEZXC@#$%')
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ <if test="examineInfoVO.examineType != null and examineInfoVO.examineType == 2 ">
|
|
|
+ <if test="infos != null and infos.size() > 0">
|
|
|
+ and b.info not in
|
|
|
+ <foreach collection="infos" open="(" separator="," close=")" item="item">
|
|
|
+ '${item}'
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="infos = null || infos.size() == 0">
|
|
|
+ and 1=1
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!-- 获取质控提示信息-->
|
|
|
+ <select id="getInfo" resultType="java.lang.String">
|
|
|
+ select b.info
|
|
|
+ from
|
|
|
+ med_behospital_info a,
|
|
|
+ med_qcresult_detail b
|
|
|
+ where
|
|
|
+ a.is_deleted = 'N'
|
|
|
+ and b.is_deleted = 'N'
|
|
|
+ and a.hospital_id = b.hospital_id
|
|
|
+ and a.behospital_code = b.behospital_code
|
|
|
+ <if test="hospitalId != null">
|
|
|
+ and a.hospital_id = #{hospitalId}
|
|
|
+ </if>
|
|
|
+ <if test="behospitalCode != null and behospitalCode != ''">
|
|
|
+ and a.behospital_code = #{behospitalCode}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!-- 获取检验子项信息-->
|
|
|
+ <select id="getExamineSonInfo" resultType="com.diagbot.dto.ExamineSonInfoDTO">
|
|
|
+ SELECT
|
|
|
+ t2.item_name AS examineItemName,
|
|
|
+ CONCAT( t2.result, t2.unit ) AS examineItemResult,
|
|
|
+ t1.rep_date AS rTime,
|
|
|
+ t1.check_date AS cTime,
|
|
|
+ t1.apply_doctor AS doctorName
|
|
|
+ FROM
|
|
|
+ med_lis_info t1,
|
|
|
+ med_lis_result t2
|
|
|
+ where
|
|
|
+ t1.is_deleted = "N"
|
|
|
+ AND t2.is_deleted = "N"
|
|
|
+ AND t1.check_date IS NOT NULL
|
|
|
+ AND t1.hospital_id = t2.hospital_id
|
|
|
+ AND t1.behospital_code = t2.behospital_code
|
|
|
+ AND t1.rep_no = t2.rep_no
|
|
|
+ <if test="examineSonInfoVO.hospitalId != null">
|
|
|
+ and t1.hospital_id = #{examineSonInfoVO.hospitalId}
|
|
|
+ </if>
|
|
|
+ <if test="examineSonInfoVO.hbehospitalCode != null and examineSonInfoVO.hbehospitalCode != ''">
|
|
|
+ and t1.behospital_code = #{examineSonInfoVO.behospitalCode}
|
|
|
+ </if>
|
|
|
+ <if test="examineSonInfoVO.repNo != null and examineSonInfoVO.repNo != ''">
|
|
|
+ and t1.rep_no = #{examineSonInfoVO.repNo}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
|
|
|
</mapper>
|