|
@@ -22,7 +22,39 @@
|
|
|
</resultMap>
|
|
|
|
|
|
<select id="getEvaluatorPage" resultType="com.diagbot.dto.GetEvaluatorPageDTO">
|
|
|
-
|
|
|
+ SELECT
|
|
|
+ t2.id,
|
|
|
+ t2.gmt_create,
|
|
|
+ t3.patient_name AS name,
|
|
|
+ t3.patient_phone AS phone,
|
|
|
+ t3.patient_sex AS sex,
|
|
|
+ t3.patient_birthday AS birthday,
|
|
|
+ t2.except_value,
|
|
|
+ t2.faint_value,
|
|
|
+ t2.heart_value,
|
|
|
+ t2.mild_value,
|
|
|
+ t2.stagnant_value,
|
|
|
+ t2.wet_value,
|
|
|
+ t2.physical_res,
|
|
|
+ t2.physical_types
|
|
|
+ FROM
|
|
|
+ (SELECT
|
|
|
+ inquiry_id,MAX(id) AS id
|
|
|
+ FROM prec_inquiry_evaluator
|
|
|
+ GROUP BY inquiry_id) t1
|
|
|
+ JOIN prec_inquiry_evaluator t2 ON t1.id=t2.id
|
|
|
+ JOIN prec_inquiry_info t3 ON t1.inquiry_id=t3.id
|
|
|
+ WHERE t3.hospital_code=#{hospitalCode}
|
|
|
+ <if test="name!=null and name!=''">
|
|
|
+ AND t3.patient_name LIKE CONCAT('%',#{name},'%')
|
|
|
+ </if>
|
|
|
+ <if test="phone!=null and phone!=''">
|
|
|
+ AND t3.patient_phone LIKE CONCAT('%',#{phone},'%')
|
|
|
+ </if>
|
|
|
+ <if test="sex!=null">
|
|
|
+ AND t3.patient_sex=#{sex}
|
|
|
+ </if>
|
|
|
+ ORDER BY t2.gmt_create DESC
|
|
|
</select>
|
|
|
|
|
|
|