瀏覽代碼

미입력 필터 관련 수정

maengje 4 年之前
父節點
當前提交
2a46138d30
共有 1 個文件被更改,包括 10 次插入10 次删除
  1. 10 10
      src/main/resources/mybatis/mapper/patient/patientPHRLatest.xml

+ 10 - 10
src/main/resources/mybatis/mapper/patient/patientPHRLatest.xml

@@ -196,52 +196,52 @@
 	                </when>
 	                <when test="filter == 'temperatureBlank' and timeCriterion == 'AM'" >
 	                <![CDATA[
-	                	DATEDIFF(p.temperature_create_date, CURDATE()) != 0
+	                	(p.temperature IS NULL) OR (DATEDIFF(p.temperature_create_date, CURDATE()) != 0)
 	                ]]>
 	                </when>
 	                <when test="filter == 'temperatureBlank' and timeCriterion == 'PM'" >
 	                <![CDATA[
-	                	DATEDIFF(p.temperature_create_date, CURDATE()) != 0 OR HOUR(p.temperature_create_date) < 12
+	                	(p.temperature IS NULL) OR (DATEDIFF(p.temperature_create_date, CURDATE()) != 0 OR HOUR(p.temperature_create_date) < 12)
 	                ]]>
 	                </when>
 	                <when test="filter == 'bloodPressureBlank' and timeCriterion == 'AM'" >
 	                <![CDATA[
-	                	DATEDIFF(p.temperature_create_date, CURDATE()) != 0
+	                	(p.systolic_blood_pressure IS NULL OR diastolic_blood_pressure IS NULL) OR (DATEDIFF(p.systolic_blood_pressure_create_date, CURDATE()) != 0 OR DATEDIFF(p.diastolic_blood_pressure_create_date, CURDATE()) != 0)
 	                ]]>
 	                </when>
 	                <when test="filter == 'bloodPressureBlank' and timeCriterion == 'PM'" >
 	                <![CDATA[
-	                	DATEDIFF(p.temperature_create_date, CURDATE()) != 0 OR HOUR(p.temperature_create_date) < 12
+	                	(p.systolic_blood_pressure IS NULL OR diastolic_blood_pressure IS NULL) OR (DATEDIFF(p.systolic_blood_pressure_create_date, CURDATE()) != 0 OR HOUR(p.systolic_blood_pressure_create_date) < 12 OR DATEDIFF(p.diastolic_blood_pressure_create_date, CURDATE()) != 0 OR HOUR(p.diastolic_blood_pressure_create_date) < 12)
 	                ]]>
 	                </when>
 	                <when test="filter == 'pulseRateBlank' and timeCriterion == 'AM'" >
 	                <![CDATA[
-	                	DATEDIFF(p.pulse_rate_create_date, CURDATE()) != 0
+	                	(p.pulse_rate IS NULL) OR (DATEDIFF(p.pulse_rate_create_date, CURDATE()) != 0)
 	                ]]>
 	                </when>
 	                <when test="filter == 'pulseRateBlank' and timeCriterion == 'PM'" >
 	                <![CDATA[
-	                	DATEDIFF(p.pulse_rate_create_date, CURDATE()) != 0 OR HOUR(p.pulse_rate_create_date) < 12
+	                	(p.pulse_rate IS NULL) OR (DATEDIFF(p.pulse_rate_create_date, CURDATE()) != 0 OR HOUR(p.pulse_rate_create_date) < 12)
 	                ]]>
 	                </when>
 	                <when test="filter == 'oxygenSaturationBlank' and timeCriterion == 'AM'" >
 	                <![CDATA[
-	                	DATEDIFF(p.oxygen_saturation_create_date, CURDATE()) != 0
+	                	(p.oxygen_saturation IS NULL) OR (DATEDIFF(p.oxygen_saturation_create_date, CURDATE()) != 0)
 	                ]]>
 	                </when>
 	                <when test="filter == 'oxygenSaturationBlank' and timeCriterion == 'PM'" >
 	                <![CDATA[
-	                	DATEDIFF(p.oxygen_saturation_create_date, CURDATE()) != 0 OR HOUR(p.oxygen_saturation_create_date) < 12
+	                	(p.oxygen_saturation IS NULL) OR (DATEDIFF(p.oxygen_saturation_create_date, CURDATE()) != 0 OR HOUR(p.oxygen_saturation_create_date) < 12)
 	                ]]>
 	                </when>
 	                <when test="filter == 'bloodSugarBlank' and timeCriterion == 'AM'" >
 	                <![CDATA[
-	                	DATEDIFF(p.blood_sugar_create_date, CURDATE()) != 0
+	                	(p.blood_sugar IS NULL) OR (DATEDIFF(p.blood_sugar_create_date, CURDATE()) != 0)
 	                ]]>
 	                </when>
 	                <when test="filter == 'bloodSugarBlank' and timeCriterion == 'PM'" >
 	                <![CDATA[
-	                	DATEDIFF(p.blood_sugar_create_date, CURDATE()) != 0 OR HOUR(p.blood_sugar_create_date) < 12
+	                	(p.blood_sugar IS NULL) OR (DATEDIFF(p.blood_sugar_create_date, CURDATE()) != 0 OR HOUR(p.blood_sugar_create_date) < 12)
 	                ]]>
 	                </when> 
 	                <when test="filter == 'symptomBlank' and timeCriterion == 'AM'" >