SPADB62400_용량저함량분할.xrw 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722
  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. <prcp>
  11. </prcp>
  12. <srcprcp>
  13. </srcprcp>
  14. <prcpresult/>
  15. <divprcp>
  16. </divprcp>
  17. <divpreprcp>
  18. </divpreprcp>
  19. </main>
  20. <send>
  21. <data>
  22. <prcplist/>
  23. </data>
  24. </send>
  25. <hidden/>
  26. <init>
  27. <cond1>Y</cond1>
  28. </init>
  29. </root>
  30. </instance>
  31. <script type="javascript" ev:event="xforms-ready">
  32. <![CDATA[
  33. //nodeList = instance1.selectNodes("/root/main/srcprcp/prcplist");
  34. //rCSV = getNodeListCSV(nodeList);
  35. //model.setValue("/root/send/data/prcplist",rCSV);
  36. //model.copyNode ( "/root/send/data/prcplist", "/root/main/srcprcp" );
  37. //submit("TRADB62401");
  38. model.removeNodeset ( "/root/main/srcprcp/prcplist" );
  39. var openerPrcplist = opener.model.instances(0).selectNodes( "/root/main/prcp/prcplist" ); //의사처방 저장데이터
  40. for(var i = 0; i < openerPrcplist.length; i++) {
  41. model.instances(0).selectSingleNode( "/root/main/srcprcp" ).appendChild(openerPrcplist.item(i).cloneNode(true));
  42. }
  43. var chk="";
  44. var destNode1 = model.instances(0).selectSingleNode( "/root/main/divprcp" );
  45. var srcNode1 ;
  46. var destNode2 = model.instances(0).selectSingleNode( "/root/main/divpreprcp" );
  47. var srcNode2 ;
  48. var temp;
  49. var chktemp="";
  50. var prcpNode = model.instances(0).selectSingleNode( "/root/main/prcp/prcplist" );
  51. var srcPrcpNode = model.instances(0).selectSingleNode( "/root/main/srcprcp/prcplist" );
  52. for ( var i = 1 ; i <= prcpNode.length;i++){ //저함량 배수처방 체크. 표시
  53. temp = model.getValue("/root/main/prcp/prcplist["+i+"]/tempcol11").split("|");
  54. if ( temp[0]== "N" ){
  55. if ( chktemp != model.getValue("/root/main/prcp/prcplist["+i+"]/tempcol11")){
  56. chktemp = model.getValue("/root/main/prcp/prcplist["+i+"]/tempcol11");
  57. for ( var j = 1; j<=srcPrcpNode.length ; j++){
  58. if ( temp[1] == model.getValue("/root/main/srcprcp/prcplist["+j+"]/prcpcd")
  59. && temp[2] == model.getValue("/root/main/srcprcp/prcplist["+j+"]/drugmthdspccd")
  60. && parseFloat(temp[3]) == parseFloat(model.getValue("/root/main/srcprcp/prcplist["+j+"]/prcpvol"))){
  61. srcNode2 = model.instances(0).selectSingleNode( "/root/main/srcprcp/prcplist["+j+"]" );
  62. destNode2.appendChild( srcNode2.cloneNode(true));
  63. }
  64. }
  65. }
  66. srcNode1 = model.instances(0).selectSingleNode( "/root/main/prcp/prcplist["+i+"]" );
  67. destNode1.appendChild( srcNode1.cloneNode(true));
  68. chk="Y";
  69. }
  70. }
  71. model.refresh();
  72. var chktemp="";
  73. var divPrcpNode = model.instances(0).selectSingleNode( "/root/main/divprcp/prcplist" );
  74. for ( var i = 1 ; i <= prcpNode.length;i++){ //저함량 배수처방 체크. 표시
  75. temp = model.getValue("/root/main/prcp/prcplist["+i+"]/tempcol11").split("|");
  76. if ( temp[0]== "N" ){
  77. if ( chktemp != model.getValue("/root/main/prcp/prcplist["+i+"]/tempcol11")){
  78. chktemp = model.getValue("/root/main/prcp/prcplist["+i+"]/tempcol11");
  79. for ( var j = 1; j<=divPrcpNode.length ; j++){
  80. temp2 = model.getValue("/root/main/divprcp/prcplist["+j+"]/tempcol11").split("|");
  81. if ( temp2[1] == temp[1] && temp2[2] == temp[2] ){
  82. model.setValue("/root/main/divprcp/prcplist["+j+"]/hosinhosoutflag", model.getValue("/root/main/prcp/prcplist["+i+"]/hosinhosoutflag"));
  83. model.setValue("/root/main/divprcp/prcplist["+j+"]/prcpexecdeptcd", model.getValue("/root/main/prcp/prcplist["+i+"]/prcpexecdeptcd"));
  84. model.setValue("/root/main/divprcp/prcplist["+j+"]/prcpgenrflag", model.getValue("/root/main/prcp/prcplist["+i+"]/prcpgenrflag"));
  85. model.setValue("/root/main/divprcp/prcplist["+j+"]/issdeptcd", model.getValue("/root/main/prcp/prcplist["+i+"]/issdeptcd"));
  86. model.setValue("/root/main/divprcp/prcplist["+j+"]/pampkspec", model.getValue("/root/main/prcp/prcplist["+i+"]/pampkspec"));
  87. model.setValue("/root/main/divprcp/prcplist["+j+"]/specdrid", model.getValue("/root/main/prcp/prcplist["+i+"]/specdrid"));
  88. if (model.getValue("/root/main/prcp/prcplist["+i+"]/spynpy1") !=""){
  89. model.makeValue("/root/main/divprcp/prcplist["+j+"]/spynpy1", model.getValue("/root/main/prcp/prcplist["+i+"]/spynpy1"));
  90. } else {
  91. model.makeValue("/root/main/divprcp/prcplist["+j+"]/spynpy1", model.getValue("/root/main/prcp/prcplist["+i+"]/insukind"));
  92. }
  93. model.setValue("/root/main/divprcp/prcplist["+j+"]/lowdrugresncd", "N"); // 디폴트로 처방 변경.
  94. }
  95. }
  96. }
  97. chk="Y";
  98. }
  99. }
  100. model.refresh();
  101. /*
  102. for ( var i = 0 ; i < grd_prcplist.rows;i++){ //저함량 배수처방 체크. 표시
  103. temp = model.getValue("/root/main/prcp/prcplist["+i+"]/tempcol11").split("|");
  104. if ( temp[0]== "N" ){
  105. if ( chktemp != model.getValue("/root/main/prcp/prcplist["+i+"]/tempcol11")){
  106. chktemp = model.getValue("/root/main/prcp/prcplist["+i+"]/tempcol11");
  107. for ( var j = 0; j<=grd_targetprcplist.rows ; j++){
  108. if ( model.getValue("/root/main/srcprcp/prcplist["+j+"]/prcpcd") == temp[1] && model.getValue("/root/main/srcprcp/prcplist["+j+"]/drugmthdspccd") == temp[2] ){
  109. srcNode2 = model.instances(0).selectSingleNode( "/root/main/srcprcp/prcplist["+j+"]" );
  110. destNode2.appendChild( srcNode2.cloneNode(true));
  111. }
  112. }
  113. }
  114. srcNode1 = model.instances(0).selectSingleNode( "/root/main/prcp/prcplist["+i+"]" );
  115. destNode1.appendChild( srcNode1.cloneNode(true));
  116. chk="Y";
  117. }
  118. }
  119. model.refresh();
  120. var chktemp="";
  121. for ( var i = 0 ; i < grd_prcplist.rows;i++){ //저함량 배수처방 체크. 표시
  122. temp = model.getValue("/root/main/prcp/prcplist["+i+"]/tempcol11").split("|");
  123. if ( temp[0]== "N" ){
  124. if ( chktemp != model.getValue("/root/main/prcp/prcplist["+i+"]/tempcol11")){
  125. chktemp = model.getValue("/root/main/prcp/prcplist["+i+"]/tempcol11");
  126. for ( var j = 0; j<grd_divprcp.rows ; j++){
  127. temp2 = model.getValue("/root/main/divprcp/prcplist["+j+"]/tempcol11").split("|");
  128. if ( temp2[1] == temp[1] && temp2[2] == temp[2] ){
  129. model.setValue("/root/main/divprcp/prcplist["+j+"]/hosinhosoutflag", model.getValue("/root/main/prcp/prcplist["+i+"]/hosinhosoutflag"));
  130. model.setValue("/root/main/divprcp/prcplist["+j+"]/prcpexecdeptcd", model.getValue("/root/main/prcp/prcplist["+i+"]/prcpexecdeptcd"));
  131. model.setValue("/root/main/divprcp/prcplist["+j+"]/prcpgenrflag", model.getValue("/root/main/prcp/prcplist["+i+"]/prcpgenrflag"));
  132. model.setValue("/root/main/divprcp/prcplist["+j+"]/issdeptcd", model.getValue("/root/main/prcp/prcplist["+i+"]/issdeptcd"));
  133. model.setValue("/root/main/divprcp/prcplist["+j+"]/pampkspec", model.getValue("/root/main/prcp/prcplist["+i+"]/pampkspec"));
  134. model.setValue("/root/main/divprcp/prcplist["+j+"]/specdrid", model.getValue("/root/main/prcp/prcplist["+i+"]/specdrid"));
  135. if (model.getValue("/root/main/prcp/prcplist["+i+"]/spynpy1") !=""){
  136. model.makeValue("/root/main/divprcp/prcplist["+j+"]/spynpy1", model.getValue("/root/main/prcp/prcplist["+i+"]/spynpy1"));
  137. } else {
  138. model.makeValue("/root/main/divprcp/prcplist["+j+"]/spynpy1", model.getValue("/root/main/prcp/prcplist["+i+"]/insukind"));
  139. }
  140. model.setValue("/root/main/divprcp/prcplist["+j+"]/lowdrugresncd", "N"); // 디폴트로 처방 변경.
  141. }
  142. }
  143. }
  144. chk="Y";
  145. }
  146. }
  147. model.refresh();
  148. */
  149. /*
  150. if ( chk=="Y" ){ //저함량 배수 처방 존재시
  151. //model.refresh();
  152. //window.left= 400;
  153. //window.top= 300;
  154. //window.visible=true;
  155. //window.height = 420;
  156. //window.width= 860;
  157. //window.style="left:800; right:400; width:820; height:400;";
  158. } else {
  159. opener.model.removenode("/root/main/prcp");
  160. var destNode = opener.model.instances(0).selectSingleNode( "/root/main" );
  161. var srcNode = model.instances(0).selectSingleNode( "/root/main/prcp" );
  162. destNode.appendChild( srcNode );
  163. //opener.model.refresh();
  164. //window.close();
  165. }
  166. */
  167. ]]>
  168. </script>
  169. <submission id="TRADB62401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data" replace="instance" resultref="/root/main/prcp"/>
  170. <script type="javascript" ev:event="xforms-model-construct-done">
  171. <![CDATA[
  172. //처방화면 초기화시 일일 용량으로 할지 1회 용량으로 할지에 따라서 보여지는 컬럼값 변경
  173. // DB에 저장된 병원기준값을 가지고 와서 보여주는 컬럼을 셋팅한다.
  174. var colHidnValue = grdBaseColHidn("D");
  175. grdBaseColHidn(colHidnValue, "grd_divprcp", 45, "prcpvol", "prcpqty", "drprcpetc7", "drprcpetc8", 37);
  176. ]]>
  177. </script>
  178. </model>
  179. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  180. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  181. <script type="javascript" src="../../../emr/prcpmngtweb/js/MMO001.js"/>
  182. <script type="javascript" src="../../../emr/commonweb/js/EMRCommon.js"/>
  183. <script type="javascript" src="../../../ast/commonweb/js/AST.js"/>
  184. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  185. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  186. <script type="javascript" src="../../../com/departmentcodeweb/js/ZSD001.js"/>
  187. <script type="javascript" src="../../../emr/prcpmngtweb/js/SMMMO00100.js"/>
  188. <script type="javascript" src="../../../emr/prcpmngtweb/js/SMMMO00110.js"/>
  189. <script type="javascript" src="../../../com/signweb/js/ZES001.js"/>
  190. </xhtml:head>
  191. <xhtml:body pagewidth="850" pageheight="390" guideline="1,864;2,452;2,387;" style="font-size:11pt; margin-left:8; margin-top:8; margin-right:8; margin-bottom:8; ">
  192. <switch id="switch1" style="left:5px; top:5px; width:820px; height:360px; ">
  193. <case id="case1" selected="true">
  194. <caption id="caption1" class="tit_2" style="left:5px; top:5px; width:80px; height:13px; vertical-align:middle; ">원처방</caption>
  195. <caption id="caption2" class="tit_2" style="left:5px; top:176px; width:80px; height:13px; vertical-align:middle; ">변경처방</caption>
  196. <caption id="caption3" style="left:90px; top:176px; width:340px; height:15px; ">원처방대로 처방시는 아래 사유를 변경하십시오.</caption>
  197. <bool id="bool_cond1" checkvalue="Y,N" overflow="visible" appearance="full" ref="/root/init/cond1" style="left:725px; top:176px; width:20px; height:20px; border-style:none; "/>
  198. <caption id="caption4" style="left:745px; top:176px; width:50px; height:20px; ">일괄적용</caption>
  199. <datagrid id="grd_divpreprcp" nodeset="/root/main/divpreprcp/prcplist" caption="^상태^분류^종류^처방코드^처방명^1회용량^1회용량^1회수량^1회수량^횟수^일수^급비^용법/검체^MIX^전달^원내외^시행부서^희망일자^선택진료^등록일시^등록자" colsep="^" colwidth="38, 55, 50, 55, 80, 217, 45, 27, 37, 27, 40, 37, 60, 207, 38, 40, 50, 100, 100, 60, 80, 80" dataheight="23" ellipsis="true" mergecellsfixedrows="bycolrec" rowheight="23" rowsep="|" tooltip="true" navindex="1" style="left:0px; top:20px; width:795px; height:155px; focus-rect:hidden; ">
  200. <col disabled="true" ref="status" type="combo" style="left:0px; top:23px; width:38px; height:23px; text-align:center; word-wrap:word; focus-rect:visible; ">
  201. <choices>
  202. <item>
  203. <label>검색</label>
  204. <value>S</value>
  205. </item>
  206. <item>
  207. <label>신규</label>
  208. <value>I</value>
  209. </item>
  210. <item>
  211. <label>삭제</label>
  212. <value>D</value>
  213. </item>
  214. <item>
  215. <label>D/C</label>
  216. <value>C</value>
  217. </item>
  218. <item>
  219. <label>-</label>
  220. <value>-</value>
  221. </item>
  222. <item>
  223. <label>수정</label>
  224. <value>U</value>
  225. </item>
  226. </choices>
  227. </col>
  228. <col disabled="true" ref="prcpstatcd" type="combo" visibility="hidden" style="text-align:center; focus-rect:visible; ">
  229. <choices>
  230. <itemset nodeset="/root/init/prcpstatcd/M0011">
  231. <label ref="cdnm"/>
  232. <value ref="cdid"/>
  233. </itemset>
  234. </choices>
  235. </col>
  236. <col ref="prcpclscd" type="combo" visibility="hidden" style="text-align:left; focus-rect:visible; ">
  237. <choices>
  238. <itemset nodeset="/root/init/prcpclscd/M0005">
  239. <label ref="cdnm"/>
  240. <value ref="cdid"/>
  241. </itemset>
  242. </choices>
  243. </col>
  244. <col class="gridcombo" ref="prcpkindcd" type="combo" visibility="hidden" style="text-align:center; focus-rect:visible; ">
  245. <choices>
  246. <itemset nodeset="/root/init/prcpkindcd/M0003">
  247. <label ref="cdnm"/>
  248. <value ref="cdid"/>
  249. </itemset>
  250. </choices>
  251. </col>
  252. <col ref="prcpcd" type="output" style="text-align:left; focus-rect:visible; "/>
  253. <col ref="prcpnm" type="output" style="text-align:left; focus-rect:visible; "/>
  254. <col ref="drprcpetc7" type="output" format="#.#" maxlength="5.3" style="text-align:center; focus-rect:visible; "/>
  255. <col ref="prcpvolunitnm" type="output" style="text-align:center; focus-rect:visible; "/>
  256. <col ref="drprcpetc8" type="output" format="#.#" maxlength="5.3" style="text-align:center; focus-rect:visible; "/>
  257. <col ref="prcpqtyunitnm" style="text-align:center; focus-rect:visible; "/>
  258. <col ref="prcptims" type="output" format="#" style="text-align:center; focus-rect:visible; "/>
  259. <col ref="prcpdayno" type="output" format="#" style="text-align:center; focus-rect:visible; "/>
  260. <col ref="payflagcd" type="combo" visibility="hidden">
  261. <choices>
  262. <itemset nodeset="/root/init/payflagcd/M0029">
  263. <label ref="cdnm"/>
  264. <value ref="cdid"/>
  265. </itemset>
  266. </choices>
  267. </col>
  268. <col ref="drugmthdspccdnm" type="output" visibility="visible" style="focus-rect:visible; "/>
  269. <col ref="prcpmixno" visibility="visible" style="focus-rect:visible; "/>
  270. <col ref="prcpdelivefact" visibility="hidden" style="focus-rect:visible; "/>
  271. <col disabled="true" ref="hosinhosoutflag" type="combo" visibility="hidden" style="text-align:center; focus-rect:visible; ">
  272. <choices>
  273. <item>
  274. <label>원내</label>
  275. <value>I</value>
  276. </item>
  277. <item>
  278. <label>원외</label>
  279. <value>O</value>
  280. </item>
  281. <item>
  282. <label/>
  283. <value/>
  284. </item>
  285. </choices>
  286. </col>
  287. <col class="gridcombo" disabled="true" ref="prcpexecdeptcd" type="combo" visibility="hidden" style="focus-rect:visible; ">
  288. <choices>
  289. <itemset nodeset="/root/orddept/dept">
  290. <label ref="depthngnm"/>
  291. <value ref="deptcd"/>
  292. </itemset>
  293. </choices>
  294. </col>
  295. <col ref="prcphopedd" type="inputdate" visibility="hidden" format="yyyy-mm-dd" style="text-align:center; focus-rect:visible; "/>
  296. <col checkvalue="Y,N" ref="choiordflag" type="checkbox" visibility="hidden" style="focus-rect:visible; "/>
  297. <col ref="rgsttm" visibility="hidden" format="yyyy-mm-dd"/>
  298. <col ref="rgstridnm" visibility="hidden"/>
  299. </datagrid>
  300. <datagrid id="grd_divprcp" nodeset="/root/main/divprcp/prcplist" caption="^상태^분류^종류^처방코드^처방명^1회용량^1회용량^1회용량^1회수량^1회수량^1회수량^횟수^일수^급비^용법/검체^MIX^전달^원내외^시행부서^희망일자^선택진료^등록일시^등록자^사유^직접입력" colsep="^" colwidth="38, 55, 50, 55, 80, 216, 45, 45, 27, 37, 37, 27, 40, 37, 60, 153, 38, 40, 50, 100, 100, 60, 80, 80, 245, 234" dataheight="23" ellipsis="true" mergecellsfixedrows="bycolrec" rowheight="23" rowsep="|" tooltip="true" navindex="1" style="left:0px; top:195px; width:795px; height:155px; focus-rect:hidden; ">
  301. <col disabled="true" ref="status" type="combo" style="left:0px; top:23px; width:38px; height:23px; text-align:center; word-wrap:word; focus-rect:visible; ">
  302. <choices>
  303. <item>
  304. <label>검색</label>
  305. <value>S</value>
  306. </item>
  307. <item>
  308. <label>신규</label>
  309. <value>I</value>
  310. </item>
  311. <item>
  312. <label>삭제</label>
  313. <value>D</value>
  314. </item>
  315. <item>
  316. <label>D/C</label>
  317. <value>C</value>
  318. </item>
  319. <item>
  320. <label>-</label>
  321. <value>-</value>
  322. </item>
  323. <item>
  324. <label>수정</label>
  325. <value>U</value>
  326. </item>
  327. </choices>
  328. </col>
  329. <col disabled="true" ref="prcpstatcd" type="combo" visibility="hidden" style="text-align:center; focus-rect:visible; ">
  330. <choices>
  331. <itemset nodeset="/root/init/prcpstatcd/M0011">
  332. <label ref="cdnm"/>
  333. <value ref="cdid"/>
  334. </itemset>
  335. </choices>
  336. </col>
  337. <col ref="prcpclscd" type="combo" visibility="hidden" style="text-align:left; focus-rect:visible; ">
  338. <choices>
  339. <itemset nodeset="/root/init/prcpclscd/M0005">
  340. <label ref="cdnm"/>
  341. <value ref="cdid"/>
  342. </itemset>
  343. </choices>
  344. </col>
  345. <col class="gridcombo" ref="prcpkindcd" type="combo" visibility="hidden" style="text-align:center; focus-rect:visible; ">
  346. <choices>
  347. <itemset nodeset="/root/init/prcpkindcd/M0003">
  348. <label ref="cdnm"/>
  349. <value ref="cdid"/>
  350. </itemset>
  351. </choices>
  352. </col>
  353. <col ref="prcpcd" type="output" style="text-align:left; focus-rect:visible; "/>
  354. <col ref="prcpnm" type="output" style="text-align:left; focus-rect:visible; "/>
  355. <col ref="prcpvol" type="output" format="#.#" maxlength="5.3" style="text-align:center; focus-rect:visible; "/>
  356. <col ref="drprcpetc7" type="output" format="#.#" maxlength="5.3" style="text-align:center; focus-rect:visible; "/>
  357. <col ref="prcpvolunitnm" type="output" style="text-align:center; focus-rect:visible; "/>
  358. <col ref="prcpqty" type="output" format="#.#" maxlength="5.3" style="text-align:center; focus-rect:visible; "/>
  359. <col ref="drprcpetc8" type="output" format="#.#" maxlength="5.3" style="text-align:center; focus-rect:visible; "/>
  360. <col ref="prcpqtyunitnm" style="text-align:center; focus-rect:visible; "/>
  361. <col ref="prcptims" type="output" format="#" style="text-align:center; focus-rect:visible; "/>
  362. <col ref="prcpdayno" type="output" format="#" style="text-align:center; focus-rect:visible; "/>
  363. <col ref="payflagcd" type="combo" visibility="hidden">
  364. <choices>
  365. <itemset nodeset="/root/init/payflagcd/M0029">
  366. <label ref="cdnm"/>
  367. <value ref="cdid"/>
  368. </itemset>
  369. </choices>
  370. </col>
  371. <col ref="drugmthdspccdnm" type="output" visibility="hidden" style="focus-rect:visible; "/>
  372. <col ref="prcpmixno" visibility="hidden" style="focus-rect:visible; "/>
  373. <col ref="prcpdelivefact" visibility="hidden" style="focus-rect:visible; "/>
  374. <col disabled="true" ref="hosinhosoutflag" type="combo" visibility="hidden" style="text-align:center; focus-rect:visible; ">
  375. <choices>
  376. <item>
  377. <label>원내</label>
  378. <value>I</value>
  379. </item>
  380. <item>
  381. <label>원외</label>
  382. <value>O</value>
  383. </item>
  384. <item>
  385. <label/>
  386. <value/>
  387. </item>
  388. </choices>
  389. </col>
  390. <col class="gridcombo" disabled="true" ref="prcpexecdeptcd" type="combo" visibility="hidden" style="focus-rect:visible; ">
  391. <choices>
  392. <itemset nodeset="/root/orddept/dept">
  393. <label ref="depthngnm"/>
  394. <value ref="deptcd"/>
  395. </itemset>
  396. </choices>
  397. </col>
  398. <col ref="prcphopedd" type="inputdate" visibility="hidden" format="yyyy-mm-dd" style="text-align:center; focus-rect:visible; "/>
  399. <col checkvalue="Y,N" ref="choiordflag" type="checkbox" visibility="hidden" style="focus-rect:visible; "/>
  400. <col ref="rgsttm" visibility="hidden" format="yyyy-mm-dd"/>
  401. <col ref="rgstridnm" visibility="hidden"/>
  402. <col ref="lowdrugresncd" type="combo">
  403. <choices>
  404. <item>
  405. <label>-변경처방사용</label>
  406. <value>N</value>
  407. </item>
  408. <item>
  409. <label>용량 조절(titration) 중인 의약품</label>
  410. <value>A</value>
  411. </item>
  412. <item>
  413. <label>환자의 자가 조절이 필요한 의약품</label>
  414. <value>B</value>
  415. </item>
  416. <item>
  417. <label>투여시기 마다 1회 투약량을 달리하는 경우</label>
  418. <value>C</value>
  419. </item>
  420. <item>
  421. <label>처방전 발행의사에게 고함량 의약품으로의 처방변경이 불가능함</label>
  422. <value>D</value>
  423. </item>
  424. <item>
  425. <label>기타 환자상태 등 고려 배수 조제가 불가피한 경우</label>
  426. <value>E</value>
  427. </item>
  428. </choices>
  429. </col>
  430. <col ref="lowdrugresnetcfact" type="input" visibility="hidden"/>
  431. <script type="javascript" ev:event="xforms-value-changed">
  432. <![CDATA[
  433. if ( grd_divprcp.col == grd_divprcp.colRef("lowdrugresncd") ){
  434. var cond1 = model.getValue("/root/init/cond1");
  435. var temp = model.getValue("/root/main/divprcp/prcplist["+(grd_divprcp.row)+"]/tempcol11");
  436. var lowdrugresncd = model.getValue("/root/main/divprcp/prcplist["+(grd_divprcp.row)+"]/lowdrugresncd");
  437. var lowdrugresnetcfact = model.getValue("/root/main/divprcp/prcplist["+(grd_divprcp.row)+"]/lowdrugresnetcfact");
  438. var srcNodeList = model.instances(0).selectNodes("/root/main/divprcp/prcplist" );
  439. for ( var i =1; i<= srcNodeList.length;i++){ //원처방 사유 선택시
  440. if (("Y" == cond1) || (temp == model.getValue("/root/main/divprcp/prcplist["+i+"]/tempcol11"))){
  441. model.setValue("/root/main/divprcp/prcplist["+i+"]/lowdrugresncd", lowdrugresncd);
  442. model.setValue("/root/main/divprcp/prcplist["+i+"]/lowdrugresnetcfact", lowdrugresnetcfact);
  443. }
  444. }
  445. model.refresh();
  446. }
  447. ]]>
  448. </script>
  449. </datagrid>
  450. </case>
  451. <case id="case2">
  452. <datagrid id="grd_targetprcplist" nodeset="/root/main/srcprcp/prcplist" caption="^상태^분류^종류^처방코드^처방명^총용량^총용량^수량^수량^횟수^일수^급비^용법/검체^MIX^전달^원내외^시행부서^희망일자^선택진료^등록일시^등록자" colsep="^" colwidth="38, 55, 50, 55, 80, 260, 45, 27, 37, 27, 40, 37, 60, 153, 38, 40, 50, 100, 100, 60, 80, 80" dataheight="23" ellipsis="true" mergecellsfixedrows="bycolrec" rowheight="23" rowsep="|" tooltip="true" navindex="1" style="left:0px; top:0px; width:795px; height:155px; focus-rect:hidden; ">
  453. <col disabled="true" ref="status" type="combo" style="left:0px; top:23px; width:38px; height:23px; text-align:center; word-wrap:word; focus-rect:visible; ">
  454. <choices>
  455. <item>
  456. <label>검색</label>
  457. <value>S</value>
  458. </item>
  459. <item>
  460. <label>신규</label>
  461. <value>I</value>
  462. </item>
  463. <item>
  464. <label>삭제</label>
  465. <value>D</value>
  466. </item>
  467. <item>
  468. <label>D/C</label>
  469. <value>C</value>
  470. </item>
  471. <item>
  472. <label>-</label>
  473. <value>-</value>
  474. </item>
  475. <item>
  476. <label>수정</label>
  477. <value>U</value>
  478. </item>
  479. </choices>
  480. </col>
  481. <col disabled="true" ref="prcpstatcd" type="combo" visibility="hidden" style="text-align:center; focus-rect:visible; ">
  482. <choices>
  483. <itemset nodeset="/root/init/prcpstatcd/M0011">
  484. <label ref="cdnm"/>
  485. <value ref="cdid"/>
  486. </itemset>
  487. </choices>
  488. </col>
  489. <col ref="prcpclscd" type="combo" visibility="hidden" style="text-align:left; focus-rect:visible; ">
  490. <choices>
  491. <itemset nodeset="/root/init/prcpclscd/M0005">
  492. <label ref="cdnm"/>
  493. <value ref="cdid"/>
  494. </itemset>
  495. </choices>
  496. </col>
  497. <col class="gridcombo" ref="prcpkindcd" type="combo" style="text-align:center; focus-rect:visible; ">
  498. <choices>
  499. <itemset nodeset="/root/init/prcpkindcd/M0003">
  500. <label ref="cdnm"/>
  501. <value ref="cdid"/>
  502. </itemset>
  503. </choices>
  504. </col>
  505. <col ref="prcpcd" type="input" style="text-align:left; focus-rect:visible; "/>
  506. <col ref="prcpnm" type="input" style="text-align:left; focus-rect:visible; "/>
  507. <col ref="prcpvol" type="input" format="#.#" maxlength="5.3" style="text-align:center; focus-rect:visible; "/>
  508. <col ref="prcpvolunitnm" type="output" style="text-align:center; focus-rect:visible; "/>
  509. <col ref="prcpqty" type="input" format="#.#" maxlength="5.3" style="text-align:center; focus-rect:visible; "/>
  510. <col ref="prcpqtyunitnm" style="text-align:center; focus-rect:visible; "/>
  511. <col ref="prcptims" type="input" format="#" style="text-align:center; focus-rect:visible; "/>
  512. <col ref="prcpdayno" type="input" format="#" style="text-align:center; focus-rect:visible; "/>
  513. <col ref="payflagcd" type="combo">
  514. <choices>
  515. <itemset nodeset="/root/init/payflagcd/M0029">
  516. <label ref="cdnm"/>
  517. <value ref="cdid"/>
  518. </itemset>
  519. </choices>
  520. </col>
  521. <col ref="drugmthdspccdnm" type="output" style="focus-rect:visible; "/>
  522. <col ref="prcpmixno" style="focus-rect:visible; "/>
  523. <col ref="prcpdelivefact" style="focus-rect:visible; "/>
  524. <col disabled="true" ref="hosinhosoutflag" type="combo" style="text-align:center; focus-rect:visible; ">
  525. <choices>
  526. <item>
  527. <label>원내</label>
  528. <value>I</value>
  529. </item>
  530. <item>
  531. <label>원외</label>
  532. <value>O</value>
  533. </item>
  534. <item>
  535. <label/>
  536. <value/>
  537. </item>
  538. </choices>
  539. </col>
  540. <col class="gridcombo" disabled="true" ref="prcpexecdeptcd" type="combo" style="focus-rect:visible; ">
  541. <choices>
  542. <itemset nodeset="/root/orddept/dept">
  543. <label ref="depthngnm"/>
  544. <value ref="deptcd"/>
  545. </itemset>
  546. </choices>
  547. </col>
  548. <col ref="prcphopedd" type="inputdate" format="yyyy-mm-dd" style="text-align:center; focus-rect:visible; "/>
  549. <col checkvalue="Y,N" ref="choiordflag" type="checkbox" style="focus-rect:visible; "/>
  550. <col ref="rgsttm" visibility="hidden" format="yyyy-mm-dd"/>
  551. <col ref="rgstridnm" visibility="hidden"/>
  552. </datagrid>
  553. <datagrid id="grd_prcplist" nodeset="/root/main/prcp/prcplist" caption="^상태^분류^종류^처방코드^처방명^총용량^총용량^수량^수량^횟수^일수^급비^용법/검체^MIX^전달^원내외^시행부서^희망일자^선택진료^등록일시^등록자" colsep="^" colwidth="38, 55, 50, 55, 80, 260, 45, 27, 37, 27, 40, 37, 60, 153, 38, 40, 50, 100, 100, 60, 80, 80" dataheight="23" ellipsis="true" mergecellsfixedrows="bycolrec" rowheight="23" rowsep="|" tooltip="true" navindex="1" style="left:0px; top:165px; width:795px; height:155px; focus-rect:hidden; ">
  554. <col disabled="true" ref="status" type="combo" style="left:0px; top:23px; width:38px; height:23px; text-align:center; word-wrap:word; focus-rect:visible; ">
  555. <choices>
  556. <item>
  557. <label>검색</label>
  558. <value>S</value>
  559. </item>
  560. <item>
  561. <label>신규</label>
  562. <value>I</value>
  563. </item>
  564. <item>
  565. <label>삭제</label>
  566. <value>D</value>
  567. </item>
  568. <item>
  569. <label>D/C</label>
  570. <value>C</value>
  571. </item>
  572. <item>
  573. <label>-</label>
  574. <value>-</value>
  575. </item>
  576. <item>
  577. <label>수정</label>
  578. <value>U</value>
  579. </item>
  580. </choices>
  581. </col>
  582. <col disabled="true" ref="prcpstatcd" type="combo" visibility="hidden" style="text-align:center; focus-rect:visible; ">
  583. <choices>
  584. <itemset nodeset="/root/init/prcpstatcd/M0011">
  585. <label ref="cdnm"/>
  586. <value ref="cdid"/>
  587. </itemset>
  588. </choices>
  589. </col>
  590. <col ref="prcpclscd" type="combo" visibility="hidden" style="text-align:left; focus-rect:visible; ">
  591. <choices>
  592. <itemset nodeset="/root/init/prcpclscd/M0005">
  593. <label ref="cdnm"/>
  594. <value ref="cdid"/>
  595. </itemset>
  596. </choices>
  597. </col>
  598. <col class="gridcombo" ref="prcpkindcd" type="combo" style="text-align:center; focus-rect:visible; ">
  599. <choices>
  600. <itemset nodeset="/root/init/prcpkindcd/M0003">
  601. <label ref="cdnm"/>
  602. <value ref="cdid"/>
  603. </itemset>
  604. </choices>
  605. </col>
  606. <col ref="prcpcd" type="input" style="text-align:left; focus-rect:visible; "/>
  607. <col ref="prcpnm" type="input" style="text-align:left; focus-rect:visible; "/>
  608. <col ref="prcpvol" type="input" format="#.#" maxlength="5.3" style="text-align:center; focus-rect:visible; "/>
  609. <col ref="prcpvolunitnm" type="output" style="text-align:center; focus-rect:visible; "/>
  610. <col ref="prcpqty" type="input" format="#.#" maxlength="5.3" style="text-align:center; focus-rect:visible; "/>
  611. <col ref="prcpqtyunitnm" style="text-align:center; focus-rect:visible; "/>
  612. <col ref="prcptims" type="input" format="#" style="text-align:center; focus-rect:visible; "/>
  613. <col ref="prcpdayno" type="input" format="#" style="text-align:center; focus-rect:visible; "/>
  614. <col ref="payflagcd" type="combo">
  615. <choices>
  616. <itemset nodeset="/root/init/payflagcd/M0029">
  617. <label ref="cdnm"/>
  618. <value ref="cdid"/>
  619. </itemset>
  620. </choices>
  621. </col>
  622. <col ref="drugmthdspccdnm" type="output" style="focus-rect:visible; "/>
  623. <col ref="prcpmixno" style="focus-rect:visible; "/>
  624. <col ref="prcpdelivefact" style="focus-rect:visible; "/>
  625. <col disabled="true" ref="hosinhosoutflag" type="combo" style="text-align:center; focus-rect:visible; ">
  626. <choices>
  627. <item>
  628. <label>원내</label>
  629. <value>I</value>
  630. </item>
  631. <item>
  632. <label>원외</label>
  633. <value>O</value>
  634. </item>
  635. <item>
  636. <label/>
  637. <value/>
  638. </item>
  639. </choices>
  640. </col>
  641. <col class="gridcombo" disabled="true" ref="prcpexecdeptcd" type="combo" style="focus-rect:visible; ">
  642. <choices>
  643. <itemset nodeset="/root/orddept/dept">
  644. <label ref="depthngnm"/>
  645. <value ref="deptcd"/>
  646. </itemset>
  647. </choices>
  648. </col>
  649. <col ref="prcphopedd" type="inputdate" format="yyyy-mm-dd" style="text-align:center; focus-rect:visible; "/>
  650. <col checkvalue="Y,N" ref="choiordflag" type="checkbox" style="focus-rect:visible; "/>
  651. <col ref="rgsttm" visibility="hidden" format="yyyy-mm-dd"/>
  652. <col ref="rgstridnm" visibility="hidden"/>
  653. </datagrid>
  654. </case>
  655. </switch>
  656. <button id="button23" class="btn4_letter2" style="left:770px; top:366px; width:56px; height:22px; ">
  657. <caption>확인</caption>
  658. <script type="javascript" ev:event="DOMActivate">
  659. <![CDATA[
  660. var iRow=0;
  661. var temp ="";
  662. var arrTempcol11;
  663. for ( var i =0; i< grd_divprcp.rows ;i++){
  664. if (model.getValue("/root/main/divprcp/prcplist["+i+"]/prcpcd") !=""){
  665. arrTempcol11 = (model.getValue("/root/main/divprcp/prcplist["+i+"]/tempcol11") ).split("|");
  666. if ( model.getValue("/root/main/divprcp/prcplist["+i+"]/lowdrugresncd") !="N" && model.getValue("/root/main/divprcp/prcplist["+i+"]/lowdrugresncd") !="" ) {
  667. //원처방 사유 선택시
  668. for ( var k = 0; k< opener.grd_prcplist.rows; k++){ //변경 처방 제거
  669. if ( arrTempcol11[1] == opener.model.getValue("/root/main/prcp/prcplist["+k+"]/prcpcd" )){
  670. iRow =k;
  671. }
  672. }
  673. //원처방으로 추가
  674. opener.model.setValue("/root/main/prcp/prcplist["+iRow+"]/lowdrugresncd", model.getValue("/root/main/divprcp/prcplist["+i+"]/lowdrugresncd"));
  675. opener.model.setValue("/root/main/prcp/prcplist["+iRow+"]/lowdrugresnetcfact", model.getValue("/root/main/divprcp/prcplist["+i+"]/lowdrugresnetcfact"));
  676. } else { //변경처방사용시
  677. for ( var j = 0; j< opener.grd_prcplist.rows; j++){ //변경 처방 제거
  678. if ( arrTempcol11[1]== opener.model.getValue("/root/main/prcp/prcplist["+j+"]/prcpcd" ) ){
  679. opener.grd_prcplist.deleteRow(j,false);
  680. iRow =j;
  681. }
  682. }
  683. //원처방으로 추가
  684. var destNode = opener.model.instances(0).selectSingleNode( "/root/main/prcp" );
  685. if( opener.grd_prcplist.rows > 1 && iRow != 0) { // CP 처방 화면에서 검색 행이 없어서 에러 발생함. 수정. 2012.09.13 엄영만
  686. model.duplicate( destNode, "/root/main/divprcp/prcplist" + "[" + (i) + "]", "*[" + (iRow) + "]");
  687. } else {
  688. model.duplicate( destNode, "/root/main/divprcp/prcplist" + "[" + (i) + "]");
  689. }
  690. }
  691. }
  692. }
  693. opener.model.refresh();
  694. window.close();
  695. ]]>
  696. </script>
  697. </button>
  698. </xhtml:body>
  699. </xhtml:html>