SMAES02800_핵의학체내년도별통계.xrw 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407
  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. <list>
  11. <item>
  12. <excuroomnm/>
  13. <prcpnm/>
  14. <flag/>
  15. <year1/>
  16. <year2/>
  17. <year3/>
  18. <year4/>
  19. <year5/>
  20. <sumcnt/>
  21. <comparecnt/>
  22. <comparerate/>
  23. </item>
  24. </list>
  25. <curelist>
  26. <item>
  27. <ioflag/>
  28. <roomcd/>
  29. <drugqty/>
  30. <year1/>
  31. <year2/>
  32. <year3/>
  33. <year4/>
  34. <year5/>
  35. <sumcnt/>
  36. <comparecnt/>
  37. <comparerate/>
  38. </item>
  39. </curelist>
  40. <isublist>
  41. <item>
  42. <ioflag/>
  43. <drugqty/>
  44. <cnt/>
  45. <total/>
  46. </item>
  47. </isublist>
  48. <osublist>
  49. <item>
  50. <ioflag/>
  51. <drugqty/>
  52. <cnt/>
  53. <total/>
  54. </item>
  55. </osublist>
  56. <examsum>
  57. <isum/>
  58. <osum/>
  59. <total/>
  60. </examsum>
  61. </main>
  62. <send>
  63. <execfromyy/>
  64. <exectoyy/>
  65. <globalinstance>
  66. <instance1/>
  67. </globalinstance>
  68. <suppdeptcd/>
  69. <flag/>
  70. <excuroomgrpcdid/>
  71. <compareyy/>
  72. </send>
  73. <init>
  74. <cmb_lrgcd/>
  75. <cmb_mdlcd/>
  76. </init>
  77. <hidden>
  78. <comcd/>
  79. </hidden>
  80. </root>
  81. </instance>
  82. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  83. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  84. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  85. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  86. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  87. <script type="javascript" src="../../../ast/examcureweb/js/AEZ0001.js"/>
  88. <script type="javascript">
  89. <![CDATA[
  90. function mkDate(){
  91. var startyy = "";
  92. for(i=10; 0<=i; i--) {
  93. startyy = getCurrentDate().toDate().getAddDate(-i,"Y").getDateFormat().substr(0,4);
  94. addComboItem("cmb_srchdd",startyy +"년",startyy,"above");
  95. }
  96. cmb_srchdd.value = getCurrentDate().substr(0,4);
  97. }
  98. /*** ***/
  99. function setTitle() {
  100. model.removenode("/root/main/list");
  101. model.removenode("/root/main/curelist");
  102. model.removenode("/root/main/isublist");
  103. model.removenode("/root/main/osublist");
  104. model.removenode("/root/main/examsum");
  105. var stYearMonth = model.getValue("/root/send/exectoyy") + "0101";
  106. var dtYearMonth = stYearMonth.toDate().getAddDate(-4, "Y");
  107. var strExecFromyy = dtYearMonth.getDateFormat("YYYY");
  108. model.setValue("/root/send/execfromyy", strExecFromyy);
  109. var strComPareYear = stYearMonth.toDate().getAddDate(-1, "Y").getDateFormat("YYYY");
  110. model.setValue("/root/send/compareyy", strComPareYear);
  111. var stYearHeader = "검사실^검사항목^구분^";
  112. for (var i = 4; i <= 8; i++) {
  113. // 년도
  114. var stYear = dtYearMonth.getDateFormat("YYYY");
  115. stYearHeader = stYearHeader + stYear + "년^";
  116. dtYearMonth.getAddDate(1, "Y");
  117. }
  118. stYearHeader = stYearHeader + "합계^비교기간^증감율";
  119. grd_examlist.caption = stYearHeader
  120. // 치료 Title Setting
  121. stYearMonth = model.getValue("/root/send/exectoyy") + "0101";
  122. dtYearMonth = stYearMonth.toDate().getAddDate(-4, "Y");
  123. strExecFromyy = dtYearMonth.getDateFormat("YYYY");
  124. model.setValue("/root/send/execfromyy", strExecFromyy);
  125. strComPareYear = stYearMonth.toDate().getAddDate(-1, "Y").getDateFormat("YYYY");
  126. model.setValue("/root/send/compareyy", strComPareYear);
  127. stYearHeader = "구분^병실^처방량^";
  128. for (var i = 4; i <= 8; i++) {
  129. // 년도
  130. var stYear = dtYearMonth.getDateFormat("YYYY");
  131. stYearHeader = stYearHeader + stYear + "년^";
  132. dtYearMonth.getAddDate(1, "Y");
  133. }
  134. stYearHeader = stYearHeader + "합계^비교기간^증감율";
  135. grd_curelist.caption = stYearHeader
  136. }
  137. ]]>
  138. </script>
  139. <script type="javascript" ev:event="xforms-ready">
  140. <![CDATA[
  141. aezfSetSuppDeptcd();
  142. var fromdd = getCurrentDate().substr(0,4) + "01";
  143. var todd = getCurrentDate().substr(0,6);
  144. model.setValue("/root/send/suppdeptcd", model.getValue("/root/send/globalinstance/instance1"));
  145. submit("TRAES09001", false);
  146. addComboItem("cmb_excuroomgrp","--전체--","","above");
  147. btn_case1.selected = true;
  148. model.toggle("case1");
  149. mkDate();
  150. setTitle();
  151. model.refresh();
  152. ]]>
  153. </script>
  154. <submission id="TRAES09001" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/init"/>
  155. <submission id="TRAES02801" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main"/>
  156. </model>
  157. </xhtml:head>
  158. <xhtml:body pagewidth="1211" pageheight="784" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  159. <group id="grp_tle" style="left:0px; top:0px; width:1195px; height:13px; ">
  160. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:200px; height:14px; ">년도별 통계</caption>
  161. </group>
  162. <group id="grp_biz" scroll="auto" style="left:0px; top:13px; width:1195px; height:744px; ">
  163. <line id="line1" class="line_1" style="x1:7px; y1:72px; x2:1192px; y2:72px; "/>
  164. <button id="btn_excsave" class="btn2_letter4" style="left:1130px; top:52px; width:64px; height:19px; ">
  165. <caption>엑셀저장</caption>
  166. <script type="javascript" ev:event="DOMActivate">
  167. <![CDATA[
  168. var fileName = window.fileDialog("save", ",", false, "", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  169. if (fileName != "") {
  170. if (btn_case1.selected == true) {
  171. grd_list.saveExcel(fileName);
  172. } else {
  173. grd_curelist.saveExcel(fileName);
  174. }
  175. }
  176. ]]>
  177. </script>
  178. </button>
  179. <group id="group1" style="left:0px; top:10px; width:1195px; height:30px; vertical-align:top; ">
  180. <shape id="roundrect2" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1193px; height:30px; background-color:#fffbf2; border-color:#ffd799; "/>
  181. <line id="line2" class="line_4" style="x1:1110px; y1:5px; x2:1110px; y2:25px; "/>
  182. <button id="button1" class="btn1_letter2" navindex="4" style="left:1120px; top:4px; width:56px; height:22px; ">
  183. <caption>조회</caption>
  184. <script type="javascript" ev:event="DOMActivate">
  185. <![CDATA[
  186. setTitle();
  187. if (submit("TRAES02801")) {
  188. var cnt = getNodesetCount("/root/main/curelist/item");
  189. if (cnt > 1) {
  190. grd_curelist.colSort(0) = "asc";
  191. grd_curelist.sort(0, 0, grd_examlist.rows, grd_examlist.cols) = "usersort";
  192. for(i=4; i<11; i++) {
  193. /* grd_curelist.subtotal("sum", 1, i, "#,###", "background-color:#FFFFCC; color:#0000ff; font-weight:bold; ", 2, "소계");*/
  194. grd_curelist.subtotal("sum", -1, i, "#,###", "background-color:#CCFFCC; color:#0000ff; font-weight:bold; ", 1, "총계");
  195. }
  196. grd_curelist.mergeByFree(grd_curelist.rows-1, 1 , grd_curelist.rows-1, 3);
  197. //전체 증감율 합계
  198. var sumcnt = grd_curelist.valueMatrix(grd_curelist.rows-1, grd_curelist.colRef("sumcnt"));
  199. var comparecnt = grd_curelist.valueMatrix(grd_curelist.rows-1, grd_curelist.colRef("comparecnt"));
  200. var comparerate = "";
  201. if (parseInt(comparecnt) > 0) {
  202. comparerate = ( ( parseInt(sumcnt) - parseInt(comparecnt) ) / parseInt(comparecnt) ) * 100;
  203. } else {
  204. comparerate = 0;
  205. }
  206. if (comparerate != null) {
  207. grd_curelist.valueMatrix(grd_curelist.rows-1, grd_curelist.colRef("comparerate")) = comparerate;
  208. }
  209. }
  210. var rowCnt = getNodesetCount("/root/main/sublist/item");
  211. if (cnt > 1) {
  212. grd_isublist.attribute("nodeset") = "/root/main/sublist/item[ioflag='I']" ;
  213. grd_osublist.attribute("nodeset") = "/root/main/sublist/item[ioflag='O']" ;
  214. grd_isublist.rebuild();
  215. grd_osublist.rebuild();
  216. var ioflag = "";
  217. var iSum = 0;
  218. var oSum = 0;
  219. var total = 0;
  220. for (i=1; i<=rowCnt; i++) {
  221. ioflag = model.getValue("/root/main/sublist/item[" + i + "]/ioflag");
  222. if (ioflag == "I") {
  223. iSum = iSum + eval(model.getValue("/root/main/sublist/item[" + i + "]/cnt"));
  224. } else if (ioflag == "O") {
  225. oSum = oSum + eval(model.getValue("/root/main/sublist/item[" + i + "]/cnt"));
  226. }
  227. }
  228. total = eval(iSum) + eval(oSum);
  229. model.makeValue("/root/main/examsum/isum", iSum);
  230. model.makeValue("/root/main/examsum/osum", oSum);
  231. model.makeValue("/root/main/examsum/total", total);
  232. }
  233. }
  234. model.refresh();
  235. ]]>
  236. </script>
  237. </button>
  238. <caption id="caption2" class="search_name" style="left:10px; top:7px; width:86px; height:17px; ">기준년도 :</caption>
  239. <select1 id="cmb_excuroomgrp" ref="/root/send/excuroomgrpcdid" class="combo_default" appearance="minimal" style="left:295px; top:6px; width:118px; height:19px; ">
  240. <choices>
  241. <itemset nodeset="/root/init/initexcuroomgrp">
  242. <label ref="nm"/>
  243. <value ref="cd"/>
  244. </itemset>
  245. </choices>
  246. </select1>
  247. <caption id="caption7" class="search_name" style="left:215px; top:7px; width:80px; height:17px; ">검사실 :</caption>
  248. <select1 id="cmb_srchdd" ref="/root/send/exectoyy" appearance="minimal" style="left:107px; top:6px; width:73px; height:19px; ">
  249. <choices>
  250. <itemset nodeset="/root/inti_com/srchdate/item">
  251. <label ref="label"/>
  252. <value ref="value"/>
  253. </itemset>
  254. </choices>
  255. <script type="javascript" ev:event="xforms-value-changed">
  256. <![CDATA[
  257. setTitle();
  258. ]]>
  259. </script>
  260. </select1>
  261. </group>
  262. <switch id="switch1" style="left:7px; top:75px; width:1185px; height:664px; ">
  263. <case id="case1" selected="true" style="left:0px; top:0px; width:1183px; height:662px; ">
  264. <datagrid id="grd_examlist" nodeset="/root/main/list/item" caption="검사실^검사항목^구분^2005년^2006년^2007년^2008년^2009년^합계^비교기간^증감율^전년도합계^증감(%)" colsep="^" colwidth="90, 271, 52, 90, 90, 90, 90, 90, 90, 90, 90" mergecells="byrestriccol" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" tooltip="true" style="left:0px; top:0px; width:1183px; height:662px; ">
  265. <col ref="excuroomnm"/>
  266. <col ref="prcpnm"/>
  267. <col ref="flag" style="text-align:center; "/>
  268. <col ref="year1" style="text-align:right; "/>
  269. <col ref="year2" style="text-align:right; "/>
  270. <col ref="year3" style="text-align:right; "/>
  271. <col ref="year4" style="text-align:right; "/>
  272. <col ref="year5" style="text-align:right; "/>
  273. <col ref="sumcnt" style="text-align:right; "/>
  274. <col ref="comparecnt" style="text-align:right; "/>
  275. <col ref="comparerate" style="text-align:right; "/>
  276. </datagrid>
  277. </case>
  278. <case id="case2">
  279. <datagrid id="grd_isublist" nodeset="/root/main/isublist/item" caption="구분^처방량^건수" colsep="^" colwidth="75, 90, 90" mergecells="byrestriccol" mergecellsfixedrows="bycolrec" rowsep="|" style="left:0px; top:470px; width:258px; height:140px; ">
  280. <col disabled="true" ref="ioflag" type="combo" style="text-align:center; ">
  281. <choices>
  282. <item>
  283. <label>입원</label>
  284. <value>I</value>
  285. </item>
  286. <item>
  287. <label>외래</label>
  288. <value>O</value>
  289. </item>
  290. </choices>
  291. </col>
  292. <col ref="drugqty" style="text-align:right; "/>
  293. <col ref="cnt" style="text-align:right; "/>
  294. </datagrid>
  295. <datagrid id="grd_osublist" nodeset="/root/main/osublist/item" caption="구분^처방량^건수" colsep="^" colwidth="75, 90, 90" mergecells="byrestriccol" mergecellsfixedrows="bycolrec" rowsep="|" style="left:260px; top:470px; width:258px; height:140px; ">
  296. <col disabled="true" ref="ioflag" type="combo" style="text-align:center; ">
  297. <choices>
  298. <item>
  299. <label>입원</label>
  300. <value>I</value>
  301. </item>
  302. <item>
  303. <label>외래</label>
  304. <value>O</value>
  305. </item>
  306. </choices>
  307. </col>
  308. <col ref="drugqty" style="text-align:right; "/>
  309. <col ref="cnt" style="text-align:right; "/>
  310. </datagrid>
  311. <caption id="caption1" class="cell_1" style="left:260px; top:613px; width:127px; height:23px; vertical-align:middle; ">외래합계</caption>
  312. <caption id="caption4" class="cell_1" style="left:0px; top:639px; width:127px; height:23px; vertical-align:middle; ">총합계</caption>
  313. <input id="input1" ref="/root/main/examsum/isum" style="left:129px; top:615px; width:129px; height:19px; text-align:right; "/>
  314. <input id="input2" ref="/root/main/examsum/osum" style="left:389px; top:615px; width:129px; height:19px; text-align:right; "/>
  315. <input id="input3" ref="/root/main/examsum/total" style="left:129px; top:641px; width:389px; height:19px; text-align:right; "/>
  316. <caption id="caption8" class="cell_1" style="left:0px; top:613px; width:127px; height:23px; vertical-align:middle; ">병실합계</caption>
  317. <datagrid id="grd_curelist" nodeset="/root/main/curelist/item" caption="구분^병실^처방량^2005년^2006년^2007년^2008년^2009년^합계^비교기간^증감율" colsep="^" colwidth="80, 80, 80, 108, 108, 108, 108, 108, 120, 120, 120" mergecells="byrestriccol" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" subtotalposition="below" tooltip="true" style="left:0px; top:0px; width:1183px; height:465px; ">
  318. <col disabled="true" ref="ioflag" type="combo" visibility="visible" style="text-align:center; ">
  319. <choices>
  320. <item>
  321. <label>입원</label>
  322. <value>I</value>
  323. </item>
  324. <item>
  325. <label>외래</label>
  326. <value>O</value>
  327. </item>
  328. </choices>
  329. </col>
  330. <col ref="roomcd" style="text-align:center; "/>
  331. <col ref="drugqty" style="text-align:center; "/>
  332. <col ref="year1" style="text-align:right; "/>
  333. <col ref="year2" style="text-align:right; "/>
  334. <col ref="year3" style="text-align:right; "/>
  335. <col ref="year4" style="text-align:right; "/>
  336. <col ref="year5" style="text-align:right; "/>
  337. <col ref="sumcnt" style="text-align:right; "/>
  338. <col ref="comparecnt" style="text-align:right; "/>
  339. <col ref="comparerate" style="text-align:right; "/>
  340. </datagrid>
  341. </case>
  342. </switch>
  343. <button id="btn_case1" class="btn_sw" group="tab2" style="left:7px; top:49px; width:60px; height:22px; ">
  344. <caption>검사</caption>
  345. <toggle case="case1" ev:event="onclick"/>
  346. <script type="javascript" ev:event="DOMActivate">
  347. <![CDATA[
  348. model.toggle("case1");
  349. ]]>
  350. </script>
  351. </button>
  352. <button id="button2" class="btn_sw" group="tab2" style="left:67px; top:49px; width:60px; height:22px; ">
  353. <caption>치료</caption>
  354. <toggle case="case1" ev:event="onclick"/>
  355. <script type="javascript" ev:event="DOMActivate">
  356. <![CDATA[
  357. model.toggle("case2");
  358. ]]>
  359. </script>
  360. </button>
  361. </group>
  362. </xhtml:body>
  363. </xhtml:html>