Quellcode durchsuchen

Merge branch 'simplatform' of http://wcollector.idatabank.com:5230/dbs289/LifeCenter into simplatform

* 'simplatform' of http://wcollector.idatabank.com:5230/dbs289/LifeCenter:
  [phr] 상태현황 최초 로드 방식 변경.
  [phr] 상태현황 페이징 오류 수정.
  [phr] css 수정.
  [phr] 진료 관리 화면 수정.
maengje vor 4 Jahren
Ursprung
Commit
662bce7731

+ 262 - 114
src/main/java/com/lemon/lifecenter/controller/ClinicController.java

@@ -5,15 +5,18 @@ import java.util.List;
 
 import javax.servlet.http.HttpServletRequest;
 
+import org.json.JSONObject;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.servlet.ModelAndView;
 
 import com.lemon.lifecenter.common.LifeCenterController;
 import com.lemon.lifecenter.common.LifeCenterSessionController;
+import com.lemon.lifecenter.dto.PatientMemoDTO;
 import com.lemon.lifecenter.dto.PatientPHRHistoryDTO;
 import com.lemon.lifecenter.dto.PatientPHRLatestDTO;
 import com.lemon.lifecenter.dto.PatientSymptomSimDTO;
@@ -24,126 +27,271 @@ import com.lemon.lifecenter.service.PatientService;
 @Controller
 @RequestMapping("/clinic")
 public class ClinicController extends LifeCenterController {
-	
+
 	@Autowired
 	private ClinicService clinicService;
-	
+
 	@Autowired
 	private PHRService phrService;
-	
+
 	@Autowired
 	private PatientService patientService;
-	
+
 	final int pageSize = 30;
 
-    @RequestMapping("/state")
-    public ModelAndView clinicState(
-    		HttpServletRequest request,
-    		@RequestParam(value="page", required=true, defaultValue="1") int page,
-    		@RequestParam(value="searchText", required=false, defaultValue="") String searchText) {
-    	
-    	System.err.println( "page : " + page );
-    	
-    	String centerCode = "0000";//LifeCenterSessionController.getSession( request, "sesCenterCode" );
-        
-    	PatientPHRLatestDTO dto = new PatientPHRLatestDTO();
-        dto.setLimit( ( Integer.valueOf( page ) - 1 ) * pageSize );
-        dto.setLimitMax( pageSize );
-        dto.setCenterCode(centerCode);
-        dto.setSearchText(searchText);
-        
-        int total = clinicService.selectPHRLatestCount(dto);
-        List<PatientPHRLatestDTO> result = new ArrayList<PatientPHRLatestDTO>();
-
-        if (total > 0) {
-            result = clinicService.selectPHRLatestList(dto);
-        }
-
-        ModelAndView mv = setMV("clinic/state");
-        
-        mv.addObject("searchText", searchText);
-        mv.addObject("total", total);
-        mv.addObject("items", result);
-        
-        return mv;
-    }
-    
-    @RequestMapping("/info")
-    public ModelAndView patientInfo(
-    		@RequestParam(value="patientIdx", required=true, defaultValue="") int patientIdx,
-    		@RequestParam(value="phrType", required=true, defaultValue="temperature") String phrType) {
-    	
-    	String centerCode = "0000";//LifeCenterSessionController.getSession( request, "sesCenterCode" );
-        
-    	PatientPHRHistoryDTO dto = new PatientPHRHistoryDTO();
-        dto.setPhrType(phrType);
-        dto.setPatientIdx(patientIdx);
-        
-        int total = phrService.selectPHRHistoryCount(dto);
-        List<PatientPHRHistoryDTO> result = new ArrayList<PatientPHRHistoryDTO>();
-
-        if (total > 0) {
-            result = phrService.selectPHRHistoryList(dto);
-        }
-    	
-    	
-        ModelAndView mv = setMV("clinic/info");
-        
-        mv.addObject("patientIdx", patientIdx);
-        mv.addObject("phrType", phrType);
-        mv.addObject("phrTotal", total);
-        mv.addObject("phrItems", result);
-
-        return mv;
-    }
-    
-    @RequestMapping("/api/state")
-    public @ResponseBody List<PatientPHRLatestDTO> state(
-    		HttpServletRequest request,
-    		@RequestParam(value="page", required=true, defaultValue="1") int page,
-    		@RequestParam(value="searchText", required=false, defaultValue="") String searchText) {
-    	
-    	System.err.println( "page : " + page );
-    	
-    	String centerCode = "0000";//LifeCenterSessionController.getSession( request, "sesCenterCode" );
-        
-    	PatientPHRLatestDTO dto = new PatientPHRLatestDTO();
-        dto.setLimit( ( Integer.valueOf( page ) - 1 ) * pageSize );
-        dto.setLimitMax( pageSize );
-        dto.setCenterCode(centerCode);
-        dto.setSearchText(searchText);
-        
-        int total = clinicService.selectPHRLatestCount(dto);
-        List<PatientPHRLatestDTO> result = new ArrayList<PatientPHRLatestDTO>();
-
-        if (total > 0) {
-            result = clinicService.selectPHRLatestList(dto);
-        }
-        
-        return result;
-    }
-    
-    @RequestMapping("/api/phrDatas")
-    public @ResponseBody List<PatientPHRHistoryDTO> phrDatas(
-    		@RequestParam(value="patientIdx", required=true, defaultValue="") int patientIdx,
-    		@RequestParam(value="phrType", required=true, defaultValue="temperature") String phrType) {
-    	
-    	PatientPHRHistoryDTO dto = new PatientPHRHistoryDTO();
-    	dto.setPatientIdx(patientIdx);
-        dto.setPhrType(phrType);
-        
-    	return phrService.selectPHRHistoryList(dto);
-    	
-    }
-    
-    @RequestMapping("/api/symptomDatas")
-    public @ResponseBody List<PatientSymptomSimDTO> symptomDatas(
-    		@RequestParam(value="patientIdx", required=true, defaultValue="") int patientIdx) {
-    	
-    	PatientSymptomSimDTO dto = new PatientSymptomSimDTO();
-    	dto.setPatientIdx(patientIdx);
-        
-    	return phrService.selectSymptomList(dto);
-    	
-    }
+	@RequestMapping("/state")
+	public ModelAndView clinicState(HttpServletRequest request,
+			@RequestParam(value = "page", required = true, defaultValue = "1") int page,
+			@RequestParam(value = "searchText", required = false, defaultValue = "") String searchText) {
+
+		boolean makePhrData = false;
+		boolean makeSymptomData = false;
+		boolean makeMemoData = false;
+
+		if (makePhrData) {
+			for (int i = 0; i < 2000; i++) {
+				java.util.Random random = new java.util.Random();
+				random.setSeed(System.currentTimeMillis());
+
+				int idx = random.nextInt(2344) + 1;
+				while ((idx > 56 && idx < 68) || (idx > 69 && idx < 114) || (idx > 145 && idx < 170)
+						|| (idx > 385 && idx < 388)) {
+					idx = random.nextInt(2344) + 1;
+				}
+
+				String[] typeArray = { "temperature", "oxygenSaturation", "pulseRate", "systolicBloodPressure",
+						"diastolicBloodPressure", "bloodSugar" };
+				int type = random.nextInt(5);
+				int value = random.nextInt(100);
+
+				PatientPHRHistoryDTO dto2 = new PatientPHRHistoryDTO();
+
+				dto2.setPatientIdx(idx);
+				dto2.setPhrType(typeArray[type]);
+				dto2.setPhrValue(value);
+				dto2.setRecordedByName("홍길동");
+
+				phrService.insertPHR(dto2);
+
+				System.err.println("idx : " + idx);
+			}
+		}
+
+		if (makeSymptomData) {
+			java.util.Random random = new java.util.Random();
+			random.setSeed(System.currentTimeMillis());
+
+			int idx = random.nextInt(2344) + 1;
+			String[] typeArray = { "temperature", "oxygenSaturation", "pulseRate", "systolicBloodPressure",
+					"diastolicBloodPressure", "bloodSugar" };
+			int type = random.nextInt(5);
+			int value = random.nextInt(100);
+
+			PatientPHRHistoryDTO dto2 = new PatientPHRHistoryDTO();
+
+			dto2.setPatientIdx(idx);
+			dto2.setPhrType(typeArray[type]);
+			dto2.setPhrValue(value);
+			dto2.setRecordedByName("홍길동");
+
+			phrService.insertPHR(dto2);
+		}
+
+		System.err.println("page : " + page);
+
+		String centerCode = "0000";// LifeCenterSessionController.getSession( request, "sesCenterCode" );
+
+		PatientPHRLatestDTO dto = new PatientPHRLatestDTO();
+		dto.setLimit((Integer.valueOf(page) - 1) * pageSize);
+		dto.setLimitMax(pageSize);
+		dto.setCenterCode(centerCode);
+		dto.setSearchText(searchText);
+
+		int total = clinicService.selectPHRLatestCount(dto);
+		List<PatientPHRLatestDTO> result = new ArrayList<PatientPHRLatestDTO>();
+
+		if (total > 0) {
+			result = clinicService.selectPHRLatestList(dto);
+		}
+
+		ModelAndView mv = setMV("clinic/state");
+
+		mv.addObject("searchText", searchText);
+		mv.addObject("total", total);
+		mv.addObject("items", result);
+
+		return mv;
+	}
+
+	@RequestMapping("/info")
+	public ModelAndView patientInfo(
+			@RequestParam(value = "patientIdx", required = true, defaultValue = "") int patientIdx,
+			@RequestParam(value = "phrType", required = true, defaultValue = "temperature") String phrType) {
+
+		String centerCode = "0000";// LifeCenterSessionController.getSession( request, "sesCenterCode" );
+
+		PatientPHRHistoryDTO dto = new PatientPHRHistoryDTO();
+		dto.setPhrType(phrType);
+		dto.setPatientIdx(patientIdx);
+
+		int total = phrService.selectPHRHistoryCount(dto);
+		List<PatientPHRHistoryDTO> result = new ArrayList<PatientPHRHistoryDTO>();
+
+		if (total > 0) {
+			result = phrService.selectPHRHistoryList(dto);
+		}
+
+		ModelAndView mv = setMV("clinic/info");
+
+		mv.addObject("patientIdx", patientIdx);
+		mv.addObject("phrType", phrType);
+		mv.addObject("phrTotal", total);
+		mv.addObject("phrItems", result);
+
+		return mv;
+	}
+
+	@RequestMapping("/api/state")
+	public @ResponseBody List<PatientPHRLatestDTO> state(HttpServletRequest request,
+			@RequestParam(value = "page", required = true, defaultValue = "1") int page,
+			@RequestParam(value = "searchText", required = false, defaultValue = "") String searchText) {
+
+		System.err.println("page : " + page);
+
+		String centerCode = "0000";// LifeCenterSessionController.getSession( request, "sesCenterCode" );
+
+		PatientPHRLatestDTO dto = new PatientPHRLatestDTO();
+		dto.setLimit((Integer.valueOf(page) - 1) * pageSize);
+		dto.setLimitMax(pageSize);
+		dto.setCenterCode(centerCode);
+		dto.setSearchText(searchText);
+
+		int total = clinicService.selectPHRLatestCount(dto);
+		List<PatientPHRLatestDTO> result = new ArrayList<PatientPHRLatestDTO>();
+
+		if (total > 0) {
+			result = clinicService.selectPHRLatestList(dto);
+		}
+
+		return result;
+	}
+
+	@RequestMapping("/api/phrDatas")
+	public @ResponseBody List<PatientPHRHistoryDTO> phrDatas(
+			@RequestParam(value = "patientIdx", required = true, defaultValue = "") int patientIdx,
+			@RequestParam(value = "phrType", required = true, defaultValue = "temperature") String phrType) {
+
+		PatientPHRHistoryDTO dto = new PatientPHRHistoryDTO();
+		dto.setPatientIdx(patientIdx);
+		dto.setPhrType(phrType);
+
+		return phrService.selectPHRHistoryList(dto);
+
+	}
+
+	@RequestMapping(value = "/api/phrData", method = RequestMethod.POST)
+	public @ResponseBody String insertPhrData(
+			@RequestParam(value = "patientIdx", required = true, defaultValue = "") int patientIdx,
+			@RequestParam(value = "phrType", required = true, defaultValue = "") String phrType,
+			@RequestParam(value = "phrValue", required = true, defaultValue = "") float phrValue) {
+
+		try {
+			PatientPHRHistoryDTO dto = new PatientPHRHistoryDTO();
+
+			dto.setPatientIdx(patientIdx);
+			dto.setPhrType(phrType);
+			dto.setPhrValue(phrValue);
+			dto.setRecordedByName("홍길동");
+
+			phrService.insertPHR(dto);
+
+			JSONObject json = new JSONObject();
+
+			json.put("code", "00");
+			json.put("message", "");
+
+			return json.toString();
+		} catch (Exception e) {
+			JSONObject json = new JSONObject();
+
+			json.put("code", "01");
+			json.put("message", e.getLocalizedMessage());
+
+			return json.toString();
+		}
+	}
+
+	@RequestMapping("/api/symptomDatas")
+	public @ResponseBody List<PatientSymptomSimDTO> symptomDatas(
+			@RequestParam(value = "patientIdx", required = true, defaultValue = "") int patientIdx) {
+
+		PatientSymptomSimDTO dto = new PatientSymptomSimDTO();
+		dto.setPatientIdx(patientIdx);
+
+		return phrService.selectSymptomList(dto);
+
+	}
+
+	@RequestMapping(value = "/api/symptomData", method = RequestMethod.POST)
+	public @ResponseBody String symptomData(
+			@RequestParam(value = "patientIdx", required = true, defaultValue = "") int patientIdx,
+			@RequestParam(value = "phrType", required = true, defaultValue = "") String phrType,
+			@RequestParam(value = "phrValue", required = true, defaultValue = "") float phrValue) {
+
+		try {
+			PatientSymptomSimDTO dto = new PatientSymptomSimDTO();
+
+			phrService.insertSymptom(dto);
+
+			JSONObject json = new JSONObject();
+
+			json.put("code", "00");
+			json.put("message", "");
+
+			return json.toString();
+		} catch (Exception e) {
+			JSONObject json = new JSONObject();
+
+			json.put("code", "01");
+			json.put("message", e.getLocalizedMessage());
+
+			return json.toString();
+		}
+	}
+
+	@RequestMapping("/api/memoDatas")
+	public @ResponseBody List<PatientMemoDTO> memoDatas(
+			@RequestParam(value = "patientIdx", required = true, defaultValue = "") int patientIdx) {
+
+		PatientMemoDTO dto = new PatientMemoDTO();
+
+		return clinicService.selectMemoList(dto);
+	}
+
+	@RequestMapping(value = "/api/memoData", method = RequestMethod.POST)
+	public @ResponseBody String memoData(
+			@RequestParam(value = "patientIdx", required = true, defaultValue = "") int patientIdx,
+			@RequestParam(value = "phrType", required = true, defaultValue = "") String phrType,
+			@RequestParam(value = "phrValue", required = true, defaultValue = "") float phrValue) {
+
+		try {
+			PatientMemoDTO dto = new PatientMemoDTO();
+
+			clinicService.insertMemo(dto);
+
+			JSONObject json = new JSONObject();
+
+			json.put("code", "00");
+			json.put("message", "");
+
+			return json.toString();
+		} catch (Exception e) {
+			JSONObject json = new JSONObject();
+
+			json.put("code", "01");
+			json.put("message", e.getLocalizedMessage());
+
+			return json.toString();
+		}
+	}
 }

+ 115 - 19
src/main/webapp/WEB-INF/jsp/clinic/info.jsp

@@ -5,6 +5,61 @@
 <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.4/Chart.min.js"></script>
 <script>
 
+function handlePhrData() {
+	var phrType = $("#phrTypeSelect option:selected").val();
+	var phrValue = "";
+	if (phrType === "bloodPressure") {
+		phrValueSystolic = $("#phrValueSystolic").val();
+		phrValueDiastolic = $("#phrValueDiastolic").val();
+		phrValuePurse = $("#phrValuePurse").val();
+
+		if (!phrValueSystolic || phrValueSystolic.length === 0) {
+			alert("수축기 혈압을 입력해 주세요.");
+			return;
+		}
+		if (!phrValueDiastolic || phrValueDiastolic.length === 0) {
+			alert("이완기 혈압을 입력해 주세요.");
+			return;
+		}
+		if (!phrValuePurse || phrValuePurse.length === 0) {
+			alert("맥박을 입력해 주세요.");
+			return;
+		}
+
+		createPhrData(${patientIdx}, "systolicBloodPressure", phrValueSystolic);
+		createPhrData(${patientIdx}, "diastolicBloodPressure", phrValueDiastolic);
+		createPhrData(${patientIdx}, "pulseRate", phrValuePurse);
+	}
+	else {
+		if (!phrValuePurse || phrValuePurse.length === 0) {
+			alert("값 입력해 주세요.");
+			return;
+		}
+		phrValue = $("#phrValue").val();
+
+		createPhrData(${patientIdx}, phrType, phrValue);
+	}
+}
+
+function createPhrData(patienIdx, phrType, phrValue) {
+	$.ajax({
+        url      : "./api/phrData",
+        data     : {patineIdx: patienIdx, phrType: phrType, phrValue: phrValue},
+        method   : "POST",
+        dataType : "json",
+        success  : function( datas ){
+            console.log(datas);
+
+            retrievePhrData();
+        },
+        error : function(){
+            console.error('error!');
+        }
+    }).done( function(){
+        console.log('done!');
+    });
+}
+
 function retrievePhrData() {
 	var phrType = $("#phrTypeSelect option:selected").val();
 	var phrName = $("#phrTypeSelect option:selected").text();
@@ -33,7 +88,7 @@ function retrievePhrData() {
 					contents += "<tr>";
 					contents += "<td>" + d.createDate + "</td>";
 					contents += "<td><span class='text-danger'>" + d.phrValue + "</span></td>";
-					contents += "<td>" + d.recordedBy + "</td>";
+					contents += "<td>" + d.recordedByName+"("+d.recordedById+")</td>";
 					contents += "</tr>";
 				});
 			};
@@ -160,6 +215,56 @@ $(document).ready(function() {
 			retrieveSymptomData();
 		}
 	});
+
+	// phrData 기록 추가 클릭 이벤트
+	$(document).on('click','[data-target="#defaultModalPrimary_1"]',function(){
+		console.log("click!");
+		var selectData = $('#phrTypeSelect').find('option:selected').val();
+		console.log(selectData);
+		var healthInfoHTML = '';
+		if(selectData == 'temperature'){
+			healthInfoHTML += '<th>체온</th>';
+			healthInfoHTML += '<td>';
+			healthInfoHTML += '	<div class="form-group mb-xl-0">';
+			healthInfoHTML += '		<input id="phrValue" class="form-control" type="text" placeholder="체온 입력">';
+			healthInfoHTML += '	</div>';
+			healthInfoHTML += '</td>';
+		}
+		if(selectData == 'bloodPressure'){
+			healthInfoHTML += '<th>혈압/맥박</th>';
+			healthInfoHTML += '<td>';
+			healthInfoHTML += '	<div class="form-group mb-xl-0">';
+			healthInfoHTML += '		<input id="phrValueSystolic" class="form-control mb-2" type="text" placeholder="수축기 혈압 입력">';
+			healthInfoHTML += '		<input id="phrValueDiastolic" class="form-control mb-2" type="text" placeholder="이완기 혈압 입력">';
+			healthInfoHTML += '		<input id="phrValuPulse" class="form-control" type="text" placeholder="맥박 입력">';
+			healthInfoHTML += '	</div>';
+			healthInfoHTML += '</td>';
+		}
+		if(selectData == 'oxygenSaturation'){
+			healthInfoHTML += '<th>산소포화도</th>';
+			healthInfoHTML += '<td>';
+			healthInfoHTML += '	<div class="form-group mb-xl-0">';
+			healthInfoHTML += '		<input id="phrValue" class="form-control" type="text" placeholder="산소포화도 입력">';
+			healthInfoHTML += '	</div>';
+			healthInfoHTML += '</td>';
+		}
+		if(selectData == 'sugar'){
+			healthInfoHTML += '<th>혈당</th>';
+			healthInfoHTML += '<td>';
+			healthInfoHTML += '	<div class="form-group mb-xl-0">';
+			healthInfoHTML += '		<input id="phrValue" class="form-control" type="text" placeholder="혈당 입력">';
+			healthInfoHTML += '	</div>';
+			healthInfoHTML += '</td>';
+		}
+		else {
+
+		}
+		$('.healthInfo').html(healthInfoHTML);
+		setTimeout(function (){
+			$('.healthInfo').find('.form-group input:first-child').focus();
+		}, 500);
+		
+	});
 });
 
 
@@ -348,20 +453,18 @@ $(document).ready(function() {
 					<div class="row">
 						<div class="col-12">
 							<div class="card">
-								<nav class="tab-nav">
-									<ul>
-										<li class="tab-item active" tabindex="#tabPhr">건강정보이력</li>
-										<li class="tab-item" tabindex="#tabSymptom">임상증상</li>
-										<li class="tab-item" tabindex="#tabMemo">의료진 메모</li>
-									</ul>
-								</nav>
+								<ul class="tab-nav">
+									<li class="tab-item active" tabindex="#tabPhr">건강정보이력</li>
+									<li class="tab-item" tabindex="#tabSymptom">임상증상</li>
+									<li class="tab-item" tabindex="#tabMemo">의료진 메모</li>
+								</ul>
 								<div id="tabPhr" class="tab in">
 									<div class="card-header">
 										<h1 class="h4">
 											- 건강정보 조회 <label> <select class="custom-select ml-1 form-control" id=phrTypeSelect name="inputState" onchange="retrievePhrData()">
 													<option value="temperature" selected>체온</option>
+													<option value="pulseRate">혈압</option>
 													<option value="oxygenSaturation">산소포화도</option>
-													<option value=pulseRate>혈압</option>
 											</select>
 											</label> <label class="ml-1">
 												<button type="button" class="btn btn-primary ml-2" data-toggle="modal" data-target="#defaultModalPrimary_1">기록추가</button>
@@ -386,23 +489,16 @@ $(document).ready(function() {
 																<th>기록자</th>
 																<td>
 																	<div class="form-group mb-xl-0">
-																		<input class="form-control" type="text">
-																	</div>
-																</td>
-															</tr>
-															<tr>
-																<th>건강정보</th>
-																<td>
-																	<div class="form-group mb-xl-0">
-																		<input class="form-control" type="text">
+																		<input class="form-control" type="text" value="${data._SES_NAME}(${data._SES_ID})" disabled>
 																	</div>
 																</td>
 															</tr>
+															<tr class="healthInfo"></tr>
 														</table>
 													</div>
 													<div class="modal-footer">
 														<button type="button" class="btn btn-outline-primary" data-dismiss="modal">취소</button>
-														<button type="button" class="btn btn-primary">등록</button>
+														<button type="button" class="btn btn-primary" onclick="handlePhrData()">등록</button>
 													</div>
 												</div>
 											</div>

+ 15 - 12
src/main/webapp/WEB-INF/jsp/clinic/state.jsp

@@ -3,12 +3,13 @@
 <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
 <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
 <jsp:include page="${data._INCLUDE}/header.jsp"></jsp:include>
+<link rel="stylesheet" href="/resources/bower_components/mdi/css/materialdesignicons.min.css">
 <script src="/resources/bower_components/jquery-bootpag-master/lib/jquery.bootpag.min.js"></script>
 <script>
 
 var totalList = ${total}; // 저장된 데이터 항목 수
 var viewEntry = 30;		// 한 화면에 표시되는 갯수 
-var totalPage = totalList / viewEntry;
+var totalPage = Math.ceil(totalList / viewEntry);
 var reloadIntervalTime = 30;	// 
 var reloadTimer = null;
 
@@ -73,9 +74,9 @@ function retrieveStateData(page) {
 				html = "";
 				datas.forEach(d => {
 					var danger = d.temperature > 37 ? "danger" : "";
-					var temperature_step_one = "";
-					var systolicBloodPressure_step_one = "";
-					var oxygenSaturation_step_one = "";
+					var temperature_step = d.temperature > 37 ? "step_two" : "step_one";
+					var systolicBloodPressure_step = d.systolicBloodPressure > 37 ? "step_two" : "step_one";
+					var oxygenSaturation_step = d.oxygenSaturation > 37 ? "step_two" : "step_one";
 					
 					var temperature = (d.temperature || "--") + '℃';
 					var bloodPressure = (d.systolicBloodPressure || "--") + " / " + (d.diastolicBloodPressure || "--");
@@ -86,15 +87,15 @@ function retrieveStateData(page) {
 					html += '			<a href="">'+d.roomNumber+'('+d.patientName+')</a>';
 					html += '			<div class="check">';
 					html += '				<ul><li>';
-					html += '					<a href="javscript:;" class="symptom"><i class="align-middle mr-2 fas fa-fw fa-user-plus"></i></a>';
+					html += '					<a href="javscript:;" class="symptom"><i class="align-middle ml-2 fas fa-fw fa-user-plus"></i></a>';
 					html += '				</li></ul>';
 					html += '			</div>';
 					html += '		</div>';
 					html += '      <div class="stats '+danger+'">';
 					html += '			<ul>';
-					html += '				<li class="fever '+temperature_step_one+'">'+temperature+'</li>';
-					html += '				<li class="bloodPressure '+systolicBloodPressure_step_one+'">'+bloodPressure+'</li>';
-					html += '				<li class="oxygen '+oxygenSaturation_step_one+'">'+oxygenSaturation+'</li>';
+					html += '				<li class="fever '+temperature_step+' timeover">'+temperature+'</li>';
+					html += '				<li class="bloodPressure '+systolicBloodPressure_step+'">'+bloodPressure+'</li>';
+					html += '				<li class="oxygen '+oxygenSaturation_step+'">'+oxygenSaturation+'</li>';
 					html += '			</ul>';
 					html += '		</div>';
 					html += '	</div>';
@@ -116,6 +117,7 @@ function retrieveStateData(page) {
 
 function nextPage() {
 
+	console.log("totalPage=" + totalPage);
 	if (totalPage === 1) {
 		retrieveStateData(1);
 		return;
@@ -252,7 +254,7 @@ $(document).ready(function() {
 												<button type="button" id="pauseButton" class="btn btn-primary disabled">
 													<i class="fas fa-pause"></i>
 												</button>
-											</label> <input type="text" class="form-control w150" id="searchKeyword" placeholder="호실 or 환자명" onkeypress="searchPatients()">
+											</label> <input type="text" class="form-control w150" id="searchKeyword" placeholder="호실 or 환자명" onkeyup="if(event.keyCode===13){searchPatients()}">
 											<button class="btn btn-primary" onclick="searchPatients()">검색</button>
 										</div>
 									</div>
@@ -269,17 +271,18 @@ $(document).ready(function() {
 														<a href="${viewLink}"><c:out value="${patient.roomNumber}(${patient.patientName})" /></a>
 														<div class="check">
 															<ul>
-																<li><a href="javscript:;" class="symptom"> <i class="align-middle mr-2 fas fa-fw fa-user-plus"></i>
+																<li><a href="javscript:;" class="symptom"> <i class="align-middle ml-2 fas fa-fw fa-user-plus"></i>
 																</a></li>
 															</ul>
 														</div>
 													</div>
 													<div class="stats ${patient.temperature > 37 ? 'danger' : '' }">
 														<ul>
+															<c:set var="temperature_step_two" value="${patient.temperature > 37 ? 'step_one' : ''}" />
 															<fmt:formatDate value="${patient.temperatureCreateDate}" pattern="yyyyMMdd" var="temperatureDateString" />
-															<li class="fever ${temperatureDateString == nowDateString ? 'step_one' : ''}"><c:out value="${patient.temperature != null ? patient.temperature : '--'} ℃" /></li>
+															<li class="fever ${temperature_step_two} ${temperatureDateString == nowDateString ? 'step_one' : ''}"><c:out value="${patient.temperature != null ? patient.temperature : '--'} ℃" /></li>
 															<fmt:formatDate value="${patient.systolicBloodPressureCreateDate}" pattern="yyyyMMdd" var="systolicBloodPressureDateString" />
-															<li class="bloodPressure ${systolicBloodPressureDateString == nowDateString ? 'step_one' : ''}"><c:out value="${patient.systolicBloodPressure != null ? patient.systolicBloodPressure+' / '+patient.systolicBloodPressure  : '-- / --'}" /></li>
+															<li class="bloodPressure ${systolicBloodPressureDateString == nowDateString ? 'step_one' : ''}"><c:out value='${patient.bloodPressureDisplay}' /></li>
 															<fmt:formatDate value="${patient.oxygenSaturationCreateDate}" pattern="yyyyMMdd" var="oxygenSaturationDateString" />
 															<li class="oxygen ${oxygenSaturationDateString == nowDateString ? 'step_one' : ''}"><c:out value="${patient.oxygenSaturation != null ? patient.oxygenSaturation : '--'} %" />
 														</ul>

+ 23 - 23
src/main/webapp/resources/css/common/classic.css

@@ -59,7 +59,7 @@
 .w150 { display: inline-block; width: 150px; }
 .w200 { display: inline-block; width: 200px; }
 .max360 { max-width: 360px; }
-.toggle .card-header { position: relative; padding: 15px 20px; background-color: #FAFAFA; border: 1px solid #AAAAAA; border-radius: 0px; }
+.toggle .card-header { position: relative; padding: 15px 20px; background-color: #FAFAFA; border: 1px solid #d1d1d1; border-radius: 5px; -webkit-border-radius: 5px; -moz-border-radius: 5px; -ms-border-radius: 5px; -o-border-radius: 5px; }
 .toggle .card-header h1 { margin-bottom: 0px; }
 .toggle .card-header a.toggleBtn { position: absolute; top: 50%; right: 20px; margin-top: -15px; display: block; width: 30px; height: 30px; text-indent: -9999px; background-image: url('../../images/arrow_bottom.png'); background-position: center; background-repeat: no-repeat; }
 .toggle .card-header a.toggleBtn.active { background-image: url('../../images/arrow_top.png'); }
@@ -76,7 +76,7 @@
 .mobile-table th span.fix, .mobile-table td span.fix { color:#FF0000; margin-right: 5px; }
 .sidebar + .main .footer { position: relative }
 .content { margin-bottom: 50px; }
-.tab-nav { margin: -24px; margin-bottom: 24px; background-color: #f5f9fc;}
+.tab-nav { margin: -24px; margin-bottom: 24px; background-color: #f5f9fc; padding: 0;}
 .tab-nav .tab-item { list-style: none; font-size: 18px; padding: 15px 24px; color: #999999; cursor: pointer; }
 .tab-nav .tab-item.active { background-color: #fff; border-radius: .25rem; color: #000; cursor: default; }
 .tab-nav .tab-item:hover { color: #000;}
@@ -90,38 +90,38 @@
   .tab-nav .tab-item { float: left; padding: 24px; }
   .tab-nav .tab-item.active { background-color: #fff; border-radius: .25rem, .25rem, 0, 0 ; -webkit-border-radius: .25rem, .25rem, 0, 0 ; -moz-border-radius: .25rem, .25rem, 0, 0 ; -ms-border-radius: .25rem, .25rem, 0, 0 ; -o-border-radius: .25rem, .25rem, 0, 0 ; }
 }
-.patients-stats { position: relative; border: 1px solid #DDDDDD; border-radius: 5px; cursor: pointer !important}
+.patients-stats { position: relative; border: 1px solid #DDDDDD; border-radius: 5px; overflow: hidden; cursor: pointer !important;}
 .patients-stats:hover:before { content: ''; position: absolute; width: 100%; height: 100%; top: 0; left: 0; background-color: rgba(0,0,0,0.03); cursor: pointer;}
-.patients-stats .name { position: relative; font-size: 14px; padding: 10px 80px 10px 10px; border-bottom: 1px solid #DDDDDD; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;}
+.patients-stats .name { position: relative; font-size: 14px; padding: 10px 60px 10px 10px; border-bottom: 1px solid #DDDDDD; background-color: rgba(231, 231, 231, 0.3); overflow: hidden; white-space: nowrap; text-overflow: ellipsis;}
 .patients-stats .name .check { position: absolute; right: 10px; top:50%; margin-top: -12px; display: block; content: ''; clear: both;}
 .patients-stats .name .check ul { padding: 0px; margin: 0px; }
 .patients-stats .name .check ul:after { display: block; content: ''; clear: both; }
-.patients-stats .name .check li { float: left; list-style: none; margin-right: 10px; }
+.patients-stats .name .check li { float: left; list-style: none; }
 .patients-stats .name .check li:last-child { margin-right: 0px; }
 .patients-stats .name .check li a {  font-size: 14px; line-height: 24px; height: 24px; }
 .patients-stats .name .check li a.memo { color:#999999; pointer-events: none;}
 .patients-stats .name .check li a.symptom { color:#999999; pointer-events: none;}
 /* .patients-stats .name .check li a.memo:hover { color:#007bff; } */
 /* .patients-stats .name .check li a.symptom:hover { color:#47bac1; } */
-.patients-stats .stats { padding: 10px 20px; }
-.patients-stats .stats.danger { background-color: #F3D0DA; }
+.patients-stats .stats { padding: 6px 10px; }
+.patients-stats .stats.danger { background-color: #ffe9ef; }
 .patients-stats .stats ul { padding: 0px; margin: 0px; }
-.patients-stats .stats li { list-style: none; font-size: 16px; color:#BBBBBB; text-align: right; line-height: 20px; height: 20px; padding-left: 30px; margin: 5px 0; background-repeat: no-repeat; background-position: left center; background-size: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;}
-.patients-stats .stats li.fever { background-image: url('../../images/device_connect_unlink_1.png'); }
-.patients-stats .stats li.fever.step_one { color:#40A3DF; background-image: url('../../images/device_connect_link_1.png'); }
-.patients-stats .stats li.fever.step_two { color:#FF0000; background-image: url('../../images/device_connect_link_1.png'); }
-.patients-stats .stats li.oxygen { background-image: url('../../images/device_connect_unlink_2.png'); }
-.patients-stats .stats li.oxygen.step_one { color:#40A3DF; background-image: url('../../images/device_connect_link_2.png'); }
-.patients-stats .stats li.oxygen.step_two { color:#FF0000; background-image: url('../../images/device_connect_link_2.png'); }
-.patients-stats .stats li.bloodPressure { background-image: url('../../images/device_connect_unlink_3.png'); }
-.patients-stats .stats li.bloodPressure.step_one { color:#40A3DF; background-image: url('../../images/device_connect_link_3.png'); }
-.patients-stats .stats li.bloodPressure.step_two { color:#FF0000; background-image: url('../../images/device_connect_link_3.png'); }
-.patients-stats .stats li.sugar { background-image: url('../../images/device_connect_unlink_4.png'); }
-.patients-stats .stats li.sugar.step_one { color:#40A3DF; background-image: url('../../images/device_connect_link_4.png'); }
-.patients-stats .stats li.sugar.step_two { color:#FF0000; background-image: url('../../images/device_connect_link_4.png'); }
-.patients-stats .stats li.pulse { background-image: url('../../images/device_connect_unlink_6.png'); }
-.patients-stats .stats li.pulse.step_one { color:#40A3DF; background-image: url('../../images/device_connect_link_6.png'); }
-.patients-stats .stats li.pulse.step_two { color:#FF0000; background-image: url('../../images/device_connect_link_6.png'); }
+.patients-stats .stats li { list-style: none; font-size: 16px; color:#BBBBBB; text-align: right; line-height: 20px; height: 20px; padding-left: 20px; margin: 5px 0; background-repeat: no-repeat; background-position: left center; background-size: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;}
+.patients-stats .stats li.step_one { color:#40A3DF; }
+.patients-stats .stats li.step_two { color:#FF0000; }
+.patients-stats .stats li.timeover { color:#BBBBBB; }
+.patients-stats .stats li:after { content: '\F134'; color:#3faf45; font-family: 'Material Design Icons'; font-size: 12px; vertical-align: middle; }
+.patients-stats .stats li.timeover:after { content: '\F130'; color:#BBBBBB; }
+.patients-stats .stats li.fever.step_one, .patients-stats .stats li.fever.step_two { background-image: url('../../images/device_connect_link_1.png'); }
+.patients-stats .stats li.fever, .patients-stats .stats li.fever.timeover { background-image: url('../../images/device_connect_unlink_1.png'); }
+.patients-stats .stats li.oxygen.step_one, .patients-stats .stats li.oxygen.step_two { background-image: url('../../images/device_connect_link_2.png'); }
+.patients-stats .stats li.oxygen, .patients-stats .stats li.oxygen.timeover { background-image: url('../../images/device_connect_unlink_2.png'); }
+.patients-stats .stats li.bloodPressure.step_one, .patients-stats .stats li.bloodPressure.step_two { background-image: url('../../images/device_connect_link_3.png'); }
+.patients-stats .stats li.bloodPressure, .patients-stats .stats li.bloodPressure.timeover { background-image: url('../../images/device_connect_unlink_3.png'); }
+.patients-stats .stats li.sugar.step_one , .patients-stats .stats li.sugar.step_two { background-image: url('../../images/device_connect_link_4.png'); }
+.patients-stats .stats li.sugar, .patients-stats .stats li.sugar.timeover { background-image: url('../../images/device_connect_unlink_4.png'); }
+.patients-stats .stats li.pulse.step_one, .patients-stats .stats li.pulse.step_two { background-image: url('../../images/device_connect_link_6.png'); }
+.patients-stats .stats li.pulse, .patients-stats .stats li.pulse.timeover { background-image: url('../../images/device_connect_unlink_6.png'); }
 .patients-stats .stats li:last-child { margin-bottom: 0px; }
 /* .patients-stats .stats li.fever {display: none;} */
 .patients-stats .stats li.pulse {display: none;}