SMMNE07500_응급센터 경유 입원통계.xrw 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313
  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. <fromdd/>
  12. <todd/>
  13. <srchflag>A</srchflag>
  14. <srchtext/>
  15. <wardcd/>
  16. </cond>
  17. <patinfo>
  18. <patlist>
  19. <roomcd/>
  20. <hngnm/>
  21. <sexage/>
  22. <pid/>
  23. <orddeptnm/>
  24. <diagnm/>
  25. <fromdd/>
  26. <bfroomcd/>
  27. <todd/>
  28. <afterroom/>
  29. <staycnt/>
  30. <incnt/>
  31. <wardcd/>
  32. <orddeptcd/>
  33. <bfwardcd/>
  34. </patlist>
  35. </patinfo>
  36. <cntlist>
  37. <totalcnt>0</totalcnt>
  38. <erpathcnt>0</erpathcnt>
  39. <erpatper>0</erpatper>
  40. <erwardcnt/>
  41. <erwardper/>
  42. <erwardcntnm/>
  43. <erwardpernm/>
  44. </cntlist>
  45. </main>
  46. <send/>
  47. <hidden>
  48. </hidden>
  49. <code>
  50. <codelist/>
  51. </code>
  52. </root>
  53. </instance>
  54. <submission id="TRMNE07501" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/patlist"/>
  55. <submission id="TRMNW00001" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/code/codelist"/>
  56. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  57. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  58. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  59. <script type="javascript" src="../../../com/commonweb/js/numericHelper.js"/>
  60. <script type="javascript" src="../../../emr/carecomweb/js/CareCom.js"/>
  61. <script type="javascript" ev:event="xforms-ready">
  62. <![CDATA[
  63. fInit();
  64. ]]>
  65. </script>
  66. </model>
  67. <script type="javascript">
  68. <![CDATA[
  69. //화면 초기화 설정
  70. function fInit(){
  71. fGetNursHardCdInfo("'126'", getCurrentDate());
  72. model.removeNodeset("/root/main/trsmlistinfo");
  73. var sTodt = getCurrentDate();
  74. var sFrdt = getCurrentDate().substr(0,6) + "01";
  75. model.setValue("/root/main/cond/fromdd", sFrdt);
  76. model.setValue("/root/main/cond/todd" , sTodt);
  77. cmb_wardcd.value = getUserInfo("dutunitcd");
  78. if(cmb_wardcd.label == "" ){
  79. cmb_wardcd.select(0);
  80. }
  81. fSrchPatList();
  82. }
  83. //환자 정보 조회
  84. function fSrchPatList(){
  85. model.removeNodeset("/root/send");
  86. model.removeNodeset("/root/main/patinfo");
  87. model.makeNode("/root/send");
  88. model.copyNode("/root/send", "/root/main/cond");
  89. submit("TRMNE07501");
  90. fCalcPatInfo();
  91. }
  92. //조회 환자정보 계산
  93. function fCalcPatInfo(){
  94. var TotalCnt = getNodesetCount("/root/main/patinfo/patlist");
  95. var CntCapNm = " 경유 입원환자수";
  96. var CntPerNm = " 경유 입원률";
  97. var CmbValue = cmb_wardcd.value;
  98. var StsWardCd = "";
  99. var ErPathCnt = 0;
  100. var ErWardCnt = 0;
  101. var Ercd = model.getValue("/root/code/codeinfo/codelist[supcdid = '1']/cdid");
  102. if(getNodesetCount("/root/code/codeinfo/codelist") > 2 ){
  103. for(var i = 1 ; i <= getNodesetCount("/root/code/codeinfo/codelist") ; i++){
  104. if(model.getValue("/root/code/codeinfo/codelist["+i+"]/supcdid") == "2" && model.getValue("/root/code/codeinfo/codelist["+i+"]/cdid") != CmbValue){
  105. StsWardCd = model.getValue("/root/code/codeinfo/codelist["+i+"]/cdid");
  106. CntCapNm = model.getValue("/root/code/codeinfo/codelist["+i+"]/cdnm") + CntCapNm;
  107. CntPerNm = model.getValue("/root/code/codeinfo/codelist["+i+"]/cdnm") + CntPerNm;
  108. i = getNodesetCount("/root/code/codeinfo/codelist");
  109. }
  110. }
  111. model.setValue("/root/main/cntlist/erwardcntnm", CntCapNm);
  112. model.setValue("/root/main/cntlist/erwardpernm", CntPerNm);
  113. }else{
  114. model.setValue("/root/main/cntlist/erwardcntnm", "");
  115. model.setValue("/root/main/cntlist/erwardpernm", "");
  116. model.setValue("/root/main/cntlist/erwardcnt", "");
  117. model.setValue("/root/main/cntlist/erwardper", "");
  118. }
  119. if(TotalCnt > 0 ){
  120. for(var i = 1 ; i <= getNodesetCount("/root/main/patinfo/patlist") ; i++ ){
  121. BfWardCd = model.getValue("/root/main/patinfo/patlist["+i+"]/bfwardcd");
  122. if( BfWardCd == Ercd ){
  123. ErPathCnt ++;
  124. }else if( BfWardCd == StsWardCd ){
  125. ErWardCnt ++;
  126. }
  127. }
  128. model.setValue("/root/main/cntlist/totalcnt", TotalCnt);
  129. if(ErPathCnt >0){
  130. model.setValue("/root/main/cntlist/erpathcnt", ErPathCnt);
  131. var ErPathPer = eval(ErPathCnt) / eval(TotalCnt) * 100 ;
  132. model.setValue("/root/main/cntlist/erpatper", ErPathPer );
  133. }else{
  134. model.setValue("/root/main/cntlist/erpathcnt", "0");
  135. model.setValue("/root/main/cntlist/erpatper", "0" );
  136. }
  137. if(StsWardCd == "") return;
  138. if(ErWardCnt >0 ){
  139. model.setValue("/root/main/cntlist/erwardcnt", ErWardCnt);
  140. var ErWardPer = eval(ErWardCnt) / eval(TotalCnt) * 100;
  141. model.setValue("/root/main/cntlist/erwardper", ErWardPer);
  142. }else{
  143. model.setValue("/root/main/cntlist/erwardcnt", "0");
  144. model.setValue("/root/main/cntlist/erwardper", "0");
  145. }
  146. }else{
  147. model.setValue("/root/main/cntlist/totalcnt", "0");
  148. model.setValue("/root/main/cntlist/erpathcnt", "0");
  149. model.setValue("/root/main/cntlist/erpatper", "0" );
  150. if(StsWardCd == "") return;
  151. model.setValue("/root/main/cntlist/erwardcnt", "0");
  152. model.setValue("/root/main/cntlist/erwardper", "0");
  153. }
  154. model.refresh();
  155. }
  156. ]]>
  157. </script>
  158. </xhtml:head>
  159. <xhtml:body guideline="1,1179;1,1224;1,1235;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  160. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  161. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:189px; height:14px; background-image:../../../com/commonweb/images/tit_bullet1.gif; ">응급센터 경유 입원 통계</caption>
  162. </group>
  163. <group id="group5" scroll="auto" style="left:0px; top:13px; width:1195px; height:745px; ">
  164. <caption id="caption12" style="left:0px; top:55px; width:1195px; height:65px; background-color:#ccecff; "/>
  165. <group id="group6" style="left:0px; top:11px; width:1194px; height:35px; vertical-align:top; ">
  166. <shape id="roundrect2" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1194px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
  167. <caption id="caption15" class="search_name" style="left:295px; top:9px; width:86px; height:17px; background-image:../../../com/commonweb/images/search_bullet1.gif; ">조회기간 :</caption>
  168. <input id="ipt_fromdd" ref="/root/main/cond/fromdd" class="input_s_essential" inputtype="date" style="left:384px; top:8px; width:95px; height:19px; background-image:../../../com/commonweb/images/input_s_essential.gif; "/>
  169. <caption id="caption16" style="left:481px; top:12px; width:15px; height:13px; ">~</caption>
  170. <input id="ipt_todd" ref="/root/main/cond/todd" class="input_s_essential" inputtype="date" style="left:495px; top:8px; width:95px; height:19px; background-image:../../../com/commonweb/images/input_s_essential.gif; "/>
  171. <input id="ipt_srchtext" ref="/root/main/cond/srchtext" disabled="true" style="left:837px; top:8px; width:90px; height:19px; ">
  172. <script type="javascript" ev:event="onkeyup">
  173. <![CDATA[
  174. if(event.keyCode == 13) {
  175. setInputNodeCurText(); // 현재 인풋값 노드 반영
  176. button2.dispatch("DOMActivate");
  177. }
  178. ]]>
  179. </script>
  180. </input>
  181. <button id="button2" class="btn1_letter2" style="left:990px; top:7px; width:56px; height:22px; background-image:../../../com/commonweb/images/btn1_letter2.gif; ">
  182. <caption>조회</caption>
  183. <script type="javascript" ev:event="DOMActivate">
  184. <![CDATA[
  185. fSrchPatList();
  186. ]]>
  187. </script>
  188. </button>
  189. <button id="button7" class="btn1_letter2" style="left:1049px; top:7px; width:56px; height:22px; background-image:../../../com/commonweb/images/btn1_letter2.gif; ">
  190. <caption>출력</caption>
  191. <script type="javascript" ev:event="DOMActivate">
  192. <![CDATA[
  193. if(getNodesetCount("/root/main/patinfo/patlist") < 1 ){
  194. messageBox("출력할 데이터가 존재하지 않습니다.", "E");
  195. return;
  196. }
  197. model.removeNodeset("/root/send");
  198. model.makeNode("/root/send");
  199. model.copyNode("/root/send", "/root/main");
  200. model.makeValue("/root/send/wardnm", cmb_wardcd.label );
  201. exeReportPreview("RPMNE07500","XMLSTR","");
  202. ]]>
  203. </script>
  204. </button>
  205. <button id="button8" class="btn1_letter4" style="left:1108px; top:7px; width:80px; height:22px; background-image:../../../com/commonweb/images/btn1_letter4.gif; ">
  206. <caption>엑셀저장</caption>
  207. <script type="javascript" ev:event="DOMActivate">
  208. <![CDATA[
  209. if(getNodesetCount("/root/main/patinfo/patlist") < 1){
  210. messageBox("저장할 데이터가 존재하지 않습니다.", "I");
  211. }else{
  212. fileName = window.fileDialog("save", ",", false, "응급센터 경유 입원 통계_"+getCurrentDate(), "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  213. if (fileName != "") {
  214. datagrid1.saveExcel(fileName, "SheetName", true, true, "", "", false);
  215. }
  216. }
  217. ]]>
  218. </script>
  219. </button>
  220. <line id="line5" class="line_4" style="x1:978px; y1:7px; x2:978px; y2:29px; "/>
  221. <select1 id="rdo_srchflag" ref="/root/main/cond/srchflag" appearance="full" cellspacing="5" cols="3" overflow="visible" style="left:660px; top:10px; width:170px; height:16px; border-style:none; ">
  222. <choices>
  223. <item>
  224. <label>전체</label>
  225. <value>A</value>
  226. </item>
  227. <item>
  228. <label>성명</label>
  229. <value>S</value>
  230. </item>
  231. <item>
  232. <label>환자번호</label>
  233. <value>N</value>
  234. </item>
  235. </choices>
  236. <script type="javascript" ev:event="xforms-value-changed">
  237. <![CDATA[
  238. if(rdo_srchflag.value == "A"){
  239. ipt_srchtext.value = "";
  240. ipt_srchtext.disabled = true;
  241. }else if(rdo_srchflag.value == "S"){
  242. ipt_srchtext.disabled = false;
  243. }else if(rdo_srchflag.value == "N"){
  244. ipt_srchtext.disabled = false;
  245. }
  246. ]]>
  247. </script>
  248. </select1>
  249. <caption id="caption17" class="search_name" style="left:15px; top:9px; width:82px; height:17px; background-image:../../../com/commonweb/images/search_bullet1.gif; ">병동 :</caption>
  250. <select1 id="cmb_wardcd" ref="/root/main/cond/wardcd" appearance="minimal" style="left:78px; top:8px; width:155px; height:19px; ">
  251. <choices>
  252. <itemset nodeset="/root/code/codeinfo/codelist[supcdid= '2' ]">
  253. <label ref="cdnm"/>
  254. <value ref="cdid"/>
  255. </itemset>
  256. </choices>
  257. <script type="javascript" ev:event="xforms-value-changed">
  258. <![CDATA[
  259. fSrchPatList();
  260. ]]>
  261. </script>
  262. </select1>
  263. </group>
  264. <line id="line6" class="line_1" style="x1:0px; y1:141px; x2:1195px; y2:141px; "/>
  265. <caption id="caption18" class="tit_2" style="left:5px; top:125px; width:155px; height:13px; vertical-align:middle; background-image:../../../com/commonweb/images/tit_bullet2.gif; ">
  266. <![CDATA[환자정보]]>
  267. </caption>
  268. <datagrid id="datagrid1" nodeset="/root/main/patinfo/patlist" caption="병실^성명^S/A^등록번호^진료과^진단명^입실일자^입실전 병실^퇴실일자^퇴실후 병실^입원환자수^재원환자수" colsep="^" colwidth="85, 100, 60, 85, 84, 423, 80, 90, 80, 90, 0, 0, 0, 0, 0" explorerbar="sortmove" mergecellsfixedrows="bycolrec" rowsep="|" style="left:0px; top:146px; width:1195px; height:599px; ">
  269. <col ref="roomcd" style="text-align:center; "/>
  270. <col ref="hngnm" style="text-align:center; "/>
  271. <col ref="sexage" style="text-align:center; "/>
  272. <col ref="pid" style="text-align:center; "/>
  273. <col ref="orddeptnm" style="text-align:center; "/>
  274. <col ref="diagnm"/>
  275. <col ref="fromdd" format="yyyy-mm-dd" style="text-align:center; "/>
  276. <col ref="bfroomcd" style="text-align:center; "/>
  277. <col ref="todd" format="yyyy-mm-dd" style="text-align:center; "/>
  278. <col ref="afterroom" style="text-align:center; "/>
  279. <col ref="incnt" visibility="hidden" style="text-align:right; padding-right:10; "/>
  280. <col ref="staycnt" visibility="hidden" style="text-align:right; padding-right:10; "/>
  281. <col ref="wardcd" visibility="hidden"/>
  282. <col ref="orddeptcd" visibility="hidden"/>
  283. <col ref="bfwardcd" visibility="hidden"/>
  284. <script type="javascript" ev:event="onaftersort">
  285. <![CDATA[
  286. datagrid1.gridToInstance();
  287. ]]>
  288. </script>
  289. </datagrid>
  290. <caption id="caption1" style="left:15px; top:65px; width:100px; height:20px; font-weight:bold; ">전체입원환자수</caption>
  291. <caption id="caption2" style="left:250px; top:65px; width:163px; height:20px; font-weight:bold; text-align:right; ">응급센터 경유 입원환자수</caption>
  292. <caption id="caption3" style="left:250px; top:90px; width:163px; height:20px; font-weight:bold; text-align:right; ">응급센터 경유 입원률</caption>
  293. <caption id="caption4" ref="/root/main/cntlist/erwardcntnm" style="left:495px; top:65px; width:249px; height:20px; font-weight:bold; text-align:right; "/>
  294. <caption id="caption5" ref="/root/main/cntlist/erwardpernm" style="left:495px; top:90px; width:249px; height:20px; font-weight:bold; text-align:right; "/>
  295. <caption id="caption7" ref="/root/main/cntlist/totalcnt" style="left:120px; top:65px; width:50px; height:20px; font-weight:bold; text-align:right; ">0</caption>
  296. <caption id="caption8" ref="/root/main/cntlist/erpathcnt" style="left:415px; top:65px; width:50px; height:20px; font-weight:bold; text-align:right; ">0</caption>
  297. <caption id="caption9" ref="/root/main/cntlist/erpatper" format="#.#" roundmode="round" roundposition="-3" style="left:415px; top:90px; width:50px; height:20px; font-weight:bold; text-align:right; ">0</caption>
  298. <caption id="caption10" ref="/root/main/cntlist/erwardcnt" style="left:745px; top:65px; width:50px; height:20px; font-weight:bold; text-align:right; "/>
  299. <caption id="caption11" ref="/root/main/cntlist/erwardper" format="#.#" roundmode="round" roundposition="-3" style="left:745px; top:90px; width:50px; height:20px; font-weight:bold; text-align:right; "/>
  300. </group>
  301. </xhtml:body>
  302. </xhtml:html>