SMMMD08600_제한항생제신청승인내역.xrw 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571
  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>제한항생제 신청조회</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <cond>
  11. <pid/>
  12. <hngnm/>
  13. <fromdd/>
  14. <todd/>
  15. <orddeptcd/>
  16. <aprvstat>0</aprvstat>
  17. <wardcd/>
  18. <prcphistcd/>
  19. <borrowyn>-</borrowyn>
  20. <prcpcd/>
  21. </cond>
  22. <limantibioinfo>
  23. <limantibiolist/>
  24. </limantibioinfo>
  25. <patinfo>
  26. <patinfolist/>
  27. </patinfo>
  28. <borrowresn>
  29. <resncd/>
  30. <resncnt/>
  31. </borrowresn>
  32. </main>
  33. <send>
  34. <reqdata/>
  35. <savedata/>
  36. </send>
  37. <init>
  38. <orddept/>
  39. <warddeptlist/>
  40. <appresninfo>
  41. <resnlist>
  42. <resnnm>무균병동</resnnm>
  43. <resncd>1</resncd>
  44. </resnlist>
  45. <resnlist>
  46. <resnnm>사용일수 28일 이상</resnnm>
  47. <resncd>2</resncd>
  48. </resnlist>
  49. <resnlist>
  50. <resnnm>사용과 동시에 승인 필요</resnnm>
  51. <resncd>3</resncd>
  52. </resnlist>
  53. <resnlist>
  54. <resnnm>사용일수 5일 이상</resnnm>
  55. <resncd>4</resncd>
  56. </resnlist>
  57. <resnlist>
  58. <resnnm>결과에 staphylococcus 문자열이 있고, oxacillin에 R인 경우</resnnm>
  59. <resncd>6</resncd>
  60. </resnlist>
  61. <resnlist>
  62. <resnnm> 결과에 candida 문자열이 있는 경우</resnnm>
  63. <resncd>7</resncd>
  64. </resnlist>
  65. <resnlist>
  66. <resnnm>결과에 piperacillin에 R인 경우</resnnm>
  67. <resncd>8</resncd>
  68. </resnlist>
  69. <resnlist>
  70. <resnnm>결과에 ceftazidime에 R인 경우</resnnm>
  71. <resncd>9</resncd>
  72. </resnlist>
  73. </appresninfo>
  74. <borrowresn/>
  75. </init>
  76. <hidden/>
  77. </root>
  78. </instance>
  79. <script type="javascript">
  80. <![CDATA[
  81. function fReqGetLimAntibioList() {
  82. model.resetInstanceNode("/root/main/limantibioinfo/limantibiolist");
  83. model.refresh(); // 트리가 접힌 상태에서 재조회 하면 그리드에 접힌 수만큼 조회 되지 않는 오류 수정.
  84. submit("TRMMD08602");
  85. setTree(datagrid1, datagrid1.colRef("row_level"), datagrid1.colRef("prcpdd") , false);
  86. }
  87. ]]>
  88. </script>
  89. <submission id="TRMMD08602" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/cond" resultref="/root/main/limantibioinfo"/>
  90. <submission id="TXMMD08601" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/savedata" resultref="/root/hidden/limantibiotrustspeclist"/>
  91. <submission id="TXMMD08602" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/savedata" resultref="/root/hidden/limantibiotrustspeclist"/>
  92. <submission id="TRMMB04102" mediatype="application/x-www-form-urlencoded" method="post"/>
  93. <submission id="TRMMO04105" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/init/patnm"/>
  94. <script type="javascript" ev:event="xforms-ready">
  95. <![CDATA[
  96. var sUserId = getUserInfo ( "userid" );
  97. if(fContainsHardCD("286", sUserId)) {
  98. btn_save.disabled = false; //항생제승인버튼
  99. } else {
  100. btn_save.disabled = true; //항생제승인버튼
  101. }
  102. fGetHardCDList("N", 417, 0 , "/root/init/borrowresn");
  103. model.setValue("/root/main/cond/fromdd" ,((getCurrentDate().toDate()).getAddDate(-1,"D")).getDateFormat()); //시작일자는 7일전
  104. model.setValue("/root/main/cond/todd" , getCurrentDate()); //종료일자는 현재일자
  105. mmbfGetDeptCodeComboList("/root/send/reqdata", "/root/init/orddept" , "A"); //부서코드 콤보
  106. mmbfGetDeptCodeComboList("/root/send/reqdata", "/root/init/warddeptlist" , "W"); //병동코드 콤보
  107. addComboInstance("/root/init/orddept", "deptcd^depthngnm", "-^전체", "dept"); //진료과 전체항목 추가
  108. cmb_orddept.select(0);
  109. addComboInstance("/root/init/warddeptlist", "deptcd^depthngnm", "-^전체", "dept"); //진료과 전체항목 추가
  110. cmb_ward.select(0);
  111. model.refresh();
  112. var sPid = getPatientInfo("pid");
  113. if(!isNull(sPid) ) {
  114. model.setValue("/root/main/cond/pid", sPid);
  115. model.setValue("/root/main/cond/hngnm", getPatientInfo("pname"));
  116. }
  117. datagrid1.frozenCols = 7;
  118. btn_req.dispatch("DOMActivate");
  119. ]]>
  120. </script>
  121. </model>
  122. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  123. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  124. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  125. <script type="javascript" src="../../../emr/prcpmngtweb/js/MMO001.js"/>
  126. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  127. </xhtml:head>
  128. <xhtml:body pagewidth="1200" pageheight="600" guideline="800;" style="margin-left:8; margin-top:8; margin-right:8; margin-bottom:8; ">
  129. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:20px; width:1180px; height:65px; background-color:#fffbf2; border-color:#ffd799; "/>
  130. <caption id="caption9" class="tit_1" style="left:0px; top:0px; width:160px; height:15px; vertical-align:middle; ">제한항생제 신청조회</caption>
  131. <caption id="caption4" class="search_name" style="left:6px; top:30px; width:95px; height:17px; vertical-align:middle; ">상 태 :</caption>
  132. <select1 id="radio1" ref="/root/main/cond/aprvstat" appearance="full" cellspacing="5" cols="4" rows="1" overflow="visible" style="left:89px; top:31px; width:225px; height:20px; border-style:none; ">
  133. <choices>
  134. <item>
  135. <label>전체</label>
  136. <value>-</value>
  137. </item>
  138. <item>
  139. <label>미승인</label>
  140. <value>0</value>
  141. </item>
  142. <item>
  143. <label>승인</label>
  144. <value>1</value>
  145. </item>
  146. <item>
  147. <label>자동승인</label>
  148. <value>7</value>
  149. </item>
  150. </choices>
  151. </select1>
  152. <bool id="chk_prcphistcd" checkvalue="Y,N" ref="/root/main/cond/prcphistcd" style="left:320px; top:29px; width:15px; height:20px; "/>
  153. <caption id="caption7" style="left:336px; top:30px; width:89px; height:20px; ">
  154. <![CDATA[D/C 처방 포함]]>
  155. <script type="javascript" ev:event="onclick">
  156. <![CDATA[
  157. var chk_prcphistcd = model.getValue("/root/main/cond/prcphistcd");
  158. if (chk_prcphistcd =="Y") {
  159. model.setValue("/root/main/cond/prcphistcd", "N");
  160. } else {
  161. model.setValue("/root/main/cond/prcphistcd", "Y");
  162. }
  163. model.refresh();
  164. ]]>
  165. </script>
  166. </caption>
  167. <caption id="caption2" class="search_name" style="left:765px; top:30px; width:95px; height:17px; vertical-align:middle; ">신청일자 :</caption>
  168. <input id="ipt_fromdd" ref="/root/main/cond/fromdd" class="input" inputtype="date" style="left:852px; top:30px; width:85px; height:19px; "/>
  169. <caption id="caption3" style="left:940px; top:30px; width:15px; height:20px; ">~</caption>
  170. <input id="ipt_todd" ref="/root/main/cond/todd" class="input" inputtype="date" style="left:953px; top:30px; width:85px; height:19px; "/>
  171. <caption id="caption10" class="search_name" style="left:765px; top:55px; width:101px; height:17px; vertical-align:middle; ">등록번호 :</caption>
  172. <input id="input1" ref="/root/main/cond/pid" style="left:855px; top:55px; width:80px; height:19px; ">
  173. <script type="javascript" ev:event="onkeypress">
  174. <![CDATA[
  175. inputEnterKey("btn_req", "DOMActivate");
  176. ]]>
  177. </script>
  178. </input>
  179. <button id="btn_patsrch" class="icon_search" style="left:1039px; top:55px; width:16px; height:16px; ">
  180. <caption/>
  181. <script type="javascript" ev:event="DOMActivate">
  182. <![CDATA[
  183. modal("SPPMC02500");
  184. var sPid = model.getValue("/root/main/patinfo/patinfolist/pid");
  185. var sHngnm = model.getValue("/root/main/patinfo/patinfolist/hngnm");
  186. model.setValue("/root/main/cond/pid", sPid);
  187. model.setValue("/root/main/cond/hngnm", sHngnm);
  188. model.refresh();
  189. ]]>
  190. </script>
  191. </button>
  192. <input id="input2" ref="/root/main/cond/hngnm" disabled="true" style="left:940px; top:55px; width:95px; height:19px; "/>
  193. <caption id="caption1" class="search_name" style="left:486px; top:30px; width:95px; height:17px; vertical-align:middle; ">진 료 과 :</caption>
  194. <select1 id="cmb_orddept" ref="/root/main/cond/orddeptcd" class="combo_default" appearance="minimal" editmode="search" style="left:575px; top:30px; width:155px; height:19px; ">
  195. <choices>
  196. <itemset nodeset="/root/init/orddept/dept">
  197. <label ref="depthngnm"/>
  198. <value ref="deptcd"/>
  199. </itemset>
  200. </choices>
  201. </select1>
  202. <caption id="caption6" class="search_name" style="left:261px; top:55px; width:95px; height:17px; vertical-align:middle; ">처방코드 :</caption>
  203. <input id="input3" ref="/root/main/cond/prcpcd" style="left:350px; top:55px; width:110px; height:19px; ">
  204. <script type="javascript" ev:event="onkeypress">
  205. <![CDATA[
  206. inputEnterKey("btn_req", "DOMActivate");
  207. ]]>
  208. </script>
  209. </input>
  210. <caption id="caption5" class="search_name" style="left:486px; top:55px; width:95px; height:17px; vertical-align:middle; ">병 동 :</caption>
  211. <select1 id="cmb_ward" ref="/root/main/cond/wardcd" class="combo_default" appearance="minimal" editmode="search" style="left:575px; top:55px; width:115px; height:19px; ">
  212. <choices>
  213. <itemset nodeset="/root/init/warddeptlist/dept">
  214. <label ref="depthngnm"/>
  215. <value ref="deptcd"/>
  216. </itemset>
  217. </choices>
  218. </select1>
  219. <button id="btn_basecd" class="btn3_letter4" style="left:1100px; top:90px; width:80px; height:22px; ">
  220. <caption>조건정보</caption>
  221. <script type="javascript" ev:event="DOMActivate">
  222. <![CDATA[
  223. open("SPMMO33100");
  224. ]]>
  225. </script>
  226. </button>
  227. <button id="button1" class="btn3_letter4" style="left:1015px; top:90px; width:80px; height:22px; ">
  228. <caption>약품정보</caption>
  229. <script type="javascript" ev:event="DOMActivate">
  230. <![CDATA[
  231. open("SPMMD08700");
  232. ]]>
  233. </script>
  234. </button>
  235. <button id="button2" class="btn4_letter4" style="left:650px; top:90px; width:80px; height:22px; ">
  236. <caption>엑셀저장</caption>
  237. <script type="javascript" ev:event="DOMActivate">
  238. <![CDATA[
  239. var fileName = window.fileDialog("save", ",", false, "제한항생제의뢰내역", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  240. if (fileName != ""){
  241. datagrid1.saveExcel(fileName, "SheetName", false, false, "", "", false);
  242. }
  243. ]]>
  244. </script>
  245. </button>
  246. <button id="button3" class="btn3_letter6" style="left:905px; top:90px; width:104px; height:22px; ">
  247. <caption>통합기록조회</caption>
  248. <script type="javascript" ev:event="DOMActivate">
  249. <![CDATA[
  250. var row = datagrid1.row;
  251. var pid = model.getValue("/root/main/limantibioinfo/limantibiolist[" + row + "]/pid");
  252. if(pid == ""){
  253. messageBox("통합기록조회를 검색할 환자를", "C002");
  254. return;
  255. }
  256. var wndobj = getOpenWindow("SMMRI00400");
  257. if(wndobj != null){
  258. setParameter("SMMRI00400_param_pid", pid);
  259. wndobj.javascript.fInitalize();
  260. }else{
  261. setParameter("SMMRI00400_param_pid", pid);
  262. open("SMMRI00400", 2, 0, 0);
  263. }
  264. ]]>
  265. </script>
  266. </button>
  267. <button id="button4" class="btn3_letter2" style="left:735px; top:90px; width:56px; height:22px; ">
  268. <caption>의뢰</caption>
  269. <script type="javascript" ev:event="DOMActivate">
  270. <![CDATA[
  271. var row = datagrid1.row;
  272. var pid = model.getValue("/root/main/limantibioinfo/limantibiolist[" + row + "]/pid");
  273. var orddd = model.getValue("/root/main/limantibioinfo/limantibiolist[" + row + "]/orddd");
  274. var cretno = model.getValue("/root/main/limantibioinfo/limantibiolist[" + row + "]/cretno");
  275. var ioflag = "I";
  276. var orddeptcd = model.getValue("/root/main/limantibioinfo/limantibiolist[" + row + "]/orddeptcd");
  277. var orddrid = model.getValue("/root/main/limantibioinfo/limantibiolist[" + row + "]/medispclid");
  278. var param = pid +"▦"+ orddd+ "▦" +cretno+ "▦" + ioflag +"▦"+ orddeptcd +"▦" + orddrid + "▦"; //pid▦orddd▦cretno▦ioflag▦orddeptcd▦orddrid▦
  279. if(pid == ""){
  280. messageBox("의뢰를 검색할 환자를", "C002");
  281. return;
  282. }
  283. var wndobj = getOpenWindow("SMMMR05000");
  284. if(wndobj != null){
  285. setParameter("SMMMR05000_param_pinfo", param);
  286. wndobj.javascript.fInitalize();
  287. }else{
  288. setParameter("SMMMR05000_param_pinfo", param);
  289. open("SMMMR05000", 2, 0, 0);
  290. }
  291. ]]>
  292. </script>
  293. </button>
  294. <button id="button5" class="btn3_letter6" style="left:795px; top:90px; width:104px; height:22px; ">
  295. <caption>통합결과조회</caption>
  296. <script type="javascript" ev:event="DOMActivate">
  297. <![CDATA[
  298. var row = datagrid1.row;
  299. var pid = model.getValue("/root/main/limantibioinfo/limantibiolist[" + row + "]/pid");
  300. model.makeValue("/root/source/pid", pid);
  301. if(pid == ""){
  302. messageBox("통합결과조회를 검색할 환자를", "C002");
  303. return;
  304. }
  305. curExamRsltObj = getOpenWindow("SMAER00800"); //활성화된 검사결과 화면 object loading
  306. if(curExamRsltObj != null){
  307. //curExamRsltObj.javascript.model.dispatch("xforms-ready");
  308. curExamRsltObj.model.setvalue("/root/send/data/singdata/srchpid", pid );
  309. curExamRsltObj.javascript.btn_srch.dispatch("DOMActivate");
  310. } else {
  311. open("SMAER00800", "", "", "", "SMAER00800", "/root/source/pid", "/root/send/data/singdata/srchpid");
  312. }
  313. ]]>
  314. </script>
  315. </button>
  316. <button id="btn_save" class="btn4_letter5" style="left:470px; top:90px; width:92px; height:22px; ">
  317. <caption>항생제승인</caption>
  318. <script type="javascript" ev:event="DOMActivate">
  319. <![CDATA[
  320. var nCheckCnt = model.instances(0).selectNodes ( "/root/main/limantibioinfo/limantibiolist[chkflag ='Y' and aprvstat = '0']" ).length;
  321. if(nCheckCnt > 0) {
  322. model.setValue("/root/send/savedata", datagrid1.getUpdateData());
  323. if (submit("TXMMD08601") == true) {
  324. btn_req.dispatch("DOMActivate");
  325. }
  326. } else {
  327. messageBox("선택된 처방이 없거나, 미승인 상태가 아닙니다.", "I999");
  328. }
  329. ]]>
  330. </script>
  331. <hint>
  332. <![CDATA[제한 항생제 승인 권한자만 사용 가능 합니다.]]>
  333. </hint>
  334. </button>
  335. <button id="btn_borrow" class="btn4_letter4" style="left:565px; top:90px; width:80px; height:22px; ">
  336. <caption>차용신청</caption>
  337. <script type="javascript" ev:event="DOMActivate">
  338. <![CDATA[
  339. var nCheckCnt = model.instances(0).selectNodes ( "/root/main/limantibioinfo/limantibiolist[chkflag ='Y' and aprvstat = '0']" ).length;
  340. if(nCheckCnt < 1) {
  341. messageBox("선택된 처방이 없거나, 미승인 상태가 아닙니다.", "I999");
  342. return;
  343. }
  344. nCheckCnt = model.instances(0).selectNodes ( "/root/main/limantibioinfo/limantibiolist[chkflag ='Y' and borrowyn = 'Y']" ).length;
  345. if(nCheckCnt > 0) {
  346. messageBox("이미 차용 신청된 항목을 다시 신청 할 수 없습니다.", "I999");
  347. return;
  348. }
  349. grp_borrowresn.visible = true;
  350. ]]>
  351. </script>
  352. <hint>
  353. <![CDATA[차용기능 개발 중입니다.]]>
  354. </hint>
  355. </button>
  356. <line id="line3" style="x1:1080px; y1:30px; x2:1080px; y2:75px; border-color:#ffe4bb; border-left-style:solid; "/>
  357. <button id="btn_req" class="btn1_letter2" style="left:1095px; top:40px; width:56px; height:22px; background-image:../../../com/commonweb/images/btn1_letter2.gif; ">
  358. <caption>조회</caption>
  359. <script type="javascript" ev:event="DOMActivate">
  360. <![CDATA[
  361. fPidTrim("/root/main/cond/pid")
  362. var pid = model.getValue("/root/main/cond/pid");
  363. if (pid == "") {
  364. model.setValue("/root/main/cond/hngnm", "");
  365. input2.refresh();
  366. var ddInterval = getDateInterval(ipt_fromdd.value, ipt_todd.value);
  367. if(ddInterval > 60){
  368. messageBox("등록번호가 없으면 조회기간이 최대 60일까지만 조회", "I006");
  369. return;
  370. }
  371. } else if( reqPatInfo("pid", "ptbs", pid)==true) {
  372. var hngnm = model.getValue("/root/init/patnm/patnm/hngnm");
  373. model.setValue("/root/main/cond/hngnm", hngnm);
  374. input2.refresh();
  375. }
  376. fReqGetLimAntibioList();
  377. ]]>
  378. </script>
  379. </button>
  380. <line id="line1" class="line_1" style="x1:0px; y1:117px; x2:1178px; y2:116px; "/>
  381. <datagrid id="datagrid1" nodeset="/root/main/limantibioinfo/limantibiolist" caption="선택^환자번호^환자명^S/A^진료과^병동^입원일^처방적용일^처방코드^처방명^행레벨^1회용량^1회용량^1회수량^1회수량^횟수^일수^DC^누적^상태^사유^전문의^담당의^신청자^신청일시^승인자^승인일시^차용여부^차용사유내용^차용신청부서^차용자^차용신청일시^신청번호^신청순번^승인상태코드^생성번호^진료과코드^병동코드^전문의사번^담당의사번^처방번호^처방상태코드^차용사유코드^차용신청부서코드^차용신청자사번" colsep="^" colwidth="30, 55, 55, 40, 80, 70, 70, 100, 70, 150, 0, 35, 30, 30, 30, 30, 30, 40, 40, 55, 140, 55, 55, 55, 100, 55, 100, 55, 100, 100, 55, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0" ellipsis="true" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" tooltip="true" style="left:0px; top:120px; width:1180px; height:480px; ">
  382. <col checkvalue="Y,N" ref="chkflag" type="checkbox"/>
  383. <col ref="pid" style="text-align:center; "/>
  384. <col ref="hngnm" style="text-align:center; "/>
  385. <col ref="sa" style="text-align:center; "/>
  386. <col ref="orddeptnm"/>
  387. <col ref="wardnm"/>
  388. <col ref="orddd" format="yyyy-mm-dd" style="text-align:center; "/>
  389. <col ref="prcpdd" format="yyyy-mm-dd" style="text-align:center; "/>
  390. <col ref="prcpcd"/>
  391. <col ref="prcpnm"/>
  392. <col ref="row_level" visibility="hidden"/>
  393. <col ref="drprcpetc7" style="text-align:right; "/>
  394. <col ref="prcpvolunitnm" style="text-align:center; "/>
  395. <col ref="drprcpetc8" style="text-align:right; "/>
  396. <col ref="prcpqtyunitnm" style="text-align:center; "/>
  397. <col ref="prcptims" style="text-align:center; "/>
  398. <col ref="prcpdayno" style="text-align:center; "/>
  399. <col ref="prcphistnm" style="text-align:center; "/>
  400. <col ref="usedayno" style="text-align:center; "/>
  401. <col ref="aprvstatnm" style="text-align:center; "/>
  402. <col disabled="true" ref="resnflagno" type="combo">
  403. <choices>
  404. <itemset nodeset="/root/init/appresninfo/resnlist">
  405. <label ref="resnnm"/>
  406. <value ref="resncd"/>
  407. </itemset>
  408. </choices>
  409. </col>
  410. <col ref="medispclnm" style="text-align:center; "/>
  411. <col ref="atdoctnm" style="text-align:center; "/>
  412. <col ref="wrtedrnm" style="text-align:center; "/>
  413. <col ref="fstrgstdt" format="yyyy-mm-dd hh:nn" style="text-align:center; "/>
  414. <col ref="confirmnm" style="text-align:center; "/>
  415. <col ref="confirmdt" format="yyyy-mm-dd hh:nn" style="text-align:center; "/>
  416. <col ref="borrowyn" style="text-align:center; "/>
  417. <col ref="borrowcnt"/>
  418. <col ref="borrowdeptnm"/>
  419. <col ref="borrownm" style="text-align:center; "/>
  420. <col ref="borrowdt" format="yyyy-mm-dd hh:nn" style="text-align:center; "/>
  421. <col ref="limaprvno" visibility="hidden"/>
  422. <col ref="aprvseq" visibility="hidden"/>
  423. <col ref="aprvstat" visibility="hidden"/>
  424. <col ref="cretno" visibility="hidden"/>
  425. <col ref="orddeptcd" visibility="hidden"/>
  426. <col ref="wardcd" visibility="hidden"/>
  427. <col ref="medispclid" visibility="hidden"/>
  428. <col ref="atdoctid" visibility="hidden"/>
  429. <col ref="prcpno" visibility="hidden"/>
  430. <col ref="prcphistcd" visibility="hidden"/>
  431. <col ref="borrowcd" visibility="hidden"/>
  432. <col ref="borrowdeptcd" visibility="hidden"/>
  433. <col ref="borrowid" visibility="hidden"/>
  434. <script type="javascript" ev:event="ondblclick">
  435. <![CDATA[
  436. var sUserId = getUserInfo ( "userid" );
  437. if(fContainsHardCD("286", sUserId)) {
  438. button4.dispatch("DOMActivate");
  439. button3.dispatch("DOMActivate");
  440. }
  441. ]]>
  442. </script>
  443. </datagrid>
  444. <group id="grp_borrowresn" visibility="hidden" style="left:410px; top:195px; width:340px; height:150px; ">
  445. <shape id="rectangle1" appearance="rectangle" style="left:0px; top:0px; width:340px; height:150px; "/>
  446. <caption id="caption14" class="tit_2" style="left:4px; top:5px; width:152px; height:13px; vertical-align:middle; ">차용신청 사유입력</caption>
  447. <line id="line2" class="line_1" style="x1:4px; y1:25px; x2:334px; y2:25px; "/>
  448. <caption id="caption26" class="cell_1" style="left:5px; top:32px; width:85px; height:23px; text-align:center; vertical-align:middle; ">사유코드</caption>
  449. <select1 id="combo1" ref="/root/main/borrowresn/resncd" appearance="minimal" style="left:93px; top:35px; width:240px; height:19px; ">
  450. <choices>
  451. <itemset nodeset="/root/init/borrowresn/hardcd">
  452. <label ref="hardcdnm"/>
  453. <value ref="hardcd"/>
  454. </itemset>
  455. </choices>
  456. <script type="javascript" ev:event="xforms-value-changed">
  457. <![CDATA[
  458. if(model.getValue("/root/main/borrowresn/resncd")=="Z"){
  459. model.setValue("/root/main/borrowresn/resncnt", "");
  460. txt_reason.disabled="false";
  461. }else{
  462. model.setValue("/root/main/borrowresn/resncnt", combo1.label);
  463. txt_reason.disabled="true";
  464. }
  465. model.refresh();
  466. ]]>
  467. </script>
  468. </select1>
  469. <caption id="caption8" class="cell_1" style="left:4px; top:58px; width:85px; height:62px; text-align:center; vertical-align:middle; ">사유내용</caption>
  470. <textarea id="txt_reason" ref="/root/main/borrowresn/resncnt" disabled="true" maxlength="600" style="left:93px; top:59px; width:240px; height:60px; "/>
  471. <button id="btn_grdhidden" class="btn2_letter2" style="left:242px; top:125px; width:42px; height:19px; ">
  472. <caption>신청</caption>
  473. <script type="javascript" ev:event="DOMActivate">
  474. <![CDATA[
  475. var sResnCd = model.getValue("/root/main/borrowresn/resncd");
  476. var sResnCnt = model.getValue("/root/main/borrowresn/resncnt");
  477. var sUserId = getUserInfo("userid");
  478. var sDeptCd = getUserInfo("dutplcecd");
  479. if(sResnCnt == ""){
  480. messageBox("차용 사유가 입력되지 않았습니다.", "I999");
  481. return;
  482. }
  483. var nCheckCnt = model.instances(0).selectNodes ( "/root/main/limantibioinfo/limantibiolist[chkflag ='Y' and aprvstat = '0']" ).length;
  484. if(nCheckCnt < 1) {
  485. messageBox("선택된 처방이 없거나, 미승인 상태가 아닙니다.", "I999");
  486. return;
  487. }
  488. nCheckCnt = model.instances(0).selectNodes ( "/root/main/limantibioinfo/limantibiolist[chkflag ='Y' and borrowyn = 'Y']" ).length;
  489. if(nCheckCnt > 0) {
  490. messageBox("이미 차용 신청된 항목을 다시 신청 할 수 없습니다.", "I999");
  491. return;
  492. }
  493. var nodelimantibiolist = instance1.selectNodes("/root/main/limantibioinfo/limantibiolist");
  494. if( nodelimantibiolist != null && nodelimantibiolist.length > 0 ){
  495. for( var i = 1 ; i <= nodelimantibiolist.length; i++ ){
  496. if( model.getValue("/root/main/limantibioinfo/limantibiolist[" + i + "]/chkflag") == "Y"
  497. && model.getValue("/root/main/limantibioinfo/limantibiolist[" + i + "]/aprvstat") == "0"
  498. && model.getValue("/root/main/limantibioinfo/limantibiolist[" + i + "]/borrowyn") == "N" ){
  499. model.setValue("/root/main/limantibioinfo/limantibiolist[" + i + "]/borrowcd" , sResnCd);
  500. model.setValue("/root/main/limantibioinfo/limantibiolist[" + i + "]/borrowcnt" , sResnCnt);
  501. model.setValue("/root/main/limantibioinfo/limantibiolist[" + i + "]/borrowdeptcd" , sDeptCd);
  502. model.setValue("/root/main/limantibioinfo/limantibiolist[" + i + "]/borrowid" , sUserId);
  503. }
  504. }
  505. }
  506. model.setValue("/root/send/savedata", datagrid1.getUpdateData());
  507. if (submit("TXMMD08602") == true) {
  508. btn_req.dispatch("DOMActivate");
  509. }
  510. model.setValue("/root/main/borrowresn/resncd", "");
  511. model.setValue("/root/main/borrowresn/resncnt", "");
  512. model.refresh();
  513. grp_borrowresn.visible = false;
  514. ]]>
  515. </script>
  516. </button>
  517. <button id="button7" class="btn2_letter2" style="left:292px; top:125px; width:42px; height:19px; ">
  518. <caption>취소</caption>
  519. <script type="javascript" ev:event="DOMActivate">
  520. <![CDATA[
  521. model.setValue("/root/main/borrowresn/resncd", "");
  522. model.setValue("/root/main/borrowresn/resncnt", "");
  523. model.refresh();
  524. grp_borrowresn.visible = false;
  525. ]]>
  526. </script>
  527. </button>
  528. </group>
  529. <caption id="caption11" class="search_name" style="left:6px; top:55px; width:95px; height:17px; vertical-align:middle; ">차 용 :</caption>
  530. <select1 id="radio2" ref="/root/main/cond/borrowyn" appearance="full" cellspacing="5" cols="4" rows="1" overflow="visible" style="left:89px; top:56px; width:136px; height:20px; border-style:none; ">
  531. <choices>
  532. <item>
  533. <label>전체</label>
  534. <value>-</value>
  535. </item>
  536. <item>
  537. <label>Y</label>
  538. <value>Y</value>
  539. </item>
  540. <item>
  541. <label>N</label>
  542. <value>N</value>
  543. </item>
  544. </choices>
  545. </select1>
  546. </xhtml:body>
  547. </xhtml:html>