SMLLS01100_부서별통계.xrw 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * 제 목 : SMLLS01100_부서별통계.xrw
  4. * 설 명 : 부서별통계
  5. * 설 계 자 : (주)에이씨케이 - 윤재한
  6. * 작 성 자 : (주)에이씨케이 -
  7. * 작 성 일 : 2008.04.18
  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. <totalstats/>
  22. <mmstats/>
  23. <totalcnts>
  24. <totaltest/>
  25. <totalbcno/>
  26. <totalpid/>
  27. <totalblood/>
  28. <totaltranspid/>
  29. </totalcnts>
  30. </main>
  31. <send/>
  32. <init>
  33. </init>
  34. <hidden>
  35. <statshopefromdd/>
  36. <statshopetodd/>
  37. <ioflag>0</ioflag>
  38. <sectcd/>
  39. <workgbn>A</workgbn>
  40. <cntgbn>T</cntgbn>
  41. <itemgbn/>
  42. <ddstandard>1</ddstandard>
  43. </hidden>
  44. </root>
  45. </instance>
  46. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  47. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  48. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  49. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  50. <script type="javascript" src="../../../lis/commonweb/js/LLZ001.js"/>
  51. <script type="javascript" ev:event="xforms-ready">
  52. <![CDATA[
  53. fSetInit(); //초기화 함수 호출
  54. ]]>
  55. </script>
  56. <submission id="TRLZZ00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/init"/>
  57. <submission id="TRLLS01101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/ddstats"/>
  58. <submission id="TRLLS01103" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/mmstats"/>
  59. <submission id="TRLLS01104" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/yystats"/>
  60. <submission id="TRLLS01105" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/totalcnts"/>
  61. </model>
  62. <script type="javascript">
  63. <![CDATA[
  64. //화면 open시 초기화
  65. function fSetInit() {
  66. fBaseInfoRef("0111|"); //0111 : 계코드
  67. var toDay = getCurrentDate();
  68. model.setValue("/root/hidden/sectcd", "00"); //부서를 전체로 놓는다.
  69. model.setValue("/root/hidden/ioflag", "0"); //입원/외래구분을 전체로 놓는다.
  70. model.setValue("/root/hidden/statshopefromdd", toDay); //통계희망시작일 = 현재일자
  71. model.setValue("/root/hidden/statshopetodd", toDay); //통계희망종료일 = 현재일자
  72. caption9.visible = false;
  73. ipt_workfromdd.attribute("format") = "yyyy-mm";
  74. ipt_worktodd.visible = false;
  75. //그리드초기화
  76. model.removeNodeset("/root/main/ddstats"); //일별
  77. model.removeNodeset("/root/main/mmstats"); //월별
  78. model.resetInstanceNode("/root/main/yystats"); //연별
  79. btn_ddstats.selected = true; // 일별 switch 버튼 선택
  80. model.toggle("dd");
  81. model.refresh();
  82. //model.makeValue("/root/hidden/sectnm", combo1.label.substr(4).getTrim()); //Report에 표시할 부서명
  83. //makeReportPreview(0, 0, 1193, 636,"임시");
  84. //exeReportPreview("RPLLS02200", "XMLSTR", "", "", "", "", "", "", "", "", "", "임시");//Rexpert 크로스탭
  85. model.refresh();
  86. }
  87. //switch 버튼 클릭시 그리드 초기화 2008-12-12
  88. function fGridInit() {
  89. // model.removeNodeset("/root/main/ddstats"); //일별
  90. // model.removeNodeset("/root/main/mmstats"); //월별
  91. // model.resetInstanceNode("/root/main/yystats"); //연별
  92. //var cols = grd_yy.cols-grd_yy.fixedCols;
  93. //for( var i = 0; i < cols; i++ ) {
  94. // grd_yy.removeColumn(); //연별 그리드 컬럼 다 지우기.. 지우지 않으면 그리드 형태가 유지되어 다른 통계 조회후 연별 통계시 그리드 옆에 이어져 조회됨.
  95. //}
  96. /*
  97. //if(button1.selected == true) {
  98. if(model.getValue("/root/hidden/sectcd") != "U") {
  99. //exeReportPreview("RPLBP00200", "XMLFILE", "", "", "", "", "", "", "", "", "", "임시");
  100. //model.makeValue("/root/hidden/sectnm", combo1.label.substr(4).getTrim()); //Report에 표시할 부서명
  101. //exeReportPreview("RPLLS02200", "XMLSTR", "", "", "", "", "", "", "", "", "", "임시");//Rexpert 크로스탭
  102. //model.toggle("임시"); //초기시 일별그리드 표시
  103. model.toggle("dd"); //초기시 일별그리드 표시
  104. //button1.selected = true; //일별switch 버튼 선택
  105. btn_ddstats.selected = true; //일별switch 버튼 선택
  106. } else {
  107. model.toggle("dd"); //초기시 일별그리드 표시
  108. btn_ddstats.selected = true; //일별switch 버튼 선택
  109. }
  110. */
  111. //일별통계 선택시
  112. if(btn_ddstats.selected == true){
  113. model.toggle("dd");
  114. btn_ddstats.selected = true; //일별switch 버튼 선택
  115. btn_mmstats.selected = false; //월별switch 버튼 선택
  116. btn_yystats.selected = false; //연별switch 버튼 선택
  117. caption9.visible = false;
  118. model.setValue("/root/hidden/statshopefromdd", getCurrentDate().substr(0, 6));
  119. ipt_workfromdd.attribute("format") = "yyyy-mm";
  120. ipt_worktodd.visible = false;
  121. //월별통계 선택시
  122. }else if(btn_mmstats.selected == true){
  123. model.toggle("mm");
  124. btn_ddstats.selected = false; //월별switch 버튼 선택
  125. btn_mmstats.selected = true; //일별switch 버튼 선택
  126. btn_yystats.selected = false; //연별switch 버튼 선택
  127. caption9.visible = false;
  128. model.setValue("/root/hidden/statshopefromdd", getCurrentDate().substr(0, 6));
  129. ipt_workfromdd.attribute("format") = "yyyy-mm";
  130. ipt_worktodd.visible = false;
  131. //연별통계 선택시
  132. }else if(btn_yystats.selected == true){
  133. model.toggle("yy");
  134. btn_ddstats.selected = false; //일별switch 버튼 선택
  135. btn_mmstats.selected = false; //월별switch 버튼 선택
  136. btn_yystats.selected = true; //연별switch 버튼 선택
  137. fSetyytitle();
  138. }
  139. model.refresh();
  140. }
  141. // 연도별 선택시 타이틀 설정
  142. function fSetyytitle(){
  143. model.setValue("/root/hidden/statshopefromdd", getCurrentDate().substr(0, 4));
  144. model.setValue("/root/hidden/statshopetodd", getCurrentDate().substr(0, 4));
  145. grd_yy.colWidth(4) = 80;
  146. for(i = 5; i<= grd_yy.cols;i++){
  147. grd_yy.colHidden(i) = true;
  148. }
  149. caption9.visible = true;
  150. ipt_workfromdd.attribute("format") = "yyyy";
  151. ipt_worktodd.visible = true;
  152. ipt_worktodd.attribute("format") = "yyyy";
  153. grd_yy.caption = "부서^검사항목^Total^"+ model.getValue("/root/hidden/statshopefromdd");
  154. }
  155. //통계희망일, 검사시행부서, 장비, 조회구분(일,월,연) 에 따른 조회 --- 2008-12-12
  156. function fGetStats() {
  157. model.resetInstanceNode("/root/main/totalstats2");
  158. model.resetInstanceNode("/root/main/totalstats3");
  159. ///model.removeNodeset("/root/main/totalstats"); //통계조회
  160. model.makeValue("/root/send/sectcd", model.getValue("/root/hidden/sectcd")); //계코드 부서콤보
  161. model.makeValue("/root/send/workgbn", model.getValue("/root/hidden/workgbn")); //근무구분 Ο주간 Ο야간 ΟAll
  162. model.makeValue("/root/send/cntgbn", model.getValue("/root/hidden/cntgbn")); //건수구분 Ο검사T Ο환자P
  163. model.makeValue("/root/send/itemgbn", model.getValue("/root/hidden/itemgbn")); //검사항목제외
  164. model.makeValue("/root/send/ioflag", model.getValue("/root/hidden/ioflag")); //입원/외래구분 I, O, E, S
  165. model.makeValue("/root/send/statshopefromdd", model.getValue("/root/hidden/statshopefromdd")); //통계희망시작일
  166. model.makeValue("/root/send/statshopetodd", model.getValue("/root/hidden/statshopetodd")); //통계희망종료일
  167. model.makeValue("/root/send/ddstandard", model.getValue("/root/hidden/ddstandard")); //통계기준일 1= 접수일 2=보고일
  168. if(btn_ddstats.selected == true) {
  169. model.makeValue("/root/send/refflag", "dd"); //일월연구분
  170. submit("TRLLS01101");
  171. grd_dd.rebuildStyle();
  172. if(model.getValue("/root/hidden/itemgbn")!= "Y"){
  173. setRowStyle("grd_dd", "2", "소계", "tclsscrnnm", "equal"); //소계 색변경
  174. }
  175. setRowStyle("grd_dd", "11", "부서계", "tclsscrnnm", "equal"); //부서별합계 색변경
  176. setRowStyle("grd_dd", "11", "부서합계", "tclsscrnnm", "equal"); //부서별합계 색변경
  177. setRowStyle("grd_dd", "3", "합계", "sectnm", "equal"); //총합계 색변경 에메랄드색
  178. }else if(btn_mmstats.selected == true){
  179. model.makeValue("/root/send/refflag", "mm"); //일월연구분
  180. submit("TRLLS01103");
  181. grd_mm.rebuildStyle();
  182. if(model.getValue("/root/hidden/itemgbn")!= "Y"){
  183. setRowStyle("grd_mm", "2", "소계", "tclsscrnnm", "equal"); //소계 색변경
  184. }
  185. setRowStyle("grd_mm", "11", "부서계", "tclsscrnnm", "equal"); //부서별합계 색변경
  186. setRowStyle("grd_mm", "11", "부서합계", "tclsscrnnm", "equal"); //부서별합계 색변경
  187. setRowStyle("grd_mm", "3", "합계", "sectnm", "equal"); //총합계 색변경 에메랄드색
  188. } else {
  189. //submit("TRLLS01102");
  190. //exeReportPreview("RPLLS02200", "XMLSTR", "", "", "", "", "", "", "", "", "", "임시");//Rexpert 크로스탭
  191. fSetyygrid();
  192. model.makeValue("/root/send/refflag", "yy"); //일월연구분
  193. submit("TRLLS01104");
  194. grd_yy.rebuildStyle();
  195. if(model.getValue("/root/hidden/itemgbn")!= "Y"){
  196. setRowStyle("grd_yy", "2", "소계", "tclsscrnnm", "equal"); //소계 색변경
  197. }
  198. setRowStyle("grd_yy", "11", "부서계", "tclsscrnnm", "equal"); //부서별합계 색변경
  199. setRowStyle("grd_yy", "11", "부서합계", "tclsscrnnm", "equal"); //부서별합계 색변경
  200. setRowStyle("grd_yy", "3", "합계", "sectnm", "equal"); //총합계 색변경 에메랄드색
  201. }
  202. model.resetInstanceNode("/root/send");
  203. model.resetInstanceNode("/root/main/totalcnts");
  204. }
  205. // 연별조회시 그리드 타이틀 설정 2008-12-12
  206. function fSetyygrid(){
  207. for(j = 5; j<= grd_yy.cols; j++){
  208. grd_yy.colHidden(j) = true;
  209. }
  210. var sdd = model.getValue("/root/hidden/statshopefromdd");
  211. var edd = model.getValue("/root/hidden/statshopetodd");
  212. var ddcnt = parseInt(edd) - parseInt(sdd);
  213. var aa = "부서^검사항목^Total";
  214. var zz = 0;
  215. for(i = 5; i< (ddcnt+5); i++){
  216. grd_yy.colHidden(i) = false;
  217. aa += "^" + (parseInt(sdd) + parseInt(zz));
  218. zz ++;
  219. }
  220. grd_yy.caption = aa + "^" + edd;
  221. }
  222. // 그리드 선택시 총검사건수, 총바코드수, 총환자수, 총수혈건수, 총수혈환자수 조회 2008-12-12
  223. function fGetSelectTotacnts(){
  224. if(btn_ddstats.selected == true){ // 일별 8자리
  225. model.makeValue("/root/send/refdd", model.getValue("/root/hidden/statshopefromdd").substr(0,6) + grd_dd.valueMatrix(0, grd_dd.col));
  226. model.makeValue("/root/send/refflag", "dd");
  227. }else if(btn_mmstats.selected == true){ // 월별 6자리
  228. model.makeValue("/root/send/refdd", model.getValue("/root/hidden/statshopefromdd").substr(0,4) + grd_mm.valueMatrix(0, grd_mm.col));
  229. model.makeValue("/root/send/refflag", "mm");
  230. }else if(btn_yystats.selected == true){ // 연별 4자리
  231. model.makeValue("/root/send/refdd", grd_yy.valueMatrix(0, grd_yy.col));
  232. model.makeValue("/root/send/refflag", "yy");
  233. }
  234. model.makeValue("/root/send/sectcd", model.getValue("/root/hidden/sectcd")); //계코드 부서콤보
  235. model.makeValue("/root/send/workgbn", model.getValue("/root/hidden/workgbn")); //근무구분 Ο주간 Ο야간 ΟAll
  236. model.makeValue("/root/send/cntgbn", model.getValue("/root/hidden/cntgbn")); //건수구분 Ο검사T Ο환자P
  237. model.makeValue("/root/send/itemgbn", model.getValue("/root/hidden/itemgbn")); //검사항목제외
  238. model.makeValue("/root/send/ioflag", model.getValue("/root/hidden/ioflag")); //입원/외래구분 I, O, E, S
  239. model.makeValue("/root/send/ddstandard", model.getValue("/root/hidden/ddstandard")); //통계기준일 1= 접수일 2=보고일
  240. submit("TRLLS01105");
  241. }
  242. //연별 통계 조회
  243. function fGetYYStats() {
  244. var cols = grd_yy.cols-grd_yy.fixedCols;
  245. var rows = grd_yy.rows-grd_yy.fixedRows;
  246. for( var i = 0; i < cols; i++ ) {
  247. grd_yy.removeColumn(false); //연별 그리드 컬럼 다 지우기..지우지 않으면 그리드 형태가 유지되어 그리드 옆에 이어져 조회됨.
  248. }
  249. model.removeNodeset("/root/main/yystats"); //연별그리드 초기화
  250. model.makeNode("/root/main/yystats/row");
  251. model.makeValue("/root/send/sectcd", model.getValue("/root/hidden/sectcd")); //계코드
  252. model.makeValue("/root/send/testeqmtcd", model.getValue("/root/hidden/testeqmtcd")); //장비코드
  253. model.makeValue("/root/send/statshopefromdd", model.getValue("/root/hidden/statshopefromdd")); //통계희망시작일
  254. model.makeValue("/root/send/statshopetodd", model.getValue("/root/hidden/statshopetodd")); //통계희망종료일
  255. submit("TRLLS00802"); //통계조회
  256. model.removeNodeset("/root/send");
  257. model.makeNode("/root/send");
  258. //caption 정보
  259. var gridCaption = model.getValue("/root/hidden/yystats/header/caption");
  260. if(gridCaption == "") return;
  261. //ref 정보
  262. var gridColRef = model.getValue("/root/hidden/yystats/header/colref");
  263. var gridColRefArray = gridColRef.split("^");
  264. //type 정보
  265. var gridColType = model.getValue("/root/hidden/yystats/header/type");
  266. var gridColTypeArray = gridColType.split("^");
  267. for( var i = 0; i < gridColRefArray.length; i++ ) {
  268. if(i == 0) {
  269. grd_yy.addColumn("ref:" + gridColRefArray[i] + "; type:"+gridColTypeArray[i]+"; style:text-align:left; ", false); //Grid 속성 지정
  270. } else {
  271. grd_yy.addColumn("ref:" + gridColRefArray[i] + "; type:"+gridColTypeArray[i]+"; format:#,###; ", false); //Grid 속성 지정
  272. }
  273. }
  274. grd_yy.colWidth(1) = 150; //검사항목 Column은 폭이 달라서 따로 지정.
  275. for( i = 2; i < grd_yy.cols; i++ ) {
  276. grd_yy.colWidth(i) = 60; //Column 폭 조정
  277. }
  278. grd_yy.caption = gridCaption; //Caption 지정
  279. var node = instance1.selectSingleNode("/root/main");
  280. node.replaceChild(instance1.root.hidden.yystats, instance1.root.main.yystats); //조회하고 수정한 사항을 main에 보냄
  281. grd_yy.rowheight(0) = 23; //Title 높이 조정
  282. model.refresh();
  283. fGetTotal(); //연도별 Total 계산
  284. }
  285. //연도별 통계 Total계산
  286. function fGetTotal() {
  287. //Column 합계
  288. for(r = 1; r < grd_yy.rows; r++) {
  289. colsum = 0;
  290. for(i = 2; i < grd_yy.cols - 1; i++) {
  291. if(grd_yy.textmatrix(r, i) != "") {
  292. colsum += parseInt(grd_yy.textmatrix(r, i));
  293. }
  294. }
  295. model.setValue("/root/main/yystats/row["+ r +"]/total", colsum);
  296. }
  297. //Row 합계
  298. grd_yy.addRow();
  299. model.refresh();
  300. grd_yy.textmatrix(grd_yy.rows-1, 1) = "Total";
  301. for(i = 2; i < grd_yy.cols; i++) {
  302. rowsum = 0;
  303. for(r = 1; r < grd_yy.rows-1; r++) {
  304. if(grd_yy.textmatrix(r, i) != "") {
  305. rowsum += parseInt(grd_yy.textmatrix(r, i));
  306. }
  307. }
  308. grd_yy.textmatrix(grd_yy.rows-1, i) = rowsum;
  309. }
  310. }
  311. //엑셀저장 2008-12-12
  312. function fExeSaveToExcel() {
  313. if(btn_ddstats.selected == true) { //일별
  314. fSaveExcel("grd_dd");
  315. } else if(btn_mmstats.selected == true) { //월별
  316. fSaveExcel("grd_mm");
  317. } else if(btn_yystats.selected == true) { //연별
  318. fSaveExcel("grd_yy");
  319. }
  320. }
  321. //통계그리드를 출력한다.
  322. function fPrint() {
  323. if(btn_ddstats.selected == true) { //일별
  324. exeReportPreview("RPLLS02300");
  325. } else if(btn_mmstats.selected == true) { //월별
  326. exeReportPreview("RPLLS01100");
  327. } else if(btn_yystats.selected == true) { //연별
  328. exeReportPreview("RPLLS01300");
  329. }
  330. }
  331. // 이미 조회해온 총 검사건수 골라서 뿌려주기
  332. function fGetTotalcntsetting(){
  333. var stsdy = model.getValue("/root/hidden/statshopefromdd").substr(0,4);
  334. if(btn_ddstats.selected == true) {
  335. var col = grd_dd.valueMatrix(0, grd_dd.col);
  336. var stsdm = model.getValue("/root/hidden/statshopefromdd").substr(4,2);
  337. model.setValue("/root/main/totalcnts/totaltest", model.getValue("/root/main/totalstats2[stsdy=" + stsdy + " and stsdm= " + stsdm + " and stsdd=" + col + "]/test"));
  338. model.setValue("/root/main/totalcnts/totalbcno", model.getValue("/root/main/totalstats2[stsdy=" + stsdy + " and stsdm= " + stsdm + " and stsdd=" + col + "]/bcno"));
  339. model.setValue("/root/main/totalcnts/totalpid", model.getValue("/root/main/totalstats2[stsdy=" + stsdy + " and stsdm= " + stsdm + " and stsdd=" + col + "]/pid"));
  340. model.setValue("/root/main/totalcnts/totalblood", model.getValue("/root/main/totalstats3[stsdy=" + stsdy + " and stsdm= " + stsdm + " and stsdd=" + col + "]/btest"));
  341. model.setValue("/root/main/totalcnts/totaltranspid", model.getValue("/root/main/totalstats3[stsdy=" + stsdy + " and stsdm= " + stsdm + " and stsdd=" + col + "]/bpid"));
  342. }else if(btn_mmstats.selected == true) {
  343. var col = grd_mm.valueMatrix(0, grd_mm.col);
  344. model.setValue("/root/main/totalcnts/totaltest", model.getValue("/root/main/totalstats2[stsdy=" + stsdy + " and stsdm= " + col + "]/test"));
  345. model.setValue("/root/main/totalcnts/totalbcno", model.getValue("/root/main/totalstats2[stsdy=" + stsdy + " and stsdm= " + col + "]/bcno"));
  346. model.setValue("/root/main/totalcnts/totalpid", model.getValue("/root/main/totalstats2[stsdy=" + stsdy + " and stsdm= " + col + "]/pid"));
  347. model.setValue("/root/main/totalcnts/totalblood", model.getValue("/root/main/totalstats3[stsdy=" + stsdy + " and stsdm= " + col + "]/btest"));
  348. model.setValue("/root/main/totalcnts/totaltranspid", model.getValue("/root/main/totalstats3[stsdy=" + stsdy + " and stsdm= " + col + "]/bpid"));
  349. }else if(btn_yystats.selected == true) {
  350. var col = grd_yy.valueMatrix(0, grd_yy.col);
  351. model.setValue("/root/main/totalcnts/totaltest", model.getValue("/root/main/totalstats2[stsdy=" + col + "]/test"));
  352. model.setValue("/root/main/totalcnts/totalbcno", model.getValue("/root/main/totalstats2[stsdy=" + col + "]/bcno"));
  353. model.setValue("/root/main/totalcnts/totalpid", model.getValue("/root/main/totalstats2[stsdy=" + col + "]/pid"));
  354. model.setValue("/root/main/totalcnts/totalblood", model.getValue("/root/main/totalstats3[stsdy=" + col + "]/btest"));
  355. model.setValue("/root/main/totalcnts/totaltranspid", model.getValue("/root/main/totalstats3[stsdy=" + col + "]/bpid"));
  356. }
  357. model.refresh();
  358. }
  359. ]]>
  360. </script>
  361. </xhtml:head>
  362. <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  363. <group id="group3" scroll="auto" style="left:0px; top:40px; width:1195px; height:744; ">
  364. <group id="group1" style="left:0px; top:10px; width:1195px; height:60px; ">
  365. <shape id="roundrect2" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1195px; height:60px; "/>
  366. <button id="btn_ref" class="btn1_letter2" style="left:1123px; top:7px; width:56px; height:22px; ">
  367. <caption>조회</caption>
  368. <script type="javascript" ev:event="DOMActivate">
  369. <![CDATA[
  370. if(btn_yystats.selected == true){
  371. var fromdd = parseInt(model.getValue("/root/hidden/statshopefromdd").substr(0,4));
  372. var todd = parseInt(model.getValue("/root/hidden/statshopetodd").substr(0,4));
  373. if(todd - fromdd >9 ){
  374. messageBox("10년 이내로 조회 가능합니다\n조회기간을 다시 선택하세요", "I");
  375. return;
  376. }
  377. if(fromdd > todd){
  378. messageBox("통계 희망일 시작시간이 종료시간보다 작아야 합니다. ", "I");
  379. return;
  380. }
  381. }
  382. fGetStats();
  383. ]]>
  384. </script>
  385. </button>
  386. <line id="line3" class="line_4" style="x1:1108px; y1:6px; x2:1108px; y2:28px; "/>
  387. <input id="ipt_workfromdd" ref="/root/hidden/statshopefromdd" class="input_search" inputtype="date" style="left:348px; top:8px; width:70px; height:19px; "/>
  388. <input id="ipt_worktodd" ref="/root/hidden/statshopetodd" class="input_search" visibility="hidden" inputtype="date" style="left:433px; top:8px; width:70px; height:19px; "/>
  389. <caption id="caption4" class="search_name" style="left:235px; top:9px; width:110px; height:17px; ">통계 희망일 :</caption>
  390. <caption id="caption9" class="search_no_b" visibility="hidden" style="left:420px; top:8px; width:13px; height:17px; ">~</caption>
  391. <select1 id="combo1" ref="/root/hidden/sectcd" appearance="minimal" style="left:594px; top:8px; width:122px; height:19px; ">
  392. <choices>
  393. <itemset nodeset="/root/init/LB0111">
  394. <label ref="nm"/>
  395. <value ref="cd"/>
  396. </itemset>
  397. </choices>
  398. <script type="javascript" ev:event="xforms-value-changed">
  399. <![CDATA[
  400. //fGridInit();
  401. ]]>
  402. </script>
  403. </select1>
  404. <caption id="caption1" class="search_name" style="left:529px; top:9px; width:62px; height:17px; ">부서 :</caption>
  405. <select1 id="radio1" ref="/root/hidden/workgbn" appearance="full" cellspacing="10" cols="3" overflow="visible" style="left:945px; top:10px; width:145px; height:20px; border-style:none; ">
  406. <choices>
  407. <item>
  408. <label>주간</label>
  409. <value>D</value>
  410. </item>
  411. <item>
  412. <label>야간</label>
  413. <value>N</value>
  414. </item>
  415. <item>
  416. <label>All</label>
  417. <value>A</value>
  418. </item>
  419. </choices>
  420. </select1>
  421. <select1 id="radio2" ref="/root/hidden/cntgbn" appearance="full" cellspacing="10" cols="3" overflow="visible" style="left:750px; top:10px; width:165px; height:20px; border-style:none; ">
  422. <choices>
  423. <item>
  424. <label>검사</label>
  425. <value>T</value>
  426. </item>
  427. <item>
  428. <label>환자</label>
  429. <value>P</value>
  430. </item>
  431. <item>
  432. <label>바코드</label>
  433. <value>B</value>
  434. </item>
  435. </choices>
  436. </select1>
  437. <caption id="caption3" style="left:925px; top:10px; width:15px; height:20px; ">|</caption>
  438. <select id="checkbox1" ref="/root/hidden/itemgbn" overflow="visible" appearance="full" style="left:235px; top:36px; width:100px; height:20px; border-style:none; ">
  439. <choices>
  440. <item>
  441. <label>검사항목 제외</label>
  442. <value>Y</value>
  443. </item>
  444. </choices>
  445. </select>
  446. <caption id="caption12" class="search_name" visibility="hidden" style="left:500px; top:35px; width:110px; height:17px; ">.... :</caption>
  447. <caption id="caption13" class="search_name" style="left:15px; top:9px; width:99px; height:17px; ">통계기준일 :</caption>
  448. <select1 id="combo2" ref="/root/hidden/ddstandard" appearance="minimal" style="left:120px; top:8px; width:92px; height:19px; ">
  449. <choices>
  450. <item>
  451. <label>보고일</label>
  452. <value>1</value>
  453. </item>
  454. <item>
  455. <label>접수일</label>
  456. <value>2</value>
  457. </item>
  458. </choices>
  459. <script type="javascript" ev:event="xforms-value-changed">
  460. <![CDATA[
  461. //fGridInit();
  462. ]]>
  463. </script>
  464. </select1>
  465. <select1 id="cmb_rtnabnflag" ref="/root/hidden/ioflag" visibility="visible" appearance="minimal" style="left:119px; top:34px; width:93px; height:19px; ">
  466. <choices>
  467. <item>
  468. <label>- 전 체 -</label>
  469. <value>0</value>
  470. </item>
  471. <item>
  472. <label>입원</label>
  473. <value>I</value>
  474. </item>
  475. <item>
  476. <label>외래</label>
  477. <value>O</value>
  478. </item>
  479. <item>
  480. <label>응급</label>
  481. <value>E</value>
  482. </item>
  483. <item>
  484. <label>건진</label>
  485. <value>S</value>
  486. </item>
  487. </choices>
  488. </select1>
  489. <caption id="caption5" class="search_name" visibility="visible" style="left:15px; top:35px; width:94px; height:17px; ">입원/외래 :</caption>
  490. </group>
  491. <switch id="swt_statflag" class="sw_box" style="left:0px; top:100px; width:1195px; height:642px; ">
  492. <case id="dd">
  493. <datagrid id="grd_dd" nodeset="/root/main/ddstats" caption="부서^검사항목^Total^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" colsep="^" colwidth="100, 200, 80, 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" dataheight="23" frozencols="3" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="23" selectionmode="bycol" style="left:0px; top:0px; width:1190px; height:636px; text-align:center; ">
  494. <col ref="sectnm"/>
  495. <col ref="tclsscrnnm" style="text-align:left; "/>
  496. <col ref="total" format="#,###" style="text-align:right; background-color:#ffe79d; "/>
  497. <col ref="d01" format="#,###" style="text-align:right; "/>
  498. <col ref="d02" format="#,###" style="text-align:right; "/>
  499. <col ref="d03" format="#,###" style="text-align:right; "/>
  500. <col ref="d04" format="#,###" style="text-align:right; "/>
  501. <col ref="d05" format="#,###" style="text-align:right; "/>
  502. <col ref="d06" format="#,###" style="text-align:right; "/>
  503. <col ref="d07" format="#,###" style="text-align:right; "/>
  504. <col ref="d08" format="#,###" style="text-align:right; "/>
  505. <col ref="d09" format="#,###" style="text-align:right; "/>
  506. <col ref="d10" format="#,###" style="text-align:right; "/>
  507. <col ref="d11" format="#,###" style="text-align:right; "/>
  508. <col ref="d12" format="#,###" style="text-align:right; "/>
  509. <col ref="d13" format="#,###" style="text-align:right; "/>
  510. <col ref="d14" format="#,###" style="text-align:right; "/>
  511. <col ref="d15" format="#,###" style="text-align:right; "/>
  512. <col ref="d16" format="#,###" style="text-align:right; "/>
  513. <col ref="d17" format="#,###" style="text-align:right; "/>
  514. <col ref="d18" format="#,###" style="text-align:right; "/>
  515. <col ref="d19" format="#,###" style="text-align:right; "/>
  516. <col ref="d20" format="#,###" style="text-align:right; "/>
  517. <col ref="d21" format="#,###" style="text-align:right; "/>
  518. <col ref="d22" format="#,###" style="text-align:right; "/>
  519. <col ref="d23" format="#,###" style="text-align:right; "/>
  520. <col ref="d24" format="#,###" style="text-align:right; "/>
  521. <col ref="d25" format="#,###" style="text-align:right; "/>
  522. <col ref="d26" format="#,###" style="text-align:right; "/>
  523. <col ref="d27" format="#,###" style="text-align:right; "/>
  524. <col ref="d28" format="#,###" style="text-align:right; "/>
  525. <col ref="d29" format="#,###" style="text-align:right; "/>
  526. <col ref="d30" format="#,###" style="text-align:right; "/>
  527. <col ref="d31" format="#,###" style="text-align:right; "/>
  528. <script type="javascript" ev:event="onclick">
  529. <![CDATA[
  530. if(grd_dd.isCell(event.target) && grd_dd.row >= grd_dd.fixedRows){
  531. if(grd_dd.col > 3){ // total 제외
  532. /////fGetSelectTotacnts();
  533. fGetTotalcntsetting();
  534. }
  535. }
  536. ]]>
  537. </script>
  538. </datagrid>
  539. </case>
  540. <case id="mm" selected="true">
  541. <datagrid id="grd_mm" nodeset="/root/main/mmstats" caption="부서^검사항목^Total^01^02^03^04^05^06^07^08^09^10^11^12" colsep="^" colwidth="100, 200, 80, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60" dataheight="23" frozencols="3" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="23" selectionmode="bycol" style="left:0px; top:0px; width:1190px; height:636px; text-align:center; ">
  542. <col ref="sectnm"/>
  543. <col ref="tclsscrnnm" style="text-align:left; "/>
  544. <col ref="total" format="#,###" style="text-align:right; background-color:#ffe79d; "/>
  545. <col ref="d01" format="#,###" style="text-align:right; "/>
  546. <col ref="d02" format="#,###" style="text-align:right; "/>
  547. <col ref="d03" format="#,###" style="text-align:right; "/>
  548. <col ref="d04" format="#,###" style="text-align:right; "/>
  549. <col ref="d05" format="#,###" style="text-align:right; "/>
  550. <col ref="d06" format="#,###" style="text-align:right; "/>
  551. <col ref="d07" format="#,###" style="text-align:right; "/>
  552. <col ref="d08" format="#,###" style="text-align:right; "/>
  553. <col ref="d09" format="#,###" style="text-align:right; "/>
  554. <col ref="d10" format="#,###" style="text-align:right; "/>
  555. <col ref="d11" format="#,###" style="text-align:right; "/>
  556. <col ref="d12" format="#,###" style="text-align:right; "/>
  557. <script type="javascript" ev:event="onclick">
  558. <![CDATA[
  559. if(grd_mm.isCell(event.target) && grd_mm.row >= grd_mm.fixedRows){
  560. if(grd_mm.col > 3){ // total 제외
  561. //fGetSelectTotacnts();
  562. fGetTotalcntsetting();
  563. }
  564. }
  565. ]]>
  566. </script>
  567. </datagrid>
  568. </case>
  569. <case id="yy">
  570. <datagrid id="grd_yy" nodeset="/root/main/yystats" caption="^^^^^^^^^^^^" colsep="^" colwidth="100, 200, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80" frozencols="3" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" selectionmode="bycol" style="left:0px; top:0px; width:1185px; height:636px; ">
  571. <col ref="sectnm"/>
  572. <col ref="tclsscrnnm"/>
  573. <col ref="total" format="#,###" style="text-align:right; background-color:#ffe79d; "/>
  574. <col ref="d01" format="#,###" style="text-align:right; "/>
  575. <col ref="d02" format="#,###" style="text-align:right; "/>
  576. <col ref="d03" format="#,###" style="text-align:right; "/>
  577. <col ref="d04" format="#,###" style="text-align:right; "/>
  578. <col ref="d05" format="#,###" style="text-align:right; "/>
  579. <col ref="d06" format="#,###" style="text-align:right; "/>
  580. <col ref="d07" format="#,###" style="text-align:right; "/>
  581. <col ref="d08" format="#,###" style="text-align:right; "/>
  582. <col ref="d09" format="#,###"/>
  583. <col ref="d10" format="#,###" style="text-align:right; "/>
  584. <script type="javascript" ev:event="onclick">
  585. <![CDATA[
  586. if(grd_yy.isCell(event.target) && grd_yy.row >= grd_yy.fixedRows){
  587. if(grd_yy.col > 3){ // total 제외
  588. //fGetSelectTotacnts();
  589. fGetTotalcntsetting();
  590. }
  591. }
  592. ]]>
  593. </script>
  594. </datagrid>
  595. </case>
  596. <case id="임시"/>
  597. </switch>
  598. <button id="btn_mmstats" class="btn_sw" visibility="visible" group="tab" style="left:75px; top:79px; width:75px; height:22px; ">
  599. <caption>월별 통계</caption>
  600. <toggle case="mm" ev:event="DOMActivate"/>
  601. <script type="javascript" ev:event="DOMActivate">
  602. <![CDATA[
  603. fGridInit();
  604. ]]>
  605. </script>
  606. </button>
  607. <button id="btn_ddstats" class="btn_sw" visibility="visible" group="tab" style="left:0px; top:79px; width:75px; height:22px; ">
  608. <caption>일별 통계</caption>
  609. <toggle case="dd" ev:event="DOMActivate"/>
  610. <script type="javascript" ev:event="DOMActivate">
  611. <![CDATA[
  612. fGridInit();
  613. ]]>
  614. </script>
  615. </button>
  616. <button id="btn_yystats" class="btn_sw" visibility="visible" group="tab" style="left:150px; top:79px; width:75px; height:22px; ">
  617. <caption>연별 통계</caption>
  618. <toggle case="yy" ev:event="DOMActivate"/>
  619. <script type="javascript" ev:event="DOMActivate">
  620. <![CDATA[
  621. fGridInit();
  622. ]]>
  623. </script>
  624. </button>
  625. <button id="button1" class="btn_sw" visibility="hidden" group="tab" style="left:225px; top:79px; width:75px; height:22px; ">
  626. <caption>임시</caption>
  627. <toggle case="임시" ev:event="DOMActivate"/>
  628. <script type="javascript" ev:event="DOMActivate">
  629. <![CDATA[
  630. fGridInit();
  631. ]]>
  632. </script>
  633. </button>
  634. </group>
  635. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:800px; height:14px; ">검사 통계</caption>
  636. <group id="group4" scroll="auto" style="left:0px; top:13px; width:1195px; height:27px; ">
  637. <line id="line2" class="line_2" style="x1:0px; y1:25px; x2:1195px; y2:25px; "/>
  638. <button id="btn_print" class="btn6_letter2" visibility="hidden" style="left:0px; top:3px; width:56px; height:22px; ">
  639. <caption>출력</caption>
  640. <script type="javascript" ev:event="DOMActivate">
  641. <![CDATA[
  642. //fPrint();
  643. ]]>
  644. </script>
  645. </button>
  646. <button id="btn_excel" class="btn6_letter5" style="left:0px; top:3px; width:92px; height:22px; ">
  647. <caption>EXCEL저장</caption>
  648. <script type="javascript" ev:event="DOMActivate">
  649. <![CDATA[
  650. fExeSaveToExcel();
  651. ]]>
  652. </script>
  653. </button>
  654. </group>
  655. <caption id="caption2" class="cell_1" visibility="visible" style="left:278px; top:16px; width:80px; height:23px; vertical-align:middle; ">총바코드수</caption>
  656. <output id="output26" ref="/root/main/totalcnts/totaltest" class="output_fix" visibility="visible" format="#,###" style="left:210px; top:17px; width:65px; height:19px; "/>
  657. <output id="output1" ref="/root/main/totalcnts/totalbcno" class="output_fix" visibility="visible" format="#,###" style="left:361px; top:17px; width:65px; height:19px; "/>
  658. <line id="line7" class="line_1" visibility="visible" style="x1:127px; y1:11px; x2:879px; y2:11px; "/>
  659. <caption id="caption101" class="cell_1" visibility="visible" style="left:127px; top:16px; width:80px; height:23px; vertical-align:middle; ">총검사건수</caption>
  660. <caption id="caption8" class="cell_1" visibility="visible" style="left:429px; top:16px; width:80px; height:23px; vertical-align:middle; ">총환자수</caption>
  661. <output id="output2" ref="/root/main/totalcnts/totalpid" class="output_fix" visibility="visible" format="#,###" style="left:512px; top:17px; width:65px; height:19px; "/>
  662. <caption id="caption10" class="cell_1" visibility="visible" style="left:580px; top:16px; width:80px; height:23px; vertical-align:middle; ">총수혈건수</caption>
  663. <output id="output3" ref="/root/main/totalcnts/totalblood" class="output_fix" visibility="visible" format="#,###" style="left:663px; top:17px; width:65px; height:19px; "/>
  664. <caption id="caption11" class="cell_1" visibility="visible" style="left:731px; top:16px; width:80px; height:23px; vertical-align:middle; ">총수혈환자수</caption>
  665. <output id="output4" ref="/root/main/totalcnts/totaltranspid" class="output_fix" visibility="visible" format="#,###" style="left:814px; top:17px; width:65px; height:19px; "/>
  666. <line id="line1" class="line_3" visibility="visible" style="x1:127px; y1:38px; x2:879px; y2:38px; "/>
  667. </xhtml:body>
  668. </xhtml:html>