<%@ 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>

<script type="text/javascript">

$( function(){
    $( "select.ymd-date" ).on( "change", function(){
        var hYear  = $( "#hYear" ).val();
        var hMonth = $( "#hMonth" ).val();
        var hDay   = $( "#hDay" ).val();

        hMonth = Number(hMonth) < 10 ? "0" + hMonth : hMonth;
        hDay   = Number(hDay) < 10   ? "0" + hDay   : hDay;

        $("#hYmd").val( hYear  + "-" + hMonth  + "-" + hDay );

    });

    $( ".select-date" ).on( "change", function(){
        var $this = $( this );
        var wrap  = $this.closest( "div.date" );
        
        var dateYear  = wrap.find( ".date-year" ).val();
        var dateMonth = wrap.find( ".date-month" ).val();
        var dateDay   = wrap.find( ".date-day" ).val();
        
        dateMonth = Number(dateMonth) < 10 ? "0" + dateMonth : dateMonth;
        dateDay   = Number(dateDay) < 10   ? "0" + dateDay   : dateDay;
        
        wrap.find( "input.error-box" ).val( dateYear  + "-" + dateMonth  + "-" + dateDay );
    });
});


</script>
</head>
<body>
    <div id="sub">
        <div class="container">
            <div class="header">
                <div class="previous">
                    <a href="javascript:;">이전</a>
                </div>
                <div class="title">
                    문진
                </div>
            </div>
            <div class="alert">
                생활치료센터 만족도 조사 
            </div>
            <c:set var="now" value="<%=new java.util.Date()%>" />
            <c:set var="sysYear"><fmt:formatDate value="${now}" pattern="yyyy" /></c:set>
            <div class="check_list" id="check_list1">
                <div class="part">
                    <div class="title">
                        1. 입원일을 입력 하세요.
                    </div>
                    <div class="date">
                        <div class="year">
                            <select class="custom-select select-date date-year">
                                  <option value="" selected="">년</option>
                                  <c:forEach var="y" begin="1940" end="${sysYear}" step="1">
                                      <option value="${y}">${y} 년</option>
                                  </c:forEach>
                            </select>
<!--                             <select> -->
<!--                                 <option>1900</option> -->
<!--                             </select> 년 -->
                        </div>
                        <div class="month">
<!--                             <input type="text" name=""> 월 -->
                            <select class="custom-select select-date date-month">
                                  <option value="" selected="">월</option>
                                  <c:forEach var="m" begin="1" end="12" step="1">
                                      <option value="${m}">${m} 월</option>
                                  </c:forEach>
                            </select>
                        </div>
                        <div class="day">
<!--                             <input type="text" name=""> 일 -->
                            <select class="custom-select select-date date-day">
                                  <option value="" selected="">일</option>
                                  <c:forEach var="d" begin="1" end="31" step="1">
                                      <option value="${d}">${d} 일</option>
                                  </c:forEach>
                            </select>
                        </div>
                    <input type="text" class="error-box" id="hYmd" name="hYmd" required>
                    </div>
                </div>
                <div class="part">
                    <div class="title">
                        2. 코로나 19 확진일을 입력 하세요
                    </div>
                    <div class="date">
                        <div class="year">
                            <select class="custom-select " id="cvYear">
                                  <option value="" selected="">년</option>
                                  <c:forEach var="y" begin="1940" end="${sysYear}" step="1">
                                      <option value="${y}">${y} 년</option>
                                  </c:forEach>
                            </select>
                        </div>
                        <div class="month">
<!--                             <input type="text" name=""> 월 -->
                            <select class="custom-select" id="cvMonth" >
                                  <option value="" selected="">월</option>
                                  <c:forEach var="m" begin="1" end="12" step="1">
                                      <option value="${m}">${m} 월</option>
                                  </c:forEach>
                            </select>
                        </div>
                        <div class="day">
<!--                             <input type="text" name=""> 일 -->
                            <select class="custom-select" id="cvDay">
                                  <option value="" selected="">일</option>
                                  <c:forEach var="d" begin="1" end="31" step="1">
                                      <option value="${d}">${d} 일</option>
                                  </c:forEach>
                            </select>
                        </div>
                        <input type="text" class="error-box" id="cvYmd" name="cvYmd" required>
                    </div>
                </div>
                <div class="part">
                    <div class="title">
                        3. 증상 시작일을 입력 하세요.
                    </div>
                    <div class="date">
                        <div class="year">
                            <select>
                                <option>1900</option>
                            </select> 년
                        </div>
                        <div class="month">
                            <input type="text" name=""> 월
                        </div>
                        <div class="day">
                            <input type="text" name=""> 일
                        </div>
                    </div>
                </div>
                <div class="part">
                    <div class="title">
                        4. 성별을 입력하세요.
                    </div>
                    <div class="list">
                        <ul class="circle half">
                            <li>
                                <input type="radio" id="a1" name="aa" />
                                <label for="a1"><span></span>남</label>
                            </li>
                            <li>
                                <input type="radio" id="a2" name="aa" />
                                <label for="a2"><span></span>여</label>
                            </li>
                        </ul>
                    </div>
                </div>
                <div class="part">
                    <div class="title">
                        5. 생년월일을 입력 하세요
                    </div>
                    <div class="date">
                        <div class="year">
                            <select>
                                <option>1900</option>
                            </select> 년
                        </div>
                        <div class="month">
                            <input type="text" name=""> 월
                        </div>
                        <div class="day">
                            <input type="text" name=""> 일
                        </div>
                    </div>
                </div>
                <div class="part">
                    <div class="title">
                        6. 기저질환 여부를 체크하세요.
                    </div>
                    <div class="list">
                        <ul class="circle half">
                            <li>
                                <input type="radio" id="b1" name="bb" />
                                <label for="b1"><span></span>예</label>
                            </li>
                            <li>
                                <input type="radio" id="b2" name="bb" />
                                <label for="b2"><span></span>아니오</label>
                            </li>
                        </ul>
                    </div>
                </div>
                <div class="part">
                    <div class="title">
                        7. 6번의 ”예“인 경우 해당되는 기저질환을 모두 체크해주세요
                        <span class="mini">(만일 ”아니오“ 경우에는 입력하지 마세요)</span>
                    </div>
                    <div class="list">
                        <ul class="circle half">
                            <li>
                                <input type="radio" id="c1" name="cc" />
                                <label for="c1"><span></span>고혈압</label>
                            </li>
                            <li>
                                <input type="radio" id="c2" name="cc" />
                                <label for="c2"><span></span>저혈압</label>
                            </li>
                            <li>
                                <input type="radio" id="c3" name="cc" />
                                <label for="c3"><span></span>장기이식(신장,간등)</label>
                            </li>
                            <li>
                                <input type="radio" id="c4" name="cc" />
                                <label for="c4"><span></span>당뇨병</label>
                            </li>
                            <li>
                                <input type="radio" id="c5" name="cc" />
                                <label for="c5"><span></span>호흡기질환</label>
                            </li>
                            <li>
                                <input type="radio" id="c6" name="cc" />
                                <label for="c6"><span></span>면역질환(류마티스 등)</label>
                            </li>
                            <li>
                                <input type="radio" id="c7" name="cc" />
                                <label for="c8"><span></span>심장질환</label>
                            </li>
                            <li>
                                <input type="radio" id="c9" name="cc" />
                                <label for="c9"><span></span>간질환</label>
                            </li>
                            <li>
                                <input type="radio" id="c10" name="cc" />
                                <label for="c10"><span></span>수술</label>
                            </li>
                            <li>
                                <input type="radio" id="c11" name="cc" />
                                <label for="c11"><span></span>알레르기</label>
                            </li>
                            <li>
                                <input type="radio" id="c11" name="cc" />
                                <label for="c11"><span></span>암</label>
                            </li>
                            <li class="full">
                                <input type="radio" id="c12" name="cc" />
                                <label for="c12"><span></span>기타</label>
                                <div class="comment">
                                    <input type="text" placeholder="기타 증상 및 암명/수술명을 입력하세요.">
                                </div>
                            </li>
                        </ul>
                    </div>
                </div>
                <div class="part">
                    <div class="title">
                        8. 현재 증상을 체크하세요 
                        <span class="mini">(모두 체크하세요)</span>
                    </div>
                    <div class="list">
                        <ul class="circle half">
                            <li>
                                <input type="checkbox" id="d1" name="dd" />
                                <label for="d1"><span></span>열감(열나는 느낌)</label>
                            </li>
                            <li>
                                <input type="checkbox" id="d2" name="dd" />
                                <label for="d2"><span></span>기침</label>
                            </li>
                            <li>
                                <input type="checkbox" id="d3" name="dd" />
                                <label for="d3"><span></span>복통(배아픔)</label>
                            </li>
                            <li>
                                <input type="checkbox" id="d4" name="dd" />
                                <label for="d4"><span></span>오한(추운 느낌)</label>
                            </li>
                            <li>
                                <input type="checkbox" id="d5" name="dd" />
                                <label for="d5"><span></span>가래</label>
                            </li>
                            <li>
                                <input type="checkbox" id="d6" name="dd" />
                                <label for="d6"><span></span>오심(구역질)</label>
                            </li>
                            <li>
                                <input type="checkbox" id="d7" name="dd" />
                                <label for="d7"><span></span>흉통(가슴 통증)</label>
                            </li>
                            <li>
                                <input type="checkbox" id="d8" name="dd" />
                                <label for="d8"><span></span>콧물 또는 코 막힘</label>
                            </li>
                            <li>
                                <input type="checkbox" id="d9" name="dd" />
                                <label for="d9"><span></span>구토</label>
                            </li>
                            <li>
                                <input type="checkbox" id="d10" name="dd" />
                                <label for="d10"><span></span>근육통(몸살)</label>
                            </li>
                            <li>
                                <input type="checkbox" id="d11" name="dd" />
                                <label for="d11"><span></span>인후통(목 아픔)</label>
                            </li>
                            <li>
                                <input type="checkbox" id="d12" name="dd" />
                                <label for="d12"><span></span>설사</label>
                            </li>
                            <li>
                                <input type="checkbox" id="d13" name="dd" />
                                <label for="d13"><span></span>두통(머리아픔)</label>
                            </li>
                            <li>
                                <input type="checkbox" id="d14" name="dd" />
                                <label for="d14"><span></span>호흡곤란(숨 가쁨)</label>
                            </li>
                            <li>
                                <input type="checkbox" id="d15" name="dd" />
                                <label for="d15"><span></span>권태감(피곤함)</label>
                            </li>
                            <li class="full">
                                <input type="checkbox" id="d16" name="dd" />
                                <label for="d16"><span></span>기타</label>
                                <div class="comment">
                                    <input type="text" placeholder="기타 증상 및 암명/수술명을 입력하세요.">
                                </div>
                            </li>
                        </ul>
                    </div>
                </div>
                <div class="part">
                    <div class="title">
                        9. 체온을 입력하세요.
                    </div>
                    <div class="data">
                        <label class="inline">
                            우측 ( <input type="text" name=""> ) ℃
                        </label>
                        <label class="inline">
                            좌측 ( <input type="text" name=""> ) ℃
                        </label>
                    </div>
                </div>
                <div class="part">
                    <div class="title">
                        10. 맥박수를 입력하세요.
                    </div>
                    <div class="data">
                        <label class="inline">
                            ( <input type="text" name=""> ) 회/분
                        </label>
                    </div>
                </div>
                <div class="part">
                    <div class="title">
                        11. 호흡수를 입력하세요.
                    </div>
                    <div class="data">
                        <label class="inline">
                            ( <input type="text" name=""> ) 회/분
                        </label>
                    </div>
                </div>
                <div class="part">
                    <div class="title">
                        12. 혈압을 입력하세요.
                    </div>
                    <div class="data">
                        <label class="inline">
                            수축기( <input type="text" name=""> )mmHg
                        </label>
                        <label class="inline">
                            이완기( <input type="text" name=""> )mmHg
                        </label>
                    </div>
                </div>
                <div class="part">
                    <div class="title">
                        13. 산소포화도를 입력하세요.
                    </div>
                    <div class="data">
                        <label class="inline">
                            ( <input type="text" name=""> )%
                        </label>
                    </div>
                </div>
                <div class="part">
                    <div class="title">
                        14. 최근 24시간 이내 약 복용 여부를 체크하세요.
                    </div>
                    <div class="list">
                        <ul class="circle half">
                            <li>
                                <input type="radio" id="e1" name="ee" />
                                <label for="e1"><span></span>예</label>
                            </li>
                            <li>
                                <input type="radio" id="e2" name="ee" />
                                <label for="e2"><span></span>아니오</label>
                            </li>
                        </ul>
                    </div>
                </div>
                <div class="part">
                    <div class="title">
                        15. 14번의 ”예“인 경우 약명을 입력 하세요
                        <span class="mini">(만일 ”아니오“ 경우에는 입력하지 마세요)</span>
                    </div>
                    <div class="data">
                        <label class="inline">
                            약명 ( <input type="text" name=""> )
                        </label>
                    </div>
                </div>
                <div class="part">
                    <div class="title">
                        16. 임신 여부를 체크하세요.
                    </div>
                    <div class="list">
                        <ul class="circle half">
                            <li>
                                <input type="radio" id="f1" name="ff" />
                                <label for="f1"><span></span>예</label>
                            </li>
                            <li>
                                <input type="radio" id="f2" name="ff" />
                                <label for="f2"><span></span>아니오</label>
                            </li>
                        </ul>
                    </div>
                </div>
                <div class="part">
                    <div class="title">
                        17. 16번의 ”예“인 경우 임신 주차를 입력 하세요
                        <span class="mini">(만일 ”아니오“ 경우에는 입력하지 마세요)</span>
                    </div>
                    <div class="data">
                        <label class="inline">
                            임신 주차 ( <input type="text" name=""> ) 주
                        </label>
                    </div>
                </div>
            </div>
            
            <div class="btn_group">
                <ul>
                    <li>
                        <a href="javascript:;" class="confirm">제출</a>
                    </li>
                </ul>
            </div>
        </div>
    </div>
</body>
</html>