123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568 |
- /**
- - ▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩
- 진료 - ( SPMRF05300_전체이력이미지확인.xrw - JScript )
-
- * Version :
- - Ver.1.00.00
-
- * 개발자: 이경희
-
- * 최초작성일:
- - 2008/10/30
-
- * 수정이력:
-
- * 기타:
-
- - ▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩
- */
- function fInitialize()
- {
- datagrid1.allowselection = false;
- datagrid2.allowselection = false;
-
- model.setValue("/root/send/fromdt", "20090203");
- model.setValue("/root/send/todt", "20090320");
- model.refresh();
- }
- function fRecSearch()
- {
- model.removeNodeset("/root/main/finalrechistinfo/rechist");
- model.removeNodeset("/root/main/matchrechistinfo/rechist");
- submit("TRMRF05301");
-
- model.refresh();
-
- }
- function fSelectRecHistseq()
- {
- if(!isDataCell())
- return;
-
- if((datagrid1.isCell(event.target) && datagrid1.mouserow >= datagrid1.fixedrows))
- {
- iRow = datagrid1.row;
- if(iRow < 1){
- return;
- }
- var totalrow = datagrid1.rows;
-
- model.setValue("/root/send/formrecseq", model.getValue("/root/main/rechistinfo/rechist[" + iRow + "]/formrecseq"));
-
- submit("TRMRF05302");
-
- }
-
- model.refresh();
- }
- function fMatchallrecimge()
- {
- //debugger;
- var totalRecseqRow = datagrid1.rows;
- var totalRechistRow = "";
-
- if(totalRecseqRow == 0)
- return;
-
- for(var idx = 1; idx < totalRecseqRow; idx++)
- {
- var formrecseq = model.getValue("/root/main/rechistinfo/rechist[" + idx + "]/formrecseq");
-
- //if(formrecseq == "900000001055088")
- //debugger;
-
- model.setValue("/root/send/formrecseq", model.getValue("/root/main/rechistinfo/rechist[" + parseInt(idx) + "]/formrecseq"));
- submit("TRMRF05302");
-
- model.refresh();
-
- totalRechistRow = datagrid3.rows;
-
- if(totalRechistRow == 2)
- {
- // 임시 환자 테이블에 업데이트함.
- submit("TXMRF05301");
-
- continue;
- }
-
- model.addlog("해당 기록(formrecseq: " + formrecseq + ")의 이력에 저장된 이미지를 비교합니다." );
-
- var fstrechistseq = "";
- var fstrecimge = "";
- var fstformdegnseq = "";
- var fstdegnitemlevlcd = "";
- var fstreccnts = "";
-
- var matchrechistseq = "";
- var matchformdegnseq = "";
- var matchimge = "";
- var matchdegnitemlevlcd = "";
- var matchreccnts = "";
-
- var matchresult = "";
-
- for(var histidx = 1; histidx < totalRechistRow; histidx++)
- {
- if(fstrecimge == "")
- {
- fstrechistseq = model.getValue("/root/main/matchrechistinfo/rechist[" + histidx + "]/rechistseq");
- fstdegnitemlevlcd = model.getValue("/root/main/matchrechistinfo/rechist[" + histidx + "]/degnitemlevlcd");
- fstrecimge = model.getValue("/root/main/matchrechistinfo/rechist[" + histidx + "]/recimge");
- fstformdegnseq = model.getValue("/root/main/matchrechistinfo/rechist[" + histidx + "]/formdegnseq");
- fstreccnts = model.getValue("/root/main/matchrechistinfo/rechist[" + histidx + "]/reccnts");
-
- if(fstrecimge != "")
- {
- model.addlog(histidx + "번째 기록시퀀스: " + fstrechistseq);
- model.addlog(histidx + "번째 기록이미지 아이템레벨코드: " + fstdegnitemlevlcd );
- model.addlog(histidx + "번째 기록당시 formdegnseq: " + fstformdegnseq );
- model.addlog(histidx + "번째 기록당시 reccnts: " + fstreccnts );
- }
- continue;
- }
- else
- {
- matchdegnitemlevlcd = model.getValue("/root/main/matchrechistinfo/rechist[" + histidx + "]/degnitemlevlcd");
-
- // 다른 degnitemlevlcd 인 경우
- if(fstdegnitemlevlcd == matchdegnitemlevlcd)
- {
- matchrechistseq = model.getValue("/root/main/matchrechistinfo/rechist[" + histidx + "]/rechistseq");
- matchimge = model.getValue("/root/main/matchrechistinfo/rechist[" + histidx + "]/recimge");
- matchformdegnseq = model.getValue("/root/main/matchrechistinfo/rechist[" + histidx + "]/formdegnseq");
-
- matchreccnts = model.getValue("/root/main/matchrechistinfo/rechist[" + histidx + "]/reccnts");
-
- model.addlog(histidx + "번째 기록시퀀스: " + matchrechistseq);
- model.addlog(histidx + "번째 기록이미지 아이템레벨코드: " + matchdegnitemlevlcd );
- model.addlog(histidx + "번째 기록당시 formdegnseq: " + matchrechistseq );
- model.addlog(histidx + "번째 기록당시 reccnts: " + matchreccnts );
-
- var msg = "";
-
- if(fstrecimge == matchimge && fstreccnts == matchreccnts)
- {
- matchresult = "동일";
-
- // 임시 환자 테이블에 업데이트함.
- submit("TXMRF05301");
-
- msg = "최초기록이미지와 " + histidx +"번째 이력의 기록이미지 및 편집정보가 동일합니다.";
-
- //model.addlog("첫번째 기록이미지와 " + histidx + "번째 기록이미지 비교 결과:" + matchresult);
- //model.addlog("첫번째 기록이미지와 " + histidx + "번째 기록이미지 비교 결과:" + msg);
- model.addlog("비교 결과:" + msg);
- }
- else
- {
- matchresult = "다름";
-
- // 조회된 기록 시퀀스 내역을 복사함.
- var cnts = getNodesetCnt(model, "/root/main/finalrechistinfo/rechist");
-
- //model.copyNode("/root/main/finalreciteminfo/rechist[" + (parseInt(cnts)+1) + "]", "/root/main/rechistinfo/rechist[" + idx + "]");
- copyNode(model, model, "/root/main/finalrechistinfo/rechist[" + (parseInt(cnts)+1) + "]", "/root/main/rechistinfo/rechist[" + idx + "]");
-
- if(fstrecimge == matchimge)
- {
- if(fstreccnts != matchreccnts)
- msg = "최초기록이미지와 " + histidx +"번째 이력의 기록이미지가 같르나 편집정보가 다릅니다.";
- }
- else
- {
- if(fstreccnts == matchreccnts)
- msg = "최초기록이미지와 " + histidx +"번째 이력의 기록이미지는 다르나 편집정보가 같습니다.";
- else
- msg = "최초기록이미지와 " + histidx +"번째 이력의 기록이미지, 편집정보 모두 다릅니다.";
- }
- model.makeValue("/root/main/finalrechistinfo/rechist[" + (parseInt(cnts)+1) + "]/info", msg, true);
-
- datagrid1.rowstyle(idx, "data", "background-color") = "#ffff99";
- datagrid1.rebuild();
-
- model.refresh();
-
- //model.addlog("첫번째 기록이미지와 " + histidx + "번째 기록이미지 비교 결과:" + matchresult);
- //model.addlog("첫번째 기록이미지와 " + histidx + "번째 기록이미지 비교 결과:" + msg);
- model.addlog("비교 결과:" + msg);
- break;
- }
- }
- else
- {
- //
- model.addlog("degnitemlevlcd 가 변경되어 기준 recimge를 다시 설정합니다.");
-
- fstrechistseq = model.getValue("/root/main/matchrechistinfo/rechist[" + histidx + "]/rechistseq");
- fstdegnitemlevlcd = model.getValue("/root/main/matchrechistinfo/rechist[" + histidx + "]/degnitemlevlcd");
- fstrecimge = model.getValue("/root/main/matchrechistinfo/rechist[" + histidx + "]/recimge");
- fstformdegnseq = model.getValue("/root/main/matchrechistinfo/rechist[" + histidx + "]/formdegnseq");
- fstreccnts = model.getValue("/root/main/matchrechistinfo/rechist[" + histidx + "]/reccnts");
-
- if(fstrecimge != "")
- {
- model.addlog(histidx + "번째 기록시퀀스: " + fstrechistseq);
- model.addlog(histidx + "번째 기록이미지 아이템레벨코드: " + fstdegnitemlevlcd );
- model.addlog(histidx + "번째 기록당시 formdegnseq: " + fstformdegnseq );
- model.addlog(histidx + "번째 기록당시 reccnts: " + fstreccnts );
- }
- continue;
- }
- }
- }
- model.removeNodeset("/root/main/matchrechistinfo/rechist");
-
- }
- model.refresh();
- //datagrid2.gridToInstance();
- datagrid2.rebuild();
-
- messageBox("조회된 기록의 이미지 데이터 비교가", "I002");
- }
- // 이미지가 있는 이력을
- function fMatchallrecimge_old()
- {
- var totalRecseqRow = datagrid1.rows;
- var totalRechistRow = "";
-
- if(totalRecseqRow == 0)
- return;
-
- for(var idx = 1; idx < totalRecseqRow; idx++)
- {
- var formrecseq = model.getValue("/root/main/rechistinfo/rechist[" + idx + "]/formrecseq");
-
- model.setValue("/root/send/formrecseq", model.getValue("/root/main/rechistinfo/rechist[" + parseInt(idx) + "]/formrecseq"));
- submit("TRMRF05302");
-
- model.refresh();
- model.addlog("해당 기록(formrecseq: " + formrecseq + ")의 이력에 저장된 이미지를 비교합니다." );
-
- var fstrechistseq = "";
- var fstrecimge = "";
- var fstformdegnseq = "";
- var fstdegnitemlevlcd = "";
- var fstreccnts = "";
-
- var matchrechistseq = "";
- var matchformdegnseq = "";
- var matchimge = "";
- var matchdegnitemlevlcd = "";
- var matchreccnts = "";
-
- var matchresult = "";
-
- totalRechistRow = datagrid3.rows;
-
- for(var histidx = 1; histidx < totalRechistRow; histidx++)
- {
- if(fstrecimge == "")
- {
- fstrechistseq = model.getValue("/root/main/matchrechistinfo/rechist[" + histidx + "]/rechistseq");
- fstdegnitemlevlcd = model.getValue("/root/main/matchrechistinfo/rechist[" + histidx + "]/degnitemlevlcd");
- fstrecimge = model.getValue("/root/main/matchrechistinfo/rechist[" + histidx + "]/recimge");
- fstformdegnseq = model.getValue("/root/main/matchrechistinfo/rechist[" + histidx + "]/formdegnseq");
- fstreccnts = model.getValue("/root/main/matchrechistinfo/rechist[" + histidx + "]/reccnts");
-
- if(fstrecimge != "")
- {
- model.addlog(histidx + "번째 기록시퀀스: " + fstrechistseq);
- model.addlog(histidx + "번째 기록이미지 아이템레벨코드: " + fstdegnitemlevlcd );
- model.addlog(histidx + "번째 기록당시 formdegnseq: " + fstformdegnseq );
- model.addlog(histidx + "번째 기록당시 reccnts: " + fstreccnts );
- }
- continue;
- }
- else
- {
- matchdegnitemlevlcd = model.getValue("/root/main/matchrechistinfo/rechist[" + histidx + "]/degnitemlevlcd");
-
- // 다른 degnitemlevlcd 인 경우
- if(fstdegnitemlevlcd == matchdegnitemlevlcd)
- {
- matchrechistseq = model.getValue("/root/main/matchrechistinfo/rechist[" + histidx + "]/rechistseq");
- matchimge = model.getValue("/root/main/matchrechistinfo/rechist[" + histidx + "]/recimge");
- matchformdegnseq = model.getValue("/root/main/matchrechistinfo/rechist[" + histidx + "]/formdegnseq");
-
- matchreccnts = model.getValue("/root/main/matchrechistinfo/rechist[" + histidx + "]/reccnts");
-
- model.addlog(histidx + "번째 기록시퀀스: " + matchrechistseq);
- model.addlog(histidx + "번째 기록이미지 아이템레벨코드: " + matchdegnitemlevlcd );
- model.addlog(histidx + "번째 기록당시 formdegnseq: " + matchrechistseq );
- model.addlog(histidx + "번째 기록당시 reccnts: " + matchreccnts );
-
- var msg = "";
-
- if(fstrecimge == matchimge && fstreccnts == matchreccnts)
- {
- matchresult = "동일";
-
- msg = "최초기록이미지와 " + histidx +"번째 이력의 기록이미지 및 편집정보가 동일합니다.";
-
- //model.addlog("첫번째 기록이미지와 " + histidx + "번째 기록이미지 비교 결과:" + matchresult);
- //model.addlog("첫번째 기록이미지와 " + histidx + "번째 기록이미지 비교 결과:" + msg);
- model.addlog("비교 결과:" + msg);
- }
- else
- {
- matchresult = "다름";
-
- // 조회된 기록 시퀀스 내역을 복사함.
- var cnts = getNodesetCnt(model, "/root/main/finalrechistinfo/rechist");
-
- //model.copyNode("/root/main/finalreciteminfo/rechist[" + (parseInt(cnts)+1) + "]", "/root/main/rechistinfo/rechist[" + idx + "]");
- copyNode(model, model, "/root/main/finalrechistinfo/rechist[" + (parseInt(cnts)+1) + "]", "/root/main/rechistinfo/rechist[" + idx + "]");
-
- if(fstrecimge == matchimge)
- {
- if(fstreccnts != matchreccnts)
- msg = "최초기록이미지와 " + histidx +"번째 이력의 기록이미지가 같르나 편집정보가 다릅니다.";
- }
- else
- {
- if(fstreccnts == matchreccnts)
- msg = "최초기록이미지와 " + histidx +"번째 이력의 기록이미지는 다르나 편집정보가 같습니다.";
- else
- msg = "최초기록이미지와 " + histidx +"번째 이력의 기록이미지, 편집정보 모두 다릅니다.";
- }
- model.makeValue("/root/main/finalrechistinfo/rechist[" + (parseInt(cnts)+1) + "]/info", msg, true);
-
- datagrid1.rowstyle(idx, "data", "background-color") = "#ffff99";
- datagrid1.rebuild();
-
- model.refresh();
-
- //model.addlog("첫번째 기록이미지와 " + histidx + "번째 기록이미지 비교 결과:" + matchresult);
- //model.addlog("첫번째 기록이미지와 " + histidx + "번째 기록이미지 비교 결과:" + msg);
- model.addlog("비교 결과:" + msg);
- break;
- }
- }
- else
- {
- //
- model.addlog("degnitemlevlcd 가 변경되어 기준 recimge를 다시 설정합니다.");
-
- rechistseq = model.getValue("/root/main/matchrechistinfo/rechist[" + histidx + "]/rechistseq");
- fstdegnitemlevlcd = model.getValue("/root/main/matchrechistinfo/rechist[" + histidx + "]/degnitemlevlcd");
- fstrecimge = model.getValue("/root/main/matchrechistinfo/rechist[" + histidx + "]/recimge");
- formdegnseq = model.getValue("/root/main/matchrechistinfo/rechist[" + histidx + "]/formdegnseq");
- reccnts = model.getValue("/root/main/matchrechistinfo/rechist[" + histidx + "]/reccnts");
-
- if(fstrecimge != "")
- {
- model.addlog(histidx + "번째 기록시퀀스: " + rechistseq);
- model.addlog(histidx + "번째 기록이미지 아이템레벨코드: " + fstdegnitemlevlcd );
- model.addlog(histidx + "번째 기록당시 formdegnseq: " + formdegnseq );
- model.addlog(histidx + "번째 기록당시 reccnts: " + reccnts );
- }
- continue;
- }
- }
- }
- model.removeNodeset("/root/main/matchrechistinfo/rechist");
-
- }
- model.refresh();
- //datagrid2.gridToInstance();
- datagrid2.rebuild();
- }
- function fDoReplaceLtGt()
- {
- var nodelist = model.instances(0).selectNodes("/root/main/reciteminfo/reccnts");
- var shape = "";
- for (var i = 0; i < nodelist.length; i++)
- {
- if (nodelist.item(i).text.indexOf("<") == 0)
- {
- shape = nodelist.item(i).text.replace(/</gi, "<");
-
- nodelist.item(i).text = shape.replace(/>/gi, ">");
- }
- }
- }
- function fGetMetaMode(str)
- {
- var strXrw = str;
-
- var regexp = new RegExp('(<Xvg [^<>]+>)', 'igm');
- if (regexp.test(strXrw) == true)
- {
- var xvginfo = strXrw.match(regexp);
-
- var strRtn = "";
-
- for(var idx =0; idx < xvginfo.length; idx++)
- {
- strRtn += xvginfo[idx];
- }
-
- // ViewMode 얻기
- strRtn = strRtn.setReplaceWord("<", "");
- strRtn = strRtn.setReplaceWord(">", "");
- strRtn = strRtn.setReplaceWord("'", "");
-
- var arrAttrs = strRtn.split(" ");
-
- var viewMode = "";
- var viewWidth = "";
- var viewHeight = "";
-
- var strXvgInfo = new Array(3);
-
- for(var i = 0; i < arrAttrs.length; i++)
- {
- var strSplit = arrAttrs[i].split("=");
-
- if(strSplit[0] == "viewMode") {
- viewMode = strSplit[1];
- strXvgInfo[0] = viewMode;
- continue;
- }
- if(strSplit[0] == "width") {
- viewWidth = strSplit[1];
- strXvgInfo[1] = viewWidth;
- continue;
- }
-
- if(strSplit[0] == "height") {
- viewHeight = strSplit[1];
- strXvgInfo[2] = viewHeight;
- continue;
- }
- }
- return strXvgInfo;
- }
- else
- {
- return "";
- }
- }
- /**
- * @desc : 메타데이터에서 caption을 CDATA로 감싼다.
- * @id :
- * @event :
- * @return :
- * @authur : 이경희
- */
- function fSetCdata(metadata)
- {
- var strMeta = metadata;
-
- // 1. CDATA로 감싸져 있는지 확인.
- if(isSearchString(strMeta, "CDATA") == false)
- {
- var strStCaptionOld = "";
- var strEdCaptionOld = "";
- var strStCaptionNew = "";
- var strEdCaptionNew = "";
-
- // 배열로 반환
- strStCaptionOld = fGetXvgStCaption(strMeta);
- strEdCaptionOld = fGetXvgEdCaption(strMeta);
-
- // for문으로 반복
- for(var idx = 0; idx < strStCaptionOld.length; idx++)
- {
- if(idx == 0)
- {
- // 모든 </caption> 을 ]]></caption> 으로 변경
- strEdCaptionNew = "]]>" + strEdCaptionOld[idx];
- strMeta = strMeta.setReplaceWord(strEdCaptionOld[idx], strEdCaptionNew);
- }
-
- strStCaptionNew = strStCaptionOld[idx] + "<![CDATA[";
-
- strMeta = strMeta.setReplaceWord(strStCaptionOld[idx], strStCaptionNew);
- }
- }
-
- return strMeta;
- }
- /**
- * @desc : 메타데이터에서 caption의 시작 태그를 반환한다.
- * @id :
- * @event :
- * @return :
- * @authur : 이경희
- */
- function fGetXvgStCaption(metadata)
- {
- var strMeta = metadata;
- var getStCaption = new Array();
- var grpexpSt = new RegExp('(<caption[^<>]+>)', 'igm');
-
- if(grpexpSt.test(strMeta) == true)
- {
- getStCaption = strMeta.match(grpexpSt);
-
- strMeta = strMeta.replace(grpexpSt, "");
- }
-
- if(getStCaption.length > 0)
- return getStCaption;
- else
- return "";
- }
- /**
- * @desc : 메타데이터에서 caption의 종료 태그를 반환한다.
- * @id :
- * @event :
- * @return :
- * @authur : 이경희
- */
- function fGetXvgEdCaption(metadata)
- {
- var strMeta = metadata;
- var getEdCaption = new Array();
- var grpexpEd = new RegExp('(</caption>)', 'igm');
-
- if (grpexpEd.test(strMeta) == true)
- {
- getEdCaption = strMeta.match(grpexpEd);
-
- strMeta = strMeta.replace(grpexpEd, "");
- }
-
- if(getEdCaption.length > 0)
- return getEdCaption;
- else
- return "";
- }
- function fSaveExcel()
- {
- try
- {
- var fileNm = model.getValue("/root/main/searchDate") + ".xls";
- var filePath = window.fileDialog("save", "", "", fileNm, "xls", "Excel File(*.xls)|*.xsl|All Files (*.*)|*.*");
- if (filePath == "")
- return;
- datagrid1.saveExcel(filePath, "sheetname:sheet1;colhiddenextend:false;rowhiddenextend:false;");
- }
- catch(e)
- {
- }
- }
|