SPMMO33100_제한항생제조건별품목관리.xfdl 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SPMMO33100" position="absolute 0 0 630 615" titletext="제한항생제 조건 리스트 조회" oninit="SPMMO33100_oninit" onload="SPMMO33100_onload">
  5. <Layouts>
  6. <Layout>
  7. <Static text="제한항생제 조건 관리" position="absolute 0 0 158 25" id="caption6" class="tit_1"/>
  8. <Static text="제한항생제 조건 상세" position="absolute 0 276 175 296" id="cpt_worktitle" class="tit_2" anchor="left top"/>
  9. <Button position="absolute 569 275 630 294" id="btn_excel" class="btn7" text="Excel" onclick="btn_excel_onclick" anchor="top right"/>
  10. <Static text="제한항생제 조건" position="absolute 0 30 188 50" align="align:left middle;" id="caption3" class="tit_2"/>
  11. <Grid position="absolute 0 50 630 269" id="grd_hardcodespec" binddataset="ds_speclist" autofittype="col" cellsizingtype="col" oncellclick="grd_hardcodespec_oncellclick" autoenter="select" anchor="left top right" onenterdown="grd_hardcodespec_onenterdown">
  12. <Formats>
  13. <Format id="default">
  14. <Columns>
  15. <Column size="25"/>
  16. <Column size="80"/>
  17. <Column size="494"/>
  18. </Columns>
  19. <Rows>
  20. <Row size="24" band="head"/>
  21. <Row size="24"/>
  22. </Rows>
  23. <Band id="head">
  24. <Cell/>
  25. <Cell col="1" text="조건코드"/>
  26. <Cell col="2" text="조건명"/>
  27. </Band>
  28. <Band id="body">
  29. <Cell celltype="head" text="expr:currow+1"/>
  30. <Cell col="1" text="bind:hardcdno"/>
  31. <Cell col="2" displaytype="text" edittype="text" text="bind:hardcdnm" editautoselect="true"/>
  32. </Band>
  33. </Format>
  34. </Formats>
  35. </Grid>
  36. <Grid position="absolute 0 296 630 615" id="grd_hardcodespecdetl" binddataset="ds_specdetllist" onexpandup="grd_hardcodespecdetl_onexpandup" autoenter="select" anchor="all" autofittype="col" onenterdown="grd_hardcodespecdetl_onenterdown" autoupdatetype="dateselect" oncloseup="grd_hardcodespecdetl_oncloseup" cellsizingtype="col">
  37. <Formats>
  38. <Format id="default">
  39. <Columns>
  40. <Column size="22"/>
  41. <Column size="0"/>
  42. <Column size="0"/>
  43. <Column size="90"/>
  44. <Column size="320"/>
  45. <Column size="0"/>
  46. <Column size="99"/>
  47. <Column size="99"/>
  48. </Columns>
  49. <Rows>
  50. <Row size="24" band="head"/>
  51. <Row size="24"/>
  52. </Rows>
  53. <Band id="head">
  54. <Cell autosizecol="default"/>
  55. <Cell col="1" text="status"/>
  56. <Cell col="2" text="hardcd"/>
  57. <Cell col="3" text="코드"/>
  58. <Cell col="4" text="코드명"/>
  59. <Cell col="5" text="코드일련번호"/>
  60. <Cell col="6" text="시작일자"/>
  61. <Cell col="7" text="종료일자"/>
  62. </Band>
  63. <Band id="body">
  64. <Cell celltype="head" autosizecol="default"/>
  65. <Cell col="1" text="bind:status"/>
  66. <Cell col="2" text="bind:hardcd"/>
  67. <Cell col="3" displaytype="text" edittype="expand" text="bind:trgtcd" editautoselect="true" expandshow="show" expandsize="20"/>
  68. <Cell col="4" displaytype="text" edittype="text" text="bind:trgtcdnm" editautoselect="true"/>
  69. <Cell col="5" text="bind:cdseqno"/>
  70. <Cell col="6" displaytype="date" edittype="date" text="bind:valifromdd" editautoselect="true" editautoskip="true"/>
  71. <Cell col="7" displaytype="date" edittype="date" text="bind:valitodd" editautoselect="true" editautoskip="true"/>
  72. </Band>
  73. </Format>
  74. </Formats>
  75. </Grid>
  76. <Button position="absolute 574 28 630 48" id="button3" class="btn4" visible="false" text="저장" onclick="button3_onclick" anchor="top right"/>
  77. <Button position="absolute 422 275 464 294" id="button7" class="btn2" text="신규" onclick="button7_onclick" anchor="top right"/>
  78. <Button position="absolute 467 275 509 294" id="button8" class="btn2" text="삭제" onclick="button8_onclick" anchor="top right"/>
  79. <Button position="absolute 512 275 566 294" id="button9" class="btn4" text="저장" onclick="button9_onclick" anchor="top right"/>
  80. <Div position="absolute 28 334 623 553" id="grp_limantibioapplist" visible="false" style="background:#ffffffe6;border:0 none #808080ff ;shadow:outer 0,0 20 gray;">
  81. <Layouts>
  82. <Layout>
  83. <Button position="absolute 553 200 595 219" id="btn_grdhidden" class="btn2" text="닫기" anchor="default" onclick="grp_limantibioapplist_btn_grdhidden_onclick"/>
  84. <Grid position="absolute 0 0 595 200" id="grd_limantibioapplist" binddataset="ds_limantibiodruglist" anchor="default" oncelldblclick="grp_limantibioapplist_grd_limantibioapplist_oncelldblclick" autoenter="select" autofittype="col" style="background:#ffffffe6;" onenterdown="grp_limantibioapplist_grd_limantibioapplist_onenterdown" autoupdatetype="dateselect" oncloseup="grp_limantibioapplist_grd_limantibioapplist_oncloseup" cellsizingtype="col">
  85. <Formats>
  86. <Format id="default">
  87. <Columns>
  88. <Column size="22"/>
  89. <Column size="100"/>
  90. <Column size="260"/>
  91. <Column size="100"/>
  92. <Column size="100"/>
  93. </Columns>
  94. <Rows>
  95. <Row size="24" band="head"/>
  96. <Row size="24"/>
  97. </Rows>
  98. <Band id="head">
  99. <Cell/>
  100. <Cell col="1" text="처방코드"/>
  101. <Cell col="2" text="처방명"/>
  102. <Cell col="3" text="시작일자"/>
  103. <Cell col="4" text="종료일자"/>
  104. </Band>
  105. <Band id="body">
  106. <Cell celltype="head"/>
  107. <Cell col="1" style="align:left middle;" text="bind:prcpcd"/>
  108. <Cell col="2" style="align:left middle;" text="bind:prcpnm"/>
  109. <Cell col="3" displaytype="date" edittype="date" text="bind:valifromdd" editautoselect="true" editautoskip="true"/>
  110. <Cell col="4" displaytype="date" edittype="date" text="bind:valitodd" editautoselect="true" editautoskip="true"/>
  111. </Band>
  112. </Format>
  113. </Formats>
  114. </Grid>
  115. </Layout>
  116. </Layouts>
  117. </Div>
  118. </Layout>
  119. </Layouts>
  120. <Objects>
  121. <Dataset id="ds_send_reqdata" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  122. <ColumnInfo>
  123. <Column id="hardcdlist" type="STRING" size="256"/>
  124. <Column id="prcpcd" type="STRING" size="256"/>
  125. </ColumnInfo>
  126. <Rows>
  127. <Row>
  128. <Col id="hardcdlist">236,237,238,257,258,259,286,417</Col>
  129. </Row>
  130. </Rows>
  131. </Dataset>
  132. <Dataset id="ds_speclist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  133. <ColumnInfo>
  134. <Column id="hardcdno" type="STRING" size="256" sumtext="hardcdno"/>
  135. <Column id="hardcdnm" type="STRING" size="256" sumtext="hardcdnm"/>
  136. </ColumnInfo>
  137. </Dataset>
  138. <Dataset id="ds_send_savedata1" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  139. <ColumnInfo>
  140. <Column id="hardcdno" type="STRING" size="256" sumtext="hardcdno"/>
  141. <Column id="hardcdnm" type="STRING" size="256" sumtext="hardcdnm"/>
  142. </ColumnInfo>
  143. </Dataset>
  144. <Dataset id="ds_cond" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  145. <ColumnInfo>
  146. <Column id="hardcdno" type="STRING" size="256"/>
  147. <Column id="hardcdnm" type="STRING" size="256"/>
  148. </ColumnInfo>
  149. <Rows>
  150. <Row/>
  151. </Rows>
  152. </Dataset>
  153. <Dataset id="ds_specdetllist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  154. <ColumnInfo>
  155. <Column id="status" type="STRING" size="256" sumtext="status"/>
  156. <Column id="hardcd" type="STRING" size="256" sumtext="hardcd"/>
  157. <Column id="cdseqno" type="STRING" size="256" sumtext="cdseqno"/>
  158. <Column id="trgtcd" type="STRING" size="256" sumtext="trgtcd"/>
  159. <Column id="trgtcdnm" type="STRING" size="256" sumtext="trgtcdnm"/>
  160. <Column id="valifromdd" type="STRING" size="256" sumtext="유효시작일자"/>
  161. <Column id="valitodd" type="STRING" size="256" sumtext="유효종료일자"/>
  162. </ColumnInfo>
  163. </Dataset>
  164. <Dataset id="ds_limantibiodruglist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  165. <ColumnInfo>
  166. <Column id="chkflag" type="STRING" size="256" sumtext="체크여부"/>
  167. <Column id="prcpnm" type="STRING" size="256" sumtext="처방명"/>
  168. <Column id="prcpcd" type="STRING" size="256" sumtext="처방코드"/>
  169. <Column id="dgflag" type="STRING" size="256" sumtext="차수구분"/>
  170. <Column id="valifromdd" type="STRING" size="256" sumtext="유효시작일자"/>
  171. <Column id="valitodd" type="STRING" size="256" sumtext="유효종료일자"/>
  172. </ColumnInfo>
  173. </Dataset>
  174. <Dataset id="ds_send_savedata2" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  175. <ColumnInfo>
  176. <Column id="status" type="STRING" size="256" sumtext="status"/>
  177. <Column id="hardcd" type="STRING" size="256" sumtext="hardcd"/>
  178. <Column id="cdseqno" type="STRING" size="256" sumtext="cdseqno"/>
  179. <Column id="trgtcd" type="STRING" size="256" sumtext="trgtcd"/>
  180. <Column id="trgtcdnm" type="STRING" size="256" sumtext="trgtcdnm"/>
  181. <Column id="valifromdd" type="STRING" size="256" sumtext="유효시작일자"/>
  182. <Column id="valitodd" type="STRING" size="256" sumtext="유효종료일자"/>
  183. </ColumnInfo>
  184. </Dataset>
  185. </Objects>
  186. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  187. * System Name :
  188. * Job Name :
  189. * Creator :
  190. * Make Date : 2014-12-10
  191. * Description :
  192. *---------------------------------------------------------------------------------------
  193. * Modify Date Modifier Modify Description
  194. *---------------------------------------------------------------------------------------
  195. * 2014-12-10 Live Converter TF->XP
  196. *
  197. *---------------------------------------------------------------------------------------
  198. ****************************************************************************************/
  199. include "com_commonxp::comm_main.xjs";
  200. include "emr_prcpmngtxp::MMO001.xjs";
  201. var selectedRow = -1;
  202. function SPMMO33100_oninit(obj:Form, e:InitEventInfo)
  203. {
  204. frmf_initForm(obj);
  205. }
  206. function SPMMO33100_onload(obj:Form, e:LoadEventInfo)
  207. {
  208. grdf_setRowTypeIcon(grd_hardcodespecdetl, 0);
  209. grdf_setRowTypeIcon(grp_limantibioapplist.grd_limantibioapplist, 0);
  210. var sUserId = sysf_getUserInfo ( "userid" );
  211. if(lf_ContainsHardCD("286", sUserId)) {
  212. button7.enable = true;
  213. button8.enable = true;
  214. button9.enable = true;
  215. } else {
  216. button7.enable = false;
  217. button8.enable = false;
  218. button9.enable = false;
  219. }
  220. //제한항생제 조건 리스트 조회
  221. var oParam = {};
  222. oParam.id = "TRMMO33101";
  223. oParam.service = "prcpmngtapp.LimAntibioMngt";
  224. oParam.method = "reqGetLimAntiBioCondList";
  225. oParam.inds = "req=ds_send_reqdata";
  226. oParam.outds = "ds_speclist=speclist";
  227. oParam.async = true;
  228. oParam.callback = "cf_TRMMO33101";
  229. tranf_submit(oParam);
  230. }
  231. function cf_TRMMO33101(sSvcId, nErrorCode, sErrorMsg) {
  232. if(nErrorCode < 0) return;
  233. ds_speclist.rowposition = -1;
  234. }
  235. function button3_onclick(obj:Button, e:ClickEventInfo)
  236. {
  237. ds_send_savedata1.copyData(ds_speclist);
  238. var oParam = {};
  239. oParam.id = "TXMMO33101";
  240. oParam.service = "prcpmngtapp.LimAntibioMngt";
  241. oParam.method = "reqExeLimAntiBioCondList";
  242. oParam.inds = "req=ds_send_reqdata savedata=ds_send_savedata1";
  243. oParam.outds = "ds_speclist=speclist";
  244. oParam.async = false;
  245. tranf_submit(oParam);
  246. ds_speclist.rowposition = -1;
  247. }
  248. function grd_hardcodespec_oncellclick(obj:Grid, e:GridClickEventInfo)
  249. {
  250. //그리드 row선택시 row외 다른곳 선택시 error메세지
  251. if(e.row < 0 || e.col < 0) return;
  252. //코드값을 가지고 가기위해
  253. ds_cond.setColumn(0, "hardcdno", ds_speclist.getColumn(e.row, "hardcdno"));
  254. ds_cond.setColumn(0, "hardcdnm", ds_speclist.getColumn(e.row, "hardcdnm"));
  255. //상세내역을 알기 위해 하드코드 값을 가지고 상세내역 조회
  256. var oParam = {};
  257. oParam.id = "TRMMO33102";
  258. oParam.service = "prcpmngtapp.LimAntibioMngt";
  259. oParam.method = "reqGetLimAntiBioCondInfo";
  260. oParam.inds = "req=ds_cond";
  261. oParam.outds = "ds_specdetllist=specdetllist";
  262. oParam.async = true;
  263. oParam.callback = "cf_TRMMO33102";
  264. tranf_submit(oParam);
  265. }
  266. function cf_TRMMO33102(sSvcId, nErrorCode, sErrorMsg) {
  267. if(nErrorCode < 0) return;
  268. ds_specdetllist.rowposition = -1;
  269. }
  270. function grd_hardcodespecdetl_onexpandup(obj:Grid, e:GridMouseEventInfo)
  271. {
  272. if(e.row < 0 || e.col < 0) return;
  273. //위치 지정
  274. var arrCellRect = grd_hardcodespecdetl.getCellRect(e.row, e.col);
  275. var tPos = grd_hardcodespecdetl.position.y + arrCellRect.bottom + 13;
  276. if(tPos + grp_limantibioapplist.position.height > grd_hardcodespecdetl.position.bottom) tPos = tPos - (grp_limantibioapplist.position.height + 51);
  277. grp_limantibioapplist.position.y = tPos;
  278. //내용검색
  279. ds_send_reqdata.setColumn(0, "prcpcd", ds_specdetllist.getColumn(e.row, "trgtcd"));
  280. var oParam = {};
  281. oParam.id = "TRMMD08701";
  282. oParam.service = "prcpmngtapp.LimAntibioMngt";
  283. oParam.method = "reqGetLimAntibioMasterPrcpList";
  284. oParam.inds = "req=ds_send_reqdata";
  285. oParam.outds = "ds_limantibiodruglist=limantibiodruglist";
  286. oParam.async = true;
  287. oParam.callback = "cf_TRMMD08701";
  288. tranf_submit(oParam);
  289. }
  290. function cf_TRMMD08701(sSvcId, nErrorCode, sErrorMsg) {
  291. grp_limantibioapplist.visible = true;
  292. selectedRow = ds_specdetllist.rowposition;
  293. }
  294. function grp_limantibioapplist_grd_limantibioapplist_oncelldblclick(obj:Grid, e:GridClickEventInfo)
  295. {
  296. if(e.row < 0 || e.col < 0) return;
  297. ds_specdetllist.setColumn(selectedRow, "trgtcd", ds_limantibiodruglist.getColumn(e.row, "prcpcd"));
  298. ds_specdetllist.setColumn(selectedRow, "trgtcdnm", ds_limantibiodruglist.getColumn(e.row, "prcpnm"));
  299. grp_limantibioapplist.visible = false;
  300. selectedRow = -1;
  301. }
  302. function grp_limantibioapplist_btn_grdhidden_onclick(obj:Button, e:ClickEventInfo)
  303. {
  304. grp_limantibioapplist.visible = false;
  305. selectedRow = -1;
  306. }
  307. function button7_onclick(obj:Button, e:ClickEventInfo)
  308. {
  309. var cRow = ds_speclist.rowposition;
  310. if( cRow < 0 ){
  311. alert("제한항생제 조건을 선택해주십시오.");
  312. return;
  313. }
  314. var iRow = ds_specdetllist.addRow();
  315. ds_specdetllist.setColumn(iRow, "status", "I");
  316. ds_specdetllist.setColumn(iRow, "hardcd", ds_speclist.getColumn(cRow, "hardcdno"));
  317. ds_specdetllist.setColumn(iRow, "valifromdd", utlf_getCurrentDate());
  318. ds_specdetllist.setColumn(iRow, "valitodd", "99991231");
  319. }
  320. function button8_onclick(obj:Button, e:ClickEventInfo)
  321. {
  322. var iRow = ds_specdetllist.rowposition;
  323. if( iRow < 0 ){
  324. alert("삭제할 제한항생제 처방을 선택해주십시오.");
  325. return;
  326. }
  327. var status = ds_specdetllist.getColumn(iRow, "status");
  328. if( status == "I" ){
  329. ds_specdetllist.deleteRow(iRow);
  330. }else if( status == "D" ){
  331. ds_specdetllist.setColumn(iRow, "status", "-");
  332. var arrPostion = new Array();
  333. arrPostion[0] = iRow;
  334. grdf_setStatus(grd_hardcodespecdetl, "", arrPostion);
  335. }else{
  336. ds_specdetllist.setColumn(iRow, "status", "D");
  337. var arrPostion = new Array();
  338. arrPostion[0] = iRow;
  339. grdf_setStatus(grd_hardcodespecdetl, "D", arrPostion);
  340. }
  341. }
  342. function button9_onclick(obj:Button, e:ClickEventInfo)
  343. {
  344. if( ds_specdetllist.getCaseCount("status != '-'") > 0 ){
  345. if( ds_specdetllist.getCaseCount("trgtcd == ''") > 0 ){
  346. alert("처방코드가 누락되었습니다.");
  347. return;
  348. }else if( ds_specdetllist.getCaseCount("status != 'D' && trgtcdnm == ''") > 0 ){
  349. alert("처방명칭이 누락되었습니다.");
  350. return;
  351. }else if( ds_specdetllist.getCaseCount("status != 'D' && valifromdd == ''") > 0 ){
  352. alert("시작일자가 누락되었습니다.");
  353. return;
  354. }else if( ds_specdetllist.getCaseCount("status != 'D' && valitodd == ''") > 0 ){
  355. alert("종료일자가 누락되었습니다.");
  356. return;
  357. }
  358. var cRow = ds_speclist.rowposition;
  359. ds_send_savedata1.clearData();
  360. ds_send_savedata1.addRow();
  361. ds_send_savedata1.copyRow(0, ds_speclist, cRow);
  362. ds_send_savedata2.copyData(ds_specdetllist, true);
  363. var oParam = {};
  364. oParam.id = "TXMMO33102";
  365. oParam.service = "prcpmngtapp.LimAntibioMngt";
  366. oParam.method = "reqExeLimAntiBioCondInfo";
  367. oParam.inds = "req=ds_send_savedata1 savedata=ds_send_savedata2";
  368. oParam.outds = "ds_specdetllist=specdetllist";
  369. oParam.async = false;
  370. tranf_submit(oParam);
  371. ds_specdetllist.rowposition = -1;
  372. }
  373. }
  374. function btn_excel_onclick(obj:Button, e:ClickEventInfo)
  375. {
  376. var cRow = ds_speclist.rowposition;
  377. if( cRow < 0 ){
  378. alert("제한항생제 조건을 선택해주십시오.");
  379. return;
  380. }
  381. var SheetName = "제한항생제 조건코드 " + ds_speclist.getColumn(cRow, "hardcdno");
  382. grdf_exportExcel(grd_hardcodespecdetl, SheetName, SheetName);
  383. }
  384. function grd_hardcodespec_onenterdown(obj:Grid, e:GridEditEventInfo)
  385. {
  386. obj.showEditor(false);
  387. }
  388. function grd_hardcodespecdetl_onenterdown(obj:Grid, e:GridEditEventInfo)
  389. {
  390. obj.showEditor(false);
  391. }
  392. function grd_hardcodespecdetl_oncloseup(obj:Grid, e:GridEditEventInfo)
  393. {
  394. obj.showEditor(false);
  395. }
  396. function grp_limantibioapplist_grd_limantibioapplist_onenterdown(obj:Grid, e:GridEditEventInfo)
  397. {
  398. obj.showEditor(false);
  399. }
  400. function grp_limantibioapplist_grd_limantibioapplist_oncloseup(obj:Grid, e:GridEditEventInfo)
  401. {
  402. obj.showEditor(false);
  403. }
  404. ]]></Script>
  405. </Form>
  406. </FDL>