|
@@ -3,8 +3,18 @@
|
|
|
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
|
|
pageEncoding="UTF-8"%>
|
|
|
<jsp:include page="${data._INCLUDE}/header.jsp"></jsp:include>
|
|
|
+<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.4/Chart.min.js"></script>
|
|
|
<script>
|
|
|
|
|
|
+$(document).ready(function() {
|
|
|
+ var datas = [];
|
|
|
+ <c:forEach var="phr" items="${phrItems}" varStatus="status">
|
|
|
+ datas.push({createDate: "${phr.createDate}", phrValue: "${phr.phrValue}"});
|
|
|
+ </c:forEach>
|
|
|
+
|
|
|
+ drawPhrChart(datas, "체온");
|
|
|
+});
|
|
|
+
|
|
|
function changeButtonSelected(buttonId) {
|
|
|
var buttonIds = ["buttonPhr", "buttonSymptom", "buttonMemo"];
|
|
|
|
|
@@ -34,17 +44,19 @@ function changeTabSelected(tabId) {
|
|
|
}
|
|
|
|
|
|
function showUntactTab() {
|
|
|
-/* alert("비대면 진료를 실행합니다!"); */
|
|
|
+ alert("비대면 진료를 실행합니다!");
|
|
|
}
|
|
|
|
|
|
function showPhrTab() {
|
|
|
changeButtonSelected("buttonPhr");
|
|
|
changeTabSelected("tabPhr");
|
|
|
+ retrievePhrData();
|
|
|
}
|
|
|
|
|
|
function showSymptomTab() {
|
|
|
changeButtonSelected("buttonSymptom");
|
|
|
changeTabSelected("tabSymptom");
|
|
|
+ retrieveSymptomData();
|
|
|
}
|
|
|
|
|
|
function showMemoTab() {
|
|
@@ -65,6 +77,8 @@ function retrievePhrData() {
|
|
|
success : function( datas ){
|
|
|
console.log(datas);
|
|
|
|
|
|
+ drawPhrChart(datas, phrName);
|
|
|
+
|
|
|
var html = "<thead><tr>";
|
|
|
html += "<th>진료일시</th>";
|
|
|
html += "<th>"+phrName+"</th>";
|
|
@@ -86,33 +100,83 @@ function retrievePhrData() {
|
|
|
html += "</tbody>";
|
|
|
|
|
|
$("#phrDataTable").html(html);
|
|
|
+ },
|
|
|
+ error : function(){
|
|
|
+ console.error('error!');
|
|
|
+ }
|
|
|
+ }).done( function(){
|
|
|
+ console.log('done!');
|
|
|
+ });
|
|
|
+}
|
|
|
+function retrieveSymptomData() {
|
|
|
+ var params = {patientIdx: ${patientIdx}};
|
|
|
+
|
|
|
+ $.ajax({
|
|
|
+ url : "./api/symptomDatas",
|
|
|
+ data : params,
|
|
|
+ method : "GET",
|
|
|
+ dataType : "json",
|
|
|
+ success : function( datas ){
|
|
|
+ console.log(datas);
|
|
|
+
|
|
|
+ var html = "";
|
|
|
+ var contents = "<tr><td colspan=10>데이터가 없습니다.</td></tr>" ;
|
|
|
+ if (datas.length > 0) {
|
|
|
+ contents = datas.map(d => {
|
|
|
+ var h = "<tr>";
|
|
|
+ h += "<th>" + d.createDate + "</th>";
|
|
|
+ h += "<td>" + d.coughCheck + "</td>";
|
|
|
+ h += "<td>" + d.dyspneaCheck + "</td>";
|
|
|
+ h += "<td>" + d.dolcFitCheck + "</td>";
|
|
|
+ h += "<td>" + d.musclePainCheck + "</td>";
|
|
|
+ h += "<td>" + d.headacheCheck + "</td>";
|
|
|
+ h += "<td>" + d.soreThroatCheck + "</td>";
|
|
|
+ h += "<td>" + d.smellPalateCheck + "</td>";
|
|
|
+ h += "<td>" + d.fatigueCheck + "</td>";
|
|
|
+ h += "<td>" + d.coughCheck + "</td>";
|
|
|
+ h += "</tr>";
|
|
|
+ return h;
|
|
|
+ });
|
|
|
+ };
|
|
|
+ html += contents;
|
|
|
|
|
|
-
|
|
|
-/* var resultCode = data.code;
|
|
|
- var resultMsg = data.message;
|
|
|
-
|
|
|
- if( data.code == "00" ) {
|
|
|
- location.href="/patient/list";
|
|
|
- } else {
|
|
|
- $( "#password" ).after( "<label id='msg' class='error'>" + resultMsg + "</label>" );
|
|
|
- $( "#submitLoading" ).toggleClass( "d-none", true );
|
|
|
- $( "#submitBtn" ).toggleClass( "d-none", false );
|
|
|
- }; */
|
|
|
+ $("#symptomDataTable > tbody").html(html);
|
|
|
},
|
|
|
error : function(){
|
|
|
console.error('error!');
|
|
|
-/* $( "#submitLoading" ).toggleClass( "d-none", true );
|
|
|
- $( "#submitBtn" ).toggleClass( "d-none", false ); */
|
|
|
}
|
|
|
}).done( function(){
|
|
|
console.log('done!');
|
|
|
-/* if( $( "#saveId" ).is( ":checked" ) ) {
|
|
|
- setCookie( "userInputId", $( "#id" ).val(), 365 );
|
|
|
- } else {
|
|
|
- deleteCookie( "userInputId" );
|
|
|
- } */
|
|
|
});
|
|
|
}
|
|
|
+
|
|
|
+function drawPhrChart(data, dataName) {
|
|
|
+
|
|
|
+ console.log("chart!" + data);
|
|
|
+ var xDatas = [];
|
|
|
+ var yDatas = [];
|
|
|
+ data.forEach(d=> {
|
|
|
+ xDatas.push(d.createDate);
|
|
|
+ yDatas.push(d.phrValue);
|
|
|
+ });
|
|
|
+ var ctx = document.getElementById("phrChart").getContext('2d');
|
|
|
+ var myChart = new Chart(ctx, {
|
|
|
+ type: 'line',
|
|
|
+ data: {
|
|
|
+ labels: xDatas,
|
|
|
+ datasets: [{
|
|
|
+ label: dataName,
|
|
|
+ data: yDatas,
|
|
|
+ fill: false,
|
|
|
+ backgroundColor: 'rgb(255, 99, 132)',
|
|
|
+ borderColor: 'rgb(255, 99, 132)',
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ options: {
|
|
|
+
|
|
|
+ }
|
|
|
+ });
|
|
|
+}
|
|
|
</script>
|
|
|
</head>
|
|
|
|
|
@@ -143,12 +207,13 @@ function retrievePhrData() {
|
|
|
</div>
|
|
|
<div class="row">
|
|
|
<div class="col-12">
|
|
|
- <div class="card">
|
|
|
+ <div class="card toggle">
|
|
|
<div class="card-header">
|
|
|
<h1 class="h4">- 환자 기본정보</h1>
|
|
|
+ <a href="#" class="toggleBtn">메</a>
|
|
|
</div>
|
|
|
<div class="card-body">
|
|
|
- <table class="table mobile-table">
|
|
|
+ <table class="table mobile-table user-info">
|
|
|
<colgroup>
|
|
|
<col style="width: 15%">
|
|
|
<col style="width: 35%">
|
|
@@ -363,7 +428,7 @@ function retrievePhrData() {
|
|
|
<h1 class="h4">
|
|
|
- 건강정보 조회
|
|
|
<label>
|
|
|
- <select class="custom-select ml-1 form-control" id=phrTypeSelect name="inputState" onchange="retrievePhrData">
|
|
|
+ <select class="custom-select ml-1 form-control" id=phrTypeSelect name="inputState" onchange="retrievePhrData()">
|
|
|
<option value="temperature" selected>체온</option>
|
|
|
<option value="oxygenSaturation">산소포화도</option>
|
|
|
<option value=pulseRate>혈압</option>
|
|
@@ -414,7 +479,8 @@ function retrievePhrData() {
|
|
|
</div>
|
|
|
<div class="card-body">
|
|
|
<div class="graph-area mb-4">
|
|
|
- <div style="height:400px;background-color:#dddddd;">그래프영역</div>
|
|
|
+ <!-- <div style="height:400px;background-color:#dddddd;">그래프영역</div> -->
|
|
|
+ <canvas id="phrChart" width="400" height="100"></canvas>
|
|
|
</div>
|
|
|
<div class="table-responsive">
|
|
|
<table id="phrDataTable" class="table data-table text-center">
|
|
@@ -558,7 +624,7 @@ function retrievePhrData() {
|
|
|
</div>
|
|
|
<div class="card-body">
|
|
|
<div class="table-responsive">
|
|
|
- <table class="table data-table text-center">
|
|
|
+ <table id="symptomDataTable" class="table data-table text-center">
|
|
|
<thead>
|
|
|
<tr>
|
|
|
<th>증상정보</th>
|
|
@@ -575,52 +641,16 @@ function retrievePhrData() {
|
|
|
</thead>
|
|
|
<tbody>
|
|
|
<tr>
|
|
|
- <th>2020-11-05 09:23:526</th>
|
|
|
- <td>V</td>
|
|
|
- <td>V</td>
|
|
|
- <td>V</td>
|
|
|
- <td>V</td>
|
|
|
- <td>-</td>
|
|
|
- <td>-</td>
|
|
|
- <td>-</td>
|
|
|
- <td><span class="text-danger">설사</span></td>
|
|
|
- <td>김레몬</td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <th>2020-11-05 09:23:526</th>
|
|
|
- <td>V</td>
|
|
|
- <td>V</td>
|
|
|
- <td>V</td>
|
|
|
- <td>V</td>
|
|
|
- <td>-</td>
|
|
|
- <td>-</td>
|
|
|
- <td>-</td>
|
|
|
- <td><span class="text-danger">설사</span></td>
|
|
|
- <td>김레몬</td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <th>2020-11-05 09:23:526</th>
|
|
|
- <td>V</td>
|
|
|
- <td>V</td>
|
|
|
- <td>V</td>
|
|
|
- <td>V</td>
|
|
|
- <td>-</td>
|
|
|
- <td>-</td>
|
|
|
- <td>-</td>
|
|
|
- <td><span class="text-danger">설사</span></td>
|
|
|
- <td>김레몬</td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <th>2020-11-05 09:23:526</th>
|
|
|
- <td>V</td>
|
|
|
- <td>V</td>
|
|
|
- <td>V</td>
|
|
|
- <td>V</td>
|
|
|
- <td>-</td>
|
|
|
- <td>-</td>
|
|
|
- <td>-</td>
|
|
|
- <td><span class="text-danger">설사</span></td>
|
|
|
- <td>김레몬</td>
|
|
|
+ <th></th>
|
|
|
+ <td></td>
|
|
|
+ <td></td>
|
|
|
+ <td></td>
|
|
|
+ <td></td>
|
|
|
+ <td></td>
|
|
|
+ <td></td>
|
|
|
+ <td></td>
|
|
|
+ <td><span class="text-danger"></span></td>
|
|
|
+ <td></td>
|
|
|
</tr>
|
|
|
</tbody>
|
|
|
</table>
|