SMMMB08400_진료공통코드관리.xrw 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
  3. <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">
  4. <xhtml:head>
  5. <xhtml:title>진료공통코드관리</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <mhrcd>
  11. <mhrcdlist>
  12. <levl/>
  13. <displaynm/>
  14. <hardcdno/>
  15. <hardcdnm/>
  16. <suphardcdno/>
  17. <rmk/>
  18. </mhrcdlist>
  19. </mhrcd>
  20. <hardcdinfo>
  21. <mhrcdinfo>
  22. <hardcdno/>
  23. <hardcdnm/>
  24. <suphardcdno/>
  25. <rmk/>
  26. <authtype/>
  27. <status/>
  28. </mhrcdinfo>
  29. </hardcdinfo>
  30. <dhrcd>
  31. <dhrcdlist>
  32. <hardcdno/>
  33. <cdseqno/>
  34. <trgtcd/>
  35. <trgtcdnm/>
  36. <valifromdd/>
  37. <valitodd/>
  38. <valifromdt/>
  39. <valitodt/>
  40. <hardspec/>
  41. <trgtcdsnm/>
  42. </dhrcdlist>
  43. </dhrcd>
  44. <ahrcd>
  45. <ahrcdlist>
  46. <hardcdno/>
  47. <authclscd/>
  48. <authtypecd/>
  49. <authtrgtcd/>
  50. <authtrgtnm/>
  51. </ahrcdlist>
  52. </ahrcd>
  53. <cond>
  54. <deptcd/>
  55. <userid/>
  56. <hardcdno/>
  57. <hardcdnm/>
  58. </cond>
  59. </main>
  60. <send>
  61. <reqdata/>
  62. <savedata>
  63. <dhrcdlist/>
  64. <ahrcdlist/>
  65. <mhrcdinfo/>
  66. </savedata>
  67. </send>
  68. <recv>
  69. </recv>
  70. <hidden>
  71. </hidden>
  72. <init/>
  73. </root>
  74. </instance>
  75. <script type="javascript" ev:event="xforms-ready">
  76. <![CDATA[
  77. fInitialize_SMMMB08400();
  78. ]]>
  79. </script>
  80. <submission id="TRMMB08401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/cond" resultref="/root/main/mhrcd"/>
  81. <submission id="TRMMB08402" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/main/recv"/>
  82. <submission id="TXMMB08401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/savedata" resultref="/root/temp"/>
  83. <submission id="TXMMB08402" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/savedata" resultref="/root/temp"/>
  84. <submission id="TXMMB08403" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/savedata" resultref="/root/temp"/>
  85. </model>
  86. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  87. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  88. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  89. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  90. <script type="javascript" src="../../../emr/prcpmngtweb/js/SMMMB08400.js"/>
  91. </xhtml:head>
  92. <xhtml:body pagewidth="1020" pageheight="720" guideline="1,495;1,500;1,1000;2,699;" style="margin-left:8; margin-right:8; ">
  93. <caption id="caption1" class="tit_1" style="left:0px; top:0px; width:140px; height:13px; ">진료 공통코드 관리</caption>
  94. <group id="grp_left" style="left:5px; top:20px; width:490px; height:680px; ">
  95. <caption id="caption6" class="tit_2" style="left:0px; top:5px; width:220px; height:15px; text-align:left; ">진료 공통코드 항목</caption>
  96. <line id="line2" class="line_1" style="x1:0px; y1:23px; x2:490px; y2:23px; "/>
  97. <shape id="roundrect2" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:28px; width:490px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
  98. <caption id="caption2" class="search_name" style="left:10px; top:35px; width:70px; height:17px; ">코드</caption>
  99. <input id="ipt_search_hardcdno" ref="/root/main/cond/hardcdno" class="input_search" style="left:71px; top:35px; width:79px; height:19px; ">
  100. <script type="javascript" ev:event="onkeypress">
  101. <![CDATA[
  102. inputEnterKey("btn_search_mhrcd", "DOMActivate");
  103. ]]>
  104. </script>
  105. </input>
  106. <caption id="caption9" class="search_name" style="left:170px; top:35px; width:70px; height:17px; ">코드명</caption>
  107. <input id="ipt_search_hardcdnm" ref="/root/main/cond/hardcdnm" class="input_search" imemode="hangul" style="left:240px; top:36px; width:160px; height:19px; ">
  108. <script type="javascript" ev:event="onkeypress">
  109. <![CDATA[
  110. inputEnterKey("btn_search_mhrcd", "DOMActivate");
  111. ]]>
  112. </script>
  113. </input>
  114. <line id="line1" style="x1:419px; y1:32px; x2:419px; y2:60px; border-color:#ffe4bb; border-left-style:solid; "/>
  115. <button id="btn_search_mhrcd" class="btn1_letter2" style="left:426px; top:34px; width:56px; height:22px; ">
  116. <caption>조회</caption>
  117. <script type="javascript" ev:event="DOMActivate">
  118. <![CDATA[
  119. fGetMhrcdList();
  120. ]]>
  121. </script>
  122. </button>
  123. <datagrid id="grd_mhrcdlist" nodeset="/root/main/mhrcd/mhrcdlist" autoresize="false" caption="level^코드번호-코드명^코드^코드명^상위코드" colwidth="0, 470, 0, 0, 0" dataheight="23" ellipsis="true" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheight="23" tooltip="true" style="left:0px; top:65px; width:490px; height:615px; ">
  124. <col ref="levl"/>
  125. <col ref="displaynm"/>
  126. <col ref="hardcdno" visibility="hidden"/>
  127. <col ref="hardcdnm" visibility="hidden"/>
  128. <col ref="suphardcdno" visibility="hidden"/>
  129. <script type="javascript" ev:event="onclick">
  130. <![CDATA[
  131. fSetHrcdInfo();
  132. ]]>
  133. </script>
  134. </datagrid>
  135. </group>
  136. <group id="grp_right_top" style="left:500px; top:20px; width:500px; height:140px; ">
  137. <caption id="caption3" class="tit_2" style="left:0px; top:5px; width:220px; height:13px; text-align:left; ">기본정보</caption>
  138. <line id="line5" class="line_1" style="x1:0px; y1:23px; x2:500px; y2:23px; "/>
  139. <button id="button1" class="btn2_letter2" style="left:304px; top:3px; width:42px; height:19px; ">
  140. <caption>삭제</caption>
  141. <script type="javascript" ev:event="DOMActivate">
  142. <![CDATA[
  143. var sHardCdNo = model.getValue("/root/main/hardcdinfo/mhrcdinfo/hardcdno");
  144. if(isNull(sHardCdNo)) {
  145. alert("선택 된 공통코드가 없습니다.");
  146. return;
  147. }
  148. var sStatus = model.getValue("/root/main/hardcdinfo/mhrcdinfo/status");
  149. if(sStatus == "u" || sStatus == "i" ) {
  150. alert("신규 또는 수정중인 코드는 삭제 할수 없습니다.");
  151. return;
  152. }
  153. var sAuthType = model.getValue("/root/main/hardcdinfo/mhrcdinfo/authtype");
  154. if(sAuthType == "A") {
  155. model.setValue("/root/main/hardcdinfo/mhrcdinfo/status", "d"); // 입력 설정
  156. fSaveMHrcdInfo();
  157. } else {
  158. alert("삭제 권한이 없습니다.");
  159. return;
  160. }
  161. ]]>
  162. </script>
  163. </button>
  164. <button id="button2" class="btn2_letter2" style="left:349px; top:3px; width:42px; height:19px; ">
  165. <caption>신규</caption>
  166. <script type="javascript" ev:event="DOMActivate">
  167. <![CDATA[
  168. var sStatus = model.getValue("/root/main/hardcdinfo/mhrcdinfo/status");
  169. if(sStatus == "u" || sStatus == "d" ) {
  170. alert("수정 또는 삭제 중인 코드는 신규입력 할수 없습니다.");
  171. return;
  172. }
  173. if(getUserInfo("userid") == "EMR") { // 일단 EMR 아이디로만 신규 등록 권한 부여
  174. model.resetInstanceNode("/root/main/hardcdinfo/mhrcdinfo");
  175. model.resetInstanceNode("/root/main/dhrcd/dhrcdlist");
  176. model.resetInstanceNode("/root/main/ahrcd/ahrcdlist");
  177. model.refresh();
  178. model.setValue("/root/main/hardcdinfo/mhrcdinfo/status", "i"); // 입력 설정
  179. model.setValue("/root/main/hardcdinfo/mhrcdinfo/authtype", "A"); // 저장 버튼을 사용할수 있도록 설정
  180. btn_SaveMhrcd.disabled = false; // 저장버튼 활성화
  181. ipt_hardcdno.disabled = false;
  182. ipt_hardcdnm.disabled = false;
  183. ipt_suphardcdno.disabled = false;
  184. txt_rmk.disabled = false;
  185. } else {
  186. alert("입력 권한이 없습니다.");
  187. return;
  188. }
  189. ]]>
  190. </script>
  191. </button>
  192. <button id="button7" class="btn2_letter2" style="left:394px; top:3px; width:42px; height:19px; ">
  193. <caption>수정</caption>
  194. <script type="javascript" ev:event="DOMActivate">
  195. <![CDATA[
  196. var sHardCdNo = model.getValue("/root/main/hardcdinfo/mhrcdinfo/hardcdno");
  197. if(isNull(sHardCdNo)) {
  198. alert("선택 된 공통코드가 없습니다.");
  199. return;
  200. }
  201. var sStatus = model.getValue("/root/main/hardcdinfo/mhrcdinfo/status");
  202. if(sStatus == "i" || sStatus == "d" ) {
  203. alert("신규 또는 삭제 중인 코드는 수정 할수 없습니다.");
  204. return;
  205. }
  206. var sAuthType = model.getValue("/root/main/hardcdinfo/mhrcdinfo/authtype");
  207. if(sAuthType == "A") {
  208. model.setValue("/root/main/hardcdinfo/mhrcdinfo/status", "u"); // 수정 설정
  209. ipt_hardcdno.disabled = true;
  210. ipt_hardcdnm.disabled = false;
  211. ipt_suphardcdno.disabled = false;
  212. txt_rmk.disabled = false;
  213. } else {
  214. alert("수정 권한이 없습니다.");
  215. return;
  216. }
  217. ]]>
  218. </script>
  219. </button>
  220. <button id="btn_SaveMhrcd" class="btn4_letter2" style="left:441px; top:0px; width:56px; height:22px; ">
  221. <caption>저장</caption>
  222. <script type="javascript" ev:event="DOMActivate">
  223. <![CDATA[
  224. var sAuthType = model.getValue("/root/main/hardcdinfo/mhrcdinfo/authtype");
  225. if(sAuthType == "A") {
  226. fSaveMHrcdInfo();
  227. } else {
  228. alert("저장 권한이 없습니다.");
  229. return;
  230. }
  231. ]]>
  232. </script>
  233. </button>
  234. <caption id="caption4" class="cell_1" style="left:0px; top:28px; width:55px; height:23px; vertical-align:middle; ">코드</caption>
  235. <input id="ipt_hardcdno" ref="/root/main/hardcdinfo/mhrcdinfo/hardcdno" class="input" imemode="disabled" style="left:57px; top:30px; width:203px; height:19px; "/>
  236. <caption id="caption10" class="cell_1" style="left:273px; top:28px; width:61px; height:23px; vertical-align:middle; ">상위코드</caption>
  237. <input id="ipt_suphardcdno" ref="/root/main/hardcdinfo/mhrcdinfo/suphardcdno" class="input" imemode="disabled" style="left:341px; top:30px; width:159px; height:19px; "/>
  238. <caption id="caption5" class="cell_1" style="left:0px; top:53px; width:55px; height:23px; vertical-align:middle; ">코드명</caption>
  239. <input id="ipt_hardcdnm" ref="/root/main/hardcdinfo/mhrcdinfo/hardcdnm" class="input" style="left:57px; top:55px; width:443px; height:19px; "/>
  240. <line id="line4" class="line_3" style="x1:0px; y1:137px; x2:500px; y2:137px; "/>
  241. <caption id="caption8" class="cell_1" style="left:0px; top:78px; width:55px; height:57px; vertical-align:middle; ">비고</caption>
  242. <textarea id="txt_rmk" ref="/root/main/hardcdinfo/mhrcdinfo/rmk" disabled="true" style="left:57px; top:80px; width:443px; height:55px; "/>
  243. </group>
  244. <group id="grp_right_middle" style="left:500px; top:160px; width:500px; height:180px; ">
  245. <caption id="caption7" class="tit_2" style="left:0px; top:5px; width:220px; height:13px; text-align:left; ">권한정보</caption>
  246. <line id="line3" class="line_1" style="x1:0px; y1:23px; x2:500px; y2:23px; "/>
  247. <button id="btn_SaveAhrcd" class="btn4_letter2" style="left:441px; top:0px; width:56px; height:22px; ">
  248. <caption>저장</caption>
  249. <script type="javascript" ev:event="DOMActivate">
  250. <![CDATA[
  251. var sAuthType = model.getValue("/root/main/hardcdinfo/mhrcdinfo/authtype");
  252. if(sAuthType == "A" || getUserInfo("userid") == "EMR") {
  253. fSaveAHrcdList();
  254. } else {
  255. alert("저장 권한이 없습니다.");
  256. return;
  257. }
  258. ]]>
  259. </script>
  260. </button>
  261. <button id="button5" class="btn2_letter2" style="left:394px; top:3px; width:42px; height:19px; ">
  262. <caption>삭제</caption>
  263. <script type="javascript" ev:event="DOMActivate">
  264. <![CDATA[
  265. var sHardCdNo = model.getValue("/root/main/hardcdinfo/mhrcdinfo/hardcdno");
  266. if(isNull(sHardCdNo)) {
  267. alert("선택 된 공통코드가 없습니다.");
  268. return;
  269. }
  270. var cur_row = grd_ahrcdlist.row; // 행 번호 가져오기
  271. var iStatus = grd_ahrcdlist.rowstatus(cur_row);
  272. if(cur_row<0) {
  273. alert("삭제할 조건행을 선택해주세요.");
  274. return;
  275. }
  276. if (iStatus == 1 || iStatus == 3) { // 새로 삽입된 행이면
  277. grd_ahrcdlist.deleteitem(cur_row);
  278. } else {
  279. grd_ahrcdlist.addStatus(grd_ahrcdlist.row,"delete");
  280. }
  281. ]]>
  282. </script>
  283. </button>
  284. <button id="button11" class="btn2_letter2" style="left:350px; top:3px; width:42px; height:19px; ">
  285. <caption>추가</caption>
  286. <script type="javascript" ev:event="DOMActivate">
  287. <![CDATA[
  288. var sHardCdNo = model.getValue("/root/main/hardcdinfo/mhrcdinfo/hardcdno");
  289. if(isNull(sHardCdNo)) {
  290. alert("선택 된 공통코드가 없습니다.");
  291. return;
  292. }
  293. grd_ahrcdlist.addItem();
  294. grd_ahrcdlist.editCell();
  295. var nRow = grd_ahrcdlist.row;
  296. model.setValue("/root/main/ahrcd/ahrcdlist["+nRow+"]/hardcdno", sHardCdNo);
  297. model.setValue("/root/main/ahrcd/ahrcdlist["+nRow+"]/authclscd", "P");
  298. model.setValue("/root/main/ahrcd/ahrcdlist["+nRow+"]/authtypecd", "R");
  299. ]]>
  300. </script>
  301. </button>
  302. <datagrid id="grd_ahrcdlist" nodeset="/root/main/ahrcd/ahrcdlist" caption="하드코드^구분^권한^부서코드/사번^부서명/사용자명" colsep="^" colwidth="0, 60, 60, 120, 215" ellipsis="true" explorerbar="sortshow" extendlastcol="noscroll" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" tooltip="true" style="left:0px; top:28px; width:500px; height:152px; ">
  303. <col ref="hardcdno" visibility="hidden"/>
  304. <col disabled="true" ref="authclscd" type="combo" style="text-align:center; ">
  305. <choices>
  306. <item>
  307. <label>사용자</label>
  308. <value>P</value>
  309. </item>
  310. <item>
  311. <label>부서</label>
  312. <value>D</value>
  313. </item>
  314. </choices>
  315. </col>
  316. <col ref="authtypecd" type="combo" style="text-align:center; ">
  317. <choices>
  318. <item>
  319. <label>관리</label>
  320. <value>A</value>
  321. </item>
  322. <item>
  323. <label>저장</label>
  324. <value>E</value>
  325. </item>
  326. <item>
  327. <label>조회</label>
  328. <value>R</value>
  329. </item>
  330. </choices>
  331. </col>
  332. <col disabled="true" ref="authtrgtcd" type="input" maxbyte="10" style="text-align:center; "/>
  333. <col disabled="true" ref="authtrgtnm"/>
  334. <script type="javascript" ev:event="onaftersort">
  335. <![CDATA[
  336. grd_ahrcdlist.gridToInstance();
  337. ]]>
  338. </script>
  339. </datagrid>
  340. </group>
  341. <group id="grp_right_bottom" style="left:500px; top:343px; width:500px; height:356px; ">
  342. <caption id="caption11" class="tit_2" style="left:0px; top:5px; width:220px; height:13px; text-align:left; ">상세코드 리스트</caption>
  343. <line id="line6" class="line_1" style="x1:0px; y1:23px; x2:500px; y2:23px; "/>
  344. <button id="btn_SaveDhrcd" class="btn4_letter2" style="left:441px; top:0px; width:56px; height:22px; ">
  345. <caption>저장</caption>
  346. <script type="javascript" ev:event="DOMActivate">
  347. <![CDATA[
  348. var sAuthType = model.getValue("/root/main/hardcdinfo/mhrcdinfo/authtype");
  349. if(sAuthType == "A" || sAuthType == "E") {
  350. fSaveDHrcdList();
  351. } else {
  352. alert("저장 권한이 없습니다.");
  353. return;
  354. }
  355. ]]>
  356. </script>
  357. </button>
  358. <button id="button8" class="btn2_letter2" style="left:349px; top:3px; width:42px; height:19px; ">
  359. <caption>추가</caption>
  360. <script type="javascript" ev:event="DOMActivate">
  361. <![CDATA[
  362. var sHardCdNo = model.getValue("/root/main/hardcdinfo/mhrcdinfo/hardcdno");
  363. if(isNull(sHardCdNo)) {
  364. alert("선택 된 공통코드가 없습니다.");
  365. return;
  366. }
  367. grd_dhrcdlist.addItem();
  368. grd_dhrcdlist.editCell();
  369. var nRow = grd_dhrcdlist.row;
  370. model.setValue("/root/main/dhrcd/dhrcdlist["+nRow+"]/hardcdno", sHardCdNo);
  371. model.setValue("/root/main/dhrcd/dhrcdlist["+nRow+"]/valifromdd", getCurrentDate());
  372. model.setValue("/root/main/dhrcd/dhrcdlist["+nRow+"]/valitodd", "99991231");
  373. ]]>
  374. </script>
  375. </button>
  376. <button id="button9" class="btn2_letter2" style="left:393px; top:3px; width:42px; height:19px; ">
  377. <caption>삭제</caption>
  378. <script type="javascript" ev:event="DOMActivate">
  379. <![CDATA[
  380. var sHardCdNo = model.getValue("/root/main/hardcdinfo/mhrcdinfo/hardcdno");
  381. if(isNull(sHardCdNo)) {
  382. alert("선택 된 공통코드가 없습니다.");
  383. return;
  384. }
  385. var cur_row = grd_dhrcdlist.row; // 행 번호 가져오기
  386. var iStatus = grd_dhrcdlist.rowstatus(cur_row);
  387. if(cur_row<0) {
  388. alert("삭제할 조건행을 선택해주세요.");
  389. return;
  390. }
  391. if (iStatus == 1 || iStatus == 3) { // 새로 삽입된 행이면
  392. grd_dhrcdlist.deleteitem(cur_row);
  393. } else {
  394. grd_dhrcdlist.addStatus(grd_dhrcdlist.row,"delete");
  395. }
  396. ]]>
  397. </script>
  398. </button>
  399. <datagrid id="grd_dhrcdlist" nodeset="/root/main/dhrcd/dhrcdlist" autoresize="true" caption="하드코드^순번^코드^코드명^시작일자^종료일자^적용시작일시^적용종료일시^코드설명^코드별칭" colsep="^" colwidth="0, 30, 80, 180, 85, 85 ,100 ,100 ,200, 200" ellipsis="true" explorerbar="sortshow" extendlastcol="false" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" tooltip="true" style="left:0px; top:28px; width:500px; height:327px; ">
  400. <col ref="hardcdno" visibility="hidden"/>
  401. <col disabled="true" ref="cdseqno" type="input" format="#####" maxlength="5" style="text-align:center; "/>
  402. <col disabled="true" ref="trgtcd" type="input" maxbyte="20" style="text-align:center; "/>
  403. <col ref="trgtcdnm" type="input" maxbyte="4000"/>
  404. <col ref="valifromdd" type="inputdate" format="yyyy-mm-dd"/>
  405. <col ref="valitodd" type="inputdate" format="yyyy-mm-dd"/>
  406. <col ref="valifromdt" type="input" maxbyte="14" style="text-align:center; "/>
  407. <col ref="valitodt" type="input" maxbyte="14" style="text-align:center; "/>
  408. <col ref="hardspec" type="input" maxbyte="4000" style="text-align:center; "/>
  409. <col ref="trgtcdsnm" type="input" maxbyte="1000" style="text-align:center; "/>
  410. <script type="javascript" ev:event="onaftersort">
  411. <![CDATA[
  412. grd_dhrcdlist.gridToInstance();
  413. ]]>
  414. </script>
  415. </datagrid>
  416. </group>
  417. </xhtml:body>
  418. </xhtml:html>