SMPID24400_KDRG 통계 프로그램.xrw 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * @(#)SMPID23300_DRG상세정보 .xrw
  4. * 수정이력
  5. * - 2010.07.19 / 최초작성 / 김용민
  6. -->
  7. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
  8. <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">
  9. <xhtml:head>
  10. <xhtml:title>KDRG 통계프로그램</xhtml:title>
  11. <model id="model1">
  12. <instance id="instance1">
  13. <root xmlns="">
  14. <main>
  15. <patinfo>
  16. <patinfolist/>
  17. </patinfo>
  18. <kdrglist/>
  19. </main>
  20. <send>
  21. <filepath/>
  22. <attach>
  23. <file/>
  24. </attach>
  25. <pid/>
  26. <clamfromym/>
  27. <clamtoym/>
  28. <clamym/>
  29. <offset/>
  30. <daywardyn>N</daywardyn>
  31. <ioflagyn>N</ioflagyn>
  32. </send>
  33. <init>
  34. <item1>
  35. <clamym/>
  36. <clamdg/>
  37. <pid/>
  38. <pidsn/>
  39. <patnm/>
  40. <insukind/>
  41. <suppkind/>
  42. <orddeptcd/>
  43. <indd/>
  44. </item1>
  45. <!-- 보험유형 -->
  46. <P0008list>
  47. <P0008>
  48. <cdnm/>
  49. <cdid/>
  50. </P0008>
  51. </P0008list>
  52. <!-- 보조유형 -->
  53. <P0010list>
  54. <P0010>
  55. <cdnm/>
  56. <cdid/>
  57. </P0010>
  58. </P0010list>
  59. <!-- 진료결과 -->
  60. <P0110list>
  61. <P0110>
  62. <cdnm/>
  63. <cdid/>
  64. </P0110>
  65. </P0110list>
  66. <orddeptcd2/>
  67. <PAM>
  68. <PK015list/>
  69. <PK016list/>
  70. <PK054list/>
  71. <PK055list/>
  72. </PAM>
  73. </init>
  74. <hidden>
  75. <sppmc02500>
  76. <cond>
  77. <srchcond/>
  78. <pid/>
  79. </cond>
  80. </sppmc02500>
  81. </hidden>
  82. </root>
  83. </instance>
  84. <submission id="TRZBC00101" mediatype="application/x-www-form-urlencoded" method="post" replace="instance"/>
  85. <submission id="TRPID20309" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/item1/ioflag" resultref="root/hidden/tmp"/>
  86. <script type="javascript" ev:event="xforms-ready">
  87. <![CDATA[
  88. // ---------------------------------------------------------------
  89. // 공통코드를 조회한다.
  90. // (ZBC001.js) com.ZBCMCODE 에서 기초코드 값 Get
  91. // ---------------------------------------------------------------
  92. zbcfGetCodeList(
  93. new Array("P0008" // 보험유형
  94. ,"P0010" // 보조유형
  95. ,"P0110" // 진료결과
  96. ),
  97. new Array("/root/init/P0008list"
  98. ,"/root/init/P0010list"
  99. ,"/root/init/P0110list"
  100. ) );
  101. // 2013.02.19 - 부가코드 원무공통코드조회
  102. pamfGetCodeList(new Array(
  103. "PK015"
  104. ,"PK016"
  105. ,"PK054"
  106. ,"PK055"
  107. ),
  108. new Array("/root/init/PAM/PK015list"
  109. ,"/root/init/PAM/PK016list"
  110. ,"/root/init/PAM/PK054list"
  111. ,"/root/init/PAM/PK055list"
  112. ));
  113. // ---------------------------------------------------------------
  114. // 진료과 초기화
  115. // ---------------------------------------------------------------
  116. submit("TRPID20309", false);
  117. model.copyNode("/root/init/orddeptcd2", "/root/hidden/tmp/orddeptcd2");
  118. model.removeNodeset("/root/hidden/tmp/orddeptcd");
  119. model.removeNodeset("/root/hidden/tmp/orddeptcd2");
  120. model.removeNodeset("/root/hidden/tmp/orddrid");
  121. model.removeNodeset("/root/hidden/tmp/orddrid2");
  122. fInitialize();
  123. btn_clspcd.selected = true;
  124. ]]>
  125. </script>
  126. <submission id="TXPIJ03200" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/drginfo" resultref="/root/rslt"/>
  127. <submission id="TXPID24301" mediatype="multipart/form-data" method="form-data-post" ref="/root/send"/>
  128. <submission id="TXPID24302" mediatype="multipart/form-data" method="form-data-post" ref="/root/send" resultref="/root/main"/>
  129. <submission id="TRPIJ03200" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main"/>
  130. <submission id="TRPAM00105" mediatype="application/x-www-form-urlencoded" method="post"/>
  131. <submission id="TXPID24300" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/tmp/tmp"/>
  132. <submission id="TXPIJ03208" mediatype="multipart/form-data" method="form-data-post"/>
  133. <submission id="TRPIJ03203" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/drginfo" resultref="/root/main/endchkinfo"/>
  134. <submission id="TRPID24400" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/kdrglist"/>
  135. <submission id="TRPID24301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/"/>
  136. </model>
  137. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  138. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  139. <script type="javascript" src="../../../com/commonweb/js/numericHelper.js"/>
  140. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  141. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  142. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  143. <script type="javascript" src="../../../pam/pamcomnweb/js/PAM001.js"/>
  144. <script type="javascript" src="../../../pam/pamcomnweb/js/PAM.js"/>
  145. <script type="javascript" src="../../../com/commonweb/js/tfHelperAsync.js"/>
  146. <script type="javascript">
  147. <![CDATA[
  148. function fInitialize() {
  149. var gToday = new Date();
  150. var gBaseyear = gToday.getDateFormat("YYYY"); // (dateHelper.js)에서 제공하는 함수를 사용하여 해당 년를 구한다.
  151. var gBasemonth = gToday.getDateFormat("MM");
  152. var gBaseday = gToday.getDateFormat("DD");
  153. var gCurrentdd = gBaseyear + gBasemonth + gBaseday;
  154. var gCurrentym = gBaseyear + gBasemonth;
  155. var gUserid = getUserId();
  156. model.setValue(ipt_clamfromym.attribute("ref"), gCurrentym );
  157. model.setValue(ipt_clamtoym.attribute("ref"), gCurrentym);
  158. //fGetdrgDetail();
  159. model.refresh();
  160. }
  161. function fGetdrgDetail() {
  162. submit("TRPIJ03200");
  163. //진료결과 체크 - 중간청구인경우 : 계속, 퇴원인경우 : 퇴원
  164. var dschnotiyn = model.getValue("/root/main/drginfo/dschnotiyn");
  165. var ordrslt = model.getValue("/root/main/drginfo/ordrsltcd");
  166. if(dschnotiyn == "Y"){
  167. if(ordrslt == "" || ordrslt == "-" || ordrslt == "1"){
  168. if(ordrslt != "4"){
  169. model.setValue("/root/main/drginfo/ordrsltcd","9");
  170. }
  171. }
  172. }else{
  173. if(ordrslt == "" || ordrslt == "-"){
  174. model.setValue("/root/main/drginfo/ordrsltcd","1");
  175. }
  176. }
  177. }
  178. function fSleep(filenm) {
  179. var now = new Date();
  180. var exitTime = now.getTime() + 30000;
  181. var fldr = model.getValue("/root/init/PAM/PK054list/PK054[cdid='01']/cdnm");//"C:/Program Files/himed/components/KDRG/";
  182. var infile = model.getValue("/root/init/PAM/PK054list/PK054[cdid='02']/cdnm");//"kdrg33.in";
  183. var outfile = model.getValue("/root/init/PAM/PK054list/PK054[cdid='03']/cdnm");//"kdrg33.out";
  184. var fso = new ActiveXObject("Scripting.FileSystemObject");
  185. while (true) {
  186. now = new Date();
  187. //3초동안 파일이 있는지 체크한다. 생성되었으면 루프를 나온다.
  188. if (fso.FileExists(fldr+filenm) && fso.GetFile(fldr+filenm).Size > "0") { break; }
  189. //3초동안 파일이 없으면 빠져나온다.
  190. if (now.getTime() > exitTime) { break; }
  191. }
  192. }
  193. function fStandby() {
  194. var now = new Date();
  195. var exitTime = now.getTime() + 3000;
  196. while (true) {
  197. now = new Date();
  198. //3초동안 후 빠져나온다.
  199. if (now.getTime() > exitTime) { break; }
  200. }
  201. }
  202. function fGetDocuList() {
  203. var offcnt = model.getXPathValue("count(/root/main/kdrglist/kdrg)");
  204. model.setValue("/root/send/offset", offcnt);
  205. submit("TRPID24400");
  206. }
  207. function responseHandlerTXPID24300() {
  208. removeLoadingWindow();
  209. }
  210. ]]>
  211. </script>
  212. </xhtml:head>
  213. <xhtml:body pagewidth="910" pageheight="910" guideline="1,1143;2,879;1,50;" style="margin-left:5; margin-top:0; margin-right:5; margin-bottom:0; ">
  214. <group id="grp_tle" style="left:0px; top:0px; width:785px; height:13px; ">
  215. <caption id="cap_title" class="tit_1" style="left:0px; top:0px; width:195px; height:14px; ">KDRG 통계프로그램</caption>
  216. </group>
  217. <group id="group1" scroll="auto" style="left:0px; top:15px; width:900px; height:890px; ">
  218. <group id="group2" style="left:0px; top:4px; width:895px; height:41px; vertical-align:top; ">
  219. <shape id="roundrect1" appearance="roundrect" style="left:0px; top:0px; width:895px; height:40px; "/>
  220. <caption id="caption30" class="search_name" style="left:3px; top:11px; width:87px; height:17px; ">청구년월 :</caption>
  221. <input id="ipt_clamfromym" ref="/root/send/clamfromym" class="input_search" navindex="1" inputtype="date" format="yyyy-mm" style="left:90px; top:10px; width:69px; height:19px; text-align:center; "/>
  222. <input id="ipt_clamtoym" ref="/root/send/clamtoym" class="input_search" navindex="1" inputtype="date" format="yyyy-mm" style="left:185px; top:10px; width:69px; height:19px; text-align:center; "/>
  223. <caption id="caption2" style="left:165px; top:10px; width:15px; height:20px; ">~</caption>
  224. <button id="btn_select" class="btn1_letter2" navindex="32" style="left:835px; top:10px; width:56px; height:22px; ">
  225. <caption>조회</caption>
  226. <script type="javascript" ev:event="DOMActivate">
  227. <![CDATA[
  228. fGetDocuList();
  229. ]]>
  230. </script>
  231. </button>
  232. <line id="line3" class="line_4" style="x1:825px; y1:5px; x2:825px; y2:38px; "/>
  233. <bool id="bool1" checkvalue="Y,N" ref="/root/send/daywardyn" style="left:264px; top:10px; width:20px; height:20px; "/>
  234. <caption id="caption3" style="left:285px; top:10px; width:100px; height:20px; ">낮병동포함</caption>
  235. <bool id="bool2" checkvalue="Y,N" ref="/root/send/ioflagyn" style="left:366px; top:10px; width:20px; height:20px; "/>
  236. <caption id="caption4" style="left:387px; top:10px; width:100px; height:20px; ">응급실퇴원포함</caption>
  237. </group>
  238. <button id="button3" class="btn4_letter2" style="left:839px; top:866px; width:56px; height:22px; ">
  239. <caption>종료</caption>
  240. <script type="javascript" ev:event="DOMActivate">
  241. <![CDATA[
  242. model.dispatch("xforms-close");
  243. ]]>
  244. </script>
  245. </button>
  246. <switch id="switch1" style="left:0px; top:76px; width:895px; height:789px; ">
  247. <case id="case1" selected="true" style="left:0px; top:0px; width:895px; height:789px; ">
  248. <button id="btn_excelsave" class="btn2_letter4" style="left:830px; top:2px; width:64px; height:19px; ">
  249. <caption>엑셀저장</caption>
  250. <script type="javascript" ev:event="DOMActivate">
  251. <![CDATA[
  252. if (grd_kdrglist.rows > 1) {
  253. var fileName = window.fileDialog("save", "", false, "excel", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  254. if (fileName != "") {
  255. //datagrid.saveExcel의 7번째 인자 값(boolean) : 그리드의 col type=combo일 경우 엑셀저장내용이 lable 또는 value로 설정 함
  256. // grd_clbsmast.saveExcel(fileName, "SheetName", true, true, "", "", true);
  257. grd_kdrglist.saveExcel(fileName, "sheetname:;colhiddenextend:false;rowhiddenextend:false;col_2:label;", true, true, "", "", true);
  258. }
  259. } else {
  260. messageBox("엑셀저장할 대상자가", "I004"); ///엑셀저장할 대상자가 없습니다.
  261. }
  262. ]]>
  263. </script>
  264. </button>
  265. <line id="line1" class="line_1" style="x1:0px; y1:22px; x2:895px; y2:22px; "/>
  266. <datagrid id="grd_kdrglist" nodeset="/root/main/kdrglist/kdrg" class="datagrid3" caption="대분류^진료과^MDC^DRG번호^DRG명^환자수^총입원일수" colsep="^" colwidth="57, 100, 42, 54, 408, 45, 66" explorerbar="sortshowmove" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:0px; top:27px; width:895px; height:761px; text-align:center; ">
  267. <col ref="drgtype"/>
  268. <col ref="orddeptcd" type="combo">
  269. <choices>
  270. <itemset nodeset="/root/init/orddeptcd2/orddeptcdlist">
  271. <label ref="nm"/>
  272. <value ref="cd"/>
  273. </itemset>
  274. </choices>
  275. </col>
  276. <col ref="mdc"/>
  277. <col ref="drgno"/>
  278. <col ref="drgname"/>
  279. <col ref="pidcnt"/>
  280. <col ref="chosindaynocnt"/>
  281. <script type="javascript" ev:event="onscrollpos">
  282. <![CDATA[
  283. ]]>
  284. </script>
  285. <script type="javascript" ev:event="onscroll">
  286. <![CDATA[
  287. var rowno = grd_kdrglist.rows - grd_kdrglist.fixedRows;
  288. var cvalue = 0;
  289. if(rowno / 10000 >= 1) {
  290. cvalue = (rowno/10000) / Math.floor(rowno/10000);
  291. }
  292. if(grd_kdrglist.vscroll.attribute("max") == grd_kdrglist.vscroll.attribute("pos") && grd_kdrglist.row > 0 && cvalue == 1) {
  293. // end of scroll
  294. var offcnt = model.getXPathValue("count(/root/main/kdrglist/kdrg)");
  295. model.setValue("/root/send/offset", offcnt);
  296. submit("TRPID24301");
  297. grd_kdrglist.dispatch("onmouseup"); // 스크롤바 처리를 위한 이벤트 발생
  298. }
  299. //
  300. // if (model.getValue("/root/main/kdrglist/kdrg/tot_cnt") == rowno) {
  301. // alert("마지막");
  302. // return false;
  303. // }
  304. //
  305. ]]>
  306. </script>
  307. </datagrid>
  308. </case>
  309. <case id="case2" style="left:0px; top:0px; width:895px; height:789px; ">
  310. <button id="button1" class="btn2_letter4" style="left:830px; top:2px; width:64px; height:19px; ">
  311. <caption>엑셀저장</caption>
  312. <script type="javascript" ev:event="DOMActivate">
  313. <![CDATA[
  314. if (datagrid1.rows > 1) {
  315. var fileName = window.fileDialog("save", "", false, "excel", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  316. if (fileName != "") {
  317. //datagrid.saveExcel의 7번째 인자 값(boolean) : 그리드의 col type=combo일 경우 엑셀저장내용이 lable 또는 value로 설정 함
  318. // grd_clbsmast.saveExcel(fileName, "SheetName", true, true, "", "", true);
  319. datagrid1.saveExcel(fileName, "sheetname:;colhiddenextend:false;rowhiddenextend:false;col_2:label;", true, true, "", "", true);
  320. }
  321. } else {
  322. messageBox("엑셀저장할 대상자가", "I004"); ///엑셀저장할 대상자가 없습니다.
  323. }
  324. ]]>
  325. </script>
  326. </button>
  327. <line id="line2" class="line_1" style="x1:0px; y1:22px; x2:895px; y2:22px; "/>
  328. <datagrid id="datagrid1" nodeset="/root/main/kdrgdrlist/kdrg" class="datagrid3" caption="대분류^진료과^진료의^MDC^DRG번호^DRG명^환자수^총입원일수" colsep="^" colwidth="57, 100, 82, 42, 54, 377, 45, 66" explorerbar="sortshowmove" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:0px; top:27px; width:895px; height:761px; text-align:center; ">
  329. <col ref="drgtype"/>
  330. <col ref="orddeptcd" type="combo">
  331. <choices>
  332. <itemset nodeset="/root/init/orddeptcd2/orddeptcdlist">
  333. <label ref="nm"/>
  334. <value ref="cd"/>
  335. </itemset>
  336. </choices>
  337. </col>
  338. <col ref="orddrnm"/>
  339. <col ref="mdc"/>
  340. <col ref="drgno"/>
  341. <col ref="drgname"/>
  342. <col ref="pidcnt"/>
  343. <col ref="chosindaynocnt"/>
  344. </datagrid>
  345. </case>
  346. </switch>
  347. <button id="btn_clspcd" class="btn_sw" group="tab" style="left:0px; top:55px; width:100px; height:22px; ">
  348. <caption>진료과별</caption>
  349. <script type="javascript" ev:event="onclick">
  350. <![CDATA[
  351. model.toggle("case1"); // 해당 tab 으로 토글시킨다.
  352. ]]>
  353. </script>
  354. </button>
  355. <button id="button2" class="btn_sw" group="tab" style="left:100px; top:55px; width:100px; height:22px; ">
  356. <caption>진료과별의사별</caption>
  357. <script type="javascript" ev:event="onclick">
  358. <![CDATA[
  359. model.toggle("case2"); // 해당 tab 으로 토글시킨다.
  360. ]]>
  361. </script>
  362. </button>
  363. </group>
  364. </xhtml:body>
  365. </xhtml:html>