SMMRT00300.js 51 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218
  1. /**
  2. * @group :
  3. * @ver : 2008.03.19
  4. * @by : 나종천
  5. * @---------------------------------------------------
  6. * @type : function
  7. * @access : public
  8. * @desc : 화면을 초기화 한다
  9. * @param :
  10. * @return :
  11. * @---------------------------------------------------
  12. */
  13. function fInitalize(){
  14. var currentTime = getCurrentTime();
  15. var instcd = getUserInfo("dutplceinstcd");
  16. // Edited by NJ 2007-07-21 getDate() -> getCurrentDate()
  17. //model.setValue("/root/init/today", getDate());
  18. model.setValue("/root/init/today", getCurrentDate());
  19. model.setValue("/root/init/curruntTime", currentTime.substr(0,4));
  20. model.setValue("/root/hidden/condition/selctedmode", "C");
  21. model.setValue("/root/init/userinfo/userid", getUserId());
  22. model.setValue("/root/init/userinfo/usernm", getUserName());
  23. model.setValue("/root/init/userinfo/instcd", instcd);
  24. //2009-05-06 오전 9:55:28 강지훈 수정 : 선택할수있는 기관을 공통코드로 관리한다.
  25. zbcfGetCodeList( new Array("M0534"), new Array("/root/init/M0534list") ); //화면하단의 사용되는 기관 CheckBox instance 초기화
  26. copyNodeset("/root/init/M0534selcmb", "/root/init/M0534list", "replace");//중앙의료원일때 보이는 기관선택 Combo Instance 초기화
  27. copyNodeset("/root/init/M0534allcmb", "/root/init/M0534list", "replace");//기관별이력조회의 Combo Instance 초기화
  28. addComboInstance("/root/init/M0534selcmb", "cdid^cdnm", "001^전체", "M0534");
  29. addComboInstance("/root/init/M0534allcmb", "cdid^cdnm", "-^전체", "M0534");
  30. //2009-03-12 오전 10:59:38 강지훈 수정 : 접속 기관별 보여지는 항목이 다르다.
  31. //maininstyn : 중앙관리자여부, selInstcd : 선택기관코드
  32. if(instcd == "001"){ //중앙의료원에서 접속할경우
  33. model.setValue("/root/hidden/condition/maininstyn", "Y");
  34. cap_selInst.visible = true;
  35. cmb_selInst.visible = true;
  36. cmb_selInst.value = "001";
  37. cap_selInst.refresh();
  38. btn_saverow.disabled = true;
  39. }
  40. else{
  41. model.setValue("/root/hidden/condition/maininstyn", "N");
  42. model.setValue("/root/hidden/condition/selInstcd", instcd);
  43. }
  44. model.removeNodeset("/root/send");
  45. model.makeValue("/root/send/mode", model.getValue("/root/hidden/condition/indxviewmode"));
  46. model.makeValue("/root/send/indxflag", model.getValue("/root/hidden/condition/indxflag"));
  47. grd_cchist.colHidden(1) = true;
  48. submit("TRMRT00301");
  49. model.refresh();
  50. }
  51. /**
  52. * @group :
  53. * @ver : 2007.03.20
  54. * @by : 나종천
  55. * @---------------------------------------------------
  56. * @type : function
  57. * @access : public
  58. * @desc : 버튼 Enable / Disable
  59. * @param :
  60. * @return :
  61. * @---------------------------------------------------
  62. */
  63. function fDisabled(flag) {
  64. var maininstyn = model.getValue("/root/hidden/condition/maininstyn");
  65. if(flag == "N" || flag == "M") {
  66. ipt_icd10cd.disabled = "false";
  67. btn_icd10cd.disabled = "false";
  68. ipt_hngnm.disabled = "false";
  69. ipt_engnm.disabled = "false";
  70. ipt_termfromdd.disabled = "false";
  71. ipt_ccattrcd.disabled = "true";
  72. ipt_termcd.disabled = "true";
  73. if(maininstyn == "Y"){
  74. rdo_essntermflag.disabled = "false";
  75. }
  76. if(flag == "M"){
  77. ipt_snmdcnptid.disabled = "true";
  78. btn_snmdcnptid.disabled = "true";
  79. btn_snmddescid.disabled = "true";
  80. ipt_termtodd.disabled = "true";
  81. if(maininstyn == "Y"){
  82. rdo_essntermflag.disabled = "false";
  83. }
  84. } else {
  85. ipt_snmdcnptid.disabled = "false";
  86. btn_snmdcnptid.disabled = "false";
  87. btn_snmddescid.disabled = "false";
  88. ipt_termtodd.disabled = "false";
  89. if(maininstyn == "Y"){
  90. cap_appinst.disabled = "false";
  91. chk_appinst.disabled = "false";
  92. rdo_essntermflag.disabled = "false";
  93. }
  94. }
  95. } else if(flag == "AS") {
  96. //??? ?? ??
  97. ipt_snmdcnptid.disabled = "true";
  98. btn_snmdcnptid.disabled = "true";
  99. btn_snmddescid.disabled = "true";
  100. ipt_icd10cd.disabled = "true";
  101. btn_icd10cd.disabled = "true";
  102. ipt_hngnm.disabled = "true";
  103. ipt_engnm.disabled = "true";;
  104. ipt_termfromdd.disabled = "true";
  105. ipt_termtodd.disabled = "true";
  106. ipt_ccattrcd.disabled = "true";
  107. ipt_termcd.disabled = "true";
  108. chk_appinst.disabled = "true";
  109. rdo_essntermflag.disabled = "true";
  110. }
  111. }
  112. /**
  113. * @group :
  114. * @ver : 2007.04.11
  115. * @by : 나종천
  116. * @---------------------------------------------------
  117. * @type : function
  118. * @access : public
  119. * @desc : 부서 선택 팝업 호출
  120. * @param :
  121. * @return :
  122. * @---------------------------------------------------
  123. */
  124. function fCallDeptInfo(){
  125. var xCondPath = "/root/hidden/condition";
  126. model.removenodeset("/root/main/indxlist/item");
  127. model.removenodeset("/root/main/deptcccdlist/deptcccdinfo");
  128. trv_ccindx.rebuild();
  129. grd_deptcc.rebuild();
  130. zbcfOpenInstDeptCodeList("deptnm", model.getValue(xCondPath+"/deptset/selecteddeptnm"), xCondPath+"/deptset/selecteddeptcd", xCondPath+"/deptset/selecteddeptnm", "ordduseryn", "");
  131. if(model.getValue(xCondPath+"/deptset/selecteddeptcd") != ""){
  132. model.removenode("/root/send");
  133. model.makeValue("/root/send/indxflag", model.getValue("/root/hidden/condition/indxflag"));
  134. model.makeValue("/root/send/deptcd", model.getValue("/root/hidden/condition/deptset/selecteddeptcd"));
  135. if(submit("TRMRT00305")){
  136. model.removenodeset("/root/main/deptcccdlist/deptcccdinfo");
  137. model.setValue(xCondPath+"/selectedIndx","");
  138. grd_deptcc.rebuild();
  139. trv_ccindx.rebuild();
  140. }
  141. }else{
  142. model.refresh();
  143. }
  144. }
  145. /**
  146. * @group :
  147. * @ver : 2007.04.19
  148. * @by : 나종천
  149. * @---------------------------------------------------
  150. * @type : function
  151. * @access : public
  152. * @desc : 과주호소 추가시 주호소 조회
  153. * @param :
  154. * @return :
  155. * @---------------------------------------------------
  156. */
  157. function fSrchCCInfo(){
  158. var sCondPath = "/root/hidden/condition/deptset";
  159. var sSrchedCCCdInfoPath = "/root/main/srchedcccdlist/srchedcccdinfo";
  160. var srchnm = model.getValue(sCondPath+"/srchnm");
  161. srchnm = srchnm.replace(/^ *| *$/g, "");
  162. model.removenode("/root/send");
  163. if(model.getValue(sCondPath+"/srchnm") == ""){
  164. messageBox("조회할 내용을","C001");
  165. return;
  166. }
  167. model.removenodeset(sSrchedCCCdInfoPath);
  168. grd_srchedccinfo.rebuild();
  169. model.makeValue("/root/send/srchflag", model.getValue(sCondPath+"/srchflag")); //
  170. model.makeValue("/root/send/srchnm", srchnm); // ??????
  171. model.makeValue("/root/send/termflag",model.getValue("/root/hidden/condition/indxflag")); // ????????
  172. submit("TRMRT00307");
  173. }
  174. /**
  175. * @group :
  176. * @ver : 2007.04.19
  177. * @by : 나종천
  178. * @---------------------------------------------------
  179. * @type : function
  180. * @access : public
  181. * @desc : 과주호소에 주호소 추가
  182. * @param :
  183. * @return :
  184. * @---------------------------------------------------
  185. */
  186. function fSendDeptCC(){
  187. var sCondPath = "/root/hidden/condition/deptset";
  188. var sIndxListPath = "/root/main/indxlist/item";
  189. var sSrchedCCCdListPath = "/root/main/srchedcccdlist/srchedcccdinfo";
  190. var sDeptCCCdListPath = "/root/main/deptcccdlist/deptcccdinfo";
  191. var sDeptCd = model.getValue(sCondPath+"/selecteddeptcd");
  192. var sIndxCd = model.getValue("/root/hidden/condition/selectedIndx");
  193. var sSrchedCCRowCnt = grd_srchedccinfo.rows - grd_srchedccinfo.fixedrows;
  194. var iDeptCCRow = 0;
  195. var sTermcd = "";
  196. if(sDeptCd == ""){
  197. messageBox("부서코드를 먼저", "C002");
  198. return;
  199. }
  200. if(sIndxCd == ""){
  201. messageBox("색인코드를 먼저", "C002");
  202. return;
  203. }
  204. for(var iSrchedCCRow = 1; iSrchedCCRow <= sSrchedCCRowCnt; iSrchedCCRow++){
  205. if(model.getValue(sSrchedCCCdListPath+"["+iSrchedCCRow+"]/check") == "true"){
  206. sTermcd = model.geTValue(sSrchedCCCdListPath+"["+iSrchedCCRow+"]/termcd");
  207. if(model.getValue(sDeptCCCdListPath+"[termcd = '"+sTermcd+"' and deptindxcd = '"+sIndxCd+"']/termcd") != "") continue;
  208. grd_deptcc.addItem();
  209. iDeptCCRow = grd_deptcc.rows - grd_deptcc.fixedrows;
  210. model.setValue(sDeptCCCdListPath+"["+iDeptCCRow+"]/status","I");
  211. model.setValue(sDeptCCCdListPath+"["+iDeptCCRow+"]/deptcd",sDeptCd);
  212. model.setValue(sDeptCCCdListPath+"["+iDeptCCRow+"]/deptnm",model.getValue(sCondPath+"/selecteddeptnm"));
  213. model.setValue(sDeptCCCdListPath+"["+iDeptCCRow+"]/termcd",sTermcd);
  214. model.setValue(sDeptCCCdListPath+"["+iDeptCCRow+"]/deptindxcd",sIndxCd);
  215. model.setValue(sDeptCCCdListPath+"["+iDeptCCRow+"]/termengnm",model.getValue(sSrchedCCCdListPath+"["+iSrchedCCRow+"]/termengnm"));
  216. model.setValue(sDeptCCCdListPath+"["+iDeptCCRow+"]/termhngnm",model.getValue(sSrchedCCCdListPath+"["+iSrchedCCRow+"]/termhngnm"));
  217. model.setValue(sDeptCCCdListPath+"["+iDeptCCRow+"]/deptindxflag",model.getValue("/root/hidden/condition/indxflag"));
  218. }
  219. }
  220. grd_deptcc.rebuild();
  221. }
  222. /**
  223. * @group :
  224. * @ver : 2007.04.19
  225. * @by : 나종천
  226. * @---------------------------------------------------
  227. * @type : function
  228. * @access : public
  229. * @desc : 과주호소 저장
  230. * @param :
  231. * @return :
  232. * @---------------------------------------------------
  233. */
  234. function fSaveDeptCCInfo(){
  235. var xCondPath = "/root/hidden/condition";
  236. var sSelIndxCd = model.getValue(xCondPath+"/selectedIndx");
  237. model.removenode("/root/send");
  238. model.makeValue("/root/send/indxcd", sSelIndxCd);
  239. model.makeValue("/root/send/indxflag", model.getValue("/root/hidden/condition/indxflag"));
  240. model.makeValue("/root/send/deptcd", model.getValue(xCondPath+"/deptset/selecteddeptcd"));
  241. model.makeValue("/root/send/deptcccdlist", grd_deptcc.getUpdateDataAll("i"));
  242. submit("TXMRT00302");
  243. }
  244. /**
  245. * @group :
  246. * @ver : 2007.04.19
  247. * @by : 나종천
  248. * @---------------------------------------------------
  249. * @type : function
  250. * @access : public
  251. * @desc : 전체주호소 팝업 호출
  252. * @param :
  253. * @return :
  254. * @---------------------------------------------------
  255. */
  256. function fCallExtnCCInfo(){
  257. setParameter("indxflag", model.getValue("/root/hidden/condition/indxflag"));
  258. modal("SPMRT01000", 1,10,10);
  259. }
  260. /**
  261. * @group :
  262. * @ver : 2007.04.19
  263. * @by : 나종천
  264. * @---------------------------------------------------
  265. * @type : function
  266. * @access : public
  267. * @desc : 주호소 선택
  268. * @param :
  269. * @return :
  270. * @---------------------------------------------------
  271. */
  272. function fSelCc(){
  273. model.setValue("/root/hidden/condition/selctedmode", "C");
  274. model.removeNodeset("/root/send");
  275. model.makeValue("/root/send/mode", model.getValue("/root/hidden/condition/indxviewmode"));
  276. model.makeValue("/root/send/indxflag", model.getValue("/root/hidden/condition/indxflag"));
  277. submit("TRMRT00301");
  278. model.refresh();
  279. }
  280. /**
  281. * @group :
  282. * @ver : 2007.04.19
  283. * @by : 나종천
  284. * @---------------------------------------------------
  285. * @type : function
  286. * @access : public
  287. * @desc : 주호소 신규
  288. * @param :
  289. * @return :
  290. * @---------------------------------------------------
  291. */
  292. function fSetNewCc(){
  293. var iRow = grd_cccd.row;
  294. var sIndx = model.getValue("/root/hidden/condition/selectedIndx"); //선택한 색인(무조건 선택되어야 함)
  295. var sGrd = model.getValue("/root/main/cccdinfo/cccd[" + iRow + "]/ccattrcd"); //그리드 중 주호소코드 하나를 선택했다면 sccccd가 존재함
  296. var fromdd = ((getCurrentDate()).toDate()).getAddDate(1);
  297. if(sIndx == "" || sIndx == null){
  298. var rtn = messageBox("색인을 ", "C002");
  299. return;
  300. }
  301. model.removeNodeset("/root/main/cccdhist/list"); // 신규버튼 클릭시 이력조회 그리드 초기화
  302. fDisabled("N");
  303. btn_delete1.disabled = "true";
  304. model.removeNodeset("/root/send");
  305. model.resetInstanceNode("/root/main/seqcd/seq");
  306. if(sGrd != "") {
  307. sIndx = model.getValue("/root/main/cccdinfo/cccd[" + iRow + "]/ccindxcd");
  308. }
  309. model.makeValue("/root/send/indxcd",sIndx);
  310. model.makeValue("/root/send/attrcd", model.getValue("/root/main/peprterminfo/info/ccattrcd"));
  311. //선택한 색인에 해당하는 시퀀셜한 주호소코드를 가지고 온다
  312. submit("TRMRT00304");
  313. model.resetInstanceNode("/root/main/peprterminfo/info");
  314. model.setValue("/root/main/peprterminfo/info/ccindxcd", model.getValue("/root/main/seqcd/seq/indxcd"));
  315. // Edited by nj 20070927 속성코드는 snmd-conceptID로 함.
  316. //model.setValue("/root/main/peprterminfo/info/ccattrcd", model.getValue("/root/main/seqcd/seq/cccd"));
  317. model.setValue("/root/main/peprterminfo/info/ccattrcd", model.getValue("/root/main/peprterminfo/info/snmdcnptid"));
  318. model.setValue("/root/main/peprterminfo/info/termcd", model.getValue("/root/main/seqcd/seq/termcd"));
  319. model.setValue("/root/main/peprterminfo/info/fstrgstrid", model.getValue("/root/init/userinfo/userid"));
  320. model.setValue("/root/main/peprterminfo/info/fstrgstrnm", model.getValue("/root/init/userinfo/usernm"));
  321. model.setValue("/root/main/peprterminfo/info/fstrgstdate", model.getValue("/root/init/today"));
  322. model.setValue("/root/main/peprterminfo/info/fstrgsttime", model.getValue("/root/init/curruntTime"));
  323. model.setValue("/root/main/peprterminfo/info/fstrgstdt", model.getValue("/root/main/peprterminfo/info/fstrgstdate")+model.getValue("/root/main/peprterminfo/info/fstrgsttime")+"00");
  324. // Edited by NJ 2007-07-21 getDate()- > getCurrentDate()
  325. //model.setValue("/root/main/peprterminfo/info/termfromdd", getDate() );
  326. model.setValue("/root/main/peprterminfo/info/termfromdd", fromdd.getDateFormat());
  327. model.setValue("/root/main/peprterminfo/info/termtodd", "99991231");
  328. // Edited by NJ 2007-07-21 getDate()- > getCurrentDate()
  329. //model.setValue("/root/main/peprterminfo/info/attrfromdd", getDate() );
  330. model.setValue("/root/main/peprterminfo/info/attrfromdd", model.getValue("/root/main/peprterminfo/info/termfromdd"));
  331. model.setValue("/root/main/peprterminfo/info/attrtodd", model.getValue("/root/main/peprterminfo/info/termtodd"));
  332. model.setValue("/root/main/peprterminfo/info/essntermflag", "N");
  333. model.setValue("/root/hidden/condition/status", "N"); //new insert mode
  334. model.refresh();
  335. }
  336. /**
  337. * @group :
  338. * @ver : 2007.04.19
  339. * @by : 나종천
  340. * @---------------------------------------------------
  341. * @type : function
  342. * @access : public
  343. * @desc : 주호소 수정
  344. * @param :
  345. * @return :
  346. * @---------------------------------------------------
  347. */
  348. function fSetCcUpdt(){
  349. var selTermcd = model.getValue("/root/main/peprterminfo/info/termcd");
  350. var selCcattrcd = model.getValue("/root/main/peprterminfo/info/ccattrcd");
  351. var fromdd = ((getCurrentDate()).toDate()).getAddDate(1);
  352. fDisabled("M");
  353. btn_delete1.disabled = "true";
  354. if((selTermcd == "" || selTermcd == null) || (selCcattrcd == "" || selCcattrcd == null)){
  355. var rtn = messageBox("수정할 주호소를 ", "C002");
  356. return;
  357. }
  358. if(model.getValue("/root/main/peprterminfo/info/termfromdd") == model.getValue("/root/init/today")){
  359. var rtn = messageBox("당일 등록한 용어는 수정 ", "E001");
  360. return;
  361. }
  362. model.setValue("/root/hidden/condition/status", "M");
  363. model.makeValue("/root/main/peprterminfo/info/oldtermfromdd" ,model.getValue("/root/main/peprterminfo/info/termfromdd"));
  364. model.makeValue("/root/main/peprterminfo/info/oldattrfromdd", model.getValue("/root/main/peprterminfo/info/attrfromdd"));
  365. model.setValue("/root/main/peprterminfo/info/termfromdd", fromdd.getDateFormat());
  366. model.setValue("/root/main/peprterminfo/info/termtodd", "99991231");
  367. model.setValue("/root/main/peprterminfo/info/attrfromdd", model.getValue("/root/main/peprterminfo/info/termfromdd"));
  368. model.setValue("/root/main/peprterminfo/info/attrtodd", model.getValue("/root/main/peprterminfo/info/termtodd"));
  369. model.setValue("/root/main/peprterminfo/info/fstrgstdate", getCurrentDate());
  370. model.setValue("/root/main/peprterminfo/info/fstrgsttime", getCurrentTime());
  371. model.setValue("/root/main/peprterminfo/info/fstrgstrnm", getUserName());
  372. model.setValue("/root/main/peprterminfo/info/fstrgstrid", model.getValue("/root/init/userinfo/userid"));
  373. model.refresh();
  374. }
  375. /**
  376. * @group :
  377. * @ver : 2007.04.19
  378. * @by : 나종천
  379. * @---------------------------------------------------
  380. * @type : function
  381. * @access : public
  382. * @desc : 주호소 저장
  383. * @param :
  384. * @return :
  385. * @---------------------------------------------------
  386. */
  387. function fSaveCcTerm(){
  388. var insCcindxcd = model.getValue("/root/main/peprterminfo/info/ccindxcd");
  389. var insCcattrcd = model.getValue("/root/main/peprterminfo/info/ccattrcd");
  390. var snmdcnptid = model.getValue("/root/main/peprterminfo/info/snmdcnptid");
  391. var insTermcd = model.getValue("/root/main/peprterminfo/info/ccattrcd") + "." + model.getValue("/root/main/peprterminfo/info/termcd");
  392. var rowCnt = grd_cccd.row;
  393. if((insTermcd == "") || (insTermcd == "")){
  394. messageBox("용어코드는", "I003");
  395. return;
  396. } else if((snmdcnptid == "") || (snmdcnptid == null)){
  397. messageBox("SNMD-conceptID는", "I003");
  398. return;
  399. }
  400. model.removeNodeset("/root/send");
  401. model.makeNode("/root/send/reqdata");
  402. model.copyNode("/root/send/reqdata", "/root/main/peprterminfo/info");
  403. model.setValue("/root/send/reqdata/ccindxcd", insCcindxcd);
  404. model.setValue("/root/send/reqdata/ccattrcd", insCcattrcd);
  405. model.setValue("/root/send/reqdata/termcd", insTermcd);
  406. model.setValue("/root/send/reqdata/termfromdd", model.getValue("/root/main/peprterminfo/info/termfromdd"));
  407. model.setValue("/root/send/reqdata/termtodd", model.getValue("/root/main/peprterminfo/info/termtodd"));
  408. model.setValue("/root/send/reqdata/termflag", "2"); //defalut :주호소(2)
  409. model.setValue("/root/send/reqdata/reprflag", "R");
  410. model.makeValue("/root/send/reqdata/status", model.getValue("/root/hidden/condition/status")); //N:등록, M:수정
  411. model.makeValue("/root/send/reqdata/maininstyn", model.getValue("/root/hidden/condition/maininstyn"));
  412. model.makeValue("/root/send/reqdata/selInstcd", model.getValue("/root/hidden/condition/selInstcd"));
  413. model.makeValue("/root/send/reqdata/fstrgstdt", model.getValue("/root/main/peprterminfo/info/fstrgstdate") + model.getValue("/root/main/peprterminfo/info/fstrgsttime")+"00");
  414. if(model.getValue("/root/hidden/condition/status") == "N") {
  415. //동일한 코드가 있는지 조회한 후 , 있으면 에러메세지
  416. if(submit("TXMRT00301")){
  417. model.resetInstanceNode("/root/main/peprterminfo/info");
  418. fDisabled("AS");
  419. model.refresh();
  420. }
  421. } else if(model.getValue("/root/hidden/condition/status") == "M" || insTermcd == model.getValue("/root/main/cccdinfo/cccd[" + rowCnt + "]/termcd")) {
  422. if(model.getValue("/root/main/cccdinfo/cccd[" + rowCnt + "]/termengnm") != model.getValue("/root/main/peprterminfo/info/termengnm") ||
  423. model.getValue("/root/main/cccdinfo/cccd[" + rowCnt + "]/termhngnm") != model.getValue("/root/main/peprterminfo/info/termhngnm")) {
  424. //if(model.getValue("/root/main/cccdinfo/cccd[" + rowCnt + "]/icd10cd") != model.getValue("/root/main/peprterminfo/info/icd10cd") ||
  425. // model.getValue("/root/main/cccdinfo/cccd[" + rowCnt + "]/snmdcnptid") != model.getValue("/root/main/peprterminfo/info/snmdcnptid") ||
  426. // /model.getValue("/root/main/cccdinfo/cccd[" + rowCnt + "]/snmdcnptnm") != model.getValue("/root/main/peprterminfo/info/snmdcnptnm"))
  427. if(model.getValue("/root/main/cccdinfo/cccd[" + rowCnt + "]/icd10cd") != model.getValue("/root/main/peprterminfo/info/icd10cd") )
  428. {
  429. model.setValue("/root/send/reqdata/status", "ATM");
  430. } else {
  431. model.setValue("/root/send/reqdata/status", "TM");
  432. }
  433. if(submit("TXMRT00301")){
  434. model.resetInstanceNode("/root/main/peprterminfo/info");
  435. fDisabled("AS");
  436. model.refresh();
  437. }
  438. model.setValue("/root/hidden/condition/status", "");
  439. } else if(model.getValue("/root/main/cccdinfo/cccd[" + rowCnt + "]/icd10cd") != model.getValue("/root/main/peprterminfo/info/icd10cd") ||
  440. model.getValue("/root/main/cccdinfo/cccd[" + rowCnt + "]/snmdcnptid") != model.getValue("/root/main/peprterminfo/info/snmdcnptid") ||
  441. model.getValue("/root/main/cccdinfo/cccd[" + rowCnt + "]/snmdcnptnm") != model.getValue("/root/main/peprterminfo/info/snmdcnptnm")) {
  442. //alert("AA");
  443. model.setValue("/root/send/reqdata/status", "AM");
  444. if(submit("TXMRT00301")){
  445. model.resetInstanceNode("/root/main/peprterminfo/info");
  446. fDisabled("AS");
  447. model.refresh();
  448. model.setValue("/root/hidden/condition/status", "");
  449. }
  450. } else {
  451. var rtn = messageBox("변경된 내용이 없으므로 저장 ", "E001");
  452. return;
  453. }
  454. }
  455. }
  456. /**
  457. * @group :
  458. * @ver : 2007.04.19
  459. * @by : 나종천
  460. * @---------------------------------------------------
  461. * @type : function
  462. * @access : public
  463. * @desc : 주호소 사용종료
  464. * @param :
  465. * @return :
  466. * @---------------------------------------------------
  467. */
  468. function fEndCcTerm(){
  469. var iRow = grd_cccd.row;
  470. var ccattr = model.getValue("/root/main/cccdinfo/cccd[" + iRow + "]/ccattrcd");
  471. var term = model.getValue("/root/main/cccdinfo/cccd[" + iRow + "]/termcd");
  472. var insccindxcd = model.getValue("/root/main/peprterminfo/info/ccindxcd");
  473. var insccattrcd = model.getValue("/root/main/peprterminfo/info/ccattrcd");
  474. var insTermcd = model.getValue("/root/main/peprterminfo/info/ccattrcd")+"."+ model.getValue("/root/main/peprterminfo/info/termcd");
  475. if((insTermcd == "" || insTermcd == null)||(insccattrcd == "" || insccattrcd == null)){
  476. var rtn = messageBox("삭제할 주호소용어를 ", "C002");
  477. return;
  478. }
  479. if(insccattrcd == ccattr && insTermcd == term) {
  480. model.setValue("/root/hidden/condition/status", "ATD");
  481. model.removeNodeset("/root/send");
  482. model.makeValue("/root/send/reqdata/indxcd", insccindxcd);
  483. model.makeValue("/root/send/reqdata/ccattrcd",insccattrcd);
  484. model.makeValue("/root/send/reqdata/termcd", insTermcd);
  485. model.makeValue("/root/send/reqdata/status", model.getValue("/root/hidden/condition/status")); //N:등록, M:수정, D:삭제
  486. model.makeValue("/root/send/reqdata/termflag", "2"); //용어구분
  487. model.makeValue("/root/send/reqdata/oldtermfromdd", model.getValue("/root/main/peprterminfo/info/termfromdd"));
  488. model.makeValue("/root/send/reqdata/termfromdd", model.getValue("/root/main/peprterminfo/info/termfromdd"));
  489. model.makeValue("/root/send/reqdata/oldattrfromdd", model.getValue("/root/main/peprterminfo/info/attrfromdd"));
  490. model.makeValue("/root/send/reqdata/attrfromdd", model.getValue("/root/main/peprterminfo/info/attrfromdd"));
  491. submit("TXMRT00301");
  492. model.resetInstanceNode("/root/main/peprterminfo/info");
  493. model.setValue("/root/hidden/condition/status", "");
  494. model.refresh();
  495. } else {
  496. var rtn = messageBox("내용이 수정되었습니다. 수정 내용을 저장하시려면 저장 버튼을 ", "C002");
  497. return;
  498. }
  499. }
  500. /**
  501. * @group :
  502. * @ver : 2007.04.19
  503. * @by : 나종천
  504. * @---------------------------------------------------
  505. * @type : function
  506. * @access : public
  507. * @desc : 주호소 선택
  508. * @param :
  509. * @return :
  510. * @---------------------------------------------------
  511. */
  512. function fSelCcTerm(){
  513. fDisabled("AS");
  514. var sametermmode = model.getValue("/root/hidden/condition/sametermmode");
  515. //2009-04-30 오후 10:51:05 강지훈 수정 : 기관별 사용 이력조회를 선택했을경우에는 사용종료를 할수없다.
  516. if(sametermmode != "H"){
  517. btn_delete1.disabled = "false";
  518. }
  519. var iRow = grd_cccd.row;
  520. var ccindx = model.getValue("/root/main/cccdinfo/cccd[" + iRow + "]/ccindxcd");
  521. var ccattr = model.getValue("/root/main/cccdinfo/cccd[" + iRow + "]/ccattrcd");
  522. var term = model.getValue("/root/main/cccdinfo/cccd[" + iRow + "]/termcd");
  523. model.setValue("/root/hidden/condition/selectedtermcd", term);
  524. model.setValue("/root/main/peprterminfo/info/ccindxcd", ccindx); // 색인코드
  525. model.setValue("/root/main/peprterminfo/info/ccattrcd", ccattr); // 속성코드
  526. model.setValue("/root/main/peprterminfo/info/termcd", term.substr(term.lastIndexOf(".") + 1, term.length - (term.lastIndexOf(".") + 1))); // 대표 주호소 코드
  527. model.setValue("/root/main/peprterminfo/info/snmdcnptid", model.getValue("/root/main/cccdinfo/cccd[" + iRow + "]/snmdcnptid")); // 스노메드-cncpt
  528. model.setValue("/root/main/peprterminfo/info/snmdcnptnm", model.getValue("/root/main/cccdinfo/cccd[" + iRow + "]/snmdcnptnm")); // 스노메드-cncpt명
  529. model.setValue("/root/main/peprterminfo/info/snmddescid", model.getValue("/root/main/cccdinfo/cccd[" + iRow + "]/snmddescid")); // 스노메드-dscrpt
  530. model.setValue("/root/main/peprterminfo/info/icd10cd", model.getValue("/root/main/cccdinfo/cccd[" + iRow + "]/icd10cd")); // ICD10CD
  531. model.setValue("/root/main/peprterminfo/info/umlscd", model.getValue("/root/main/cccdinfo/cccd[" + iRow + "]/umlscd")); // ICD10CD
  532. model.setValue("/root/main/peprterminfo/info/termengnm", model.getValue("/root/main/cccdinfo/cccd[" + iRow + "]/termengnm")); // 영문
  533. model.setValue("/root/main/peprterminfo/info/termhngnm", model.getValue("/root/main/cccdinfo/cccd[" + iRow + "]/termhngnm")); // 한글
  534. model.setValue("/root/main/peprterminfo/info/reprflag", model.getValue("/root/main/cccdinfo/cccd[" + iRow + "]/reprflag")); // 대표어구분
  535. model.setValue("/root/main/peprterminfo/info/termflag", model.getValue("/root/main/cccdinfo/cccd[" + iRow + "]/termflag")); // 용어구분
  536. //model.setValue("/root/main/peprterminfo/info/fstrgstrid", model.getValue("/root/main/cccdinfo/cccd[" + iRow + "]/fstrgstrid")); // 등록자
  537. model.setValue("/root/main/peprterminfo/info/fstrgstrid", model.getValue("/root/main/cccdinfo/cccd[" + iRow + "]/lastupdtrid")); //
  538. model.setValue("/root/main/peprterminfo/info/fstrgstrnm", model.getValue("/root/main/cccdinfo/cccd[" + iRow + "]/lastupdtrnm"));
  539. model.setValue("/root/main/peprterminfo/info/attrfromdd", model.getValue("/root/main/cccdinfo/cccd[" + iRow + "]/attrfromdd"));
  540. model.setValue("/root/main/peprterminfo/info/attrtodd", model.getValue("/root/main/cccdinfo/cccd[" + iRow + "]/attrtodd"));
  541. model.setValue("/root/main/peprterminfo/info/essntermflag", model.getValue("/root/main/cccdinfo/cccd[" + iRow + "]/essntermflag"));
  542. var fstrgstdt = model.getValue("/root/main/cccdinfo/cccd[" + iRow + "]/fstrgstdt");
  543. var termfromdd = model.getValue("/root/main/cccdinfo/cccd[" + iRow + "]/termfromdd");
  544. var termtodd = model.getValue("/root/main/cccdinfo/cccd[" + iRow + "]/termtodd");
  545. model.setValue("/root/main/peprterminfo/info/fstrgstdt", fstrgstdt); // 등록일
  546. model.setValue("/root/main/peprterminfo/info/fstrgstdate", fstrgstdt.substr(0,8));
  547. model.setValue("/root/main/peprterminfo/info/fstrgsttime", fstrgstdt.substr(8,4));
  548. model.setValue("/root/main/peprterminfo/info/termfromdd", termfromdd); // 시작일
  549. model.setValue("/root/main/peprterminfo/info/termtodd", termtodd); // 종료일
  550. //2009-02-28 오전 10:21:46 강지훈 수정 : 기관별 이력조회 추가
  551. //model.setValue("/root/hidden/condition/sametermmode", "N");
  552. model.removeNodeset("/root/send");
  553. model.makeValue("/root/send/ccattrcd", model.getValue("/root/main/cccdinfo/cccd[" + iRow + "]/ccattrcd"));
  554. model.makeValue("/root/send/termcd", model.getValue("/root/main/cccdinfo/cccd["+iRow+"]/termcd"));
  555. model.makeValue("/root/send/termflag", model.getValue("/root/main/cccdinfo/cccd["+iRow+"]/termflag"));
  556. model.makeValue("/root/send/sametermmode", model.getValue("/root/hidden/condition/sametermmode"));
  557. model.makeValue("/root/send/allinsthist", model.getValue("/root/hidden/condition/allinsthist"));
  558. submit("TRMRT00308");
  559. model.setValue("/root/main/peprterminfo/info/appinstcd", model.getValue("/root/main/cccdhist/appinstcd/appinstcd"));
  560. model.refresh();
  561. }
  562. /**
  563. * @group :
  564. * @ver : 2007.04.19
  565. * @by : 나종천
  566. * @---------------------------------------------------
  567. * @type : function
  568. * @access : public
  569. * @desc : 주호소 선택
  570. * @param :
  571. * @return :
  572. * @---------------------------------------------------
  573. */
  574. function fGetSNMDCT(){
  575. var iRow = grd_cccd.row;
  576. var sIndx = model.getValue("/root/hidden/condition/selectedIndx");
  577. var sGrd = model.getValue("/root/main/cccdinfo/cccd[" + iRow + "]/ccattrcd"); //그리드 중 주호소코드 하나를 선택했다면 sccccd가 존재함
  578. model.setValue("/root/main/peprterminfo/info/ccattrcd", model.getValue("/root/main/peprterminfo/info/snmdcnptid"));
  579. if(sGrd != "") {
  580. sIndx = model.getValue("/root/main/cccdinfo/cccd[" + iRow + "]/ccindxcd");
  581. }
  582. model.makeValue("/root/send/indxcd",sIndx);
  583. model.makeValue("/root/send/attrcd", model.getValue("/root/main/peprterminfo/info/ccattrcd"));
  584. //선택한 색인에 해당하는 시퀀셜한 주호소코드를 가지고 온다
  585. submit("TRMRT00304");
  586. model.setValue("/root/main/peprterminfo/info/termcd", model.getValue("/root/main/seqcd/seq/termcd"));
  587. model.refresh();
  588. }
  589. /**
  590. * @group :
  591. * @ver : 2007.04.19
  592. * @by : 나종천
  593. * @---------------------------------------------------
  594. * @type : function
  595. * @access : public
  596. * @desc : ICD10 팝업 호출
  597. * @param :
  598. * @return :
  599. * @---------------------------------------------------
  600. */
  601. function fGetICD10(){
  602. /*
  603. model.removeNodeset("/root/temp/send");
  604. model.makeValue("/root/temp/send/indxflag", "0");
  605. model.makeValue("/root/temp/send/srchflag", "C");
  606. model.makeValue("/root/temp/send/srchnm", model.getValue("/root/main/peprterminfo/info/icd10cd"));
  607. modal("SPMRT01400", 1,10, 10, "SPMRT01400", "/root/temp/send", "/root/temp/receive");
  608. model.setValue("/root/main/peprterminfo/info/icd10cd", model.getValue("/root/temp/receive/cd"));
  609. ipt_icd10cd.refresh();
  610. */
  611. setParameter("SPMMO3200_param_nodepath", "/root/temp/diaginfo");
  612. modal("SPMMO03200", 1, 0, 0, "", "", "");
  613. if(getNodesetCount("/root/temp/diaginfo/selectdiaglist") > 1){
  614. messageBox("진단코드는 하나만", "C002");
  615. model.resetInstanceNode("/root/temp/diaginfo/selectdiaglist");
  616. return;
  617. }
  618. model.setValue("/root/main/peprterminfo/info/icd10cd", model.getValue("/root/temp/diaginfo/selectdiaglist/diagcd"));
  619. ipt_icd10cd.refresh();
  620. }
  621. /**
  622. * @group :
  623. * @ver : 2007.04.19
  624. * @by : 나종천
  625. * @---------------------------------------------------
  626. * @type : function
  627. * @access : public
  628. * @desc : 주호소 이력 선택
  629. * @param :
  630. * @return :
  631. * @---------------------------------------------------
  632. */
  633. function fSelCcTermHist(){
  634. var iRow = grd_cchist.row;
  635. var indx = model.getValue("/root/hidden/condition/selectedIndx");
  636. var path = model.getValue("/root/hidden/condition/selectedIndxPath");
  637. var term = model.getValue("/root/main/cccdhist/list[" + iRow + "]/termcd");
  638. model.setValue("/root/hidden/condition/selectedtermcd", term);
  639. if( !isNull(iRow) ){
  640. model.setValue("/root/hidden/condition/status", "STM");
  641. model.setValue("/root/main/peprterminfo/info/ccindxcd", indx); //icd9
  642. model.setValue("/root/main/peprterminfo/info/ccattrcd", model.getValue("/root/main/cccdhist/list/attrcd")); // 확장코드
  643. model.setValue("/root/main/peprterminfo/info/termcd", term.substr(term.lastIndexOf(".") + 1, term.length - (term.lastIndexOf(".") + 1))); // 대표어(동의어)코드
  644. model.setValue("/root/main/peprterminfo/info/snmddescid", model.getValue("/root/main/cccdhist/list/snmddescid")); // 스노메드-dscrpt
  645. model.setValue("/root/main/peprterminfo/info/termengnm", model.getValue("/root/main/cccdhist/list[" + iRow + "]/termengnm")); // 영문
  646. model.setValue("/root/main/peprterminfo/info/termhngnm", model.getValue("/root/main/cccdhist/list[" + iRow + "]/termhngnm")); // 한글
  647. model.setValue("/root/main/peprterminfo/info/reprflag", model.getValue("/root/main/cccdhist/list[" + iRow + "]/reprflag")); // 대표어구분
  648. model.setValue("/root/main/peprterminfo/info/termflag", model.getValue("/root/main/cccdhist/list[" + iRow + "]/termflag")); // 용어구분
  649. model.setValue("/root/main/peprterminfo/info/fstrgstrid", model.getValue("/root/main/cccdhist/list[" + iRow + "]/lastupdtrid"));
  650. model.setValue("/root/main/peprterminfo/info/fstrgstrnm", model.getValue("/root/main/cccdhist/list[" + iRow + "]/lastupdtrnm"));
  651. //저장시 필요한 키값
  652. model.setValue("/root/main/peprterminfo/info/attrfromdd", model.getValue("/root/main/cccdhist/list[" + iRow + "]/attrfromdd"));
  653. model.setValue("/root/main/peprterminfo/info/attrtodd", model.getValue("/root/main/cccdhist/list[" + iRow + "]/attrtodd"));
  654. model.setValue("/root/main/peprterminfo/info/snmdcnptid", model.getValue("/root/main/cccdhist/list[" + iRow + "]/snmdcnptid")); // snmdconceptid
  655. model.setValue("/root/main/peprterminfo/info/snmdcnptnm", model.getValue("/root/main/cccdhist/list[" + iRow + "]/snmdcnptnm"));
  656. model.setValue("/root/main/peprterminfo/info/icd10cd", model.getValue("/root/main/cccdhist/list[" + iRow + "]/icd10cd")); //icd10cd
  657. model.setValue("/root/main/peprterminfo/info/umlscd", model.getValue("/root/main/cccdhist/list[" + iRow + "]/umlscd")); //icd10cd
  658. var fstrgstdt = model.getValue("/root/main/cccdhist/list[" + iRow + "]/lastupdtdt");
  659. var termfromdd = model.getValue("/root/main/cccdhist/list[" + iRow + "]/termfromdd");
  660. var termtodd = model.getValue("/root/main/cccdhist/list[" + iRow + "]/termtodd");
  661. model.setValue("/root/main/peprterminfo/info/fstrgstdt", fstrgstdt); // 등록일
  662. model.setValue("/root/main/peprterminfo/info/fstrgstdate", fstrgstdt.substr(0,8));
  663. model.setValue("/root/main/peprterminfo/info/fstrgsttime", fstrgstdt.substr(8,4));
  664. model.setValue("/root/main/peprterminfo/info/termfromdd", termfromdd); // 시작일
  665. model.setValue("/root/main/peprterminfo/info/termtodd", termtodd); // 종료일
  666. model.refresh();
  667. }
  668. }
  669. /**
  670. * @group :
  671. * @ver : 2007.04.19
  672. * @by : 나종천
  673. * @---------------------------------------------------
  674. * @type : function
  675. * @access : public
  676. * @desc : 선택부서 과주호소 조회
  677. * @param :
  678. * @return :
  679. * @---------------------------------------------------
  680. */
  681. function fSrchDeptCcInfo(){
  682. model.removeNodeset("/root/send");
  683. var selIndxCd = model.getValue("/root/hidden/condition/selectedIndx");
  684. var sDeptCd = model.getValue("/root/hidden/condition/deptset/selecteddeptcd");
  685. if(sDeptCd == ""){
  686. messageBox("부서코드를 먼저", "C002");
  687. return;
  688. }
  689. if(selIndxCd == ""){
  690. messageBox("색인코드를 먼저", "C002");
  691. return;
  692. }
  693. model.makeValue("/root/send/indxcd", selIndxCd);
  694. model.makeValue("/root/send/indxflag", model.getValue("/root/hidden/condition/indxflag"));
  695. model.makeValue("/root/send/deptcd", sDeptCd);
  696. submit("TRMRT00306");
  697. }
  698. /**
  699. * @group :
  700. * @ver : 2007.04.19
  701. * @by : 나종천
  702. * @---------------------------------------------------
  703. * @type : function
  704. * @access : public
  705. * @desc : 선택부서 과주호소 삭제
  706. * @param :
  707. * @return :
  708. * @---------------------------------------------------
  709. */
  710. function fDelDeptCcTerm(){
  711. var iRow = grd_deptcc.row;
  712. if(iRow < 1){
  713. return;
  714. }
  715. if(model.getValue("/root/main/deptcccdlist/deptcccdinfo["+iRow+"]/status") == "I"){
  716. grd_deptcc.deleteItem(iRow);
  717. }else{
  718. model.setValue("/root/main/deptcccdlist/deptcccdinfo["+iRow+"]/status","D");
  719. }
  720. grd_deptcc.rebuild();
  721. }
  722. /**
  723. * @group :
  724. * @ver : 2008.03.19
  725. * @by : 나종천
  726. * @---------------------------------------------------
  727. * @type : function
  728. * @access : public
  729. * @desc : 과주호소추가 리스트 선택
  730. * @param :
  731. * @return :
  732. * @---------------------------------------------------
  733. */
  734. function fSelAddCcList(){
  735. if(grd_srchedccinfo.row == 0){
  736. var sCheck = model.getValue("/root/main/srchedcccdlist/srchedcccdinfo[1]/check");
  737. if(sCheck == "true"){
  738. var sRowCnt = grd_srchedccinfo.rows- grd_srchedccinfo.fixedRows;
  739. for(var iRow=1; iRow <= sRowCnt; iRow++){
  740. model.setValue("/root/main/srchedcccdlist/srchedcccdinfo["+iRow+"]/check","false");
  741. }
  742. }else{
  743. var sRowCnt = grd_srchedccinfo.rows- grd_srchedccinfo.fixedRows;
  744. for(var iRow=1; iRow <= sRowCnt; iRow++){
  745. model.setValue("/root/main/srchedcccdlist/srchedcccdinfo["+iRow+"]/check","true");
  746. }
  747. }
  748. grd_srchedccinfo.rebuild();
  749. }
  750. }
  751. /**
  752. * @group :
  753. * @ver : 2008.03.19
  754. * @by : 나종천
  755. * @---------------------------------------------------
  756. * @type : function
  757. * @access : public
  758. * @desc : 색인추가
  759. * @param :
  760. * @return :
  761. * @---------------------------------------------------
  762. */
  763. function fAddIndx(){
  764. model.removeNodeset("/root/send");
  765. model.makeValue("/root/send/paramindx","");
  766. model.setValue("/root/send/paramindx", "2");
  767. modal("SMMRT00100", 1,10, 10, "SMMRT00100", "/root/send", "/root/hidden/condition/getdata");
  768. var child = "SMMRT00100";
  769. if(child != null){
  770. //var getVal = getParameter("setVal");
  771. //model.alert(getVal);
  772. //if(getVal == "I" || getVal == "U") {
  773. model.removeNodeset("/root/send");
  774. model.makeValue("/root/send/mode", model.getValue("/root/hidden/condition/indxviewmode"));
  775. model.makeValue("/root/send/indxflag", model.getValue("/root/hidden/condition/indxflag"));
  776. submit("TRMRT00301");
  777. trv_ccindx.refresh();
  778. // }
  779. }
  780. }
  781. /**
  782. * @group :
  783. * @ver : 2008.03.19
  784. * @by : 나종천
  785. * @---------------------------------------------------
  786. * @type : function
  787. * @access : public
  788. * @desc : 색인 언어 변경
  789. * @param :
  790. * @return :
  791. * @---------------------------------------------------
  792. */
  793. function fChngLangIndx(){
  794. model.removeNodeset("/root/send");
  795. model.makeValue("/root/send/mode", model.getValue("/root/hidden/condition/indxviewmode"));
  796. model.makeValue("/root/send/indxflag", model.getValue("/root/hidden/condition/indxflag"));
  797. submit("TRMRT00301");
  798. trv_ccindx.rebuild();
  799. model.refresh();
  800. }
  801. /**
  802. * @group :
  803. * @ver : 2008.03.19
  804. * @by : 나종천
  805. * @---------------------------------------------------
  806. * @type : function
  807. * @access : public
  808. * @desc : Tree 선택
  809. * @param :
  810. * @return :
  811. * @---------------------------------------------------
  812. */
  813. function fSelTreeIndx(){
  814. model.removeNodeset("/root/send");
  815. var iIndx = trv_ccindx.focusIndex + 1;
  816. var selIndxCd = model.getValue("/root/main/indxlist/item[" + iIndx + "]/indxcd");
  817. model.makeValue("/root/send/indxcd", selIndxCd);
  818. model.makeValue("/root/send/maininstyn", model.getValue("/root/hidden/condition/maininstyn"));
  819. model.makeValue("/root/send/selInstcd", model.getValue("/root/hidden/condition/selInstcd"));
  820. if(model.getValue("/root/hidden/condition/selctedmode") == "C"){ //주호소 코드를 선택했을때
  821. model.setValue("/root/hidden/condition/selectedIndx", model.getValue("/root/main/indxlist/item[" + iIndx + "]/indxcd"));
  822. model.setValue("/root/hidden/condition/selectedIndxDepth", model.getValue("/root/main/indxlist/item[" + iIndx + "]/depth"));
  823. model.setValue("/root/hidden/condition/selectedIndxPath", model.getValue("/root/main/indxlist/item[" + iIndx + "]/pathcd"));
  824. submit("TRMRT00302"); //인덱스 트리를 가지고 온다
  825. grd_cccd.rebuild();
  826. }else{ // 과주호소코드를 선택했을때
  827. model.makeValue("/root/send/indxflag", model.getValue("/root/hidden/condition/indxflag"));
  828. model.makeValue("/root/send/deptcd", model.getValue("/root/hidden/condition/deptset/selecteddeptcd"));
  829. submit("TRMRT00306");
  830. }
  831. }
  832. /**
  833. * @group :
  834. * @ver : 2008.03.19
  835. * @by : 나종천
  836. * @---------------------------------------------------
  837. * @type : function
  838. * @access : public
  839. * @desc : 과주호소 선택
  840. * @param :
  841. * @return :
  842. * @---------------------------------------------------
  843. */
  844. function fSelDeptDiag(){
  845. model.setValue("/root/hidden/condition/deptset/srchflag","H");
  846. model.setValue("/root/hidden/condition/deptset/srchnm","");
  847. model.setValue("/root/hidden/condition/deptset/selecteddeptcd","");
  848. model.setValue("/root/hidden/condition/deptset/selecteddeptnm","");
  849. model.setValue("/root/hidden/condition/selctedmode", "P");
  850. model.removenodeset("/root/main/indxlist/item");
  851. model.removenodeset("/root/main/srchedcccdlist/srchedcccdinfo");
  852. model.removenodeset("/root/main/deptcccdlist/deptcccdinfo");
  853. model.refresh();
  854. }
  855. /**
  856. * @group :
  857. * @ver : 2008.03.19
  858. * @by : 나종천
  859. * @---------------------------------------------------
  860. * @type : function
  861. * @access : public
  862. * @desc : 색인 코드 조회
  863. * @param :
  864. * @return :
  865. * @---------------------------------------------------
  866. */
  867. function fSrchIndxCd(){
  868. if(model.getValue("/root/hidden/condition/srchindxcd") == "" || model.getValue("/root/hidden/condition/srchindxcd") == null){
  869. var rtn = messageBox("검색할 색인코드를 ", "C001");
  870. return;
  871. } else {
  872. model.setValue("/root/hidden/condition/selectedIndx", model.getValue("/root/hidden/condition/srchindxcd"));
  873. //trv_ccindx.vscroll.attribute("pos") = ( parseInt(trv_ccindx.attribute("itemheight")) + 1 ) * trv_ccindx.selectedIndex;
  874. trv_ccindx.expandDepth = 5;
  875. model.refresh();
  876. trv_ccindx.vscroll.attribute("pos") = ( parseInt(trv_ccindx.attribute("itemheight")) + 1 ) * trv_ccindx.selectedIndex;
  877. }
  878. }
  879. /**
  880. * @group :
  881. * @ver : 2008.03.19
  882. * @by : 나종천
  883. * @---------------------------------------------------
  884. * @type : function
  885. * @access : public
  886. * @desc : 주호소 용어 조회
  887. * @param :
  888. * @return :
  889. * @---------------------------------------------------
  890. */
  891. function fSrchCcTerm(){
  892. if(model.getValue("/root/hidden/condition/srchnm") == "" || model.getValue("/root/hidden/condition/srchnm") == null){
  893. var rtn = messageBox("검색어를 ", "C001");
  894. return;
  895. } else {
  896. model.removeNodeset("/root/send");
  897. model.makeValue("/root/send/srchflag", model.getValue("/root/hidden/condition/srchflag"));
  898. model.makeValue("/root/send/srchnm", model.getValue("/root/hidden/condition/srchnm"));
  899. model.makeValue("/root/send/srchfromdd", model.getValue("/root/hidden/condition/srchfromdd"));
  900. model.makeValue("/root/send/srchtodd", model.getValue("/root/hidden/condition/srchtodd"));
  901. model.makeValue("/root/send/endflag", model.getValue("/root/hidden/condition/endflag"));
  902. model.makeValue("/root/send/maininstyn", model.getValue("/root/hidden/condition/maininstyn"));
  903. model.makeValue("/root/send/selInstcd", model.getValue("/root/hidden/condition/selInstcd"));
  904. var srchnm = model.getValue("/root/hidden/condition/srchnm");
  905. srchnm = srchnm.replace(/^ *| *$/g, "");
  906. if(model.getValue("/root/send/srchflag") == "C" || model.getValue("/root/send/srchflag") == "E") {
  907. srchnm = srchnm.toUpperCase();
  908. model.setValue("/root/send/srchnm", srchnm);
  909. }
  910. if (model.getValue("/root/hidden/condition/selctedmode") == "C" ) { // 주호소코드 선택했을때
  911. model.removeNodeset("/root/main/cccdinfo/cccd");
  912. submit("TRMRT00303");
  913. } else if(model.getValue("/root/hidden/condition/selctedmode") == "P" ) { //과 주호소코드 선택했을경우
  914. model.removeNodeset("/root/send");
  915. model.removeNodeset("/root/main/deptcccdlist/deptcccdinfo");
  916. model.makeValue("/root/send/indxflag", model.getValue("/root/hidden/condition/indxflag"));
  917. model.makeValue("/root/send/indxcd", "null");
  918. model.makeValue("/root/send/deptcd", model.getValue("/root/hidden/condition/deptset/selecteddeptcd"));
  919. model.makeValue("/root/send/srchflag", model.getValue("/root/hidden/condition/srchflag"));
  920. model.makeValue("/root/send/srchnm", model.getValue("/root/hidden/condition/srchnm"));
  921. submit("TRMRT00306");
  922. }
  923. model.refresh();
  924. }
  925. }
  926. function fRollbackTerm(){
  927. var icd10cd = model.getValue("/root/main/peprterminfo/info/ccindxcd");
  928. var attrcd = model.getValue("/root/main/peprterminfo/info/ccattrcd");
  929. var termcd = model.getValue("/root/main/peprterminfo/info/termcd");
  930. var fullTermcd = attrcd + "." + termcd;
  931. model.removeNodeset("/root/send");
  932. model.makeNode("/root/send/reqdata");
  933. model.copyNode("/root/send/reqdata", "/root/main/peprterminfo/info");
  934. model.setValue("/root/send/reqdata/ccindxcd", icd10cd);
  935. model.setValue("/root/send/reqdata/ccattrcd", attrcd);
  936. model.setValue("/root/send/reqdata/termcd", fullTermcd);
  937. model.setValue("/root/send/reqdata/termflag", "2");
  938. model.setValue("/root/send/reqdata/reprflag", "R");
  939. model.setValue("/root/send/reqdata/termfromdd", model.getValue("/root/init/today"));
  940. model.setValue("/root/send/reqdata/termtodd", "99991231");
  941. model.makeValue("/root/send/reqdata/indxcd", model.getValue("/root/hidden/condition/selectedIndx"));
  942. model.makeValue("/root/send/reqdata/status", "N");
  943. submit("TXMRT00301");
  944. }
  945. /**
  946. * @group :
  947. * @ver : 2008.12.11
  948. * @by : 나종천
  949. * @---------------------------------------------------
  950. * @type : function
  951. * @access : public
  952. * @desc : 오른쪽 마우스 팝업 호출
  953. * @param :
  954. * @return :
  955. * @---------------------------------------------------
  956. */
  957. function fCallPopup(flag){
  958. if(flag == "grd_cccd"){
  959. if(isDataCell()){
  960. setPopupMenu(flag, false, "/root/init/func/mouserght", "label", "value");
  961. }
  962. } else if(flag == "trv_ccindx"){
  963. if(trv_ccindx.value == ""){
  964. return;
  965. }
  966. setPopupMenu(flag, false, "/root/init/func/trvmouserght", "label", "value");
  967. } else {
  968. initPopupMenu();
  969. }
  970. }
  971. /**
  972. * @group :
  973. * @ver : 2008.12.11
  974. * @by : 나종천
  975. * @---------------------------------------------------
  976. * @type : function
  977. * @access : public
  978. * @desc : 색인 변경 처리
  979. * @param :
  980. * @return :
  981. * @---------------------------------------------------
  982. */
  983. function fModifyIndx(){
  984. var selTab = model.getValue("/root/hidden/condition/selctedmode");
  985. model.removenode("/root/hidden/reqdata");
  986. if(selTab == "C"){
  987. selectedRows = grd_cccd.selectedRows;
  988. for(var cnt = 0; cnt <= selectedRows -1; cnt++){
  989. copyNodeset("/root/hidden/reqdata/ccindxlist", "/root/main/cccdinfo/cccd[" + grd_cccd.selectedrow(cnt) + "]", "append");
  990. }
  991. }
  992. }
  993. /**
  994. * @group :
  995. * @ver : 2008.12.11
  996. * @by : 나종천
  997. * @---------------------------------------------------
  998. * @type : function
  999. * @access : public
  1000. * @desc : 색인 변경할 인덱스로 이동 처리
  1001. * @param :
  1002. * @return :
  1003. * @---------------------------------------------------
  1004. */
  1005. function fPasteIndx(){
  1006. var selTab = model.getValue("/root/hidden/condition/selctedmode");
  1007. var iIndx = trv_ccindx.focusIndex + 1;
  1008. var selIndxCd = model.getValue("/root/main/indxlist/item[" + iIndx + "]/indxcd");
  1009. var msg = messageBox("색인을", "Q012");
  1010. if(msg == "7"){
  1011. return;
  1012. }
  1013. switch(selTab){
  1014. case "C":
  1015. copyNodeset("/root/send/reqdata/ccindxlist", "/root/hidden/reqdata/ccindxlist");
  1016. model.makeValue("/root/send/reqdata/chnginfo/chngindxcd", selIndxCd);
  1017. model.makeValue("/root/send/reqdata/chnginfo/indxflag", selTab);
  1018. if(msg == "6"){
  1019. if(submit("TXMRT00303")){
  1020. messageBox("색인 변경이","I001");
  1021. grd_cccd.refresh();
  1022. } else {
  1023. messageBox("색인 변경을","E009");
  1024. }
  1025. }
  1026. model.removeNodeset("/root/send/reqdata");
  1027. model.removeNodeset("/root/hidden/reqdata");
  1028. break;
  1029. }
  1030. }
  1031. /**
  1032. * @group :
  1033. * @ver : 2009.02.09
  1034. * @by : 강지훈
  1035. * @---------------------------------------------------
  1036. * @type : function
  1037. * @access : public
  1038. * @desc : 기관별 용어 사용여부 설정
  1039. * @param :
  1040. * @return :
  1041. * @---------------------------------------------------
  1042. */
  1043. function fTermUseSave(){
  1044. model.removeNodeset("/root/send/termuse");
  1045. var RowCnt = grd_cccd.rows;
  1046. model.makeValue("/root/send/termuse",getGridUpdateData(grd_cccd));
  1047. submit("TXMRT00206");
  1048. model.refresh();
  1049. }
  1050. /**
  1051. * @group :
  1052. * @ver : 2009-02-28 오전 10:01:34
  1053. * @by : 강지훈
  1054. * @---------------------------------------------------
  1055. * @type : function
  1056. * @access : public
  1057. * @desc : 용어 이력 리스트 조회
  1058. * @param :
  1059. * @return :
  1060. * @---------------------------------------------------
  1061. */
  1062. function fGetDiagTermHistList(){
  1063. var iRow = grd_cccd.row;
  1064. grd_cchist.colHidden(1) = true;
  1065. model.setValue("/root/hidden/condition/sametermmode", "N");
  1066. cap_allinsthist.visible = false;
  1067. cmb_allinsthist.visible = false;
  1068. btn_modify1.disabled = false;
  1069. btn_rollback.disabled = false;
  1070. btn_termsave.disabled = false;
  1071. btn_delete1.disabled = false;
  1072. model.removeNodeset("/root/send");
  1073. model.makeValue("/root/send/ccattrcd", model.getValue("/root/main/cccdinfo/cccd[" + iRow + "]/ccattrcd"));
  1074. model.makeValue("/root/send/termcd", model.getValue("/root/main/cccdinfo/cccd["+iRow+"]/termcd"));
  1075. model.makeValue("/root/send/sametermmode", model.getValue("/root/hidden/condition/sametermmode"));
  1076. submit("TRMRT00308");
  1077. }
  1078. /**
  1079. * @group :
  1080. * @ver : 2009-02-23 오후 10:30:15
  1081. * @by : 강지훈
  1082. * @---------------------------------------------------
  1083. * @type : function
  1084. * @access : public
  1085. * @desc : 기관별 용어 이력 리스트 조회
  1086. * @param :
  1087. * @return :
  1088. * @---------------------------------------------------
  1089. */
  1090. function fGetDiagInstTermHistList(){
  1091. var iRow = grd_cccd.row;
  1092. grd_cchist.colHidden(1) = false;
  1093. cap_allinsthist.visible = true;
  1094. cmb_allinsthist.visible = true;
  1095. //2009-04-30 오후 10:37:47 강지훈 수정 : 기관별 사용이력조회일때는 시작, 종료일자 때문에 수정이 불가하다.
  1096. btn_modify1.disabled = true;
  1097. btn_rollback.disabled = true;
  1098. btn_termsave.disabled = true;
  1099. btn_delete1.disabled = true;
  1100. model.setValue("/root/hidden/condition/sametermmode", "H");
  1101. model.removeNodeset("/root/send");
  1102. model.makeValue("/root/send/allinsthist", model.getValue("/root/hidden/condition/allinsthist"));
  1103. model.makeValue("/root/send/ccattrcd", model.getValue("/root/main/cccdinfo/cccd[" + iRow + "]/ccattrcd"));
  1104. model.makeValue("/root/send/termcd", model.getValue("/root/main/cccdinfo/cccd["+iRow+"]/termcd"));
  1105. model.makeValue("/root/send/sametermmode", model.getValue("/root/hidden/condition/sametermmode"));
  1106. submit("TRMRT00308");
  1107. }