瀏覽代碼

Merge remote-tracking branch 'origin/databank'

junekeunsong 4 年之前
父節點
當前提交
a43d273c0d

+ 0 - 1
src/main/java/com/lemon/lifecenter/controller/CenterController.java

@@ -166,7 +166,6 @@ public class CenterController extends LifeCenterController {
         CenterInfoDTO dto = new CenterInfoDTO();
         dto.setCenterCode(centerCode);
         dto = centerService.selectCenterInfo(dto);
-        logger.error("jurisdiction -- > " + dto.getJurisdiction());
         
         String address = dto.getCenterAddress();
         String mainAddr = "";

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

@@ -158,11 +158,11 @@ public class PatientController extends LifeCenterController {
         dto.setState( "H" ); // H : 입소
         dto.setCreateBy( sesId );
         
-        if( dto.getDisisolationDate().equals( "" ) ) {
+        if( dto.getDisisolationDate() != null && dto.getDisisolationDate().equals( "" ) ) {
             dto.setDisisolationDate( null );
         }
         
-        if( dto.getSymptomStartDate().equals( "" ) ) {
+        if( dto.getSymptomStartDate() != null && dto.getSymptomStartDate().equals( "" ) ) {
             dto.setSymptomStartDate( null );
         }
         
@@ -290,11 +290,11 @@ public class PatientController extends LifeCenterController {
         dto.setCenterCode( sesCenterCode );
         dto.setUpdateBy( sesId );
         
-        if( dto.getDisisolationDate().equals( "" ) ) {
+        if( dto.getDisisolationDate() != null && dto.getDisisolationDate().equals( "" ) ) {
             dto.setDisisolationDate( null );
         }
         
-        if( dto.getSymptomStartDate().equals( "" ) ) {
+        if( dto.getSymptomStartDate() != null && dto.getSymptomStartDate().equals( "" ) ) {
             dto.setSymptomStartDate( null );
         }
         

+ 1 - 1
src/main/webapp/WEB-INF/jsp/center/edit.jsp

@@ -119,7 +119,7 @@ $( function(){
                                                 <td>
                                                     <select class="custom-select" name="cooperativeCode">
                                                         <c:forEach var="j" items="${cooperativeList}">
-                                                            <option value="${j.locationCode}" <c:if test="${j.locationCode eq center.cooperativeCode}"> selected="selected" </c:if>><c:out value="${j.locationName}"/></option>
+                                                            <option value="${j.locationCode}" <c:if test="${j.locationCode eq centerInfo.cooperativeCode}"> selected="selected" </c:if>><c:out value="${j.locationName}"/></option>
                                                         </c:forEach>
                                                     </select>
                                                 </td>

+ 7 - 0
src/main/webapp/WEB-INF/jsp/mobile/health/health2.jsp

@@ -80,6 +80,9 @@ $( function(){
             $( "#phrValue" ).val( "" );
             $( "#phrValueAnother1" ).val( "" );
             $( "#phrValueAnother2" ).val( "" );
+            $( "#phrType" ).val( "" );
+            $( "#phrTypeAnother" ).val( "" );
+            $( "#phrTypeAnother2" ).val( "" );
             
             if( pulseRate.length > 0 ) {
                 $( "#phrType" ).val( "pulseRate" );
@@ -105,6 +108,10 @@ $( function(){
             }
             
             if( bloodPressure.length > 0 && bloodPressure2.length > 0 ){
+                if( bloodPressure2 >= bloodPressure ) {
+                    $( "div.error-msg" ).text( "수축기 혈압값은 이완기 혈압값 보다 높아야합니다 (The systolic blood pressure value must be higher than the diastolic blood pressure value)" );
+                    flag = false;
+                }
                 $( "#phrTypeAnother" ).val( "bloodPressure" );
             }
             

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

@@ -4,7 +4,6 @@
 <%@ taglib uri = "http://java.sun.com/jsp/jstl/functions" prefix = "fn" %>
 <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
 <jsp:include page="${data._INCLUDE}/header.jsp"></jsp:include>
-
 <script type="text/javascript">
 function patientNewInit() {
     if( $( "#basalN" ).is( ":checked" ) ) {
@@ -123,11 +122,26 @@ function setEventHandler(){
     $('input.date-no-req').on('apply.daterangepicker', function(ev, picker) {
         $(this).val(picker.startDate.format('YYYY-MM-DD'));
     });
+    
+    $( "#state" ).on( "change", function(){
+        stateCheck();
+    });
+}
+
+function stateCheck(){
+    if( $( "#state" ).val() == "H" ){
+        $( "input[name='disisolationDate']" ).prop( "disabled", true ).val( "" );
+        $( "#state-label").text( "" );
+    } else {
+        $( "input[name='disisolationDate']" ).prop( "disabled", false ).val( getNowYmd() );
+        $( "#state-label").text( "(" + $( "#state option:checked" ).text() + ")" );
+    }
 }
 
 $( function(){
     patientNewInit();
     setEventHandler();
+    stateCheck();
     $( ".hospitalizationDate" ).trigger( "change" );
     $( ".select-date" ).trigger( "change" );
     
@@ -144,6 +158,12 @@ $( function(){
             },
             jumin : {
                 date : true
+            },
+            symptomStartDate : {
+            	date : true
+            },
+            disisolationDate : {
+            	date : true
             }
         },
         messages : {
@@ -310,9 +330,12 @@ $( function(){
                                                     </td>
                                                 </tr>
                                                 <tr>
-                                                    <th>격리해제 예정일</th>
+<!--                                                     <th>격리해제 예정일</th> -->
+                                                    <th>상태 변경일</br>(퇴소, 지정병원이송, 기타)</th>
                                                     <td>
-                                                        <div class="form-group calendar-bar mb-xl-0">
+                                                        <div class="form-group calendar-bar mb-xl-0" style="position:relative;">
+                                                            <div id="state-label" style="position:absolute;top:5px;left:90px;"></div>
+                                                            
                                                             <fmt:parseDate var="disisolationDateTime" value="${patientData.disisolationDate}" pattern="yyyy-MM-dd HH:mm" />
                                                             <c:set var="disisolationDate"><fmt:formatDate value="${disisolationDateTime}" pattern="yyyy-MM-dd" /></c:set>
                                                             <input class="form-control date-no-req" type="text" value="${disisolationDate}" name="disisolationDate" autocomplete="off">
@@ -322,7 +345,7 @@ $( function(){
                                                     
                                                     <th>상태</th>
                                                     <td>
-                                                        <select class="custom-select" name="state">
+                                                        <select class="custom-select" id="state" name="state">
                                                             <option value="H" <c:if test="${patientData.state eq 'H'}">selected="selected"</c:if>>입소</option>
                                                             <option value="D" <c:if test="${patientData.state eq 'D'}">selected="selected"</c:if>>퇴소</option>
                                                             <option value="T" <c:if test="${patientData.state eq 'T'}">selected="selected"</c:if>>지정병원 이송</option>

+ 9 - 13
src/main/webapp/WEB-INF/jsp/patient/info.jsp

@@ -140,26 +140,22 @@ function nonFaceStart() {
                                             </td>
                                         </tr>
                                         <tr>
-                                            <th>격리해제 예정일</th>
+<!--                                             <th>격리해제 예정일</th> -->
+                                            <th>상태 변경일</br>(퇴소, 지정병원이송, 기타)</th>
                                             <td>
                                                 <fmt:parseDate var="disisolationDateTime" value="${info.disisolationDate}" pattern="yyyy-MM-dd HH:mm" />
                                                 <c:set var="disisolationDate"><fmt:formatDate value="${disisolationDateTime}" pattern="yyyy년 MM월 dd일" /></c:set>
                                                 <c:out value="${disisolationDate}" />
+                                                <c:if test="${info.state eq 'D'}">(퇴소)</c:if>
+                                                <c:if test="${info.state eq 'T'}">(지정병원 이송)</c:if>
+                                                <c:if test="${info.state eq 'E'}">(기타)</c:if>
                                             </td>
                                             <th>상태</th>
                                             <td>
-                                                <c:if test="${info.state eq 'H'}">
-                                                    입소
-                                                </c:if>
-                                                <c:if test="${info.state eq 'D'}">
-                                                    퇴소
-                                                </c:if>
-                                                <c:if test="${info.state eq 'T'}">
-                                                    지정병원 이송
-                                                </c:if>
-                                                <c:if test="${info.state eq 'E'}">
-                                                    기타
-                                                </c:if>
+                                                <c:if test="${info.state eq 'H'}">입소</c:if>
+                                                <c:if test="${info.state eq 'D'}">퇴소</c:if>
+                                                <c:if test="${info.state eq 'T'}">지정병원 이송</c:if>
+                                                <c:if test="${info.state eq 'E'}">기타</c:if>
                                             </td>
                                         </tr>
                                         <tr>

+ 1 - 1
src/main/webapp/WEB-INF/jsp/patient/list.jsp

@@ -154,7 +154,7 @@ var endDate   = "<c:out value='${endDate}'/>";
                                                     <th>나이</th>
                                                     <th>호실</th>
                                                     <th>입소일자</th>
-                                                    <th>격리해제 예정일</th>
+                                                    <th>상태 변경일</th>
                                                     <th>상태</th>
                                                 </tr>
                                             </thead>

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

@@ -298,8 +298,11 @@ $( function(){
                                                         </div>
                                                     </td>
                                                 </tr>
-                                                <tr>
-                                                    <th>격리해제 예정일</th>
+                                                
+                                                <!-- 안보이도록처리 (신규등록 환자 상태는 무조건 입소, 빈값으로 submit) -->
+                                                <tr class="d-none">
+<!--                                                     <th>격리해제 예정일</th> -->
+                                                    <th>상태 변경일</br>(퇴소, 지정병원이송, 기타)</th>
                                                     <td colspan="3">
                                                         <div class="form-group calendar-bar mb-xl-0">
                                                             <input class="form-control date-no-req" type="text" name="disisolationDate" autocomplete="off">

+ 17 - 0
src/main/webapp/resources/js/common/common.js

@@ -34,6 +34,23 @@ $(function(){
     });
 });
 
+function getNowYmd(){
+    var date = new Date(); 
+    var year = date.getFullYear(); 
+    var month = new String(date.getMonth()+1); 
+    var day = new String(date.getDate()); 
+    
+    // 한자리수일 경우 0을 채워준다. 
+    if(month.length == 1){ 
+      month = "0" + month; 
+    }
+     
+    if(day.length == 1){ 
+      day = "0" + day; 
+    } 
+    return year + "-" + month + "-" + day;
+}
+
 function getAjax( url, vv, success, error, done ){
   $.ajax({
     url      : url,