|
@@ -114,6 +114,11 @@
|
|
|
FROM patient_care c LEFT JOIN patient_phr_latest p ON p.patient_idx = c.patient_idx
|
|
|
WHERE c.center_code = #{centerCode}
|
|
|
]]>
|
|
|
+ <if test='searchText != null and searchText != ""'>
|
|
|
+ <![CDATA[
|
|
|
+ AND (c.patient_name LIKE CONCAT('%', #{searchText}, '%') OR c.ward_number LIKE CONCAT('%', #{searchText}, '%'))
|
|
|
+ ]]>
|
|
|
+ </if>
|
|
|
</select>
|
|
|
<select id="selectPHRLatestList" parameterType="PatientPHRLatestDTO" resultType="PatientPHRLatestDTO">
|
|
|
<![CDATA[
|
|
@@ -136,6 +141,13 @@
|
|
|
(SELECT s.create_date FROM patient_symptom_sim s WHERE s.patient_idx = c.patient_idx AND DATEDIFF(DATE(s.create_date), CURDATE()) = 0) AS symptomLastDate
|
|
|
FROM patient_care c LEFT JOIN patient_phr_latest p ON p.patient_idx = c.patient_idx
|
|
|
WHERE c.center_code = #{centerCode}
|
|
|
+ ]]>
|
|
|
+ <if test='searchText != null and searchText != ""'>
|
|
|
+ <![CDATA[
|
|
|
+ AND (c.patient_name LIKE CONCAT('%', #{searchText}, '%') OR c.ward_number LIKE CONCAT('%', #{searchText}, '%'))
|
|
|
+ ]]>
|
|
|
+ </if>
|
|
|
+ <![CDATA[
|
|
|
ORDER BY c.room_number ASC
|
|
|
LIMIT #{limit}, #{limitMax}
|
|
|
]]>
|