Pārlūkot izejas kodu

문진 로직 수정

junekeunsong 4 gadi atpakaļ
vecāks
revīzija
472d55743e

+ 2 - 2
src/main/java/com/lemon/lifecenter/controller/MobileHistoryController.java

@@ -116,8 +116,8 @@ public class MobileHistoryController  extends LifeCenterController {
         dto.setSymptomStartDate(sDate);
         
         String bloodPress = dto.getBloodPressureLevel();
-        if (!bloodPress.equals("")) {
-            String[] bloodPressureLevel = dto.getBloodPressureLevel().split("[|]");
+        if (!bloodPress.equals("") && !bloodPress.equals("|")) {
+            String[] bloodPressureLevel = bloodPress.split("[|]");
             dto.setBloodPressureLevelCon(bloodPressureLevel[0]);
             dto.setBloodPressureLevelRel(bloodPressureLevel[1]);
         }

+ 0 - 3
src/main/java/com/lemon/lifecenter/controller/MobileServeyController.java

@@ -72,15 +72,12 @@ public class MobileServeyController extends LifeCenterController {
         dto.setBloodPressureLevel(bloodPressureLevelCon + "|" + bloodPressureLevelRel);
         
         int pcCnt = patientService.updatePatientCareServey(dto);
-        logger.error("dto.getKidneyDisease() -- > " + dto.getKidneyDisease());
         dto.setEtcCheck(dto.getEtcCheckDisease());
         dto.setEtcContent(dto.getEtcContentDisease());
-        dto.setDiseaseEtc1("Y");
         patientService.updatePatientDisease(dto);
         
         dto.setEtcCheck(dto.getEtcCheckSymptom());
         dto.setEtcContent(dto.getEtcContentSymptom());
-        dto.setSymptomEtc1("Y");
         patientService.updatePatientSymptom(dto);
         
         LifeCenterFunction.scriptMessage( response, "alertBox({ txt : '문진이 정상적으로 제출되었습니다.', callBack : function(){ location.href='/mobile/serveyhistory' } });" );

+ 7 - 14
src/main/java/com/lemon/lifecenter/dto/PatientDTO.java

@@ -99,8 +99,7 @@ public class PatientDTO {
     private String ampm;
     private String symptomContent;
     
-    private String diseaseEtc1 = "";
-    private String symptomEtc1 = "";
+    private String serveyYn = "Y";
     
     private int limit;
     private int limitMax;
@@ -580,23 +579,17 @@ public class PatientDTO {
     public void setLimit(int limit) {
         this.limit = limit;
     }
-    public String getDiseaseEtc1() {
-        return diseaseEtc1;
-    }
-    public void setDiseaseEtc1(String diseaseEtc1) {
-        this.diseaseEtc1 = diseaseEtc1;
-    }
-    public String getSymptomEtc1() {
-        return symptomEtc1;
-    }
-    public void setSymptomEtc1(String symptomEtc1) {
-        this.symptomEtc1 = symptomEtc1;
-    }
     public int getLimitMax() {
         return limitMax;
     }
     public void setLimitMax(int limitMax) {
         this.limitMax = limitMax;
     }
+    public String getServeyYn() {
+        return serveyYn;
+    }
+    public void setServeyYn(String serveyYn) {
+        this.serveyYn = serveyYn;
+    }
 
 }

+ 11 - 23
src/main/resources/mybatis/mapper/patient/patient.xml

@@ -270,12 +270,12 @@
                    ( patient_name,      gender,      ward_number,     room_number,        hospitalization_date, state, 
                      center_code,       jumin,       patient_phone,   guardian_phone,     symptom_start_date,   confirmation_date,    disisolation_date, 
                      basal_disease_yn,  drug_yn,     drug_content,    pregnancy_status,   pregnancy_week,       id,                   pw, 
-                     create_date,       create_by,   update_by )
+                     create_date,       create_by,   update_by, servey_yn )
                       
             VALUES ( #{patientName},    #{gender},   #{wardNumber},   #{roomNumber},      #{hospitalizationDate}, #{state}, 
                      #{centerCode},     #{jumin},    #{patientPhone}, #{guardianPhone},   #{symptomStartDate},    #{confirmationDate},    #{disisolationDate}, 
                      #{basalDiseaseYn}, #{drugYn},   #{drugContent},  #{pregnancyStatus}, #{pregnancyWeek},       #{id},                  #{pw}, 
-                     NOW(),             #{createBy}, '' )
+                     NOW(),             #{createBy}, '',        #{serveyYn} )
         ]]>
     </insert>
     
@@ -339,6 +339,7 @@
                    PC.CREATE_DATE AS createDate,
                    PC.CREATE_BY AS createBy,
                    PC.UPDATE_BY AS updateBy,
+                   PC.SERVEY_YN AS serveyYn,
             
                    PS.FEVER_CHECK AS feverCheck,
                    PS.COUGH_CHECK AS coughCheck,
@@ -426,7 +427,8 @@
                    id = #{id},
                    pw = #{pw},
                    update_date = NOW(),
-                   update_by = #{updateBy}
+                   update_by = #{updateBy},
+                   servey_yn = #{serveyYn}
              WHERE patient_idx = #{patientIdx}
         ]]>
     </update>
@@ -436,7 +438,8 @@
             UPDATE PATIENT_CARE
                SET UPDATE_DATE = NOW(),
                    UPDATE_BY   = #{updateBy},
-                   basal_disease_yn = #{basalDiseaseYn}
+                   basal_disease_yn = #{basalDiseaseYn},
+                   SERVEY_YN = 'N'
              WHERE PATIENT_IDX = #{patientIdx}
         ]]>
     </update>
@@ -467,13 +470,6 @@
                    cancer_name = #{cancerName},
                    etc_check =   #{etcCheck},
                    etc_content=#{etcContent}
-        ]]>
-        <if test='diseaseEtc1 == "Y"'>
-            <![CDATA[
-                , etc1 = #{diseaseEtc1}
-            ]]>
-        </if>
-        <![CDATA[
              WHERE patient_idx = #{patientIdx}
         ]]>
     </update>
@@ -504,13 +500,6 @@
                    respiration_rate = #{respirationRate},
                    blood_pressure_level = #{bloodPressureLevel},
                    oxygen_saturation = #{oxygenSaturation}
-        ]]>
-        <if test='symptomEtc1 == "Y"'>
-            <![CDATA[
-                , etc1 = #{symptomEtc1}
-            ]]>
-        </if>
-        <![CDATA[
              WHERE patient_idx = #{patientIdx}
         ]]>
     </update>
@@ -620,11 +609,10 @@
     <select id="selectMunJinCount" parameterType="PatientDTO" resultType="int">
         <![CDATA[
             SELECT COUNT(*) AS CNT
-              FROM PATIENT_DISEASE PD, PATIENT_SYMPTOM PS
-             WHERE PD.PATIENT_IDX = PS.PATIENT_IDX
-               AND PD.ETC1 = 'Y'
-               AND PS.ETC1 = 'Y'
-               AND PD.PATIENT_IDX = #{patientIdx}
+              FROM PATIENT_CARE
+             WHERE 1 = 1
+               AND SERVEY_YN   = 'N'
+               AND PATIENT_IDX = #{patientIdx}
         ]]>
     </select>
 </mapper>

+ 14 - 0
src/main/webapp/WEB-INF/jsp/patient/edit.jsp

@@ -336,6 +336,20 @@ $( function(){
                                                         </select>
                                                     </td>
                                                 </tr>
+                                                <tr>
+                                                    <th>문진작성(환자용 앱)</th>
+                                                    <td colspan="3">
+                                                        <label class="form-check form-check-inline">
+                                                            <input class="form-check-input" type="radio" id="serveyY" name="serveyYn" value="Y" <c:if test="${patientData.serveyYn eq 'Y'}">checked="checked"</c:if>>
+                                                            <span class="form-check-label">가능</span>
+                                                        </label>
+                                                        <label class="form-check form-check-inline">
+                                                            <input class="form-check-input" type="radio" id="serveyN" name="serveyYn" value="N" <c:if test="${patientData.serveyYn eq 'N'}">checked="checked"</c:if>>
+                                                            <span class="form-check-label">불가능</span>
+                                                        </label>
+                                                        <span class="text-danger">(문진작성이 가능일 경우에만 환자용 앱에서 문진 작성이 가능합니다.)</span>
+                                                    </td>
+                                                </tr>
                                                 <tr>
                                                     <th>최근약복용<br />(최근 24시간 이내)</th>
                                                     <td>

+ 7 - 0
src/main/webapp/WEB-INF/jsp/patient/info.jsp

@@ -142,6 +142,13 @@ function deleteConfirm(){
                                                     <c:if test="${info.state eq 'E'}">기타</c:if>
                                                 </td>
                                             </tr>
+                                            <tr>
+                                                <th>문진작성(환자용 앱)</th>
+                                                <td colspan="3">
+                                                    <c:if test="${info.serveyYn eq 'Y'}">가능</c:if>
+                                                    <c:if test="${info.serveyYn eq 'N'}">불가능</c:if>
+                                                </td>
+                                            </tr>
                                             <tr>
                                                 <th>최근 약복용<br />(최근 24시간 이내)</th>
                                                 <td>

+ 14 - 0
src/main/webapp/WEB-INF/jsp/patient/new.jsp

@@ -327,6 +327,20 @@ $( function(){
                                                         </div>
                                                     </td>
                                                 </tr>
+                                                <tr>
+                                                    <th>문진작성(환자용 앱)</th>
+                                                    <td colspan="3">
+                                                        <label class="form-check form-check-inline">
+                                                            <input class="form-check-input" type="radio" id="serveyY" name="serveyYn" value="Y">
+                                                            <span class="form-check-label">가능</span>
+                                                        </label>
+                                                        <label class="form-check form-check-inline">
+                                                            <input class="form-check-input" type="radio" id="serveyN" name="serveyYn" value="N">
+                                                            <span class="form-check-label">불가능</span>
+                                                        </label>
+                                                        <span class="text-danger">(문진작성이 가능일 경우에만 환자용 앱에서 문진 작성이 가능합니다.)</span>
+                                                    </td>
+                                                </tr>
                                                 <tr>
                                                     <th>최근약복용<br />(최근 24시간 이내)</th>
                                                     <td>