SMMCT00108_전일퇴원예고부도율.xrw 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. * 제 목 : SMMCT00108_전일퇴원예고부도율.xrw
  4. * 설 명 : 전일퇴원예고부도율
  5. * 설 계 자 : 손주연
  6. * 작 성 자 : 손주연
  7. * 작 성 일 : 2009.09.12
  8. * 수정이력 :
  9. * 기 타 :
  10. -->
  11. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.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. <condition>
  20. <fromdd/>
  21. <todd/>
  22. <orddeptcd/>
  23. <medispclid/>
  24. <wardcd/>
  25. <opt_ward>Y</opt_ward>
  26. <opt_orddept>Y</opt_orddept>
  27. <opt_orddr>Y</opt_orddr>
  28. <opt_all>Y</opt_all>
  29. </condition>
  30. <dschdclrtinfo>
  31. <dschdclrtlist>
  32. <orddeptcd/>
  33. <subdeptcd/>
  34. <orddrnm/>
  35. <dschpatcnt/>
  36. <nopaycnt/>
  37. <nopayrate/>
  38. </dschdclrtlist>
  39. </dschdclrtinfo>
  40. </main>
  41. <send>
  42. <reqdata/>
  43. </send>
  44. <init>
  45. <orddept>
  46. <dept/>
  47. </orddept>
  48. <info/>
  49. <userlist>
  50. <usercombo>
  51. <userid/>
  52. <usernm/>
  53. </usercombo>
  54. </userlist>
  55. <subdeptinfo>
  56. <subdeptlist/>
  57. </subdeptinfo>
  58. <orddept2>
  59. <dept/>
  60. </orddept2>
  61. </init>
  62. </root>
  63. </instance>
  64. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  65. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  66. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  67. <script type="javascript" src="../../../emr/commonweb/js/EMRCommon.js"/>
  68. <script type="javascript" src="../../../com/userdeptinfoweb/js/ZSU001.js"/>
  69. <script type="javascript" src="../../../com/departmentcodeweb/js/ZSD001.js"/>
  70. <script type="javascript" src="../../../emr/prcpmngtweb/js/MMO001.js"/>
  71. <script type="javascript" src="../../../emr/emrctlweb/js/MCT001.js"/>
  72. <script type="javascript" ev:event="xforms-ready">
  73. <![CDATA[
  74. fInit_SMMCT00108();
  75. ]]>
  76. </script>
  77. <submission id="TRMMB04101" method="post" mediatype="application/x-www-form-urlencoded"/>
  78. <submission id="TRMMB04102" method="post" mediatype="application/x-www-form-urlencoded"/>
  79. <submission id="TRMMB04103" method="post" mediatype="application/x-www-form-urlencoded"/>
  80. <submission id="TRMMB04106" method="post" mediatype="application/x-www-form-urlencoded"/>
  81. <submission id="TRMCT00108" ref="/root/send/reqdata" method="post" mediatype="application/x-www-form-urlencoded" replace="instance" resultref="/root/main/dschdclrtinfo"/>
  82. </model>
  83. <script type="javascript">
  84. <![CDATA[
  85. /*
  86. * @desc : 초기화
  87. */
  88. function fInit_SMMCT00108(){
  89. //병동
  90. mmbfGetDeptCodeComboList("/root/send/reqdata", "/root/init/orddept2", "W"); //병동코드 콤보
  91. addComboInstance("/root/init/orddept2" , "deptcd^depthngnm", "-^전체", "dept"); //부서콤보 Item '전체'추가
  92. //진료과
  93. mmbfGetDeptCodeComboList("/root/send/reqdata", "/root/init/orddept" , "D"); //부서코드 콤보
  94. addComboInstance("/root/init/orddept" , "deptcd^depthngnm", "-^전체", "dept"); //부서콤보 Item '전체'추가
  95. //addComboInstance("/root/init/subdeptinfo" , "subdeptcd^subdeptnm", "-^전체", "subdeptlist"); //부서콤보 Item '전체'추가
  96. //전문의
  97. mmbfGetUserComboList("/root/send/reqdata", "/root/init/userlist" , getUserInfo("dutplcecd"), "0330", "", "M");
  98. addComboInstance("/root/init/userlist", "userid^usernm", "-^전체", "usercombo"); //의사콤보 전체항목 추가
  99. //초기값 셋팅
  100. model.setValue("/root/main/condition/fromdd" , getCurrentDate().toDate().getAddDate(-1,"D").getDateFormat() );
  101. model.setValue("/root/main/condition/todd" , getCurrentDate().toDate().getAddDate(-1,"D").getDateFormat() );
  102. model.setValue("/root/main/condition/orddeptcd" , "-");
  103. model.setValue("/root/main/condition/wardcd" , "-");
  104. model.setValue("/root/main/condition/medispclid" , "-");
  105. model.removeNodeset(grd_dschdclrtlst.nodeset );
  106. cap_total.value = "총 0 건";
  107. //fSetCtrlStat();
  108. model.refresh();
  109. }
  110. /**
  111. * @desc : 전일퇴원예고부도율 조회
  112. */
  113. function fGetDschDclrNopayRate(){
  114. var cnt = 0 ;
  115. cap_total.value = "총 " + cnt + " 건";
  116. model.removeNodeset(grd_dschdclrtlst.nodeset);
  117. model.resetInstanceNode("/root/send/reqdata");
  118. model.copyNode("/root/send/reqdata", "/root/main/condition");
  119. if( model.getValue("/root/send/reqdata/orddeptcd") == "-" ) model.setValue("/root/send/reqdata/orddeptcd", "");
  120. if( model.getValue("/root/send/reqdata/medispclid") == "-" ) model.setValue("/root/send/reqdata/medispclid", "");
  121. if( model.getValue("/root/send/reqdata/wardcd") == "-" ) model.setValue("/root/send/reqdata/wardcd", "");
  122. if( chk_ward.value != "Y" ) model.setValue("/root/send/reqdata/wardcd", "");
  123. if( chk_dept.value != "Y" ) model.setValue("/root/send/reqdata/orddeptcd", "");
  124. if( chk_dr.value != "Y" ) model.setValue("/root/send/reqdata/medispclid", "");
  125. submit("TRMCT00108");
  126. var nodelst = instance1.selectNodes(grd_dschdclrtlst.nodeset );
  127. /*
  128. var tmpCnt = 0 ;
  129. var sCnt = "";
  130. if( nodelst.length > 0 ) {
  131. var sCnt = "";
  132. for( var i = 1 ; i <= nodelst.length ; i++ ) {
  133. sCnt = model.getValue(grd_dschdclrtlst.nodeset + "[" + i + "]/total" );
  134. if( !isNull(sCnt ) ) {
  135. tmpCnt = parseInt(sCnt) ;
  136. if( !isNaN(tmpCnt) ) cnt = cnt + tmpCnt ;
  137. }
  138. }
  139. }
  140. */
  141. cap_total.value = "총 " + cnt + " 건";
  142. var vGrupCol = -1;
  143. if( model.getValue("/root/main/condition/opt_ward") == "Y" ) {
  144. if( model.getValue("/root/main/condition/opt_orddept") == "Y" || model.getValue("/root/main/condition/opt_orddr") == "Y" ) vGrupCol = 2;
  145. } else if ( model.getValue("/root/main/condition/opt_orddept") == "Y" ) {
  146. if ( model.getValue("/root/main/condition/opt_orddr") == "Y" ) vGrupCol = 3;
  147. } else if ( model.getValue("/root/main/condition/opt_orddr") == "Y" ) {
  148. vGrupCol = 3;
  149. }
  150. /*
  151. grd_dschdclrtlst.subtotalPosition = "below";
  152. if( model.getValue("/root/main/condition/opt_ward") == "Y" || model.getValue("/root/main/condition/opt_orddept") == "Y" || model.getValue("/root/main/condition/opt_orddr") == "Y" ) {
  153. grd_dschdclrtlst.subTotal("sum" , 1, 5 , "format:#,###; ", "background-color:#fafad2; font-weight:bold;" );
  154. grd_dschdclrtlst.subTotal("sum" , 1, 6 , "format:#,###; ", "background-color:#fafad2; font-weight:bold;" );
  155. grd_dschdclrtlst.subTotal("sum" , 1, 7 , "format:#,###; ", "background-color:#fafad2; font-weight:bold;" );
  156. grd_dschdclrtlst.subTotal("average" , 1, 8 , "format:#,###%; ", "background-color:#fafad2; font-weight:bold;" );
  157. }
  158. if( vGrupCol > 0 ) {
  159. grd_dschdclrtlst.subTotal("sum" , vGrupCol, 5 , "format:#,###; ", "background-color:#fafad2; font-weight:bold;" );
  160. grd_dschdclrtlst.subTotal("sum" , vGrupCol, 6 , "format:#,###; ", "background-color:#fafad2; font-weight:bold;" );
  161. grd_dschdclrtlst.subTotal("sum" , vGrupCol, 7 , "format:#,###; ", "background-color:#fafad2; font-weight:bold;" );
  162. grd_dschdclrtlst.subTotal("average" , vGrupCol, 8 , "format:#,###%; ", "background-color:#fafad2; font-weight:bold;" );
  163. }
  164. */
  165. grd_dschdclrtlst.rebuildStyle();
  166. for( var i = 1 ; i <= grd_dschdclrtlst.rows; i++ ) {
  167. if(! isNull( grd_dschdclrtlst.valueMatrix(i, grd_dschdclrtlst.colref("grup"))) ){
  168. grd_dschdclrtlst.rowStyle(i ,"data", "background-color" ) = "#fafad2" ;
  169. grd_dschdclrtlst.rowStyle( i , "data", "font-weight" ) = "bold" ;
  170. }
  171. }
  172. cap_total.value = "총 " + cnt + " 건";
  173. model.refresh();
  174. }
  175. /**
  176. * @desc : 조회옵션에 따른 control 설정
  177. * @param : flag ( W:병동, D:진료과, M:주치의, NULL: 전체 )
  178. */
  179. function fSetCtrlStat( flag ){
  180. cmb_ward.disabled = true ;
  181. cmb_orddept.disabled = true ;
  182. cmb_medispclid.disabled = true ;
  183. grd_dschdclrtlst.colHidden(grd_dschdclrtlst.colRef("wardnm") ) = true ;
  184. grd_dschdclrtlst.colHidden(grd_dschdclrtlst.colRef("orddeptnm") ) = true ;
  185. grd_dschdclrtlst.colHidden(grd_dschdclrtlst.colRef("orddrnm") ) = true ;
  186. var opt_ward = chk_ward.value ;
  187. var opt_dept = chk_dept.value ;
  188. var opt_dr = chk_dr.value ;
  189. var opt_all = chk_all.value ;
  190. if( isNull(flag) ){
  191. if( opt_all == "Y" ) {
  192. cmb_ward.disabled = false ;
  193. cmb_orddept.disabled = false ;
  194. cmb_medispclid.disabled = false ;
  195. chk_ward.value = "Y";
  196. chk_dept.value = "Y";
  197. chk_dr.value = "Y";
  198. grd_dschdclrtlst.colHidden(grd_dschdclrtlst.colRef("wardnm") ) = false ;
  199. grd_dschdclrtlst.colHidden(grd_dschdclrtlst.colRef("orddeptnm") ) = false ;
  200. grd_dschdclrtlst.colHidden(grd_dschdclrtlst.colRef("orddrnm") ) = false ;
  201. } else {
  202. chk_ward.value = "";
  203. chk_dept.value = "";
  204. chk_dr.value = "";
  205. }
  206. } else {
  207. if ( opt_ward == "Y" ) {
  208. cmb_ward.disabled = false ;
  209. grd_dschdclrtlst.colHidden(grd_dschdclrtlst.colRef("wardnm") ) = false ;
  210. }
  211. if ( opt_dept == "Y" ) {
  212. cmb_orddept.disabled = false ;
  213. grd_dschdclrtlst.colHidden(grd_dschdclrtlst.colRef("orddeptnm") ) = false ;
  214. }
  215. if ( opt_dr == "Y" ) {
  216. chk_dept.value = "Y";
  217. cmb_orddept.disabled = false ;
  218. grd_dschdclrtlst.colHidden(grd_dschdclrtlst.colRef("orddeptnm") ) = false ;
  219. cmb_medispclid.disabled = false ;
  220. grd_dschdclrtlst.colHidden(grd_dschdclrtlst.colRef("orddrnm") ) = false ;
  221. }
  222. }
  223. btn_req.dispatch("DOMActivate");
  224. }
  225. ]]>
  226. </script>
  227. </xhtml:head>
  228. <xhtml:body accesskey="f2" guideline="2,763;2,765;2,763;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  229. <caption id="cap_title" class="tit_1" style="left:0px; top:0px; width:300px; height:14px; ">전일퇴원예고 부도율</caption>
  230. <shape id="roundrect1" appearance="roundrect" style="left:0px; top:20px; width:1194px; height:65px; "/>
  231. <button id="btn_req" class="btn1_letter2" style="left:1125px; top:40px; width:56px; height:22px; background-image:../../../com/commonweb/images/btn1_letter2.gif; ">
  232. <caption>조회</caption>
  233. <script type="javascript" ev:event="DOMActivate">
  234. <![CDATA[
  235. fGetDschDclrNopayRate();
  236. ]]>
  237. </script>
  238. </button>
  239. <line id="line5" style="x1:1110px; y1:30px; x2:1110px; y2:77px; border-color:#ffe4bb; border-left-style:solid; "/>
  240. <caption id="caption20" class="tit_2" style="left:5px; top:92px; width:270px; height:13px; ">전일퇴원예고 부도율 조회</caption>
  241. <input id="ipt_srchfromdd" ref="/root/main/condition/todd" class="input_s_essential" inputtype="date" style="left:180px; top:32px; width:90px; height:19px; "/>
  242. <input id="ipt_srchtodd" ref="/root/main/condition/fromdd" class="input_s_essential" inputtype="date" style="left:75px; top:32px; width:90px; height:19px; "/>
  243. <caption id="caption8" style="left:164px; top:34px; width:15px; height:15px; ">~</caption>
  244. <caption id="caption9" class="search_name" style="left:15px; top:32px; width:86px; height:17px; ">기간 :</caption>
  245. <datagrid id="grd_dschdclrtlst" nodeset="/root/main/dschdclrtinfo/dschdclrtlist" caption="g^병동^진료과^전문의^퇴원예고건수^사망환자수^부도건수^부도율" colwidth="0, 200, 200, 200, 94, 109, 124, 109" ellipsis="true" explorerbar="sortshow" extendlastcol="noscroll" mergecells="never" mergecellsfixedrows="bycolrec" rowheader="seq" subtotalposition="below" rowsep="|" colsep="^" tooltip="true" style="left:0px; top:113px; width:1187px; height:650px; ">
  246. <col ref="grup"/>
  247. <col ref="wardnm" style="text-align:center; "/>
  248. <col ref="orddeptnm" style="text-align:center; "/>
  249. <col ref="orddrnm" style="text-align:center; "/>
  250. <col ref="dschdclrcnt" style="text-align:center; "/>
  251. <col ref="deathpatcnt" format="( #,### )" style="text-align:center; "/>
  252. <col ref="nopaycnt" style="text-align:center; "/>
  253. <col ref="nopayrate" format="#,###%" style="text-align:center; "/>
  254. </datagrid>
  255. <select1 id="cmb_medispclid" ref="/root/main/condition/medispclid" class="combo_search" appearance="minimal" itemwidth="100" itemcount="30" style="left:740px; top:58px; width:105px; height:19px; ">
  256. <choices>
  257. <itemset nodeset="/root/init/userlist/usercombo">
  258. <label ref="usernm"/>
  259. <value ref="userid"/>
  260. </itemset>
  261. </choices>
  262. </select1>
  263. <caption id="caption14" class="search_name" visibility="hidden" style="left:861px; top:90px; width:76px; height:17px; ">세 부 과</caption>
  264. <select1 id="cmb_subdept" ref="/root/main/condition/subdeptcd" class="combo" visibility="hidden" appearance="minimal" itemwidth="100" style="left:945px; top:90px; width:100px; height:19px; ">
  265. <choices>
  266. <itemset nodeset="/root/init/subdeptinfo/subdeptlist">
  267. <label ref="subdeptnm"/>
  268. <value ref="subdeptcd"/>
  269. </itemset>
  270. </choices>
  271. </select1>
  272. <caption id="caption7" class="search_name" style="left:460px; top:58px; width:76px; height:17px; ">진 료 과</caption>
  273. <caption id="caption1" class="search_name" style="left:661px; top:58px; width:76px; height:17px; ">주 치 의</caption>
  274. <select1 id="cmb_orddept" ref="/root/main/condition/orddeptcd" class="combo_search" appearance="minimal" itemwidth="100" editmode="search" style="left:545px; top:58px; width:100px; height:19px; ">
  275. <choices>
  276. <itemset nodeset="/root/init/orddept/dept">
  277. <label ref="depthngnm"/>
  278. <value ref="deptcd"/>
  279. </itemset>
  280. </choices>
  281. <script type="javascript" ev:event="xforms-value-changed">
  282. <![CDATA[
  283. fSetMedDr("", cmb_orddept.value ) ;
  284. ]]>
  285. </script>
  286. </select1>
  287. <caption id="cap_total" class="search_name" visibility="hidden" style="left:961px; top:42px; width:125px; height:17px; ">총 0 건</caption>
  288. <line id="line1" class="line_1" style="x1:0px; y1:111px; x2:1187px; y2:111px; "/>
  289. <caption id="caption2" class="search_name" style="left:280px; top:58px; width:76px; height:17px; ">병 동</caption>
  290. <select1 id="cmb_ward" ref="/root/main/condition/wardcd" class="combo_search" appearance="minimal" itemwidth="100" itemcount="30" style="left:345px; top:58px; width:105px; height:19px; ">
  291. <choices>
  292. <itemset nodeset="/root/init/orddept2/dept">
  293. <label ref="depthngnm"/>
  294. <value ref="deptcd"/>
  295. </itemset>
  296. </choices>
  297. </select1>
  298. <caption id="caption3" class="search_name" style="left:280px; top:32px; width:91px; height:17px; ">조 회 옵 션</caption>
  299. <select id="chk_ward" ref="/root/main/condition/opt_ward" class="checkbox_search" overflow="visible" appearance="full" cols="1" sep="|" cellspacing="30" style="left:395px; top:32px; width:55px; height:20px; border-style:none; ">
  300. <choices>
  301. <item>
  302. <label>병 동</label>
  303. <value>Y</value>
  304. </item>
  305. </choices>
  306. <script type="javascript" ev:event="xforms-value-changed">
  307. <![CDATA[
  308. fSetCtrlStat( "W");
  309. ]]>
  310. </script>
  311. </select>
  312. <select id="chk_dept" ref="/root/main/condition/opt_orddept" class="checkbox_search" overflow="visible" appearance="full" cols="1" sep="|" cellspacing="30" style="left:465px; top:32px; width:75px; height:20px; border-style:none; ">
  313. <choices>
  314. <item>
  315. <label>진 료 과</label>
  316. <value>Y</value>
  317. </item>
  318. </choices>
  319. <script type="javascript" ev:event="xforms-value-changed">
  320. <![CDATA[
  321. fSetCtrlStat( "D");
  322. ]]>
  323. </script>
  324. </select>
  325. <select id="chk_dr" ref="/root/main/condition/opt_orddr" class="checkbox_search" overflow="visible" appearance="full" cols="1" sep="|" cellspacing="30" style="left:555px; top:32px; width:75px; height:20px; border-style:none; ">
  326. <choices>
  327. <item>
  328. <label>주 치 의</label>
  329. <value>Y</value>
  330. </item>
  331. </choices>
  332. <script type="javascript" ev:event="xforms-value-changed">
  333. <![CDATA[
  334. fSetCtrlStat( "M");
  335. ]]>
  336. </script>
  337. </select>
  338. <select id="chk_all" ref="/root/main/condition/opt_all" class="checkbox_search" overflow="visible" appearance="full" cols="1" sep="|" cellspacing="30" style="left:645px; top:32px; width:75px; height:20px; border-style:none; ">
  339. <choices>
  340. <item>
  341. <label>전 체</label>
  342. <value>Y</value>
  343. </item>
  344. </choices>
  345. <script type="javascript" ev:event="xforms-value-changed">
  346. <![CDATA[
  347. fSetCtrlStat( "");
  348. ]]>
  349. </script>
  350. </select>
  351. <button id="button1" class="btn2_letter2" style="left:1145px; top:90px; width:42px; height:19px; ">
  352. <caption>엑셀</caption>
  353. <script type="javascript" ev:event="DOMActivate">
  354. <![CDATA[
  355. var title = "전일퇴원예고부도율 (" + model.getValue("/root/main/condition/fromdd" ) + " ~ " + model.getValue("/root/main/condition/todd" ) + " ) " ;
  356. //fsaveGridToExcel(grd_inpatinfolst, title);
  357. var fileName = window.fileDialog("save", ",", false, "전일퇴원예고부도율", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  358. if (fileName != ""){
  359. grd_dschdclrtlst.saveExcel(fileName, "전일퇴원예고부도율", true, true, "", "", false);
  360. var s = fileName.lastIndexOf("\\");
  361. var fileName=fileName.substring(s+1);
  362. var rmsg = messageBox("저장된 Excel을", "Q004");
  363. if( rmsg == 6 ){
  364. window.exec("excel.exe", fileName);
  365. }
  366. }
  367. ]]>
  368. </script>
  369. </button>
  370. </xhtml:body>
  371. </xhtml:html>