SMMNP10100_장기별이식시행건수.xrw 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272
  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. <cond>
  11. <opcnfmdd/>
  12. <opcnfmflag/>
  13. <fromdd/>
  14. <todd/>
  15. </cond>
  16. <organinfo>
  17. <organlist/>
  18. </organinfo>
  19. </main>
  20. <send>
  21. <reqdata/>
  22. <savedata/>
  23. </send>
  24. <init/>
  25. <hidden/>
  26. </root>
  27. </instance>
  28. <script type="javascript" ev:event="xforms-ready">
  29. <![CDATA[
  30. //그리드를 초기화
  31. model.removeNodeset("/root/main/organinfo/organlist");
  32. //현재일자를 받아옴
  33. model.setValue("/root/main/cond/opcnfmdd",getCurrentDate().substr(0, 4));
  34. model.setValue("/root/main/cond/opcnfmflag", "B");
  35. fGridInit() // 그리드 초기화 시킨다.
  36. model.refresh();
  37. ]]>
  38. </script>
  39. <submission id="TRMNP10101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/main/organinfo/organlist"/>
  40. </model>
  41. <script type="javascript">
  42. <![CDATA[
  43. function fGridInit() {
  44. var opcnfmflag = model.getValue("/root/main/cond/opcnfmflag")
  45. if (opcnfmflag =="A" ) {
  46. grd_organlist.colHidden(grd_organlist.colRef("jan1")) = true;
  47. grd_organlist.colHidden(grd_organlist.colRef("jan2")) = true;
  48. grd_organlist.colHidden(grd_organlist.colRef("feb1")) = true;
  49. grd_organlist.colHidden(grd_organlist.colRef("feb2")) = true;
  50. grd_organlist.colHidden(grd_organlist.colRef("jan11")) = false;
  51. grd_organlist.colHidden(grd_organlist.colRef("jan12")) = false;
  52. grd_organlist.colHidden(grd_organlist.colRef("feb11")) = false;
  53. grd_organlist.colHidden(grd_organlist.colRef("feb12")) = false;
  54. var opcnfmdd = model.getValue("/root/main/cond/opcnfmdd");
  55. var fromdd = opcnfmdd + "0301";
  56. var todd = (parseInt(opcnfmdd) + 1) + "0229";
  57. model.setValue("/root/main/cond/fromdd" , fromdd);
  58. model.setValue("/root/main/cond/todd" , todd);
  59. } else {
  60. grd_organlist.colHidden(grd_organlist.colRef("jan1")) = false;
  61. grd_organlist.colHidden(grd_organlist.colRef("jan2")) = false;
  62. grd_organlist.colHidden(grd_organlist.colRef("feb1")) = false;
  63. grd_organlist.colHidden(grd_organlist.colRef("feb2")) = false;
  64. grd_organlist.colHidden(grd_organlist.colRef("jan11")) = true;
  65. grd_organlist.colHidden(grd_organlist.colRef("jan12")) = true;
  66. grd_organlist.colHidden(grd_organlist.colRef("feb11")) = true;
  67. grd_organlist.colHidden(grd_organlist.colRef("feb12")) = true;
  68. var opcnfmdd = model.getValue("/root/main/cond/opcnfmdd");
  69. var fromdd = opcnfmdd + "0101";
  70. var todd = opcnfmdd + "1231";
  71. model.setValue("/root/main/cond/fromdd" , fromdd);
  72. model.setValue("/root/main/cond/todd" , todd);
  73. }
  74. }
  75. ]]>
  76. </script>
  77. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  78. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  79. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  80. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  81. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  82. <script type="javascript" src="../../../emr/prcpmngtweb/js/MMO001.js"/>
  83. </xhtml:head>
  84. <xhtml:body pageheight="620" guideline="2,640;1,1193;" style="margin-left:8; margin-right:8; ">
  85. <caption id="caption1" class="tit_1" style="left:0px; top:0px; width:185px; height:14px; ">장기별 이식 시행건수</caption>
  86. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:21px; width:1191px; height:44px; background-color:#fffbf2; border-color:#ffd799; "/>
  87. <caption id="caption2" class="search_name" style="left:20px; top:34px; width:105px; height:17px; ">수술년도 :</caption>
  88. <input id="ipt_calldd" ref="/root/main/cond/opcnfmdd" class="input_search" inputtype="date" format="yyyy" maxbyte="4" appearance="input" style="left:108px; top:34px; width:110px; height:19px; "/>
  89. <button id="btn_req" class="btn1_letter2" navindex="6" style="left:1122px; top:34px; width:56px; height:22px; ">
  90. <caption>조회</caption>
  91. <script type="javascript" ev:event="DOMActivate">
  92. <![CDATA[
  93. //조건에 해당하는 데이타를 조회
  94. fGridInit() ;
  95. model.copyNode("/root/send/reqdata","/root/main/cond");
  96. submit("TRMNP10101");
  97. grd_organlist.mergeCells = "byrow";
  98. for (i = 1; i < grd_organlist.rows; i++) {
  99. var otsendrecvflag = model.getValue("/root/main/organinfo/organlist[" + i + "]/otsendrecvflag");
  100. if (otsendrecvflag != "R") {
  101. grd_organlist.mergeRow(i) = false;
  102. }
  103. }
  104. grd_organlist.refresh();
  105. ]]>
  106. </script>
  107. </button>
  108. <caption id="caption25" class="tit_2" style="left:0px; top:75px; width:190px; height:14px; ">월별 장기이식 시행건수</caption>
  109. <line id="line1" class="line_1" style="x1:0px; y1:90px; x2:1193px; y2:90px; "/>
  110. <datagrid id="grd_organlist" nodeset="/root/main/organinfo/organlist" autoresize="true" caption="장기종류^장기종류^공/수여자^caption15^1월^1월^caption1^2월^2월^caption2^3월^3월^caption3^4월^4월^caption4^5월^5월^caption5^6월^6월^caption6^7월^7월^caption7^8월^8월^caption8^9월^9월^caption9^10월^10월^caption10^11월^11월^caption11^12월^12월^caption12^1월^1월^caption13^2월^2월^caption14^합계^합계" colsep="^" colwidth="64, 0, 91, 0, 40, 40, 0, 40, 40, 0, 40, 40, 0, 40, 40, 0, 40, 40, 0, 40, 40, 0, 40, 40, 0, 40, 40, 0, 40, 40, 0, 40, 40, 0, 40, 40, 0, 40, 40, 0, 40, 40, 0, 40, 40, 0, 40, 40" dataheight="25" extendlastcol="noscroll" fixedcols="1" mergecellsfixedcols="bycolrec" mergecellsfixedrows="byrowrec" rowsep="|" navindex="7" style="left:0px; top:95px; width:1193px; height:505px; ">
  111. <col ref="otkindnm"/>
  112. <col visibility="hidden"/>
  113. <col ref="otsendrecvnm"/>
  114. <col ref="otsendrecvflag" visibility="hidden"/>
  115. <col ref="jan1" style="text-align:center; "/>
  116. <col ref="jan2" style="text-align:center; "/>
  117. <col ref="blank1" visibility="hidden"/>
  118. <col ref="feb1" style="text-align:center; "/>
  119. <col ref="feb2" style="text-align:center; "/>
  120. <col ref="blank2" visibility="hidden"/>
  121. <col ref="mar1" style="text-align:center; "/>
  122. <col ref="mar2" style="text-align:center; "/>
  123. <col ref="blank3" visibility="hidden"/>
  124. <col ref="apr1" style="text-align:center; "/>
  125. <col ref="apr2" style="text-align:center; "/>
  126. <col ref="blank4" visibility="hidden"/>
  127. <col ref="may1" style="text-align:center; "/>
  128. <col ref="may2" style="text-align:center; "/>
  129. <col ref="blank5" visibility="hidden"/>
  130. <col ref="jun1" style="text-align:center; "/>
  131. <col ref="jun2" style="text-align:center; "/>
  132. <col ref="blank6" visibility="hidden"/>
  133. <col ref="jul1" style="text-align:center; "/>
  134. <col ref="jul2" style="text-align:center; "/>
  135. <col ref="blank7" visibility="hidden"/>
  136. <col ref="oug1" style="text-align:center; "/>
  137. <col ref="oug2" style="text-align:center; "/>
  138. <col ref="blank7" visibility="hidden"/>
  139. <col ref="sep1" style="text-align:center; "/>
  140. <col ref="sep2" style="text-align:center; "/>
  141. <col ref="blank8" visibility="hidden"/>
  142. <col ref="oct1" style="text-align:center; "/>
  143. <col ref="oct2" style="text-align:center; "/>
  144. <col ref="blank10" visibility="hidden"/>
  145. <col ref="nob1" style="text-align:center; "/>
  146. <col ref="nob2" style="text-align:center; "/>
  147. <col ref="blank11" visibility="hidden"/>
  148. <col ref="dec1" style="text-align:center; "/>
  149. <col ref="dec2" style="text-align:center; "/>
  150. <col ref="blank12" visibility="hidden"/>
  151. <col ref="jan11" style="text-align:center; "/>
  152. <col ref="jan12" style="text-align:center; "/>
  153. <col ref="blank13" visibility="hidden"/>
  154. <col ref="feb11" style="text-align:center; "/>
  155. <col ref="feb12" style="text-align:center; "/>
  156. <col ref="blank14" visibility="hidden"/>
  157. <col ref="tot1" style="text-align:center; "/>
  158. <col ref="tot2" style="text-align:center; "/>
  159. <!--
  160. <script type="javascript" ev:event="ondblclick">
  161. <![CDATA[
  162. var otsendrecvflag = model.getValue("/root/main/organinfo/organlist[" + grd_organlist.row + "]/otsendrecvflag");
  163. var otkind = model.getValue("/root/main/organinfo/organlist[" + grd_organlist.row + "]/otkind");
  164. var opcnfmdd = model.getValue("/root/main/cond/opcnfmdd");
  165. var opcnmonth = grd_organlist.valueMatrix(0, grd_organlist.col).getLeftPad(3, 0)
  166. alert(opcnmonth);
  167. ]]>
  168. </script>
  169. <script type="javascript" ev:event="onclick">
  170. -->
  171. <script type="javascript" ev:event="ondblclick">
  172. <![CDATA[
  173. if (isDataCell() == true) {
  174. var otsendrecvflag = model.getValue("/root/main/organinfo/organlist[" + grd_organlist.row + "]/otsendrecvflag"); // 공여자/수여자
  175. var otkind = model.getValue("/root/main/organinfo/organlist[" + grd_organlist.row + "]/otkind"); // 장기종류
  176. var opcnfmflag = model.getValue("/root/main/cond/opcnfmflag")
  177. // 수술년도를 조회한다. 기준월이 3~2월인 경우는 조회월에 + 1일 해준다.
  178. var opcnfmdd = model.getValue("/root/main/cond/opcnfmdd");
  179. if (grd_organlist.col >= "40" && grd_organlist.col <46) {
  180. opcnfmdd = parseInt(opcnfmdd) + 1
  181. }
  182. // 수술월을 조회한다.
  183. var opcnmonth = grd_organlist.valueMatrix(0, grd_organlist.col).getLeftPad(3, 0)
  184. opcnmonth = opcnmonth.substr(0, 2);
  185. var opcnfmym = opcnfmdd + opcnmonth; // 수술년월
  186. // 합계일 경우는 수술 년도만 보낸다.
  187. if (grd_organlist.col >=46 ) {
  188. opcnfmym = model.getValue("/root/main/cond/opcnfmdd");
  189. }
  190. // 공여일 경우 생체 인지 뇌사인지 구분한다. 수여자인 경우는 구분이 필요 없다.
  191. var col = parseInt(grd_organlist.col) % 3;
  192. var otflag =""; // 생체(L)/뇌사(C)
  193. if (grd_organlist.col > 3 ) { //&& grd_organlist.col <46){
  194. if (col =="1") {
  195. otflag ="L";
  196. } else if (col =="2") {
  197. otflag ="C";
  198. }
  199. }
  200. if(otsendrecvflag == "R") {
  201. otflag ="LC";
  202. }
  203. // 아래쪽 합계일 경우 장기종류는 00으로 해준다.
  204. if (isNull(otkind)) {
  205. otkind = "00";
  206. }
  207. if (!isNull(otflag) && !isNull(otsendrecvflag) && !isNull(otkind) && !isNull(opcnfmym) ) {
  208. //param = 이식구분^공/수여자^장기종류^수술년월
  209. var param = otflag +"^" + otsendrecvflag + "^" + otkind + "^" + opcnfmym + "^" + opcnfmflag;
  210. var organCnts = grd_organlist.valueMatrix(grd_organlist.row, grd_organlist.col);
  211. if (organCnts == "0") {
  212. messageBox("이식건수가 없습니다.", "I");
  213. } else {
  214. setParameter("SPMNP10200_param", param);
  215. modal("SPMNP10200");
  216. clearParameter("SPMNP10200_param");
  217. }
  218. }
  219. }
  220. ]]>
  221. </script>
  222. </datagrid>
  223. <line id="line3" style="x1:1110px; y1:27px; x2:1110px; y2:57px; border-color:#ffe4bb; border-left-style:solid; "/>
  224. <button id="btn_excel" class="btn2_letter3" style="left:1137px; top:68px; width:53px; height:19px; ">
  225. <caption>Excel</caption>
  226. <script type="javascript" ev:event="DOMActivate">
  227. <![CDATA[
  228. //파일 선택 다이얼로그 띄운다. - "장기이식통계"이라는 이름으로 저장 위치를 지정하는 팝업을 띄움
  229. var fileName = window.fileDialog("save", ",", false, "장기이식통계", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  230. //파일저장주소를 받아온 것을 가지고 그리드내용을 엑셀로 저장
  231. if (fileName != "")
  232. {
  233. //그리드의 내용을 Excel 파일로 저장하는 함수로.. 파일이름을 받아온것을 가지고 저장하러 간다.
  234. grd_organlist.saveExcel(fileName, "SheetName", false, false, "", "");
  235. }
  236. ]]>
  237. </script>
  238. </button>
  239. <caption id="caption3" class="search_name" style="left:235px; top:35px; width:105px; height:17px; ">기준월 :</caption>
  240. <select1 id="radio1" ref="/root/main/cond/opcnfmflag" appearance="full" cellspacing="10" cols="2" overflow="visible" style="left:320px; top:35px; width:165px; height:20px; border-style:none; ">
  241. <choices>
  242. <item>
  243. <label>3월~2월</label>
  244. <value>A</value>
  245. </item>
  246. <item>
  247. <label>1월~12월</label>
  248. <value>B</value>
  249. </item>
  250. </choices>
  251. <script type="javascript" ev:event="xforms-value-changed">
  252. <![CDATA[
  253. fGridInit() // 그리드 초기화 시킨다.
  254. grd_organlist.refresh();
  255. btn_req.dispatch("DOMActivate");
  256. ]]>
  257. </script>
  258. </select1>
  259. <caption id="caption4" style="left:1045px; top:70px; width:100px; height:20px; ">공여(생체/뇌사)</caption>
  260. <caption id="caption5" style="left:795px; top:600px; width:398px; height:20px; ">* 월별로 공/수여자의 필드 더블클릭 시 수술스케줄 조회 할 수 있습니다.</caption>
  261. </xhtml:body>
  262. </xhtml:html>