SMLLF01900_처방표시그룹관리.xrw 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * 제 목 : SMLLF01900_처방표시그룹관리.xrw
  4. * 설 명 : 처방표시그룹관리
  5. * 설 계 자 : (주)에이씨케이 - 윤재한
  6. * 작 성 자 : (주)에이씨케이 -
  7. * 작 성 일 : 2007.09.06
  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>
  18. <main>
  19. <getdiagtestprcpcls>
  20. <prcpgrupnm/>
  21. <prcpgrupcd/>
  22. <seq/>
  23. </getdiagtestprcpcls>
  24. <getchoitestcd>
  25. <mdlnm/>
  26. <tclscd/>
  27. <tclsnm/>
  28. <tclskind/>
  29. <ordinptflag/>
  30. <prcppossyn/>
  31. <seq/>
  32. </getchoitestcd>
  33. <gettestcd>
  34. <chk/>
  35. <mdlnm/>
  36. <tclscd/>
  37. <tclsnm/>
  38. <tclskind/>
  39. <ordinptflag/>
  40. <prcppossyn/>
  41. <seq/>
  42. </gettestcd>
  43. </main>
  44. <send>
  45. <codeflag/>
  46. <userdeptflagcd/>
  47. <lrgcd/>
  48. <mdlcd/>
  49. <refflag/>
  50. <prcpgrupcd/>
  51. <testdata/>
  52. <diagdata/>
  53. </send>
  54. <init>
  55. </init>
  56. <hidden>
  57. <ref>
  58. <lrgcd/>
  59. <mdlcd>
  60. <cd/>
  61. <nm/>
  62. </mdlcd>
  63. </ref>
  64. <getchoitestcd/>
  65. <getdiagtestprcpcls/>
  66. </hidden>
  67. </root>
  68. </instance>
  69. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  70. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  71. <script type="javascript" ev:event="xforms-model-construct-done">
  72. <![CDATA[
  73. fSetInit();
  74. ]]>
  75. </script>
  76. <submission id="TRLZZ00101" ref="/root/send/codeflag" method="post" mediatype="application/x-www-form-urlencoded" replace="instance" resultref="/root/LB"/>
  77. <submission id="TRLLF01901" ref="/root/send" method="post" mediatype="application/x-www-form-urlencoded" replace="instance" resultref="/root/main/getdiagtestprcpcls"/>
  78. <submission id="TRLLF01902" ref="/root/send" method="post" mediatype="application/x-www-form-urlencoded" replace="instance" resultref="/root/main/gettestcd"/>
  79. <submission id="TRLLF01903" ref="/root/send" method="post" mediatype="application/x-www-form-urlencoded" replace="instance" resultref="/root/main/getchoitestcd"/>
  80. <submission id="TXLLF01901" ref="/root/send" method="post" mediatype="application/x-www-form-urlencoded" replace="instance"/>
  81. </model>
  82. <script type="javascript">
  83. <![CDATA[
  84. function fSetInit() {
  85. model.setValue("/root/hidden/ref/lrgcd", "00");
  86. model.setValue("/root/hidden/ref/mdlcd/cd", "00");
  87. model.setValue("/root/send/codeflag", "0104|0102|0000|");
  88. submit("TRLZZ00101");
  89. model.removeNodeset("/root/main/getdiagtestprcpcls");
  90. model.removeNodeset("/root/main/getchoitestcd");
  91. model.removeNodeset("/root/main/gettestcd");
  92. fGetTestCd();
  93. grd_testcd.fixedcellcheckbox(0, 1) = true;
  94. model.refresh();
  95. }
  96. //대분류에 따른 중분류
  97. function fSetLrgCd(){
  98. var etc = model.getvalue("/root/hidden/ref/lrgcd");
  99. if(etc == "00"){
  100. cmb_mdlcd.choices.itemset.attribute("nodeset") = "/root/init/LB0102";
  101. model.setValue("/root/hidden/ref/mdlcd/cd" , "00");
  102. }
  103. else{
  104. model.setValue("/root/hidden/ref/mdlcd/cd" , "00");
  105. cmb_mdlcd.choices.itemset.attribute("nodeset") = "/root/init/LB0102[cd= '00' or etc01='"+ etc +"']";
  106. }
  107. cmb_mdlcd.refresh();
  108. fGetTestCd();
  109. }
  110. //진단검사 리스트 조회
  111. function fGetDiagTestPrcpCls() {
  112. model.setValue("/root/send/userdeptflagcd", model.getValue("/root/init/LB0000/nm"));
  113. submit("TRLLF01901");
  114. model.refresh();
  115. }
  116. //검사코드 조회
  117. function fGetTestCd() {
  118. model.setValue("/root/send/lrgcd", model.getValue("/root/hidden/ref/lrgcd"));
  119. model.setValue("/root/send/mdlcd", model.getValue("/root/hidden/ref/mdlcd/cd"));
  120. model.setValue("/root/send/userdeptflagcd", model.getValue("/root/init/LB0000/nm"));
  121. submit("TRLLF01902");
  122. model.refresh();
  123. }
  124. //선책검사코드 조회
  125. function fGetChoiTestCd() {
  126. model.setValue("/root/send/prcpgrupcd", model.getValue("/root/main/getdiagtestprcpcls["+ grd_diagtestprcpcls.row +"]/prcpgrupcd"));
  127. model.setValue("/root/send/userdeptflagcd", model.getValue("/root/init/LB0000/nm"));
  128. submit("TRLLF01903");
  129. model.refresh();
  130. }
  131. //올리기
  132. function fUpDiagRow(){
  133. var num = grd_diagtestprcpcls.row;
  134. if(num == 1){
  135. alert("첫번째 행입니다.")
  136. } else{
  137. copyNodeType("/root/hidden/getdiagtestprcpcls", "/root/main/getdiagtestprcpcls["+ (num-1) +"]");
  138. model.setValue("/root/hidden/getdiagtestprcpcls/seq", model.getValue("/root/main/getdiagtestprcpcls["+ num +"]/seq")); //순서
  139. model.setValue("/root/main/getdiagtestprcpcls["+ num +"]/seq", model.getValue("/root/main/getdiagtestprcpcls["+ (num-1) +"]/seq"));
  140. copyNodeType("/root/main/getdiagtestprcpcls["+ (num-1) +"]", "/root/main/getdiagtestprcpcls["+ num +"]");
  141. copyNodeType("/root/main/getdiagtestprcpcls["+ num +"]", "/root/hidden/getdiagtestprcpcls");
  142. }
  143. model.refresh();
  144. grd_diagtestprcpcls.row = (num-1);
  145. }
  146. //내리기
  147. function fDownDiagRow(){
  148. var num = grd_diagtestprcpcls.row;
  149. if((num+1) == grd_diagtestprcpcls.rows){
  150. alert("마지막 행입니다.");
  151. }
  152. else{
  153. copyNodeType("/root/hidden/getdiagtestprcpcls", "/root/main/getdiagtestprcpcls["+ (num+1) +"]");
  154. model.setValue("/root/hidden/getdiagtestprcpcls/seq", model.getValue("/root/main/getdiagtestprcpcls["+ num +"]/seq"));//순서
  155. model.setValue("/root/main/getdiagtestprcpcls["+ num +"]/seq", model.getValue("/root/main/getdiagtestprcpcls["+ (num+1) +"]/seq"));
  156. copyNodeType("/root/main/getdiagtestprcpcls["+ (num+1) +"]", "/root/main/getdiagtestprcpcls["+ num +"]");
  157. copyNodeType("/root/main/getdiagtestprcpcls["+ num +"]", "/root/hidden/getdiagtestprcpcls");
  158. }
  159. model.refresh();
  160. grd_diagtestprcpcls.row = (num+1);
  161. }
  162. //올리기
  163. function fUpChoiRow(){
  164. var num = grd_choitestcd.row;
  165. if(num == 1){
  166. alert("첫번째 행입니다.")
  167. } else{
  168. copyNodeType("/root/hidden/getchoitestcd", "/root/main/getchoitestcd["+ (num-1) +"]");
  169. model.setValue("/root/hidden/getchoitestcd/seq", model.getValue("/root/main/getchoitestcd["+ num +"]/seq")); //순서
  170. model.setValue("/root/main/getchoitestcd["+ num +"]/seq", model.getValue("/root/main/getchoitestcd["+ (num-1) +"]/seq"));
  171. copyNodeType("/root/main/getchoitestcd["+ (num-1) +"]", "/root/main/getchoitestcd["+ num +"]");
  172. copyNodeType("/root/main/getchoitestcd["+ num +"]", "/root/hidden/getchoitestcd");
  173. }
  174. model.refresh();
  175. grd_choitestcd.row = (num-1);
  176. }
  177. //내리기
  178. function fDownChoiRow(){
  179. var num = grd_choitestcd.row;
  180. if((num+1) == grd_choitestcd.rows){
  181. alert("마지막 행입니다.");
  182. }
  183. else{
  184. copyNodeType("/root/hidden/getchoitestcd", "/root/main/getchoitestcd["+ (num+1) +"]");
  185. model.setValue("/root/hidden/getchoitestcd/seq", model.getValue("/root/main/getchoitestcd["+ num +"]/seq"));//순서
  186. model.setValue("/root/main/getchoitestcd["+ num +"]/seq", model.getValue("/root/main/getchoitestcd["+ (num+1) +"]/seq"));
  187. copyNodeType("/root/main/getchoitestcd["+ (num+1) +"]", "/root/main/getchoitestcd["+ num +"]");
  188. copyNodeType("/root/main/getchoitestcd["+ num +"]", "/root/hidden/getchoitestcd");
  189. }
  190. model.refresh();
  191. grd_choitestcd.row = (num+1);
  192. }
  193. //행삭제
  194. function fDelRow() {
  195. grd_choitestcd.deleteItem(grd_choitestcd.row);
  196. }
  197. //행추가
  198. function fAddRow() {
  199. grd_diagtestprcpcls.addItem();
  200. var one = model.getValue("/root/main/getdiagtestprcpcls[1]/prcpgrupcd");
  201. one = parseInt(one);
  202. var the = one;
  203. for(i = 1; i < grd_diagtestprcpcls.rows; i++) {
  204. var two = model.getValue("/root/main/getdiagtestprcpcls["+ i +"]/prcpgrupcd");
  205. two = parseInt(two);
  206. if(the < two) {
  207. the = two;
  208. }
  209. }
  210. var num = grd_diagtestprcpcls.row;
  211. var seq = model.getValue("/root/main/getdiagtestprcpcls["+ (num-1) +"]/seq");
  212. seq = parseInt(seq);
  213. model.setValue("/root/main/getdiagtestprcpcls["+ num +"]/prcpgrupcd", (the+1));
  214. model.setValue("/root/main/getdiagtestprcpcls["+ num +"]/seq", (seq + 1));
  215. }
  216. //선택검사코드로 옮기기
  217. function fDateMove() {
  218. var num = grd_choitestcd.rows;
  219. var seq = model.getValue("/root/main/getchoitestcd["+ (num-1) +"]/seq");
  220. for(i = 1; i < grd_testcd.rows; i++) {
  221. var find = grd_testcd.findRow("Y", i, 1, true, true);
  222. var testcd = model.getValue("/root/main/gettestcd["+ find +"]/tclscd");
  223. if(find < 0) {
  224. return;
  225. }
  226. if(grd_choitestcd.findRow(testcd, i, 2, true, true) > 0) {
  227. alert("이미 선택된 코드입니다.");
  228. }else {
  229. grd_choitestcd.addRow(false);
  230. model.makeNode("/root/main/getchoitestcd["+ num +"]");
  231. copyNodeType("/root/main/getchoitestcd["+ num +"]", "/root/main/gettestcd["+ find +"]");
  232. model.setValue("/root/main/getchoitestcd["+ num +"]/seq", ++seq);
  233. num++;
  234. model.refresh();
  235. }
  236. i = find;
  237. }
  238. }
  239. //저장
  240. function fSetDiagTestPrcpCls() {
  241. for(i = 1; i < grd_choitestcd.rows; i++) {
  242. grd_choitestcd.rowStatus(i) = 1;
  243. }
  244. for(i = 1; i < grd_diagtestprcpcls.rows; i++) {
  245. grd_diagtestprcpcls.rowStatus(i) = 1;
  246. }
  247. model.setValue("/root/send/testdata", getGridUpdateData(grd_choitestcd));
  248. model.setValue("/root/send/diagdata", getGridUpdateData(grd_diagtestprcpcls));
  249. model.setValue("/root/send/prcpgrupcd", model.getValue("/root/main/getdiagtestprcpcls["+ grd_diagtestprcpcls.row +"]/prcpgrupcd"));
  250. if(submit("TXLLF01901")) {
  251. model.removeNodeset("/root/main/getchoitestcd");
  252. }
  253. fGetDiagTestPrcpCls();
  254. model.refresh();
  255. }
  256. ]]>
  257. </script>
  258. </xhtml:head>
  259. <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  260. <group id="group3" scroll="auto" style="left:0px; top:40px; width:1195px; height:744px; ">
  261. <select1 id="cmb_lrgcd" ref="/root/hidden/ref/lrgcd" class="combo_s_essential" appearance="minimal" itemcount="10" style="left:868px; top:49px; width:162px; height:19px; ">
  262. <choices>
  263. <itemset nodeset="/root/init/LB0104">
  264. <label ref="nm"/>
  265. <value ref="cd"/>
  266. </itemset>
  267. </choices>
  268. <script type="javascript" ev:event="xforms-value-changed">
  269. <![CDATA[
  270. fSetLrgCd();
  271. ]]>
  272. </script>
  273. </select1>
  274. <select1 id="cmb_mdlcd" ref="/root/hidden/ref/mdlcd/cd" class="combo_s_essential" appearance="minimal" itemcount="10" style="left:1033px; top:49px; width:162px; height:19px; ">
  275. <choices>
  276. <itemset nodeset="/root/init/LB0102">
  277. <label ref="nm"/>
  278. <value ref="cd"/>
  279. </itemset>
  280. </choices>
  281. <script type="javascript" ev:event="xforms-value-changed">
  282. <![CDATA[
  283. fGetTestCd();
  284. ]]>
  285. </script>
  286. </select1>
  287. <line id="line1" class="line_1" style="x1:0px; y1:70px; x2:340px; y2:70px; "/>
  288. <caption id="caption1" class="tit_2" style="left:5px; top:55px; width:131px; height:14px; ">처방분류</caption>
  289. <caption id="caption3" class="tit_2" style="left:795px; top:55px; width:70px; height:14px; ">검사코드</caption>
  290. <line id="line2" class="line_1" style="x1:797px; y1:70px; x2:1195px; y2:70px; "/>
  291. <group id="group1" style="left:0px; top:10px; width:1195px; height:35px; ">
  292. <shape id="roundrect2" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1194px; height:35px; "/>
  293. <line id="line3" class="line_4" style="x1:1113px; y1:7px; x2:1113px; y2:29px; "/>
  294. <button id="btn_ref" class="btn1_letter2" style="left:1125px; top:7px; width:56px; height:22px; ">
  295. <caption>조회</caption>
  296. <script type="javascript" ev:event="DOMActivate">
  297. <![CDATA[
  298. fGetDiagTestPrcpCls();
  299. ]]>
  300. </script>
  301. </button>
  302. </group>
  303. <button id="rtn_delete" class="btn2_letter3" style="left:690px; top:49px; width:53px; height:19px; ">
  304. <caption>행삭제</caption>
  305. <script type="javascript" ev:event="DOMActivate">
  306. <![CDATA[
  307. fDelRow();
  308. ]]>
  309. </script>
  310. </button>
  311. <datagrid id="grd_diagtestprcpcls" nodeset="/root/main/getdiagtestprcpcls" caption="진단검사 처방분류^표시순서^prcpgrupcd" colwidth="261, 56, 0" dataheight="23" defaultrows="1" explorerbar="sortshow" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="23" rowsep="|" colsep="^" fixed.background-image="../../../com/commonweb/images/grid_bg.gif" style="left:0px; top:75px; width:340px; height:667px; ">
  312. <col ref="prcpgrupnm" type="input"/>
  313. <col ref="seq"/>
  314. <col ref="prcpgrupcd"/>
  315. <script type="javascript" ev:event="onclick">
  316. <![CDATA[
  317. fGetChoiTestCd();
  318. ]]>
  319. </script>
  320. <script type="javascript" ev:event="onaftersort">
  321. <![CDATA[
  322. grd_diagtestprcpcls.gridToInstance();
  323. ]]>
  324. </script>
  325. </datagrid>
  326. <button id="btn_choiup" class="icon_top" style="left:630px; top:49px; width:26px; height:19px; ">
  327. <caption/>
  328. <script type="javascript" ev:event="DOMActivate">
  329. <![CDATA[
  330. fUpChoiRow();
  331. ]]>
  332. </script>
  333. </button>
  334. <button id="btn_choidown" class="icon_bottom" style="left:660px; top:49px; width:26px; height:19px; ">
  335. <caption/>
  336. <script type="javascript" ev:event="DOMActivate">
  337. <![CDATA[
  338. fDownChoiRow();
  339. ]]>
  340. </script>
  341. </button>
  342. <button id="btn_move" class="icon_left" style="left:758px; top:380px; width:26px; height:19px; ">
  343. <caption/>
  344. <script type="javascript" ev:event="DOMActivate">
  345. <![CDATA[
  346. fDateMove();
  347. ]]>
  348. </script>
  349. </button>
  350. <datagrid id="grd_choitestcd" nodeset="/root/main/getchoitestcd" caption="중분류명^검사코드^검사명^표시순서^검사구분^수가처방가능여부^처방가능여부^seq" colwidth="83, 58, 177, 56, 69, 110, 79, 0" dataheight="23" defaultrows="1" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="23" rowsep="|" colsep="^" fixed.background-image="../../../com/commonweb/images/grid_bg.gif" style="left:345px; top:75px; width:398px; height:667px; text-align:center; ">
  351. <col ref="mdlnm"/>
  352. <col ref="tclscd"/>
  353. <col ref="tclsnm" style="text-align:left; "/>
  354. <col ref="seq"/>
  355. <col ref="tclskind"/>
  356. <col ref="ordinptflag"/>
  357. <col ref="prcppossyn"/>
  358. <col ref="seq"/>
  359. <script type="javascript" ev:event="onaftersort">
  360. <![CDATA[
  361. grd_choitestcd.gridToInstance();
  362. ]]>
  363. </script>
  364. </datagrid>
  365. <line id="line4" class="line_1" style="x1:345px; y1:70px; x2:743px; y2:70px; "/>
  366. <caption id="caption2" class="tit_2" style="left:345px; top:55px; width:131px; height:14px; ">선택검사코드</caption>
  367. <datagrid id="grd_testcd" nodeset="/root/main/gettestcd" caption="^중분류명^검사코드^검사명^검사구분^수가처방가능여부^처방가능여부" colwidth="30, 83, 58, 188, 69, 110, 79" dataheight="23" defaultrows="1" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="23" rowsep="|" colsep="^" fixed.background-image="../../../com/commonweb/images/grid_bg.gif" style="left:797px; top:75px; width:398px; height:667px; text-align:center; ">
  368. <col ref="chk" type="checkbox" checkvalue="Y,N"/>
  369. <col ref="mdlnm"/>
  370. <col ref="tclscd"/>
  371. <col ref="tclsnm" style="text-align:left; "/>
  372. <col ref="tclskind"/>
  373. <col ref="ordinptflag"/>
  374. <col ref="prcppossyn"/>
  375. <script type="javascript" ev:event="onaftersort">
  376. <![CDATA[
  377. grd_testcd.gridToInstance();
  378. ]]>
  379. </script>
  380. </datagrid>
  381. <button id="btn_diagdown" class="icon_bottom" style="left:258px; top:50px; width:26px; height:19px; ">
  382. <caption/>
  383. <script type="javascript" ev:event="DOMActivate">
  384. <![CDATA[
  385. fDownDiagRow();
  386. ]]>
  387. </script>
  388. </button>
  389. <button id="btn_diagup" class="icon_top" style="left:228px; top:50px; width:26px; height:19px; ">
  390. <caption/>
  391. <script type="javascript" ev:event="DOMActivate">
  392. <![CDATA[
  393. fUpDiagRow();
  394. ]]>
  395. </script>
  396. </button>
  397. <button id="button1" class="btn2_letter3" style="left:287px; top:50px; width:53px; height:19px; ">
  398. <caption>행추가</caption>
  399. <script type="javascript" ev:event="DOMActivate">
  400. <![CDATA[
  401. fAddRow();
  402. ]]>
  403. </script>
  404. </button>
  405. </group>
  406. <group id="group4" scroll="auto" style="left:0px; top:13px; width:1195px; height:27px; ">
  407. <button id="btn_init" class="btn4_letter3" style="left:1127px; top:3px; width:68px; height:22px; ">
  408. <caption>초기화</caption>
  409. <script type="javascript" ev:event="DOMActivate">
  410. <![CDATA[
  411. fSetInit();
  412. ]]>
  413. </script>
  414. </button>
  415. <button id="btn_save" class="btn4_letter2" style="left:1068px; top:3px; width:56px; height:22px; ">
  416. <caption>저장</caption>
  417. <script type="javascript" ev:event="DOMActivate">
  418. <![CDATA[
  419. fSetDiagTestPrcpCls();
  420. ]]>
  421. </script>
  422. </button>
  423. <line id="line17" class="line_6" style="x1:0px; y1:25px; x2:1194px; y2:25px; "/>
  424. </group>
  425. <group id="group2" style="left:0px; top:0px; width:1195px; height:13px; ">
  426. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:800px; height:14px; ">처방표시그룹관리</caption>
  427. </group>
  428. </xhtml:body>
  429. </xhtml:html>