SPLLR91300_Microscopy결과입력.xfdl 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SPLLR91300" position="absolute 0 0 616 596" titletext="Urine Sediment Microscopy Result" oninit="SPLLR91300_oninit" onload="SPLLR91300_onload">
  5. <Layouts>
  6. <Layout>
  7. <Shape id="line1" linetype="horizontal" class="line_10" position="absolute 0 26 232 32"/>
  8. <Static id="caption3" text="검사목록" class="tit_2" position="absolute 0 9 79 25"/>
  9. <Grid id="grd_rsltlist" taborder="1" binddataset="ds_main_rsltcdlist" useinputpanel="false" position="absolute 481 31 613 562" autofittype="col" cellsizingtype="col" oncelldblclick="grd_rsltlist_oncelldblclick">
  10. <Formats>
  11. <Format id="default">
  12. <Columns>
  13. <Column size="25"/>
  14. <Column size="54"/>
  15. <Column size="56"/>
  16. </Columns>
  17. <Rows>
  18. <Row size="24" band="head"/>
  19. <Row size="24"/>
  20. </Rows>
  21. <Band id="head">
  22. <Cell/>
  23. <Cell col="1" text="결과코드"/>
  24. <Cell col="2" text="결과값"/>
  25. </Band>
  26. <Band id="body">
  27. <Cell text="expr:currow + 1"/>
  28. <Cell col="1" text="bind:rsltcd"/>
  29. <Cell col="2" text="bind:rsltcnts"/>
  30. </Band>
  31. </Format>
  32. </Formats>
  33. </Grid>
  34. <Static id="caption1" text="결과목록" class="tit_2" position="absolute 482 9 567 25"/>
  35. <Shape id="line3" linetype="horizontal" class="line_10" position="absolute 481 26 613 32"/>
  36. <Shape id="line2" linetype="horizontal" position="absolute 235 26 477 32" class="line_10"/>
  37. <Grid id="grd_testlist2" taborder="2" binddataset="ds_main_testlist2" useinputpanel="false" position="absolute 235 31 477 562" autofittype="col" cellsizingtype="col" oncellclick="grd_testlist2_oncellclick" onkeyup="grd_testlist2_onkeyup" autoenter="none">
  38. <Formats>
  39. <Format id="default">
  40. <Columns>
  41. <Column size="0"/>
  42. <Column size="25"/>
  43. <Column size="170"/>
  44. <Column size="50"/>
  45. </Columns>
  46. <Rows>
  47. <Row size="24" band="head"/>
  48. <Row size="24"/>
  49. </Rows>
  50. <Band id="head">
  51. <Cell text="검사코드"/>
  52. <Cell col="1"/>
  53. <Cell col="2" text="검사항목명"/>
  54. <Cell col="3" text="결과값"/>
  55. </Band>
  56. <Band id="body">
  57. <Cell text="bind:testcd"/>
  58. <Cell col="1" celltype="head" text="expr:currow + 1"/>
  59. <Cell col="2" style="align:left middle;" text="bind:tclsscrnm"/>
  60. <Cell col="3" displaytype="text" edittype="text" text="bind:reptrslt"/>
  61. </Band>
  62. </Format>
  63. </Formats>
  64. </Grid>
  65. <Grid id="grd_testlist" taborder="3" binddataset="ds_main_testlist" useinputpanel="false" position="absolute 0 31 232 562" autofittype="col" cellsizingtype="col" oncellclick="grd_testlist_oncellclick" onkeyup="grd_testlist_onkeyup" selecttype="row" autoenter="none">
  66. <Formats>
  67. <Format id="default">
  68. <Columns>
  69. <Column size="0"/>
  70. <Column size="25"/>
  71. <Column size="160"/>
  72. <Column size="50"/>
  73. </Columns>
  74. <Rows>
  75. <Row size="24" band="head"/>
  76. <Row size="24"/>
  77. </Rows>
  78. <Band id="head">
  79. <Cell text="검사코드"/>
  80. <Cell col="1"/>
  81. <Cell col="2" text="검사항목명"/>
  82. <Cell col="3" text="결과값"/>
  83. </Band>
  84. <Band id="body">
  85. <Cell text="bind:testcd"/>
  86. <Cell col="1" celltype="head" text="expr:currow + 1"/>
  87. <Cell col="2" style="align:left middle;" text="bind:tclsscrnm"/>
  88. <Cell col="3" displaytype="text" edittype="text" text="bind:reptrslt"/>
  89. </Band>
  90. </Format>
  91. </Formats>
  92. </Grid>
  93. <Button id="btn_cnfm" taborder="4" text="확인" class="btn4" position="absolute 227 571 283 593" onclick="btn_cnfm_onclick"/>
  94. <Button id="btn_close" taborder="5" text="닫기" class="btn4" position="absolute 353 571 409 593" onclick="btn_close_onclick"/>
  95. <Button id="btn_init" taborder="6" text="초기화" class="btn4" position="absolute 284 571 352 593" onclick="btn_init_onclick"/>
  96. </Layout>
  97. </Layouts>
  98. <Objects>
  99. <Dataset id="ds_main_rsltcdlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  100. <ColumnInfo>
  101. <Column id="rsltcd" type="STRING"/>
  102. <Column id="rsltcnts" type="STRING"/>
  103. </ColumnInfo>
  104. </Dataset>
  105. <Dataset id="ds_main_testlist2" firefirstcount="0" firenextcount="0" useclientlayout="true" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  106. <ColumnInfo>
  107. <Column id="testcd" type="STRING"/>
  108. <Column id="tclsscrnm" type="STRING"/>
  109. <Column id="reptrslt" type="STRING"/>
  110. <Column id="testcd2" type="STRING" size="256"/>
  111. <Column id="bufinptrslt" type="STRING" size="256"/>
  112. </ColumnInfo>
  113. </Dataset>
  114. <Dataset id="ds_main_testlist" firefirstcount="0" firenextcount="0" useclientlayout="true" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  115. <ColumnInfo>
  116. <Column id="testcd" type="STRING"/>
  117. <Column id="tclsscrnm" type="STRING"/>
  118. <Column id="reptrslt" type="STRING"/>
  119. <Column id="testcd2" type="STRING" size="256"/>
  120. <Column id="bufinptrslt" type="STRING" size="256"/>
  121. </ColumnInfo>
  122. </Dataset>
  123. <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  124. <ColumnInfo>
  125. <Column id="tclscd" type="STRING" size="256"/>
  126. <Column id="bcno" type="STRING" size="256"/>
  127. </ColumnInfo>
  128. <Rows>
  129. <Row/>
  130. </Rows>
  131. </Dataset>
  132. <Dataset id="ds_hidden" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  133. <ColumnInfo>
  134. <Column id="temp" type="STRING" size="256"/>
  135. <Column id="urine" type="STRING" size="256"/>
  136. <Column id="bcno" type="STRING" size="256"/>
  137. </ColumnInfo>
  138. </Dataset>
  139. <Dataset id="ds_urineResult" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  140. <ColumnInfo>
  141. <column id="chk" type="STRING"/>
  142. <column id="bcno" type="STRING"/>
  143. <column id="pid" type="STRING"/>
  144. <column id="hngnm" type="STRING"/>
  145. <column id="rsltstat" type="STRING"/>
  146. <column id="workdd" type="STRING"/>
  147. <column id="workno" type="STRING"/>
  148. <column id="erprcpflag" type="STRING"/>
  149. <column id="urinextrvol" type="STRING"/>
  150. <column id="urinextrtm" type="STRING"/>
  151. <column id="lastreptdt" type="STRING"/>
  152. <column id="spcacptdt" type="STRING"/>
  153. <column id="prcpdd" type="STRING"/>
  154. <column id="testcd" type="STRING"/>
  155. </ColumnInfo>
  156. </Dataset>
  157. <Dataset id="ds_abnormallist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  158. <ColumnInfo>
  159. <Column id="testcd" type="STRING"/>
  160. <Column id="tclsscrnm" type="STRING"/>
  161. <Column id="reptrslt" type="STRING"/>
  162. <Column id="testcd2" type="STRING" size="256"/>
  163. <Column id="bufinptrslt" type="STRING" size="256"/>
  164. </ColumnInfo>
  165. </Dataset>
  166. </Objects>
  167. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  168. * System Name :
  169. * Job Name :
  170. * Creator :
  171. * Make Date : 2015-05-01
  172. * Description :
  173. *---------------------------------------------------------------------------------------
  174. * Modify Date Modifier Modify Description
  175. *---------------------------------------------------------------------------------------
  176. * 2015-05-01 Live Converter TF->XP
  177. *
  178. *---------------------------------------------------------------------------------------
  179. ****************************************************************************************/
  180. include "com_commonxp::comm_main.xjs";
  181. include "lis_commonxp::LLZ001.xjs";
  182. function SPLLR91300_oninit(obj:Form, e:InitEventInfo)
  183. {
  184. frmf_initForm(obj);
  185. }
  186. function SPLLR91300_onload(obj:Form, e:LoadEventInfo)
  187. {
  188. grdf_initGrid(grd_rsltlist);
  189. grdf_initGrid(grd_testlist);
  190. grdf_initGrid(grd_testlist2);
  191. try
  192. {
  193. ds_urineResult.copyData(arg_ds_urineResult);
  194. }catch(e){};
  195. fSetInit();
  196. }
  197. function fSetInit()
  198. {
  199. //테스트
  200. var oParam = {};
  201. oParam.id = "TRLLR91301";
  202. oParam.service = "rsltmngtapp.RsltMngt";
  203. oParam.method = "reqGetTest";
  204. oParam.inds = "patinfo=ds_urineResult";
  205. oParam.outds = "ds_main_testlist=getTest ds_main_testlist2=getTest2";
  206. oParam.async = false;
  207. //oParam.callback = "cf_TRLLR91301";
  208. tranf_submit(oParam);
  209. grd_testlist.setCellPos(grd_testlist.getBindCellIndex("Body", "reptrslt"));
  210. grd_testlist.setFocus();
  211. fGetRslt();
  212. ds_main_testlist2.rowposition = -1;
  213. }
  214. //결과목록 조회
  215. function fGetRslt(ref)
  216. {
  217. // 두번째그리드
  218. if(ref=="2")
  219. {
  220. ds_send.setColumn(0, "tclscd", ds_main_testlist2.getColumn(ds_main_testlist2.rowposition, "testcd"));
  221. }
  222. else
  223. {
  224. ds_send.setColumn(0, "tclscd", ds_main_testlist.getColumn(ds_main_testlist.rowposition, "testcd"));
  225. }
  226. var oParam = {};
  227. oParam.id = "TRLLF00702";
  228. oParam.service = "diagtestbaseinfomngtapp.GeneralTestBaseInfoMngt";
  229. oParam.method = "reqGetRsltList";
  230. oParam.inds = "cond=ds_send";
  231. oParam.outds = "ds_main_rsltcdlist=getRsltList";
  232. oParam.async = false;
  233. //oParam.callback = "cf_TRLLF00702";
  234. tranf_submit(oParam);
  235. }
  236. function grd_testlist_oncellclick(obj:Grid, e:GridClickEventInfo)
  237. {
  238. ds_main_testlist2.rowposition = -1;
  239. if(e.col == 2)
  240. {
  241. fGetRslt();
  242. }
  243. }
  244. function grd_testlist_onkeyup(obj:Grid, e:KeyEventInfo)
  245. {
  246. if(obj.currentcol == 3)
  247. {
  248. if(e.keycode == 13)
  249. {
  250. fGetRslt2();
  251. }
  252. }
  253. }
  254. // 첫째그리드 결과값 넣을때
  255. function fGetRslt2()
  256. {
  257. var Gcol = grd_testlist.currentcell;
  258. var Grow = ds_main_testlist.rowposition;
  259. var rslt = parseInt(ds_main_testlist.getColumn(Grow, "reptrslt"));
  260. if(rslt > 0 && rslt < ds_main_rsltcdlist.rowcount)
  261. {
  262. ds_main_testlist.setColumn(ds_main_testlist.rowposition, "reptrslt", ds_main_rsltcdlist.getColumn(rslt -1, "rsltcnts"));
  263. }
  264. ds_main_testlist.rowposition = Grow + 1;
  265. fGetRslt();
  266. }
  267. function grd_testlist2_oncellclick(obj:Grid, e:GridClickEventInfo)
  268. {
  269. ds_main_testlist.rowposition = -1;
  270. if(obj.currentcol == 2)
  271. {
  272. fGetRslt("2");
  273. }
  274. }
  275. function grd_testlist2_onkeyup(obj:Grid, e:KeyEventInfo)
  276. {
  277. if(obj.currentcol == 3)
  278. {
  279. if(e.keycode == 13)
  280. {
  281. fGetRslt3();
  282. }
  283. }
  284. }
  285. //둘째그리드 결과값 넣을때
  286. function fGetRslt3()
  287. {
  288. var Gcol = grd_testlist2.currentcell;
  289. var Grow = ds_main_testlist2.rowposition;
  290. var rslt = parseInt(ds_main_testlist2.getColumn(Grow, "reptrslt"));
  291. if(rslt > 0 && rslt < ds_main_testlist2.rowcount)
  292. {
  293. ds_main_testlist2.setColumn(ds_main_testlist2.rowposition, "reptrslt", ds_main_rsltcdlist.getColumn(rslt -1, "rsltcnts"));
  294. }
  295. ds_main_testlist2.rowposition = Grow + 1;
  296. fGetRslt("2");
  297. }
  298. //확인
  299. function btn_cnfm_onclick(obj:Button, e:ClickEventInfo)
  300. {
  301. fSetDiffCnt();
  302. }
  303. //초기화
  304. function btn_init_onclick(obj:Button, e:ClickEventInfo)
  305. {
  306. fSetInit();
  307. }
  308. function btn_close_onclick(obj:Button, e:ClickEventInfo)
  309. {
  310. this.close();
  311. }
  312. //확인
  313. function fSetDiffCnt()
  314. {
  315. var nrbcTF = false;
  316. cnt = 1;
  317. for(i = 0; i < ds_main_testlist.rowcount; i++)
  318. {
  319. if(!utlf_isNull(ds_main_testlist.getColumn(i, "reptrslt")))
  320. {
  321. ds_main_testlist.setColumn(i, "bufinptrslt", ds_main_testlist.getColumn(i, "reptrslt"));
  322. ds_main_testlist.setColumn(i, "testcd2", ds_urineResult.getColumn(0, "testcd"));
  323. cnt = ds_abnormallist.addRow();
  324. ds_abnormallist.copyRow(cnt, ds_main_testlist, i);
  325. nrbcTF= true;
  326. }
  327. }
  328. // 두번째 그리드
  329. for(i = 0; i < ds_main_testlist2.rowcount; i++)
  330. {
  331. if(!utlf_isNull(ds_main_testlist2.getColumn(i, "reptrslt")))
  332. {
  333. ds_main_testlist2.setColumn(i, "bufinptrslt", ds_main_testlist2.getColumn(i, "reptrslt"));
  334. ds_main_testlist2.setColumn(i, "testcd2", ds_main_testlist2.getColumn(i, "testcd"));
  335. cnt = ds_abnormallist.addRow();
  336. ds_abnormallist.copyRow(cnt, ds_main_testlist2, i);
  337. nrbcTF= true;
  338. }
  339. }
  340. if(nrbcTF)
  341. {
  342. opener.ds_copy_abnormallist.copyData(ds_abnormallist);
  343. this.close();
  344. }
  345. else
  346. {
  347. sysf_messageBox("결과 입력 된 검사가", "I004");
  348. }
  349. }
  350. function grd_rsltlist_oncelldblclick(obj:Grid, e:GridClickEventInfo)
  351. {
  352. fSetRslt();
  353. }
  354. //결과값 넣기
  355. function fSetRslt()
  356. {
  357. var testcd = ds_main_rsltcdlist.getColumn(ds_main_rsltcdlist.rowposition, "tclscd");
  358. trace("testcd = " + testcd);
  359. var find1 = ds_main_testlist.findRow("testcd", testcd);
  360. trace("find1 = " + find1);
  361. if(find1 < 0)
  362. {
  363. var find2 = ds_main_testlist2.findRow("testcd", testcd)
  364. ds_main_testlist2.setColumn(ds_main_testlist2.rowposition, "reptrslt", ds_main_rsltcdlist.getColumn(ds_main_rsltcdlist.rowposition, "rsltcnts"));
  365. }
  366. else
  367. {
  368. ds_main_testlist.setColumn(ds_main_testlist.rowposition, "reptrslt", ds_main_rsltcdlist.getColumn(ds_main_rsltcdlist.rowposition, "rsltcnts"));
  369. }
  370. }
  371. ]]></Script>
  372. </Form>
  373. </FDL>