SPMMD06200_CPG검사정보선택.xfdl 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.4">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SPMMD06200" position="absolute 0 0 499 650" titletext="검사정보" oninit="SPMMD06200_oninit" onload="SPMMD06200_onload">
  5. <Layouts>
  6. <Layout>
  7. <Div position="absolute 0 622 500 652" id="grp_btn">
  8. <Layouts>
  9. <Layout>
  10. <Button position="absolute 385 3 441 25" id="button7" class="btn4" text="등록" onclick="grp_btn_button7_onclick"/>
  11. <Button position="absolute 443 3 499 25" id="button3" class="btn4" text="닫기" onclick="grp_btn_button3_onclick"/>
  12. </Layout>
  13. </Layouts>
  14. </Div>
  15. <Grid position="absolute 130 59 500 450" id="grd_codelist" binddataset="ds_main_testlist" autofittype="col" oncelldblclick="grd_codelist_oncelldblclick" oncellclick="grd_codelist_oncellclick">
  16. <Formats>
  17. <Format id="default">
  18. <Columns>
  19. <Column size="32"/>
  20. <Column size="0"/>
  21. <Column size="0"/>
  22. <Column size="70"/>
  23. <Column size="250"/>
  24. <Column size="0"/>
  25. </Columns>
  26. <Rows>
  27. <Row size="24" band="head"/>
  28. <Row size="24"/>
  29. </Rows>
  30. <Band id="head">
  31. <Cell text="선택"/>
  32. <Cell col="1" text="depth"/>
  33. <Cell col="2" text="grupcd"/>
  34. <Cell col="3" text="검사코드"/>
  35. <Cell col="4" text="검사명"/>
  36. <Cell col="5" text="단위"/>
  37. </Band>
  38. <Band id="body">
  39. <Cell text="bind:boolflag" edittype="checkbox" displaytype="checkbox"/>
  40. <Cell col="1" text="bind:depth"/>
  41. <Cell col="2" text="bind:grupcd"/>
  42. <Cell col="3" text="bind:itemcd"/>
  43. <Cell col="4" text="bind:itemnm"/>
  44. <Cell col="5" text="bind:unitnm"/>
  45. </Band>
  46. </Format>
  47. </Formats>
  48. </Grid>
  49. <Grid position="absolute 0 477 500 622" id="grd_selectlist" binddataset="ds_main_selecttestlist" onexpandup="grd_selectlist_onexpandup" oncelldblclick="grd_selectlist_oncelldblclick">
  50. <Formats>
  51. <Format id="default">
  52. <Columns>
  53. <Column size="0"/>
  54. <Column size="71"/>
  55. <Column size="121"/>
  56. <Column size="0"/>
  57. <Column size="95"/>
  58. <Column size="43"/>
  59. <Column size="30"/>
  60. <Column size="42"/>
  61. <Column size="30"/>
  62. <Column size="50"/>
  63. <Column size="0"/>
  64. <Column size="0"/>
  65. <Column size="0"/>
  66. <Column size="0"/>
  67. <Column size="0"/>
  68. <Column size="0"/>
  69. </Columns>
  70. <Rows>
  71. <Row size="24" band="head"/>
  72. <Row size="24"/>
  73. </Rows>
  74. <Band id="head">
  75. <Cell text="grupcd"/>
  76. <Cell col="1" text="검사코드"/>
  77. <Cell col="2" text="검사명"/>
  78. <Cell col="3" text="spccd"/>
  79. <Cell col="4" text="검체 (전체:-)"/>
  80. <Cell col="5" colspan="2" text="하한치"/>
  81. <Cell col="7" colspan="2" text="상한치"/>
  82. <Cell col="9" text="단위"/>
  83. <Cell col="10" text="refseq"/>
  84. <Cell col="11" text="alertcdflag"/>
  85. <Cell col="12" text="alertrem"/>
  86. <Cell col="13" text="alertprecondyn"/>
  87. <Cell col="14" text="checkyn"/>
  88. <Cell col="15" text="m"/>
  89. </Band>
  90. <Band id="body">
  91. <Cell text="bind:testitemcd"/>
  92. <Cell col="1" text="bind:testcd"/>
  93. <Cell col="2" text="bind:testnm"/>
  94. <Cell col="3" text="bind:spccd"/>
  95. <Cell col="4" displaytype="text" edittype="expand" text="bind:spcnm" expandshow="show" expandsize="20"/>
  96. <Cell col="5" displaytype="text" edittype="text" text="bind:reflval"/>
  97. <Cell col="6" displaytype="combo" edittype="combo" text="bind:lvalappflag"/>
  98. <Cell col="7" displaytype="text" edittype="text" text="bind:refhval"/>
  99. <Cell col="8" displaytype="combo" edittype="combo" text="bind:hvalappflag"/>
  100. <Cell col="9" text="bind:unitnm"/>
  101. <Cell col="10" text="bind:refseq"/>
  102. <Cell col="11" text="bind:alertcdflag"/>
  103. <Cell col="12" text="bind:alertrem"/>
  104. <Cell col="13" text="bind:alertprecondyn"/>
  105. <Cell col="14" text="bind:checkyn"/>
  106. <Cell col="15" text="bind:m"/>
  107. </Band>
  108. </Format>
  109. </Formats>
  110. </Grid>
  111. <Button position="absolute 392 455 456 474" id="button6" class="btn2" text="항목추가" onclick="button6_onclick"/>
  112. <Static text="선택 검사항목" position="absolute 4 458 146 474" id="caption5" class="tit_2"/>
  113. <Static text="검사정보" position="absolute 0 0 142 16" id="caption14" class="tit_2"/>
  114. <Button position="absolute 458 455 500 474" id="button1" class="btn2" text="삭제" onclick="button1_onclick"/>
  115. <Grid position="absolute 0 59 130 450" id="grd_grouplist" binddataset="ds_main_grouplist" autofittype="col" oncelldblclick="grd_grouplist_oncelldblclick" oncellclick="grd_grouplist_oncellclick">
  116. <Formats>
  117. <Format id="default">
  118. <Columns>
  119. <Column size="112"/>
  120. </Columns>
  121. <Rows>
  122. <Row size="24" band="head"/>
  123. <Row size="24"/>
  124. </Rows>
  125. <Band id="head">
  126. <Cell text="검사 분류"/>
  127. </Band>
  128. <Band id="body">
  129. <Cell text="bind:nm"/>
  130. </Band>
  131. </Format>
  132. </Formats>
  133. </Grid>
  134. <Div id="grp_srch" taborder="4" position="absolute 0 19 500 57" class="div_SA2">
  135. <Layouts>
  136. <Layout>
  137. <Button id="btn_srchreq" taborder="0" text="조회" class="btn1" position="absolute 430 9 486 31" anchor="default" onclick="grp_srch_btn_srchreq_onclick"/>
  138. <Static id="caption4" text="검색 :" class="search_name" position="absolute 6 11 52 28" anchor="default"/>
  139. <Radio id="radio2" taborder="1" columncount="2" rowcount="0" codecolumn="codecolumn" datacolumn="datacolumn" position="absolute 56 9 192 29" anchor="default">
  140. <Dataset id="innerdataset">
  141. <ColumnInfo>
  142. <Column id="codecolumn"/>
  143. <Column id="datacolumn"/>
  144. </ColumnInfo>
  145. <Rows>
  146. <Row>
  147. <Col id="codecolumn">C</Col>
  148. <Col id="datacolumn">검사코드</Col>
  149. </Row>
  150. <Row>
  151. <Col id="codecolumn">N</Col>
  152. <Col id="datacolumn">검사명</Col>
  153. </Row>
  154. </Rows>
  155. </Dataset>
  156. </Radio>
  157. <Edit id="input3" taborder="2" position="absolute 205 10 420 29" anchor="default" onkeydown="grp_srch_input3_onkeydown"/>
  158. </Layout>
  159. </Layouts>
  160. </Div>
  161. </Layout>
  162. </Layouts>
  163. <Objects>
  164. <Dataset id="ds_main_testlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  165. <ColumnInfo>
  166. <Column id="boolflag" type="STRING"/>
  167. <Column id="depth" type="STRING"/>
  168. <Column id="grupcd" type="STRING"/>
  169. <Column id="itemcd" type="STRING"/>
  170. <Column id="itemnm" type="STRING"/>
  171. <Column id="unitnm" type="STRING"/>
  172. </ColumnInfo>
  173. </Dataset>
  174. <Dataset id="ds_main_selecttestlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  175. <ColumnInfo>
  176. <Column id="testitemcd" type="STRING"/>
  177. <Column id="testcd" type="STRING"/>
  178. <Column id="testnm" type="STRING"/>
  179. <Column id="spccd" type="STRING"/>
  180. <Column id="spcnm" type="STRING"/>
  181. <Column id="reflval" type="STRING"/>
  182. <Column id="lvalappflag" type="STRING"/>
  183. <Column id="refhval" type="STRING"/>
  184. <Column id="hvalappflag" type="STRING"/>
  185. <Column id="unitnm" type="STRING"/>
  186. <Column id="refseq" type="STRING"/>
  187. <Column id="alertcdflag" type="STRING"/>
  188. <Column id="alertrem" type="STRING"/>
  189. <Column id="alertprecondyn" type="STRING"/>
  190. <Column id="checkyn" type="STRING"/>
  191. <Column id="m" type="STRING"/>
  192. </ColumnInfo>
  193. </Dataset>
  194. <Dataset id="ds_main_grouplist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  195. <ColumnInfo>
  196. <Column id="nm" type="STRING"/>
  197. </ColumnInfo>
  198. </Dataset>
  199. <Dataset id="ds_main_cond" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  200. <ColumnInfo>
  201. <Column id="prcpflag" type="STRING" size="256"/>
  202. <Column id="prcpcd" type="STRING" size="256"/>
  203. <Column id="alertcdflag" type="STRING" size="256"/>
  204. <Column id="testmdlcd" type="STRING" size="256"/>
  205. <Column id="userdeptflagcd" type="STRING" size="256"/>
  206. </ColumnInfo>
  207. <Rows>
  208. <Row>
  209. <Col id="prcpflag">C</Col>
  210. <Col id="prcpcd"/>
  211. <Col id="alertcdflag"/>
  212. <Col id="testmdlcd"/>
  213. <Col id="userdeptflagcd"/>
  214. </Row>
  215. </Rows>
  216. </Dataset>
  217. <Dataset id="ds_send_reqdata" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  218. </Objects>
  219. <Bind>
  220. <BindItem id="item0" compid="grp_srch.radio2" propid="value" datasetid="ds_main_cond" columnid="prcpflag"/>
  221. <BindItem id="item1" compid="grp_srch.input3" propid="value" datasetid="ds_main_cond" columnid="prcpcd"/>
  222. </Bind>
  223. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  224. * System Name :
  225. * Job Name :
  226. * Creator :
  227. * Make Date : 2015-03-27
  228. * Description :
  229. *---------------------------------------------------------------------------------------
  230. * Modify Date Modifier Modify Description
  231. *---------------------------------------------------------------------------------------
  232. * 2015-03-27 Live Converter TF->XP
  233. *
  234. *---------------------------------------------------------------------------------------
  235. ****************************************************************************************/
  236. //=======================================================================================
  237. // Lib Include
  238. //---------------------------------------------------------------------------------------
  239. include "com_commonxp::comm_main.xjs"
  240. var openflag = "";
  241. var arErrorCode = new HashArray();
  242. //=======================================================================================
  243. // Event
  244. //---------------------------------------------------------------------------------------
  245. /****************************************************************************************
  246. * Components : Form
  247. * Components ID : SPMMD06200
  248. * Event : oninit
  249. * Argument : 01.obj : Object Event has occurred
  250. * : 02.e : Event Object
  251. * Description : 화면 처음 초기화시 폼초기화
  252. ****************************************************************************************/
  253. function SPMMD06200_oninit(obj:Form, e:InitEventInfo)
  254. {
  255. frmf_initForm(obj); // 폼 초기화
  256. }
  257. /****************************************************************************************
  258. * Components : Form
  259. * Components ID : SPMMD06200
  260. * Event : onload
  261. * Argument : 01.obj : Object Event has occurred
  262. * : 02.e : Event Object
  263. * Description : 화면오픈시 폼load이후 실행
  264. ****************************************************************************************/
  265. function SPMMD06200_onload(obj:Form, e:LoadEventInfo)
  266. {
  267. var openflag = opener.ds_main_cond.getColumn(0,"condbutton");
  268. var sRow = "";
  269. var alertcdflag = "";
  270. alertcdflag = opener.ds_main_cond.getColumn(0,"alertcdflag");
  271. ds_main_cond.setColumn(0,"alertcdflag", alertcdflag);
  272. //사용부서구분코드(L:진단검사의학과, P:병리과, N:핵의학과-체외검사)
  273. if(alertcdflag == "01"){
  274. ds_main_cond.setColumn(0,"userdeptflagcd", "L");
  275. }else if(alertcdflag == "02"){
  276. ds_main_cond.setColumn(0,"userdeptflagcd", "N");
  277. }
  278. var oParam = {};
  279. oParam.id = "TRMMD06202";
  280. oParam.service = "cdssmngtapp.ClinicalRuleMngt";
  281. oParam.method = "reqGetTestClsList";
  282. oParam.inds = "req=ds_main_cond";
  283. oParam.outds = "ds_main_grouplist=grouplist";
  284. oParam.async = false;
  285. oParam.callback = "cf_TRMMD06202";
  286. tranf_submit(oParam);
  287. if( arErrorCode.pop("TRMMD06202") > -1 ){
  288. // grd_grouplist.isselected(1) = true;
  289. objects[grd_grouplist.binddataset].rowposition = 0;
  290. var cd = ds_main_grouplist.getColumn(0,"cd");
  291. ds_main_cond.setColumn(0,"testmdlcd", cd);
  292. }
  293. }
  294. /****************************************************************************************
  295. * Components : Edit
  296. * Components ID : grp_srch.input3
  297. * Event : onkeydown
  298. * Argument : 01.obj : Object Event has occurred
  299. * : 02.e : Event Object
  300. * Description : 조회조건 입력후 엔터로 조회실행
  301. ****************************************************************************************/
  302. function grp_srch_input3_onkeydown(obj:Edit, e:KeyEventInfo)
  303. {
  304. if(e.keycode == 13) {
  305. var ev = new ClickEventInfo;
  306. frmf_inputEnterKey("grp_srch.btn_srchreq", "onclick", ev );
  307. }
  308. }
  309. /****************************************************************************************
  310. * Components : Button
  311. * Components ID : grp_srch.btn_srchreq
  312. * Event : onclick
  313. * Argument : 01.obj : Object Event has occurred
  314. * : 02.e : Event Object
  315. * Description : 조회버튼 클릭
  316. ****************************************************************************************/
  317. function grp_srch_btn_srchreq_onclick(obj:Button, e:ClickEventInfo)
  318. {
  319. getAllPrcpCd();
  320. }
  321. /****************************************************************************************
  322. * Components : Grid
  323. * Components ID : grd_grouplist
  324. * Event : oncelldblclick
  325. * Argument : 01.obj : Object Event has occurred
  326. * : 02.e : Event Object
  327. * Description : 검사분류 더블클릭하여 검사정보 조회
  328. ****************************************************************************************/
  329. function grd_grouplist_oncelldblclick(obj:Grid, e:GridClickEventInfo)
  330. {
  331. if( e.row > -1 ){
  332. getAllPrcpCd();
  333. }
  334. }
  335. /****************************************************************************************
  336. * Components : Grid
  337. * Components ID : grd_grouplist
  338. * Event : oncellclick
  339. * Argument : 01.obj : Object Event has occurred
  340. * : 02.e : Event Object
  341. * Description : 검사분류 클릭하여 조회조건 세팅
  342. ****************************************************************************************/
  343. function grd_grouplist_oncellclick(obj:Grid, e:GridClickEventInfo)
  344. {
  345. var currow = e.row;
  346. if( currow > -1 ){
  347. var cd = ds_main_grouplist.getColumn(currow,"cd");
  348. ds_main_cond.setColumn(0,"testmdlcd", cd);
  349. }
  350. }
  351. /****************************************************************************************
  352. * Components : Grid
  353. * Components ID : grd_codelist
  354. * Event : oncelldblclick
  355. * Argument : 01.obj : Object Event has occurred
  356. * : 02.e : Event Object
  357. * Description : 검사정보 더블클릭
  358. ****************************************************************************************/
  359. function grd_codelist_oncelldblclick(obj:Grid, e:GridClickEventInfo)
  360. {
  361. //2009.02.17 JJE 수정함
  362. var currow = e.row;
  363. if(currow > -1){
  364. ds_main_testlist.setColumn(currow,"boolflag","Y");
  365. e.col = 0;
  366. // grd_codelist.dispatch("onclick");
  367. var ev = new GridClickEventInfo;
  368. frmf_inputEnterKey("grd_codelist", "oncellclick", ev );
  369. fAppendDiagCD();
  370. }
  371. }
  372. /****************************************************************************************
  373. * Components : Grid
  374. * Components ID : grd_codelist
  375. * Event : oncellclick
  376. * Argument : 01.obj : Object Event has occurred
  377. * : 02.e : Event Object
  378. * Description : 검사정보 클릭
  379. ****************************************************************************************/
  380. function grd_codelist_oncellclick(obj:Grid, e:GridClickEventInfo)
  381. {
  382. var grdcol = e.col;
  383. var currow = e.row;
  384. var rows = obj.rowcount;
  385. var grdrow = rows - currow; //???
  386. var rowno = rows - 1; //???
  387. if ( currow > -1 ) {
  388. if (grdcol == 0) {
  389. var boolflag = ds_main_testlist.getColumn(currow,"boolflag");
  390. var org_grupyn = ds_main_testlist.getColumn(currow,"grupyn");
  391. var org_depth = parseInt(ds_main_testlist.getColumn(currow,"depth"));
  392. var depth = "";
  393. var grupyn = "";
  394. if (org_grupyn == "Y") { //그룹이면 - 하위코드까지 자동 체크 처리
  395. for(var i = 1 ; i < grdrow ; i ++ ) {
  396. currow = currow + 1;
  397. depth = parseInt(ds_main_testlist.getColumn(currow,"depth"));
  398. grupyn = ds_main_testlist.getColumn(currow,"grupyn");
  399. if (depth > org_depth) {
  400. if (currow <= rowno ) { //&& grupyn == "N"
  401. var boolflag = ds_main_testlist.getColumn(currow,"boolflag");
  402. if (boolflag == "Y") {
  403. ds_main_testlist.setColumn(currow,"boolflag", "N");
  404. } else {
  405. ds_main_testlist.setColumn(currow,"boolflag", "Y");
  406. }
  407. }
  408. } else{
  409. return;
  410. }
  411. }
  412. }
  413. }
  414. }
  415. }
  416. /****************************************************************************************
  417. * Components : Button
  418. * Components ID : button6
  419. * Event : onclick
  420. * Argument : 01.obj : Object Event has occurred
  421. * : 02.e : Event Object
  422. * Description : 항목추가 버튼 클릭
  423. ****************************************************************************************/
  424. function button6_onclick(obj:Button, e:ClickEventInfo)
  425. {
  426. fAppendDiagCD();
  427. }
  428. /****************************************************************************************
  429. * Components : Button
  430. * Components ID : button1
  431. * Event : onclick
  432. * Argument : 01.obj : Object Event has occurred
  433. * : 02.e : Event Object
  434. * Description : 선택 검사항목 삭제 버튼 클릭
  435. ****************************************************************************************/
  436. function button1_onclick(obj:Button, e:ClickEventInfo)
  437. {
  438. var selectedRowList = grdf_getSelectedRows(grd_selectlist);
  439. if( selectedRowList.length > 0 ){
  440. for (var i = selectedRowList.length-1 ; i >= 0 ; i--) {
  441. // model.removeNodeset("/root/main/selecttestinfo/selecttestlist[" + grd_selectlist.selectedrow(i) + "]");
  442. ds_main_selecttestlist.deleteRow(selectedRowList[i]);
  443. }
  444. // grd_selectlist.refresh();
  445. }
  446. }
  447. /****************************************************************************************
  448. * Components : Grid
  449. * Components ID : grd_selectlist
  450. * Event : onexpandup
  451. * Argument : 01.obj : Object Event has occurred
  452. * : 02.e : Event Object
  453. * Description : 선택검사항목 검체 버튼 클릭
  454. ****************************************************************************************/
  455. function grd_selectlist_onexpandup(obj:Grid, e:GridMouseEventInfo)
  456. {
  457. var grdcol = e.col;
  458. var currow = e.row;
  459. var rows = obj.rowcount;
  460. if ( currow > -1 ) {
  461. if( grdcol == grd_selectlist.getBindCellIndex("body","spcnm") ) {
  462. var testcd = ds_main_selecttestlist.getColumn(currow,"testcd");
  463. var testnm = ds_main_selecttestlist.getColumn(currow,"testnm");
  464. frmf_setParameter("SPMMO03400_param_tclsnm", testnm);
  465. frmf_setParameter("SPMMO03400_param_tclscd", testcd);
  466. // modal("SPMMO03400");
  467. frmf_modal("SPMMO03400","SPMMO03400",null,null,null,null,null,null,null,null,null,null,"M");
  468. if( !utlf_isNull(frmf_getParameter("SPMMO03400_rtn_spccd")) ){
  469. var spccd = frmf_getParameter("SPMMO03400_rtn_spccd");
  470. var spcnm = frmf_getParameter("SPMMO03400_rtn_spcscrnnm");
  471. var useyn = frmf_getParameter("SPMMO03400_rtn_useyn");
  472. ds_main_selecttestlist.setColumn(currow,"spccd", spccd);
  473. ds_main_selecttestlist.setColumn(currow,"spcnm", spcnm);
  474. }
  475. frmf_clearParameter("SPMMO03400_param_tclsnm");
  476. frmf_clearParameter("SPMMO03400_param_tclscd");
  477. frmf_clearParameter("SPMMO03400_rtn_spccd");
  478. frmf_clearParameter("SPMMO03400_rtn_spcscrnnm");
  479. frmf_clearParameter("SPMMO03400_rtn_useyn");
  480. }
  481. }
  482. }
  483. /****************************************************************************************
  484. * Components : Grid
  485. * Components ID : grd_selectlist
  486. * Event : oncelldblclick
  487. * Argument : 01.obj : Object Event has occurred
  488. * : 02.e : Event Object
  489. * Description : 선택검사항목 더블클릭
  490. ****************************************************************************************/
  491. function grd_selectlist_oncelldblclick(obj:Grid, e:GridClickEventInfo)
  492. {
  493. var grdcol = e.col;
  494. var currow = e.row;
  495. var rows = obj.rowcount;
  496. var srcrow = 0;
  497. var spccd = "";
  498. var spcnm = "";
  499. if (grdcol == grd_selectlist.getBindCellIndex("body","spcnm") ) {
  500. if ( currow == 0 ) {
  501. srcrow = currow + 1;
  502. spccd = ds_main_selecttestlist.getColumn(srcrow,"spccd");
  503. spcnm = ds_main_selecttestlist.getColumn(srcrow,"spcnm");
  504. } else if ( currow > 0 && currow < rows ) {
  505. srcrow = currow - 1;
  506. spccd = ds_main_selecttestlist.getColumn(srcrow,"spccd");
  507. spcnm = ds_main_selecttestlist.getColumn(srcrow,"spcnm");
  508. }
  509. ds_main_selecttestlist.setColumn(srcrow,"spccd", spccd);
  510. ds_main_selecttestlist.setColumn(srcrow,"spcnm", spcnm);
  511. }
  512. }
  513. /****************************************************************************************
  514. * Components : Button
  515. * Components ID : grp_btn.button7
  516. * Event : onclick
  517. * Argument : 01.obj : Object Event has occurred
  518. * : 02.e : Event Object
  519. * Description : 등록버튼 클릭
  520. ****************************************************************************************/
  521. function grp_btn_button7_onclick(obj:Button, e:ClickEventInfo)
  522. {
  523. fSendItemCDList();
  524. }
  525. /****************************************************************************************
  526. * Components : Button
  527. * Components ID : grp_btn.button3
  528. * Event : onclick
  529. * Argument : 01.obj : Object Event has occurred
  530. * : 02.e : Event Object
  531. * Description : 닫기버튼 클릭
  532. ****************************************************************************************/
  533. function grp_btn_button3_onclick(obj:Button, e:ClickEventInfo)
  534. {
  535. this.close();
  536. }
  537. //=======================================================================================
  538. // Function
  539. //---------------------------------------------------------------------------------------
  540. /****************************************************************************************
  541. * Function : cf_TRMMD06202
  542. * Description : TRMMD06202 콜백함수
  543. * Argument :
  544. * return type :
  545. * Creator :
  546. ****************************************************************************************/
  547. function cf_TRMMD06202(sSvcId, nErrorCode, sErrorMsg) {
  548. arErrorCode.push(sSvcId, nErrorCode);
  549. }
  550. /****************************************************************************************
  551. * Function : getAllPrcpCd
  552. * Description : 검사정보조회
  553. * Argument :
  554. * return type :
  555. * Creator :
  556. ****************************************************************************************/
  557. function getAllPrcpCd(){
  558. ds_send_reqdata.copyData(ds_main_cond);
  559. var oParam = {};
  560. oParam.id = "TRMMD06201";
  561. oParam.service = "cdssmngtapp.ClinicalRuleMngt";
  562. oParam.method = "reqGetTestItemList";
  563. oParam.inds = "req=ds_send_reqdata";
  564. oParam.outds = "ds_main_testlist=testlist";
  565. oParam.async = false;
  566. oParam.callback = "cf_TRMMD06201";
  567. tranf_submit(oParam);
  568. // submit("TRMMD06201", true);
  569. // setTree(grd_codelist, grd_codelist.colRef("depth"), grd_codelist.colRef("itemnm"), true);
  570. }
  571. /****************************************************************************************
  572. * Function : cf_TRMMD06201
  573. * Description : TRMMD06201 콜백함수
  574. * Argument :
  575. * return type :
  576. * Creator :
  577. ****************************************************************************************/
  578. function cf_TRMMD06201(sSvcId, nErrorCode, sErrorMsg) {
  579. if(nErrorCode < 0) return;
  580. dsf_setDefaultVal(ds_main_testlist, "boolflag:N");
  581. }
  582. /****************************************************************************************
  583. * Function : fAppendDiagCD
  584. * Description : 다수의 진단코드 선택 후, 진단추가버튼 클릭
  585. * : 1. check box에 선택된 진단을 추가
  586. * : 2. ctrl + mouse select로 선택된 진단을 추가
  587. * Argument :
  588. * return type :
  589. * Creator :
  590. ****************************************************************************************/
  591. function fAppendDiagCD(){
  592. var totrow = objects(grd_codelist.binddataset].rowcount;
  593. var addrownum = 0;
  594. for(var i = 0 ; i < totrow ; i++){
  595. var bflag = grd_codelist.getCellText(i,grd_codelist.getBindCellIndex("body","boolflag"));
  596. var grupyn = ds_main_testlist.getColumn(i,"grupyn");
  597. var rsltyn = ds_main_testlist.getColumn(i,"rsltyn");
  598. if( bflag == "Y" && grupyn == "N" && rsltyn == "Y" ){
  599. fAddDiag(i);
  600. }
  601. objects[grd_codelist.binddataset].setColumn(i,"boolflag","N");
  602. }
  603. // grd_selectlist.rebuild();
  604. // model.refresh();
  605. }
  606. /****************************************************************************************
  607. * Function : fAppendDiagCD
  608. * Description : 단일 진단코드 선택, 그리드 클릭
  609. * Argument : trgtrow - 현재 클릭한 그리드의 row 위치
  610. * return type :
  611. * Creator :
  612. ****************************************************************************************/
  613. function fAddDiag(trgtrow){
  614. var itemcd = ds_main_testlist.getColumn(trgtrow,"itemcd");
  615. var grupcd = ds_main_testlist.getColumn(trgtrow,"grupcd");
  616. var itemnm = ds_main_testlist.getColumn(trgtrow,"itemnm");
  617. var unitnm = ds_main_testlist.getColumn(trgtrow,"unitnm");
  618. //var fndrow = grd_selectlist.findRow(itemcd, 1, 0, "true", "true");
  619. //if(fndrow < 0){
  620. grd_selectlist.addRow(false);
  621. currow = grd_selectlist.row;
  622. dsf_makeValue(ds_main_selecttestlist,"testitemcd" ,"string", grupcd, currow);
  623. dsf_makeValue(ds_main_selecttestlist,"testcd" ,"string", itemcd, currow);
  624. dsf_makeValue(ds_main_selecttestlist,"testnm" ,"string", itemnm, currow);
  625. dsf_makeValue(ds_main_selecttestlist,"unitnm" ,"string", unitnm, currow);
  626. dsf_makeValue(ds_main_selecttestlist,"lvalappflag" ,"string", "U" , currow);
  627. dsf_makeValue(ds_main_selecttestlist,"hvalappflag" ,"string", "D" , currow);
  628. dsf_makeValue(ds_main_selecttestlist,"spccd" ,"string", "-" , currow);
  629. dsf_makeValue(ds_main_selecttestlist,"spcnm" ,"string", "-" , currow);
  630. //}
  631. }
  632. /************************************************************************************************
  633. 함수명 : setTree ()
  634. 인자 :
  635. Object gridObj - 그리드 오브텍트
  636. Integer levelcol - Depth 컬럼 위치
  637. Integer targetcol - 아웃라인 생성 컬럼 위치
  638. Boolean collapsed - Expand 설정
  639. Integer outlinebar - 아웃라인 형태 (0:트리구조로 보여지지 않음-일반컬럼)
  640. (1:트리를 연결하는 선보이지 않음/박스보임)
  641. (2:기본값-트리를 연결하는 선보임/박스보임)
  642. (3:트리를 연결하는 선보이지 않음/하위노드가 없으면 박스 보이지 않)
  643. (4:트리를 연결하는 선보임/하위노드가 없으면 박스 보이지 않음)
  644. (5:트리를 연결하는 선보이지 않음/박스보이지 않음)
  645. 결과값 :
  646. 함수설명 : 아웃라인 옵션 추가 - 2008.04.25 by hoya
  647. ************************************************************************************************
  648. 작 성 자 : 어 승옥
  649. 작 성 일 : 2006. 12. 01
  650. ************************************************************************************************/
  651. // function setTree( gridObj, levelcol, targetcol, collapsed, outlinebar ) {
  652. // // 그리드 아웃라이바 초기화
  653. // //gridObj.outlinebar=0;
  654. //
  655. // //tree 및 레벨설정
  656. // for(var i = gridObj.fixedRows; i < gridObj.rows; i++)
  657. // {
  658. // //gridObj.issubtotal(i) = true;
  659. // try {
  660. // gridObj.outlinelevel(i)=gridObj.valuematrix(i, levelcol); //인스턴스 levl 값임
  661. // } catch(e) {
  662. //
  663. // }
  664. // }
  665. //
  666. // // tree 대상 컬럼 및 형태 설정
  667. // gridObj.outlinecol=targetcol; //연결선이 표현되는 컬럼
  668. // if (outlinebar == "" || outlinebar == null) {
  669. // gridObj.outlinebar = 2;
  670. // } else {
  671. // gridObj.outlinebar=outlinebar; //연결선 형태 설정 (+ , - , 사각형 안보이게 하려면 0 으로 세팅)
  672. // }
  673. // gridObj.treecolor="#948777"
  674. //
  675. // // 자식 트리 접기
  676. // if(collapsed != null) {
  677. // setCollapsed(gridObj, collapsed);
  678. // }
  679. // }
  680. /****************************************************************************************
  681. * Function : fSendItemCDList
  682. * Description : 진단코드리스트 전달
  683. * Argument :
  684. * return type :
  685. * Creator :
  686. ****************************************************************************************/
  687. function fSendItemCDList(){
  688. if(frmf_checkOpener()){
  689. var condbutton = opener.ds_main_cond.getColumn(0,"condbutton");
  690. var alertcdflag = opener.ds_main_cond.getColumn(0,"alertcdflag");
  691. if (condbutton == "IF") {
  692. var sRows = objects[grd_selectlist.binddataset].rowcount;
  693. }
  694. if ( objects[grd_selectlist.binddataset].rowcount < 1 ) {
  695. sysf_messageBox ( "선택된 항목이", "I004" );
  696. }
  697. var header = "testitemcd▦testcd▦testnm▦hvalappflag▦lvalappflag▦refhval▦reflval▦unitnm▦refseq▦alertcdflag▦alertrem▦alertprecondyn▦checkyn▦m▦▦scndcondcd▦scndcondnm";
  698. var rtn = "";
  699. // var Select_Path = "/root/main/selecttestinfo/selecttestlist"; //ds_main_selecttestlist
  700. for (var i = 0; i < objects[grd_selectlist.binddataset].rowcount; i ++) {
  701. var testitemcd = ds_main_selecttestlist.getColumn(i,"testitemcd");
  702. var testcd = ds_main_selecttestlist.getColumn(i,"testcd");
  703. var testnm = ds_main_selecttestlist.getColumn(i,"testnm");
  704. var hvalappflag = ds_main_selecttestlist.getColumn(i,"hvalappflag");
  705. var lvalappflag = ds_main_selecttestlist.getColumn(i,"lvalappflag");
  706. var refhval = ds_main_selecttestlist.getColumn(i,"refhval");
  707. var reflval = ds_main_selecttestlist.getColumn(i,"reflval");
  708. var unitnm = ds_main_selecttestlist.getColumn(i,"unitnm");
  709. var refseq = ds_main_selecttestlist.getColumn(i,"refseq");
  710. var checkyn = ds_main_selecttestlist.getColumn(i,"checkyn");
  711. var m = ds_main_selecttestlist.getColumn(i,"m");
  712. var spccd = ds_main_selecttestlist.getColumn(i,"spccd");
  713. var spcnm = ds_main_selecttestlist.getColumn(i,"spcnm");
  714. if( utlf_isNull(spccd) ) spccd = "-";
  715. if ( condbutton == "IF") {
  716. var alertrem = testnm + " :" + reflval + "~" + refhval;
  717. var alertprecondyn = "Y";
  718. if ( utlf_isNull(reflval) && utlf_isNull(refhval) ) {
  719. sysf_messageBox("상한치, 하한치 값을", "C001");
  720. return;
  721. }
  722. if ( utlf_isNull(reflval)) {
  723. ds_main_selecttestlist.setColumn(i,"lvalappflag", "N");
  724. } else {
  725. if( ds_main_selecttestlist.getColumn(i,"lvalappflag") == "-" ){
  726. sysf_messageBox("하한치의 이상/이하를", "C002");
  727. return;
  728. }
  729. }
  730. if (utlf_isNull(refhval)) {
  731. ds_main_selecttestlist.setColumn(i,"hvalappflag", "N");
  732. } else {
  733. if( ds_main_selecttestlist.getColumn(i,"hvalappflag") == "-" ){
  734. sysf_messageBox("상한치의 이상/이하를", "C002");
  735. return;
  736. }
  737. }
  738. }else{
  739. var alertrem = ds_main_selecttestlist.getColumn(i,"alertrem");
  740. var alertprecondyn = "N";
  741. }
  742. rtn += "▩" + testitemcd + "▦" + testcd + "▦" + testnm + "▦" + hvalappflag + "▦" + lvalappflag+ "▦" + refhval + "▦" + reflval + "▦" + unitnm + "▦" + "▦" + alertcdflag + "▦" + alertrem + "▦" + alertprecondyn + "▦▦▦▦"+spccd+"▦"+spcnm;
  743. }
  744. if( !utlf_isNull(rtn) ) opener.frmf_setParameter( "SPMMD06100_detlinfo", header + rtn );
  745. this.close();
  746. }
  747. }
  748. ]]></Script>
  749. </Form>
  750. </FDL>