SMMNW04703_욕창PUSH차트그래프.xrw 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
  3. <xhtml:html xmlns:ex="http://www.comsquare.co.kr/xforms/excel" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:my="http://www.comsquare.co.kr/example" xmlns:ms="urn:schemas-microsoft-com:xslt" 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" xmlns:cs="http://www.comsquare.co.kr/xforms">
  4. <xhtml:head>
  5. <xhtml:title>욕창Push차트 그래프</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <pushinfo>
  11. <pushlist>
  12. <recdd/>
  13. <svalue/>
  14. <avalue/>
  15. <tvalue/>
  16. <total/>
  17. </pushlist>
  18. </pushinfo>
  19. <paminfo>
  20. <list/>
  21. </paminfo>
  22. </main>
  23. <send>
  24. <title/>
  25. <reportid/>
  26. <pinfo>
  27. <pid/>
  28. <sdate/>
  29. <edate/>
  30. </pinfo>
  31. </send>
  32. <init/>
  33. <hidden/>
  34. <cond>
  35. <sdate/>
  36. <edate/>
  37. <pid/>
  38. <pname/>
  39. <indd/>
  40. <cretno/>
  41. <pushyn/>
  42. </cond>
  43. <init>
  44. <scrollinfo>
  45. <scrollvalue/>
  46. </scrollinfo>
  47. </init>
  48. <codeinfo/>
  49. </root>
  50. </instance>
  51. <script type="javascript" ev:event="xforms-ready">
  52. <![CDATA[
  53. var sPamInfo = getGlobalVariable("paminfo");
  54. setCSVToNode("/root/main/paminfo",sPamInfo,"list"); //환자정보내리기
  55. var pid = model.getValue("/root/main/paminfo/list/pid");
  56. var indd = model.getValue("/root/main/paminfo/list/indd");
  57. var cretno = model.getValue("/root/main/paminfo/list/cretno");
  58. var wardcd = model.getValue("/root/main/paminfo/list/wardcd");
  59. var roomcd = model.getValue("/root/main/paminfo/list/roomcd");
  60. var hngnm = model.getValue("/root/main/paminfo/list/hngnm");
  61. model.setValue(ipt_pid.attribute("ref"), pid);
  62. model.setValue(ipt_fromdd.attribute("ref"), indd);
  63. model.setValue(ipt_todd.attribute("ref"), getCurrentDate());
  64. model.setValue(ipt_pname.attribute("ref"), hngnm);
  65. model.setValue(ipt_indd.attribute("ref"), indd);
  66. model.setValue(ipt_cretno.attribute("ref"), cretno);
  67. ipt_fromdd.refresh();
  68. ipt_todd.refresh();
  69. ipt_pid.refresh();
  70. ipt_pname.refresh();
  71. ipt_indd.refresh();
  72. ipt_cretno.refresh();
  73. fGetNursHardCdInfo("'U30'", getCurrentDate()); // '002' 응급의료센터 여부 조회
  74. var useyn = model.getValue("/root/codeinfo/codeinfo/codelist[cdgrupid ='U30']/cdid");
  75. if(useyn == "Y") {
  76. chk_pushyn.visible = true;
  77. chk_pushyn.value = "Y";
  78. } else {
  79. chk_pushyn.visible = false;
  80. chk_pushyn.value = "";
  81. }
  82. btn_search.dispatch("DOMActivate");
  83. ]]>
  84. </script>
  85. <submission id="TRMNW04710" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/main/pushinfo"/>
  86. <submission id="TRMNW00001" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/codeinfo/codelist"/>
  87. </model>
  88. <script type="javascript" src="../../../emr/carecomweb/js/CareCom.js"/>
  89. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  90. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  91. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  92. <script type="javascript">
  93. <![CDATA[
  94. function fInitChart() {
  95. }
  96. function fSearch() {
  97. model.makeNode("/root/send/reqdata");
  98. model.copyNode("/root/send/reqdata", "/root/cond");
  99. submit("TRMNW04710")
  100. var flag = ""
  101. var node= "";
  102. for(var i = grd_list.fixedRows; i < grd_list.rows; i++) {
  103. flag = grd_list.valueMatrix(i, grd_list.colRef("flag"));
  104. if(flag == "1") {
  105. grd_list.rowStyle(i, "all", "background-color") = "#bdddff"
  106. } else {
  107. grd_list.rowStyle(i, "all", "background-color") = "#ffffff"
  108. // grd_list.rowStyle(i, "all", "font-weight") = "normal"
  109. }
  110. }
  111. var datarows = grd_list.rows - grd_list.fixedRows;
  112. for(var i = grd_list.colRef("total1"); i <= grd_list.colRef("total13"); i++) {
  113. var colnm = grd_list.colAttribute(i, "ref");
  114. node = instance1.selectNodes(grd_list.nodeset + "[" + colnm + "='']");
  115. if(datarows == node.length) {
  116. grd_list.colHidden(i) = true;
  117. } else {
  118. grd_list.colHidden(i) = false;
  119. }
  120. }
  121. }
  122. function fMakeChart() {
  123. var flag;
  124. var cnt = 0;
  125. var title = "";
  126. obj_chart.ClearChart();
  127. obj_chart.Header.Visible = true; // Graph Header 정보 사용 여부
  128. obj_chart.Legend.Visible = true;
  129. obj_chart.Header.Font.Color = 0x000000;
  130. obj_chart.Header.Font.Size = 15;
  131. obj_chart.Legend.CheckBoxes = true;
  132. obj_chart.Legend.Alignment = 0;
  133. obj_chart.Panel.MarginTop = 15
  134. obj_chart.Panel.MarginLeft = 15;
  135. obj_chart.Panel.MarginRight = 0;
  136. obj_chart.Panel.MarginBottom = -1;
  137. obj_chart.Legend.CheckBoxes = true;
  138. obj_chart.Panel.BevelWidth = 0; // 주위 테두리 넓이 0으로 설정
  139. obj_chart.Aspect.View3D = false; // 2d 로 표현하기
  140. obj_chart.Zoom.Enable = false; // zoom 사용하지 않기 (마우스 하단으로 드래그 zoomin, 마우스 상단으로 드래그 zoomout)
  141. obj_chart.Scroll.Enable = false; // scroll 사용하지 않기
  142. obj_chart.Legend.Visible = true; // 그래프 참조 박스 띄우지 않기(범례) 우측상단
  143. obj_chart.Legend.CustomPosition = true;
  144. obj_chart.Legend.Left = 10;
  145. obj_chart.Legend.Top = 0;
  146. // obj_chart.Panel.Gradient.Visible = true; // 페널에 그라디언트 적용
  147. // obj_chart.Panel.Gradient.StartColor = 0x000000; // 그라디언트 시작색깔
  148. // obj_chart.Panel.Gradient.EndColor = 0x404040; // 그라디언트 종료색깔
  149. obj_chart.Environment.MouseWheelScroll = true; // Graph 마우스 휠 사용 여부
  150. obj_chart.Axis.Bottom.Labels.Font.Size = 8; //하단축 Label 폰트 사이즈 조절
  151. obj_chart.Axis.Bottom.Labels.Font.Color = 0xffffff; //하단축 Label 폰트 사이즈 조절
  152. // obj_chart.Axis.Left.Labels.Font.Color = 0xffffff; //하단축 Label 폰트 사이즈 조절
  153. // obj_chart.Axis.Left.Labels.Font.Size = 8; //하단축 Label 폰트 사이즈 조절
  154. // obj_chart.Axis.Left.Labels.Font.Color = 0xffffff; //하단축 Label 폰트 사이즈 조절
  155. //
  156. obj_chart.Axis.Left.TicksInner.visible = true; //하단축 눈금 안쪽 표시 설정
  157. obj_chart.Axis.Bottom.TicksInner.visible = true; //하단축 눈금 안쪽 표시 설정
  158. //
  159. obj_chart.Axis.Visible = true;
  160. obj_chart.Axis.Left.Automatic = false; //하단축 자동 설정(기본값)
  161. obj_chart.Axis.Left.Labels.Visible = true; //하단축 Label 설정
  162. obj_chart.Axis.Left.Labels.multiline = true; //하단축 Label 2줄 설정
  163. obj_chart.Axis.Left.Labels.Font.Size = 1; //하단축 Label 폰트 사이즈 조절
  164. //obj_chart.Axis.Bottom.SetMinMax (0, 24); //하단축 최소, 최대 길이 설정
  165. obj_chart.Axis.Left.Minimum = -1;
  166. obj_chart.Axis.Left.Maximum = 16;
  167. obj_chart.Axis.Left.Increment = 2; //하단축 증가값 설정
  168. obj_chart.Axis.Left.MinorTickCount = 0; //하단축 눈금 갯수 설정
  169. obj_chart.Axis.Left.TicksInner.visible = true; //하단축 눈금 안쪽 표시 설정
  170. obj_chart.Axis.Bottom.Automatic = false; //하단축 자동 설정(기본값)
  171. obj_chart.Axis.Bottom.Labels.Visible = true; //하단축 Label 설정
  172. obj_chart.Axis.Bottom.Labels.multiline = true; //하단축 Label 2줄 설정
  173. obj_chart.Axis.Bottom.Labels.Font.Size = 1; //하단축 Label 폰트 사이즈 조절
  174. //obj_chart.Axis.Bottom.SetMinMax (0, 24); //하단축 최소, 최대 길이 설정
  175. obj_chart.Axis.Bottom.Minimum = 0;
  176. obj_chart.Axis.Bottom.Maximum = 10;
  177. obj_chart.Axis.Bottom.Increment = 1; //하단축 증가값 설정
  178. obj_chart.Axis.Bottom.MinorTickCount = 0; //하단축 눈금 갯수 설정
  179. obj_chart.Axis.Bottom.TicksInner.visible = true; //하단축 눈금 안쪽 표시 설정
  180. for(var i = grd_list.fixedRows; i < grd_list.rows; i++) {
  181. flag = grd_list.valueMatrix(i, grd_list.colRef("flag"));
  182. title = grd_list.valueMatrix(i, grd_list.colRef("obspartnm"));
  183. if(flag == "1") {
  184. // grd_list.rowStyle(i, "all", "background-color") = "#bdddff"
  185. } else {
  186. // grd_list.rowStyle(i, "all", "background-color") = "#ffffff"
  187. Rnd1 = Math.random();
  188. Rnd2 = Math.random();
  189. Rnd3 = Math.random();
  190. cColor = window.rgb( (255 - 1) * Rnd1 + 1, (255 - 1) * Rnd2 + 1 , (255 - 1) * Rnd3 + 1);
  191. var axis = obj_chart.Axis.AddCustom(false);
  192. //
  193. obj_chart.Axis.Custom(cnt).AxisPen.Color = cColor;
  194. // obj_chart.Axis.Custom(cnt).AxisPen.Title.Caption = title;
  195. //
  196. // obj_chart.Axis.Custom(cnt).Title.Font.Size = 4;
  197. // obj_chart.Axis.Custom(cnt).Title.Font.Bold = true;
  198. obj_chart.Axis.Custom(cnt).PositionPercent = 0;
  199. if(cnt == 0) {
  200. obj_chart.Axis.Custom(cnt).StartPosition = 0;
  201. obj_chart.Axis.Custom(cnt).EndPosition = 100;
  202. }
  203. obj_chart.Axis.Custom(cnt).PositionPercent = 1 - (3*(cnt+1));
  204. obj_chart.Axis.Custom(cnt).Automatic = false;
  205. obj_chart.Axis.Custom(cnt).Maximum = 17;
  206. obj_chart.Axis.Custom(cnt).Minimum = 0;
  207. obj_chart.Axis.Custom(cnt).Increment = 2;
  208. obj_chart.AddSeries(0);
  209. obj_chart.Series(cnt).Color = cColor;
  210. obj_chart.Series(cnt).Title = title;
  211. obj_chart.Series(cnt).VerticalAxisCustom = axis; // 혈압
  212. obj_chart.Series(cnt).Marks.Visible = true; //데이터레이블
  213. //
  214. obj_chart.Series(cnt).asLine.LinePen.Width = 2;
  215. obj_chart.Series(cnt).asLine.Pointer.Visible = true;
  216. obj_chart.Series(cnt).asLine.Pointer.Style = 1;
  217. obj_chart.Series(cnt).asLine.Pointer.VerticalSize = 3;
  218. obj_chart.Series(cnt).asLine.Pointer.HorizontalSize = 3;
  219. //
  220. var total;
  221. for(var j = grd_list.colRef("total1"); j <= grd_list.colRef("total13"); j++) {
  222. total = grd_list.valueMatrix(i, j);
  223. if(total != 0 && total != null && total != "") {
  224. obj_chart.Series(cnt).AddXY(j-1 , parseInt(total), total, cColor);
  225. } else {
  226. }
  227. }
  228. cnt++;
  229. }
  230. }
  231. }
  232. ]]>
  233. </script>
  234. </xhtml:head>
  235. <xhtml:body pagewidth="1175" pageheight="700" guideline="2,700;1,1175;2,715;1,1168;">
  236. <datagrid id="grd_list" nodeset="/root/main/pushinfo/pushlist" class="datagrid0" caption="obspartnm^recdt1^totl^caption9^caption8^caption7^caption6^caption5^caption4^caption3^caption2^caption1^caption10^caption11^flag" colsep="^" colwidth="174, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 60" fixedcols="1" frozencols="1" mergecellsfixedcols="bycolrec" rowsep="|" style="left:3px; top:385px; width:1166px; height:312px; ">
  237. <col ref="obspartnm"/>
  238. <col ref="total1" format="yyyy-mm-dd hh:nn" style="text-align:center; "/>
  239. <col ref="total2" format="yyyy-mm-dd hh:nn" style="text-align:center; "/>
  240. <col ref="total3" format="yyyy-mm-dd hh:nn" style="text-align:center; "/>
  241. <col ref="total4" format="yyyy-mm-dd hh:nn" style="text-align:center; "/>
  242. <col ref="total5" format="yyyy-mm-dd hh:nn" style="text-align:center; "/>
  243. <col ref="total6" format="yyyy-mm-dd hh:nn" style="text-align:center; "/>
  244. <col ref="total7" format="yyyy-mm-dd hh:nn" style="text-align:center; "/>
  245. <col ref="total8" format="yyyy-mm-dd hh:nn" style="text-align:center; "/>
  246. <col ref="total9" format="yyyy-mm-dd hh:nn" style="text-align:center; "/>
  247. <col ref="total10" format="yyyy-mm-dd hh:nn" style="text-align:center; "/>
  248. <col ref="total11" format="yyyy-mm-dd hh:nn" style="text-align:center; "/>
  249. <col ref="total12" format="yyyy-mm-dd hh:nn" style="text-align:center; "/>
  250. <col ref="total13" format="yyyy-mm-dd hh:nn" style="text-align:center; "/>
  251. <col ref="flag" visibility="hidden" style="text-align:center; "/>
  252. <script type="javascript" ev:event="onscroll">
  253. <![CDATA[
  254. var tempScroll = model.getValue("/root/init/scrollinfo/scrollvalue");
  255. obj_chart.Axis.Bottom.Scroll((grd_list.hscroll.attribute("pos") - tempScroll)/99, false);
  256. model.setValue("/root/init/scrollinfo/scrollvalue", grd_list.hscroll.attribute("pos"));
  257. ]]>
  258. </script>
  259. </datagrid>
  260. <object id="obj_chart" clsid="{fab9b41c-87d6-474d-ab7e-f07d78f2422e}" ShowHint="true" style="left:3px; top:80px; width:1165px; height:300px; "/>
  261. <group id="group1" style="left:5px; top:18px; width:1165px; height:47px; vertical-align:top; ">
  262. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1165px; height:45px; font-family:돋움체; background-color:#fffbf2; border-color:#ffd799; "/>
  263. <button id="btn_search" class="btn1_letter2" navindex="13" style="left:1095px; top:15px; width:56px; height:22px; font-family:돋움체;">
  264. <caption>조회</caption>
  265. <script type="javascript" ev:event="DOMActivate">
  266. <![CDATA[
  267. fSearch();
  268. fMakeChart();
  269. ]]>
  270. </script>
  271. </button>
  272. <caption id="caption1" class="search_name" style="left:4px; top:12px; width:85px; height:17px; font-family:돋움체; ">기 간:</caption>
  273. <input id="ipt_fromdd" ref="/root/cond/sdate" class="input_search" navindex="1" inputtype="date" style="left:96px; top:12px; width:94px; height:19px; font-family:돋움체; text-align:center; "/>
  274. <input id="ipt_todd" ref="/root/cond/edate" class="input_search" navindex="1" inputtype="date" style="left:208px; top:12px; width:94px; height:19px; font-family:돋움체; text-align:center; "/>
  275. <caption id="caption2" style="left:195px; top:13px; width:15px; height:20px; font-family:돋움체; ">~</caption>
  276. <line id="line3" class="line_4" style="x1:1086px; y1:10px; x2:1086px; y2:40px; font-family:돋움체; "/>
  277. <input id="ipt_pid" ref="/root/cond/pid" style="left:420px; top:13px; width:94px; height:19px; font-family:돋움체; text-align:center; "/>
  278. <caption id="caption3" class="search_name" style="left:329px; top:13px; width:85px; height:17px; font-family:돋움체; ">환 자:</caption>
  279. <input id="ipt_pname" ref="/root/cond/pname" style="left:517px; top:13px; width:110px; height:19px; font-family:돋움체; text-align:center; "/>
  280. <input id="ipt_indd" ref="/root/cond/indd" visibility="hidden" style="left:745px; top:10px; width:100px; height:20px; "/>
  281. <input id="ipt_cretno" ref="/root/cond/cretno" visibility="hidden" style="left:880px; top:15px; width:100px; height:20px; "/>
  282. <button id="button1" visibility="hidden" style="left:1005px; top:15px; width:100px; height:20px; ">
  283. <caption>button1</caption>
  284. <script type="javascript" ev:event="DOMActivate">
  285. <![CDATA[
  286. var fileName = window.fileDialog("save", ",", false, "excel", "jpg", "Image Files(*.jpg)|*.jpg|All Files (*.*)|*.*");
  287. if(fileName == "" || fileName == null) {
  288. return;
  289. }
  290. obj_chart.Export.asJPEG.SaveToFile(fileName);
  291. ]]>
  292. </script>
  293. </button>
  294. <select id="chk_pushyn" ref="/root/cond/pushyn" overflow="visible" appearance="full" style="left:645px; top:15px; width:100px; height:20px; border-style:none; ">
  295. <choices>
  296. <item>
  297. <label>push만</label>
  298. <value>Y</value>
  299. </item>
  300. </choices>
  301. </select>
  302. </group>
  303. <line id="line2" class="line_1" style="x1:3px; y1:75px; x2:1168px; y2:75px; "/>
  304. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:205px; height:18px; ">피부욕창관찰기록 PUSH 차트</caption>
  305. </xhtml:body>
  306. </xhtml:html>