SMPIB02000_평생제한간질환정보관리.xrw 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
  3. <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2002/01/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
  4. <xhtml:head>
  5. <xhtml:title>평생제한간질환환자정보 관리</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <send>
  10. <pid/>
  11. <limflag/>
  12. <sex/>
  13. <minage/>
  14. <maxage/>
  15. <endflag/>
  16. <list1>
  17. <lpls/>
  18. </list1>
  19. </send>
  20. <main>
  21. <patinfo>
  22. <patinfolist/>
  23. </patinfo>
  24. <data1>
  25. <pid/>
  26. <limflag/>
  27. <fromdd/>
  28. <todd/>
  29. <remfact/>
  30. <patnm/>
  31. <sex/>
  32. <age/>
  33. </data1>
  34. <list1>
  35. <lpls>
  36. <chk/>
  37. <pid/>
  38. <patnm/>
  39. <sex/>
  40. <age/>
  41. <limflag/>
  42. <fromdd/>
  43. <todd/>
  44. <remfact/>
  45. <oldfromdd/>
  46. </lpls>
  47. </list1>
  48. </main>
  49. <hidden>
  50. <sppmc02500>
  51. <cond>
  52. <!-- SPPMC02500_환자조회 화면으로 검색조건을 보내는 경로임 -->
  53. <srchcond/>
  54. <pid/>
  55. <hngnm/>
  56. <rrgstno1/>
  57. <rrgstno2/>
  58. </cond>
  59. </sppmc02500>
  60. <appflag/>
  61. <data1>
  62. <patinfo>
  63. <pid/>
  64. <patnm/>
  65. <sex/>
  66. <age/>
  67. </patinfo>
  68. </data1>
  69. <approw/>
  70. <data2>
  71. <patinfo>
  72. <pid/>
  73. <fromdd/>
  74. </patinfo>
  75. </data2>
  76. </hidden>
  77. </root>
  78. </instance>
  79. <script type="javascript">
  80. <![CDATA[
  81. // 초기화
  82. function fInitialize()
  83. {
  84. // 조회 정보 초기화
  85. model.setValue("/root/send/pid", "");
  86. model.setValue("/root/send/limflag", "-");
  87. model.setValue("/root/send/sex", "-");
  88. model.setValue("/root/send/minage", "");
  89. model.setValue("/root/send/maxage", "");
  90. model.setValue("/root/send/endflag", "2");
  91. // 간질환 환자정보 초기화
  92. fInitPatInfo();
  93. // 입력, 수정, 삭제 flag
  94. model.setValue("/root/hidden/appflag", "I");
  95. model.setValue("/root/hidden/approw", 0);
  96. model.removenode("/root/main/list1");
  97. model.refresh();
  98. }
  99. // 간질환 환자정보 초기화
  100. function fInitPatInfo() {
  101. model.setValue("/root/main/data1/pid", "");
  102. model.setValue("/root/main/data1/limflag", "A");
  103. model.setValue("/root/main/data1/fromdd", getCurrentDate());
  104. model.setValue("/root/main/data1/todd", "99991231");
  105. model.setValue("/root/main/data1/remfact", "");
  106. model.setValue("/root/main/data1/patnm", "");
  107. model.setValue("/root/main/data1/sex", "");
  108. model.setValue("/root/main/data1/age", "");
  109. ipt_pid.disabled = false;
  110. //ipt_fromdd.disabled = false;
  111. }
  112. // 간질환 환자리스트 조회
  113. function fGetLimPreLivPatList() {
  114. fInitPatInfo();
  115. model.resetInstanceNode("/root/main/list1");
  116. submit("TRPIB02001");
  117. model.refresh();
  118. }
  119. // 간질환 환자정보 입력
  120. function fInsertLimPreLivPat() {
  121. // 데이터 검사(환자번호, 제한구분, 시작일자, 종료일자)
  122. var pid = model.getValue("/root/main/data1/pid");
  123. var limflag = model.getValue("/root/main/data1/limflag");
  124. var fromdd = model.getValue("/root/main/data1/fromdd");
  125. var todd = model.getValue("/root/main/data1/todd");
  126. var remfact = model.getValue("/root/main/data1/remfact");
  127. var patnm = model.getValue("/root/main/data1/patnm");
  128. var sex = model.getValue("/root/main/data1/sex");
  129. var age = model.getValue("/root/main/data1/age");
  130. if (pid == "") {
  131. messageBox("환자번호를","C001");
  132. return false;
  133. }
  134. if (limflag == "-") {
  135. messageBox("제한구분을","C002");
  136. return false;
  137. }
  138. if (fromdd > todd) {
  139. messageBox("시작일자가 종료일자 보다 이후", "E008");
  140. return false;
  141. }
  142. var appflag = model.getValue("/root/hidden/appflag");
  143. var approw = model.getValue("/root/hidden/approw");
  144. // 1. 신규 입력
  145. if (appflag == "I") {
  146. // 올바른 환자번호인지 체크
  147. if (fGetPatInfo()) {
  148. var patnm = model.getValue("/root/main/data1/patnm");
  149. var sex = model.getValue("/root/main/data1/sex");
  150. var age = model.getValue("/root/main/data1/age");
  151. // 그리드에 데이터 넣기
  152. grd_lplslist.AddRow();
  153. var add_row = grd_lplslist.row;
  154. model.setValue("/root/main/list1/lpls[" + add_row + "]/pid", pid);
  155. model.setValue("/root/main/list1/lpls[" + add_row + "]/limflag", limflag);
  156. model.setValue("/root/main/list1/lpls[" + add_row + "]/fromdd", fromdd);
  157. model.setValue("/root/main/list1/lpls[" + add_row + "]/todd", todd);
  158. model.setValue("/root/main/list1/lpls[" + add_row + "]/remfact", remfact);
  159. model.setValue("/root/main/list1/lpls[" + add_row + "]/patnm", patnm);
  160. model.setValue("/root/main/list1/lpls[" + add_row + "]/sex", sex);
  161. model.setValue("/root/main/list1/lpls[" + add_row + "]/age", age);
  162. //model.setValue("/root/main/list1/lpls[" + add_row + "]/oldfromdd", fromdd);
  163. // 그리드 정렬
  164. grd_lplslist.select(grd_lplslist.row, grd_lplslist.colRef("pid"), grd_lplslist.row, grd_lplslist.colRef("limflag")) = true;
  165. }
  166. // 2. 수정
  167. } else if (appflag == "U") {
  168. // 수정한 값 세팅
  169. grd_lplslist.valueMatrix(approw, grd_lplslist.colRef("chk")) = "false";
  170. grd_lplslist.valueMatrix(approw, grd_lplslist.colRef("pid")) = pid;
  171. grd_lplslist.valueMatrix(approw, grd_lplslist.colRef("patnm")) = patnm;
  172. grd_lplslist.valueMatrix(approw, grd_lplslist.colRef("sex")) = sex;
  173. grd_lplslist.valueMatrix(approw, grd_lplslist.colRef("age")) = age;
  174. grd_lplslist.valueMatrix(approw, grd_lplslist.colRef("limflag")) = limflag;
  175. grd_lplslist.valueMatrix(approw, grd_lplslist.colRef("fromdd")) = fromdd;
  176. grd_lplslist.valueMatrix(approw, grd_lplslist.colRef("todd")) = todd;
  177. grd_lplslist.valueMatrix(approw, grd_lplslist.colRef("remfact")) = remfact;
  178. // 그리드 상태 변경
  179. grd_lplslist.rowstatus(approw) = "2";
  180. // 입력 수정 상태 초기화
  181. model.setValue("/root/hidden/appflag", "I");
  182. model.setValue("/root/hidden/approw", 0);
  183. fInitPatInfo();
  184. model.refresh();
  185. }
  186. }
  187. // 간질환 환자정보 삭제
  188. function fDeleteLimPreLivPat() {
  189. // 멀티라인 삭제
  190. var rows = grd_lplslist.selectedRows;
  191. for (var i = 0; i < rows; i++) {
  192. var sel = grd_lplslist.selectedRow(i);
  193. grd_lplslist.rowstatus(sel) = 4;
  194. }
  195. }
  196. // 환자번호를 입력하기 전에 올바른 환자번호인지 검사한다.
  197. function fGetPatInfo() {
  198. // 데이터 검증
  199. var pid = model.getValue("/root/main/data1/pid");
  200. submit("TRPIB02002");
  201. if (pid == model.getValue("/root/hidden/data1/patinfo/pid")) {
  202. model.setValue("/root/main/data1/patnm", model.getValue("/root/hidden/data1/patinfo/patnm"));
  203. model.setValue("/root/main/data1/sex", model.getValue("/root/hidden/data1/patinfo/sex"));
  204. model.setValue("/root/main/data1/age", model.getValue("/root/hidden/data1/patinfo/age"));
  205. model.resetInstanceNode("/root/hidden/data1/patinfo");
  206. } else {
  207. // 올바르지 않은 환자번호 입니다.
  208. messageBox("올바르지 않은 환자번호", "E008");
  209. model.resetInstanceNode("/root/hidden/data1/patinfo");
  210. return false;
  211. }
  212. return true;
  213. }
  214. // 입력전에 기등록된 간질환 환자정보와 중복되는지 체크한다. (저장시에 일어나는 작업)
  215. function fCheckDuplicate() {
  216. // 1. 그리드 내에서 검사
  217. var row = grd_lplslist.rows;
  218. for(var i = 1; i < row; i++) {
  219. // 삭제된 row는 중복대상에서 제외
  220. if (grd_lplslist.rowstatus(i) != "4") {
  221. var newpid = model.getValue("/root/main/list1/lpls["+i+"]/pid");
  222. var newfromdd = model.getValue("/root/main/list1/lpls["+i+"]/fromdd");
  223. for(var j = 1; j < row; j++) {
  224. var oldpid = model.getValue("/root/main/list1/lpls["+j+"]/pid");
  225. var oldfromdd = model.getValue("/root/main/list1/lpls["+j+"]/fromdd");
  226. if (i != j && grd_lplslist.rowstatus(j) != "4" && newpid == oldpid && newfromdd == oldfromdd) {
  227. messageBox(i+"행과 "+j+"행은 중복된 간질환 환자정보", "E008");
  228. return false;
  229. }
  230. }
  231. }
  232. }
  233. // 2. DB에서 검사
  234. for(var k = 1; k < row; k++) {
  235. //if (grd_lplslist.rowstatus(k) == "1" || grd_lplslist.rowstatus(k) == "2") { // 변경안된 row나 삭제된 row는 필요없음
  236. if (grd_lplslist.rowstatus(k) == "1") { // 변경안된 row나 삭제된 row는 필요없음
  237. var pid = model.getValue("/root/main/list1/lpls["+k+"]/pid");
  238. var fromdd = model.getValue("/root/main/list1/lpls["+k+"]/fromdd");
  239. model.setValue("/root/main/data1/pid", pid);
  240. model.setValue("/root/main/data1/fromdd", fromdd);
  241. submit("TRPIB02003");
  242. if (pid == model.getValue("/root/hidden/data2/patinfo/pid")) {
  243. messageBox("이미 등록된 간질환 환자정보", "E008");
  244. return false;
  245. }
  246. }
  247. }
  248. return true;
  249. }
  250. // 입력전에 기등록된 간질환 환자정보와 중복되는지 체크한다. (저장시에 일어나는 작업)
  251. // function fCheckDuplicate(newpid, newfromdd) {
  252. //
  253. // // 1. 그리드 내에서 검사
  254. // var row = grd_lplslist.rows;
  255. // for(i = 1; i < row; i++) {
  256. // // 삭제된 row는 중복대상에서 제외
  257. // if (grd_lplslist.rowstatus(i) != "4") {
  258. // var oldpid = model.getValue("/root/main/list1/lpls["+i+"]/pid");
  259. // var oldfromdd = model.getValue("/root/main/list1/lpls["+i+"]/fromdd");
  260. //
  261. // if (newpid == oldpid && newfromdd == oldfromdd) {
  262. // messageBox("이미 등록된 간질환 환자정보", "E008");
  263. // return false;
  264. // }
  265. // }
  266. // }
  267. //
  268. // // 2. DB에서 검사
  269. // submit("TRPIB02003");
  270. // if (newpid == model.getValue("/root/hidden/data2/patinfo/pid")) {
  271. // messageBox("이미 등록된 간질환 환자정보", "E008");
  272. // return false;
  273. // }
  274. //
  275. // return true;
  276. // }
  277. // 저장
  278. function fSaveLimLivPatList() {
  279. // 1. 중복체크
  280. if (!fCheckDuplicate()) {
  281. fInitPatInfo();
  282. return;
  283. }
  284. // 2. 저장
  285. var rtn = window.alert("저장하시겠습니까?", "선택", "4");
  286. if (rtn != 6) return;
  287. model.removeNodeset("/root/send/list1");
  288. var updtdata = getGridUpdateData(grd_lplslist); // (tfHelper.js) 그리드 업데이트 데이터 반환, 업데이트 정보가 없을경우 "" 반환
  289. if (updtdata) {
  290. model.makeValue("/root/send/list1/lpls", updtdata);
  291. if(submit("TXPIB02001")) {
  292. fInitPatInfo();
  293. fGetLimPreLivPatList(); // 다시 조회
  294. messageBox("정상적으로 저장되었습니다.", "I999");
  295. } else {
  296. messageBox("예기치 않은 오류", "E008");
  297. }
  298. }
  299. }
  300. ]]>
  301. </script>
  302. <script type="javascript" ev:event="xforms-ready">
  303. <![CDATA[
  304. fInitialize();
  305. ]]>
  306. </script>
  307. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  308. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  309. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  310. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  311. <submission id="TRPIB02001" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/list1"/>
  312. <submission id="TRPIB02002" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/data1" resultref="/root/hidden/data1"/>
  313. <submission id="TXPIB02001" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/list1"/>
  314. <submission id="TRPIB02003" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/data1" resultref="/root/hidden/data2"/>
  315. </model>
  316. </xhtml:head>
  317. <xhtml:body guideline="1,1195;2,738;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  318. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  319. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:194px; height:14px; ">평생제한간질환 환자정보 관리</caption>
  320. </group>
  321. <group id="group3" scroll="auto" style="left:0px; top:13px; width:1195px; height:744px; ">
  322. <group id="group5" scroll="auto" style="left:0px; top:0px; width:1195px; height:744px; ">
  323. <group id="group6" style="left:0px; top:10px; width:1194px; height:35px; vertical-align:top; ">
  324. <shape id="roundrect3" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1194px; height:35px; "/>
  325. <caption id="caption21" class="search_name" style="left:16px; top:8px; width:86px; height:17px; ">환자번호 :</caption>
  326. <line id="line18" class="line_4" style="x1:1106px; y1:7px; x2:1106px; y2:29px; border-left-style:solid; "/>
  327. <caption id="caption11" class="search_name" style="left:250px; top:10px; width:86px; height:17px; ">제한구분 :</caption>
  328. <button id="btn_search" class="btn1_letter2" navindex="3" style="left:1122px; top:7px; width:56px; height:22px; ">
  329. <caption>조회</caption>
  330. <script type="javascript" ev:event="DOMActivate">
  331. <![CDATA[
  332. fGetLimPreLivPatList();
  333. ]]>
  334. </script>
  335. </button>
  336. <select1 id="cmb_srclimflag" ref="/root/send/limflag" class="combo_search" navindex="2" appearance="minimal" style="left:339px; top:8px; width:86px; height:19px; ">
  337. <choices>
  338. <item>
  339. <label>전체</label>
  340. <value>-</value>
  341. </item>
  342. <item>
  343. <label>투여량</label>
  344. <value>A</value>
  345. </item>
  346. <item>
  347. <label>일수</label>
  348. <value>B</value>
  349. </item>
  350. <item>
  351. <label>간이식</label>
  352. <value>C</value>
  353. </item>
  354. <item>
  355. <label>간염</label>
  356. <value>D</value>
  357. </item>
  358. </choices>
  359. </select1>
  360. <input id="ipt_srcpid" ref="/root/send/pid" class="input_search" navindex="1" maxlength="10" format="####" style="left:105px; top:8px; width:100px; height:19px; ">
  361. <script type="javascript" ev:event="onkeypress">
  362. <![CDATA[
  363. if (event.keyCode == "13") {
  364. // setInputNodeCurText(); // (tfHelper.js) 현재 인풋값 노드 반영
  365. // var pid = model.getValue("/root/send/pid");
  366. //
  367. // if (pid) {
  368. // // 1. pid가 유일한지 검사하여 팝업없이 조회처리 한다.
  369. //
  370. // // 2. 입력한 pid가 등록되어 있지 않은 경우, 환자조회 팝업을 띄운다.
  371. // model.setValue("/root/hidden/sppmc02500/cond/srchcond", "1"); // 검색조건 : 등록번호로 설정
  372. // model.setValue("/root/hidden/sppmc02500/cond/pid", pid);
  373. // modal("SPPMC02500", 1,150, 150, "SPPMC02500", "/root/hidden/sppmc02500/cond", "/root/send");
  374. // var srch_pid = model.getValue("/root/main/patinfo/patinfolist/pid");
  375. // if (srch_pid) { // SPPMC02500_환자조회 화면에서 조회한 경우임
  376. // model.removeNodeset("/root/main/patinfo/patinfolist");
  377. // model.makeNode("/root/main/patinfo/patinfolist");
  378. // model.setValue("/root/send/pid", srch_pid);
  379. // model.refresh();
  380. // }
  381. // }
  382. /*
  383. if (ipt_pid.currentText.length > 0) {
  384. model.setValue("/root/main/item1/otpt/pid", ipt_pid.currentText);
  385. //[2007.03.27] 직접 조회해 오는 방법에서 대상자리스트를 보여주는 것으로 변경함
  386. fGetOutDayJudgTrgtMan_v1();
  387. }
  388. */
  389. inputEnterKey("btn_srcpid", "DOMActivate");
  390. }
  391. ]]>
  392. </script>
  393. </input>
  394. <select1 id="cmb_sex" ref="/root/send/sex" class="combo_search" navindex="3" appearance="minimal" style="left:510px; top:8px; width:86px; height:19px; ">
  395. <choices>
  396. <item>
  397. <label>전체</label>
  398. <value>-</value>
  399. </item>
  400. <item>
  401. <label>남</label>
  402. <value>M</value>
  403. </item>
  404. <item>
  405. <label>여</label>
  406. <value>F</value>
  407. </item>
  408. </choices>
  409. </select1>
  410. <caption id="caption2" class="search_name" style="left:446px; top:10px; width:64px; height:17px; ">성별 :</caption>
  411. <caption id="caption3" class="search_name" style="left:615px; top:10px; width:64px; height:17px; ">나이 :</caption>
  412. <input id="ipt_minage" ref="/root/send/minage" class="input_search" navindex="4" maxlength="3" format="####" style="left:680px; top:8px; width:40px; height:19px; "/>
  413. <input id="ipt_maxage" ref="/root/send/maxage" class="input_search" navindex="5" maxlength="3" format="####" style="left:755px; top:8px; width:40px; height:19px; "/>
  414. <caption id="caption4" style="left:723px; top:10px; width:35px; height:20px; ">이상</caption>
  415. <caption id="caption5" style="left:798px; top:10px; width:35px; height:20px; ">이하</caption>
  416. </group>
  417. <line id="line17" class="line_2" style="x1:0px; y1:104px; x2:1194px; y2:104px; "/>
  418. <caption id="caption22" class="tit_2" style="left:5px; top:60px; width:165px; height:13px; ">평생제한간질환 환자정보</caption>
  419. <line id="line19" class="line_1" style="x1:0px; y1:75px; x2:1194px; y2:75px; "/>
  420. <caption id="caption23" class="cell_1" style="left:0px; top:80px; width:145px; height:23px; text-align:center; ">환자번호</caption>
  421. <caption id="caption34" class="cell_1" style="left:300px; top:80px; width:145px; height:23px; text-align:center; ">제한구분</caption>
  422. <caption id="caption37" class="cell_1" style="left:0px; top:105px; width:145px; height:23px; text-align:center; ">참고사항</caption>
  423. <caption id="caption42" class="cell_1" style="left:926px; top:80px; width:145px; height:23px; text-align:center; ">종료일자</caption>
  424. <caption id="caption48" class="tit_2" style="left:5px; top:141px; width:188px; height:13px; ">평생제한간질환 환자 리스트</caption>
  425. <line id="line20" class="line_1" style="x1:0px; y1:156px; x2:1194px; y2:156px; "/>
  426. <datagrid id="grd_lplslist" nodeset="/root/main/list1/lpls" caption="^환자번호^환자명^성별^나이^제한구분^시작일자^종료일자^참고사항^oldfromdd^특례명칭" colsep="^" colwidth="0, 67, 48, 40, 40, 56, 100, 100, 685, 0" dataheight="23" ellipsis="true" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:0px; top:161px; width:1194px; height:544px; ">
  427. <col ref="chk" type="checkbox" default="false"/>
  428. <col ref="pid"/>
  429. <col ref="patnm" style="text-align:center; "/>
  430. <col disabled="true" ref="sex" type="combo" style="text-align:center; ">
  431. <choices>
  432. <item>
  433. <label>남</label>
  434. <value>M</value>
  435. </item>
  436. <item>
  437. <label>여</label>
  438. <value>F</value>
  439. </item>
  440. </choices>
  441. </col>
  442. <col ref="age" style="text-align:center; "/>
  443. <col disabled="true" ref="limflag" type="combo">
  444. <choices>
  445. <item>
  446. <label>투여량</label>
  447. <value>A</value>
  448. </item>
  449. <item>
  450. <label>일수</label>
  451. <value>B</value>
  452. </item>
  453. <item>
  454. <label>간이식</label>
  455. <value>C</value>
  456. </item>
  457. <item>
  458. <label>간염</label>
  459. <value>D</value>
  460. </item>
  461. </choices>
  462. </col>
  463. <col ref="fromdd" type="inputdate" format="yyyy-mm-dd" style="text-align:center; "/>
  464. <col ref="todd" type="inputdate" format="yyyy-mm-dd" style="text-align:center; "/>
  465. <col ref="remfact"/>
  466. <col ref="oldfromdd"/>
  467. <script type="javascript" ev:event="ondblclick">
  468. <![CDATA[
  469. if (grd_lplslist.isCell(event.target)) {
  470. // 수정하기 위해 그리드의 한 row 를 클릭한다.
  471. var cur_row = grd_lplslist.row;
  472. var status = grd_lplslist.rowstatus(cur_row);
  473. if (status == "0" || status == "2") {
  474. model.setValue("/root/main/data1/pid", grd_lplslist.valueMatrix(cur_row, grd_lplslist.colRef("pid")));
  475. model.setValue("/root/main/data1/patnm", grd_lplslist.valueMatrix(cur_row, grd_lplslist.colRef("patnm")));
  476. model.setValue("/root/main/data1/sex", grd_lplslist.valueMatrix(cur_row, grd_lplslist.colRef("sex")));
  477. model.setValue("/root/main/data1/age", grd_lplslist.valueMatrix(cur_row, grd_lplslist.colRef("age")));
  478. model.setValue("/root/main/data1/limflag", grd_lplslist.valueMatrix(cur_row, grd_lplslist.colRef("limflag")));
  479. model.setValue("/root/main/data1/fromdd", grd_lplslist.valueMatrix(cur_row, grd_lplslist.colRef("fromdd")));
  480. model.setValue("/root/main/data1/todd", grd_lplslist.valueMatrix(cur_row, grd_lplslist.colRef("todd")));
  481. model.setValue("/root/main/data1/remfact", grd_lplslist.valueMatrix(cur_row, grd_lplslist.colRef("remfact")));
  482. model.setValue("/root/hidden/appflag", "U");
  483. model.setValue("/root/hidden/approw", cur_row);
  484. // 환자번호는 변경 불가
  485. ipt_pid.disabled = true;
  486. //ipt_fromdd.disabled = true;
  487. model.refresh();
  488. }
  489. }
  490. ]]>
  491. </script>
  492. <script type="javascript" ev:event="xforms-value-changed">
  493. <![CDATA[
  494. // // 시작일을 변경했을 때, 해당 환자의 수정된 시작일에 이미 평생제한 간질환 정보가 있는지 체크해서 있으면 수정할 수 없도록 한다.
  495. // var col = grd_lplslist.col;
  496. // if (col == grd_lplslist.colRef("fromdd")) { // 시작일 필드값이 변경일어나면
  497. // // 중복체크 후 수정상태로 바꿈
  498. // var newpid = grd_lplslist.valueMatrix(grd_lplslist.row,grd_lplslist.colRef("pid"));
  499. // var newfromdd = grd_lplslist.valueMatrix(grd_lplslist.row,grd_lplslist.colRef("fromdd"));
  500. // if (!fCheckDuplicate(newpid, newfromdd)) {
  501. // // 중복이므로 이전상태로 되돌림
  502. // grd_lplslist.rowstatus(grd_lplslist
  503. // }
  504. // }
  505. ]]>
  506. </script>
  507. </datagrid>
  508. <line id="line24" class="line_3" style="x1:0px; y1:128px; x2:1194px; y2:128px; "/>
  509. <button id="btn_save" class="btn4_letter2" navindex="11" style="left:1067px; top:715px; width:56px; height:22px; ">
  510. <caption>저장</caption>
  511. <script type="javascript" ev:event="DOMActivate">
  512. <![CDATA[
  513. var isChanged = false;
  514. for (var i = 1; i < grd_lplslist.rows; i++) {
  515. var status = grd_lplslist.rowstatus(i);
  516. if (status != "0") {
  517. isChanged = true; // 변경사항이 있음
  518. i = grd_lplslist.rows;
  519. }
  520. }
  521. if (isChanged) {
  522. fSaveLimLivPatList();
  523. }
  524. ]]>
  525. </script>
  526. </button>
  527. <button id="btn_init" class="btn4_letter3" navindex="12" style="left:1127px; top:715px; width:68px; height:22px; ">
  528. <caption>초기화</caption>
  529. <script type="javascript" ev:event="DOMActivate">
  530. <![CDATA[
  531. fInitialize();
  532. ]]>
  533. </script>
  534. </button>
  535. <caption id="caption1" class="cell_1" style="left:655px; top:80px; width:145px; height:23px; text-align:center; ">시작일자</caption>
  536. <button id="btn_srcpid" class="icon_search" navindex="10" style="left:212px; top:21px; width:16px; height:16px; ">
  537. <caption/>
  538. <script type="javascript" ev:event="DOMActivate">
  539. <![CDATA[
  540. var pid = model.getValue("/root/send/pid");
  541. if (pid) {
  542. model.setValue("/root/hidden/sppmc02500/cond/srchcond", "1"); // 검색조건 : 등록번호로 설정
  543. model.setValue("/root/hidden/sppmc02500/cond/pid", pid);
  544. } else {
  545. model.resetInstanceNode("/root/hidden/sppmc02500/cond");
  546. }
  547. modal("SPPMC02500", 1,150, 150, "SPPMC02500", "/root/hidden/sppmc02500/cond", "/root/send", "", "");
  548. var srch_pid = model.getValue("/root/main/patinfo/patinfolist/pid");
  549. if (srch_pid) { // SPPMC02500_환자조회 화면에서 조회한 경우임
  550. model.removeNodeset("/root/main/patinfo/patinfolist");
  551. model.makeNode("/root/main/patinfo/patinfolist");
  552. model.setValue("/root/send/pid", srch_pid);
  553. model.refresh();
  554. }
  555. ]]>
  556. </script>
  557. </button>
  558. <button id="btn_srcpid2" class="icon_search" navindex="5" style="left:279px; top:82px; width:16px; height:16px; ">
  559. <caption/>
  560. <script type="javascript" ev:event="DOMActivate">
  561. <![CDATA[
  562. var pid = model.getValue("/root/main/data1/pid");
  563. if (pid) {
  564. model.setValue("/root/hidden/sppmc02500/cond/srchcond", "1"); // 검색조건 : 등록번호로 설정
  565. model.setValue("/root/hidden/sppmc02500/cond/pid", pid);
  566. } else {
  567. model.resetInstanceNode("/root/hidden/sppmc02500/cond");
  568. }
  569. modal("SPPMC02500", 1,150, 150, "SPPMC02500", "/root/hidden/sppmc02500/cond", "/root/send", "", "");
  570. var srch_pid = model.getValue("/root/main/patinfo/patinfolist/pid");
  571. var patnm = model.getValue("/root/main/patinfo/patinfolist/hngnm");
  572. var sex = model.getValue("/root/main/patinfo/patinfolist/sex");
  573. var age = model.getValue("/root/main/patinfo/patinfolist/age");
  574. if (srch_pid) { // SPPMC02500_환자조회 화면에서 조회한 경우임
  575. model.removeNodeset("/root/main/patinfo/patinfolist");
  576. model.makeNode("/root/main/patinfo/patinfolist");
  577. model.setValue("/root/main/data1/pid", srch_pid);
  578. model.setValue("/root/main/data1/patnm", patnm);
  579. model.setValue("/root/main/data1/sex", sex);
  580. model.setValue("/root/main/data1/age", age);
  581. model.refresh();
  582. }
  583. ]]>
  584. </script>
  585. </button>
  586. <button id="btn_modify" class="btn2_letter2" visibility="hidden" style="left:1100px; top:53px; width:42px; height:19px; ">
  587. <caption>수정</caption>
  588. </button>
  589. <button id="btn_delete" class="btn2_letter2" visibility="visible" style="left:1145px; top:134px; width:42px; height:19px; ">
  590. <caption>삭제</caption>
  591. <script type="javascript" ev:event="DOMActivate">
  592. <![CDATA[
  593. fDeleteLimPreLivPat();
  594. ]]>
  595. </script>
  596. </button>
  597. <button id="btn_insert" class="btn2_letter2" visibility="hidden" style="left:1055px; top:53px; width:42px; height:19px; ">
  598. <caption>입력</caption>
  599. <script type="javascript" ev:event="DOMActivate">
  600. <![CDATA[
  601. fInsertLimPreLivPat();
  602. ]]>
  603. </script>
  604. </button>
  605. <input id="ipt_fromdd" ref="/root/main/data1/fromdd" class="input_essential" navindex="7" inputtype="date" style="left:802px; top:81px; width:120px; height:19px; ">
  606. <script type="javascript" ev:event="onkeypress">
  607. <![CDATA[
  608. if (event.keyCode == "13") {
  609. //setInputNodeCurText(); // (tfHelper.js) 현재 인풋값 노드 반영
  610. fInsertLimPreLivPat();
  611. }
  612. ]]>
  613. </script>
  614. </input>
  615. <select1 id="cmb_limflag" ref="/root/main/data1/limflag" class="combo_essential" navindex="6" appearance="minimal" style="left:447px; top:81px; width:203px; height:19px; ">
  616. <choices>
  617. <item>
  618. <label>투여량</label>
  619. <value>A</value>
  620. </item>
  621. <item>
  622. <label>일수</label>
  623. <value>B</value>
  624. </item>
  625. <item>
  626. <label>간이식</label>
  627. <value>C</value>
  628. </item>
  629. <item>
  630. <label>간염</label>
  631. <value>D</value>
  632. </item>
  633. </choices>
  634. <script type="javascript" ev:event="onkeypress">
  635. <![CDATA[
  636. if (event.keyCode == "13") {
  637. //setInputNodeCurText(); // (tfHelper.js) 현재 인풋값 노드 반영
  638. fInsertLimPreLivPat();
  639. }
  640. ]]>
  641. </script>
  642. </select1>
  643. <input id="ipt_pid" ref="/root/main/data1/pid" class="input_essential" navindex="4" maxlength="10" format="####" style="left:147px; top:81px; width:126px; height:19px; ">
  644. <script type="javascript" ev:event="onkeypress">
  645. <![CDATA[
  646. if (event.keyCode == "13") {
  647. setInputNodeCurText(); // (tfHelper.js) 현재 인풋값 노드 반영
  648. fInsertLimPreLivPat();
  649. //inputEnterKey("btn_srcpid2", "DOMActivate");
  650. }
  651. ]]>
  652. </script>
  653. </input>
  654. <input id="ipt_todd" ref="/root/main/data1/todd" class="input_essential" navindex="8" inputtype="date" style="left:1074px; top:81px; width:120px; height:19px; ">
  655. <script type="javascript" ev:event="onkeypress">
  656. <![CDATA[
  657. if (event.keyCode == "13") {
  658. setInputNodeCurText(); // (tfHelper.js) 현재 인풋값 노드 반영
  659. fInsertLimPreLivPat();
  660. }
  661. ]]>
  662. </script>
  663. </input>
  664. <input id="ipt_remfact" ref="/root/main/data1/remfact" class="input_essential" navindex="9" style="left:147px; top:107px; width:1047px; height:19px; ">
  665. <script type="javascript" ev:event="onkeypress">
  666. <![CDATA[
  667. if (event.keyCode == "13") {
  668. setInputNodeCurText(); // (tfHelper.js) 현재 인풋값 노드 반영
  669. fInsertLimPreLivPat();
  670. }
  671. ]]>
  672. </script>
  673. </input>
  674. <select1 id="cmb_endflag" ref="/root/send/endflag" appearance="full" cellspacing="5" cols="2" overflow="visible" style="left:929px; top:19px; width:110px; height:19px; ">
  675. <choices>
  676. <item>
  677. <label>포함</label>
  678. <value>1</value>
  679. </item>
  680. <item>
  681. <label>미포함</label>
  682. <value>2</value>
  683. </item>
  684. </choices>
  685. </select1>
  686. <caption id="caption13" class="search_name" style="left:840px; top:20px; width:90px; height:17px; ">종료여부 :</caption>
  687. </group>
  688. </group>
  689. </xhtml:body>
  690. </xhtml:html>