SMADB01600_TDM기준정보.xrw 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/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>TDM 기준정보</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <tdmlist>
  11. <item>
  12. <testcd/>
  13. <testnm/>
  14. <testcdseq/>
  15. <ioflag/>
  16. <t12val/>
  17. <vdval/>
  18. <kmval/>
  19. <vmaxval/>
  20. <clrc/>
  21. <blodconcen/>
  22. <tdmyn/>
  23. <cond/>
  24. <trgh/>
  25. <peak/>
  26. <instcd/>
  27. </item>
  28. </tdmlist>
  29. </main>
  30. <send>
  31. <req>
  32. <data1>
  33. </data1>
  34. </req>
  35. <srchtestcd/>
  36. <srchdrugcd/>
  37. <srchtclscd/>
  38. <srchtestnm/>
  39. </send>
  40. <init>
  41. <testitem>
  42. <testcd/>
  43. <testnm/>
  44. </testitem>
  45. <drugitem>
  46. <drugcd/>
  47. <drugnm/>
  48. </drugitem>
  49. </init>
  50. <hidden>
  51. <count/>
  52. <item>
  53. <testcd/>
  54. <instcd/>
  55. <t12val/>
  56. <vdval/>
  57. <kmval/>
  58. <vmaxval/>
  59. <clrc/>
  60. <blodconcen/>
  61. <tdmyn/>
  62. <cond/>
  63. <trgh/>
  64. <peak/>
  65. </item>
  66. </hidden>
  67. <temp>
  68. <testinfo>
  69. <testcd/>
  70. <testnm/>
  71. </testinfo>
  72. <receivedata>
  73. <receiveref>/root/temp/receivedata/drugcd</receiveref>
  74. <drugcd/>
  75. </receivedata>
  76. </temp>
  77. </root>
  78. </instance>
  79. <script type="javascript" ev:event="xforms-ready">
  80. <![CDATA[
  81. // 권한 관리
  82. btn_save.disabled =! checkAuth("X"); // 저장
  83. model.removenode("/root/main/tdmlist/item");
  84. model.setValue("/root/send/srchtestcd",model.getValue("/root/send/srchtestcd"));
  85. submit("TRADB01601");
  86. ]]>
  87. </script>
  88. <submission id="TRADB02604" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/init/drugitem"/>
  89. <submission id="TRADB01602" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchtclscd" replace="instance" resultref="/root/init/testitem"/>
  90. <submission id="TRADB01601" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/tdmlist"/>
  91. <submission id="TXADB01601" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/req" replace="instance" resultref="/root/hidden"/>
  92. </model>
  93. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  94. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  95. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  96. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  97. <script type="javascript" src="../../../ast/commonweb/js/AST.js"/>
  98. </xhtml:head>
  99. <xhtml:body guideline="1,1194;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  100. <group id="group1" style="left:0px; top:0px; width:1194px; height:13px; ">
  101. <caption id="caption19" class="tit_1" style="left:0px; top:0px; width:208px; height:14px; ">TDM 기준정보</caption>
  102. </group>
  103. <group id="group3" scroll="auto" style="left:0px; top:36px; width:1195px; height:744px; ">
  104. <group id="group2" style="left:0px; top:5px; width:1194px; height:40px; ">
  105. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1194px; height:40px; background-color:#fffbf2; border-color:#ffd799; ">ㅇ</shape>
  106. <line id="line13" style="x1:1110px; y1:5px; x2:1110px; y2:35px; border-color:#ffe4bb; border-left-style:solid; "/>
  107. <caption id="caption2" class="search_name" style="left:20px; top:10px; width:91px; height:17px; ">검사코드 :</caption>
  108. <input id="ipt_srchtestcd" ref="/root/send/srchtestcd" class="input_search" style="left:110px; top:10px; width:140px; height:19px; ">
  109. <script type="javascript" ev:event="onkeypress">
  110. <![CDATA[
  111. inputEnterKey("btn_sea", "DOMActivate");
  112. ]]>
  113. </script>
  114. </input>
  115. <output id="opt_search" ref="/root/send/srchtestnm" class="output_search" style="left:280px; top:10px; width:330px; height:19px; "/>
  116. <button id="btn_sea" class="btn1_letter2" style="left:1125px; top:10px; width:56px; height:22px; ">
  117. <caption>조회</caption>
  118. <script type="javascript" ev:event="DOMActivate">
  119. <![CDATA[
  120. model.setValue("/root/send/srchtestcd",model.getValue("/root/send/srchtestcd"));
  121. var success = submit("TRADB01601", false);
  122. // 수정데이터는 검사코드, 약코드 수정안됨
  123. //if (success == false) return;
  124. //for (var i=1; i<grd_tdmlist.rows; i++) {
  125. // grd_tdmlist.isreadonly(i, 1) = true;
  126. // grd_tdmlist.isreadonly(i, 3) = true;
  127. //}
  128. model.setValue("/root/send/srchtestcd","");
  129. model.setValue("/root/send/srchtestnm","");
  130. model.refresh();
  131. ]]>
  132. </script>
  133. </button>
  134. <button id="btn_srch" class="icon_search" style="left:257px; top:10px; width:16px; height:16px; ">
  135. <caption/>
  136. <script type="javascript" ev:event="DOMActivate">
  137. <![CDATA[
  138. var testcd = "";
  139. var testnm = "";
  140. //검사조회
  141. modal("SPADB62200",0,200,200,"SPADB62200","","");
  142. testcd = model.getValue("/root/temp/testinfo/testcd");
  143. testnm = model.getValue("/root/temp/testinfo/testnm");
  144. model.setValue("/root/send/srchtestcd",testcd);
  145. model.setValue("/root/send/srchtestnm",testnm);
  146. model.refresh();
  147. ]]>
  148. </script>
  149. </button>
  150. </group>
  151. <button id="btn_grdcopy" class="btn2_letter3" style="left:1010px; top:50px; width:53px; height:19px; ">
  152. <caption>행복사</caption>
  153. <script type="javascript" ev:event="DOMActivate">
  154. <![CDATA[
  155. var grdrow = grd_tdmlist.row;
  156. model.copyNode("/root/hidden/item","/root/main/tdmlist/item["+ grdrow +"]");
  157. grd_tdmlist.insertItem(grdrow);
  158. model.copyNode("/root/main/tdmlist/item["+ grdrow +"]","/root/hidden/item");
  159. model.refresh();
  160. ]]>
  161. </script>
  162. </button>
  163. <datagrid id="grd_tdmlist" nodeset="/root/main/tdmlist/item" class="datagrid2" backcoloralternate="#f0f0f0" caption="검사코드^검사명^일련번호^입원/외래^T1/2^Vd^Km^VMax^Clearance^혈중농도^약물농도&#xA;측정여부^조건^치료(Trough)범위^치료(Peak)범위" colsep="^" colwidth="81, 200, 57, 60, 57, 57, 57, 64, 65, 56, 61, 38, 152, 125" explorerbar="sortshow" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:0px; top:75px; width:1194px; height:668px; ">
  164. <col ref="testcd" type="inputbutton" _key="true"/>
  165. <col ref="testnm" _key="true"/>
  166. <col ref="testcdseq" type="input" _key="true" style="text-align:center; "/>
  167. <col ref="ioflag" type="combo" _key="true" style="text-align:center; ">
  168. <choices>
  169. <item>
  170. <label>입원</label>
  171. <value>I</value>
  172. </item>
  173. <item>
  174. <label>외래</label>
  175. <value>O</value>
  176. </item>
  177. </choices>
  178. </col>
  179. <col ref="t12val" type="input" maxlength="20" style="text-align:center; "/>
  180. <col ref="vdval" type="input" maxlength="20" style="text-align:center; "/>
  181. <col ref="kmval" type="input" maxlength="20" style="text-align:center; "/>
  182. <col ref="vmaxval" type="input" maxlength="20" style="text-align:center; "/>
  183. <col ref="clrc" type="input" maxlength="20" style="text-align:center; "/>
  184. <col ref="blodconcen" type="input" maxlength="20" style="text-align:center; "/>
  185. <col ref="tdmyn" type="checkbox"/>
  186. <col ref="cond" type="input" maxlength="20" style="text-align:center; "/>
  187. <col ref="trgh" type="input" maxlength="20" style="text-align:center; "/>
  188. <col ref="peak" type="input" maxlength="20" style="text-align:center; "/>
  189. <script type="javascript" ev:event="onbuttonclick">
  190. <![CDATA[
  191. var instcd = "";
  192. var testcd = "";
  193. var testnm = "";
  194. var drugcode = "";
  195. var grdcol = grd_tdmlist.col;
  196. var grdrow = grd_tdmlist.row;
  197. if (grdrow < 1) return;
  198. // 입력상태에서만 검색가능(기관코드 있으면 입력상태로 간주)
  199. instcd = model.getValue("/root/main/tdmlist/item["+grd_tdmlist.row+"]/instcd");
  200. if (instcd != "") return;
  201. if (grdcol == 1) {
  202. modal("SPADB62200",0,200,200,"SPADB62200","","");
  203. testcd = model.getValue("/root/temp/testinfo/testcd");
  204. testnm = model.getValue("/root/temp/testinfo/testnm");
  205. model.setValue("/root/main/tdmlist/item["+grd_tdmlist.row+"]/testcd",testcd);
  206. model.setValue("/root/main/tdmlist/item["+grd_tdmlist.row+"]/testnm",testnm);
  207. model.refresh();
  208. // } else if (grdcol == 3) {
  209. // modal("SPADB60100",0,100,150,"SPADB60100","/root/temp/receivedata","/root/temp/receivedata");
  210. // drugcode = model.getValue("/root/temp/receivedata/drugcd");
  211. // model.setValue("/root/main/tdmlist/item["+grd_tdmlist.row+"]/drugcd",drugcode);
  212. //
  213. // if (drugcode != "") {
  214. // model.setValue("/root/send/srchdrugcd",drugcode);
  215. // submit("TRADB02604",false);
  216. // model.setValue("/root/main/tdmlist/item["+grd_tdmlist.row+"]/drugnm",model.getValue("/root/init/drugitem/drugnm"));
  217. // model.refresh();
  218. // }
  219. } else if (grdcol == 11) {
  220. if (model.getValue("/root/main/tdmlist/item["+grd_tdmlist.row+"]/tdmyn")=="true") {
  221. model.setValue("/root/main/tdmlist/item["+grd_tdmlist.row+"]/tdmyn","Y");
  222. } else {
  223. model.setValue("/root/main/tdmlist/item["+grd_tdmlist.row+"]/tdmyn","N");
  224. }
  225. }
  226. ]]>
  227. </script>
  228. <script type="javascript" ev:event="onkeypress">
  229. <![CDATA[
  230. var grdrow= grd_tdmlist.row;
  231. var grdcol = grd_tdmlist.col;
  232. var srchtestcd = "";
  233. var srchdrugcd = "";
  234. if(event.keyCode == "13") {
  235. if (grdcol == 1) {
  236. srchtestcd = model.getValue("/root/main/tdmlist/item["+grd_tdmlist.row+"]/testcd");
  237. if (srchtestcd == "") {
  238. messageBox("검사코드를", "C001");
  239. }
  240. model.setValue("/root/send/srchtclscd",srchtestcd);
  241. submit("TRADB01602",false);
  242. model.setValue("/root/main/tdmlist/item["+grd_tdmlist.row+"]/testcd" ,model.getValue("/root/init/testitem/testcd") );
  243. model.setValue("/root/main/tdmlist/item["+grd_tdmlist.row+"]/testnm" ,model.getValue("/root/init/testitem/testnm") );
  244. model.refresh();
  245. }
  246. }
  247. ]]>
  248. </script>
  249. <script type="javascript" ev:event="onendedit">
  250. <![CDATA[
  251. var testcd = "" ;
  252. var testcdseq = "" ;
  253. var new_testcd = model.getValue("/root/main/tdmlist/item["+grd_tdmlist.row+"]/testcd");
  254. var new_testcdseq = model.getValue("/root/main/tdmlist/item["+grd_tdmlist.row+"]/testcdseq");
  255. for (var i=1; i<grd_tdmlist.rows; i++) {
  256. testcd = model.getValue("/root/main/tdmlist/item["+i+"]/testcd");
  257. testcdseq = model.getValue("/root/main/tdmlist/item["+i+"]/testcdseq");
  258. if ((new_testcd == testcd ) && (grd_tdmlist.row != i ) ) {
  259. if (new_testcdseq == testcdseq) {
  260. alert ("[ " + testcd + " ] 코드에 동일 일련번호 [" + testcdseq + "]가 발생되었습니다. 확인하여 주시기 바랍니다.");
  261. model.setValue("/root/main/tdmlist/item["+grd_tdmlist.row+"]/testcdseq","");
  262. model.refresh();
  263. return;
  264. }
  265. }
  266. }
  267. ]]>
  268. </script>
  269. </datagrid>
  270. <button id="btn_grdadd" class="btn2_letter3" style="left:952px; top:50px; width:53px; height:19px; ">
  271. <caption>행추가</caption>
  272. <script type="javascript" ev:event="DOMActivate">
  273. <![CDATA[
  274. grd_tdmlist.addItem();
  275. ]]>
  276. </script>
  277. </button>
  278. <button id="btn_grddel" class="btn2_letter3" style="left:1068px; top:50px; width:53px; height:19px; ">
  279. <caption>행삭제</caption>
  280. <script type="javascript" ev:event="DOMActivate">
  281. <![CDATA[
  282. grd_tdmlist.addStatus(grd_tdmlist.row,"delete");
  283. ]]>
  284. </script>
  285. </button>
  286. <button id="btn_excsave" class="btn2_letter4" style="left:1126px; top:50px; width:64px; height:19px; ">
  287. <caption>엑셀저장</caption>
  288. <script type="javascript" ev:event="DOMActivate">
  289. <![CDATA[
  290. var file = window.fileDialog("save","","false","","xls","Excel Files(*.xls)|*.xls");
  291. grd_tdmlist.saveExcel(file);
  292. ]]>
  293. </script>
  294. </button>
  295. <caption id="caption10" class="tit_2" style="left:1px; top:55px; width:103px; height:13px; ">TDM 기준정보</caption>
  296. <line id="line2" class="line_1" style="x1:0px; y1:70px; x2:1194px; y2:70px; "/>
  297. </group>
  298. <group id="group5" scroll="auto" style="left:0px; top:13px; width:1195px; height:27px; ">
  299. <button id="btn_save" class="btn4_letter2" style="left:1135px; top:3px; width:56px; height:22px; ">
  300. <caption>저장</caption>
  301. <script type="javascript" ev:event="DOMActivate">
  302. <![CDATA[
  303. var tdmyn = "";
  304. var nodeList = instance1.selectNodes("/root/main/tdmlist/item");
  305. var updtdata = getGridUpdateData(grd_tdmlist);
  306. // 변경사항체크
  307. if (updtdata == "" ) {
  308. messageBox("변경된 데이터가","I004");
  309. return;
  310. }
  311. // 필수사항체크
  312. if (checkKeyColumn("grd_tdmlist") == false) return;
  313. for (var i=1; i<grd_tdmlist.rows; i++) {
  314. tdmyn = model.getValue("/root/main/tdmlist/item["+i+"]/tdmyn");
  315. if (tdmyn == "true") {
  316. model.setValue("/root/main/tdmlist/item["+i+"]/tdmyn","Y");
  317. } else {
  318. model.setValue("/root/main/tdmlist/item["+i+"]/tdmyn","N");
  319. }
  320. }
  321. model.setValue( "/root/send/req/data1", grd_tdmlist.getUpdateData());
  322. submit("TXADB01601");
  323. submit("TRADB01601");
  324. ]]>
  325. </script>
  326. </button>
  327. </group>
  328. </xhtml:body>
  329. </xhtml:html>