SMLLS00700_검사시행부서별채혈환자수.xrw 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * 제 목 : SMLLS00700_검사시행부서별채혈환자수.xrw
  4. * 설 명 : 검사시행부서별채혈환자수
  5. * 설 계 자 : (주)에이씨케이 - 윤재한
  6. * 작 성 자 : (주)에이씨케이 -
  7. * 작 성 일 : 2008.04.17
  8. * 수정이력 :
  9. * 기 타 :
  10. -->
  11. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
  12. <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">
  13. <xhtml:head>
  14. <xhtml:title>검사시행부서별 채혈 환자 수</xhtml:title>
  15. <model id="model1">
  16. <instance id="instance1">
  17. <root xmlns="">
  18. <main>
  19. <ddstats/>
  20. <yystats/>
  21. </main>
  22. <send/>
  23. <init>
  24. </init>
  25. <hidden>
  26. <ioflag/>
  27. <statshopefromdd/>
  28. <statshopetodd/>
  29. </hidden>
  30. </root>
  31. </instance>
  32. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  33. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  34. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  35. <script type="javascript" src="../../../lis/commonweb/js/LLZ001.js"/>
  36. <script type="javascript" ev:event="xforms-ready">
  37. <![CDATA[
  38. fSetInit(); //초기화 함수 호출
  39. ]]>
  40. </script>
  41. <submission id="TRLLS00701" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/ddstats"/>
  42. <submission id="TRLLS00702" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/hidden/yystats"/>
  43. </model>
  44. <script type="javascript">
  45. <![CDATA[
  46. //화면 open시 초기화
  47. function fSetInit() {
  48. var toDay = getCurrentDate();
  49. model.setValue("/root/hidden/ioflag", "0"); //입원/외래구분 = 전체
  50. model.setValue("/root/hidden/statshopefromdd", toDay); //통계희망시작일 = 현재일자
  51. model.setValue("/root/hidden/statshopetodd", toDay); //통계희망종료일 = 현재일자
  52. //그리드초기화
  53. model.removeNodeset("/root/main/ddstats"); //일별, 월별, 분기별
  54. model.removeNodeset("/root/main/yystats"); //연별
  55. model.toggle("dd"); //초기시 일별그리드 표시
  56. btn_ddstats.selected = true; //일별switch 버튼 선택
  57. model.refresh();
  58. }
  59. //switch 버튼 클릭시 그리드 초기화
  60. function fGridInit() {
  61. var cols = grd_yy.cols-grd_yy.fixedCols;
  62. for( var i = 0; i < cols; i++ ) {
  63. grd_yy.removeColumn(); //그리드 컬럼 다 지우기.. 지우지 않으면 그리드 형태가 유지되어 다른 통계 조회후 연별 통계시 그리드 옆에 이어져 조회됨.
  64. }
  65. model.removeNodeset("/root/main/ddstats"); //일별, 월별, 분기별
  66. model.removeNodeset("/root/main/yystats"); //연별
  67. model.refresh();
  68. }
  69. //통계희망일, 입원/외래구분, 조회구분(일,월,분기,연) 에 따른 조회
  70. function fGetStats() {
  71. if(btn_ddstats.selected == true) {
  72. model.makeValue("/root/send/refflag", "d");
  73. } else if(btn_mmstats.selected == true) {
  74. model.makeValue("/root/send/refflag", "m");
  75. } else if(btn_qurtyystats.selected == true) {
  76. model.makeValue("/root/send/refflag", "q");
  77. } else if(btn_yystats.selected == true) {
  78. fGetYYStats();
  79. return;
  80. }
  81. model.makeValue("/root/send/ioflag", model.getValue("/root/hidden/ioflag")); //입원/외래구분
  82. model.makeValue("/root/send/statshopefromdd", model.getValue("/root/hidden/statshopefromdd")); //통계희망시작일
  83. model.makeValue("/root/send/statshopetodd", model.getValue("/root/hidden/statshopetodd")); //통계희망종료일
  84. submit("TRLLS00701");
  85. model.removeNodeset("/root/send");
  86. model.makeNode("/root/send");
  87. }
  88. //연별 통계 조회
  89. function fGetYYStats() {
  90. var cols = grd_yy.cols-grd_yy.fixedCols;
  91. var rows = grd_yy.rows-grd_yy.fixedRows;
  92. for( var i = 0; i < cols; i++ ) {
  93. grd_yy.removeColumn(false); //그리드 컬럼 다 지우기..지우지 않으면 그리드 형태가 유지되어 그리드 옆에 이어져 조회됨.
  94. }
  95. model.removeNodeset("/root/main/yystats"); //연별그리드 초기화
  96. model.makeNode("/root/main/yystats/row");
  97. model.makeValue("/root/send/ioflag", model.getValue("/root/hidden/ioflag")); //입원/외래구분
  98. model.makeValue("/root/send/statshopefromdd", model.getValue("/root/hidden/statshopefromdd")); //통계희망시작일
  99. model.makeValue("/root/send/statshopetodd", model.getValue("/root/hidden/statshopetodd")); //통계희망종료일
  100. submit("TRLLS00702"); //통계조회
  101. model.removeNodeset("/root/send");
  102. model.makeNode("/root/send");
  103. //caption 정보
  104. var gridCaption = model.getValue("/root/hidden/yystats/header/caption");
  105. if(gridCaption == "") return;
  106. //ref 정보
  107. var gridColRef = model.getValue("/root/hidden/yystats/header/colref");
  108. var gridColRefArray = gridColRef.split("^");
  109. //type 정보
  110. var gridColType = model.getValue("/root/hidden/yystats/header/type");
  111. var gridColTypeArray = gridColType.split("^");
  112. for( var i = 0; i < gridColRefArray.length; i++ ) {
  113. if(i == 0) {
  114. grd_yy.addColumn("ref:" + gridColRefArray[i] + "; type:"+gridColTypeArray[i]+"; style:text-align:left; ", false); //Grid 속성 지정
  115. } else {
  116. grd_yy.addColumn("ref:" + gridColRefArray[i] + "; type:"+gridColTypeArray[i]+"; format:#,###; ", false); //Grid 속성 지정
  117. }
  118. }
  119. grd_yy.colWidth(1) = 55; //처방부서별 Column은 폭이 달라서 따로 지정.
  120. for( i = 2; i < grd_yy.cols; i++ ) {
  121. grd_yy.colWidth(i) = 60; //Column 폭 조정
  122. }
  123. grd_yy.caption = gridCaption; //Caption 지정
  124. var node = instance1.selectSingleNode("/root/main");
  125. node.replaceChild(instance1.root.hidden.yystats, instance1.root.main.yystats); //조회하고 수정한 사항을 main에 보냄
  126. grd_yy.rowheight(0) = 23; //Title 높이 조정
  127. model.refresh();
  128. fGetTotal(); //연도별 Total 계산
  129. }
  130. //연도별 통계 Total계산
  131. function fGetTotal() {
  132. //Column 합계
  133. for(r = 1; r < grd_yy.rows; r++) {
  134. colsum = 0;
  135. for(i = 2; i < grd_yy.cols - 1; i++) {
  136. if(grd_yy.textmatrix(r, i) != "") {
  137. colsum += parseInt(grd_yy.textmatrix(r, i));
  138. }
  139. }
  140. model.setValue("/root/main/yystats/row["+ r +"]/total", colsum);
  141. }
  142. //Row 합계
  143. grd_yy.addRow();
  144. model.refresh();
  145. grd_yy.textmatrix(grd_yy.rows-1, 1) = "Total";
  146. for(i = 2; i < grd_yy.cols; i++) {
  147. rowsum = 0;
  148. for(r = 1; r < grd_yy.rows-1; r++) {
  149. if(grd_yy.textmatrix(r, i) != "") {
  150. rowsum += parseInt(grd_yy.textmatrix(r, i));
  151. }
  152. }
  153. grd_yy.textmatrix(grd_yy.rows-1, i) = rowsum;
  154. }
  155. }
  156. //엑셀저장
  157. function fExeSaveToExcel() {
  158. if(btn_ddstats.selected == true) { //일별
  159. fSaveExcel("grd_dd");
  160. } else if(btn_mmstats.selected == true) { //월별
  161. fSaveExcel("grd_mm");
  162. } else if(btn_qurtyystats.selected == true) { //분기별
  163. fSaveExcel("grd_qurtyy");
  164. } else if(btn_yystats.selected == true) { //연별
  165. fSaveExcel("grd_yy");
  166. }
  167. }
  168. //통계그리드를 출력한다.
  169. function fPrint() {
  170. if(btn_ddstats.selected == true) { //일별
  171. exeReportPreview("RPLLS01000", "XMLSTR");
  172. } else if(btn_mmstats.selected == true) { //월별
  173. exeReportPreview("RPLLS01100", "XMLSTR");
  174. } else if(btn_qurtyystats.selected == true) { //분기별
  175. exeReportPreview("RPLLS01200", "XMLSTR");
  176. } else if(btn_yystats.selected == true) { //연별
  177. exeReportPreview("RPLLS01300", "XMLSTR");
  178. }
  179. }
  180. ]]>
  181. </script>
  182. </xhtml:head>
  183. <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  184. <group id="group3" scroll="auto" style="left:0px; top:40px; width:1195px; height:744; ">
  185. <group id="group1" style="left:0px; top:10px; width:1195px; height:35px; ">
  186. <shape id="roundrect2" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1195px; height:35px; "/>
  187. <button id="btn_ref" class="btn1_letter2" style="left:1123px; top:7px; width:56px; height:22px; ">
  188. <caption>조회</caption>
  189. <script type="javascript" ev:event="DOMActivate">
  190. <![CDATA[
  191. fGetStats();
  192. ]]>
  193. </script>
  194. </button>
  195. <line id="line3" class="line_4" style="x1:1108px; y1:6px; x2:1108px; y2:28px; "/>
  196. <caption id="caption5" class="search_name" style="left:894px; top:9px; width:94px; height:17px; ">입원/외래 :</caption>
  197. <input id="ipt_workfromdd" ref="/root/hidden/statshopefromdd" class="input_search" inputtype="date" style="left:128px; top:8px; width:90px; height:19px; "/>
  198. <input id="ipt_worktodd" ref="/root/hidden/statshopetodd" class="input_search" inputtype="date" style="left:233px; top:8px; width:90px; height:19px; "/>
  199. <caption id="caption4" class="search_name" style="left:15px; top:9px; width:110px; height:17px; ">통계 희망일 :</caption>
  200. <caption id="caption9" class="search_no_b" style="left:220px; top:10px; width:13px; height:17px; ">~</caption>
  201. <select1 id="cmb_rtnabnflag" ref="/root/hidden/ioflag" appearance="minimal" style="left:991px; top:8px; width:102px; height:19px; ">
  202. <choices>
  203. <item>
  204. <label>- 전 체 -</label>
  205. <value>0</value>
  206. </item>
  207. <item>
  208. <label>입원</label>
  209. <value>I</value>
  210. </item>
  211. <item>
  212. <label>외래</label>
  213. <value>O</value>
  214. </item>
  215. </choices>
  216. </select1>
  217. </group>
  218. <switch id="swt_statflag" class="sw_box" style="left:0px; top:75px; width:1195px; height:663px; ">
  219. <case id="dd" selected="true">
  220. <datagrid id="grd_dd" nodeset="/root/main/ddstats" caption="시행부서^01^02^03^04^05^06^07^08^09^10^11^12^13^14^15^16^17^18^19^20^21^22^23^24^25^26^27^28^29^30^31^Total" colsep="^" colwidth="55, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 60" dataheight="23" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="23" style="left:5px; top:5px; width:1180px; height:646px; text-align:right; ">
  221. <col ref="sectscrnnm" style="text-align:left; "/>
  222. <col ref="d01" format="#,###"/>
  223. <col ref="d02" format="#,###"/>
  224. <col ref="d03" format="#,###"/>
  225. <col ref="d04" format="#,###"/>
  226. <col ref="d05" format="#,###"/>
  227. <col ref="d06" format="#,###"/>
  228. <col ref="d07" format="#,###"/>
  229. <col ref="d08" format="#,###"/>
  230. <col ref="d09" format="#,###"/>
  231. <col ref="d10" format="#,###"/>
  232. <col ref="d11" format="#,###"/>
  233. <col ref="d12" format="#,###"/>
  234. <col ref="d13" format="#,###"/>
  235. <col ref="d14" format="#,###"/>
  236. <col ref="d15" format="#,###"/>
  237. <col ref="d16" format="#,###"/>
  238. <col ref="d17" format="#,###"/>
  239. <col ref="d18" format="#,###"/>
  240. <col ref="d19" format="#,###"/>
  241. <col ref="d20" format="#,###"/>
  242. <col ref="d21" format="#,###"/>
  243. <col ref="d22" format="#,###"/>
  244. <col ref="d23" format="#,###"/>
  245. <col ref="d24" format="#,###"/>
  246. <col ref="d25" format="#,###"/>
  247. <col ref="d26" format="#,###"/>
  248. <col ref="d27" format="#,###"/>
  249. <col ref="d28" format="#,###"/>
  250. <col ref="d29" format="#,###"/>
  251. <col ref="d30" format="#,###"/>
  252. <col ref="d31" format="#,###"/>
  253. <col ref="total" format="#,###"/>
  254. <script type="javascript" ev:event="onaftersort">
  255. <![CDATA[
  256. grd_dd.gridToInstance();
  257. ]]>
  258. </script>
  259. </datagrid>
  260. </case>
  261. <case id="mm">
  262. <datagrid id="grd_mm" nodeset="/root/main/ddstats" caption="시행부서^01^02^03^04^05^06^07^08^09^10^11^12^Total" colsep="^" colwidth="55, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60" dataheight="23" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="23" style="left:5px; top:5px; width:1180px; height:646px; text-align:right; ">
  263. <col ref="sectscrnnm" style="text-align:left; "/>
  264. <col ref="d01" format="#,###"/>
  265. <col ref="d02" format="#,###"/>
  266. <col ref="d03" format="#,###"/>
  267. <col ref="d04" format="#,###"/>
  268. <col ref="d05" format="#,###"/>
  269. <col ref="d06" format="#,###"/>
  270. <col ref="d07" format="#,###"/>
  271. <col ref="d08" format="#,###"/>
  272. <col ref="d09" format="#,###"/>
  273. <col ref="d10" format="#,###"/>
  274. <col ref="d11" format="#,###"/>
  275. <col ref="d12" format="#,###"/>
  276. <col ref="total" format="#,###"/>
  277. <script type="javascript" ev:event="onaftersort">
  278. <![CDATA[
  279. grd_mm.gridToInstance();
  280. ]]>
  281. </script>
  282. </datagrid>
  283. </case>
  284. <case id="qurtyy">
  285. <datagrid id="grd_qurtyy" nodeset="/root/main/ddstats" caption="시행부서^1^2^3^4^Total" colsep="^" colwidth="55, 60, 60, 60, 60, 60" dataheight="23" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="23" style="left:5px; top:5px; width:1180px; height:646px; text-align:right; ">
  286. <col ref="sectscrnnm" style="text-align:left; "/>
  287. <col ref="d01" format="#,###"/>
  288. <col ref="d02" format="#,###"/>
  289. <col ref="d03" format="#,###"/>
  290. <col ref="d04" format="#,###"/>
  291. <col ref="total" format="#,###"/>
  292. <script type="javascript" ev:event="onaftersort">
  293. <![CDATA[
  294. grd_qurtyy.gridToInstance();
  295. ]]>
  296. </script>
  297. </datagrid>
  298. </case>
  299. <case id="yy">
  300. <datagrid id="grd_yy" nodeset="/root/main/yystats/row" backcoloralternate="transparent" colsep="^" dataheight="23" explorerbar="sortshow" frozencols="2" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="23" style="left:5px; top:5px; width:1180px; height:646px; text-align:center; ">
  301. <script type="javascript" ev:event="onaftersort">
  302. <![CDATA[
  303. grd_qurtyy.gridToInstance();
  304. ]]>
  305. </script>
  306. </datagrid>
  307. </case>
  308. </switch>
  309. <button id="btn_mmstats" class="btn_sw" group="tab" style="left:75px; top:54px; width:75px; height:22px; ">
  310. <caption>월별 통계</caption>
  311. <toggle case="mm" ev:event="DOMActivate"/>
  312. <script type="javascript" ev:event="DOMActivate">
  313. <![CDATA[
  314. fGridInit();
  315. ]]>
  316. </script>
  317. </button>
  318. <button id="btn_qurtyystats" class="btn_sw" group="tab" style="left:150px; top:54px; width:90px; height:22px; ">
  319. <caption>분기별 통계</caption>
  320. <toggle case="qurtyy" ev:event="DOMActivate"/>
  321. <script type="javascript" ev:event="DOMActivate">
  322. <![CDATA[
  323. fGridInit();
  324. ]]>
  325. </script>
  326. </button>
  327. <button id="btn_ddstats" class="btn_sw" group="tab" style="left:0px; top:54px; width:75px; height:22px; ">
  328. <caption>일별 통계</caption>
  329. <toggle case="dd" ev:event="DOMActivate"/>
  330. <script type="javascript" ev:event="DOMActivate">
  331. <![CDATA[
  332. fGridInit();
  333. ]]>
  334. </script>
  335. </button>
  336. <button id="btn_yystats" class="btn_sw" group="tab" style="left:240px; top:54px; width:75px; height:22px; ">
  337. <caption>연별 통계</caption>
  338. <toggle case="yy" ev:event="DOMActivate"/>
  339. <script type="javascript" ev:event="DOMActivate">
  340. <![CDATA[
  341. fGridInit();
  342. ]]>
  343. </script>
  344. </button>
  345. </group>
  346. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:800px; height:14px; ">검사시행부서별 채혈 환자 수</caption>
  347. <group id="group4" scroll="auto" style="left:0px; top:13px; width:1195px; height:27px; ">
  348. <line id="line2" class="line_2" style="x1:0px; y1:25px; x2:1195px; y2:25px; "/>
  349. <button id="btn_print" class="btn6_letter2" style="left:0px; top:3px; width:56px; height:22px; ">
  350. <caption>출력</caption>
  351. <script type="javascript" ev:event="DOMActivate">
  352. <![CDATA[
  353. fPrint();
  354. ]]>
  355. </script>
  356. </button>
  357. <button id="btn_excel" class="btn6_letter5" style="left:59px; top:3px; width:92px; height:22px; ">
  358. <caption>EXCEL저장</caption>
  359. <script type="javascript" ev:event="DOMActivate">
  360. <![CDATA[
  361. fExeSaveToExcel();
  362. ]]>
  363. </script>
  364. </button>
  365. </group>
  366. </xhtml:body>
  367. </xhtml:html>