info.jsp 78 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845
  1. <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
  2. <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
  3. <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
  4. <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
  5. <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
  6. <jsp:include page="${data._INCLUDE}/header.jsp"></jsp:include>
  7. <link rel="stylesheet" href="/resources/bower_components/mdi/css/materialdesignicons.min.css">
  8. <script src="/resources/bower_components/moment/moment.min.js"></script>
  9. <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.4/Chart.min.js"></script>
  10. <script>
  11. const mPatientIdx = ${patientIdx}
  12. var PHR_VALUE_DEFAULT = {
  13. TEMPERATURE: {
  14. VALUE: 36.5,
  15. MIN: 20,
  16. MAX: 50
  17. },
  18. BLOOD_PRESSURE_SYSTOLIC: {
  19. VALUE: 120,
  20. MIN: 50,
  21. MAX: 250
  22. },
  23. BLOOD_PRESSURE_DIASTOLIC: {
  24. VALUE: 80,
  25. MIN: 20,
  26. MAX: 160
  27. },
  28. OXYGEN_SATURATION: {
  29. VALUE: 95,
  30. MIN: 60,
  31. MAX: 100
  32. },
  33. PULSE_RATE: {
  34. VALUE: 65,
  35. MIN: 30,
  36. MAX: 200
  37. },
  38. BLOOD_SUGAR: {
  39. VALUE: 120,
  40. MIN: 10,
  41. MAX: 600
  42. }
  43. }
  44. function ajaxErrorHandler(request, status, error){
  45. if (request.status === 0) {
  46. alert('Not connect.\n Verify Network.');
  47. }
  48. else if (request.status == 400) {
  49. alert('Server understood the request, but request content was invalid. [400]' + '\n\n' + request.responseText);
  50. }
  51. else if (request.status == 401) {
  52. alert('Unauthorized access. [401]' + '\n\n' + request.responseText);
  53. }
  54. else if (request.status == 403) {
  55. alert('Forbidden resource can not be accessed. [403]' + '\n\n' + request.responseText);
  56. }
  57. else if (request.status == 404) {
  58. alert('Requested page not found. [404]' + '\n\n' + request.responseText);
  59. }
  60. else if (request.status == 500) {
  61. alert('Internal server error. [500]' + '\n\n' + request.responseText);
  62. }
  63. else if (request.status == 503) {
  64. alert('Service unavailable. [503]' + '\n\n' + request.responseText);
  65. }
  66. else if (status === 'parsererror') {
  67. alert('Requested JSON parse failed. [Failed]' + '\n\n' + request.responseText);
  68. }
  69. else if (status === 'timeout') {
  70. alert('Time out error. [Timeout]' + '\n\n' + request.responseText);
  71. }
  72. else if (status === 'abort') {
  73. alert('Ajax request aborted. [Aborted]' + '\n\n' + request.responseText);
  74. }
  75. else {
  76. alert('Uncaught Error.' + '\n\n' + request.responseText);
  77. }
  78. }
  79. function gridDateFormatter(date) {
  80. return moment(date).format("YYYY-MM-DD HH:mm");
  81. }
  82. function chartDateFormatter(date) {
  83. return moment(date).format("MM-DD HH:mm");
  84. }
  85. /*
  86. * 비대면 진료 시작
  87. */
  88. function nonFaceStart() {
  89. getAjax("/patient/nonFaceStart", $("#hiddenForm").serialize(), function ( result ) {
  90. $("#nonface").append('<input type="hidden" name="member_name" value="'+result.member_name+'" />');
  91. $("#nonface").append('<input type="hidden" name="member_id" value="'+result.member_id+'" />');
  92. $("#nonface").append('<input type="hidden" name="room_id" value="'+result.room_id+'" />');
  93. $("#nonface").append('<input type="hidden" name="hashData" value="'+result.hashData+'">');
  94. $("#nonface").append('<input type="hidden" name="token" value="'+result.token+'">');
  95. $("#nonface").append('<input type="hidden" name="api_key" value="'+result.api_key+'">');
  96. $("#nonface").append('<input type="hidden" name="classify" value="d">');
  97. var gsWin = window.open('about:blank','nonface');
  98. var frm =document.nonface;
  99. frm.target ="nonface";
  100. frm.method ="post";
  101. frm.submit();
  102. window.location.reload();
  103. }, function(){
  104. }, function(){
  105. });
  106. }
  107. /*
  108. * 건강정보이력 탭 처리
  109. */
  110. function checkValidForPhrData(phrType, phrValue) {
  111. var errorMessage = null;
  112. var errorMessagePrefix = null;
  113. var phrValueDefault = null;
  114. if (phrType === "temperature") {
  115. errorMessagePrefix = "체온을";
  116. phrValueDefault = PHR_VALUE_DEFAULT.TEMPERATURE;
  117. }
  118. else if (phrType === "bloodPressureSystolic") {
  119. errorMessagePrefix = "수축기 혈압을";
  120. phrValueDefault = PHR_VALUE_DEFAULT.BLOOD_PRESSURE_SYSTOLIC;
  121. }
  122. else if (phrType === "bloodPressureDiastolic") {
  123. errorMessagePrefix = "이완기 혈압을";
  124. phrValueDefault = PHR_VALUE_DEFAULT.BLOOD_PRESSURE_DIASTOLIC;
  125. }
  126. else if (phrType === "oxygenSaturation") {
  127. errorMessagePrefix = "산소포화도를";
  128. phrValueDefault = PHR_VALUE_DEFAULT.OXYGEN_SATURATION;
  129. }
  130. else if (phrType === "pulseRate") {
  131. errorMessagePrefix = "맥박을";
  132. phrValueDefault = PHR_VALUE_DEFAULT.PULSE_RATE;
  133. }
  134. else if (phrType === "bloodSugar") {
  135. errorMessagePrefix = "혈당을";
  136. phrValueDefault = PHR_VALUE_DEFAULT.BLOOD_SUGAR;
  137. }
  138. // 널 체크, 숫자 체크, 최대/최소 체크
  139. if (!phrValue || phrValue.length === 0) {
  140. errorMessage = errorMessagePrefix+" 입력해 주세요.";
  141. }
  142. else if (isNaN(phrValue)) {
  143. errorMessage = errorMessagePrefix+" 숫자로 입력해 주세요.";
  144. }
  145. else if (phrValue < phrValueDefault.MIN || phrValue > phrValueDefault.MAX) {
  146. errorMessage = errorMessagePrefix+" "+phrValueDefault.MIN+"~"+phrValueDefault.MAX+" 범위 내로 입력해 주세요.";
  147. }
  148. return errorMessage;
  149. }
  150. function handlePhrData() {
  151. var phrType = $('#healthInfo').attr("data-phr-type");
  152. var phrValue = "";
  153. if (phrType === "bloodPressure") {
  154. phrValueSystolic = $("#phrValueSystolic").val();
  155. phrValueDiastolic = $("#phrValueDiastolic").val();
  156. phrValuePulseRate = $("#phrValuePulseRate").val();
  157. // 유효성 체크
  158. var errorMessage = checkValidForPhrData("bloodPressureSystolic", phrValueSystolic);
  159. if (errorMessage) {
  160. alert(errorMessage);
  161. $("#phrValueSystolic").focus();
  162. return;
  163. }
  164. errorMessage = checkValidForPhrData("bloodPressureDiastolic", phrValueDiastolic);
  165. if (errorMessage) {
  166. alert(errorMessage);
  167. $("#phrValueDiastolic").focus();
  168. return;
  169. }
  170. errorMessage = checkValidForPhrData("pulseRate", phrValuePulseRate);
  171. if (errorMessage) {
  172. alert(errorMessage);
  173. $("#phrValuePulseRate").focus();
  174. return;
  175. }
  176. // 저장 진행
  177. createPhrData(mPatientIdx, "bloodPressure", phrValueSystolic, phrValueDiastolic, phrValuePulseRate);
  178. $("#phrValueSystolic").val(PHR_VALUE_DEFAULT.BLOOD_PRESSURE_SYSTOLIC.VALUE);
  179. $("#phrValueDiastolic").val(PHR_VALUE_DEFAULT.BLOOD_PRESSURE_DIASTOLIC.VALUE);
  180. }
  181. else {
  182. phrValue = $("#phrValue").val();
  183. // 유효성 체크
  184. var errorMessage = checkValidForPhrData(phrType, phrValue);
  185. if (errorMessage) {
  186. alert(errorMessage);
  187. $("#phrValue").focus();
  188. return;
  189. }
  190. // 저장 진행
  191. createPhrData(mPatientIdx, phrType, phrValue);
  192. var phrValueDefault = "";
  193. if (phrType === "temperature") {
  194. phrValueDefault = PHR_VALUE_DEFAULT.TEMPERATURE;
  195. }
  196. else if (phrType === "oxygenSaturation") {
  197. phrValueDefault = PHR_VALUE_DEFAULT.OXYGEN_SATURATION;
  198. }
  199. else if (phrType === "pulseRate") {
  200. phrValueDefault = PHR_VALUE_DEFAULT.PULSE_RATE;
  201. }
  202. else if (phrType === "bloodSugar") {
  203. phrValueDefault = PHR_VALUE_DEFAULT.BLOOD_SUGAR;
  204. }
  205. $("#phrValue").val(phrValueDefault);
  206. }
  207. $("#defaultModalPrimary_1").modal("hide");
  208. }
  209. function createPhrData(patientIdx, phrType, phrValue, phrValue2, phrValueExtra) {
  210. $.ajax({
  211. url : "./api/phrData",
  212. data : {patientIdx: patientIdx, phrType: phrType, phrValue: phrValue, phrValue2: phrValue2, phrValueExtra: phrValueExtra, recordedById: "${data._SES_ID}", recordedByName: "${data._SES_NAME}"},
  213. method : "POST",
  214. dataType : "json",
  215. success : function( datas ){
  216. retrievePhrData(phrType);
  217. },
  218. error : ajaxErrorHandler
  219. }).done( function(){
  220. });
  221. }
  222. function retrievePhrData(phrType) {
  223. const chartId = phrType + "Chart";
  224. let phrName = "";
  225. if (phrType === "temperature") {
  226. phrName = "체온";
  227. }
  228. else if (phrType === "bloodPressure") {
  229. // phrName = "";
  230. }
  231. else if (phrType === "oxygenSaturation") {
  232. phrName = "산소포화도";
  233. }
  234. else if (phrType === "bloodSugar") {
  235. phrName = "혈당";
  236. }
  237. var ignoreCache = moment().unix();
  238. var params = {patientIdx: mPatientIdx, phrType: phrType, ignoreCache:ignoreCache};
  239. $.ajax({
  240. url : "./api/phrDatas",
  241. data : params,
  242. method : "GET",
  243. dataType : "json",
  244. success : function( datas ){
  245. console.log(JSON.stringify(datas));
  246. if (phrType==="bloodPressure") {
  247. drawBPChart(datas);
  248. }
  249. else {
  250. drawPhrChart(phrType+"Chart", datas, phrName);
  251. }
  252. var contents = "<tr><td colspan=4>데이터가 없습니다.</td></tr>" ;
  253. if (phrType==="bloodPressure") {
  254. contents = "<tr><td colspan=5>데이터가 없습니다.</td></tr>" ;
  255. }
  256. if (datas.length > 0) {
  257. contents = "";
  258. datas.forEach(function(d) {
  259. var danger = d.isWarning ? "text-danger" : "";
  260. var row = "";
  261. row += "<tr>";
  262. row += "<td>" + gridDateFormatter(d.createDate) + "</td>";
  263. if (phrType==="bloodPressure") {
  264. var extraDanger = d.isExtraWarning ? "text-danger" : "";
  265. row += "<td><span class='"+danger+"'>" + (isNaN(parseInt(d.phrValue)) ? "--" : parseInt(d.phrValue)) + " / " + (isNaN(parseInt(d.phrValue2)) ? "--" : parseInt(d.phrValue2)) + "</span></td>";
  266. row += "<td><span class='"+extraDanger+"'>" + (isNaN(parseInt(d.phrValueExtra)) ? "" : parseInt(d.phrValueExtra)) + "</span></td>";
  267. }
  268. else if (phrType==="temperature") {
  269. row += "<td><span class='"+danger+"'>" + parseFloat(d.phrValue).toFixed(1) + "</span></td>";
  270. }
  271. else {
  272. row += "<td><span class='"+danger+"'>" + parseInt(d.phrValue) + "</span></td>";
  273. }
  274. row += "<td>" + d.recordedByName + "</td>";
  275. row += "<td></td>";
  276. row += "</tr>";
  277. contents = row + contents;
  278. });
  279. };
  280. $("#"+phrType+"DataTable > tbody").html(contents);
  281. },
  282. error : ajaxErrorHandler
  283. }).done( function(){
  284. });
  285. }
  286. var myCharts = {};
  287. function drawPhrChart(chartId, data, dataName) {
  288. let myChart = myCharts[chartId];
  289. if (myChart) {
  290. myChart.destroy();
  291. myChart = null;
  292. }
  293. var xDatas = [];
  294. var yDatas = [];
  295. data.forEach(function(d) {
  296. var t = chartDateFormatter(d.createDate);
  297. xDatas.push(t);
  298. yDatas.push(d.phrValue);
  299. });
  300. var ctx = document.getElementById(chartId).getContext('2d');
  301. myCharts[chartId] = new Chart(ctx, {
  302. type: 'line',
  303. data: {
  304. labels: xDatas,
  305. datasets: [{
  306. label: dataName,
  307. data: yDatas,
  308. fill: false,
  309. backgroundColor: '#fff',
  310. borderColor: '#5b7dff',
  311. borderWidth: 2,
  312. }]
  313. },
  314. options: {
  315. maintainAspectRatio: false,
  316. }
  317. });
  318. }
  319. function drawBPChart(data) {
  320. let myChart = myCharts["bloodPressurePulseChart"];
  321. if (myChart) {
  322. myChart.destroy();
  323. myChart = null;
  324. }
  325. var xDatas = [];
  326. var y1Datas = [];
  327. var y2Datas = [];
  328. var y3Datas = [];
  329. data.forEach(function(d) {
  330. var t = chartDateFormatter(d.createDate);
  331. xDatas.push(t);
  332. y1Datas.push(d.phrValue);
  333. y2Datas.push(d.phrValue2);
  334. y3Datas.push(d.phrValueExtra);
  335. });
  336. var ctx = document.getElementById("bloodPressurePulseChart").getContext('2d');
  337. myCharts["bloodPressurePulseChart"] = new Chart(ctx, {
  338. type: 'line',
  339. data: {
  340. labels: xDatas,
  341. datasets: [{
  342. label: "수축기 혈압",
  343. data: y1Datas,
  344. fill: false,
  345. backgroundColor: "#fff",
  346. borderColor: "#ff6384",
  347. borderWidth: 2,
  348. },{
  349. label: "이완기 혈압",
  350. data: y2Datas,
  351. fill: false,
  352. backgroundColor: "#fff",
  353. borderColor: "#5b7dff",
  354. borderWidth: 2,
  355. },{
  356. label: "맥박",
  357. data: y3Datas,
  358. backgroundColor: "#9ee7c5",
  359. type: 'bar',
  360. }]
  361. },
  362. options: {
  363. maintainAspectRatio: false,
  364. annotation: {
  365. drawTime: "afterDatasetsDraw",
  366. // annotations: annotationData,
  367. },
  368. }
  369. });
  370. }
  371. /*
  372. * 임상증상 탭 처리
  373. */
  374. function handleSymptomData() {
  375. if ($("input:checkbox[id='etcCheck']").is(":checked") && !$("#etcContent").val().trim()) {
  376. alert("기타 증상이 체크되었습니다. 내용을 입력해 주세요.");
  377. $("#etcContent").val("");
  378. return;
  379. }
  380. var checkedCount = ($("#defaultModalPrimary_2 input[type='checkbox']:checked").length);
  381. if (checkedCount === 0) {
  382. alert("증상을 체크해 주세요.");
  383. return;
  384. }
  385. var symptomObject = {
  386. patientIdx: mPatientIdx,
  387. coughCheck: $("input:checkbox[id='coughCheck']").is(":checked") ? "Y" : "N",
  388. dyspneaCheck: $("input:checkbox[id='dyspneaCheck']").is(":checked") ? "Y" : "N",
  389. coldFitCheck: $("input:checkbox[id='coldFitCheck']").is(":checked") ? "Y" : "N",
  390. musclePainCheck: $("input:checkbox[id='musclePainCheck']").is(":checked") ? "Y" : "N",
  391. headacheCheck: $("input:checkbox[id='headacheCheck']").is(":checked") ? "Y" : "N",
  392. soreThroatCheck: $("input:checkbox[id='soreThroatCheck']").is(":checked") ? "Y" : "N",
  393. smellPalateCheck: $("input:checkbox[id='smellPalateCheck']").is(":checked") ? "Y" : "N",
  394. fatigueCheck: $("input:checkbox[id='fatigueCheck']").is(":checked") ? "Y" : "N",
  395. appetiteLossCheck: $("input:checkbox[id='appetiteLossCheck']").is(":checked") ? "Y" : "N",
  396. sputumCheck: $("input:checkbox[id='sputumCheck']").is(":checked") ? "Y" : "N",
  397. ocinCheck: $("input:checkbox[id='ocinCheck']").is(":checked") ? "Y" : "N",
  398. vomitingCheck: $("input:checkbox[id='vomitingCheck']").is(":checked") ? "Y" : "N",
  399. diarrheaCheck: $("input:checkbox[id='diarrheaCheck']").is(":checked") ? "Y" : "N",
  400. dizzinessCheck: $("input:checkbox[id='dizzinessCheck']").is(":checked") ? "Y" : "N",
  401. noseCheck: $("input:checkbox[id='noseCheck']").is(":checked") ? "Y" : "N",
  402. etcCheck: $("input:checkbox[id='etcCheck']").is(":checked") ? "Y" : "N",
  403. etcContent: $("#etcContent").val(),
  404. recordedByName: "${data._SES_NAME}",
  405. recordedById: "${data._SES_ID}",
  406. }
  407. createSymptomData(symptomObject);
  408. $("#defaultModalPrimary_2 input[type='checkbox']:checked").prop("checked", false);
  409. $("#etcContent").val("");
  410. $("#defaultModalPrimary_2").modal("hide");
  411. }
  412. function createSymptomData(symptomObject) {
  413. $.ajax({
  414. url : "./api/symptomData",
  415. data : symptomObject,
  416. method : "POST",
  417. dataType : "json",
  418. success : function( datas ){
  419. retrieveSymptomData();
  420. },
  421. error : ajaxErrorHandler
  422. }).done( function(){
  423. });
  424. }
  425. function retrieveSymptomData() {
  426. var ignoreCache = moment().unix();
  427. var params = {patientIdx: mPatientIdx, ignoreCache:ignoreCache};
  428. $.ajax({
  429. url : "./api/symptomDatas",
  430. data : params,
  431. method : "GET",
  432. dataType : "json",
  433. success : function( datas ){
  434. var html = "<tr><td colspan=19>데이터가 없습니다.</td></tr>" ;
  435. var checkSymbol = '<i class="mdi mdi-check-bold"></i>';
  436. if (datas.length > 0) {
  437. html = "";
  438. contents = datas.forEach(function(d) {
  439. html += "<tr>";
  440. html += "<th>" + gridDateFormatter(d.createDate) + "</th>";
  441. html += "<td>" + (d.coughCheck === "Y" ? checkSymbol : "-") + "</td>";
  442. html += "<td>" + (d.dyspneaCheck === "Y" ? checkSymbol : "-") + "</td>";
  443. html += "<td>" + (d.coldFitCheck === "Y" ? checkSymbol : "-") + "</td>";
  444. html += "<td>" + (d.musclePainCheck === "Y" ? checkSymbol : "-") + "</td>";
  445. html += "<td>" + (d.headacheCheck === "Y" ? checkSymbol : "-") + "</td>";
  446. html += "<td>" + (d.soreThroatCheck === "Y" ? checkSymbol : "-") + "</td>";
  447. html += "<td>" + (d.smellPalateCheck === "Y" ? checkSymbol : "-") + "</td>";
  448. html += "<td>" + (d.fatigueCheck === "Y" ? checkSymbol : "-") + "</td>";
  449. html += "<td>" + (d.appetiteLossCheck === "Y" ? checkSymbol : "-") + "</td>";
  450. html += "<td>" + (d.sputumCheck === "Y" ? checkSymbol : "-") + "</td>";
  451. html += "<td>" + (d.ocinCheck === "Y" ? checkSymbol : "-") + "</td>";
  452. html += "<td>" + (d.vomitingCheck === "Y" ? checkSymbol : "-") + "</td>";
  453. html += "<td>" + (d.diarrheaCheck === "Y" ? checkSymbol : "-") + "</td>";
  454. html += "<td>" + (d.dizzinessCheck === "Y" ? checkSymbol : "-") + "</td>";
  455. html += "<td>" + (d.noseCheck === "Y" ? checkSymbol : "-") + "</td>";
  456. html += "<td>" + (d.etcCheck === "Y" ? d.etcContent : "-") + "</td>";
  457. html += "<td>" + d.recordedByName + "</td>";
  458. html += "<td></td>";
  459. html += "</tr>";
  460. });
  461. };
  462. $("#symptomDataTable > tbody").html(html);
  463. },
  464. error : ajaxErrorHandler
  465. }).done( function(){
  466. });
  467. }
  468. /*
  469. * 메모 탭 처리
  470. */
  471. function insertMemoData() {
  472. var memoContent = $("#memoContent").val().trim();
  473. if (!memoContent) {
  474. alert("메모 내용을 입력해 주세요.");
  475. $("#memoContent").val("");
  476. return;
  477. }
  478. requestInsertMemoData(memoContent);
  479. $("#memoContent").val("");
  480. }
  481. function deleteMemoData() {
  482. const memoId = $("#defaultModalPrimaryMemo").data("memoid");
  483. if (memoId === undefined || memoId === null || memoId === "") {
  484. alert("오류! 삭제할 메모를 찾을 수 없습니다.");
  485. return;
  486. }
  487. const result = confirm("메모를 삭제하시겠습니까?\n삭제후에는 복구가 불가능 합니다.");
  488. if(result){
  489. requestDeleteMemoData(memoId);
  490. $("#defaultModalPrimaryMemo").modal("hide");
  491. }
  492. }
  493. function modifyMemoData() {
  494. const memoId = $("#defaultModalPrimaryMemo").data("memoid");
  495. if (memoId === undefined || memoId === null || memoId === "") {
  496. alert("오류! 삭제할 메모를 찾을 수 없습니다.");
  497. return;
  498. }
  499. var modifyMemoContent = $("#modifyMemoContent").val().trim();
  500. if (!modifyMemoContent) {
  501. alert("메모 내용을 입력해 주세요.");
  502. $("#modifyMemoContent").val("");
  503. return;
  504. }
  505. const result = confirm("메모를 수정하시겠습니까?");
  506. if(result){
  507. requestUpdateMemoData(memoId, modifyMemoContent);
  508. $("#defaultModalPrimaryMemo").modal("hide");
  509. }
  510. }
  511. function requestInsertMemoData(memoContent) {
  512. $.ajax({
  513. url : "./api/memoData",
  514. data : {patientIdx:mPatientIdx, contents:memoContent, recordedByName:"${data._SES_NAME}", recordedById:"${data._SES_ID}"},
  515. method : "POST",
  516. dataType : "json",
  517. success : function( datas ){
  518. retrieveMemoData();
  519. },
  520. error : ajaxErrorHandler
  521. }).done( function(){
  522. });
  523. }
  524. function requestDeleteMemoData(memoIdx) {
  525. $.ajax({
  526. url : "./api/memoData",
  527. data : {idx:memoIdx},
  528. method : "DELETE",
  529. dataType : "json",
  530. success : function( datas ){
  531. retrieveMemoData();
  532. },
  533. error : ajaxErrorHandler
  534. }).done( function(){
  535. });
  536. }
  537. function requestUpdateMemoData(memoIdx, modifyMemoContent) {
  538. $.ajax({
  539. url : "./api/memoData",
  540. data : {idx:memoIdx, contents:modifyMemoContent},
  541. method : "PATCH",
  542. dataType : "json",
  543. success : function( datas ){
  544. if (datas.code === "00") {
  545. retrieveMemoData();
  546. }
  547. else {
  548. alert("메모 수정 실패.\n" + datas.code);
  549. }
  550. },
  551. error : ajaxErrorHandler
  552. }).done( function(){
  553. });
  554. }
  555. function retrieveMemoData() {
  556. var ignoreCache = moment().unix();
  557. var params = {patientIdx: mPatientIdx, ignoreCache:ignoreCache};
  558. $.ajax({
  559. url : "./api/memoDatas",
  560. data : params,
  561. method : "GET",
  562. dataType : "json",
  563. success : function( datas ){
  564. var html = "<tr><td colspan=4>데이터가 없습니다.</td></tr>" ;
  565. if (datas.length > 0) {
  566. html = "";
  567. contents = datas.forEach(function(d) {
  568. html += "<tr>";
  569. html += "<td>" + gridDateFormatter(d.updateDate) + "</td>";
  570. if (d.canModify) {
  571. html += "<td><pre id='memo_"+d.idx+"' class='contentsEdit' onClick='handleModifyMemo("+d.idx+")'>" + d.contents + "</pre></td>";
  572. }
  573. else {
  574. html += "<td><pre>" + d.contents + "</pre></td>";
  575. }
  576. html += "<td>" + d.recordedByName + "</td>";
  577. html += "<td></td>";
  578. html += "</tr>";
  579. });
  580. };
  581. $("#memoDataTable > tbody").html(html);
  582. },
  583. error : ajaxErrorHandler
  584. }).done( function(){
  585. });
  586. }
  587. function gotoList() {
  588. var url = "./state";
  589. var refererSearch = '<c:out value="${refererSearch}" />';
  590. var refererPage = '<c:out value="${refererPage}" />';
  591. if (refererSearch !== "" && refererPage !== "") {
  592. url += "?searchText=" + encodeURIComponent(refererSearch) + "&page=" + refererPage;
  593. }
  594. else if (refererSearch !== "") {
  595. url += "?searchText=" + encodeURIComponent(refererSearch);
  596. }
  597. else if (refererPage !== "") {
  598. url += "?page=" + refererPage;
  599. }
  600. location.href = url;
  601. }
  602. function gotoPatientInfo() {
  603. var url = "/patient/info?patientIdx=" + mPatientIdx;
  604. location.href = url;
  605. }
  606. function getExcel(type) {
  607. const phrType = (type === "") ? $("#phrTypeSelect option:selected").val() : type;
  608. const url = "./excel?patientIdx=" + mPatientIdx + "&phrType=" + phrType;
  609. window.open(url);
  610. }
  611. function handleModifyMemo(memoId) {
  612. $("#defaultModalPrimaryMemo").data("memoid", memoId);
  613. const content = $("#memo_"+memoId).html();
  614. var memoInfoHTML = '';
  615. memoInfoHTML += '<tr>';
  616. memoInfoHTML += ' <th>작성자</th>';
  617. memoInfoHTML += ' <td>';
  618. memoInfoHTML += ' <div class="form-row">';
  619. memoInfoHTML += ' <input type="text" name="" class="form-control" placeholder="이름을 입력하세요" value="${data._SES_NAME}" readonly>';
  620. memoInfoHTML += ' </div>';
  621. memoInfoHTML += ' </td>';
  622. memoInfoHTML += '</tr>';
  623. memoInfoHTML += '<tr id="memoInfo">';
  624. memoInfoHTML += ' <th>내용</th>';
  625. memoInfoHTML += ' <td>';
  626. memoInfoHTML += ' <div class="form-row">';
  627. memoInfoHTML += ' <textarea id="modifyMemoContent" class="form-control" rows="15" placeholder="내용을 입력하세요">'+content+'</textarea>';
  628. memoInfoHTML += ' </div>';
  629. memoInfoHTML += ' </td>';
  630. memoInfoHTML += '</tr>';
  631. memoInfoHTML += '<tr>';
  632. memoInfoHTML += ' <th>처리일시</th>';
  633. memoInfoHTML += ' <td>';
  634. memoInfoHTML += ' <div class="datetimepickerWrap form-row">';
  635. memoInfoHTML += ' <input id="modifMemoDateTime" class="datetimepicker form-control" type="text" placeholder="측정일시(미 입력시 현재시간 자동등록)">';
  636. memoInfoHTML += ' </div>';
  637. memoInfoHTML += ' </td>';
  638. memoInfoHTML += '</tr>';
  639. $('#memoInfo').html(memoInfoHTML);
  640. $('#defaultModalPrimaryMemo').modal();
  641. setTimeout(function (){
  642. $('#memoInfo').find('.form-row textarea').focus();
  643. }, 500);
  644. }
  645. $(document).ready(function() {
  646. setTimeout(function () {
  647. $(".preloader").fadeOut("fast");
  648. }, 1000);
  649. const temperatureDatas = [];
  650. <c:forEach var="phr" items="${temperatureResult}" varStatus="status">
  651. temperatureDatas.push({createDate: "${phr.createDate}", phrValue: "${phr.phrValue}"});
  652. </c:forEach>
  653. drawPhrChart("temperatureChart", temperatureDatas, "체온");
  654. const bloodPressureUnionDatas = [];
  655. <c:forEach var="phr" items="${bloodPressureUnionResult}" varStatus="status">
  656. bloodPressureUnionDatas.push({createDate: "${phr.createDate}", phrValue: "${phr.phrValue}", phrValue2: "${phr.phrValue2}", phrValueExtra: "${phr.phrValueExtra}"});
  657. </c:forEach>
  658. drawBPChart(bloodPressureUnionDatas);
  659. const oxygenSaturationDatas = [];
  660. <c:forEach var="phr" items="${oxygenSaturationResult}" varStatus="status">
  661. oxygenSaturationDatas.push({createDate: "${phr.createDate}", phrValue: "${phr.phrValue}"});
  662. </c:forEach>
  663. drawPhrChart("oxygenSaturationChart", oxygenSaturationDatas, "산소포화도");
  664. const bloodSugarDatas = [];
  665. <c:forEach var="phr" items="${bloodSugarResult}" varStatus="status">
  666. bloodSugarDatas.push({createDate: "${phr.createDate}", phrValue: "${phr.phrValue}"});
  667. </c:forEach>
  668. drawPhrChart("bloodSugarChart", bloodSugarDatas, "혈당");
  669. // 상단 환자 정보 영역 토글 이벤트
  670. $("#userInfo").find(".user-info").show();
  671. $(document).on("click", ".toggle .toggleHeader", function () {
  672. $(this).find("a.toggleBtn").toggleClass("active");
  673. $("#userInfo").slideToggle("fast");
  674. });
  675. // 섹션 토글
  676. $(document).on("click", ".sectionToggle, .phrTitle", function () {
  677. $(this).closest("section").find(".sectionToggle").toggleClass("hide");
  678. $(this).closest("section").find(".sectionContent").slideToggle("fast");
  679. });
  680. // 섹션 이동
  681. $(document).on("click", ".sectionNav li", function (event) {
  682. if ($(this).find("a").attr("href") !== "") {
  683. event.preventDefault();
  684. var aID = $(this).find("a").attr("href");
  685. $(".phrSection").removeClass("active");
  686. $(aID).addClass("active");
  687. $(".main").animate(
  688. {
  689. scrollTop: $(aID).position().top + 100,
  690. },
  691. 300
  692. );
  693. }
  694. });
  695. // phrData 기록 추가 클릭 이벤트
  696. $(document).on('click','[data-target="#defaultModalPrimary_1"]',function() {
  697. var selectData = $(this).attr("id");
  698. var healthInfoHTML = '';
  699. var phrValueDefault = null;
  700. if(selectData == 'temperature'){
  701. phrValueDefault = PHR_VALUE_DEFAULT.TEMPERATURE;
  702. healthInfoHTML += '<th>체온</th>';
  703. healthInfoHTML += '<td>';
  704. healthInfoHTML += ' <div class="form-group mb-xl-0">';
  705. healthInfoHTML += ' <input id="phrValue" class="form-control" type="number" placeholder="체온 입력" min="'+phrValueDefault.MIN+'" max="'+phrValueDefault.MAX+'" value="'+phrValueDefault.VALUE+'" step="0.1">';
  706. healthInfoHTML += ' </div>';
  707. healthInfoHTML += '</td>';
  708. }
  709. else if(selectData == 'bloodPressure'){
  710. phrValueDefault1 = PHR_VALUE_DEFAULT.BLOOD_PRESSURE_SYSTOLIC;
  711. phrValueDefault2 = PHR_VALUE_DEFAULT.BLOOD_PRESSURE_DIASTOLIC;
  712. phrValueDefault3 = PHR_VALUE_DEFAULT.PULSE_RATE;
  713. healthInfoHTML += '<th>혈압/맥박</th>';
  714. healthInfoHTML += '<td>';
  715. healthInfoHTML += ' <div class="form-group mb-xl-0">';
  716. healthInfoHTML += ' <input id="phrValueSystolic" class="form-control mb-2" type="number" placeholder="수축기 혈압 입력" min="'+phrValueDefault1.MIN+'" max="'+phrValueDefault1.MAX+'" value="'+phrValueDefault1.VALUE+'">';
  717. healthInfoHTML += ' <input id="phrValueDiastolic" class="form-control mb-2" type="number" placeholder="이완기 혈압 입력" min="'+phrValueDefault2.MIN+'" max="'+phrValueDefault2.MAX+'" value="'+phrValueDefault2.VALUE+'">';
  718. healthInfoHTML += ' <input id="phrValuePulseRate" class="form-control" type="number" placeholder="맥박 입력"min="'+phrValueDefault3.MIN+'" max="'+phrValueDefault3.MAX+'" value="'+phrValueDefault3.VALUE+'">';
  719. healthInfoHTML += ' </div>';
  720. healthInfoHTML += '</td>';
  721. }
  722. else if(selectData == 'pulseRate'){
  723. phrValueDefault = PHR_VALUE_DEFAULT.PULSE_RATE;
  724. healthInfoHTML += '<th>맥박</th>';
  725. healthInfoHTML += '<td>';
  726. healthInfoHTML += ' <div class="form-group mb-xl-0">';
  727. healthInfoHTML += ' <input id="phrValue" class="form-control" type="number" placeholder="맥박 입력"min="'+phrValueDefault.MIN+'" max="'+phrValueDefault.MAX+'" value="'+phrValueDefault.VALUE+'">';
  728. healthInfoHTML += ' </div>';
  729. healthInfoHTML += '</td>';
  730. }
  731. else if(selectData == 'oxygenSaturation'){
  732. phrValueDefault = PHR_VALUE_DEFAULT.OXYGEN_SATURATION;
  733. healthInfoHTML += '<th>산소포화도</th>';
  734. healthInfoHTML += '<td>';
  735. healthInfoHTML += ' <div class="form-group mb-xl-0">';
  736. healthInfoHTML += ' <input id="phrValue" class="form-control" type="number" placeholder="산소포화도 입력" min="'+phrValueDefault.MIN+'" max="'+phrValueDefault.MAX+'" value="'+phrValueDefault.VALUE+'">';
  737. healthInfoHTML += ' </div>';
  738. healthInfoHTML += '</td>';
  739. }
  740. else if(selectData == 'bloodSugar'){
  741. phrValueDefault = PHR_VALUE_DEFAULT.BLOOD_SUGAR;
  742. healthInfoHTML += '<th>혈당</th>';
  743. healthInfoHTML += '<td>';
  744. healthInfoHTML += ' <div class="form-group mb-xl-0">';
  745. healthInfoHTML += ' <input id="phrValue" class="form-control" type="number" placeholder="혈당 입력" min="'+phrValueDefault.MIN+'" max="'+phrValueDefault.MAX+'" value="'+phrValueDefault.VALUE+'"">';
  746. healthInfoHTML += ' </div>';
  747. healthInfoHTML += '</td>';
  748. }
  749. else {
  750. }
  751. $('#healthInfo').html(healthInfoHTML);
  752. $('#healthInfo').attr("data-phr-type", selectData);
  753. setTimeout(function (){
  754. $('#healthInfo').find('.form-group input:first-child').focus();
  755. }, 500);
  756. });
  757. // 임상증상 추가 클릭 이벤트
  758. $(document).on('click','[data-target="#defaultModalPrimary_2"]',function(){
  759. var symptomInfoHtml = '';
  760. symptomInfoHtml += ' <th>임상증상</th>';
  761. symptomInfoHtml += ' <td>';
  762. symptomInfoHtml += ' <div class="form-group mb-xl-0">';
  763. symptomInfoHtml += ' <label class="form-check form-check-inline">';
  764. symptomInfoHtml += ' <input id="coughCheck" class="form-check-input" type="checkbox">';
  765. symptomInfoHtml += ' <span class="form-check-label">';
  766. symptomInfoHtml += ' 기침';
  767. symptomInfoHtml += ' </span>';
  768. symptomInfoHtml += ' </label>';
  769. symptomInfoHtml += ' <label class="form-check form-check-inline">';
  770. symptomInfoHtml += ' <input id="dyspneaCheck" class="form-check-input" type="checkbox">';
  771. symptomInfoHtml += ' <span class="form-check-label">';
  772. symptomInfoHtml += ' 호흡곤란';
  773. symptomInfoHtml += ' </span>';
  774. symptomInfoHtml += ' </label>';
  775. symptomInfoHtml += ' <label class="form-check form-check-inline">';
  776. symptomInfoHtml += ' <input id="coldFitCheck" class="form-check-input" type="checkbox">';
  777. symptomInfoHtml += ' <span class="form-check-label">';
  778. symptomInfoHtml += ' 오한';
  779. symptomInfoHtml += ' </span>';
  780. symptomInfoHtml += ' </label>';
  781. symptomInfoHtml += ' <label class="form-check form-check-inline">';
  782. symptomInfoHtml += ' <input id="musclePainCheck" class="form-check-input" type="checkbox">';
  783. symptomInfoHtml += ' <span class="form-check-label">';
  784. symptomInfoHtml += ' 근육통';
  785. symptomInfoHtml += ' </span>';
  786. symptomInfoHtml += ' </label>';
  787. symptomInfoHtml += ' <label class="form-check form-check-inline">';
  788. symptomInfoHtml += ' <input id="headacheCheck" class="form-check-input" type="checkbox">';
  789. symptomInfoHtml += ' <span class="form-check-label">';
  790. symptomInfoHtml += ' 두통';
  791. symptomInfoHtml += ' </span>';
  792. symptomInfoHtml += ' </label>';
  793. symptomInfoHtml += ' <label class="form-check form-check-inline">';
  794. symptomInfoHtml += ' <input id="soreThroatCheck" class="form-check-input" type="checkbox">';
  795. symptomInfoHtml += ' <span class="form-check-label">';
  796. symptomInfoHtml += ' 인후통';
  797. symptomInfoHtml += ' </span>';
  798. symptomInfoHtml += ' </label>';
  799. symptomInfoHtml += ' <label class="form-check form-check-inline">';
  800. symptomInfoHtml += ' <input id="smellPalateCheck" class="form-check-input" type="checkbox">';
  801. symptomInfoHtml += ' <span class="form-check-label">';
  802. symptomInfoHtml += ' 후각/미각 손실';
  803. symptomInfoHtml += ' </span>';
  804. symptomInfoHtml += ' </label>';
  805. symptomInfoHtml += ' <label class="form-check form-check-inline">';
  806. symptomInfoHtml += ' <input id="fatigueCheck" class="form-check-input" type="checkbox">';
  807. symptomInfoHtml += ' <span class="form-check-label">';
  808. symptomInfoHtml += ' 피로';
  809. symptomInfoHtml += ' </span>';
  810. symptomInfoHtml += ' </label>';
  811. symptomInfoHtml += ' <label class="form-check form-check-inline">';
  812. symptomInfoHtml += ' <input id="appetiteLossCheck" class="form-check-input" type="checkbox">';
  813. symptomInfoHtml += ' <span class="form-check-label">';
  814. symptomInfoHtml += ' 식욕감소';
  815. symptomInfoHtml += ' </span>';
  816. symptomInfoHtml += ' </label>';
  817. symptomInfoHtml += ' <label class="form-check form-check-inline">';
  818. symptomInfoHtml += ' <input id="sputumCheck" class="form-check-input" type="checkbox">';
  819. symptomInfoHtml += ' <span class="form-check-label">';
  820. symptomInfoHtml += ' 가래';
  821. symptomInfoHtml += ' </span>';
  822. symptomInfoHtml += ' </label>';
  823. symptomInfoHtml += ' <label class="form-check form-check-inline">';
  824. symptomInfoHtml += ' <input id="ocinCheck" class="form-check-input" type="checkbox">';
  825. symptomInfoHtml += ' <span class="form-check-label">';
  826. symptomInfoHtml += ' 오심';
  827. symptomInfoHtml += ' </span>';
  828. symptomInfoHtml += ' </label>';
  829. symptomInfoHtml += ' <label class="form-check form-check-inline">';
  830. symptomInfoHtml += ' <input id="vomitingCheck" class="form-check-input" type="checkbox">';
  831. symptomInfoHtml += ' <span class="form-check-label">';
  832. symptomInfoHtml += ' 구토';
  833. symptomInfoHtml += ' </span>';
  834. symptomInfoHtml += ' </label>';
  835. symptomInfoHtml += ' <label class="form-check form-check-inline">';
  836. symptomInfoHtml += ' <input id="diarrheaCheck" class="form-check-input" type="checkbox">';
  837. symptomInfoHtml += ' <span class="form-check-label">';
  838. symptomInfoHtml += ' 설사';
  839. symptomInfoHtml += ' </span>';
  840. symptomInfoHtml += ' </label>';
  841. symptomInfoHtml += ' <label class="form-check form-check-inline">';
  842. symptomInfoHtml += ' <input id="dizzinessCheck" class="form-check-input" type="checkbox">';
  843. symptomInfoHtml += ' <span class="form-check-label">';
  844. symptomInfoHtml += ' 어지러움';
  845. symptomInfoHtml += ' </span>';
  846. symptomInfoHtml += ' </label>';
  847. symptomInfoHtml += ' <label class="form-check form-check-inline">';
  848. symptomInfoHtml += ' <input id="noseCheck" class="form-check-input" type="checkbox">';
  849. symptomInfoHtml += ' <span class="form-check-label">';
  850. symptomInfoHtml += ' 콧물/코막힘';
  851. symptomInfoHtml += ' </span>';
  852. symptomInfoHtml += ' </label>';
  853. symptomInfoHtml += ' <label class="form-check form-check-inline">';
  854. symptomInfoHtml += ' <input id="etcCheck" class="form-check-input" type="checkbox">';
  855. symptomInfoHtml += ' <span class="form-check-label">';
  856. symptomInfoHtml += ' 기타 ( <input type="text" id="etcContent" class="form-control form-control-sm w150" value="" placeholder="증상 내용"> )';
  857. symptomInfoHtml += ' </span>';
  858. symptomInfoHtml += ' </label>';
  859. symptomInfoHtml += ' </div>';
  860. symptomInfoHtml += ' </td>';
  861. $('#symptomInfo').html(symptomInfoHtml);
  862. });
  863. // 의료진 메모 추가 클릭 이벤트
  864. $(document).on('click','.addMemo',function(){
  865. var memoInfoHTML = '';
  866. memoInfoHTML += '<th>내용</th>';
  867. memoInfoHTML += '<td>';
  868. memoInfoHTML += ' <div class="form-row">';
  869. memoInfoHTML += ' <textarea id="memoContent" class="form-control" rows="15" placeholder="내용을 입력하세요"></textarea>';
  870. memoInfoHTML += ' </div>';
  871. memoInfoHTML += '</td>';
  872. $('#memoInfo').html(memoInfoHTML);
  873. $('.addMemoTools').show();
  874. $('.modifMemoTools').hide();
  875. $('#defaultModalPrimaryMemo').modal();
  876. setTimeout(function (){
  877. $('#memoInfo').find('.form-row textarea').focus();
  878. }, 500);
  879. });
  880. });
  881. </script>
  882. </head>
  883. <body>
  884. <form id="nonface" name="nonface" action="https://lemon.medihere.com/app/vc">
  885. </form>
  886. <form id="hiddenForm">
  887. <input type="hidden" id="pId" name="pId" value='<c:out value="${info.id}" />'>
  888. <input type="hidden" id="pName" name="pName" value='<c:out value="${info.patientName}" />'>
  889. <input type="hidden" id="roomId" name="roomId" value='<c:out value="${info.roomNumber}" />'>
  890. </form>
  891. <div class="preloader">
  892. <div class="loadingIcon"></div>
  893. </div>
  894. <div class="modal fade" id="legendGuide" tabindex="-1" role="dialog" aria-hidden="true">
  895. <div class="modal-dialog modal-sm" role="document">
  896. <div class="modal-content">
  897. <div class="modal-header">
  898. <h5 class="modal-title">알람 표시 기준 안내</h5>
  899. <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span> </button>
  900. </div>
  901. <div class="modal-body m-1">
  902. <h4>생체측정 알람 표시 기준</h4>
  903. <ul class="legend">
  904. <li class="row fever">
  905. <div class="col-lg-4">체온</div>
  906. <div class="col-lg-8">37.5 이상</div>
  907. </li>
  908. <li class="row bloodPressure">
  909. <div class="col-lg-4">고혈압</div>
  910. <div class="col-lg-8">수축기 149 이상<br>이완기 99 이상</div>
  911. </li>
  912. <li class="row bloodPressure">
  913. <div class="col-lg-4">저혈압</div>
  914. <div class="col-lg-8">수축기 90 이하<br>이완기 60 이하</div>
  915. </li>
  916. <li class="row oxygen">
  917. <div class="col-lg-4">산소포화도</div>
  918. <div class="col-lg-8">94% 이하</div>
  919. </li>
  920. <li class="row pulse">
  921. <div class="col-lg-4">맥박</div>
  922. <div class="col-lg-8">최저 55 이하<br>최고 110 이상</div>
  923. </li>
  924. <li class="row sugar">
  925. <div class="col-lg-4">고혈당</div>
  926. <div class="col-lg-8">200 이상</div>
  927. </li>
  928. <li class="row sugar">
  929. <div class="col-lg-4">저혈당</div>
  930. <div class="col-lg-8">70 이하 </div>
  931. </li>
  932. </ul>
  933. </div>
  934. <div class="modal-footer">
  935. <button type="button" class="btn btn-primary" data-dismiss="modal">닫기</button>
  936. </div>
  937. </div>
  938. </div>
  939. </div>
  940. <div class="modal fade" id="defaultModalPrimary_1" tabindex="-1" role="dialog" aria-hidden="true">
  941. <div class="modal-dialog modal-sm" role="document">
  942. <div class="modal-content">
  943. <div class="modal-header">
  944. <h5 class="modal-title">건강정보 입력</h5>
  945. <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
  946. aria-hidden="true">&times;</span> </button>
  947. </div>
  948. <div class="modal-body m-3">
  949. <table class="table mobile-table">
  950. <colgroup>
  951. <col style="width: 30%">
  952. <col style="width: 70%">
  953. </colgroup>
  954. <tr>
  955. <th>기록자</th>
  956. <td>
  957. <div class="form-group mb-xl-0">
  958. <input class="form-control" type="text" value="${data._SES_NAME}" readonly>
  959. </div>
  960. </td>
  961. </tr>
  962. <tr id="healthInfo">
  963. <!-- 컨텐츠 동적 생성 -->
  964. </tr>
  965. <tr>
  966. <th>측정일시</th>
  967. <td>
  968. <div class="datetimepickerWrap">
  969. <input id="eventDateTime1" class="datetimepicker form-control" type="text" placeholder="측정일시(미 입력시 현재시간 자동등록)">
  970. </div>
  971. </td>
  972. </tr>
  973. </table>
  974. </div>
  975. <div class="modal-footer">
  976. <button type="button" class="btn btn-outline-primary" data-dismiss="modal">취소</button>
  977. <button type="button" class="btn btn-primary" onclick="handlePhrData()">등록</button>
  978. </div>
  979. </div>
  980. </div>
  981. </div>
  982. <div class="modal fade" id="defaultModalPrimary_2" tabindex="-1" role="dialog" aria-hidden="true">
  983. <div class="modal-dialog" role="document">
  984. <div class="modal-content">
  985. <div class="modal-header">
  986. <h5 class="modal-title">임상증상 입력</h5>
  987. <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
  988. aria-hidden="true">&times;</span> </button>
  989. </div>
  990. <div class="modal-body m-3">
  991. <table class="table mobile-table">
  992. <colgroup>
  993. <col style="width: 30%">
  994. <col style="width: 70%">
  995. </colgroup>
  996. <tr>
  997. <th>기록자</th>
  998. <td>
  999. <div class="form-group mb-xl-0">
  1000. <input class="form-control" type="text" value="${data._SES_NAME}" readonly>
  1001. </div>
  1002. </td>
  1003. </tr>
  1004. <tr id="symptomInfo">
  1005. <!-- 컨텐츠 동적 생성 -->
  1006. </tr>
  1007. <tr>
  1008. <th>측정일시</th>
  1009. <td>
  1010. <div class="datetimepickerWrap">
  1011. <input id="eventDateTime2" class="datetimepicker form-control" type="text" placeholder="측정일시(미 입력시 현재시간 자동등록)">
  1012. </div>
  1013. </td>
  1014. </tr>
  1015. </table>
  1016. </div>
  1017. <div class="modal-footer">
  1018. <button type="button" class="btn btn-outline-primary" data-dismiss="modal">취소</button>
  1019. <button type="button" class="btn btn-primary" onclick="handleSymptomData()">등록</button>
  1020. </div>
  1021. </div>
  1022. </div>
  1023. </div>
  1024. <div class="modal fade" id="defaultModalPrimaryMemo" tabindex="-1" role="dialog" aria-hidden="true" data-memoid="">
  1025. <div class="modal-dialog" role="document">
  1026. <div class="modal-content">
  1027. <div class="modal-header">
  1028. <h5 class="modal-title">의료진 메모 수정</h5>
  1029. <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
  1030. aria-hidden="true">&times;</span> </button>
  1031. </div>
  1032. <div class="modal-body m-3">
  1033. <table class="table mobile-table">
  1034. <colgroup>
  1035. <col style="width: 20%">
  1036. <col style="width: 80%">
  1037. </colgroup>
  1038. <tbody id="memoInfo">
  1039. <!-- 컨텐츠 동적 생성 -->
  1040. </tbody>
  1041. </table>
  1042. </div>
  1043. <div class="modal-footer">
  1044. <button type="button" class="removeMemo btn btn-danger" onclick="deleteMemoData()">삭제</button>
  1045. <button type="button" class="btn btn-outline-primary" data-dismiss="modal">취소</button>
  1046. <button type="button" class="btn btn-primary" onclick="modifyMemoData()">수정</button>
  1047. </div>
  1048. </div>
  1049. </div>
  1050. </div>
  1051. <div class="wrapper">
  1052. <jsp:include page="${data._INCLUDE}/sidebar.jsp"></jsp:include>
  1053. <div class="main">
  1054. <jsp:include page="${data._INCLUDE}/top.jsp"></jsp:include>
  1055. <main class="content">
  1056. <div class="container-fluid p-0">
  1057. <div class="row">
  1058. <div class="col-12 col-lg-6">
  1059. <h1 class="h3 mb-3">건강정보 조회</h1>
  1060. </div>
  1061. <div class="col-12 col-lg-6 text-right">
  1062. <nav aria-label="breadcrumb">
  1063. <ol class="breadcrumb">
  1064. <li class="breadcrumb-item"><a href="javscript:;">Home</a></li>
  1065. <li class="breadcrumb-item">진료관리</li>
  1066. <li class="breadcrumb-item active">건강정보 조회</li>
  1067. </ol>
  1068. </nav>
  1069. </div>
  1070. </div>
  1071. <div class="row">
  1072. <div class="col-12">
  1073. <div id="home" class="card">
  1074. <div class="row mb-3">
  1075. <div class="col-12">
  1076. <!-- <div class="text-right"> -->
  1077. <button class="btn btn-lg btn-secondary" onclick="gotoList()"><i class="mdi mdi-backburger"></i> 대시보드</button>
  1078. <!-- </div> -->
  1079. </div>
  1080. </div>
  1081. <div class="toggle">
  1082. <div class="toggleHeader card-header">
  1083. <h1 class="h4">
  1084. <c:set var="now" value="<%=new java.util.Date()%>" />
  1085. <fmt:formatDate value="${now}" pattern="yyyy" var="sysYear"/>
  1086. <fmt:parseDate value="${info.jumin}" pattern="yyyy년 MM월 dd일" var="birthDate"/>
  1087. <fmt:formatDate value="${birthDate}" pattern="yyyy" var="birthYear"/>
  1088. <c:set var="age" value="${sysYear-birthYear}" />
  1089. <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>
  1090. <button class="untactStart btn btn-lg btn-warning" onclick="nonFaceStart();"><i class="mdi mdi-message-video"></i> 비대면 진료</button>
  1091. </h1>
  1092. <a href="javscript:;" class="toggleBtn">메뉴</a>
  1093. </div>
  1094. <div id="userInfo" class="card-body user-info">
  1095. <div class="mb-3">
  1096. <button class="patientInfo btn btn-primary" onclick="gotoPatientInfo()"><i class="mdi mdi-account"></i> 환자정보 관리</button>
  1097. </div>
  1098. <jsp:include page="${data._INCLUDE}/patientInfo.jsp"></jsp:include>
  1099. </div>
  1100. </div>
  1101. <!-- <hr> -->
  1102. <div class="card-body">
  1103. <section id="symptomSection" class="phrSection">
  1104. <div class="col-lg-12">
  1105. <div class="row">
  1106. <div class="col-lg-3">
  1107. <h1 class="h4">
  1108. <div class="sectionToggle"></div>
  1109. <span class="phrTitle symptom">임상증상</span>
  1110. </h1>
  1111. </div>
  1112. <div class="col-lg-9 text-right">
  1113. <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>
  1114. </div>
  1115. </div>
  1116. </div>
  1117. <div class="sectionContent col-lg-12">
  1118. <div class="row">
  1119. <div class="sectionNav col-lg-12">
  1120. <ul>
  1121. <li><a href="#home">환자정보</a></li>
  1122. <li class="active"><a href="#symptomSection">임상증상</a></li>
  1123. <li><a href="#feverSection">체온</a></li>
  1124. <li><a href="#bloodPressureSection">혈압 / 맥박</a></li>
  1125. <li><a href="#oxygenSection">산소포화도</a></li>
  1126. <li><a href="#sugarSection">혈당</a></li>
  1127. <li><a href="#medicalMemoSection">의료진 메모</a></li>
  1128. </ul>
  1129. </div>
  1130. <div class="col-lg-12">
  1131. <div class="phrDataTableWrap table-responsive mb-4">
  1132. <table id="symptomDataTable" class="symptomDataTable table data-table text-center">
  1133. <thead>
  1134. <tr>
  1135. <th>측정일시</th>
  1136. <th>기침</th>
  1137. <th>호흡곤란</th>
  1138. <th>오한</th>
  1139. <th>근육통</th>
  1140. <th>두통</th>
  1141. <th>인후통</th>
  1142. <th>후각/미각 소실</th>
  1143. <th>피로</th>
  1144. <th>식욕감소</th>
  1145. <th>가래</th>
  1146. <th>오심</th>
  1147. <th>구토</th>
  1148. <th>설사</th>
  1149. <th>어지러움</th>
  1150. <th>콧물/코막힘</th>
  1151. <th>기타증상</th>
  1152. <th>기록자</th>
  1153. <th>기록일시</th>
  1154. </tr>
  1155. </thead>
  1156. <tbody>
  1157. <c:set var="symptomTotal" value="${symptomResult.size()}" />
  1158. <c:set var="yesHtml" value="<i class='mdi mdi-check-bold'></i>" />
  1159. <c:set var="noHtml" value="-" />
  1160. <c:choose>
  1161. <c:when test="${symptomTotal > 0}">
  1162. <c:forEach var="d" items="${symptomResult}">
  1163. <tr>
  1164. <th><c:out value="${d.createDateFormatted}" /></th>
  1165. <td>${d.coughCheck == 'Y' ? yesHtml : noHtml}</td>
  1166. <td>${d.dyspneaCheck == 'Y' ? yesHtml : noHtml}</td>
  1167. <td>${d.coldFitCheck == 'Y' ? yesHtml : noHtml}</td>
  1168. <td>${d.musclePainCheck == 'Y' ? yesHtml : noHtml}</td>
  1169. <td>${d.headacheCheck == 'Y' ? yesHtml : noHtml}</td>
  1170. <td>${d.soreThroatCheck == 'Y' ? yesHtml : noHtml}</td>
  1171. <td>${d.smellPalateCheck == 'Y' ? yesHtml : noHtml}</td>
  1172. <td>${d.fatigueCheck == 'Y' ? yesHtml : noHtml}</td>
  1173. <td>${d.appetiteLossCheck == 'Y' ? yesHtml : noHtml}</td>
  1174. <td>${d.sputumCheck == 'Y' ? yesHtml : noHtml}</td>
  1175. <td>${d.ocinCheck == 'Y' ? yesHtml : noHtml}</td>
  1176. <td>${d.vomitingCheck == 'Y' ? yesHtml : noHtml}</td>
  1177. <td>${d.diarrheaCheck == 'Y' ? yesHtml : noHtml}</td>
  1178. <td>${d.dizzinessCheck == 'Y' ? yesHtml : noHtml}</td>
  1179. <td>${d.noseCheck == 'Y' ? yesHtml : noHtml}</td>
  1180. <td>${d.etcCheck == 'Y' ? d.etcContent : noHtml}</td>
  1181. <td><c:out value="${d.recordedByName}" /></td>
  1182. <td></td>
  1183. </tr>
  1184. </c:forEach>
  1185. </c:when>
  1186. <c:otherwise>
  1187. <tr>
  1188. <td colspan=19>데이터가 없습니다.</td>
  1189. </tr>
  1190. </c:otherwise>
  1191. </c:choose>
  1192. </tbody>
  1193. </table>
  1194. </div>
  1195. </div>
  1196. </div>
  1197. </div>
  1198. </section>
  1199. <!-- <hr> -->
  1200. <section id="feverSection" class="phrSection">
  1201. <div class="col-lg-12">
  1202. <div class="row">
  1203. <div class="col-lg-3">
  1204. <h1 class="h4">
  1205. <div class="sectionToggle"></div>
  1206. <span class="phrTitle fever">체온</span>
  1207. </h1>
  1208. </div>
  1209. <div class="col-lg-9 text-right">
  1210. <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>
  1211. </div>
  1212. </div>
  1213. </div>
  1214. <div class="sectionContent col-lg-12">
  1215. <div class="row">
  1216. <div class="sectionNav col-lg-12">
  1217. <ul>
  1218. <li><a href="#home">환자정보</a></li>
  1219. <li><a href="#symptomSection">임상증상</a></li>
  1220. <li class="active"><a href="#feverSection">체온</a></li>
  1221. <li><a href="#bloodPressureSection">혈압 / 맥박</a></li>
  1222. <li><a href="#oxygenSection">산소포화도</a></li>
  1223. <li><a href="#sugarSection">혈당</a></li>
  1224. <li><a href="#medicalMemoSection">의료진 메모</a></li>
  1225. </ul>
  1226. </div>
  1227. <div class="col-lg-6 col-md-12">
  1228. <div class="graph-area mb-4">
  1229. <canvas id="temperatureChart" style="width: 100%; height: 370px"></canvas>
  1230. </div>
  1231. </div>
  1232. <div class="col-lg-6 col-md-12">
  1233. <h1 class="h4 text-right">
  1234. <span class="small showLegend" data-toggle="modal" data-target="#legendGuide"><i class="mdi mdi-comment-question-outline"></i> 알람 표시 기준</span>
  1235. </h1>
  1236. <div class="phrDataTableWrap table-responsive">
  1237. <table id="temperatureDataTable" class="phrDataTable table data-table text-center">
  1238. <thead>
  1239. <tr>
  1240. <th>측정일시</th>
  1241. <th>체온</th>
  1242. <th>기록자</th>
  1243. <th>기록일시</th>
  1244. </tr>
  1245. </thead>
  1246. <tbody>
  1247. <c:set var="temperatureTotal" value="${temperatureResult.size()}" />
  1248. <c:choose>
  1249. <c:when test="${temperatureTotal > 0}">
  1250. <c:forEach var="i" begin="1" end="${temperatureTotal}">
  1251. <tr>
  1252. <td><c:out value="${temperatureResult[temperatureTotal-i].createDateFormatted}" /></td>
  1253. <td><span class="${temperatureResult[temperatureTotal-i].isWarning ? 'text-danger' : ''}"><c:out value="${temperatureResult[temperatureTotal-i].phrValue}" /></span></td>
  1254. <td><c:out value="${temperatureResult[temperatureTotal-i].recordedByName}" /></td>
  1255. <td></td>
  1256. </tr>
  1257. </c:forEach>
  1258. </c:when>
  1259. <c:otherwise>
  1260. <tr>
  1261. <td colspan=4>데이터가 없습니다.</td>
  1262. </tr>
  1263. </c:otherwise>
  1264. </c:choose>
  1265. </tbody>
  1266. </table>
  1267. </div>
  1268. </div>
  1269. </div>
  1270. </div>
  1271. </section>
  1272. <!-- <hr> -->
  1273. <section id="bloodPressureSection" class="phrSection">
  1274. <div class="col-lg-12">
  1275. <div class="row">
  1276. <div class="col-lg-3">
  1277. <h1 class="h4">
  1278. <div class="sectionToggle"></div>
  1279. <span class="phrTitle bloodPressure">혈압 / 맥박</span>
  1280. </h1>
  1281. </div>
  1282. <div class="col-lg-9 text-right">
  1283. <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>
  1284. </div>
  1285. </div>
  1286. </div>
  1287. <div class="sectionContent col-lg-12">
  1288. <div class="row">
  1289. <div class="sectionNav col-lg-12">
  1290. <ul>
  1291. <li><a href="#home">환자정보</a></li>
  1292. <li><a href="#symptomSection">임상증상</a></li>
  1293. <li><a href="#feverSection">체온</a></li>
  1294. <li class="active"><a href="#bloodPressureSection">혈압 / 맥박</a></li>
  1295. <li><a href="#oxygenSection">산소포화도</a></li>
  1296. <li><a href="#sugarSection">혈당</a></li>
  1297. <li><a href="#medicalMemoSection">의료진 메모</a></li>
  1298. </ul>
  1299. </div>
  1300. <div class="col-lg-6 col-md-12">
  1301. <div class="graph-area mb-4">
  1302. <canvas id="bloodPressurePulseChart" style="width: 100%; height: 370px"></canvas>
  1303. </div>
  1304. </div>
  1305. <div class="col-lg-6 col-md-12">
  1306. <h1 class="h4 text-right">
  1307. <span class="small showLegend" data-toggle="modal" data-target="#legendGuide"><i class="mdi mdi-comment-question-outline"></i> 알람 표시 기준</span>
  1308. </h1>
  1309. <div class="phrDataTableWrap table-responsive">
  1310. <table id="bloodPressureDataTable" class="phrDataTable table data-table text-center">
  1311. <thead>
  1312. <tr>
  1313. <th>측정일시</th>
  1314. <th>혈압</th>
  1315. <th>맥박</th>
  1316. <th>기록자</th>
  1317. <th>기록일시</th>
  1318. </tr>
  1319. </thead>
  1320. <tbody>
  1321. <c:set var="bloodPressureUnionTotal" value="${bloodPressureUnionResult.size()}" />
  1322. <c:choose>
  1323. <c:when test="${bloodPressureUnionTotal > 0}">
  1324. <c:forEach var="i" begin="1" end="${bloodPressureUnionTotal}">
  1325. <fmt:parseNumber var="bpH" value="${bloodPressureUnionResult[bloodPressureUnionTotal-i].phrValue}" integerOnly="true" />
  1326. <fmt:parseNumber var="bpL" value="${bloodPressureUnionResult[bloodPressureUnionTotal-i].phrValue2}" integerOnly="true" />
  1327. <fmt:parseNumber var="pr" value="${bloodPressureUnionResult[bloodPressureUnionTotal-i].phrValueExtra}" integerOnly="true" />
  1328. <tr>
  1329. <td><c:out value="${bloodPressureUnionResult[bloodPressureUnionTotal-i].createDateFormatted}" /></td>
  1330. <td><span class="${bloodPressureUnionResult[bloodPressureUnionTotal-i].isWarning ? 'text-danger' : ''}"><c:out value="${bpH}/${bpL}" /></span></td>
  1331. <td><span class="${bloodPressureUnionResult[bloodPressureUnionTotal-i].isExtraWarning ? 'text-danger' : ''}"><c:out value="${pr}" /></span></td>
  1332. <td><c:out value="${bloodPressureUnionResult[bloodPressureUnionTotal-i].recordedByName}" /></td>
  1333. <td></td>
  1334. </tr>
  1335. </c:forEach>
  1336. </c:when>
  1337. <c:otherwise>
  1338. <tr>
  1339. <td colspan=5>데이터가 없습니다.</td>
  1340. </tr>
  1341. </c:otherwise>
  1342. </c:choose>
  1343. </tbody>
  1344. </table>
  1345. </div>
  1346. </div>
  1347. </div>
  1348. </div>
  1349. </section>
  1350. <!-- <hr> -->
  1351. <section id="oxygenSection" class="phrSection">
  1352. <div class="col-lg-12">
  1353. <div class="row">
  1354. <div class="col-lg-3">
  1355. <h1 class="h4">
  1356. <div class="sectionToggle"></div>
  1357. <span class="phrTitle oxygen">산소포화도</span>
  1358. </h1>
  1359. </div>
  1360. <div class="col-lg-9 text-right">
  1361. <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>
  1362. </div>
  1363. </div>
  1364. </div>
  1365. <div class="sectionContent col-lg-12">
  1366. <div class="row">
  1367. <div class="sectionNav col-lg-12">
  1368. <ul>
  1369. <li><a href="#home">환자정보</a></li>
  1370. <li><a href="#symptomSection">임상증상</a></li>
  1371. <li><a href="#feverSection">체온</a></li>
  1372. <li><a href="#bloodPressureSection">혈압 / 맥박</a></li>
  1373. <li class="active"><a href="#oxygenSection">산소포화도</a></li>
  1374. <li><a href="#sugarSection">혈당</a></li>
  1375. <li><a href="#medicalMemoSection">의료진 메모</a></li>
  1376. </ul>
  1377. </div>
  1378. <div class="col-lg-6 col-md-12">
  1379. <div class="graph-area mb-4">
  1380. <canvas id="oxygenSaturationChart" style="width: 100%; height: 370px"></canvas>
  1381. </div>
  1382. </div>
  1383. <div class="col-lg-6 col-md-12">
  1384. <h1 class="h4 text-right">
  1385. <span class="small showLegend" data-toggle="modal" data-target="#legendGuide"><i class="mdi mdi-comment-question-outline"></i> 알람 표시 기준</span>
  1386. </h1>
  1387. <div class="phrDataTableWrap table-responsive">
  1388. <table id="oxygenSaturationDataTable" class="phrDataTable table data-table text-center">
  1389. <thead>
  1390. <tr>
  1391. <th>측정일시</th>
  1392. <th>산소포화도</th>
  1393. <th>기록자</th>
  1394. <th>기록일시</th>
  1395. </tr>
  1396. </thead>
  1397. <tbody>
  1398. <c:set var="oxygenSaturationTotal" value="${oxygenSaturationResult.size()}" />
  1399. <c:choose>
  1400. <c:when test="${oxygenSaturationTotal > 0}">
  1401. <c:forEach var="i" begin="1" end="${oxygenSaturationTotal}">
  1402. <fmt:parseNumber var="phrValue" value="${oxygenSaturationResult[oxygenSaturationTotal-i].phrValue}" integerOnly="true" />
  1403. <tr>
  1404. <td><c:out value="${oxygenSaturationResult[oxygenSaturationTotal-i].createDateFormatted}" /></td>
  1405. <td><span class="${oxygenSaturationResult[oxygenSaturationTotal-i].isWarning ? 'text-danger' : ''}"><c:out value="${phrValue}" /></span></td>
  1406. <td><c:out value="${oxygenSaturationResult[oxygenSaturationTotal-i].recordedByName}" /></td>
  1407. <td></td>
  1408. </tr>
  1409. </c:forEach>
  1410. </c:when>
  1411. <c:otherwise>
  1412. <tr>
  1413. <td colspan=4>데이터가 없습니다.</td>
  1414. </tr>
  1415. </c:otherwise>
  1416. </c:choose>
  1417. </tbody>
  1418. </table>
  1419. </div>
  1420. </div>
  1421. </div>
  1422. </div>
  1423. </section>
  1424. <!-- <hr> -->
  1425. <section id="sugarSection" class="phrSection">
  1426. <div class="col-lg-12">
  1427. <div class="row">
  1428. <div class="col-lg-3">
  1429. <h1 class="h4">
  1430. <div class="sectionToggle"></div>
  1431. <span class="phrTitle sugar">혈당</span>
  1432. </h1>
  1433. </div>
  1434. <div class="col-lg-9 text-right">
  1435. <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>
  1436. </div>
  1437. </div>
  1438. </div>
  1439. <div class="sectionContent col-lg-12">
  1440. <div class="row">
  1441. <div class="sectionNav col-lg-12">
  1442. <ul>
  1443. <li><a href="#home">환자정보</a></li>
  1444. <li><a href="#symptomSection">임상증상</a></li>
  1445. <li><a href="#feverSection">체온</a></li>
  1446. <li><a href="#bloodPressureSection">혈압 / 맥박</a></li>
  1447. <li><a href="#oxygenSection">산소포화도</a></li>
  1448. <li class="active"><a href="#sugarSection">혈당</a></li>
  1449. <li><a href="#medicalMemoSection">의료진 메모</a></li>
  1450. </ul>
  1451. </div>
  1452. <div class="col-lg-6 col-md-12">
  1453. <div class="graph-area mb-4">
  1454. <canvas id="bloodSugarChart" style="width: 100%; height: 370px"></canvas>
  1455. </div>
  1456. </div>
  1457. <div class="col-lg-6 col-md-12">
  1458. <h1 class="h4 text-right">
  1459. <span class="small showLegend" data-toggle="modal" data-target="#legendGuide"><i class="mdi mdi-comment-question-outline"></i> 알람 표시 기준</span>
  1460. </h1>
  1461. <div class="phrDataTableWrap table-responsive">
  1462. <table id="bloodSugarDataTable" class="phrDataTable table data-table text-center">
  1463. <thead>
  1464. <tr>
  1465. <th>측정일시</th>
  1466. <th>혈당</th>
  1467. <th>기록자</th>
  1468. <th>기록일시</th>
  1469. </tr>
  1470. </thead>
  1471. <tbody>
  1472. <c:set var="bloodSugarTotal" value="${bloodSugarResult.size()}" />
  1473. <c:choose>
  1474. <c:when test="${bloodSugarTotal > 0}">
  1475. <c:forEach var="i" begin="1" end="${bloodSugarTotal}">
  1476. <fmt:parseNumber var="phrValue" value="${bloodSugarResult[bloodSugarTotal-i].phrValue}" integerOnly="true" />
  1477. <tr>
  1478. <td><c:out value="${bloodSugarResult[bloodSugarTotal-i].createDateFormatted}" /></td>
  1479. <td><span class="${bloodSugarResult[bloodSugarTotal-i].isWarning ? 'text-danger' : ''}"><c:out value="${phrValue}" /></span></td>
  1480. <td><c:out value="${bloodSugarResult[bloodSugarTotal-i].recordedByName}" /></td>
  1481. <td></td>
  1482. </tr>
  1483. </c:forEach>
  1484. </c:when>
  1485. <c:otherwise>
  1486. <tr>
  1487. <td colspan=4>데이터가 없습니다.</td>
  1488. </tr>
  1489. </c:otherwise>
  1490. </c:choose>
  1491. </tbody>
  1492. </table>
  1493. </div>
  1494. </div>
  1495. </div>
  1496. </div>
  1497. </section>
  1498. <!-- <hr> -->
  1499. <section id="medicalMemoSection" class="phrSection">
  1500. <h1 class="h4 col-lg-12">
  1501. <span class="phrTitle medicalMemo">의료진 메모</span>
  1502. <!-- <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> -->
  1503. </h1>
  1504. <div class="col-lg-12">
  1505. <div class="row">
  1506. <div class="sectionNav col-lg-12">
  1507. <ul>
  1508. <li><a href="#home">환자정보</a></li>
  1509. <li><a href="#symptomSection">임상증상</a></li>
  1510. <li><a href="#feverSection">체온</a></li>
  1511. <li><a href="#bloodPressureSection">혈압 / 맥박</a></li>
  1512. <li><a href="#oxygenSection">산소포화도</a></li>
  1513. <li><a href="#sugarSection">혈당</a></li>
  1514. <li class="active"><a href="#medicalMemoSection">의료진 메모</a></li>
  1515. </ul>
  1516. </div>
  1517. <div class="col-lg-4">
  1518. <textarea id="memoContent" class="medicalMemo form-control mb-3" rows="15" placeholder="내용을 입력하세요"></textarea>
  1519. <div class="datetimepickerWrap mb-3">
  1520. <input id="eventDateTime3" class="datetimepicker form-control" type="text" placeholder="처리 일시 (미 입력시 현재시간 자동등록)" />
  1521. </div>
  1522. <div class="text-right">
  1523. <button id="medicalMemo" type="button" class="btn btn-primary ml-2" onclick="insertMemoData()"><i class="mdi mdi-clipboard-alert-outline"></i> 메모추가</button>
  1524. </div>
  1525. </div>
  1526. <div class="col-lg-8">
  1527. <div class="memoDataTableWrap table-responsive mb-4">
  1528. <table id="memoDataTable" class="memoDataTable table data-table text-center">
  1529. <thead>
  1530. <tr>
  1531. <th>처리일시</th>
  1532. <th>내용</th>
  1533. <th>기록자</th>
  1534. <th>기록일시</th>
  1535. </tr>
  1536. </thead>
  1537. <tbody>
  1538. <c:set var="memoTotal" value="${memoResult.size()}" />
  1539. <c:choose>
  1540. <c:when test="${memoTotal > 0}">
  1541. <c:forEach var="d" items="${memoResult}">
  1542. <tr>
  1543. <td><c:out value="${d.createDateFormatted}" /></td>
  1544. <c:choose>
  1545. <c:when test="${d.canModify}">
  1546. <td><pre id='memo_${d.idx}' class='contentsEdit' onClick='handleModifyMemo(${d.idx})'>${d.contents}</pre></td>
  1547. </c:when>
  1548. <c:otherwise>
  1549. <td><pre>${d.contents}</pre></td>
  1550. </c:otherwise>
  1551. </c:choose>
  1552. <td><c:out value="${d.recordedByName}" /></td>
  1553. <td></td>
  1554. </tr>
  1555. </c:forEach>
  1556. </c:when>
  1557. <c:otherwise>
  1558. <tr>
  1559. <td colspan=4>데이터가 없습니다.</td>
  1560. </tr>
  1561. </c:otherwise>
  1562. </c:choose>
  1563. </tbody>
  1564. </table>
  1565. </div>
  1566. </div>
  1567. </div>
  1568. </div>
  1569. </section>
  1570. </div>
  1571. </div>
  1572. </div>
  1573. </div>
  1574. <!-- <div class="row">
  1575. <div class="col-12">
  1576. <div class="card">
  1577. <ul class="tab-nav">
  1578. <li class="tab-item active" tabindex="#tabPhr">건강정보이력</li>
  1579. <li class="tab-item" tabindex="#tabSymptom">임상증상</li>
  1580. <li class="tab-item" tabindex="#tabMemo">의료진 메모</li>
  1581. </ul>
  1582. <div id="tabPhr" class="tab in">
  1583. <div class="card-header">
  1584. <h1 class="h4">
  1585. - 건강정보 조회 <label> <select class="custom-select ml-1 form-control" id=phrTypeSelect name="inputState" onchange="retrievePhrData()">
  1586. <option value="temperature" selected>체온</option>
  1587. <option value="bloodPressure">혈압</option>
  1588. <option value="oxygenSaturation">산소포화도</option>
  1589. <option value="pulseRate">맥박</option>
  1590. <option value="bloodSugar">혈당</option>
  1591. </select>
  1592. </label> <label class="ml-1">
  1593. <button type="button" class="btn btn-primary ml-2" data-toggle="modal" data-target="#defaultModalPrimary_1">기록추가</button>
  1594. </label>
  1595. </h1>
  1596. </div>
  1597. <div class="card-body">
  1598. <div class="graph-area mb-4" style="height:300px;">
  1599. <canvas id="phrChart"></canvas>
  1600. </div>
  1601. <button class="btn btn-success" onclick="getExcel('');">Excel 다운로드</button>
  1602. <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>
  1603. <div class="table-responsive">
  1604. <table id="phrDataTable" class="table data-table text-center">
  1605. <thead>
  1606. <tr>
  1607. <th>기록일시</th>
  1608. <th>체온</th>
  1609. <th>기록자</th>
  1610. </tr>
  1611. </thead>
  1612. <tbody>
  1613. <c:choose>
  1614. <c:when test="${phrTotal > 0}">
  1615. <c:forEach var="i" begin="1" end="${phrTotal}">
  1616. <tr>
  1617. <td><c:out value="${phrItems[phrTotal-i].createDateFormatted}" /></td>
  1618. <td><span class="${phrItems[phrTotal-i].isWarning ? 'text-danger' : ''}"><c:out value="${phrItems[phrTotal-i].phrValue}" /></span></td>
  1619. <td><c:out value="${phrItems[phrTotal-i].recordedByName}" /></td>
  1620. </tr>
  1621. </c:forEach>
  1622. </c:when>
  1623. <c:otherwise>
  1624. <tr>
  1625. <td colspan=3>데이터가 없습니다.</td>
  1626. </tr>
  1627. </c:otherwise>
  1628. </c:choose>
  1629. </tbody>
  1630. </table>
  1631. </div>
  1632. </div>
  1633. </div>
  1634. <div id="tabSymptom" class="tab">
  1635. <div class="card-header">
  1636. <h1 class="h4">
  1637. - 임상증상 <label class="ml-1">
  1638. <button type="button" class="btn btn-primary ml-2" data-toggle="modal" data-target="#defaultModalPrimary_2">증상추가</button>
  1639. </label>
  1640. <button class="btn btn-success text-right" style="float:right;" onclick="getExcel('symptom');">Excel 다운로드</button>
  1641. </h1>
  1642. </div>
  1643. <div class="card-body">
  1644. <div class="table-responsive">
  1645. <table id="symptomDataTable" class="table data-table text-center">
  1646. <thead>
  1647. <tr>
  1648. <th>기록일시</th>
  1649. <th>기침</th>
  1650. <th>호흡곤란</th>
  1651. <th>오한</th>
  1652. <th>근육통</th>
  1653. <th>두통</th>
  1654. <th>인후통</th>
  1655. <th>후각/미각 손실</th>
  1656. <th>피로</th>
  1657. <th>식욕감소</th>
  1658. <th>가래</th>
  1659. <th>오심</th>
  1660. <th>구토</th>
  1661. <th>설사</th>
  1662. <th>어지러움</th>
  1663. <th>콧물/코막힘</th>
  1664. <th>기타증상</th>
  1665. <th>기록자</th>
  1666. </tr>
  1667. </thead>
  1668. <tbody>
  1669. </tbody>
  1670. </table>
  1671. </div>
  1672. </div>
  1673. </div>
  1674. <div id="tabMemo" class="tab">
  1675. <div class="card-header">
  1676. <h1 class="h4">
  1677. - 의료진 메모
  1678. <button type="button" class="addMemo btn btn-primary ml-2" data-toggle="modal">메모추가</button>
  1679. <button class="btn btn-success text-right" style="float:right;" onclick="getExcel('memo');">Excel 다운로드</button>
  1680. </h1>
  1681. </div>
  1682. <div class="card-body">
  1683. <div class="table-responsive">
  1684. <table id="memoDataTable" class="table data-table text-center">
  1685. <thead>
  1686. <tr>
  1687. <th>기록일시</th>
  1688. <th>내용</th>
  1689. <th>기록자</th>
  1690. </tr>
  1691. </thead>
  1692. <tbody>
  1693. </tbody>
  1694. </table>
  1695. </div>
  1696. </div>
  1697. </div>
  1698. </div>
  1699. </div>
  1700. </div>-->
  1701. </div>
  1702. </main>
  1703. <jsp:include page="${data._INCLUDE}/footer.jsp"></jsp:include>
  1704. </div>
  1705. </div>
  1706. </body>
  1707. </html>