SPMNR037.js 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772
  1. /*
  2. 간호일지타입II_부서별SET 조회 (SMMNR03700.xfm - JScript )
  3. - Version :
  4. 1) : Ver.1.00.01
  5. */
  6. var xGrupInfoPath = "/root/main/grupinfo/gruplist"; // 그룹 경로
  7. var xStmtSetListPath = "/root/main/stmtsetinfo/stmtsetlist"; // 그룹별 진술문 경로
  8. var xSelectedStmtListPath = "/root/main/selectedstmtinfo/stmtlist"; // 선택된 진술문 경로
  9. var xNStmtSetListPath = "/root/main/stmtsetinfo/nstmtsetlist"; // 20080621 김홍점 SET 진술문 정보
  10. var xDStmtSetListPath = "/root/main/stmtsetinfo/dstmtsetlist"; // 20080621 김홍점 SET 진술문 정보
  11. var xAStmtSetListPath = "/root/main/stmtsetinfo/astmtsetlist"; // 20080621 김홍점 SET 진술문 정보
  12. var xRStmtSetListPath = "/root/main/stmtsetinfo/rstmtsetlist"; // 20080621 김홍점 SET 진술문 정보
  13. var xHiddenGrupInfoPath = "/root/hidden/grupinfo/gruplist"; //20080621 김홍점 추가 set그룹 hidden
  14. var xLrgGrupInfoPath = "/root/main/grupinfo/lrggruplist" ;//20080621 김홍점 추가 set그룹
  15. var xMdlGrupInfoPath = "/root/main/grupinfo/mdlgruplist" ;//20080621 김홍점 추가 set그룹
  16. var xSmlGrupInfoPath = "/root/main/grupinfo/smlgruplist" ;//20080621 김홍점 추가 set그룹
  17. var xSmlGrupInfoPath2 = "/root/main/grupinfo/smlgruplist2" ;//20080621 김홍점 추가 set그룹
  18. var gReturnGrupcd = "";
  19. var gGrupFlag="";
  20. /**
  21. * @group :
  22. * @ver : 2007.06.20
  23. * @by : 이은영
  24. * @---------------------------------------------------
  25. * @type : function
  26. * @access : public
  27. * @desc : 화면 초기화
  28. * @param :
  29. * @return :
  30. * @---------------------------------------------------
  31. */
  32. function fInitialize(){
  33. grd_nursingd.fixedcellcheckbox(0, grd_nursingd.colRef("check")) = true;
  34. grd_data.fixedcellcheckbox(0, grd_data.colRef("check")) = true;
  35. grd_action.fixedcellcheckbox(0, grd_action.colRef("check")) = true;
  36. grd_result.fixedcellcheckbox(0, grd_result.colRef("check")) = true;
  37. var sDeptcd = opener.javascript.getParameter("SPMNR03700_Param"); // 부서코드
  38. opener.javascript.setParameter("SPMNR03700_Return","");
  39. model.makeValue("/root/send/deptcd", sDeptcd); // 부서코드
  40. model.makeValue("/root/send/grupflag", "1"); // 그룹구분
  41. model.removenodeset(xStmtSetListPath);
  42. model.removenodeset(xSelectedStmtListPath);
  43. fSettingLrgMdlSml("A",grd_lrg,xLrgGrupInfoPath); // SET 그룹 정보 조회
  44. // if(submit("TRMNR03701")){
  45. // var sRowCnt = grd_grupinfo.rows-grd_grupinfo.fixedRows;
  46. //
  47. // for(var i=1; i<=sRowCnt; i++){
  48. // sDepth = eval(model.getValue(xGrupInfoPath+"["+i+"]/depth"));
  49. // grd_grupinfo.outlinelevel(i)=sDepth;
  50. // }
  51. // grd_grupinfo.OutlineCol=1; //연결선이 표현되는 컬럼
  52. // grd_grupinfo.OutlineBar=4; //연결선 형태 설정 (+ , - , 사각형 안보이게 하려면 0 으로 세팅)
  53. // grd_grupinfo.TreeColor="gray";
  54. // // 자식 접기
  55. // for(var i=1; i<=sRowCnt; i++){
  56. // sDepth = eval(model.getValue(xGrupInfoPath+"["+i+"]/depth"));
  57. // if(sDepth>2){
  58. // grd_grupinfo.iscollapsed(i)=true; //자식 트리 접기
  59. // }
  60. // }
  61. // }
  62. }
  63. /**
  64. * @group :
  65. * @ver : 2007.06.20
  66. * @by : 이은영
  67. * @---------------------------------------------------
  68. * @type : function
  69. * @access : public
  70. * @desc : SET별 진술문 정보를 조회
  71. * @param :
  72. * @return :
  73. * @---------------------------------------------------
  74. */
  75. //function fSearchStmtSetList(){
  76. // var iGrupRow = grd_grupinfo.row;
  77. // if(iGrupRow < 1) return;
  78. // // 자식 접기 or 펼치기
  79. // sDepth = eval(model.getValue(xGrupInfoPath+"["+iGrupRow+"]/depth"));
  80. // if(sDepth < 4){
  81. // sRowCnt = grd_grupinfo.rows - grd_grupinfo.fixedrows;
  82. // if(grd_grupinfo.iscollapsed(iGrupRow) == true){
  83. // sBoolStatus = false;
  84. // }else{
  85. // sBoolStatus = true;
  86. // }
  87. //
  88. // for(var i=iGrupRow; i<=sRowCnt; i++){
  89. // iDepth = eval(model.getValue(xGrupInfoPath+"["+i+"]/depth"));
  90. // if(i==iGrupRow){
  91. // grd_grupinfo.iscollapsed(i) = sBoolStatus;
  92. // }else if(i != iGrupRow && sDepth < iDepth){
  93. // grd_grupinfo.iscollapsed(i) = sBoolStatus;
  94. // }else{
  95. // break;
  96. // }
  97. // }
  98. // }
  99. // model.removenode("/root/send");
  100. // model.makeValue("/root/send/grupcd", model.getValue(xGrupInfoPath+"["+iGrupRow+"]/grupcd"));
  101. // model.makeValue("/root/send/dnarflag", "%");
  102. // if(submit("TRMNR03702")){
  103. // grd_grupstmtinfo.mergecells = "bycol";
  104. // grd_grupstmtinfo.mergecol(2) = false;
  105. // grd_grupstmtinfo.mergecol(3) = false;
  106. // grd_grupstmtinfo.allstyle("data","color") = "#000000";
  107. // for(var iRow=grd_grupstmtinfo.fixedrows; iRow<=grd_grupstmtinfo.rows-grd_grupstmtinfo.fixedrows; iRow++){
  108. // if(eval(model.getValue(xStmtSetListPath+"["+iRow+"]/attrcnt"))>0){
  109. // grd_grupstmtinfo.cellstyle("color",iRow,3) = "#33CC33"; // 녹색
  110. // }
  111. // }
  112. // grd_grupstmtinfo.resizeCells();
  113. // }
  114. //}
  115. /**
  116. * @group :
  117. * @ver : 2007.06.20
  118. * @by : 이은영
  119. * @---------------------------------------------------
  120. * @type : function
  121. * @access : public
  122. * @desc : SET별 진술문 정보를 선택
  123. * @param :
  124. * @return :
  125. * @---------------------------------------------------
  126. */
  127. function fClickedGridRow(pObj, pListPath, pRow, pCol){
  128. var iRow = pRow;
  129. var iCol = pCol;
  130. if(iRow < 1 || iRow > pObj.rows) return;
  131. if(iCol != pObj.colRef("check")) {
  132. if(model.getValue(pListPath+"["+iRow+"]/check") == "true"){
  133. model.setValue(pListPath+"["+iRow+"]/check","false");
  134. }else{
  135. model.setValue(pListPath+"["+iRow+"]/check","true");
  136. }
  137. }
  138. if( pObj == grd_nursingd ){
  139. fSettingGridBackColorNew(pRow);
  140. }
  141. }
  142. /**
  143. * @group :
  144. * @ver : 2007.06.20
  145. * @by : 이은영
  146. * @---------------------------------------------------
  147. * @type : function
  148. * @access : public
  149. * @desc : 진술문 보내기
  150. * @param :
  151. * @return :
  152. * @---------------------------------------------------
  153. */
  154. function fSendStmtInfo(){
  155. var sStmtCnt = grd_stmtinfo.rows - grd_stmtinfo.fixedrows;
  156. var xAttrInfo = "/root/init/recinfo/attrinfo"; // opener의 속성 경로
  157. var xSelectedAttrInfo = "/root/main/attrlist/attrinfo"; // 선택된 진술문의 속성 경로
  158. var sAttrCnt = 0;
  159. var sSelectedAttrCnt = 0;
  160. var sAttrInfo = "";
  161. var sStmtInfo = "grupcd▦grupnm▦stmtcd▦stmtcnts▦attrinfo1▦attrinfo2▦attressnyn▦dnarflag▦attrcnt▦diagstmtcd▩";
  162. model.removenode("/root/send");
  163. model.makeNode("/root/send/attrinfo");
  164. for(var i=grd_stmtinfo.fixedrows; i<=sStmtCnt; i++){
  165. sAttrInfo = model.getValue(xSelectedStmtListPath+"["+i+"]/attrinfo1").split("⊙");
  166. sStmtInfo += model.getValue(xSelectedStmtListPath+"["+i+"]/grupcd") + "▦"
  167. + model.getValue(xSelectedStmtListPath+"["+i+"]/grupnm") + "▦"
  168. + model.getValue(xSelectedStmtListPath+"["+i+"]/stmtcd") + "▦"
  169. + model.getValue(xSelectedStmtListPath+"["+i+"]/stmtcnts") + "▦"
  170. + model.getValue(xSelectedStmtListPath+"["+i+"]/attrinfo1") + "▦"
  171. + model.getValue(xSelectedStmtListPath+"["+i+"]/attrinfo2") + "▦"
  172. + model.getValue(xSelectedStmtListPath+"["+i+"]/attressnyn") + "▦"
  173. + model.getValue(xSelectedStmtListPath+"["+i+"]/dnarflag") + "▦"
  174. + model.getValue(xSelectedStmtListPath+"["+i+"]/attrcnt") + "▦"
  175. + model.getValue(xSelectedStmtListPath+"["+i+"]/diagstmtcd") + "▩"
  176. // 문장 내의 속성 가져오기
  177. for(var j=0; j<sAttrInfo.length-1; j++){
  178. // 간호일지타입II에 속성이 존재하는지 유무를 체크
  179. if(opener.model.getValue(xAttrInfo+"[attrcd = '"+sAttrInfo[j]+"']/attrcd") != "") continue;
  180. if(fExistAttrCd(sAttrInfo[j]) == "Y") continue;
  181. sSendData = model.getValue("/root/send/attrinfo");
  182. if(sSendData != "") sSendData += ",";
  183. sSendData += sAttrInfo[j];
  184. model.setValue("/root/send/attrinfo", sSendData);
  185. }
  186. }
  187. if(model.getValue("/root/send/attrinfo") != ""){
  188. if(submit("TRMNR03703")){
  189. sAttrCnt = getNodesetCnt(opener.model,xAttrInfo)+1;
  190. sSelectedAttrCnt = getNodesetCnt(model, xSelectedAttrInfo);
  191. for(var iRow = 1; iRow <= sSelectedAttrCnt; iRow++){
  192. opener.model.makeValue(xAttrInfo+"["+sAttrCnt+"]/attrcd", model.getValue(xSelectedAttrInfo+"["+iRow+"]/attrcd"));
  193. opener.model.makeValue(xAttrInfo+"["+sAttrCnt+"]/attrnm", model.getValue(xSelectedAttrInfo+"["+iRow+"]/attrnm"));
  194. opener.model.makeValue(xAttrInfo+"["+sAttrCnt+"]/attrflag", model.getValue(xSelectedAttrInfo+"["+iRow+"]/attrflag"));
  195. opener.model.makeValue(xAttrInfo+"["+sAttrCnt+"]/supcd", model.getValue(xSelectedAttrInfo+"["+iRow+"]/supcd"));
  196. opener.model.makeValue(xAttrInfo+"["+sAttrCnt+"]/unitnm", model.getValue(xSelectedAttrInfo+"["+iRow+"]/unitnm"));
  197. opener.model.makeValue(xAttrInfo+"["+sAttrCnt+"]/plnumchoiyn", model.getValue(xSelectedAttrInfo+"["+iRow+"]/plnumchoiyn"));
  198. sAttrCnt++;
  199. }
  200. }
  201. }
  202. opener.javascript.setParameter("SPMNR03700_Return", sStmtInfo);
  203. model.close();
  204. }
  205. /**
  206. * @group :
  207. * @ver : 2007.04.25
  208. * @by : 이은영
  209. * @---------------------------------------------------
  210. * @type : function
  211. * @access : public
  212. * @desc : 가져올 데이터의 속성 코드 존재 유무 check
  213. * @param :
  214. * @return :
  215. * @---------------------------------------------------
  216. */
  217. function fExistAttrCd(pAttrCD){
  218. var sAttrInfo = model.getValue("/root/send/attrinfo").split(",");
  219. for(var i=0; i<sAttrInfo.length; i++){
  220. if(sAttrInfo[i] == pAttrCD){
  221. return "Y";
  222. }
  223. }
  224. return "N";
  225. }
  226. /**
  227. * @group :
  228. * @ver : 2007.04.30
  229. * @by : 이은영
  230. * @---------------------------------------------------
  231. * @type : function
  232. * @access : public
  233. * @desc : 진술문 존재 여부 체크
  234. * @param :
  235. * @return :
  236. * @---------------------------------------------------
  237. */
  238. function fExistStmtCd(pStmtCD, pStmtlist, pGrupCD){
  239. var sStmtList = pStmtlist.split("▩");
  240. var sStmtInfo;
  241. var iRtnMsg = 0;
  242. var sStmtCnts = "";
  243. sStmtCnts = model.getValue(xSaveSetInfoPath+"[stmtcd='"+pStmtCD+"']/stmtcnts");
  244. //간호진단내역의 진단코드의 그룹코드와 set조회에서 선택한 진단의 그룹코드가 같을때만...
  245. //선택한 간호진술문이 간호진단과는 연결되어 있지 않을경우는 그냥 저장. 간호진단과 연결된경우 메시지박스
  246. // var nodeList = instance1.selectNodes(xCareDiagListPath + "[stmtcd = '"+ pStmtCD +"' and grupcd4='"+pGrupCD+"'and todt ='']/recverno");
  247. //
  248. // if(nodeList != null && nodeList.length > 0 ){
  249. // iRtnMsg = messageBox("동일 간호과정 Set 분류에서 선택된 동일 진단이 존재합니다. 기록될 번호는\" "+nodeList.item(0).value+"\"","I009");
  250. //
  251. // return "Y";
  252. // }
  253. //
  254. // if(model.getValue(xNursingRecordListPath+"[recdd='"+sRecDD+"' and rectm='"+sRecTM+"' and stmtcd='"+pStmtCD+"']/stmtcd") != ""){
  255. // iRtnMsg = messageBox("동일 시간 때에 \""+sStmtCnts+"\" 문장이 존재합니다. 등록을","Q003");
  256. // if(iRtnMsg != "6"){
  257. // return "Y";
  258. // }
  259. // }
  260. for(var i=0; i<sStmtList.length; i++){
  261. if(getArrayData(pStmtlist,i,4)== pStmtCD){
  262. return "Y";
  263. }
  264. }
  265. return "N";
  266. }
  267. /**
  268. * @group :
  269. * @ver : 2007.06.22
  270. * @by : 이은영
  271. * @---------------------------------------------------
  272. * @type : function
  273. * @access : public
  274. * @desc : 전송할 진술문 선택
  275. * @param :
  276. * @return :
  277. * @---------------------------------------------------
  278. */
  279. function fSelectStmtInfo(){
  280. var sStmtCD = "";
  281. var sGrupCD = "";
  282. var sRAN = "";
  283. var sRAD = "";
  284. var sRAA = "";
  285. var sRAR = "";
  286. var sReplace = "replace";
  287. var sAfter = "after";
  288. //var sStmtCnt = grd_grupstmtinfo.rows - grd_grupstmtinfo.fixedrows;
  289. var iSelectStmtRow = 0;
  290. var sGrupCdPath = (gGrupFlag == '3'? xSmlGrupInfoPath2 : xSmlGrupInfoPath );
  291. model.removeNode(xStmtSetListPath);
  292. model.makeNode(xStmtSetListPath);
  293. copyNodesetType(xStmtSetListPath, xNStmtSetListPath, "replace", model, model);
  294. copyNodesetType(xStmtSetListPath, xDStmtSetListPath, "after", model, model);
  295. copyNodesetType(xStmtSetListPath, xAStmtSetListPath, "after", model, model);
  296. copyNodesetType(xStmtSetListPath, xRStmtSetListPath, "after", model, model);
  297. sGrupCD = gReturnGrupcd;
  298. for(var iRow=1; iRow<=getNodesetCount(xStmtSetListPath); iRow++){
  299. sDNARFlag = model.getValue(xStmtSetListPath+"["+iRow+"]/dnarflag");
  300. if(model.getValue(xStmtSetListPath+"["+iRow+"]/check") == "true"){
  301. sStmtCd = model.getValue(xStmtSetListPath+"["+iRow+"]/stmtcd");
  302. cnt = model.getValue(xStmtSetListPath+"["+iRow+"]/cnt");
  303. if(cnt < 1 || cnt == "" ){
  304. grd_stmtinfo.addRow(false);
  305. iSelectStmtRow = grd_stmtinfo.rows - grd_stmtinfo.fixedrows;
  306. model.setValue(xSelectedStmtListPath+"["+iSelectStmtRow+"]/grupnm", model.getValue(sGrupCdPath+"[grupcd ='"+sGrupCD+"']/hngnm"));
  307. model.setValue(xSelectedStmtListPath+"["+iSelectStmtRow+"]/dnarflag",model.getValue(xStmtSetListPath+"["+iRow+"]/dnarflag"));
  308. model.setValue(xSelectedStmtListPath+"["+iSelectStmtRow+"]/stmtcnts",model.getValue(xStmtSetListPath+"["+iRow+"]/stmtcnts"));
  309. model.setValue(xSelectedStmtListPath+"["+iSelectStmtRow+"]/stmtcd",sStmtCd);
  310. model.setValue(xSelectedStmtListPath+"["+iSelectStmtRow+"]/attrcnt",model.getValue(xStmtSetListPath+"["+iRow+"]/attrcnt"));
  311. model.setValue(xSelectedStmtListPath+"["+iSelectStmtRow+"]/grupcd",sGrupCD);
  312. model.setValue(xSelectedStmtListPath+"["+iSelectStmtRow+"]/attrinfo1",model.getValue(xStmtSetListPath+"["+iRow+"]/attrinfo1"));
  313. model.setValue(xSelectedStmtListPath+"["+iSelectStmtRow+"]/attrinfo2",model.getValue(xStmtSetListPath+"["+iRow+"]/attrinfo2"));
  314. model.setValue(xSelectedStmtListPath+"["+iSelectStmtRow+"]/attressnyn",model.getValue(xStmtSetListPath+"["+iRow+"]/attressnyn"));
  315. if(sDNARFlag == "2N" ){
  316. model.setValue(xSelectedStmtListPath+"["+iSelectStmtRow+"]/diagstmtcd",sStmtCd);
  317. }else {
  318. model.setValue(xSelectedStmtListPath+"["+iSelectStmtRow+"]/diagstmtcd","");
  319. }
  320. }else{
  321. //분류별 진단 코드 생성(추가이유 : 현재 분류별 진단코드를 생성하기 위함)
  322. var sChkStmtCd = fCreatDiag(sStmtCd);
  323. var sDiagStmtCd = sChkStmtCd.split("▦");
  324. for(i = 0; i < cnt ; i++){
  325. grd_stmtinfo.addRow(false);
  326. iSelectStmtRow = grd_stmtinfo.rows - grd_stmtinfo.fixedrows;
  327. sGrupCD = gReturnGrupcd;
  328. model.setValue(xSelectedStmtListPath+"["+iSelectStmtRow+"]/grupnm", model.getValue(sGrupCdPath+"[grupcd ='"+sGrupCD+"']/hngnm"));
  329. model.setValue(xSelectedStmtListPath+"["+iSelectStmtRow+"]/dnarflag",model.getValue(xStmtSetListPath+"["+iRow+"]/dnarflag"));
  330. model.setValue(xSelectedStmtListPath+"["+iSelectStmtRow+"]/stmtcnts",model.getValue(xStmtSetListPath+"["+iRow+"]/stmtcnts"));
  331. model.setValue(xSelectedStmtListPath+"["+iSelectStmtRow+"]/stmtcd",sStmtCd);
  332. model.setValue(xSelectedStmtListPath+"["+iSelectStmtRow+"]/attrcnt",model.getValue(xStmtSetListPath+"["+iRow+"]/attrcnt"));
  333. model.setValue(xSelectedStmtListPath+"["+iSelectStmtRow+"]/grupcd",sGrupCD);
  334. model.setValue(xSelectedStmtListPath+"["+iSelectStmtRow+"]/attrinfo1",model.getValue(xStmtSetListPath+"["+iRow+"]/attrinfo1"));
  335. model.setValue(xSelectedStmtListPath+"["+iSelectStmtRow+"]/attrinfo2",model.getValue(xStmtSetListPath+"["+iRow+"]/attrinfo2"));
  336. model.setValue(xSelectedStmtListPath+"["+iSelectStmtRow+"]/attressnyn",model.getValue(xStmtSetListPath+"["+iRow+"]/attressnyn"));
  337. model.setValue(xSelectedStmtListPath+"["+iSelectStmtRow+"]/diagstmtcd",sDiagStmtCd[i]);
  338. }
  339. }
  340. }
  341. }
  342. model.removenodeset(xNStmtSetListPath);
  343. model.removenodeset(xDStmtSetListPath);
  344. model.removenodeset(xAStmtSetListPath);
  345. model.removenodeset(xRStmtSetListPath);
  346. grd_stmtinfo.mergecells = "bycol";
  347. grd_stmtinfo.mergecol(3) = false;
  348. grd_stmtinfo.refresh();
  349. grp_dnarset.refresh();
  350. grp_dnarset.visible = false;
  351. }
  352. /**
  353. * @group :
  354. * @ver : 2007.09.14
  355. * @by : 양천덕
  356. * @---------------------------------------------------
  357. * @type : function
  358. * @access : public
  359. * @desc : 진술문 코드별 진단 코드 생성
  360. * @param : pStmtCd : 진술문코드
  361. * @return :
  362. * @---------------------------------------------------
  363. */
  364. function fCreatDiag(pStmtCd){
  365. var pSetDiagCd ="";
  366. for(var iRow=1; iRow<=getNodesetCount(xStmtSetListPath); iRow++){
  367. if( model.getValue(xStmtSetListPath+"["+iRow+"]/dnarflag") == "2N"
  368. && model.getValue(xStmtSetListPath+"["+iRow+"]/check")== "true" ){
  369. var sLnkStmt = model.getValue(xStmtSetListPath+"["+iRow+"]/lnkstmt");
  370. var sStmtCD = sLnkStmt.split(",");
  371. for(var iStmt=0; iStmt < sStmtCD.length; iStmt++){
  372. if(pStmtCd == sStmtCD[iStmt]){
  373. pSetDiagCd += model.getValue(xStmtSetListPath+"["+iRow+"]/stmtcd")+"▦" ;
  374. }
  375. }
  376. }
  377. }
  378. return pSetDiagCd;
  379. }
  380. /**
  381. * @group :
  382. * @ver : 2007.06.22
  383. * @by : 이은영
  384. * @---------------------------------------------------
  385. * @type : function
  386. * @access : public
  387. * @desc : 전송할 진술문 삭제
  388. * @param :
  389. * @return :
  390. * @---------------------------------------------------
  391. */
  392. function fDelSelectedStmtInfo(){
  393. //멀티삭제로 수정 20080702 김홍점
  394. // var iRow = grd_stmtinfo.row;
  395. //
  396. // if( iRow < 1) return;
  397. //
  398. // grd_stmtinfo.deleteRow(iRow);
  399. deleteSelectedRows(grd_stmtinfo,false);
  400. grd_stmtinfo.rebuild();
  401. }
  402. function fSettingLrgMdlSml(pFlag,pCntlObj,pPath,pGrupFlag){
  403. var sSupCd = "";
  404. var sDepth = 0;
  405. sGrupFlag = pGrupFlag;
  406. gGrupFlag = pGrupFlag;
  407. model.removenodeset(xHiddenGrupInfoPath);
  408. model.makeNode(xHiddenGrupInfoPath);
  409. if ( pFlag == "A"){
  410. sSupCd = "********";
  411. model.removenodeset(xLrgGrupInfoPath);
  412. model.removenodeset(xMdlGrupInfoPath);
  413. model.removenodeset(xSmlGrupInfoPath);
  414. model.removenodeset(xSmlGrupInfoPath2);
  415. model.removenode("/root/send");
  416. model.makeValue("/root/send/supcd",sSupCd);
  417. model.makeValue("/root/send/grupflag","-");
  418. model.makeValue("/root/send/flag","Y");//가로 그리드 조회임을 구분
  419. if(submit("TRMNR00701")){
  420. if (getNodesetCount(xHiddenGrupInfoPath) > 0){
  421. model.makeNode(xLrgGrupInfoPath);
  422. copyNodesetType(xLrgGrupInfoPath, xHiddenGrupInfoPath, "replace", model, model);
  423. }
  424. }
  425. pCntlObj.refresh();
  426. model.refresh();
  427. }else if( pFlag == "L" && pCntlObj.row > 0){
  428. sSupCd = model.getValue(xLrgGrupInfoPath+"["+ pCntlObj.row +"]/grupcd");
  429. model.removenodeset(xMdlGrupInfoPath);
  430. model.removenodeset(xSmlGrupInfoPath);
  431. model.removenodeset(xSmlGrupInfoPath2);
  432. model.removenode("/root/send");
  433. model.makeValue("/root/send/supcd",sSupCd);
  434. model.makeValue("/root/send/grupflag","-");
  435. model.makeValue("/root/send/flag","Y");
  436. if(sGrupFlag == 3){ // 부서별은 자기의 부서만 조회
  437. grd_sml2.visible = true;
  438. grd_mdl.caption = "부서^grupcd^deptcd^depth^grupflag";
  439. grd_sml.caption = "중분류^grupcd^deptcd^depth^grupflag";
  440. grd_sml2.caption = "소분류^grupcd^deptcd^depth^grupflag";
  441. //model.makeValue("/root/send/deptcd", getUserInfo("dutplcecd") ); 20080723 소속부서만 조회되는게 아니라 해당 소속부서를 셀선택 해달라고 요청 김홍점
  442. }else{
  443. grd_sml2.visible = false;
  444. grd_mdl.caption = "중분류^grupcd^deptcd^depth^grupflag";
  445. grd_sml.caption = "소분류^grupcd^deptcd^depth^grupflag";
  446. }
  447. if(submit("TRMNR00701")){
  448. if (getNodesetCount(xHiddenGrupInfoPath) > 0){
  449. model.makeNode(xMdlGrupInfoPath);
  450. copyNodesetType(xMdlGrupInfoPath, xHiddenGrupInfoPath, "replace", model, model);
  451. }
  452. }
  453. pCntlObj.refresh();
  454. model.refresh();
  455. }else if( pFlag == "M" && pCntlObj.row > 0){
  456. sSupCd = model.getValue(xMdlGrupInfoPath+"["+ pCntlObj.row +"]/grupcd");
  457. model.removenodeset(xSmlGrupInfoPath);
  458. model.removenodeset(xSmlGrupInfoPath2);
  459. model.removenode("/root/send");
  460. model.makeValue("/root/send/supcd",sSupCd);
  461. model.makeValue("/root/send/grupflag","-");
  462. model.makeValue("/root/send/flag","Y");
  463. // if(sGrupFlag == 3){ // 부서별은 자기의 부서만 조회 20080709 타부서도 봐야한대서 주석
  464. // model.makeValue("/root/send/deptcd", getUserInfo("dutplcecd") );
  465. // }
  466. if(submit("TRMNR00701")){
  467. if (getNodesetCount(xHiddenGrupInfoPath) > 0){
  468. model.makeNode(xSmlGrupInfoPath);
  469. copyNodesetType(xSmlGrupInfoPath, xHiddenGrupInfoPath, "replace", model, model);
  470. }
  471. }
  472. pCntlObj.refresh();
  473. model.refresh();
  474. }else if( pFlag == "S" && pCntlObj.row > 0){
  475. sSupCd = model.getValue(xSmlGrupInfoPath+"["+ pCntlObj.row +"]/grupcd");
  476. if(sGrupFlag == 3){ // 부서별은 자기의 부서만 조회
  477. model.removenodeset(xSmlGrupInfoPath2);
  478. model.removenode("/root/send");
  479. model.makeValue("/root/send/supcd",sSupCd);
  480. model.makeValue("/root/send/grupflag","-");
  481. model.makeValue("/root/send/flag","Y");
  482. if(submit("TRMNR00701")){
  483. if (getNodesetCount(xHiddenGrupInfoPath) > 0){
  484. model.makeNode(xSmlGrupInfoPath2);
  485. copyNodesetType(xSmlGrupInfoPath2, xHiddenGrupInfoPath, "replace", model, model);
  486. }
  487. }
  488. }else{
  489. gReturnGrupcd = sSupCd;
  490. fSearchSrchTool("StmtSet",pCntlObj.row, sSupCd );
  491. }
  492. pCntlObj.refresh();
  493. model.refresh();
  494. }else if( pFlag == "S2" && pCntlObj.row > 0){
  495. sSupCd = model.getValue(xSmlGrupInfoPath2+"["+ pCntlObj.row +"]/grupcd");
  496. gReturnGrupcd = sSupCd;
  497. fSearchSrchTool("StmtSet",pCntlObj.row, sSupCd );
  498. }
  499. }
  500. function fSearchSrchTool(pFlag,pRow,pGrupCd){
  501. var sGrupCd = pGrupCd;
  502. var sGrupRow = pRow;
  503. grp_dnarset.visible = true;
  504. model.removenode("/root/send");
  505. model.makeValue("/root/send/grupcd", sGrupCd);
  506. model.makeValue("/root/send/dnarflag","%");//전체
  507. //model.makeValue("/root/send/dnarflag",model.getValue(xSrchToolCondPath+"/dnarflag"));20080624 김홍점
  508. if(submit("TRMNR00702")){
  509. //fSettingStmtSet();
  510. fSettingStmtStyle("newsetinfo");
  511. }
  512. }
  513. //function fSettingStmtSet(pFlag){//pFlag : ND일경우 간호진단 검색 탭에서 카피한다.
  514. // model.removenodeset(xNStmtSetListPath);
  515. // model.removenodeset(xDStmtSetListPath);
  516. // model.removenodeset(xAStmtSetListPath);
  517. // model.removenodeset(xRStmtSetListPath);
  518. // model.refresh();
  519. //
  520. // if (getNodesetCount(xHiddenStmtSetInfoPath) > 0){
  521. //
  522. // if( getNodesetCount(xHiddenStmtSetInfoPath+"/nstmtsetlist") > 0 ){
  523. // model.makeNode(xNStmtSetListPath);
  524. // copyNodesetType(xNStmtSetListPath, xHiddenStmtSetInfoPath+"/nstmtsetlist", "replace", model, model);
  525. // grd_nursingd.resizeCells();
  526. // grd_nursingd.refresh();
  527. // }
  528. //
  529. // if( getNodesetCount(xHiddenStmtSetInfoPath+"/dstmtsetlist") > 0 ){
  530. // model.makeNode(xDStmtSetListPath);
  531. // copyNodesetType(xDStmtSetListPath, xHiddenStmtSetInfoPath+"/dstmtsetlist", "replace", model, model);
  532. // grd_data.resizeCells();
  533. // grd_data.refresh();
  534. // }
  535. //
  536. // if( getNodesetCount(xHiddenStmtSetInfoPath+"/astmtsetlist") > 0 ){
  537. // model.makeNode(xAStmtSetListPath);
  538. // copyNodesetType(xAStmtSetListPath, xHiddenStmtSetInfoPath+"/astmtsetlist", "replace", model, model);
  539. // grd_action.resizeCells();
  540. // grd_action.refresh();
  541. // }
  542. //
  543. // if( getNodesetCount(xHiddenStmtSetInfoPath+"/rstmtsetlist") > 0 ){
  544. // model.makeNode(xRStmtSetListPath);
  545. // copyNodesetType(xRStmtSetListPath, xHiddenStmtSetInfoPath+"/rstmtsetlist", "replace", model, model);
  546. // grd_result.resizeCells();
  547. // grd_result.refresh();
  548. // }
  549. // fSettingStmtStyle("newsetinfo");
  550. // }
  551. // //model.refresh();
  552. //}
  553. /**
  554. * @group :
  555. * @ver : 2007.04.19
  556. * @by : 이은영
  557. * @---------------------------------------------------
  558. * @type : function
  559. * @access : public
  560. * @desc : 진술문 폰트 color 설정 - 속성이 있는 경우 진술문 폰트 색상을 변경한다.
  561. * @param : pFlag ( setinfo : set, stmtinfo : 진술문 검색)
  562. * @return :
  563. * @---------------------------------------------------
  564. */
  565. function fSettingStmtStyle(pFlag){
  566. switch(pFlag){
  567. case "newsetinfo" : // set DAR별로 속성이 존재하는것은 폰트색변경20080623 김홍점
  568. var iTgStmtRow = 0;
  569. grd_data.allstyle("data","color") = "#000000";
  570. var sStmtCDList = instance1.selectNodes(xDStmtSetListPath+"[attrcnt > 0]/stmtcd");
  571. for(var idx=0; idx < sStmtCDList.length; idx++){
  572. iTgStmtRow = grd_data.findRow(sStmtCDList.item(idx).value ,1,grd_data.colRef("stmtcd"),true,true);
  573. if(iTgStmtRow < 0){
  574. // 셋에 속성이 없을 경우 pass
  575. } else {
  576. grd_data.cellstyle("color",iTgStmtRow,grd_data.colRef("stmtcnts")) = "#6600ff";
  577. }
  578. }
  579. grd_action.allstyle("data","color") = "#000000";
  580. sStmtCDList = instance1.selectNodes(xAStmtSetListPath+"[attrcnt > 0]/stmtcd");
  581. for(var idx=0; idx < sStmtCDList.length; idx++){
  582. iTgStmtRow = grd_action.findRow(sStmtCDList.item(idx).value ,1,grd_action.colRef("stmtcd"),true,true);
  583. if(iTgStmtRow < 0){
  584. // 셋에 속성이 없을 경우 pass
  585. } else {
  586. grd_action.cellstyle("color",iTgStmtRow,grd_action.colRef("stmtcnts")) = "#6600ff";
  587. }
  588. }
  589. grd_result.allstyle("data","color") = "#000000";
  590. sStmtCDList = instance1.selectNodes(xRStmtSetListPath+"[attrcnt > 0]/stmtcd");
  591. for(var idx=0; idx < sStmtCDList.length; idx++){
  592. iTgStmtRow = grd_result.findRow(sStmtCDList.item(idx).value ,1,grd_result.colRef("stmtcd"),true,true);
  593. if(iTgStmtRow < 0){
  594. // 셋에 속성이 없을 경우 pass
  595. } else {
  596. grd_result.cellstyle("color",iTgStmtRow,grd_result.colRef("stmtcnts")) = "#6600ff";
  597. }
  598. }
  599. model.refresh();
  600. break;
  601. }
  602. }
  603. /**
  604. * @group :
  605. * @ver : 2008.06.23
  606. * @by : 김홍점
  607. * @---------------------------------------------------
  608. * @type : function
  609. * @access : public
  610. * @desc : 선택된 진술문 별로 표준간호과정 등록된 진술문에 바탕색을 변경
  611. * @param :
  612. * @return :
  613. * @---------------------------------------------------
  614. */
  615. function fSettingGridBackColorNew(pRow){
  616. var iRow = pRow;//grd_nursingd.selectedRow;
  617. var sDNARFlag = model.getValue(xNStmtSetListPath+"["+iRow+"]/dnarflag");
  618. var sCheck = model.getValue(xNStmtSetListPath+"["+iRow+"]/check");
  619. var iTgStmtRow = 0;
  620. var sLnkStmt = model.getValue(xNStmtSetListPath+"["+iRow+"]/lnkstmt");
  621. if(sLnkStmt == "") return;
  622. var sStmtCD = sLnkStmt.split(",");
  623. for(var iStmt=0; iStmt < sStmtCD.length; iStmt++){
  624. iTgStmtRow = grd_data.findRow(sStmtCD[iStmt],1,grd_data.colRef("stmtcd"),true,true);
  625. if(iTgStmtRow < 0){
  626. // 셋에 묶인 진단이 없을 경우 pass
  627. } else {
  628. chkcnt = model.getValue(xDStmtSetListPath + "["+iTgStmtRow+"]/cnt");
  629. if(sCheck == "true"){
  630. chkcnt ++;
  631. }else{
  632. chkcnt --;
  633. }
  634. model.setValue(xDStmtSetListPath+"["+iTgStmtRow+"]/cnt", chkcnt);
  635. if(model.getValue(xDStmtSetListPath+"["+iTgStmtRow+"]/cnt") > 0 ){
  636. grd_data.rowstyle(iTgStmtRow,"data","background-color") = "#efd3e7";
  637. }else {
  638. grd_data.rowstyle(iTgStmtRow,"data","background-color") = "#FFFFFF";
  639. }
  640. }
  641. }
  642. for(var iStmt=0; iStmt < sStmtCD.length; iStmt++){
  643. iTgStmtRow = grd_action.findRow(sStmtCD[iStmt],1,grd_action.colRef("stmtcd"),true,true);
  644. if(iTgStmtRow < 0){
  645. // 셋에 묶인 진단이 없을 경우 pass
  646. } else {
  647. chkcnt = model.getValue(xAStmtSetListPath + "["+iTgStmtRow+"]/cnt");
  648. if(sCheck == "true"){
  649. chkcnt ++;
  650. }else{
  651. chkcnt --;
  652. }
  653. model.setValue(xAStmtSetListPath+"["+iTgStmtRow+"]/cnt", chkcnt);
  654. if(model.getValue(xAStmtSetListPath+"["+iTgStmtRow+"]/cnt") > 0 ){
  655. grd_action.rowstyle(iTgStmtRow,"data","background-color") = "#efd3e7";
  656. }else {
  657. grd_action.rowstyle(iTgStmtRow,"data","background-color") = "#FFFFFF";
  658. }
  659. }
  660. }
  661. for(var iStmt=0; iStmt < sStmtCD.length; iStmt++){
  662. iTgStmtRow = grd_result.findRow(sStmtCD[iStmt],1,grd_result.colRef("stmtcd"),true,true);
  663. if(iTgStmtRow < 0){
  664. // 셋에 묶인 진단이 없을 경우 pass
  665. } else {
  666. chkcnt = model.getValue(xRStmtSetListPath + "["+iTgStmtRow+"]/cnt");
  667. if(sCheck == "true"){
  668. chkcnt ++;
  669. }else{
  670. chkcnt --;
  671. }
  672. model.setValue(xRStmtSetListPath+"["+iTgStmtRow+"]/cnt", chkcnt);
  673. if(model.getValue(xRStmtSetListPath+"["+iTgStmtRow+"]/cnt") > 0 ){
  674. grd_result.rowstyle(iTgStmtRow,"data","background-color") = "#efd3e7";
  675. }else {
  676. grd_result.rowstyle(iTgStmtRow,"data","background-color") = "#FFFFFF";
  677. }
  678. }
  679. }
  680. }