Преглед изворни кода

Merge branch 'master' of http://wcollector.idatabank.com:5230/dbs289/LifeCenter.git

junekeunsong пре 4 година
родитељ
комит
ff787ddec1

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

@@ -48,101 +48,107 @@ public class ClinicController extends LifeCenterController {
 	private final Logger logger = LoggerFactory.getLogger(this.getClass());
 
 	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();
-		strSymptom = strSymptom.substring(0, strSymptom.length() - 1);
-		
-		return strSymptom;
-  }
+        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;
+    }
 
 	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();
-		strDisease = strDisease.substring(0, strDisease.length()-1);
-		return strDisease;
+        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;
     }
 
 	@RequestMapping("/state")

+ 4 - 4
src/main/webapp/WEB-INF/jsp/clinic/info.jsp

@@ -186,7 +186,7 @@ function drawPhrChart(data, dataName) {
 	        }]
 	    },
 	    options: {
-
+	    	maintainAspectRatio: false,
 	    }
 	});
 }
@@ -229,7 +229,7 @@ function drawBPChart(data) {
 	        }]
 	    },
 	    options: {
-
+	    	maintainAspectRatio: false,
 	    }
 	});
 }
@@ -998,8 +998,8 @@ $(document).ready(function() {
 										</h1>
 									</div>
 									<div class="card-body">
-										<div class="graph-area mb-4">
-											<canvas id="phrChart" width="400" height="100"></canvas>
+										<div class="graph-area mb-4" style="height:300px;">
+											<canvas id="phrChart"></canvas>
 										</div>
 										<div class="table-responsive">
 											<table id="phrDataTable" class="table data-table text-center">

+ 6 - 6
src/main/webapp/WEB-INF/jsp/mobile/login/login.jsp

@@ -48,13 +48,13 @@ $( function(){
                     localStorage.pw = $( "#pw" ).val();
                     localStorage.cc = data.cc;
 
-                    if( isMobile() ) {
-                        if( checkDevice() == "android" ) {
-                            window.android.login(data.id, data.pw);
-                        } else if( checkDevice() == "ios" ){
+//                     if( isMobile() ) {
+//                         if( checkDevice() == "android" ) {
+//                             window.android.login(data.id, data.pw);
+//                         } else if( checkDevice() == "ios" ){
                             
-                        }
-                    }
+//                         }
+//                     }
                     
                     location.replace( '/mobile/menu' );
                 } else {

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

@@ -259,7 +259,7 @@ $( function(){
                                                                  
                                                                 <select class="custom-select select-date date-year">
                                                                       <option value="" selected="">년</option>
-                                                                      <c:forEach var="y" begin="1940" end="${sysYear}" step="1">
+                                                                      <c:forEach var="y" begin="1900" end="${sysYear}" step="1">
                                                                           <option value="${y}">${y} 년</option>
                                                                       </c:forEach>
                                                                 </select>
@@ -321,14 +321,14 @@ $( function(){
                                                     </td>
                                                 </tr>
                                                 <tr>
-                                                    <th><span class="fix">*</span>최근약복용<br />(최근 24시간 이내)</th>
+                                                    <th>최근약복용<br />(최근 24시간 이내)</th>
                                                     <td>
                                                         <label class="form-check form-check-inline">
-                                                            <input class="form-check-input" type="radio" value="N" name="drugYn" onclick="$('#drugContent').attr('readonly', true);" required>
+                                                            <input class="form-check-input" type="radio" value="N" name="drugYn" onclick="$('#drugContent').attr('readonly', true).val('');">
                                                             <span class="form-check-label">미복용</span>
                                                         </label>
                                                         <label class="form-check form-check-inline">
-                                                            <input class="form-check-input" type="radio" value="Y" name="drugYn" onclick="$('#drugContent').removeAttr('readonly');" required>
+                                                            <input class="form-check-input" type="radio" value="Y" name="drugYn" onclick="$('#drugContent').removeAttr('readonly');">
                                                             <span class="form-check-label">복용</span>
                                                         </label>
                                                         <label class="form-check form-check-inline">