Просмотр исходного кода

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

* 'simplatform' of http://wcollector.idatabank.com:5230/dbs289/LifeCenter:
  [진료관리 - 상세] 메모 수정 기능 반영.
  [진료관리] 대시보드 페이징 사이즈 추가, 진료관리 상세 화면 변경 반영.
  [진료관리 - 대시보드] 콘솔 로그 정리.
  [진료관리 - 대시보드] 프리로더 히든 처리 추가.
  [진료관리] css 수정
  [진료관리 - 대시보드] 페이징 사이즈 조절 가능하도록 수정.
  [진료관리 - 대시보드] 로그아웃된 경우 ajax 호출시 로그인 페이지로 이동되도록 수정.
maengje 4 лет назад
Родитель
Сommit
549805e082

+ 172 - 45
src/main/java/com/lemon/lifecenter/controller/ClinicController.java

@@ -58,14 +58,13 @@ public class ClinicController extends LifeCenterController {
 
 	@Autowired
 	private PatientService patientService;
-
-	final int pageSize = 30;
 	
 	private final Logger logger = LoggerFactory.getLogger(this.getClass());
 
 	@RequestMapping("/state")
 	public ModelAndView clinicState(HttpServletRequest request,
 			@RequestParam(value = "page", required = true, defaultValue = "1") int page,
+			@RequestParam(value = "size", required = true, defaultValue = "30") int pageSize,
 			@RequestParam(value = "searchText", required = false, defaultValue = "") String searchText) {
 
 
@@ -78,18 +77,20 @@ public class ClinicController extends LifeCenterController {
 		dto.setSearchText(searchText);
 
 		int total = clinicService.selectPHRLatestCount(dto);
-		List<PatientPHRLatestDTO> result = new ArrayList<PatientPHRLatestDTO>();
 
-		if (total > 0) {
-			result = clinicService.selectPHRLatestList(dto);
-		}
+		// 서버사이드 렌더링 안함 
+//		List<PatientPHRLatestDTO> result = new ArrayList<PatientPHRLatestDTO>();
+//
+//		if (total > 0) {
+//			result = clinicService.selectPHRLatestList(dto);
+//		}
 
 		ModelAndView mv = setMV("clinic/state");
 
 		mv.addObject("page", page);
 		mv.addObject("searchText", searchText);
 		mv.addObject("total", total);
-		mv.addObject("items", result);
+//		mv.addObject("items", result);
 
 		return mv;
 	}
@@ -97,7 +98,6 @@ public class ClinicController extends LifeCenterController {
 	@RequestMapping("/info")
 	public ModelAndView patientInfo(
 			@RequestParam(value = "patientIdx", required = true, defaultValue = "") int patientIdx,
-			@RequestParam(value = "phrType", required = true, defaultValue = "temperature") String phrType,
 			@RequestParam(value = "refererSearch", required = false, defaultValue = "") String refererSearch,
 			@RequestParam(value = "refererPage", required = false, defaultValue = "") String refererPage) {
 
@@ -107,7 +107,7 @@ public class ClinicController extends LifeCenterController {
 		patientDto = patientService.selectPatientOne(patientDto);
 
 		String jumin = patientDto.getJumin();
-		jumin = jumin.substring(0, 4) + "년 " + jumin.substring(4, 6) + "월 " + jumin.substring(6, 8) + "일";
+		jumin = LifeCenterFunction.changeJuminToBirthday(jumin);
 		patientDto.setJumin(jumin);
 		
 		patientDto.setPatientPhone(LifeCenterFunction.phone(patientDto.getPatientPhone()));
@@ -115,44 +115,67 @@ public class ClinicController extends LifeCenterController {
 		
 		String bloodPress = patientDto.getBloodPressureLevel();
 		
-        if (!bloodPress.equals("") && !bloodPress.equals("|")) {
-            String[] bloodPressureLevel = bloodPress.split("[|]");
-            if (bloodPressureLevel[0] != null) {
-                patientDto.setBloodPressureLevelCon(bloodPressureLevel[0]);
-            }
-            if (bloodPressureLevel[1] != null) {
-                patientDto.setBloodPressureLevelRel(bloodPressureLevel[1]);
-            }
+    if (!bloodPress.equals("") && !bloodPress.equals("|")) {
+        String[] bloodPressureLevel = bloodPress.split("[|]");
+        if (bloodPressureLevel[0] != null) {
+            patientDto.setBloodPressureLevelCon(bloodPressureLevel[0]);
         }
-        
-        String strDisease = "";
-        String strSymptom = LifeCenterFunction.getSymptom(patientDto);
-        if (patientDto.getBasalDiseaseYn().equals("Y")) {
-            strDisease = LifeCenterFunction.getDisease(patientDto);
+        if (bloodPressureLevel[1] != null) {
+            patientDto.setBloodPressureLevelRel(bloodPressureLevel[1]);
         }
+    }
+    
+    String strDisease = "";
+    String strSymptom = LifeCenterFunction.getSymptom(patientDto);
+    if (patientDto.getBasalDiseaseYn().equals("Y")) {
+        strDisease = LifeCenterFunction.getDisease(patientDto);
+    }
 
-		// phr 정보
-		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);
-		}
+    // 히스토리 데이터
+    PatientPHRHistoryDTO dto = new PatientPHRHistoryDTO();
+    dto.setPatientIdx(patientIdx);
+		// 체온
+		dto.setPhrType("temperature");
+		List<PatientPHRHistoryDTO> temperatureResult = phrService.selectPHRHistoryList(dto);
+    // 혈압
+    dto.setPhrType("bloodPressure");
+    List<PatientPHRHistoryDTO> bloodPressureResult = phrService.selectPHRHistoryList(dto);
+    // 맥박
+    dto.setPhrType("pulseRate");
+    List<PatientPHRHistoryDTO> pulseRateResult = phrService.selectPHRHistoryList(dto);
+    // 산소포화도
+    dto.setPhrType("oxygenSaturation");
+    List<PatientPHRHistoryDTO> oxygenSaturationResult = phrService.selectPHRHistoryList(dto);
+    // 혈당
+    dto.setPhrType("bloodSugar");
+    List<PatientPHRHistoryDTO> bloodSugarResult = phrService.selectPHRHistoryList(dto);
+    // 증상
+    PatientSymptomSimDTO dto2 = new PatientSymptomSimDTO();
+		dto2.setPatientIdx(patientIdx);
+    List<PatientSymptomSimDTO> symptomResult = phrService.selectSymptomList(dto2);
+    // 메모
+    PatientMemoDTO dto3 = new PatientMemoDTO();
+		dto3.setPatientIdx(patientIdx);
+		List<PatientMemoDTO> memoResult = clinicService.selectMemoList(dto3);
+
+    // response
+    List<PatientPHRHistoryDTO> bloodPressureUnionResult = getBloodPressureUnionResult(patientIdx, bloodPressureResult, pulseRateResult);
 
 		ModelAndView mv = setMV("clinic/info");
 
 		mv.addObject("patientIdx", patientIdx);
-		mv.addObject("info", patientDto);
+    mv.addObject("info", patientDto);
 		mv.addObject("symptom", strSymptom);
 		mv.addObject("disease", strDisease);
-		mv.addObject("phrType", phrType);
-		mv.addObject("phrTotal", total);
-		mv.addObject("phrItems", result);
-		mv.addObject("refererSearch", refererSearch);
+		mv.addObject("temperatureResult", temperatureResult);
+    mv.addObject("bloodPressureResult", bloodPressureResult);
+    mv.addObject("pulseRateResult", pulseRateResult);
+    mv.addObject("bloodPressureUnionResult", bloodPressureUnionResult);
+    mv.addObject("oxygenSaturationResult", oxygenSaturationResult);
+    mv.addObject("bloodSugarResult", bloodSugarResult);
+    mv.addObject("symptomResult", symptomResult);
+    mv.addObject("memoResult", memoResult);
+    mv.addObject("refererSearch", refererSearch);
 		mv.addObject("refererPage", refererPage);
 
 		return mv;
@@ -206,8 +229,9 @@ public class ClinicController extends LifeCenterController {
 	}
 
 	@RequestMapping("/api/state")
-	public @ResponseBody List<PatientPHRLatestDTO> getStateAPI(HttpServletRequest request,
+	public @ResponseBody String getStateAPI(HttpServletRequest request,
 			@RequestParam(value = "page", required = true, defaultValue = "1") int page,
+			@RequestParam(value = "size", required = true, defaultValue = "30") int pageSize,
 			@RequestParam(value = "searchText", required = false, defaultValue = "") String searchText) {
 
 		String centerCode = LifeCenterSessionController.getSession( request, "sesCenterCode" );
@@ -224,8 +248,13 @@ public class ClinicController extends LifeCenterController {
 		if (total > 0) {
 			result = clinicService.selectPHRLatestList(dto);
 		}
+		
+		JSONObject json = new JSONObject();
 
-		return result;
+		json.put("count", total);
+		json.put("items", result);
+		
+		return json.toString();
 	}
 
 	@RequestMapping("/api/phrDatas")
@@ -235,9 +264,23 @@ public class ClinicController extends LifeCenterController {
 
 		PatientPHRHistoryDTO dto = new PatientPHRHistoryDTO();
 		dto.setPatientIdx(patientIdx);
-		dto.setPhrType(phrType);
-
-		return phrService.selectPHRHistoryList(dto);
+    dto.setPhrType(phrType);
+
+    List<PatientPHRHistoryDTO> result = phrService.selectPHRHistoryList(dto);
+    
+    boolean needPulseRate = phrType.equals("bloodPressure");
+    if (needPulseRate) {
+      PatientPHRHistoryDTO dto2 = new PatientPHRHistoryDTO();
+		  dto2.setPatientIdx(patientIdx);
+      dto2.setPhrType("pulseRate");
+
+      List<PatientPHRHistoryDTO> pulseRateResult = phrService.selectPHRHistoryList(dto2);
+      List<PatientPHRHistoryDTO> bloodPressureUnionResult = getBloodPressureUnionResult(patientIdx, result, pulseRateResult);
+      return bloodPressureUnionResult;
+    }
+    else {
+      return result;
+    }
 
 	}
 
@@ -245,7 +288,18 @@ public class ClinicController extends LifeCenterController {
 	public @ResponseBody String insertPhrDataAPI(@ModelAttribute("dto") final PatientPHRHistoryDTO dto) {
 
 		try {
-			phrService.insertPHR(dto);
+      phrService.insertPHR(dto);
+      if (dto.getPhrValueExtra() != null) {
+        PatientPHRHistoryDTO pulseRateDto = new PatientPHRHistoryDTO();
+        pulseRateDto.setPatientIdx(dto.getPatientIdx());
+        pulseRateDto.setPhrType("pulseRate");
+        pulseRateDto.setPhrValue(dto.getPhrValueExtra());
+        pulseRateDto.setRecordedByName(dto.getRecordedByName());
+        if (dto.getRecordedById() != null) {
+          pulseRateDto.setRecordedById(dto.getRecordedById());
+        }
+        phrService.insertPHR(pulseRateDto);
+      }
 
 			JSONObject json = new JSONObject();
 
@@ -370,7 +424,80 @@ public class ClinicController extends LifeCenterController {
 
 			return json.toString();
 		}
-	}
+  }
+  
+  private List<PatientPHRHistoryDTO> getBloodPressureUnionResult(int patientIdx, List<PatientPHRHistoryDTO> bloodPressureResult, List<PatientPHRHistoryDTO>pulseRateResult) {
+    // 혈압 맥박 정리
+    int bloodPressureIndex = 0;
+    int pulseRateIndex = 0;
+    List<PatientPHRHistoryDTO> bloodPressureUnionResult = new ArrayList<PatientPHRHistoryDTO>();
+    while (bloodPressureIndex < bloodPressureResult.size() || pulseRateIndex < pulseRateResult.size()) {
+      PatientPHRHistoryDTO union = new PatientPHRHistoryDTO();
+      union.setPatientIdx(patientIdx);
+      union.setPhrType("bloodPressure");
+      
+      if (bloodPressureIndex == bloodPressureResult.size()) {
+        PatientPHRHistoryDTO pr = pulseRateResult.get(pulseRateIndex);
+        union.setCreateDate(pr.getCreateDate());
+        union.setPhrValueExtra(pr.getPhrValue());
+        union.setRecordedByName(pr.getRecordedByName());
+        union.setRecordedById(pr.getRecordedById());
+
+        bloodPressureUnionResult.add(union);
+        pulseRateIndex += 1;
+        continue;
+      }
+      else if (pulseRateIndex == pulseRateResult.size()) {
+        PatientPHRHistoryDTO bp = bloodPressureResult.get(bloodPressureIndex);
+        union.setCreateDate(bp.getCreateDate());
+        union.setPhrValue(bp.getPhrValue());
+        union.setPhrValue2(bp.getPhrValue2());
+        union.setRecordedByName(bp.getRecordedByName());
+        union.setRecordedById(bp.getRecordedById());
+
+        bloodPressureUnionResult.add(union);
+        bloodPressureIndex += 1;
+        continue;
+      }
+
+      PatientPHRHistoryDTO bp = bloodPressureResult.get(bloodPressureIndex);
+      PatientPHRHistoryDTO pr = pulseRateResult.get(pulseRateIndex);
+
+      int dateDiffer = bp.getCreateDateFormatted().compareTo(pr.getCreateDateFormatted());
+      if (dateDiffer == 0) {
+        union.setCreateDate(bp.getCreateDate());
+        union.setPhrValue(bp.getPhrValue());
+        union.setPhrValue2(bp.getPhrValue2());
+        union.setRecordedByName(bp.getRecordedByName());
+        union.setRecordedById(bp.getRecordedById());
+
+        union.setPhrValueExtra(pr.getPhrValue());
+
+        bloodPressureIndex += 1;
+        pulseRateIndex += 1;
+      }
+      else if (dateDiffer < 0) {
+    	  union.setCreateDate(bp.getCreateDate());
+          union.setPhrValue(bp.getPhrValue());
+          union.setPhrValue2(bp.getPhrValue2());
+          union.setRecordedByName(bp.getRecordedByName());
+          union.setRecordedById(bp.getRecordedById());
+
+          bloodPressureIndex += 1;
+      }
+      else if (dateDiffer > 0) {
+    	  union.setCreateDate(pr.getCreateDate());
+          union.setPhrValueExtra(pr.getPhrValue());
+          union.setRecordedByName(pr.getRecordedByName());
+          union.setRecordedById(pr.getRecordedById());
+
+          pulseRateIndex += 1;
+      }
+
+      bloodPressureUnionResult.add(union);
+    }
+    return bloodPressureUnionResult;
+  }
 
 	private void getPhrDataListExcel(HttpServletRequest request, HttpServletResponse response, PatientDTO patientDto, String phrType, List<PatientPHRHistoryDTO> data) {
         Workbook workbook = new XSSFWorkbook();

+ 13 - 0
src/main/java/com/lemon/lifecenter/dto/PatientMemoDTO.java

@@ -1,8 +1,10 @@
 package com.lemon.lifecenter.dto;
 
+import java.text.SimpleDateFormat;
 import java.time.LocalDateTime;
 import java.time.format.DateTimeFormatter;
 import java.time.temporal.ChronoUnit;
+import java.util.Date;
 
 public class PatientMemoDTO {
 
@@ -77,5 +79,16 @@ public class PatientMemoDTO {
 		long hours = ChronoUnit.HOURS.between(targetDay, today);
 
 		return hours < 24;
+  }
+  public String getCreateDateFormatted() {
+		SimpleDateFormat originalFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
+		SimpleDateFormat targetFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm");
+		try {
+			Date t = originalFormat.parse(this.createDate);
+			return targetFormat.format(t);
+		}
+		catch (Exception e) {
+			return createDate;
+		}
 	}
 }

+ 26 - 4
src/main/java/com/lemon/lifecenter/dto/PatientPHRHistoryDTO.java

@@ -11,7 +11,8 @@ public class PatientPHRHistoryDTO {
 	private int patientIdx;
 	private String phrType;
 	private Float phrValue;
-	private Float phrValue2;
+  private Float phrValue2;
+  private Float phrValueExtra;  // phrType 이 혈압인 경우, 통합뷰의 경우 여기에 맥박이 들어가는 경우가 있음.
 	private String recordedByName;
 	private String recordedById;
 	private String createDate;
@@ -41,6 +42,12 @@ public class PatientPHRHistoryDTO {
 	}
 	public void setPhrValue2(Float phrValue2) {
 		this.phrValue2 = phrValue2;
+  }
+  public Float getPhrValueExtra() {
+		return phrValueExtra;
+	}
+	public void setPhrValueExtra(Float phrValueExtra) {
+		this.phrValueExtra = phrValueExtra;
 	}
 	public String getRecordedByName() {
 		return recordedByName != null ? recordedByName : "";
@@ -79,9 +86,14 @@ public class PatientPHRHistoryDTO {
 			}
 			else if (this.phrType.equals("bloodPressure")) {
 				boolean highBP = this.phrValue >= 149 || this.phrValue2 >= 99;
-				boolean lowBP = this.phrValue <= 90 || this.phrValue2 <= 60;
+        boolean lowBP = this.phrValue <= 90 || this.phrValue2 <= 60;
+        // phrType 이 혈압인 경우, 통합뷰의 경우 phrValueExtra 에 맥박이 들어가는 경우가 있음.
+        boolean lowPR = false;
+        // if (this.phrValueExtra != null) {
+        //   lowPR = this.phrValueExtra <= 55 || this.phrValueExtra >= 110;
+        // }  //getIsExtraWarning 으로 분리시킴
 			
-				return highBP || lowBP;
+				return highBP || lowBP || lowPR;
 			}
 			else if (this.phrType.equals("oxygenSaturation")) {
 				return this.phrValue <= 94;
@@ -97,11 +109,21 @@ public class PatientPHRHistoryDTO {
 			
 		}
 		
+		return false;
+  }
+  public boolean getIsExtraWarning() {
+		try {
+				return this.phrValueExtra <= 55 || this.phrValueExtra >= 110;
+		}
+		catch(Exception e) {
+			
+		}
+		
 		return false;
 	}
 	public String getCreateDateFormatted() {
 		SimpleDateFormat originalFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
-		SimpleDateFormat targetFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+		SimpleDateFormat targetFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm");
 		try {
 			Date t = originalFormat.parse(this.createDate);
 			return targetFormat.format(t);

+ 14 - 0
src/main/java/com/lemon/lifecenter/dto/PatientSymptomSimDTO.java

@@ -1,5 +1,8 @@
 package com.lemon.lifecenter.dto;
 
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
 public class PatientSymptomSimDTO {
 	
 	private int patientIdx;
@@ -163,5 +166,16 @@ public class PatientSymptomSimDTO {
 	}
 	public void setLimitMax(int limitMax) {
 		this.limitMax = limitMax;
+  }
+  public String getCreateDateFormatted() {
+		SimpleDateFormat originalFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
+		SimpleDateFormat targetFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm");
+		try {
+			Date t = originalFormat.parse(this.createDate);
+			return targetFormat.format(t);
+		}
+		catch (Exception e) {
+			return createDate;
+		}
 	}
 }

Разница между файлами не показана из-за своего большого размера
+ 742 - 163
src/main/webapp/WEB-INF/jsp/clinic/info.jsp


+ 176 - 116
src/main/webapp/WEB-INF/jsp/clinic/state.jsp

@@ -6,10 +6,21 @@
 <script src="/resources/bower_components/jquery-bootpag-master/lib/jquery.bootpag.min.js"></script>
 <script>
 
-var totalList = ${total}; // 저장된 데이터 항목 수
-var viewEntry = 30;		// 한 화면에 표시되는 갯수 
-var totalPage = Math.ceil(totalList / viewEntry);
-var reloadTimer = null;
+let mCurrentPage = ${page}
+let mTotalCount = 0;
+let mReloadTimer = null;
+
+function getPageSize() {
+  return localStorage.getItem('dashboardPageSize') || "30";
+}
+
+function setPageSize(value) {
+  localStorage.setItem('dashboardPageSize', value);
+}
+
+function getTotalPage() {
+  return Math.ceil(mTotalCount / getPageSize());
+}
 
 function getReloadIntervalTime() {
 	// console.log("getReloadIntervalTime");
@@ -33,39 +44,45 @@ function setReloadIntervalTime(value) {
 // }
 
 function ajaxErrorHandler(request, status, error){
-	if (request.status === 0) {
-        alert('Not connect.\n Verify Network.');
-    } 
-    else if (request.status == 400) {
-        alert('Server understood the request, but request content was invalid. [400]' + '\n\n' + request.responseText);
-    } 
-    else if (request.status == 401) {
-        alert('Unauthorized access. [401]' + '\n\n' + request.responseText);
-    } 
-    else if (request.status == 403) {
-        alert('Forbidden resource can not be accessed. [403]' + '\n\n' + request.responseText);
-    } 
-    else if (request.status == 404) {
-        alert('Requested page not found. [404]' + '\n\n' + request.responseText);
-    } 
-    else if (request.status == 500) {
-        alert('Internal server error. [500]' + '\n\n' + request.responseText);
-    } 
-    else if (request.status == 503) {
-        alert('Service unavailable. [503]' + '\n\n' + request.responseText);
-    } 
-    else if (status === 'parsererror') {
-        alert('Requested JSON parse failed. [Failed]' + '\n\n' + request.responseText);
-    } 
-    else if (status === 'timeout') {
-        alert('Time out error. [Timeout]' + '\n\n' + request.responseText);
-    } 
-    else if (status === 'abort') {
-        alert('Ajax request aborted. [Aborted]' + '\n\n' + request.responseText);
-    } 
-    else {
-        alert('Uncaught Error.' + '\n\n' + request.responseText);
-    }
+  //로그인 페이지 redirect 처리
+  var contentType = request.getResponseHeader("Content-Type");
+  if (request.status === 200 && contentType.toLowerCase().indexOf("text/html") >= 0) {
+      // assume that our login has expired - reload our current page
+      window.location.reload();
+  }
+	else if (request.status === 0) {
+    alert('Not connect.\n Verify Network.');
+  } 
+  else if (request.status == 400) {
+    alert('Server understood the request, but request content was invalid. [400]' + '\n\n' + request.responseText);
+  } 
+  else if (request.status == 401) {
+    alert('Unauthorized access. [401]' + '\n\n' + request.responseText);
+  } 
+  else if (request.status == 403) {
+    alert('Forbidden resource can not be accessed. [403]' + '\n\n' + request.responseText);
+  } 
+  else if (request.status == 404) {
+    alert('Requested page not found. [404]' + '\n\n' + request.responseText);
+  } 
+  else if (request.status == 500) {
+    alert('Internal server error. [500]' + '\n\n' + request.responseText);
+  } 
+  else if (request.status == 503) {
+    alert('Service unavailable. [503]' + '\n\n' + request.responseText);
+  } 
+  else if (status === 'parsererror') {
+    alert('Requested JSON parse failed. [Failed]' + '\n\n' + request.responseText);
+  } 
+  else if (status === 'timeout') {
+    alert('Time out error. [Timeout]' + '\n\n' + request.responseText);
+  } 
+  else if (status === 'abort') {
+    alert('Ajax request aborted. [Aborted]' + '\n\n' + request.responseText);
+  } 
+  else {
+    alert('Uncaught Error.' + '\n\n' + request.responseText);
+  }
 }
 
 function changeReloadInterval() {
@@ -75,11 +92,11 @@ function changeReloadInterval() {
 }
 
 function activeReloadTimer() {	
-	if (reloadTimer) {
+	if (mReloadTimer) {
 		deactiveReloadTimer();
 	}
 	
-	reloadTimer = setInterval(function() {
+	mReloadTimer = setInterval(function() {
 			nextPage();
 	}, getReloadIntervalTime() * 1000);
 
@@ -87,9 +104,9 @@ function activeReloadTimer() {
 }
 
 function deactiveReloadTimer() {	
-	if (reloadTimer) {
-		clearInterval(reloadTimer);
-		reloadTimer = null;
+	if (mReloadTimer) {
+		clearInterval(mReloadTimer);
+		mReloadTimer = null;
 	}
 }
 
@@ -99,23 +116,25 @@ function searchPatients() {
 	location.href = "./state?searchText="+encodeURIComponent(keyword);
 }
 
-function retrieveStateData(page) {
+function retrieveStateData(page, needInitPagination) {
 
+  mCurrentPage = page;
 	var searchText = '<c:out value="${searchText}" />';
 	var ignoreCache = moment().unix();
-	var params = {page: page, searchText: searchText, ignoreCache:ignoreCache};
+	var params = {page: page, size: getPageSize(), searchText: searchText, ignoreCache:ignoreCache};
 
 	$.ajax({
         url      : "./api/state",
         data     : params,
         method   : "GET",
         dataType : "json",
-        success  : function( datas ){
+        success  : function( result ){
             
+            mTotalCount = result.count;
            	var html = '<div class="blankItem">표시할 데이터가 없습니다.</div>';
-						if (datas.length > 0) {
+						if (result.items.length > 0) {
 							html = "";
-							datas.forEach(function(d) {
+							result.items.forEach(function(d) {
 								var danger = (d.isTemperatureWarning || d.isBloodPressureWarning || d.isOxygenSaturationeWarning) ? "danger" : "";
 								var temperatureStep = d.isTemperatureWarning ? "step_two" : "step_one";
 								var bloodPressureStep = d.isBloodPressureWarning ? "step_two" : "step_one";
@@ -156,19 +175,22 @@ function retrieveStateData(page) {
 						};
 
 						$(".patients-list").fadeOut('fast',function(){
-							$(".patients-list").html(html).fadeIn('fast');
+              $(".patients-list").html(html).fadeIn('fast');
+              if (needInitPagination) {
+                initPagination(page, getTotalPage())
+              }
 						});
         },
         error : ajaxErrorHandler
     }).done( function(){
-
+      
     });
 }
 
 function nextPage() {
 
-	if (totalPage === 1) {
-		retrieveStateData(1);
+	if (getTotalPage() === 1) {
+		retrieveStateData(1, false);
 		return;
 	}
 	
@@ -206,9 +228,56 @@ function responsiblePagination() {
 	}
 }
 
+function initPagination(initPage, totalPage) {
+  ////////////////////////////////////////////////////////////////////////////////
+  //// Pagination
+  ////////////////////////////////////////////////////////////////////////////////
+
+  // 페이지 네이션 실행
+  // Pagination  API -> http://botmonster.com/jquery-bootpag/#.XD2VElwzaUk
+  $('#pagination').bootpag({
+    // maxVisible: 3, // 한번에 보여지는 페이지수
+    // firstLastUse: true,
+    // href: 'URL',// template for pagination links (default javascript:void(0);)
+    // hrefVariable: false,// variable name in href template for page number (default {{number}})
+    total: totalPage, // 페이지 수
+    page: initPage, // 초기 페이지
+    leaps: true,
+    first: '<i class="mdi mdi-chevron-double-left"></i>',
+    prev: '<i class="mdi mdi-chevron-left"></i>',
+    next: '<i class="mdi mdi-chevron-right"></i>',
+    last: '<i class="mdi mdi-chevron-double-right"></i>',
+    wrapClass: 'pagination',
+    activeClass: 'active',
+    disabledClass: 'disabled',
+    nextClass: 'next',
+    prevClass: 'prev',
+    lastClass: 'last',
+    firstClass: 'first'
+  })
+  .off("page")
+  .on("page", function(event, num){
+    retrieveStateData(num, false);
+  });
+  responsiblePagination();
+}
+
 $(document).ready(function() {
 
-	$("#reloadIntervalSelect").val(getReloadIntervalTime());
+  setTimeout(function () {
+    $(".preloader").fadeOut("fast");
+  }, 1000);
+
+  $("#viewEntry").val(getPageSize());
+  $(document).on("change", "#viewEntry", function() {
+		var viewEntry = $(this).find("option:selected").val();
+    setPageSize(viewEntry);
+    retrieveStateData(1, true);
+  });
+
+  retrieveStateData(mCurrentPage, true);
+
+  $("#reloadIntervalSelect").val(getReloadIntervalTime());
 
 	// if (getPlayOnOff() === "on") {
 	// 	if (activeReloadTimer()) {	
@@ -236,56 +305,26 @@ $(document).ready(function() {
 	});
 
 	// 반복 start/stop 클릭
-	$(document).on('click','.playPause',function () {
-       var thisID = $(this).attr('id');
-       if(thisID == 'playButton'){
-    	  if (activeReloadTimer()) {	
-          	$(this).attr('id','pauseButton');
-          	$(this).find('i').removeClass('fa-play').addClass('fa-pause');
-          	$('#reloadIntervalSelect').prop('disabled',true);
-
-						// setPlayOnOff("on");
-    	  }
-       }
-       else if(thisID == 'pauseButton'){
-    	   deactiveReloadTimer();
-          $(this).attr('id','playButton');
-          $(this).find('i').removeClass('fa-pause').addClass('fa-play');
-          $('#reloadIntervalSelect').prop('disabled',false);
-
-					// setPlayOnOff("off");
-       }
-    });
+	$(document).on('click','.playPause', function () {
+    var thisID = $(this).attr('id');
+    if(thisID == 'playButton'){
+      if (activeReloadTimer()) {	
+        $(this).attr('id','pauseButton');
+        $(this).find('i').removeClass('fa-play').addClass('fa-pause');
+        $('#reloadIntervalSelect').prop('disabled',true);
+
+        // setPlayOnOff("on");
+      }
+    }
+    else if(thisID == 'pauseButton'){
+      deactiveReloadTimer();
+      $(this).attr('id','playButton');
+      $(this).find('i').removeClass('fa-pause').addClass('fa-play');
+      $('#reloadIntervalSelect').prop('disabled',false);
 
-	////////////////////////////////////////////////////////////////////////////////
-	//// Pagination
-	////////////////////////////////////////////////////////////////////////////////
-
-	// 페이지 네이션 실행
-	// Pagination  API -> http://botmonster.com/jquery-bootpag/#.XD2VElwzaUk
-	$('#pagination').bootpag({
-		// maxVisible: 10, // 한번에 보여지는 페이지수
-		// firstLastUse: true,
-		// href: 'URL',// template for pagination links (default javascript:void(0);)
-		// hrefVariable: false,// variable name in href template for page number (default {{number}})
-		total: totalPage, // 페이지 수
-		page: ${page}, // 초기 페이지
-		leaps: true,
-		first: '<i class="mdi mdi-chevron-double-left"></i>',
-		prev: '<i class="mdi mdi-chevron-left"></i>',
-		next: '<i class="mdi mdi-chevron-right"></i>',
-		last: '<i class="mdi mdi-chevron-double-right"></i>',
-		wrapClass: 'pagination',
-		activeClass: 'active',
-		disabledClass: 'disabled',
-		nextClass: 'next',
-		prevClass: 'prev',
-		lastClass: 'last',
-		firstClass: 'first'
-	}).on("page", function(event, num){
-		retrieveStateData(num);
-	});
-	responsiblePagination();
+      // setPlayOnOff("off");
+    }
+  });
 
 	// 윈도우 폭 변경에 따른 반응형 목록 수 적용
 	$(window).resize(function(){
@@ -296,12 +335,15 @@ $(document).ready(function() {
 </head>
 
 <body>
+	<div class="preloader">
+		<div class="loadingIcon"></div>
+	</div>
 <div class="modal fade" id="legendGuide" tabindex="-1" role="dialog" aria-hidden="true">
 		<div class="modal-dialog modal-sm" role="document">
 			<div class="modal-content">
 				<div class="modal-header">
 					<h5 class="modal-title">알람 표시 기준 안내</h5>
-					<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span> </button>
+					<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
 				</div>
 				<div class="modal-body m-1">
 					<h4>생체측정 알람 표시 기준</h4>
@@ -332,7 +374,7 @@ $(document).ready(function() {
 						</li>
 						<li class="row sugar">
 							<div class="col-lg-4">저혈당</div>
-							<div class="col-lg-8">70 이하 </div>
+							<div class="col-lg-8">70 이하</div>
 						</li>
 					</ul>
 				</div>
@@ -355,7 +397,7 @@ $(document).ready(function() {
 						<div class="col-12 col-lg-6">
 							<h1 class="h3 mb-3">진료관리</h1>
 						</div>
-						<div class="col-12 col-lg-6  text-right">
+						<div class="col-12 col-lg-6 text-right">
 							<nav aria-label="breadcrumb">
 								<ol class="breadcrumb">
 									<li class="breadcrumb-item"><a href="javscript:;">Home</a></li>
@@ -369,29 +411,47 @@ $(document).ready(function() {
 							<div class="card">
 								<div class="card-header">
 									<div class="row">
-										<div class="col-lg-6">
-											<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 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>
+                    <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>
+                        </label>
+                        보기
+                      </div>
 										<div class="col-lg-6 search text-right">
-											<label> <select id="reloadIntervalSelect" class="custom-select" onchange="changeReloadInterval()">
+											<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>
+											</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()}">
+                          <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">
-									<div class="row patients-list">
+									<ul class="row patients-list">
 										<c:choose>
 										<c:when test="${total == 0}">
-										<div class="blankItem">표시할 데이터가 없습니다.</div>
+										<li class="blankItem">표시할 데이터가 없습니다.</div>
 										</c:when>
 										<c:otherwise>
 										<c:forEach var="patient" items="${items}" varStatus="status">
@@ -403,7 +463,7 @@ $(document).ready(function() {
 											<c:set var="temperatureCheck" value="${patient.needTemperatureCheck ? 'timeover' : ''}" />
 											<c:set var="bloodPressureCheck" value="${patient.needBloodPressCheck ? 'timeover' : ''}" />
 											<c:set var="oxygenSaturationCheck" value="${patient.needOxygenSaturationCheck ? 'timeover' : ''}" />
-											<div class="col-lg-2 col-md-6 mb-4">
+											<li class="col-lg-2 col-md-4 mb-4">
 												<div class="patients-stats" data-url="${viewLink}">
 													<div class="name">
 														<c:out value="${title}" />
@@ -426,11 +486,11 @@ $(document).ready(function() {
 														</ul>
 													</div>
 												</div>
-											</div>
+											</li>
 										</c:forEach>
 										</c:otherwise>
 										</c:choose>
-									</div>
+									</ul>
 								</div>
 								<div class="card-footer">
 									<div id="pagination" class="paginationContainer"></div>

Разница между файлами не показана из-за своего большого размера
+ 54 - 0
src/main/webapp/resources/css/common/basic.css


Разница между файлами не показана из-за своего большого размера
+ 970 - 182
src/main/webapp/resources/css/common/classic.css


Разница между файлами не показана из-за своего большого размера
+ 1 - 0
src/main/webapp/resources/images/koreaLogo.svg