|
@@ -10,14 +10,6 @@ let mCurrentPage = ${page}
|
|
|
let mTotalCount = 0;
|
|
|
let mReloadTimer = null;
|
|
|
|
|
|
-function getSortType() {
|
|
|
- return localStorage.getItem('dashboardSortType') || "roomAsc";
|
|
|
-}
|
|
|
-
|
|
|
-function setSortType(value) {
|
|
|
- localStorage.setItem('dashboardSortType', value);
|
|
|
-}
|
|
|
-
|
|
|
function getPageSize() {
|
|
|
return localStorage.getItem('dashboardPageSize') || "30";
|
|
|
}
|
|
@@ -119,38 +111,17 @@ function deactiveReloadTimer() {
|
|
|
}
|
|
|
|
|
|
function searchPatients() {
|
|
|
- var keyword = $("#searchKeyword").val();
|
|
|
- var filterValue = 0;
|
|
|
- $('input:checkbox[name="filter"]').each(function() {
|
|
|
- if(this.checked) {
|
|
|
- filterValue = filterValue | this.value
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
- var params = [];
|
|
|
- if (keyword !== "") {
|
|
|
- params.push("searchText=" + encodeURIComponent(keyword));
|
|
|
- }
|
|
|
- if (filterValue !== 0) {
|
|
|
- params.push("filter=" + filterValue);
|
|
|
- }
|
|
|
+ var keyword = $("#searchKeyword").val();
|
|
|
|
|
|
- var url = "./state";
|
|
|
- params.forEach((param, index) => {
|
|
|
- url += (index === 0 ? "?" : "&");
|
|
|
- url += param;
|
|
|
- })
|
|
|
-
|
|
|
- location.href = url;
|
|
|
+ location.href = "./state?searchText="+encodeURIComponent(keyword);
|
|
|
}
|
|
|
|
|
|
function retrieveStateData(page, needInitPagination) {
|
|
|
|
|
|
mCurrentPage = page;
|
|
|
- var searchText = '<c:out value="${searchText}" />';
|
|
|
- var filter = '<c:out value="${filter}" />';
|
|
|
+ var searchText = '<c:out value="${searchText}" />';
|
|
|
var ignoreCache = moment().unix();
|
|
|
- var params = {page: page, size: getPageSize(), sortType: getSortType() === "nameAsc" ? "name" : "room", searchText: searchText, filter: filter, ignoreCache:ignoreCache};
|
|
|
+ var params = {page: page, size: getPageSize(), searchText: searchText, ignoreCache:ignoreCache};
|
|
|
|
|
|
$.ajax({
|
|
|
url : "./api/state",
|
|
@@ -312,13 +283,6 @@ $(document).ready(function() {
|
|
|
}
|
|
|
});
|
|
|
|
|
|
- $("#orderBy").val(getSortType());
|
|
|
- $(document).on("change", "#orderBy", function() {
|
|
|
- var sortType = $(this).find("option:selected").val();
|
|
|
- setSortType(sortType);
|
|
|
- retrieveStateData(1, true);
|
|
|
- });
|
|
|
-
|
|
|
// 초기값 처리
|
|
|
if(getPageSize() === '10000'){
|
|
|
$('.patients-list').addClass('all');
|
|
@@ -340,42 +304,24 @@ $(document).ready(function() {
|
|
|
// $(".playPause").attr('id','playButton');
|
|
|
// $(".playPause").find('i').removeClass('fa-pause').addClass('fa-play');
|
|
|
// $('#reloadIntervalSelect').prop('disabled',false);
|
|
|
- // }
|
|
|
-
|
|
|
- // 필터 초기값 처리
|
|
|
- var filter = parseInt('<c:out value="${filter}" />', 10);
|
|
|
- if (!isNaN(filter)) {
|
|
|
- $('input:checkbox[name="filter"]').each(function() {
|
|
|
- var value = parseInt(this.value, 10);
|
|
|
- if((filter & value) === value){
|
|
|
- this.checked = true;
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
+ // }
|
|
|
|
|
|
$(document).on("click", ".patients-stats", function(event) {
|
|
|
// alert(event.target.id);
|
|
|
|
|
|
- var searchText = '<c:out value="${searchText}" />';
|
|
|
- var filter = '<c:out value="${filter}" />';
|
|
|
+ var searchText = '<c:out value="${searchText}" />';
|
|
|
var currentPage = $("#pagination .active").children("a").text();
|
|
|
var url = $(this).attr("data-url");
|
|
|
if (searchText !== "") {
|
|
|
url += "&refererSearch="+encodeURIComponent(searchText);
|
|
|
- }
|
|
|
- if (filter !== "") {
|
|
|
- url += "&refererFilter="+filter;
|
|
|
}
|
|
|
url += "&refererPage="+currentPage;
|
|
|
-
|
|
|
-
|
|
|
if (event.target.id === "memoLink" || event.target.id === "memoLinkIcon") {
|
|
|
url += "#medicalMemoSection"
|
|
|
}
|
|
|
if (event.target.id === "symptomLink" || event.target.id === "symptomLinkIcon") {
|
|
|
url += "#symptomSection"
|
|
|
}
|
|
|
-
|
|
|
location.href = url;
|
|
|
});
|
|
|
|
|
@@ -488,86 +434,42 @@ $(document).ready(function() {
|
|
|
<div class="card">
|
|
|
<div class="card-header">
|
|
|
<div class="row">
|
|
|
- <!-- row content start -->
|
|
|
- <!-- 알람 표시 기준 start -->
|
|
|
<div class="col-lg-12 mb-3">
|
|
|
<h1 class="h4">
|
|
|
대시보드
|
|
|
<span class="small showLegend ml-2" data-toggle="modal" data-target="#legendGuide"><i class="mdi mdi-comment-question-outline"></i> 알람 표시 기준</span>
|
|
|
</h1>
|
|
|
</div>
|
|
|
- <!-- 알람 표시 기준 end -->
|
|
|
-
|
|
|
- <div class="listTools col-lg-8 form-horizontal">
|
|
|
- <div class="entrySelect mb-2">
|
|
|
- <span>보기</span>
|
|
|
- <span>
|
|
|
- <select id="viewEntry" class="form-control">
|
|
|
+ <div class="col-lg-6 entrySelect">
|
|
|
+ <label>
|
|
|
+ <select id="viewEntry" class="custom-select">
|
|
|
<option value="18">18명</option>
|
|
|
<option value="30" selected>30명</option>
|
|
|
<option value="60">60명</option>
|
|
|
<option value="120">120명</option>
|
|
|
<option value="10000">전체</option>
|
|
|
</select>
|
|
|
- </span>
|
|
|
- </div>
|
|
|
- <div class="orderBy mb-2">
|
|
|
- <span>정렬</span>
|
|
|
- <span>
|
|
|
- <select id="orderBy" class="form-control">
|
|
|
- <option value="roomAsc" selected>호실순</option>
|
|
|
- <option value="nameAsc">이름순</option>
|
|
|
- </select>
|
|
|
- </span>
|
|
|
+ </label>
|
|
|
+ 보기
|
|
|
</div>
|
|
|
- <div class="reloadInterval mb-2 form-horizontal">
|
|
|
- <span>갱신</span>
|
|
|
- <span>
|
|
|
- <select id="reloadIntervalSelect" class="form-control" onchange="changeReloadInterval()">
|
|
|
- <option>10초</option>
|
|
|
- <option selected>30초</option>
|
|
|
- <option>60초</option>
|
|
|
- </select>
|
|
|
- <button type="button" id="playButton" class="playPause btn btn-primary">
|
|
|
- <i class="fas fa-sync-alt" style="width: 14px"></i>
|
|
|
- </button>
|
|
|
- </span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="searchTools col-lg-4 form-horizontal">
|
|
|
- <div class="searchPatient mb-2">
|
|
|
- <span>검색</span>
|
|
|
- <input type="text" class="form-control w150" id="searchKeyword" placeholder="호실 or 환자명" value="${searchText}" onkeyup="if(event.keyCode===13){searchPatients()}"/>
|
|
|
- <button id="searchKeywordBtn" class="btn btn-primary" onclick="searchPatients()"><i class="mdi mdi-magnify"></i></button>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-
|
|
|
- <!-- 필터 start -->
|
|
|
- <div class="filters col-lg-12">
|
|
|
- <div class="filtersContainer">
|
|
|
- <span class="filterTitle"><i class="mdi mdi-24px mdi-filter-plus-outline"></i> 필터</span>
|
|
|
- <span class="filterList">
|
|
|
- <label class="filterItem"><input type="checkbox" id= "filter1" name="filter" value="1" /><span>신규 입소</span></label>
|
|
|
- <label class="filterItem"><input type="checkbox" id= "filter2" name="filter" value="2" /><span>위험 환자</span></label>
|
|
|
- <label class="filterItem"><input type="checkbox" id= "filter4" name="filter" value="4" /><span>체온 미입력</span></label>
|
|
|
- <label class="filterItem"><input type="checkbox" id= "filter8" name="filter" value="8" /><span>혈압 미입력</span></label>
|
|
|
- <label class="filterItem"><input type="checkbox" id= "filter16" name="filter" value="16" /><span>맥박 미입력</span></label>
|
|
|
- <label class="filterItem"><input type="checkbox" id= "filter32" name="filter" value="32" /><span>산소포화도 미입력</span></label>
|
|
|
- <label class="filterItem"><input type="checkbox" id= "filter64" name="filter" value="64" /><span>혈당 미입력</span></label>
|
|
|
- <label class="filterItem"><input type="checkbox" id= "filter128" name="filter" value="128" /><span>임상증상 미입력</span></label>
|
|
|
- </span>
|
|
|
- <span class="filterApply"
|
|
|
- ><button id="filterApply" class="btn btn-primary" onclick="searchPatients()"><i class="mdi mdi-filter-outline"></i> 적용</button></span
|
|
|
- >
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <!-- 필터 end -->
|
|
|
-
|
|
|
- <!-- row content end -->
|
|
|
+ <div class="col-lg-6 search text-right">
|
|
|
+ <label>
|
|
|
+ <select id="reloadIntervalSelect" class="custom-select" onchange="changeReloadInterval()">
|
|
|
+ <option value="10">10초</option>
|
|
|
+ <option value="30" selected>30초</option>
|
|
|
+ <option value="60">60초</option>
|
|
|
+ </select>
|
|
|
+ </label>
|
|
|
+ <label>
|
|
|
+ <button type="button" id="playButton" class="playPause btn btn-primary">
|
|
|
+ <i class="fas fa-play"></i>
|
|
|
+ </button>
|
|
|
+ </label>
|
|
|
+ <input type="text" class="form-control w150" id="searchKeyword" placeholder="호실 or 환자명" value="${searchText}" onkeyup="if(event.keyCode===13){searchPatients()}">
|
|
|
+ <button id="searchKeywordBtn" class="btn btn-primary" onclick="searchPatients()">검색</button>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
<div class="card-body">
|
|
|
<ul class="row patients-list">
|
|
|
<c:choose>
|