浏览代码

환자등록 환자수정 페이지 문구추가 재택치료인경우

huiwonseo 4 年之前
父节点
当前提交
a8a72e640b

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

@@ -237,9 +237,11 @@ public class PatientController extends LifeCenterController {
         int centerCount   = centerService.selectCenterOneCount( dto );
         
         String centerName = "";
-        
+        String centerType = "";
+
         if( centerCount > 0 ) {
             centerName = centerService.selectCenterInfoOne( dto ).getCenterName();
+            centerType = centerService.selectCenterInfoOne( dto ).getCenterType();
         }
         
         StaffDTO staffDTO = new StaffDTO();
@@ -259,6 +261,7 @@ public class PatientController extends LifeCenterController {
         }
         
         mv.addObject( "centerName", centerName );
+        mv.addObject( "centerType", centerType );
         mv.addObject( "centerCount", centerCount );
         mv.addObject( "actionType", "new" );
         mv.addObject( "staffList", staffList );
@@ -568,12 +571,15 @@ public class PatientController extends LifeCenterController {
             dto.setStaffId( sesId );
             String centerName = "";
             int centerCount   = centerService.selectCenterCount( dto );
-            
+            String centerType = "";
+
             if( sesCenterCode.equals( "0" ) ) { //센터코드가 없는 시스템권한 계정인경우
                 centerName = patientDTO.getCenterName();
+                centerType = "C";
             } else {
                 if( centerCount > 0 ) {
                     centerName = centerService.selectCenterInfoOne( dto ).getCenterName();
+                    centerType = centerService.selectCenterInfoOne( dto ).getCenterType();
                 } else {
                     LifeCenterFunction.scriptMessage(response, "alertBox({ txt : '문진이 정상적으로 제출되었습니다.', callBack : function(){ history.back(); } });" );
                     // return ""; 아직처리안함
@@ -620,7 +626,7 @@ public class PatientController extends LifeCenterController {
             
             mv.addObject( "centerName", centerName );
             mv.addObject( "centerCount", centerCount );
-            
+            mv.addObject( "centerType", centerType );
             mv.addObject( "staffList", staffList );
             
             mv.addObject( "patientIdx", patientIdx );

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

@@ -322,13 +322,20 @@ $( function(){
                                                     </td>
                                                 </tr>
                                                 <tr>
-                                                    <th><span class="fix">*</span>병동 번호</th>
+                                                    <th><span class="fix">*</span>병동 번호
+                                                        <c:if test="${centerType eq 'S'}" ><br/><span class="ml-2">(거주지 번호)</span></c:if>
+                                                    </th>
                                                     <td>
                                                         <div class="form-check-inline">
                                                             <!-- 병동 번호 (동 /호실) -->
                                                             <input type="text" value="${patientData.wardNumber}" class="form-control" name="wardNumber"> <span>동</span>
                                                             <input type="text" value="${patientData.roomNumber}" class="form-control" name="roomNumber" required> <span>호</span>
                                                         </div>
+                                                        <c:if test="${centerType eq 'S'}">
+                                                            <div class="mt-1">
+                                                              <span class="text-danger">재택치료는 "호" 항목만 사용해 주세요.</span>
+                                                            </div>
+                                                        </c:if>
                                                     </td>
                                                     <th><span class="fix">*</span>이름</th>
                                                     <td>

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

@@ -600,13 +600,20 @@ input.type-password
                                                     </td>
                                                 </tr>
                                                 <tr>
-                                                    <th><span class="fix">*</span>병동 번호</th>
+                                                    <th><span class="fix">*</span>병동 번호
+                                                        <c:if test="${centerType eq 'S'}" ><br/><span class="ml-2">(거주지 번호)</span></c:if>
+                                                    </th>
                                                     <td>
                                                         <div class="form-check-inline">
                                                             <!-- 병동 번호 (동 /호실) -->
                                                             <input type="text" class="form-control" name="wardNumber"> <span class="ml-1 mr-2">동</span>
                                                             <input type="text" class="form-control" name="roomNumber" required> <span class="ml-1">호</span>
                                                         </div>
+                                                        <c:if test="${centerType eq 'S'}">
+                                                            <div class="mt-1">
+                                                              <span class="text-danger">재택치료는 "호" 항목만 사용해 주세요.</span>
+                                                            </div>
+                                                        </c:if>
                                                     </td>
                                                     <th><span class="fix">*</span>이름</th>
                                                     <td>