SMPIB02600_평가관련기준등록관리.xrw 52 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261
  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. <list1>
  11. <listautd/>
  12. </list1>
  13. <list2>
  14. <listmech/>
  15. <listdiag/>
  16. </list2>
  17. </main>
  18. <send>
  19. <testgrup/>
  20. <testgrupnm/>
  21. <orddeptcd/>
  22. <edicd/>
  23. <diagcd/>
  24. <minage/>
  25. <maxage/>
  26. <sex>A</sex>
  27. <useyn/>
  28. <inpath/>
  29. <updatedata>
  30. <gruplist/>
  31. <mechlist/>
  32. <diaglist/>
  33. <seldeptlist/>
  34. </updatedata>
  35. <item2>
  36. <grdsrchnm>
  37. <iptsearch/>
  38. <searchkind/>
  39. </grdsrchnm>
  40. </item2>
  41. <item3>
  42. <srchdiag>
  43. <basedd/>
  44. <diagcd/>
  45. <diagnm/>
  46. <selectedrdodiagkind/>
  47. </srchdiag>
  48. </item3>
  49. </send>
  50. <send2>
  51. <testgrup/>
  52. <orddeptcd/>
  53. </send2>
  54. <hidden>
  55. <sppiz00400>
  56. <rslt>
  57. <diagcd/>
  58. <diaghngnm/>
  59. <diagengnm/>
  60. </rslt>
  61. </sppiz00400>
  62. <mode/>
  63. <smpic00200>
  64. <cond>
  65. <calcnm/>
  66. </cond>
  67. </smpic00200>
  68. <seldeptlist>
  69. <selyn/>
  70. <deptcd/>
  71. <deptnm/>
  72. <oldselyn/>
  73. </seldeptlist>
  74. <seldeptbase>
  75. <testgrup/>
  76. <testgrupnm/>
  77. <orddeptcd/>
  78. </seldeptbase>
  79. </hidden>
  80. <init>
  81. <orddeptcd>
  82. <orddeptcdlist>
  83. <nm>전체</nm>
  84. <cd>-</cd>
  85. </orddeptcdlist>
  86. </orddeptcd>
  87. <P0002list>
  88. <P0002>
  89. <cdnm/>
  90. <cdid/>
  91. </P0002>
  92. </P0002list>
  93. <P0391list>
  94. <P0391>
  95. <cdnm/>
  96. <cdid/>
  97. </P0391>
  98. </P0391list>
  99. </init>
  100. <temp>
  101. <calcdiagnm>
  102. <hngnm/>
  103. </calcdiagnm>
  104. <picmmech>
  105. <picmmech_edicd/>
  106. <picmmech_hngnm/>
  107. </picmmech>
  108. </temp>
  109. <maxgrup>
  110. <maxno>
  111. <maxtestgrup/>
  112. </maxno>
  113. </maxgrup>
  114. </root>
  115. </instance>
  116. <submission id="TRZBC00101" mediatype="application/x-www-form-urlencoded" method="post" replace="instance"/>
  117. <submission id="TRZBC00102" mediatype="application/x-www-form-urlencoded" method="post" replace="instance"/>
  118. <submission id="TRPAM00101" mediatype="application/x-www-form-urlencoded" method="post" replace="instance" resultref="/root/hidden/tmp"/>
  119. <submission id="TRPIB02601" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/list1"/>
  120. <submission id="TRPIB02602" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send2" resultref="/root/main/list2"/>
  121. <submission id="TXPIB02601" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/updatedata" resultref="/root/result"/>
  122. <submission id="TRPIB00202" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/item2/grdsrchnm" resultref="/root/temp"/>
  123. <submission id="TRPIB02603" mediatype="application/x-www-form-urlencoded" method="post" resultref="/root/maxgrup"/>
  124. <submission id="TXPIB02602" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/updatedata" replace="instance" resultref="/root/result"/>
  125. </model>
  126. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  127. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  128. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  129. <script type="javascript" src="../../../pam/pamcomnweb/js/PAM.js"/>
  130. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  131. <script type="javascript" ev:event="xforms-ready">
  132. <![CDATA[
  133. zbcfGetCodeList(new Array("P0002", "P0391"), new Array("/root/init/P0002list", "/root/init/P0391list"), false);
  134. fInitialize();
  135. ]]>
  136. </script>
  137. <script type="javascript">
  138. <![CDATA[
  139. function fInitialize() {
  140. // grid를 인스턴스에 mapping후 인스턴스에 해당하는 빈줄 1줄이 생기므로 grid 초기화
  141. model.removeNodeset("/root/main/list1/listautd");
  142. model.removeNodeset("/root/main/list2/listmech");
  143. model.removeNodeset("/root/main/list2/listdiag");
  144. // (PAM.js) submission id="TRPAM00101" 를 사용하여 Combo item을 가져온다.
  145. pamGetDeptCDDrIDList();
  146. model.makeValue("/root/hidden/orddeptcd/orddeptcdlist/cd","-");
  147. model.makeValue("/root/hidden/orddeptcd/orddeptcdlist/nm","전체");
  148. model.makeValue("/root/hidden/orddeptcd/orddeptcdlist/deptengabbgr","-");
  149. model.makeValue("/root/hidden/orddeptcd/orddeptcdlist/reqdeptno","-");
  150. copyNodeType("/root/init/orddeptcd","/root/hidden/orddeptcd","before");
  151. model.makeValue("/root/hidden/orddeptcd/orddeptcdlist/cd","");
  152. model.makeValue("/root/hidden/orddeptcd/orddeptcdlist/nm","");
  153. model.makeValue("/root/hidden/orddeptcd/orddeptcdlist/deptengabbgr","-");
  154. model.makeValue("/root/hidden/orddeptcd/orddeptcdlist/reqdeptno","-");
  155. copyNodeType("/root/init/orddeptcd","/root/hidden/orddeptcd","before");
  156. cmb_orddeptcd.refresh();
  157. // 김용민 지저분해서 삭제
  158. model.removeNodeset("/root/init/orddrid");
  159. model.removeNodeset("/root/init/centcd");
  160. model.removeNodeset("/root/init/subdeptcd");
  161. // 김용민 추가 - 과별 선택기능을 위한 진료과 리스트 작업
  162. model.removeNodeset("/root/hidden/seldeptlist");
  163. for( i = 1; i <= model.getXPathValue( "count(/root/init/orddeptcd/orddeptcdlist)" ) ; i++ ) {
  164. model.makeNode("root/hidden/seldeptlist[" + i + "]/selyn");
  165. model.makeNode("root/hidden/seldeptlist[" + i + "]/deptcd");
  166. model.makeNode("root/hidden/seldeptlist[" + i + "]/deptnm");
  167. model.makeNode("root/hidden/seldeptlist[" + i + "]/oldselyn");
  168. model.setValue("/root/hidden/seldeptlist[" + i + "]/deptcd", model.getValue("/root/init/orddeptcd/orddeptcdlist[" + i + "]/cd") );
  169. model.setValue("/root/hidden/seldeptlist[" + i + "]/deptnm", model.getValue("/root/init/orddeptcd/orddeptcdlist[" + i + "]/nm") );
  170. }
  171. }
  172. // 처방이나 상병코드로 명칭을 검색 결과가 단일일때 명칭을 표기 아닐경우는 상병조회,수가조회 팝업과 연동
  173. function fSearchNm(mode) {
  174. var srchkind = model.getValue("/root/send/searchkind");
  175. var hngnm = model.getValue("/root/temp/calcdiagnm/hngnm");
  176. var calc_col = grd_tstdiagrgst.colRef("calcscorcd");
  177. var frd_col = grd_tstdiagrgst.colRef("diagcd");
  178. model.resetInstanceNode("/root/main/temp");
  179. model.resetInstanceNode("/root/hidden/sppiz00400");
  180. model.setValue("/root/hidden/mode",mode);
  181. // srchkind - 1 : 수가 , 2 : 상병 , 3 : 처방
  182. // mode - 1 : 검색조건 , 2 : 그리드
  183. if ( (srchkind == 1 && mode == 1) || (grd_tstdiagrgst.col == calc_col && mode == 2) ) { // 수가검색
  184. if (grd_tstdiagrgst.col == calc_col && mode == 2) {
  185. model.setValue("/root/main/list1/listautd["+grd_tstdiagrgst.row+"]/calcscornm",model.getValue("/root/temp/calcdiagnm/hngnm"));
  186. }
  187. if (hngnm == "") { // 검색된 건수가 2건이상이면 팝업을 통해 조회한다.
  188. var trgtManWindow = getChildWindow("SMPIC00200"); // 수가 조회
  189. if (trgtManWindow == null) {
  190. if (mode == 1) { // 조회창에서 검색
  191. modal("SMPIC00200" ,"", "10", "10", "SMPIC00200", "/root/send/iptsearch", "/root/temp", "", "");
  192. model.setValue("/root/send/iptsearch",model.getValue("/root/temp/picmmech/picmmech_calcscorcd"));
  193. model.setValue("/root/send/srchnm",model.getValue("/root/temp/picmmech/picmmech_hngnm"));
  194. }
  195. else if (mode == 2 && grd_tstdiagrgst.col == calc_col) { // 그리드에서 검색
  196. modal("SMPIC00200" ,"", "10", "10", "SMPIC00200", "/root/main/list1/listautd["+grd_tstdiagrgst.row+"]/calcscorcd", "/root/temp", "", "");
  197. model.setValue("/root/main/list1/listautd["+grd_tstdiagrgst.row+"]/calcscorcd",model.getValue("/root/temp/picmmech/picmmech_calcscorcd"));
  198. model.setValue("/root/main/list1/listautd["+grd_tstdiagrgst.row+"]/calcscornm",model.getValue("/root/temp/picmmech/picmmech_hngnm"));
  199. var srchnm = model.getValue("/root/temp/picmmech/picmmech_hngnm");
  200. if (srchnm == "") {
  201. //model.setValue("/root/main/list1/listautd["+grd_tstdiagrgst.row+" ]/calcscorcd","");
  202. //model.setValue("/root/main/list1/listautd["+grd_tstdiagrgst.row+" ]/calcscornm","");
  203. }
  204. }
  205. } else {
  206. trgtManWindow.javascript.fSearchDiag();
  207. activateChild("SMPIC00200");
  208. }
  209. model.refresh();
  210. }
  211. } else if ( (srchkind == 2 && mode == 1) || (grd_tstdiagrgst.col == frd_col && mode == 2)) { // 상병조회
  212. model.setValue("/root/main/list1/listautd["+grd_tstdiagrgst.row+"]/diagnm",model.getValue("/root/temp/calcdiagnm/hngnm"));
  213. if (hngnm == "") { // 검색된 건수가 2건이상이면 팝업을 통해 조회한다.
  214. var trgtManWindow = getChildWindow("SPPIZ00400"); // 상병 조회
  215. if (trgtManWindow == null) {
  216. model.setValue("/root/send/item1/srchdiag/basedd", model.getValue("/root/send/badd"));
  217. if (mode == 1) { // 조회창에서 검색
  218. model.setValue("/root/send/item1/srchdiag/diagcd", model.getValue("/root/send/iptsearch"));
  219. } else if (mode == 2) { // 그리드에서 검색
  220. model.setValue("/root/send/item1/srchdiag/diagcd", model.getValue("/root/main/list1/listautd["+grd_tstdiagrgst.row+"]/diagcd"));
  221. }
  222. model.setValue("/root/send/item1/srchdiag/selectedrdodiagkind","1"); // icd10으로
  223. modal("SPPIZ00400" ,"", "10", "10", "SPPIZ00400", "/root/send/item1/srchdiag", "/root/init", "", "");
  224. var srchnm = model.getValue("/root/hidden/sppiz00400/rslt/diaghngnm");
  225. if (srchnm == "") {
  226. //model.setValue("/root/main/list1/listautd[" +grd_tstdiagrgst.row+ " ]/diagcd","");
  227. //model.setValue("/root/main/list1/listautd[" +grd_tstdiagrgst.row+ " ]/diagnm","");
  228. }
  229. } else {
  230. trgtManWindow.javascript.fSearchDiag();
  231. activateChild("SPPIZ00400");
  232. }
  233. model.refresh();
  234. }
  235. }
  236. }
  237. // 상병조회 팝업에서 상병을 더블클릭 했을경우 상병 그리드에 반영, 상병명은 상병조회팝업의 상병명을 사용하지 않고 ICD10 사용
  238. function fSetDiagCdNm() {
  239. var mode = model.getValue("/root/hidden/mode");
  240. if (mode == 1) {
  241. model.setValue("/root/send/iptsearch",model.getValue("/root/hidden/sppiz00400/rslt/diagcd"));
  242. model.setValue("/root/send/srchnm",model.getValue("/root/hidden/sppiz00400/rslt/diaghngnm"));
  243. } else if (mode == 2) {
  244. model.setValue("/root/main/list1/listautd["+grd_tstdiagrgst.row+"]/diagcd", model.getValue("/root/hidden/sppiz00400/rslt/diagcd"));
  245. model.setValue("/root/main/list1/listautd["+grd_tstdiagrgst.row+"]/diagnm", model.getValue("/root/hidden/sppiz00400/rslt/diaghngnm"));
  246. }
  247. model.refresh();
  248. }
  249. // 조회시 데이터의 유효성체크
  250. function fCheckSrchData() {
  251. var srchkind = model.getValue("/root/send/searchkind");
  252. var iptsearch = model.getValue("/root/send/iptsearch");
  253. if (srchkind == "-") {
  254. return true;
  255. }
  256. if (iptsearch == "") {
  257. if (srchkind == "1") {
  258. messageBox("처방코드는","I003"); // 처방코드는 필수입력입니다.
  259. return false;
  260. }
  261. if (srchkind == "2") {
  262. messageBox("상병코드는","I003"); // 상병코드는 필수입력입니다.
  263. return false;
  264. }
  265. return true;
  266. }
  267. return true;
  268. }
  269. // 저장시 데이터의 유효성체크
  270. function fCheckSaveData() {
  271. var gupdtdata = getGridUpdateData(grd_tstdiagrgst);
  272. var mupdtdata = getGridUpdateData(grd_tstmech);
  273. var cupdtdata = getGridUpdateData(grd_tstdiag);
  274. if (gupdtdata == "" && mupdtdata =="" && cupdtdata == "") {
  275. messageBox("변경된 데이터가","I004");
  276. return false;
  277. }
  278. for(var i = 1 ; i < grd_tstdiagrgst.rows ; i++) {
  279. var status = grd_tstdiagrgst.rowStatus(i);
  280. if(status == "1" || status == "2" || status =="3" ) {
  281. if ( model.getValue("/root/main/list1/listautd[" + i + "]/testgrupnm") == "" ) {
  282. messageBox("그룹명칭은","I003");
  283. return false;
  284. }
  285. }
  286. }
  287. for(var i = 1 ; i < grd_tstdiagrgst.rows ; i++) {
  288. var status = grd_tstdiagrgst.rowStatus(i);
  289. if(status == "1" || status == "2" || status =="3" ) {
  290. if ( model.getValue("/root/main/list1/listautd[" + i + "]/sex") == "" ) {
  291. messageBox("성별은","I003");
  292. return false;
  293. }
  294. }
  295. }
  296. for(var i = 1 ; i < grd_tstdiagrgst.rows ; i++) {
  297. var status = grd_tstdiagrgst.rowStatus(i);
  298. if(status == "1" || status == "2" || status =="3" ) {
  299. if ( model.getValue("/root/main/list1/listautd[" + i + "]/inpath") == "" ) {
  300. model.setValue("/root/main/list1/listautd[" + i + "]/inpath", "");
  301. }
  302. }
  303. }
  304. for(var i = 1 ; i < grd_tstmech.rows ; i++) {
  305. var status = grd_tstmech.rowStatus(i);
  306. if(status == "1" || status == "2" || status =="3" ) {
  307. if ( model.getValue("/root/main/list2/listmech[" + i + "]/edicd") == "" ) {
  308. messageBox("EDI코드는","I003");
  309. return false;
  310. }
  311. }
  312. }
  313. for(var i = 1 ; i < grd_tstdiag.rows ; i++) {
  314. var status = grd_tstdiag.rowStatus(i);
  315. if(status == "1" || status == "2" || status =="3" ) {
  316. if ( model.getValue("/root/main/list2/listdiag[" + i + "]/diagcd") == ""
  317. || model.getValue("/root/main/list2/listdiag[" + i + "]/diagcd") == "-"
  318. )
  319. {
  320. messageBox("시작상병코드는","I003");
  321. return false;
  322. }
  323. }
  324. }
  325. for(var i = 1 ; i < grd_tstdiag.rows ; i++) {
  326. var status = grd_tstdiag.rowStatus(i);
  327. if(status == "1" || status == "2" || status =="3" ) {
  328. if ( model.getValue("/root/main/list2/listdiag[" + i + "]/chkflag") == ""
  329. || model.getValue("/root/main/list2/listdiag[" + i + "]/chkflag") == "-"
  330. )
  331. {
  332. messageBox("적용여부는","I003");
  333. return false;
  334. }
  335. }
  336. }
  337. return true;
  338. }
  339. function fCallSubList() {
  340. var rtn = null;
  341. model.removeNodeset("/root/main/list2/listmech");
  342. model.removeNodeset("/root/main/list2/listdiag");
  343. /*
  344. if ( model.getValue("root/main/list1/listautd[ "+ grd_tstdiagrgst.row + "]/testgrup") == "9999" ) {
  345. grd_tstdiag.refresh();
  346. grd_tstdiag.colAttribute(6,"disabled") = "false";
  347. } else {
  348. grd_tstdiag.colAttribute(6,"disabled") = "true";
  349. }
  350. */
  351. var row = grd_tstdiagrgst.selectedRow(0);
  352. var testgrup = grd_tstdiagrgst.textmatrix(row, 1); // 그룹코드
  353. var orddeptcd = grd_tstdiagrgst.textmatrix(row, 3); // 적용과
  354. model.setValue( "root/send2/testgrup" , testgrup);
  355. model.setValue( "root/send2/orddeptcd", orddeptcd);
  356. if ( testgrup == "" || orddeptcd == "" ) {
  357. grd_tstmech.refresh();
  358. grd_tstdiag.refresh();
  359. return; // 조회할 코드 없으면 그냥 리턴
  360. }
  361. rtn = submit("TRPIB02602");
  362. }
  363. function fSrchSnglCalcscorNm() {
  364. var col = grd_tstmech.col;
  365. var row = grd_tstmech.row;
  366. model.setValue("/root/send/item2/grdsrchnm/iptsearch",model.getValue("/root/main/list2/listmech["+row+"]/edicd"));
  367. model.setValue("/root/send/item2/grdsrchnm/searchkind","1");
  368. submit("TRPIB00202");
  369. var hngnm = model.getValue("/root/temp/calcdiagnm/hngnm");
  370. if (hngnm == "") {
  371. setParameter("openflag", 'edicd');
  372. modal("SMPIC00200" ,"", "10", "10", "SMPIC00200","/root/send/item2/grdsrchnm/iptsearch", "/root/temp", "", "");
  373. model.setValue("/root/main/list2/listmech["+row+"]/edicd",model.getValue("/root/temp/picmmech/picmmech_insuedicd"));
  374. model.setValue("/root/main/list2/listmech["+row+"]/hngnm",model.getValue("/root/temp/picmmech/picmmech_hngnm"));
  375. var srchnm = model.getValue("/root/temp/picmmech/picmmech_hngnm");
  376. if (srchnm == "") {
  377. model.setValue("/root/main/list2/listmech[" + row + " ]/edicd","");
  378. model.setValue("/root/main/list2/listmech[" + row + " ]/hngnm","");
  379. }
  380. } else {
  381. model.setValue("/root/main/list2/listmech["+row+"]/hngnm",model.getValue("/root/temp/calcdiagnm/hngnm"));
  382. }
  383. }
  384. function fSrchDiagNm(fromto) {
  385. var col = grd_tstdiag.col;
  386. var row = grd_tstdiag.row;
  387. if ( fromto == "FROM" ) {
  388. // '-' 기호 null 로 처리
  389. if ( model.getValue("/root/main/list2/listdiag["+row+"]/diagcd") == '-' ) {
  390. model.setValue("/root/main/list2/listdiag["+row+"]/diagcd","");
  391. }
  392. model.setValue("/root/send/item2/grdsrchnm/iptsearch",model.getValue("/root/main/list2/listdiag["+row+"]/diagcd"));
  393. } else if ( fromto == "TO" ) {
  394. // '-' 기호 null 로 처리
  395. if ( model.getValue("/root/main/list2/listdiag["+row+"]/diagcdto") == '-' ) {
  396. model.setValue("/root/main/list2/listdiag["+row+"]/diagcdto","");
  397. }
  398. model.setValue("/root/send/item2/grdsrchnm/iptsearch",model.getValue("/root/main/list2/listdiag["+row+"]/diagcdto"));
  399. }
  400. model.setValue("/root/send/item2/grdsrchnm/searchkind","2");
  401. submit("TRPIB00202");
  402. var hngnm = model.getValue("/root/temp/calcdiagnm/hngnm");
  403. if (hngnm == "") {
  404. var today = getCurrentDate(); // 현재 날짜를 얻어옴
  405. model.setValue("/root/send/item3/srchdiag/basedd", today);
  406. if ( fromto == "FROM" ) {
  407. model.setValue("/root/send/item3/srchdiag/diagcd",model.getValue("/root/main/list2/listdiag["+row+"]/diagcd"));
  408. } else if ( fromto == "TO" ) {
  409. model.setValue("/root/send/item3/srchdiag/diagcd",model.getValue("/root/main/list2/listdiag["+row+"]/diagcdto"));
  410. }
  411. model.setValue("/root/send/item3/srchdiag/selectedrdodiagkind","1"); // icd10으로
  412. modal("SPPIZ00400" ,"", "10", "10", "SPPIZ00400", "/root/send/item3/srchdiag", "/root/init", "", "");
  413. var diagcd = model.getValue("/root/hidden/sppiz00400/rslt/diagcd");
  414. if ( fromto == "FROM" ) {
  415. if (diagcd == "") {
  416. model.setValue("/root/main/list2/listdiag[" + row + " ]/diagcd","-");
  417. model.setValue("/root/main/list2/listdiag[" + row + " ]/diagnm","-");
  418. } else {
  419. model.setValue("/root/main/list2/listdiag[" + row + " ]/diagcd",model.getValue("/root/hidden/sppiz00400/rslt/diagcd"));
  420. model.setValue("/root/main/list2/listdiag[" + row + " ]/diagnm",model.getValue("/root/hidden/sppiz00400/rslt/diaghngnm"));
  421. }
  422. } else if ( fromto == "TO" ) {
  423. if (diagcd == "") {
  424. model.setValue("/root/main/list2/listdiag[" + row + " ]/diagcdto","-");
  425. model.setValue("/root/main/list2/listdiag[" + row + " ]/diagnmto","-");
  426. } else {
  427. model.setValue("/root/main/list2/listdiag[" + row + " ]/diagcdto",model.getValue("/root/hidden/sppiz00400/rslt/diagcd"));
  428. model.setValue("/root/main/list2/listdiag[" + row + " ]/diagnmto",model.getValue("/root/hidden/sppiz00400/rslt/diaghngnm"));
  429. }
  430. }
  431. } else {
  432. if ( fromto == "FROM" ) {
  433. model.setValue("/root/main/list2/listdiag["+row+"]/diagnm",model.getValue("/root/temp/calcdiagnm/hngnm"));
  434. } else if ( fromto == "TO" ) {
  435. model.setValue("/root/main/list2/listdiag["+row+"]/diagnmto",model.getValue("/root/temp/calcdiagnm/hngnm"));
  436. }
  437. }
  438. }
  439. //진료과 선택창 띄위기전에 초기작업을 한다.
  440. function fSelectDeptInit() {
  441. model.setValue("/root/hidden/seldeptbase/testgrup" , model.getValue("/root/main/list1/listautd[" + grd_tstdiagrgst.row + "]/testgrup") );
  442. model.setValue("/root/hidden/seldeptbase/testgrupnm", model.getValue("/root/main/list1/listautd[" + grd_tstdiagrgst.row + "]/testgrupnm") );
  443. model.setValue("/root/hidden/seldeptbase/orddeptcd", model.getValue("/root/main/list1/listautd[" + grd_tstdiagrgst.row + "]/orddeptcd") );
  444. // 일단 기존꺼 지우고
  445. for( i = 1; i <= model.getXPathValue( "count(/root/init/orddeptcd/orddeptcdlist)" ) ; i++ ) {
  446. model.setValue("/root/hidden/seldeptlist[" + i + "]/selyn", "false" );
  447. model.setValue("/root/hidden/seldeptlist[" + i + "]/oldselyn", "false" );
  448. grd_seldeptlist.clearStatus();
  449. }
  450. for( i = grd_tstdiagrgst.fixedRows; i < grd_tstdiagrgst.rows ; i++ ) {
  451. if ( model.getValue("/root/hidden/seldeptbase/testgrup") == model.getValue("/root/main/list1/listautd[" + i + "]/testgrup") ) {
  452. var tmpDeptcd = model.getValue("/root/main/list1/listautd[" + i + "]/orddeptcd");
  453. for( j = grd_seldeptlist.fixedRows; j < grd_seldeptlist.rows ; j++ ) {
  454. if ( tmpDeptcd == grd_seldeptlist.valueMatrix(j,1) ) {
  455. model.setValue("/root/hidden/seldeptlist[" + j + "]/selyn","true");
  456. model.setValue("/root/hidden/seldeptlist[" + j + "]/oldselyn","true");
  457. }
  458. }
  459. }
  460. }
  461. model.refresh();
  462. }
  463. // 김용민 ... 진료과 선택창 완료시 체크
  464. function fSelectDeptChk() {
  465. var changecnt = 0;
  466. var alldept = 0;
  467. var etcdept = 0;
  468. for( i = grd_seldeptlist.fixedRows; i < grd_seldeptlist.rows ; i++ ) {
  469. if ( model.getValue("/root/hidden/seldeptlist[" + i + "]/selyn") != model.getValue("/root/hidden/seldeptlist[" + i + "]/oldselyn") )
  470. {
  471. changecnt++;
  472. }
  473. if ( model.getValue("/root/hidden/seldeptlist[" + i + "]/selyn") == "true" ) {
  474. if ( model.getValue("/root/hidden/seldeptlist[" + i + "]/deptcd") == "-" ) {
  475. alldept++;
  476. } else {
  477. etcdept++;
  478. }
  479. }
  480. }
  481. if ( changecnt == 0 ) {
  482. messageBox("변경된 데이터가","I004");
  483. return false;
  484. }
  485. if ( alldept != 0 && etcdept != 0 ) {
  486. messageBox("전체과와 타과를 같이 선택할수","I004");
  487. return false;
  488. }
  489. if ( alldept == 0 && etcdept == 0 ) {
  490. messageBox("선택된 진료과가 하나도","I004");
  491. return false;
  492. }
  493. return true;
  494. }
  495. // 김용민 - 선택된 진료과를 입력한다.
  496. function fSelectDeptInput() {
  497. var jobrow = 0;
  498. model.removeNodeset("/root/temp/save/seldeptlist");
  499. for( i = grd_seldeptlist.fixedRows; i < grd_seldeptlist.rows ; i++ ) {
  500. if ( model.getValue("root/hidden/seldeptlist[" + i + "]/selyn") == "true"
  501. && model.getValue("root/hidden/seldeptlist[" + i + "]/oldselyn") == "false"
  502. )
  503. {
  504. // 신규입력
  505. jobrow++;
  506. model.makeNode("/root/temp/save/seldeptlist[" + jobrow + "]/testgrup");
  507. model.makeNode("/root/temp/save/seldeptlist[" + jobrow + "]/basedept");
  508. model.makeNode("/root/temp/save/seldeptlist[" + jobrow + "]/orddeptcd");
  509. model.makeNode("/root/temp/save/seldeptlist[" + jobrow + "]/status");
  510. model.setValue("/root/temp/save/seldeptlist[" + jobrow+ "]/testgrup", model.getValue("/root/hidden/seldeptbase/testgrup") );
  511. model.setValue("/root/temp/save/seldeptlist[" + jobrow + "]/basedept", model.getValue("/root/hidden/seldeptbase/orddeptcd") );
  512. model.setValue("/root/temp/save/seldeptlist[" + jobrow + "]/orddeptcd", model.getValue("/root/hidden/seldeptlist[" + i + "]/deptcd") );
  513. model.setValue("/root/temp/save/seldeptlist[" + jobrow+ "]/status", "i" );
  514. } else if ( model.getValue("root/hidden/seldeptlist[" + i + "]/selyn") == "false"
  515. && model.getValue("root/hidden/seldeptlist[" + i + "]/oldselyn") == "true"
  516. )
  517. {
  518. // 삭제
  519. jobrow++;
  520. model.makeNode("/root/temp/save/seldeptlist[" + jobrow + "]/testgrup");
  521. model.makeNode("/root/temp/save/seldeptlist[" + jobrow + "]/basedept");
  522. model.makeNode("/root/temp/save/seldeptlist[" + jobrow + "]/orddeptcd");
  523. model.makeNode("/root/temp/save/seldeptlist[" + jobrow + "]/status");
  524. model.setValue("/root/temp/save/seldeptlist[" + jobrow+ "]/testgrup", model.getValue("/root/hidden/seldeptbase/testgrup") );
  525. model.setValue("/root/temp/save/seldeptlist[" + jobrow + "]/basedept", "" );
  526. model.setValue("/root/temp/save/seldeptlist[" + jobrow + "]/orddeptcd", model.getValue("/root/hidden/seldeptlist[" + i + "]/deptcd") );
  527. model.setValue("/root/temp/save/seldeptlist[" + jobrow+ "]/status", "d" );
  528. }
  529. }
  530. model.setValue("/root/send/updatedata/seldeptlist", getNodeListCSV(instance1.selectNodes("/root/temp/save/seldeptlist")) );
  531. }
  532. // 김용민 - 화면 display 버튼 사용여부 제어
  533. function fSetDisplayDisable(iFlag) {
  534. if ( iFlag == true ) {
  535. grd_tstdiagrgst.disabled = true;
  536. grd_tstmech.disabled = true;
  537. grd_tstdiag.disabled = true;
  538. btn_search.disabled = true;
  539. btn_save.disabled = true;
  540. btn_init.disabled = true;
  541. btn_sel_dept.disabled = true;
  542. btn_addrow.disabled = true;
  543. btn_delrow.disabled = true;
  544. btn_copy.disabled = true;
  545. btn_autdiag_insrow.disabled = true;
  546. btn_autdiag_delrow.disabled = true;
  547. btn_autmech_insrow.disabled = true;
  548. btn_autmech_delrow.disabled = true;
  549. } else {
  550. grd_tstdiagrgst.disabled = false;
  551. grd_tstmech.disabled = false;
  552. grd_tstdiag.disabled = false;
  553. btn_search.disabled = false;
  554. btn_save.disabled = false;
  555. btn_init.disabled = false;
  556. btn_sel_dept.disabled = false;
  557. btn_addrow.disabled = false;
  558. btn_delrow.disabled = false;
  559. btn_copy.disabled = false;
  560. btn_autdiag_insrow.disabled = false;
  561. btn_autdiag_delrow.disabled = false;
  562. btn_autmech_insrow.disabled = false;
  563. btn_autmech_delrow.disabled = false;
  564. }
  565. }
  566. ]]>
  567. </script>
  568. </xhtml:head>
  569. <xhtml:body pagewidth="1211" pageheight="784" guideline="1,1194;" style="vertical-align:bottom; margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  570. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  571. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:159px; height:13px; ">평가관련등록관리</caption>
  572. </group>
  573. <group id="group3" scroll="test" style="left:0px; top:13px; width:1195px; height:771px; ">
  574. <group id="group2" style="left:0px; top:10px; width:1194px; height:58px; vertical-align:top; ">
  575. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1194px; height:55px; "/>
  576. <caption id="caption2" class="search_name" style="left:15px; top:9px; width:86px; height:17px; ">그룹코드 :</caption>
  577. <button id="btn_search" class="btn1_letter2" style="left:1124px; top:7px; width:56px; height:22px; ">
  578. <caption>조회</caption>
  579. <script type="javascript" ev:event="DOMActivate">
  580. <![CDATA[
  581. model.removenode("/root/main/list1");
  582. model.removeNodeset("/root/main/list2/listmech"); // 조회시 처방 그리드도 지운다
  583. model.removeNodeset("/root/main/list2/listdiag"); // 조회시 상병 그리드도 지운다.
  584. model.makeNode("/root/main/list1");
  585. submit("TRPIB02601");
  586. ]]>
  587. </script>
  588. </button>
  589. <line id="line13" class="line_4" style="x1:1106px; y1:7px; x2:1106px; y2:29px; "/>
  590. <caption id="caption11" class="search_name" style="left:180px; top:9px; width:98px; height:17px; ">그룹명칭 :</caption>
  591. <input id="ipt_srchspclcd" ref="/root/send/testgrupnm" class="input_search" style="left:270px; top:8px; width:225px; height:19px; "/>
  592. <input id="input1" ref="/root/send/testgrup" class="input_search" imemode="disabled" _chartype="upper" style="left:110px; top:8px; width:65px; height:19px; "/>
  593. <select1 id="cmb_orddeptcd" ref="/root/send/orddeptcd" navindex="4" appearance="minimal" style="left:580px; top:8px; width:140px; height:19px; ">
  594. <choices>
  595. <itemset nodeset="/root/init/orddeptcd/orddeptcdlist">
  596. <label ref="nm"/>
  597. <value ref="cd"/>
  598. </itemset>
  599. </choices>
  600. </select1>
  601. <caption id="caption7" class="search_name" style="left:502px; top:9px; width:86px; height:17px; ">진료과 :</caption>
  602. <caption id="caption3" class="search_name" style="left:730px; top:9px; width:86px; height:17px; ">EDI코드 :</caption>
  603. <input id="ipt_edicd" ref="/root/send/edicd" class="input_search" imemode="disabled" _chartype="upper" style="left:825px; top:8px; width:100px; height:19px; "/>
  604. <caption id="caption8" class="search_name" style="left:930px; top:9px; width:86px; height:17px; ">상병코드 :</caption>
  605. <input id="ipt_diagcd" ref="/root/send/diagcd" class="input_search" imemode="disabled" _chartype="upper" style="left:1025px; top:8px; width:75px; height:19px; "/>
  606. <caption id="caption9" class="search_name" style="left:180px; top:33px; width:86px; height:17px; ">최소나이 :</caption>
  607. <input id="input4" ref="/root/send/minage" class="input_search" imemode="disabled" _chartype="upper" style="left:270px; top:32px; width:65px; height:19px; "/>
  608. <input id="input5" ref="/root/send/maxage" class="input_search" imemode="disabled" _chartype="upper" style="left:430px; top:32px; width:65px; height:19px; "/>
  609. <caption id="caption10" class="search_name" style="left:340px; top:33px; width:86px; height:17px; ">최대나이 :</caption>
  610. <caption id="caption12" class="search_name" style="left:502px; top:33px; width:86px; height:17px; ">성 별 :</caption>
  611. <caption id="caption13" class="search_name" style="left:930px; top:33px; width:86px; height:17px; ">사용여부 :</caption>
  612. <select1 id="combo1" ref="/root/send/sex" navindex="4" appearance="minimal" style="left:580px; top:32px; width:75px; height:19px; ">
  613. <choices>
  614. <itemset nodeset="/root/init/P0391list/P0391">
  615. <label ref="cdnm"/>
  616. <value ref="cdid"/>
  617. </itemset>
  618. </choices>
  619. </select1>
  620. <select1 id="combo2" ref="/root/send/useyn" navindex="4" appearance="minimal" style="left:1025px; top:32px; width:75px; height:19px; ">
  621. <choices>
  622. <item>
  623. <label/>
  624. <value/>
  625. </item>
  626. <item>
  627. <label>사용</label>
  628. <value>Y</value>
  629. </item>
  630. <item>
  631. <label>미사용</label>
  632. <value>N</value>
  633. </item>
  634. </choices>
  635. </select1>
  636. <select1 id="ipt_inpath" ref="/root/send/inpath" appearance="minimal" style="left:825px; top:32px; width:75px; height:19px; ">
  637. <choices>
  638. <item>
  639. <label>전체</label>
  640. <value>A</value>
  641. </item>
  642. <item>
  643. <label>외래</label>
  644. <value>O</value>
  645. </item>
  646. <item>
  647. <label>응급</label>
  648. <value>E</value>
  649. </item>
  650. </choices>
  651. </select1>
  652. <caption id="caption17" class="search_name" style="left:730px; top:33px; width:99px; height:17px; ">입원경로 :</caption>
  653. </group>
  654. <caption id="caption1" class="tit_2" style="left:5px; top:75px; width:175px; height:14px; ">평가관련 마스터 목록</caption>
  655. <line id="line1" class="line_1" style="x1:0px; y1:90px; x2:1194px; y2:90px; "/>
  656. <button id="btn_delrow" class="btn2_letter3" style="left:1073px; top:70px; width:53px; height:19px; ">
  657. <caption>행삭제</caption>
  658. <script type="javascript" ev:event="DOMActivate">
  659. <![CDATA[
  660. /*
  661. if ( model.getValue("root/main/list1/listautd[ "+ grd_tstdiagrgst.row + "]/testgrup") == "9999" ) {
  662. messageBox("9999 (제외상병) 은 행삭제","E001");
  663. return;
  664. }
  665. */
  666. var row = grd_tstdiagrgst.row;
  667. var rowstatus = grd_tstdiagrgst.rowstatus(row);
  668. // 행추가를 한 행을 [행삭제]하면 행을 그리드에서 삭제, 기존에 존재하는 행을 [행삭제]하면 플래그를 D로 변경
  669. if (rowstatus == 1 || rowstatus == 3) {
  670. grd_tstdiagrgst.deleteRow(row,true);
  671. } else {
  672. grd_tstdiagrgst.rowstatus(row) = 4;
  673. }
  674. ]]>
  675. </script>
  676. </button>
  677. <button id="btn_addrow" class="btn2_letter3" style="left:1017px; top:70px; width:53px; height:19px; ">
  678. <caption>행추가</caption>
  679. <script type="javascript" ev:event="DOMActivate">
  680. <![CDATA[
  681. submit("TRPIB02603");
  682. var maxtestgrup = model.getValue("/root/maxgrup/maxno/maxtestgrup");
  683. //model.alert(maxtestgrup);
  684. grd_tstdiagrgst.addRow(false);
  685. model.setValue("/root/main/list1/listautd["+grd_tstdiagrgst.row+"]/testgrup", maxtestgrup);
  686. model.setValue("/root/main/list1/listautd["+grd_tstdiagrgst.row+"]/orddeptcd","-");
  687. model.setValue("/root/main/list1/listautd["+grd_tstdiagrgst.row+"]/inpath","A");
  688. model.setValue("/root/main/list1/listautd["+grd_tstdiagrgst.row+"]/sex","A");
  689. model.setValue("/root/main/list1/listautd["+grd_tstdiagrgst.row+"]/minage","0");
  690. model.setValue("/root/main/list1/listautd["+grd_tstdiagrgst.row+"]/maxage","999");
  691. model.setValue("/root/main/list1/listautd["+grd_tstdiagrgst.row+"]/useyn","Y");
  692. grd_tstdiagrgst.col = 1; // 추가된 row로 이동
  693. fCallSubList(); // 행추가시 처방,상병 목록을 다시 조회해 온다.
  694. ]]>
  695. </script>
  696. </button>
  697. <datagrid id="grd_tstmech" nodeset="/root/main/list2/listmech" caption="그룹^EDI코드^EDI명칭^적용과" colsep="^" colwidth="43, 98, 220, 67" dataheight="23" defaultrows="0" ellipsis="true" explorerbar="sortshow" frozencols="2" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="23" rowsep="|" style="left:5px; top:348px; width:455px; height:394px; ">
  698. <col ref="testgrup" type="output"/>
  699. <col imemode="disabled" ref="edicd" type="inputbutton" _chartype="upper"/>
  700. <col ref="hngnm" type="output"/>
  701. <col disabled="true" ref="orddeptcd" type="combo">
  702. <choices>
  703. <itemset nodeset="/root/init/orddeptcd/orddeptcdlist">
  704. <label ref="nm"/>
  705. <value ref="cd"/>
  706. </itemset>
  707. </choices>
  708. </col>
  709. <script type="javascript" ev:event="onendedit">
  710. <![CDATA[
  711. var col = grd_tstmech.col;
  712. var row = grd_tstmech.row;
  713. // 처방코드나 상병코드이면
  714. if (col == grd_tstmech.colRef("edicd")) {
  715. fSrchSnglCalcscorNm();
  716. }
  717. ]]>
  718. </script>
  719. <script type="javascript" ev:event="onbuttonclick">
  720. <![CDATA[
  721. var col = grd_tstmech.col;
  722. var row = grd_tstmech.row;
  723. // 처방코드이면
  724. if (col == grd_tstmech.colRef("edicd")) {
  725. fSrchSnglCalcscorNm();
  726. }
  727. ]]>
  728. </script>
  729. <script type="javascript" ev:event="onaftersort">
  730. <![CDATA[
  731. grd_tstdiagrgst.gridToInstance();
  732. ]]>
  733. </script>
  734. </datagrid>
  735. <button id="btn_copy" class="btn2_letter3" style="left:1129px; top:70px; width:53px; height:19px; ">
  736. <caption>행복사</caption>
  737. <script type="javascript" ev:event="DOMActivate">
  738. <![CDATA[
  739. if ( model.getValue("root/main/list1/listautd[ "+ grd_tstdiagrgst.row + "]/testgrup") == "9999" ) {
  740. messageBox("9999 (제외상병) 은 행복사","E001");
  741. return;
  742. }
  743. var oldrow = grd_tstdiagrgst.row;
  744. if (oldrow <= 0) return;
  745. grd_tstdiagrgst.addRow();
  746. var newrow = grd_tstdiagrgst.row;
  747. //model.setValue("/root/main/list1/listautd[" + newrow + "]/testgrupcd", model.getValue("/root/main/list1/listautd[" + oldrow + "]/testgrupcd"));
  748. model.setValue("/root/main/list1/listautd[" + newrow + "]/testgrup", model.getValue("/root/main/list1/listautd[" + oldrow + "]/testgrup"));
  749. model.setValue("/root/main/list1/listautd[" + newrow + "]/testgrupnm", model.getValue("/root/main/list1/listautd[" + oldrow + "]/testgrupnm"));
  750. model.setValue("/root/main/list1/listautd[" + newrow + "]/orddeptcd", model.getValue("/root/main/list1/listautd[" + oldrow + "]/orddeptcd"));
  751. //model.setValue("/root/main/list1/listautd[" + newrow + "]/snglcalcscorcd", model.getValue("/root/main/list1/listautd[" + oldrow + "]/snglcalcscorcd"));
  752. //model.setValue("/root/main/list1/listautd[" + newrow + "]/orddeptcd", model.getValue("/root/main/list1/listautd[" + oldrow + "]/orddeptcd"));
  753. //model.setValue("/root/main/list1/listautd[" + newrow + "]/diagcd", model.getValue("/root/main/list1/listautd[" + oldrow + "]/diagcd"));
  754. model.setValue("/root/main/list1/listautd[" + newrow + "]/minage", model.getValue("/root/main/list1/listautd[" + oldrow + "]/minage"));
  755. model.setValue("/root/main/list1/listautd[" + newrow + "]/maxage", model.getValue("/root/main/list1/listautd[" + oldrow + "]/maxage"));
  756. model.setValue("/root/main/list1/listautd[" + newrow + "]/sex", model.getValue("/root/main/list1/listautd[" + oldrow + "]/sex"));
  757. model.setValue("/root/main/list1/listautd[" + newrow + "]/useyn", model.getValue("/root/main/list1/listautd[" + oldrow + "]/useyn"));
  758. grd_tstdiagrgst.col = 1; // 복사된 곳으로 이동
  759. ]]>
  760. </script>
  761. </button>
  762. <datagrid id="grd_tstdiag" nodeset="/root/main/list2/listdiag" caption="그룹^시작상병^시작상병명^종료상병^종료상병명^적용과^적용여부" colsep="^" colwidth="45, 62, 217, 65, 182, 68, 63" dataheight="23" defaultrows="0" ellipsis="true" explorerbar="sortshow" frozencols="2" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="23" rowsep="|" style="left:464px; top:348px; width:726px; height:394px; ">
  763. <col ref="testgrup" type="output"/>
  764. <col imemode="disabled" ref="diagcd" type="inputbutton" _chartype="upper"/>
  765. <col ref="diagnm" type="output"/>
  766. <col imemode="disabled" ref="diagcdto" type="inputbutton" _chartype="upper"/>
  767. <col ref="diagnmto" type="output"/>
  768. <col disabled="true" ref="orddeptcd" type="combo">
  769. <choices>
  770. <itemset nodeset="/root/init/orddeptcd/orddeptcdlist">
  771. <label ref="nm"/>
  772. <value ref="cd"/>
  773. </itemset>
  774. </choices>
  775. </col>
  776. <col ref="chkflag" type="combo">
  777. <choices>
  778. <item>
  779. <label>적용</label>
  780. <value>Y</value>
  781. </item>
  782. <item>
  783. <label>제외</label>
  784. <value>N</value>
  785. </item>
  786. </choices>
  787. </col>
  788. <script type="javascript" ev:event="onendedit">
  789. <![CDATA[
  790. var col = grd_tstdiag.col;
  791. var row = grd_tstdiag.row;
  792. // 처방코드이면
  793. if ( col == grd_tstdiag.colRef("diagcd") ) {
  794. fSrchDiagNm("FROM");
  795. }
  796. else if ( col == grd_tstdiag.colRef("diagcdto") ) {
  797. fSrchDiagNm("TO");
  798. }
  799. ]]>
  800. </script>
  801. <script type="javascript" ev:event="onbuttonclick">
  802. <![CDATA[
  803. var col = grd_tstdiag.col;
  804. var row = grd_tstdiag.row;
  805. // 처방코드이면
  806. if ( col == grd_tstdiag.colRef("diagcd") ) {
  807. fSrchDiagNm("FROM");
  808. }
  809. else if ( col == grd_tstdiag.colRef("diagcdto") ) {
  810. fSrchDiagNm("TO");
  811. }
  812. ]]>
  813. </script>
  814. <script type="javascript" ev:event="onaftersort">
  815. <![CDATA[
  816. grd_tstdiagrgst.gridToInstance();
  817. ]]>
  818. </script>
  819. </datagrid>
  820. <datagrid id="grd_tstdiagrgst" nodeset="/root/main/list1/listautd" caption="그룹코드^그룹명칭^적용과^입원경로^성별^최소나이^최대나이^사용여부^&amp;" colsep="^" colwidth="90, 319, 156, 100, 63, 65, 65, 61, 20" dataheight="23" defaultrows="0" ellipsis="true" explorerbar="sortshow" frozencols="2" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="23" rowsep="|" style="left:5px; top:96px; width:1184px; height:224px; ">
  821. <col ref="testgrup" type="output" maxlength="12" _key="true"/>
  822. <col ref="testgrupnm" type="input"/>
  823. <col disabled="true" ref="orddeptcd" type="combo" _key="true">
  824. <choices>
  825. <itemset nodeset="/root/init/orddeptcd/orddeptcdlist">
  826. <label ref="nm"/>
  827. <value ref="cd"/>
  828. </itemset>
  829. </choices>
  830. </col>
  831. <col ref="inpath" type="combo">
  832. <choices>
  833. <item>
  834. <label>전체</label>
  835. <value>A</value>
  836. </item>
  837. <item>
  838. <label>외래</label>
  839. <value>O</value>
  840. </item>
  841. <item>
  842. <label>응급</label>
  843. <value>E</value>
  844. </item>
  845. </choices>
  846. </col>
  847. <col ref="sex" type="combo">
  848. <choices>
  849. <itemset nodeset="/root/init/P0391list/P0391">
  850. <label ref="cdnm"/>
  851. <value ref="cdid"/>
  852. </itemset>
  853. </choices>
  854. </col>
  855. <col ref="minage" type="input" format="###"/>
  856. <col ref="maxage" type="input" format="###"/>
  857. <col ref="useyn" type="combo">
  858. <choices>
  859. <item>
  860. <label>사용</label>
  861. <value>Y</value>
  862. </item>
  863. <item>
  864. <label>미사용</label>
  865. <value>N</value>
  866. </item>
  867. </choices>
  868. </col>
  869. <col ref="detail" type="inputbutton"/>
  870. <script type="javascript" ev:event="onbuttonclick">
  871. <![CDATA[
  872. var col = grd_tstdiagrgst.col;
  873. if (col == grd_tstdiagrgst.colRef("detail")) { // 그룹코드
  874. fCallSubList();
  875. }
  876. ]]>
  877. </script>
  878. <script type="javascript" ev:event="onaftersort">
  879. <![CDATA[
  880. grd_tstdiagrgst.gridToInstance();
  881. ]]>
  882. </script>
  883. <script type="javascript" ev:event="xforms-value-changed">
  884. <![CDATA[
  885. /*
  886. var row = grd_tstdiagrgst.row;
  887. var col = grd_tstdiagrgst.col;
  888. if (col == grd_tstdiagrgst.colRef("orddeptcd")) { // 적용과가 변경된 경우
  889. var mupdtdata = getGridUpdateData(grd_tstmech);
  890. var cupdtdata = getGridUpdateData(grd_tstdiag);
  891. if ( mupdtdata != "" || cupdtdata != "") {
  892. messageBox("작업중인 처방, 상병 내역이 있습니다. 변경된 진료과로 내역을 변경합니다.","");
  893. var base_testgrup = model.getValue("/root/main/list1/listautd[" + row + "]/testgrup");
  894. var base_orddeptcd = model.getValue("/root/main/list1/listautd[" + row + "]/orddeptcd");
  895. for( i = grd_tstmech.fixedRows; i < grd_tstmech.rows ; i++ ) {
  896. var rowstat = grd_tstmech.rowStatus(i);
  897. if (
  898. model.getValue("/root/main/list2/listmech[" + i + "]/testgrup") == base_testgrup
  899. && model.getValue("/root/main/list2/listmech[" + i + "]/orddeptcd") != base_orddeptcd
  900. && ( rowstat == 1 || rowstat == 2 || rowstat == 3 )
  901. ) {
  902. model.setValue("/root/main/list2/listmech[" + i + "]/orddeptcd", base_orddeptcd);
  903. }
  904. }
  905. for( i = grd_tstdiag.fixedRows; i < grd_tstdiag.rows ; i++ ) {
  906. var rowstat = grd_tstdiag.rowStatus(i);
  907. if (
  908. model.getValue("/root/main/list2/listdiag[" + i + "]/testgrup") == base_testgrup
  909. && model.getValue("/root/main/list2/listdiag[" + i + "]/orddeptcd") != base_orddeptcd
  910. && ( rowstat == 1 || rowstat == 2 || rowstat == 3 )
  911. ) {
  912. model.setValue("/root/main/list2/listdiag[" + i + "]/orddeptcd", base_orddeptcd);
  913. }
  914. }
  915. } else {
  916. fCallSubList();
  917. }
  918. }
  919. */
  920. ]]>
  921. </script>
  922. <script type="javascript" ev:event="ondblclick">
  923. <![CDATA[
  924. //if ( model.getValue("root/main/list1/listautd[ "+ grd_tstdiagrgst.row + "]/orddeptcd") == "" ) { return; }
  925. fCallSubList();
  926. ]]>
  927. </script>
  928. </datagrid>
  929. <line id="line2" class="line_1" style="x1:5px; y1:343px; x2:460px; y2:343px; "/>
  930. <caption id="caption4" class="tit_2" style="left:10px; top:326px; width:162px; height:14px; ">평가관련 처방 목록</caption>
  931. <caption id="caption5" class="tit_2" style="left:481px; top:326px; width:157px; height:14px; ">평가관련 질병 목록</caption>
  932. <line id="line3" class="line_1" style="x1:465px; y1:345px; x2:1189px; y2:343px; "/>
  933. <button id="btn_autmech_delrow" class="btn2_letter3" style="left:402px; top:322px; width:53px; height:19px; ">
  934. <caption>행삭제</caption>
  935. <script type="javascript" ev:event="DOMActivate">
  936. <![CDATA[
  937. var row = grd_tstmech.row;
  938. var rowstatus = grd_tstmech.rowstatus(row);
  939. // 행추가를 한 행을 [행삭제]하면 행을 그리드에서 삭제, 기존에 존재하는 행을 [행삭제]하면 플래그를 D로 변경
  940. if (rowstatus == 1 || rowstatus == 3) {
  941. grd_tstmech.deleteRow(row,true);
  942. } else {
  943. grd_tstmech.rowstatus(row) = 4;
  944. }
  945. ]]>
  946. </script>
  947. </button>
  948. <button id="btn_autmech_insrow" class="btn2_letter3" style="left:346px; top:322px; width:53px; height:19px; ">
  949. <caption>행추가</caption>
  950. <script type="javascript" ev:event="DOMActivate">
  951. <![CDATA[
  952. if ( model.getValue("root/main/list1/listautd[ "+ grd_tstdiagrgst.row + "]/orddeptcd") == "" ) { return; }
  953. grd_tstmech.addRow(false,true);
  954. model.setValue("/root/main/list2/listmech["+grd_tstmech.row+"]/orddeptcd",model.getValue("/root/main/list1/listautd["+grd_tstdiagrgst.row+"]/orddeptcd"));
  955. model.setValue("/root/main/list2/listmech["+grd_tstmech.row+"]/testgrup",model.getValue("/root/main/list1/listautd["+grd_tstdiagrgst.row+"]/testgrup"));
  956. grd_tstmech.col = 1; // 추가된 row로 이동
  957. ]]>
  958. </script>
  959. </button>
  960. <button id="btn_autdiag_delrow" class="btn2_letter3" style="left:1132px; top:322px; width:53px; height:19px; ">
  961. <caption>행삭제</caption>
  962. <script type="javascript" ev:event="DOMActivate">
  963. <![CDATA[
  964. var row = grd_tstdiag.row;
  965. var rowstatus = grd_tstdiag.rowstatus(row);
  966. // 행추가를 한 행을 [행삭제]하면 행을 그리드에서 삭제, 기존에 존재하는 행을 [행삭제]하면 플래그를 D로 변경
  967. if (rowstatus == 1 || rowstatus == 3) {
  968. grd_tstdiag.deleteRow(row,true);
  969. } else {
  970. grd_tstdiag.rowstatus(row) = 4;
  971. }
  972. ]]>
  973. </script>
  974. </button>
  975. <button id="btn_autdiag_insrow" class="btn2_letter3" style="left:1076px; top:322px; width:53px; height:19px; ">
  976. <caption>행추가</caption>
  977. <script type="javascript" ev:event="DOMActivate">
  978. <![CDATA[
  979. if ( model.getValue("root/main/list1/listautd[ "+ grd_tstdiagrgst.row + "]/orddeptcd") == "" ) { return; }
  980. grd_tstdiag.addRow(false,true);
  981. model.setValue("/root/main/list2/listdiag["+grd_tstdiag.row+"]/orddeptcd",model.getValue("/root/main/list1/listautd["+grd_tstdiagrgst.row+"]/orddeptcd"));
  982. model.setValue("/root/main/list2/listdiag["+grd_tstdiag.row+"]/testgrup",model.getValue("/root/main/list1/listautd["+grd_tstdiagrgst.row+"]/testgrup"));
  983. model.setValue("/root/main/list2/listdiag["+grd_tstdiag.row+"]/chkflag","-"); // 적용과 전체
  984. model.setValue("/root/main/list2/listdiag["+grd_tstdiag.row+"]/diagcd","-");
  985. model.setValue("/root/main/list2/listdiag["+grd_tstdiag.row+"]/diagnm","-");
  986. model.setValue("/root/main/list2/listdiag["+grd_tstdiag.row+"]/diagcdto","-");
  987. model.setValue("/root/main/list2/listdiag["+grd_tstdiag.row+"]/diagnmto","-");
  988. grd_tstdiag.col = 1; // 추가된 row로 이동
  989. ]]>
  990. </script>
  991. </button>
  992. <button id="btn_sel_dept" class="btn2_letter5" navindex="5" style="left:939px; top:70px; width:75px; height:19px; ">
  993. <caption>진료과선택</caption>
  994. <script type="javascript" ev:event="DOMActivate">
  995. <![CDATA[
  996. if ( model.getValue("root/main/list1/listautd[ "+ grd_tstdiagrgst.row + "]/orddeptcd") == "" ) { return; }
  997. var gupdtdata = getGridUpdateData(grd_tstdiagrgst);
  998. var mupdtdata = getGridUpdateData(grd_tstmech);
  999. var cupdtdata = getGridUpdateData(grd_tstdiag);
  1000. if (gupdtdata != "" || mupdtdata != "" || cupdtdata != "") {
  1001. messageBox("작업중인 내역을 저장후","I008");
  1002. return false;
  1003. }
  1004. fSelectDeptInit();
  1005. grp_dept_select.attribute("top") = 110;
  1006. grp_dept_select.attribute("left") = 380;
  1007. grd_seldeptlist.row = 1;
  1008. grp_dept_select.visible = true;
  1009. fSetDisplayDisable(true); // 화면 사용여부 제어
  1010. ]]>
  1011. </script>
  1012. </button>
  1013. <group id="grp_dept_select" visibility="hidden" style="left:435px; top:145px; width:360px; height:530px; border-color:#333333; border-style:solid; ">
  1014. <datagrid id="grd_seldeptlist" nodeset="/root/hidden/seldeptlist" caption="선택^진료과코드^진료과명^기존선택" colsep="^" colwidth="56, 88, 162, 9, 100, 100, 100" mergecellsfixedrows="bycolrec" rowsep="|" style="left:14px; top:74px; width:330px; height:400px; border-color:#333333; ">
  1015. <col ref="selyn" type="checkbox"/>
  1016. <col ref="deptcd"/>
  1017. <col ref="deptnm"/>
  1018. <col ref="oldselyn" visibility="hidden"/>
  1019. </datagrid>
  1020. <caption id="caption15" class="tit_2" style="left:5px; top:5px; width:344px; height:13px; ">자동메모 진료과 선택 (그룹코드로 조회후 사용하세요)</caption>
  1021. <button id="button6" class="btn4_letter2" style="left:281px; top:492px; width:56px; height:22px; ">
  1022. <caption>취소</caption>
  1023. <script type="javascript" ev:event="DOMActivate">
  1024. <![CDATA[
  1025. grp_dept_select.visible = false;
  1026. fSetDisplayDisable(false); // 화면 사용여부 제어
  1027. ]]>
  1028. </script>
  1029. </button>
  1030. <button id="button7" class="btn4_letter2" style="left:216px; top:492px; width:56px; height:22px; ">
  1031. <caption>확인</caption>
  1032. <script type="javascript" ev:event="DOMActivate">
  1033. <![CDATA[
  1034. if ( fSelectDeptChk() == false ) return;
  1035. if ( messageBox("선택된 진료과로 수가코드, 상병이 복사됩니다.", "Q003") != 6 ) return;
  1036. fSelectDeptInput(); // 저장 데이타 생성
  1037. grp_dept_select.visible = false;
  1038. fSetDisplayDisable(false); // 화면 사용여부 제어
  1039. if (submit("TXPIB02602")) {
  1040. messageBox("저장", "I002");
  1041. }
  1042. // 4. 재조회
  1043. model.removeNodeset("/root/main/list2/listmech"); // 조회시 처방 그리드도 지운다
  1044. model.removeNodeset("/root/main/list2/listdiag"); // 조회시 상병 그리드도 지운다.
  1045. submit("TRPIB02601");
  1046. ]]>
  1047. </script>
  1048. </button>
  1049. <line id="line4" class="line_1" style="x1:4px; y1:20px; x2:354px; y2:20px; "/>
  1050. <output id="opt_seldeptcd" ref="/root/hidden/seldeptbase/testgrup" class="output_fix" appearance="output" style="left:14px; top:29px; width:75px; height:19px; color:#ff00ff; "/>
  1051. <output id="opt_seldeptnm" ref="/root/hidden/seldeptbase/testgrupnm" class="output_fix" appearance="output" style="left:94px; top:29px; width:245px; height:19px; color:#ff00ff; "/>
  1052. <button id="btn_selall" class="btn2_letter4" navindex="5" style="left:214px; top:51px; width:64px; height:19px; ">
  1053. <caption>전체선택</caption>
  1054. <script type="javascript" ev:event="DOMActivate">
  1055. <![CDATA[
  1056. for( i = grd_seldeptlist.fixedRows; i < grd_seldeptlist.rows ; i++ ) {
  1057. model.setValue("/root/hidden/seldeptlist[" + i + "]/selyn","true");
  1058. }
  1059. model.refresh();
  1060. ]]>
  1061. </script>
  1062. </button>
  1063. <button id="btn_selno" class="btn2_letter4" navindex="5" style="left:279px; top:51px; width:64px; height:19px; ">
  1064. <caption>전체취소</caption>
  1065. <script type="javascript" ev:event="DOMActivate">
  1066. <![CDATA[
  1067. for( i = grd_seldeptlist.fixedRows; i < grd_seldeptlist.rows ; i++ ) {
  1068. model.setValue("/root/hidden/seldeptlist[" + i + "]/selyn","false");
  1069. }
  1070. model.refresh();
  1071. ]]>
  1072. </script>
  1073. </button>
  1074. <output id="opt_seldeptorddeptcd" ref="/root/hidden/seldeptbase/orddeptcd" class="output_fix" visibility="hidden" appearance="output" style="left:14px; top:52px; width:145px; height:19px; color:#ff00ff; "/>
  1075. </group>
  1076. </group>
  1077. <group id="group4" scroll="test" style="left:0px; top:755px; width:1194px; height:27px; ">
  1078. <line id="line23" class="line_6" style="x1:0px; y1:0px; x2:700px; y2:0px; "/>
  1079. <button id="btn_init" class="btn4_letter3" style="left:1126px; top:4px; width:68px; height:22px; ">
  1080. <caption>초기화</caption>
  1081. <script type="javascript" ev:event="DOMActivate">
  1082. <![CDATA[
  1083. fInitialize();
  1084. ]]>
  1085. </script>
  1086. </button>
  1087. <button id="btn_save" class="btn4_letter2" style="left:1068px; top:4px; width:56px; height:22px; ">
  1088. <caption>저장</caption>
  1089. <script type="javascript" ev:event="DOMActivate">
  1090. <![CDATA[
  1091. // 1. 저장데이터 유효성 체크
  1092. if (!fCheckSaveData()) return;
  1093. // 2. 저장하시겠습니까?
  1094. var rtn = messageBox("평가관련 기준정보를", "Q002");
  1095. if (rtn != 6) {
  1096. return;
  1097. }
  1098. // 3. 저장
  1099. model.setValue("/root/send/updatedata/gruplist",grd_tstdiagrgst.getupdatedata());
  1100. model.setValue("/root/send/updatedata/mechlist",grd_tstmech.getupdatedata());
  1101. model.setValue("/root/send/updatedata/diaglist",grd_tstdiag.getupdatedata());
  1102. /*
  1103. model.alert(model.getValue("/root/send/updatedata/gruplist"));
  1104. return;
  1105. */
  1106. if (submit("TXPIB02601")) {
  1107. messageBox("저장", "I002");
  1108. }
  1109. // 4. 재조회
  1110. model.removeNodeset("/root/main/list2/listmech"); // 조회시 처방 그리드도 지운다
  1111. model.removeNodeset("/root/main/list2/listdiag"); // 조회시 상병 그리드도 지운다.
  1112. submit("TRPIB02601");
  1113. // model.removeNodeset("/root/main/list2/listmech");
  1114. // model.removeNodeset("/root/main/list2/listdiag");
  1115. ]]>
  1116. </script>
  1117. </button>
  1118. </group>
  1119. </xhtml:body>
  1120. </xhtml:html>