SMMRT00500.js 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766
  1. /*
  2. Tophology/ICD-O-3 진단 관리(SMMRT00500.xfm - JScript )
  3. - Version :
  4. 1) : Ver.1.00.01
  5. */
  6. var xCondPath = "/root/main/cond"; // 조회 조건
  7. var xICDO3Path = "/root/main/icdo3info/icdo3list"; // Morphology 정보
  8. var xDiagInfoPath = "/root/main/diaginfo"; // 등록할 진단 정보
  9. var xTophlgPath = "/root/main/tophlginfo/tophlglist"; // Tophology 정보
  10. var xIndxInfoPath = "/root/main/indxinfo/indxlist"; // 색인 정보
  11. var xRefPath = "/root/hidden/condition/getdata"; // 팝업 정보
  12. /**
  13. * @group :
  14. * @ver : 2007.03.20
  15. * @by : 이은영
  16. * @---------------------------------------------------
  17. * @type : function
  18. * @access : public
  19. * @desc : 화면 초기화
  20. * @param :
  21. * @return :
  22. * @---------------------------------------------------
  23. */
  24. function fInit(){
  25. model.setValue(xCondPath+"/diagflag","C");
  26. model.setValue(xCondPath+"/indxnmflag", "E");
  27. model.toggle("Tophlg");
  28. model.refresh();
  29. fIndxSearch("Tophlg");
  30. }
  31. /**
  32. * @group :
  33. * @ver : 2007.03.21
  34. * @by : 이은영
  35. * @---------------------------------------------------
  36. * @type : function
  37. * @access : public
  38. * @desc : 그리드 클릭시..
  39. * @param :
  40. * @return :
  41. * @---------------------------------------------------
  42. */
  43. function fClickedGrid(){
  44. var sDiagInfo = swt_diaginfo.selectedIndex;
  45. var iRow = -1;
  46. var iCol = -1;
  47. model.setValue(xDiagInfoPath+"/stat","");
  48. fSetCtrl(true);
  49. switch(sDiagInfo){
  50. case 0 : // Tophology
  51. iCol = grd_tophlginfo.col;
  52. iRow = grd_tophlginfo.row;
  53. grd_tophistlist.attribute("visibility") = "visible";
  54. grd_mophistlist.attribute("visibility") = "hidden";
  55. if(iRow < 1) return;
  56. model.copyNode(xDiagInfoPath,xTophlgPath+"["+iRow+"]");
  57. //model.setValue(xDiagInfoPath+"/stat","U");
  58. model.setValue(xTophlgPath+"["+iRow+"]/stat","U");
  59. //model.setValue(xDiagInfoPath+"/fromdd",getDate());
  60. ipt_tophlgcd.visible = true;
  61. ipt_histlgccd.visible = false;
  62. cap_diagcd.value = "원발장기코드";
  63. cap_diagtital.value="Topography 진단정보";
  64. model.removenode("/root/send");
  65. model.makeValue("/root/send/flag", "Tophology");
  66. model.makeValue("/root/send/cd", model.getValue(xTophlgPath+"["+iRow+"]/tophlgcd"));
  67. model.makeValue("/root/send/grde", model.getValue(xTophlgPath+"["+iRow+"]/grde"));
  68. model.makeValue("/root/send/seqno", model.getValue(xTophlgPath+"["+iRow+"]/seqno"));
  69. model.copyNode("/root/main/diaghist", xTophlgPath+"["+iRow+"]");
  70. submit("TRMRT00504");
  71. model.refresh();
  72. break;
  73. case 1 : // Morphology
  74. iCol = grd_icdo3info.col;
  75. iRow = grd_icdo3info.row;
  76. grd_tophistlist.attribute("visibility") = "hidden";
  77. grd_mophistlist.attribute("visibility") = "visible";
  78. if(iRow < 1) return;
  79. model.copyNode(xDiagInfoPath,xICDO3Path+"["+iRow+"]");
  80. //model.setValue(xDiagInfoPath+"/stat","U");
  81. model.setValue(xICDO3Path+"["+iRow+"]/stat","U");
  82. //model.setValue(xDiagInfoPath+"/fromdd",getDate());
  83. ipt_tophlgcd.visible = false;
  84. ipt_histlgccd.visible = true;
  85. cap_diagcd.value = "조직학적 코드";
  86. model.removenode("/root/send");
  87. model.makeValue("/root/send/flag","Morphology");
  88. model.makeValue("/root/send/cd", model.getValue(xICDO3Path+"["+iRow+"]/histlgccd"));
  89. model.makeValue("/root/send/grde", model.getValue(xICDO3Path+"["+iRow+"]/grde"));
  90. model.makeValue("/root/send/seqno", model.getValue(xICDO3Path+"["+iRow+"]/seqno"));
  91. model.copyNode("/root/main/diaghist", xICDO3Path+"["+iRow+"]");
  92. submit("TRMRT00504");
  93. model.refresh();
  94. break;
  95. }
  96. }
  97. /**
  98. * @group :
  99. * @ver : 2007.03.22
  100. * @by : 이은영
  101. * @---------------------------------------------------
  102. * @type : function
  103. * @access : public
  104. * @desc : 입력 항목 clear
  105. * @param :
  106. * @return :
  107. * @---------------------------------------------------
  108. */
  109. function fInsDiagInfo(flag){
  110. var sDiagInfo = swt_diaginfo.selectedIndex;
  111. //fSetCtrl(false);
  112. switch(flag){
  113. case 'I':
  114. model.removenode(xDiagInfoPath);
  115. model.makeValue(xDiagInfoPath+"/stat","I");
  116. fSetCtrl(false);
  117. model.makeNode(xDiagInfoPath+"/grde");
  118. model.makeNode(xDiagInfoPath+"/seqno");
  119. model.makeValue(xDiagInfoPath+"/indxcd",model.getValue(xCondPath+"/srchindxcd"));
  120. model.makeNode(xDiagInfoPath+"/engnm");
  121. model.makeNode(xDiagInfoPath+"/hngnm");
  122. model.makeNode(xDiagInfoPath+"/snmdcnptid");
  123. break;
  124. case 'U':
  125. model.makeValue(xDiagInfoPath+"/stat","U");
  126. fSetCtrl(false);
  127. model.makeNode(xDiagInfoPath+"/engnm");
  128. model.makeNode(xDiagInfoPath+"/hngnm");
  129. model.makeNode(xDiagInfoPath+"/snmdcnptid");
  130. break;
  131. case 'D':
  132. model.makeValue(xDiagInfoPath+"/stat","D");
  133. fSetCtrl(true);
  134. if(sDiagInfo == 0){
  135. model.removenode("/root/send");
  136. model.makeNode("/root/send/reqCond");
  137. model.makeNode("/root/send/tophlginfo");
  138. model.copyNode("/root/send/reqCond",xCondPath);
  139. model.makeValue("/root/send/reqCond/flag", "indx");
  140. model.copyNode("/root/send/tophlginfo",xDiagInfoPath);
  141. submit("TXMRT00502");
  142. return;
  143. } else if(sDiagInfo == 1){
  144. model.removenode("/root/send");
  145. model.makeNode("/root/send/reqCond");
  146. model.makeNode("/root/send/icdo3info");
  147. model.copyNode("/root/send/reqCond",xCondPath);
  148. model.makeValue("/root/send/reqCond/flag", "indx");
  149. model.copyNode("/root/send/icdo3info",xDiagInfoPath);
  150. submit("TXMRT00501");
  151. return;
  152. }
  153. break;
  154. }
  155. /* model.makeNode(xDiagInfoPath+"/grde");
  156. model.makeNode(xDiagInfoPath+"/seqno");
  157. model.makeValue(xDiagInfoPath+"/indxcd",model.getValue(xCondPath+"/srchindxcd"));
  158. model.makeNode(xDiagInfoPath+"/engnm");
  159. model.makeNode(xDiagInfoPath+"/hngnm"); */
  160. // Edited by NJ 2007-07-21 getDate() -> getCurrentDate()
  161. //model.makeValue(xDiagInfoPath+"/fromdd",getDate());
  162. model.makeValue(xDiagInfoPath+"/fromdd", getCurrentDate());
  163. model.makeValue(xDiagInfoPath+"/rgstdt", getCurrentDate()+getCurrentTime());
  164. model.makeValue(xDiagInfoPath+"/rgstrid", getUserInfo("userid"));
  165. model.makeValue(xDiagInfoPath+"/rgstrnm", getUserInfo("usernm"));
  166. model.makeValue(xDiagInfoPath+"/todd","29991231");
  167. switch(sDiagInfo){
  168. case 0 : // Tophology
  169. if(flag == 'I'){
  170. model.makeNode(xDiagInfoPath+"/tophlgcd");
  171. }
  172. ipt_tophlgcd.visible = true;
  173. ipt_histlgccd.visible = false;
  174. cap_diagcd.value = "원발장기코드";
  175. cap_diagtital.value="Topography 진단정보";
  176. break;
  177. case 1 : // Morphology
  178. if(flag == 'I'){
  179. model.makeNode(xDiagInfoPath+"/cncrreptdiagcd");
  180. model.makeNode(xDiagInfoPath+"/histlgccd");
  181. }
  182. ipt_tophlgcd.visible = false;
  183. ipt_histlgccd.visible = true;
  184. cap_diagcd.value = "조직학적 코드";
  185. cap_diagtital.value="Morphology 진단정보";
  186. break;
  187. }
  188. }
  189. /**
  190. * @group :
  191. * @ver : 2007.03.20
  192. * @by : 이은영
  193. * @---------------------------------------------------
  194. * @type : function
  195. * @access : public
  196. * @desc : Morphology/Tophology 진단 코드 조회
  197. * @param :
  198. * @return :
  199. * @---------------------------------------------------
  200. */
  201. function fDiagSearch(flag){
  202. var sDiagInfo = swt_diaginfo.selectedIndex;
  203. if(flag == "indx"){
  204. model.setValue("/root/main/cond/srchnm", "");
  205. }
  206. //fInsDiagInfo();
  207. //if(model.getValue(xCondPath+"/srchindxcd") == "") return; // 색인코드가 없는 경우 조회를 하지 않음.
  208. model.setValue(xDiagInfoPath+"/stat", "-");
  209. switch(sDiagInfo){
  210. case 0 : // Tophology
  211. model.setValue(xCondPath+"/indxflag", 1);
  212. model.removenodeset(xTophlgPath);
  213. model.removenode("/root/send");
  214. model.makeNode("/root/send");
  215. model.copyNode("/root/send",xCondPath);
  216. model.makeValue("/root/send/flag", flag);
  217. model.makeValue("/root/send/srchfromdd", model.getValue("/root/main/cond/srchfromdd"));
  218. model.makeValue("/root/send/srchtodd", model.getValue("/root/main/cond/srchtodd"));
  219. model.makeValue("/root/send/endflag", model.getValue("/root/main/cond/endflag"));
  220. var diagflag = model.getValue("/root/send/diagflag");
  221. var srchnm = model.getValue("/root/send/srchnm");
  222. srchnm = srchnm.replace(/^ *| *$/g, "");
  223. model.setValue("/root/send/srchnm", srchnm);
  224. if(diagflag != "H" && srchnm != ""){
  225. model.setValue("/root/send/srchnm", srchnm.toUpperCase());
  226. }
  227. fSetCtrl(true);
  228. submit("TRMRT00502");
  229. break;
  230. case 1 : // Morphology
  231. model.setValue(xCondPath+"/indxflag", 3);
  232. model.removenodeset(xICDO3Path);
  233. model.removenode("/root/send");
  234. model.makeNode("/root/send");
  235. model.copyNode("/root/send",xCondPath);
  236. model.makeValue("/root/send/flag", flag);
  237. var diagflag = model.getValue("/root/send/diagflag");
  238. var srchnm = model.getValue("/root/send/srchnm");
  239. srchnm = srchnm.replace(/^ *| *$/g, "");
  240. model.setValue("/root/send/srchnm", srchnm);
  241. if(diagflag != "H" && srchnm != ""){
  242. model.setValue("/root/send/srchnm", srchnm.toUpperCase());
  243. }
  244. fSetCtrl(true);
  245. submit("TRMRT00501");
  246. break;
  247. }
  248. //model.setValue("/root/main/cond/srchnm", "");
  249. model.refresh();
  250. }
  251. /**
  252. * @group :
  253. * @ver : 2007.03.20
  254. * @by : 이은영
  255. * @---------------------------------------------------
  256. * @type : function
  257. * @access : public
  258. * @desc : ICD-O-3/Tophology 색인 코드 조회
  259. * @param : pFlag (ICDO3 : ICD-O-3, Tophlg : Tophology)
  260. * @return :
  261. * @---------------------------------------------------
  262. */
  263. function fIndxSearch(pFlag){
  264. model.removenode("/root/main/diaghist/list");
  265. if(pFlag == "ICDO3"){
  266. model.toggle("ICDO3");
  267. model.setValue(xCondPath+"/indxflag","3");
  268. model.removenodeset(xICDO3Path);
  269. model.setValue(xCondPath+"/srchindxcd","");
  270. cap_diagcd.value = "조직학적 코드";
  271. cap_diagtital.value = "Morphology 진단정보";
  272. ipt_tophlgcd.visible = true;
  273. ipt_histlgccd.visible = false;
  274. grd_tophistlist.attribute("visibility") = "hidden";
  275. grd_mophistlist.attribute("visibility") = "visible";
  276. }else if(pFlag == "Tophlg"){
  277. model.toggle("Tophlg");
  278. model.setValue(xCondPath+"/indxflag","1");
  279. model.removenodeset(xTophlgPath);
  280. model.setValue(xCondPath+"/srchindxcd","");
  281. cap_diagcd.value = "원발장기코드";
  282. cap_diagtital.value = "Topography 진단정보";
  283. ipt_tophlgcd.visible = true;
  284. ipt_histlgccd.visible = false;
  285. ipt_tophlgcd.disabled = true;
  286. grd_tophistlist.attribute("visibility") = "visible";
  287. grd_mophistlist.attribute("visibility") = "hidden";
  288. }
  289. model.removeNodeset("xIndxInfoPath");
  290. model.removenode("/root/send");
  291. model.makeNode("/root/send");
  292. model.copyNode("/root/send",xCondPath);
  293. submit("TRMRT00503");
  294. model.resetInstanceNode(xDiagInfoPath);
  295. fSetCtrl(true);
  296. trv_indxinfo.rebuild();
  297. model.refresh();
  298. }
  299. /**
  300. * @group :
  301. * @ver : 2007.03.21
  302. * @by : 이은영
  303. * @---------------------------------------------------
  304. * @type : function
  305. * @access : public
  306. * @desc : 데이터 변경 여부 check
  307. * @param : pTgRef : target path
  308. * @param : pRgRef : regular path
  309. * @param : pNodeInfo : 확인할 노드 정보
  310. * @return :
  311. * @---------------------------------------------------
  312. */
  313. function fChkChangedData(pTgRef, pRgRef,pNodeInfo){
  314. var sNodeInfo = pNodeInfo.split("▩");
  315. var sNode = sNodeInfo[0].split("▦");
  316. var sNodeNm = sNodeInfo[1].split("▦");
  317. for(var i=0; i<sNode.length; i++){
  318. if(model.getValue(pTgRef+"/"+sNode[i]) != model.getValue(pRgRef+"/"+sNode[i])){
  319. return true;
  320. }
  321. }
  322. return false;
  323. }
  324. /**
  325. * @group :
  326. * @ver : 2007.03.21
  327. * @by : 이은영
  328. * @---------------------------------------------------
  329. * @type : function
  330. * @access : public
  331. * @desc : 저장
  332. * @param :
  333. * @return :
  334. * @---------------------------------------------------
  335. */
  336. function fSave(){
  337. var sTmpgrde = model.getValue("/root/main/diaginfo/grde");
  338. var sGrde = sTmpgrde.replace(" ", "");
  339. if(((model.getValue("root/main/diaginfo/indxcd") == "") || (model.getValue("root/main/diaginfo/indxcd") == null))){
  340. messageBox("색인을", "C002");
  341. return;
  342. } else if(sGrde.length > 1){
  343. messageBox("등급은 한 자리로", "C001");
  344. return;
  345. } if(model.getValue(xDiagInfoPath+"/stat") == "-"){
  346. messageBox("신규 및 수정 모드를", "C002");
  347. return;
  348. }
  349. var srchnm = model.getValue(xCondPath + "/srchnm");
  350. srchnm = srchnm.toUpperCase();
  351. var sDiagInfo = swt_diaginfo.selectedIndex;
  352. var sNodeInfo = "";
  353. model.makeValue(xCondPath+"/flag", "indx");
  354. var iRow = -1;
  355. switch(sDiagInfo){
  356. case 0 : // Tophology
  357. iRow = grd_tophlginfo.row;
  358. if(iRow < 1 && model.getValue(xDiagInfoPath+"/stat") == "U"){
  359. if(iRow < 1){
  360. meassageBox("선택된 용어가", "I004");
  361. }
  362. return;
  363. }
  364. sNodeInfo = "grde▦tophlgcd▦seqno▦indxcd▦engnm▦hngnm▦fromdd▦todd▩"+
  365. "등급▦원발장기코드▦일련번호▦색인코드▦영문명▦한글명▦시작일▦종료일▦";
  366. if(fChkValueEmpty(xDiagInfoPath,sNodeInfo) == true){
  367. return;
  368. }else{
  369. if(fChkChangedData(xDiagInfoPath,xTophlgPath+"["+iRow+"]",sNodeInfo) == false){
  370. messageBox("변경된 데이터가","I004");
  371. return;
  372. } else if((model.getValue(xTophlgPath+"["+iRow+"]/fromdd") == model.getValue("/root/main/diaginfo/fromdd")) && (model.getValue(xDiagInfoPath+"/stat") == "U")){
  373. messageBox("시작일자가 동일한 용어코드가", "E005");
  374. return;
  375. }
  376. }
  377. var sRtn = messageBox("","Q002");
  378. if(sRtn != 6) return;
  379. model.removenode("/root/send");
  380. model.makeNode("/root/send/reqCond");
  381. model.makeNode("/root/send/tophlginfo");
  382. model.copyNode("/root/send/reqCond",xCondPath);
  383. model.copyNode("/root/send/tophlginfo",xDiagInfoPath);
  384. model.setValue("/root/send/reqCond/srchnm", srchnm);
  385. if(submit("TXMRT00502")){
  386. model.resetInstanceNode(xDiagInfoPath);
  387. }
  388. break;
  389. case 1 : // Morphology
  390. iRow = grd_icdo3info.row;
  391. if(iRow < 1 && model.getValue(xDiagInfoPath+"/stat") == "U"){
  392. if(iRow < 1){
  393. meassageBox("선택된 용어가", "I004");
  394. }
  395. return;
  396. }
  397. sNodeInfo = "grde▦histlgccd▦seqno▦indxcd▦engnm▦hngnm▦fromdd▦todd▩"+
  398. "등급▦조직학적코드▦일련번호▦색인코드▦영문명▦한글명▦시작일▦종료일▩";
  399. if(fChkValueEmpty(xDiagInfoPath,sNodeInfo) == true){
  400. return;
  401. }else{
  402. if(fChkChangedData(xDiagInfoPath,xICDO3Path+"["+iRow+"]",sNodeInfo) == false){
  403. messageBox("변경된 데이터가","I004");
  404. return;
  405. } else if((model.getValue(xICDO3Path+"["+iRow+"]/fromdd") == model.getValue("/root/main/diaginfo/fromdd")) && (model.getValue(xDiagInfoPath+"/stat") == "U")){
  406. messageBox("시작일자가 같은 용어코드가", "E005");
  407. return;
  408. }
  409. var sCncrReptDiagCd = model.getValue(xDiagInfoPath+"/histlgccd");
  410. var temp = sCncrReptDiagCd.replace("M","");
  411. sCncrReptDiagCd = temp.replace("/","");
  412. model.setValue(xDiagInfoPath+"/cncrreptdiagcd", sCncrReptDiagCd);
  413. }
  414. var sRtn = messageBox("","Q002");
  415. if(sRtn != 6) return;
  416. model.removenode("/root/send");
  417. model.makeNode("/root/send/reqCond");
  418. model.makeNode("/root/send/icdo3info");
  419. model.copyNode("/root/send/reqCond",xCondPath);
  420. model.copyNode("/root/send/icdo3info",xDiagInfoPath);
  421. model.setValue("/root/send/reqCond/srchnm", srchnm);
  422. if(submit("TXMRT00501")){
  423. model.resetInstanceNode(xDiagInfoPath);
  424. }
  425. break;
  426. }
  427. model.setValue(xDiagInfoPath+"/stat", "-");
  428. fSetCtrl(true);
  429. model.refresh();
  430. }
  431. /**
  432. * @group :
  433. * @ver : 2007.03.21
  434. * @by : 이은영
  435. * @---------------------------------------------------
  436. * @type : function
  437. * @access : public
  438. * @desc : 빈 공백 check
  439. * @param :
  440. * @return :
  441. * @---------------------------------------------------
  442. */
  443. function fChkValueEmpty(pRef, pNodeInfo){
  444. var sNodeInfo = pNodeInfo.split("▩");
  445. var sNode = sNodeInfo[0].split("▦");
  446. var sNodeNm = sNodeInfo[1].split("▦");
  447. for(var i=0; i<sNode.length; i++){
  448. if(model.getValue(pRef+"/"+sNode[i]) == ""){
  449. messageBox(sNodeNm[i]+"이 입력되지","E007");
  450. return true;
  451. }
  452. }
  453. return false;
  454. }
  455. /**
  456. * @group :
  457. * @ver : 2007.03.26
  458. * @by : 이은영
  459. * @---------------------------------------------------
  460. * @type : function
  461. * @access : public
  462. * @desc : 색인 추가 버튼 호출
  463. * @param :
  464. * @return :
  465. * @---------------------------------------------------
  466. */
  467. function fCallIndxAdd(){
  468. var sDiagInfo = swt_diaginfo.selectedIndex;
  469. switch(sDiagInfo){
  470. case 0 : // Tophology
  471. model.removeNodeset("/root/send");
  472. model.makeValue("/root/send/paramindx","");
  473. model.setValue("/root/send/paramindx", "1");
  474. //model.setValue(xRefPath+"/indxflag",1);
  475. break;
  476. case 1 : // Morphology
  477. model.removeNodeset("/root/send");
  478. model.makeValue("/root/send/paramindx","");
  479. model.setValue("/root/send/paramindx", "3");
  480. //model.setValue(xRefPath+"/indxflag",3);
  481. break;
  482. }
  483. modal("SMMRT00100", 1, 100, 100, "SMMRT00100", "/root/send", xRefPath);
  484. }
  485. /**
  486. * @group :
  487. * @ver : 2007.08.13
  488. * @by : 나종천
  489. * @---------------------------------------------------
  490. * @type : function
  491. * @access : public
  492. * @desc : 사용 종료기능 추가
  493. * @param :
  494. * @return :
  495. * @---------------------------------------------------
  496. */
  497. function fUEDT(){
  498. var sDiagInfo = swt_diaginfo.selectedIndex;
  499. model.removenode(xDiagInfoPath);
  500. model.makeValue(xDiagInfoPath+"/stat","D");
  501. model.makeNode(xDiagInfoPath+"/grde");
  502. model.makeNode(xDiagInfoPath+"/seqno");
  503. model.makeValue(xDiagInfoPath+"/indxcd",model.getValue(xCondPath+"/srchindxcd"));
  504. model.makeNode(xDiagInfoPath+"/engnm");
  505. model.makeNode(xDiagInfoPath+"/hngnm");
  506. // Edited by NJ 2007-07-21 getDate() -> getCurrentDate()
  507. //model.makeValue(xDiagInfoPath+"/fromdd",getDate());
  508. model.makeValue(xDiagInfoPath+"/fromdd", getCurrentDate());
  509. model.makeValue(xDiagInfoPath+"/rgstdt", getCurrentDate()+getCurrentTime());
  510. model.makeValue(xDiagInfoPath+"/rgstrid", getUserInfo("userid"));
  511. model.makeValue(xDiagInfoPath+"/rgstrnm", getUserInfo("usernm"));
  512. model.makeValue(xDiagInfoPath+"/todd","29991231");
  513. switch(sDiagInfo){
  514. case 0 : // Tophology
  515. model.makeNode(xDiagInfoPath+"/tophlgcd");
  516. ipt_tophlgcd.visible = true;
  517. ipt_histlgccd.visible = false;
  518. cap_diagcd.value = "원발장기코드";
  519. cap_diagtital.value="Topography 진단정보";
  520. break;
  521. case 1 : // Morphology
  522. model.makeNode(xDiagInfoPath+"/cncrreptdiagcd");
  523. model.makeNode(xDiagInfoPath+"/histlgccd");
  524. ipt_tophlgcd.visible = false;
  525. ipt_histlgccd.visible = true;
  526. cap_diagcd.value = "조직학적 코드";
  527. cap_diagtital.value="Morphology 진단정보";
  528. break;
  529. }
  530. }
  531. /**
  532. * @group :
  533. * @ver : 2007.03.22
  534. * @by : 이은영
  535. * @---------------------------------------------------
  536. * @type : function
  537. * @access : public
  538. * @desc : 버튼 속성 Setting
  539. * @param :
  540. * @return :
  541. * @---------------------------------------------------
  542. */
  543. function fSetCtrl(bool){
  544. if(model.getValue(xDiagInfoPath+"/stat") == 'I'){
  545. ipt_tophlgcd.disabled = bool;
  546. ipt_histlgccd.disabled = bool;
  547. ipt_seqno.disabled = bool;
  548. ipt_grde.disabled = bool;
  549. ipt_fromdd.disabled = bool;
  550. ipt_todd.disabled = bool;
  551. ipt_snmdcnptid.disabled = bool;
  552. }else if(model.getValue(xDiagInfoPath+"/stat") == 'U'){
  553. ipt_tophlgcd.disabled = !bool;
  554. ipt_histlgccd.disabled = !bool;
  555. ipt_seqno.disabled = !bool;
  556. ipt_grde.disabled = !bool;
  557. ipt_fromdd.disabled = bool;
  558. ipt_todd.disabled = bool;
  559. ipt_snmdcnptid.disabled = bool;
  560. }else {
  561. ipt_tophlgcd.disabled = bool;
  562. ipt_histlgccd.disabled = bool;
  563. ipt_seqno.disabled = bool;
  564. ipt_grde.disabled = bool;
  565. ipt_fromdd.disabled = bool;
  566. ipt_todd.disabled = bool;
  567. ipt_snmdcnptid.disabled = bool;
  568. }
  569. ipt_engnm.disabled = bool;
  570. ipt_hngnm.disabled = bool;
  571. }
  572. /**
  573. * @group :
  574. * @ver : 2007.03.22
  575. * @by : 이은영
  576. * @---------------------------------------------------
  577. * @type : function
  578. * @access : public
  579. * @desc : Excel 저장 기능
  580. * @param :
  581. * @return :
  582. * @---------------------------------------------------
  583. */
  584. function fSaveExcel(){
  585. var fileName = window.fileDialog("save", ",", false, "excel", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  586. if (fileName != ""){
  587. switch(swt_diaginfo.selectedIndex){
  588. case 0:
  589. grd_tophlginfo.saveExcel(fileName, "SheetName", true, true, "", "", "false");
  590. break;
  591. case 1:
  592. grd_icdo3info.saveExcel(fileName, "SheetName", true, true, "", "", "false");
  593. break;
  594. }
  595. }
  596. }
  597. /**
  598. * @group :
  599. * @ver : 2007.03.22
  600. * @by : 이은영
  601. * @---------------------------------------------------
  602. * @type : function
  603. * @access : public
  604. * @desc : Excel 저장 기능
  605. * @param :
  606. * @return :
  607. * @---------------------------------------------------
  608. */
  609. function fRollbackTerm(){
  610. var sDiagInfo = swt_diaginfo.selectedIndex;
  611. model.removenode("/root/send");
  612. model.makeNode("/root/send/reqCond");
  613. if(sDiagInfo == "0"){
  614. model.makeNode("/root/send/tophlginfo");
  615. model.copyNode("/root/send/reqCond",xCondPath);
  616. model.copyNode("/root/send/tophlginfo",xDiagInfoPath);
  617. model.setValue("/root/send/tophlginfo/fromdd", getCurrentDate());
  618. model.setValue("/root/send/tophlginfo/todd", "99991231");
  619. model.setValue("/root/send/tophlginfo/stat", "I");
  620. model.makeValue("/root/send/reqCond/flag", "indx");
  621. submit("TXMRT00502");
  622. }else if(sDiagInfo == "1"){
  623. model.makeNode("/root/send/icdo3info");
  624. model.copyNode("/root/send/reqCond",xCondPath);
  625. model.copyNode("/root/send/icdo3info",xDiagInfoPath);
  626. model.setValue("/root/send/icdo3info/fromdd", getCurrentDate());
  627. model.setValue("/root/send/icdo3info/todd", "99991231");
  628. model.setValue("/root/send/icdo3info/stat", "I");
  629. model.makeValue("/root/send/reqCond/flag", "indx");
  630. submit("TXMRT00501")
  631. }
  632. model.resetInstanceNode(xDiagInfoPath);
  633. }
  634. /**
  635. * @group :
  636. * @ver : 2008.12.11
  637. * @by : 나종천
  638. * @---------------------------------------------------
  639. * @type : function
  640. * @access : public
  641. * @desc : 오른쪽 마우스 팝업 호출
  642. * @param :
  643. * @return :
  644. * @---------------------------------------------------
  645. */
  646. function fCallPopup(flag){
  647. if((flag == "grd_tophlginfo") || (flag == "grd_icdo3info")){
  648. if(isDataCell()){
  649. setPopupMenu(flag, false, "/root/init/func/mouserght", "label", "value");
  650. }
  651. } else if(flag == "trv_indxinfo"){
  652. if(trv_indxinfo.value == ""){
  653. return;
  654. }
  655. setPopupMenu(flag, false, "/root/init/func/trvmouserght", "label", "value");
  656. } else {
  657. initPopupMenu();
  658. }
  659. }
  660. /**
  661. * @group :
  662. * @ver : 2008.12.11
  663. * @by : 나종천
  664. * @---------------------------------------------------
  665. * @type : function
  666. * @access : public
  667. * @desc : 색인 변경 처리
  668. * @param :
  669. * @return :
  670. * @---------------------------------------------------
  671. */
  672. function fModifyIndx(){
  673. var selTab = model.getValue("/root/main/cond/indxflag");
  674. model.removenode("/root/hidden/reqdata");
  675. if(selTab == "3"){
  676. selectedRows = grd_icdo3info.selectedRows;
  677. for(var cnt = 0; cnt <= selectedRows -1; cnt++){
  678. copyNodeset("/root/hidden/reqdata/icdo3indxlist", "/root/main/icdo3info/icdo3list[" + grd_icdo3info.selectedrow(cnt) + "]", "append");
  679. }
  680. } else if(selTab == "1"){
  681. selectedRows = grd_tophlginfo.selectedRows;
  682. for(var cnt = 0; cnt <= selectedRows -1; cnt++){
  683. copyNodeset("/root/hidden/reqdata/tophlgindxlist", "/root/main/tophlginfo/tophlglist[" + grd_tophlginfo.selectedrow(cnt) + "]", "append");
  684. }
  685. }
  686. }
  687. /**
  688. * @group :
  689. * @ver : 2008.12.11
  690. * @by : 나종천
  691. * @---------------------------------------------------
  692. * @type : function
  693. * @access : public
  694. * @desc : 색인 변경할 인덱스로 이동 처리
  695. * @param :
  696. * @return :
  697. * @---------------------------------------------------
  698. */
  699. function fPasteIndx(){
  700. var selTab = model.getValue("/root/main/cond/indxflag");
  701. var iIndx = trv_indxinfo.focusIndex + 1;
  702. var selIndxCd = model.getValue("/root/main/indxinfo/indxlist[" + iIndx + "]/indxcd");
  703. var msg = messageBox("색인을", "Q012");
  704. if(msg == "7"){
  705. return;
  706. }
  707. switch(selTab){
  708. case "1":
  709. copyNodeset("/root/send/reqdata/tophlgindxlist", "/root/hidden/reqdata/tophlgindxlist");
  710. model.makeValue("/root/send/reqdata/chnginfo/chngindxcd", selIndxCd);
  711. model.makeValue("/root/send/reqdata/chnginfo/indxflag", selTab);
  712. if(msg == "6"){
  713. if(submit("TXMRT00504")){
  714. messageBox("색인 변경이","I001");
  715. grd_tophlginfo.refresh();
  716. } else {
  717. messageBox("색인 변경을","E009");
  718. }
  719. }
  720. model.removeNodeset("/root/send/reqdata");
  721. model.removeNodeset("/root/hidden/reqdata");
  722. break;
  723. case "3":
  724. copyNodeset("/root/send/reqdata/icdo3indxlist", "/root/hidden/reqdata/icdo3indxlist");
  725. model.makeValue("/root/send/reqdata/chnginfo/chngindxcd", selIndxCd);
  726. model.makeValue("/root/send/reqdata/chnginfo/indxflag", selTab);
  727. if(msg == "6"){
  728. if(submit("TXMRT00503")){
  729. messageBox("색인 변경이","I001");
  730. grd_icdo3info.refresh();
  731. } else {
  732. messageBox("색인 변경을","E009");
  733. }
  734. }
  735. model.removeNodeset("/root/send/reqdata");
  736. model.removeNodeset("/root/hidden/reqdata");
  737. break;
  738. }
  739. }