junekeunsong 4 лет назад
Родитель
Сommit
53a73efca3

+ 105 - 0
src/main/java/com/lemon/lifecenter/common/LifeCenterFunction.java

@@ -41,6 +41,8 @@ import org.json.JSONObject;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import com.lemon.lifecenter.dto.PatientDTO;
+
 public class LifeCenterFunction {
     public static String setURLEncode(String content, String lngType) throws UnsupportedEncodingException {
         return URLEncoder.encode(content, lngType);
@@ -407,4 +409,107 @@ public class LifeCenterFunction {
         return src.replaceFirst("(^02|[0-9]{3})([0-9]{3,4})([0-9]{4})$", "$1-$2-$3");
     }
     
+    public static String getDisease(PatientDTO dto) {
+        String highBloodPressureCheck = dto.getHighBloodPressureCheck().equals("Y") ? "고혈압" : "";
+        String lowBloodPressureCheck = dto.getLowBloodPressureCheck().equals("Y") ? "저혈압" : "";
+        String organTransplantCheck = dto.getOrganTransplantCheck().equals("Y") ? "장기이식(신장, 간 등)" : "";
+        String diabetesCheck = dto.getDiabetesCheck().equals("Y") ? "당뇨" : "";
+        String respiratoryDiseaseCheck = dto.getRespiratoryDiseaseCheck().equals("Y") ? "호흡기질환" : "";
+        String immunologicalDiseaseCheck = dto.getImmunologicalDiseaseCheck().equals("Y") ? "면역질환(류마티스 등)" : "";
+        String heartDisease = dto.getHeartDisease().equals("Y") ? "심장질환" : "";
+        String liverDisease = dto.getLiverDisease().equals("Y") ? "간질환" : "";
+        String operation = dto.getOperation().equals("Y") ? "수술(" + dto.getOperationContent() + ")" : "";
+        String allergyCheck = dto.getAllergyCheck().equals("Y") ? "알레르기" : "";
+        String kidneyDisease = dto.getKidneyDisease().equals("Y") ? "신장질환" : "";
+        String cancerName = dto.getCancerName() == null ? "" : "(" + dto.getCancerName() + ")";
+        String cancerCheck = dto.getCancerCheck().equals("Y") ? "암" + cancerName : "";
+        String etcContent = dto.getEtcContentDisease() == null ? "" : dto.getEtcContentDisease();
+        String ectCheckDisease = dto.getEtcCheckDisease().equals("Y") ? "기타(" + etcContent + ")" : "";
+        
+        ArrayList<String> disease = new ArrayList<String>();
+        disease.add(highBloodPressureCheck);
+        disease.add(lowBloodPressureCheck);
+        disease.add(organTransplantCheck);
+        disease.add(diabetesCheck);
+        disease.add(respiratoryDiseaseCheck);
+        disease.add(immunologicalDiseaseCheck);
+        disease.add(heartDisease);
+        disease.add(liverDisease);
+        disease.add(operation);
+        disease.add(allergyCheck);
+        disease.add(kidneyDisease);
+        disease.add(cancerCheck);
+        disease.add(ectCheckDisease);
+        
+        String strDisease = "";
+        for (int i = 0; i < disease.size(); i++) {
+            String str = disease.get(i);
+            if (!str.equals("")) {
+                strDisease += str;
+                strDisease += ", ";
+            }
+        }
+        
+        strDisease = strDisease.trim();
+        if (!strDisease.equals("")) {
+            strDisease = strDisease.substring(0, strDisease.length()-1);
+        }
+        
+        return strDisease;
+    }
+    
+    public static String getSymptom(PatientDTO dto) {
+        String feverCheck = dto.getFeverCheck().equals("Y") ? "열감(열나는 느낌)" : "";
+        String coughCheck = dto.getCoughCheck().equals("Y") ? "기침" : "";
+        String colic = dto.getColic().equals("Y") ? "복통(배아픔)" : "";
+        String coldFitCheck = dto.getColdFitCheck().equals("Y") ? "오한(추운 느낌)" : "";
+        String sputumCheck = dto.getSputumCheck().equals("Y") ? "가래" : "";
+        String ocinCheck = dto.getOcinCheck().equals("Y") ? "오심(구역질)" : "";
+        String chestPain = dto.getChestPain().equals("Y") ? "흉통" : "";
+        String noseCheck = dto.getNoseCheck().equals("Y") ? "콧물 또는 코 막힘" : "";
+        String vomitingCheck = dto.getVomitingCheck().equals("Y") ? "구토" : "";
+        String musclePainCheck = dto.getMusclePainCheck().equals("Y") ? "근육통(몸살)" : "";
+        String soreThroatCheck = dto.getSoreThroatCheck().equals("Y") ? "인후통(목 아픔)" : "";
+        String diarrheaCheck = dto.getDiarrheaCheck().equals("Y") ? "설사" : "";
+        String headacheCheck = dto.getHeadacheCheck().equals("Y") ? "두통(머리아픔)" : "";
+        String dyspneaCheck = dto.getDyspneaCheck().equals("Y") ? "호흡곤란(숨가쁨)" : "";
+        String fatigueCheck = dto.getFatigueCheck().equals("Y") ? "권태감(피로감)" : "";
+        String etcContent = dto.getEtcContentSymptom() == null ? "" : dto.getEtcContentSymptom();
+        String ectCheckSymptom = dto.getEtcCheckSymptom().equals("Y") ? "기타(" + etcContent + ")" : "";
+        
+        String strSymptom = "";
+        ArrayList<String> symptom = new ArrayList<String>();
+        symptom.add(feverCheck);
+        symptom.add(coughCheck);
+        symptom.add(colic);
+        symptom.add(coldFitCheck);
+        symptom.add(sputumCheck);
+        symptom.add(ocinCheck);
+        symptom.add(chestPain);
+        symptom.add(noseCheck);
+        symptom.add(vomitingCheck);
+        symptom.add(musclePainCheck);
+        symptom.add(soreThroatCheck);
+        symptom.add(diarrheaCheck);
+        symptom.add(headacheCheck);
+        symptom.add(dyspneaCheck);
+        symptom.add(fatigueCheck);
+        symptom.add(ectCheckSymptom);
+        
+        for (int i = 0; i < symptom.size(); i++) {
+            String str = symptom.get(i);
+            if (!str.equals("")) {
+                strSymptom += str;
+                strSymptom += ", ";
+            }
+        }
+        
+        strSymptom = strSymptom.trim();
+        if (!strSymptom.equals("")) {
+            strSymptom = strSymptom.substring(0, strSymptom.length() - 1);
+        }
+        
+        
+        return strSymptom;
+    }
 }

+ 11 - 11
src/main/java/com/lemon/lifecenter/controller/ClinicController.java

@@ -194,17 +194,17 @@ public class ClinicController extends LifeCenterController {
 		
 		String bloodPress = patientDto.getBloodPressureLevel();
 		
-		if (!bloodPress.equals("")) {
-				String[] bloodPressureLevel = patientDto.getBloodPressureLevel().split("[|]");
-				patientDto.setBloodPressureLevelCon(bloodPressureLevel[0]);
-				patientDto.setBloodPressureLevelRel(bloodPressureLevel[0]);
-		}
-		
-		String strDisease = "";
-		String strSymptom = getSymptom(patientDto);
-		if (patientDto.getBasalDiseaseYn().equals("Y")) {
-				strDisease = getDisease(patientDto);
-		}
+        if (!bloodPress.equals("") && !bloodPress.equals("|")) {
+            String[] bloodPressureLevel = patientDto.getBloodPressureLevel().split("[|]");
+            patientDto.setBloodPressureLevelCon(bloodPressureLevel[0]);
+            patientDto.setBloodPressureLevelRel(bloodPressureLevel[1]);
+        }
+        
+        String strDisease = "";
+        String strSymptom = LifeCenterFunction.getSymptom(patientDto);
+        if (patientDto.getBasalDiseaseYn().equals("Y")) {
+            strDisease = LifeCenterFunction.getDisease(patientDto);
+        }
 
 		// phr 정보
 		PatientPHRHistoryDTO dto = new PatientPHRHistoryDTO();

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

@@ -112,17 +112,8 @@ public class MobileHistoryController  extends LifeCenterController {
         String sDate = dto.getSymptomStartDate();
         String jumin = dto.getJumin();
         
-        if (!hDate.equals("")) {
-            hDate = hDate.split("-")[0] + "년 " + hDate.split("-")[1] + "월 " + hDate.split("-")[2] + "일";
-        }
-        if (!cDate.equals("")) {
-            cDate = cDate.split("-")[0] + "년 " + cDate.split("-")[1] + "월 " + cDate.split("-")[2] + "일";
-        }
-        if (!sDate.equals("")) {
-            sDate = sDate.split("-")[0] + "년 " + sDate.split("-")[1] + "월 " + sDate.split("-")[2] + "일";
-        }
         if (!jumin.equals("")) {
-            jumin = jumin.substring(0, 4) + "년 " + jumin.substring(4, 6) + "월 " + jumin.substring(6, 8) + "일";            
+            jumin = jumin.substring(0, 4) + "년 " + jumin.substring(4, 6) + "월 " + jumin.substring(6, 8) + "일";
         }
         
         dto.setHospitalizationDate(hDate);

+ 4 - 107
src/main/java/com/lemon/lifecenter/controller/PatientController.java

@@ -198,16 +198,17 @@ public class PatientController extends LifeCenterController {
         
         String bloodPress = dto.getBloodPressureLevel();
         
-        if (!bloodPress.equals("")) {
+        logger.error("bloodPress -- > " + bloodPress);
+        if (!bloodPress.equals("") && !bloodPress.equals("|")) {
             String[] bloodPressureLevel = dto.getBloodPressureLevel().split("[|]");
             dto.setBloodPressureLevelCon(bloodPressureLevel[0]);
             dto.setBloodPressureLevelRel(bloodPressureLevel[1]);
         }
         
         String strDisease = "";
-        String strSymptom = getSymptom(dto);
+        String strSymptom = LifeCenterFunction.getSymptom(dto);
         if (dto.getBasalDiseaseYn().equals("Y")) {
-            strDisease = getDisease(dto);
+            strDisease = LifeCenterFunction.getDisease(dto);
         }
         
         
@@ -355,108 +356,4 @@ public class PatientController extends LifeCenterController {
         return object.toString();
     }
     
-    
-    private String getDisease(PatientDTO dto) {
-        String highBloodPressureCheck = dto.getHighBloodPressureCheck().equals("Y") ? "고혈압" : "";
-        String lowBloodPressureCheck = dto.getLowBloodPressureCheck().equals("Y") ? "저혈압" : "";
-        String organTransplantCheck = dto.getOrganTransplantCheck().equals("Y") ? "장기이식(신장, 간 등)" : "";
-        String diabetesCheck = dto.getDiabetesCheck().equals("Y") ? "당뇨" : "";
-        String respiratoryDiseaseCheck = dto.getRespiratoryDiseaseCheck().equals("Y") ? "호흡기질환" : "";
-        String immunologicalDiseaseCheck = dto.getImmunologicalDiseaseCheck().equals("Y") ? "면역질환(류마티스 등)" : "";
-        String heartDisease = dto.getHeartDisease().equals("Y") ? "심장질환" : "";
-        String liverDisease = dto.getLiverDisease().equals("Y") ? "간질환" : "";
-        String operation = dto.getOperation().equals("Y") ? "수술(" + dto.getOperationContent() + ")" : "";
-        String allergyCheck = dto.getAllergyCheck().equals("Y") ? "알레르기" : "";
-        String kidneyDisease = dto.getKidneyDisease().equals("Y") ? "신장질환" : "";
-        String cancerName = dto.getCancerName() == null ? "" : "(" + dto.getCancerName() + ")";
-        String cancerCheck = dto.getCancerCheck().equals("Y") ? "암" + cancerName : "";
-        String etcContent = dto.getEtcContentDisease() == null ? "" : dto.getEtcContentDisease();
-        String ectCheckDisease = dto.getEtcCheckDisease().equals("Y") ? "기타(" + etcContent + ")" : "";
-        
-        ArrayList<String> disease = new ArrayList<String>();
-        disease.add(highBloodPressureCheck);
-        disease.add(lowBloodPressureCheck);
-        disease.add(organTransplantCheck);
-        disease.add(diabetesCheck);
-        disease.add(respiratoryDiseaseCheck);
-        disease.add(immunologicalDiseaseCheck);
-        disease.add(heartDisease);
-        disease.add(liverDisease);
-        disease.add(operation);
-        disease.add(allergyCheck);
-        disease.add(kidneyDisease);
-        disease.add(cancerCheck);
-        disease.add(ectCheckDisease);
-        
-        String strDisease = "";
-        for (int i = 0; i < disease.size(); i++) {
-            String str = disease.get(i);
-            if (!str.equals("")) {
-                strDisease += str;
-                strDisease += ", ";
-            }
-        }
-        
-        strDisease = strDisease.trim();
-        if (!strDisease.equals("")) {
-            strDisease = strDisease.substring(0, strDisease.length()-1);
-        }
-        
-        return strDisease;
-    }
-    
-    private String getSymptom(PatientDTO dto) {
-        String feverCheck = dto.getFeverCheck().equals("Y") ? "열감(열나는 느낌)" : "";
-        String coughCheck = dto.getCoughCheck().equals("Y") ? "기침" : "";
-        String colic = dto.getColic().equals("Y") ? "복통(배아픔)" : "";
-        String coldFitCheck = dto.getColdFitCheck().equals("Y") ? "오한(추운 느낌)" : "";
-        String sputumCheck = dto.getSputumCheck().equals("Y") ? "가래" : "";
-        String ocinCheck = dto.getOcinCheck().equals("Y") ? "오심(구역질)" : "";
-        String chestPain = dto.getChestPain().equals("Y") ? "흉통" : "";
-        String noseCheck = dto.getNoseCheck().equals("Y") ? "콧물 또는 코 막힘" : "";
-        String vomitingCheck = dto.getVomitingCheck().equals("Y") ? "구토" : "";
-        String musclePainCheck = dto.getMusclePainCheck().equals("Y") ? "근육통(몸살)" : "";
-        String soreThroatCheck = dto.getSoreThroatCheck().equals("Y") ? "인후통(목 아픔)" : "";
-        String diarrheaCheck = dto.getDiarrheaCheck().equals("Y") ? "설사" : "";
-        String headacheCheck = dto.getHeadacheCheck().equals("Y") ? "두통(머리아픔)" : "";
-        String dyspneaCheck = dto.getDyspneaCheck().equals("Y") ? "호흡곤란(숨가쁨)" : "";
-        String fatigueCheck = dto.getFatigueCheck().equals("Y") ? "권태감(피로감)" : "";
-        String etcContent = dto.getEtcContentSymptom() == null ? "" : dto.getEtcContentSymptom();
-        String ectCheckSymptom = dto.getEtcCheckSymptom().equals("Y") ? "기타(" + etcContent + ")" : "";
-        
-        String strSymptom = "";
-        ArrayList<String> symptom = new ArrayList<String>();
-        symptom.add(feverCheck);
-        symptom.add(coughCheck);
-        symptom.add(colic);
-        symptom.add(coldFitCheck);
-        symptom.add(sputumCheck);
-        symptom.add(ocinCheck);
-        symptom.add(chestPain);
-        symptom.add(noseCheck);
-        symptom.add(vomitingCheck);
-        symptom.add(musclePainCheck);
-        symptom.add(soreThroatCheck);
-        symptom.add(diarrheaCheck);
-        symptom.add(headacheCheck);
-        symptom.add(dyspneaCheck);
-        symptom.add(fatigueCheck);
-        symptom.add(ectCheckSymptom);
-        
-        for (int i = 0; i < symptom.size(); i++) {
-            String str = symptom.get(i);
-            if (!str.equals("")) {
-                strSymptom += str;
-                strSymptom += ", ";
-            }
-        }
-        
-        strSymptom = strSymptom.trim();
-        if (!strSymptom.equals("")) {
-            strSymptom = strSymptom.substring(0, strSymptom.length() - 1);
-        }
-        
-        
-        return strSymptom;
-    }
 }

+ 28 - 21
src/main/webapp/WEB-INF/jsp/mobile/history/serveyhistory.jsp

@@ -1,4 +1,5 @@
 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
 <%@ page language="java" contentType="text/html; charset=UTF-8"
     pageEncoding="UTF-8"%>
 <jsp:include page="${data._INCLUDE}/header.jsp"></jsp:include>
@@ -17,26 +18,32 @@
             <div class="check_list">
                 <div class="part">
                     <div class="title">
-                        1. 입원일을 입력 하세요.
+                        1. 입원일
                     </div>
                     <div class="date">
-                        <c:out value="${info.hospitalizationDate}" />
+                        <fmt:parseDate var="hDate" value="${info.hospitalizationDate}" pattern="yyyy-MM-dd HH:mm" />
+                        <c:set var="hospitalizationDate"><fmt:formatDate value="${hDate}" pattern="yyyy년 MM월 dd일 HH시 mm분" /></c:set>
+                        <c:out value="${hospitalizationDate}" />
                     </div>
                 </div>
                 <div class="part">
                     <div class="title">
-                        2. 코로나 19 확진일을 입력 하세요
+                        2. 코로나 19 확진일
                     </div>
                     <div class="date">
-                        <c:out value="${info.confirmationDate}" />
+                        <fmt:parseDate var="cDate" value="${info.confirmationDate}" pattern="yyyy-MM-dd" />
+                        <c:set var="confirmationDate"><fmt:formatDate value="${cDate}" pattern="yyyy년 MM월 dd일" /></c:set>
+                        <c:out value="${confirmationDate}" />
                     </div>
                 </div>
                 <div class="part">
                     <div class="title">
-                        3. 증상 시작일을 입력 하세요.
+                        3. 증상 시작일
                     </div>
                     <div class="date">
-                        <c:out value="${info.symptomStartDate}" />
+                        <fmt:parseDate var="sDate" value="${info.symptomStartDate}" pattern="yyyy-MM-dd" />
+                        <c:set var="symptomStartDate"><fmt:formatDate value="${sDate}" pattern="yyyy년 MM월 dd일" /></c:set>
+                        <c:out value="${symptomStartDate}" />
                     </div>
                 </div>
                 <div class="part">
@@ -50,7 +57,7 @@
                 </div>
                 <div class="part">
                     <div class="title">
-                        5. 생년월일을 입력 하세요
+                        5. 생년월일
                     </div>
                     <div class="date">
                         <c:out value="${info.jumin}" />
@@ -58,7 +65,7 @@
                 </div>
                 <div class="part">
                     <div class="title">
-                        6. 기저질환 여부를 체크하세요.
+                        6. 기저질환 여부
                     </div>
                     <div class="list">
                         <c:if test="${info.basalDiseaseYn eq 'Y'}">예</c:if>
@@ -67,7 +74,7 @@
                 </div>
                 <div class="part">
                     <div class="title">
-                        7. 6번의 ”예“인 경우 해당되는 기저질환을 모두 체크해주세요
+                        7. 기저질환
                     </div>
                     <div class="list">
                         <c:out value="${disease}" />
@@ -75,7 +82,7 @@
                 </div>
                 <div class="part">
                     <div class="title">
-                        8. 현재 증상을 체크하세요 
+                        8. 현재 증상
                     </div>
                     <div class="list">
                         <c:out value="${symptom}" />
@@ -83,7 +90,7 @@
                 </div>
                 <div class="part">
                     <div class="title">
-                        9. 체온을 입력하세요.
+                        9. 체온
                     </div>
                     <div class="data">
                         <label class="inline">
@@ -96,7 +103,7 @@
                 </div>
                 <div class="part">
                     <div class="title">
-                        10. 맥박수를 입력하세요.
+                        10. 맥박수
                     </div>
                     <div class="data">
                         <c:out value="${info.pulseRate} 회/분"></c:out>
@@ -104,7 +111,7 @@
                 </div>
                 <div class="part">
                     <div class="title">
-                        11. 호흡수를 입력하세요.
+                        11. 호흡수
                     </div>
                     <div class="data">
                         <c:out value="${info.respirationRate} 회/분"></c:out>
@@ -112,7 +119,7 @@
                 </div>
                 <div class="part">
                     <div class="title">
-                        12. 혈압을 입력하세요.
+                        12. 혈압
                     </div>
                     <div class="data">
                         <c:out value="수축기 ${info.bloodPressureLevelCon} mmHg  /  이완기 ${info.bloodPressureLevelRel} mmHg" />
@@ -121,7 +128,7 @@
                 </div>
                 <div class="part">
                     <div class="title">
-                        13. 산소포화도를 입력하세요.
+                        13. 산소포화도
                     </div>
                     <div class="data">
                         <c:out value="${info.oxygenSaturation} %"></c:out>
@@ -129,7 +136,7 @@
                 </div>
                 <div class="part">
                     <div class="title">
-                        14. 최근 24시간 이내 약 복용 여부를 체크하세요.
+                        14. 최근 24시간 이내 약 복용 여부
                     </div>
                     <div class="list">
                         <c:if test="${info.drugYn eq 'Y'}">예</c:if>
@@ -138,7 +145,7 @@
                 </div>
                 <div class="part">
                     <div class="title">
-                        15. 14번의 ”예“인 경우 약명을 입력 하세요
+                        15. 최근 24시간 이내 복용 약명
                     </div>
                     <div class="data">
                         <c:out value="${info.drugContent}"></c:out>
@@ -146,7 +153,7 @@
                 </div>
                 <div class="part">
                     <div class="title">
-                        16. 임신 여부를 체크하세요.
+                        16. 임신 여부
                     </div>
                     <div class="list">
                         <c:if test="${info.pregnancyStatus eq 'Y'}">예</c:if>
@@ -155,11 +162,11 @@
                 </div>
                 <div class="part">
                     <div class="title">
-                        17. 16번의 ”예“인 경우 임신 주차를 입력 하세요
-                        <span class="mini">(만일 ”아니오“ 경우에는 입력하지 마세요)</span>
+                        17. 임신주차
+<!--                         <span class="mini">(만일 ”아니오“ 경우에는 입력하지 마세요)</span> -->
                     </div>
                     <div class="data">
-                        <c:out value="임신주차 : ${info.pregnancyWeek}주차"></c:out>
+                        <c:out value="${info.pregnancyWeek}주차"></c:out>
                     </div>
                 </div>
             </div>