Parcourir la source

환자관리 -> 환자삭제 기능 추가

huiwon.seo il y a 4 ans
Parent
commit
a40abb1b5f

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

@@ -2,9 +2,6 @@ package com.lemon.lifecenter;
 
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.context.annotation.ComponentScan;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.PropertySource;
 
 @SpringBootApplication
 public class LifeCenterApplication {

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

@@ -189,7 +189,7 @@ public class PatientController extends LifeCenterController {
     }
 
     @RequestMapping("/info")
-    public ModelAndView patientInfo( @ModelAttribute("dto") PatientDTO dto ) {
+    public ModelAndView patientInfo( @ModelAttribute("dto") PatientDTO dto ) throws Exception {
         ModelAndView mv = setMV("patient/info");
 
         int patientIdx = dto.getPatientIdx();
@@ -217,12 +217,38 @@ public class PatientController extends LifeCenterController {
         }
         
         
-        mv.addObject("disease", strDisease);
-        mv.addObject("symptom", strSymptom);
-        mv.addObject("patientIdx", patientIdx);
-        mv.addObject("info", dto);
+        mv.addObject( "disease", strDisease );
+        mv.addObject( "symptom", strSymptom );
+        mv.addObject( "patientIdx", patientIdx );
+        mv.addObject( "enIdx", LifeCenterFunction.aesEncrypt( config.aesKey, config.IV, String.valueOf( patientIdx ) ) );
+        mv.addObject( "info", dto );
+        
         return mv;
     }
+    
+    @RequestMapping("/delete")
+    @Transactional(propagation=Propagation.REQUIRED)
+    public String patientDelete( @RequestParam( value="enIdx", required = true ) String enIdx,
+            HttpServletRequest request,HttpServletResponse response ) throws Exception {
+        String deIdx   = LifeCenterFunction.aesDecrypt( config.aesKey, config.IV, enIdx );
+        int patientIdx = Integer.valueOf( deIdx );
+        
+        PatientDTO dto = new PatientDTO();
+        dto.setPatientIdx( patientIdx );
+        System.err.println( "patientIdx : " + patientIdx );
+        
+        int total = patientService.selectPatientOneCount(dto);
+        
+        if( total == 0 ) {
+            LifeCenterFunction.scriptMessage( response, "alertBox({ txt: '이미 삭제되었거나 존재하지않는 환자입니다.', callBack : function(){ history.back(); } });" );
+            return "/common/blank";
+        } else {
+            patientService.deletePatientCare(dto);
+        }
+        
+        LifeCenterFunction.scriptMessage( response, "alertBox({ txt: '환자정보가 삭제되었습니다. ', callBack : function(){ location.href='./list'; } });" );
+        return "/common/blank";
+    }
 
     @RequestMapping("/edit")
     public ModelAndView patientEdit( 

+ 2 - 0
src/main/java/com/lemon/lifecenter/mapper/PatientMapper.java

@@ -26,4 +26,6 @@ public interface PatientMapper {
     public int selectPatientSymptomSimTotal( PatientHealthDTO dto );
     public List<PatientDTO> selectPatientSymptomSimData( PatientHealthDTO dto );
     public int updatePatientCareServey(PatientDTO dto);
+    public int selectPatientOneCount(PatientDTO dto);
+    public void deletePatientCare( PatientDTO dto );
 }

+ 6 - 0
src/main/java/com/lemon/lifecenter/service/PatientService.java

@@ -62,4 +62,10 @@ public class PatientService {
     public int updatePatientCareServey(PatientDTO dto) {
         return mapper.updatePatientCareServey(dto);
     }
+    public int selectPatientOneCount(PatientDTO dto) {
+        return mapper.selectPatientOneCount(dto);
+    }
+    public void deletePatientCare( PatientDTO dto ) {
+        mapper.deletePatientCare(dto);
+    }
 }

+ 16 - 0
src/main/resources/mybatis/mapper/patient/patient.xml

@@ -419,4 +419,20 @@
              WHERE A.idx = P.idx
         ]]>
     </select>
+    
+    <select id="selectPatientOneCount" parameterType="PatientDTO" resultType="int">
+        <![CDATA[
+            SELECT COUNT(*) CNT
+              FROM patient_care
+             WHERE patient_idx = #{patientIdx}
+        ]]>
+    </select>
+    
+    
+    <!-- 환자삭제 / 환자의 모든 기록을 삭제함 /생치 관리자만 삭제가 가능하다 -->
+    <delete id="deletePatientCare" parameterType="PatientDTO">
+        <![CDATA[
+            DELETE FROM patient_care WHERE patient_idx = #{patientIdx}
+        ]]>
+    </delete>
 </mapper>

+ 223 - 232
src/main/webapp/WEB-INF/jsp/patient/info.jsp

@@ -4,37 +4,23 @@
 <%@ 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 nonFaceStart() {
-    getAjax("/patient/nonFaceStart", $("#hiddenForm").serialize(), function ( result ) {
-        
-        $("#nonface").append('<input type="hidden" name="member_name" value="'+result.member_name+'" />');
-        $("#nonface").append('<input type="hidden" name="member_id" value="'+result.member_id+'" />');
-        $("#nonface").append('<input type="hidden" name="room_id" value="'+result.room_id+'" />');
-        $("#nonface").append('<input type="hidden" name="hashData" value="'+result.hashData+'">');
-        $("#nonface").append('<input type="hidden" name="token" value="'+result.token+'">');
-        $("#nonface").append('<input type="hidden" name="api_key" value="'+result.api_key+'">');
-
-        $("#nonface").append('<input type="hidden" name="classify" value="d">');
-
-        var gsWin = window.open('about:blank','nonface');
-        var frm =document.nonface;
-        frm.target ="nonface";
-        frm.method ="post";
-        frm.submit();
-
-    }, function(){
-    }, function(){
-        
+function deleteConfirm(){
+    alertBox({ type : "confirm", 
+               txt : "정말로 삭제할까요?", 
+               callBack : function( result ){
+            	   console.log( result );
+                   if( result ){
+                       $( "#pForm" ).attr( "action", "./delete" );
+                       $( "#pForm" ).submit();
+                   }
+               }
     });
+    return false;
 }
 </script>
-
 </head>
 <body>
-    <form id="nonface" name="nonface" action="https://lemon.medihere.com/app/vc">
-    </form>
     <div class="wrapper">
         <jsp:include page="${data._INCLUDE}/sidebar.jsp"></jsp:include>
 
@@ -42,11 +28,6 @@ function nonFaceStart() {
             <jsp:include page="${data._INCLUDE}/top.jsp"></jsp:include>
 
             <main class="content">
-                <form id="hiddenForm">
-                    <input type="hidden" id="pId" name="pId" value="<c:out value="${info.id}" />">
-                    <input type="hidden" id="pName" name="pName" value="<c:out value="${info.patientName}" />">
-                    <input type="hidden" id="roomId" name="roomId" value="<c:out value="${info.roomNumber}" />">
-                </form>
                 <div class="container-fluid p-0">
                     <!-- 환자관리 : 신규환자 등록 START -->
                     <div class="row">
@@ -69,210 +50,220 @@ function nonFaceStart() {
                         <div class="col-12">
                             <div class="card">
                                 <div class="card-body">
-                                    <table class="table mobile-table">
-                                        <colgroup>
-                                            <col style="width:15%">
-                                            <col style="width:35%">
-                                            <col style="width:15%">
-                                            <col style="width:35%">
-                                        </colgroup>
-                                        <tr>
-                                            <th>치료센터</th>
-                                            <td><c:out value="${info.centerName}" /></td>
-                                            <th>입소일시</th>
-                                            <td colspan="2">
-                                                <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일" /></c:set>
-                                                <c:out value="${hospitalizationDate}" />
-<%--                                                 <c:out value="${info.hospitalizationDate}" /> --%>
-                                            </td>
-                                        </tr>
-                                        <tr>
-                                            <th>병동 번호</th>
-                                            <td>
-                                                <c:if test="${info.wardNumber ne null and info.wardNumber ne ''}">
-                                                    <c:out value="${info.wardNumber}"/>동 
-                                                </c:if>
-                                                <c:out value="${info.roomNumber}" />호 
-                                            </td>
-                                            <th>이름</th>
-                                            <td>
-                                                <c:out value="${info.patientName}" />
-                                            </td>
-                                        </tr>
-                                        <tr>
-                                            <th>성별</th>
-                                            <td>
-                                                <c:if test="${info.gender eq 'M'}">
-                                                    남
-                                                </c:if>
-                                                <c:if test="${info.gender ne 'M'}">
-                                                    여
-                                                </c:if>
-                                            </td>
-                                            <th>생년월일</th>
-                                            <td>
-                                                <c:out value="${info.jumin}" />
-                                            </td>
-                                        </tr>
-                                        <tr>
-                                            <th>연락처</th>
-                                            <td>
-                                                <c:out value="${info.patientPhone}" />
-                                            </td>
-                                            <th>보호자 연락처</th>
-                                            <td>
-                                                <c:out value="${info.guardianPhone}" />
-                                            </td>
-                                        </tr>
-                                        <tr>
-                                            <th>증상시작일</th>
-                                            <td>
-                                                <fmt:parseDate var="symptomStartDateTime" value="${info.symptomStartDate}" pattern="yyyy-MM-dd HH:mm" />
-                                                <c:set var="symptomStartDate"><fmt:formatDate value="${symptomStartDateTime}" pattern="yyyy년 MM월 dd일" /></c:set>
-                                                <c:out value="${symptomStartDate}" />
-                                            </td>
-                                            <th>확진일</th>
-                                            <td>
-                                                <fmt:parseDate var="confirmationDateTime" value="${info.confirmationDate}" pattern="yyyy-MM-dd HH:mm" />
-                                                <c:set var="confirmationDate"><fmt:formatDate value="${confirmationDateTime}" pattern="yyyy년 MM월 dd일" /></c:set>
-                                                <c:out value="${confirmationDate}" />
-                                            </td>
-                                        </tr>
-                                        <tr>
-<!--                                             <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>
-                                            </td>
-                                        </tr>
-                                        <tr>
-                                            <th>최근 약복용<br />(최근 24시간 이내)</th>
-                                            <td>
-                                                <c:choose>
-                                                    <c:when test="${info.drugYn eq 'Y'}">복용 (<c:out value="${info.drugContent}" />)</c:when>
-                                                    <c:when test="${info.drugYn eq 'N'}">미복용</c:when>
-                                                    <c:otherwise></c:otherwise>
-                                                </c:choose>
-                                            </td>
-                                            <th>임신</th>
-                                            <td>
-                                                <c:choose>
-                                                    <c:when test="${info.pregnancyStatus eq 'N'}">무</c:when>
-                                                    <c:when test="${info.pregnancyStatus eq 'Y'}">유 (<c:out value="${info.pregnancyWeek}주차" />)</c:when>
-                                                    <c:otherwise></c:otherwise>
-                                                </c:choose>
-                                            </td>
-                                        </tr>
-                                        <tr>
-                                            <th rowspan="2">기저질환 여부</th>
-                                            <td colspan="3">
-                                                <c:choose>
-                                                    <c:when test="${info.basalDiseaseYn eq 'Y'}">유</c:when>
-                                                    <c:when test="${info.basalDiseaseYn eq 'N'}">무</c:when>
-                                                    <c:otherwise></c:otherwise>
-                                                </c:choose>
-                                            </td>
-                                        </tr>
-                                        <tr>
-                                            <td colspan="3">
-<%--                                                 <c:if test="${info.highBloodPressureCheck eq 'Y'}">, 고혈압</c:if> --%>
-<%--                                                 <c:if test="${info.lowBloodPressureCheck eq 'Y'}">, 저혈압</c:if> --%>
-<%--                                                 <c:if test="${info.organTransplantCheck eq 'Y'}">, 장기이식(신장, 간 등)</c:if> --%>
-<%--                                                 <c:if test="${info.diabetesCheck eq 'Y'}">, 당뇨</c:if> --%>
-<%--                                                 <c:if test="${info.respiratoryDiseaseCheck eq 'Y'}">, 호흡기질환</c:if> --%>
-<%--                                                 <c:if test="${info.immunologicalDiseaseCheck eq 'Y'}">, 면역질환(류마티스 등)</c:if> --%>
-<%--                                                 <c:if test="${info.heartDisease eq 'Y'}">, 심장질환</c:if> --%>
-<%--                                                 <c:if test="${info.liverDisease eq 'Y'}">, 간질환</c:if> --%>
-<%--                                                 <c:if test="${info.operation eq 'Y'}">, 수술(<c:out value="${info.operationContent}" />)</c:if> --%>
-<%--                                                 <c:if test="${info.allergyCheck eq 'Y'}">, 알레르기</c:if> --%>
-<%--                                                 <c:if test="${info.kidneyDisease eq 'Y'}">, 신장질환</c:if> --%>
-<%--                                                 <c:if test="${info.cancerCheck eq 'Y'}">, 암(<c:out value="${info.cancerName}" />)</c:if> --%>
-<%--                                                 <c:if test="${info.ectCheckDisease eq 'Y'}">, 기타(<c:out value="${info.etcContentDisease}" />)</c:if> --%>
-                                                <c:out value="${disease}" />
-                                            </td>
-                                        </tr>
-                                        <tr>
-                                            <th>현재 증상<br />(입소 당시)</th>
-                                            <td colspan="3">
-<%--                                                 <c:if test="${info.feverCheck eq 'Y'}">, 열감(열나는느낌)</c:if> --%>
-<%--                                                 <c:if test="${info.coughCheck eq 'Y'}">, 기침</c:if> --%>
-<%--                                                 <c:if test="${info.colic eq 'Y'}">, 복통(배아픔)</c:if> --%>
-<%--                                                 <c:if test="${info.coldFitCheck eq 'Y'}">, 오한(추운 느낌)</c:if> --%>
-<%--                                                 <c:if test="${info.sputumCheck eq 'Y'}">, 가래</c:if> --%>
-<%--                                                 <c:if test="${info.ocinCheck eq 'Y'}">, 오심(구역질)</c:if> --%>
-<%--                                                 <c:if test="${info.chestPain eq 'Y'}">, 흉통</c:if> --%>
-<%--                                                 <c:if test="${info.noseCheck eq 'Y'}">, 콧물 또는 코 막힘</c:if> --%>
-<%--                                                 <c:if test="${info.vomitingCheck eq 'Y'}">, 구토</c:if> --%>
-<%--                                                 <c:if test="${info.musclePainCheck eq 'Y'}">, 근육통(몸살)</c:if> --%>
-<%--                                                 <c:if test="${info.soreThroatCheck eq 'Y'}">, 인후통(목 아픔)</c:if> --%>
-<%--                                                 <c:if test="${info.diarrheaCheck eq 'Y'}">, 설사</c:if> --%>
-<%--                                                 <c:if test="${info.headacheCheck eq 'Y'}">, 두통(머리아픔)</c:if> --%>
-<%--                                                 <c:if test="${info.dyspneaCheck eq 'Y'}">, 호흡곤란(숨가쁨)</c:if> --%>
-<%--                                                 <c:if test="${info.fatigueCheck eq 'Y'}">, 권태감(피곤함)</c:if> --%>
-<%--                                                 <c:if test="${info.ectCheckSymptom eq 'Y'}">, 기타(<c:out value="${info.etcContentSymptom}" />)</c:if> --%>
-                                                <c:out value="${symptom}" />
-                                            </td>
-                                        </tr>
-                                        <tr>
-                                            <th>
-                                                체온
-                                            </th>
-                                            <td>
-                                                <c:out value="우측 ${info.feverRight}℃ /  좌측  ${info.feverRight}℃" />
-                                            </td>
-                                            <th>
-                                                맥박수
-                                            </th>
-                                            <td>
-                                                <c:out value="${info.pulseRate} 회/분" />
-                                            </td>
-                                        </tr>
-                                        <tr>
-                                            <th>
-                                                호흡수
-                                            </th>
-                                            <td>
-                                                <c:out value="${info.respirationRate} 회/분" />
-                                            </td>
-                                            <th>
-                                                혈압
-                                            </th>
-                                            <td>
-                                            <c:out value="수축기 ${info.bloodPressureLevelCon} mmHg  /  이완기 ${info.bloodPressureLevelRel} mmHg" />
-                                            </td>
-                                        </tr>
-                                        <tr>
-                                            <th>
-                                                산소포화도
-                                            </th>
-                                            <td colspan="3">
-                                                <c:out value="${info.oxygenSaturation} %" />
-                                            </td>
-                                        </tr>
-                                    </table>
-                                    <div class="row mt-3">
-                                        <div class="col-12">
-                                            <div class="text-right">
-                                                <c:if test="${data._SES_GROUP_IDX ne '1'}">
-                                                    <button type="button" class="btn btn-secondary w100" onclick="location.href='./edit?patientIdx=${patientIdx}';">수정</button>
-                                                </c:if>
-                                                <button type="button" class="btn btn-primary w100" onclick="location.href='./list';">확인</button>
+                                    <form method="post" id="pForm">
+                                        <input type="hidden" name="enIdx" value="<c:out value="${enIdx}" />">
+                                        
+                                        <table class="table mobile-table">
+                                            <colgroup>
+                                                <col style="width:15%">
+                                                <col style="width:35%">
+                                                <col style="width:15%">
+                                                <col style="width:35%">
+                                            </colgroup>
+                                            <tr>
+                                                <th>치료센터</th>
+                                                <td><c:out value="${info.centerName}" /></td>
+                                                <th>입소일시</th>
+                                                <td colspan="2">
+                                                    <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일" /></c:set>
+                                                    <c:out value="${hospitalizationDate}" />
+    <%--                                                 <c:out value="${info.hospitalizationDate}" /> --%>
+                                                </td>
+                                            </tr>
+                                            <tr>
+                                                <th>병동 번호</th>
+                                                <td>
+                                                    <c:if test="${info.wardNumber ne null and info.wardNumber ne ''}">
+                                                        <c:out value="${info.wardNumber}"/>동 
+                                                    </c:if>
+                                                    <c:out value="${info.roomNumber}" />호 
+                                                </td>
+                                                <th>이름</th>
+                                                <td>
+                                                    <c:out value="${info.patientName}" />
+                                                </td>
+                                            </tr>
+                                            <tr>
+                                                <th>성별</th>
+                                                <td>
+                                                    <c:if test="${info.gender eq 'M'}">
+                                                        남
+                                                    </c:if>
+                                                    <c:if test="${info.gender ne 'M'}">
+                                                        여
+                                                    </c:if>
+                                                </td>
+                                                <th>생년월일</th>
+                                                <td>
+                                                    <c:out value="${info.jumin}" />
+                                                </td>
+                                            </tr>
+                                            <tr>
+                                                <th>연락처</th>
+                                                <td>
+                                                    <c:out value="${info.patientPhone}" />
+                                                </td>
+                                                <th>보호자 연락처</th>
+                                                <td>
+                                                    <c:out value="${info.guardianPhone}" />
+                                                </td>
+                                            </tr>
+                                            <tr>
+                                                <th>증상시작일</th>
+                                                <td>
+                                                    <fmt:parseDate var="symptomStartDateTime" value="${info.symptomStartDate}" pattern="yyyy-MM-dd HH:mm" />
+                                                    <c:set var="symptomStartDate"><fmt:formatDate value="${symptomStartDateTime}" pattern="yyyy년 MM월 dd일" /></c:set>
+                                                    <c:out value="${symptomStartDate}" />
+                                                </td>
+                                                <th>확진일</th>
+                                                <td>
+                                                    <fmt:parseDate var="confirmationDateTime" value="${info.confirmationDate}" pattern="yyyy-MM-dd HH:mm" />
+                                                    <c:set var="confirmationDate"><fmt:formatDate value="${confirmationDateTime}" pattern="yyyy년 MM월 dd일" /></c:set>
+                                                    <c:out value="${confirmationDate}" />
+                                                </td>
+                                            </tr>
+                                            <tr>
+    <!--                                             <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>
+                                                </td>
+                                            </tr>
+                                            <tr>
+                                                <th>최근 약복용<br />(최근 24시간 이내)</th>
+                                                <td>
+                                                    <c:choose>
+                                                        <c:when test="${info.drugYn eq 'Y'}">복용 (<c:out value="${info.drugContent}" />)</c:when>
+                                                        <c:when test="${info.drugYn eq 'N'}">미복용</c:when>
+                                                        <c:otherwise></c:otherwise>
+                                                    </c:choose>
+                                                </td>
+                                                <th>임신</th>
+                                                <td>
+                                                    <c:choose>
+                                                        <c:when test="${info.pregnancyStatus eq 'N'}">무</c:when>
+                                                        <c:when test="${info.pregnancyStatus eq 'Y'}">유 (<c:out value="${info.pregnancyWeek}주차" />)</c:when>
+                                                        <c:otherwise></c:otherwise>
+                                                    </c:choose>
+                                                </td>
+                                            </tr>
+                                            <tr>
+                                                <th rowspan="2">기저질환 여부</th>
+                                                <td colspan="3">
+                                                    <c:choose>
+                                                        <c:when test="${info.basalDiseaseYn eq 'Y'}">유</c:when>
+                                                        <c:when test="${info.basalDiseaseYn eq 'N'}">무</c:when>
+                                                        <c:otherwise></c:otherwise>
+                                                    </c:choose>
+                                                </td>
+                                            </tr>
+                                            <tr>
+                                                <td colspan="3">
+    <%--                                                 <c:if test="${info.highBloodPressureCheck eq 'Y'}">, 고혈압</c:if> --%>
+    <%--                                                 <c:if test="${info.lowBloodPressureCheck eq 'Y'}">, 저혈압</c:if> --%>
+    <%--                                                 <c:if test="${info.organTransplantCheck eq 'Y'}">, 장기이식(신장, 간 등)</c:if> --%>
+    <%--                                                 <c:if test="${info.diabetesCheck eq 'Y'}">, 당뇨</c:if> --%>
+    <%--                                                 <c:if test="${info.respiratoryDiseaseCheck eq 'Y'}">, 호흡기질환</c:if> --%>
+    <%--                                                 <c:if test="${info.immunologicalDiseaseCheck eq 'Y'}">, 면역질환(류마티스 등)</c:if> --%>
+    <%--                                                 <c:if test="${info.heartDisease eq 'Y'}">, 심장질환</c:if> --%>
+    <%--                                                 <c:if test="${info.liverDisease eq 'Y'}">, 간질환</c:if> --%>
+    <%--                                                 <c:if test="${info.operation eq 'Y'}">, 수술(<c:out value="${info.operationContent}" />)</c:if> --%>
+    <%--                                                 <c:if test="${info.allergyCheck eq 'Y'}">, 알레르기</c:if> --%>
+    <%--                                                 <c:if test="${info.kidneyDisease eq 'Y'}">, 신장질환</c:if> --%>
+    <%--                                                 <c:if test="${info.cancerCheck eq 'Y'}">, 암(<c:out value="${info.cancerName}" />)</c:if> --%>
+    <%--                                                 <c:if test="${info.ectCheckDisease eq 'Y'}">, 기타(<c:out value="${info.etcContentDisease}" />)</c:if> --%>
+                                                    <c:out value="${disease}" />
+                                                </td>
+                                            </tr>
+                                            <tr>
+                                                <th>현재 증상<br />(입소 당시)</th>
+                                                <td colspan="3">
+    <%--                                                 <c:if test="${info.feverCheck eq 'Y'}">, 열감(열나는느낌)</c:if> --%>
+    <%--                                                 <c:if test="${info.coughCheck eq 'Y'}">, 기침</c:if> --%>
+    <%--                                                 <c:if test="${info.colic eq 'Y'}">, 복통(배아픔)</c:if> --%>
+    <%--                                                 <c:if test="${info.coldFitCheck eq 'Y'}">, 오한(추운 느낌)</c:if> --%>
+    <%--                                                 <c:if test="${info.sputumCheck eq 'Y'}">, 가래</c:if> --%>
+    <%--                                                 <c:if test="${info.ocinCheck eq 'Y'}">, 오심(구역질)</c:if> --%>
+    <%--                                                 <c:if test="${info.chestPain eq 'Y'}">, 흉통</c:if> --%>
+    <%--                                                 <c:if test="${info.noseCheck eq 'Y'}">, 콧물 또는 코 막힘</c:if> --%>
+    <%--                                                 <c:if test="${info.vomitingCheck eq 'Y'}">, 구토</c:if> --%>
+    <%--                                                 <c:if test="${info.musclePainCheck eq 'Y'}">, 근육통(몸살)</c:if> --%>
+    <%--                                                 <c:if test="${info.soreThroatCheck eq 'Y'}">, 인후통(목 아픔)</c:if> --%>
+    <%--                                                 <c:if test="${info.diarrheaCheck eq 'Y'}">, 설사</c:if> --%>
+    <%--                                                 <c:if test="${info.headacheCheck eq 'Y'}">, 두통(머리아픔)</c:if> --%>
+    <%--                                                 <c:if test="${info.dyspneaCheck eq 'Y'}">, 호흡곤란(숨가쁨)</c:if> --%>
+    <%--                                                 <c:if test="${info.fatigueCheck eq 'Y'}">, 권태감(피곤함)</c:if> --%>
+    <%--                                                 <c:if test="${info.ectCheckSymptom eq 'Y'}">, 기타(<c:out value="${info.etcContentSymptom}" />)</c:if> --%>
+                                                    <c:out value="${symptom}" />
+                                                </td>
+                                            </tr>
+                                            <tr>
+                                                <th>
+                                                    체온
+                                                </th>
+                                                <td>
+                                                    <c:out value="우측 ${info.feverRight}℃ /  좌측  ${info.feverRight}℃" />
+                                                </td>
+                                                <th>
+                                                    맥박수
+                                                </th>
+                                                <td>
+                                                    <c:out value="${info.pulseRate} 회/분" />
+                                                </td>
+                                            </tr>
+                                            <tr>
+                                                <th>
+                                                    호흡수
+                                                </th>
+                                                <td>
+                                                    <c:out value="${info.respirationRate} 회/분" />
+                                                </td>
+                                                <th>
+                                                    혈압
+                                                </th>
+                                                <td>
+                                                <c:out value="수축기 ${info.bloodPressureLevelCon} mmHg  /  이완기 ${info.bloodPressureLevelRel} mmHg" />
+                                                </td>
+                                            </tr>
+                                            <tr>
+                                                <th>
+                                                    산소포화도
+                                                </th>
+                                                <td colspan="3">
+                                                    <c:out value="${info.oxygenSaturation} %" />
+                                                </td>
+                                            </tr>
+                                        </table>
+                                        
+                                        <div class="row mt-3">
+                                            <div class="col-12">
+                                                <div class="text-right">
+                                                    <c:if test="${data._SES_GROUP_IDX eq '2'}">
+                                                        <button type="button" class="btn btn-danger w100" onclick="deleteConfirm();">삭제</button>
+                                                    </c:if>
+                                                    
+                                                    <c:if test="${data._SES_GROUP_IDX ne '1'}">
+                                                        <button type="button" class="btn btn-secondary w100" onclick="location.href='./edit?patientIdx=${patientIdx}';">수정</button>
+                                                    </c:if>
+                                                    
+                                                    <button type="button" class="btn btn-primary w100" onclick="location.href='./list';">확인</button>
+                                                </div>
                                             </div>
                                         </div>
-                                    </div>
+                                    </form>
                                 </div>
                             </div>
                         </div>

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

@@ -154,4 +154,50 @@ function getCookie(cookieName) {
         cookieValue = cookieData.substring(start, end);
     }
     return unescape(cookieValue);
+}
+function alertBox( obj ) {
+    var type  = "alert";
+    var title = "알림";
+    var txt   = "";
+    var callBack = function(){};
+    
+    console.log( "typeof obj : " + typeof obj );
+    
+    if( typeof obj == "object" ) {
+        if( typeof obj.type != "undefined" ) {
+            type = obj.type;
+        }
+        
+        if( typeof obj.title != "undefined" ) {
+            title = obj.title;
+        }
+        
+        if( typeof obj.txt != "undefined" ) {
+            txt = obj.txt;
+        }
+        
+        if( typeof obj.callBack == "function" ) {
+            callBack = obj.callBack;
+        }
+    }
+    
+    modal({
+        type: type,
+        title: title,
+        text: txt,
+        callback: function(result){
+            if( type == "confirm" ) {
+                if( result ) {
+                    callBack( result );
+                }
+            } else {
+                callBack();
+            }
+        },
+        buttonText: {
+            ok: '확인',
+            yes: 'Yes',
+            cancel: 'Cancel'
+        }
+    });
 }

+ 12 - 1
src/main/webapp/resources/js/mobile/common.js

@@ -276,7 +276,18 @@ function alertBox( obj ) {
         title: title,
         text: txt,
         callback: function(result){
-            callBack();
+            if( type == "confirm" ) {
+                if( result ) {
+                    callBack( result );
+                }
+            } else {
+                callBack();
+            }
+        },
+        buttonText: {
+            ok: '확인',
+            yes: 'Yes',
+            cancel: 'Cancel'
         }
     });
 }