12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677 |
- /*
- - ▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩
- 통합기록조회 ( SMMRI04000_통합기록조회.xrw - JScript )
- - Version : SMMRI03000 + SMMRI04000 혼합됨.
- 1) : Ver.1.00.01
- - ▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩
- */
- var arrbtn = new Array("btn_all", "btn_prog", "btn_op", "btn_test", "btn_prcp", "btn_nurc", "btn_etc", "btn_img");
- var grdObj = "";
- var ref = "/root/main/recsrch/reclist";
- var stRef = "/root/tmp/reclist";
- var paramdefault = "";
- var isFirst = "Y";
- var gImgFile = "";
- var oprnerId = "";
- var srchorgcnt = 0;
- var srchcnt = 0;
- var srchendyn = "N";
- var gtmptreatno = "";
- var gtmpiformcd = "";
- var gemrpath = "";
- var gemrorddate = "";
- var gemrformnm = "";
- var gemrformcd = "";
- var gemrdeptnm = "";
- var gemrdeptcd = "";
- var gemrpage = "";
- var gemrhiddenmsg = "";
- var multirecyn = "N"; //다수의 기록 여부(ex.기록+이미지)
- var nodeposcnt = 1;
- var prevflag = "N";
- /**
- * @desc : 화면초기화
- * @id :
- * @event : xforms-ready
- * @return : void
- * @authur : 박종훈(튜닝)
- */
- function fInitalize()
- {
- var chkPidRtn = "";
- iviewerIemr.window.javascript.setChartViewerSize(parseInt(iviewerIemr.attribute("width")), parseInt(iviewerIemr.attribute("height")));
-
- mmbfGetHardCodeInfo("/root/send/reqdata", "/root/init/pidynhcd", 3801);
-
- //2009-10-27 오후 4:37:13 강지훈 추가 : 북마크 사용여부를 기관별로 관리한다.
- mmbfGetHardCodeInfo("/root/send/reqdata", "/root/init/bmkuseyn", 9909);
- var bmkuseyn = model.getValue("/root/init/bmkuseyn/hardcd/hardcd");
- if (bmkuseyn == "Y")
- {
- btn_setbmk.visible = true;
- btn_mark.visible = true;
- }
- else{
- btn_setbmk.visible = false;
- btn_mark.visible = false;
- }
-
- var sUserDeptcd = getUserInfo("dutplcecd");
- var sJobkind = getUserInfo("jobkindcd").substring(0, 2);
-
- if(sJobkind == "03" || sUserDeptcd == "3230000000")
- {
- btn_copyprt.visible = true;
- }
-
- if (isPopup())
- {
- var parampid = opener.window.javascript.getParameter("SMMRI00400_param_pid");
- var paramchosflag = opener.window.javascript.getParameter("SMMRI00400_param_chosflag");
- var authflag = opener.window.javascript.getParameter("SMMRI00400_param_authflag");
-
- if (authflag == "N")
- {
- ipt_pid.disabled = true;
- ipt_hngnm.disabled = true;
- btn_search.disabled = true;
- ipt_rrgstno1.disabled = true;
- ipt_rrgstno2.disabled = true;
- button14.disabled = true;
- button5.disabled = true;
- }
- else
- {
- ipt_pid.disabled = false;
- ipt_hngnm.disabled = false;
- btn_search.disabled = false;
- ipt_rrgstno1.disabled = false;
- ipt_rrgstno2.disabled = false;
- button14.disabled = false;
- button5.disabled = false;
- }
- }
- if(parampid == "")
- {
- var pamInfoCvs = getGlobalVariable("paminfo"); //상단정보가 있을 경우는 검색
- var pid = "";
- if(pamInfoCvs != null)
- { //cvs가 null이 아닌 경우에만 처리함.
- model.removeNodeSet ("/root/main/result/paminfo/list");
- setCSVToNode ("/root/main/result/paminfo", pamInfoCvs);
- pid = model.getValue ("/root/main/result/paminfo/list/pid");
- ordtype = model.getValue ("/root/main/result/paminfo/list/ioflag");
- if ( !isNull ( pid ) )
- {
- if(oprnerId == "SPMRC03200")
- {
- opener.window.javascript.fGetCopyCmpPid(pid);
- }
-
- ipt_pid.value = pid;
- chkPidRtn = fPidKeyPress(); //등록번호로 환자 정보조회
- }
- }
- }
- else
- {
- ipt_pid.value = parampid;
- chkPidRtn = fPidKeyPress(); //등록번호로 환자 정보조회
- }
-
- model.setValue("/root/init/ioflag", "ALL");
-
- model.removeNodeset("/root/send");
- model.makeValue("/root/send/trgtno", 1100);
- model.makeValue("/root/send/exno", 1110);
-
- submit("TRMRI04006");
-
- //2009-11-17 오후 5:48:29 강지훈 수정 : 휠스크롤 메세지박스 사용여부 개인별 환경설정으로 관리
- model.removeNode("/root/send/interqestcd");
- model.makeNode("/root/send/interqestcd");
- var AnswData = fGetIntefeAnsw("017");
- model.setValue("/root/tmp/wheelmsg", AnswData);
-
- //2009-10-20 오후 2:01:30 강지훈 수정
- btn_all.selected = true;
- model.toggle("grd");
-
- if (chkPidRtn)
- {
- fGetPatOrddept();
-
- btn_all.dispatch("DOMActivate");
- }
- }
- /**
- * @desc : 환자 수진부서 조회
- * @id :
- * @event : DOMActivate
- * @return : void
- * @authur : 박종훈
- */
- function fGetPatOrddept()
- {
- model.removeNodeset("/root/send");
- model.removeNodeset("/root/initinfo/lrgIndx");
- model.removeNodeset("/root/initinfo/dplist");
- model.makeValue("/root/send/pid", model.getValue("/root/main/patinfo/patinfolist/pid"));
-
- if (submit("TRMRI04001"))
- {
- addComboInstance("/root/initinfo", "itemindxseq^indxnm", "ALL^전체", "lrgIndx");
- addComboInstance("/root/initinfo", "deptcd^deptnm", "ALL^전체", "dplist");
-
- model.setValue("/root/init/orddept", "ALL");
- model.setValue("/root/init/tabflag", "ALL");
-
- cmb_dept.refresh();
- rdo_lindx.refresh();
- }
- }
- /**
- * @desc : 환자 수진이력 조회
- * @id :
- * @event : DOMActivate
- * @return : void
- * @authur : 박종훈(튜닝)
- */
- function fGetPatOrdHist(ioflag)
- {
- model.toggle("grd");
-
- iviewerIemr.window.javascript.cleanViewer();
- var orddept = model.getValue("/root/init/orddept");
- var tmpioflag = "" ;
- if (ioflag == null || ioflag == "")
- {
- tmpioflag = model.getValue("/root/init/ioflag");
- }
- else
- {
- model.setValue("/root/init/ioflag", ioflag);
- tmpioflag = ioflag;
- }
-
- model.setValue("/root/init/totcnt", "");
- lbl_totcnt.refresh();
-
- model.removeNodeset("/root/send");
- model.removeNodeset("/root/main/pathist/patordhist");
- model.removeNodeset("/root/main/midindx/midindxlist");
- model.resetInstanceNode("/root/init/accresn");
- model.resetInstanceNode("/root/init/prtresn");
-
- model.resetInstanceNode("/root/init/itemindxseq");
- model.resetInstanceNode("/root/init/midreccnt");
- model.resetInstanceNode("/root/init/reccurpos");
-
- model.makeValue("/root/send/pid", model.getValue("/root/main/patinfo/patinfolist/pid"));
- model.makeValue("/root/send/ioflag", tmpioflag);
- model.makeValue("/root/send/orddeptcd", model.getValue("/root/init/orddept"));
-
- //김양수추가-kys-20091207-의사지시조회관련 초기화=========
- grup_prcppaging.attribute("visibility") = "hidden";
- model.makeValue("/root/tmp/prcprec/srchInterval", "");
- model.makeValue("/root/tmp/prcprec/srchFromdd", "");
- model.makeValue("/root/tmp/prcprec/srchTodd", "");
- model.makeValue("/root/tmp/prcprec/srchYn", "");
- //======================================================
-
- submit("TRMRI04002");
-
- if (ioflag == "I" || ioflag == "E")
- {
- grd_pathist.colhidden(grd_pathist.colref("centcd")) = true; //센터 컬럼 안보이게
- grd_pathist.attribute("scroll") = "autovscroll";
- }
- else
- {
- grd_pathist.colhidden(grd_pathist.colref("centcd")) = false; //센터 컬럼 보이게
- grd_pathist.attribute("scroll") = "auto";
- }
- grd_pathist.rebuild();
- }
- /**
- * @desc : 환자 기록 중분류 조회
- * @id :
- * @event : ondblclick
- * @return : void
- * @authur : 박종훈
- */
- function fGetRecMidIndx( grow )
- {
- var row = grow;
- if ( grow == null )
- row = grd_pathist.row;
-
- multirecyn = "N"; //다수의 기록 여부(ex.기록+이미지)
- nodeposcnt = 1;
- prevflag = "N";
-
- var pid = "";
- var orddd = "";
- var cretno = "";
- var orddeptcd = "";
- var tabflag = "";
- var bfopentest = ""; //2009-10-31 오후 2:39:16 강지훈 추가 : nU 오픈전 검사처방이 있는 수진여부
- var emrflag = grd_pathist.valueMatrix(row, grd_pathist.colref("emrflag"));
-
-
- model.resetInstanceNode("/root/init/itemindxseq");
- model.resetInstanceNode("/root/init/midreccnt");
- model.resetInstanceNode("/root/init/reccurpos");
-
- model.setValue("/root/init/emrflag", emrflag);
-
-
-
- if((grd_pathist.isCell(event.target) && grd_pathist.mouserow >= grd_pathist.fixedrows))
- {
- pid = grd_pathist.valueMatrix(row, grd_pathist.colref("formrecseq"));
- orddd = grd_pathist.valueMatrix(row, grd_pathist.colref("orddd"));
- cretno = grd_pathist.valueMatrix(row, grd_pathist.colref("cretno"));
- orddeptcd = grd_pathist.valueMatrix(row, grd_pathist.colref("orddeptcd"));
- bfopentest = grd_pathist.valueMatrix(row, grd_pathist.colref("bfopentest"));
- tabflag = model.getValue("/root/init/tabflag");
-
- }
- else
- {
- if (row > 0)
- {
- pid = grd_pathist.valueMatrix(row, grd_pathist.colref("formrecseq"));
- orddd = grd_pathist.valueMatrix(row, grd_pathist.colref("orddd"));
- cretno = grd_pathist.valueMatrix(row, grd_pathist.colref("cretno"));
- orddeptcd = grd_pathist.valueMatrix(row, grd_pathist.colref("orddeptcd"));
- bfopentest = grd_pathist.valueMatrix(row, grd_pathist.colref("bfopentest"));
- tabflag = model.getValue("/root/init/tabflag");
-
- }
- else
- {
- messageBox("환자의 수진이력을 ", "C002");
- return;
- }
- }
-
- var comporddd = model.getValue("/root/init/accresn/orddd");
- var compcretno = model.getValue("/root/init/accresn/cretno");
- if (compcretno == "")
- {
- compcretno = "-";
- }
-
-
- var itrgtNodeCnt = getNodesetCnt(model, "/root/hardcd/trgtdept[trgtcd = '" + orddeptcd + "']"); //사유대상부서
-
- if (itrgtNodeCnt > 0) //감염내과, 정신과, 산부인과, 비뇨기과
- {
- var sUserDeptcd = getUserInfo("dutplcecd");
-
- var iexNodeCnt = getNodesetCnt(model, "/root/hardcd/exdept[trgtcd = '" + sUserDeptcd + "']"); //사유제외부서
-
- if ((iexNodeCnt <= 0) && (sUserDeptcd != orddeptcd) && (comporddd != orddd && compcretno != cretno)) //사용자 근무부서와 환자 수진부서가 틀린경우 사유창 팝업, 근무부서가 의료정보팀일경우 제외
- {
- model.resetInstanceNode("/root/init/accresn");
- setParameter("SPMRI03100_param_nodepath", "/root/init/accresn");
- setParameter("SPMRI03100_param_rsnflag", 'R');
- modal("SPMRI03100");
-
- var valiyn = model.getValue("/root/init/accresn/valiyn");
-
- if (valiyn != "Y")
- {
- return;
- }
- else
- {
-
- }
- }
-
- model.makeValue("/root/init/accresn/orddd", orddd);
- model.makeValue("/root/init/accresn/cretno", cretno);
-
- }
- else
- {
- model.resetInstanceNode("/root/init/accresn/resncd");
- model.resetInstanceNode("/root/init/accresn/resnnm");
- model.resetInstanceNode("/root/init/accresn/etc");
- model.resetInstanceNode("/root/init/accresn/valiyn");
- model.resetInstanceNode("/root/init/accresn/orddd");
- model.resetInstanceNode("/root/init/accresn/cretno");
- }
-
- var ViewMode;
- ViewMode = iviewerIemr.model.getValue("/root/hidden/currentViewMode");
-
- if (ViewMode == null || ViewMode == "" || ViewMode != "ChartView")
- {
- iviewerIemr.window.javascript.setupChart("ChartView");
- }
-
- iviewerIemr.window.javascript.cleanViewer();
-
- var ioflag = model.getValue("/root/send/ioflag");
- var refdata = "";
- var sizedata = "";
- if (emrflag == "I")
- {
- grd_midindx.caption = "lisflag^reckind^emrflag^정렬순번^상위아이템코드^아이템코드^중분류명^페이지수";
- }
- else if (emrflag == "E")
- {
- grd_midindx.caption = "lisflag^reckind^emrflag^정렬순번^상위아이템코드^아이템코드^중분류명^기록수";
- }
-
- model.setValue("/root/init/totcnt", "");
- lbl_totcnt.refresh();
-
- model.removeNodeset("/root/send");
- model.removeNodeset("/root/main/midindx/midindxlist");
- model.makeValue("/root/send/pid", model.getValue("/root/main/patinfo/patinfolist/pid"));
- model.makeValue("/root/send/orddd", orddd);
- model.makeValue("/root/send/cretno", cretno);
- model.makeValue("/root/send/orddeptcd", orddeptcd);
- model.makeValue("/root/send/tabflag", tabflag);
- model.makeValue("/root/send/emrflag", emrflag);
- model.makeValue("/root/send/chosflag", grd_pathist.valueMatrix(row, grd_pathist.colref("ordtype")));
- model.makeValue("/root/send/refusge", model.getValue("/root/init/accresn/resncd"));
- model.makeValue("/root/send/refremark", model.getValue("/root/init/accresn/etc"));
- model.makeValue("/root/send/readprtflag", 'R');
-
-
- //2009-10-31 오후 2:36:09 강지훈 수정 :
- model.makeValue("/root/send/bfopentest", bfopentest);
-
- //20091204-kys-추가 조회현재일 셋팅
- //model.makeValue("/root/tmp/currentDate", orddd);
-
-
- if(submit("TRMRI04003"))
- {
- var midindxNodelist = model.instances(0).selectNodes("/root/main/midindx/midindxlist");
- var itemindxseq = 0;
- var midreccnt = 0;
-
- if (midindxNodelist.length > 0)
- {
- grd_midindx.resizeCells();
-
- var subNode = midindxNodelist.item(0);
- itemindxseq = parseInt(subNode.selectSingleNode("itemindxseq").text);
- midreccnt = parseInt(subNode.selectSingleNode("cnt").text);
-
- model.setValue("/root/init/itemindxseq", itemindxseq);
- model.setValue("/root/init/midreccnt", midreccnt);
- model.setValue("/root/init/reccurpos", 1);
- model.setValue("/root/init/bfopentest", bfopentest);
- grd_midindx.row = 1;
-
- fGetDetlRec(1, row); //pjh
- }
- }
-
- }
- /**
- * @desc : 키 이벤트
- * @id :
- * @event : DOMActivate
- * @return : void
- * @authur : 박종훈
- */
- function fGetRec(val)
- {
- if(model.getValue("/root/tmp/chklittleindx") != "Y"){ //조건분기추가-kys-20091210(전체조회시)
-
- var selIndx = switch1.selectedIndex;
- var aaa = "";
- //북마크모드가 아닐때
- if(selIndx == 0){
-
- var midnodeList = instance1.selectNodes("/root/main/midindx/midindxlist");
-
- if (midnodeList.length < 1)
- {
- messageBox("서식분류를", "C002");
- iviewerIemr.window.javascript.setupChart("ChartView");
- return;
- }
-
- var ViewMode = "-";
- ViewMode = iviewerIemr.model.getValue("/root/hidden/currentViewMode");
-
- if (ViewMode == "ThumbView")
- {
- iviewerIemr.window.javascript.setupChart("ChartView");
- }
-
- var emrflag = model.getValue("/root/init/emrflag");
-
- //2009-11-02 오후 7:16:41 강지훈 수정
- var reckind = grd_midindx.valueMatrix(grd_midindx.row, grd_midindx.colref("reckind"))
- var wheelMsgFlag = model.getValue("/root/tmp/wheelmsg");
-
- if (emrflag == "I" && reckind != "EMR")
- {
- multirecyn = "N"; //다수의 기록 여부(ex.기록+이미지)
- nodeposcnt = 1;
- prevflag = "N";
- switch(val)
- {
- case "first" :
- if (grd_midindx.row == 1)
- {
- messageBox("처음", "I009");
- return;
- }
- else
- {
- grd_midindx.row = 1;
- break;
- }
- case "prev" :
- if (grd_midindx.row == 1)
- {
- //messageBox("처음", "I009");
- //return;
-
- if(wheelMsgFlag == "Y"){
-
- var rtnmsg = messageBox("처음 기록입니다. 이전 수진이력으로", "Q003");
-
- if (rtnmsg == 6)
- {
- fPrevRecHist();
- return;
- }
- else
- {
- return;
- }
- }
- else{
- fPrevRecHist();
- return;
- }
- }
- else
- {
- grd_midindx.row = grd_midindx.row - 1;
- break;
- }
- case "next" :
- if (grd_midindx.row + 1 == grd_midindx.rows)
- {
- if(wheelMsgFlag == "Y"){
- var rtnmsg = messageBox("마지막 기록입니다. 다음 수진이력으로", "Q003");
-
- if (rtnmsg == 6)
- {
- fNextRecHist();
- return;
- }
- else
- {
- return;
- }
- }
- else{
- fNextRecHist();
- return;
- }
- }
- else
- {
- grd_midindx.row = grd_midindx.row + 1;
- break;
- }
- case "end" :
- if (grd_midindx.row + 1 == grd_midindx.rows)
- {
- messageBox("마지막", "I009");
- return;
- }
- else
- {
- grd_midindx.row = grd_midindx.rows - 1;
- break;
- }
- case "all" :
- model.setValue("/root/init/recall", "Y");
- }
- }
- else
- {
- var reccurpos = parseInt(model.getValue("/root/init/reccurpos"));
- var midreccnt = parseInt(model.getValue("/root/init/midreccnt"));
- var certnodeList = instance1.selectNodes("/root/tmpinicert/iniinfo");
-
- switch(val)
- {
- case "first" :
- multirecyn = "N"; //다수의 기록 여부(ex.기록+이미지)
- nodeposcnt = 1;
- prevflag = "N";
- if (grd_midindx.row == 1 && reccurpos == 1)
- {
- messageBox("처음", "I009");
- return;
- }
- else
- {
- model.setValue("/root/init/recall", "N");
- grd_midindx.row = 1;
-
- var curmidcnt = parseInt(grd_midindx.valueMatrix(grd_midindx.row, grd_midindx.colref("cnt")));
- model.setValue("/root/init/midreccnt", curmidcnt);
- model.setValue("/root/init/reccurpos", 1);
- model.setValue("/root/init/itemindxseq", parseInt(grd_midindx.valueMatrix(grd_midindx.row, grd_midindx.colref("itemindxseq"))));
- break;
- }
- case "prev" :
- prevflag = "Y";
- if (certnodeList.length > 1 && nodeposcnt > 1)
- {
- multirecyn = "Y";
- }
- else
- {
- multirecyn = "N";
- nodeposcnt = 1;
- }
-
- if (multirecyn == "N")
- {
- if (grd_midindx.row == 1 && reccurpos == 1)
- {
- if(wheelMsgFlag == "Y"){
- var rtnmsg = messageBox("처음 기록입니다. 이전 수진이력으로", "Q003");
-
- if (rtnmsg == 6)
- {
- fPrevRecHist();
- return;
- }
- else
- {
- return;
- }
- }
- else{
- fPrevRecHist();
- return;
- }
- }
- else
- {
- model.setValue("/root/init/recall", "N");
- if (reccurpos == 1) //해당중분류의 첫기록일 경우 전 중분류로 이동 후 해당 중분류의 정보를 셋팅한다.
- {
- grd_midindx.row = grd_midindx.row - 1;
- var curmidcnt = parseInt(grd_midindx.valueMatrix(grd_midindx.row, grd_midindx.colref("cnt")));
- model.setValue("/root/init/midreccnt", curmidcnt);
- model.setValue("/root/init/reccurpos", curmidcnt);
- model.setValue("/root/init/itemindxseq", parseInt(grd_midindx.valueMatrix(grd_midindx.row, grd_midindx.colref("itemindxseq"))));
- break;
- }
- else
- {
- model.setValue("/root/init/reccurpos", reccurpos - 1);
- break;
- }
-
- }
- }
- else //하나의 기록이나 이미지가 포함된경우
- {
- if (nodeposcnt <= 1)
- {
- if (grd_midindx.row == 1 && reccurpos == 1)
- {
- if(wheelMsgFlag == "Y"){
- var rtnmsg = messageBox("처음 기록입니다. 이전 수진이력으로", "Q003");
-
- if (rtnmsg == 6)
- {
- fPrevRecHist();
- return;
- }
- else
- {
- return;
- }
- }
- else{
- fPrevRecHist();
- return;
- }
- }
- else
- {
- model.setValue("/root/init/reccurpos", reccurpos - 1);
- break;
- }
- }
- else
- {
- nodeposcnt--;
- break;
- }
- }
- case "next" :
- prevflag = "N";
- if (certnodeList.length > 1 && certnodeList.length > nodeposcnt)
- {
- multirecyn = "Y";
- }
- else
- {
- multirecyn = "N";
- nodeposcnt = 1;
- }
-
- if (multirecyn == "N")
- {
- if (reccurpos == midreccnt && grd_midindx.row + 1 == grd_midindx.rows)
- {
- if(wheelMsgFlag == "Y"){
- var rtnmsg = messageBox("마지막 기록입니다. 다음 수진이력으로", "Q003");
-
- if (rtnmsg == 6)
- {
- fNextRecHist();
- return;
- }
- else
- {
- return;
- }
- }
- else{
- fNextRecHist();
- return;
- }
-
- }
- else
- {
- model.setValue("/root/init/recall", "N");
- if (reccurpos == midreccnt)
- {
- grd_midindx.row = grd_midindx.row + 1;
- var curmidcnt = parseInt(grd_midindx.valueMatrix(grd_midindx.row, grd_midindx.colref("cnt")));
- model.setValue("/root/init/midreccnt", curmidcnt);
- model.setValue("/root/init/reccurpos", 1);
- model.setValue("/root/init/itemindxseq", parseInt(grd_midindx.valueMatrix(grd_midindx.row, grd_midindx.colref("itemindxseq"))));
- break;
- }
- else
- {
- model.setValue("/root/init/reccurpos", reccurpos + 1);
- break;
- }
- }
- }
- else //하나의 기록이나 이미지가 포함된경우
- {
- if (nodeposcnt >= certnodeList.length)
- {
- if (reccurpos == midreccnt && grd_midindx.row + 1 == grd_midindx.rows)
- {
- if(wheelMsgFlag == "Y"){
- var rtnmsg = messageBox("마지막 기록입니다. 다음 수진이력으로", "Q003");
-
- if (rtnmsg == 6)
- {
- fNextRecHist();
- return;
- }
- else
- {
- model.setValue("/root/init/reccurpos", reccurpos + 1);
- break;
- }
- }
- else{
- fNextRecHist();
- return;
- }
- }
- }
- else
- {
- nodeposcnt++;
- break;
- }
- }
- case "end" :
- multirecyn = "N"; //다수의 기록 여부(ex.기록+이미지)
- nodeposcnt = 1;
- prevflag = "N";
- if (reccurpos == midreccnt && grd_midindx.row + 1 == grd_midindx.rows)
- {
- messageBox("마지막", "I009");
- return;
- }
- else
- {
- model.setValue("/root/init/recall", "N");
-
- grd_midindx.row = grd_midindx.rows - 1;
- var curmidcnt = parseInt(grd_midindx.valueMatrix(grd_midindx.row, grd_midindx.colref("cnt")));
- model.setValue("/root/init/midreccnt", curmidcnt);
- model.setValue("/root/init/reccurpos", curmidcnt);
- model.setValue("/root/init/itemindxseq", parseInt(grd_midindx.valueMatrix(grd_midindx.row, grd_midindx.colref("itemindxseq"))));
- break;
- }
- case "midfirst" :
- multirecyn = "N"; //다수의 기록 여부(ex.기록+이미지)
- nodeposcnt = 1;
- prevflag = "N";
- if (grd_midindx.row == 1 && reccurpos == 1)
- {
- messageBox("처음", "I009");
- return;
- }
- else
- {
- model.setValue("/root/init/recall", "N");
- model.setValue("/root/init/reccurpos", 1);
- break;
- }
- case "midend" :
- multirecyn = "N"; //다수의 기록 여부(ex.기록+이미지)
- nodeposcnt = 1;
- prevflag = "N";
- if (reccurpos == midreccnt && grd_midindx.row + 1 == grd_midindx.rows)
- {
- messageBox("마지막", "I009");
- return;
- }
- else
- {
- model.setValue("/root/init/recall", "N");
- model.setValue("/root/init/reccurpos", midreccnt);
- break;
- }
- case "all" :
- multirecyn = "N"; //다수의 기록 여부(ex.기록+이미지)
- nodeposcnt = 1;
- prevflag = "N";
- model.setValue("/root/init/recall", "Y");
- }
-
- model.refresh(); //pjh
- }
- }
-
- fGetDetlRec(); //pjh
-
-
- }else{ //kys-20091210-선택체크후 조회시(부분(간격,일자선택)조회)
- var wheelMsgFlag = model.getValue("/root/tmp/wheelmsg");
- var certnodeList = instance1.selectNodes("/root/tmpinicert/iniinfo");
- switch(val)
- {
- case "prev" : //Page Up클릭시
- prevflag = "Y";
- if(model.getValue("/root/tmp/prcprec/srchkind") != 1){ //서식별, 일자+서식별조회시
- if(grd_littleindx.row == 1){
- if(wheelMsgFlag == "Y"){
- if(nodeposcnt == 1){
- messageBox("처음", "I009");
- return;
- }else{
- nodeposcnt--;
- break;
- }
- }
- }else if(grd_littleindx.row != 1){
- if(wheelMsgFlag == "Y"){
- if (nodeposcnt == 1){
- grd_littleindx.row = grd_littleindx.row - 1;
- multirecyn = "N"; //다음행으로 넘어갈때는 조회를 하기위해 N으로 셋팅한다-20091210-kys
- break;
- }else{
- nodeposcnt--;
- break;
- }
- }
- }
- }else{ //일자별 조회시
- if(wheelMsgFlag == "Y"){
- if(nodeposcnt == 1){
- messageBox("처음", "I009");
- return;
- }else{
- nodeposcnt--;
- break;
- }
- }
- }
- case "next" : //Page Down클릭시
- prevflag = "N";
- if(model.getValue("/root/tmp/prcprec/srchkind") != 1){ //서식별, 일자+서식별조회시
- if(grd_littleindx.row + 1 != grd_littleindx.rows){
- if(wheelMsgFlag == "Y"){
- if (nodeposcnt == certnodeList.length){
- grd_littleindx.row = grd_littleindx.row + 1;
- multirecyn = "N"; //다음행으로 넘어갈때는 조회를 하기위해 N으로 셋팅한다-20091210-kys
- break;
- }else{
- nodeposcnt++;
- break;
- }
- }
- }else if(grd_littleindx.row + 1 == grd_littleindx.rows){
- if(wheelMsgFlag == "Y"){
- if (nodeposcnt == certnodeList.length){
- messageBox("마지막", "I009");
- return;
- }else{
- nodeposcnt++;
- break;
- }
- }
- }
- }else{ //일자별 조회시
- if (nodeposcnt == certnodeList.length){
- messageBox("마지막", "I009");
- return;
- }else{
- nodeposcnt++;
- break;
- }
- }
- case "all" : //여러페이지보기클릭시에도 사용됨-kys
- multirecyn = "N"; //다수의 기록 여부(ex.기록+이미지)
- nodeposcnt = 1;
- prevflag = "N";
- model.setValue("/root/init/recall", "Y");
- }
- //model.refresh(); //pjh
- fGetDetlRec();
- }
- }
- /**
- * @desc : 다음 수진이력으로 자동 이동
- * @id :
- * @event : DOMActivate
- * @return : void
- * @authur : 박종훈
- */
- function fNextRecHist()
- {
- var histrow = grd_pathist.row + 1;
-
- if ( histrow == grd_pathist.rows )
- {
- messageBox("마지막 이력", "I009");
- return;
- }
- else
- {
- grd_pathist.row = histrow;
- fGetRecMidIndx();
- }
-
- var ctrl = document.controls("grd_midindx");
- if (ctrl != null)
- {
- model.setFocus(ctrl.attribute("id"));
- ctrl.dispatch("onkeyup");
- }
- }
- /**
- * @desc : 이전 수진이력으로 자동 이동
- * @id :
- * @event :
- * @return : void
- * @authur : 주희경
- */
- function fPrevRecHist()
- {
- var histrow = grd_pathist.row - 1;
-
- if (histrow <= 0)
- {
- messageBox("처음 이력", "I009");
- return;
- }
- else
- {
- grd_pathist.row = histrow;
- fGetRecMidIndx();
- }
-
- var ctrl = document.controls("grd_midindx");
- if (ctrl != null)
- {
- model.setFocus(ctrl.attribute("id"));
- ctrl.dispatch("onkeyup");
- }
- }
- /**
- * @desc : 중분류 더블클릭
- * @id :
- * @event : DOMActivate
- * @return : void
- * @authur : 박종훈
- */
- function fDbClickMidIndx()
- {
- //if((grd_midindx.isCell(event.target) && grd_midindx.mouserow >= grd_midindx.fixedrows)) 주석처리-kys-20091209
- //{
- multirecyn = "N"; //다수의 기록 여부(ex.기록+이미지)
- nodeposcnt = 1;
- prevflag = "N";
-
- iviewerIemr.window.javascript.cleanViewer();
-
- if (grd_midindx.row >= 1)
- {
- var curmidcnt = parseInt(grd_midindx.valueMatrix(grd_midindx.row, grd_midindx.colref("cnt")));
- var itemindxseq = parseInt(grd_midindx.valueMatrix(grd_midindx.row, grd_midindx.colref("itemindxseq")));
- //김양수추가-kys-20091208
- var reckind = grd_midindx.valueMatrix(grd_midindx.row, grd_midindx.colref("reckind"));
-
-
- model.setValue("/root/init/midreccnt", curmidcnt);
- model.setValue("/root/init/reccurpos", 1);
- model.setValue("/root/init/itemindxseq", itemindxseq);
-
-
- model.refresh(); //pjh
- if(reckind != "PRCP"){ //김양수조건추가-의사지치기록일경우 기간조회차띄우기-kys-20091204
- if(model.getValue("/root/tmp/chklittleindx") != "Y"){ //선택에 체크가 되어있지 않은경우-kys-20091209
- grup_prcppaging.attribute("visibility") = "hidden"; ////김양수조건추가-의사지치기록일경우 기간조회차띄우기-kys-20091204
- }
- grup_prcppaging2.attribute("visibility") = "hidden"; //의사지시 기록조회창 닫기-kys-20091215
-
- fGetDetlRec(grd_midindx.row); //pjh
-
- var ViewMode;
- ViewMode = iviewerIemr.model.getValue("/root/hidden/currentViewMode");
-
- if (ViewMode == null || ViewMode == "" || ViewMode != "ChartView")
- {
- iviewerIemr.window.javascript.setupChart("ChartView");
- }
- }else if(reckind == "PRCP"){
- //20091204-kys-추가 조회현재일 셋팅
- //한번조회했다면 초기화하지 않는다.-20091207
- if(model.getValue("/root/tmp/prcprec/srchYn") != "Y"){ //최초 조회시 셋팅
- var srchAddOrddd = grd_pathist.valueMatrix(grd_pathist.row, grd_pathist.colref("orddd"));
- //model.makeValue("/root/tmp/prcprec/srchYn", "Y"); //조회유무
- model.makeValue("/root/tmp/sndprcprec/srchprcpinterval", "7");
- model.makeValue("/root/tmp/sndprcprec/srchprcpfromdd", srchAddOrddd);
- model.makeValue("/root/tmp/sndprcprec/srchprcptodd", srchAddOrddd.toDate().getAddDate(6, "D").getDateFormat());
-
- }
- grup_prcppaging.attribute("visibility") = "hidden";
- grup_prcppaging2.attribute("visibility") = "visible";
- model.setFocus("ipt_srchprcpinterval");
- rdo_srchprcpchoice.select(0);
- model.refresh();
-
- fGetDetlRec(grd_midindx.row); //pjh
-
- var ViewMode;
- ViewMode = iviewerIemr.model.getValue("/root/hidden/currentViewMode");
-
- if (ViewMode == null || ViewMode == "" || ViewMode != "ChartView")
- {
- iviewerIemr.window.javascript.setupChart("ChartView");
- }
- }
- }
- // }
- }
- /**
- * @desc : 기록조회
- * @id :
- * @event : DOMActivate
- * @return : void
- * @authur : 박종훈
- */
- function fGetDetlRec( row1, row2 )
- {
- var grd_midindxrow = row1;
- var grd_pathistrow = row2;
-
- if ( row1 == null )
- grd_midindxrow = grd_midindx.row;
-
- if ( row2 == null )
- grd_pathistrow = grd_pathist.row;
-
- var itemindxseq = parseInt(model.getValue("/root/init/itemindxseq")); //선택중분류 인덱스순번
- var reccurpos = parseInt(model.getValue("/root/init/reccurpos")); //현재선택된기록 순번
- var midreccnt = parseInt(model.getValue("/root/init/midreccnt")); //선택중분류 기록수
-
- var bfopentest = model.getValue("/root/init/bfopentest"); //오픈 이전 검사처방 수진이력
- var reckind = grd_midindx.valueMatrix(grd_midindxrow, grd_midindx.colref("reckind"));
-
- var rowfocus = "";
- var emrflag = model.getValue("/root/init/emrflag");
- var selIndx = switch1.selectedIndex; //2009-10-20 오후 10:00:57 강지훈 추가
-
-
- if(selIndx == 1){
-
- fGetBookmarkItem();
- }
- else if(selIndx == 0){
-
- //2009-11-18 오후 10:14:11 강지훈 추가
- if (emrflag == "I" && (reckind != "EMR" && reckind != "CDIS"))
- {
-
- var totcnt = "[ " + 1 + " / " + grd_midindx.valueMatrix(grd_midindxrow, grd_midindx.colref("cnt")) + " / " + model.getValue("/root/init/reccnt") + " ]";
- model.setValue("/root/init/totcnt", totcnt);
- lbl_totcnt.refresh();
-
- var treatno = grd_midindx.valueMatrix(grd_midindxrow, grd_midindx.colref("itemindxseq"));
- var formcd = grd_midindx.valueMatrix(grd_midindxrow, grd_midindx.colref("supitemindxseq"));
-
- iviewerIemr.window.javascript.cleanViewer();
- iviewerIemr.window.javascript.refreshFalse();
-
- model.makeValue("/root/imgrec/iemr/treatno", parseInt(treatno));
- model.makeValue("/root/imgrec/iemr/docucd", formcd);
-
- var iemrNode = instance1.selectSingleNode("/root/imgrec/iemr");
-
- var chartinfo;
- chartinfo = "I";
- var hiddenmsg;
- hiddenmsg = "I";
-
- iviewerIemr.window.javascript.appendChart(iemrNode, chartinfo, hiddenmsg);
- iviewerIemr.window.javascript.refreshTrue();
- }
- else
- {
- var calcReccurpos = parseInt(model.getValue("/root/init/reccurpos"));
- var itemindxseq = parseInt(model.getValue("/root/init/itemindxseq"));
- var isLis = "";
-
- // for (var j = 1; j < grd_midindx.row; j++)
- // {
- // isLis = grd_midindx.valueMatrix(j, grd_midindx.colref("reckind"));
- //
- // if (isLis == "LIS")
- // {
- // calcReccurpos -= 1;
- // }
- // }
-
- model.removeNodeset("/root/send");
- model.makeValue("/root/send/pid", model.getValue("/root/main/patinfo/patinfolist/pid"));
- model.makeValue("/root/send/orddd", grd_pathist.valueMatrix(grd_pathistrow, grd_pathist.colref("orddd")));
- model.makeValue("/root/send/cretno", grd_pathist.valueMatrix(grd_pathistrow, grd_pathist.colref("cretno")));
- model.makeValue("/root/send/chosflag", grd_pathist.valueMatrix(grd_pathistrow, grd_pathist.colref("ordtype")));
- model.makeValue("/root/send/orddeptcd", grd_pathist.valueMatrix(grd_pathistrow, grd_pathist.colref("orddeptcd")));
- model.makeValue("/root/send/tabflag", model.getValue("/root/init/tabflag"));
- model.makeValue("/root/send/reccurpos", calcReccurpos);
- if(model.getValue("/root/tmp/chklittleindx") != "Y"){ //분기-kys-체크선택후 조회시 전체를 가지고 온다.-20091210
- model.makeValue("/root/send/recall", model.getValue("/root/init/recall"));
- }else{
- model.makeValue("/root/send/recall", "Y");
- }
- model.makeValue("/root/send/reckind", reckind);
- model.makeValue("/root/send/itemindxseq", itemindxseq);
- model.makeValue("/root/send/lisflag", grd_midindx.valueMatrix(grd_midindxrow, grd_midindx.colref("lisflag")));
- //김양수추가부분-20091204-kys
- if(reckind == "PRCP" || model.getValue("/root/tmp/chklittleindx") == "Y"){
- if(reckind == "PRCP"){ //의사지시기록조회일경우
- model.makeValue("/root/send/fromdd", model.getValue("/root/tmp/sndprcprec/srchprcpfromdd"));
- model.makeValue("/root/send/todd", model.getValue("/root/tmp/sndprcprec/srchprcptodd"));
- }else if(model.getValue("/root/tmp/chklittleindx") == "Y"){ //서식창 조건조회시
- if(model.getValue("/root/tmp/prcprec/srchkind") != 2){ //서식별 조회시 fromm,todd 불필요-20091216-kys
- model.makeValue("/root/send/fromdd", model.getValue("/root/tmp/prcprec/srchFromdd"));
- model.makeValue("/root/send/todd", model.getValue("/root/tmp/prcprec/srchTodd"));
- }
- if(model.getValue("/root/tmp/prcprec/srchkind") != 1){ //일자별 조회시 srcformcd 불필요-20091216-kys
- model.makeValue("/root/send/srcformcd", grd_littleindx.valueMatrix(grd_littleindx.row, grd_littleindx.colref("srcformcd"))); //소분류조회시 사용한다.-kys
- }
- }
- }
-
- //2009-11-02 오후 2:18:45 강지훈 수정
- model.makeValue("/root/send/bfopentest", bfopentest);
- pathistEmrFlag = grd_pathist.valueMatrix(grd_pathistrow, grd_pathist.colref("emrflag"))
-
-
- if(bfopentest == "Y" && emrflag != "E"){
- model.makeValue("/root/send/midbftest", "Y");
- }
- else{
- model.makeValue("/root/send/midbftest", "N");
- }
-
-
-
-
-
- if (multirecyn == "N")
- {
- if(submit("TRMRI04004"))
- {
-
- var certnodeList = instance1.selectNodes("/root/tmpinicert/iniinfo");
-
- if (certnodeList.length > 1 && certnodeList.length >= nodeposcnt)
- {
- multirecyn = "Y";
-
- if (prevflag == "Y")
- nodeposcnt = certnodeList.length;
- else
- nodeposcnt = 1;
- }
- else
- {
- multirecyn = "N";
- nodeposcnt = 1;
- }
-
- iviewerIemr.window.javascript.cleanViewer();
-
- if (model.getValue("/root/init/recall") == "Y")
- {
- fGetNextEmrImgRec(); //중분류 전체는 기존대로
-
- }
- else
- {
- fGetNextEmrImgRecOne(); //기록조회 결과가 여러개인 경우 한개씩 조회
-
- }
-
- model.setValue("/root/init/recall", "N");
- }
- }
- else
- {
- iviewerIemr.window.javascript.cleanViewer();
- fGetNextEmrImgRecOne(); //기록조회 결과가 여러개인 경우 한개씩 조회
- }
-
- }
- }
- }
- /**
- * @desc : 환자번호 정보조회
- * @id :
- * @event : onkeypress
- * @return : void
- * @authur : 박종훈(튜닝)
- */
- function fPidKeyPress()
- {
- model.removeNodeSet("/root/main/result/inform");
- model.setValue("/root/source/srchcond", "1");
- model.setValue("/root/source/pid", ipt_pid.currentText);
- model.setValue("/root/main/patinfo/patinfolist/pid", ipt_pid.currentText);
- //inputEnterKey("btn_search", "DOMActivate");
- //환자등록번호 체크
- if(ipt_pid.currentText.length >= 1 )
- {
- model.resetInstanceNode("/root/main/result/patinfo");
- model.resetInstanceNode("/root/main/patinfo/patinfolist");
- //model.makeNode("/root/main/result/patinfo");
- if(submit("TRMRC00501"))
- {
- var sBindPid = model.getValue("/root/main/result/inform/item/bindpid");
- if( sBindPid != '-' && sBindPid != '' && sBindPid != ' ' )
- {
- var sPid = model.getValue("/root/main/result/inform/item/pid");
- var sHngnm = model.getValue("/root/main/result/inform/item/hngnm");
-
- var retValue = messageBox(sPid + "(" + sHngnm + ") 환자의 등록번호가 [ " + sBindPid + " ] 로 합번 되었습니다. 합번된 등록번호로 재조회 하시겠습니까?", "Q999", "");
- if( retValue == '6' )
- {
- ipt_pid.currentText = sBindPid;
- model.setValue("/root/source/srchcond", "1");
- model.setValue("/root/source/pid", ipt_pid.currentText);
- model.setValue("/root/main/patinfo/patinfolist/pid", ipt_pid.currentText);
-
- if (submit("TRPMC02500"))
- {
- //fSearch는 인적사항 화면을 임포트 해간 화면에서 구현해 주어야 하는 함수이다.
- if( getNodesetCount("/root/main/result/patinfo/patinfolist") > 0 ){
- model.copyNode("/root/main/patinfo", "/root/main/result/patinfo");
- model.makeValue("/root/main/patinfo/agesex", model.getValue("/root/main/patinfo/patinfolist/sex") + "/" + model.getValue("/root/main/patinfo/patinfolist/age"));
- model.setValue("/root/main/popupendflag", "ok");
- model.refresh();
-
- oprnerId = opener.window.javascript.getScreenID();
- if(oprnerId == "SPMRC03200")
- {
- var keyparam = model.getValue("/root/main/patinfo/patinfolist/pid") + "▦" + model.getValue("/root/main/patinfo/patinfolist/hngnm") + "▦" + model.getValue("/root/main/patinfo/patinfolist/sex") + "▦" + model.getValue("/root/main/patinfo/patinfolist/age") + "▩";
- opener.window.javascript.fEnterPatinfo(keyparam);
- }
- //2009-10-21 오전 11:40:01 강지훈 추가 : 환자의 기록이 북마크에 있을때 탭색 변경
- fChkBookmark();
-
- return true;
- }
- else
- {
- model.resetInstanceNode("/root/main/patinfo/patinfolist");
- messageBox("없는 등록번호 입니다.", "E999", "");
- return false;
- }
- }
- }
- else
- {
-
- var pAge = getFullAge(model.getValue("/root/main/result/inform/item/rrgstno1")+model.getValue("/root/main/result/inform/item/rrgstno2"));
- var pGender = getGender(model.getValue("/root/main/result/inform/item/rrgstno1")+model.getValue("/root/main/result/inform/item/rrgstno2"));
- model.makeValue("/root/main/patinfo/patinfolist/pid", sPid);
- model.makeValue("/root/main/patinfo/agesex", pGender + "/" + pAge);
- model.makeValue("/root/main/patinfo/patinfolist/hngnm", sHngnm);
- model.makeValue("/root/main/patinfo/patinfolist/rrgstno1", model.getValue("/root/main/result/inform/item/rrgstno1"));
- model.makeValue("/root/main/patinfo/patinfolist/rrgstno2", model.getValue("/root/main/result/inform/item/rrgstno2"));
-
- ipt_pid.refresh();
- ipt_hngnm.refresh();
- opt_age.refresh();
- ipt_rrgstno1.refresh();
- ipt_rrgstno2.refresh();
-
- //화면 초기화!!
- //btn_init.dispatch("DOMActivate");
- return true;
- }
- }
- else
- {
- if (submit("TRPMC02500"))
- {
- //fSearch는 인적사항 화면을 임포트 해간 화면에서 구현해 주어야 하는 함수이다.
- if( getNodesetCount("/root/main/result/patinfo/patinfolist") > 0 ){
- model.copyNode("/root/main/patinfo", "/root/main/result/patinfo");
- model.makeValue("/root/main/patinfo/agesex", model.getValue("/root/main/patinfo/patinfolist/sex") + "/" + model.getValue("/root/main/patinfo/patinfolist/age"));
- model.setValue("/root/main/popupendflag", "ok");
- model.refresh();
-
- oprnerId = opener.window.javascript.getScreenID();
- if(oprnerId == "SPMRC03200")
- {
- var keyparam = model.getValue("/root/main/patinfo/patinfolist/pid") + "▦" + model.getValue("/root/main/patinfo/patinfolist/hngnm") + "▦" + model.getValue("/root/main/patinfo/patinfolist/sex") + "▦" + model.getValue("/root/main/patinfo/patinfolist/age") + "▩";
- opener.window.javascript.fEnterPatinfo(keyparam);
- }
-
- //2009-10-21 오전 11:40:01 강지훈 추가 : 환자의 기록이 북마크에 있을때 탭색 변경
- fChkBookmark();
-
- return true;
- }
- else
- {
- model.resetInstanceNode("/root/main/patinfo/patinfolist");
- messageBox("없는 등록번호 입니다.", "E999", "");
- return false;
- }
- }
- }
- }
- }
- else
- {
- messageBox("등록번호를 정확히", "C001");
- return false;
- }
- }
- /**
- * @desc : 환자이름 정보조회
- * @id :
- * @event : onkeypress
- * @return : void
- * @authur : 박종훈
- */
- function fPnmKeyPress()
- {
- model.setValue("/root/source/srchcond", "2");
- model.setValue("/root/source/hngnm", ipt_hngnm.currentText);
- inputEnterKey("btn_search", "DOMActivate");
- }
- /**
- * @desc : 환자주민번호 정보조회
- * @id :
- * @event : onkeypress
- * @return : void
- * @authur : 박종훈
- */
- function fRgstnoKeyPress()
- {
- model.setValue("/root/source/srchcond", "3");
- model.setValue("/root/source/rrgstno1", ipt_rrgstno1.currentText);
- model.setValue("/root/source/rrgstno2", ipt_rrgstno2.value);
-
- model.makeValue("/root/source/autoflag", "Y");
- inputEnterKey("btn_search", "DOMActivate");
- }
- /**
- * @desc : 환자주민번호 뒷자리 정보조회
- * @id :
- * @event : onkeypress
- * @return : void
- * @authur : 강지훈
- */
- function fRgstno2KeyPress(){
-
- if(event.keyCode == "13") {
- model.setValue("/root/source/srchcond", "3");
- model.setValue("/root/source/rrgstno1", ipt_rrgstno1.currentText);
- model.setValue("/root/source/rrgstno2", ipt_rrgstno2.formattedText);
- model.makeValue("/root/source/autoflag", "Y");
- fPopPtinfo();
- }
- }
- /**
- * @desc : 환자정보조회 팝업
- * @id :
- * @event : DOMActivate
- * @return : void
- * @authur : 박종훈
- */
- function fPopPtinfo()
- {
- modal("SPPMC02500", "1","150", "150", "SPPMC02500", "/root/source", "/root/send");
- model.resetInstanceNode("/root/source");
-
- //2009-11-14 오전 11:57:20 강지훈 추가
- model.makeValue("/root/main/patinfo/agesex", model.getValue("/root/main/patinfo/patinfolist/sex") + "/" + model.getValue("/root/main/patinfo/patinfolist/age"));
- opt_age.refresh();
- }
- /**
- * @desc : 화면닫기(처방에서 사용)
- * @id :
- * @event : xforms-select
- * @return : void
- * @authur : 박종훈
- */
- function fClose()
- {
- window.close();
- }
- /* @group : 폴더 존재여부 파악
- * @ver : 2007.01.06
- * @by : 박종훈
- * @-----------------------------------
- * @type : function
- * @access : public
- * @desc :
- */
- function fExistFolder(foldernm)
- {
- var fso, folder, s;
- fso = new ActiveXObject("Scripting.FileSystemObject");
- try
- {
- folder = fso.GetFolder(foldernm);
- s = folder.DateCreated;
- if (s != "")
- {
- fDelFolder(foldernm);
- fMakeFolder(foldernm);
- }
- }
- catch (e)
- {
- fMakeFolder(foldernm);
- }
- }
- /* @group : 폴더 생성
- * @ver : 2007.01.06
- * @by : 박종훈
- * @-----------------------------------
- * @type : function
- * @access : public
- * @desc :
- */
- function fMakeFolder(foldernm)
- {
- var fso = new ActiveXObject("Scripting.FileSystemObject");
- var a = fso.CreateFolder(foldernm);
- }
- /* @group : 폴더 삭제
- * @ver : 2007.01.06
- * @by : 박종훈
- * @-----------------------------------
- * @type : function
- * @access : public
- * @desc :
- */
- function fDelFolder(foldernm)
- {
- var fso;
- fso = new ActiveXObject("Scripting.FileSystemObject");
- fso.DeleteFolder(foldernm);
- }
- /* @group : BIT모듈로부터 키값 받아옴
- * @ver : 2008.01.17
- * @by : 박종훈
- * @-----------------------------------
- * @type : function
- * @access : public
- * @desc :
- */
- function fSetCertRecKey(key)
- {
- setParameter("SPMRI02400_certinfo", key);
- modal("SPMRI02400");
- }
- /**
- * @desc : 사본발행 신청
- * @id :
- * @event : xforms-ready
- * @return : void
- * @authur : 박종훈
- */
- function fAppcopy()
- {
- setParameter("SMMRC03000_pid", ipt_pid.value);
- open("SMMRC03000");
- }
- /**
- * @desc : 질병 및 수술 인덱스 화면 연결
- * @id :
- * @event : DOMActivate
- * @return : void
- * @authur : 박종훈
- */
- function fDiagOprIndxLnk()
- {
- setParameter("SMMRD00400_pid", ipt_pid.value);
- open("SMMRD00700");
- }
- /**
- * @desc : 기록 조회영역 최대 최소화
- * @id :
- * @event : DOMActivate
- * @return : void
- * @authur : 박종훈
- */
- function fMaxMin()
- {
- var leftwidth = grup_left.attribute("width");
-
- if (leftwidth == 0)
- {
- btn_minmax.attribute("class") = "icon_left";
- grup_right.attribute("width") = 906;
- grup_right.attribute("left") = 345;
- grup_left.attribute("width") = 340;
- iviewerIemr.attribute("width") = 902;
- iviewerIemr.window.javascript.setChartViewerSize(parseInt(iviewerIemr.attribute("width")), parseInt(iviewerIemr.attribute("height")));
- btn_minmax.hint = "최대화";
- }
- else
- {
- btn_minmax.attribute("class") = "icon_right";
- grup_left.attribute("width") = 0;
- grup_right.attribute("left") = 0;
- grup_right.attribute("width") = 1251;
- iviewerIemr.attribute("width") = 1247;
- iviewerIemr.window.javascript.setChartViewerSize(parseInt(iviewerIemr.attribute("width")), parseInt(iviewerIemr.attribute("height")));
- btn_minmax.hint = "이전크기로";
- }
- }
- //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- /**
- * @desc : 화면표시 대상이 EMR + IMG 기록인경우 처리
- * @id :
- * @event : onclick
- * @return : void
- * @authur : 박종훈
- */
- function fGetNextEmrImgRec()
- {
- var certnodeList = instance1.selectNodes("/root/tmpinicert/iniinfo");
- var foldernm = "C:\\Certrec";
-
- var recall = model.getValue("/root/init/recall");
-
- if (certnodeList.length <= 0)
- {
- return;
- }
- else if(certnodeList.length > 1)
- {
- model.setValue("/root/init/recall", "N");
- }
-
- var emrpath = "";
- var emrorddate = "";
- var emrformnm = "";
- var emrformcd = "";
- var emrdeptnm = "";
- var emrdeptcd = "";
- var emrpage = "";
- var emrhiddenmsg = "";
- var recrowno = "";
- var k = "";
- var pid = "";
- var ptnm = "";
- var depthngnm = "";
- var deptengabbr = "";
- var rgstno = "";
- var sa = "";
- var disporddd = "";
- var orddd = "";
- var drid = "";
- var roomcd = "";
- var ordtype = "";
- var chosflag = "";
- var orddeptcd = "";
- var signflag = "";
- var imgflag = "";
- var langflag = "";
-
- var tmptreatno = "";
- var tmpiformcd = "";
-
- var signno = 0;
- var formcd = "";
- var srcformcd = "";
- var formnm = "";
- var formprogflag = "";
- var recdt = "";
-
- var recdd = "";
-
- var wardheader = "";
- var dateheader = "";
- var doctorheader = "";
- var printheader = "";
- var pageheader = "";
- var imgepath = "";
- var formrecdt = "";
- var fstrgstdt = "";
- var lastupdtdt = "";
- var staffconfirmdt = "";
- var fstrgstrusrnm = "";
- var lastupdtrusrnm = "";
- var erdt = "";
- var ervisittm = "";
- var staffnmheader = "";
- var staffnm = "";
- var emrrecusrnmheader = "";
- var emrrecusrnm = "";
- var indd = "";
- var dschdd = "";
- var inorddepthngnm = "";
- var dschorddepthngnm = "";
- var incnt = "";
- var mainyn = "";
- var rowno = "";
-
- var prtnunm = getUserInfo("usernm");
- var prtndeptnm = "";
- //var getuseren = getUserInfo("userengnm");
-
- var getdate = getCurrentDate();
- var gettime = getCurrentTime();
-
- var dateprnt = getdate.substr(0, 4) + "/" + getdate.substr(4, 2) + "/" + getdate.substr(6, 2);
- var timeprnt = gettime.substr(0, 2) + ":" + gettime.substr(2, 2) + ":" + gettime.substr(4, 2);
-
- var prtdt = dateprnt + " " + timeprnt;
-
-
-
- fExistFolder(foldernm);
- iviewerIemr.window.javascript.refreshFalse();
- for(var i = 1; i <= certnodeList.length; i++)
- {
- signno = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/signno");
- formcd = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/formcd");
- srcformcd = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/srcformcd");
- formnm = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/formnm");
- formprogflag = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/formprogflag");
- recdt = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/recdt");
- recdd = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/recdd");
- trans = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/trans");
- pid = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/pid");
- ptnm = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/ptnm");
- depthngnm = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/depthngnm");
- deptengabbr = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/deptengabbr");
- rgstno = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/rgstno");
- sa = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/sa");
- disporddd = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/disporddd");
- orddd = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/orddd");
- drid = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/drid");
- roomcd = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/roomcd");
- ordtype = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/ordtype");
- chosflag = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/chosflag");
- orddeptcd = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/orddeptcd");
- signflag = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/signflag");
- imgflag = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/imgflag");
- langflag = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/langflag");
- formrecdt = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/formrecdt");
- formrecdt = formrecdt.toDate().getDateFormat("YYYY/MM/DD");
- fstrgstdt = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/fstrgstdt");
- lastupdtdt = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/lastupdtdt");
- staffconfirmdt = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/staffconfirmdt");
- fstrgstrusrnm = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/fstrgstrusrnm");
- if(fstrgstrusrnm != "")
- fstrgstrusrnm = fstrgstrusrnm + " (" + fstrgstdt + ")";
- lastupdtrusrnm = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/lastupdtrusrnm");
- if(lastupdtrusrnm != "")
- lastupdtrusrnm = lastupdtrusrnm + " (" + lastupdtdt + ")";
- erdt = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/erdt");
- ervisittm = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/ervisittm");
- staffnm = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/staffnm");
- emrrecusrnm = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/emrrecusrnm");
- indd = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/indd");
- dschdd = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/dschdd");
- inorddepthngnm = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/inorddepthngnm");
- dschorddepthngnm = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/dschorddepthngnm");
- mainyn = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/mainyn");
- rowno = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/rowno");
- incnt = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/incnt");
- if(incnt != "")
- incnt += " 회차";
-
-
- var ininfo = indd + " / " + inorddepthngnm;
- if(erdt != "")
- ininfo += " (응급실 내원일 : " + erdt + ")";
- var dschinfo = dschdd + " / " + dschorddepthngnm;
-
-
- var formnmarr = formnm.split("\n");
- var topformnm = "";
- var botformnm = "";
-
- if (formnmarr.length == 1)
- {
- topformnm = formnmarr[0];
- }
- else if (formnmarr.length == 2)
- {
- topformnm = formnmarr[0];
- botformnm = formnmarr[1];
- }
- else
- {
- topformnm = formnm;
- }
-
- //2009-06-02 등록번호 "-" 병원별 제거
- var pidynhcd = model.getValue("/root/init/pidynhcd/hardcd/hardcd");
- if (pidynhcd == "Y")
- {
- for(var k = pid.length; k <= 8; k++)
- {
- if(k < 8){
- pid = "0"+pid;
- }
- }
- var str1 = pid.substr(0, 3);
- var str2 = pid.substr(3, 2);
- var str3 = pid.substr(5, 2);
- var str4 = pid.substr(7, 1);
- var tmppid = str1 + " " + str2 + " " + str3 + "-" + str4;
- }
- else
- {
- tmppid = pid;
- }
-
- if (chosflag == "O" || chosflag == "S")
- {
- wardheader = "진료과 : ";
- }
- else
- {
- wardheader = "병실 : ";
- }
-
- if (langflag == "KO")
- {
- if (chosflag == "O" || chosflag == "S")
- {
- wardheader = "진료과 : ";
- }
- else
- {
- wardheader = "병실 : ";
- }
-
- dateheader = "진료기간 : ";
- doctorheader = "주치의 : ";
- printheader = "출력 : ";
- prtndeptnm = getUserInfo("dutplcenm");
- imgepath = "com/commonweb/images/biglogo" + getUserInfo("dutplceinstcd") + ".jpg"
- pageheader = "페이지 : ";
- }
- else
- {
- if (chosflag == "O" || chosflag == "S")
- {
- wardheader = "Dept : ";
- }
- else
- {
- wardheader = "Room : ";
- }
-
- dateheader = "Date : ";
- doctorheader = "Doctor : ";
- printheader = "Print date : ";
- prtndeptnm = getUserInfo("deptengnm");
- imgepath = "com/commonweb/images/biglogo" + getUserInfo("dutplceinstcd") + "e.jpg"
- if (prtndeptnm == "" || prtndeptnm == null)
- {
- prtndeptnm = getUserInfo("dutplcenm");
- }
- pageheader = "Page : ";
- }
-
- if (imgflag == "N")
- {
- if(trans == "")
- trans = "<html><head><title>출력화면 구현중입니다.</title></head><body>출력화면 구현중입니다.</body></html>";
-
- var ininm = "cmc";
- switch(srcformcd)
- {
- case "0000000001"://외래초진
- case "0000000002"://외래재진
- case "0000000004"://입원경과
- case "0000003325"://DSC기록
- ininm += "_0000000001.ini";
- break;
- case "0000000003"://입원초진
- ininm += "_0000000003.ini";
- break;
- case "0000000676"://수술기록
- staffnmheader = "◈ Surgeon :";
- if(staffnm != "")
- staffnm += "(" + staffconfirmdt + ")";
- emrrecusrnmheader = "";
- ininm += "_0000000676.ini";
- break;
- case "0000003169"://Brief OP Note
- ininm += "_0000000676.ini";
- break;
- case "0000000680"://입퇴원요약
- staffnmheader = "◈ Staff작성 및 확인 :";
- if(staffnm != "")
- staffnm += "(" + staffconfirmdt + ")";
- emrrecusrnmheader = "◈ 의무기록사 :";
- ininm += "_0000000680.ini";
- break;
- case "0000000679"://응급실기록
- ininm += "_0000000679.ini";
- break;
- default:
- //ininm += "_0000000001.ini";
- if(formprogflag == "-" || formprogflag == "MAIN" || mainyn == "Y")
- ininm += "_0000000001.ini";
- else
- ininm += ".ini";
- break;
- }
-
- trans = "<!--% \n %BASE " + getDomain() + "/himed/webapps/ \n %INCLUDE emr/recmngtweb/xrw/" + ininm + " \n VAR_PAT_NUM = " + tmppid + " \n VAR_CLASS = " + ordtype + " \n VAR_CHART_NAME_TOP = " + topformnm + " \n VAR_CHART_NAME_BOTTOM = " + botformnm + " \n VAR_CHART_NAME_LINE = " + formnm + " \n VAR_PAT_AGE_SEX = " + sa + " \n VAR_TREAT_DEPT = " + deptengabbr + " \n VAR_PAT_JUMIN_NO = " + rgstno + " \n VAR_PAT_NAME = " + ptnm + " \n VAR_PRINT_NAME = " + prtnunm + " \n VAR_PRINT_DEPT = " + prtndeptnm + " \n VAR_WARD_HEAD = " + wardheader + roomcd + " \n VAR_DATE_HEADER = " + dateheader + disporddd + " \n VAR_DOCTOR_HEADER = " + doctorheader + drid + " \n VAR_PRINT_HEADER = " + printheader + prtdt + " \n SYS_PAGE_HEADER = " + pageheader + " \n VAR_HOSP_IMG = " + imgepath + " \n VAR_ORDDATE = " + formrecdt + " \n VAR_ORDDEPT = " + depthngnm + " \n VAR_FSTRGSTRUSRNM = " + fstrgstrusrnm + " \n VAR_LASTUPDTRUSRNM = " + lastupdtrusrnm + " \n VAR_ERDT = " + erdt + " \n VAR_ERVISITTM = " + ervisittm + " \n VAR_STAFFNM_HEADER = " + staffnmheader + " \n VAR_STAFFNM = " + staffnm + " \n VAR_EMRRECUSRNM_HEADER = " + emrrecusrnmheader + " \n VAR_EMRRECUSRNM = " + emrrecusrnm + " \n VAR_ININFO = " + ininfo + " \n VAR_DSCHINFO = " + dschinfo + " \n VAR_INCNT = " + incnt + " \n VAR_INORDDEPTHNGNM = " + inorddepthngnm + "\n %-->\n" + trans;
-
- var fso = new ActiveXObject("Scripting.FileSystemObject");
- var a = fso.CreateTextFile(foldernm + "\\" + signno + "_" + formcd + ".HTML", true, true);
- a.WriteLine(trans);
- //a.Write(trans);
- a.Close();
- emrpath = foldernm + "\\" + signno + "_" + formcd + ".HTML|";
- //emrorddate += orddd + "|";
- emrorddate = recdd + "|"; //기록일을 보여달라는 의료정보팀 요청
- emrformnm = formnm + "|";
- emrformcd = formcd + "|";
- emrdeptnm = deptengabbr + "|";
- emrdeptcd = orddeptcd + "|";
- emrpage = "1|";
- emrhiddenmsg = formcd + "▦" + signno + "▦" + formnm + "▦" + chosflag + "▦" +pid + "▦" + ptnm + "▦" + deptengabbr
- + "▦" + sa + "▦" + rgstno + "▦" + disporddd + "▦" + drid + "▦" + roomcd + "▦" + disporddd + "▦" + ordtype + "▦" + "E|";
- recrowno = rowno;
-
- //영상-EMR구분|파일경로|입원일|서식지코드|서식지이름|진료과코드|진료과이름
- var chartinfo = "";
- chartinfo = "E|" + emrpath + emrorddate + emrformcd + emrformnm + emrdeptcd + emrdeptnm;
-
- model.makeValue("/root/send/iemr/treatno", "");
- model.makeValue("/root/send/iemr/docucd", "");
-
- var iemrNode = instance1.selectSingleNode("/root/imgrec/iemr");
- iviewerIemr.window.javascript.appendChart(iemrNode, chartinfo, emrhiddenmsg, recrowno);
- //iviewerIemr.window.javascript.appendChart(iemrNode, chartinfo, emrhiddenmsg);
- }
- else
- {
- tmptreatno = signno + ",";
- tmpiformcd = formcd + ",";
- emrpath = "*|";
- emrorddate = "*|";
- emrformnm = "*|";
- emrformcd = "*|";
- emrdeptnm = "*|";
- emrdeptcd = "*|";
- emrpage = "*|";
- emrhiddenmsg = "*|";
- recrowno = rowno;
-
- model.makeValue("/root/imgrec/iemr/treatno", signno);
- model.makeValue("/root/imgrec/iemr/docucd", formcd);
-
- var iemrNode = instance1.selectSingleNode("/root/imgrec/iemr");
- var chartinfo;
- chartinfo = "I";
- var hiddenmsg;
- hiddenmsg = "I";
-
- iviewerIemr.window.javascript.appendChart(iemrNode, chartinfo, hiddenmsg, recrowno);
- //iviewerIemr.window.javascript.appendChart(iemrNode, chartinfo, hiddenmsg);
- }
-
- }
-
- iviewerIemr.window.javascript.refreshTrue();
- }
- /**
- * @desc : 미비확인 화면 오픈
- * @id :
- * @event : DOMActivate
- * @return : void
- * @authur : 박종훈
- */
- function fOpenUnprep()
- {
- var pid = model.getValue("/root/main/patinfo/patinfolist/pid");
- var orddd = grd_pathist.valueMatrix(grd_pathist.row, grd_pathist.colref("orddd"));
- var cretno = grd_pathist.valueMatrix(grd_pathist.row, grd_pathist.colref("cretno"));
-
- setParameter("SPMRI03000_pid", pid);
- setParameter("SPMRI03000_indd", orddd);
- setParameter("SPMRI03000_cretno", cretno);
-
- var wndobj = getOpenWindow("SPMRI03000");
-
- if(wndobj != null)
- {
- wndobj.window.javascript.fInitialize_SPMRI03000();
- activateChild("SPMRI03000");
- }
- else
- {
- open("SPMRI03000");
- }
- }
- /**
- * @desc : 출력버튼 클릭
- * @id :
- * @event : DOMActivate
- * @return : void
- * @authur : 박종훈
- */
- function fClickPrint()
- {
- var orddd = grd_pathist.valueMatrix(grd_pathist.row, grd_pathist.colref("orddd"));
- var cretno = grd_pathist.valueMatrix(grd_pathist.row, grd_pathist.colref("cretno"));
- var orddeptcd = grd_pathist.valueMatrix(grd_pathist.row, grd_pathist.colref("orddeptcd"));
-
- var comporddd = model.getValue("/root/init/prtresn/orddd");
- var compcretno = model.getValue("/root/init/prtresn/cretno");
-
- var itrgtNodeCnt = getNodesetCnt(model, "/root/hardcd/trgtdept[trgtcd = '" + orddeptcd + "']"); //사유대상부서
-
- if (itrgtNodeCnt > 0) //감염내과, 정신과, 산부인과, 비뇨기과
- {
- var sUserDeptcd = getUserInfo("dutplcecd");
-
- var iexNodeCnt = getNodesetCnt(model, "/root/hardcd/exdept[trgtcd = '" + sUserDeptcd + "']"); //사유제외부서
-
- if ((iexNodeCnt <= 0) && (sUserDeptcd != orddeptcd) && (comporddd != orddd && compcretno != cretno)) //사용자 근무부서와 환자 수진부서가 틀린경우 사유창 팝업, 근무부서가 의료정보팀일경우 제외
- {
- model.resetInstanceNode("/root/init/prtresn");
- setParameter("SPMRI03100_param_nodepath", "/root/init/prtresn");
- setParameter("SPMRI03100_param_rsnflag", 'P');
- modal("SPMRI03100");
-
- var valiyn = model.getValue("/root/init/prtresn/valiyn");
-
- if (valiyn != "Y")
- {
- return;
- }
- else
- {
-
- }
- }
-
- model.makeValue("/root/init/prtresn/orddd", orddd);
- model.makeValue("/root/init/prtresn/cretno", cretno);
- }
- else
- {
- model.resetInstanceNode("/root/init/prtresn");
- }
-
- var appcopykey = iviewerIemr.window.javascript.setCopy(true); //영상뷰어에서의 리턴값
-
- if (appcopykey != "")
- {
- var copykey = appcopykey.split("|");
- var appkeyArr = copykey[0].split("▦");
- var reckind = ""; //기록, 영상구분(E/I)
-
- var tmpval = "";
- var tmpformcd = "";
- var tmptotpage = "";
- appkeyArr = "";
- var copyparam = "";
- var compsignno = "";
- var compformcd = "";
- var tmpreckind = "";
-
- var tmpdeptcd = getUserInfo("dutplcecd");
- var tmppid = model.getValue("/root/main/patinfo/patinfolist/pid")
- var tmporddd = grd_pathist.valueMatrix(grd_pathist.row, grd_pathist.colref("orddd"));
- var tmpcretno = grd_pathist.valueMatrix(grd_pathist.row, grd_pathist.colref("cretno"));
- var tmpchosflag = grd_pathist.valueMatrix(grd_pathist.row, grd_pathist.colref("ordtype"));
-
- model.removeNodeSet("/root/prthist");
- model.makeNode("/root/prthist");
- var leng = 1;
-
- for(var i = 0; i < copykey.length; i = i + 2)
- {
- appkeyArr = copykey[i].split("▦");
- reckind = appkeyArr[0];
-
- if (reckind == "I")
- {
- tmpval = appkeyArr[1];
- tmpformcd = appkeyArr[2];
- tmpreckind = "02";
-
- if (compsignno != tmpval || compformcd != tmpformcd)
- {
- compsignno = tmpval;
- compformcd = tmpformcd;
- }
- else
- {
- continue;
- }
- }
- else
- {
- tmpval = appkeyArr[1];
- tmpformcd = appkeyArr[0];
- tmpreckind = "01";
-
- if (compsignno != tmpval)
- {
- compsignno = tmpval;
- }
- else
- {
- continue;
- }
- }
-
- if (tmpcretno == "")
- tmpcretno = 0;
-
- model.makeValue("/root/prthist[" + leng + "]/pid", tmppid);
- model.makeValue("/root/prthist[" + leng + "]/orddd", tmporddd);
- model.makeValue("/root/prthist[" + leng + "]/cretno", tmpcretno);
- model.makeValue("/root/prthist[" + leng + "]/chosflag", tmpchosflag);
- model.makeValue("/root/prthist[" + leng + "]/signno", tmpval);
- model.makeValue("/root/prthist[" + leng + "]/formcd", tmpformcd);
- model.makeValue("/root/prthist[" + leng + "]/reckind", tmpreckind);
- model.makeValue("/root/prthist[" + leng + "]/userdeptcd", tmpdeptcd);
- model.makeValue("/root/prthist[" + leng + "]/readprtflag", "P");
- model.makeValue("/root/prthist[" + leng + "]/refusge", model.getValue("/root/init/prtresn/resncd"));
- model.makeValue("/root/prthist[" + leng + "]/refremark", model.getValue("/root/init/prtresn/etc"));
-
- leng++;
- }
-
- datagrid1.rebuild();
-
- for(var j = 1; j < datagrid1.rows; j++)
- {
- datagrid1.rowstatus(j) = 1;
- }
-
- model.removeNodeset("/root/send");
- model.makeValue("/root/send/prtlist", datagrid1.getUpdateData());
- submit("TXMRI04001");
-
- if(iviewerIemr.window.javaScript.printChart("SMMRC03000"))
- {
- messageBox("출력", "I001");
- }
- else
- {
- messageBox("출력에", "E009");
- }
-
- model.removeNodeSet("/root/prthist");
- model.makeNode("/root/prthist");
- datagrid1.refresh();
- }
- }
- /**
- * @desc : 중분류 그리드 메뉴
- * @id :
- * @event : DOMActivate
- * @return : void
- * @authur : 박종훈
- */
- function fMidindxMouseRight()
- {
- if(grd_midindx.isCell(event.target) && (grd_midindx.mouserow >= grd_midindx.fixedrows))
- {
- setPopupMenu("grd_midindx", false, "/root/midmsrght/mouserght", "label", "func");
- }
- }
- /**
- * @desc : 분류출력 클릭
- * @id :
- * @event : DOMActivate
- * @return : void
- * @authur : 박종훈
- */
- function fMidPrint()
- {
- model.setValue("/root/init/recall", "Y");
- iviewerIemrprt.window.javascript.setupChart("ThumbView");
-
- fGetDetlRecForPrt();
-
- var appcopykey = iviewerIemrprt.window.javascript.setCopy(true); //영상뷰어에서의 리턴값
-
- if (appcopykey != "")
- {
- var copykey = appcopykey.split("|");
- var appkeyArr = copykey[0].split("▦");
- var reckind = ""; //기록, 영상구분(E/I)
-
- var tmpval = "";
- var tmpformcd = "";
- var tmptotpage = "";
- appkeyArr = "";
- var copyparam = "";
- var compsignno = "";
- var compformcd = "";
- var tmpreckind = "";
-
- var tmpdeptcd = getUserInfo("dutplcecd");
- var tmppid = model.getValue("/root/main/patinfo/patinfolist/pid")
- var tmporddd = grd_pathist.valueMatrix(grd_pathist.row, grd_pathist.colref("orddd"));
- var tmpcretno = grd_pathist.valueMatrix(grd_pathist.row, grd_pathist.colref("cretno"));
- var tmpchosflag = grd_pathist.valueMatrix(grd_pathist.row, grd_pathist.colref("ordtype"));
-
- model.removeNodeSet("/root/prthist");
- model.makeNode("/root/prthist");
- var leng = 1;
- for(var i = 0; i < copykey.length; i = i + 2)
- {
- appkeyArr = copykey[i].split("▦");
- reckind = appkeyArr[0];
-
- if (reckind == "I")
- {
- tmpval = appkeyArr[1];
- tmpformcd = appkeyArr[2];
- tmpreckind = "02";
-
- if (compsignno != tmpval || compformcd != tmpformcd)
- {
- compsignno = tmpval;
- compformcd = tmpformcd;
- }
- else
- {
- continue;
- }
- }
- else
- {
- tmpval = appkeyArr[1];
- tmpformcd = appkeyArr[0];
- tmpreckind = "01";
-
- if (compsignno != tmpval)
- {
- compsignno = tmpval;
- }
- else
- {
- continue;
- }
- }
-
- if (tmpcretno == "")
- tmpcretno = 0;
-
- model.makeValue("/root/prthist[" + leng+ "]/pid", tmppid);
- model.makeValue("/root/prthist[" + leng + "]/orddd", tmporddd);
- model.makeValue("/root/prthist[" + leng + "]/cretno", tmpcretno);
- model.makeValue("/root/prthist[" + leng + "]/chosflag", tmpchosflag);
- model.makeValue("/root/prthist[" + leng + "]/signno", tmpval);
- model.makeValue("/root/prthist[" + leng + "]/formcd", tmpformcd);
- model.makeValue("/root/prthist[" + leng + "]/reckind", tmpreckind);
- model.makeValue("/root/prthist[" + leng + "]/userdeptcd", tmpdeptcd);
- model.makeValue("/root/prthist[" + leng + "]/readprtflag", "P");
- model.makeValue("/root/prthist[" + leng + "]/refusge", "");
- model.makeValue("/root/prthist[" + leng + "]/refremark", "");
- leng++;
- }
-
- datagrid1.rebuild();
-
- for(var j = 1; j < datagrid1.rows; j++)
- {
- datagrid1.rowstatus(j) = 1;
- }
-
- model.removeNodeset("/root/send");
- model.makeValue("/root/send/prtlist", datagrid1.getUpdateData());
- submit("TXMRI04001");
-
- if(iviewerIemr.window.javaScript.printChart("SMMRC03000"))
- {
- messageBox("출력", "I001");
-
- }
- else
- {
- messageBox("출력에", "E009");
- }
-
- model.removeNodeSet("/root/prthist");
- model.makeNode("/root/prthist");
- datagrid1.refresh();
- }
- }
- /**
- * @desc : 기록조회
- * @id :
- * @event : DOMActivate
- * @return : void
- * @authur : 박종훈
- */
- function fGetDetlRecForPrt()
- {
- var reccurpos = parseInt(model.getValue("/root/init/reccurpos"));
- var rowfocus = "";
- var midreccurpos = 1;
- var midpos = 0; //중분류중 몇번째 기록계산
-
- var emrflag = model.getValue("/root/init/emrflag");
- //2009-11-02 오후 4:44:56 강지훈 수정
- var reckind = grd_midindx.valueMatrix(grd_midindx.row, grd_midindx.colref("reckind"));
-
- if (emrflag == "I" && (reckind != "EMR" && reckind != "CDIS"))
- {
- var totcnt = "[ " + 1 + " / " + grd_midindx.valueMatrix(grd_midindx.row, grd_midindx.colref("cnt")) + " / " + model.getValue("/root/init/reccnt") + " ]";
- model.setValue("/root/init/totcnt", totcnt);
- lbl_totcnt.refresh();
-
- var treatno = grd_midindx.valueMatrix(grd_midindx.row, grd_midindx.colref("itemindxseq"));
- var formcd = grd_midindx.valueMatrix(grd_midindx.row, grd_midindx.colref("supitemindxseq"));
-
- iviewerIemrprt.window.javascript.cleanViewer();
- iviewerIemrprt.window.javascript.refreshFalse();
-
- model.makeValue("/root/imgrec/iemr/treatno", parseInt(treatno));
- model.makeValue("/root/imgrec/iemr/docucd", formcd);
-
- var iemrNode = instance1.selectSingleNode("/root/imgrec/iemr");
-
- var chartinfo;
- chartinfo = "I";
- var hiddenmsg;
- hiddenmsg = "I";
-
- iviewerIemrprt.window.javascript.appendChart(iemrNode, chartinfo, hiddenmsg);
- iviewerIemrprt.window.javascript.refreshTrue();
- }
- else
- {
-
- for (var i = 1; i <= grd_midindx.rows; i++)
- {
- midcnt = grd_midindx.valueMatrix(i, grd_midindx.colref("cnt"));
- midreccurpos += parseInt(midcnt);
-
- if (midreccurpos > reccurpos)
- {
- //grd_midindx.row = i;
- break;
- }
- }
-
- var reckind = grd_midindx.valueMatrix(grd_midindx.row, grd_midindx.colref("reckind"));
- var calcReccurpos = parseInt(model.getValue("/root/init/reccurpos"));
- var bfopentest = model.getValue("/root/init/bfopentest");
- var isLis = "";
-
-
-
- for (var j = 1; j < grd_midindx.row; j++)
- {
- isLis = grd_midindx.valueMatrix(j, grd_midindx.colref("reckind"));
-
- if (isLis == "LIS")
- {
- calcReccurpos -= 1;
- }
- }
-
- model.removeNodeset("/root/send");
- model.makeValue("/root/send/pid", model.getValue("/root/main/patinfo/patinfolist/pid"));
- model.makeValue("/root/send/orddd", grd_pathist.valueMatrix(grd_pathist.row, grd_pathist.colref("orddd")));
- model.makeValue("/root/send/cretno", grd_pathist.valueMatrix(grd_pathist.row, grd_pathist.colref("cretno")));
- model.makeValue("/root/send/chosflag", grd_pathist.valueMatrix(grd_pathist.row, grd_pathist.colref("ordtype")));
- model.makeValue("/root/send/orddeptcd", grd_pathist.valueMatrix(grd_pathist.row, grd_pathist.colref("orddeptcd")));
- model.makeValue("/root/send/tabflag", model.getValue("/root/init/tabflag"));
- model.makeValue("/root/send/reccurpos", calcReccurpos);
- model.makeValue("/root/send/recall", model.getValue("/root/init/recall"));
- model.makeValue("/root/send/reckind", reckind);
- model.makeValue("/root/send/itemindxseq", grd_midindx.valueMatrix(grd_midindx.row, grd_midindx.colref("itemindxseq")));
- model.makeValue("/root/send/lisflag", grd_midindx.valueMatrix(grd_midindx.row, grd_midindx.colref("lisflag")));
-
- //2009-11-02 오후 2:18:45 강지훈 수정
- model.makeValue("/root/send/bfopentest", bfopentest);
- grd_pathistrow = grd_pathist.row;
- pathistEmrFlag = grd_pathist.valueMatrix(grd_pathistrow, grd_pathist.colref("emrflag"))
-
-
- if(bfopentest == "Y" && emrflag != "E"){
- model.makeValue("/root/send/midbftest", "Y");
- }
- else{
- model.makeValue("/root/send/midbftest", "N");
- }
-
- if(submit("TRMRI04004"))
- {
- iviewerIemrprt.window.javascript.cleanViewer();
- fGetNextEmrImgRecPrt();
- }
-
- if (grd_midindx.row > 1)
- {
- var prevmidcnt = grd_midindx.valueMatrix(grd_midindx.row, grd_midindx.colref("cnt"));
- midpos = reccurpos - midreccurpos + parseInt(prevmidcnt) + 1;
- }
- else
- {
- midpos = reccurpos;
- }
-
- var totcnt = "[ " + midpos + " / " + grd_midindx.valueMatrix(grd_midindx.row, grd_midindx.colref("cnt")) + " / " + model.getValue("/root/init/reccnt") + " ]";
- model.setValue("/root/init/totcnt", totcnt);
- lbl_totcnt.refresh();
- }
- }
- function fGetNextEmrImgRecPrt()
- {
- var certnodeList = instance1.selectNodes("/root/tmpinicert/iniinfo");
- var foldernm = "C:\\Certrec";
-
- if (certnodeList.length <= 0)
- return;
-
- var emrpath = "";
- var emrorddate = "";
- var emrformnm = "";
- var emrformcd = "";
- var emrdeptnm = "";
- var emrdeptcd = "";
- var emrpage = "";
- var emrhiddenmsg = "";
- var k = "";
- var pid = "";
- var ptnm = "";
- var depthngnm = "";
- var deptengabbr = "";
- var rgstno = "";
- var sa = "";
- var disporddd = "";
- var orddd = "";
- var drid = "";
- var roomcd = "";
- var ordtype = "";
- var chosflag = "";
- var orddeptcd = "";
- var signflag = "";
- var imgflag = "";
- var langflag = "";
-
- var tmptreatno = "";
- var tmpiformcd = "";
-
- var signno = 0;
- var formcd = "";
- var srcformcd = "";
- var formnm = "";
- var formprogflag = "";
- var recdt = "";
-
- var recdd = "";
-
- var wardheader = "";
- var dateheader = "";
- var doctorheader = "";
- var printheader = "";
- var pageheader = "";
- var imgepath = "";
- var formrecdt = "";
- var fstrgstdt = "";
- var lastupdtdt = "";
- var staffconfirmdt = "";
- var fstrgstrusrnm = "";
- var lastupdtrusrnm = "";
- var erdt = "";
- var ervisittm = "";
- var staffnmheader = "";
- var staffnm = "";
- var emrrecusrnmheader = "";
- var emrrecusrnm = "";
- var indd = "";
- var dschdd = "";
- var inorddepthngnm = "";
- var dschorddepthngnm = "";
- var incnt = "";
- var mainyn = "";
-
- var prtnunm = getUserInfo("usernm");
- var prtndeptnm = "";
- //var getuseren = getUserInfo("userengnm");
-
- var getdate = getCurrentDate();
- var gettime = getCurrentTime();
-
- var dateprnt = getdate.substr(0, 4) + "/" + getdate.substr(4, 2) + "/" + getdate.substr(6, 2);
- var timeprnt = gettime.substr(0, 2) + ":" + gettime.substr(2, 2) + ":" + gettime.substr(4, 2);
-
- var prtdt = dateprnt + " " + timeprnt;
-
- fExistFolder(foldernm);
- iviewerIemrprt.window.javascript.refreshFalse();
- for(var i = 1; i <= certnodeList.length; i++)
- {
- signno = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/signno");
- formcd = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/formcd");
- srcformcd = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/srcformcd");
- formnm = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/formnm");
- formprogflag = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/formprogflag");
- recdt = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/recdt");
- recdd = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/recdd");
- trans = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/trans");
- pid = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/pid");
- ptnm = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/ptnm");
- depthngnm = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/depthngnm");
- deptengabbr = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/deptengabbr");
- rgstno = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/rgstno");
- sa = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/sa");
- disporddd = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/disporddd");
- orddd = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/orddd");
- drid = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/drid");
- roomcd = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/roomcd");
- ordtype = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/ordtype");
- chosflag = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/chosflag");
- orddeptcd = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/orddeptcd");
- signflag = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/signflag");
- imgflag = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/imgflag");
- langflag = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/langflag");
- formrecdt = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/formrecdt");
- formrecdt = formrecdt.toDate().getDateFormat("YYYY/MM/DD");
- fstrgstdt = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/fstrgstdt");
- lastupdtdt = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/lastupdtdt");
- staffconfirmdt = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/staffconfirmdt");
- fstrgstrusrnm = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/fstrgstrusrnm");
- if(fstrgstrusrnm != "")
- fstrgstrusrnm = fstrgstrusrnm + " (" + fstrgstdt + ")";
- lastupdtrusrnm = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/lastupdtrusrnm");
- if(lastupdtrusrnm != "")
- lastupdtrusrnm = lastupdtrusrnm + " (" + lastupdtdt + ")";
- erdt = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/erdt");
- ervisittm = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/ervisittm");
- staffnm = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/staffnm");
- emrrecusrnm = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/emrrecusrnm");
- indd = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/indd");
- dschdd = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/dschdd");
- inorddepthngnm = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/inorddepthngnm");
- dschorddepthngnm = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/dschorddepthngnm");
- mainyn = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/mainyn");
- incnt = model.getValue("/root/tmpinicert/iniinfo[" + i + "]/incnt");
- if(incnt != "")
- incnt += " 회차";
-
-
- var ininfo = indd + " / " + inorddepthngnm;
- if(erdt != "")
- ininfo += " (응급실 내원일 : " + erdt + ")";
- var dschinfo = dschdd + " / " + dschorddepthngnm;
-
-
- var formnmarr = formnm.split("\n");
- var topformnm = "";
- var botformnm = "";
-
- if (formnmarr.length == 1)
- {
- topformnm = formnmarr[0];
- }
- else if (formnmarr.length == 2)
- {
- topformnm = formnmarr[0];
- botformnm = formnmarr[1];
- }
- else
- {
- topformnm = formnm;
- }
-
- //2009-06-02 등록번호 "-" 병원별 제거
- var pidynhcd = model.getValue("/root/init/pidynhcd/hardcd/hardcd");
- if (pidynhcd == "Y")
- {
- for(var k = pid.length; k <= 8; k++)
- {
- if(k < 8){
- pid = "0"+pid;
- }
- }
- var str1 = pid.substr(0, 3);
- var str2 = pid.substr(3, 2);
- var str3 = pid.substr(5, 2);
- var str4 = pid.substr(7, 1);
- var tmppid = str1 + " " + str2 + " " + str3 + "-" + str4;
- }
- else
- {
- tmppid = pid;
- }
-
- if (chosflag == "O" || chosflag == "S")
- {
- wardheader = "진료과 : ";
- }
- else
- {
- wardheader = "병실 : ";
- }
-
- if (langflag == "KO")
- {
- if (chosflag == "O" || chosflag == "S")
- {
- wardheader = "진료과 : ";
- }
- else
- {
- wardheader = "병실 : ";
- }
-
- dateheader = "진료기간 : ";
- doctorheader = "주치의 : ";
- printheader = "출력 : ";
- prtndeptnm = getUserInfo("dutplcenm");
- imgepath = "com/commonweb/images/biglogo" + getUserInfo("dutplceinstcd") + ".jpg"
- pageheader = "페이지 : ";
- }
- else
- {
- if (chosflag == "O" || chosflag == "S")
- {
- wardheader = "Dept : ";
- }
- else
- {
- wardheader = "Room : ";
- }
-
- dateheader = "Date : ";
- doctorheader = "Doctor : ";
- printheader = "Print date : ";
- prtndeptnm = getUserInfo("deptengnm");
- imgepath = "com/commonweb/images/biglogo" + getUserInfo("dutplceinstcd") + "e.jpg"
- if (prtndeptnm == "" || prtndeptnm == null)
- {
- prtndeptnm = getUserInfo("dutplcenm");
- }
- pageheader = "Page : ";
- }
-
- if (imgflag == "N")
- {
- if(trans == "")
- trans = "<html><head><title>출력화면 구현중입니다.</title></head><body>출력화면 구현중입니다.</body></html>";
-
- var ininm = "cmc";
- switch(srcformcd)
- {
- case "0000000001"://외래초진
- case "0000000002"://외래재진
- case "0000000004"://입원경과
- case "0000003325"://DSC기록
- ininm += "_0000000001.ini";
- break;
- case "0000000003"://입원초진
- ininm += "_0000000003.ini";
- break;
- case "0000000676"://수술기록
- staffnmheader = "◈ Surgeon :";
- if(staffnm != "")
- staffnm += "(" + staffconfirmdt + ")";
- emrrecusrnmheader = "";
- ininm += "_0000000676.ini";
- break;
- case "0000003169"://Brief OP Note
- ininm += "_0000000676.ini";
- break;
- case "0000000680"://입퇴원요약
- staffnmheader = "◈ Staff작성 및 확인 :";
- if(staffnm != "")
- staffnm += "(" + staffconfirmdt + ")";
- emrrecusrnmheader = "◈ 의무기록사 :";
- ininm += "_0000000680.ini";
- break;
- case "0000000679"://응급실기록
- ininm += "_0000000679.ini";
- break;
- default:
- //ininm += "_0000000001.ini";
- if(formprogflag == "-" || formprogflag == "MAIN" || mainyn == "Y")
- ininm += "_0000000001.ini";
- else
- ininm += ".ini";
- break;
- }
-
- trans = "<!--% \n %BASE " + getDomain() + "/himed/webapps/ \n %INCLUDE emr/recmngtweb/xrw/" + ininm + " \n VAR_PAT_NUM = " + tmppid + " \n VAR_CLASS = " + ordtype + " \n VAR_CHART_NAME_TOP = " + topformnm + " \n VAR_CHART_NAME_BOTTOM = " + botformnm + " \n VAR_CHART_NAME_LINE = " + formnm + " \n VAR_PAT_AGE_SEX = " + sa + " \n VAR_TREAT_DEPT = " + deptengabbr + " \n VAR_PAT_JUMIN_NO = " + rgstno + " \n VAR_PAT_NAME = " + ptnm + " \n VAR_PRINT_NAME = " + prtnunm + " \n VAR_PRINT_DEPT = " + prtndeptnm + " \n VAR_WARD_HEAD = " + wardheader + roomcd + " \n VAR_DATE_HEADER = " + dateheader + disporddd + " \n VAR_DOCTOR_HEADER = " + doctorheader + drid + " \n VAR_PRINT_HEADER = " + printheader + prtdt + " \n SYS_PAGE_HEADER = " + pageheader + " \n VAR_HOSP_IMG = " + imgepath + " \n VAR_ORDDATE = " + formrecdt + " \n VAR_ORDDEPT = " + depthngnm + " \n VAR_FSTRGSTRUSRNM = " + fstrgstrusrnm + " \n VAR_LASTUPDTRUSRNM = " + lastupdtrusrnm + " \n VAR_ERDT = " + erdt + " \n VAR_ERVISITTM = " + ervisittm + " \n VAR_STAFFNM_HEADER = " + staffnmheader + " \n VAR_STAFFNM = " + staffnm + " \n VAR_EMRRECUSRNM_HEADER = " + emrrecusrnmheader + " \n VAR_EMRRECUSRNM = " + emrrecusrnm + " \n VAR_ININFO = " + ininfo + " \n VAR_DSCHINFO = " + dschinfo + " \n VAR_INCNT = " + incnt + " \n VAR_INORDDEPTHNGNM = " + inorddepthngnm + "\n %-->\n" + trans;
-
- var fso = new ActiveXObject("Scripting.FileSystemObject");
- var a = fso.CreateTextFile(foldernm + "\\" + signno + "_" + formcd + ".HTML", true, true);
- a.WriteLine(trans);
- //a.Write(trans);
- a.Close();
- emrpath += foldernm + "\\" + signno + "_" + formcd + ".HTML|";
- //emrorddate += orddd + "|";
- emrorddate += recdd + "|"; //기록일을 보여달라는 의료정보팀 요청
- emrformnm += formnm + "|";
- emrformcd += formcd + "|";
- emrdeptnm += deptengabbr + "|";
- emrdeptcd += orddeptcd + "|";
- emrpage += "1|";
- emrhiddenmsg += formcd + "▦" + signno + "▦" + formnm + "▦" + chosflag + "▦" +pid + "▦" + ptnm + "▦" + deptengabbr
- + "▦" + sa + "▦" + rgstno + "▦" + disporddd + "▦" + drid + "▦" + roomcd + "▦" + disporddd + "▦" + ordtype + "▦" + "E|";
- //영상-EMR구분|파일경로|입원일|서식지코드|서식지이름|진료과코드|진료과이름
-
- var chartinfo = "E|" + emrpath + emrorddate + emrformcd + emrformnm + emrdeptcd + emrdeptnm;
-
- model.makeValue("/root/send/iemr/treatno", "");
- model.makeValue("/root/send/iemr/docucd", "");
-
- var iemrNode = instance1.selectSingleNode("/root/imgrec/iemr");
- iviewerIemrprt.window.javascript.appendChart(iemrNode, chartinfo, emrhiddenmsg);
- }
- else
- {
- tmptreatno += signno + ",";
- tmpiformcd += formcd + ",";
- emrpath += "*|";
- emrorddate += "*|";
- emrformnm += "*|";
- emrformcd += "*|";
- emrdeptnm += "*|";
- emrdeptcd += "*|";
- emrpage += "*|";
- emrhiddenmsg += "*|";
-
-
- model.makeValue("/root/imgrec/iemr/treatno", signno);
- model.makeValue("/root/imgrec/iemr/docucd", formcd);
-
- var iemrNode = instance1.selectSingleNode("/root/imgrec/iemr");
- var chartinfo;
- chartinfo = "I";
- var hiddenmsg;
- hiddenmsg = "I";
-
- iviewerIemrprt.window.javascript.appendChart(iemrNode, chartinfo, hiddenmsg);
- }
-
- }
-
- iviewerIemrprt.window.javascript.refreshTrue();
- }
- /**
- * @desc : 연속보기 더블클릭시 기록 rowno 리턴 인터페이스
- * @id :
- * @event : DOMActivate
- * @return : void
- * @authur : 박종훈
- */
- function fReturnRecRowno(rowno)
- {
- if (rowno != null && rowno != "" && rowno > 0)
- {
- model.setValue("/root/init/reccurpos", parseInt(rowno));
- }
-
- model.refresh(); //pjh
- }
- /**
- * @desc : 화면표시 대상이 EMR + IMG 기록인경우 처리
- * @id :
- * @event : onclick
- * @return : void
- * @authur : 박종훈
- */
- function fGetNextEmrImgRecOne()
- {
- var certnodeList = instance1.selectNodes("/root/tmpinicert/iniinfo");
- var foldernm = "C:\\Certrec";
-
- var recall = model.getValue("/root/init/recall");
-
- if (certnodeList.length <= 0)
- {
- return;
- }
- else if(certnodeList.length > 1)
- {
- model.setValue("/root/init/recall", "N");
- }
-
- var emrpath = "";
- var emrorddate = "";
- var emrformnm = "";
- var emrformcd = "";
- var emrdeptnm = "";
- var emrdeptcd = "";
- var emrpage = "";
- var emrhiddenmsg = "";
- var recrowno = "";
- var k = "";
- var pid = "";
- var ptnm = "";
- var depthngnm = "";
- var deptengabbr = "";
- var rgstno = "";
- var sa = "";
- var disporddd = "";
- var orddd = "";
- var drid = "";
- var roomcd = "";
- var ordtype = "";
- var chosflag = "";
- var orddeptcd = "";
- var signflag = "";
- var imgflag = "";
- var langflag = "";
-
- var tmptreatno = "";
- var tmpiformcd = "";
-
- var signno = 0;
- var formcd = "";
- var srcformcd = "";
- var formnm = "";
- var formprogflag = "";
- var recdt = "";
-
- var recdd = "";
-
- var wardheader = "";
- var dateheader = "";
- var doctorheader = "";
- var printheader = "";
- var pageheader = "";
- var imgepath = "";
- var formrecdt = "";
- var fstrgstdt = "";
- var lastupdtdt = "";
- var staffconfirmdt = "";
- var fstrgstrusrnm = "";
- var lastupdtrusrnm = "";
- var erdt = "";
- var ervisittm = "";
- var staffnmheader = "";
- var staffnm = "";
- var emrrecusrnmheader = "";
- var emrrecusrnm = "";
- var indd = "";
- var dschdd = "";
- var inorddepthngnm = "";
- var dschorddepthngnm = "";
- var incnt = "";
- var mainyn = "";
- var rowno = "";
-
- var prtnunm = getUserInfo("usernm");
- var prtndeptnm = "";
- //var getuseren = getUserInfo("userengnm");
-
- var getdate = getCurrentDate();
- var gettime = getCurrentTime();
-
- var dateprnt = getdate.substr(0, 4) + "/" + getdate.substr(4, 2) + "/" + getdate.substr(6, 2);
- var timeprnt = gettime.substr(0, 2) + ":" + gettime.substr(2, 2) + ":" + gettime.substr(4, 2);
-
- var prtdt = dateprnt + " " + timeprnt;
-
- fExistFolder(foldernm);
- iviewerIemr.window.javascript.refreshFalse();
-
- //for(var i = 1; i <= certnodeList.length; i++)
- //{
- signno = model.getValue("/root/tmpinicert/iniinfo[" + nodeposcnt + "]/signno");
- formcd = model.getValue("/root/tmpinicert/iniinfo[" + nodeposcnt + "]/formcd");
- srcformcd = model.getValue("/root/tmpinicert/iniinfo[" + nodeposcnt + "]/srcformcd");
- formnm = model.getValue("/root/tmpinicert/iniinfo[" + nodeposcnt + "]/formnm");
- formprogflag = model.getValue("/root/tmpinicert/iniinfo[" + nodeposcnt + "]/formprogflag");
- recdt = model.getValue("/root/tmpinicert/iniinfo[" + nodeposcnt + "]/recdt");
- recdd = model.getValue("/root/tmpinicert/iniinfo[" + nodeposcnt + "]/recdd");
- trans = model.getValue("/root/tmpinicert/iniinfo[" + nodeposcnt + "]/trans");
- pid = model.getValue("/root/tmpinicert/iniinfo[" + nodeposcnt + "]/pid");
- ptnm = model.getValue("/root/tmpinicert/iniinfo[" + nodeposcnt + "]/ptnm");
- depthngnm = model.getValue("/root/tmpinicert/iniinfo[" + nodeposcnt + "]/depthngnm");
- deptengabbr = model.getValue("/root/tmpinicert/iniinfo[" + nodeposcnt + "]/deptengabbr");
- rgstno = model.getValue("/root/tmpinicert/iniinfo[" + nodeposcnt + "]/rgstno");
- sa = model.getValue("/root/tmpinicert/iniinfo[" + nodeposcnt + "]/sa");
- disporddd = model.getValue("/root/tmpinicert/iniinfo[" + nodeposcnt + "]/disporddd");
- orddd = model.getValue("/root/tmpinicert/iniinfo[" + nodeposcnt + "]/orddd");
- drid = model.getValue("/root/tmpinicert/iniinfo[" + nodeposcnt + "]/drid");
- roomcd = model.getValue("/root/tmpinicert/iniinfo[" + nodeposcnt + "]/roomcd");
- ordtype = model.getValue("/root/tmpinicert/iniinfo[" + nodeposcnt + "]/ordtype");
- chosflag = model.getValue("/root/tmpinicert/iniinfo[" + nodeposcnt + "]/chosflag");
- orddeptcd = model.getValue("/root/tmpinicert/iniinfo[" + nodeposcnt + "]/orddeptcd");
- signflag = model.getValue("/root/tmpinicert/iniinfo[" + nodeposcnt + "]/signflag");
- imgflag = model.getValue("/root/tmpinicert/iniinfo[" + nodeposcnt + "]/imgflag");
- langflag = model.getValue("/root/tmpinicert/iniinfo[" + nodeposcnt + "]/langflag");
- formrecdt = model.getValue("/root/tmpinicert/iniinfo[" + nodeposcnt + "]/formrecdt");
- formrecdt = formrecdt.toDate().getDateFormat("YYYY/MM/DD");
- fstrgstdt = model.getValue("/root/tmpinicert/iniinfo[" + nodeposcnt + "]/fstrgstdt");
- lastupdtdt = model.getValue("/root/tmpinicert/iniinfo[" + nodeposcnt + "]/lastupdtdt");
- staffconfirmdt = model.getValue("/root/tmpinicert/iniinfo[" + nodeposcnt + "]/staffconfirmdt");
- fstrgstrusrnm = model.getValue("/root/tmpinicert/iniinfo[" + nodeposcnt + "]/fstrgstrusrnm");
- if(fstrgstrusrnm != "")
- fstrgstrusrnm = fstrgstrusrnm + " (" + fstrgstdt + ")";
- lastupdtrusrnm = model.getValue("/root/tmpinicert/iniinfo[" + nodeposcnt + "]/lastupdtrusrnm");
- if(lastupdtrusrnm != "")
- lastupdtrusrnm = lastupdtrusrnm + " (" + lastupdtdt + ")";
- erdt = model.getValue("/root/tmpinicert/iniinfo[" + nodeposcnt + "]/erdt");
- ervisittm = model.getValue("/root/tmpinicert/iniinfo[" + nodeposcnt + "]/ervisittm");
- staffnm = model.getValue("/root/tmpinicert/iniinfo[" + nodeposcnt + "]/staffnm");
- emrrecusrnm = model.getValue("/root/tmpinicert/iniinfo[" + nodeposcnt + "]/emrrecusrnm");
- indd = model.getValue("/root/tmpinicert/iniinfo[" + nodeposcnt + "]/indd");
- dschdd = model.getValue("/root/tmpinicert/iniinfo[" + nodeposcnt + "]/dschdd");
- inorddepthngnm = model.getValue("/root/tmpinicert/iniinfo[" + nodeposcnt + "]/inorddepthngnm");
- dschorddepthngnm = model.getValue("/root/tmpinicert/iniinfo[" + nodeposcnt + "]/dschorddepthngnm");
- mainyn = model.getValue("/root/tmpinicert/iniinfo[" + nodeposcnt + "]/mainyn");
- rowno = model.getValue("/root/tmpinicert/iniinfo[" + nodeposcnt + "]/rowno");
- incnt = model.getValue("/root/tmpinicert/iniinfo[" + nodeposcnt + "]/incnt");
- if(incnt != "")
- incnt += " 회차";
-
-
- var ininfo = indd + " / " + inorddepthngnm;
- if(erdt != "")
- ininfo += " (응급실 내원일 : " + erdt + ")";
- var dschinfo = dschdd + " / " + dschorddepthngnm;
-
-
- var formnmarr = formnm.split("\n");
- var topformnm = "";
- var botformnm = "";
-
- if (formnmarr.length == 1)
- {
- topformnm = formnmarr[0];
- }
- else if (formnmarr.length == 2)
- {
- topformnm = formnmarr[0];
- botformnm = formnmarr[1];
- }
- else
- {
- topformnm = formnm;
- }
-
- //2009-06-02 등록번호 "-" 병원별 제거
- var pidynhcd = model.getValue("/root/init/pidynhcd/hardcd/hardcd");
- if (pidynhcd == "Y")
- {
- for(var k = pid.length; k <= 8; k++)
- {
- if(k < 8){
- pid = "0"+pid;
- }
- }
- var str1 = pid.substr(0, 3);
- var str2 = pid.substr(3, 2);
- var str3 = pid.substr(5, 2);
- var str4 = pid.substr(7, 1);
- var tmppid = str1 + " " + str2 + " " + str3 + "-" + str4;
- }
- else
- {
- tmppid = pid;
- }
-
- if (chosflag == "O" || chosflag == "S")
- {
- wardheader = "진료과 : ";
- }
- else
- {
- wardheader = "병실 : ";
- }
-
- if (langflag == "KO")
- {
- if (chosflag == "O" || chosflag == "S")
- {
- wardheader = "진료과 : ";
- }
- else
- {
- wardheader = "병실 : ";
- }
-
- dateheader = "진료기간 : ";
- doctorheader = "주치의 : ";
- printheader = "출력 : ";
- prtndeptnm = getUserInfo("dutplcenm");
- imgepath = "com/commonweb/images/biglogo" + getUserInfo("dutplceinstcd") + ".jpg"
- pageheader = "페이지 : ";
- }
- else
- {
- if (chosflag == "O" || chosflag == "S")
- {
- wardheader = "Dept : ";
- }
- else
- {
- wardheader = "Room : ";
- }
-
- dateheader = "Date : ";
- doctorheader = "Doctor : ";
- printheader = "Print date : ";
- prtndeptnm = getUserInfo("deptengnm");
- imgepath = "com/commonweb/images/biglogo" + getUserInfo("dutplceinstcd") + "e.jpg"
- if (prtndeptnm == "" || prtndeptnm == null)
- {
- prtndeptnm = getUserInfo("dutplcenm");
- }
- pageheader = "Page : ";
- }
-
- if (imgflag == "N")
- {
- if(trans == "")
- trans = "<html><head><title>출력화면 구현중입니다.</title></head><body>출력화면 구현중입니다.</body></html>";
-
- var ininm = "cmc";
- switch(srcformcd)
- {
- case "0000000001"://외래초진
- case "0000000002"://외래재진
- case "0000000004"://입원경과
- case "0000003325"://DSC기록
- ininm += "_0000000001.ini";
- break;
- case "0000000003"://입원초진
- ininm += "_0000000003.ini";
- break;
- case "0000000676"://수술기록
- staffnmheader = "◈ Surgeon :";
- if(staffnm != "")
- staffnm += "(" + staffconfirmdt + ")";
- emrrecusrnmheader = "";
- ininm += "_0000000676.ini";
- break;
- case "0000003169"://Brief OP Note
- ininm += "_0000000676.ini";
- break;
- case "0000000680"://입퇴원요약
- staffnmheader = "◈ Staff작성 및 확인 :";
- if(staffnm != "")
- staffnm += "(" + staffconfirmdt + ")";
- emrrecusrnmheader = "◈ 의무기록사 :";
- ininm += "_0000000680.ini";
- break;
- case "0000000679"://응급실기록
- ininm += "_0000000679.ini";
- break;
- default:
- //ininm += "_0000000001.ini";
- if(formprogflag == "-" || formprogflag == "MAIN" || mainyn == "Y")
- ininm += "_0000000001.ini";
- else
- ininm += ".ini";
- break;
- }
-
- trans = "<!--% \n %BASE " + getDomain() + "/himed/webapps/ \n %INCLUDE emr/recmngtweb/xrw/" + ininm + " \n VAR_PAT_NUM = " + tmppid + " \n VAR_CLASS = " + ordtype + " \n VAR_CHART_NAME_TOP = " + topformnm + " \n VAR_CHART_NAME_BOTTOM = " + botformnm + " \n VAR_CHART_NAME_LINE = " + formnm + " \n VAR_PAT_AGE_SEX = " + sa + " \n VAR_TREAT_DEPT = " + deptengabbr + " \n VAR_PAT_JUMIN_NO = " + rgstno + " \n VAR_PAT_NAME = " + ptnm + " \n VAR_PRINT_NAME = " + prtnunm + " \n VAR_PRINT_DEPT = " + prtndeptnm + " \n VAR_WARD_HEAD = " + wardheader + roomcd + " \n VAR_DATE_HEADER = " + dateheader + disporddd + " \n VAR_DOCTOR_HEADER = " + doctorheader + drid + " \n VAR_PRINT_HEADER = " + printheader + prtdt + " \n SYS_PAGE_HEADER = " + pageheader + " \n VAR_HOSP_IMG = " + imgepath + " \n VAR_ORDDATE = " + formrecdt + " \n VAR_ORDDEPT = " + depthngnm + " \n VAR_FSTRGSTRUSRNM = " + fstrgstrusrnm + " \n VAR_LASTUPDTRUSRNM = " + lastupdtrusrnm + " \n VAR_ERDT = " + erdt + " \n VAR_ERVISITTM = " + ervisittm + " \n VAR_STAFFNM_HEADER = " + staffnmheader + " \n VAR_STAFFNM = " + staffnm + " \n VAR_EMRRECUSRNM_HEADER = " + emrrecusrnmheader + " \n VAR_EMRRECUSRNM = " + emrrecusrnm + " \n VAR_ININFO = " + ininfo + " \n VAR_DSCHINFO = " + dschinfo + " \n VAR_INCNT = " + incnt + " \n VAR_INORDDEPTHNGNM = " + inorddepthngnm + "\n %-->\n" + trans;
-
- var fso = new ActiveXObject("Scripting.FileSystemObject");
- var a = fso.CreateTextFile(foldernm + "\\" + signno + "_" + formcd + ".HTML", true, true);
- a.WriteLine(trans);
- //a.Write(trans);
- a.Close();
- emrpath = foldernm + "\\" + signno + "_" + formcd + ".HTML|";
- //emrorddate += orddd + "|";
- emrorddate = recdd + "|"; //기록일을 보여달라는 의료정보팀 요청
- emrformnm = formnm + "|";
- emrformcd = formcd + "|";
- emrdeptnm = deptengabbr + "|";
- emrdeptcd = orddeptcd + "|";
- emrpage = "1|";
- emrhiddenmsg = formcd + "▦" + signno + "▦" + formnm + "▦" + chosflag + "▦" +pid + "▦" + ptnm + "▦" + deptengabbr
- + "▦" + sa + "▦" + rgstno + "▦" + disporddd + "▦" + drid + "▦" + roomcd + "▦" + disporddd + "▦" + ordtype + "▦" + "E|";
- recrowno = rowno;
-
- //영상-EMR구분|파일경로|입원일|서식지코드|서식지이름|진료과코드|진료과이름
- var chartinfo = "";
- chartinfo = "E|" + emrpath + emrorddate + emrformcd + emrformnm + emrdeptcd + emrdeptnm;
-
- model.makeValue("/root/send/iemr/treatno", "");
- model.makeValue("/root/send/iemr/docucd", "");
-
- var iemrNode = instance1.selectSingleNode("/root/imgrec/iemr");
- iviewerIemr.window.javascript.appendChart(iemrNode, chartinfo, emrhiddenmsg, recrowno);
- //iviewerIemr.window.javascript.appendChart(iemrNode, chartinfo, emrhiddenmsg);
- }
- else
- {
- tmptreatno = signno + ",";
- tmpiformcd = formcd + ",";
- emrpath = "*|";
- emrorddate = "*|";
- emrformnm = "*|";
- emrformcd = "*|";
- emrdeptnm = "*|";
- emrdeptcd = "*|";
- emrpage = "*|";
- emrhiddenmsg = "*|";
- recrowno = rowno;
-
- model.makeValue("/root/imgrec/iemr/treatno", signno);
- model.makeValue("/root/imgrec/iemr/docucd", formcd);
-
- var iemrNode = instance1.selectSingleNode("/root/imgrec/iemr");
- var chartinfo;
- chartinfo = "I";
- var hiddenmsg;
- hiddenmsg = "I";
-
- iviewerIemr.window.javascript.appendChart(iemrNode, chartinfo, hiddenmsg, recrowno);
- //iviewerIemr.window.javascript.appendChart(iemrNode, chartinfo, hiddenmsg);
- }
- /*
- if (certnodeList.length > 1 && certnodeList.length > nodeposcnt)
- {
- multirecyn = "Y";
- }
- else
- {
- multirecyn = "N";
- nodeposcnt = 1;
- }*/
- //}
-
- iviewerIemr.window.javascript.refreshTrue();
- }
- /**
- * @desc : 북마크 등록 클릭시 모달창 호출
- * @id :
- * @event : DOMActivate
- * @return : void
- * @authur : 강지훈
- */
- function fSetBookmark()
- {
- var ViewMode;
- ViewMode = iviewerIemr.model.getValue("/root/hidden/currentViewMode");
- var appcopykey = iviewerIemr.window.javascript.SetMarkPage(ViewMode); //영상뷰어에서의 리턴값
- var selPid = model.getValue("/root/main/patinfo/patinfolist/pid");
- if(selPid != ""){
- if(appcopykey != null && appcopykey != "" ){
- appcopykey = appcopykey.getTrim();
-
- var copykey = appcopykey.split("|");
- var appkeyArr = "";
- var imageCnt = 0;
-
- //1차적으로 영상EMR만 등록가능. 선택된 영상EMR의 갯수를 파악한다.
- for(var i = 0; i < copykey.length; i++){
- appkeyArr = copykey[i].split("▦");
- reckind = appkeyArr[0];
-
- if (reckind == "I"){
- imageCnt++;
- }
- }
- if(imageCnt > 0){ //선택된 이미지중에 영상EMR이 있을경우
- setParameter("SPMRI01500_reckey", appcopykey);
- setParameter("SPMRI01500_setflag", "A");
- modal("SPMRI01500");
-
- //북마크 treeview 재조회
- fGetTreeView();
- }
- else{
- messageBox("현재 영상EMR만 등록 ","I006");
- return;
- }
- }
- else{
- var ViewMode = iviewerIemr.model.getValue("/root/hidden/currentViewMode");
- if (ViewMode == null || ViewMode == "" || ViewMode != "ChartView")
- {
- messageBox("선택된 기록이","I004");
- return;
- }
- }
- }
- else{
- messageBox("선택된 환자가","I004");
- model.toggle("grd");
- btn_all.selected = true;
- model.setFocus("ipt_pid");
- return;
- }
- }
- /**
- * @group :
- * @ver :
- * @by : 2009-10-16 오전 10:13:04 강지훈
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 트리뷰 조회
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fGetTreeView(){
-
- //북마크 트리뷰는 환자가 조회되어있어야만 조회된다. 환자가없을경우 전체창 모드
- var selPid = model.getValue("/root/main/patinfo/patinfolist/pid");
- if(selPid == ""){
- messageBox("선택된 환자가","I004");
- model.toggle("grd");
- btn_all.selected = true;
- model.setFocus("ipt_pid");
- return;
- }
- else{
-
- //북마크가 선택되어야만 조회를 한다.
- var selIndx = switch1.selectedIndex;
- var bmkAll = chk_allbmk.value;
- if(selIndx == 1){
-
- //Instance초기화
- model.removenode("/root/main/treeview");
- model.makeNode("/root/main/treeview");
-
- //send Node 설정
- model.removenode("/root/send/bmkpara");
- model.makeValue("/root/send/bmkpara/pid", selPid);
- model.makeValue("/root/send/bmkpara/bmkall", bmkAll);
-
-
- if(submit("TRMRI01500")){
- trv_bookmark.rebuild();
- }
- }
- }
- }
- /**
- * @group :
- * @ver :
- * @by : 2009-10-16 오전 10:13:04 강지훈
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 북마크 항목을 더블클릭한다.
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fGetBookmarkItem(){
-
-
- var selFolder = new SELFOLDER();
- itemno = selFolder.itemno;
- linkflag = selFolder.linkflag;
-
- if(linkflag == "Y"){
- model.removeNode("/root/send/bookmark");
- model.makeValue("/root/send/bookmark/itemno", itemno);
-
- submit("TRMRI00408");
-
- var recinfos = instance1.selectNodes("/root/tmp/recinfos/recinfo");
-
- if(recinfos.length > 0){
- //초기화
- iviewerIemr.window.javascript.cleanViewer();
- iviewerIemr.window.javascript.refreshFalse();
- model.removenode("/root/tmp/imgrec");
-
- //통합기록조회 환자정보 셋팅
- var selPid = "";
-
- //북마크에 등록된 정보를 가져온다.
- for(var i = 0 ; i < recinfos.length; i++){
- var recinfo = recinfos.item(i);
- var emrflag = recinfo.selectSingleNode("emrflag").text;
-
- //영상일때
- if(emrflag == "I"){
- var nodePos = i+1;
- var treatno = recinfo.selectSingleNode("recno").text;
- var docucd = recinfo.selectSingleNode("formcd").text;
- var pageno = recinfo.selectSingleNode("pageno").text;
- var pid = recinfo.selectSingleNode("pid").text;
- selPid = pid;
-
- model.makeValue("/root/tmp/imgrec/iemr[" + nodePos + "]/treatno", parseInt(treatno));
- model.makeValue("/root/tmp/imgrec/iemr[" + nodePos + "]/pid", pid);
- model.makeNode("/root/tmp/imgrec/iemr[" + nodePos + "]/orddeptcd");
- model.makeNode("/root/tmp/imgrec/iemr[" + nodePos + "]/indd");
- model.makeValue("/root/tmp/imgrec/iemr[" + nodePos + "]/docucd", docucd);
- model.makeNode("/root/tmp/imgrec/iemr[" + nodePos + "]/ioflag");
- model.makeNode("/root/tmp/imgrec/iemr[" + nodePos + "]/cmc_cretno");
- model.makeNode("/root/tmp/imgrec/iemr[" + nodePos + "]/cmc_spcid");
- model.makeNode("/root/tmp/imgrec/iemr[" + nodePos + "]/cmc_orddate");
- model.makeNode("/root/tmp/imgrec/iemr[" + nodePos + "]/cmc_orderseqno");
- model.makeValue("/root/tmp/imgrec/iemr[" + nodePos + "]/pageno", parseInt(pageno));
-
- }
- }
-
- //통합기록조회 환자정보입력란 Setting
- if(chk_allbmk.value == "A"){
- ipt_pid.value = selPid;
- chkPidRtn = fPidKeyPress();
- }
-
- var iemrNode = instance1.selectSingleNode("/root/tmp/imgrec");
-
- //chart추가
- var chartinfo;
- chartinfo = "I";
- var hiddenmsg;
- hiddenmsg = "I";
-
- iviewerIemr.window.javascript.append_BmarkChart(iemrNode, chartinfo, hiddenmsg);
- iviewerIemr.window.javascript.refreshTrue();
-
- //ViewMode를 여러페이지 보기로 Setting
- var ViewMode;
- ViewMode = iviewerIemr.model.getValue("/root/hidden/currentViewMode");
- if (ViewMode == null || ViewMode == "" || ViewMode != "ChartView")
- {
- iviewerIemr.window.javascript.setupChart("ChartView");
- }
- }
- else{
- messageBox("등록된 기록이 ", "I004");
- return;
- }
- }
-
- }
- /**
- * @group :
- * @ver :
- * @by : 2009-10-16 오전 10:13:04 강지훈
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 선택한 폴더의 정보
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function SELFOLDER(){
- var item = trv_bookmark.item(trv_bookmark.selectedIndex);
- if(item == null) return;
- var currow = item.index + 1;
-
- this.level = model.getValue("/root/main/treeview/item["+currow+"]/level");
- this.itemno = model.getValue("/root/main/treeview/item["+currow+"]/itemno");
- this.supitemno = model.getValue("/root/main/treeview/item["+currow+"]/supitemno");
- this.itemnm = model.getValue("/root/main/treeview/item["+currow+"]/itemnm");
- this.linkflag = model.getValue("/root/main/treeview/item["+currow+"]/linkflag");
- this.pid = model.getValue("/root/main/treeview/item["+currow+"]/pid");
- }
- /**
- * @group :
- * @ver :
- * @by : 2009-10-16 오전 10:13:04 강지훈
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 폴더를 수정함
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fModiFolder(){
- setParameter("SPMRI01500_setflag", "M");
- open("SPMRI01500");
-
- fGetTreeView();
- }
- /**
- * @group :
- * @ver :
- * @by : 2009-10-16 오전 10:13:04 강지훈
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 북마크에 해당환자 기록이 있으면 북마크 탭 색을 변경.
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fChkBookmark(){
- var selPid = model.getValue("/root/main/patinfo/patinfolist/pid");
-
- model.removeNode("/root/send/selpid");
- model.makeValue("/root/send/selpid", selPid);
-
- if(submit("TRMRI00409")){
- var itemNodes = instance1.selectNodes("/root/tmp/chkitem/itemno");
-
- if(0 < itemNodes.length){
- btn_mark.attribute("color") = "#ff0000";
- }
- else{
- btn_mark.attribute("color") = "";
- }
- }
- }
- function fUpKeyBtn()
- {
- if ( (grd_pathist.row-1) >= grd_pathist.fixedRows )
- {
- fGetRecMidIndx(grd_pathist.row-1);
- grd_pathist.row = grd_pathist.row - 1;
- }
- }
- function fDownKeyBtn()
- {
- if ( (grd_pathist.row+1) != grd_pathist.rows )
- {
- fGetRecMidIndx(grd_pathist.row+1);
- grd_pathist.row = grd_pathist.row + 1;
- }
- }
- /**
- * @group :
- * @ver :
- * @by : 2009-10-30 주희경
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : xrw화면내에서 방향키(↑ , ↓) 이벤트 발생 시 다음/이전의 수진이력 조회
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function onkeydown()
- {
- /*
- if (event.keyCode == 38) //↑
- {
- if ( (grd_pathist.row-1) >= grd_pathist.fixedRows )
- {
- fGetRecMidIndx(grd_pathist.row-1);
- grd_pathist.row = grd_pathist.row - 1;
- }
- }
- else if ( event.keyCode == 40 ) //↓
- {
- if ( (grd_pathist.row+1) != grd_pathist.rows )
- {
- fGetRecMidIndx(grd_pathist.row+1);
- grd_pathist.row = grd_pathist.row + 1;
- }
- }
- else {
- event.preventDefault();
- }
- event.stopPropagation();*/
- }
- /**
- * @group :
- * @ver :
- * @by : 2009-12-04 김양수
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 조회일자 생성 및 조회
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSrchMakeDd(preflag, callflag)
- {
- if(callflag == "Y"){ //서식창조회인경우
- var currentSchrFromDay = model.getValue("/root/tmp/prcprec/srchFromdd"); //조회시작일자
- var currentSchrToDay = model.getValue("/root/tmp/prcprec/srchTodd"); //조회종료일자
- var srchInterval = model.getValue("/root/tmp/prcprec/srchInterval"); //조회구간
- //var srchYn = model.getValue("/root/tmp/prcprec/srchYn"); //최초조회여부
- }else if(callflag == "P"){ //의사지시 기록조회일경우
- var currentSchrFromDay = model.getValue("/root/tmp/sndprcprec/srchprcpfromdd"); //조회시작일자
- var currentSchrToDay = model.getValue("/root/tmp/sndprcprec/srchprcptodd"); //조회종료일자
- var srchInterval = model.getValue("/root/tmp/sndprcprec/srchprcpinterval"); //조회구간
- }
-
- if(srchInterval == ""){
- messageBox("조회구간을 입력하셔야 합니다.","I");
- return;
- }
-
- if(preflag == 1){ //이전인경우
- var fromDay = currentSchrFromDay.toDate().getAddDate(parseInt(srchInterval) * -1, "D").getDateFormat();
- if(callflag == "Y"){ //서식창조회인경우
- model.makeValue("/root/tmp/prcprec/srchFromdd", fromDay);
- model.makeValue("/root/tmp/prcprec/srchTodd", currentSchrFromDay.toDate().getAddDate(-1, "D").getDateFormat());
- }else if(callflag == "P"){ //의사지시 기록조회일경우
- model.makeValue("/root/tmp/sndprcprec/srchprcpfromdd", fromDay);
- model.makeValue("/root/tmp/sndprcprec/srchprcptodd", currentSchrFromDay.toDate().getAddDate(-1, "D").getDateFormat());
- }
- //model.makeValue("/root/tmp/prcprec/srchYn", "Y");
- }else if(preflag == 2){ //다음인경우
- var toDay = currentSchrToDay.toDate().getAddDate(parseInt(srchInterval)).getDateFormat();
- if(callflag == "Y"){ //서식창조회인경우
- model.makeValue("/root/tmp/prcprec/srchFromdd", currentSchrToDay.toDate().getAddDate(1, "D").getDateFormat());
- model.makeValue("/root/tmp/prcprec/srchTodd", toDay);
- }else if(callflag == "P"){ //의사지시 기록조회일경우
- model.makeValue("/root/tmp/sndprcprec/srchprcpfromdd", currentSchrToDay.toDate().getAddDate(1, "D").getDateFormat());
- model.makeValue("/root/tmp/sndprcprec/srchprcptodd", toDay);
- }
- //model.makeValue("/root/tmp/prcprec/srchYn", "Y");
- }
- model.refresh();
-
- if(callflag == "P"){ //의사지시 기록조회일경우
- //grd_littleindx.attribute("visibility") = "hidden";
-
- fGetDetlRec(grd_midindx.row);
-
- var ViewMode;
- ViewMode = iviewerIemr.model.getValue("/root/hidden/currentViewMode");
-
- if (ViewMode == null || ViewMode == "" || ViewMode != "ChartView"){
- iviewerIemr.window.javascript.setupChart("ChartView");
- }
- }else if(callflag == "Y"){ //서식창조회인경우
- fReqLittleIndx();
- fDbClickMidIndx();
- }
- }
- function fSrchChoice(callflag)
- {
- if(callflag == "C"){ //서식창조회시
- var srchChoice = model.getValue("/root/tmp/prcprec/srchchoice");
- if(srchChoice == "1"){ //기간(간격)조회
- ipt_srchinterval.disabled = "false";
- ipt_fromdd.disabled = "true";
- ipt_todd.disabled = "true";
- btn_prcpsrch.attribute("visibility") = "hidden";
- btn_intervalpre.disabled = "false";
- btn_intervalnext.disabled = "false";
- }else if(srchChoice == "2"){ //일자조회
- ipt_srchinterval.disabled = "true";
- ipt_fromdd.disabled = "false";
- ipt_todd.disabled = "false";
- btn_prcpsrch.attribute("visibility") = "visible";
- btn_intervalpre.disabled = "true";
- btn_intervalnext.disabled = "true";
- }
- }else if(callflag == "P"){ //의사지시기록조회시
- var srchChoice = model.getValue("/root/tmp/sndprcprec/srchprcpchoice");
- if(srchChoice == "1"){ //기간(간격)조회
- ipt_srchprcpinterval.disabled = "false";
- ipt_srchprcpfromdd.disabled = "true";
- ipt_srchprcptodd.disabled = "true";
- btn_srchprcp.attribute("visibility") = "hidden";
- btn_prcppre.disabled = "false";
- btn_prcpnext.disabled = "false";
- }else if(srchChoice == "2"){ //일자조회
- ipt_srchprcpinterval.disabled = "true";
- ipt_srchprcpfromdd.disabled = "false";
- ipt_srchprcptodd.disabled = "false";
- btn_srchprcp.attribute("visibility") = "visible";
- btn_prcppre.disabled = "true";
- btn_prcpnext.disabled = "true";
- }
- }
- }
- /**
- * @group :
- * @ver :
- * @by : 2009-12-04 김양수
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 의시지시기간조회창에서의 조회버튼(의사지시 기간검색)
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fPrcpSrchDd()
- {
- fGetDetlRec(grd_midindx.row);
-
- var ViewMode;
- ViewMode = iviewerIemr.model.getValue("/root/hidden/currentViewMode");
-
- if (ViewMode == null || ViewMode == "" || ViewMode != "ChartView"){
- iviewerIemr.window.javascript.setupChart("ChartView");
- }
- }
- /**
- * @group :
- * @ver :
- * @by : 2009-12-04 김양수
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 소분류조회
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fReqLittleIndx(reqflag)
- {
- if(reqflag == 1){
- grup_prcppaging.attribute("visibility") = "hidden";
- }
- grup_prcppaging2.attribute("visibility") = "hidden"; //의사지시기록 조회창이 visible이면 숨김-20091215
-
- model.removeNodeset("/root/send");
- model.makeValue("/root/send/pid", model.getValue("/root/main/patinfo/patinfolist/pid"));
- model.makeValue("/root/send/orddd", grd_pathist.valueMatrix(grd_pathist.row, grd_pathist.colref("orddd")));
- model.makeValue("/root/send/cretno", grd_pathist.valueMatrix(grd_pathist.row, grd_pathist.colref("cretno")));
- model.makeValue("/root/send/itemindxseq", grd_midindx.valueMatrix(grd_midindx.row, grd_midindx.colref("itemindxseq")));
- if(reqflag == 1){
- var srchAddOrddd = grd_pathist.valueMatrix(grd_pathist.row, grd_pathist.colref("orddd"));
- model.makeValue("/root/tmp/prcprec/srchInterval", "10");
- model.makeValue("/root/tmp/prcprec/srchFromdd", srchAddOrddd);
- model.makeValue("/root/tmp/prcprec/srchTodd", srchAddOrddd.toDate().getAddDate(9, "D").getDateFormat());
- grup_prcppaging.attribute("visibility") = "visible";
- model.setFocus("ipt_srchinterval");
- rdo_srchchoice.select(0);
- //rdo_srchkind.select(0);
- //grup_srchchrt.disabled = true; //일자별일경우 서식별그룹비활성화-kys-20091215
- model.refresh();
- }
-
- if(model.getValue("/root/tmp/prcprec/srchkind") != 2){ //서식별 조회시 fromm todd 불필요-20091216-kys
- model.makeValue("/root/send/fromdd", model.getValue("/root/tmp/prcprec/srchFromdd"));
- model.makeValue("/root/send/todd", model.getValue("/root/tmp/prcprec/srchTodd"));
- }
-
- if(model.getValue("/root/tmp/prcprec/srchkind") == 1){ //일자별일경우
- model.removeNodeset("root/tmp/littleindx");
- fDbClickMidIndx();
- }else if(model.getValue("/root/tmp/prcprec/srchkind") == ""){
-
- }else{ //서식별, 일자+서식별일 경우
- if(submit("TRMRI04007")){
- var littleIndxNodeCnt = getNodesetCnt(model, "/root/tmp/littleindx/littleindxlist");
- if(littleIndxNodeCnt > 0){
- //grd_littleindx.attribute("visibility") = "visible";
- grd_littleindx.row = 1;
- fDbClickMidIndx();
- }else{
- //grd_littleindx.attribute("visibility") = "hidden";
- }
- }else{
- messageBox("소분류 가져오기를 실패하였습니다.", "E", "");
- return;
- }
- }
-
- }
- /**
- * @group :
- * @ver :
- * @by : 2009-12-15 김양수
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 조회종류 setting
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fChngkind(){
- var srchkind = model.getValue("/root/tmp/prcprec/srchkind");
- if(srchkind == 1){ //일자별
- grup_srchchrt.disabled = true; //서식별 조회
- grup_srchday.disabled = false; //일자별 조회
- }else if(srchkind == 2){ //서식별
- grup_srchchrt.disabled = false; //서식별 조회
- grup_srchday.disabled = true; //일자별 조회
- //fReqLittleIndx();
- }else if(srchkind == 3){ //일자+서식
- grup_srchchrt.disabled = false; //서식별 조회
- grup_srchday.disabled = false; //일자별 조회
- }
- fReqLittleIndx();
- }
|