SPMNO02200_처방선택.xrw 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * 제 목 : SPMNO02200_처방선택.xrw
  4. * 설 명 : 기준자료 처방선택
  5. * 수정이력 :
  6. * 기 타 :
  7. -->
  8. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
  9. <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">
  10. <xhtml:head>
  11. <xhtml:title>기준자료 처방선택</xhtml:title>
  12. <model id="model1">
  13. <instance id="instance1">
  14. <root xmlns="">
  15. <main>
  16. <prcpinfo>
  17. <prcplist>
  18. <check/>
  19. <prcpcd/>
  20. <prcpnm/>
  21. <applstage/>
  22. <deptcd/>
  23. <deptnm/>
  24. </prcplist>
  25. </prcpinfo>
  26. <cond>
  27. <prcpcd/>
  28. <prcpnm/>
  29. <deptcd/>
  30. <deptnm/>
  31. <ordtype/>
  32. <baseflag/>
  33. <ordtypenm/>
  34. </cond>
  35. </main>
  36. <send>
  37. <req/>
  38. <prcpinfo/>
  39. </send>
  40. <hidden>
  41. </hidden>
  42. <temp>
  43. <prcpinfo/>
  44. </temp>
  45. </root>
  46. </instance>
  47. <script type="javascript">
  48. <![CDATA[
  49. var sACTPRCPLIST_PATH = "/root/main/prcpinfo/prcplist";
  50. function fInitialize()
  51. {
  52. if(checkOpener()){
  53. opener.javascript.setParameter("SPMNO02200_ReturnFlag","");
  54. var sParamMsg = opener.javascript.getParameter("SPMNO02200_Param");
  55. model.setValue("/root/main/cond/prcpcd", getArrayData(sParamMsg,0,0));
  56. model.setValue("/root/main/cond/prcpnm", getArrayData(sParamMsg,0,1));
  57. model.setValue("/root/main/cond/deptcd", getArrayData(sParamMsg,0,2));
  58. model.setValue("/root/main/cond/deptnm", getArrayData(sParamMsg,0,3));
  59. model.setValue("/root/main/cond/ordtype", getArrayData(sParamMsg,0,4));
  60. model.setValue("/root/main/cond/baseflag", getArrayData(sParamMsg,0,5));
  61. if(model.getValue("/root/main/cond/ordtype") == "O"){ // 진료형태
  62. model.setValue("/root/main/cond/ordtypenm", "외래");
  63. } else if(model.getValue("/root/main/cond/ordtype") == "I"){
  64. model.setValue("/root/main/cond/ordtypenm", "입원");
  65. }
  66. model.removeNodeset(sACTPRCPLIST_PATH);
  67. fSrchPrcpInfo();
  68. } else {
  69. alert("본 화면은 팝업으로만 사용할수 있습니다.");
  70. model.close();
  71. }
  72. }
  73. function fSrchPrcpInfo(){
  74. model.removenode("/root/send/req");
  75. model.makeValue("/root/send/req", "");
  76. model.copynode("/root/send/req", "/root/main/cond");
  77. submit("TRMNO02201");
  78. if(model.getValue("/root/main/cond/baseflag") == "B"){ // 기준구분
  79. grd_prcpinfo.isReadOnly(1,4, grd_prcpinfo.rows-1, 4) = true;
  80. }
  81. }
  82. function fSavePrcpInfo(){
  83. var iIdx = 0;
  84. if(!checkGridUpdate(grd_prcpinfo)) {
  85. messageBox("선택 대상이 ", "I004")
  86. return;
  87. }
  88. for(var iRow = grd_prcpinfo.fixedrows; iRow <= grd_prcpinfo.rows - grd_prcpinfo.fixedrows; iRow++){
  89. if(model.getValue(sACTPRCPLIST_PATH+"["+iRow+"]/check") == "true") iIdx++;
  90. }
  91. if(iIdx == 0) {
  92. messageBox("선택 대상이 ", "I004")
  93. return;
  94. }
  95. var updatedata = grd_prcpinfo.getUpdateData("update");
  96. var sRtnMsg = messageBox("간호 기준자료를 ", "Q003");
  97. if(sRtnMsg != 6) return;
  98. model.makeValue("/root/send/prcpinfo",updatedata);
  99. if(submit("TXMNO02201")){
  100. if(model.getValue("/root/temp/prcpinfo/prcplist/inscnt") == "0"){
  101. messageBox("기준자료 저장중 ", "E009")
  102. } else {
  103. opener.javascript.setParameter("SPMNO02200_ReturnFlag","Y");
  104. model.close();
  105. }
  106. }
  107. }
  108. function checkGridUpdate(grid)
  109. {
  110. var uData = grid.getUpdateDataXml("update");
  111. if (uData=="") return false;
  112. else return true;
  113. }
  114. function fPrcpListSrch() {
  115. if ((model.getValue("/root/main/cond/prcpcd").length >= 2) ||
  116. (model.getValue("/root/main/cond/prcpnm").length >= 2)){
  117. inputEnterKey("btn_search", "DOMActivate");
  118. } else {
  119. messageBox("검색어는 2자 이상","C001");
  120. model.setFocus("ipt_prcpcd");
  121. return;
  122. }
  123. }
  124. function fClickedGridRow() {
  125. var iRow = 0;
  126. var iCol = 0;
  127. iRow = grd_prcpinfo.row;
  128. iCol = grd_prcpinfo.col;
  129. if(iCol == 1) return;
  130. if(iRow < 1) return;
  131. if(model.getValue("/root/main/prcpinfo/prcplist["+iRow+"]/check") == "true"){
  132. model.setValue("/root/main/prcpinfo/prcplist["+iRow+"]/check","false");
  133. grd_prcpinfo.removeStatus(iRow, "update");
  134. }else{
  135. model.setValue("/root/main/prcpinfo/prcplist["+iRow+"]/check", "true");
  136. grd_prcpinfo.rowStatus(iRow) = 2;
  137. }
  138. }
  139. ]]>
  140. </script>
  141. <script type="javascript" ev:event="xforms-ready">
  142. <![CDATA[
  143. fInitialize();
  144. ]]>
  145. </script>
  146. <submission id="TRMNO02201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/req" replace="instance" resultref="/root/main/prcpinfo"/>
  147. <submission id="TXMNO02201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp/prcpinfo"/>
  148. </model>
  149. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  150. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  151. <script type="javascript" src="../../../emr/carecomweb/js/CareCom.js"/>
  152. </xhtml:head>
  153. <xhtml:body pagewidth="600" pageheight="400" guideline="1,21;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  154. <group id="grp_biz" scroll="auto" style="left:0px; top:35px; width:580px; height:326px; ">
  155. <caption id="caption1" class="tit_2" style="left:5px; top:10px; width:194px; height:14px; ">처방 조회</caption>
  156. <line id="line1" class="line_1" style="x1:0px; y1:25px; x2:576px; y2:25px; "/>
  157. <datagrid id="grd_prcpinfo" nodeset="/root/main/prcpinfo/prcplist" class="datagrid2" caption="선택^처방코드^처방명^적용^부서^진료과^prcpcd" colsep="^" colwidth="32, 77, 263, 61, 100, 0, 0" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:1px; top:30px; width:576px; height:290px; ">
  158. <col ref="check" type="checkbox"/>
  159. <col ref="prcpcd"/>
  160. <col ref="prcpnm" style="text-align:left; "/>
  161. <col ref="applstage" type="combo">
  162. <choices>
  163. <item>
  164. <label>전체</label>
  165. <value>A</value>
  166. </item>
  167. <item>
  168. <label>재원</label>
  169. <value>I</value>
  170. </item>
  171. <item>
  172. <label>퇴원</label>
  173. <value>T</value>
  174. </item>
  175. </choices>
  176. <script type="javascript" ev:event="xforms-value-changed">
  177. <![CDATA[
  178. ]]>
  179. </script>
  180. </col>
  181. <col ref="deptnm"/>
  182. <col ref="deptcd"/>
  183. <col ref="prcpcd" visibility="hidden"/>
  184. <script type="javascript" ev:event="onclick">
  185. <![CDATA[
  186. fClickedGridRow();
  187. ]]>
  188. </script>
  189. </datagrid>
  190. </group>
  191. <group id="group2" style="left:0px; top:0px; width:581px; height:35px; vertical-align:top; ">
  192. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:580px; height:35px; "/>
  193. <line id="line13" class="line_4" style="x1:515px; y1:7px; x2:515px; y2:29px; border-color:#ffe4bb; border-left-style:solid; "/>
  194. <button id="btn_search" class="btn1_letter2" style="left:520px; top:7px; width:56px; height:22px; ">
  195. <caption>조회</caption>
  196. <script type="javascript" ev:event="DOMActivate">
  197. <![CDATA[
  198. fSrchPrcpInfo();
  199. ]]>
  200. </script>
  201. </button>
  202. <caption id="caption4" class="search_name" style="left:0px; top:9px; width:80px; height:17px; ">검색어 :</caption>
  203. <input id="ipt_prcpcd" ref="/root/main/cond/prcpcd" class="input_default" navindex="2" imemode="alpha" maxlength="12" style="left:80px; top:8px; width:105px; height:19px; ">
  204. <script type="javascript" ev:event="onkeydown">
  205. <![CDATA[
  206. if(event.keycode == "13"){
  207. fPrcpListSrch();
  208. }
  209. ]]>
  210. </script>
  211. </input>
  212. <input id="ipt_prcpnm" ref="/root/main/cond/prcpnm" class="input_default" style="left:190px; top:8px; width:250px; height:19px; ">
  213. <script type="javascript" ev:event="onkeydown">
  214. <![CDATA[
  215. if(event.keycode == "13"){
  216. fPrcpListSrch();
  217. }
  218. ]]>
  219. </script>
  220. </input>
  221. <output id="output1" ref="/root/main/cond/ordtypenm" style="left:445px; top:8px; width:60px; height:19px; text-align:center; "/>
  222. </group>
  223. <group id="group1" scroll="auto" style="left:0px; top:356px; width:580px; height:27px; ">
  224. <button id="btn_select" class="btn4_letter2" style="left:461px; top:3px; width:56px; height:22px; ">
  225. <caption>저장</caption>
  226. <script type="javascript" ev:event="DOMActivate">
  227. <![CDATA[
  228. fSavePrcpInfo();
  229. ]]>
  230. </script>
  231. </button>
  232. <button id="btn_close" class="btn4_letter2" style="left:520px; top:3px; width:56px; height:22px; ">
  233. <caption>닫기</caption>
  234. <script type="javascript" ev:event="DOMActivate">
  235. <![CDATA[
  236. model.close();
  237. ]]>
  238. </script>
  239. </button>
  240. </group>
  241. </xhtml:body>
  242. </xhtml:html>