SMADT10300_병동집계표출력.xrw 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849
  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>Untitle</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <sumlist>
  11. <suminfo>
  12. <groupcd/>
  13. <prcpcd/>
  14. <prcpnm/>
  15. <sumqty/>
  16. </suminfo>
  17. </sumlist>
  18. <prcplist>
  19. <prcpinfo>
  20. <flag1/>
  21. <flag2/>
  22. <flag3/>
  23. <pid/>
  24. <hngnm/>
  25. <orddeptcd/>
  26. <depthngnm/>
  27. <roomcd/>
  28. <groupcd/>
  29. <prcpcd/>
  30. <prcpnm/>
  31. <prcpqty/>
  32. <prcptims/>
  33. <prcpdayno/>
  34. <totqty/>
  35. <prcpdd/>
  36. <rtndd/>
  37. </prcpinfo>
  38. </prcplist>
  39. <sumterm>
  40. <suminfo>
  41. <sumflag/>
  42. <sumdt/>
  43. <sumfromdd/>
  44. <sumfromtm/>
  45. <sumtodd/>
  46. <sumtotm/>
  47. <sumnm/>
  48. </suminfo>
  49. </sumterm>
  50. </main>
  51. <send>
  52. <srchdata>
  53. <deptflag/>
  54. <drugflag>1 2</drugflag>
  55. <prcpflag>1 2 3</prcpflag>
  56. <srchfromdd/>
  57. <srchtodd/>
  58. <srchorddeptcd/>
  59. <srchprcpcd/>
  60. <udsflag>N</udsflag>
  61. <prcpkindcd>T</prcpkindcd>
  62. <sumdt/>
  63. <srchorddeptflag/>
  64. <sumdeptcd/>
  65. <srchflag>T</srchflag>
  66. <srchdeptcd/>
  67. </srchdata>
  68. </send>
  69. <init>
  70. <orddept>
  71. <dept>
  72. <chk/>
  73. <deptcd/>
  74. <depthngnm/>
  75. <orddeptflag/>
  76. <sumkind/>
  77. </dept>
  78. </orddept>
  79. <sumorddept>
  80. <dept>
  81. <chk/>
  82. <deptcd/>
  83. <depthngnm/>
  84. <orddeptflag/>
  85. <sumkind/>
  86. </dept>
  87. </sumorddept>
  88. </init>
  89. <hidden>
  90. <popupmenu>
  91. <menu>
  92. <label>전체선택</label>
  93. <func>fAllCheck</func>
  94. </menu>
  95. <menu>
  96. <label>전체선택해제</label>
  97. <func>fAllCheckDel</func>
  98. </menu>
  99. </popupmenu>
  100. </hidden>
  101. <temp>
  102. <ret/>
  103. <sumrslt>
  104. <sumdt/>
  105. </sumrslt>
  106. <prntinfo>
  107. <sumflagnm>주사</sumflagnm>
  108. <wardnm>외래주사실</wardnm>
  109. <sumfromdd>20070901</sumfromdd>
  110. <sumfromtm>0000</sumfromtm>
  111. <sumtodd>20070930</sumtodd>
  112. <sumtotm>2400</sumtotm>
  113. <sumflag/>
  114. <usetype/>
  115. <sumdt/>
  116. </prntinfo>
  117. <prntprcpinfo>
  118. <suminfo>
  119. <wardnm/>
  120. <prcpcd/>
  121. <prcpnm/>
  122. <prcpflag/>
  123. <sumqty/>
  124. <keepmthdyn/>
  125. <keepmthd/>
  126. <divflag/>
  127. </suminfo>
  128. <sumtitle>
  129. <drugtype/>
  130. <drugcd/>
  131. <hngnm/>
  132. <sumqty/>
  133. <spcltype/>
  134. </sumtitle>
  135. <expnlist>
  136. <prcpdd/>
  137. <drugcd/>
  138. <drugnm/>
  139. <drugno/>
  140. <roomcd/>
  141. <orddeptnm/>
  142. <pid/>
  143. <hngnm/>
  144. <prcpqty/>
  145. <prcpdayno/>
  146. <sumqty/>
  147. </expnlist>
  148. </prntprcpinfo>
  149. <prntudsinfo>
  150. <injinfo>
  151. <roomcd/>
  152. <hngnm/>
  153. <pid/>
  154. <drugno/>
  155. <drugcd/>
  156. <prcpqty/>
  157. <prcptims/>
  158. <drugtype/>
  159. <prcpcd/>
  160. <sumqty/>
  161. </injinfo>
  162. <exuinfo>
  163. <roomcd/>
  164. <hngnm/>
  165. <pid/>
  166. <drugno/>
  167. <drugcd/>
  168. <prcpqty/>
  169. <prcptims/>
  170. <drugtype/>
  171. <prcpcd/>
  172. <sumqty/>
  173. </exuinfo>
  174. <ptpinfo>
  175. <roomcd/>
  176. <hngnm/>
  177. <pid/>
  178. <drugno/>
  179. <drugcd/>
  180. <prcpqty/>
  181. <prcptims/>
  182. <drugtype/>
  183. <prcpcd/>
  184. <sumqty/>
  185. </ptpinfo>
  186. </prntudsinfo>
  187. <prntpatprcp>
  188. <prcpdrug>
  189. <roomcd/>
  190. <hngnm/>
  191. <pid/>
  192. <rrgstno/>
  193. <sna/>
  194. <drugno/>
  195. <drugcd/>
  196. <prcpvol/>
  197. <prcpqty/>
  198. <prcptims/>
  199. <prcpkindcd/>
  200. <drughngnm/>
  201. <prcpdayno/>
  202. <mthdcnts/>
  203. </prcpdrug>
  204. </prntpatprcp>
  205. <deptcd/>
  206. </temp>
  207. </root>
  208. </instance>
  209. <script type="javascript" ev:event="xforms-ready">
  210. <![CDATA[
  211. grd_deptlist.fixedcellcheckbox(0,0) = true;
  212. model.setValue("/root/send/srchdata/srchfromdd", getCurrentDate());
  213. model.setValue("/root/send/srchdata/srchtodd", getCurrentDate());
  214. //rdo_srchflag.dispatch("xforms-value-changed")
  215. model.refresh();
  216. if ( model.getValue("/root/temp/deptcd") !=""){
  217. grd_deptlist.visible=false;
  218. }
  219. ]]>
  220. </script>
  221. <script type="javascript">
  222. <![CDATA[
  223. var gv_deptflag="";
  224. function fSelDeptflag(){
  225. // 진료과
  226. chk_deptcd.visible=true;
  227. var deptflag = model.getValue("/root/send/srchdata/deptflag");
  228. if(deptflag != ""){
  229. if (deptflag.indexOf("W") >-1 ){
  230. rdo_prcp.visible=true;
  231. } else {
  232. rdo_prcp.visible=false;
  233. }
  234. submit("TRADT10301");
  235. //model.setValue("/root/send/srchdata/srchdeptcd", "");
  236. var srchdeptcd = model.GetValue("/root/send/srchdata/srchdeptcd");
  237. var tmp_deptflag = deptflag.split(" ");
  238. for(i=0; i < tmp_deptflag.length; i++){
  239. if(!isSearchString(gv_deptflag, tmp_deptflag[i])){
  240. if(srchdeptcd != "" ) srchdeptcd += "|"; // 데이터 연결을 위한 구분자 삽입
  241. for(var j = 1; j <= getNodesetCount("/root/init/orddept/dept"); j++){
  242. if(model.getValue("/root/init/orddept/dept["+j+"]/orddeptflag") == tmp_deptflag[i]){ // 부서구분이 같은 상세부서만..
  243. srchdeptcd += model.getValue("/root/init/orddept/dept["+j+"]/deptcd")+"|";
  244. //if(j != getNodesetCount("/root/init/orddept/dept")+1) srchdeptcd += "|"; // 가장 마지막은 구분자 삽입하지 않음.
  245. }
  246. model.setValue("/root/init/orddept/dept["+j+"]/chk", "Y");
  247. }
  248. }
  249. }
  250. srchdeptcd = srchdeptcd.substr(0,parseInt(srchdeptcd.length)-1); // 마지막 구분자는 삭제
  251. model.setValue("/root/send/srchdata/srchdeptcd", srchdeptcd);
  252. gv_deptflag = deptflag; // 이전 선택된 부서구분을 위한 비교변수 설정
  253. }
  254. model.refresh();
  255. }
  256. function fAllCheck(){
  257. model.setValue("/root/send/srchdata/srchdeptcd", "");
  258. var srchdeptcd = "";
  259. for(var i = 1; i <= getNodesetCount("/root/init/orddept/dept"); i++){
  260. srchdeptcd += model.getValue("/root/init/orddept/dept["+i+"]/deptcd")+"|";
  261. }
  262. srchdeptcd = srchdeptcd.substr(0,parseInt(srchdeptcd.length)-1); // 마지막 구분자는 삭제
  263. model.setValue("/root/send/srchdata/srchdeptcd", srchdeptcd);
  264. model.refresh();
  265. }
  266. function fAllCheckDel(){
  267. model.setValue("/root/send/srchdata/srchdeptcd", "");
  268. model.refresh();
  269. }
  270. ]]>
  271. </script>
  272. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  273. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  274. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  275. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  276. <script type="javascript" src="../../../com/departmentcodeweb/js/ZSD001.js"/>
  277. <submission id="TRADT10301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdata" replace="instance" resultref="/root/init/orddept"/>
  278. <submission id="TRADT10302" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdata" replace="instance" resultref="/root/main/sumlist"/>
  279. <submission id="TRADT10304" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdata" replace="instance" resultref="/root/main/sumterm"/>
  280. <submission id="TRADT10305" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdata" replace="instance" resultref="/root/main/sumlist"/>
  281. <submission id="TRADT10306" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdata" replace="instance" resultref="/root/init/orddept"/>
  282. <submission id="TRADT10307" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdata" replace="instance" resultref="/root/main/prcplist"/>
  283. <submission id="TRADT10309" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdata" replace="instance" resultref="/root/temp/prntprcpinfo"/>
  284. <submission id="TRADT10310" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdata" resultref="/root/init/sumorddept"/>
  285. <submission id="TRADT10312" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdata" replace="instance" resultref="/root/temp/prntudsinfo"/>
  286. <submission id="TRADT10313" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdata" replace="instance" resultref="/root/temp/prntpatprcp"/>
  287. <submission id="TRADT10314" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdata" replace="instance" resultref="/root/temp/prntprcpinfo"/>
  288. <submission id="TXADT10301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdata" replace="instance" resultref="/root/temp/ret"/>
  289. <submission id="TXADT10302" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdata" replace="instance" add="bottom" resultref="/root/temp/ret"/>
  290. </model>
  291. </xhtml:head>
  292. <xhtml:body pagewidth="1211" pageheight="784" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  293. <group id="group1" style="left:0px; top:0px; width:1194px; height:13px; ">
  294. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:800px; height:14px; ">약국 집계 조회/출력</caption>
  295. </group>
  296. <group id="group3" scroll="auto" style="left:0px; top:40px; width:1194px; height:742px; ">
  297. <datagrid id="grd_drugsum" nodeset="/root/main/sumterm/suminfo" caption="집계구분^집계일시^집계구간^집계구간^집계구간^집계구간^집계자" colsep="^" colwidth="241, 116, 68, 34, 68, 34, 66" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:609px; top:0px; width:584px; height:160px; ">
  298. <col ref="sumflag"/>
  299. <col ref="sumdt" format="yyyy-mm-dd hh:nn:ss"/>
  300. <col ref="sumfromdd" format="yyyy-mm-dd"/>
  301. <col ref="sumfromtm" format="hh:nn"/>
  302. <col ref="sumtodd" format="yyyy-mm-dd"/>
  303. <col ref="sumtotm" format="hh:nn"/>
  304. <col ref="sumnm"/>
  305. <script type="javascript" ev:event="onclick">
  306. <![CDATA[
  307. model.setValue("/root/temp/prntinfo/sumflag", model.getValue("/root/main/sumterm/suminfo["+grd_drugsum.row+"]/sumflag"));
  308. model.setValue("/root/temp/prntinfo/sumfromdd", model.getValue("/root/main/sumterm/suminfo["+grd_drugsum.row+"]/sumfromdd"));
  309. model.setValue("/root/temp/prntinfo/sumfromtm", model.getValue("/root/main/sumterm/suminfo["+grd_drugsum.row+"]/sumfromtm"));
  310. model.setValue("/root/temp/prntinfo/sumtodd", model.getValue("/root/main/sumterm/suminfo["+grd_drugsum.row+"]/sumtodd"));
  311. model.setValue("/root/temp/prntinfo/sumtotm", model.getValue("/root/main/sumterm/suminfo["+grd_drugsum.row+"]/sumtotm"));
  312. model.setValue("/root/temp/prntinfo/sumdt", model.getValue("/root/main/sumterm/suminfo["+grd_drugsum.row+"]/sumdt"));
  313. model.setValue("/root/send/srchdata/sumdt", model.getValue("/root/main/sumterm/suminfo["+grd_drugsum.row+"]/sumdt"));
  314. submit("TRADT10310");
  315. model.setValue("/root/send/srchdata/srchorddeptcd", model.getValue("/root/init/sumorddept/dept[1]/deptcd"));
  316. model.setValue("/root/send/srchdata/srchorddeptflag", model.getValue("/root/init/sumorddept/dept[1]/orddeptflag"));
  317. submit("TRADT10305");
  318. model.setValue("/root/send/srchdata/srchprcpcd", model.getValue("/root/main/sumlist/suminfo[1]/prcpcd"));
  319. submit("TRADT10307");
  320. ]]>
  321. </script>
  322. <script type="javascript" ev:event="onaftersort">
  323. <![CDATA[
  324. grd_drugsum.gridToInstance();
  325. ]]>
  326. </script>
  327. </datagrid>
  328. <datagrid id="grd_deptlist" nodeset="/root/init/sumorddept/dept" caption="^코드^부서" colsep="^" colwidth="25, 93, 234" explorerbar="sortshow" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowsep="|" style="left:2px; top:170px; width:375px; height:245px; ">
  329. <col checkvalue="Y,N" ref="chk" type="checkbox"/>
  330. <col ref="deptcd"/>
  331. <col ref="depthngnm"/>
  332. <script type="javascript" ev:event="onclick">
  333. <![CDATA[
  334. if ( ! isDataCell() ) return;
  335. model.setValue("/root/send/srchdata/srchorddeptcd", model.getValue("/root/init/sumorddept/dept["+grd_deptlist.row+"]/deptcd"));
  336. model.setValue("/root/send/srchdata/srchorddeptflag", model.getValue("/root/init/sumorddept/dept["+grd_deptlist.row+"]/orddeptflag"));
  337. submit("TRADT10305");
  338. model.setValue("/root/send/srchdata/srchprcpcd", model.getValue("/root/main/sumlist/suminfo[1]/prcpcd"));
  339. submit("TRADT10307");
  340. ]]>
  341. </script>
  342. <script type="javascript" ev:event="onaftersort">
  343. <![CDATA[
  344. grd_deptlist.gridToInstance();
  345. ]]>
  346. </script>
  347. </datagrid>
  348. <line id="line1" class="line_1" style="x1:0px; y1:162px; x2:1194px; y2:162px; "/>
  349. <datagrid id="grd_sumlist" nodeset="/root/main/sumlist/suminfo" class="datagrid2" caption="Group코드^처방코드^처방명^총불출수량" colsep="^" colwidth="89, 89, 120, 49" explorerbar="sortshow" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:2px; top:420px; width:375px; height:320px; ">
  350. <col ref="groupcd"/>
  351. <col ref="prcpcd"/>
  352. <col ref="prcpnm"/>
  353. <col ref="sumqty" style="text-align:right; "/>
  354. <script type="javascript" ev:event="onclick">
  355. <![CDATA[
  356. if ( ! isDataCell() ) return;
  357. model.setValue("/root/send/srchdata/srchprcpcd", model.getValue("/root/main/sumlist/suminfo["+grd_sumlist.row+"]/prcpcd"));
  358. submit("TRADT10307");
  359. ]]>
  360. </script>
  361. <script type="javascript" ev:event="onaftersort">
  362. <![CDATA[
  363. grd_sumlist.gridToInstance();
  364. ]]>
  365. </script>
  366. </datagrid>
  367. <datagrid id="grd_prcplist" nodeset="/root/main/prcplist/prcpinfo" caption="구분^구분^구분^등록번호^환자명^진료과코드^진료과^병실^Group코드^처방코드^처방명^1일수량^횟수^일수^불출수량^처방일자^반환일시" colsep="^" colwidth="38, 48, 36, 73, 45, 60, 100, 41, 82, 90, 201, 49, 36, 33, 59, 81, 101, 100" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:380px; top:170px; width:814px; height:570px; ">
  368. <col ref="flag1"/>
  369. <col ref="flag2"/>
  370. <col ref="flag3"/>
  371. <col ref="pid"/>
  372. <col ref="hngnm"/>
  373. <col ref="orddeptcd" visibility="hidden" style="text-align:center; "/>
  374. <col ref="depthngnm" style="text-align:center; "/>
  375. <col ref="roomcd" style="text-align:center; "/>
  376. <col ref="groupcd" visibility="visible" style="text-align:center; "/>
  377. <col ref="prcpcd" style="text-align:center; "/>
  378. <col ref="prcpnm"/>
  379. <col ref="prcpqty" style="text-align:right; "/>
  380. <col ref="prcptims"/>
  381. <col ref="prcpdayno" style="text-align:right; "/>
  382. <col ref="totqty" style="text-align:right; "/>
  383. <col ref="prcpdd" format="yyyy-mm-dd" style="text-align:center; "/>
  384. <col ref="rtndd"/>
  385. </datagrid>
  386. </group>
  387. <group id="group4" scroll="auto" style="left:0px; top:13px; width:1194px; height:27px; ">
  388. <button id="button1" class="btn6_letter5" style="left:190px; top:5px; width:92px; height:22px; ">
  389. <caption>집계표출력</caption>
  390. <script type="javascript" ev:event="DOMActivate">
  391. <![CDATA[
  392. model.makeNode("/root/temp/prntprcpinfo/sumtitle");
  393. submit("TRADT10314"); // 집계구간내 향정,영양수액,고가 품목/집계량 조회
  394. if(model.getValue("/root/temp/prntprcpinfo/sumtitle/drugcd") != ""){
  395. for(var i = 0; i < 2; i++){
  396. if(i == 0){
  397. model.setValue("/root/temp/prntinfo/usetype", "<약제팀용>");
  398. }else model.setValue("/root/temp/prntinfo/usetype", "<병동용>");
  399. model.refresh();
  400. exeReportPreview("RPADT10306", "XMLSTR", "", "", "true","","","","","true"); // 집계표 맨 앞장 (향정신성 및 고가의약품 총집계량)
  401. if(getNodesetCount("/root/temp/prntprcpinfo/expnlist") > 0){
  402. exeReportPreview("RPADT10307", "XMLSTR", "", "", "true","","","","","true"); // 집계표 맨 앞장 (고가리스트)
  403. }
  404. }
  405. }
  406. for(var i = grd_deptlist.fixedRows; i < grd_deptlist.rows; i++){
  407. if ( model.getValue("/root/init/sumorddept/dept["+i+"]/chk")=="Y"){
  408. model.setValue("/root/send/srchdata/srchorddeptcd", model.getValue("/root/init/sumorddept/dept["+i+"]/deptcd"));
  409. if(submit("TRADT10309")){ // 병동별 집계
  410. var item_cnt = getNodesetCount("/root/temp/prntprcpinfo/suminfo");
  411. model.setValue("/root/temp/prntinfo/wardnm", model.getValue("/root/temp/prntprcpinfo/suminfo["+item_cnt+"]/wardnm"));
  412. var div_cnt = 1;
  413. for(var j = 1; j <= item_cnt ; j++){
  414. if((j-1) % 10 == 0){
  415. div_cnt ++;
  416. }
  417. if(model.getValue("/root/temp/prntprcpinfo/suminfo["+j+"]/keepmthdyn") == "Y"){
  418. model.setValue("/root/temp/prntprcpinfo/suminfo["+j+"]/divflag", div_cnt);
  419. }else{
  420. model.setValue("/root/temp/prntprcpinfo/suminfo["+j+"]/divflag", "-");
  421. }
  422. }
  423. for(var cnt = 0; cnt < 2; cnt++){
  424. if(cnt == 0){
  425. model.setValue("/root/temp/prntinfo/usetype", "<약제팀용>");
  426. }else model.setValue("/root/temp/prntinfo/usetype", "<병동용>");
  427. exeReportPreview("RPADT10301", "XMLSTR", "", "", "true","","","","","true");
  428. }
  429. }
  430. //exeReportPreview("RPADT10301", "XMLSTR", "", "", "true","","","","","true");
  431. }
  432. }
  433. //exeReportPreview("RPADT10300", "XML", "/root/send/srchdata");
  434. //exeReportPreview("RPADT10300", "XMLSTR", "", "", "true","","","","","true");
  435. ]]>
  436. </script>
  437. </button>
  438. <button id="button2" class="btn3_letter4" visibility="hidden" style="left:105px; top:5px; width:80px; height:22px; ">
  439. <caption>약국집계</caption>
  440. <script type="javascript" ev:event="DOMActivate">
  441. <![CDATA[
  442. modal("SMADT10310",0,20,150,"SMADT10310","","");
  443. submit("TRADT10304"); //집계리스트 조회
  444. ]]>
  445. </script>
  446. </button>
  447. <button id="button3" class="btn6_letter6" style="left:285px; top:5px; width:104px; height:22px; ">
  448. <caption>Fill List출력</caption>
  449. <script type="javascript" ev:event="DOMActivate">
  450. <![CDATA[
  451. for(var i = grd_deptlist.fixedRows; i < grd_deptlist.rows; i++){
  452. if ( model.getValue("/root/init/sumorddept/dept["+i+"]/chk")=="Y"){
  453. //UDS로 집계된 사항만 Fill List로 출력 가능
  454. if(model.getValue("/root/init/sumorddept/dept/sumkind") == "U"){
  455. model.setValue("/root/send/srchdata/srchorddeptcd", model.getValue("/root/init/sumorddept/dept["+i+"]/deptcd"));
  456. model.setValue("/root/temp/prntinfo/wardnm", model.getValue("/root/init/sumorddept/dept["+i+"]/depthngnm"));
  457. submit("TRADT10312");
  458. // 주사제 fill list 출력
  459. if(model.getValue("/root/temp/prntudsinfo/injinfo/pid") != ""){
  460. exeReportPreview("RPADT10302", "XMLSTR", "", "", "true","","","","","true");
  461. }
  462. // 수액
  463. if(model.getValue("/root/temp/prntudsinfo/exuinfo/pid") != ""){
  464. exeReportPreview("RPADT10303", "XMLSTR", "", "", "true","","","","","true");
  465. }
  466. // PTP
  467. if(model.getValue("/root/temp/prntudsinfo/ptpinfo/pid") != ""){
  468. exeReportPreview("RPADT10304", "XMLSTR", "", "", "true","","","","","true");
  469. }
  470. }else{
  471. messageBox("UDS 집계항목을", "C002");
  472. break;
  473. }
  474. }
  475. }
  476. ]]>
  477. </script>
  478. </button>
  479. <button id="button4" class="btn3_letter6" style="left:0px; top:5px; width:104px; height:22px; ">
  480. <caption>수액집계조회</caption>
  481. </button>
  482. <button id="button6" class="btn6_letter6" style="left:392px; top:5px; width:104px; height:22px; ">
  483. <caption>환자별검수지</caption>
  484. <script type="javascript" ev:event="DOMActivate">
  485. <![CDATA[
  486. for(var i = grd_deptlist.fixedRows; i < grd_deptlist.rows; i++){
  487. if ( model.getValue("/root/init/sumorddept/dept["+i+"]/chk")=="Y"){
  488. //UDS로 집계된 사항만 환자별검수지 출력 가능
  489. //if(model.getValue("/root/init/orddept/dept/sumkind") == "U"){
  490. model.setValue("/root/send/srchdata/srchorddeptcd", model.getValue("/root/init/sumorddept/dept["+i+"]/deptcd"));
  491. model.setValue("/root/temp/prntinfo/wardnm", model.getValue("/root/init/sumorddept/dept["+i+"]/depthngnm"));
  492. submit("TRADT10313");
  493. if(model.getValue("/root/temp/prntpatprcp/prcpdrug/pid") != ""){
  494. exeReportPreview("RPADT10305", "XMLSTR", "", "", "true","","","","","true");
  495. }
  496. /*
  497. }else{
  498. messageBox("UDS 집계항목을", "C002");
  499. break;
  500. }
  501. */
  502. }
  503. }
  504. ]]>
  505. </script>
  506. </button>
  507. <button id="button7" class="btn6_letter4" style="left:500px; top:5px; width:80px; height:22px; ">
  508. <caption>네임카드</caption>
  509. </button>
  510. <button id="button5" class="btn4_letter4" visibility="hidden" style="left:1110px; top:5px; width:80px; height:22px; ">
  511. <caption>집계취소</caption>
  512. <script type="javascript" ev:event="DOMActivate">
  513. <![CDATA[
  514. if ( messageBox("집계취소를 ","Q004")==6 ) {
  515. submit("TXADT10302");
  516. submit("TRADT10304");
  517. }
  518. ]]>
  519. </script>
  520. </button>
  521. </group>
  522. <group id="group2" style="left:0px; top:40px; width:605px; height:160px; ">
  523. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:1px; width:605px; height:154px; background-color:#fffbf2; border-color:#ffd799; "/>
  524. <caption id="caption2" class="search_name" style="left:5px; top:36px; width:60px; height:17px; ">대상 :</caption>
  525. <caption id="caption1" class="search_name" style="left:5px; top:11px; width:90px; height:17px; ">조회구간 :</caption>
  526. <caption id="caption4" class="search_name" style="left:5px; top:58px; width:70px; height:17px; ">구분1 :</caption>
  527. <caption id="caption5" class="search_name" style="left:5px; top:104px; width:70px; height:17px; ">구분2 :</caption>
  528. <select id="checkbox1" ref="/root/send/srchdata/drugflag" class="checkbox_search" overflow="visible" appearance="full" cols="5" style="left:150px; top:58px; width:135px; height:20px; border-style:none; ">
  529. <choices>
  530. <item>
  531. <label>약</label>
  532. <value>1</value>
  533. </item>
  534. <item>
  535. <label>주사</label>
  536. <value>2</value>
  537. </item>
  538. </choices>
  539. </select>
  540. <select id="checkbox3" ref="/root/send/srchdata/prcpflag" class="checkbox_search" overflow="visible" appearance="full" cols="5" style="left:98px; top:129px; width:200px; height:20px; border-style:none; ">
  541. <choices>
  542. <item>
  543. <label>일반</label>
  544. <value>1</value>
  545. </item>
  546. <item>
  547. <label>선처치</label>
  548. <value>2</value>
  549. </item>
  550. <item>
  551. <label>Set처방</label>
  552. <value>3</value>
  553. </item>
  554. </choices>
  555. </select>
  556. <line id="line13" class="line_4" style="x1:525px; y1:70px; x2:525px; y2:148px; border-color:#ffe4bb; border-left-style:solid; "/>
  557. <button id="btn_sea" class="btn1_letter2" style="left:535px; top:95px; width:56px; height:22px; ">
  558. <caption>조회</caption>
  559. <script type="javascript" ev:event="DOMActivate">
  560. <![CDATA[
  561. model.setValue("/root/send/srchdata/sumdeptcd", model.getValue("/root/temp/deptcd"));
  562. chk_deptcd.visible = false;
  563. var srchdeptcd = new Array();
  564. var chkcnt = 0;
  565. var chkrow = new Array();
  566. var srchflag = model.getValue("/root/send/srchdata/srchflag");
  567. if(srchflag == "T"){
  568. // 조회시 대상에 대한 전체 부서 체크박스 선택
  569. if(model.getValue("/root/send/srchdata/deptflag") != "" && model.getValue("/root/send/srchdata/srchdeptcd") == ""){
  570. //fSelDeptflag();
  571. messageBox("대상의 상세부서를","C002");
  572. chk_deptcd.visible=true;
  573. return;
  574. }
  575. submit("TRADT10304");
  576. }else if(srchflag == "P"){
  577. }
  578. model.refresh();
  579. ]]>
  580. </script>
  581. </button>
  582. <input id="ipt_sumdt1" ref="/root/send/srchdata/srchfromdd" class="input_default" inputtype="date" style="left:98px; top:11px; width:95px; height:19px; "/>
  583. <input id="ipt_sumdt2" ref="/root/send/srchdata/srchtodd" class="input_default" inputtype="date" style="left:210px; top:11px; width:95px; height:19px; "/>
  584. <caption id="caption32" style="left:197px; top:10px; width:15px; height:20px; vertical-align:middle; ">~</caption>
  585. <select1 id="rdo_prcp" ref="/root/send/srchdata/prcpkindcd" appearance="full" cellspacing="5" cols="6" overflow="visible" style="left:98px; top:104px; width:205px; height:20px; border-style:none; ">
  586. <choices>
  587. <item>
  588. <label>정규</label>
  589. <value>R</value>
  590. </item>
  591. <item>
  592. <label>추가</label>
  593. <value>A</value>
  594. </item>
  595. <item>
  596. <label>응급/Admission</label>
  597. <value>E</value>
  598. </item>
  599. </choices>
  600. </select1>
  601. <select1 id="radio1" ref="/root/send/srchdata/udsflag" appearance="full" cols="1" rows="2" vcellspacing="8" overflow="visible" style="left:98px; top:55px; width:50px; height:50px; border-style:none; ">
  602. <choices>
  603. <item>
  604. <label>일반</label>
  605. <value>N</value>
  606. </item>
  607. <item>
  608. <label>UDS</label>
  609. <value>U</value>
  610. </item>
  611. </choices>
  612. </select1>
  613. <select id="checkbox4" ref="/root/send/srchdata/drugflag" class="checkbox_search" overflow="visible" appearance="full" cols="5" style="left:150px; top:83px; width:175px; height:20px; border-style:none; ">
  614. <choices>
  615. <item>
  616. <label>PTP</label>
  617. <value>3</value>
  618. </item>
  619. <item>
  620. <label>주사</label>
  621. <value>4</value>
  622. </item>
  623. <item>
  624. <label>외용,수제</label>
  625. <value>5</value>
  626. </item>
  627. </choices>
  628. </select>
  629. <caption id="caption3" class="search_name" style="left:5px; top:129px; width:70px; height:17px; ">구분3 :</caption>
  630. <select id="chk_deptflag" ref="/root/send/srchdata/deptflag" class="checkbox_search" overflow="visible" appearance="full" cols="8" style="left:100px; top:36px; width:500px; height:20px; border-style:none; ">
  631. <choices>
  632. <item>
  633. <label>병동</label>
  634. <value>W</value>
  635. </item>
  636. <item>
  637. <label>응급실</label>
  638. <value>E</value>
  639. </item>
  640. <item>
  641. <label>수술실</label>
  642. <value>O</value>
  643. </item>
  644. <item>
  645. <label>외래주사실</label>
  646. <value>J</value>
  647. </item>
  648. <item>
  649. <label>검사부서</label>
  650. <value>X</value>
  651. </item>
  652. <item>
  653. <label>진료부서</label>
  654. <value>D</value>
  655. </item>
  656. <item>
  657. <label>복막투석실</label>
  658. <value>A</value>
  659. </item>
  660. <item>
  661. <label>건진</label>
  662. <value>S</value>
  663. </item>
  664. </choices>
  665. <script type="javascript" ev:event="xforms-select">
  666. <![CDATA[
  667. //fSelDeptflag();
  668. // 진료과
  669. chk_deptcd.visible=true;
  670. var deptflag = model.getValue("/root/send/srchdata/deptflag");
  671. if(deptflag != ""){
  672. if (deptflag.indexOf("W") >-1 ){
  673. rdo_prcp.visible=true;
  674. } else {
  675. rdo_prcp.visible=false;
  676. }
  677. submit("TRADT10301");
  678. //model.setValue("/root/send/srchdata/srchdeptcd", "");
  679. var srchdeptcd = model.GetValue("/root/send/srchdata/srchdeptcd");
  680. var tmp_deptflag = deptflag.split(" ");
  681. /*
  682. for(i=0; i < tmp_deptflag.length; i++){
  683. if(!isSearchString(gv_deptflag, tmp_deptflag[i])){
  684. if(srchdeptcd != "" ) srchdeptcd += "|"; // 데이터 연결을 위한 구분자 삽입
  685. for(var j = 1; j <= getNodesetCount("/root/init/orddept/dept"); j++){
  686. if(model.getValue("/root/init/orddept/dept["+j+"]/orddeptflag") == tmp_deptflag[i]){ // 부서구분이 같은 상세부서만..
  687. srchdeptcd += model.getValue("/root/init/orddept/dept["+j+"]/deptcd")+"|";
  688. //if(j != getNodesetCount("/root/init/orddept/dept")+1) srchdeptcd += "|"; // 가장 마지막은 구분자 삽입하지 않음.
  689. }
  690. model.setValue("/root/init/orddept/dept["+j+"]/chk", "Y");
  691. }
  692. }
  693. }
  694. srchdeptcd = srchdeptcd.substr(0,parseInt(srchdeptcd.length)-1); // 마지막 구분자는 삭제
  695. */
  696. //model.setValue("/root/send/srchdata/srchdeptcd", srchdeptcd);
  697. //gv_deptflag = deptflag; // 이전 선택된 부서구분을 위한 비교변수 설정
  698. }
  699. model.refresh();
  700. ]]>
  701. </script>
  702. <script type="javascript" ev:event="xforms-deselect">
  703. <![CDATA[
  704. // 진료과
  705. chk_deptcd.visible=true;
  706. var deptflag = model.getValue("/root/send/srchdata/deptflag");
  707. if(deptflag != ""){
  708. if (deptflag.indexOf("W") >-1 ){
  709. rdo_prcp.visible=true;
  710. } else {
  711. rdo_prcp.visible=false;
  712. }
  713. submit("TRADT10301");
  714. // 체크박스 해제한 항목을 조회조건에서 제외 - 그외 기존 체크항목 유지
  715. var srchdeptcd = "";
  716. var tmp_srchdeptcd = model.getValue("/root/send/srchdata/srchdeptcd").split("|"); //기존 선택한 [상세부서]목록 설정
  717. for(var i = 1; i <= getNodesetCount("/root/init/orddept/dept"); i++){ // 새로조회된 [상세부서]목록만큼.. * 인스턴스배열은 1부터..
  718. if(isSearchString(deptflag, model.getValue("/root/init/orddept/dept["+i+"]/orddeptflag"))){ // 새로 조회된 부서 중 이전 선택한 항목에 대해서만.. [부서구분]으로 비교
  719. for(j = 0; j < tmp_srchdeptcd.length; j++){
  720. if(model.getValue("/root/init/orddept/dept["+i+"]/deptcd") == tmp_srchdeptcd[j]){ // 신/구 [상세부서] 비교
  721. srchdeptcd += tmp_srchdeptcd[j]+"|";
  722. //if(i != (getNodesetCount("/root/init/orddept/dept")+1)) srchdeptcd += "|"; // 가장 마지막은 구분자 삽입하지 않음.
  723. }
  724. model.setValue("/root/init/orddept/dept["+i+"]/chk", "Y");
  725. }
  726. }
  727. }
  728. srchdeptcd = srchdeptcd.substr(0,parseInt(srchdeptcd.length)-1); // 마지막 구분자는 삭제
  729. model.setValue("/root/send/srchdata/srchdeptcd", srchdeptcd);
  730. gv_deptflag = deptflag; // 이전 선택된 부서구분을 위한 비교변수 설정
  731. }else{
  732. // 선택한 대상부서가 없을시 부서 조회조건 초기화
  733. model.resetInstanceNode("/root/init/orddept/dept");
  734. model.setValue("/root/send/srchdata/srchdeptcd", "");
  735. gv_deptflag = "";
  736. }
  737. model.refresh();
  738. ]]>
  739. </script>
  740. <script type="javascript" ev:event="onmouseover">
  741. <![CDATA[
  742. chk_deptcd.visible=true;
  743. ]]>
  744. </script>
  745. </select>
  746. <select1 id="rdo_srchflag" ref="/root/send/srchdata/srchflag" appearance="full" cellspacing="5" cols="3" rows="1" overflow="visible" style="left:407px; top:11px; width:183px; height:20px; border-style:none; ">
  747. <choices>
  748. <item>
  749. <label>시간별</label>
  750. <value>T</value>
  751. </item>
  752. <item>
  753. <label>선불출</label>
  754. <value>P</value>
  755. </item>
  756. </choices>
  757. <script type="javascript" ev:event="xforms-value-changed">
  758. <![CDATA[
  759. var srchflag = model.getValue("/root/send/srchdata/srchflag");
  760. if(srchflag == "T"){
  761. //group5.visible = false;
  762. //group6.visible = false;
  763. grd_drugsum.visible = true;
  764. chk_deptflag.disabled = false;
  765. //model.resetInstanceNode("/root/init/orddept");
  766. }else if(srchflag == "D"){
  767. group5.visible = true;
  768. group6.visible = true;
  769. chk_deptflag.disabled = false;
  770. //model.resetInstanceNode("/root/init/orddept");
  771. }else if(srchflag == "P"){
  772. //group5.visible = false;
  773. //group6.visible = false;
  774. grd_drugsum.visible = false;
  775. chk_deptflag.disabled = true;
  776. model.resetInstanceNode("/root/init/orddept");
  777. model.setValue("/root/send/srchdata/deptflag", "");
  778. model.setValue("/root/send/srchdata/srchdeptcd","");
  779. }
  780. model.refresh();
  781. ]]>
  782. </script>
  783. </select1>
  784. <caption id="caption7" class="search_name" style="left:315px; top:10px; width:90px; height:17px; ">조회구분 :</caption>
  785. </group>
  786. <select id="chk_deptcd" ref="/root/send/srchdata/srchdeptcd" visibility="visible" overflow="visible" appearance="full" cols="3" sep="|" style="left:100px; top:95px; width:100px; height:20px; background-color:#f8f8f8; border-style:none; ">
  787. <choices>
  788. <itemset nodeset="/root/init/orddept/dept">
  789. <label ref="depthngnm"/>
  790. <value ref="deptcd"/>
  791. </itemset>
  792. </choices>
  793. <script type="javascript" ev:event="onmousemove">
  794. <![CDATA[
  795. chk_deptcd.visible=true;
  796. ]]>
  797. </script>
  798. <script type="javascript" ev:event="onmouseout">
  799. <![CDATA[
  800. chk_deptcd.visible=false;
  801. ]]>
  802. </script>
  803. <script type="javascript" ev:event="onmousedown">
  804. <![CDATA[
  805. setPopupMenu("chk_deptcd", false , "/root/hidden/popupmenu/menu", "label", "func");
  806. ]]>
  807. </script>
  808. <script type="javascript" ev:event="DOMFocusOut">
  809. <![CDATA[
  810. initPopupMenu();
  811. ]]>
  812. </script>
  813. </select>
  814. </xhtml:body>
  815. </xhtml:html>