12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991 |
- <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
- <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
- <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
- <%@ 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">
- <link rel="stylesheet" href="/resources/bower_components/datetimepicker-master/build/jquery.datetimepicker.min.css">
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.4/Chart.min.css">
- <script src="/resources/bower_components/moment/moment.min.js"></script>
- <script src="/resources/bower_components/datetimepicker-master/build/jquery.datetimepicker.full.min.js"></script>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.4/Chart.min.js"></script>
- <script>
- const mPatientIdx = ${patientIdx}
- var PHR_VALUE_DEFAULT = {
- TEMPERATURE: {
- VALUE: "",
- MIN: 20,
- MAX: 50
- },
- BLOOD_PRESSURE_SYSTOLIC: {
- VALUE: "",
- MIN: 50,
- MAX: 250
- },
- BLOOD_PRESSURE_DIASTOLIC: {
- VALUE: "",
- MIN: 20,
- MAX: 160
- },
- OXYGEN_SATURATION: {
- VALUE: "",
- MIN: 60,
- MAX: 100
- },
- PULSE_RATE: {
- VALUE: "",
- MIN: 30,
- MAX: 200
- },
- BLOOD_SUGAR: {
- VALUE: "",
- MIN: 10,
- MAX: 600
- }
- }
- 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 gridDateFormatter(date) {
- return moment(date).format("YYYY-MM-DD HH:mm");
- }
- function chartDateFormatter(date) {
- return moment(date).format("MM-DD HH:mm");
- }
- /*
- * 비대면 진료 시작
- */
- function nonFaceStart(event) {
- event.stopPropagation();
- getAjax("/patient/nonFaceStart", $("#hiddenForm").serialize(), function ( result ) {
-
- $("#nonface").append('<input type="hidden" name="member_name" value="'+result.member_name+'" />');
- $("#nonface").append('<input type="hidden" name="member_id" value="'+result.member_id+'" />');
- $("#nonface").append('<input type="hidden" name="room_id" value="'+result.room_id+'" />');
- $("#nonface").append('<input type="hidden" name="hashData" value="'+result.hashData+'">');
- $("#nonface").append('<input type="hidden" name="token" value="'+result.token+'">');
- $("#nonface").append('<input type="hidden" name="api_key" value="'+result.api_key+'">');
- $("#nonface").append('<input type="hidden" name="classify" value="d">');
- var gsWin = window.open('about:blank','nonface');
- var frm =document.nonface;
- frm.target ="nonface";
- frm.method ="post";
- frm.submit();
-
- window.location.reload();
- }, function(){
- }, function(){
-
- });
- }
- /*
- * 건강정보이력 탭 처리
- */
- function checkValidForPhrData(phrType, phrValue) {
- var errorMessage = null;
- var errorMessagePrefix = null;
- var phrValueDefault = null;
-
- if (phrType === "temperature") {
- errorMessagePrefix = "체온을";
- phrValueDefault = PHR_VALUE_DEFAULT.TEMPERATURE;
- }
- else if (phrType === "bloodPressureSystolic") {
- errorMessagePrefix = "수축기 혈압을";
- phrValueDefault = PHR_VALUE_DEFAULT.BLOOD_PRESSURE_SYSTOLIC;
- }
- else if (phrType === "bloodPressureDiastolic") {
- errorMessagePrefix = "이완기 혈압을";
- phrValueDefault = PHR_VALUE_DEFAULT.BLOOD_PRESSURE_DIASTOLIC;
- }
- else if (phrType === "oxygenSaturation") {
- errorMessagePrefix = "산소포화도를";
- phrValueDefault = PHR_VALUE_DEFAULT.OXYGEN_SATURATION;
- }
- else if (phrType === "pulseRate") {
- errorMessagePrefix = "맥박을";
- phrValueDefault = PHR_VALUE_DEFAULT.PULSE_RATE;
- }
- else if (phrType === "bloodSugar") {
- errorMessagePrefix = "혈당을";
- phrValueDefault = PHR_VALUE_DEFAULT.BLOOD_SUGAR;
- }
- // 널 체크, 숫자 체크, 최대/최소 체크
- if (!phrValue || phrValue.length === 0) {
- errorMessage = errorMessagePrefix+" 입력해 주세요.";
- }
- else if (isNaN(phrValue)) {
- errorMessage = errorMessagePrefix+" 숫자로 입력해 주세요.";
- }
- else if (phrValue < phrValueDefault.MIN || phrValue > phrValueDefault.MAX) {
- errorMessage = errorMessagePrefix+" "+phrValueDefault.MIN+"~"+phrValueDefault.MAX+" 범위 내로 입력해 주세요.";
- }
- return errorMessage;
- }
-
- function handlePhrData() {
- var phrType = $('#healthInfo').attr("data-phr-type");
- var phrValue = "";
- if (phrType === "bloodPressure") {
- var phrValueSystolic = $("#phrValueSystolic").val();
- var phrValueDiastolic = $("#phrValueDiastolic").val();
- var phrValuePulseRate = $("#phrValuePulseRate").val();
- const recordedDate = $("#eventDateTime1").val() === "" ? null : $("#eventDateTime1").val();
- // 유효성 체크
- var errorMessage1 = checkValidForPhrData("bloodPressureSystolic", phrValueSystolic);
- var errorMessage2 = checkValidForPhrData("bloodPressureDiastolic", phrValueDiastolic);
-
- var errorMessage3 = checkValidForPhrData("pulseRate", phrValuePulseRate);
- // 수축기 F 이완기 S
- if (errorMessage1 && !errorMessage2) {
- alert(errorMessage1);
- $("#phrValueSystolic").focus();
- return;
- }
- // 수축기 S 이완기 F
- else if (!errorMessage1 && errorMessage2) {
- alert(errorMessage2);
- $("#phrValueDiastolic").focus();
- return;
- }
- // 수축기 F 이완기 F
- else if (errorMessage1 && errorMessage2) {
- // 미입력 에러
- if ((!phrValueSystolic || phrValueSystolic.length === 0) && (!phrValueDiastolic || phrValueDiastolic.length === 0)) {
- // 맥박 F
- if (errorMessage3) {
- alert(errorMessage3);
- $("#phrValuePulseRate").focus();
- return;
- }
- // 맥박 S
- else {
- // 맥박만 저장
- createPhrData(mPatientIdx, "pulseRate", recordedDate, phrValuePulseRate);
- }
- }
- // min max 오류
- else {
- if (errorMessage1) {
- alert(errorMessage1);
- $("#phrValueSystolic").focus();
- return;
- }
- }
- }
- // 수축기 S 이완기 S
- else if (!errorMessage1 && !errorMessage2) {
- // 맥박 F
- if (errorMessage3) {
- // 미입력 오류
- if (!phrValuePulseRate || phrValuePulseRate.length === 0) {
- // 혈압만 저장
- createPhrData(mPatientIdx, "bloodPressure", recordedDate, phrValueSystolic, phrValueDiastolic);
- }
- // min max 오류
- else {
- alert(errorMessage3);
- $("#phrValuePulseRate").focus();
- return;
- }
- }
- // 맥박 S
- else {
- // 혈압, 매박 모두 저장
- createPhrData(mPatientIdx, "bloodPressure", recordedDate, phrValueSystolic, phrValueDiastolic, phrValuePulseRate);
- }
- }
- $("#phrValueSystolic").val(PHR_VALUE_DEFAULT.BLOOD_PRESSURE_SYSTOLIC.VALUE);
- $("#phrValueDiastolic").val(PHR_VALUE_DEFAULT.BLOOD_PRESSURE_DIASTOLIC.VALUE);
- $("#phrValuePulseRate").val(PHR_VALUE_DEFAULT.PULSE_RATE.VALUE);
- }
- else {
- phrValue = $("#phrValue").val();
-
- // 유효성 체크
- var errorMessage = checkValidForPhrData(phrType, phrValue);
- if (errorMessage) {
- alert(errorMessage);
- $("#phrValue").focus();
- return;
- }
- // 저장 진행
- const recordedDate = $("#eventDateTime1").val() === "" ? null : $("#eventDateTime1").val();
- createPhrData(mPatientIdx, phrType, recordedDate, phrValue);
- var phrValueDefault = "";
- if (phrType === "temperature") {
- phrValueDefault = PHR_VALUE_DEFAULT.TEMPERATURE;
- }
- else if (phrType === "oxygenSaturation") {
- phrValueDefault = PHR_VALUE_DEFAULT.OXYGEN_SATURATION;
- }
- else if (phrType === "pulseRate") {
- phrValueDefault = PHR_VALUE_DEFAULT.PULSE_RATE;
- }
- else if (phrType === "bloodSugar") {
- phrValueDefault = PHR_VALUE_DEFAULT.BLOOD_SUGAR;
- }
- $("#phrValue").val(phrValueDefault);
- }
- $("#defaultModalPrimary_1").modal("hide");
- }
- function createPhrData(patientIdx, phrType, recordedDate, phrValue, phrValue2, phrValueExtra) {
-
- $.ajax({
- url : "./api/phrData",
- data : {patientIdx: patientIdx, phrType: phrType, recordedDate: recordedDate, phrValue: phrValue, phrValue2: phrValue2, phrValueExtra: phrValueExtra, recordedById: "${data._SES_ID}", recordedByName: "${data._SES_NAME}"},
- method : "POST",
- dataType : "json",
- success : function( datas ){
- retrievePhrData(phrType === "pulseRate" ? "bloodPressure" : phrType);
- },
- error : ajaxErrorHandler
- }).done( function(){
- });
- }
- function retrievePhrData(phrType) {
- const chartId = phrType + "Chart";
- let phrName = "";
- if (phrType === "temperature") {
- phrName = "체온";
- }
- else if (phrType === "bloodPressure") {
- // phrName = "";
- }
- else if (phrType === "oxygenSaturation") {
- phrName = "산소포화도";
- }
- else if (phrType === "bloodSugar") {
- phrName = "혈당";
- }
- var ignoreCache = moment().unix();
- var params = {patientIdx: mPatientIdx, phrType: phrType, ignoreCache:ignoreCache};
- $.ajax({
- url : "./api/phrDatas",
- data : params,
- method : "GET",
- dataType : "json",
- success : function( datas ){
- if (phrType==="bloodPressure") {
- drawBPChart(datas);
- }
- else {
- drawPhrChart(phrType+"Chart", datas, phrName);
- }
- var contents = "<tr><td colspan=4>데이터가 없습니다.</td></tr>" ;
- if (phrType==="bloodPressure") {
- contents = "<tr><td colspan=5>데이터가 없습니다.</td></tr>" ;
- }
- if (datas.length > 0) {
- contents = "";
- datas.forEach(function(d) {
- var danger = d.isWarning ? "text-danger" : "";
- var row = "";
- row += "<tr>";
- row += "<td>" + gridDateFormatter(d.recordedDate) + "</td>";
- if (phrType==="bloodPressure") {
- var extraDanger = d.isExtraWarning ? "text-danger" : "";
- row += "<td><span class='"+danger+"'>" + (isNaN(parseInt(d.phrValue)) ? "--" : parseInt(d.phrValue)) + " / " + (isNaN(parseInt(d.phrValue2)) ? "--" : parseInt(d.phrValue2)) + "</span></td>";
- row += "<td><span class='"+extraDanger+"'>" + (isNaN(parseInt(d.phrValueExtra)) ? "" : parseInt(d.phrValueExtra)) + "</span></td>";
- }
- else if (phrType==="temperature") {
- row += "<td><span class='"+danger+"'>" + parseFloat(d.phrValue).toFixed(1) + "</span></td>";
- }
- else {
- row += "<td><span class='"+danger+"'>" + parseInt(d.phrValue) + "</span></td>";
- }
- row += "<td>" + d.recordedByName + "</td>";
- row += "<td>" + gridDateFormatter(d.createDate) + "</td>";
- row += "</tr>";
- contents = row + contents;
- });
- };
- $("#"+phrType+"DataTable > tbody").html(contents);
- },
- error : ajaxErrorHandler
- }).done( function(){
- });
- }
- var myCharts = {};
- function drawPhrChart(chartId, data, dataName) {
- let myChart = myCharts[chartId];
- if (myChart) {
- myChart.destroy();
- myChart = null;
- }
- var xDatas = [];
- var yDatas = [];
- data.forEach(function(d) {
- var t = chartDateFormatter(d.recordedDate);
- xDatas.push(t);
- yDatas.push(d.phrValue);
- });
- var ctx = document.getElementById(chartId).getContext('2d');
- myCharts[chartId] = new Chart(ctx, {
- type: 'line',
- data: {
- labels: xDatas,
- datasets: [{
- label: dataName,
- data: yDatas,
- fill: false,
- backgroundColor: '#fff',
- borderColor: '#5b7dff',
- borderWidth: 2,
- }]
- },
- options: {
- maintainAspectRatio: false,
- }
- });
- }
- function drawBPChart(data) {
- let myChart = myCharts["bloodPressurePulseChart"];
- if (myChart) {
- myChart.destroy();
- myChart = null;
- }
- var xDatas = [];
- var y1Datas = [];
- var y2Datas = [];
- var y3Datas = [];
- var ymin = 1000;
- data.forEach(function(d) {
- var t = chartDateFormatter(d.recordedDate);
- xDatas.push(t);
- y1Datas.push(d.phrValue !== null && d.phrValue !== "" ? d.phrValue : Number.NaN);
- y2Datas.push(d.phrValue2 !== null && d.phrValue2 !== "" ? d.phrValue2 : Number.NaN);
- y3Datas.push(d.phrValueExtra !== null && d.phrValueExtra !== "" ? d.phrValueExtra : Number.NaN);
- if (d.phrValue !== null && d.phrValue !== "") ymin = Math.min(ymin, d.phrValue);
- if (d.phrValue2 !== null && d.phrValue2 !== "") ymin = Math.min(ymin, d.phrValue2);
- if (d.phrValueExtra !== null && d.phrValueExtra !== "") ymin = Math.min(ymin, d.phrValueExtra);
- });
- var ctx = document.getElementById("bloodPressurePulseChart").getContext('2d');
- myCharts["bloodPressurePulseChart"] = new Chart(ctx, {
- type: 'line',
- data: {
- labels: xDatas,
- datasets: [{
- label: "수축기 혈압",
- data: y1Datas,
- fill: false,
- backgroundColor: "#fff",
- borderColor: "#ff6384",
- borderWidth: 2,
- },{
- label: "이완기 혈압",
- data: y2Datas,
- fill: false,
- backgroundColor: "#fff",
- borderColor: "#5b7dff",
- borderWidth: 2,
- },{
- label: "맥박",
- data: y3Datas,
- backgroundColor: "#9ee7c5",
- type: 'bar',
- }]
- },
- options: {
- maintainAspectRatio: false,
- annotation: {
- drawTime: "afterDatasetsDraw",
- // annotations: annotationData,
- },
- scales: {
- yAxes: [{
- ticks: {
- suggestedMin: ymin - 10,
- }
- }]
- }
- }
- });
- }
- /*
- * 임상증상 탭 처리
- */
- function handleSymptomData() {
- if ($("input:checkbox[id='etcCheck']").is(":checked") && !$("#etcContent").val().trim()) {
- alert("기타 증상이 체크되었습니다. 내용을 입력해 주세요.");
- $("#etcContent").val("");
- return;
- }
- var checkedCount = ($("#defaultModalPrimary_2 input[type='checkbox']:checked").length);
- if (checkedCount === 0) {
- alert("증상을 체크해 주세요.");
- return;
- }
- var symptomObject = {
- patientIdx: mPatientIdx,
- coughCheck: $("input:checkbox[id='coughCheck']").is(":checked") ? "Y" : "N",
- dyspneaCheck: $("input:checkbox[id='dyspneaCheck']").is(":checked") ? "Y" : "N",
- coldFitCheck: $("input:checkbox[id='coldFitCheck']").is(":checked") ? "Y" : "N",
- musclePainCheck: $("input:checkbox[id='musclePainCheck']").is(":checked") ? "Y" : "N",
- headacheCheck: $("input:checkbox[id='headacheCheck']").is(":checked") ? "Y" : "N",
- soreThroatCheck: $("input:checkbox[id='soreThroatCheck']").is(":checked") ? "Y" : "N",
- smellPalateCheck: $("input:checkbox[id='smellPalateCheck']").is(":checked") ? "Y" : "N",
- fatigueCheck: $("input:checkbox[id='fatigueCheck']").is(":checked") ? "Y" : "N",
- appetiteLossCheck: $("input:checkbox[id='appetiteLossCheck']").is(":checked") ? "Y" : "N",
- sputumCheck: $("input:checkbox[id='sputumCheck']").is(":checked") ? "Y" : "N",
- ocinCheck: $("input:checkbox[id='ocinCheck']").is(":checked") ? "Y" : "N",
- vomitingCheck: $("input:checkbox[id='vomitingCheck']").is(":checked") ? "Y" : "N",
- diarrheaCheck: $("input:checkbox[id='diarrheaCheck']").is(":checked") ? "Y" : "N",
- dizzinessCheck: $("input:checkbox[id='dizzinessCheck']").is(":checked") ? "Y" : "N",
- noseCheck: $("input:checkbox[id='noseCheck']").is(":checked") ? "Y" : "N",
- etcCheck: $("input:checkbox[id='etcCheck']").is(":checked") ? "Y" : "N",
- etcContent: $("#etcContent").val(),
- recordedByName: "${data._SES_NAME}",
- recordedById: "${data._SES_ID}",
- recordedDate: $("#eventDateTime2").val() === "" ? null : $("#eventDateTime2").val(),
- }
- createSymptomData(symptomObject);
- $("#defaultModalPrimary_2 input[type='checkbox']:checked").prop("checked", false);
- $("#etcContent").val("");
- $("#eventDateTime2").val("")
- $("#defaultModalPrimary_2").modal("hide");
- }
- function createSymptomData(symptomObject) {
-
- $.ajax({
- url : "./api/symptomData",
- data : symptomObject,
- method : "POST",
- dataType : "json",
- success : function( datas ){
- retrieveSymptomData();
- },
- error : ajaxErrorHandler
- }).done( function(){
- });
- }
- function retrieveSymptomData() {
- var ignoreCache = moment().unix();
- var params = {patientIdx: mPatientIdx, ignoreCache:ignoreCache};
- $.ajax({
- url : "./api/symptomDatas",
- data : params,
- method : "GET",
- dataType : "json",
- success : function( datas ){
- var html = "<tr><td colspan=19>데이터가 없습니다.</td></tr>" ;
- var checkSymbol = '<i class="mdi mdi-check-bold"></i>';
- if (datas.length > 0) {
- html = "";
- contents = datas.forEach(function(d) {
- html += "<tr>";
- html += "<th>" + gridDateFormatter(d.recordedDate) + "</th>";
- html += "<td>" + (d.coughCheck === "Y" ? checkSymbol : "-") + "</td>";
- html += "<td>" + (d.dyspneaCheck === "Y" ? checkSymbol : "-") + "</td>";
- html += "<td>" + (d.coldFitCheck === "Y" ? checkSymbol : "-") + "</td>";
- html += "<td>" + (d.musclePainCheck === "Y" ? checkSymbol : "-") + "</td>";
-
- html += "<td>" + (d.headacheCheck === "Y" ? checkSymbol : "-") + "</td>";
- html += "<td>" + (d.soreThroatCheck === "Y" ? checkSymbol : "-") + "</td>";
- html += "<td>" + (d.smellPalateCheck === "Y" ? checkSymbol : "-") + "</td>";
- html += "<td>" + (d.fatigueCheck === "Y" ? checkSymbol : "-") + "</td>";
- html += "<td>" + (d.appetiteLossCheck === "Y" ? checkSymbol : "-") + "</td>";
- html += "<td>" + (d.sputumCheck === "Y" ? checkSymbol : "-") + "</td>";
- html += "<td>" + (d.ocinCheck === "Y" ? checkSymbol : "-") + "</td>";
- html += "<td>" + (d.vomitingCheck === "Y" ? checkSymbol : "-") + "</td>";
- html += "<td>" + (d.diarrheaCheck === "Y" ? checkSymbol : "-") + "</td>";
- html += "<td>" + (d.dizzinessCheck === "Y" ? checkSymbol : "-") + "</td>";
- html += "<td>" + (d.noseCheck === "Y" ? checkSymbol : "-") + "</td>";
- html += "<td>" + (d.etcCheck === "Y" ? d.etcContent : "-") + "</td>";
- html += "<td>" + d.recordedByName + "</td>";
- html += "<td>" + gridDateFormatter(d.createDate) + "</td>";
- html += "</tr>";
- });
- };
- $("#symptomDataTable > tbody").html(html);
- },
- error : ajaxErrorHandler
- }).done( function(){
- });
- }
- /*
- * 메모 탭 처리
- */
- function insertMemoData() {
- var memoContent = $("#memoContent").val().trim();
- const recordedDate = $("#eventDateTime3").val() === "" ? null : $("#eventDateTime3").val();
- if (!memoContent) {
- alert("메모 내용을 입력해 주세요.");
- $("#memoContent").val("");
- return;
- }
- requestInsertMemoData(memoContent, recordedDate);
- $("#memoContent").val("");
- $("#eventDateTime3").val("");
- }
- function deleteMemoData() {
- const memoId = $("#defaultModalPrimaryMemo").data("memoid");
- if (memoId === undefined || memoId === null || memoId === "") {
- alert("오류! 삭제할 메모를 찾을 수 없습니다.");
- return;
- }
- const result = confirm("메모를 삭제하시겠습니까?\n삭제후에는 복구가 불가능 합니다.");
- if(result){
- requestDeleteMemoData(memoId);
-
- $("#defaultModalPrimaryMemo").modal("hide");
- }
- }
- function modifyMemoData() {
- const memoId = $("#defaultModalPrimaryMemo").data("memoid");
- if (memoId === undefined || memoId === null || memoId === "") {
- alert("오류! 삭제할 메모를 찾을 수 없습니다.");
- return;
- }
- var modifyMemoContent = $("#modifyMemoContent").val().trim();
- if (!modifyMemoContent) {
- alert("메모 내용을 입력해 주세요.");
- $("#modifyMemoContent").val("");
- return;
- }
-
- const recordedDate = $("#modifMemoDateTime").val() === "" ? null : $("#modifMemoDateTime").val();
- const result = confirm("메모를 수정하시겠습니까?");
- if(result){
- requestUpdateMemoData(memoId, modifyMemoContent, recordedDate);
-
- $("#defaultModalPrimaryMemo").modal("hide");
- }
- }
- function requestInsertMemoData(memoContent, recordedDate) {
-
- $.ajax({
- url : "./api/memoData",
- data : {patientIdx:mPatientIdx, contents:memoContent, recordedDate:recordedDate, recordedByName:"${data._SES_NAME}", recordedById:"${data._SES_ID}"},
- method : "POST",
- dataType : "json",
- success : function( datas ){
- retrieveMemoData();
- },
- error : ajaxErrorHandler
- }).done( function(){
- });
- }
- function requestDeleteMemoData(memoIdx) {
-
- $.ajax({
- url : "./api/memoData",
- data : {idx:memoIdx},
- method : "DELETE",
- dataType : "json",
- success : function( datas ){
- retrieveMemoData();
- },
- error : ajaxErrorHandler
- }).done( function(){
- });
- }
- function requestUpdateMemoData(memoIdx, modifyMemoContent, recordedDate) {
-
- $.ajax({
- url : "./api/memoData",
- data : {idx:memoIdx, contents:modifyMemoContent, recordedDate:recordedDate},
- method : "PATCH",
- dataType : "json",
- success : function( datas ){
- if (datas.code === "00") {
- retrieveMemoData();
- }
- else {
- alert("메모 수정 실패.\n" + datas.code);
- }
- },
- error : ajaxErrorHandler
- }).done( function(){
- });
- }
- function retrieveMemoData() {
- var ignoreCache = moment().unix();
- var params = {patientIdx: mPatientIdx, ignoreCache:ignoreCache};
- $.ajax({
- url : "./api/memoDatas",
- data : params,
- method : "GET",
- dataType : "json",
- success : function( datas ){
- var html = "<tr><td colspan=4>데이터가 없습니다.</td></tr>" ;
- if (datas.length > 0) {
- html = "";
- contents = datas.forEach(function(d) {
- html += "<tr>";
- html += "<td>" + gridDateFormatter(d.recordedDate) + "</td>";
- if (d.canModify && d.recordedById === "${data._SES_ID}") {
- const clickEventListener ='handleModifyMemo("'+d.idx+'","'+d.recordedDate+'")';
- html += "<td><pre id='memo_"+d.idx+"' class='contentsEdit' onClick='"+clickEventListener+"'>" + d.contents + "</pre></td>";
- }
- else {
- html += "<td><pre>" + d.contents + "</pre></td>";
- }
- html += "<td>" + d.recordedByName + "</td>";
- html += "<td>" + gridDateFormatter(d.createDate) + "</td>";
- html += "</tr>";
- });
- };
- $("#memoDataTable > tbody").html(html);
- },
- error : ajaxErrorHandler
- }).done( function(){
- });
- }
- function gotoList() {
- var url = "./state";
- var refererSearch = '<c:out value="${refererSearch}" />';
- var refererPage = '<c:out value="${refererPage}" />';
-
- if (refererSearch !== "" && refererPage !== "") {
- url += "?searchText=" + encodeURIComponent(refererSearch) + "&page=" + refererPage;
- }
- else if (refererSearch !== "") {
- url += "?searchText=" + encodeURIComponent(refererSearch);
- }
- else if (refererPage !== "") {
- url += "?page=" + refererPage;
- }
- location.href = url;
- }
- function gotoPatientInfo() {
- var url = "/patient/info?patientIdx=" + mPatientIdx;
- location.href = url;
- }
- function getExcel() {
- if (!$("#downMemo").val().trim()) {
- alert("다운로드 사유를 입력해 주세요.");
- $("#downMemo").val("").foucs();
- return;
- }
- if ($("#downMemo").val().trim().length < 3) {
- alert("다운로드 사유는 3글자 이상이어야 합니다.");
- $("#downMemo").foucs();
- return;
- }
- const downMemo = $("#downMemo").val().trim();
- donwMemo = encodeURIComponent(downMemo);
- const url = "./excel?patientIdx=" + mPatientIdx + "&downMemo=" + downMemo;
- window.open(url);
- $("#excelDownMemo").modal("hide");
- }
- function handleModifyMemo(memoId, recordedDate) {
- $("#defaultModalPrimaryMemo").data("memoid", memoId);
- const content = $("#memo_"+memoId).html();
- var memoInfoHTML = '';
- memoInfoHTML += ' <th>내용</th>';
- memoInfoHTML += ' <td>';
- memoInfoHTML += ' <div class="form-row">';
- memoInfoHTML += ' <textarea id="modifyMemoContent" class="form-control" rows="15" placeholder="내용을 입력하세요">'+content+'</textarea>';
- memoInfoHTML += ' </div>';
- memoInfoHTML += ' </td>';
- $('#memoInfo').html(memoInfoHTML);
- $('#modifMemoDateTime').val(gridDateFormatter(recordedDate));
- $('#defaultModalPrimaryMemo').modal();
- setTimeout(function (){
- $('#memoInfo').find('.form-row textarea').focus();
- }, 500);
- }
- $(document).ready(function() {
- setTimeout(function () {
- $(".preloader").fadeOut("fast");
- }, 1000);
- $.datetimepicker.setLocale('ko');
- $(".datetimepicker").datetimepicker({
- format: 'Y-m-d H:i',
- step: 30,
- maxDate: '+1970/01/01' //오늘이 선택 가능한 마지막 날짜로 설정
- });
- const temperatureDatas = [];
- <c:forEach var="phr" items="${temperatureResult}" varStatus="status">
- temperatureDatas.push({recordedDate: "${phr.recordedDate}", phrValue: "${phr.phrValue}"});
- </c:forEach>
- drawPhrChart("temperatureChart", temperatureDatas, "체온");
-
- const bloodPressureUnionDatas = [];
- <c:forEach var="phr" items="${bloodPressureUnionResult}" varStatus="status">
- bloodPressureUnionDatas.push({recordedDate: "${phr.recordedDate}", phrValue: "${phr.phrValue}", phrValue2: "${phr.phrValue2}", phrValueExtra: "${phr.phrValueExtra}"});
- </c:forEach>
- drawBPChart(bloodPressureUnionDatas);
-
- const oxygenSaturationDatas = [];
- <c:forEach var="phr" items="${oxygenSaturationResult}" varStatus="status">
- oxygenSaturationDatas.push({recordedDate: "${phr.recordedDate}", phrValue: "${phr.phrValue}"});
- </c:forEach>
- drawPhrChart("oxygenSaturationChart", oxygenSaturationDatas, "산소포화도");
-
- const bloodSugarDatas = [];
- <c:forEach var="phr" items="${bloodSugarResult}" varStatus="status">
- bloodSugarDatas.push({recordedDate: "${phr.recordedDate}", phrValue: "${phr.phrValue}"});
- </c:forEach>
- drawPhrChart("bloodSugarChart", bloodSugarDatas, "혈당");
-
- // 초기 섹션 설정
- // var page_url = window.location.href;
- // var page_id = page_url.substring(page_url.lastIndexOf("#") + 1);
- // if (page_id === "symptomSection" || page_id === "medicalMemoSection") {
- // $('html, body').animate({ scrollTop: $('#' + page_id).offset().top }, 500);
- // }
- // 상단 환자 정보 영역 토글 이벤트
- $("#userInfo").find(".user-info").show();
- $(document).on("click", ".toggle .toggleHeader", function () {
- $(this).find("a.toggleBtn").toggleClass("active");
- $("#userInfo").slideToggle("fast");
- });
- // 섹션 토글
- $(document).on("click", ".sectionToggle, .phrTitle", function () {
- $(this).closest("section").find(".sectionToggle").toggleClass("hide");
- $(this).closest("section").find(".sectionContent").slideToggle("fast");
- });
- // 섹션 이동
- $(document).on("click", ".sectionNav li", function (event) {
- if ($(this).find("a").attr("href") !== "") {
- event.preventDefault();
- var aID = $(this).find("a").attr("href");
- $(".phrSection").removeClass("active");
- $(aID).addClass("active");
- $(".main").animate(
- {
- scrollTop: $(aID).position().top + 100,
- },
- 300
- );
- }
- });
- // 건강정보 엑셀 다운로드 사유 팝업 닫힐 때 처리
- $('#excelDownMemo').on('hidden.bs.modal', function () {
- $("#downMemo").val("");
- })
- // phrData 기록 추가 클릭 이벤트
- $('#defaultModalPrimary_1').on('hidden.bs.modal', function () {
- $("#eventDateTime1").val("");
- })
- $(document).on('click','[data-target="#defaultModalPrimary_1"]',function() {
- var selectData = $(this).attr("id");
- var healthInfoHTML = '';
- var phrValueDefault = null;
- if(selectData == 'temperature'){
- phrValueDefault = PHR_VALUE_DEFAULT.TEMPERATURE;
- healthInfoHTML += '<th>체온</th>';
- healthInfoHTML += '<td>';
- healthInfoHTML += ' <div class="form-group mb-xl-0">';
- healthInfoHTML += ' <input id="phrValue" class="form-control" type="number" placeholder="체온 입력" min="'+phrValueDefault.MIN+'" max="'+phrValueDefault.MAX+'" value="'+phrValueDefault.VALUE+'" step="0.1">';
- healthInfoHTML += ' </div>';
- healthInfoHTML += '</td>';
- }
- else if(selectData == 'bloodPressure'){
- phrValueDefault1 = PHR_VALUE_DEFAULT.BLOOD_PRESSURE_SYSTOLIC;
- phrValueDefault2 = PHR_VALUE_DEFAULT.BLOOD_PRESSURE_DIASTOLIC;
- phrValueDefault3 = PHR_VALUE_DEFAULT.PULSE_RATE;
- healthInfoHTML += '<th>혈압/맥박</th>';
- healthInfoHTML += '<td>';
- healthInfoHTML += ' <div class="form-group mb-xl-0">';
- healthInfoHTML += ' <input id="phrValueSystolic" class="form-control mb-2" type="number" placeholder="수축기 혈압 입력" min="'+phrValueDefault1.MIN+'" max="'+phrValueDefault1.MAX+'" value="'+phrValueDefault1.VALUE+'">';
- healthInfoHTML += ' <input id="phrValueDiastolic" class="form-control mb-2" type="number" placeholder="이완기 혈압 입력" min="'+phrValueDefault2.MIN+'" max="'+phrValueDefault2.MAX+'" value="'+phrValueDefault2.VALUE+'">';
- healthInfoHTML += ' <input id="phrValuePulseRate" class="form-control" type="number" placeholder="맥박 입력"min="'+phrValueDefault3.MIN+'" max="'+phrValueDefault3.MAX+'" value="'+phrValueDefault3.VALUE+'">';
- healthInfoHTML += ' </div>';
- healthInfoHTML += '</td>';
- }
- else if(selectData == 'pulseRate'){
- phrValueDefault = PHR_VALUE_DEFAULT.PULSE_RATE;
- healthInfoHTML += '<th>맥박</th>';
- healthInfoHTML += '<td>';
- healthInfoHTML += ' <div class="form-group mb-xl-0">';
- healthInfoHTML += ' <input id="phrValue" class="form-control" type="number" placeholder="맥박 입력"min="'+phrValueDefault.MIN+'" max="'+phrValueDefault.MAX+'" value="'+phrValueDefault.VALUE+'">';
- healthInfoHTML += ' </div>';
- healthInfoHTML += '</td>';
- }
- else if(selectData == 'oxygenSaturation'){
- phrValueDefault = PHR_VALUE_DEFAULT.OXYGEN_SATURATION;
- healthInfoHTML += '<th>산소포화도</th>';
- healthInfoHTML += '<td>';
- healthInfoHTML += ' <div class="form-group mb-xl-0">';
- healthInfoHTML += ' <input id="phrValue" class="form-control" type="number" placeholder="산소포화도 입력" min="'+phrValueDefault.MIN+'" max="'+phrValueDefault.MAX+'" value="'+phrValueDefault.VALUE+'">';
- healthInfoHTML += ' </div>';
- healthInfoHTML += '</td>';
- }
- else if(selectData == 'bloodSugar'){
- phrValueDefault = PHR_VALUE_DEFAULT.BLOOD_SUGAR;
- healthInfoHTML += '<th>혈당</th>';
- healthInfoHTML += '<td>';
- healthInfoHTML += ' <div class="form-group mb-xl-0">';
- healthInfoHTML += ' <input id="phrValue" class="form-control" type="number" placeholder="혈당 입력" min="'+phrValueDefault.MIN+'" max="'+phrValueDefault.MAX+'" value="'+phrValueDefault.VALUE+'"">';
- healthInfoHTML += ' </div>';
- healthInfoHTML += '</td>';
- }
- else {
- }
- $('#healthInfo').html(healthInfoHTML);
- $('#healthInfo').attr("data-phr-type", selectData);
- setTimeout(function (){
- $('#healthInfo').find('.form-group input:first-child').focus();
- }, 500);
-
- });
- // 임상증상 추가 클릭 이벤트
- $('#defaultModalPrimary_2').on('hidden.bs.modal', function () {
- $("#eventDateTime2").val("");
- })
- $(document).on('click','[data-target="#defaultModalPrimary_2"]',function(){
- var symptomInfoHtml = '';
- symptomInfoHtml += ' <th>임상증상</th>';
- symptomInfoHtml += ' <td>';
- symptomInfoHtml += ' <div class="form-group mb-xl-0">';
- symptomInfoHtml += ' <label class="form-check form-check-inline">';
- symptomInfoHtml += ' <input id="coughCheck" class="form-check-input" type="checkbox">';
- symptomInfoHtml += ' <span class="form-check-label">';
- symptomInfoHtml += ' 기침';
- symptomInfoHtml += ' </span>';
- symptomInfoHtml += ' </label>';
- symptomInfoHtml += ' <label class="form-check form-check-inline">';
- symptomInfoHtml += ' <input id="dyspneaCheck" class="form-check-input" type="checkbox">';
- symptomInfoHtml += ' <span class="form-check-label">';
- symptomInfoHtml += ' 호흡곤란';
- symptomInfoHtml += ' </span>';
- symptomInfoHtml += ' </label>';
- symptomInfoHtml += ' <label class="form-check form-check-inline">';
- symptomInfoHtml += ' <input id="coldFitCheck" class="form-check-input" type="checkbox">';
- symptomInfoHtml += ' <span class="form-check-label">';
- symptomInfoHtml += ' 오한';
- symptomInfoHtml += ' </span>';
- symptomInfoHtml += ' </label>';
- symptomInfoHtml += ' <label class="form-check form-check-inline">';
- symptomInfoHtml += ' <input id="musclePainCheck" class="form-check-input" type="checkbox">';
- symptomInfoHtml += ' <span class="form-check-label">';
- symptomInfoHtml += ' 근육통';
- symptomInfoHtml += ' </span>';
- symptomInfoHtml += ' </label>';
- symptomInfoHtml += ' <label class="form-check form-check-inline">';
- symptomInfoHtml += ' <input id="headacheCheck" class="form-check-input" type="checkbox">';
- symptomInfoHtml += ' <span class="form-check-label">';
- symptomInfoHtml += ' 두통';
- symptomInfoHtml += ' </span>';
- symptomInfoHtml += ' </label>';
- symptomInfoHtml += ' <label class="form-check form-check-inline">';
- symptomInfoHtml += ' <input id="soreThroatCheck" class="form-check-input" type="checkbox">';
- symptomInfoHtml += ' <span class="form-check-label">';
- symptomInfoHtml += ' 인후통';
- symptomInfoHtml += ' </span>';
- symptomInfoHtml += ' </label>';
- symptomInfoHtml += ' <label class="form-check form-check-inline">';
- symptomInfoHtml += ' <input id="smellPalateCheck" class="form-check-input" type="checkbox">';
- symptomInfoHtml += ' <span class="form-check-label">';
- symptomInfoHtml += ' 후각/미각 손실';
- symptomInfoHtml += ' </span>';
- symptomInfoHtml += ' </label>';
- symptomInfoHtml += ' <label class="form-check form-check-inline">';
- symptomInfoHtml += ' <input id="fatigueCheck" class="form-check-input" type="checkbox">';
- symptomInfoHtml += ' <span class="form-check-label">';
- symptomInfoHtml += ' 피로';
- symptomInfoHtml += ' </span>';
- symptomInfoHtml += ' </label>';
- symptomInfoHtml += ' <label class="form-check form-check-inline">';
- symptomInfoHtml += ' <input id="appetiteLossCheck" class="form-check-input" type="checkbox">';
- symptomInfoHtml += ' <span class="form-check-label">';
- symptomInfoHtml += ' 식욕감소';
- symptomInfoHtml += ' </span>';
- symptomInfoHtml += ' </label>';
- symptomInfoHtml += ' <label class="form-check form-check-inline">';
- symptomInfoHtml += ' <input id="sputumCheck" class="form-check-input" type="checkbox">';
- symptomInfoHtml += ' <span class="form-check-label">';
- symptomInfoHtml += ' 가래';
- symptomInfoHtml += ' </span>';
- symptomInfoHtml += ' </label>';
- symptomInfoHtml += ' <label class="form-check form-check-inline">';
- symptomInfoHtml += ' <input id="ocinCheck" class="form-check-input" type="checkbox">';
- symptomInfoHtml += ' <span class="form-check-label">';
- symptomInfoHtml += ' 오심';
- symptomInfoHtml += ' </span>';
- symptomInfoHtml += ' </label>';
- symptomInfoHtml += ' <label class="form-check form-check-inline">';
- symptomInfoHtml += ' <input id="vomitingCheck" class="form-check-input" type="checkbox">';
- symptomInfoHtml += ' <span class="form-check-label">';
- symptomInfoHtml += ' 구토';
- symptomInfoHtml += ' </span>';
- symptomInfoHtml += ' </label>';
- symptomInfoHtml += ' <label class="form-check form-check-inline">';
- symptomInfoHtml += ' <input id="diarrheaCheck" class="form-check-input" type="checkbox">';
- symptomInfoHtml += ' <span class="form-check-label">';
- symptomInfoHtml += ' 설사';
- symptomInfoHtml += ' </span>';
- symptomInfoHtml += ' </label>';
- symptomInfoHtml += ' <label class="form-check form-check-inline">';
- symptomInfoHtml += ' <input id="dizzinessCheck" class="form-check-input" type="checkbox">';
- symptomInfoHtml += ' <span class="form-check-label">';
- symptomInfoHtml += ' 어지러움';
- symptomInfoHtml += ' </span>';
- symptomInfoHtml += ' </label>';
- symptomInfoHtml += ' <label class="form-check form-check-inline">';
- symptomInfoHtml += ' <input id="noseCheck" class="form-check-input" type="checkbox">';
- symptomInfoHtml += ' <span class="form-check-label">';
- symptomInfoHtml += ' 콧물/코막힘';
- symptomInfoHtml += ' </span>';
- symptomInfoHtml += ' </label>';
- symptomInfoHtml += ' <label class="form-check form-check-inline">';
- symptomInfoHtml += ' <input id="etcCheck" class="form-check-input" type="checkbox">';
- symptomInfoHtml += ' <span class="form-check-label">';
- symptomInfoHtml += ' 기타 ( <input type="text" id="etcContent" class="form-control form-control-sm w150" value="" placeholder="증상 내용" disabled> )';
- symptomInfoHtml += ' </span>';
- symptomInfoHtml += ' </label>';
- symptomInfoHtml += ' </div>';
- symptomInfoHtml += ' </td>';
- $('#symptomInfo').html(symptomInfoHtml);
-
- document.getElementById('etcCheck').onchange = function() {
- document.getElementById('etcContent').disabled = !this.checked;
- if (!this.checked) {
- $("#etcContent").val("");
- }
- };
- });
- // 의료진 메모 추가 클릭 이벤트
- $('#defaultModalPrimaryMemo').on('hidden.bs.modal', function () {
- $("#modifMemoDateTime").val("");
- })
- $(document).on('click','.addMemo',function(){
- var memoInfoHTML = '';
- memoInfoHTML += '<th>내용</th>';
- memoInfoHTML += '<td>';
- memoInfoHTML += ' <div class="form-row">';
- memoInfoHTML += ' <textarea id="memoContent" class="form-control" rows="15" placeholder="내용을 입력하세요"></textarea>';
- memoInfoHTML += ' </div>';
- memoInfoHTML += '</td>';
-
- $('#memoInfo').html(memoInfoHTML);
- $('#defaultModalPrimaryMemo').modal();
- setTimeout(function (){
- $('#memoInfo').find('.form-row textarea').focus();
- }, 500);
- });
- });
- </script>
- </head>
- <body>
- <form id="nonface" name="nonface" action="https://lemon.medihere.com/app/vc">
- </form>
- <form id="hiddenForm">
- <input type="hidden" id="pId" name="pId" value='<c:out value="${info.id}" />'>
- <input type="hidden" id="pName" name="pName" value='<c:out value="${info.patientName}" />'>
- <input type="hidden" id="roomId" name="roomId" value='<c:out value="${info.roomNumber}" />'>
- </form>
- <div class="preloader">
- <div class="loadingIcon"></div>
- </div>
- <div class="modal fade" id="excelDownMemo" tabindex="-1" role="dialog" aria-hidden="true" data-memoid="">
- <div class="modal-dialog" role="document">
- <div class="modal-content">
- <div class="modal-header">
- <h5 class="modal-title">건강정보 Excel 다운로드</h5>
- <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
- aria-hidden="true">×</span> </button>
- </div>
- <div class="modal-body m-3">
- <table class="table mobile-table">
- <colgroup>
- <col style="width: 20%">
- <col style="width: 80%">
- </colgroup>
- <tr>
- <th><span class="fix">*</span>다운로드 사유</th>
- <td>
- <div class="form-row">
- <textarea id="downMemo" name="downMemo" class="form-control" cols="" rows="6" placeholder="" maxlength="200"></textarea>
- </div>
- </td>
- </tr>
- </table>
- </div>
- <div class="addMemoTools modal-footer">
- <button type="button" class="btn btn-outline-primary" data-dismiss="modal">취소</button>
- <button type="button" class="btn btn-primary" onclick="getExcel();">제출 후 다운로드</button>
- </div>
- </div>
- </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">×</span> </button>
- </div>
- <div class="modal-body m-1">
- <h4>생체측정 알람 표시 기준</h4>
- <ul class="legend">
- <li class="row fever">
- <div class="col-lg-4">체온</div>
- <div class="col-lg-8">37.5 이상</div>
- </li>
- <li class="row bloodPressure">
- <div class="col-lg-4">고혈압</div>
- <div class="col-lg-8">수축기 149 이상<br>이완기 99 이상</div>
- </li>
- <li class="row bloodPressure">
- <div class="col-lg-4">저혈압</div>
- <div class="col-lg-8">수축기 90 이하<br>이완기 60 이하</div>
- </li>
- <li class="row pulse">
- <div class="col-lg-4">맥박</div>
- <div class="col-lg-8">최저 55 이하<br>최고 110 이상</div>
- </li>
- <li class="row oxygen">
- <div class="col-lg-4">산소포화도</div>
- <div class="col-lg-8">94% 이하</div>
- </li>
- <li class="row sugar">
- <div class="col-lg-4">고혈당</div>
- <div class="col-lg-8">200 이상</div>
- </li>
- <li class="row sugar">
- <div class="col-lg-4">저혈당</div>
- <div class="col-lg-8">70 이하 </div>
- </li>
- </ul>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-primary" data-dismiss="modal">닫기</button>
- </div>
- </div>
- </div>
- </div>
- <div class="modal fade" id="defaultModalPrimary_1" 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">×</span> </button>
- </div>
- <div class="modal-body m-3">
- <table class="table mobile-table">
- <colgroup>
- <col style="width: 30%">
- <col style="width: 70%">
- </colgroup>
- <tr>
- <th>기록자</th>
- <td>
- <div class="form-group mb-xl-0">
- <input class="form-control" type="text" value="${data._SES_NAME}" readonly>
- </div>
- </td>
- </tr>
- <tr id="healthInfo">
- <!-- 컨텐츠 동적 생성 -->
- </tr>
- <tr>
- <th>측정일시</th>
- <td>
- <div class="datetimepickerWrap">
- <input id="eventDateTime1" class="datetimepicker form-control" type="text" placeholder="측정일시(미 입력시 현재시간 자동등록)">
- </div>
- </td>
- </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" onclick="handlePhrData()">등록</button>
- </div>
- </div>
- </div>
- </div>
- <div class="modal fade" id="defaultModalPrimary_2" tabindex="-1" role="dialog" aria-hidden="true">
- <div class="modal-dialog" 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">×</span> </button>
- </div>
- <div class="modal-body m-3">
- <table class="table mobile-table">
- <colgroup>
- <col style="width: 30%">
- <col style="width: 70%">
- </colgroup>
- <tr>
- <th>기록자</th>
- <td>
- <div class="form-group mb-xl-0">
- <input class="form-control" type="text" value="${data._SES_NAME}" readonly>
- </div>
- </td>
- </tr>
- <tr id="symptomInfo">
- <!-- 컨텐츠 동적 생성 -->
- </tr>
- <tr>
- <th>측정일시</th>
- <td>
- <div class="datetimepickerWrap">
- <input id="eventDateTime2" class="datetimepicker form-control" type="text" placeholder="측정일시(미 입력시 현재시간 자동등록)">
- </div>
- </td>
- </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" onclick="handleSymptomData()">등록</button>
- </div>
- </div>
- </div>
- </div>
- <div class="modal fade" id="defaultModalPrimaryMemo" tabindex="-1" role="dialog" aria-hidden="true" data-memoid="">
- <div class="modal-dialog" 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">×</span> </button>
- </div>
- <div class="modal-body m-3">
- <table class="table mobile-table">
- <colgroup>
- <col style="width: 20%">
- <col style="width: 80%">
- </colgroup>
- <tr>
- <th>작성자</th>
- <td>
- <div class="form-row">
- <input id="modifUser" type="text" name="" class="form-control" placeholder="이름을 입력하세요" value="${data._SES_NAME}" readonly>
- </div>
- </td>
- </tr>
- <tr id="memoInfo">
- <!-- 컨텐츠 동적 생성 -->
- </tr>
- <tr>
- <th>처리일시</th>
- <td>
- <div class="datetimepickerWrap form-row">
- <input id="modifMemoDateTime" class="datetimepicker form-control" type="text" placeholder="측정일시(미 입력시 현재시간 자동등록)">
- </div>
- </td>
- </tr>
- </table>
- </div>
- <div class="modal-footer">
- <button type="button" class="removeMemo btn btn-danger" onclick="deleteMemoData()">삭제</button>
- <button type="button" class="btn btn-outline-primary" data-dismiss="modal">취소</button>
- <button type="button" class="btn btn-primary" onclick="modifyMemoData()">수정</button>
- </div>
- </div>
- </div>
- </div>
- <div class="wrapper">
- <jsp:include page="${data._INCLUDE}/sidebar.jsp"></jsp:include>
- <div class="main">
- <jsp:include page="${data._INCLUDE}/top.jsp"></jsp:include>
- <main class="content">
- <div class="container-fluid p-0">
- <div class="row">
- <div class="col-12 col-lg-6">
- <h1 class="h3 mb-3">건강정보 조회</h1>
- </div>
- <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>
- <li class="breadcrumb-item">진료관리</li>
- <li class="breadcrumb-item active">건강정보 조회</li>
- </ol>
- </nav>
- </div>
- </div>
- <div class="row">
- <div class="col-12">
- <div id="home" class="card">
- <div class="row mb-3">
- <div class="col-12">
- <button class="btn btn-lg btn-secondary mr-2" onclick="gotoList()"><i class="mdi mdi-backburger"></i> 대시보드</button>
- <c:if test="${data._SES_GROUP_IDX ne '3'}">
- <button id="downloadData" type="button" class="btn btn-lg btn-success" data-toggle="modal" data-target="#excelDownMemo"><i class="mdi mdi-file-excel-outline"></i> 건강정보 다운로드</button>
- </c:if>
- </div>
- </div>
- <div class="toggle">
- <div class="toggleHeader card-header">
- <h1 class="h4">
- <c:set var="now" value="<%=new java.util.Date()%>" />
- <fmt:formatDate value="${now}" pattern="yyyy" var="sysYear"/>
- <fmt:parseDate value="${info.jumin}" pattern="yyyy년 MM월 dd일" var="birthDate"/>
- <fmt:formatDate value="${birthDate}" pattern="yyyy" var="birthYear"/>
- <c:set var="age" value="${sysYear-birthYear}" />
- <span class="mr-2"><span id="roomNumber"><c:out value="${info.roomNumber}" />호</span> <span id="patientName"><c:out value="${info.patientName}" /></span>(<span id="patientGender"><c:out value="${info.gender=='M'?'남':'여'}" /></span>/<span id="patientYearsOld"><c:out value="${age}" /></span>세) 환자 기본정보</span>
- <button class="untactStart btn btn-lg btn-warning" onclick="nonFaceStart(event);"><i class="mdi mdi-message-video"></i> 비대면 진료</button>
- </h1>
- <a href="javscript:;" class="toggleBtn">메뉴</a>
- </div>
- <div id="userInfo" class="card-body user-info">
- <div class="mb-3">
- <button class="patientInfo btn btn-primary" onclick="gotoPatientInfo()"><i class="mdi mdi-account"></i> 환자정보 관리</button>
- </div>
- <jsp:include page="${data._INCLUDE}/patientInfo.jsp"></jsp:include>
- </div>
- </div>
- <!-- <hr> -->
- <div class="card-body">
- <section id="symptomSection" class="phrSection">
- <div class="col-lg-12">
- <div class="row">
- <div class="col-lg-3">
- <h1 class="h4">
- <div class="sectionToggle"></div>
- <span class="phrTitle symptom">임상증상</span>
- </h1>
- </div>
- <div class="col-lg-9 text-right">
- <button id="symptom" type="button" class="btn btn-primary" data-toggle="modal" data-target="#defaultModalPrimary_2"><i class="mdi mdi-clipboard-pulse-outline"></i> 임상증상 추가</button>
- </div>
- </div>
- </div>
- <div class="sectionContent col-lg-12">
- <div class="row">
- <div class="sectionNav col-lg-12">
- <ul>
- <li><a href="#home">환자정보</a></li>
- <li class="active"><a href="#symptomSection">임상증상</a></li>
- <li><a href="#feverSection">체온</a></li>
- <li><a href="#bloodPressureSection">혈압 / 맥박</a></li>
- <li><a href="#oxygenSection">산소포화도</a></li>
- <li><a href="#sugarSection">혈당</a></li>
- <li><a href="#medicalMemoSection">의료진 메모</a></li>
- </ul>
- </div>
- <div class="col-lg-12">
- <div class="phrDataTableWrap table-responsive mb-4">
- <table id="symptomDataTable" class="symptomDataTable table data-table text-center">
- <thead>
- <tr>
- <th>측정일시</th>
- <th>기침</th>
- <th>호흡곤란</th>
- <th>오한</th>
- <th>근육통</th>
- <th>두통</th>
- <th>인후통</th>
- <th>후각/미각 소실</th>
- <th>피로</th>
- <th>식욕감소</th>
- <th>가래</th>
- <th>오심</th>
- <th>구토</th>
- <th>설사</th>
- <th>어지러움</th>
- <th>콧물/코막힘</th>
- <th>기타증상</th>
- <th>기록자</th>
- <th>기록일시</th>
- </tr>
- </thead>
- <tbody>
- <c:set var="symptomTotal" value="${symptomResult.size()}" />
- <c:set var="yesHtml" value="<i class='mdi mdi-check-bold'></i>" />
- <c:set var="noHtml" value="-" />
- <c:choose>
- <c:when test="${symptomTotal > 0}">
- <c:forEach var="d" items="${symptomResult}">
- <tr>
- <th><c:out value="${d.recordedDateFormatted}" /></th>
- <td>${d.coughCheck == 'Y' ? yesHtml : noHtml}</td>
- <td>${d.dyspneaCheck == 'Y' ? yesHtml : noHtml}</td>
- <td>${d.coldFitCheck == 'Y' ? yesHtml : noHtml}</td>
- <td>${d.musclePainCheck == 'Y' ? yesHtml : noHtml}</td>
- <td>${d.headacheCheck == 'Y' ? yesHtml : noHtml}</td>
- <td>${d.soreThroatCheck == 'Y' ? yesHtml : noHtml}</td>
- <td>${d.smellPalateCheck == 'Y' ? yesHtml : noHtml}</td>
- <td>${d.fatigueCheck == 'Y' ? yesHtml : noHtml}</td>
- <td>${d.appetiteLossCheck == 'Y' ? yesHtml : noHtml}</td>
- <td>${d.sputumCheck == 'Y' ? yesHtml : noHtml}</td>
- <td>${d.ocinCheck == 'Y' ? yesHtml : noHtml}</td>
- <td>${d.vomitingCheck == 'Y' ? yesHtml : noHtml}</td>
- <td>${d.diarrheaCheck == 'Y' ? yesHtml : noHtml}</td>
- <td>${d.dizzinessCheck == 'Y' ? yesHtml : noHtml}</td>
- <td>${d.noseCheck == 'Y' ? yesHtml : noHtml}</td>
- <td>${d.etcCheck == 'Y' ? d.etcContent : noHtml}</td>
- <td><c:out value="${d.recordedByName}" /></td>
- <td><c:out value="${d.createDateFormatted}" /></td>
- </tr>
- </c:forEach>
- </c:when>
- <c:otherwise>
- <tr>
- <td colspan=19>데이터가 없습니다.</td>
- </tr>
- </c:otherwise>
- </c:choose>
- </tbody>
- </table>
- </div>
- </div>
- </div>
- </div>
- </section>
- <!-- <hr> -->
- <section id="feverSection" class="phrSection">
- <div class="col-lg-12">
- <div class="row">
- <div class="col-lg-3">
- <h1 class="h4">
- <div class="sectionToggle"></div>
- <span class="phrTitle fever">체온</span>
- </h1>
- </div>
- <div class="col-lg-9 text-right">
- <button id="temperature" type="button" class="btn btn-primary ml-2" data-toggle="modal" data-target="#defaultModalPrimary_1"><i class="mdi mdi-clipboard-pulse-outline"></i> 체온 추가</button>
- </div>
- </div>
- </div>
- <div class="sectionContent col-lg-12">
- <div class="row">
- <div class="sectionNav col-lg-12">
- <ul>
- <li><a href="#home">환자정보</a></li>
- <li><a href="#symptomSection">임상증상</a></li>
- <li class="active"><a href="#feverSection">체온</a></li>
- <li><a href="#bloodPressureSection">혈압 / 맥박</a></li>
- <li><a href="#oxygenSection">산소포화도</a></li>
- <li><a href="#sugarSection">혈당</a></li>
- <li><a href="#medicalMemoSection">의료진 메모</a></li>
- </ul>
- </div>
- <div class="col-lg-6 col-md-12">
- <div class="graph-area mb-4">
- <canvas id="temperatureChart" style="width: 100%; height: 370px"></canvas>
- </div>
- </div>
- <div class="col-lg-6 col-md-12">
- <h1 class="h4 text-right">
- <span class="small showLegend" data-toggle="modal" data-target="#legendGuide"><i class="mdi mdi-comment-question-outline"></i> 알람 표시 기준</span>
- </h1>
- <div class="phrDataTableWrap table-responsive">
- <table id="temperatureDataTable" class="phrDataTable table data-table text-center">
- <thead>
- <tr>
- <th>측정일시</th>
- <th>체온</th>
- <th>기록자</th>
- <th>기록일시</th>
- </tr>
- </thead>
- <tbody>
- <c:set var="temperatureTotal" value="${temperatureResult.size()}" />
- <c:choose>
- <c:when test="${temperatureTotal > 0}">
- <c:forEach var="i" begin="1" end="${temperatureTotal}">
- <tr>
- <td><c:out value="${temperatureResult[temperatureTotal-i].recordedDateFormatted}" /></td>
- <td><span class="${temperatureResult[temperatureTotal-i].isWarning ? 'text-danger' : ''}"><c:out value="${temperatureResult[temperatureTotal-i].phrValue}" /></span></td>
- <td><c:out value="${temperatureResult[temperatureTotal-i].recordedByName}" /></td>
- <td><c:out value="${temperatureResult[temperatureTotal-i].createDateFormatted}" /></td>
- </tr>
- </c:forEach>
- </c:when>
- <c:otherwise>
- <tr>
- <td colspan=4>데이터가 없습니다.</td>
- </tr>
- </c:otherwise>
- </c:choose>
- </tbody>
- </table>
- </div>
- </div>
- </div>
- </div>
- </section>
- <!-- <hr> -->
- <section id="bloodPressureSection" class="phrSection">
- <div class="col-lg-12">
- <div class="row">
- <div class="col-lg-3">
- <h1 class="h4">
- <div class="sectionToggle"></div>
- <span class="phrTitle bloodPressure">혈압 / 맥박</span>
- </h1>
- </div>
- <div class="col-lg-9 text-right">
- <button id="bloodPressure" type="button" class="btn btn-primary ml-2" data-toggle="modal" data-target="#defaultModalPrimary_1"><i class="mdi mdi-clipboard-pulse-outline"></i> 혈압 / 맥박 추가</button>
- </div>
- </div>
- </div>
- <div class="sectionContent col-lg-12">
- <div class="row">
- <div class="sectionNav col-lg-12">
- <ul>
- <li><a href="#home">환자정보</a></li>
- <li><a href="#symptomSection">임상증상</a></li>
- <li><a href="#feverSection">체온</a></li>
- <li class="active"><a href="#bloodPressureSection">혈압 / 맥박</a></li>
- <li><a href="#oxygenSection">산소포화도</a></li>
- <li><a href="#sugarSection">혈당</a></li>
- <li><a href="#medicalMemoSection">의료진 메모</a></li>
- </ul>
- </div>
- <div class="col-lg-6 col-md-12">
- <div class="graph-area mb-4">
- <canvas id="bloodPressurePulseChart" style="width: 100%; height: 370px"></canvas>
- </div>
- </div>
- <div class="col-lg-6 col-md-12">
- <h1 class="h4 text-right">
- <span class="small showLegend" data-toggle="modal" data-target="#legendGuide"><i class="mdi mdi-comment-question-outline"></i> 알람 표시 기준</span>
- </h1>
- <div class="phrDataTableWrap table-responsive">
- <table id="bloodPressureDataTable" class="phrDataTable table data-table text-center">
- <thead>
- <tr>
- <th>측정일시</th>
- <th>혈압</th>
- <th>맥박</th>
- <th>기록자</th>
- <th>기록일시</th>
- </tr>
- </thead>
- <tbody>
- <c:set var="bloodPressureUnionTotal" value="${bloodPressureUnionResult.size()}" />
- <c:choose>
- <c:when test="${bloodPressureUnionTotal > 0}">
- <c:forEach var="i" begin="1" end="${bloodPressureUnionTotal}">
- <fmt:parseNumber var="bpH" value="${bloodPressureUnionResult[bloodPressureUnionTotal-i].phrValue}" integerOnly="true" />
- <fmt:parseNumber var="bpL" value="${bloodPressureUnionResult[bloodPressureUnionTotal-i].phrValue2}" integerOnly="true" />
- <fmt:parseNumber var="pr" value="${bloodPressureUnionResult[bloodPressureUnionTotal-i].phrValueExtra}" integerOnly="true" />
- <tr>
- <td><c:out value="${bloodPressureUnionResult[bloodPressureUnionTotal-i].recordedDateFormatted}" /></td>
- <td><span class="${bloodPressureUnionResult[bloodPressureUnionTotal-i].isWarning ? 'text-danger' : ''}"><c:out value="${bpH}/${bpL}" /></span></td>
- <td><span class="${bloodPressureUnionResult[bloodPressureUnionTotal-i].isExtraWarning ? 'text-danger' : ''}"><c:out value="${pr}" /></span></td>
- <td><c:out value="${bloodPressureUnionResult[bloodPressureUnionTotal-i].recordedByName}" /></td>
- <td><c:out value="${bloodPressureUnionResult[bloodPressureUnionTotal-i].createDateFormatted}" /></td>
- </tr>
- </c:forEach>
- </c:when>
- <c:otherwise>
- <tr>
- <td colspan=5>데이터가 없습니다.</td>
- </tr>
- </c:otherwise>
- </c:choose>
- </tbody>
- </table>
- </div>
- </div>
- </div>
- </div>
- </section>
- <!-- <hr> -->
- <section id="oxygenSection" class="phrSection">
- <div class="col-lg-12">
- <div class="row">
- <div class="col-lg-3">
- <h1 class="h4">
- <div class="sectionToggle"></div>
- <span class="phrTitle oxygen">산소포화도</span>
- </h1>
- </div>
- <div class="col-lg-9 text-right">
- <button id="oxygenSaturation" type="button" class="btn btn-primary ml-2" data-toggle="modal" data-target="#defaultModalPrimary_1"><i class="mdi mdi-clipboard-pulse-outline"></i> 산소포화도 추가</button>
- </div>
- </div>
- </div>
- <div class="sectionContent col-lg-12">
- <div class="row">
- <div class="sectionNav col-lg-12">
- <ul>
- <li><a href="#home">환자정보</a></li>
- <li><a href="#symptomSection">임상증상</a></li>
- <li><a href="#feverSection">체온</a></li>
- <li><a href="#bloodPressureSection">혈압 / 맥박</a></li>
- <li class="active"><a href="#oxygenSection">산소포화도</a></li>
- <li><a href="#sugarSection">혈당</a></li>
- <li><a href="#medicalMemoSection">의료진 메모</a></li>
- </ul>
- </div>
- <div class="col-lg-6 col-md-12">
- <div class="graph-area mb-4">
- <canvas id="oxygenSaturationChart" style="width: 100%; height: 370px"></canvas>
- </div>
- </div>
- <div class="col-lg-6 col-md-12">
- <h1 class="h4 text-right">
- <span class="small showLegend" data-toggle="modal" data-target="#legendGuide"><i class="mdi mdi-comment-question-outline"></i> 알람 표시 기준</span>
- </h1>
- <div class="phrDataTableWrap table-responsive">
- <table id="oxygenSaturationDataTable" class="phrDataTable table data-table text-center">
- <thead>
- <tr>
- <th>측정일시</th>
- <th>산소포화도</th>
- <th>기록자</th>
- <th>기록일시</th>
- </tr>
- </thead>
- <tbody>
- <c:set var="oxygenSaturationTotal" value="${oxygenSaturationResult.size()}" />
- <c:choose>
- <c:when test="${oxygenSaturationTotal > 0}">
- <c:forEach var="i" begin="1" end="${oxygenSaturationTotal}">
- <fmt:parseNumber var="phrValue" value="${oxygenSaturationResult[oxygenSaturationTotal-i].phrValue}" integerOnly="true" />
- <tr>
- <td><c:out value="${oxygenSaturationResult[oxygenSaturationTotal-i].recordedDateFormatted}" /></td>
- <td><span class="${oxygenSaturationResult[oxygenSaturationTotal-i].isWarning ? 'text-danger' : ''}"><c:out value="${phrValue}" /></span></td>
- <td><c:out value="${oxygenSaturationResult[oxygenSaturationTotal-i].recordedByName}" /></td>
- <td><c:out value="${oxygenSaturationResult[oxygenSaturationTotal-i].createDateFormatted}" /></td>
- </tr>
- </c:forEach>
- </c:when>
- <c:otherwise>
- <tr>
- <td colspan=4>데이터가 없습니다.</td>
- </tr>
- </c:otherwise>
- </c:choose>
- </tbody>
- </table>
- </div>
- </div>
- </div>
- </div>
- </section>
- <!-- <hr> -->
- <section id="sugarSection" class="phrSection">
- <div class="col-lg-12">
- <div class="row">
- <div class="col-lg-3">
- <h1 class="h4">
- <div class="sectionToggle"></div>
- <span class="phrTitle sugar">혈당</span>
- </h1>
- </div>
- <div class="col-lg-9 text-right">
- <button id="bloodSugar" type="button" class="btn btn-primary ml-2" data-toggle="modal" data-target="#defaultModalPrimary_1"><i class="mdi mdi-clipboard-pulse-outline"></i> 혈당 추가</button>
- </div>
- </div>
- </div>
- <div class="sectionContent col-lg-12">
- <div class="row">
- <div class="sectionNav col-lg-12">
- <ul>
- <li><a href="#home">환자정보</a></li>
- <li><a href="#symptomSection">임상증상</a></li>
- <li><a href="#feverSection">체온</a></li>
- <li><a href="#bloodPressureSection">혈압 / 맥박</a></li>
- <li><a href="#oxygenSection">산소포화도</a></li>
- <li class="active"><a href="#sugarSection">혈당</a></li>
- <li><a href="#medicalMemoSection">의료진 메모</a></li>
- </ul>
- </div>
- <div class="col-lg-6 col-md-12">
- <div class="graph-area mb-4">
- <canvas id="bloodSugarChart" style="width: 100%; height: 370px"></canvas>
- </div>
- </div>
- <div class="col-lg-6 col-md-12">
- <h1 class="h4 text-right">
- <span class="small showLegend" data-toggle="modal" data-target="#legendGuide"><i class="mdi mdi-comment-question-outline"></i> 알람 표시 기준</span>
- </h1>
- <div class="phrDataTableWrap table-responsive">
- <table id="bloodSugarDataTable" class="phrDataTable table data-table text-center">
- <thead>
- <tr>
- <th>측정일시</th>
- <th>혈당</th>
- <th>기록자</th>
- <th>기록일시</th>
- </tr>
- </thead>
- <tbody>
- <c:set var="bloodSugarTotal" value="${bloodSugarResult.size()}" />
- <c:choose>
- <c:when test="${bloodSugarTotal > 0}">
- <c:forEach var="i" begin="1" end="${bloodSugarTotal}">
- <fmt:parseNumber var="phrValue" value="${bloodSugarResult[bloodSugarTotal-i].phrValue}" integerOnly="true" />
- <tr>
- <td><c:out value="${bloodSugarResult[bloodSugarTotal-i].recordedDateFormatted}" /></td>
- <td><span class="${bloodSugarResult[bloodSugarTotal-i].isWarning ? 'text-danger' : ''}"><c:out value="${phrValue}" /></span></td>
- <td><c:out value="${bloodSugarResult[bloodSugarTotal-i].recordedByName}" /></td>
- <td><c:out value="${bloodSugarResult[bloodSugarTotal-i].createDateFormatted}" /></td>
- </tr>
- </c:forEach>
- </c:when>
- <c:otherwise>
- <tr>
- <td colspan=4>데이터가 없습니다.</td>
- </tr>
- </c:otherwise>
- </c:choose>
- </tbody>
- </table>
- </div>
- </div>
- </div>
- </div>
- </section>
- <!-- <hr> -->
- <section id="medicalMemoSection" class="phrSection">
- <h1 class="h4 col-lg-12">
- <span class="phrTitle medicalMemo">의료진 메모</span>
- <!-- <button id="medicalMemo" type="button" class="btn btn-primary ml-2" data-toggle="modal" data-target="#defaultModalPrimaryMemo"><i class="mdi mdi-clipboard-alert-outline"></i> 메모추가</button> -->
- </h1>
- <div class="col-lg-12">
- <div class="row">
- <div class="sectionNav col-lg-12">
- <ul>
- <li><a href="#home">환자정보</a></li>
- <li><a href="#symptomSection">임상증상</a></li>
- <li><a href="#feverSection">체온</a></li>
- <li><a href="#bloodPressureSection">혈압 / 맥박</a></li>
- <li><a href="#oxygenSection">산소포화도</a></li>
- <li><a href="#sugarSection">혈당</a></li>
- <li class="active"><a href="#medicalMemoSection">의료진 메모</a></li>
- </ul>
- </div>
- <div class="col-lg-4">
- <textarea id="memoContent" class="medicalMemo form-control mb-3" rows="15" placeholder="내용을 입력하세요"></textarea>
- <div class="datetimepickerWrap mb-3">
- <input id="eventDateTime3" class="datetimepicker form-control" type="text" placeholder="처리 일시 (미 입력시 현재시간 자동등록)" />
- </div>
- <div class="text-right">
- <button id="medicalMemo" type="button" class="btn btn-primary ml-2" onclick="insertMemoData()"><i class="mdi mdi-clipboard-alert-outline"></i> 메모추가</button>
- </div>
- </div>
- <div class="col-lg-8">
- <div class="memoDataTableWrap table-responsive mb-4">
- <table id="memoDataTable" class="memoDataTable table data-table text-center">
- <thead>
- <tr>
- <th>처리일시</th>
- <th>내용</th>
- <th>기록자</th>
- <th>기록일시</th>
- </tr>
- </thead>
- <tbody>
- <c:set var="memoTotal" value="${memoResult.size()}" />
- <c:set var="loginId" value="${data._SES_ID}" />
- <c:choose>
- <c:when test="${memoTotal > 0}">
- <c:forEach var="d" items="${memoResult}">
- <tr>
- <td><c:out value="${d.recordedDateFormatted}" /></td>
- <c:choose>
- <c:when test="${d.canModify && d.recordedById.equals(loginId)}">
- <td><pre id='memo_${d.idx}' class='contentsEdit' onClick='handleModifyMemo("${d.idx}", "${d.recordedDate}")'>${d.contents}</pre></td>
- </c:when>
- <c:otherwise>
- <td><pre>${d.contents}</pre></td>
- </c:otherwise>
- </c:choose>
- <td><c:out value="${d.recordedByName}" /></td>
- <td><c:out value="${d.createDateFormatted}" /></td>
- </tr>
- </c:forEach>
- </c:when>
- <c:otherwise>
- <tr>
- <td colspan=4>데이터가 없습니다.</td>
- </tr>
- </c:otherwise>
- </c:choose>
- </tbody>
- </table>
- </div>
- </div>
- </div>
- </div>
- </section>
- </div>
- </div>
- </div>
- </div>
- <!-- <div class="row">
- <div class="col-12">
- <div class="card">
- <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="bloodPressure">혈압</option>
- <option value="oxygenSaturation">산소포화도</option>
- <option value="pulseRate">맥박</option>
- <option value="bloodSugar">혈당</option>
- </select>
- </label> <label class="ml-1">
- <button type="button" class="btn btn-primary ml-2" data-toggle="modal" data-target="#defaultModalPrimary_1">기록추가</button>
- </label>
- </h1>
- </div>
- <div class="card-body">
- <div class="graph-area mb-4" style="height:300px;">
- <canvas id="phrChart"></canvas>
- </div>
- <button class="btn btn-success" onclick="getExcel('');">Excel 다운로드</button>
- <h1 class="h4 text-right"><span class="small showLegend ml-2" data-toggle="modal" data-target="#legendGuide"><i class="mdi mdi-comment-question-outline"></i> 알람 표시 기준</span></h1>
- <div class="table-responsive">
- <table id="phrDataTable" class="table data-table text-center">
- <thead>
- <tr>
- <th>기록일시</th>
- <th>체온</th>
- <th>기록자</th>
- </tr>
- </thead>
- <tbody>
- <c:choose>
- <c:when test="${phrTotal > 0}">
- <c:forEach var="i" begin="1" end="${phrTotal}">
- <tr>
- <td><c:out value="${phrItems[phrTotal-i].createDateFormatted}" /></td>
- <td><span class="${phrItems[phrTotal-i].isWarning ? 'text-danger' : ''}"><c:out value="${phrItems[phrTotal-i].phrValue}" /></span></td>
- <td><c:out value="${phrItems[phrTotal-i].recordedByName}" /></td>
- </tr>
- </c:forEach>
- </c:when>
- <c:otherwise>
- <tr>
- <td colspan=3>데이터가 없습니다.</td>
- </tr>
- </c:otherwise>
- </c:choose>
- </tbody>
- </table>
- </div>
- </div>
- </div>
- <div id="tabSymptom" class="tab">
- <div class="card-header">
- <h1 class="h4">
- - 임상증상 <label class="ml-1">
- <button type="button" class="btn btn-primary ml-2" data-toggle="modal" data-target="#defaultModalPrimary_2">증상추가</button>
- </label>
- <button class="btn btn-success text-right" style="float:right;" onclick="getExcel('symptom');">Excel 다운로드</button>
- </h1>
- </div>
- <div class="card-body">
- <div class="table-responsive">
- <table id="symptomDataTable" class="table data-table text-center">
- <thead>
- <tr>
- <th>기록일시</th>
- <th>기침</th>
- <th>호흡곤란</th>
- <th>오한</th>
- <th>근육통</th>
- <th>두통</th>
- <th>인후통</th>
- <th>후각/미각 손실</th>
- <th>피로</th>
- <th>식욕감소</th>
- <th>가래</th>
- <th>오심</th>
- <th>구토</th>
- <th>설사</th>
- <th>어지러움</th>
- <th>콧물/코막힘</th>
- <th>기타증상</th>
- <th>기록자</th>
- </tr>
- </thead>
- <tbody>
- </tbody>
- </table>
- </div>
- </div>
- </div>
- <div id="tabMemo" class="tab">
- <div class="card-header">
- <h1 class="h4">
- - 의료진 메모
- <button type="button" class="addMemo btn btn-primary ml-2" data-toggle="modal">메모추가</button>
- <button class="btn btn-success text-right" style="float:right;" onclick="getExcel('memo');">Excel 다운로드</button>
- </h1>
- </div>
- <div class="card-body">
- <div class="table-responsive">
- <table id="memoDataTable" class="table data-table text-center">
- <thead>
- <tr>
- <th>기록일시</th>
- <th>내용</th>
- <th>기록자</th>
- </tr>
- </thead>
- <tbody>
- </tbody>
- </table>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>-->
- </div>
- </main>
- <jsp:include page="${data._INCLUDE}/footer.jsp"></jsp:include>
- </div>
- </div>
- </body>
- </html>
|