SPLLP90100_세로누적결과조회.xfdl 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SPLLP90100" position="absolute 0 0 900 715" titletext="누적결과조회" oninit="SPLLP90100_oninit" onload="SPLLP90100_onload">
  5. <Layouts>
  6. <Layout>
  7. <Div position="absolute 0 25 880 60" id="grp_ref" class="div_SA">
  8. <Layouts>
  9. <Layout>
  10. <Calendar position="absolute 107 8 207 27" id="input1" class="input_s_essential" anchor="default"/>
  11. <Button position="absolute 815 7 871 29" id="btn_sea" class="btn1" text="조회" anchor="default" onclick="grp_ref_btn_sea_onclick"/>
  12. <Edit position="absolute 435 8 570 27" id="ipt_bcno" class="input_button" taborder="4" anchor="default"/>
  13. <Static text="시행일자 :" position="absolute 15 9 101 26" id="caption2" class="search_name" anchor="default"/>
  14. <Static text="수가코드 :" position="absolute 345 9 435 26" id="caption1" class="search_name" anchor="default"/>
  15. <Shape position="absolute 803 5 809 27" linetype="vertical" id="line13" class="line_4" anchor="default"/>
  16. <Calendar position="absolute 225 8 325 27" id="input2" class="input_s_essential" anchor="default"/>
  17. <Static text="~" position="absolute 209 9 224 26" id="caption4" class="search_no_b" anchor="default"/>
  18. </Layout>
  19. </Layouts>
  20. </Div>
  21. <Div position="absolute 0 68 880 103" id="grp_patinfo">
  22. <Layouts>
  23. <Layout>
  24. <Shape position="absolute 1 2 872 8" linetype="horizontal" id="lin_6" class="line_1" style="strokepen:3 solid #33bbbbff;"/>
  25. <Edit readonly="true" position="absolute 75 9 165 28" id="out_pid" enable="true" style="background:lightgrey stretch 5,5;"/>
  26. <Static text="성 명" position="absolute 167 6 237 29" align="align:center middle;" id="cpt_ patnm" class="cell_1"/>
  27. <Edit readonly="true" position="absolute 417 9 457 28" id="out_sex" taborder="3" style="background:lightgrey stretch 5,5;"/>
  28. <Static text="등록번호" position="absolute 2 6 72 29" align="align:center middle;" id="cpt_pid" class="cell_1"/>
  29. <Edit readonly="true" position="absolute 241 9 341 28" id="opt_patnm" style="background:lightgrey stretch 5,5;"/>
  30. <Static text="성별/나이" position="absolute 344 6 414 29" align="align:center middle;" id="cpt_sexage" class="cell_1"/>
  31. <Edit readonly="true" position="absolute 458 9 498 28" id="opt_age" taborder="3" style="background:lightgrey stretch 5,5;"/>
  32. <Shape position="absolute 1 27 875 33" linetype="horizontal" id="lin_7" class="line_2"/>
  33. <Edit readonly="true" position="absolute 501 9 596 28" id="output1" taborder="3" style="background:lightgrey stretch 5,5;"/>
  34. <Static text="검사명" position="absolute 599 6 669 29" align="align:center middle;" id="caption3" class="cell_1"/>
  35. <Edit readonly="true" position="absolute 671 9 873 28" id="output2" taborder="3" enable="true" style="background:lightgrey stretch 5,5;"/>
  36. </Layout>
  37. </Layouts>
  38. </Div>
  39. <Static id="cpt_lgtitle" text="누적결과조회" class="tit_1" position="absolute 0 0 119 25"/>
  40. <Button id="btn_excel" taborder="2" text="엑셀" class="btn7" position="absolute 823 99 873 118" onclick="btn_excel_onclick"/>
  41. <Button id="button11" taborder="3" text="출력" class="btn6" position="absolute 759 98 815 120" onclick="button11_onclick"/>
  42. <Tab id="swt_acmlrslt" taborder="4" tabindex="0" position="absolute 0 118 880 698" onchanged="swt_acmlrslt_onchanged">
  43. <Tabpages>
  44. <Tabpage id="case_rslt" text="결 과">
  45. <Layouts>
  46. <Layout>
  47. <Shape id="lin_2" linetype="horizontal" class="line_1" position="absolute -1 1 879 7" style="strokepen:3 solid #33bbbbff;"/>
  48. <Grid id="grd_acmlrslt" taborder="1" binddataset="ds_grd_acmlrslt" useinputpanel="false" position="absolute 0 5 880 549" cellsizingtype="col">
  49. <Formats>
  50. <Format id="default">
  51. <Columns>
  52. <Column size="24"/>
  53. <Column size="120"/>
  54. <Column size="30"/>
  55. <Column size="70"/>
  56. <Column size="120"/>
  57. <Column size="120"/>
  58. <Column size="100"/>
  59. <Column size="80"/>
  60. <Column size="300"/>
  61. </Columns>
  62. <Rows>
  63. <Row size="24" band="head"/>
  64. <Row size="24"/>
  65. </Rows>
  66. <Band id="head">
  67. <Cell/>
  68. <Cell col="1" text="검사결과"/>
  69. <Cell col="2" text="판정"/>
  70. <Cell col="3" text="처방의"/>
  71. <Cell col="4" text="처방일자"/>
  72. <Cell col="5" text="검사일자"/>
  73. <Cell col="6" text="참고치"/>
  74. <Cell col="7" text="단위"/>
  75. <Cell col="8" text="소견"/>
  76. </Band>
  77. <Band id="body">
  78. <Cell text="expr:currow + 1"/>
  79. <Cell col="1" style="align:right middle;" text="bind:result"/>
  80. <Cell col="2" text="bind:judgmark"/>
  81. <Cell col="3" text="bind:orddrnm"/>
  82. <Cell col="4" displaytype="date" text="bind:prcpdt" mask="yyyy-MM-dd HH:mm:ss" calendardisplaynulltype="nulltext"/>
  83. <Cell col="5" displaytype="date" text="bind:testdt" mask="yyyy-MM-dd HH:mm:ss" calendardisplaynulltype="nulltext"/>
  84. <Cell col="6" text="bind:reflh"/>
  85. <Cell col="7" text="bind:rsltunit"/>
  86. <Cell col="8" text="bind:cont"/>
  87. </Band>
  88. </Format>
  89. </Formats>
  90. </Grid>
  91. </Layout>
  92. </Layouts>
  93. </Tabpage>
  94. <Tabpage id="case_graph" text="그 래 프">
  95. <Layouts>
  96. <Layout>
  97. <Shape id="lin_3" linetype="horizontal" class="line_1" position="absolute 0 0 878 6" style="strokepen:3 solid #33bbbbff;"/>
  98. <ActiveX id="TChart1" position="absolute 1 45 879 535" progid="{fab9b41c-87d6-474d-ab7e-f07d78f2422e}" useautobitmapcache="1" anchor="default" taborder="1" visible="false"/>
  99. </Layout>
  100. </Layouts>
  101. </Tabpage>
  102. </Tabpages>
  103. </Tab>
  104. <Radio id="rdo_alloutin" taborder="5" columncount="3" rowcount="0" codecolumn="codecolumn" datacolumn="datacolumn" class="radio_search" position="absolute 153 118 313 134">
  105. <Dataset id="innerdataset">
  106. <ColumnInfo>
  107. <Column id="codecolumn"/>
  108. <Column id="datacolumn"/>
  109. </ColumnInfo>
  110. <Rows>
  111. <Row>
  112. <Col id="codecolumn">A</Col>
  113. <Col id="datacolumn">전체</Col>
  114. </Row>
  115. <Row>
  116. <Col id="codecolumn">O</Col>
  117. <Col id="datacolumn">외래</Col>
  118. </Row>
  119. <Row>
  120. <Col id="codecolumn">I</Col>
  121. <Col id="datacolumn">입원</Col>
  122. </Row>
  123. </Rows>
  124. </Dataset>
  125. </Radio>
  126. </Layout>
  127. </Layouts>
  128. <Objects>
  129. <Dataset id="ds_grd_acmlrslt" firefirstcount="0" firenextcount="0" useclientlayout="true" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  130. <ColumnInfo>
  131. <Column id="result" type="STRING"/>
  132. <Column id="judgmark" type="STRING"/>
  133. <Column id="orddrnm" type="STRING"/>
  134. <Column id="prcpdt" type="STRING"/>
  135. <Column id="testdt" type="STRING"/>
  136. <Column id="reflh" type="STRING"/>
  137. <Column id="rsltunit" type="STRING"/>
  138. <Column id="cont" type="STRING"/>
  139. <Column id="rrgstno" type="STRING" size="256"/>
  140. <Column id="tclsnm" type="STRING" size="256"/>
  141. <Column id="inptrslt" type="STRING" size="256"/>
  142. <Column id="refh" type="STRING" size="256"/>
  143. <Column id="refl" type="STRING" size="256"/>
  144. </ColumnInfo>
  145. </Dataset>
  146. <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  147. <ColumnInfo>
  148. <Column id="pid" type="STRING" size="256"/>
  149. <Column id="testcd" type="STRING" size="256"/>
  150. <Column id="flag" type="STRING" size="256"/>
  151. <Column id="listflag" type="STRING" size="256"/>
  152. <Column id="startdd" type="STRING" size="256"/>
  153. <Column id="enddd" type="STRING" size="256"/>
  154. </ColumnInfo>
  155. <Rows>
  156. <Row/>
  157. </Rows>
  158. </Dataset>
  159. <Dataset id="ds_init_baseinfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  160. <ColumnInfo>
  161. <Column id="hngnm" type="STRING" size="256"/>
  162. <Column id="sex" type="STRING" size="256"/>
  163. <Column id="age" type="STRING" size="256"/>
  164. <Column id="pid" type="STRING" size="256"/>
  165. <Column id="testcd" type="STRING" size="256"/>
  166. <Column id="rrgstno" type="STRING" size="256"/>
  167. <Column id="tclsnm" type="STRING" size="256"/>
  168. <Column id="startdd" type="STRING" size="256"/>
  169. <Column id="enddd" type="STRING" size="256"/>
  170. </ColumnInfo>
  171. <Rows>
  172. <Row/>
  173. </Rows>
  174. </Dataset>
  175. <Dataset id="ds_hidden_acmlrslt" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  176. <ColumnInfo>
  177. <Column id="flag" type="STRING" size="256"/>
  178. </ColumnInfo>
  179. <Rows>
  180. <Row/>
  181. </Rows>
  182. </Dataset>
  183. </Objects>
  184. <Bind>
  185. <BindItem id="item0" compid="grp_ref.input1" propid="value" datasetid="ds_init_baseinfo" columnid="startdd"/>
  186. <BindItem id="item1" compid="grp_ref.input2" propid="value" datasetid="ds_init_baseinfo" columnid="enddd"/>
  187. <BindItem id="item2" compid="grp_ref.ipt_bcno" propid="value" datasetid="ds_init_baseinfo" columnid="testcd"/>
  188. <BindItem id="item3" compid="grp_patinfo.out_pid" propid="value" datasetid="ds_init_baseinfo" columnid="pid"/>
  189. <BindItem id="item4" compid="grp_patinfo.opt_patnm" propid="value" datasetid="ds_init_baseinfo" columnid="hngnm"/>
  190. <BindItem id="item5" compid="grp_patinfo.out_sex" propid="value" datasetid="ds_init_baseinfo" columnid="sex"/>
  191. <BindItem id="item6" compid="grp_patinfo.opt_age" propid="value" datasetid="ds_init_baseinfo" columnid="age"/>
  192. <BindItem id="item7" compid="grp_patinfo.output1" propid="value" datasetid="ds_init_baseinfo" columnid="rrgstno"/>
  193. <BindItem id="item8" compid="grp_patinfo.output2" propid="value" datasetid="ds_init_baseinfo" columnid="tclsnm"/>
  194. <BindItem id="item9" compid="rdo_alloutin" propid="value" datasetid="ds_hidden_acmlrslt" columnid="flag"/>
  195. </Bind>
  196. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  197. * System Name :
  198. * Job Name :
  199. * Creator :
  200. * Make Date : 2015-05-01
  201. * Description :
  202. *---------------------------------------------------------------------------------------
  203. * Modify Date Modifier Modify Description
  204. *---------------------------------------------------------------------------------------
  205. * 2015-05-01 Live Converter TF->XP
  206. *
  207. *---------------------------------------------------------------------------------------
  208. ****************************************************************************************/
  209. include "com_commonxp::comm_main.xjs";
  210. function SPLLP90100_oninit(obj:Form, e:InitEventInfo)
  211. {
  212. frmf_initForm(obj);
  213. }
  214. function SPLLP90100_onload(obj:Form, e:LoadEventInfo)
  215. {
  216. rdo_alloutin.value = 'A';
  217. ds_init_baseinfo.copyData(ds_baseinfo);
  218. ds_init_baseinfo.addColumn("rrgstno", "string");
  219. ds_init_baseinfo.addColumn("tclsnm", "string");
  220. ds_init_baseinfo.setColumn(0, "startdd","");
  221. ds_init_baseinfo.setColumn(0, "enddd","");
  222. fAcmlTestRslt();
  223. }
  224. /* @group : 누적결과조회
  225. * @ver : 2016.12.20
  226. * @by : 이민기
  227. * @-----------------------------------
  228. * @type : function
  229. * @access : public
  230. * @desc : 환자 등록번호와 처방코드를 통해 해당 검사의 누적결과내역을 조회하는 function
  231. */
  232. function fAcmlTestRslt()
  233. {
  234. ds_send.setColumn(0, "pid", ds_init_baseinfo.getColumn(0, "pid"));
  235. ds_send.setColumn(0, "testcd", ds_init_baseinfo.getColumn(0, "testcd"));
  236. //ds_send.setColumn(0, "startdd", ds_init_baseinfo.getColumn(0, "startdd"));
  237. //ds_send.setColumn(0, "enddd", ds_init_baseinfo.getColumn(0, "enddd"));
  238. ds_send.setColumn(0, "flag", ds_hidden_acmlrslt.getColumn(0, "flag"));
  239. if( !utlf_isNull(ds_send.getColumn(0, "pid"))
  240. && !utlf_isNull(ds_send.getColumn(0, "testcd")) && !utlf_isNull(ds_send.getColumn(0, "flag")))
  241. {
  242. var oParam = {};
  243. oParam.id = "TRLLP90101";
  244. oParam.service = "refprintmngtapp.GeneralRefPrintMngt";
  245. oParam.method = "reqGetAcmlRsltRef";
  246. oParam.inds = "cond=ds_send";
  247. oParam.outds = "ds_grd_acmlrslt=acmlrslt";
  248. oParam.async = false;
  249. //oParam.callback = "cf_TRLLP90101";
  250. tranf_submit(oParam);
  251. }
  252. ds_init_baseinfo.setColumn(0, "rrgstno", ds_grd_acmlrslt.getColumn(0, "rrgstno"));
  253. ds_init_baseinfo.setColumn(0, "tclsnm", ds_grd_acmlrslt.getColumn(0, "tclsnm"));
  254. }
  255. //조회버튼
  256. function grp_ref_btn_sea_onclick(obj:Button, e:ClickEventInfo)
  257. {
  258. fAcmlTestRslt();
  259. }
  260. //출력버튼
  261. function button11_onclick(obj:Button, e:ClickEventInfo)
  262. {
  263. fReportPrint();
  264. }
  265. //엑셀버튼
  266. function btn_excel_onclick(obj:Button, e:ClickEventInfo)
  267. {
  268. fSaveExcel();
  269. }
  270. //출력
  271. function fReportPrint()
  272. {
  273. var objDOM = rptf_createDOM();
  274. rptf_setNodeListToDOM(objDOM, "root/main/acmlrslt", ds_grd_acmlrslt);
  275. rptf_setNodeListToDOM(objDOM, "/root/init/baseinfo", ds_init_baseinfo);
  276. var objParam = new Object();
  277. objParam.xml_data_XML1 = objDOM.documentElement.source;
  278. var option = "open=1;save=0;directprint=0;printdialog=0;print=0;zoom=0;";
  279. rptf_exeReportPreview30(["RPLLP90100"],[objParam], option);
  280. }
  281. //엑셀저장
  282. function fSaveExcel()
  283. {
  284. grdf_exportExcel(swt_acmlrslt.case_rslt.grd_acmlrslt, "누적결과조회" , "sheet1", false);
  285. }
  286. function swt_acmlrslt_onchanged(obj:Tab, e:TabIndexChangeEventInfo)
  287. {
  288. if(swt_acmlrslt.tabindex == 1)
  289. {
  290. swt_acmlrslt.case_graph.TChart1.visible = true;
  291. fCaseRsltGraph();
  292. }
  293. else
  294. {
  295. swt_acmlrslt.case_graph.TChart1.visible = false;
  296. }
  297. }
  298. function fCaseRsltGraph()
  299. {
  300. fHeightDrawLine(swt_acmlrslt.case_graph.TChart1, swt_acmlrslt.case_rslt.grd_acmlrslt, "누적결과추이", true);
  301. }
  302. function fHeightDrawLine(tChartObj, gridObj, title, refresh)
  303. {
  304. // TChart 초기화
  305. if(refresh)
  306. {
  307. swt_acmlrslt.case_graph.TChart1.RemoveAllSeries();
  308. swt_acmlrslt.case_graph.TChart1.Tools.clear();
  309. }
  310. // Title 설정
  311. if(!utlf_isNull(title) || utlf_isNull(title))
  312. {
  313. swt_acmlrslt.case_graph.TChart1.Header.Text[0] = title;
  314. }
  315. var cColor; //라인색 설정
  316. var x, y; //그래프의 정점
  317. var seriesIndex; //새로 생성될 라인의 번호
  318. tChartObj.Aspect.View3D = 0; // 모양 설정 :: 0 = 2D | 1 = 3D
  319. tChartObj.Legend.CheckBoxes = true; // Legend 체크박스 설정
  320. tChartObj.Legend.Alignment = 0; // Legend 위치 설정 :: 0 = left | 1 = right | 2 = top| 3 = bottom
  321. //--------------결과치 그래프 시작-------------//
  322. tChartObj.AddSeries(0); // 라인추가
  323. seriesIndex = tChartObj.SeriesCount - 1;
  324. tChartObj.Series(seriesIndex).asLine.Pointer.Visible = true; //Point 사용 여부
  325. tChartObj.Series(seriesIndex).asLine.Pointer.Style = 1; //PointStyle 설정 :: 0 - 8
  326. tChartObj.Axis.Bottom.Labels.Angle = 270; //하단 날자표시 각도
  327. tChartObj.Series(seriesIndex).Color = "blue"; //=window.rgb(0, 0 , 255); //결과 선의 색 설정. (파란색)
  328. tChartObj.Series(seriesIndex).Title = "결과값"; //Legend 명칭
  329. for (j = 0; j < ds_grd_acmlrslt.rowcount; j++)
  330. {
  331. x = ds_grd_acmlrslt.getColumn(j, "testdt"); //x = 처방날짜
  332. y = ds_grd_acmlrslt.getColumn(j, "inptrslt"); //y = 결과치
  333. if( !utlf_isNull(y) && !isNaN(y))
  334. {
  335. x = x.substring(0,4) + "-" + x.substring(4,6) + "-" +x.substring(6,8) + " " + x.substring(8,10) + ":" + x.substring(10,12) + " ";
  336. //x,y 좌표값과 라인의 칼라 값을 받아 라인을 생성한다.
  337. tChartObj.Series(seriesIndex).Add (y, x, tChartObj.Series(seriesIndex).Color);
  338. }
  339. }
  340. //--------------결과치 그래프 끝-------------//
  341. //--------------상한치 그래프 시작-------------//
  342. tChartObj.AddSeries(0); // 라인추가
  343. seriesIndex = tChartObj.SeriesCount - 1;
  344. tChartObj.Series(seriesIndex).Color= "red";
  345. tChartObj.Series(seriesIndex).Title = "상한치";
  346. for(j = 0; j < ds_grd_acmlrslt.rowcount; j++)
  347. {
  348. x = ds_grd_acmlrslt.getColumn(j, "testdt");
  349. y = ds_grd_acmlrslt.getColumn(j, "refh");
  350. if(!utlf_isNull(y) && !isNaN(y))
  351. {
  352. x = x.substring(0,4) + "-" + x.substring(4,6) + "-" +x.substring(6,8) + " " + x.substring(8,10) + ":" + x.substring(10,12) + " ";
  353. tChartObj.Series(seriesIndex).Add (y, x, tChartObj.Series(seriesIndex).Color);
  354. }
  355. }
  356. //--------------상한치 그래프 끝-------------//
  357. //--------------하한치 그래프 시작-------------//
  358. tChartObj.AddSeries(0); // 라인추가
  359. seriesIndex = tChartObj.SeriesCount - 1;
  360. tChartObj.Series(seriesIndex).Color="red";
  361. tChartObj.Series(seriesIndex).Title = "하한치";
  362. for( j = 0; j < ds_grd_acmlrslt.rowcount; j++)
  363. {
  364. x = ds_grd_acmlrslt.getColumn(j, "testdt");
  365. y = ds_grd_acmlrslt.getColumn(j, "refl");
  366. if(!utlf_isNull(y) && !isNaN(y))
  367. {
  368. x = x.substring(0,4) + "-" + x.substring(4,6) + "-" +x.substring(6,8) + " " + x.substring(8,10) + ":" + x.substring(10,12) + " ";
  369. tChartObj.Series(seriesIndex).Add (y, x, tChartObj.Series(seriesIndex).Color);
  370. }
  371. }
  372. //--------------하한치 그래프 끝-------------//
  373. }]]></Script>
  374. </Form>
  375. </FDL>