|
@@ -7,18 +7,65 @@
|
|
|
<link rel="stylesheet" href="/resources/bower_components/mdi/css/materialdesignicons.min.css">
|
|
|
<script>
|
|
|
|
|
|
+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);
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
function saveDisplayItem() {
|
|
|
|
|
|
+ var centerCode = "${data._SES_CENTER_CODE}";
|
|
|
+
|
|
|
var temperatureDisplayYN = $('input:checkbox[id="displayItemTemperature"]').is(":checked") == true ? "Y" : "N";
|
|
|
- var systolicBloodPressureDisplayYN = $('input:checkbox[id="displayItemBloodPressure"]').is(":checked") == true ? "Y" : "N";
|
|
|
- var diastolicBloodPressureDisplayYN = $('input:checkbox[id="displayItemBloodPressure"]').is(":checked") == true ? "Y" : "N";
|
|
|
+ var bloodPressureDisplayYN = $('input:checkbox[id="displayItemBloodPressure"]').is(":checked") == true ? "Y" : "N";
|
|
|
var pulseRateDisplayYN = $('input:checkbox[id="displayItemPulseRate"]').is(":checked") == true ? "Y" : "N";
|
|
|
var oxygenSaturationDisplayYN = $('input:checkbox[id="displayItemOxygenSaturation"]').is(":checked") == true ? "Y" : "N";
|
|
|
var bloodSugarDisplayYN = $('input:checkbox[id="displayItemBloodSugar"]').is(":checked") == true ? "Y" : "N";
|
|
|
var symptomDisplayYN = $('input:checkbox[id="displayItemSymptom"]').is(":checked") == true ? "Y" : "N";
|
|
|
|
|
|
+ var params = {
|
|
|
+ centerCode: centerCode,
|
|
|
+ temperatureDisplayYN: temperatureDisplayYN,
|
|
|
+ bloodPressureDisplayYN: bloodPressureDisplayYN,
|
|
|
+ pulseRateDisplayYN: pulseRateDisplayYN,
|
|
|
+ oxygenSaturationDisplayYN: oxygenSaturationDisplayYN,
|
|
|
+ bloodSugarDisplayYN: bloodSugarDisplayYN,
|
|
|
+ symptomDisplayYN: symptomDisplayYN,
|
|
|
+ };
|
|
|
+
|
|
|
$.ajax({
|
|
|
- url : "./api/configuration",
|
|
|
+ url : "./api/configuration/display",
|
|
|
data : params,
|
|
|
method : "PATCH",
|
|
|
dataType : "json",
|
|
@@ -32,8 +79,36 @@ function saveDisplayItem() {
|
|
|
}
|
|
|
|
|
|
function saveAlarmValue() {
|
|
|
+
|
|
|
+ var centerCode = "${data._SES_CENTER_CODE}";
|
|
|
+
|
|
|
+ var temperatureThreshold = parseFloat($("#temperatureThreshold").val());
|
|
|
+ var systolicBloodPressureThresholdMin = parseInt($("#systolicBloodPressureThresholdMin").val(), 10);
|
|
|
+ var systolicBloodPressureThresholdMax = parseInt($("#systolicBloodPressureThresholdMax").val(), 10);
|
|
|
+ var diastolicBloodPressureThresholdMin = parseInt($("#diastolicBloodPressureThresholdMin").val(), 10);
|
|
|
+ var diastolicBloodPressureThresholdMax = parseInt($("#diastolicBloodPressureThresholdMax").val(), 10);
|
|
|
+ var pulseRateThresholdMin = parseInt($("#pulseRateThresholdMin").val(), 10);
|
|
|
+ var pulseRateThresholdMax = parseInt($("#pulseRateThresholdMax").val(), 10);
|
|
|
+ var oxygenSaturationThreshold = parseInt($("#oxygenSaturationThreshold").val(), 10);
|
|
|
+ var bloodSugarThresholdMin = parseInt($("#bloodSugarThresholdMin").val(), 10);
|
|
|
+ var bloodSugerThresholdMax = parseInt($("#bloodSugerThresholdMax").val(), 10);
|
|
|
+
|
|
|
+ var params = {
|
|
|
+ centerCode: centerCode,
|
|
|
+ temperatureThreshold, temperatureThreshold,
|
|
|
+ systolicBloodPressureThresholdMin, systolicBloodPressureThresholdMin,
|
|
|
+ systolicBloodPressureThresholdMax, systolicBloodPressureThresholdMax,
|
|
|
+ diastolicBloodPressureThresholdMin, diastolicBloodPressureThresholdMin,
|
|
|
+ diastolicBloodPressureThresholdMax, diastolicBloodPressureThresholdMax,
|
|
|
+ pulseRateThresholdMin, pulseRateThresholdMin,
|
|
|
+ pulseRateThresholdMax, pulseRateThresholdMax,
|
|
|
+ oxygenSaturationThreshold, oxygenSaturationThreshold,
|
|
|
+ bloodSugarThresholdMin, bloodSugarThresholdMin,
|
|
|
+ bloodSugerThresholdMax, bloodSugerThresholdMax,
|
|
|
+ }
|
|
|
+
|
|
|
$.ajax({
|
|
|
- url : "./api/configuration",
|
|
|
+ url : "./api/configuration/threshold",
|
|
|
data : params,
|
|
|
method : "PATCH",
|
|
|
dataType : "json",
|
|
@@ -111,12 +186,19 @@ $(document).ready(function() {
|
|
|
</div>
|
|
|
<div class="col-lg-8">
|
|
|
<ul class="displayList">
|
|
|
- <li class="displayItem"><label><input id="displayItemTemperature" type="checkbox" name="" value="" checked><span>체온</span></label></li>
|
|
|
- <li class="displayItem"><label><input id="displayItemBloodPressure" type="checkbox" name="" value="" checked><span>혈압</span></label></li>
|
|
|
- <li class="displayItem"><label><input id="displayItemPulseRate" type="checkbox" name="" value=""><span>맥박</span></label></li>
|
|
|
- <li class="displayItem"><label><input id="displayItemOxgenSaturation" type="checkbox" name="" value="" checked><span>산소포화도</span></label></li>
|
|
|
- <li class="displayItem"><label><input id="displayItemBloodSugar" type="checkbox" name="" value=""><span>혈당</span></label></li>
|
|
|
- <li class="displayItem"><label><input id="displayItemSymptom" type="checkbox" name="" value="" checked><span>임상증상</span></label></li>
|
|
|
+ <c:set var="temperatureCheck" value="${config.temperatureDisplayYN == 'Y' ? 'checked' : ''}" />
|
|
|
+ <c:set var="bloodPressureCheck" value="${config.bloodPressureDisplayYN == 'Y' ? 'checked' : ''}" />
|
|
|
+ <c:set var="pulseRateCheck" value="${config.pulseRateDisplayYN == 'Y' ? 'checked' : ''}" />
|
|
|
+ <c:set var="oxygenSaturationCheck" value="${config.oxygenSaturationDisplayYN == 'Y' ? 'checked' : ''}" />
|
|
|
+ <c:set var="bloodSugarCheck" value="${config.bloodSugarDisplayYN == 'Y' ? 'checked' : ''}" />
|
|
|
+ <c:set var="symptomCheck" value="${config.symptomDisplayYN == 'Y' ? 'checked' : ''}" />
|
|
|
+
|
|
|
+ <li class="displayItem"><label><input id="displayItemTemperature" type="checkbox" name="" value="Y" <c:out value="${temperatureCheck}" />><span>체온</span></label></li>
|
|
|
+ <li class="displayItem"><label><input id="displayItemBloodPressure" type="checkbox" name="" value="Y" <c:out value="${bloodPressureCheck}" />><span>혈압</span></label></li>
|
|
|
+ <li class="displayItem"><label><input id="displayItemPulseRate" type="checkbox" name="" value="Y" <c:out value="${pulseRateCheck}" />><span>맥박</span></label></li>
|
|
|
+ <li class="displayItem"><label><input id="displayItemOxygenSaturation" type="checkbox" name="" value="Y" <c:out value="${oxygenSaturationCheck}" />><span>산소포화도</span></label></li>
|
|
|
+ <li class="displayItem"><label><input id="displayItemBloodSugar" type="checkbox" name="" value="Y" <c:out value="${bloodSugarCheck}" />><span>혈당</span></label></li>
|
|
|
+ <li class="displayItem"><label><input id="displayItemSymptom" type="checkbox" name="" value="Y" <c:out value="${symptomCheck}" />><span>임상증상</span></label></li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -141,49 +223,60 @@ $(document).ready(function() {
|
|
|
</div>
|
|
|
</div> -->
|
|
|
<ul class="legend">
|
|
|
+ <c:set var="temperatureThreshold" value="${config.temperatureThreshold}" />
|
|
|
+ <c:set var="systolicBloodPressureThresholdMin" value="${config.systolicBloodPressureThresholdMin}" />
|
|
|
+ <c:set var="systolicBloodPressureThresholdMax" value="${config.systolicBloodPressureThresholdMax}" />
|
|
|
+ <c:set var="diastolicBloodPressureThresholdMin" value="${config.diastolicBloodPressureThresholdMin}" />
|
|
|
+ <c:set var="diastolicBloodPressureThresholdMax" value="${config.diastolicBloodPressureThresholdMax}" />
|
|
|
+ <c:set var="pulseRateThresholdMin" value="${config.pulseRateThresholdMin}" />
|
|
|
+ <c:set var="pulseRateThresholdMax" value="${config.pulseRateThresholdMax}" />
|
|
|
+ <c:set var="oxygenSaturationThreshold" value="${config.oxygenSaturationThreshold}" />
|
|
|
+ <c:set var="bloodSugarThresholdMin" value="${config.bloodSugarThresholdMin}" />
|
|
|
+ <c:set var="bloodSugerThresholdMax" value="${config.bloodSugerThresholdMax}" />
|
|
|
+
|
|
|
<li class="row fever">
|
|
|
<div class="col-lg-4">체온</div>
|
|
|
<div class="col-lg-8">
|
|
|
- <input type="number" class="form-control w120" placeholder="체온" value="37.5"> ℃ 이상시 알람
|
|
|
+ <input id="temperatureThreshold" type="number" class="form-control w120" placeholder="체온" value="<c:out value="${temperatureThreshold}" />"> ℃ 이상시 알람
|
|
|
</div>
|
|
|
</li>
|
|
|
<li class="row bloodPressure">
|
|
|
<div class="col-lg-4">수축기 혈압</div>
|
|
|
<div class="col-lg-8">
|
|
|
- <input type="number" class="form-control w120" placeholder="저혈압" value="90"> 이하
|
|
|
+ <input id="systolicBloodPressureThresholdMin" type="number" class="form-control w120" placeholder="저혈압" value="<c:out value="${systolicBloodPressureThresholdMin}" />"> 이하
|
|
|
<span>또는</span>
|
|
|
- <input type="number" class="form-control w120" placeholder="고혈압" value="149"> 이상시 알람
|
|
|
+ <input id="systolicBloodPressureThresholdMax" type="number" class="form-control w120" placeholder="고혈압" value="<c:out value="${systolicBloodPressureThresholdMax}" />"> 이상시 알람
|
|
|
|
|
|
</div>
|
|
|
</li>
|
|
|
<li class="row bloodPressure">
|
|
|
<div class="col-lg-4">이완기 혈압</div>
|
|
|
<div class="col-lg-8">
|
|
|
- <input type="number" class="form-control w120" placeholder="저혈압" value="60"> 이하
|
|
|
+ <input id="diastolicBloodPressureThresholdMin" type="number" class="form-control w120" placeholder="저혈압" value="<c:out value="${diastolicBloodPressureThresholdMin}" />"> 이하
|
|
|
<span>또는</span>
|
|
|
- <input type="number" class="form-control w120" placeholder="고혈압" value="99"> 이상시 알람
|
|
|
+ <input id="diastolicBloodPressureThresholdMax" type="number" class="form-control w120" placeholder="고혈압" value="<c:out value="${diastolicBloodPressureThresholdMax}" />"> 이상시 알람
|
|
|
</div>
|
|
|
</li>
|
|
|
<li class="row pulse">
|
|
|
<div class="col-lg-4">맥박</div>
|
|
|
<div class="col-lg-8">
|
|
|
- <input type="number" class="form-control w120" placeholder="최저맥박" value="55"> 이하
|
|
|
+ <input id="pulseRateThresholdMin" type="number" class="form-control w120" placeholder="최저맥박" value="<c:out value="${pulseRateThresholdMin}" />"> 이하
|
|
|
<span>또는</span>
|
|
|
- <input type="number" class="form-control w120" placeholder="최고맥박" value="110"> 이상시 알람
|
|
|
+ <input id="pulseRateThresholdMax" type="number" class="form-control w120" placeholder="최고맥박" value="<c:out value="${pulseRateThresholdMax}" />"> 이상시 알람
|
|
|
</div>
|
|
|
</li>
|
|
|
<li class="row oxygen">
|
|
|
<div class="col-lg-4">산소포화도</div>
|
|
|
<div class="col-lg-8">
|
|
|
- <input type="number" class="form-control w120" placeholder="산소포화도" value="94"> % 이하시 알람
|
|
|
+ <input id="oxygenSaturationThreshold" type="number" class="form-control w120" placeholder="산소포화도" value="<c:out value="${oxygenSaturationThreshold}" />"> % 이하시 알람
|
|
|
</div>
|
|
|
</li>
|
|
|
<li class="row sugar">
|
|
|
<div class="col-lg-4">혈당</div>
|
|
|
<div class="col-lg-8">
|
|
|
- <input type="number" class="form-control w120" placeholder="저혈당" value="70"> 이하
|
|
|
+ <input id="bloodSugarThresholdMin" type="number" class="form-control w120" placeholder="저혈당" value="<c:out value="${bloodSugarThresholdMin}" />"> 이하
|
|
|
<span>또는</span>
|
|
|
- <input type="number" class="form-control w120" placeholder="고혈당" value="200"> 이상시 알람
|
|
|
+ <input id="bloodSugerThresholdMax" type="number" class="form-control w120" placeholder="고혈당" value="<c:out value="${bloodSugerThresholdMax}" />"> 이상시 알람
|
|
|
</div>
|
|
|
</li>
|
|
|
</ul>
|