<%@page import="com.dbs.mplus.MPlusConstants"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="s" uri="http://www.springframework.org/tags"%>
<%
response.setHeader("Cache-Control","no-store");
response.setHeader("Pragma","no-cache");
response.setDateHeader("Expires",0);
if (request.getProtocol().equals("HTTP/1.1")){	
        response.setHeader("Cache-Control", "no-cache");
}
%>
<meta property="og:type" content="website" />
<meta property="og:title" content="M-Care Plus" />
<meta property="og:description" content="M-Care Plus 서비스입니다." />
<meta name="format-detection" content="telephone=no" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=3.0" />
<!-- <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> -->
<meta http-equiv="Expires" content="0" />
<meta http-equiv="Cache-Control" content="no-cache" />
<meta http-equiv="Pragma" content="no-cache" />
<link rel="shortcut icon" href="<c:url value="/resources/css/images/favicon.ico" />" />

<html>
	<body>
	<div class="modal" id="sortModal" tabindex="-1" role="dialog" aria-labelledby="modalLabel" style="display: none; z-index: 1050">
		<div class="modal-dialog" role="document">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"
						aria-label="Close">
						<span aria-hidden="true">&times;</span>
					</button>
					<h4 class="modal-title" id="modalLabel">정렬 방법</h4>
				</div>
				<div class="modal-body">
					<div id="" class="modal-btn mb10">
						<div class="col-xs-2"></div>
						<div class="col-xs-4 radio3 radio-check pd0">
							<input type="radio" id="sortRadio1" checked name="sortRadio" value="up">
							<label for="sortRadio1">오름차순</label>
						</div>
						<div class="col-xs-4 radio3 radio-check pd0">
							<input type="radio" id="sortRadio2" name="sortRadio" value="down"> <label
								for="sortRadio2">내림차순</label>
						</div>
						<div class="col-xs-2"></div>
					</div>

					<select class="form-control" id="sltSort">
					</select>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-style-1" id="sortConfirmBtn">확인</button>
					<button type="button" class="btn btn-style-2" data-dismiss="modal">취소</button>
				</div>
			</div>
		</div>
	</div>
	
	<div class="modal" id="settingModal" tabindex="-1" role="dialog" aria-labelledby="modalLabel" style="display: none; z-index: 1050">
		<div class="modal-dialog" role="document">
			<div class="modal-content">
				<div class="modal-header">
			        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
			        <h4 class="modal-title" id="modalLabel"> 부서를 선택해 주세요</h4>
			      </div>
			      <div class="modal-body">
					    <div id="settingDeptList">
							<div class="radio3 radio-check">
								<input type="radio" id="radio-1"  checked name="deptRadio">
				                <label for="radio-1">내과</label>
							</div>
							 <div class="radio3 radio-check">
								<input type="radio" id="radio-2" name="deptRadio">
				                <label for="radio-2">소화기센터</label>
							</div>
							 <div class="radio3 radio-check">
								<input type="radio" id="radio-3" name="deptRadio">
				                <label for="radio-3">암센터</label>
							</div>
							<div class="radio3 radio-check">
								<input type="radio" id="radio-1"  checked name="deptRadio">
				                <label for="radio-1">내과</label>
							</div>
							 <div class="radio3 radio-check">
								<input type="radio" id="radio-2" name="deptRadio">
				                <label for="radio-2">소화기센터</label>
							</div>
							 <div class="radio3 radio-check">
								<input type="radio" id="radio-3" name="deptRadio">
				                <label for="radio-3">암센터</label>
							</div>
							<div class="radio3 radio-check">
								<input type="radio" id="radio-1"  checked name="deptRadio">
				                <label for="radio-1">내과</label>
							</div>
							 <div class="radio3 radio-check">
								<input type="radio" id="radio-2" name="deptRadio">
				                <label for="radio-2">소화기센터</label>
							</div>
							 <div class="radio3 radio-check">
								<input type="radio" id="radio-3" name="deptRadio">
				                <label for="radio-3">암센터</label>
							</div>
							<div class="radio3 radio-check">
								<input type="radio" id="radio-1"  checked name="deptRadio">
				                <label for="radio-1">내과</label>
							</div>
							 <div class="radio3 radio-check">
								<input type="radio" id="radio-2" name="deptRadio">
				                <label for="radio-2">소화기센터</label>
							</div>
							 <div class="radio3 radio-check">
								<input type="radio" id="radio-3" name="deptRadio">
				                <label for="radio-3">암센터</label>
							</div>
							<div class="radio3 radio-check">
								<input type="radio" id="radio-1"  checked name="deptRadio">
				                <label for="radio-1">내과</label>
							</div>
							 <div class="radio3 radio-check ">
								<input type="radio" id="radio-2" name="deptRadio">
				                <label for="radio-2">소화기센터</label>
							</div>
							 <div class="radio3 radio-check ">
								<input type="radio" id="radio-3" name="deptRadio">
				                <label for="radio-3">암센터</label>
							</div>
							<div class="radio3 radio-check">
								<input type="radio" id="radio-1"  checked name="deptRadio">
				                <label for="radio-1">내과</label>
							</div>
							 <div class="radio3 radio-check ">
								<input type="radio" id="radio-2" name="deptRadio">
				                <label for="radio-2">소화기센터</label>
							</div>
							 <div class="radio3 radio-check ">
								<input type="radio" id="radio-3" name="deptRadio">
				                <label for="radio-3">암센터</label>
							</div>
							<div class="radio3 radio-check">
								<input type="radio" id="radio-1"  checked name="deptRadio">
				                <label for="radio-1">내과</label>
							</div>
							 <div class="radio3 radio-check ">
								<input type="radio" id="radio-2" name="deptRadio">
				                <label for="radio-2">소화기센터</label>
							</div>
							 <div class="radio3 radio-check ">
								<input type="radio" id="radio-3" name="deptRadio">
				                <label for="radio-3">암센터</label>
							</div>
							<div class="radio3 radio-check">
								<input type="radio" id="radio-1"  checked name="deptRadio">
				                <label for="radio-1">내과</label>
							</div>
							 <div class="radio3 radio-check ">
								<input type="radio" id="radio-2" name="deptRadio">
				                <label for="radio-2">소화기센터</label>
							</div>
							 <div class="radio3 radio-check ">
								<input type="radio" id="radio-3" name="deptRadio">
				                <label for="radio-3">암센터</label>
							</div>
							<div class="radio3 radio-check">
								<input type="radio" id="radio-1"  checked name="deptRadio">
				                <label for="radio-1">내과</label>
							</div>
							 <div class="radio3 radio-check ">
								<input type="radio" id="radio-2" name="deptRadio">
				                <label for="radio-2">소화기센터</label>
							</div>
							 <div class="radio3 radio-check ">
								<input type="radio" id="radio-3" name="deptRadio">
				                <label for="radio-3">암센터</label>
							</div>
						</div>
			      </div>
				<div class="modal-footer">
					<button type="button" class="btn btn-style-1" id="btnSaveSettingModal">저장</button>
					<button type="button" class="btn btn-style-2" data-dismiss="modal">취소</button>
				</div>
			</div>
		</div>
	</div>

		<div class="modal" tabindex="-1" role="dialog" id="mplusAlert" style="display: none; z-index: 1051">
			<div class="modal-dialog" role="document">
			  <div class="modal-content">
			    <div class="modal-header">
			      <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
			      <h4 class="modal-title">알림</h4>
			    </div>
			    <div class="modal-body">
			    </div>
			    <div class="modal-footer">
			      <button type="button" class="btn btn-style-1 alertBtn" data-dismiss="modal">확인</button>
			    </div>
			  </div>
			</div>
		</div>
		
		<div class="modal" tabindex="-1" role="dialog" id="mplusConfirm" style="display: none; z-index: 1050">
			<div class="modal-dialog" role="document">
			  <div class="modal-content">
			    <div class="modal-header">
			      <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
			      <h4 class="modal-title">알림</h4>
			    </div>
			    <div class="modal-body">
			    </div>
			    <div class="modal-footer">
			      <button type="button" class="btn btn-style-1 popupCallback confirmBtn">확인</button>
			      <button type="button" class="btn btn-style-2 popupCancel confirmBtn" data-dismiss="modal">취소</button>
			    </div>
			  </div>
			</div>
		</div>
		
		<div class="wrap-loading" style="display: none" id="wrapLoding">
		    <div class="loader"></div>
		</div>
		
		<!-- 간호입력 팝업 -->
		<div id="nursingPopup">			
			<div id="popContentNursingRecode" class="popup-content" style="display: none; position: relative">
			  <!-- Nav tabs -->
			  <ul class="nav nav-tabs nav-tabs-custom" role="tablist" id="nursingRecodeTab">
			    <li role="presentation" class="active"><a href="#tabInfo" aria-controls="tabInfo" role="tab" data-toggle="tab">정보</a></li>
			    <li role="presentation"><a href="#tabHistory" aria-controls="tabHistory" role="tab" data-toggle="tab">이력</a></li>
			    <li role="presentation"><a href="#tabVital" aria-controls="tabVital" role="tab" data-toggle="tab">임상관찰</a></li>
				<li role="presentation"><a href="#tabInject" aria-controls="tabInject" role="tab" data-toggle="tab">투약</a></li>
				<!-- <li role="presentation"><a href="#tabCure" aria-controls="tabCure" role="tab" data-toggle="tab">투약실시</a></li> -->
			  </ul>
			
			  <!-- Tab panes -->
			  <div class="tab-content" style="position: relative">
			    <div role="tabpanel" class="tab-pane active" id="tabInfo">
			    	<!-- <div class="patient-detail" id="infoPatientDetail">
			    		<div class="patient-detail-item">!</div>
			    		<div class="patient-detail-item">￦</div>
			    		<div class="patient-detail-item">V</div>
			    		<div class="patient-detail-item">E</div>
			    		<div class="patient-detail-item selected">R</div>
			    		<div class="patient-detail-item">A</div>
			    		<div class="patient-detail-item">I</div>
			    		<div class="patient-detail-item selected">C</div>
			    		<div class="patient-detail-item">S</div>
			    		<div class="patient-detail-item">M</div>
			    	</div>
			    	<div class="patient-detail-txt mb10" id="infoPatientDetailTxt" style="display:none;">
			    	I 감염<br>
			    	&emsp;접촉 / 매독 / 20140801<br>
			    	&emsp;혈액 / 매독 / 20150610 / 혈액조심, 필요시 개인보호구, 주사침 찔림 조심, 안전주사기 사용, 환자 및 보호자 교육
			    	</div> -->
			    	<table class="info-style mt10">
						<tbody>
							<tr style="display: none">
								<th>ID</th>
								<td id="nursingPopupId"></td>
							</tr>
							<tr>
								<th>성명/등록번호</th>
								<td id="nursingPopupNameNum"></td>
							</tr>
							<tr>
								<th>생년월일</th>
								<td id="nursingPopupBirth"></td>
							</tr>
							<tr>
								<th>성별 / 나이</th>
								<td id="nursingPopupSex"></td>
							</tr>
							<tr>
								<th>병동/병실/병상</th>
								<td id="nursingPopupRoom"></td>
							</tr>
							<tr>
								<th>진단명</th>
								<td id="nursingDiagnosisNm"></td>
							</tr>
							<tr>
								<th>수술일</th>
								<td id="nursingOperatingDt"></td>
							</tr>
							<tr>
								<th>수술명</th>
								<td id="nursingOperatingNm"></td>
							</tr>
							<tr>
								<th>입원일</th>
								<td id="nursingInDt"></td>
							</tr>
							<tr>
								<th>입원사유</th>
								<td id="nursingInRsn"></td>
							</tr>
							<tr>
								<th>현재질병상태</th>
								<td id="nursingCurrentStat"></td>
							</tr>
						</tbody>
					</table>
			    </div>
			    <!-- 이력 시작 -->
			    <div role="tabpanel" class="tab-pane" id="tabHistory">
			    	<div class="col-xs-12 mt10 mb5 history-comment text-center">
			    		※ 이력은 1개월 단위로 조회됩니다. (<span>∨</span> : 더보기 , <span>∧</span> : 접기)
			    	</div>
			    	<div class="col-xs-12 mt10 mb5">
						<strong class="title-bg">외래</strong>
						<span id="outSearchDt" class="history-date"></span>
					</div>
					<div id="historyOut" class="col-xs-12 history-list">
						<div class="history-item col-xs-12">
							<div class="col-xs-4 col-sm-3 pdl0">
								<strong>2017-01-28</strong>
							</div>
							<div class="col-xs-8 col-sm-4 pd0">
								내분비내과 김길동
							</div>
							<div class="col-xs-4 pd0">
							</div>
							<div class="col-xs-8 col-sm-5 pd0">
								갑상선
							</div>
						</div>
						<div class="history-item col-xs-12">
							<div class="col-xs-4 col-sm-3 pdl0">
							<strong>2017-01-28</strong>
							</div>
							<div class="col-xs-8 col-sm-4 pd0">
							내분비내과 김길동
							</div>
							<div class="col-xs-4 pd0">
							</div>
							<div class="col-xs-8 col-sm-5 pd0">
							갑상선
							</div>
						</div>
						<div class="col-xs-6 history-more text-center" id="historyOutMore">
							<span class="glyphicon glyphicon-menu-down" aria-hidden="true"></span>
						</div>
						<div class="col-xs-6 history-more text-center" id="historyOutClose">
							<span class="glyphicon glyphicon-menu-up" aria-hidden="true"></span>
						</div>
					</div>
					<div class="col-xs-12 mt10 mb5">
						<strong class="title-bg">입원</strong>
						<span id="inSearchDt" class="history-date"></span>
					</div>
					<div id="historyIn" class="col-xs-12 history-list">
						<div class="history-item col-xs-12">
							<div class="col-xs-4 col-sm-3 pdl0">
							<strong>2017-01-28 ~ 08-10</strong>
							</div>
							<div class="col-xs-8 col-sm-4 pd0">
							내분비내과 김길동 55/1501/01
							</div>
							<div class="col-xs-4 pd0">
							</div>
							<div class="col-xs-8 col-sm-5 pd0">
							Pain in joint
							</div>
						</div>
						<div class="history-item col-xs-12">
							<div class="col-xs-4 col-sm-3 pdl0">
							<strong>2017-01-28 ~ 08-10</strong>
							</div>
							<div class="col-xs-8 col-sm-4 pd0">
							내분비내과 김길동 55/1501/01
							</div>
							<div class="col-xs-4 pd0">
							</div>
							<div class="col-xs-8 col-sm-5 pd0">
							Pain in joint
							</div>
						</div>
						<div class="col-xs-6 history-more text-center" id="historyInMore">
							<span class="glyphicon glyphicon-menu-down" aria-hidden="true"></span>
						</div>
						<div class="col-xs-6 history-more text-center" id="historyInClose">
							<span class="glyphicon glyphicon-menu-up" aria-hidden="true"></span>
						</div>
					</div>
					<div class="col-xs-12 mt10 mb5">
						<strong class="title-bg">수술</strong>
						<span id="opSearchDt" class="history-date"></span>
					</div>
					<div id="historyOp" class="col-xs-12 history-list">
						<div class="history-item col-xs-12 op-bg">
							<div class="col-xs-4 col-sm-3 pdl0">
							<strong>2017-01-28</strong>
							</div>
							<div class="col-xs-8 col-sm-4 pd0">
							Paint in joint, Arthroscopy of shoulder
							</div>
							<div class="col-xs-4 pd0">
							</div>
							<div class="col-xs-8 col-sm-5 pd0">
							정형외과 이길동
							</div>
						</div>
						<div class="history-item col-xs-12">
							<div class="col-xs-4 col-sm-3 pdl0">
							<strong>2017-01-28</strong>
							</div>
							<div class="col-xs-8 col-sm-4 pd0">
							Paint in joint, Arthroscopy of shoulder
							</div>
							<div class="col-xs-4 pd0">
							</div>
							<div class="col-xs-8 col-sm-5 pd0">
							정형외과 이길동
							</div>
						</div>
						<div class="col-xs-6 history-more text-center" id="historyOpMore">
							<span class="glyphicon glyphicon-menu-down" aria-hidden="true"></span>
						</div>
						<div class="col-xs-6 history-more text-center" id="historyOpClose">
							<span class="glyphicon glyphicon-menu-up" aria-hidden="true"></span>
						</div>
					</div>
				</div>
			    <!-- 임상 시작 -->
			    <div role="tabpanel" class="tab-pane" id="tabVital">
			    	<div id="vitalSearch">
			    		<div class="col-xs-12">
							<div class="col-xs-2"></div>
							<div class="col-xs-8 text-center mt5">
								<span class="vital-prev-day glyphicon glyphicon-triangle-left" aria-hidden="true"></span>
								<span id="vitalSearchDate">2017-09-19</span>
								<span class="vital-next-day glyphicon glyphicon-triangle-right" aria-hidden="true"></span>
							</div>
							<div class="col-xs-2 mb10 text-right">
								<button type="button" class="btn btn-style-1 btn-sm" id="btnInputVital">입력
								</button>
							</div>
						</div>
						
						<!-- 달력 선택 할 수 있게 해달라고 하면 아래 내용 이용하기 (쫌 이상할 수 있음..) -->
				    	<%-- <div class="col-xs-3 pd0 text-right clinic_prev_day">
							<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
						</div>
						<div class="col-xs-6">
							<input type="date" class="form-control" id="clinic_searchDate" required="required">
						</div>
						<div class="col-xs-3 pd0 text-left clinic-next-day">
							<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
						</div> --%>									
				    	<table id="vitalTable" class="table table-condensed text-center">
						  <thead>
						  	<tr>
						  		<th class="text-center">시간</th>
						  		<th class="text-center">맥박</th>
						  		<th class="text-center">호흡</th>
						  		<th class="text-center">체온</th>
						  		<th class="text-center">SBP</th>
						  		<th class="text-center">DBP</th>
						  		<th class="text-center">SpO<sub>2</sub></th>
						  	</tr>
						  </thead>
						  <tbody id="vitalList">	  								  								  	
						  </tbody>
						</table>			
					</div>
					<div id="vitalInfo" style="display: none">
						<div class="col-xs-12">
							<div class="col-xs-10 pd0">
								<div class="col-xs-12">
										<div id="vitalEnteredTm" class="top-info-style" style="display:none"><span class="mp-dot"></span><span class="content"></span></div>
										<div id="inputEnteredTm">입력일자 : <input id="enterDateTime" type="text"></div>
								</div>
							</div>
							<div class="col-xs-2 text-right pd0">
								<button type="button" class="btn btn-style-1 btn-sm" id="btnSearchVital">조회
								</button>
							</div>  
						</div>
						<!-- 임상 슬라이더 시작 -->
						<div class="col-xs-12 pd0 mt10 mb5">
							<div class="col-xs-3 col-sm-2">
								<div class="checkbox3  checkbox-check checkbox-light vital-checkbox ">
			                        <input type="checkbox" id="pulseCheck" value="pulse" data-itemCd="1000500001">
			                        <label for="pulseCheck">맥박
			                        </label>
			                   </div>
							</div>
							<div class="col-xs-4 col-sm-3 pd0">
							    <div class="input-group input-group-white">
							      <input type="number" class="form-control input-sm vital-value" id="txtPulse" placeholder="맥박" data-itemCd="1000500001">
							      <div class="input-group-addon">회</div>					      					      
							    </div>
							</div>
						</div>
						<div class="col-xs-12 mb5">
							<div class="col-xs-2 pdr0 text-right btn-slider-area">
								<button type="button" class="btn btn-sm btn-slider" aria-label="Left Align" id="btnMinusPulse">
								  <span class="glyphicon glyphicon glyphicon-minus" aria-hidden="true"></span>
								</button>
							</div>
							<div class="col-xs-8 pd0">
								<input id="sliderPulse" data-slider-id='sliderPulse' type="text" 
									data-slider-min="0" data-slider-max="200" data-slider-step="1" data-slider-tooltip="hide" data-slider-enabled="false"/>
							</div>
							<div class="col-xs-2 pdl0 btn-slider-area">
								<button type="button" class="btn btn-sm btn-slider" aria-label="Left Align" id="btnPlusPulse">
								  <span class="glyphicon glyphicon glyphicon-plus" aria-hidden="true"></span>
								</button>
							</div>
						</div>
						<div class="col-xs-12 pd0 mt10 mb5">
							<div class="col-xs-3 col-sm-2">
								<div class="checkbox3  checkbox-check checkbox-light vital-checkbox ">
			                        <input type="checkbox" id="breathCheck" value="breath" data-itemCd="1000600001">
			                        <label for="breathCheck">호흡
			                        </label>
			                   </div>
							</div>
							<div class="col-xs-4 col-sm-3 pd0">
							    <div class="input-group input-group-white">
							      <input type="number" class="form-control input-sm vital-value" id="txtBreath" placeholder="호흡" data-itemCd="1000600001">
							      <div class="input-group-addon">회</div>							      
							    </div>
							</div>
						</div>
						<div class="col-xs-12 mb5">
							<div class="col-xs-2 pdr0 text-right btn-slider-area">
								<button type="button" class="btn btn-sm btn-slider" aria-label="Left Align" id="btnMinusBreath">
								  <span class="glyphicon glyphicon glyphicon-minus" aria-hidden="true"></span>
								</button>
							</div>
							<div class="col-xs-8 pd0">
								<input id="sliderBreath" data-slider-id='sliderBreath' type="text" 
									data-slider-min="0" data-slider-max="100" data-slider-step="1" data-slider-tooltip="hide" data-slider-enabled="false"/>
							</div>
							<div class="col-xs-2 pdl0 btn-slider-area">
								<button type="button" class="btn btn-sm btn-slider" aria-label="Left Align" id="btnPlusBreath">
								  <span class="glyphicon glyphicon glyphicon-plus" aria-hidden="true"></span>
								</button>
							</div>
						</div>
						<div class="col-xs-12 pd0 mt10 mb5">
							<div class="col-xs-3 col-sm-2">
								<div class="checkbox3  checkbox-check checkbox-light vital-checkbox ">
			                        <input type="checkbox" id="temperatureCheck" value="temperature" data-itemCd="1000700001">
			                        <label for="temperatureCheck">체온
			                        </label>
			                   </div>
							</div>
							<div class="col-xs-4 col-sm-3 pd0">
							    <div class="input-group input-group-white">
							      <input type="number" class="form-control input-sm vital-value" id="txtTemperature" placeholder="체온" data-itemCd="1000700001">
							      <div class="input-group-addon">℃</div>					      					      
							    </div>
							</div>
						</div>
						<div class="col-xs-12 mb5">
							<div class="col-xs-2 pdr0 text-right btn-slider-area">
								<button type="button" class="btn btn-sm btn-slider" aria-label="Left Align" id="btnMinusTemperature">
								  <span class="glyphicon glyphicon glyphicon-minus" aria-hidden="true"></span>
								</button>
							</div>
							<div class="col-xs-8 pd0">
								<input id="sliderTemperature" data-slider-id='sliderTemperature' type="text" 
									data-slider-min="30" data-slider-max="45" data-slider-step="0.1" data-slider-tooltip="hide" data-slider-enabled="false"/>
							</div>
							<div class="col-xs-2 pdl0 btn-slider-area">
								<button type="button" class="btn btn-sm btn-slider" aria-label="Left Align" id="btnPlusTemperature">
								  <span class="glyphicon glyphicon glyphicon-plus" aria-hidden="true"></span>
								</button>
							</div>
						</div>
						<div class="col-xs-12 pd0 mt10 mb5">
							<div class="col-xs-3 col-sm-2">
								<div class="checkbox3  checkbox-check checkbox-light vital-checkbox ">
			                        <input type="checkbox" id="maxBpsCheck" value="maxBps" data-itemCd="1000800001">
			                        <label for="maxBpsCheck">SBP
			                        </label>
			                   </div>
							</div>
							<div class="col-xs-4 col-sm-3 pd0">
							    <div class="input-group input-group-white">
							      <input type="number" class="form-control input-sm vital-value" id="txtMaxBps" placeholder="최고혈압" data-itemCd="1000800001">
							      <div class="input-group-addon">mmHg</div>					      
							    </div>
							</div>
						</div>
						<div class="col-xs-12 mb5">
							<div class="col-xs-2 pdr0 text-right btn-slider-area">
								<button type="button" class="btn btn-sm btn-slider" aria-label="Left Align" id="btnMinusMaxBps">
								  <span class="glyphicon glyphicon glyphicon-minus" aria-hidden="true"></span>
								</button>
							</div>
							<div class="col-xs-8 pd0">
								<input id="sliderMaxBps" data-slider-id='sliderMaxBps' type="text" 
									data-slider-min="20" data-slider-max="200" data-slider-step="1" data-slider-tooltip="hide" data-slider-enabled="false"/>
							</div>
							<div class="col-xs-2 pdl0 btn-slider-area">
								<button type="button" class="btn btn-sm btn-slider" aria-label="Left Align" id="btnPlusMaxBps">
								  <span class="glyphicon glyphicon glyphicon-plus" aria-hidden="true"></span>
								</button>
							</div>
						</div>
						<div class="col-xs-12 pd0 mt10 mb5">
							<div class="col-xs-3 col-sm-2">
								<div class="checkbox3  checkbox-check checkbox-light vital-checkbox ">
			                        <input type="checkbox" id="minBpsCheck" value="minBps" data-itemCd="1000900001">
			                        <label for="minBpsCheck">DBP
			                        </label>
			                   </div>
							</div>
							<div class="col-xs-4 col-sm-3 pd0">
							    <div class="input-group input-group-white">
							      <input type="number" class="form-control input-sm vital-value" id="txtMinBps" placeholder="최저혈압" data-itemCd="1000900001">
							      <div class="input-group-addon">mmHg</div>					      					      
							    </div>
							</div>
						</div>
						<div class="col-xs-12 mb5">
							<div class="col-xs-2 pdr0 text-right btn-slider-area">
								<button type="button" class="btn btn-sm btn-slider" aria-label="Left Align" id="btnMinusMinBps">
								  <span class="glyphicon glyphicon glyphicon-minus" aria-hidden="true"></span>
								</button>
							</div>
							<div class="col-xs-8 pd0">
								<input id="sliderMinBps" data-slider-id='sliderMinBps' type="text" 
									data-slider-min="20" data-slider-max="200" data-slider-step="1" data-slider-tooltip="hide" data-slider-enabled="false"/>
							</div>
							<div class="col-xs-2 pdl0 btn-slider-area">
								<button type="button" class="btn btn-sm btn-slider" aria-label="Left Align" id="btnPlusMinBps">
								  <span class="glyphicon glyphicon glyphicon-plus" aria-hidden="true"></span>
								</button>
							</div>
						</div>
						<div class="col-xs-12 pd0 mt10 mb5">
							<div class="col-xs-3 col-sm-2">
								<div class="checkbox3  checkbox-check checkbox-light vital-checkbox ">
			                        <input type="checkbox" id="spO2Check" value="spO2"  data-itemCd="2001100049">
			                        <label for="spO2Check">SpO<sub>2</sub>
			                        </label>
			                   </div>
							</div>
							<div class="col-xs-4 col-sm-3 pd0">
							    <div class="input-group input-group-white">
							      <input type="number" class="form-control input-sm vital-value" id="txtSpO2" placeholder="SpO2" data-itemCd="2001100049">
							      <div class="input-group-addon">%</div>					      					      
							    </div>
							</div>
						</div>
						<div class="col-xs-12 mb10">
							<div class="col-xs-2 pdr0 text-right btn-slider-area">
								<button type="button" class="btn btn-sm btn-slider" aria-label="Left Align" id="btnMinusSpO2">
								  <span class="glyphicon glyphicon glyphicon-minus" aria-hidden="true"></span>
								</button>
							</div>
							<div class="col-xs-8 pd0">
								<input id="sliderSpO2" data-slider-id='sliderSpO2' type="text" 
									data-slider-min="0" data-slider-max="100" data-slider-step="1" data-slider-tooltip="hide" data-slider-enabled="false"/>
							</div>
							<div class="col-xs-2 pdl0 btn-slider-area">
								<button type="button" class="btn btn-sm btn-slider" aria-label="Left Align" id="btnPlusSpO2">
								  <span class="glyphicon glyphicon glyphicon-plus" aria-hidden="true"></span>
								</button>
							</div>
						</div>

						<div class="col-xs-12 text-center mt10 mb10">
							<button type="button" class="btn btn-style-1 btn-sm mp-bottom-btn" id="btnVitalSubmit">입력
							</button>
						</div>
					</div>
			    </div>
			    <!-- 투약 시작 -->
			    <div role="tabpanel" class="tab-pane" id="tabInject">
					<div class="row2 row" id="injectSearch">
						<div class="col-xs-12 text-center mt5">
							<span class="inject-prev-day glyphicon glyphicon-triangle-left" aria-hidden="true"></span>
							<span id="injectSearchDate">2017-09-19</span>
							<span class="inject-next-day glyphicon glyphicon-triangle-right" aria-hidden="true"></span>
						</div>
					</div>
					<div class="row2">
				    	<div id="injectList">
							<div id="injectHeader">
								<div class="list-row container">
									<div class="col-xs-12 col-sm-6 pd0">
										<div class="header col-xs-2 col-sm-2 pdl5 pdr0 letter-control">처방번호
										</div>
										<div class="header col-xs-10 col-sm-10 pdl5 pdr5">약품명 / 투여방법
										</div>		
									</div>
									<div class="col-xs-12 col-sm-6 pd0">
										<div class="header col-xs-2 col-sm-2 pdl5 pdr0 letter-control">투여여부
										</div>
										<div class="header col-xs-3 col-sm-3 pdl5 pdr5">용량(T 용량)
										</div> 
										<div class="header col-xs-3 col-sm-3 pdl5 pdr5">투여시간
										</div>
										<div class="header col-xs-4 col-sm-4 pdl5 pdr5 letter-control">차수 / 총투여횟수
										</div>
									</div>
								</div>
							</div>
							<!-- 리스트 헤더 종료 -->
							<ul class="list-group" id="injectDataList">
							</ul>
						</div>	
					</div>
			    </div>
			    <div role="tabpanel" class="tab-pane" id="tabCure">
			    	<%-- <div id="cureList" style="display: none">
				    	<div class="row3 mt5 container">
							<div class="col-xs-12">
								<div id="cureToday" class="top-info-style"><span class="mp-dot"></span><span class="content"></span></div>
							</div>
						</div>
						<div class="container text-center">
								<div class="radio3 radio-check radio-inline">
								<input type="radio" id="radio1" name="radio-time" value="D"> <label for="radio1">Day </label>
			                </div>
			                     <div class="radio3 radio-check radio-inline">
								<input type="radio" id="radio2" checked name="radio-time" value="E"> <label for="radio2">Evening</label>
							</div>
								<div class="radio3 radio-check radio-inline">
								<input type="radio" id="radio3" name="radio-time" value="N"> <label for="radio3">Night</label>
							</div>
						</div>
				    	<div class="row3 pdt10" style="padding-left: 1px; padding-right:1px">
				    		<div class="hidden-xs col-sm-2">
				    		</div>
				    		<div class="col-xs-4 col-sm-2 pd0">
						    	<table class="table table-condensed" id="cureHeaderTable">
								  <thead class=""> 
								  	<tr>
								  		<th class="text-center">항목</th>
								  		<th style="min-width: 32px">&nbsp;&nbsp;</th>			  						  		
								  	</tr>
								  </thead>
								  <tbody class="text-center" id="">
								  	<tr>
								  		<td>경구약</td>
								  		<td style="width: 32px" data-medicine="A01" data-time="0"></td>		  		
								  	</tr>
								  	<tr>
								  		<td >외용약</td>
								  		<td style="width: 32px" data-medicine="A03" data-time="0"></td>				  		
								  	</tr>
								  	<tr>
								  		<td>주사약</td>
								  		<td style="width: 32px" data-medicine="A02" data-time="0"></td>			  		
								  	</tr>
								  	<tr>
								  		<td>IVF</td>
								  		<td style="width: 32px" class="" data-medicine="A05" data-time="0">
								  		</td>			  		
								  	</tr>						  								  								  	
								  </tbody>
								</table>	
							</div>
							<div class="col-xs-8 col-sm-6 pd0" style="overflow-x: auto" id="cureDataTableWrap">
								<table class="table table-condensed cure-responsive-size" style="" id="cureDataTable_D" data-duty="D">
								  <thead class="" id="cureDataHead">
								  	<tr>
								  		<th class="text-center">6시</th>
								  		<th class="text-center">7시</th>
								  		<th class="text-center">8시</th>
								  		<th class="text-center">9시</th>
								  		<th class="text-center">10시</th>
								  		<th class="text-center">11시</th>				  						  		
								  		<th class="text-center">12시</th>
								  		<th class="text-center">13시</th>				  						  		
								  	</tr>
								  </thead>
								    <tbody class="text-center" id="cureDataList">
								  	<tr>
								  		<td class="" data-medicine="A01" data-time="6"></td>
								  		<td class="" data-medicine="A01" data-time="7"></td>
								  		<td class="" data-medicine="A01" data-time="8"></td>
								  		<td class="" data-medicine="A01" data-time="9"></td>
								  		<td class="" data-medicine="A01" data-time="10"></td>
								  		<td class="" data-medicine="A01" data-time="11"></td>
								  		<td class="" data-medicine="A01" data-time="12"></td>
								  		<td class="" data-medicine="A01" data-time="13"></td>				  		
								  	</tr>
								  	<tr>
								  		<td class="" data-medicine="A03" data-time="6"></td>
								  		<td class="" data-medicine="A03" data-time="7"></td>
								  		<td class="" data-medicine="A03" data-time="8"></td>
								  		<td class="" data-medicine="A03" data-time="9"></td>
								  		<td class="" data-medicine="A03" data-time="10"></td>
								  		<td class="" data-medicine="A03" data-time="11"></td>
								  		<td class="" data-medicine="A03" data-time="12"></td>
								  		<td class="" data-medicine="A03" data-time="13"></td>				  		
								  	</tr>
								  	<tr>
								  		<td class="" data-medicine="A02" data-time="6"></td>
								  		<td class="" data-medicine="A02" data-time="7"></td>
								  		<td class="" data-medicine="A02" data-time="8"></td>
								  		<td class="" data-medicine="A02" data-time="9"></td>
								  		<td class="" data-medicine="A02" data-time="10"></td>
								  		<td class="" data-medicine="A02" data-time="11"></td>
								  		<td class="" data-medicine="A02" data-time="12"></td>
								  		<td class="" data-medicine="A02" data-time="13"></td>				  		
								  	</tr>
								  	<tr>
								  		<td class="" data-medicine="A05" data-time="6"></td>
								  		<td class="" data-medicine="A05" data-time="7"></td>
								  		<td class="" data-medicine="A05" data-time="8"></td>
								  		<td class="" data-medicine="A05" data-time="9"></td>
								  		<td class="" data-medicine="A05" data-time="10"></td>
								  		<td class="" data-medicine="A05" data-time="11"></td>
								  		<td class="" data-medicine="A05" data-time="12"></td>
								  		<td class="" data-medicine="A05" data-time="13"></td>				  		
								  	</tr>												  								  								  	
								  </tbody>
								</table>
								<table class="table table-condensed cure-responsive-size" style="" id="cureDataTable_E" data-duty="E">
								  <thead class="" id="cureDataHead">
								  	<tr>
								  		<th class="text-center">14시</th>
								  		<th class="text-center">15시</th>
								  		<th class="text-center">16시</th>
								  		<th class="text-center">17시</th>
								  		<th class="text-center">18시</th>
								  		<th class="text-center">19시</th>				  						  		
								  		<th class="text-center">20시</th>
								  		<th class="text-center">21시</th>				  						  		
								  	</tr>
								  </thead>
								    <tbody class="text-center" id="cureDataList">
								  	<tr>
								  		<td class="" data-medicine="A01" data-time="14"></td>
								  		<td class="" data-medicine="A01" data-time="15"></td>
								  		<td class="" data-medicine="A01" data-time="16"></td>
								  		<td class="" data-medicine="A01" data-time="17"></td>
								  		<td class="" data-medicine="A01" data-time="18"></td>
								  		<td class="" data-medicine="A01" data-time="19"></td>
								  		<td class="" data-medicine="A01" data-time="20"></td>
								  		<td class="" data-medicine="A01" data-time="21"></td>				  		
								  	</tr>
								  	<tr>
								  		<td class="" data-medicine="A03" data-time="14"></td>
								  		<td class="" data-medicine="A03" data-time="15"></td>
								  		<td class="" data-medicine="A03" data-time="16"></td>
								  		<td class="" data-medicine="A03" data-time="17"></td>
								  		<td class="" data-medicine="A03" data-time="18"></td>
								  		<td class="" data-medicine="A03" data-time="19"></td>
								  		<td class="" data-medicine="A03" data-time="20"></td>
								  		<td class="" data-medicine="A03" data-time="21"></td>				  		
								  	</tr>
								  	<tr>
								  		<td class="" data-medicine="A02" data-time="14"></td>
								  		<td class="" data-medicine="A02" data-time="15"></td>
								  		<td class="" data-medicine="A02" data-time="16"></td>
								  		<td class="" data-medicine="A02" data-time="17"></td>
								  		<td class="" data-medicine="A02" data-time="18"></td>
								  		<td class="" data-medicine="A02" data-time="19"></td>
								  		<td class="" data-medicine="A02" data-time="20"></td>
								  		<td class="" data-medicine="A02" data-time="21"></td>				  		
								  	</tr>
								  	<tr>
								  		<td class="" data-medicine="A05" data-time="14"></td>
								  		<td class="" data-medicine="A05" data-time="15"></td>
								  		<td class="" data-medicine="A05" data-time="16"></td>
								  		<td class="" data-medicine="A05" data-time="17"></td>
								  		<td class="" data-medicine="A05" data-time="18"></td>
								  		<td class="" data-medicine="A05" data-time="19"></td>
								  		<td class="" data-medicine="A05" data-time="20"></td>
								  		<td class="" data-medicine="A05" data-time="21"></td>				  		
								  	</tr>												  								  								  	
								  </tbody>
								</table>
								<table class="table table-condensed cure-responsive-size" style="" id="cureDataTable_N" data-duty="N">
								  <thead class="" id="cureDataHead">
								  	<tr>
								  		<th class="text-center">22시</th>
								  		<th class="text-center">23시</th>
								  		<th class="text-center">0시</th>
								  		<th class="text-center">1시</th>
								  		<th class="text-center">2시</th>
								  		<th class="text-center">3시</th>				  						  		
								  		<th class="text-center">4시</th>
								  		<th class="text-center">5시</th>				  						  		
								  	</tr>
								  </thead>
								    <tbody class="text-center" id="cureDataList">
								  	<tr>
								  		<td class="" data-medicine="A01" data-time="22"></td>
								  		<td class="" data-medicine="A01" data-time="23"></td>
								  		<td class="" data-medicine="A01" data-time="0"></td>
								  		<td class="" data-medicine="A01" data-time="1"></td>
								  		<td class="" data-medicine="A01" data-time="2"></td>
								  		<td class="" data-medicine="A01" data-time="3"></td>
								  		<td class="" data-medicine="A01" data-time="4"></td>
								  		<td class="" data-medicine="A01" data-time="5"></td>				  		
								  	</tr>
								  	<tr>
								  		<td class="" data-medicine="A03" data-time="22"></td>
								  		<td class="" data-medicine="A03" data-time="23"></td>
								  		<td class="" data-medicine="A03" data-time="0"></td>
								  		<td class="" data-medicine="A03" data-time="1"></td>
								  		<td class="" data-medicine="A03" data-time="2"></td>
								  		<td class="" data-medicine="A03" data-time="3"></td>
								  		<td class="" data-medicine="A03" data-time="4"></td>
								  		<td class="" data-medicine="A03" data-time="5"></td>				  		
								  	</tr>
								  	<tr>
								  		<td class="" data-medicine="A02" data-time="22"></td>
								  		<td class="" data-medicine="A02" data-time="23"></td>
								  		<td class="" data-medicine="A02" data-time="0"></td>
								  		<td class="" data-medicine="A02" data-time="1"></td>
								  		<td class="" data-medicine="A02" data-time="2"></td>
								  		<td class="" data-medicine="A02" data-time="3"></td>
								  		<td class="" data-medicine="A02" data-time="4"></td>
								  		<td class="" data-medicine="A02" data-time="5"></td>				  		
								  	</tr>
								  	<tr>
								  		<td class="" data-medicine="A05" data-time="22"></td>
								  		<td class="" data-medicine="A05" data-time="23"></td>
								  		<td class="" data-medicine="A05" data-time="0"></td>
								  		<td class="" data-medicine="A05" data-time="1"></td>
								  		<td class="" data-medicine="A05" data-time="2"></td>
								  		<td class="" data-medicine="A05" data-time="3"></td>
								  		<td class="" data-medicine="A05" data-time="4"></td>
								  		<td class="" data-medicine="A05" data-time="5"></td>				  		
								  	</tr>												  								  								  	
								  </tbody>
								</table>
							</div>
							<div class="hidden-xs col-sm-2">
				    		</div>
						</div>
					</div> --%>
					<div id="cureDetail">
						<div class="row2 container">
							<div class="col-xs-3 col-sm-4 pdl5 pdr0">
								<select class="form-control" id="sltMedType">
									<!-- <option value="00">전체</option> --> <!-- 전체 조회 DB 권한오류 해결되면 주석 해제하기 -->
									<option value="A01">경구약</option>
									<option value="A03">외용약</option>
									<option value="A02">주사약</option>
									<option value="A05">IVF</option>
								</select>
							</div>
							<div class="col-xs-4 col-sm-4 pdl5 pdr0">
								<select class="form-control" id="sltTimeType">
									<option value="current">현재시간</option>
									<option value="special">특정시간</option>
									<option value="noTime">시간없음</option>
									<option value="currentDuty">현근무번</option>
								</select>
							</div>
							<div class="col-xs-3 col-sm-3 pdl5 pdr5"> 
								<select class="form-control" id="sltTime" disabled>
									<option value="00">0시</option>
									<option value="01">1시</option>
									<option value="02">2시</option>
									<option value="03">3시</option>
									<option value="04">4시</option>
									<option value="05">5시</option>
									<option value="06">6시</option>
									<option value="07">7시</option>
									<option value="08">8시</option>
									<option value="09">9시</option>
									<option value="10">10시</option> 
									<option value="11">11시</option>
									<option value="12">12시</option>
									<option value="13">13시</option>
									<option value="14">14시</option>
									<option value="15">15시</option>
									<option value="16">16시</option>
									<option value="17">17시</option>
									<option value="18">18시</option>
									<option value="19">19시</option>
									<option value="20">20시</option>
									<option value="21">21시</option>
									<option value="22">22시</option>
									<option value="23">23시</option>
								</select>
							</div>
							<div class="col-xs-2 col-sm-1 text-right pdl5">
								<button type="button" class="btn btn-style-1 btn-sm" id="btnSearchCure">조회
								</button>
							</div>
						</div>
				    	<div class="row3">
				    		<div class="col-xs-12 col-sm-12 pd0 text-center mb5">
				    			<!-- <div class="btn-group" role="group" aria-label="..."> -->
								  <button type="button" class="btn btn-style-3 btn-sm" id="btnStartDrug" style="min-width:95px">실시</button>
								  <button type="button" class="btn btn-style-3 btn-sm" id="btnChangeDrug" style="min-width:95px">시간변경 후 실시</button> 
								  <button type="button" class="btn btn-style-3 btn-sm" id="btnStartSap"  style="min-width:95px">주사실시</button>						  
								<!-- </div> -->
				    		</div>
				    		<div class="col-xs-12 col-sm-12 pd0">
				    			<div id="cureDetailList">
									<div id="cureHeader">
										<div class="list-row container">
											<div class="col-xs-12 col-sm-6 pd0">
												<span class="header col-xs-1 col-sm-1 pdl5 pdr5">&nbsp;
												</span>
												<span class="header col-xs-3 col-sm-2 pdl5 pdr5">시행시간
												</span>
												<span class="header col-xs-3 col-sm-3 pd0 letter-control">처방번호/차수
												</span>		
												<span class="header col-xs-5 col-sm-6 pdl5 pdr5">약품명</span>
											</div>
											<div class="col-xs-12 col-sm-6 pd0">
												<span class="header col-xs-1 hidden-sm pdl5 pdr5">&nbsp;
												</span> 
												<span class="header col-xs-3 col-sm-4 pdl5 pdr5">용량(T용량)</span>
												<span class="header col-xs-3 col-sm-3 pd0">투여방법
												</span> 
												<span class="header col-xs-5 col-sm-5 pdl5 pdr5">메모
												</span>
											</div>
										</div>
									</div>
									<!-- 리스트 헤더 종료 -->
									<ul class="list-group" id="cureDetailDataList">
									</ul>
								</div>
				    		</div>
				    	</div>
					</div>
			    </div>			    
			  </div>
			</div>
			
			<div id="newPopupFooter" class="foot-content" style="display: none;">
				<div class="btn-group btn-group-justified" role="group" aria-label="...">
				  <div class="btn-group" role="group">
				    <button type="button" class="btn btn-style-1" name="btnMoveDetail">기본</button>
				  </div>
				  <div class="btn-group" role="group">
				    <button type="button" class="btn btn-style-1" name="btnMovePrescription">처방</button>
				  </div>
				  <div class="btn-group" role="group">
				    <button type="button" class="btn btn-style-1" name="btnMoveExamine">검사</button>
				  </div>
				</div>
			</div>
		</div>	
		<!-- 기본/처방/검사 팝업 -->
		<div id="patientPopup"> 
			<div id="popContentPatientInfo" class="popup-content" style="display: none">
				<div class="container">
					<div class="col-xs-6">
						<h2 class="title">환자 정보</h2>
					</div>
				</div>
				<table class="info-style">
					<tbody>
						<tr>
							<th>성명</th>
							<td id="patientPopupName"></td>
						</tr>
						<tr>
							<th>등록번호</th>
							<td id="patientPopupNum"></td>
						</tr>
						<tr>
							<th>생년월일</th>
							<td id="patientPopupBirth"></td>
						</tr>
						<tr>
							<th>성별 / 나이</th>
							<td id="patientPopupSex"></td>
						</tr>
						<tr>
							<th>혈액형</th>
							<td id="patientPopupBloodTyp"></td>
						</tr>
						<tr>
							<th>전화번호1</th>
							<td>
								<span class="patient-info-tel" id="patientPopupCellphone"></span>
								<div class="patient-info-tel-btn" id="patientTelBtnBox">
									<button type="button" class="btn btn-danger btn-sm" id="patientTelBtn">
										<i class="fa fa-phone"></i><span class="hidden">전화걸기</span>
									</button>
									<button type="button" class="btn btn-sms btn-sm" id="patientSmsBtn">
										<i class="fa fa-envelope-o"></i><span class="hidden">문자보내기</span>
									</button>
								</div>
							</td>
						</tr>
						<tr>
							<th>전화번호2</th>
							<td>
								<span class="patient-info-tel" id="patientPopupGuardianphone"></span>
								<div class="patient-info-tel-btn" id="guardianTelBtnBox">
									<button type="button" class="btn btn-danger btn-sm" id="guardianTelBtn">
										<i class="fa fa-phone"></i><span class="hidden">전화걸기</span>
									</button>
									<button type="button" class="btn btn-sms btn-sm" id="guardianSmsBtn">
										<i class="fa fa-envelope-o"></i><span class="hidden">문자보내기</span>
									</button>
								</div>
							</td>
						</tr>
						<tr>
							<th>주소</th>
							<td id="patientPopupAddress"></td>
						</tr>
					</tbody>
				</table>
			</div>
			
			<div id="popContentPrescription" class="popup-content" style="display: none">
				<div class="text-left form-wrap">
					<div class="container mb10">
						<div class="col-xs-12"><strong class="name" id="prescriptionPatientName"></strong></div>
					</div>
					<div class="container" >
							<div class="col-xs-6">
				                <input type="date" class="form-control" id="prescriptionDtpSrchdd" required="required">
				                <select class="form-control" id="prescriptionSelectdd" style="display: none"></select>
							</div> 
							<div class="col-xs-6">
								<select class="form-control" id="prescriptionSelectbox">
									<option value="sel">분류</option>
									<option value="presno">처방번호</option>
								</select>
							</div>
					</div>
				</div><!-- .wrap 종료 -->	
				<div id="prescriptionList">
		
				</div><!-- .infowrap 종료 -->		
			</div>
			
			<div id="popContentExamine" class="popup-content" style="display: none; z-index: 10;">
				<div class="text-left form-wrap mb10">
					<div class="container mb10">
						<div class="col-xs-12">
							<%-- <div id="examPatientName" class="top-info-style"><span class="mp-dot"></span><strong> 환자명: </strong><span class="content"></span></div> --%>
							<strong class="name" id="examPatientName"></strong>
						</div>
					</div>
					<div class="container" >
							<div class="col-xs-5 pdr5">
				                <input type="date" class="form-control" id="examStartSrchdd" required="required">
				                <select class="form-control" id="examStartSrchdd" style="display: none"></select>
							</div> 
							<div class="col-xs-5 pdl5">
								<input type="date" class="form-control" id="examEndSrchdd" required="required">
				                <select class="form-control" id="examEndSrchdd" style="display: none"></select>
							</div>
							<div class="col-xs-2 pdl0">
								<button type="button" class="btn btn-style-1 btn-sm" id="btnExamSearch">조회
								</button>
							</div>
					</div>
				</div><!-- .wrap 종료 -->	
				<div id="examineList">
					<%-- <div class="tree-level-1">
						<div class="item"><span class="glyphicon glyphicon-menu-up" aria-hidden="true"></span></div>
					</div>
					<div class="tree-level-2">
						<div class="item"><span class="glyphicon glyphicon-menu-down" aria-hidden="true"></span></div>
						<div class="tree-level-3"></div>
					</div> --%>
				</div><!-- .infowrap 종료 -->
			</div>
			
			<div id="popContentExamineInfo" class="popup-content" style="display: none; position: absolute; z-index: 11;top: 0px;left: 0px; height: 100%; width: 100%;">
				<div class="exam-wrap">
					<div class="text-left form-wrap mb10">
						<div class="container">
							<div class="col-xs-9 mb10">
								<strong class="name" id="examInfoPatientName"></strong>
							</div>
							<div class="col-xs-3 text-right pdl0">
								<button type="button" class="btn btn-style-1 btn-sm" id="btnPacs">PACS
								</button>
							</div>
						</div>
						<div class="container">
							<div class="col-xs-12">
								<span class="name" id="examName"></span>
							</div>
						</div>
					</div><!-- .wrap 종료 -->	
					<div id="examineInfo" class="examine-detail" style="">
					</div>
					<!-- <div class="btnwrap text-center" id="examMoveBtn">
						<button class="btn btn-style-2" id="prevExamBtn" style="right: 60px;">
							<i class="fa fa-chevron-up"></i><span class="hidden">열기</span>
						</button>
						<button class="btn btn-style-2" id="nextExamBtn" style="right: 10px;">
							<i class="fa fa-chevron-down"></i><span class="hidden">열기</span>
						</button>
					</div> -->
				</div>
			</div>
						
			<div id="popContentConsultDetail" class="popup-content" style="display: none">
				<div class="container mt10">
					<table class="info-style">
						<tbody>
							<tr>
								<th>성명</th>
								<td id="tdConsultName"></td>
							</tr>
							<tr>
								<th>진단명</th>
								<td id="tdDiagName"></td>
							</tr>
							<tr>
								<th>의뢰과</th>
								<td id="tdRequest"></td>
							</tr>
							<tr>
								<th>협진과</th>
								<td id="tdReply"></td>
							</tr>
							<tr>
								<td colspan="2" class="merge"><strong>의뢰내역 (<span id="spanRequestDate"></span>)</strong>
									<div class="card-box consult-detail-box" id="divRequestDetail">
										
									</div>
								</td>
							</tr>
							<tr>
								<td colspan="2" class="merge"><strong>회신내역 (<span id="spanReplyDate"></span>)</strong>
									<div class="card-box consult-detail-box" id="divReplyDetail">
										
									</div>
								</td>
							</tr>
						</tbody>
					</table>
				</div>
			</div>
			
			<div id="newPopupFooter2" class="foot-content" style="display: none; z-index: 10;">
				<div class="btn-group btn-group-justified" role="group" aria-label="...">
				  <div class="btn-group" role="group">
				    <button type="button" class="btn btn-style-1 bottom-menu" name="btnMoveDetail">기본</button>
				  </div>
				  <div class="btn-group" role="group">
				    <button type="button" class="btn btn-style-1 bottom-menu" name="btnMovePrescription">처방</button>
				  </div>
				  <div class="btn-group" role="group">
				    <button type="button" class="btn btn-style-1 bottom-menu" name="btnMoveExamine">검사</button>
				  </div>
				</div>
			</div>
		</div>	
		
		<!-- 약실시 - 실시 -->
		<div class="modal fade" tabindex="-1" role="dialog" id="modalStartDrug" style="display: none">
		  <div class="modal-dialog" role="document">
		    <div class="modal-content">
		      <div class="modal-header">
		        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
		        <h4 class="modal-title">실시</h4>
		      </div>
		      <div class="modal-body">
		        <p>지정된 시행예정시간에 실시 처리 하였습니다.</p>
		      </div>
		      <div class="modal-footer">
		        <button type="button" class="btn btn-style-1 btn-sm" data-dismiss="modal">확인</button>
		      </div>
		    </div><!-- /.modal-content -->
		  </div><!-- /.modal-dialog -->
		</div>
		<!-- 약실시 - 시간변경 후 실시 -->
		<div class="modal fade" tabindex="-1" role="dialog" id="modalChangeDrug" style="display: none">
			<div class="modal-dialog" role="document">
			   <div class="modal-content">
			     <div class="modal-header">
			       <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
			       <h4 class="modal-title">변경사유</h4>
			     </div>
			     <div class="modal-body row">
			     	<div class="col-xs-12 col-sm-12 pd0">
				     	<div class="col-xs-3 col-sm-3">
				     	</div>
						<div class="col-xs-6 col-sm-6">
							<div class="radio3 radio-check">
								<input type="radio" id="cureChangeRadio1" name="cureChange" value="1" checked>
									<label for="cureChangeRadio1">의사지시 변경</label>
					       	</div>
					       	<div class="radio3 radio-check">
								<input type="radio" id="cureChangeRadio2" name="cureChange" value="2">
									<label for="cureChangeRadio2">검사시간 변경</label>
					       	</div>
					       	<div class="radio3 radio-check">
								<input type="radio" id="cureChangeRadio3" name="cureChange" value="3">
									<label for="cureChangeRadio3">수술시간 변경</label>
					       	</div>			
					       	<div class="radio3 radio-check">
								<input type="radio" id="cureChangeRadio4" name="cureChange" value="4">
									<label for="cureChangeRadio4">실제 수행시간</label>
					       	</div>	
					       	<div class="radio3 radio-check">
								<input type="radio" id="cureChangeRadio5" name="cureChange" value="5">
									<label for="cureChangeRadio5">투여경로 없음</label>
					       	</div>	
						</div>
						<div class="col-xs-3 col-sm-3">
				     	</div>
			     	</div>
			     	<div class="col-xs-12 col-sm-12 pd0">
				     	<div class="col-xs-1 col-sm-1">
				     	</div>
						<div class="col-xs-10 col-sm-10 pd0">
							<div class="input-group input-group-white">
								<div class="input-group-addon"><span class="mp-dot"></span>실시일시</div>
								<input type="datetime-local" class="form-control" id="dateChangeDrug"></input>
							</div>
						</div>
						<div class="col-xs-1 col-sm-1">
				     	</div>			
			     	</div>
			     </div>
			     <div class="modal-footer">
			     	<button type="button" class="btn btn-style-1 btn-sm" data-dismiss="modal">확인</button>
					<button type="button" class="btn btn-style-2 btn-sm" data-dismiss="modal">취소</button>
			     </div>
			   </div><!-- /.modal-content -->
		   </div>
		 </div>
		 
		<div class="modal fade" tabindex="-1" role="dialog" id="modalStartSap" style="display: none">
			<div class="modal-dialog" role="document">
			   <div class="modal-content">
			     <div class="modal-header">
			       <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
			       <h4 class="modal-title">주사실시/시작/종료</h4>
			     </div>
			     <div class="modal-body col-xs-12 col-sm-12 pdl5 pdr5">
			     	<div class="col-xs-12 col-sm-12 mb10 content-box">
			     		<div class="col-xs-10 col-sm-10 pd0">
				     		<div class="col-xs-12 col-sm-12 pdl5">
								  <div class="radio3 radio-check radio-inline">
									<input type="radio" id="sapNo" name="sapStatus"
										value="N"> <label for="sapNo">수액처리(X)</label>
								  </div>
				     		</div>	
				     		<div class="col-xs-5 col-sm-5 pdr5 pdl5">
				     			 <div class="radio3 radio-check radio-inline">
									<input type="radio" id="sapYes" name="sapStatus"
										value="Y"> <label for="sapYes">수액처리(O)</label>
								  </div>
				     		</div>
				     		<div class="col-xs-7 col-sm-7 pdl0 pdr5">
							  <div class="input-group input-group-white sap-input-group">
							  	<span class="input-group-addon" id="sapCapacityBox">시작</span>
							  	<input type="text" class="form-control disabled-sapYes" id="sapCapacity" aria-describedby="sapCapacityBox" value="0.0">
							  	<span class="input-group-addon" id="sapCapacityBox">용량</span>
							  </div>
				     		</div>		
				     	</div>
				     	<div class="col-xs-2 col-sm-2 pd0">	
				     		<button type="button" class="btn btn-style-1 btn-sm" id="btnExecuteIvStart">실시</button>
				     	</div>
				     	<div class="col-xs-12 col-sm-12 mt5 mb5 content-box">
					     	<div class="col-xs-12 col-sm-12 pdl5 mb5">
								<div class="input-group input-group-white">
									<div class="input-group-addon"><span class="mp-dot"></span>실시시간</div>
									<input type="datetime-local" class="form-control disabled-sapYes" id="dateStartSap"></input>
								</div>
					     	</div>
					     	<div class="col-xs-12 col-sm-12 pdl5">
								<div class="input-group input-group-white">
									<div class="input-group-addon"><span class="mp-dot"></span>변경사유</div>
										<select class="form-control disabled-sapYes" id="sltChangeSap">
											<option>의사지시 변경</option>
											<option>검사시간 변경</option>
											<option>수술시간 변경</option>
											<option>실제 수행시간</option>
											<option>투여경로 없음</option>
										</select>
								</div>
					     	</div>
				     	</div>
			     	</div>
			     	
			     	<div class="col-xs-12 col-sm-12 content-box">
			     		<div class="col-xs-10 col-sm-10 pd0">
				     		<div class="col-xs-12 col-sm-12 pdl5">
								  <div class="radio3 radio-check radio-inline">
									<input type="radio" id="sapEnd" name="sapStatus"
										value="E"> <label for="sapEnd">종료</label>
								  </div>
				     		</div>		
				     	</div>
				     	<div class="col-xs-2 col-sm-2 pd0">	
				     		<button type="button" class="btn btn-style-1 btn-sm">종료</button>
				     	</div>	
				     	<div class="col-xs-12 col-sm-12 mt5 mb5 content-box">
					     	<div class="col-xs-12 col-sm-12 pd0">
					     		<div class="col-xs-12 col-sm-12 pdl5 mb5">
					     			  <div class="input-group input-group-white">
										<div class="input-group-addon"><span class="mp-dot"></span>주사종료</div>
										<input type="datetime-local" class="form-control disabled-sapEnd" id="dateEndSap"></input>
									</div>
					     		</div>	
					     		<div class="col-xs-12 col-sm-12 pdl5">
									  <div class="input-group input-group-white">
									  	<span class="input-group-addon" id="sapEndCapacityBox"><span class="mp-dot"></span>버린양&nbsp;&nbsp;&nbsp;&nbsp;</span>
									  	<input type="text" class="form-control disabled-sapEnd" id="sapEndCapacity" aria-describedby="sapEndCapacityBox">
									  	<span class="input-group-addon" id="sapEndCapacityBox">CC</span>
									  </div>
					     		</div>		
					     	</div>	
				     	</div>
			     	</div>
			     </div>
			     <div class="modal-footer">
			     	<button type="button" class="btn btn-style-1 btn-sm" data-dismiss="modal">확인</button>
					<button type="button" class="btn btn-style-2 btn-sm" data-dismiss="modal">취소</button>
			     </div>
			   </div><!-- /.modal-content -->
		   </div>
		 </div>
		 
		<%-- <div class="modal fade" tabindex="-1" role="dialog" id="modalEndSap" style="display: none">
			<div class="modal-dialog" role="document">
			   <div class="modal-content">
			     <div class="modal-header">
			       <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
			       <h4 class="modal-title">수액 End</h4>
			     </div>
			     <div class="modal-body row">
					<div class="col-xs-12">
						<div class="input-group input-group-white">
							<div class="input-group-addon"><span class="mp-dot"></span>종료일시</div>
							<input type="datetime-local" class="form-control" id="dateEndSap"></input>
						</div>
					</div>	
					<div class="col-xs-12">
						<div class="input-group input-group-white">
							<div class="input-group-addon"><span class="mp-dot"></span>버린용량</div>
							<input type="text" class="form-control" id="endAmount" placeholder="버린용량"></input>
							<div class="input-group-addon">cc</div>
						</div>
					</div>			
			     </div>
			     <div class="modal-footer">
			     	<button type="button" class="btn btn-style-1 btn-sm">확인</button>
					<button type="button" class="btn btn-style-2 btn-sm" data-dismiss="modal">취소</button>
			     </div>
			   </div><!-- /.modal-content -->
		   </div>
		 </div> --%>
		 
		<!-- PACS 샘플 이미제공용 popup -->
		<div class="modal fade" tabindex="-1" role="dialog" id="modalSamplePACS" style="display: none">
		  <div class="modal-dialog" role="document">
		    <div class="modal-content">
		      <div class="modal-header">
		        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
		        <h4 class="modal-title">sample PACS Image</h4>
		      </div>
		      <div class="modal-body">
		      	<img src="<c:url value="/resources/css/images/mobile/sample/pacs_sample.png" />" style="max-width: 100%; max-height: 100%;">
		      </div>
		      <div class="modal-footer">
		        <button type="button" class="btn btn-style-1 btn-sm" data-dismiss="modal">확인</button>
		      </div>
		    </div><!-- /.modal-content -->
		  </div><!-- /.modal-dialog -->
		</div>
	</body>
</html>


<script type="text/javascript" src="<c:url value="/resources/plugins/jquery/jquery-2.1.4.min.js" />"></script>
<script type="text/javascript" src="<c:url value="/resources/plugins/jquery/jquery.event.scroll.js" />"></script>

<script type="text/javascript">
$(document).ready(function() { 
	var mplusCommon = new mplus_common();
	mplusCommon.init();
	
	if($(window).width()>414){
		 $('.cure-responsive-size').css({'width': '100%', 'min-width': '100%'});			 
	 }else{
		  $('.cure-responsive-size').css({'width': 'max-content', 'max-width': 'initial'});		  			 
	 };
	 
	 if($(window).width()>568){
		 $('.cureDetail-responsive-size').css({'width': '100%', 'min-width': '100%'});			 
	 }else{
		  $('.cureDetail-responsive-size').css({'width': 'max-content', 'max-width': 'initial'});		  			 
	 };
	 wh=$(window).height();
	 $('#cureList, #vitalSearch').css({
		 'height': (wh-217)
	 });
	 
	/* $('#cureDetail, #vitalInfo').css({
		 'height': (wh-181),
		 'position': 'absolute',
		 'z-index': 10, 
		 'background-color': '#fff',
		 'overflow-y': 'auto'
	 }); */
});

var contextPath = '${pageContext.request.contextPath}';
var loginUserId = '${sessionScope.MP_USER_ID}';
var loginUserName = '${sessionScope.MP_USER_NAME}';
var selectDeptName = localStorage.getItem('selectDeptName');
var accessMenu = '${sessionScope.MP_ACCESS_MENU}';
var jobKindCd = '${sessionScope.MP_JOB_KIND_CD}';
var jobKindName = '${sessionScope.MP_JOB_KIND_NM}';

 $(document).on('mobileinit', function() {
	$.mobile.ajaxEnabled = false;
	$.mobile.defaultPageTransition = 'none';
	$.mobile.page.prototype.options.domCache = false;
	$.mobile.selectmenu.prototype.options.nativeMenu = true;
	$.fn.buttonMarkup.defaults.corners = false;
});
$(document).on('pageloadfailed', function(e, data) {
	e.preventDefault();
    var page = $(data.xhr.responseText);
    $.mobile.pageContainer.empty();
    $.mobile.pageContainer.append(page);
    $.mobile.pageContainer.trigger('create');
});
$(document).on('pageshow', function(e, ui) {
    ui.prevPage.remove();
});
$(window).resize(function(){
	 wh=$(window).height();
	 if($(window).width()>414){
		 $('.cure-responsive-size').css({'width': '100%', 'min-width': '100%'});			 
	 }else{
		  $('.cure-responsive-size').css({'width': 'max-content', 'max-width': 'initial'});		  			 
	 };
	 
	 if($(window).width()>568){
		 $('.cureDetail-responsive-size').css({'width': '100%', 'min-width': '100%'});			 
	 }else{
		  $('.cureDetail-responsive-size').css({'width': 'max-content', 'max-width': 'initial'});		  			 
	 };
	 $('#cureList, #vitalSearch').css({
		 'height': (wh-217)
	 });
	 
	 /* $('#cureDetail, #vitalInfo').css({
		 'height': (wh-181),
		 'position': 'absolute',
		 'z-index': 10, 
		 'background-color': '#fff',
		 'overflow-y': 'auto' 
	 }); */
})

//pc 접근 제어
// $(document).ready(function(){
// 	if (/win32|win64|mac/i.test(navigator.platform.toLowerCase())) { 
// 		window.location.href = "http://www.knuh.kr/"; 
// 	} 
// });

//하단API는 추후 확인 후 제거 예정
function changeLocale(lang) {
	location.href = location.pathname + '?' + location.search.replace(/^\?|&?_locale=../g, '').concat('&_locale=' + lang);
};

/**
 * 앱 종료
 */
 
function exitApp() { 
	/* $(".sidemenu").parent().removeClass("active"); */
	var mplus = new mplus_mobile(); 
	mplus.confirm("앱을 종료하시겠습니까?", function(confirm){
		if(confirm){
			var jsonMsg = {
					type : "command", 
					functionType : "exitApp"
				}; 
			mplus.toNative(jsonMsg); 
		}else{
			$('#sidebarMenu li a').removeClass('active');
		};
	});
	
};

/**
 * 화면잠금설정
 */
function lockscreen() {
	var mplus = new mplus_mobile();
	var jsonMsg = {
			type : "command", 
			functionType : "lockscreen"
		};
	mplus.toNative(jsonMsg);
};


/**
 * 이전 버튼 이벤트
 */
function triggerBackBtn(){
	var mplus = new mplus_mobile();
	if( mplus.isAndroid() ){
		historyBack();
	 } 
};
/**
 * 홈버튼 이벤트
 */
function triggerSidebarBtn(){
	var mplus = new mplus_mobile();
	//헤더 백,메뉴버튼 숨어 있으면 리턴
	/* if( $("#menuBars_btn,#headerArrowLeft_btn").css("display") === "none" ){
		return;
	} */
	if( mplus.isAndroid() ){		
		/* $("a#menuBars_btn").trigger("click"); */
	}
}

/**
 * 프로그램 버전 확인
 */
function checkProgramVersion(){
	$("#sidebar .ui-listview li").removeClass("active");
	var jsonMsg = {
			type : "command", 
			functionType : "version",
			value : {
				callbackFn : "window.versionCallback"
			}
		}; 
		
		var mplus = new mplus_mobile(); 
		mplus.toNative(jsonMsg); 
};
window.versionCallback = function(data){
	var popup = $('#mplusAlert'),
		callback = popup.find(".popupCallback");		
	
	var alertMsg = $("<p></p>").text(data);
	$('#mplusAlert .modal-body').empty();
	$('#mplusAlert .modal-body').append(alertMsg);
		
	$('#mplusAlert').modal('show');
	
	
};


var strCode = "";
/**
* domain 저장
*/
function setDomain( code ){
	var strUrl = ""; 
	if( code === "1" ){
		strUrl = '<%=MPlusConstants.HOSPITAL.MPLUS.getDomain()+MPlusConstants.HOSPITAL.MPLUS.getContextName()%>';
		strCode = '<%=MPlusConstants.HOSPITAL.MPLUS.getCode()%>';
	} else {
		strUrl = '<%=MPlusConstants.HOSPITAL.MPLUS_COOK.getDomain()+MPlusConstants.HOSPITAL.MPLUS_COOK.getContextName()%>';
		strCode = '<%=MPlusConstants.HOSPITAL.MPLUS_COOK.getCode()%>';
	}
	var obj = {
			"type" : "command", 
		    "functionType" : "setRecentDomain",
		    "value" : {
		        "url" : strUrl,
		        "callbackFn": "window.redirectSidePage"
		    }	
	};
	try{		
		var mplus = new mplus_mobile();
		mplus.toNative( obj );
	} catch(e) {
		console.log(e);
	}
};
/**
* callback
**/
window.redirectSidePage = function(data){
	if( typeof data === "string" ){			
		data = JSON.parse( data );
	}
	
	if( data["success"] ){
		if( strCode.indexOf('031') >= 0 ){
			window.location.href = '<%=MPlusConstants.HOSPITAL.MPLUS.getDomain() + MPlusConstants.HOSPITAL.MPLUS.getContextName() + MPlusConstants.HOSPITAL.MPLUS.getStartPage()%>';
		} else {
			window.location.href = '<%=MPlusConstants.HOSPITAL.MPLUS_COOK.getDomain() + MPlusConstants.HOSPITAL.MPLUS_COOK.getContextName() + MPlusConstants.HOSPITAL.MPLUS_COOK.getStartPage()%>';
		}
	} else {
		mplus.alert( data["result"] );
	}
};
/**
 * 정렬팝업 오픈
**/
function sortPopOpen(sortList, callback){
	$('#sltSort').empty();
	for(var i=0; i<sortList.length; i++){
		var option = $('<option></option>').clone().attr('value', sortList[i].key).attr('type', sortList[i].type).text(sortList[i].value);
		$('#sltSort').append(option);
	};
	var popup = $('#sortModal'),
		callbackBtn = popup.find("#sortConfirmBtn");
	callbackBtn.unbind();
	callbackBtn.on("click",function(e){
		$('#sortModal').modal('hide');
		callback($('input[type="radio"][name="sortRadio"]:checked').val(), $('#sltSort option:selected').attr('type'), $('#sltSort').val());
	});
	
	$('#sortModal').modal('show');
}
function sortInit(sortList){
	$('.header span').css('display', 'none');
	$('#sltSort').empty();
	$('input[type="radio"][name="sortRadio"][value="up"]').prop('checked', true);
	for(var i=0; i<sortList.length; i++){
		var option = $('<option></option>').clone().attr('value', sortList[i].key).attr('type', sortList[i].type).text(sortList[i].value);
		$('#sltSort').append(option);
	};
};
/**
* 뒤로가기버튼 더블클릭 먹히지 않도록 
**/
var lastTouchEnd = 0;

$('[id*="prevBtn"]').on("click",function(e){
	var now = (new Date()).getTime();
				if (now - lastTouchEnd <= 300) {
					event.preventDefault();
				};
				lastTouchEnd = now;
});


/**
* 뒤로가기 함수 
**/
function historyBack(){
	if($('#sidebarMenu').css('right')=='0px'){
		$('#sidebarMenu').stop().animate({right:-5000},500);
		$('#sidebarMenu li a').removeClass('active');
		return;
	}
	if($('#patientPopup').css('bottom')=='0px' && $('#patientPopup').css('display')=='block'){
		if($('#patientPopup .popup-content.in:not(#popContentExamineInfo)').length>0 && $('#patientPopup #popContentExamineInfo').hasClass('in')){
			$('#patientPopup .popup-content#popContentExamineInfo').removeClass('in');
		}else if($('#patientPopup .popup-content.in:not(#popContentConsultDetail)').length>0 && $('#patientPopup #popContentConsultDetail').hasClass('in')){
			$('#patientPopup .popup-content.in:not(#popContentConsultDetail)').removeClass('in');
			$('.bottom-menu.selected').removeClass('selected');
			headerTitle.text("협진상세");
		} else {
			$('#patientPopup .popup-content').removeClass('in');
			$('#patientPopup').css('display', 'none');
			if( $('#clinicTab').length > 0 ) {
				headerTitle.text("환자목록");
			} else if ( $('#consultTab').length > 0 ) {
				headerTitle.text("협진");
			}
		}
		return;
	}else if($('#nursingPopup').css('bottom')=='0px' && $('#nursingPopup').css('display')=='block'){
		$('#openToggle').css({bottom:10}); //에니메이션을 넣으니 화면이  이동된후에 에니메이션 동작이 되어서 css만변경
		$('#overlay').stop().animate({bottom:-290},500);
		$('#nursingPopup').stop().animate({bottom:-max},500);
		$('#newPopupFooter').css('display', 'none');
		$('#patientList').css('margin-bottom', '0');
		$('#searchPatientList').css('margin-bottom', '0');
		$('#openToggle').removeClass('on');
		$('#openToggle').find('.fa').removeClass('fa-chevron-down');
		$('#openToggle').find('.fa').addClass('fa-chevron-up');
		headerTitle.text("환자목록");
		
		//새창이 아닌 아래에서 올라오는 팝업이므로 굳이 필요없게됨. 혹시나싶어서 남겨둠 
		/* if($('#newPopupPage  #popContentNursingRecode').hasClass('in')){
			if($('#tabCure').hasClass('active') && $('#cureDetail')[0].style['display']=='block'){
				$('#cureDetail').css('display', 'none');
				$('#cureList').css('display', 'block');	
			}else if($('#tabVital').hasClass('active') && $('#vitalInfo')[0].style['display']=='block'){
				$('#vitalInfo').css('display', 'none');
				$('#vitalSearch').css('display', 'block');	
			}else{
				$('#newPopupPage .popup-content').removeClass('in');
				$('#newPopupPage').css('display', 'none');	
				headerTitle.text("환자목록");
			};
		}else{
			$('#newPopupPage .popup-content').removeClass('in');
			$('#newPopupPage').css('display', 'none');
			headerTitle.text("환자목록");
		}; */
		return;
	};
	/* if($('#modalDetailContent').css('display')=='block'&&$('#emrListInfo').css('display')=='none'){
		$('#modalDetailContent').css('display', 'none');
		$('#modalContent').css('display', 'block');
		return;
	}; */
	//dialog 열려있으면 닫기
	if($('.modal').is(':visible')){
		$('.modal').modal('hide');
		return;
	};
	//index 면 종료
	if( (window.location.href).indexOf("login.page") > 0 || (window.location.href).indexOf("index.page") > 0 || (window.location.href).indexOf("first") > 0 ){
		exitApp();
		return;
	};
	history.back();
};


//다국어 사용
var i18n = function(){
	var message = {
		"error500" : "<s:message code='mplus.error.500'/>",
		"unauthenticated" : "<s:message code='mplus.auth.unauthenticated'/>"
	};
	
	this.getMessage = function( code ){
		return message[code];
	};
};

// PACS 경로
var pacsUrl = function(){
	var gePacsUrl = {
			"01" : "<s:eval expression="@mplusConfig['ge.pacs.image.path.01']"/>",
 			"10" : "<s:eval expression="@mplusConfig['ge.pacs.image.path.10']"/>"
	};
	var musePacsUrl = {
			"01" : "<s:eval expression="@mplusConfig['muse.pacs.image.path.01']"/>",
			"10" : "<s:eval expression="@mplusConfig['muse.pacs.image.path.10']"/>"
	};
	
	this.getPacsUrl = function (type, hospitalCd) {
		if( type == 'S' ) {
			return gePacsUrl[hospitalCd];
		} else if( type == 'M' )	{
			return musePacsUrl[hospitalCd];
		}
	};
};
</script>

<link rel="stylesheet" type="text/css" href="<c:url value="/resources/css/font-awesome.css" />" />
<script type="text/javascript" src="<c:url value="/resources/plugins/jquery-number-2.1.6/jquery.number.js" /> "></script>
<script type="text/javascript" src="<c:url value="/resources/js/core/mplus.core.js?version=" /><s:message code="mp.version"/>"></script>

<!-- 부트스트랩 css및 스크립트 -->
<link rel="stylesheet" href="<c:url value="/resources/plugins/bootstrap/css/bootstrap.css" /> ">
<%-- <link rel="stylesheet" href="<c:url value="/resources/plugins/bootstrap/css/bootstrap-select.min.css" /> ">
<script src="<c:url value="/resources/plugins/bootstrap/js/bootstrap-select.min.js" /> "></script> --%>
<script src="<c:url value="/resources/plugins/bootstrap/js/bootstrap.min.js" /> "></script>

<link rel="stylesheet" href="<c:url value="/resources/plugins/jquery-datetimepicker/css/jquery.datetimepicker.min.css" /> ">
<script src="<c:url value="/resources/plugins/jquery-datetimepicker/js/jquery.datetimepicker.full.min.js" /> "></script>

<%-- <link href="<c:url value="/resources/plugins/bootstrap-switch-master/css/bootstrap-switch.min.css"/> rel="stylesheet"> --%>
<%-- <script src="<c:url value="/resources/plugins/bootstrap-switch-master/js/bootstrap-switch.min.js" /> "></script> --%>
<%-- <script src="<c:url value="/resources/plugins/jssor-carousel-slider-for-bootstrap/js/jssor.slider.mini.js" /> "></script> --%>  

<link rel="stylesheet" href="<c:url value="/resources/css/mobile/common.css?version=" /><s:message code="mp.version"/>"/>
<script src="<c:url value="/resources/js/mobile/common.js?version=" /><s:message code="mp.version"/>"></script>
<script type="text/javascript" src="<c:url value="/resources/js/mobile/mplus.common.js?version=" /><s:message code="mp.version"/>"></script>
<script type="text/javascript" src="<c:url value="/resources/js/mobile/patient/patient.js?version=" /><s:message code="mp.version"/>"></script>
<script type="text/javascript" src="<c:url value="/resources/js/mobile/patient/nursing.js?version=" /><s:message code="mp.version"/>"></script> 

<script src="<c:url value="/resources/plugins/bootstrap-datepicker/js/moment.js" /> "></script>
<script src="<c:url value="/resources/plugins/bootstrap-datepicker/js/bootstrap-datepicker.js" /> "></script>
<link rel="stylesheet" href="<c:url value="/resources/plugins/bootstrap-datepicker/css/datepicker.css" /> ">

<script src="<c:url value="/resources/plugins/bootstrap-slider-master/js/bootstrap-slider.js" /> "></script>
<link rel="stylesheet" href="<c:url value="/resources/plugins/bootstrap-slider-master/css/bootstrap-slider.css" /> ">