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

<%-- <jsp:include page="./template/mobile_poc/header.jsp" flush="false" /> --%>

<div id="wrapper">
	<div class="bg"></div>
	<header id="header" class="fixed-top">
		<div class="page-header">
      <div class="pull-left back_btn"><b href="#" id="all_menu"><span class="glyphicon glyphicon-menu-hamburger" aria-hidden="true"></span></a></div>
		  <h2 class="text-center">채혈정보</h2>
		</div>
	</header>
	<div class="container">
		<div class="s_box" style="width: 97% !important">
			<div class="panel info_box">
				<div class="panel-heading">
					<div class="row">
					  <div class="col-xs-4 w-30">
						<input class="form-control" type="number" id="txtBleedingPatientSearch" placeholder="환자번호" max="9999999"  />
					  </div>
					  <div class="col-xs-8 pl-0 pr-0">
						<span class="patient-name">환자명</span>
					  </div>
					</div>
				</div>
				  <div class="panel-body" style="font-size: 14px; font-weight: normal;">
				  	<p id="patientInfo">
            환자정보
            </p>
            <p id="todayDate">
              현재 날짜 : 
              </p>
					  <!--span class="patient-gender-age">성별/나이</span>
					  <span>&nbsp;</span><span class="patient-birthDt" >생년월일</span></p> -->
					  <p>
            <strong>실시부서</strong>
            <span>&nbsp;:&nbsp;</span>
            <span class="dept-name">실시부서</span>
            <span>&nbsp;|&nbsp;</span>
            <span class="user-name">실시자명</span>
            <span class="user-code">(사번)</span>
            </p>
				 </div>
			</div>
		</div>
		
	</div>
    <div class="line row trans" style="margin-top: 1.5em !important;">
        <div class="col-xs-4 px-1">
            <button type="button" class="btn btn-secondary btn-block " id="btnBleedingList" >실시조회</button>
        </div>
        <div class="col-xs-4 px-1">
            <button type="button" class="btn btn-secondary btn-block " id="btnCancleList" data-toggle="modal" data-target="#Modal01" >취소조회</button>
        </div>
        <div class="col-xs-4 px-1 ">
            <button type="button" class="btn btn-secondary btn-block " id="btnBleedingAct" >실시/취소</button>
        </div>
    </div>

	<div id="con">
		<div class="default text-center" id="barcodeGroup">
			<button type="button" class="btn btn-default btn-lg" id="btnBarcodeScan"><h3><span class="glyphicon glyphicon-barcode" aria-hidden="true"></span></h3></button>
			<p><h4>환자 바코드를 스캔해주세요.</h4></p>
    </div>
    <ul class="list-group" id="bleedingListGroup">
		  
		</ul>
	</div>
</div>


<!--모달창--->
<div class="modal basic" tabindex="-1" role="dialog" id="alertBarcodeCheck">
  <div class="modal-dialog" role="document">
    <div class="modal-content">      
      <div class="modal-body text-center align-middle">
        <h4>채혈실시 바코드가 아닙니다.</h4>
		<p>바코드를 다시 확인해주세요.</p>
      </div>
      <div class="modal-footer text-center">
        <button type="button" class="btn btn-ok btn-block btn-lg" data-dismiss="modal" aria-label="Close">확인</button>
      </div>
    </div>
  </div>
</div>

<div class="modal basic" tabindex="-1" role="dialog" id="alertEmptyText">
  <div class="modal-dialog" role="document">
    <div class="modal-content">      
      <div class="modal-body text-center align-middle">
        <h4>입력된 환자번호가 없습니다.</h4>
		<p>환자번호를 다시 확인해주세요.</p>
      </div>
      <div class="modal-footer text-center">
        <button type="button" class="btn btn-ok btn-block btn-lg" data-dismiss="modal" aria-label="Close">확인</button>
      </div>
    </div>
  </div>
</div>

<div class="modal basic" tabindex="-1" role="dialog" id="alertEmptyPatient">
  <div class="modal-dialog" role="document">
    <div class="modal-content">      
      <div class="modal-body text-center align-middle">
		    <h4>환자정보 조회 실패</h4>
		<p>환자정보 조회에 실패하였습니다.</p>
      </div>
      <div class="modal-footer text-center">
        <button type="button" class="btn btn-ok btn-block btn-lg" data-dismiss="modal" aria-label="Close">확인</button>
      </div>
    </div>
  </div>
</div>

<div class="modal basic" tabindex="-1" role="dialog" id="alertActError">
  <div class="modal-dialog" role="document">
    <div class="modal-content">      
      <div class="modal-body text-center align-middle">
		    <h4>처리 중 오류가 발생하였습니다.</h4>
		<p>버튼을 다시 클릭해주세요.</p>
      </div>
      <div class="modal-footer text-center">
        <button type="button" class="btn btn-ok btn-block btn-lg" data-dismiss="modal" aria-label="Close">확인</button>
      </div>
    </div>
  </div>
</div>

<div class="modal basic" tabindex="-1" role="dialog" id="alertSpecimen">
  <div class="modal-dialog" role="document">
    <div class="modal-content">      
      <div class="modal-body text-center align-middle">
		    <h4>실시할 수 없는 채혈 바코드 입니다.</h4>
		    <p></p>
      </div>
      <div class="modal-footer text-center">
        <button type="button" class="btn btn-ok btn-block btn-lg" data-dismiss="modal" aria-label="Close">확인</button>
      </div>
    </div>
  </div>
</div>

<div class="modal basic" tabindex="-1" role="dialog" id="alertEmptySpecimen">
  <div class="modal-dialog" role="document">
    <div class="modal-content">      
      <div class="modal-body text-center align-middle">
		    <h4>선택된 검체가 없습니다.</h4>
		<p>검체를 선택해주세요.</p>
      </div>
      <div class="modal-footer text-center">
        <button type="button" class="btn btn-ok btn-block btn-lg" data-dismiss="modal" aria-label="Close">확인</button>
      </div>
    </div>
  </div>
</div>

<div class="modal basic" tabindex="-1" role="dialog" id="alertSuccess">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-body text-center align-middle">
        <h4></h4>
		<p>건 처리가 완료되었습니다. </p>
      </div>
      <div class="modal-footer text-center">
        <button type="button" class="btn btn-ok btn-block btn-lg" data-dismiss="modal" aria-label="Close">확인</button>
      </div>
    </div>
  </div>
</div>


<script type="text/javascript" src="<c:url value="/resources/js/mobile_poc/bleeding.js?version=" /><s:message code="mp.version"/>"></script>

<script type="text/javascript">
$(document).ready(function () {
  //==== 페이지 기본 설정 { ====

  //==== 페이지 기본 설정 } ====

  //==== 서비스 객체 { ====
  var mplusSafetyBleeding = new mplus_safety_bleeding();
  mplusSafetyBleeding.setGlobal(mplusSafetyBleeding);
  mplusSafetyBleeding.init();
  
  //==== 서비스 객체 } ====
  curPage = mplusSafetyBleeding;
});

this.barcodeCallback = function(data){
  curPage.barcodeCallback(data);
};

var curPage;
</script>

<%-- <%@include file="./tail.jsp"%> --%>
<%-- <jsp:include page="./tail.jsp" flush="false" /> --%>
