SMPCT00100_외래진료실현황판.xrw 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * 제 목 : SMPCT00100_외래진료실현황판.xrw
  4. * 설 명 : 외래진료실현황판
  5. * 설 계 자 : 유정란
  6. * 작 성 자 : 유정란
  7. * 작 성 일 : 2009.08.18
  8. * 수정이력 :
  9. * 기 타 :
  10. -->
  11. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
  12. <?xml-stylesheet href="C:/CMCProject/application/webapps/com/commonweb/css/common.css" type="text/css" ?>
  13. <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">
  14. <xhtml:head>
  15. <xhtml:title>외래진료실현황판</xhtml:title>
  16. <model id="model1">
  17. <instance id="instance1">
  18. <root xmlns="">
  19. <main>
  20. <gridlist>
  21. <grid>
  22. <txt2/>
  23. <txt3/>
  24. <txt4/>
  25. <txt5/>
  26. <col1/>
  27. <col2/>
  28. <col3/>
  29. <col4/>
  30. <col5/>
  31. <col6/>
  32. <col7/>
  33. <col8/>
  34. <col9/>
  35. <col10/>
  36. <col11/>
  37. <col12/>
  38. <col13/>
  39. <col14/>
  40. <col15/>
  41. <col16/>
  42. <col17/>
  43. <col18/>
  44. <col19/>
  45. <col20/>
  46. <col21/>
  47. <col22/>
  48. <col23/>
  49. <col24/>
  50. <col25/>
  51. <col26/>
  52. <col27/>
  53. <col28/>
  54. <col29/>
  55. <col30/>
  56. <col31/>
  57. <col32/>
  58. <col33/>
  59. <col34/>
  60. <col35/>
  61. <col36/>
  62. <col37/>
  63. <col38/>
  64. <col39/>
  65. <col40/>
  66. <col41/>
  67. <col42/>
  68. <col43/>
  69. <col44/>
  70. <col45/>
  71. <col46/>
  72. <col47/>
  73. <col48/>
  74. <col49/>
  75. <col50/>
  76. <col51/>
  77. <col52/>
  78. <col53/>
  79. <col54/>
  80. <col55/>
  81. <col56/>
  82. <col57/>
  83. <col58/>
  84. <col59/>
  85. <col60/>
  86. <col61/>
  87. <col62/>
  88. <col63/>
  89. <col64/>
  90. <col65/>
  91. <col66/>
  92. <col67/>
  93. <col68/>
  94. <col69/>
  95. <col70/>
  96. </grid>
  97. </gridlist>
  98. <gridlist2>
  99. <grid>
  100. <col1/>
  101. </grid>
  102. </gridlist2>
  103. </main>
  104. <send>
  105. <data1/>
  106. </send>
  107. <init/>
  108. <hidden>
  109. <condition1/>
  110. <condition2/>
  111. <condition3/>
  112. <svrnm/>
  113. </hidden>
  114. <temp>
  115. <systime/>
  116. </temp>
  117. </root>
  118. </instance>
  119. <script type="javascript" ev:event="xforms-ready">
  120. <![CDATA[
  121. fInitialize();
  122. datagrid1.frozencols = 4;
  123. fSysTime();
  124. fSearch("getOutOrdList");
  125. if (datagrid1.rows > 0) {
  126. datagrid1.mergecells = "byrestriccol";
  127. model.refresh();
  128. fGridColorChange();
  129. }
  130. gintval = window.setInterval("fCall();",30000); //30초
  131. ]]>
  132. </script>
  133. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  134. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  135. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  136. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  137. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  138. <script type="javascript" src="../../../pam/pamctlweb/js/PCTCOM.js"/>
  139. <script type="javascript">
  140. <![CDATA[
  141. var gintval
  142. function fCall(){
  143. fSysTime();
  144. fSearch("getOutOrdList");
  145. if (datagrid1.rows > 0) {
  146. datagrid1.mergecells = "byrestriccol";
  147. model.refresh();
  148. fGridColorChange();
  149. }
  150. }
  151. function fSysTime(){
  152. var sdate = getCurrentDate();
  153. var stime = getCurrentTime();
  154. var sweek = getCurrentWeek("K");
  155. var sampmflag = "";
  156. var ssystime = "";
  157. if (eval(stime.substring(0,4)) < 1330){
  158. sampmflag = " (오전진료)";
  159. }
  160. else{
  161. sampmflag = " (오후진료)";
  162. }
  163. ssystime = sdate.substring(0,4) + "년 " + sdate.substring(4,6) + "월 " + sdate.substring(6,8) + "일(" + sweek + ") " + stime.substring(0,2) + ":" + stime.substring(2,4) + ":" + stime.substring(4,6) + sampmflag;
  164. model.setValue("/root/temp/systime",ssystime);
  165. output2.refresh();
  166. }
  167. function fGridColorChange(){
  168. var temp = "";
  169. var temp2 = "";
  170. var ampm = "";
  171. for (col = 1; col <= 50; col++){
  172. // if (col == 2) break;
  173. for (row = 1; row <= datagrid1.rows; row++){
  174. ampm = model.getValue("/root/main/gridlist/grid["+ row +"]/txt5");
  175. if (ampm == "오전"){
  176. datagrid1.cellStyle("background-color",row,col,row,col) = "#fffffe";
  177. }
  178. else{
  179. datagrid1.cellStyle("background-color",row,col,row,col) = "#dddddd";
  180. }
  181. }
  182. }
  183. for (col = 1; col <= 50; col++){
  184. // if (col == 2) break;
  185. for (row = 1; row <= datagrid1.rows; row++){
  186. temp = model.getValue("/root/main/gridlist/grid["+ row +"]/col"+col).getCarrigeReturnRemove();
  187. temp2 = model.getValue("/root/main/gridlist/grid["+ row +"]/col"+col);
  188. if (temp == "" || temp == null || temp == " "){
  189. // datagrid1.cellStyle("background-color",row,col+4,row,col+4) = "#fffffe";
  190. continue;
  191. }
  192. temp = temp.substring(temp.indexOf("*")+1,temp.length);
  193. //alert(temp);
  194. if (temp == null || temp == "" || temp == " ") continue;
  195. temp = eval(temp);
  196. model.setValue("/root/main/gridlist/grid["+ row +"]/col"+col, temp2.setReplaceWord(temp2.substring(temp2.indexOf("*"),temp2.length),""));
  197. if (temp <= 0){
  198. // datagrid1.cellStyle("background-color",row,col+4,row,col+4) = "#fffffe";
  199. }
  200. else if (temp < 10){
  201. datagrid1.cellStyle("background-color",row,col+4,row,col+4) = "#ffff00";
  202. }
  203. else if (temp >= 10 && temp < 30){
  204. datagrid1.cellStyle("background-color",row,col+4,row,col+4) = "#ffcc00";
  205. }
  206. else if (temp >= 30){
  207. datagrid1.cellStyle("background-color",row,col+4,row,col+4) = "#ff0000";
  208. }
  209. }
  210. }
  211. }
  212. ]]>
  213. </script>
  214. <submission id="TRPCTCOM01" ref="/root/send" method="post" mediatype="application/x-www-form-urlencoded" replace="instance" resultref="/root/main"/>
  215. <script type="javascript" ev:event="xforms-model-destruct">
  216. <![CDATA[
  217. window.clearinterval(gintval);
  218. ]]>
  219. </script>
  220. </model>
  221. </xhtml:head>
  222. <xhtml:body>
  223. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:210px; height:13px; ">외래진료실현황판(실시간)</caption>
  224. <datagrid id="datagrid1" nodeset="/root/main/gridlist/grid" autoresize="true" caption="위치^센터^임상과^구분^진료실수^진료실1^진료실2^진료실3^진료실4^진료실5^진료실6^진료실7^진료실8^진료실9^진료실10^진료실11^진료실12^진료실13^진료실14^진료실15^진료실16^진료실17^진료실18^진료실19^진료실20^진료실21^진료실22^진료실23^진료실24^진료실25^진료실26^진료실27^진료실28^진료실29^진료실30^진료실31^진료실32^진료실33^진료실34^진료실35^진료실36^진료실37^진료실38^진료실39^진료실40^col45^col46^col47^col48^col49^col50^col51^col52^col53^col54^col55^col56^col57^col58^col59^col60^col61^col62^col63^col64^col65^col66^col67^col68^col69^col70^col71^col72" colwidth="68, 131, 102, 48, 58, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70" mergecellsfixedrows="bycolrec" rowsep="|" colsep="^" style="left:0px; top:30px; width:1190px; height:751px; ">
  225. <col ref="txt2"/>
  226. <col ref="txt3"/>
  227. <col ref="txt4"/>
  228. <col ref="txt5"/>
  229. <col ref="txt6" style="text-align:center; "/>
  230. <col ref="col1" style="font-weight:bold; "/>
  231. <col ref="col2" style="font-weight:bold; "/>
  232. <col ref="col3" style="font-weight:bold; "/>
  233. <col ref="col4" style="font-weight:bold; "/>
  234. <col ref="col5" style="font-weight:bold; "/>
  235. <col ref="col6" style="font-weight:bold; "/>
  236. <col ref="col7" style="font-weight:bold; "/>
  237. <col ref="col8" style="font-weight:bold; "/>
  238. <col ref="col9" style="font-weight:bold; "/>
  239. <col ref="col10" style="font-weight:bold; "/>
  240. <col ref="col11" style="font-weight:bold; "/>
  241. <col ref="col12" style="font-weight:bold; "/>
  242. <col ref="col13" style="font-weight:bold; "/>
  243. <col ref="col14" style="font-weight:bold; "/>
  244. <col ref="col15" style="font-weight:bold; "/>
  245. <col ref="col16" style="font-weight:bold; "/>
  246. <col ref="col17" style="font-weight:bold; "/>
  247. <col ref="col18" style="font-weight:bold; "/>
  248. <col ref="col19" style="font-weight:bold; "/>
  249. <col ref="col20" style="font-weight:bold; "/>
  250. <col ref="col21" style="font-weight:bold; "/>
  251. <col ref="col22" style="font-weight:bold; "/>
  252. <col ref="col23" style="font-weight:bold; "/>
  253. <col ref="col24" style="font-weight:bold; "/>
  254. <col ref="col25" style="font-weight:bold; "/>
  255. <col ref="col26" style="font-weight:bold; "/>
  256. <col ref="col27" style="font-weight:bold; "/>
  257. <col ref="col28" style="font-weight:bold; "/>
  258. <col ref="col29" style="font-weight:bold; "/>
  259. <col ref="col30" style="font-weight:bold; "/>
  260. <col ref="col31" style="font-weight:bold; "/>
  261. <col ref="col32" style="font-weight:bold; "/>
  262. <col ref="col33" style="font-weight:bold; "/>
  263. <col ref="col34" style="font-weight:bold; "/>
  264. <col ref="col35" style="font-weight:bold; "/>
  265. <col ref="col36" style="font-weight:bold; "/>
  266. <col ref="col37" style="font-weight:bold; "/>
  267. <col ref="col38" style="font-weight:bold; "/>
  268. <col ref="col39" style="font-weight:bold; "/>
  269. <col ref="col40" style="font-weight:bold; "/>
  270. <col ref="col41" style="font-weight:bold; "/>
  271. <col ref="col42" style="font-weight:bold; "/>
  272. <col ref="col43" style="font-weight:bold; "/>
  273. <col ref="col44" style="font-weight:bold; "/>
  274. <col ref="col45" style="font-weight:bold; "/>
  275. <col ref="col46" style="font-weight:bold; "/>
  276. <col ref="col47" style="font-weight:bold; "/>
  277. <col ref="col48" style="font-weight:bold; "/>
  278. <col ref="col49" style="font-weight:bold; "/>
  279. <col ref="col50" style="font-weight:bold; "/>
  280. <col ref="col51" style="font-weight:bold; "/>
  281. <col ref="col52" style="font-weight:bold; "/>
  282. <col ref="col53" style="font-weight:bold; "/>
  283. <col ref="col54" style="font-weight:bold; "/>
  284. <col ref="col55" style="font-weight:bold; "/>
  285. <col ref="col56" style="font-weight:bold; "/>
  286. <col ref="col57" style="font-weight:bold; "/>
  287. <col ref="col58" style="font-weight:bold; "/>
  288. <col ref="col59" style="font-weight:bold; "/>
  289. <col ref="col60" style="font-weight:bold; "/>
  290. <col ref="col61" style="font-weight:bold; "/>
  291. <col ref="col62" style="font-weight:bold; "/>
  292. <col ref="col63" style="font-weight:bold; "/>
  293. <col ref="col64" style="font-weight:bold; "/>
  294. <col ref="col65" style="font-weight:bold; "/>
  295. <col ref="col66" style="font-weight:bold; "/>
  296. <col ref="col67" style="font-weight:bold; "/>
  297. <col ref="col68" style="font-weight:bold; "/>
  298. </datagrid>
  299. <output id="output1" ref="/root/main/gridlist2/grid/col1" style="left:885px; top:2px; width:235px; height:19px; font-size:14pt; font-weight:bold; text-align:right; "/>
  300. <output id="output2" ref="/root/temp/systime" style="left:185px; top:2px; width:440px; height:19px; font-size:14pt; font-weight:bold; "/>
  301. <button id="button1" class="btn2_letter4" style="left:1125px; top:2px; width:64px; height:19px; ">
  302. <caption>엑셀저장</caption>
  303. <script type="javascript" ev:event="DOMActivate">
  304. <![CDATA[
  305. if (getNodesetCount("/root/main/gridlist/grid") < 1 && datagrid1.rows < 1){
  306. messageBox("저장할 데이터가 없습니다!", "E999");
  307. return;
  308. }
  309. var fileName = window.fileDialog("save", "", false, "외래진료실현황판", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  310. if (fileName != ""){
  311. datagrid1.saveExcel(fileName, "외래진료실현황판", true, false, "", "", true);
  312. }
  313. ]]>
  314. </script>
  315. </button>
  316. <caption id="caption1" style="left:626px; top:2px; width:110px; height:20px; ">대기시간 10분이내</caption>
  317. <output id="output3" style="left:731px; top:2px; width:25px; height:19px; background-color:#ffff00; "/>
  318. <caption id="caption2" style="left:771px; top:2px; width:70px; height:20px; ">10분 ~ 30분</caption>
  319. <output id="output4" style="left:841px; top:2px; width:25px; height:19px; background-color:#ffcc99; "/>
  320. <output id="output5" style="left:941px; top:2px; width:25px; height:19px; background-color:#ff0000; "/>
  321. <caption id="caption3" style="left:886px; top:2px; width:55px; height:20px; ">30분 이상</caption>
  322. <line id="line12" class="line_1" style="x1:0px; y1:25px; x2:1190px; y2:25px; "/>
  323. </xhtml:body>
  324. </xhtml:html>