new.jsp 39 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559
  1. <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
  2. <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
  3. <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
  4. <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
  5. <jsp:include page="${data._INCLUDE}/header.jsp"></jsp:include>
  6. <script type="text/javascript">
  7. function patientNewInit() {
  8. if( $( "#basalN" ).is( ":checked" ) ) {
  9. $( "td.basalDisease input" ).prop( "disabled", true );
  10. }
  11. $( "label.label-readonly-check" ).each( function( i, v ){
  12. var $this = $(v);
  13. var checkbox = $this.find( "input[type='checkbox']" );
  14. var textbox = $this.find( "input[type='text']" );
  15. if( !checkbox.is(":checked") ){
  16. textbox.prop( "readonly", true );
  17. }
  18. });
  19. };
  20. function setEventHandler(){
  21. //체크yes시 content입력 처리
  22. $( "label.label-readonly-check input[type='checkbox']" ).on( "click", function(){
  23. var $this = $( this );
  24. $this.closest( "label" ).find( "input[type='text']" ).prop( "readonly", $this.is( ":checked" ) === false );
  25. if( $this.is( ":checked" ) === false ) {
  26. $this.closest( "label" ).find( "input[type='text']" ).val( "" );
  27. } else {
  28. $this.closest( "label" ).find( "input[type='text']" ).focus();
  29. };
  30. });
  31. //기저질환유무 처리
  32. $( "input[name='basalDiseaseYn']" ).on( "click", function(){
  33. var $this = $( this );
  34. if( $this.val() == "Y" ){
  35. patientNewInit();
  36. $( ".basalDisease input" ).prop( "disabled", false );
  37. } else {
  38. $( "td.basalDisease input" ).prop( "disabled", true );
  39. $( "td.basalDisease input[type='checkbox']" ).prop( "checked", false );
  40. $( "td.basalDisease input[type='text']" ).val( "" );
  41. }
  42. });
  43. $( "input[name='pregnancyStatus']" ).on( "click", function(){
  44. var $this = $( this );
  45. if ($this.val() == "Y") {
  46. $("#pregnancyWeek").prop("disabled", false);
  47. } else {
  48. $("#pregnancyWeek").prop("disabled", true);
  49. $("#pregnancyWeek").val("");
  50. }
  51. });
  52. //입소일시
  53. $( ".hospitalizationDate" ).on( "change", function(){
  54. var ymd = $( "#hospitalizationDateYmd" ).val();
  55. var hour = $( "#hospitalizationDateHour" ).val();
  56. var min = $( "#hospitalizationDateMin" ).val();
  57. hour = Number(hour) < 10 ? "0" + hour : hour;
  58. min = Number(min) < 10 ? "0" + min : min;
  59. $( "#hospitalizationDate" ).val( ymd + " " + hour + ":" + min + ":00" );
  60. });
  61. //성별 남선택시 임신유무 고정
  62. $( "input[name='gender']" ).on( "click", function(){
  63. var gender = $( this ).val();
  64. console.log( gender );
  65. if( gender == "M" ) {
  66. $( "input[name='pregnancyStatus']:input[value='N']" ).prop( "checked", true );
  67. $( "input[name='pregnancyStatus']:input[value='Y']" ).prop( "disabled", true );
  68. $( "#pregnancyWeek" ).val( "" ).prop( "disabled", true );
  69. } else {
  70. $( "input[name='pregnancyStatus']:input[value='N']" ).prop( "checked", false );
  71. $( "input[name='pregnancyStatus']:input[value='Y']" ).prop( "disabled", false );
  72. }
  73. });
  74. //생년월일
  75. $( ".select-date" ).on( "change", function(){
  76. var $this = $( this );
  77. var wrap = $this.closest( "div.date" );
  78. var dateYear = wrap.find( ".date-year" ).val();
  79. var dateMonth = wrap.find( ".date-month" ).val();
  80. var dateDay = wrap.find( ".date-day" ).val();
  81. dateMonth = Number(dateMonth) < 10 ? "0" + dateMonth : dateMonth;
  82. dateDay = Number(dateDay) < 10 ? "0" + dateDay : dateDay;
  83. wrap.find( "input.error-box" ).val( dateYear + "-" + dateMonth + "-" + dateDay );
  84. });
  85. $( "input.date" ).daterangepicker({
  86. singleDatePicker : true,
  87. showDropdowns : true,
  88. locale : {
  89. format : "YYYY-MM-DD"
  90. }
  91. });
  92. $( "input.date-no-req" ).daterangepicker({
  93. singleDatePicker : true,
  94. showDropdowns : true,
  95. locale : {
  96. format : "YYYY-MM-DD"
  97. },
  98. autoUpdateInput: false
  99. });
  100. $('input.date-no-req').on('apply.daterangepicker', function(ev, picker) {
  101. $(this).val(picker.startDate.format('YYYY-MM-DD'));
  102. });
  103. }
  104. $( function(){
  105. patientNewInit();
  106. setEventHandler();
  107. $( "#patientForm" ).validate({
  108. rules: {
  109. hospitalizationDate : {
  110. date : true
  111. },
  112. patientPhone : {
  113. phoneValid : true
  114. },
  115. guardianPhone : {
  116. phoneValid : true
  117. },
  118. jumin : {
  119. date : true
  120. }
  121. },
  122. messages : {
  123. // jumin : "생년월일을 모두 선택해주세요",
  124. gender: "성별을 선택해주세요",
  125. // wardNumber : "동을 입력해주세요",
  126. roomNumber : "호실을 입력해주세요",
  127. hospitalizationDate : {
  128. date:"입소일시를 선택해주세요"
  129. }
  130. },
  131. onkeyup: function( element, event ) {
  132. $( element ).valid();
  133. },
  134. onfocusout: function (element) {
  135. $( element ).val( $.trim( $( element ).val() ) );
  136. $( element ).valid();
  137. },
  138. errorPlacement: function(error, element) {
  139. if (element.attr("type") == "radio") {
  140. error.insertBefore(element);
  141. } else {
  142. error.insertAfter(element);
  143. }
  144. },
  145. submitHandler: function(form) {
  146. form.submit();
  147. }
  148. });
  149. });
  150. </script>
  151. </head>
  152. <body>
  153. <div class="wrapper">
  154. <jsp:include page="${data._INCLUDE}/sidebar.jsp"></jsp:include>
  155. <div class="main">
  156. <jsp:include page="${data._INCLUDE}/top.jsp"></jsp:include>
  157. <main class="content">
  158. <div class="container-fluid p-0">
  159. <!-- 환자관리 : 신규환자 등록 START -->
  160. <div class="row">
  161. <div class="col-12 col-lg-6">
  162. <h1 class="h3 mb-3">환자정보등록</h1>
  163. </div>
  164. <div class="col-12 col-lg-6 text-right">
  165. <nav aria-label="breadcrumb">
  166. <ol class="breadcrumb">
  167. <li class="breadcrumb-item"><a href="javscript:;">Home</a></li>
  168. <li class="breadcrumb-item">환자관리</li>
  169. <li class="breadcrumb-item active">환자정보 등록</li>
  170. </ol>
  171. </nav>
  172. </div>
  173. </div>
  174. <div class="row">
  175. <div class="col-12">
  176. <div class="card">
  177. <div class="card-body">
  178. <c:if test="${centerCount eq 0}">
  179. <table class="table mobile-table">
  180. <tr>
  181. <th>치료센터</th>
  182. <td class="text-danger">등록된 생활치료센터가 없거나<br/>환자 신규등록 권한이 없습니다. </td>
  183. </tr>
  184. </table>
  185. </c:if>
  186. <c:if test="${centerCount > 0}">
  187. <c:set var="now" value="<%=new java.util.Date()%>" />
  188. <c:set var="action" value="/patient/new/insert" />
  189. <form id="patientForm" action="${action}" method="post" onsubmit="return false">
  190. <table class="table mobile-table">
  191. <colgroup>
  192. <col style="width:15%">
  193. <col style="width:35%">
  194. <col style="width:15%">
  195. <col style="width:35%">
  196. </colgroup>
  197. <tr>
  198. <th>치료센터</th>
  199. <td><c:out value="${centerName}"/></td>
  200. <th><span class="fix">*</span>입소일시</th>
  201. <td colspan="2">
  202. <!-- 입소일시 -->
  203. <c:set var="sysYmd"><fmt:formatDate value="${now}" pattern="yyyy-MM-dd" /></c:set>
  204. <div class="form-group calendar-bar mb-xl-0">
  205. <input class="form-control date hospitalizationDate" type="text" value="${sysYmd}" name="hospitalizationDate" id="hospitalizationDateYmd">
  206. <i class="align-middle mr-2 fas fa-fw fa-calendar-alt"></i>
  207. </div>
  208. </td>
  209. </tr>
  210. <tr>
  211. <th><span class="fix">*</span>병동 번호</th>
  212. <td>
  213. <div class="form-check-inline">
  214. <!-- 병동 번호 (동 /호실) -->
  215. <input type="text" class="form-control" name="wardNumber"> <span>동</span>
  216. <input type="text" class="form-control" name="roomNumber" required> <span>호</span>
  217. </div>
  218. </td>
  219. <th><span class="fix">*</span>이름</th>
  220. <td>
  221. <!-- 환자 이름 -->
  222. <input type="text" name="patientName" class="form-control" placeholder="이름을 입력해주세요" required>
  223. </td>
  224. </tr>
  225. <tr>
  226. <th><span class="fix">*</span>성별</th>
  227. <td>
  228. <!-- 성별 -->
  229. <label class="form-check form-check-inline">
  230. <input class="form-check-input" type="radio" name="gender" value="M" required>
  231. <span class="form-check-label">남</span>
  232. </label>
  233. <label class="form-check form-check-inline">
  234. <input class="form-check-input" type="radio" name="gender" value="F" required>
  235. <span class="form-check-label">여</span>
  236. </label>
  237. </td>
  238. <th><span class="fix">*</span>생년월일</th>
  239. <td>
  240. <!-- 생년월일 -->
  241. <div class="form-group calendar-bar mb-xl-0">
  242. <input type="text" class="form-control date-no-req jumin" id="jumin" name="jumin" autocomplete="off" placeholder="yyyy-mm-dd 형식으로 입력하세요" required>
  243. <i class="align-middle mr-2 fas fa-fw fa-calendar-alt"></i>
  244. </div>
  245. </td>
  246. </tr>
  247. <tr>
  248. <th><span class="fix">*</span>연락처</th>
  249. <td>
  250. <input type="text" name="patientPhone" class="form-control" placeholder="연락처를 입력해주세요" required>
  251. </td>
  252. <th>보호자 연락처</th>
  253. <td>
  254. <input type="text" name="guardianPhone" class="form-control" placeholder="보호자 연락처를 입력해주세요">
  255. </td>
  256. </tr>
  257. <tr>
  258. <th>증상시작일</th>
  259. <td>
  260. <div class="form-group calendar-bar mb-xl-0">
  261. <input class="form-control date-no-req" type="text" name="symptomStartDate" autocomplete="off">
  262. <i class="align-middle mr-2 fas fa-fw fa-calendar-alt"></i>
  263. </div>
  264. </td>
  265. <th><span class="fix">*</span>확진일</th>
  266. <td>
  267. <div class="form-group calendar-bar mb-xl-0">
  268. <input class="form-control date" type="text" name="confirmationDate" autocomplete="off">
  269. <i class="align-middle mr-2 fas fa-fw fa-calendar-alt"></i>
  270. </div>
  271. </td>
  272. </tr>
  273. <!-- 안보이도록처리 (신규등록 환자 상태는 무조건 입소, 빈값으로 submit) -->
  274. <tr class="d-none">
  275. <!-- <th>격리해제 예정일</th> -->
  276. <th>상태 변경일</br>(퇴소, 지정병원이송, 기타)</th>
  277. <td colspan="3">
  278. <div class="form-group calendar-bar mb-xl-0">
  279. <input class="form-control date-no-req" type="text" name="disisolationDate" autocomplete="off">
  280. <i class="align-middle mr-2 fas fa-fw fa-calendar-alt"></i>
  281. </div>
  282. </td>
  283. </tr>
  284. <tr>
  285. <th>최근약복용<br />(최근 24시간 이내)</th>
  286. <td>
  287. <label class="form-check form-check-inline">
  288. <input class="form-check-input" type="radio" value="N" name="drugYn" onclick="$('#drugContent').attr('readonly', true).val('');">
  289. <span class="form-check-label">미복용</span>
  290. </label>
  291. <label class="form-check form-check-inline">
  292. <input class="form-check-input" type="radio" value="Y" name="drugYn" onclick="$('#drugContent').removeAttr('readonly');">
  293. <span class="form-check-label">복용</span>
  294. </label>
  295. <label class="form-check form-check-inline">
  296. <input type="text" id="drugContent" class="form-control" name="drugContent" placeholder="약명을 입력하세요." readonly>
  297. </label>
  298. </td>
  299. <th>임신</th>
  300. <td>
  301. <label class="form-check form-check-inline">
  302. <input class="form-check-input" type="radio" name="pregnancyStatus" value="N">
  303. <span class="form-check-label">무</span>
  304. </label>
  305. <label class="form-check form-check-inline">
  306. <input class="form-check-input" type="radio" name="pregnancyStatus" value="Y">
  307. <span class="form-check-label">유</span>
  308. </label>
  309. <label class="form-check form-check-inline">
  310. <select class="custom-select" name="pregnancyWeek" id="pregnancyWeek" disabled>
  311. <option value="" selected="">임신 주차</option>
  312. <c:forEach var="p" begin="1" end="40" step="1">
  313. <option value="${p}">${p} 주</option>
  314. </c:forEach>
  315. </select>
  316. </label>
  317. </td>
  318. </tr>
  319. <tr>
  320. <th rowspan="4">기저질환 여부</th>
  321. <td colspan="3">
  322. <label class="form-check form-check-inline">
  323. <input class="form-check-input" type="radio" id="basalY" name="basalDiseaseYn" value="Y">
  324. <span class="form-check-label">예</span>
  325. </label>
  326. <label class="form-check form-check-inline">
  327. <input class="form-check-input" type="radio" id="basalN" name="basalDiseaseYn" value="N">
  328. <span class="form-check-label">아니오</span>
  329. </label>
  330. (예인 경우 하단의 기저질환을 선택하세요)
  331. </td>
  332. </tr>
  333. <tr>
  334. <td colspan="3" class="basalDisease">
  335. <label class="form-check form-check-inline">
  336. <input class="form-check-input" name="highBloodPressureCheck" type="checkbox" value="Y">
  337. <span class="form-check-label">고혈압</span>
  338. </label>
  339. <label class="form-check form-check-inline">
  340. <input class="form-check-input" name="lowBloodPressureCheck" type="checkbox" value="Y">
  341. <span class="form-check-label">저혈압</span>
  342. </label>
  343. <label class="form-check form-check-inline">
  344. <input class="form-check-input" name="organTransplantCheck" type="checkbox" value="Y">
  345. <span class="form-check-label">장기이식(신장, 간 등)</span>
  346. </label>
  347. <label class="form-check form-check-inline">
  348. <input class="form-check-input" name="diabetesCheck" type="checkbox" value="Y">
  349. <span class="form-check-label">당뇨병</span>
  350. </label>
  351. <label class="form-check form-check-inline">
  352. <input class="form-check-input" name="respiratoryDiseaseCheck" type="checkbox" value="Y">
  353. <span class="form-check-label">호흡기 질환</span>
  354. </label>
  355. <label class="form-check form-check-inline">
  356. <input class="form-check-input" name="immunologicalDiseaseCheck" type="checkbox" value="Y">
  357. <span class="form-check-label">면역질환(류마티스 등)</span>
  358. </label>
  359. </td>
  360. </tr>
  361. <tr>
  362. <td colspan="3" class="basalDisease">
  363. <label class="form-check form-check-inline">
  364. <input class="form-check-input" name="heartDisease" type="checkbox" value="Y">
  365. <span class="form-check-label">심장질환</span>
  366. </label>
  367. <label class="form-check form-check-inline">
  368. <input class="form-check-input" name="liverDisease" type="checkbox" value="Y">
  369. <span class="form-check-label">간질환</span>
  370. </label>
  371. <label class="form-check form-check-inline label-readonly-check">
  372. <input class="form-check-input" name="operation" type="checkbox" value="Y">
  373. <!-- ( <input type="text" id="operationContent" name="operationContent" class="form-control form-control-sm w150" name=""> ) -->
  374. <span class="form-check-label">수술</span>
  375. </label>
  376. <label class="form-check form-check-inline">
  377. <input class="form-check-input" name="allergyCheck" type="checkbox" value="Y">
  378. <span class="form-check-label">알레르기</span>
  379. </label>
  380. <label class="form-check form-check-inline">
  381. <input class="form-check-input" name="kidneyDisease" type="checkbox" value="Y">
  382. <span class="form-check-label">신장질환</span>
  383. </label>
  384. </td>
  385. </tr>
  386. <tr>
  387. <td colspan="3" class="basalDisease">
  388. <label class="form-check form-check-inline label-readonly-check">
  389. <input class="form-check-input" name="cancerCheck" type="checkbox" value="Y">
  390. <span class="form-check-label">암 ( <input type="text" name="cancerName" class="form-control form-control-sm w150"> )</span>
  391. </label>
  392. <label class="form-check form-check-inline label-readonly-check">
  393. <input class="form-check-input" name="etcCheckDisease" type="checkbox" value="Y">
  394. <span class="form-check-label">기타 ( <input type="text" name="etcContentDisease" class="form-control form-control-sm w150"> )</span>
  395. </label>
  396. </td>
  397. </tr>
  398. <!-- 현재 증상 (입소 당시) -->
  399. <tr>
  400. <th rowspan="3">현재 증상<br />(입소 당시)</th>
  401. <td colspan="3">
  402. <label class="form-check form-check-inline">
  403. <input class="form-check-input" name="feverCheck" type="checkbox" value="Y">
  404. <span class="form-check-label">열감(열나는 느낌)</span>
  405. </label>
  406. <label class="form-check form-check-inline">
  407. <input class="form-check-input" name="coughCheck" type="checkbox" value="Y">
  408. <span class="form-check-label">기침</span>
  409. </label>
  410. <label class="form-check form-check-inline">
  411. <input class="form-check-input" name="colic" type="checkbox" value="Y">
  412. <span class="form-check-label">복통(배아픔)</span>
  413. </label>
  414. <label class="form-check form-check-inline">
  415. <input class="form-check-input" name="coldFitCheck" type="checkbox" value="Y">
  416. <span class="form-check-label">오한(추운 느낌)</span>
  417. </label>
  418. <label class="form-check form-check-inline">
  419. <input class="form-check-input" name="sputumCheck" type="checkbox" value="Y">
  420. <span class="form-check-label">가래</span>
  421. </label>
  422. <label class="form-check form-check-inline">
  423. <input class="form-check-input" name="ocinCheck" type="checkbox" value="Y">
  424. <span class="form-check-label">오심(구역질)</span>
  425. </label>
  426. <label class="form-check form-check-inline">
  427. <input class="form-check-input" name="chestPain" type="checkbox" value="Y">
  428. <span class="form-check-label">흉통(가슴 통증)</span>
  429. </label>
  430. </td>
  431. </tr>
  432. <tr>
  433. <td colspan="3">
  434. <label class="form-check form-check-inline">
  435. <input class="form-check-input" name="noseCheck" type="checkbox" value="Y">
  436. <span class="form-check-label">콧물 또는 코 막힘</span>
  437. </label>
  438. <label class="form-check form-check-inline">
  439. <input class="form-check-input" name="vomitingCheck" type="checkbox" value="Y">
  440. <span class="form-check-label">구토</span>
  441. </label>
  442. <label class="form-check form-check-inline">
  443. <input class="form-check-input" name="musclePainCheck" type="checkbox" value="Y">
  444. <span class="form-check-label">근육통(몸살)</span>
  445. </label>
  446. <label class="form-check form-check-inline">
  447. <input class="form-check-input" name="soreThroatCheck" type="checkbox" value="Y">
  448. <span class="form-check-label">인후통(목 아픔)</span>
  449. </label>
  450. <label class="form-check form-check-inline">
  451. <input class="form-check-input" name="diarrheaCheck" type="checkbox" value="Y">
  452. <span class="form-check-label">설사</span>
  453. </label>
  454. <label class="form-check form-check-inline">
  455. <input class="form-check-input" name="headacheCheck" type="checkbox" value="Y">
  456. <span class="form-check-label">두통(머리아픔)</span>
  457. </label>
  458. <label class="form-check form-check-inline">
  459. <input class="form-check-input" name="dyspneaCheck" type="checkbox" value="Y">
  460. <span class="form-check-label">호흡곤란(숨가쁨)</span>
  461. </label>
  462. <label class="form-check form-check-inline">
  463. <input class="form-check-input" name="fatigueCheck" type="checkbox" value="Y">
  464. <span class="form-check-label">권태감(피곤함)</span>
  465. </label>
  466. </td>
  467. </tr>
  468. <tr>
  469. <td colspan="3">
  470. <label class="form-check form-check-inline label-readonly-check">
  471. <input class="form-check-input" name="etcCheckSymptom" type="checkbox" value="Y">
  472. <span class="form-check-label">기타 ( <input type="text" name="etcContentSymptom" class="form-control form-control-sm w150"> )</span>
  473. </label>
  474. </td>
  475. </tr>
  476. <tr>
  477. <th>체온</th>
  478. <td>우측 (<input type="text" class="form-control form-control-sm w50" name="feverRight">)℃ / 좌측 (<input type="text" class="form-control form-control-sm w50" name="feverLeft">)℃</td>
  479. <th>맥박수</th>
  480. <td>
  481. (<input type="text" class="form-control form-control-sm w50" name="pulseRate">) 회/분
  482. </td>
  483. </tr>
  484. <tr>
  485. <th>호흡수</th>
  486. <td>
  487. (<input type="text" class="form-control form-control-sm w50" name="respirationRate">) 회/분
  488. </td>
  489. <th>혈압</th>
  490. <td>수축기 (
  491. <input type="text" class="form-control form-control-sm w50" name="bloodPressureLevelCon">)mmHg
  492. / 이완기 (
  493. <input type="text" class="form-control form-control-sm w50" name="bloodPressureLevelRel">)mmHg
  494. </td>
  495. </tr>
  496. <tr>
  497. <th>산소포화도</th>
  498. <td colspan="3">
  499. (<input type="text" class="form-control form-control-sm w50" name="oxygenSaturation">) %
  500. </td>
  501. </tr>
  502. </table>
  503. <div class="row mt-3">
  504. <div class="col-12">
  505. <div class="text-right">
  506. <button type="button" class="btn btn-outline-primary w100" onclick="history.back();">취소</button>
  507. <button type="submit" class="btn btn-primary w100">등록</button>
  508. </div>
  509. </div>
  510. </div>
  511. </form>
  512. </c:if>
  513. </div>
  514. </div>
  515. </div>
  516. </div>
  517. <!-- 환자관리 : 신규환자 등록 END -->
  518. </div>
  519. </main>
  520. <jsp:include page="${data._INCLUDE}/footer.jsp"></jsp:include>
  521. </div>
  522. </div>
  523. </body>
  524. </html>