SMADT11000_영양수액집계조회.xrw 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381
  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>수액 집계조회</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <prcplist>
  11. <prcpinfo>
  12. <inorddeptnm/>
  13. <calcscorcd/>
  14. <hngnm/>
  15. <totqty/>
  16. <execdeptcd/>
  17. <eryn/>
  18. </prcpinfo>
  19. </prcplist>
  20. <patlist>
  21. <patinfo/>
  22. </patlist>
  23. </main>
  24. <send>
  25. <srchfromdd/>
  26. <calcscorcd/>
  27. <execdeptcd/>
  28. <sumlistinfo>
  29. <prcpflag>O</prcpflag>
  30. </sumlistinfo>
  31. <endtime/>
  32. <fromddflag/>
  33. <fromtm/>
  34. <toddflag/>
  35. <totm/>
  36. <fromdd/>
  37. <todd/>
  38. <srchorddeptcd/>
  39. <endtimenm/>
  40. <eryn/>
  41. </send>
  42. <init>
  43. <sumtmflaglist>
  44. <flaglist>
  45. <flagcd/>
  46. <flagnm/>
  47. <fromddflag/>
  48. <fromtm/>
  49. <toddflag/>
  50. <totm/>
  51. </flaglist>
  52. </sumtmflaglist>
  53. <updmflaglist>
  54. <flaglist>
  55. <fromddflag/>
  56. <fromtm/>
  57. </flaglist>
  58. </updmflaglist>
  59. </init>
  60. <hidden>
  61. </hidden>
  62. </root>
  63. </instance>
  64. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  65. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  66. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  67. <submission id="TRADT11021" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/prcplist"/>
  68. <submission id="TRADT11022" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/patlist"/>
  69. <submission id="TRADT11023" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/sumlistinfo" replace="instance" resultref="/root/init/updmflaglist"/>
  70. <submission id="TRADT10206" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/sumlistinfo" replace="instance" resultref="/root/init/sumtmflaglist"/>
  71. <submission id="TXADT10326" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/prcplist/prcpinfo" replace="instance" resultref="/root/hidden/result"/>
  72. <submission id="TXADT10327" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/prcplist/prcpinfo" replace="instance" resultref="/root/hidden/result"/>
  73. <script type="javascript" ev:event="xforms-ready">
  74. <![CDATA[
  75. model.removenode("/root/main/prcplist");
  76. model.setValue("/root/send/srchfromdd", getCurrentDate());
  77. submit("TRADT10206");
  78. submit("TRADT11023");
  79. var fromday = model.getValue("/root/init/updmflaglist/flaglist/fromddflag");
  80. var fromtime = model.getValue("/root/init/updmflaglist/flaglist/fromtm");
  81. var sumtm = (fromday.toDate("YYYYMMDD")).getDateFormat("YYYYMMDD") + " " + fromtime;
  82. alert("마지막 집계 시간은"+ fromday+" "+fromtime+ " "+"입니다. 다음 집계 시작시간은"+ fromday+" "+fromtime + "입니다.");
  83. model.refresh();
  84. ]]>
  85. </script>
  86. <script type="javascript" ev:event="xforms-model-construct-done">
  87. <![CDATA[
  88. //부서별약품집계조회(수액집계조회) 화면을 통해 수액집계조회 호출하는 경우 "마감시간관리"설정 불가하도록 처리 (2009.05.27 JJE)
  89. //var openerScrnID = opener.javascript.getParameter("SMADT11000_openerscrnid");
  90. var openerAuth = opener.javascript.getParameter("SMADT11000_openerauth");
  91. //if( openerScrnID == "SMADT10800" ){
  92. if( openerAuth == "R" ){ //읽기 권한 화면에서 오픈한 경우 마감시간관리 버튼 숨김
  93. btn_setendtm.visible = false;
  94. }
  95. ]]>
  96. </script>
  97. </model>
  98. </xhtml:head>
  99. <xhtml:body guideline="1,1225;1,1194;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  100. <group id="group1" style="left:0px; top:0px; width:1194px; height:13px; ">
  101. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:800px; height:14px; ">수액 집계조회(Ver 0525)</caption>
  102. </group>
  103. <group id="group3" scroll="auto" style="left:0px; top:40px; width:1195px; height:744px; ">
  104. <group id="group2" style="left:0px; top:5px; width:1195px; height:40px; ">
  105. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:3px; width:1194px; height:37px; background-color:#fffbf2; border-color:#ffd799; "/>
  106. <line id="line13" style="x1:1091px; y1:7px; x2:1091px; y2:34px; border-color:#ffe4bb; border-left-style:solid; "/>
  107. <caption id="caption4" class="search_name" style="left:15px; top:10px; width:104px; height:17px; ">검색일자 :</caption>
  108. <input id="input5" ref="/root/send/srchfromdd" class="input_search" inputtype="date" style="left:105px; top:10px; width:99px; height:19px; "/>
  109. <button id="btn_sea" class="btn1_letter2" style="left:1115px; top:10px; width:56px; height:22px; ">
  110. <caption>조회</caption>
  111. <script type="javascript" ev:event="DOMActivate">
  112. <![CDATA[
  113. //model.removeNodeset("/root/main/prcplist/prcpinfo");
  114. //model.refresh();
  115. // submit("TRADT10701");
  116. // if ( model.getValue("/root/send/endflag") =="N"){
  117. // for ( var i = 1 ; i<grd_prcp.rows; i++){
  118. // grd_prcp.addStatus(i,"update");
  119. // }
  120. // }
  121. // var sumtm = substr(fromday, 0, 4)+"/"+substr(fromday,4,6)+"/"+substr(fromday,6,8)+" "+substr(fromtime,0,2)+":"+substr(fromtime,2,4)+":"+substr(fromtime,4,6);
  122. //alert(sumtm);
  123. model.removeNodeset("/root/main/prcplist/prcpinfo");
  124. var fromddflag = model.getValue("/root/send/fromddflag");
  125. var fromdd = model.getValue("/root/send/fromdd");
  126. var fromtm = model.getValue("/root/send/fromtm");
  127. var toddflag = model.getValue("/root/send/toddflag");
  128. var todd = model.getValue("/root/send/todd");
  129. var totm = model.getValue("/root/send/totm");
  130. var prcpdd = model.getValue("/root/send/srchfromdd");
  131. if(fromddflag == "0") {
  132. fromdd = ((prcpdd.toDate("YYYYMMDD")).getAddDate(-1,"D")).getDateFormat("YYYYMMDD") ;
  133. model.setValue("/root/send/fromdd", fromdd);
  134. } else {
  135. fromdd = prcpdd ;
  136. model.setValue("/root/send/fromdd", fromdd);
  137. }
  138. if(toddflag == "0") {
  139. todd = ((prcpdd.toDate("YYYYMMDD")).getAddDate(-1,"D")).getDateFormat("YYYYMMDD") ;
  140. model.setValue("/root/send/todd", todd);
  141. } else {
  142. todd = prcpdd ;
  143. model.setValue("/root/send/todd", todd);
  144. }
  145. if ( fromtm == "" ){
  146. fromtm ="0000";
  147. model.setValue("/root/send/fromtm",fromtm);
  148. }
  149. if ( totm == "" ){
  150. totm ="2359";
  151. model.setValue("/root/send/totm",totm);
  152. }
  153. fromtm = fromtm.substring( 0,4 )+ "00";
  154. totm = totm.substring( 0,4 ) + "59";
  155. model.setValue("/root/send/fromtm", fromtm);
  156. model.setValue("/root/send/totm", totm);
  157. model.refresh();
  158. submit("TRADT11021");
  159. ]]>
  160. </script>
  161. </button>
  162. <select1 id="cmb_sumtmflag" ref="/root/send/endtime" class="combo_search" appearance="minimal" style="left:325px; top:10px; width:260px; height:19px; ">
  163. <choices>
  164. <itemset nodeset="/root/init/sumtmflaglist/flaglist">
  165. <label ref="flagnm"/>
  166. <value ref="flagcd"/>
  167. </itemset>
  168. </choices>
  169. <script type="javascript" ev:event="xforms-value-changed">
  170. <![CDATA[
  171. var idx = cmb_sumtmflag.mouseRow + 1;
  172. var fromddflag = model.getValue("/root/init/sumtmflaglist/flaglist[" + idx + "]/fromddflag");
  173. var fromtm = model.getValue("/root/init/sumtmflaglist/flaglist[" + idx + "]/fromtm");
  174. var toddflag = model.getValue("/root/init/sumtmflaglist/flaglist[" + idx + "]/toddflag");
  175. var totm = model.getValue("/root/init/sumtmflaglist/flaglist[" + idx + "]/totm");
  176. model.setValue("/root/send/fromddflag", fromddflag);
  177. model.setValue("/root/send/fromtm", fromtm);
  178. model.setValue("/root/send/toddflag", toddflag);
  179. model.setValue("/root/send/totm", totm);
  180. model.refresh();
  181. ]]>
  182. </script>
  183. </select1>
  184. <input id="ipt_totm" ref="/root/send/totm" class="input_search" autonext="false" maxlength="5" format="hh:nn" style="left:790px; top:10px; width:50px; height:19px; "/>
  185. <select1 id="cmb_fromddflag" ref="/root/send/fromddflag" class="combo_search" appearance="minimal" style="left:590px; top:10px; width:60px; height:19px; ">
  186. <choices>
  187. <item>
  188. <label>전일</label>
  189. <value>0</value>
  190. </item>
  191. <item>
  192. <label>당일</label>
  193. <value>1</value>
  194. </item>
  195. </choices>
  196. </select1>
  197. <input id="ipt_fromtm" ref="/root/send/fromtm" class="input_search" autonext="false" maxlength="5" format="hh:nn" style="left:655px; top:10px; width:45px; height:19px; "/>
  198. <select1 id="cmb_toddflag" ref="/root/send/toddflag" class="combo_search" appearance="minimal" style="left:725px; top:10px; width:60px; height:19px; ">
  199. <choices>
  200. <item>
  201. <label>전일</label>
  202. <value>0</value>
  203. </item>
  204. <item>
  205. <label>당일</label>
  206. <value>1</value>
  207. </item>
  208. </choices>
  209. </select1>
  210. <caption id="caption17" class="search_name" style="left:240px; top:8px; width:80px; height:23px; vertical-align:middle; ">마감구분</caption>
  211. <caption id="caption18" style="left:705px; top:9px; width:30px; height:25px; font-weight:bold; vertical-align:middle; ">~</caption>
  212. <button id="button2" class="btn1_letter4" style="left:1030px; top:10px; width:80px; height:22px; ">
  213. <caption>집계 조회</caption>
  214. <script type="javascript" ev:event="DOMActivate">
  215. <![CDATA[
  216. model.removeNodeset("/root/main/prcplist/prcpinfo");
  217. var fromddflag = model.getValue("/root/send/fromddflag");
  218. var fromdd = model.getValue("/root/send/fromdd");
  219. var fromtm = model.getValue("/root/send/fromtm");
  220. var toddflag = model.getValue("/root/send/toddflag");
  221. var todd = model.getValue("/root/send/todd");
  222. var totm = model.getValue("/root/send/totm");
  223. var prcpdd = model.getValue("/root/send/srchfromdd");
  224. if(toddflag == "0") {
  225. todd = ((prcpdd.toDate("YYYYMMDD")).getAddDate(-1,"D")).getDateFormat("YYYYMMDD") ;
  226. model.setValue("/root/send/todd", todd);
  227. } else {
  228. todd = prcpdd ;
  229. model.setValue("/root/send/todd", todd);
  230. }
  231. if ( totm == "" ){
  232. totm = getCurrentTime();
  233. var totm1 = totm.substring(0,4) + "59";
  234. model.setValue("/root/send/totm",totm1);
  235. } else {
  236. totm = totm.substring( 0,4 ) + "59";
  237. var totm1 = getCurrentTime();
  238. totm1 = totm1.substring(0.4) + "59";
  239. if (totm < totm1) {
  240. model.setValue("/root/send/totm", totm);
  241. } else {
  242. model.setValue("/root/send/totm", totm1);
  243. }
  244. }
  245. var fromday = model.getValue("/root/init/updmflaglist/flaglist/fromddflag");
  246. var fromtime = model.getValue("/root/init/updmflaglist/flaglist/fromtm");
  247. var today = model.getValue("/root/send/todd");
  248. var totime = model.getValue("/root/send/totm");
  249. model.setValue("/root/send/fromdd", fromday);
  250. model.setValue("/root/send/fromtm", fromtime);
  251. var frday = model.getValue("/root/send/fromdd");
  252. var ftime = model.getValue("/root/send/fromtm");
  253. model.refresh();
  254. var fdy = (frday.toDate("YYYYMMDD")).getDateFormat("YYYY/MM/DD");
  255. var ftm = (ftime.substring(0,2) + ":" + ftime.substring(2,4) + ":" + ftime.substring(4,6));
  256. var tdy = (today.toDate("YYYYMMDD")).getDateFormat("YYYY/MM/DD");
  257. var ttm = (totime.substring(0,2) + ":" + totime.substring(2,4) + ":" + totime.substring(4,6));
  258. alert("집계조회 시간은"+ fdy+" "+ ftm + "에서"+ tdy+ " " + ttm + "입니다");
  259. submit("TRADT11021");
  260. ]]>
  261. </script>
  262. </button>
  263. </group>
  264. <datagrid id="grd_prcp" nodeset="/root/main/prcplist/prcpinfo" caption="부서명^코드^약품명^집계량^caption1" colsep="^" colwidth="99, 74, 159, 57, 100" explorerbar="sortshow" rowheader="update" rowsep="|" style="left:0px; top:75px; width:435px; height:668px; ">
  265. <col ref="inorddeptnm"/>
  266. <col ref="calcscorcd" style="text-align:center; "/>
  267. <col ref="hngnm" style="text-align:center; "/>
  268. <col ref="totqty" style="text-align:right; "/>
  269. <col ref="execdeptcd" visibility="hidden"/>
  270. <col ref="eryn" visibility="hidden"/>
  271. <script type="javascript" ev:event="onclick">
  272. <![CDATA[
  273. model.setValue("/root/send/execdeptcd", model.getValue("/root/main/prcplist/prcpinfo[" + grd_prcp.row + "]/execdeptcd"));
  274. model.setValue("/root/send/calcscorcd", model.getValue("/root/main/prcplist/prcpinfo[" + grd_prcp.row + "]/calcscorcd"));
  275. model.setValue("/root/send/eryn", model.getValue("/root/main/prcplist/prcpinfo[" +grd_prcp.row +"]/eryn"));
  276. submit("TRADT11022");
  277. ]]>
  278. </script>
  279. <script type="javascript" ev:event="onaftersort">
  280. <![CDATA[
  281. grd_prcp.gridToInstance();
  282. ]]>
  283. </script>
  284. </datagrid>
  285. <caption id="caption10" class="tit_2" style="left:6px; top:58px; width:183px; height:14px; ">수액 집계리스트</caption>
  286. <datagrid id="datagrid1" nodeset="/root/main/patlist/patinfo" caption="집계^처방종류^I/O^병실^등록번호^이름^코드^약품명^집계량" colsep="^" colwidth="35, 60, 32, 45, 99, 100, 74, 159, 57" explorerbar="sortshow" rowheader="update" rowsep="|" style="left:440px; top:75px; width:754px; height:668px; ">
  287. <col ref="chk" type="checkbox"/>
  288. <col ref="prcpkindcdnm"/>
  289. <col ref="ioflag"/>
  290. <col ref="roomcd"/>
  291. <col ref="pid"/>
  292. <col ref="patnm"/>
  293. <col ref="calcscorcd" style="text-align:center; "/>
  294. <col ref="hngnm" style="text-align:center; "/>
  295. <col ref="totqty" style="text-align:right; "/>
  296. </datagrid>
  297. <line id="line4" class="line_1" style="x1:1px; y1:73px; x2:433px; y2:73px; "/>
  298. <line id="line1" class="line_1" style="x1:440px; y1:73px; x2:1194px; y2:73px; "/>
  299. </group>
  300. <group id="group4" scroll="auto" style="left:0px; top:13px; width:1195px; height:27px; ">
  301. <button id="button1" class="btn6_letter2" style="left:65px; top:5px; width:56px; height:22px; ">
  302. <caption>출력</caption>
  303. <script type="javascript" ev:event="DOMActivate">
  304. <![CDATA[
  305. model.setValue("/root/send/endtimenm",cmb_sumtmflag.label);
  306. exeReportPreview("RPADT11001", "XMLSTR", "", "", "false","","","","","false");
  307. ]]>
  308. </script>
  309. </button>
  310. <button id="btn_setendtm" class="btn3_letter6" navindex="18" style="left:126px; top:5px; width:104px; height:22px; ">
  311. <caption>마감시간관리</caption>
  312. <script type="javascript" ev:event="DOMActivate">
  313. <![CDATA[
  314. //fSetEndTime();
  315. modal("SPADT64100");
  316. if(getParameter("SPADT64100_param") == "Y") {
  317. //model.makeValue("/root/send/sumlistinfo/prcpflag", "A");
  318. if(submit("TRADT10206")) {
  319. var idx = cmb_sumtmflag.value;
  320. var fromddflag = model.getValue("/root/init/sumtmflaglist/flaglist[flagcd = '" + idx + "']/fromddflag");
  321. var fromtm = model.getValue("/root/init/sumtmflaglist/flaglist[flagcd = '" + idx + "']/fromtm");
  322. var toddflag = model.getValue("/root/init/sumtmflaglist/flaglist[flagcd = '" + idx + "']/toddflag");
  323. var totm = model.getValue("/root/init/sumtmflaglist/flaglist[flagcd = '" + idx + "']/totm");
  324. model.setValue("/root/send/fromddflag", fromddflag);
  325. model.setValue("/root/send/fromtm", fromtm);
  326. model.setValue("/root/send/toddflag", toddflag);
  327. model.setValue("/root/send/totm", totm);
  328. model.refresh();
  329. }
  330. }
  331. ]]>
  332. </script>
  333. </button>
  334. <button id="button3" class="btn4_letter2" style="left:5px; top:5px; width:56px; height:22px; ">
  335. <caption>집계</caption>
  336. <script type="javascript" ev:event="DOMActivate">
  337. <![CDATA[
  338. model.setValue("/root/send/endtimenm",cmb_sumtmflag.label);
  339. submit("TXADT10326");
  340. submit("TXADT10327");
  341. ]]>
  342. </script>
  343. </button>
  344. </group>
  345. </xhtml:body>
  346. </xhtml:html>