12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412 |
- /*
- - =======================================================================================
-
- Image EMR Viewer Program (SSMRC03130_LC.js)
- - Version :
- 1) : Ver.1.00.00
- - =======================================================================================
- */
- // 다중 페이지 지원을 위한 파일 패스와 페이지 정보
- var g_path;
- var g_page;
- var g_page_lut;
- var g_form_count;
- var g_outertext;
- var g_recrowno;
- var g_temp_path;
- var g_temp_page;
- var g_recnameArr;
- function comparePage()
- {
- var count;
- var windowleft = 0;
- var windowtop = 0;
-
- var ImgPage = 0;
- if (f_View.Pagetotal > 0)
- {
-
- if (model.alert("총 " + getSelectPageCount() + "페이지를 선택하였습니다.\n계속하려면 예를 누르고 중지하려면 아니오를 누르십시오.", "페이지 비교", 0x20 | 4) == 6)
- {
- for(count = 1; count <= f_View.Pagetotal; count++)
- {
- if(f_View.ThumbnailSelect(count) == true)
- {
- ImgPage = f_View.PageFilePage(count) + 1
- model.setValue("/root/main/chartpath", f_View.PageFilePath(count) + "|" + ImgPage);
- window.load("SPMRC03100.xrw", "modeless", "imgemrviewer", "", "/root/main/chartpath", "/root/main/chartpath");
- }
- }
- }
- else
- {
- }
- }
-
-
- }
- function formatDate(value)
- {
- return value.substr(0, 4) + "-" +
- value.substr(4, 2) + "-" +
- value.substr(6, 2);
- }
- function setChartViewerSize(newWidth, newHeight)
- {
- var obj;
- var obj2;
-
- obj2 = document.body;
- obj2.attribute("width") = newWidth;
- obj2.attribute("height") = newHeight;
-
- group1.attribute("top") =3;
- group1.attribute("left") =3;
- group1.attribute("height") = 70;
- group1.attribute("width") = obj2.attribute("width")- 6;
-
- obj = document.controls.item("f_View");
- obj.attribute("left") = 3;
- obj.attribute("top") = 76 ;
- obj.attribute("width") = obj2.attribute("width") - 6 ;
- obj.attribute("height") = obj2.attribute("height") - group1.attribute("height") - 9;
-
- f_View.ViewMode = 1;
-
- }
- function fGetResize()
- {
- var newWidth;
- var newHeight;
- var obj;
- var obj2;
-
- newWidth = parseInt(window.width) - 16;
- newHeight = parseInt(window.height) - 30;
- obj2 = document.body;
- obj2.attribute("width") = newWidth;
- obj2.attribute("height") = newHeight;
-
- group1.attribute("top") =3;
- group1.attribute("left") =3;
- group1.attribute("height") = 70;
- group1.attribute("width") = obj2.attribute("width")- 6;
-
- obj = document.controls.item("f_View");
- obj.attribute("left") = 3;
- obj.attribute("top") = 76 ;
- obj.attribute("width") = obj2.attribute("width") - 6 ;
- obj.attribute("height") = obj2.attribute("height") - group1.attribute("height") - 25;
-
- f_View.ViewMode = 1;
- model.refresh();
- }
- function fInitilize()
- {
-
- // 페이지 데이터 초기화
- g_path = new Array();
- g_page = new Array();
- g_page_lut = new Array();
- g_form_count = new Array();
- g_outertext = new Array();
- g_recrowno = new Array();
- g_temp_path = new Array();
- g_temp_page = new Array();
-
- g_recnameArr = new Array();
-
-
-
- //기본값설정
- model.setValue("/root/main/chartinfo/filetotal", "0");
- model.setValue("/root/main/chartinfo/pagetotal", "0");
- model.setValue("/root/main/chartinfo/pagecurrent", "0");
- model.setValue("/root/init/seqflag","0");
-
- fGetUserEnvOcsOrdAnsw("/root/send/reqdata", "/root/envinit/chartpaging", "038");
- var openerid = opener.javascript.getScreenID();
- var chartpaging = model.getValue("/root/envinit/chartpaging/answcnt");
- //통합검사결과에서 로딩시만 적용
- if (openerid == "SMAER00800" || openerid == "SMMMI00100" ) {
- if (chartpaging == "001"){
- model.makeValue("/root/envinit/pagingyn","Y");
- //rdo_lindx.attribute("visibility") = "visible";
- optPageTotal.attribute("visibility") = "hidden";
- optCalcTotal.attribute("visibility") = "visible";
- outPagegap.attribute("left") = "340px";
- outPagegap.attribute("visibility") = "visible";
- }
- }
- else {
- outPagegap.attribute("left") = "340px";
- optPageTotal.attribute("visibility") = "visible";
- optCalcTotal.attribute("visibility") = "hidden";
- outPagegap.attribute("visibility") = "hidden";
- }
-
- model.refresh();
-
- f_View.BadgeSizeInContinuous = 64;
- f_View.BadgeSizeInPage = 64;
- f_View.BadgeSizeInThumbnail = 32;
- f_View.BadgePositionInContinuous = 0;
- f_View.BadgePositionInPage = 0;
- f_View.BadgePositionInThumbnail = 0;
-
- //2013/04/09 Start 연속보기 기본 설정값
- var EraseBlank = "InkThreshold=224 " + "\n" +
- "BorderEraseLeft=40 " + "\n" +
- "BorderEraseRight=40 " + "\n" +
- "VerticalCompaction=1 " + "\n" +
- "VerticalCompaction.SpaceSize=30 ";
-
- f_View.ContinuousDefaultAnalyzeMethod = "NoFit = 1";
- //f_View.ContinuousDefaultAnalyzeMethod = "VerticalCompaction = 1";
- f_View.ContinuousDefaultAnalyzeMethod = EraseBlank;
- //2013/04/09 End
-
- //2013/03/29 Start
- //f_View.ThumbnailSelectColor 썸네일 클릭시 색상 변경
- //f_View.ThumbnailHoverColor 썸네일 위로 마우스 포커스 이동시 색상없도록 수정
- //f_View.ThumbnailSelectColor = parent.rgb(95,0,255);
- f_View.ThumbnailHoverColor = parent.rgb(207, 218, 231);
- //2013/03/29 End
-
- // 보기 방법의 기본값 설정
- setupChart("ChartView");
-
-
- // 데이터 초기화
- resetData();
-
- // 썸네일 뷰어의 레이아웃 설정
- TVScreen(4);
- optSelTotal.attribute("visibility") = "hidden";
-
- if( opener.window.javascript.getScreenID() == "SMMRC03000"){
- optSelTotal.attribute("visibility") = "visible";
- }
-
- //2014/04/15 이정택
- /*
- var sid = opener.javascript.getScreenID();
- if(sid=="SMMRI00400"){ //통합기록조회
- tv_pagebtn.disabled=false;
- cv_pagebtn.disabled=false;
- pv_pagebtn.disabled=false;
- }else{
- tv_pagebtn.disabled=true;
- cv_pagebtn.disabled=true;
- pv_pagebtn.disabled=true;
- }
- */
- //2014/04/15 이정택
-
- }
- function resetInstance_EMR()
- {
- model.resetInstanceNode("/root/main/emrpath");
- model.resetInstanceNode("/root/main/emrorddate");
- model.resetInstanceNode("/root/main/emrformnm");
- model.resetInstanceNode("/root/main/emrformcd");
- model.resetInstanceNode("/root/main/emrdeptnm");
- model.resetInstanceNode("/root/main/emrdeptcd");
- model.resetInstanceNode("/root/main/emrpage");
- model.resetInstanceNode("/root/main/emrhiddenmsg");
-
- model.resetInstanceNode("/root/main/chartinfo");
- }
- function setupChart(ViewMode)
- {
- switch(ViewMode)
- {
- case "TV":
- model.toggle("case1");
- model.setValue("/root/cond/radio", "TV");
- model.refresh();
- f_View.ViewMode = 2;
- //2013/04/12 Start model.getValue("/root/main/chartinfo/pagecurrent")가 값이 없을시에는 0으로 세팅하면 됨
- //f_View.PageCurrent = model.getValue("/root/main/chartinfo/pagecurrent");
- //f_View.ActionParamINT1 = f_View.PageCurrent;
- //f_View.ActionThumbnail = 10;
- //2013/04/12 end
- model.setValue("/root/hidden/currentViewMode", "ThumbView");
- break;
- case "ThumbView":
- model.toggle("case1");
- model.setValue("/root/cond/radio", "TV");
- model.refresh();
- f_View.ViewMode = 2;
- //2013/04/12 Start
- //f_View.PageCurrent = model.getValue("/root/main/chartinfo/pagecurrent");
- //f_View.ActionParamINT1 = f_View.PageCurrent;
- //f_View.ActionThumbnail = 10;
- //2013/04/12 end
- model.setValue("/root/hidden/currentViewMode", "ThumbView");
- break;
- case "CV":
- model.toggle("case2");
- model.setValue("/root/cond/radio", "CV");
- model.refresh();
- model.setValue("/root/hidden/currentViewMode", "ChartView");
- var CPage = model.getValue("/root/main/chartinfo/pagecurrent");
- f_View.ViewMode = 1;
- // 2013/04/09 여러장보기에서 선택한 페이지로 연속보기시 이동기능
- f_View.actionparamint1 = CPage;
- f_View.actioncontinuous = 8;
- //2013/04/09
- case "ChartView":
- model.toggle("case2");
- model.setValue("/root/cond/radio", "CV");
- model.refresh();
- model.setValue("/root/hidden/currentViewMode", "ChartView");
- var CPage = model.getValue("/root/main/chartinfo/pagecurrent");
- f_View.ViewMode = 1;
- // 2013/04/09 여러장보기에서 선택한 페이지로 연속보기시 이동기능
- f_View.actionparamint1 = CPage;
- f_View.actioncontinuous = 8;
- //2013/04/09
- break;
- case "PV":
- model.toggle("case3");
- model.setValue("/root/cond/radio", "PV");
- model.refresh();
- //2013/04/12 Start
- //f_View.PageCurrent = model.getValue("/root/main/chartinfo/pagecurrent");
- //2013/04/12 End
- f_View.ViewMode = 0;
- f_View.fitmode = 3;
- model.setValue("/root/hidden/currentViewMode", "PageView");
- break;
- case "PageView":
- model.toggle("case3");
- model.setValue("/root/cond/radio", "PV");
- model.refresh();
- //2013/04/12 Start
- //f_View.PageCurrent = model.getValue("/root/main/chartinfo/pagecurrent");
- //2013/04/12 End
- f_View.ViewMode = 0;
- f_View.fitmode = 3;
- model.setValue("/root/hidden/currentViewMode", "PageView");
- break;
- }
-
-
- }
- function setupChartCopy(ViewMode)
- {
- if(ViewMode == null)
- {
- // 보기 모드가 지정되지 않았다면 현재의 값을 사용한다.
- ViewMode = model.getValue("/root/hidden/currentViewMode");
- }
- else
- {
- // 보기 모드에 따라 스위치를 설정한다.
-
-
- }
-
- var pageTotal = parseInt(model.getValue("/root/main/chartinfo/pagetotal"));
- var pageCurrent = parseInt(model.getValue("/root/main/chartinfo/pagecurrent"));
-
- model.setValue("/root/main/chartinfo/filetotal",model.getValue("/root/main/chartinfo/pagetotal"))
-
- var nPrv;
- var nCur;
- var nPage;
- var i;
- var j;
- var count;
- var imgemrcount;
- var totalemrorddate;
- var totalemrformnm;
- var totalemrformcd;
- var totalemrdeptnm;
- var totalemrdeptcd;
- var totalemrpage;
- var totalemrhiddenmsg;
- var totalsignemrdeptnm;
- var totalunprepyn; //미비정보를 담고 있음 'Y'이면 미비
- var emrorddate;
- var emrformnm;
- var emrformcd;
- var emrdeptnm;
- var emrdeptcd;
- var emrpage;
- var emrhiddenmsg;
- var emrfilepath1 ;
- var signemrdeptnm;
- var unprepyn; //미비정보를 담고 있음 'Y'이면 미비
- var counttemp = 0;
- var countnull = 0;
- var txtemrcount = 0;
- var txtemrcounttemp = 0;
- var emrcounttemp = 0;
- var emrfilepath = "";
- var emrfilepathtemp = "";
- var emrgpath = 0;
- var emrchartindex;
- var emrpagecount = 0;
- var emrresult = 0;
- var emrtotalpagecount = 0;
- model.setValue("/root/main/chartinfo/pagecurrent", getSelectPageCount());
- model.refresh();
-
- if (f_View.PageTotal == 0)
- {
- // 2009-11-03 이경희
- // 상세내역추가 기능
- for(var idx = g_recnameArr.length - 1; idx >= 0 ; idx--)
- {
- delete g_recnameArr[idx];
- }
- //처음 보기모드 전환시 초기 배열값 으로 변경
- //이유 : objThumbView.TotalThumbnail 가 다시 더해지기 때문에^^
- /*
-
- for (i = g_page.length - 1; i >= 0; i--)
- {
- delete g_page[i];
- delete g_path[i];
- }
-
- for (i = 1; i < g_temp_page.length; i++)
- {
- g_page[i] = g_temp_page[i];
- g_path[i] = g_temp_path[i];
-
- }
- */
- refreshFalse();
- for (i = 0; i < pageTotal; i++)
- {
- // 썸네일 추가
- nPrv = f_View.PageTotal;
-
- f_View.pageappend(g_path[i + 1], 0, 0);
- nCur = f_View.PageTotal;
-
- nPage = g_page_lut[i + 1];
-
- for (j = nPrv; j < nCur; j++)
- {
- // 장비연동 검사지가 아닌경우(일반 스캔인 경우)
- if (model.getValue("/root/main/charts[" + nPage + "]/cmc_orddate") == null || model.getValue("/root/main/charts[" + nPage + "]/cmc_orddate") == "")
- {
- // 2009-11-03 이경희
- // 상세내역추가 기능
- g_recnameArr[j] = "[" +
- model.getValue(getXPathChart(nPage, "chrtpage")) +
- "] " +
- model.getValue(getXPathChart(nPage, "indd")) + " " +
- model.getValue(getXPathChart(nPage, "docunm"));
-
-
- f_View.PageHiddenText(i) = "I" + "▦" + model.getValue("/root/main/charts[" + nPage + "]/ordno") +
- "▦" + model.getValue("/root/main/charts[" + nPage + "]/docucd") +
- "▦" + model.getValue("/root/main/charts[" + nPage + "]/pagecnt") +
- "▦" + model.getValue("/root/main/charts[" + nPage + "]/pageno") +
- "▦" + model.getValue("/root/main/charts[" + nPage + "]/indd") +
- "▦" + model.getValue("/root/main/charts[" + nPage + "]/docunm") +
- "▦" + "[" + model.getValue("/root/main/charts[" + nPage + "]/chrtpage") + "]" +
- splittxt;
-
-
- f_View.PageText(j + 1) = g_recnameArr[j];
- f_View.ActionParamInt1 = j + 1;
- f_View.actionparamstring1 = g_recnameArr[j];
- f_View.actioncontinuous = 9;
-
- }
- // 장비연동 검사지인 경우(CDIS)
- else
- {
-
- var indd = model.getValue(getXPathChart(nPage, "cmc_acptime"));
-
- g_recnameArr[j] = "[" +
- model.getValue(getXPathChart(nPage, "chrtpage")) +
- "] " +
- indd + " " +
- model.getValue(getXPathChart(nPage, "cmc_examname"));
-
- f_View.PageHiddenText(i) = "I" + "▦" + model.getValue("/root/main/charts[" + nPage + "]/ordno") +
- "▦" + model.getValue("/root/main/charts[" + nPage + "]/docucd") +
- "▦" + model.getValue("/root/main/charts[" + nPage + "]/pagecnt") +
- "▦" + model.getValue("/root/main/charts[" + nPage + "]/pageno") +
- "▦" + model.getValue("/root/main/charts[" + nPage + "]/indd") +
- "▦" + model.getValue("/root/main/charts[" + nPage + "]/docunm") +
- "▦" + "[" + model.getValue("/root/main/charts[" + nPage + "]/chrtpage") + "]" +
- splittxt;
-
- f_View.PageText(j + 1) = g_recnameArr[j];
- f_View.ActionParamInt1 = j + 1;
- f_View.actionparamstring1 = g_recnameArr[j];
- f_View.actioncontinuous = 9;
-
- }
- }
- }
- // EMR append 서식 썸네일텍스트 변경
- // --> HTML의 경우
- if (model.getValue("/root/main/emrpath") != null && model.getValue("/root/main/emrpath") != "")
- {
-
- imgemrcount = 0;
- totalemrpage = model.getValue("/root/main/emrpage");
- totalemrformnm = model.getValue("/root/main/emrformnm");
- totalemrhiddenmsg = model.getValue("/root/main/emrhiddenmsg");
- totalunprepyn = model.getValue("/root/main/unprepyn");
- totalsignemrdeptnm = model.getValue("/root/main/signemrdeptnm");
- totalsignemrdeptcd = model.getValue("/root/main/signemrdeptcd");
- totalemrfilepath = model.getValue("/root/main/emrpath");
- totalemrorddate = model.getValue("/root/main/emrorddate");
-
- //alert(totalemrfilepath.substring(1000,totalemrfilepath.length));
-
- emrpage = totalemrpage.split(splittxt);
- emrformnm = totalemrformnm.split(splittxt);
- emrhiddenmsg = totalemrhiddenmsg.split(splittxt);
- emrorddate = totalemrorddate.split(splittxt);
- emrfilepath1 = totalemrfilepath.split(splittxt);
- signemrdeptnm = totalsignemrdeptnm.split(splittxt);
- signemrdeptcd = totalsignemrdeptcd.split(splittxt);
- unprepyn= totalunprepyn.split(splittxt);
- countnull = 0;
- counttemp = 0;
- for (count = 0; count < emrpage.length; count++)
- {
- if (emrpage[count].substring(0, 1) == "*")
- {
- imgemrcount = g_form_count[counttemp];
- counttemp++;
- }
- else
- {
-
- txtemrcounttemp = 0;
- //차트가 없을경우
-
- if (f_View.pagetotal != 0)
- {
-
- //emrfilepath = f_View.PageFilePath(parseInt(imgemrcount) + parseInt(txtemrcount) + 1);
- emrfilepath = emrfilepath1[count];
- for (emrcounttemp = parseInt(imgemrcount) + parseInt(txtemrcount) + 1; emrcounttemp <= f_View.PageTotal; emrcounttemp++)
- {
- emrfilepathtemp = f_View.PageFilePath(emrcounttemp);
- if (emrfilepath == emrfilepathtemp)
- {
- if (txtemrcounttemp >= 1)
- {
- for (emrgpath = g_path.length; emrgpath > parseInt(imgemrcount) + parseInt(txtemrcount) + 1; emrgpath--)
- {
- g_path[emrgpath] = g_path[emrgpath - 1];
- g_page[emrgpath] = g_page[emrgpath - 1];
- }
- g_path[parseInt(imgemrcount) + parseInt(txtemrcount) + 1] = g_path[parseInt(imgemrcount) + parseInt(txtemrcount)];
- g_page[parseInt(imgemrcount) + parseInt(txtemrcount) + 1] = txtemrcounttemp + 1;
- }
- txtemrcounttemp++;
-
- //signemrdeptnm 과명 추구 html 의사기록에서만 적용 2013.02.28 원장연 처리
- g_recnameArr[parseInt(imgemrcount) + parseInt(txtemrcount)] = "[" +
- txtemrcounttemp +
- "] " +
- emrorddate[count] + " " +
- emrformnm[count] + "" +
- signemrdeptnm[count];
-
-
- f_View.PageText(emrcounttemp) = g_recnameArr[parseInt(imgemrcount) + parseInt(txtemrcount)]
- //f_View.PageText(parseInt(imgemrcount) + parseInt(txtemrcount) + 1) = g_recnameArr[parseInt(imgemrcount) + parseInt(txtemrcount)]
- f_View.ActionParamInt1 = emrcounttemp;
- //f_View.ActionParamInt1 = parseInt(imgemrcount) + parseInt(txtemrcount) + 1;
- f_View.actionparamstring1 = g_recnameArr[parseInt(imgemrcount) + parseInt(txtemrcount)];
- f_View.actioncontinuous = 9;
-
- //f_View.PageHiddenText(parseInt(imgemrcount) + parseInt(txtemrcount) + 1) = emrhiddenmsg[count];
- f_View.PageHiddenText(emrcounttemp) = emrhiddenmsg[count];
- //alert(unprepyn[count])
- if( unprepyn[count] == "Y" )
- {
- //alert("1")
- //f_View.BadgeAdd(parseInt(imgemrcount) + parseInt(txtemrcount) + 1, "mibi", getDomain() + "/himed/webapps/emr/imgemrweb/images/mibi.png")
- //f_View.BadgeAdd(parseInt(imgemrcount) + parseInt(txtemrcount) + 1, "mibi", "c:\\mini.png")
- f_View.BadgeAdd(emrcounttemp, "mibi", "c:\\mini.png")
- }
-
-
-
- txtemrcount++;
- }
- else
- {
- emrpage[count] = txtemrcounttemp;
- break;
- }
- }
- }
-
- model.refresh();
- }
- }
- }
- refreshTrue();
- }
-
- setupChart(ViewMode)
- f_View.PageCurrent = 1;
- model.setValue("/root/main/chartinfo/pagecurrent", f_View.PageCurrent );
- model.setValue("/root/main/chartinfo/pagetotal", f_View.PageTotal );
- model.setValue("/root/main/chartinfo/filetotal", f_View.PageTotal );
- model.refresh();
- }
- function setupChartPopup(ViewMode)
- {
-
- if(ViewMode == null)
- {
- // 보기 모드가 지정되지 않았다면 현재의 값을 사용한다.
- ViewMode = model.getValue("/root/hidden/currentViewMode");
- }
- else
- {
- // 보기 모드에 따라 스위치를 설정한다.
-
-
- }
-
- var pageTotal = parseInt(model.getValue("/root/main/chartinfo/pagetotal"));
- model.setValue("/root/main/chartinfo/filetotal",model.getValue("/root/main/chartinfo/pagetotal"));
- var pageCurrent = parseInt(model.getValue("/root/main/chartinfo/pagecurrent"));
-
- var nPrv;
- var nCur;
- var nPage;
- var i;
- var j;
- var count;
- var imgemrcount;
- var totalemrorddate;
- var totalemrformnm;
- var totalemrformcd;
- var totalemrdeptnm;
- var totalemrdeptcd;
- var totalemrpage;
- var totalemrhiddenmsg;
- var emrorddate;
- var emrformnm;
- var emrformcd;
- var emrdeptnm;
- var emrdeptcd;
- var emrpage;
- var emrhiddenmsg;
- var counttemp = 0;
- var countnull = 0;
- var txtemrcount = 0;
- var txtemrcounttemp = 0;
- var emrcounttemp = 0;
- var emrfilepath = "";
- var emrfilepathtemp = "";
- var emrgpath = 0;
- var emrchartindex;
- var emrpagecount = 0;
- var emrresult = 0;
- var emrtotalpagecount = 0;
- var endnum = 0;
- var startnum = 0;
- model.setValue("/root/main/chartinfo/pagecurrent", 1);
- model.refresh();
-
- refreshFalse();
- ClearChart();
- refreshTrue();
-
- if (f_View.PageTotal == 0)
- {
- fShowProgress(true,"이미지다운로딩");
- var pagingyn = model.getValue("/root/envinit/pagingyn");
-
- if (pagingyn == "Y") {
- var fileTotal = model.getValue("/root/main/chartinfo/filetotal");
- var seqflag = model.getValue("/root/init/seqflag");
- var startnum = seqflag * 10;
- var quo = parseInt(fileTotal/10);
- var mod = fileTotal % 10 ;
- model.setValue("/root/main/chartinfo/pagecnt",10);
-
- if (quo == seqflag ) {
- endnum = startnum + mod;
- model.setValue("/root/main/chartinfo/pagecnt",mod);
- }
- else {
- endnum = startnum + 10;
- }
-
- var pageTotal = endnum;
-
- }
-
- for (i = startnum; i < pageTotal; i++)
- {
- // 썸네일 추가
- nPrv = f_View.PageTotal;
- //objThumbView.AppendPage(g_path[i + 1], g_page[i + 1], g_page[i + 1]);
-
- f_View.pageappend(g_path[i + 1], 0, 0);
- nCur = f_View.PageTotal;
-
- nPage = g_page_lut[i + 1];
-
- for (j = nPrv; j < nCur; j++)
- {
- // 장비연동 검사지가 아닌경우
- if (model.getValue("/root/main/charts[" + nPage + "]/cmc_orddate") == null || model.getValue("/root/main/charts[" + nPage + "]/cmc_orddate") == "")
- {
- // 2009-11-03 이경희
- // 상세내역추가 기능
- g_recnameArr[j] = "[" +
- model.getValue(getXPathChart(nPage, "chrtpage")) +
- "] " +
- model.getValue(getXPathChart(nPage, "indd")) + " " +
- model.getValue(getXPathChart(nPage, "docunm"));
-
- f_View.PageText(j + 1) = g_recnameArr[j];
- f_View.ActionParamInt1 = j + 1;
- f_View.actionparamstring1 = g_recnameArr[j];
- f_View.actioncontinuous = 9;
-
- }
- // 장비연동 검사지인 경우
- else
- {
-
- var indd = model.getValue(getXPathChart(nPage, "cmc_acptime"));
-
- g_recnameArr[j] = "[" +
- model.getValue(getXPathChart(nPage, "chrtpage")) +
- "] " +
- indd + " " +
- model.getValue(getXPathChart(nPage, "cmc_examname"));
-
- f_View.PageText(j + 1) = g_recnameArr[j];
- f_View.ActionParamInt1 = j + 1;
- f_View.actionparamstring1 = g_recnameArr[j];
- f_View.actioncontinuous = 9;
-
- }
- }
- }
- // EMR append 서식 썸네일텍스트 변경
- if (model.getValue("/root/main/emrpath") != null && model.getValue("/root/main/emrpath") != "")
- {
- imgemrcount = 0;
- totalemrpage = model.getValue("/root/main/emrpage");
- totalemrformnm = model.getValue("/root/main/emrformnm");
- totalemrhiddenmsg = model.getValue("/root/main/emrhiddenmsg");
- totalemrorddate = model.getValue("/root/main/emrorddate");
- // emrpage = totalemrpage.split("|");
- // emrformnm = totalemrformnm.split("|");
- // emrhiddenmsg = totalemrhiddenmsg.split("|");
- // emrorddate = totalemrorddate.split("|");
- emrpage = totalemrpage.split(splittxt);
- emrformnm = totalemrformnm.split(splittxt);
- emrhiddenmsg = totalemrhiddenmsg.split(splittxt);
- emrorddate = totalemrorddate.split(splittxt);
- countnull = 0;
- counttemp = 0;
- for (count = 0; count < emrpage.length; count++)
- {
- if (emrpage[count].substring(0, 1) == "*")
- {
- imgemrcount = g_form_count[counttemp];
- counttemp++;
- }
- else
- {
- txtemrcounttemp = 0;
- //차트가 없을경우
- if (f_View.pagetotal != 0)
- {
-
- emrfilepath = f_View.PageFilePath(parseInt(imgemrcount) + parseInt(txtemrcount) + 1);
- for (emrcounttemp = parseInt(imgemrcount) + parseInt(txtemrcount) + 1; emrcounttemp <= f_View.PageTotal; emrcounttemp++)
- {
- emrfilepathtemp = f_View.PageFilePath(emrcounttemp);
- if (emrfilepath == emrfilepathtemp)
- {
- if (txtemrcounttemp >= 1)
- {
- for (emrgpath = g_path.length; emrgpath > parseInt(imgemrcount) + parseInt(txtemrcount) + 1; emrgpath--)
- {
- g_path[emrgpath] = g_path[emrgpath - 1];
- g_page[emrgpath] = g_page[emrgpath - 1];
- }
- g_path[parseInt(imgemrcount) + parseInt(txtemrcount) + 1] = g_path[parseInt(imgemrcount) + parseInt(txtemrcount)];
- g_page[parseInt(imgemrcount) + parseInt(txtemrcount) + 1] = txtemrcounttemp + 1;
- }
- txtemrcounttemp++;
- g_recnameArr[parseInt(imgemrcount) + parseInt(txtemrcount)] = "[" +
- txtemrcounttemp +
- "] " +
- emrorddate[count] + " " +
- emrformnm[count];
-
- f_View.PageText(parseInt(imgemrcount) + parseInt(txtemrcount) + 1) = g_recnameArr[parseInt(imgemrcount) + parseInt(txtemrcount)]
- f_View.ActionParamInt1 = parseInt(imgemrcount) + parseInt(txtemrcount) + 1;
- f_View.actionparamstring1 = g_recnameArr[parseInt(imgemrcount) + parseInt(txtemrcount)];
- f_View.actioncontinuous = 9;
-
- f_View.PageHiddenText(parseInt(imgemrcount) + parseInt(txtemrcount) + 1) = emrhiddenmsg[count];
- txtemrcount++;
- }
- else
- {
- emrpage[count] = txtemrcounttemp;
- break;
- }
- }
- }
-
- }
- }
- }
- refreshTrue();
- }
-
- setupChart(ViewMode)
- f_View.PageCurrent = 1;
- model.setValue("/root/main/chartinfo/pagecurrent", f_View.PageCurrent );
- //model.setValue("/root/main/chartinfo/pagetotal", f_View.PageTotal );
- //model.setValue("/root/main/chartinfo/filetotal", f_View.PageTotal );
- model.refresh();
- fShowProgress(false);
- }
- function resetData()
- {
- // 개체에 이미지가 등록되어 있다면 해지한다.
- refreshFalse();
- ClearChart();
- refreshTrue();
- model.removeNode("/root/hidden/tempcharts");
- model.removeNode("/root/main/charts");
- model.refresh();
- }
- function resetData_Mode()
- {
- // 개체에 이미지가 등록되어 있다면 해지한다.
- refreshFalse();
- f_View.pageremove(0,0);
- refreshTrue();
- model.removeNode("/root/hidden/tempcharts");
- model.removeNode("/root/main/charts");
- model.refresh();
- }
- function TVScreen(Mode)
- {
- var obj
- obj = document.controls.item("f_View");
- //정보를 구하지 못함
-
- switch(Mode)
- {
- case "2":
-
- f_View.thumbnailwidth = (parseInt(obj.attribute("width")) - 80) / 2 ;
- f_View.thumbnailheight = f_View.thumbnailwidth * 1.41 ;
- f_View.focus;
- break;
- case "3":
-
- f_View.thumbnailwidth = (parseInt(obj.attribute("width")) - 110) / 3;
- f_View.thumbnailheight = f_View.thumbnailwidth * 1.41;
- break;
- case "4":
- f_View.thumbnailwidth = (parseInt(obj.attribute("width")) - 130) / 4;
-
- f_View.thumbnailheight = f_View.thumbnailwidth * 1.41;
- break;
- }
- }
- function refreshFalse()
- {
- f_View.AutoRefresh = false;
-
- }
- function refreshTrue()
- {
- f_View.AutoRefresh = true;
- }
- function ClearChart()
- {
- f_View.pageremove(0,0);
- f_View.ContinuousMarginSpace =0;
- f_View.ContinuousMarginTop = 0;
- f_View.ContinuousMarginBottom = 0;
- f_View.ContinuousMarginLeft = 0;
- f_View.ContinuousMarginRight = 0;
- f_View.ContinuousBorderSize = 1;
- f_View.ContinuousBorderColor = parent.rgb(255,255,255);
- f_View.ContinuousTextBackColor = parent.rgb(230,230,250);
- f_View.ContinuousTextForeColor = parent.rgb(128,0,128);
- f_View.ContinuousTextBold = true;
- f_View.actioncontinuous = 2;
- f_View.actionsingle = 2;
- //model.getValue("root/cond/radio");
- setupChart(model.getValue("root/cond/radio"));
- }
- function cleanViewer()
- {
- var fso;
- fso = new ActiveXObject("Scripting.FileSystemObject");
- setupRecvPath(fso);
-
- model.setValue("/root/main/chartinfo/pagetotal", "0");
- model.setValue("/root/main/chartinfo/pagecurrent", "0");
- model.refresh();
-
- // 데이터 초기화
- resetData();
-
- // 썸네일 뷰어의 레이아웃 설정
- TVScreen(4);
- }
- function setupRecvPath(fso)
- {
- var pathRecv;
- var curFolder;
- var curFile;
-
- // 개체에 이미지가 등록되어 있다면 해지한다.
- refreshFalse();
- ClearChart();
- refreshTrue();
-
-
- //--20130418 김동준 start(이미지 다운경로를 본원과 칠곡 분기)
- pathRecv = fso.GetSpecialFolder(2) + "\\LCViewer" + getUserInfo("dutplceinstcd") + "\\";
-
- //pathRecv = fso.GetSpecialFolder(2) + "\\LCViewer\\";
- //--20130418 김동준 end
-
- // 차트를 다운받을 폴더가 없다면 만든다.
- if( fso.FolderExists(pathRecv) == false)
- {
- fso.CreateFolder(pathRecv);
- }
-
- // 폴더안에 있는 모든 파일을 삭제한다.
- curFolder = fso.GetFolder(pathRecv);
- curFile = new Enumerator(curFolder.Files);
-
- for(; !curFile.atEnd(); curFile.moveNext())
- {
- //20130418 김동준 start try Catch 추가
- try{
- fso.DeleteFile(curFile.item().Path, true);
- }
- catch(e){
-
- }
- //20130418 김동준 end
- }
-
- // 차트 폴더를 저장
- model.setValue("/root/hidden/chartImageHome", pathRecv);
- }
- function LocalLoadChart()
- {
-
-
- f_View.pageappend("C:/Users/Public/Pictures/Sample Pictures/Jellyfish.jpg",1,1);
- f_View.pageappend("C:/Users/Public/Pictures/Sample Pictures/Koala.jpg",1,1);
- f_View.pageappend("C:/Users/Public/Pictures/Sample Pictures/Penguins.jpg",1,1);
- f_View.pageappend("C:/Users/Public/Pictures/Sample Pictures/Chrysanthemum.jpg",1,1);
- f_View.pageappend("C:/Users/Public/Pictures/Sample Pictures/Jellyfish.jpg",1,1);
- f_View.pageappend("C:/Users/Public/Pictures/Sample Pictures/Koala.jpg",1,1);
- f_View.pageappend("C:/Users/Public/Pictures/Sample Pictures/Penguins.jpg",1,1);
- f_View.pageappend("C:/Users/Public/Pictures/Sample Pictures/Chrysanthemum.jpg",1,1);
- f_View.pageappend("C:/Users/Public/Pictures/Sample Pictures/Jellyfish.jpg",1,1);
- f_View.pageappend("C:/Users/Public/Pictures/Sample Pictures/Koala.jpg",1,1);
- f_View.pageappend("C:/Users/Public/Pictures/Sample Pictures/Penguins.jpg",1,1);
- f_View.pageappend("C:/Users/Public/Pictures/Sample Pictures/Chrysanthemum.jpg",1,1);
- f_View.pageappend("C:/Users/Public/Pictures/Sample Pictures/Jellyfish.jpg",1,1);
- f_View.pageappend("C:/Users/Public/Pictures/Sample Pictures/Koala.jpg",1,1);
- f_View.pageappend("C:/Users/Public/Pictures/Sample Pictures/Penguins.jpg",1,1);
- }
- function LocalHtmlLoadChart()
- {
-
-
- f_View.pageappend("C:/BCP_OCR_Image/chart1.HTML",0,0);
- //f_View.pageappend("C:/BCP_OCR_Image/chart2.HTML",0,0);
- //f_View.pageappend("C:/BCP_OCR_Image/chart3.HTML",0,0);
-
- }
- function setHtmlMode(mode)
- {
- // 모드가 HTML인경우는 동일한HTML 모두를 선택하게 한다.
- //
- model.setValue("/root/main/selectmode", mode) ;
- model.refresh();
- if(mode == "HTML")
- {
- f_View.BackColor = parent.rgb(252,254,225) ;
- //99ff66
- }
- else
- {
- f_View.BackColor = parent.rgb(230,230,250);
- }
-
- }
- function getHtmlMode()
- {
- // 모드가 HTML인경우는 동일한HTML 모두를 선택하게 한다.
- //
- model.refresh();
- return model.getValue("/root/main/selectmode") ;
-
- }
- function selectHtmlMode(page,flag)
- {
-
- if(getHtmlMode() == "HTML" )
- {
- var file;
- file = f_View.PageFilePath(page)
- if(page < f_View.Pagetotal)
- {
- for(count = page + 1 ; count <= f_View.Pagetotal; count++)
- {
- if(file == f_View.PageFilePath(count))
- {
- f_View.ThumbnailSelect(count, flag);
- }
- else
- {
- //count = f_View.Pagetotal;
- model.makeValue("root/temp/returninfo",setCopy(true))
-
- model.refresh();
- break;
- }
- }
- }
-
- if(page > 1)
- {
-
- for(count = page - 1 ; count >= 1; count--)
- {
- //alert(count)
- if(file == f_View.PageFilePath(count))
- {
- f_View.ThumbnailSelect(count, flag);
- }
- else
- {
- //count = 1;
- model.makeValue("root/temp/returninfo",setCopy(true))
-
- model.refresh();
- break;
- }
- }
- }
- var header ;
- header = "formcd▦signno▦formnm▦chosflag▦pid▦ptnm▦deptengabbr▦erdt▦rgstno▦disporddd▦drid▦roomcd▦disporddd▦ordtype▦e▦totalpage▩"
- opener.javascript.fGetSelectedFormInfo(header,setCopy(true))
-
- }else{
- // header = "formcd▦signno▦formnm▦chosflag▦pid▦ptnm▦deptengabbr▦erdt▦rgstno▦disporddd▦drid▦roomcd▦disporddd▦ordtype▦e▦totalpage▩"
- // opener.javascript.fGetSelectedFormInfoCD(header,setCopy(true))
-
- }
-
-
- }
- function PageCurrentChanged()
- {
- model.setValue("/root/main/chartinfo/pagecurrent", f_View.PageCurrent );
- model.refresh();
- }
- function ContinuousFirstImageChanged(Page)
- {
- if(f_View.PageCurrent != Page)
- {
- f_View.PageCurrent = Page;
- }
-
- }
- function PvMovePage(Mode)
- {
- switch(Mode)
- {
- case "first":
- f_View.actionsingle = 2;
- f_View.fitmode = 3;
- break;
- case "prev":
- f_View.actionsingle = 4;
- f_View.fitmode = 3;
- break;
- case "next":
- f_View.actionsingle = 5;
- f_View.fitmode = 3;
- break;
- case "last":
- f_View.actionsingle = 3;
- f_View.fitmode = 3;
- break;
- }
- }
- function ViewKeyDown(KeyCode, Shift)
- {
- switch(f_View.ViewMode)
- {
- case 0:
- //페이지
- // 이전차트 보기 (page Up)
- if (KeyCode == 33 && Shift ==0)
- {
- PvMovePage("prev");
- }
- else if (KeyCode == 37 && Shift ==0)
- {
- PvMovePage("prev");
- }
- // 다음 보기 (page Down)
- else if (KeyCode == 34 && Shift ==0)
- {
- PvMovePage("next");
- }
- else if (KeyCode == 39 && Shift ==0)
- {
- PvMovePage("next");
- }
- // 마지막 차트 End
- else if (KeyCode == 35 && Shift ==0)
- {
- PvMovePage("last");
- }
- // 처음 차트 Home
- else if (KeyCode == 36 && Shift ==0)
- {
- PvMovePage("first");
- }
- break;
- case 1:
- //연속보기
- //페이지
- // 이전차트 보기 (page Up)
- //alert(KeyCode)
- if (KeyCode == 33 && Shift ==0)
- {
- CvMovePage("prevpage");
- }
- else if (KeyCode == 37 && Shift ==0)
- {
- CvMovePage("prev");
- }
- // 다음 보기 (page Down)
- else if (KeyCode == 34 && Shift ==0)
- {
- CvMovePage("nextpage");
- }
- else if (KeyCode == 39 && Shift ==0)
- {
- CvMovePage("next");
- }
- // 마지막 차트 End
- else if (KeyCode == 35 && Shift ==0)
- {
- CvMovePage("last");
- }
- // 처음 차트 Home
- else if (KeyCode == 36 && Shift ==0)
- {
- CvMovePage("first");
- }
- break;
- case 2:
- //썸네일보기
- break;
-
- }
- }
-
- function CvMovePage(Mode)
- {
- switch(Mode)
- {
- case "first":
- f_View.PageCurrent = 1;
- //f_View.actionparamint1 = f_View.PageCurrent;
- //f_View.actioncontinuous = 8;
- f_View.actioncontinuous = 2;
- break;
- case "prev":
- if (f_View.PageCurrent != 1)
- {
- f_View.PageCurrent = f_View.PageCurrent - 1;
- }
-
- if (f_View.PageCurrent == 1)
- {
- f_View.actioncontinuous = 2;
- }
- else
- {
- f_View.actionparamint1 = f_View.PageCurrent;
- f_View.actioncontinuous = 8;
- }
- break;
- case "next":
- f_View.PageCurrent = f_View.PageCurrent + 1;
- f_View.actionparamint1 = f_View.PageCurrent;
- f_View.actioncontinuous = 8;
- break;
- case "last":
- f_View.PageCurrent = f_View.pagetotal;
- f_View.actionparamint1 = f_View.PageCurrent;
- f_View.actioncontinuous = 8;
- break;
- case "prevpage":
- f_View.actioncontinuous = 4;
- break;
- case "nextpage":
- f_View.actioncontinuous = 5;
- break;
- }
- }
- function CvMousePage(Mode)
- {
- switch(Mode)
- {
- case "normal":
- f_View.actioncontinuous = 0;
- break;
- case "panning":
- f_View.actioncontinuous = 10;
- break;
- case "zoom":
- f_View.MagnifyingGlassRatio = CVRatio.value;
- f_View.actioncontinuous = 11;
- break;
- }
- }
- function TVSelect(Mode)
- {
- switch(Mode)
- {
- case "all":
- f_View.actionthumbnail = 2;
- break;
- case "none":
- f_View.actionthumbnail = 3;
- break;
- }
- }
-
- function PvMousePage(Mode)
- {
- switch(Mode)
- {
- case "normal":
- f_View.actionsingle =0;
- break;
- case "panning":
- f_View.actionsingle = 21;
- break;
- case "zoom":
- f_View.MagnifyingGlassRatio = PVRatio.value;
- f_View.actionsingle = 22;
- break;
- case "regionzoom":
- f_View.actionsingle = 23;
- break;
- }
- }
- function PvFit()
- {
- f_View.fitmode = 3;
- }
- function PvTurn(Mode)
- {
- switch(Mode)
- {
- case "left":
- f_View.actionsingle = 7;
- break;
- case "right":
- f_View.actionsingle = 6;
- break;
- }
- }
- function MouseUp()
- {
- if(model.getValue("/root/cond/radio") == "TV")
- {
- f_View.ViewMode = 2;
- }
-
- }
- function ThumbnailClick_event(page, shift, button )
- {
- if(button == 1)
- {
- //2013/04/09 Start 여러장보기에서 선택시 페이지보기 페이지 선택해줌
- f_View.PageCurrent = page;
- //2013/04/09 End
- if(shift == 1)
- {
- var i = 0;
- var first = 0;
- var last = page;
- var count = 0;
-
- for(i=1; i <= f_View.PageTotal; i++)
- {
- if(f_View.ThumbnailSelect(i) == true)
- {
- if(first == 0)
- {
- first = i;
- //alert(f_View.PageFilePath(e.page);
- //alert("1");
- }
- }
- }
-
- if(page >= first)
- {
- count = last - first;
-
- for(i=1; i <= count; i++)
- {
- f_View.ThumbnailSelect(first + i, true);
- if( i == count)
- {
- selectHtmlMode(first + i,true);
- }
- }
- }
- else
- {
- count = first - last;
-
- for(i=0; i <= count; i++)
- {
- f_View.ThumbnailSelect(last + i, true);
-
- if( i == count)
- {
- selectHtmlMode(last + i,true);
- }
- }
- }
-
-
- }
- else
- {
-
- if(f_View.ThumbnailSelect(page) == false)
- {
- f_View.ThumbnailSelect(page, true);
- selectHtmlMode(page,true);
- }
- else
- {
- f_View.ThumbnailSelect(page,false);
- selectHtmlMode(page,false);
- }
-
-
- }
-
- model.setValue("/root/main/chartinfo/seltotal",getSelectPageCount());
- model.refresh();
-
-
- }
- else if(button == 2)
- {
- if(page == 0 )
- {
- }
- else
- {
-
- f_View.PageCurrent = page;
- f_View.ViewMode = 0;
- f_View.BestFit;
- }
-
- }
-
-
- }
- function ThumbnailDblClick_event(page)
- {
- if(page == 0)
- {
- }
- else
- {
- //2013/04/10 여러장보기에서 더블클릭시 페이지보기가 아니라 연속보기로 이동하도록 수정
- //setupChart("PV");
- setupChart("CV");
- //2013/04/10 end
- f_View.PageCurrent = page;
- }
- }
- function ImageDblClick_event(page)
- {
- setupChart("TV");
- f_View.actionparamint1 = page;
- f_View.actionthumbnail = 10;
- }
- function ImageClick_event(page, shift, button )
- {
- if(button == 2)
- {
- f_View.fitmode = 3;
- }
- }
- ////////////////////////////////////////////////////////////////////LTP
- function LTPInit(server, port, user)
- {
-
- if(f_ltp.IsOnline)
- {
-
- }
- else
- {
- f_ltp.server = server;
- f_ltp.account = user;
- f_ltp.port = port;
- if(f_ltp.Connect())
- {
- //alert("LTP 연결성공");
- }
- else
- {
- alert("LTP 데몬과의 접속이 실패하였습니다.");
- }
- }
- }
- // LTP 연결 해제
- function LTPClose()
- {
- f_ltp.Close();
- }
- function LTPFileGet(remotePath, localPath)
- {
- var is_succeed = f_ltp.FileGet(remotePath, localPath);
- if (is_succeed == false)
- {
- alert("파일다운로드에 실패하였습니다.");
- } else {
- //'alert("파일다운로드 성공하였습니다.");
- }
- return is_succeed;
- }
- function LTPFilePut(remotePath, localPath)
- {
- var is_succeed = f_ltp.FilePut(remotePath, localPath);
- if (is_succeed == false)
- {
- alert("파일업로드에 실패하였습니다.");
- }
- return is_succeed;
- }
- function LTPFilesGet(remotePath, localPath)
- {
- return f_ltp.FilesGet(remotePath, localPath);
- }
- function LTPFilesPut(remotePath, localPath)
- {
- return f_ltp.FilesPut(remotePath, localPath);
- }
- function LTPClose()
- {
- return f_ltp.Close();
- }
- function getFiles(host, port, user, pass, pathRemote, pathLocal)
- {
- //alert(host + " " + port + " " + user + " " + pathRemote + " " + pathLocal);
- var result;
-
- //현재 테스트를 위해서 경로 하드 코딩 오픈시 cmr.patht 포트 유저 변경 해야 함
- //host = "192.168.100.194";
- port = "2500";
- user = "user";
-
- LTPInit(host, port, user);
- result = LTPFilesGet(pathRemote, pathLocal);
-
- //LTPClose();
-
- return result;
- }
- function MouseWheel_event(button, shift, zDelta){
- if(shift == 4 && f_View.viewMode == 0 && zDelta == 120)
- {
- f_View.FitMode = 1
- f_View.ViewRatio += 0.1
- }
- else if(shift == 4 && f_View.viewMode == 0 && zDelta == -120)
- {
- f_View.FitMode = 1
- f_View.ViewRatio -= 0.1
- }
- else if(shift == 4 && f_View.viewMode == 2 && zDelta == 120)
- {
- f_View.ThumbnailWidth += 7;
- f_View.ThumbnailHeight += 10;
- }
- else if(shift == 4 && f_View.viewMode == 2 && zDelta == -120)
- {
- f_View.ThumbnailWidth -= 7;
- f_View.ThumbnailHeight -= 10;
- }
- //2014/03/27 이정택 추가
- /* var sid = opener.javascript.getScreenID();
- if(sid=="SMMRI00400"){
- var page_number=opener.javascript.page_number;
- var pagetotcnt=opener.javascript.pagetotcnt;
-
- if(Math.ceil(f_View.GetVScrollRatio) > 95){
- if(page_number=="" || page_number==null){
- page_number="1";
- }else{
- page_number=parseInt(page_number)+1;
- }
- if(parseInt(page_number) <= parseInt(pagetotcnt)){
- //alert(parseInt(page_number));
- opener.javascript.model.makeValue("/root/taek/cnt"+parseInt(page_number), parseInt(page_number));
- opener.javascript.fPaging(parseInt(page_number));
- }
- }
- }*/
- //2014/03/27 이정택 추가
- }
- /**
- * 페이징 처리
- * 이정택 2014/04/01
- * @param param
- * @param chartinfo
- * @param hiddenmsg
- * @param recrowno
- * @return
- */
- function fClickNext(){
- var sid = opener.javascript.getScreenID();
- if(sid=="SMMRI00400"){
- var cpage = model.getValue("/root/main/chartinfo/pagecurrent");
- var page_number=opener.javascript.page_number;
- var pagetotcnt=opener.javascript.pagetotcnt;
-
- if(page_number=="" || page_number==null){
- page_number="1";
- }else{
- page_number=parseInt(page_number)+1;
- }
- if(parseInt(page_number) <= parseInt(pagetotcnt)){
- opener.javascript.fPaging(parseInt(page_number));
- }
- f_View.PageCurrent = cpage;
- }
- }
- //========================================================================
- function append_BmarkChart(param, chartinfo, hiddenmsg , recrowno)
- {
- //영상-EMR구분|파일경로| TREATNO | FORMCODE | PAGENO
- var arrChartInfo;
- var nPrvPageTotal;
- var nCurPageTotal;
- var nCurPageCount;
- var nNexPageTotal;
- var i;
- var j;
- var r, re;
- r = ",";
- re = "','";
- var treatno;
- var docucd;
- var temptreatno;
- var tempdocucd;
- var count;
- var countmain;
- var counthidden;
-
- //영상-EMR구분|파일경로| TREATNO | FORMCODE | PAGENO
- if (chartinfo == "")
- {
- return false;
- }
-
- nPrvPageTotal = parseInt(f_View.PageTotal);
- nCurPageTotal = parseInt(f_View.PageTotal);
- arrChartInfo = chartinfo.split("|");
-
- if (arrChartInfo[0] == "I")
- {
- // 전송할 데이터를 만든다.
- var destNode = instance1.selectSingleNode("/root/_send/data1");
- var pageno = "";
-
-
- var params = param.selectNodes("iemr");
- for(var i = 0 ; i < params.length ; i++){
- var selParam = params.item(i);
- pageno = pageno + selParam.selectSingleNode("pageno").text + ",";
- }
- pageno = pageno.substr(0, pageno.length - 1);
-
- model.removenode("/root/tmp/pagenoset");
- model.makeValue("/root/tmp/pagenoset", pageno);
- var selNode = instance1.selectSingleNode("/root/tmp/pagenoset");
- param.appendChild(selNode);
-
- model.copyNode(destNode, param);
-
- // 전송
- submit("TRMPL08130");
- // 보여줄 페이지 수를 센다.
- nCurPageCount = 0;
- while(model.getValue("/root/main/charts[" + (nCurPageCount + 1) + "]/chrtpage") != null && model.getValue("/root/main/charts[" + (nCurPageCount + 1) + "]/chrtpage") != "")
- {
- nCurPageCount++;
- nCurPageTotal++;
- }
- model.makeNode("/root/_send/data1/pagetot");
- model.setValue("/root/_send/data1/pagetot", nCurPageCount);
- model.setValue("/root/main/chartinfo/filetotal", model.getValue("/root/_send/data1/pagetot"));
- model.setValue("/root/main/chartinfo/pagetotal", nCurPageTotal);
- model.setValue("/root/main/chartinfo/pagecurrent", model.getValue("/root/main/chartinfo/pagetotal") != "0" ? "1" : "0");
- model.refresh();
- // 만들었던 데이터 삭제
- model.resetInstanceNode("/root/_send");
-
- // 페이지 정보를 조정한다.
- model.setValue("/root/main/chartinfo/pagecurrent", model.getValue("/root/main/chartInfo/pagetotal") != "0" ? "1" : "0");
- model.refresh();
- // 파일다운로드
- downloadChart();
- for (i = nPrvPageTotal + 1; i <= nCurPageTotal; i++)
- {
- // knuh_20110802_수정_실시일자로 수정
- var indd = "";
- if (model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/cmc_acptime") == "")
- {
- indd = model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/indd");
- }
- else
- {
- indd = model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/cmc_acptime");
- }
-
- g_outertext[i - 1] = formatDate(indd) + " " +
- model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/orddeptnm") + " " +
- model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/docunm") + " " +
- model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/chrtpage");
- f_View.PageAppend(g_path[i], 1, 1);
- f_View.PageText(i) = "[" +
- model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/chrtpage") +
- "] " +
- indd + " " +
- model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/docunm");
- f_View.PageHiddenText(i) = "I" + "▦" + model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/ordno") +
- "▦" + model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/docucd") +
- "▦" + model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/pagecnt") +
- "▦" + model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/pageno") +
- "▦" + model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/indd") +
- "▦" + model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/docunm") +
- "▦" + "[" + model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/chrtpage") + "]" +
- "|";
-
- f_View.ActionParamInt1 = i;
- f_View.actionparamstring1 = g_outertext[i - 1];
- f_View.actioncontinuous = 9;
- g_recrowno[i]= recrowno;
-
- }
- /*
- // 차트 추가
- objChartView.AutoRefresh = false;
- objChartView.ChartAppend(g_path[1], 1, 1);
- objChartView.OuterCaption(1) = g_outertext[0];
- objChartView.AutoRefresh = true;
- */
- }
- else
- {
- //영상-EMR구분|파일경로|입원일|서식지코드|서식지이름|진료과코드|진료과이름
- // 차트 추가
- i = nPrvPageTotal + 1;
-
- f_view.PageAppend(arrChartInfo[1], 1, 1);
-
- nNexPageTotal = parseInt(f_view.PageTotal);
- for (j = i; j <= nNexPageTotal; j++)
- {
-
- g_outertext[j - 1] = formatDate(arrChartInfo[2]) + " " +
- arrChartInfo[6] + " " +
- arrChartInfo[4] + " " +
- parseInt(j - i + 1);
- f_View.PageText(j) = "[" +
- parseInt(j - i + 1) +
- "] " +
- arrChartInfo[2] + " " +
- arrChartInfo[4];
- f_view.PageHiddenText(j) = hiddenmsg + "▦" + nNexPageTotal;
- g_recrowno[j]= recrowno;
- g_path[j] = f_view.PageFilePath(j);
- g_page[j] = j - i + 1;
- g_page_lut[j] = j;
-
- f_View.ActionParamInt1 = j;
- f_View.actionparamstring1 = g_outertext[j - 1];
- f_View.actioncontinuous = 9;
- }
- // 차트 추가
- /*
- objChartView.AutoRefresh = false;
- objChartView.ChartAppend(arrChartInfo[1], 1, 1);
- objChartView.OuterCaption(1) = g_outertext[0];
- objChartView.AutoRefresh = true;
- */
- model.setValue("/root/main/chartinfo/pagetotal", nNexPageTotal);
- model.setValue("/root/main/chartinfo/pagecurrent", model.getValue("/root/main/chartinfo/pagetotal") != "0" ? "1" : "0");
- model.refresh();
- }
-
- f_View.PageCurrent = 1;
- model.setValue("/root/main/chartinfo/pagecurrent", f_View.PageCurrent );
- model.setValue("/root/main/chartinfo/pagetotal", f_View.PageTotal );
- model.setValue("/root/main/chartinfo/filetotal", f_View.PageTotal );
- model.refresh();
-
- return true;
- }
- function appendChart(param, chartinfo, hiddenmsg , recrowno )
- {
- var arrChartInfo;
- var nPrvPageTotal;
- var nCurPageTotal;
- var nCurPageCount;
- var nNexPageTotal;
- var i;
- var j;
- var r, re;
- r = ",";
- re = "','";
- var treatno;
- var docucd;
- var temptreatno;
- var tempdocucd;
- var count;
- var countmain;
- var counthidden;
-
-
- //영상-EMR구분|파일경로|입원일|서식지코드|서식지이름|진료과코드|진료과이름
- if (chartinfo == "")
- {
- return false;
- }
-
- arrChartInfo = chartinfo.split("|");
- if (arrChartInfo[0] == "I")
- {
- // 전송할 데이터를 만든다.
- //ClearChart()
- nPrvPageTotal = parseInt(f_View.PageTotal);
- nCurPageTotal = parseInt(f_View.PageTotal);
-
- var destNode = instance1.selectSingleNode("/root/_send/data1");
- model.copyNode(destNode, param);
- // 전송
- submit("TRMPL08101");
- // 보여줄 페이지 수를 센다.
- nCurPageCount = 0;
- while(model.getValue("/root/main/charts[" + (nCurPageCount + 1) + "]/chrtpage") != null && model.getValue("/root/main/charts[" + (nCurPageCount + 1) + "]/chrtpage") != "")
- {
- nCurPageCount++;
- nCurPageTotal++;
- }
-
-
- model.makeNode("/root/_send/data1/pagetot");
- model.setValue("/root/_send/data1/pagetot", nCurPageCount);
- model.setValue("/root/main/chartinfo/filetotal", model.getValue("/root/_send/data1/pagetot"));
- model.setValue("/root/main/chartinfo/pagetotal", nCurPageTotal);
- model.setValue("/root/main/chartinfo/pagecurrent", model.getValue("/root/main/chartinfo/pagetotal") != "0" ? "1" : "0");
- model.refresh();
-
-
- // 만들었던 데이터 삭제
- model.resetInstanceNode("/root/_send");
-
- // 페이지 정보를 조정한다.
- model.setValue("/root/main/chartinfo/pagecurrent", model.getValue("/root/main/chartInfo/pagetotal") != "0" ? "1" : "0");
- model.refresh();
- // 파일다운로드
- downloadChart();
- //alert("appendchart");
- for (i = nPrvPageTotal + 1; i <= nCurPageTotal; i++)
- {
-
- var indd = "";
- if (model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/cmc_acptime") == "")
- {
- indd = model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/indd");
- }
- else
- {
- indd = model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/cmc_acptime");
- }
-
-
-
- g_outertext[i - 1] = formatDate(indd) + " " +
- model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/orddeptnm") + " " +
- model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/docunm") + " " +
- model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/chrtpage");
-
- f_View.PageAppend(g_path[i], 0, 0);
-
- f_View.ActionParamInt1 = i;
- f_View.ActionParamString1 = g_outertext[i - 1];
- f_View.Actioncontinuous = 9;
-
- // KNUH_20110525_수정 - 이미지의 헤더의 날짜를 실시일자로 바꿔달라는 요청
-
- f_View.PageText(i) = "[" +
- model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/chrtpage") +
- "] " +
- indd + " " +
- model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/docunm");
-
- f_View.PageHiddenText(i) = "I" + "▦" + model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/ordno") +
- "▦" + model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/docucd") +
- "▦" + model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/pagecnt") +
- "▦" + model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/pageno") +
- "▦" + model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/indd") +
- "▦" + model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/docunm") +
- "▦" + "[" + model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/chrtpage") + "]" +
- "|";
- //alert(f_View.PageHiddenText(i));
- g_recrowno[i]= recrowno;
-
- }
- // 차트 추가
- /*
- objChartView.AutoRefresh = false;
- objChartView.ChartAppend(g_path[1], 1, 1);
- objChartView.OuterCaption(1) = g_outertext[0];
- objChartView.AutoRefresh = true;
- */
- }
- else
- {
- //영상-EMR구분|파일경로|입원일|서식지코드|서식지이름|진료과코드|진료과이름
- // 차트 추가
- //ClearChart()
- nPrvPageTotal = parseInt(f_View.PageTotal);
- nCurPageTotal = parseInt(f_View.PageTotal);
-
- i = nPrvPageTotal + 1;
-
- f_View.PageAppend(arrChartInfo[1], 0, 0);
-
- nNexPageTotal = parseInt(f_View.pagetotal);
-
- for (j = i; j <= nNexPageTotal; j++)
- {
-
- /*
- g_outertext[j - 1] = formatDate(arrChartInfo[2]) + " " +
- arrChartInfo[6] + " " +
- arrChartInfo[4] + " " +
- parseInt(j - i + 1);
- */
- g_outertext[j - 1] = "[" +
- parseInt(j - i + 1) +
- "] " +
- arrChartInfo[2] + " " +
- arrChartInfo[4];
-
- //alert("g_outertext" + g_outertext[j - 1]);
- f_View.PageText(j) = "[" +
- parseInt(j - i + 1) +
- "] " +
- arrChartInfo[2] + " " +
- arrChartInfo[4];
-
- f_View.PageHiddenText(j) = hiddenmsg + "▦" + nNexPageTotal;
- //alert(" f_View.PageHiddenText(j)" + f_View.PageHiddenText(j));
- f_View.ActionParamInt1 = j;
- f_View.ActionParamString1 = g_outertext[j - 1];
- f_View.Actioncontinuous = 9;
-
- g_recrowno[j]= recrowno;
- g_path[j] = f_View.PageFilePath(j);
- g_page[j] = j - i + 1;
- g_page_lut[j] = j;
- }
- // 차트 추가
- /*
- objChartView.AutoRefresh = false;
- objChartView.ChartAppend(arrChartInfo[1], 1, 1);
- objChartView.OuterCaption(1) = g_outertext[0];
- objChartView.AutoRefresh = true;
- */
- model.setValue("/root/main/chartinfo/pagetotal", nNexPageTotal);
- model.setValue("/root/main/chartinfo/pagecurrent", model.getValue("/root/main/chartinfo/pagetotal") != "0" ? "1" : "0");
- model.refresh();
- }
-
- f_View.PageCurrent = 1;
- model.setValue("/root/main/chartinfo/pagecurrent", f_View.PageCurrent );
- model.setValue("/root/main/chartinfo/pagetotal", f_View.PageTotal );
- model.setValue("/root/main/chartinfo/filetotal", f_View.PageTotal );
- model.refresh();
- }
- function downloadChart()
- {
- var fso;
- var curAddr = "";
- var curHost = "";
- var curPort = "";
- var xpathChart;
- var pathRemote = "";
- var pathLocal = "";
- var pathSrc;
- var pathDst;
- var pageDemand;
- var filename;
- var pathname;
- var rmad;
- var rmpo;
- var i;
- var j;
- var cdate;
- var cdateyyyymm;
- var cdatedd;
- var security;
-
- fso = new ActiveXObject("Scripting.FileSystemObject");
-
- // 차트 파일을 다운로드 받을 폴더를 준비한다.
- //var pathRecv;
-
-
- // 차트를 다운받을 폴더가 없다면 만든다.
- //if( fso.FolderExists(pathRecv) == false)
- //{
- // fso.CreateFolder(pathRecv);
- //}
-
- // 차트 폴더를 저장
- //model.setValue("/root/hidden/chartImageHome", pathRecv);
- //setupRecvPath(fso);
- var fileTotal = model.getValue("/root/main/chartinfo/filetotal");
- model.setValue("/root/main/chartinfo/pagetotal",model.getValue("/root/main/chartinfo/filetotal"));
- var pathRecv = model.getValue("/root/hidden/chartImageHome");
-
- var pagingyn = model.getValue("/root/envinit/pagingyn");
-
- if (pagingyn == "Y") {
- var quo = parseInt(fileTotal/10);
- var mod = fileTotal % 10 ;
- var endpos ;
-
- if ( mod == 0) {
- endpos = quo;
- }
- else {
- endpos = quo + 1;
- }
-
- var cptitem = "";
- var captionObj = "";
- for (k = 1; k <= endpos; k++) {
- model.makeValue("/root/initinfo/pagelist/page["+k+"]/cdid",k - 1);
- model.makeValue("/root/initinfo/pagelist/page["+k+"]/cdnm",k);
-
- cptitem = "cpt"+k;
- captionObj = document.controls(cptitem);
- if( captionObj != null ){
- captionObj.visible = true;
- }
- }
- model.refresh();
- // rdo_lindx.attribute("width") = k * 31;
-
-
- }
-
- if(pathRecv == "")
- {
- pathRecv = fso.GetSpecialFolder(2) + "\\LCViewer\\";
- }
- if (fileTotal >= 1)
- {
- body.disabled = false;
-
- var pagingyn = model.getValue("/root/envinit/pagingyn");
-
- if (pagingyn == "Y") {
- pageDemand = 0;
- }
- else {
- pageDemand = parseInt(f_View.PageTotal);
- }
-
- for(i = 0; i < fileTotal; i++ )
- {
-
- // 작업할 차트 정보를 갖고 있는 xpath를 만든다.
- xpathChart = getXPathChart(i + 1);
-
- // 다운로드 받을 파일이 있는 서버 정보를 얻는다.
- rmad = model.getValue(xpathChart + "/remtip");
- rmpo = model.getValue(xpathChart + "/remtport");
- // rmad가 비어 있다면 로컬 디스크 상에 파일이 있는걸로 간주한다.
- if(rmad != "")
- {
- // 다운로드 받을 파일의 패스를 만든다.
- filename = model.getValue(xpathChart + "/pageno" );
- //alert(filename);
- pathname = "000" + filename;
- //alert(pathname);
- cdate = model.getValue(xpathChart + "/ptdt" );
- //alert(cdate);
- cdateyyyymm = cdate.substr(0, 6);
- //alert(cdateyyyymm);
- cdatedd = cdate.substr(6, 2)
- //alert(cdatedd);
- security = model.getValue(xpathChart + "/scrt" );
- //alert(security);
- // 2012-01-17 유희갑 수정
- // 사유 : 경로를 비트 방식에서 엘씨테크 방식으로 변경
- // security 값이 'D', 'L'
- // 'D' --> YYYYMM/DD/file
- // 'L' --> YYYYMM/DD/file 마지막 숫자/file 으로 변경
- //pathSrc = model.getValue(xpathChart + "/remtpath") + "\\" + pathname.substr(pathname.length - 4, 4) + "\\" + filename + "." + model.getValue(xpathChart+ "/fileextn ");
- pathSrc = model.getValue(xpathChart + "/remtpath") + "\\" + pathname.substr(pathname.length - 4, 4) + "\\" + filename + "." + model.getValue(xpathChart+ "/fileextn ");
- //scrt
- //if (security == "D")
- //{
- // pathSrc = model.getValue(xpathChart + "/remtpath") + "\\" + cdateyyyymm + "\\" + cdatedd + "\\" + filename + "." + model.getValue(xpathChart+ "/fileextn ");
- //}
- //else
- //{
- // pathSrc = model.getValue(xpathChart + "/remtpath") + "\\" + cdateyyyymm + "\\" + cdatedd + "\\" + pathname.substr(pathname.length - 1, 1) + "\\" + filename + "." + model.getValue(xpathChart+ "/fileextn ");
- //
- //}
-
-
- pathDst = pathRecv + filename + "." + model.getValue(xpathChart+ "/fileextn ") ;
-
- // 파일을 다운로드 받거나 패스 문자열을 만든다.
- if(curAddr == rmad && curPort == rmpo)
- {
- // 이미 존재하는 내용이 있다면 연결 문자를 추가한다.
- if( pathRemote.length != 0 )
- {
- pathRemote = pathRemote + "|";
- pathLocal = pathLocal + "|";
- // pathRemote = pathRemote + splittxt;
- // pathLocal = pathLocal + splittxt;
- }
-
- // 받을 파일을 추가한다.
- pathRemote = pathRemote + pathSrc;
- pathLocal = pathLocal + pathDst;
- }
- else
- {
- // 필요하다면 파일을 다운로드 받는다.
-
- if(pathRemote.length != 0 )
- {
- if(getFiles(curAddr, curPort, model.getValue(xpathChart+ "/remtuser"), model.getValue(xpathChart+ "/remtpwd"), pathRemote, pathLocal) == false) ;
-
- }
-
- // 현재 상태를 초기화 한다.
- pathRemote = pathSrc;
- pathLocal = pathDst;
- curAddr = rmad;
- curPort = rmpo;
- }
-
- // 파일 패스와 페이지 번호 저장
-
- g_path[pageDemand + 1] = pathDst;
- g_page[pageDemand + 1] = 1;
- g_page_lut[pageDemand + 1] = i + 1;
- pageDemand++;
- }
- else
- {
- // 로컬 디스크에 파일이 있을경우 그 패스는 rmpt에 들어가 있게 된다.
- // pageno에 보여질 이미지 파일의 파일 이름을 저장해 두게 된다.
- // 원본과 복사본 파일 패스
- filename = "local" + i + ".txt";
- pathSrc = model.getValue(xpathChart + "/remtpath");
- pathDst = pathRecv + filename;
-
- // 파일 복사
- fso.CopyFile(pathSrc, pathDst, true);
-
- // 파일 이름을 pageno에 저장
- model.setValue(xpathChart + "/pageno", filename);
-
-
- // 파일 패스와 페이지 번호 저장
- //objPreview.Load(pathDst, 1);
-
- for(j = 0; j < objPreview.TotalPage; j++)
- {
- g_path[pageDemand + 1] = pathDst;
- g_page[pageDemand + 1] = j + 1;
- g_page_lut[pageDemand + 1] = i + 1;
- pageDemand++;
-
- }
- //objPreview.ImageFilePath = "";
-
- }
- }
- // 필요하다면 파일을 다운로드 받는다.
- //alert( pathRemote);
- //alert( pathLocal);
- if( pathRemote.length != 0 )
- {
- var pagingyn = model.getValue("/root/envinit/pagingyn");
-
- if (pagingyn == "Y") {
- var seqflag = model.getValue("/root/init/seqflag");
- var startnum = seqflag * 10;
- var quo = parseInt(fileTotal/10);
- var mod = fileTotal % 10 ;
-
- if (quo == seqflag ) {
- endnum = startnum + mod - 1;
- }
- else {
- endnum = startnum + 9;
- }
-
- var pagepathRemote = pathRemote.split("|");
- var startpathRemote = pagepathRemote[startnum];
- var endpathRemote = pagepathRemote[endnum];
- var startpos = pathRemote.indexOf(startpathRemote);
- var endpos = pathRemote.indexOf(endpathRemote) + endpathRemote.length;
- var newpathRemote = pathRemote.substring(startpos,endpos);
-
- var pagepathLocal = pathLocal.split("|"); //splittxt);
- var startpathLocal = pagepathLocal[startnum];
- var endpathLocal = pagepathLocal[endnum];
- var startpos = pathLocal.indexOf(startpathLocal);
- var endpos = pathLocal.indexOf(endpathLocal) + endpathLocal.length;
- var newpathLocal = pathLocal.substring(startpos,endpos);
- if(getFiles(curAddr, curPort, model.getValue(xpathChart+ "/remtuser"), model.getValue(xpathChart+ "/remtpwd"), newpathRemote, newpathLocal) == false) ;
- }
- else {
- if(getFiles(curAddr, curPort, model.getValue(xpathChart+ "/remtuser"), model.getValue(xpathChart+ "/remtpwd"), pathRemote, pathLocal) == false) ;
- }
-
- }
-
- //setupMoveButton();
- //return true;
- }
- if (model.getValue("/root/main/emrpath") != null && model.getValue("/root/main/emrpath") != "")
- {
- pageDemand = appendEMRChart();
- model.setValue("/root/main/chartinfo/pagecurrent", pageDemand == 1 ? 0 : 1);
- model.setValue("/root/main/chartinfo/pagetotal", pageDemand);
- model.refresh();
- //setupMoveButton();
-
- for (i = g_temp_page.length - 1; i >= 0; i--)
- {
- delete g_temp_path[i];
- delete g_temp_page[i];
- }
- for (count = 1; count < g_page.length; count++)
- {
- g_temp_path[count] = g_path[count];
- g_temp_page[count] = g_page[count];
- }
-
- }
- return true;
- /*
- else
- {
- alert("해당 데이터에 대한 이미지가 없습니다.");
- // setupChart("PageView");
- // body.disabled = true;
- return false;
- }
- */
- }
- function appendChartMulti(param)
- {
- var arrChartInfo;
- var nPrvPageTotal;
- var nCurPageTotal;
- var nCurPageCount;
- var nNexPageTotal;
-
- var i;
- var j;
-
- var k;
- var p;
- var q;
- var r, re;
- r = ",";
- re = "','";
- var treatno;
- var docucd;
- var temptreatno;
- var tempdocucd;
- var count;
- var countmain;
- var counthidden;
-
- var count;
- var chartinfo;
- var hiddenmsg;
- var recrowno;
- var ordno;
- var imgcount;
- var arrparam;
- var arrdata;
- var pagecnt;
-
- arrparam = param.split("▩")
- arrdata = arrparam[1].split("▦");
- patid = arrdata[0];
-
- // 만들었던 데이터 삭제
- model.resetInstanceNode("/root/_send");
- model.makeValue("/root/_send/data1/pid", patid);
- model.makeValue("/root/_send/data1/instcd", "053");
- //alert(model.getValue("/root/_send/data1/pid"));
-
- submit("TRMPL08101");
-
-
-
- imgcount = getNodesetCount("/root/main/charts/pageno");
- //alert(imgcount);
- model.makeNode("/root/_send/data1/pagetot");
- model.setValue("/root/_send/data1/pagetot", imgcount);
- model.setValue("/root/main/chartinfo/filetotal", imgcount);
- model.setValue("/root/main/chartinfo/pagetotal", imgcount);
- model.setValue("/root/main/chartinfo/pagecurrent", imgcount);
- model.refresh();
-
-
- // 페이지 정보를 조정한다.
- model.setValue("/root/main/chartinfo/pagecurrent", imgcount);
- model.refresh();
- downloadChart();
- for (k = 1; k <= arrparam.length - 1; k++)
- {
- arrdata = arrparam[k].split("▦");
-
- treatno = arrdata[1];
- formcode = arrdata[2];
- chartinfo = arrdata[3];
- hiddenmsg = arrdata[4];
- recrowno = arrdata[5];
-
- // arrChartInfo = chartinfo.split("|");
- arrChartInfo = chartinfo.split(splittxt);
- //alert(arrChartInfo[0]);
- if (arrChartInfo[0] == "I")
- {
- for (q = 1; q <= imgcount; q ++)
- {
- /*
- alert("ordno " + model.getValue("/root/main/charts[" + q + "]/ordno"));
- alert("orddeptcd " + model.getValue("/root/main/charts[" + q + "]/orddeptcd"));
- alert("indd" + model.getValue("/root/main/charts[" + q + "]/indd"));
- alert("pageno" + model.getValue("/root/main/charts[" + q + "]/pageno"));
- */
-
- if (treatno == model.getValue("/root/main/charts[" + q + "]/ordno"))
- {
- // 전송할 데이터를 만든다.
-
- //ClearChart()
- anPrvPageTotal = parseInt(f_View.PageTotal);
- nCurPageTotal = parseInt(f_View.PageTotal);
-
- // 전송
-
- // 보여줄 페이지 수를 센다.
- nCurPageCount = 0;
- /*
- while(model.getValue("/root/main/charts[" + q + "]/chrtpage") != null && model.getValue("/root/main/charts[" + q + "]/chrtpage") != "")
- {
- nCurPageCount++;
- nCurPageTotal++;
- }
- */
- nCurPageCount++;
- nCurPageTotal++;
-
- model.makeNode("/root/_send/data1/pagetot");
- model.setValue("/root/_send/data1/pagetot", nCurPageCount);
- model.setValue("/root/main/chartinfo/filetotal", model.getValue("/root/_send/data1/pagetot"));
- model.setValue("/root/main/chartinfo/pagetotal", nCurPageTotal);
- model.setValue("/root/main/chartinfo/pagecurrent", model.getValue("/root/main/chartinfo/pagetotal") != "0" ? "1" : "0");
- model.refresh();
-
- // 만들었던 데이터 삭제
- model.resetInstanceNode("/root/_send");
-
- // 페이지 정보를 조정한다.
- model.setValue("/root/main/chartinfo/pagecurrent", model.getValue("/root/main/chartInfo/pagetotal") != "0" ? "1" : "0");
- model.refresh();
-
- f_View.PageAppend(g_path[i], 0, 0);
-
- //alert(g_path[i]);
-
- //alert(g_path[i]);
- // KNUH_20110525_수정 - 이미지의 헤더의 날짜를 실시일자로 바꿔달라는 요청
-
- var indd = "";
- if (model.getValue("/root/main/charts[" + q + "]/cmc_acptime") == "")
- {
- indd = model.getValue("/root/main/charts[" + q + "]/indd");
- }
- else
- {
- indd = model.getValue("/root/main/charts[" + q + "]/cmc_acptime");
- }
-
- g_outertext[i - 1] = formatDate(indd) + " " +
- model.getValue("/root/main/charts[" + q + "]/orddeptnm") + " " +
- model.getValue("/root/main/charts[" + q + "]/docunm") + " " +
- model.getValue("/root/main/charts[" + q + "]/chrtpage");
-
- f_View.ActionParamInt1 = i;
- f_View.ActionParamString1 = g_outertext[i - 1];
- f_View.Actioncontinuous = 9;
-
- // KNUH_20110525_수정 - 이미지의 헤더의 날짜를 실시일자로 바꿔달라는 요청
-
- f_View.PageText(i) = "[" +
- model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/chrtpage") +
- "] " +
- indd + " " +
- model.getValue("/root/main/charts[" + (i - nPrvPageTotal) + "]/docunm");
-
-
- f_View.PageHiddenText(i) = "I" + "▦" + model.getValue("/root/main/charts[" + q + "]/ordno") +
- "▦" + model.getValue("/root/main/charts[" + q + "]/docucd") +
- "▦" + model.getValue("/root/main/charts[" + q + "]/pagecnt") +
- "▦" + model.getValue("/root/main/charts[" + q + "]/pageno") +
- "▦" + model.getValue("/root/main/charts[" + q + "]/indd") +
- "▦" + model.getValue("/root/main/charts[" + q + "]/docunm") +
- "▦" + "[" + model.getValue("/root/main/charts[" + q + "]/chrtpage") + "]" +
- "|";
- //alert(f_View.PageHiddenText(i));
- g_recrowno[i]= recrowno;
-
-
-
- // 차트 추가
- }
- }
- }
- else
- {
- //영상-EMR구분|파일경로|입원일|서식지코드|서식지이름|진료과코드|진료과이름
- // 차트 추가
-
- //ClearChart()
- nPrvPageTotal = parseInt(f_View.PageTotal);
- nCurPageTotal = parseInt(f_View.PageTotal);
-
- i = nPrvPageTotal + 1;
-
- f_View.PageAppend(arrChartInfo[1], 0, 0);
-
- nNexPageTotal = parseInt(f_View.pagetotal);
-
- for (j = i; j <= nNexPageTotal; j++)
- {
- g_outertext[j - 1] = "[" +
- parseInt(j - i + 1) +
- "] " +
- arrChartInfo[2] + " " +
- arrChartInfo[4];
-
- //alert("g_outertext" + g_outertext[j - 1]);
- f_View.PageText(j) = "[" +
- parseInt(j - i + 1) +
- "] " +
- arrChartInfo[2] + " " +
- arrChartInfo[4];
-
- f_View.PageHiddenText(j) = hiddenmsg + "▦" + nNexPageTotal;
- //alert(" f_View.PageHiddenText(j)" + f_View.PageHiddenText(j));
- f_View.ActionParamInt1 = j;
- f_View.ActionParamString1 = g_outertext[j - 1];
- f_View.Actioncontinuous = 9;
-
- g_recrowno[j]= recrowno;
- g_path[j] = f_View.PageFilePath(j);
- g_page[j] = j - i + 1;
- g_page_lut[j] = j;
- }
- // 차트 추가
-
- model.setValue("/root/main/chartinfo/pagetotal", nNexPageTotal);
- model.setValue("/root/main/chartinfo/pagecurrent", model.getValue("/root/main/chartinfo/pagetotal") != "0" ? "1" : "0");
- model.refresh();
- }
- }
-
- f_View.PageCurrent = 1;
- model.setValue("/root/main/chartinfo/pagecurrent", f_View.PageCurrent );
- model.setValue("/root/main/chartinfo/pagetotal", f_View.PageTotal );
- model.setValue("/root/main/chartinfo/filetotal", f_View.PageTotal );
- model.refresh();
- }
- function downloadChartMulti(recrowno)
- {
- var fso;
- var curAddr = "";
- var curHost = "";
- var curPort = "";
- var xpathChart;
- var pathRemote = "";
- var pathLocal = "";
- var pathSrc;
- var pathDst;
- var pageDemand;
- var filename;
- var pathname;
- var rmad;
- var rmpo;
- var i;
- var j;
- var cdate;
- var cdateyyyymm;
- var cdatedd;
- var security;
-
- fso = new ActiveXObject("Scripting.FileSystemObject");
-
- // 차트 파일을 다운로드 받을 폴더를 준비한다.
- //var pathRecv;
-
-
-
- // 차트를 다운받을 폴더가 없다면 만든다.
- //if( fso.FolderExists(pathRecv) == false)
- //{
- // fso.CreateFolder(pathRecv);
- //}
-
- // 차트 폴더를 저장
- //model.setValue("/root/hidden/chartImageHome", pathRecv);
- //setupRecvPath(fso);
- var fileTotal = model.getValue("/root/main/chartinfo/filetotal");
- model.setValue("/root/main/chartinfo/pagetotal",model.getValue("/root/main/chartinfo/filetotal"));
- var pathRecv = model.getValue("/root/hidden/chartImageHome");
-
- if(pathRecv == "")
- {
- pathRecv = fso.GetSpecialFolder(2) + "\\LCViewer\\";
- }
-
-
- if (fileTotal >= 1)
- {
- body.disabled = false;
- //pageDemand = 0;
- pageDemand = parseInt(f_View.PageTotal);
-
- for(i = 0; i < fileTotal; i++ )
- {
- // 작업할 차트 정보를 갖고 있는 xpath를 만든다.
- xpathChart = getXPathChart(i + 1);
-
- // 다운로드 받을 파일이 있는 서버 정보를 얻는다.
- rmad = model.getValue(xpathChart + "/remtip");
- rmpo = model.getValue(xpathChart + "/remtport");
-
- //alert(rmpo);
-
- // rmad가 비어 있다면 로컬 디스크 상에 파일이 있는걸로 간주한다.
- if(rmad != "")
- {
- // 다운로드 받을 파일의 패스를 만든다.
- filename = model.getValue(xpathChart + "/pageno" );
- //alert(filename);
- pathname = "000" + filename;
- //alert(pathname);
- cdate = model.getValue(xpathChart + "/ptdt" );
- //alert(cdate);
- cdateyyyymm = cdate.substr(0, 6);
- //alert(cdateyyyymm);
- cdatedd = cdate.substr(6, 2)
- //alert(cdatedd);
- security = model.getValue(xpathChart + "/scrt" );
- //alert(security);
- // 2012-01-17 유희갑 수정
- // 사유 : 경로를 비트 방식에서 엘씨테크 방식으로 변경
- // security 값이 'D', 'L'
- // 'D' --> YYYYMM/DD/file
- // 'L' --> YYYYMM/DD/file 마지막 숫자/file 으로 변경
- //pathSrc = model.getValue(xpathChart + "/remtpath") + "\\" + pathname.substr(pathname.length - 4, 4) + "\\" + filename + "." + model.getValue(xpathChart+ "/fileextn ");
- //scrt
- if (security == "D")
- {
- pathSrc = model.getValue(xpathChart + "/remtpath") + "\\" + cdateyyyymm + "\\" + cdatedd + "\\" + filename + "." + model.getValue(xpathChart+ "/fileextn ");
- }
- else
- {
- pathSrc = model.getValue(xpathChart + "/remtpath") + "\\" + cdateyyyymm + "\\" + cdatedd + "\\" + pathname.substr(pathname.length - 1, 1) + "\\" + filename + "." + model.getValue(xpathChart+ "/fileextn ");
-
- }
-
-
- pathDst = pathRecv + filename + "." + model.getValue(xpathChart+ "/fileextn ") ;
-
- // 파일을 다운로드 받거나 패스 문자열을 만든다.
- if(curAddr == rmad && curPort == rmpo)
- {
-
- // 이미 존재하는 내용이 있다면 연결 문자를 추가한다.
- if( pathRemote.length != 0 )
- {
- pathRemote = pathRemote + "|";
- pathLocal = pathLocal + "|";
- }
-
- // 받을 파일을 추가한다.
- pathRemote = pathRemote + pathSrc;
- pathLocal = pathLocal + pathDst;
- }
- else
- {
-
- // 필요하다면 파일을 다운로드 받는다.
-
- if(pathRemote.length != 0 )
- {
- if(getFiles(curAddr, curPort, model.getValue(xpathChart+ "/remtuser"), model.getValue(xpathChart+ "/remtpwd"), pathRemote, pathLocal) == false) return false;
- }
-
- // 현재 상태를 초기화 한다.
- pathRemote = pathSrc;
- pathLocal = pathDst;
- curAddr = rmad;
- curPort = rmpo;
- }
-
- // 파일 패스와 페이지 번호 저장
-
- g_path[pageDemand + 1] = pathDst;
- g_page[pageDemand + 1] = 1;
- g_page_lut[pageDemand + 1] = i + 1;
- pageDemand++;
- }
- else
- {
- // 로컬 디스크에 파일이 있을경우 그 패스는 rmpt에 들어가 있게 된다.
- // pageno에 보여질 이미지 파일의 파일 이름을 저장해 두게 된다.
- // 원본과 복사본 파일 패스
- filename = "local" + i + ".txt";
- pathSrc = model.getValue(xpathChart + "/remtpath");
- pathDst = pathRecv + filename;
-
- // 파일 복사
- fso.CopyFile(pathSrc, pathDst, true);
-
- // 파일 이름을 pageno에 저장
- model.setValue(xpathChart + "/pageno", filename);
-
-
- // 파일 패스와 페이지 번호 저장
- //objPreview.Load(pathDst, 1);
-
- for(j = 0; j < objPreview.TotalPage; j++)
- {
- g_path[pageDemand + 1] = pathDst;
- g_page[pageDemand + 1] = j + 1;
- g_page_lut[pageDemand + 1] = i + 1;
- pageDemand++;
-
- }
- //objPreview.ImageFilePath = "";
-
- }
- }
-
- // 필요하다면 파일을 다운로드 받는다.
- //alert( pathRemote);
- //alert( pathLocal);
- if( pathRemote.length != 0 )
- {
- if(getFiles(curAddr, curPort, model.getValue(xpathChart+ "/remtuser"), model.getValue(xpathChart+ "/remtpwd"), pathRemote, pathLocal) == false) return false;
- }
-
- //setupMoveButton();
- return true;
- }
- else if (model.getValue("/root/main/emrpath") != null && model.getValue("/root/main/emrpath") != "")
- {
-
- pageDemand = appendEMRChart();
- model.setValue("/root/main/chartinfo/pagecurrent", pageDemand == 1 ? 0 : 1);
- model.setValue("/root/main/chartinfo/pagetotal", pageDemand);
- model.refresh();
- //setupMoveButton();
-
- for (i = g_temp_page.length - 1; i >= 0; i--)
- {
- delete g_temp_path[i];
- delete g_temp_page[i];
- }
- for (count = 1; count < g_page.length; count++)
- {
- g_temp_path[count] = g_path[count];
- g_temp_page[count] = g_page[count];
- }
- return true;
- }
- else
- {
- alert("해당 데이터에 대한 이미지가 없습니다.");
- // setupChart("PageView");
- // body.disabled = true;
- return false;
- }
- }
- function appendEMRChart()
- {
- var i, j;
- var count = 0;
- var emrTotalPath;
- var emrPagePath;
- var emrPageTotal;
- var temp_path;
- var temp_page;
- var temp_page_lut;
- var countform = 0;
- var counttemp = 0;
- temp_path = new Array();
- temp_page = new Array();
- temp_page_lut = new Array();
-
-
- if (model.getValue("/root/main/emrpath") != null && model.getValue("/root/main/emrpath") != "")
- {
- emrTotalPath = model.getValue("/root/main/emrpath");
- emrPagePath = emrTotalPath.split(splittxt);
- for (i = 1; i <= emrPagePath.length; i++)
- {
- if (emrPagePath[i - 1].substring(0, 1) == "*")
- {
- for (j = counttemp + 1; j <= g_form_count[countform]; j++)
- {
- temp_path[count + 1] = g_path[j];
- temp_page[count + 1] = g_page[j];
- temp_page_lut[count + 1] = g_page_lut[j];
- count++;
- }
- countform++;
- counttemp = g_form_count[countform - 1];
- // for (j = 1; j < g_path.length; j++)
- // {
- // temp_path[count] = g_path[j];
- // temp_page[count] = g_page[j];
- // temp_page_lut[count] = g_page_lut[j];
- // count = count + 1;
- // }
- }
- else
- {
- temp_path[count + 1] = emrPagePath[i - 1];
- temp_page[count + 1] = 1;
- temp_page_lut[count + 1] = 1;
- count++;
- }
- }
- g_path = temp_path;
- g_page = temp_page;
- g_page_lut = temp_page_lut;
- }
- return count;
- }
- function getXPathChart(page, value)
- {
- return "/root/main/charts[" + page + "]" + ((value == null) ? "" : "/" + value);
- }
- function getSelectPageCount()
- {
- var seletedpage;
- seletedpage = 0;
- for (count = 1; count <= f_View.PageTotal; count++)
- {
- if(f_View.ThumbnailSelect(count) == true)
- {
- seletedpage = seletedpage + 1
- }
- }
-
- return seletedpage
- }
- function setSelectPage(startPage,endPage)
- {
- var starttemp;
- var endtemp;
- //alert(startPage)
- //alert(endPage)
- if(startPage > endPage )
- {
- starttemp = endPage ;
- endtemp = startPage ;
- startPage = starttemp;
- endPage = endtemp;
- }
- if(endPage > f_View.PageTotal)
- {
- endPage = f_View.PageTotal
-
- }
- f_View.actionthumbnail = 3;
- for (count = startPage; count <= endPage; count++)
- {
- f_View.ThumbnailSelect(count, true);
- }
- return true
- }
- function printChart(docName)
- {
- var strPage;
- var strPage;
- var strPrintLog;
- var bFirstPage;
- var start = getCurrentDateTime();
- switch(model.getValue("/root/cond/radio"))
- {
- case "PV":
-
- if(f_view.pageCurrent > 0)
- {
- strPath = g_path[pageCurrent];
- strPage = g_page[pageCurrent];
-
- if (objBIP.StartDoc(docName) == false)
- {
- return false;
- }
- if (objBIP.PrintImage(g_path[pageCurrent], g_page[pageCurrent]) == false)
- {
- return false;
- }
- else
- {
- //사본발급시
- if (docName=="SMMRC03000")
- {
- objBIP.FontFaceName = "HY울릉도M"
- objBIP.FontSize = 12
- objBIP.FontBold = true
- objBIP.PrintText(360, objBIP.PaperHeight - 10,"이 서식은 사본입니다(원본 대조필)");
- }
-
- model.setValue("/root/main/printcount", parseInt(model.getValue("/root/main/printcount")) + 1 );
- }
- if (objBIP.EndDoc() == false)
- {
- return false;
- }
-
- // 출력 통보
- model.setAttribute("sCMR_Param", printLog(pageCurrent));
-
- }
- else
- {
- alert("출력할 페이지가 없습니다.");
- return false;
- }
- break;
-
- case "TV":
-
- var seletedpage;
- /*
- for (count = 1; count <= f_View.PageTotal; count++)
- {
- if(f_View.ThumbnailSelect(count) == true)
- {
- seletedpage = seletedpage + 1
- }
- }
- */
- seletedpage = getSelectPageCount()
- if(seletedpage == 0)
- {
- f_print.DocumentBegin(count+"_"+"document");
- bFirstPage = true;
- strPrintLog = "";
-
- for(i = 1; i <= f_View.PageTotal; i++)
- {
- if(f_view.ThumbnailSelect(i) == false)
- {
- f_print.PageBegin();
- //2013/03/07 이미지 프린트 샘플
- //f_Print.PrintImage(f_View.PageFilePath(i), f_View.PageFilePage(i) + 1, 0, 0, f_Print.PrintableWidth, f_Print.PrintableHeight, friendlyPrinterLib.FP_PI.FP_PI_SMART, friendlyPrinterLib.FP_HA.FP_HA_CENTER, friendlyPrinterLib.FP_VA.FP_VA_TOP, friendlyPrinterLib.FP_ROP.FP_ROP_SRCAND)
- //2013/03/07
- f_print.PrintImage(f_View.PageFilePath(i), f_View.PageFilePage(i) + 1, 0, 0, f_print.PrintableWidth, f_print.PrintableHeight, 5,1,1,12); // 제일 뒤쪽 네개 인자값이 이미지 확대 축소 결정(0부터 시작) 원본대로라면 (2,1,1,12)
- if (docName=="SMMRC03000")
- {
- f_print.FontFaceName = "HY울릉도M"
- f_print.FontSize = 12
- f_print.FontBold = true
- //f_print.PrintText(360, f_print.PaperHeight - 20,f_print.PrintableWidth,f_print.PrintableHeight,"이 서식은 사본입니다(원본 대조필)",0,0xff0000,0xff0000);
-
- f_print.PrintText(0, 0,f_print.PrintableWidth,f_print.PrintableHeight,"이 서식은 사본입니다(원본 대조필)",0,0xff0000,0xff0000);
- }
-
- f_print.PageEnd();
- model.setValue("/root/main/printcount", parseInt(model.getValue("/root/main/printcount")) + 1 );
-
- }
-
- strPrintLog += printLog(i);
- }
- f_print.DocumentEnd();
-
- model.setAttribute("sCMR_Param", strPrintLog);
- break;
- }
- else
- {
- f_print.DocumentBegin(count+"_"+"document");
- bFirstPage = true;
- strPrintLog = "";
-
- for(i = 1; i <= f_View.PageTotal; i++)
- {
- if(f_View.ThumbnailSelect(i) == true)
- {
- f_print.PageBegin();
- //페이지모드로 변경
- f_preview.pageremove(0,0);
- f_preview.viewmode = 2;
- f_preview.pageappend(f_View.PageFilePath(i),f_View.PageFilePage(i) + 1,f_View.PageFilePage(i) + 1);
- f_preview.pagecurrent = i;
-
- if(f_preview.pagewidth > f_preview.pageheight)
- {
- if(f_View.PageFilePath(i).substr(0,3) != "utf")
- {
- f_preview.actionthumbnail = 2;
- TvTurnSelect("left");
- }
-
- }
-
- f_print.PrintImage(f_View.PageFilePath(i),f_View.PageFilePage(i) + 1, 0, 0, f_print.PrintableWidth, f_print.PrintableHeight, 5,1,1,12);
-
- if (docName=="SMMRC03000")
- {
- f_print.FontFaceName = "HY울릉도M"
- f_print.FontSize = 12
- f_print.FontBold = true
-
- f_print.PrintText(360, f_print.PrintableHeight - f_print.PrintTextHeight("이 서식은 사본입니다(원본 대조필)", 0),f_print.PrintableWidth,f_print.PrintableHeight,"이 서식은 사본입니다(원본 대조필)",2048,0xff0000,0xff0000);
- //f_print.PrintText(0, 0 ,f_print.PrintableWidth,f_print.PrintableHeight,"이 서식은 사본입니다(원본 대조필)",2048,0xff0000,0xff0000);
- }
-
- f_print.PageEnd();
- model.setValue("/root/main/printcount", parseInt(model.getValue("/root/main/printcount")) + 1 );
-
- if(f_preview.pagewidth > f_preview.pageheight)
- {
- if(f_View.PageFilePath(i).substr(0,3) != "utf")
- {
- f_preview.actionthumbnail = 2;
- TvTurnSelect("right");
- }
- }
- }
- strPrintLog += printLog(i);
-
- }
-
- f_print.DocumentEnd();
-
- //model.setAttribute("sCMR_Param", strPrintLog);
- break;
- }
- case "ChartView":
- alert("'연속보기' 에서는 출력할 수 없습니다.");
- return false;
- break;
- }
- return true;
- }
- //사본출력시 타는 로직
- function printChart(docName, msg)
- {
- var strPage;
- var strPrintLog;
- var bFirstPage;
- var selCount;
- var start = getCurrentDateTime();
-
- switch(model.getValue("/root/cond/radio"))
- {
- case "PageView","PV":
- var pageCurrent = parseInt(model.getValue("/root/main/chartinfo/pagecurrent"));
-
- if(pageCurrent > 0)
- {
- strPath = g_path[pageCurrent];
- strPage = g_page[pageCurrent];
-
- f_print.DocumentBegin(docName);
-
- f_print.PageBegin();
-
- f_preview.pageremove(0,0);
- f_preview.viewmode = 2;
- f_preview.pageappend(f_View.PageFilePath(pageCurrent),f_View.PageFilePage(pageCurrent) + 1 ,f_View.PageFilePage(pageCurrent) + 1 );
- f_preview.pagecurrent = pageCurrent;
-
- if(f_preview.pagewidth > f_preview.pageheight)
- {
- if(f_View.PageFilePath(i).substr(0,3) != "utf")
- {
- f_preview.actionthumbnail = 2;
- TvTurnSelect("left");
- }
-
- }
-
-
- f_print.PrintImage(f_View.PageFilePath(pageCurrent),f_View.PageFilePage(pageCurrent) + 1, 0, 0, f_print.PrintableWidth, f_print.PrintableHeight, 5,1,1,12);
-
- //사본발급시
- if (docName=="SMMRC03000")
- {
- f_print.FontFaceName = "HY울릉도M"
- f_print.FontSize = 12
- f_print.FontBold = true
-
- f_print.PrintText(360, f_print.PrintableHeight - f_print.PrintTextHeight("이 서식은 사본입니다(원본 대조필)", 0),f_print.PrintableWidth,f_print.PrintableHeight,"이 서식은 사본입니다(원본 대조필)",2048,0xff0000,0xff0000);
- //f_print.PrintText(0, 0 ,f_print.PrintableWidth,f_print.PrintableHeight,"이 서식은 사본입니다(원본 대조필)",2048,0xff0000,0xff0000);
- }
-
- //사본발급 출력서식의 하단에 사본발급용도(목적) 출력요청(2010-04-05 박종훈)
- //[요청번호 : 11336, TaskNo : 43930, 우선순위 : SY]
- //사본발급시(발급용도)
- if (msg != null || msg != "")
- {
- f_print.FontFaceName = "HY울릉도M"
- f_print.FontSize = 12
- f_print.FontBold = true
- f_print.PrintText(25, f_print.PrintableHeight - 20,f_print.PrintableWidth,f_print.PrintableHeight,msg,2048,0xff0000,0xff0000);
- //f_print.PrintText(0, 0 ,f_print.PrintableWidth,f_print.PrintableHeight,msg,2048,0xff0000,0xff0000);
- }
- f_print.PageEnd();
-
- model.setValue("/root/main/printcount", parseInt(model.getValue("/root/main/printcount")) + 1 );
- if(f_preview.pagewidth > f_preview.pageheight)
- {
- if(f_View.PageFilePath(i).substr(0,3) != "utf")
- {
- f_preview.actionthumbnail = 2;
- TvTurnSelect("right");
- }
- }
- f_print.DocumentEnd();
-
- // 출력 통보
- model.setAttribute("sCMR_Param", printLog(pageCurrent));
- }
- else
- {
- alert("출력할 페이지가 없습니다.");
- return false;
- }
- break;
-
- case "ThumbView","TV":
- selCount = getSelectPageCount()
- //alert("selCount " + selCount)
- var trans;
- var fso = new ActiveXObject("Scripting.FileSystemObject");
-
- if( fso.FolderExists("C:\\LC_Log") == false)
- {
- fso.CreateFolder("C:\\LC_Log");
- }
- var today = new Date( );
- var a = fso.CreateTextFile("C:\\LC_Log\\" + today.getYear( ) + today.getMonth( ) + today.getDate( ) + today.getMinutes( ) + today.getSeconds( ) + ".log", true, true) ;
-
- if(selCount == 0) //썸네일 선택 안하고 출력버튼 눌렀을시
- {
- trans = "\n f_print.DocumentBegin: " ;
- f_print.DocumentBegin(docName);
- bFirstPage = true;
- strPrintLog = "";
-
- for(i = 1; i <= f_View.PageTotal; i++)
- {
- trans = trans + "\n f_print.PageBegin: " + i + " page";
- f_print.PageBegin();
-
- f_preview.pageremove(0,0);
- f_preview.viewmode = 2;
- f_preview.pageappend(f_View.PageFilePath(i), f_View.PageFilePage(i) + 1,f_View.PageFilePage(i) + 1);
- f_preview.pagecurrent = i;
-
- if(f_preview.pagewidth > f_preview.pageheight)
- {
- if(f_View.PageFilePath(i).substr(0,3) != "utf")
- {
- f_preview.actionthumbnail = 2;
- TvTurnSelect("left");
- }
-
- }
-
-
- trans = trans + "\n f_print.PrintImage: ";
- trans = trans + "\n f_View.PageFilePath(i): " + f_View.PageFilePath(i);
- trans = trans + "\n f_View.PageFilePage(i) + 1: " + f_View.PageFilePage(i) + 1;
-
- f_print.PrintImage(f_View.PageFilePath(i),f_View.PageFilePage(i) + 1, 0, 0, f_print.PrintableWidth, f_print.PrintableHeight, 5,1,1,12);
-
-
- //사본발급시
- if (docName=="SMMRC03000")
- {
- f_print.FontFaceName = "HY울릉도M"
- f_print.FontSize = 12
- f_print.FontBold = true
-
- f_print.PrintText(360, f_print.PrintableHeight - f_print.PrintTextHeight("이 서식은 사본입니다(원본 대조필)", 0),f_print.PrintableWidth,f_print.PrintableHeight,"이 서식은 사본입니다(원본 대조필)",2048,0xff0000,0xff0000);
- //f_print.PrintText(0, 0 ,f_print.PrintableWidth,f_print.PrintableHeight,"이 서식은 사본입니다(원본 대조필)",2048,0xff0000,0xff0000);
- }
-
- //사본발급 출력서식의 하단에 사본발급용도(목적) 출력요청(2010-04-05 박종훈)
- //[요청번호 : 11336, TaskNo : 43930, 우선순위 : SY]
- //사본발급시(발급용도)
- if (msg != null || msg != "")
- {
- f_print.FontFaceName = "HY울릉도M"
- f_print.FontSize = 12
- f_print.FontBold = true
-
- f_print.PrintText(25, f_print.PrintableHeight - 10,f_print.PrintableWidth,f_print.PrintableHeight,msg,2048,0xff0000,0xff0000);
- //f_print.PrintText(0, 0 ,f_print.PrintableWidth,f_print.PrintableHeight,msg,2048,0xff0000,0xff0000);
- }
-
- trans = trans + "\n f_print.PageEnd(): ";
- f_print.PageEnd();
-
- model.setValue("/root/main/printcount", parseInt(model.getValue("/root/main/printcount")) + 1 );
- if(f_preview.pagewidth > f_preview.pageheight)
- {
- if(f_View.PageFilePath(i).substr(0,3) != "utf")
- {
- f_preview.actionthumbnail = 2;
-
- TvTurnSelect("right");
- }
- }
- strPrintLog += printLog(i);
- }
- trans = trans + "\n f_print.DocumentEnd(): ";
- f_print.DocumentEnd();
-
-
- a.WriteLine(trans);
- a.Close();
-
- fso = null;
- today = null;
- trans = null;
-
- //alert(model.getValue("/root/main/printcount") )
- model.setAttribute("sCMR_Param", strPrintLog);
- break;
- }
- else //썸네일에서 이미지 선택했을시에
- {
- trans = "\n f_print.DocumentBegin: " ;
- f_print.DocumentBegin(docName);
-
- bFirstPage = true;
- strPrintLog = "";
-
- for(i = 1; i <= f_View.PageTotal; i++)
- {
- if(f_View.ThumbnailSelect(i) == true)
- {
- trans = trans + "\n f_print.PageBegin: " + i + " page";
- f_print.PageBegin();
- f_preview.pageremove(0,0);
- f_preview.viewmode = 2;
- f_preview.pageappend(f_View.PageFilePath(i),f_View.PageFilePage(i) + 1,f_View.PageFilePage(i) + 1);
- f_preview.pagecurrent = i;
-
- if(f_preview.pagewidth > f_preview.pageheight)
- {
- // if(f_View.PageFilePath(i).substr(0,3) != "utf")
- // {
- // f_preview.actionthumbnail = 2;
- //
- // TvTurnSelect("left");
- // }
-
- f_preview.actionthumbnail = 2;
-
- TvTurnSelect("left");
-
- }
- trans = trans + "\n f_print.PrintImage: " ;
- trans = trans + "\n f_View.PageFilePath(i): " + f_View.PageFilePath(i);
- trans = trans + "\n f_View.PageFilePage(i) + 1: " + f_View.PageFilePage(i) + 1;
- f_print.PrintImage(f_View.PageFilePath(i),f_View.PageFilePage(i) + 1, 0, 0, f_print.PrintableWidth, f_print.PrintableHeight, 5,1,1,12);
-
- //model.setValue("/root/main/printcount", parseInt(model.getValue("/root/main/printcount")) + 1 );
- //사본발급시
- if (docName=="SMMRC03000")
- {
- f_print.FontFaceName = "HY울릉도M"
- f_print.FontSize = 12
- f_print.FontBold = true
-
- f_print.PrintText(360, f_print.PrintableHeight - f_print.PrintTextHeight("이 서식은 사본입니다(원본 대조필)", 0),f_print.PrintableWidth,f_print.PrintableHeight,"이 서식은 사본입니다(원본 대조필)",2048,0xff0000,0xff0000);
- }
- //사본발급 출력서식의 하단에 사본발급용도(목적) 출력요청(2010-04-05 박종훈)
- //[요청번호 : 11336, TaskNo : 43930, 우선순위 : SY]
- //사본발급시(발급용도)
- if (msg != null || msg != "")
- {
- f_print.FontFaceName = "HY울릉도M"
- f_print.FontSize = 12
- f_print.FontBold = true
-
- f_print.PrintText(25, f_print.PrintableHeight - f_print.PrintTextHeight("이 서식은 사본입니다(원본 대조필)", 0),f_print.PrintableWidth,f_print.PrintableHeight,msg,2048,0xff0000,0xff0000);
-
- }
-
- trans = trans + "\n f_print.PageEnd(): ";
- f_print.PageEnd();
- model.setValue("/root/main/printcount", parseInt(model.getValue("/root/main/printcount")) + 1 );
-
- if(f_preview.pagewidth > f_preview.pageheight)
- {
- // if(f_View.PageFilePath(i).substr(0,3) != "utf")
- // {
- // f_preview.actionthumbnail = 2;
- //
- // TvTurnSelect("right");
- // }
-
- f_preview.actionthumbnail = 2;
-
- TvTurnSelect("right");
-
- }
-
-
- strPrintLog += printLog(i);
-
- }
- }
- trans = trans + "\n f_print.DocumentEnd(): ";
- f_print.DocumentEnd();
-
- a.WriteLine(trans);
- a.Close();
-
- fso = null;
- today = null;
- trans = null;
-
- //model.setAttribute("sCMR_Param", strPrintLog);
- break;
- }
-
- case "ChartView","CV":
- alert("'연속보기' 에서는 출력할 수 없습니다.");
- return false;
- break;
- }
-
- return true;
- }
- function printCountClear()
- {
- model.setValue("/root/main/printcount", 0) ;
- model.refresh();
- }
- function getPrintCount()
- {
- model.refresh();
- return model.getValue("/root/main/printcount") ;
- }
- function printLog(page)
- {
- //alert("SSMRC03130-printLog");
- page = g_page_lut[page];
-
- return model.getValue(getXPathChart(page, "chrtpage")) + "|" +
- model.getValue(getXPathChart(page, "ordno")) + "|" +
- model.getValue(getXPathChart(page, "pageno")) + "|" +
- model.getValue(getXPathChart(page, "docucd")) + "|" +
- model.getValue(getXPathChart(page, "orddeptcd")) + "|" +
- model.getValue(getXPathChart(page, "ptdt")) + "|" +
- model.getValue(getXPathChart(page, "usercd")) + "|" +
- model.getValue(getXPathChart(page, "indd")) + "|" +
- model.getValue(getXPathChart(page, "outdd")) + "|" +
- model.getValue(getXPathChart(page, "remtip")) + "|" +
- model.getValue(getXPathChart(page, "remtport"));
- }
- function TvTurn(Mode)
- {
- switch(Mode)
- {
- case "left":
-
- f_preview.actionthumbnail = 12;
-
- break;
- case "right":
- f_preview.actionthumbnail = 11;
- break;
- }
- TVSelect("none")
- }
- function TvTurnSelect(Mode)
- {
- switch(Mode)
- {
- case "left":
-
- f_preview.actionthumbnail = 12;
-
- break;
- case "right":
- f_preview.actionthumbnail = 11;
- break;
- }
- }
- function searchChart(param)
- {
- var count;
- var r, re;
- r = ",";
- re = "','";
- resetData_Mode();
-
- // 전송할 데이터를 만든다.
- var destNode = instance1.selectSingleNode("/root/_send/data1");
- model.copyNode(destNode, param);
- //2013/03/05 Start 전자동의서 관련 소스 추가
- if(model.getValue("/root/_send/data1/pid")==null || model.getValue("/root/_send/data1/pid")==""){
- model.makeValue("/root/_send/data1/pid", "");
- model.refresh();
- }
-
- // 전송
- submit("TRMPL08101");
- count = 1;
- if (model.getValue("/root/main/charts[" + count + "]/chrtpage") == null || model.getValue("/root/main/charts[" + count + "]/chrtpage") == "")
- {
- alert("해당 데이터가 없습니다.");
- }
- // 보여줄 페이지 수를 센다.
- while(model.getValue("/root/main/charts[" + count + "]/chrtpage") != null && model.getValue("/root/main/charts[" + count + "]/chrtpage") != "")
- {
- count++;
- }
- model.makeNode("/root/_send/data1/pagetot");
- model.setValue("/root/_send/data1/pagetot", count - 1);
- model.setValue("/root/main/chartinfo/pagetotal", model.getValue("/root/_send/data1/pagetot"));
- model.setValue("/root/main/chartinfo/filetotal", model.getValue("/root/_send/data1/pagetot"));
- g_form_count[0] = model.getValue("/root/main/chartinfo/filetotal");
-
- // 만들었던 데이터 삭제
- model.resetInstanceNode("/root/_send");
-
- // 페이지 정보를 조정한다.
- model.setValue("/root/main/chartinfo/pagecurrent", model.getValue("/root/main/chartInfo/pagetotal") != "0" ? "1" : "0");
- model.refresh();
- }
- function setCopy(getValue)
- {
- //alert("SSMRC03130-setCopy");
- var setValue = "";
- var tempValue = "";
- var count;
- var valuecount = 0;
- var tempcount = 1;
- var emrcount = 0;
-
- if (getValue == true)
- {
-
-
- switch(model.getValue("/root/cond/radio"))
- {
- case "PV":
- //현재 페이지 정보 가져오기
- //alert("출력은1 '여러페이지보기' 에서만 가능합니다.");
- //return setValue;
- //break;
-
- if(f_View.pagecurrent > 0)
- {
-
- if(f_View.PageHiddenText(f_View.pagecurrent) == "" || f_View.PageHiddenText(f_View.pagecurrent) == null)
- {
- setValue = "I" + "▦" + model.getValue("/root/main/charts[" + pageCurrent + "]/ordno") +
- "▦" + model.getValue("/root/main/charts[" + pageCurrent + "]/docucd") +
- "▦" + model.getValue("/root/main/charts[" + pageCurrent + "]/pagecnt") +
- "▦" + model.getValue("/root/main/charts[" + pageCurrent + "]/pageno") +
- "▦" + model.getValue("/root/main/charts[" + pageCurrent + "]/indd") +
- "▦" + model.getValue("/root/main/charts[" + pageCurrent + "]/docunm") +
- "▦" + "[" + model.getValue("/root/main/charts[" + pageCurrent + "]/chrtpage") + "]" ;
- }
- else
- {
- //setValue = "E" + "▦" + objThumbView.ThumbUserText(pageCurrent) + "▦" + g_page[pageCurrent - 1];
- //setValue = f_View.PageHiddenText(f_View.pagecurrent) ;
-
- for (emrcount = count; emrcount <= f_View.PageTotal; emrcount++)
- {
- if (g_path[count] != g_path[emrcount])
- {
- break;
- }
- }
- //setValue = setValue + "E" + "▦" + f_View.PageHiddenText(count) + "▦" + g_page[emrcount - 1] + "|";
- setValue = setValue + f_View.PageHiddenText(f_View.pagecurrent) + "▦" + g_page[emrcount - 1] + "▩";
- }
- return setValue;
- }
- break;
-
- case "TV":
- var seletedpage;
- for (count = 1; count <= f_View.PageTotal; count++)
- {
- if(f_View.ThumbnailSelect(count) == true)
- {
- seletedpage = seletedpage + 1
- }
- }
-
- if(seletedpage == 0)
- {
- for (count = 1; count <= f_View.PageTotal; count++)
- {
-
- if(f_View.PageHiddenText(count) == "" || f_View.PageHiddenText(count) == null)
- {
- //arrValue[valuecount] = "I" + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/ordno") + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/docucd");
- //valuecount = valuecount + 1;
- if (tempValue != "I" + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/ordno") + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/docucd") + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/pagecnt"))
- {
-
- setValue = setValue + "I" + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/ordno") +
- "▦" + model.getValue("/root/main/charts[" + tempcount + "]/docucd") +
- "▦" + model.getValue("/root/main/charts[" + tempcount + "]/pagecnt") +
- "▦" + model.getValue("/root/main/charts[" + tempcount + "]/pageno") +
- "▦" + model.getValue("/root/main/charts[" + tempcount + "]/indd") +
- "▦" + model.getValue("/root/main/charts[" + tempcount + "]/docunm") +
- "▦" + "[" + model.getValue("/root/main/charts[" + tempcount + "]/chrtpage") + "]" +
- "|";
-
-
- tempValue = "I" + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/ordno") +
- "▦" + model.getValue("/root/main/charts[" + tempcount + "]/docucd") +
- "▦" + model.getValue("/root/main/charts[" + tempcount + "]/pagecnt") +
- "▦" + model.getValue("/root/main/charts[" + tempcount + "]/pageno") +
- "▦" + model.getValue("/root/main/charts[" + tempcount + "]/indd") +
- "▦" + model.getValue("/root/main/charts[" + tempcount + "]/docunm")
- "▦" + "[" + model.getValue("/root/main/charts[" + tempcount + "]/chrtpage") + "]";
- }
- }
- else
- {
- //arrvalue[valuecount] = "e" + "▦" + f_View.PageHiddenText(count);
- //valuecount = valuecount + 1;
- for (emrcount = count; emrcount <= f_View.PageTotal; emrcount++)
- {
- if (g_path[count] != g_path[emrcount])
- {
- break;
- }
- }
- //setValue = setValue + "E" + "▦" + f_View.PageHiddenText(count) + "▦" + g_page[emrcount - 1] + "|";
- setValue = setValue + f_View.PageHiddenText(count) + "▦" + g_page[emrcount - 1] + "▩";
-
- }
-
- if(f_View.PageHiddenText(count) == "" || f_View.PageHiddenText(count) == null)
- {
- tempcount = tempcount + 1;
- }
- }
- setValue = setValue.substr(0, setValue.length - 1);
- //alert(setValue);
- return setValue;
- break;
- }
- else
- {
- var prehidden ;
- for (count = 1; count <= f_View.PageTotal; count++)
- {
- if (f_View.ThumbnailSelect(count) == true)
- {
-
- if(f_View.PageHiddenText(count) == "" || f_View.PageHiddenText(count) == null)
- {
-
- if (tempValue != "I" + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/ordno") + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/docucd") + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/pagecnt"))
- {
- setValue = setValue + "I" + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/ordno") +
- "▦" + model.getValue("/root/main/charts[" + tempcount + "]/docucd") +
- "▦" + model.getValue("/root/main/charts[" + tempcount + "]/pagecnt") +
- "▦" + model.getValue("/root/main/charts[" + tempcount + "]/pageno") +
- "▦" + model.getValue("/root/main/charts[" + tempcount + "]/indd") +
- "▦" + model.getValue("/root/main/charts[" + tempcount + "]/docunm")+
- "▦" + "[" + model.getValue("/root/main/charts[" + tempcount + "]/chrtpage") + "]" +
- "|";
-
- tempValue = "I" + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/ordno") +
- "▦" + model.getValue("/root/main/charts[" + tempcount + "]/docucd") +
- "▦" + model.getValue("/root/main/charts[" + tempcount + "]/pagecnt") +
- "▦" + model.getValue("/root/main/charts[" + tempcount + "]/pageno") +
- "▦" + model.getValue("/root/main/charts[" + tempcount + "]/indd") +
- "▦" + model.getValue("/root/main/charts[" + tempcount + "]/docunm") +
- "▦" + "[" + model.getValue("/root/main/charts[" + tempcount + "]/chrtpage") + "]";
- }
- }
- else
- {
- //arrvalue[valuecount] = "e" + "▦" + f_View.PageHiddenText(count);
- //valuecount = valuecount + 1;
- for (emrcount = count; emrcount <= f_View.PageTotal; emrcount++)
- {
- if (g_path[count] != g_path[emrcount])
- {
- break;
- }
- }
- if(f_View.PageHiddenText(count) == prehidden){
- }
- else{
- setValue = setValue + f_View.PageHiddenText(count) + "▦" + g_page[emrcount - 1] + "▩";
-
- }
-
- prehidden = f_View.PageHiddenText(count)
- }
- }
- if(f_View.PageHiddenText(count) == "" || f_View.PageHiddenText(count) == null)
- {
- tempcount = tempcount + 1;
- }
- }
-
- //마지막 글자 빼지 말고 2012-06-07 유희갑[김진환대리 요청]
- //setValue = setValue.substr(0, setValue.length - 1);
- //alert(setValue);
- return setValue;
- break;
- }
- case "CV":
- alert("출력은 '여러페이지보기' 에서만 가능합니다.");
- return setValue;
- break;
- }
- }
- else
- {
- return setValue;
- }
- }
- function SetMarkPage(getValue)
- {
- var setValue = "";
- var tempValue = "";
- var count;
- var valuecount = 0;
- var tempcount = 1;
- var emrcount = 0;
- var emrflag = "";
- switch(getValue)
- {
- case "PV":
- //현재 페이지 정보 가져오기
- var pageCurrent = parseInt(model.getValue("/root/main/chartinfo/pagecurrent"));
- if(pageCurrent > 0)
- {
- //if (model.getValue("/root/main/charts[" + pageCurrent + "]/ordno")!= "" || model.getValue("/root/main/charts[" + pageCurrent-1 + "]/ordno")!= null)
- //C:\C.... C:\D...
- if(g_path[pageCurrent].substring(4, 3) != "C")
- {
- setValue = "I" + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/ordno") +
- "▦" + model.getValue("/root/main/charts[" + tempcount + "]/docucd") +
- "▦" + model.getValue("/root/main/charts[" + tempcount + "]/pagecnt") +
- "▦" + model.getValue("/root/main/charts[" + tempcount + "]/pageno") +
- "▦" + model.getValue("/root/main/charts[" + tempcount + "]/indd") +
- "▦" + model.getValue("/root/main/charts[" + tempcount + "]/docunm") +
- "▦" + "[" + model.getValue("/root/main/charts[" + tempcount + "]/chrtpage") + "]";
- }
- else
- {
- setValue = f_View.PageHiddenText(pageCurrent);
- }
- return setValue;
- }
- break;
- case "TV":
- var seletedpage;
- for (count = 1; count <= f_View.PageTotal; count++)
- {
- if(f_View.ThumbnailSelect(count) == true)
- {
- seletedpage = seletedpage + 1
- }
- }
-
- if(seletedpage == 0)
- {
-
- for (count = 1; count <= f_View.PageTotal; count++)
- {
- emrflag = f_View.PageHiddenText(count).split("▦")[0];
-
-
- if(emrflag == "I")
- {
-
- if (tempValue != "I" + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/ordno") +
- "▦" + model.getValue("/root/main/charts[" + tempcount + "]/docucd") +
- "▦" + model.getValue("/root/main/charts[" + tempcount + "]/pagecnt") +
- "▦" + model.getValue("/root/main/charts[" + tempcount + "]/pageno") +
- "▦" + model.getValue("/root/main/charts[" + tempcount + "]/indd") +
- "▦" + model.getValue("/root/main/charts[" + tempcount + "]/docunm") +
- "▦" + "[" + model.getValue("/root/main/charts[" + tempcount + "]/chrtpage") + "]" )
- {
- setValue = setValue + "I" + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/ordno") +
- "▦" + model.getValue("/root/main/charts[" + tempcount + "]/docucd") +
- "▦" + model.getValue("/root/main/charts[" + tempcount + "]/pagecnt") +
- "▦" + model.getValue("/root/main/charts[" + tempcount + "]/pageno") +
- "▦" + model.getValue("/root/main/charts[" + tempcount + "]/indd") +
- "▦" + model.getValue("/root/main/charts[" + tempcount + "]/docunm") +
- "▦" + "[" + model.getValue("/root/main/charts[" + tempcount + "]/chrtpage") + "]" +
- "|";
-
- tempValue = "I" + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/ordno") +
- "▦" + model.getValue("/root/main/charts[" + tempcount + "]/docucd") +
- "▦" + model.getValue("/root/main/charts[" + tempcount + "]/pagecnt" ) +
- "▦" + model.getValue("/root/main/charts[" + tempcount + "]/pageno") +
- "▦" + model.getValue("/root/main/charts[" + tempcount + "]/indd") +
- "▦" + model.getValue("/root/main/charts[" + tempcount + "]/docunm") +
- "▦" + "[" + model.getValue("/root/main/charts[" + tempcount + "]/chrtpage") + "]" ;
- }
- }
- else
- {
- //arrvalue[valuecount] = "e" + "▦" + objthumbview.thumbusertext(count);
- //valuecount = valuecount + 1;
-
- for (emrcount = count; emrcount <= objThumbView.TotalThumbnail; emrcount++)
- {
- if (g_path[count] != g_path[emrcount])
- {
- break;
- }
- }
- //setValue = setValue + "E" + "▦" + objThumbView.ThumbUserText(count) + "▦" + g_page[emrcount - 1] + "|";
- setValue = setValue + objThumbView.ThumbUserText(count) + "▦" + g_page[emrcount - 1] + "|";
-
- }
-
- }
- setValue = setValue.substr(0, setValue.length - 1);
- //alert(setValue);
- return setValue;
- break;
- }
- else
- {
-
- for (count = 1; count <= f_View.PageTotal; count++)
- {
- if (f_View.ThumbnailSelect(count) == true)
- {
-
-
- //var aaa = model.getValue("/root/main/charts[" + tempcount + "]/ordno");
- //alert("tempcount : " + tempcount + " if : " + aaa);
-
- var pageno = opener.model.getValue("/root/tmpinicert/iniinfo[" + tempcount + "]/pageno");
-
- var orddd = opener.model.getValue("/root/tmpinicert/iniinfo[" + tempcount + "]/orddd");
-
- var formnm = opener.model.getValue("/root/tmpinicert/iniinfo[" + tempcount + "]/formnm");
- //alert("bbb : " + bbb);
-
- var formcd = opener.model.getValue("/root/tmpinicert/iniinfo[" + tempcount + "]/formcd");
- //alert("ccc : " + ccc);
-
- //alert("tempValue : " + tempValue);
-
-
- emrflag = f_View.PageHiddenText(count).split("▦")[0];
-
- if(emrflag == "I") {
- //if (tempValue != "I" + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/ordno") + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/docucd") + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/pagecnt") + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/pageno") + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/indd") + " " + model.getValue("/root/main/charts[" + tempcount + "]/docunm")) {
- if (tempValue != "I" + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/ordno") + "▦" + formcd + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/pagecnt") + "▦" + pageno + "▦" + orddd + " " + formnm) {
- //setValue = setValue + "I" + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/ordno") + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/docucd") + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/pagecnt") + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/pageno") + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/indd") + " " + model.getValue("/root/main/charts[" + tempcount + "]/docunm") + "|";
- //tempValue = "I" + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/ordno") + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/docucd") + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/pagecnt" ) +"▦" + model.getValue("/root/main/charts[" + tempcount + "]/pageno") + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/indd") + " " + model.getValue("/root/main/charts[" + tempcount + "]/docunm") ;
-
- setValue = setValue + "I" + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/ordno") +
- "▦" + formcd +
- "▦" + model.getValue("/root/main/charts[" + tempcount + "]/pagecnt") +
- "▦" + pageno +
- "▦" + orddd +
- "▦" + formnm +
- "▦" + "[" + model.getValue("/root/main/charts[" + tempcount + "]/chrtpage") + "]" +
- "|";
-
- tempValue = "I" + "▦" + model.getValue("/root/main/charts[" + tempcount + "]/ordno") +
- "▦" + formcd +
- "▦" + model.getValue("/root/main/charts[" + tempcount + "]/pagecnt" ) +
- "▦" + pageno +
- "▦" + orddd +
- "▦" + formnm +
- "▦" + "[" + model.getValue("/root/main/charts[" + tempcount + "]/chrtpage") + "]" ;
- }
- }
- else
- {
- for (emrcount = count; emrcount <= objThumbView.TotalThumbnail; emrcount++)
- {
- if (g_path[count] != g_path[emrcount])
- {
- break;
- }
- }
- setValue = setValue + f_View.PageHiddenText(count) + "▦" + g_page[emrcount - 1] + "|";
- }
- }
- }
- setValue = setValue.substr(0, setValue.length - 1);
- //alert(setValue);
-
- return setValue;
- break;
- }
- case "CV":
- //현재 페이지 정보 가져오기
- var pageCurrent = parseInt(model.getValue("/root/main/chartinfo/pagecurrent"));
- if(pageCurrent > 0)
- {
- //if (model.getValue("/root/main/charts[" + pageCurrent + "]/ordno")!= "" || model.getValue("/root/main/charts[" + pageCurrent-1 + "]/ordno")!= null)
- //C:\C.... C:\D...
- if(g_path[pageCurrent].substring(4, 3) != "C")
- {
- setValue = "I" + "▦" + model.getValue("/root/main/charts[" + pageCurrent + "]/ordno") +
- "▦" + model.getValue("/root/main/charts[" + pageCurrent + "]/docucd") +
- "▦" + model.getValue("/root/main/charts[" + pageCurrent + "]/pagecnt") +
- "▦" + model.getValue("/root/main/charts[" + pageCurrent + "]/pageno") +
- "▦" + model.getValue("/root/main/charts[" + tempcount + "]/indd") +
- "▦" + model.getValue("/root/main/charts[" + tempcount + "]/docunm")+
- "▦" + "[" + model.getValue("/root/main/charts[" + tempcount + "]/chrtpage") + "]" ;
- }
- else
- {
- //setValue = "E" + "▦" + f_View.PageHiddenText(pageCurrent) + "▦" + g_page[pageCurrent - 1];
- setValue = f_View.PageHiddenText(pageCurrent);
- }
- return setValue;
- }
- break;
- }
- }
- function searchChart_EMR( param, mode )
- {
- var count;
- var r, re;
- r = ",";
- re = "','";
- var treatno;
- var docucd;
- var temptreatno;
- var tempdocucd;
- var count;
- var countmain;
- var counthidden;
- var itemindxseq = "";
- //2013/08/20 Start
- var temporderseqno;
- //2013/08/20 End
-
- if( mode == null)
- {
- resetData();
- }
-
-
- // 전송할 데이터를 만든다.
-
- var destNode = instance1.selectSingleNode("/root/_send/data1");
- model.copyNode(destNode, param);
-
- //2013/03/12 Start 사본창에서 이 함수를 호출시 스크린 아이디를 셋팅(크로스 조회하면서 칠곡에서 미분류 기록이 보이는 현상 수정)
- if(opener.javascript.getScreenID()=="SMMRC03000"){
- model.makeValue("/root/_send/screenid", "SMMRC03000");
- itemindxseq = null;
- }else{
- if (!(typeof(destNode.itemindxseq) == "undefined" || typeof(destNode.itemindxseq) == "unknown")) {
- itemindxseq = destNode.itemindxseq.nodeValue;
- }
- }
- //2013/03/12 End
-
- //2013/08/20 Start
- temporderseqno=destNode.cmc_orderseqno.nodeValue;
- cmc_orderseqno = temporderseqno.split(",");
- //2013/08/20 End
-
- if ( itemindxseq == null || itemindxseq == "" ){
- temptreatno = destNode.treatno.nodeValue;
- tempdocucd = destNode.docucd.nodeValue;
- treatno = temptreatno.split(",");
- docucd = tempdocucd.split(",");
-
- model.makeNode("/root/hidden/tempcharts");
- counthidden = 1;
-
- for (count = 1; count < treatno.length + 1; count++)
- {
- destNode.cmc_orderseqno.nodeValue = cmc_orderseqno[count - 1];
-
- destNode.treatno.nodeValue = treatno[count - 1];
- destNode.docucd.nodeValue = docucd[count - 1];
- submit("TRMPL08101");
- g_form_count[count - 1] = counthidden - 1;
- countmain = 1;
-
- while(model.getValue("/root/main/charts[" + countmain + "]/chrtpage") != null && model.getValue("/root/main/charts[" + countmain + "]/chrtpage") != "")
- {
- model.makeNode("/root/hidden/tempcharts[" + counthidden + "]");
- model.copyNode("/root/hidden/tempcharts[" + counthidden + "]", "/root/main/charts[" + countmain + "]");
- countmain++;
- counthidden++;
- }
- g_form_count[count - 1] = counthidden - 1;
- model.refresh();
- }
-
- }else{
- temptreatno = destNode.treatno.nodeValue;
- tempdocucd = destNode.docucd.nodeValue;
- treatno = temptreatno;
- docucd = tempdocucd;
-
- model.makeNode("/root/hidden/tempcharts");
- counthidden = 1;
-
- destNode.cmc_orderseqno.nodeValue = cmc_orderseqno[count - 1];
-
- submit("TRMPL08101");
- g_form_count[count - 1] = counthidden - 1;
- countmain = 1;
-
- while(model.getValue("/root/main/charts[" + countmain + "]/chrtpage") != null && model.getValue("/root/main/charts[" + countmain + "]/chrtpage") != "")
- {
- model.makeNode("/root/hidden/tempcharts[" + counthidden + "]");
- model.copyNode("/root/hidden/tempcharts[" + counthidden + "]", "/root/main/charts[" + countmain + "]");
- countmain++;
- counthidden++;
- }
- g_form_count[count - 1] = counthidden - 1;
- model.refresh();
- }
-
-
-
- model.removeNode("/root/main/charts");
- model.makeNode("/root/main/charts");
- for (count = 1; count <= counthidden; count++)
- {
-
- model.makeNode("root/main/charts[" + count + "]");
- model.copyNode("root/main/charts[" + count + "]", "root/hidden/tempcharts[" + count + "]");
- }
- count = 1;
- // 보여줄 페이지 수를 센다.
- while(model.getValue("/root/main/charts[" + count + "]/chrtpage") != null && model.getValue("/root/main/charts[" + count + "]/chrtpage") != "")
- {
- count++;
- }
-
- model.makeNode("/root/_send/data1/pagetot");
- model.setValue("/root/_send/data1/pagetot", count - 1);
- model.setValue("/root/main/chartinfo/filetotal", model.getValue("/root/_send/data1/pagetot"));
- model.setValue("/root/main/chartinfo/pagetotal", model.getValue("/root/_send/data1/pagetot"));
-
- // 만들었던 데이터 삭제
- model.resetInstanceNode("/root/_send");
-
- // 페이지 정보를 조정한다.
- model.setValue("/root/main/chartinfo/pagecurrent", model.getValue("/root/main/chartInfo/pagetotal") != "0" ? "1" : "0");
- model.refresh();
- }
- function fGetSelectChrtName(OldDeliverect)
- {
- try
- {
- // 2009-10-31 이경희
- // TASK번호: 38014 요청번호: 8986
- // 사본발급 상세신청내역 기능
- // 신규로 추가되는 기록지만 추가하기로 함.
- // 기존에 추가했다가 선택 해제하는 기록지의 경우는 처리하지 않기로함.(사용자가 텍스트에서 삭제하기로 결정)
-
- // 여러페이지보기에서만 동작하도록 한다.
- var ViewMode = model.getValue("/root/hidden/currentViewMode");
-
- if(ViewMode != "ThumbView" && ViewMode != "TV")
- {
- messageBox("상세내역추가는 여러페이지보기모드일때에만 추가할 수", "I010");
- return;
- }
-
- var OldDeliverectArr = OldDeliverect;
-
- model.removeNodeset("/root/selectrec");
- model.makeValue("/root/selectrec", OldDeliverectArr);
-
- /*
- if(OldDeliverect != "")
- {
- OldDeliverectArr = OldDeliverect.split("\n");
- }
- */
-
- var filenameArr = new Array();//"";
- var filenamestr = "";
-
- var pageTotal = parseInt(model.getValue("/root/main/chartinfo/pagetotal"));
-
- var match = false; // true: 텍스트 비교 일치(이미 동일한 기록지가 들어있음)
-
- var selcnt;
- selcnt = getSelectPageCount();
-
- if(selcnt > 0)
- {
- for(var idx = 0; idx < g_recnameArr.length; idx++)
- {
- filenameArr[idx] = "";
- }
-
- for (i = 0; i < f_View.PageTotal; i++)
- {
- if (f_View.ThumbnailSelect(i + 1) == true)
- {
-
- if(g_recnameArr[i] != "" && g_recnameArr[i] != null)
- {
- if(OldDeliverectArr.length > 0)
- {
- var tmpstr = g_recnameArr[i].setReplaceWord("\n", "");
-
- //if(isSearchString(OldDeliverectArr, tmpstr) == true)
- if(model.getXPathValue("contains(/root/selectrec, '" + tmpstr + "')") == "true")
- {
- match = true;
- continue;
- }
- else
- {
- match = false;
- }
-
- if(match == false)
- {
- filenameArr[i] = g_recnameArr[i];
-
- if(isSearchString(filenameArr[i], "\n") == true)
- {
- filenameArr[i] = filenameArr[i].setReplaceWord("\n", "");
- }
- }
- }
- else
- {
- filenameArr[i] = g_recnameArr[i];
-
- if(isSearchString(filenameArr[i], "\n") == true)
- {
- filenameArr[i] = filenameArr[i].setReplaceWord("\n", "");
- }
- }
- }
- }
- }
-
- var totalfilenameArr = "";
- var tmpStr = "";
- for(var fn = 0; fn < filenameArr.length; fn++)
- {
- if(filenameArr[fn] != "" && filenameArr[fn] != null)
- {
- tmpStr = filenameArr[fn] + "\n";
- totalfilenameArr += tmpStr;
- }
- }
-
- return totalfilenameArr;
- }
- else
- return "";
- }
- catch(e)
- {
- }
- }
- function CDPath(path, pid ,instcd )
- {
- var fso = new ActiveXObject("Scripting.FileSystemObject");
-
- var pathRemote;
- var pathLocal;
-
- var folder;
-
- folder = "SCH_" + pid
-
-
- if (fso.FolderExists(path ) == false)
- {
- fso.CreateFolder(path );
- }
-
- if (fso.FolderExists(path + "\\" + folder) == false)
- {
- fso.CreateFolder(path + "\\" + folder);
- }
-
- if (fso.FolderExists(path + "\\" + folder + "\\Image") == false)
- {
- fso.CreateFolder(path + "\\" + folder + "\\Image" );
- }
-
- if (fso.FolderExists(path + "\\" + folder + "\\Image\\" + pid) == false)
- {
- fso.CreateFolder(path + "\\" + folder + "\\Image\\" + pid );
- }
-
- /* 서버에서 파일을 다운로드 하는 방식
- 김진환 대리 요청으로 로컬에서 카피하는 방식으로 전환하기 위해 닫음
- model.setvalue("/root/send/ltp/instcd", instcd);
- model.setvalue("/root/send/ltp/active", "Y");
-
- submit("TRMPL03307");
-
- var ltpServer;
- var ltpUser;
- var ltpPort;
-
- ltpServer = model.getvalue("/root/main/ltpindexinfo/ltpindexserver");
- ltpUser = model.getvalue("/root/main/ltpindexinfo/ltpindexuser");
- ltpPort = model.getvalue("/root/main/ltpindexinfo/ltpindexport");
- pathRemote = "Z:\\CDViewer\\ChartViewer.exe|Z:\\CDViewer\\friendlyImage.dll"
- pathLocal = path + "\\" + folder + "\\ChartViewer.exe|" + path + "\\" + folder + "\\friendlyImage.dll"
- getFiles(ltpServer, ltpPort, ltpUser, "", pathRemote, pathLocal);
- */
-
- pathRemote = "C:\\himed\\components\\LCTech\\HtmlConvert\\ChartViewer.exe"
- pathLocal = path + "\\" + folder + "\\ChartViewer.exe"
- fso.CopyFile(pathRemote,pathLocal)
-
- pathRemote = "C:\\himed\\components\\LCTech\\HtmlConvert\\friendlyImage_CD.dll"
- pathLocal = path + "\\" + folder + "\\friendlyImage.dll"
- fso.CopyFile(pathRemote,pathLocal)
-
- }
- function CDImgCopy(path, pid, seq, indexcode, flag, startPageno, pageno)
- {
- var folder;
- var count;
- var copypath;
- var filename;
-
- var fso = new ActiveXObject("Scripting.FileSystemObject");
-
- folder = "SCH_" + pid
-
- if (fso.FolderExists(path + "\\" + folder + "\\Image\\" + pid + "\\" + seq) == false)
- {
- fso.CreateFolder(path + "\\" + folder + "\\Image\\" + pid + "\\" + seq );
- }
- copypath = path + "\\" + folder + "\\Image\\" + pid + "\\" + seq + "\\" + indexcode
- if (fso.FolderExists(copypath) == false)
- {
- fso.CreateFolder(copypath);
- }
-
- if (f_View.Pagetotal > 0)
- {
-
- // for(count = 1; count <= f_View.Pagetotal; count++)
- for(count = startPageno; count < (Number(startPageno) + Number(pageno)); count++)
- {
- f_View.PageCurrent = count;
- //extension = fso.GetExtensionName(f_View.PageFilePath(count));
- extension = "tif";
- if ( flag == "S"){
- if(f_View.ThumbnailSelect(count) == true)
- {
-
- filename = "00000" + count;
- filename = filename.substr(filename.length - 5 ,5);
- //f_View.PageFilePath(count)
- f_View.FileSaveCreate(copypath + "\\" + filename + "." + extension, -1);
-
- }
- }
- else{
- filename = "00000" + count;
-
- filename = filename.substr(filename.length - 5 ,5);
-
- f_View.FileSaveCreate(copypath + "\\" + filename + "." + extension, -1);
-
- }
-
- }
-
- }
- }
- function fGetAllChrtInfo()
- {
- var setValue = "";
- var count;
- var emrcount = 0;
- var prehidden = "";
-
- try
- {
- setValue = "formcd▦signno▦formnm▦chosflag▦pid▦ptnm▦deptengabbr▦erdt▦rgstno▦disporddd▦drid▦roomcd▦disporddd▦ordtype▦e▦totalpage▩";
-
- for (count = 1; count <= f_View.PageTotal; count++)
- {
- for (emrcount = count; emrcount <= f_View.PageTotal; emrcount++)
- {
- if (g_path[count] != g_path[emrcount])
- {
- break;
- }
- }
- //setValue = setValue + "E" + "▦" + f_View.PageHiddenText(count) + "▦" + g_page[emrcount - 1] + "|";
- if(f_View.PageHiddenText(count) != prehidden){
- setValue = setValue + f_View.PageHiddenText(count) + "▦" + g_page[emrcount - 1] + "▩";
- }
- prehidden = f_View.PageHiddenText(count);
-
- }
- //setValue = setValue.substr(0, setValue.length - 1);
- //alert(setValue);
- return setValue;
-
-
- }
- catch(e)
- {
- }
- }
- function downloadFile()
- {
- var strpath = "";
- var strfilename = "";
- var fso;
- var count;
-
- if (getSelectPageCount() == 0)
- {
- return;
- }
-
- fso = new ActiveXObject("Scripting.FileSystemObject");
- strpath = window.folderDialog("Choose a folder to download Image");
- if (strpath == "")
- {
- return;
- }
- for (count = 1; count <= f_View.PageTotal; count++)
- {
- extension = fso.GetExtensionName(f_View.PageFilePath(count));
- extension = extension.toUpperCase();
- //alert(extension);
- if (f_View.ThumbnailSelect(count) == true && extension == 'JPG')
- {
- strfilename = f_View.PageText(count);
- strfilename = strfilename.setReplaceWord("/", "_")
- strfilename = strfilename.setReplaceWord("[", "")
- strfilename = strfilename.setReplaceWord("]", "_")
- fso.CopyFile(f_View.PageFilePath(count), strpath + "/" + strfilename + "_" + count + ".jpg", true);
- }
- }
- messageBox("다운로드 완료.","I999");
- }
- function reloadChart(param)
- {
- var ViewMode;
- // var destNode = instance1.selectSingleNode("/root/hidden/temp");
- // model.copyNode(destNode, param);
- // searchChart("/root/hidden/temp");
- searchChart(param);
- if (downloadChart() == true)
- {
- ViewMode = model.getValue("/root/hidden/currentViewMode");
- if (ViewMode == null || ViewMode == "")
- {
- setupChartPopup("CV");
- }
- else
- {
- setupChartPopup(ViewMode);
- }
- }
- }
- function rdoIndxClickEvent(){
- if(downloadChart() == true){
- setupChartPopup("ChartView");
- }
-
- }
-
|