SPLLP90100_세로누적결과조회.xrw 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * 제 목 : SPLLP90100_세로누적결과조회.xrw
  4. * 설 명 : 환자의 특정 검사에 대한 검사 결과 내역을 세로형으로 보여준다.
  5. * 설 계 자 :
  6. * 작 성 자 : 김은지
  7. * 작 성 일 : 2008.06.25
  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. <acmlrslt>
  20. <result/>
  21. <prcpdt/>
  22. <testdt/>
  23. <rsltunit/>
  24. <refh/>
  25. <refl/>
  26. <reflh/>
  27. <judgmark/>
  28. <orddrnm/>
  29. </acmlrslt>
  30. </main>
  31. <send>
  32. <pid/>
  33. <testcd/>
  34. <flag/>
  35. <listflag/>
  36. <startdd/>
  37. <enddd/>
  38. </send>
  39. <hidden>
  40. <acmlrslt>
  41. <flag/>
  42. <listflag/>
  43. <startdd/>
  44. <enddd/>
  45. </acmlrslt>
  46. </hidden>
  47. <init>
  48. <baseinfo>
  49. <hngnm/>
  50. <sex/>
  51. <age/>
  52. <pid/>
  53. <testcd/>
  54. <rrgstno/>
  55. <tclsnm/>
  56. <startdd/>
  57. <enddd/>
  58. </baseinfo>
  59. </init>
  60. </root>
  61. </instance>
  62. <script type="javascript" ev:event="xforms-ready">
  63. <![CDATA[
  64. //--------------임시로 넣은 세팅(메인화면에서 넘겨받을 값들)-----------------
  65. /*
  66. model.setValue("/root/init/baseinfo/pid", "19732070"); //등록번호
  67. model.setValue("/root/init/baseinfo/hngnm", "유미"); //이름
  68. model.setValue("/root/init/baseinfo/sex", "여"); //성별
  69. model.setValue("/root/init/baseinfo/age", "33"); //나이
  70. model.setValue("/root/init/baseinfo/testcd", "LHR102"); //검사코드
  71. model.setValue("/root/hidden/acmlrslt/listflag", "Z"); //조회기간의 기준값(처방일, 검사일, 보고일)
  72. //model.setValue("/root/hidden/acmlrslt/startdd", "20090115"); //조회기간 시작일 설정
  73. //model.setValue("/root/hidden/acmlrslt/enddd", "20090415"); //조회기간 종료일 설정
  74. model.setValue("/root/init/baseinfo/startdd", "20070101"); //검사코드
  75. model.setValue("/root/init/baseinfo/enddd", "20090505"); //검사코드
  76. //-------------------------------------------------
  77. */
  78. //전체,외래,입원 라디오 박스 전체 기본값 셋팅
  79. rdo_alloutin.select(0);
  80. //세로누적결과조회
  81. fAcmlTestRslt();
  82. ]]>
  83. </script>
  84. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  85. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  86. <script type="javascript" src="../../../com/commonweb/js/tchartHelper.js"/>
  87. <submission id="TRLLP90101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/acmlrslt"/>
  88. </model>
  89. <script type="javascript">
  90. <![CDATA[
  91. /* @group : 누적결과조회
  92. * @ver : 2008.06.25
  93. * @by : 김은지
  94. * @-----------------------------------
  95. * @type : function
  96. * @access : public
  97. * @desc : 환자 등록번호와 처방코드를 통해 해당 검사의 누적결과내역을 조회하는 function
  98. */
  99. function fAcmlTestRslt(){
  100. model.setValue("/root/send/pid" , model.getValue("/root/init/baseinfo/pid"));
  101. model.setValue("/root/send/testcd" , model.getValue("/root/init/baseinfo/testcd"));
  102. model.setValue("/root/send/startdd" , model.getValue("/root/init/baseinfo/startdd"));
  103. model.setValue("/root/send/enddd" , model.getValue("/root/init/baseinfo/enddd"));
  104. model.setValue("/root/send/flag" , model.getValue("/root/hidden/acmlrslt/flag"));
  105. if(model.getValue("/root/send/pid") != ""
  106. && model.getValue("root/send/testcd") != ""
  107. && model.getValue("root/send/flag") != "" ){
  108. submit("TRLLP90101");
  109. }
  110. model.makeValue("/root/init/baseinfo/rrgstno", model.getValue("/root/main/acmlrslt[1]/rrgstno"));
  111. model.makeValue("/root/init/baseinfo/tclsnm", model.getValue("/root/main/acmlrslt[1]/tclsnm"));
  112. model.refresh();
  113. }
  114. /* @group : 결과 케이스 토글
  115. * @ver : 2008.06.26
  116. * @by : 김은지
  117. * @-----------------------------------
  118. * @type : function
  119. * @access : public
  120. * @desc : 스위치 내용에 결과 그리드를 띄움
  121. */
  122. function fCaseRsltGrid(){
  123. model.toggle("case_rslt");
  124. }
  125. /* @group : 그래프 케이스 토글
  126. * @ver : 2008.06.26
  127. * @by : 김은지
  128. * @-----------------------------------
  129. * @type : function
  130. * @access : public
  131. * @desc : 스위치 내용에 결과 그래프를 띄움
  132. */
  133. function fCaseRsltGraph(){
  134. model.toggle("case_graph");
  135. //fHeightDrawLine(차트objectname, 결과그리드id, 그래프 타이틀, reflesh여부,);
  136. fHeightDrawLine(TChart1, grd_acmlrslt, "누적결과추이", true);
  137. }
  138. /* @group : 그래프 라인 생성
  139. * @ver : 2008.06.30
  140. * @by : 김은지
  141. * @-----------------------------------
  142. * @type : function
  143. * @access : public
  144. * @desc : 그래프에 결과치와 상하한치 라인을 그린다.
  145. */
  146. function fHeightDrawLine(tChartObj, gridObj, title, refresh) {
  147. try{
  148. // TChart 초기화
  149. if( refresh ) {
  150. tChartObj.RemoveAllSeries();
  151. tChartObj.Tools.clear();
  152. }
  153. // Title 설정
  154. if( title != null || title == "" ) {
  155. tChartObj.Header.Text(0) = title;
  156. }
  157. var cColor; //라인색 설정
  158. var x, y; //그래프의 정점
  159. var seriesIndex; //새로 생성될 라인의 번호
  160. tChartObj.Aspect.View3D = 0; // 모양 설정 :: 0 = 2D | 1 = 3D
  161. tChartObj.Legend.CheckBoxes = true; // Legend 체크박스 설정
  162. tChartObj.Legend.Alignment = 0; // Legend 위치 설정 :: 0 = left | 1 = right | 2 = top| 3 = bottom
  163. //--------------결과치 그래프 시작-------------//
  164. tChartObj.AddSeries(0); // 라인추가
  165. seriesIndex = tChartObj.SeriesCount - 1;
  166. tChartObj.Series(seriesIndex).asLine.Pointer.Visible = true; //Point 사용 여부
  167. tChartObj.Series(seriesIndex).asLine.Pointer.Style = 1; //PointStyle 설정 :: 0 - 8
  168. tChartObj.Axis.Bottom.Labels.Angle = 270; //하단 날자표시 각도
  169. tChartObj.Series(seriesIndex).Color =window.rgb(0, 0 , 255); //결과 선의 색 설정. (파란색)
  170. tChartObj.Series(seriesIndex).Title = "결과값"; //Legend 명칭
  171. for(j = 1;j<gridObj.rows;j++){
  172. x = model.getvalue("/root/main/acmlrslt["+j+"]/testdt" ); //x = 처방날짜
  173. y = model.getvalue("/root/main/acmlrslt["+j+"]/inptrslt" ); //y = 결과치
  174. if(y != "" && !isNaN(y)){
  175. x = x.substring(0,4) + "-" + x.substring(4,6) + "-" +x.substring(6,8) + " " + x.substring(8,10) + ":" + x.substring(10,12) + " ";
  176. //x,y 좌표값과 라인의 칼라 값을 받아 라인을 생성한다.
  177. tChartObj.Series(seriesIndex).Add (y, x, tChartObj.Series(seriesIndex).Color);
  178. }
  179. }
  180. //--------------결과치 그래프 끝-------------//
  181. //--------------상한치 그래프 시작-------------//
  182. tChartObj.AddSeries(0); // 라인추가
  183. seriesIndex = tChartObj.SeriesCount - 1;
  184. tChartObj.Series(seriesIndex).Color=window.rgb(255, 0 , 0);
  185. tChartObj.Series(seriesIndex).Title = "상한치";
  186. for(j = 1;j<gridObj.rows;j++){
  187. x = model.getvalue("/root/main/acmlrslt["+j+"]/testdt" );
  188. y = model.getValue("/root/main/acmlrslt["+j+"]/refh" );
  189. if(y != "" && !isNaN(y)){
  190. x = x.substring(0,4) + "-" + x.substring(4,6) + "-" +x.substring(6,8) + " " + x.substring(8,10) + ":" + x.substring(10,12) + " ";
  191. tChartObj.Series(seriesIndex).Add (y, x, tChartObj.Series(seriesIndex).Color);
  192. }
  193. }
  194. //--------------상한치 그래프 끝-------------//
  195. //--------------하한치 그래프 시작-------------//
  196. tChartObj.AddSeries(0); // 라인추가
  197. seriesIndex = tChartObj.SeriesCount - 1;
  198. tChartObj.Series(seriesIndex).Color=window.rgb(255, 0 , 0);
  199. tChartObj.Series(seriesIndex).Title = "하한치";
  200. for(j = 1;j<gridObj.rows;j++){
  201. x = model.getvalue("/root/main/acmlrslt["+j+"]/testdt" );
  202. y = model.getValue("/root/main/acmlrslt["+j+"]/refl" );
  203. if(y != "" && !isNaN(y)){
  204. x = x.substring(0,4) + "-" + x.substring(4,6) + "-" +x.substring(6,8) + " " + x.substring(8,10) + ":" + x.substring(10,12) + " ";
  205. tChartObj.Series(seriesIndex).Add (y, x, tChartObj.Series(seriesIndex).Color);
  206. }
  207. }
  208. //--------------하한치 그래프 끝-------------//
  209. }catch(ee){
  210. messageBox("결과값에 문자열이 있습니다." , "I","");
  211. return;
  212. }
  213. }
  214. /* @group : 엑셀로 저장
  215. * @ver : 2008.06.30
  216. * @by : 김은지
  217. * @-----------------------------------
  218. * @type : function
  219. * @access : public
  220. * @desc : 그리드의 내용을 엑셀로 저장한다.
  221. */
  222. function fSaveExcel(){
  223. var indexRow = grd_acmlrslt.rows;
  224. grd_acmlrslt.addRow(false);
  225. grd_acmlrslt.addRow(false);
  226. grd_acmlrslt.addRow(false);
  227. model.setValue("/root/main/acmlrslt["+indexRow+"]/testdt", "등록번호");
  228. model.setValue("/root/main/acmlrslt["+(indexRow+1)+"]/testdt", "환자명");
  229. model.setValue("/root/main/acmlrslt["+(indexRow+2)+"]/testdt", "성별/나이");
  230. model.setValue("/root/main/acmlrslt["+indexRow+"]/reflh", model.getValue("/root/init/baseinfo/pid"));
  231. model.setValue("/root/main/acmlrslt["+(indexRow+1)+"]/reflh", model.getValue("/root/init/baseinfo/hngnm"));
  232. model.setValue("/root/main/acmlrslt["+(indexRow+2)+"]/reflh", model.getValue("/root/init/baseinfo/sex") + "/" + model.getValue("/root/init/baseinfo/age"));
  233. //model.refresh();
  234. var fileName = window.fileDialog("save", "," , false, "excel", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  235. if (fileName != ""){
  236. grd_acmlrslt.saveExcel(fileName);
  237. }
  238. grd_acmlrslt.deleteItem(indexRow+2);
  239. grd_acmlrslt.deleteItem(indexRow+1);
  240. grd_acmlrslt.deleteItem(indexRow);
  241. model.refresh();
  242. }
  243. function fReportPrint(){
  244. exeReportPreview("RPLLP90100", "XMLSTR", "", "");
  245. }
  246. // 엔터키 이벤트
  247. function fKeyEvent(){
  248. if(event.keyCode == "13"){
  249. if(event.target=="ipt_bcno"){
  250. model.setvalue("/root/init/baseinfo/testcd", ipt_bcno.currentText);
  251. fAcmlTestRslt();
  252. }
  253. }
  254. }
  255. ]]>
  256. </script>
  257. </xhtml:head>
  258. <xhtml:body pagewidth="900" pageheight="715" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  259. <group id="grp_tle" style="left:0px; top:0px; width:880px; height:20px; ">
  260. <caption id="cpt_lgtitle" class="tit_1" style="left:0px; top:0px; width:199px; height:14px; ">누적결과조회</caption>
  261. </group>
  262. <group id="grp_ref" style="left:0px; top:26px; width:880px; height:35px; ">
  263. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" ellipsewidth="20" ellipseheight="20" style="left:0px; top:0px; width:880px; height:35px; "/>
  264. <input id="input1" ref="/root/init/baseinfo/startdd" class="input_s_essential" inputtype="date" style="left:107px; top:8px; width:100px; height:19px; "/>
  265. <button id="btn_sea" class="btn1_letter2" style="left:815px; top:7px; width:56px; height:22px; ">
  266. <caption>조회</caption>
  267. <script type="javascript" ev:event="DOMActivate">
  268. <![CDATA[
  269. fAcmlTestRslt();
  270. ]]>
  271. </script>
  272. </button>
  273. <input id="ipt_bcno" ref="/root/init/baseinfo/testcd" class="input_button" navindex="4" imemode="disabled" inputtype="button" _chartype="upper" style="left:435px; top:8px; width:135px; height:19px; ">
  274. <script type="javascript" ev:event="onbuttonclick">
  275. <![CDATA[
  276. fKeyEvent();
  277. ]]>
  278. </script>
  279. <script type="javascript" ev:event="onkeypress">
  280. <![CDATA[
  281. fKeyEvent();
  282. ]]>
  283. </script>
  284. </input>
  285. <caption id="caption2" class="search_name" style="left:15px; top:9px; width:86px; height:17px; ">시행일자 :</caption>
  286. <caption id="caption1" class="search_name" style="left:345px; top:9px; width:90px; height:17px; ">수가코드 :</caption>
  287. <line id="line13" class="line_4" style="x1:806px; y1:5px; x2:806px; y2:27px; "/>
  288. <input id="input2" ref="/root/init/baseinfo/enddd" class="input_s_essential" inputtype="date" style="left:225px; top:8px; width:100px; height:19px; "/>
  289. <caption id="caption4" class="search_no_b" style="left:209px; top:9px; width:15px; height:17px; ">~</caption>
  290. </group>
  291. <group id="grp_patinfo" style="left:0px; top:68px; width:880px; height:35px; ">
  292. <line id="lin_6" class="line_1" style="x1:0px; y1:1px; x2:874px; y2:1px; "/>
  293. <output id="out_pid" ref="/root/init/baseinfo/pid" class="output_fix" style="left:75px; top:9px; width:90px; height:19px; "/>
  294. <caption id="cpt_ patnm" class="cell_1" style="left:167px; top:6px; width:70px; height:23px; text-align:center; vertical-align:middle; ">성 명</caption>
  295. <output id="out_sex" ref="/root/init/baseinfo/sex" class="output_fix" navindex="3" style="left:417px; top:9px; width:40px; height:19px; "/>
  296. <caption id="cpt_pid" class="cell_1" style="left:2px; top:6px; width:70px; height:23px; text-align:center; vertical-align:middle; ">등록번호</caption>
  297. <output id="opt_patnm" ref="/root/init/baseinfo/hngnm" class="output_fix" style="left:241px; top:9px; width:100px; height:19px; "/>
  298. <caption id="cpt_sexage" class="cell_1" style="left:344px; top:6px; width:70px; height:23px; text-align:center; vertical-align:middle; ">성별/나이</caption>
  299. <output id="opt_age" ref="/root/init/baseinfo/age" class="output_fix" navindex="3" style="left:458px; top:9px; width:40px; height:19px; "/>
  300. <line id="lin_7" class="line_2" style="x1:1px; y1:30px; x2:875px; y2:30px; "/>
  301. <output id="output1" ref="/root/init/baseinfo/rrgstno" class="output_fix" navindex="3" style="left:501px; top:9px; width:95px; height:19px; "/>
  302. <caption id="caption3" class="cell_1" style="left:599px; top:6px; width:70px; height:23px; text-align:center; vertical-align:middle; ">검사명</caption>
  303. <output id="output2" ref="/root/init/baseinfo/tclsnm" class="output_fix" navindex="3" style="left:671px; top:9px; width:202px; height:19px; "/>
  304. </group>
  305. <group id="grd_contents" scroll="none" style="left:0px; top:105px; width:880px; height:605px; ">
  306. <group id="grp_biz" style="left:165px; top:0px; width:220px; height:30px; ">
  307. <select1 id="rdo_alloutin" ref="/root/hidden/acmlrslt/flag" class="radio_search" appearance="full" cols="3" overflow="visible" style="left:10px; top:3px; width:160px; height:16px; border-style:none; ">
  308. <choices>
  309. <item>
  310. <label>전체</label>
  311. <value>A</value>
  312. </item>
  313. <item>
  314. <label>외래</label>
  315. <value>O</value>
  316. </item>
  317. <item>
  318. <label>입원</label>
  319. <value>I</value>
  320. </item>
  321. </choices>
  322. <script type="javascript" ev:event="onclick">
  323. <![CDATA[
  324. fAcmlTestRslt();
  325. if(swt_acmlrslt.selectedIndex == "1"){ //스위치의 그래프 케이스가 선택된 상태일 때만 그래프를 재구성
  326. fCaseRsltGraph();
  327. }
  328. ]]>
  329. </script>
  330. </select1>
  331. </group>
  332. <button id="btn_excel" class="btn2_letter2" style="left:831px; top:1px; width:42px; height:19px; ">
  333. <caption>엑셀</caption>
  334. <script type="javascript" ev:event="DOMActivate">
  335. <![CDATA[
  336. fSaveExcel(); //그리드의 데이터를 엑셀로 저장.
  337. ]]>
  338. </script>
  339. </button>
  340. <button id="button11" class="btn6_letter2" style="left:775px; top:0px; width:56px; height:22px; ">
  341. <caption>출력</caption>
  342. <script type="javascript" ev:event="DOMActivate">
  343. <![CDATA[
  344. fReportPrint();
  345. ]]>
  346. </script>
  347. </button>
  348. <button id="btn_graph" class="btn_sw" group="tab" selected="false" select.background-image="../../../com/commonweb/images/tab_show.gif" style="left:75px; top:0px; width:75px; height:22px; ">
  349. <caption>그 래 프</caption>
  350. <script type="javascript" ev:event="DOMActivate">
  351. <![CDATA[
  352. //그래프 케이스 토글
  353. fCaseRsltGraph();
  354. ]]>
  355. </script>
  356. </button>
  357. <button id="btn_testinfo" class="btn_sw" group="tab" selected="true" select.background-image="../../../com/commonweb/images/tab_show.gif" style="left:0px; top:0px; width:75px; height:22px; ">
  358. <caption>결 과</caption>
  359. <script type="javascript" ev:event="DOMActivate">
  360. <![CDATA[
  361. //결과 케이스 토글
  362. fCaseRsltGrid();
  363. ]]>
  364. </script>
  365. </button>
  366. <switch id="swt_acmlrslt" border="0" style="left:0px; top:20px; width:880px; height:580px; ">
  367. <case id="case_rslt" selected="true">
  368. <line id="lin_2" class="line_1" style="x1:0px; y1:0px; x2:874px; y2:0px; "/>
  369. <datagrid id="grd_acmlrslt" nodeset="/root/main/acmlrslt" caption="검사결과^판정^처방의^처방일자^검사일자^참고치^단위^소견^caption1^coombs^접수번호^성분제제" colsep="^" colwidth="120, 30, 70, 120, 120, 100, 80, 300" dataheight="23" defaultrows="1" ellipsis="true" explorerbar="sort" fixedcols="0" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="23" rowsep="|" tooltip="true" style="left:0px; top:5px; width:874px; height:565px; text-align:center; ">
  370. <col ref="result" style="text-align:right; "/>
  371. <col ref="judgmark"/>
  372. <col ref="orddrnm"/>
  373. <col ref="prcpdt" format="yyyy-mm-dd hh:nn:ss"/>
  374. <col ref="testdt" format="yyyy-mm-dd hh:nn:ss"/>
  375. <col ref="reflh"/>
  376. <col ref="rsltunit"/>
  377. <col ref="cont" style="text-align:left; "/>
  378. <script type="javascript" ev:event="onaftersort">
  379. <![CDATA[
  380. grd_acmlrslt.gridToInstance(); //그리드의 인스턴스 재구성
  381. ]]>
  382. </script>
  383. </datagrid>
  384. </case>
  385. <case id="case_graph">
  386. <line id="lin_3" class="line_1" style="x1:0px; y1:0px; x2:878px; y2:0px; "/>
  387. <object id="TChart1" clsid="{fab9b41c-87d6-474d-ab7e-f07d78f2422e}" style="left:3px; top:5px; width:870px; height:570px; "/>
  388. </case>
  389. </switch>
  390. </group>
  391. </xhtml:body>
  392. </xhtml:html>