SMMNP00300.js 466 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999
  1. /* ---------------------------------------------------------------------
  2. 수술기록 사항(SMMNP00300.xfm - JScript )
  3. - Version :
  4. 1) : Ver.1.00.01
  5. : Create By Francis Choi
  6. : 2007.05.02
  7. ---------------------------------------------------------------------- */
  8. var hPath = "/root/main/operation/list"
  9. var xPathFormat = "/root/init/XmlFormat" ; //
  10. var xPathData = "/root/main/MnphopcrData/MnphopcrList" ; //
  11. var xPathDispDT = "/root/init/workinst/datetimedata" ; //
  12. var CountPath = "/root/main/MnphopcoLists/mnphopcolist" ; // Counter Instance
  13. var OpcdPath = "/root/main/MnphopcrData/MnphopcrList/aftopopnm/aftopoplists";
  14. var xPathSheetData3 = "/root/main/SheetData3";
  15. var xPathHiddenSheetData3 = "/root/temp/SheetData3";
  16. var certkind = "1";
  17. var sSignNo = "";
  18. //---------(20110512)
  19. // var XmlInstName = "opbfpatcnfmspec" + " " // 01 수술전 환자확인
  20. // + "timeoutspec" + " " // 02 TimeOut
  21. // + "anstkindspec" + " " // 03 마취종류
  22. // + "opposturespec" + " " // 04 수술체위
  23. // + "skindinfspec" + " " // 05 피부소독제
  24. // + "esuspec" + " " // 06 ESU
  25. // + "tourniquetspec" + " " // 07 Tourniquet
  26. // + "warmcoldregmspec" + " " // 08 온냉요법
  27. // + "postureskinupdtspec" + " " // 09 체위에 따른 피부변화
  28. // + "counspec" + " " // 10 Count내역
  29. // + "aftopopnm" + " " // 11 수술 후 수술명
  30. // + "packingspec" + " " // 12 Packing내역
  31. // + "opnursrectimeremark" ; // 13 수술지연사유정보
  32. var XmlInstName = "opbfpatcnfmspec" + " " // 01 수술전 환자확인
  33. + "timeoutspec" + " " // 02 TimeOut
  34. + "anstkindspec" + " " // 03 마취종류
  35. + "opposturespec" + " " // 04 수술체위
  36. + "skindinfspec" + " " // 05 피부소독제
  37. + "esuspec" + " " // 06 ESU
  38. + "tourniquetspec" + " " // 07 Tourniquet
  39. + "warmcoldregmspec" + " " // 08 온냉요법
  40. + "postureskinupdtspec" + " " // 09 체위에 따른 피부변화
  41. + "counspec" + " " // 10 Count내역
  42. + "aftopopnm" + " " // 11 수술 후 수술명
  43. + "packingspec" + " " // 12 Packing내역
  44. + "opnursrectimeremark" + " " // 13 수술지연사유정보
  45. + "opdiscordspec"; // 14 불일치 조치사항 정보
  46. //---------(20110512)
  47. var XmlInstNm = XmlInstName.split(" ");
  48. //----------
  49. var OpeuPathD = "/root/init/workinst/cOpeu/opeulist" ; // 참여자 Duplicate Node
  50. var OpeuPathR = "/root/init/workinst/Opeudata" ; // 참여자 Instance
  51. var OpeuGrid1 = "/root/init/workinst/OpeuLists/opeulist1";
  52. var OpeuGrid2 = "/root/init/workinst/OpeuLists/opeulist2";
  53. var OpeuColData = "entridflag " // 참가자 ID구분
  54. + "entrid " // 참가자ID
  55. + "entrdt " // 참가시간
  56. + "entrnm " // 참가자명
  57. + "deptcd " // 부서코드
  58. + "deptnm " // 부서명
  59. + "refseq " // 조회순서
  60. + "outdt " // 퇴실일시
  61. + "entrtm" ; // 입실시간
  62. var OpeuColumn = OpeuColData.split(" ");
  63. var OpeuName = "D1" + " " // 집도의
  64. + "D4" + " " // Assist
  65. + "D3" + " " // 마취의
  66. + "N1" + " " // 소독간호사
  67. + "N2" + " " // 순회간호사
  68. + "N3" ; // 마취간호사
  69. var OpeuInit = OpeuName.split(" ");
  70. var sPartFlag = ""; // 사용부위 팝업 사용 항목(drug/ drge)
  71. // ---------------------------------------------------------------------------------
  72. // 수술기록 - 수술간호기록정보
  73. // EMR.MNPHOPCR 수술간호기록정보
  74. // ---------------------------------------------------------------------------------
  75. var sMnphopcrData = "" ; // 00 수술간호기록정보
  76. var sOprsrvno = ""; // CHARACTER(10) 01 수술예약(의뢰)번호(년도+일련번호)
  77. var sInstcd = ""; // CHARACTER(3) 02 기관코드
  78. var sPid = ""; // VARCHAR(10) 03 환자번호
  79. var sOptrustflag = ""; // VARCHAR(1) 04 수술의뢰구분-정규(일반)E응급
  80. var sOppatflag = ""; // CHARACTER(1) 05 수술환자구분
  81. var sOpbfpatcnfmspec = ""; // "SYSIBM"."XML" 06 수술전환자확인내역
  82. var sOppartdispyn = ""; // CHARACTER(1) 07 수술부위표시여부
  83. var sTimeoutspec = ""; // "SYSIBM"."XML" 08 TimeOut내역
  84. var sAnstkindspec = ""; // "SYSIBM"."XML" 09 마취종류내역
  85. var sOpposturespec = ""; // "SYSIBM"."XML" 10 수술체위내역
  86. var sSkindinfspec = ""; // "SYSIBM"."XML" 11 피부소독제내역
  87. var sAftopopnm = ""; // "SYSIBM"."XML" 12 수술후수술명
  88. var sOpscale = ""; // CHARACTER(01) 13 수술스케일 L,M,S
  89. var sPatinroomdt = ""; // CHARACTER(14) 13 환자입실시간
  90. var sPatoutroomdt = ""; // CHARACTER(14) 14 환자퇴실시간
  91. var sAnstsrtdt = ""; // CHARACTER(14) 15 마취시작시간
  92. var sAnstenddt = ""; // CHARACTER(14) 16 마취종료시간
  93. var sPerfidarvdt = ""; // CHARACTER(14) 17 집도의도착일시
  94. var sPerfidoutdt = ""; // CHARACTER(14) 18 집도의퇴실일시
  95. var sOpfromdt = ""; // CHARACTER(14) 19 수술시작일자
  96. var sOptodt = ""; // CHARACTER(14) 20 수술종료일자
  97. var sOpoutrmplcecd = ""; // VARCHAR(10) 21 수술후퇴실장소
  98. var sOpoutrmplcenm = ""; // VARCHAR(50) 22 수술후퇴실장소기타
  99. var sEsuspec = ""; // "SYSIBM"."XML" 23 ESU내역
  100. var sTourniquetspec = ""; // "SYSIBM"."XML" 24 Tourniquet내역
  101. var sWarmcoldregmspec = ""; // "SYSIBM"."XML" 25 온냉요법내역
  102. var sPostureskinupdtspec = ""; // "SYSIBM"."XML" 26 체위에따른피부변화내역
  103. var sCounspec = ""; // "SYSIBM"."XML" 29 Count,내역
  104. var sPackingspec = ""; // "SYSIBM"."XML" 30 Packing내역
  105. var sCertno = ""; // VARCHAR(17) 31 인증코드
  106. var sOpcnfmdd = ""; // CHARACTER(8) 32 수술확정일자(의뢰상태일경우예정일자와동일)
  107. var sFstrgstrid = ""; // CHARACTER(10) 33 최초등록자ID(시스템정보)
  108. var sLastupdtid = ""; // CHARACTER(10) 34 최종수정자(시스템정보)
  109. //--
  110. var sOpstatcd = ""; // 35 진행상태
  111. var sOpstatcdnew = ""; // 36 진행상태
  112. var sOphistno = ""; // 37 예약번호에따른이력번호
  113. var sRecstat = ""; // 34 Record 상태정보 I:신규,U:수정
  114. var sDrugUseYN = ""; // 약품사용여부
  115. var sDrgeUseYN = ""; // 배액관사용여부
  116. var sEqmtUseYN = ""; // 장비사용여부
  117. var sImplantUseYN = ""; // Implant사용여부
  118. var sDrugCmt = ""; // 약품비고
  119. var sDrgeCmt = ""; // 배액관비고
  120. var sEqmtCmt = ""; // 장비비고
  121. var sImplantCmt = ""; // implant 비고
  122. var sTnsYN = ""; // 수혈여부
  123. var sSpcUseYN = ""; // 검체사용여부
  124. var sCareRecUseYN = ""; // 간호기록 사용여부
  125. //=============================================================
  126. //2008-06-27 오전 10:33:23 taebum 추가요구사항 반영
  127. var sCuthairflag = "";
  128. var sXrayflag = "";
  129. var sXraydrugspec = "";
  130. var sDrsflag = "";
  131. var sDrsetc = "";
  132. //2008-06-30 오후 5:11:50
  133. var sNocountdoctid = ""; //집도의 요청에 의한 계수확인 안함 집도의ID
  134. //2008-07-01 오전 10:41:02
  135. var sIcuGoFlag = ""; // 회복환자관리용 퇴실장소가 ICU일 경우 사용
  136. var sSignGernalFlag = ""; //2008-07-01 오후 8:50:52 인증 저장시 계속 오류로 전역변수로 선언함.(초기 paminfo 전역변수에서 받음.)
  137. //2008-07-03 오후 2:07:54 적출물여부, 분만여부, 피부상태 추가 요구사항 적용
  138. var sExtcyn = ""; //적출물 여부
  139. var sSkinstatflag = ""; // 피부상태 구분
  140. var sDelivyn = ""; //분만여부
  141. //2010.04.09 K. J. M 퇴실저장여부
  142. var sOutflag = ""; //퇴실저장여부
  143. //----------(20110512)
  144. var opdiscordspec = ""; //불일치시 조시사항정리
  145. //----------(20110512)
  146. //==============================================================
  147. //2008-07-05 오후 2:03:41 분만정보 조회시
  148. var sIndd = "";
  149. var sCretno = "";
  150. //=============================================================
  151. //2008-07-07 오후 2:52:32
  152. var sPlatatransid = ""; //태반운반자ID
  153. var sOtyn = ""; //장기이식여부 2008-07-08 오후 9:46:50
  154. var sObRecyn = ""; //관찰기록여부 2012-06-03 오후 4:55:18
  155. var sPatopinsndsmsid = ""; //환자입실sms전송ID 2008-07-22 오후 10:23:58
  156. var sPatopoutsndsmsid = "";//환자퇴실SMS전송ID 2008-07-22 오후 10:24:00
  157. //=============================================================
  158. //2009-09-02 ycd 수술간호기록지 기록항목 추가
  159. var sEscopeeqmtuseyn = ""; //내시경장비사용여부
  160. var sInsuremark = ""; //보험팀전달사항
  161. var sPrcporderid = ""; //처방의사ID
  162. var sDeptremark = ""; //부서Remark
  163. var sOproomremark = ""; //수술실Remark
  164. var sOpcntlistremark = ""; //수술count리스트 Remark
  165. var sOpNursRecTimeRemark = ""; //수술지연사유정보
  166. var sOpDrgeSpec = ""; //삽관기록
  167. //2009-09-10 ycd 검체비고입력 기록항목 추가
  168. var sSpcCmt = "";
  169. //2010.02.18 K. J. M 인증저장 로직에서 퇴실저장 로직을 타는지 구분 Flag
  170. var sCertOutFlag = "N";
  171. var sOpscaleOrg = "";
  172. var sOpscaleChgFlag = false;
  173. var sOpcntlisttoexecyn = ""; //수술count리스트 Time Out 시행여부
  174. /* ------------------------------------------------- */
  175. /* SMMNP00300_수술기록 */
  176. /* On Load 시 Call */
  177. /* ------------------------------------------------- */
  178. /* group : EMR 간호 수술마취 */
  179. /* ver : 2007.05.03 */
  180. /* by : 최학록 */
  181. /* --------------------------------------------------*/
  182. /* type : function */
  183. /* access : public */
  184. /* desc : xforms-ready시 수행한다 */
  185. /* return : */
  186. /* --------------------------------------------------*/
  187. function fFormInit() {
  188. // 2009-02-05 ycd 수술간호기록 수정작업 중 삭제 처리
  189. //grp_partlist.visible = false;
  190. group5.visible = false;
  191. model.removeNodeset(grd_skinsurveylist.nodeset);
  192. var paminfo = getGlobalVariable("paminfo");
  193. model.makeNode("/root/main/paminfo");
  194. var node = getGlobalVariable("operation");
  195. setCSVToNode("/root/main/operation", node);
  196. setCSVToNode("/root/main/paminfo", paminfo);
  197. grd_count.isReadOnly(1, grd_count.colRef("nacls"), 1, grd_count.colRef("totqty"))=true;
  198. var sPid = model.getValue(hPath+"/pid");
  199. // ---Test 시 막고하는 부분 ----------------------
  200. if (sPid == "") {
  201. var mainObj = getMainViewer();
  202. messageBox("수술 환자를 선택하십시요!", "I000");
  203. window.close();
  204. // mainObj.javascript.navigate("SMMNP00100"); // 수술마취메인
  205. return;
  206. }
  207. // ---Test 시 막고하는 부분 마지막 ---------------
  208. node = getGlobalVariable("paminfo");
  209. setCSVToNode("/root/temp/paminfo", node);
  210. //외래/입원/DSC을 구분하기 위하여 추가함.
  211. sSignGernalFlag = model.getValue("/root/temp/paminfo/list/ioflag"); //인증저장시 받아온후 전역변수로 세팅한다.
  212. sPid = model.getValue("/root/temp/paminfo/list/pid");
  213. sCretno = model.getValue("/root/temp/paminfo/list/cretno");
  214. if(sSignGernalFlag == "O"){
  215. sIndd = model.getValue("/root/temp/paminfo/list/orddd");
  216. }else{
  217. sIndd = model.getValue("/root/temp/paminfo/list/indd");
  218. }
  219. // 감염정보가져오기 혈액, 접촉, 공기 순으로 | 구분자 N | N | N 혹은 Y | Y | Y
  220. var InsfectData = getPatientInfo("infection");
  221. // if (InsfectData =="") InsfectData ="Y|Y|Y";
  222. var iData = InsfectData.split("|");
  223. var InsfectName = "";
  224. if (iData.length > 0) {
  225. InsfectName += (iData[0] == "Y") ? "혈액 " : "";
  226. InsfectName += (iData[1] == "Y") ? "접촉 " : "";
  227. InsfectName += (iData[2] == "Y") ? "공기" : "";
  228. model.setValue("/root/init/workinst/OpOtherData/infection", InsfectName);
  229. }
  230. //
  231. if (sPid != "") {
  232. model.makeValue("/root/init/HideData/instcd" , model.getValue(hPath+ "/instcd" )); // 기관코드
  233. model.makeValue("/root/init/HideData/pid" , model.getValue(hPath+ "/pid" )); // 환자번호
  234. model.makeValue("/root/init/HideData/oprsrvno", model.getValue(hPath+ "/oprsrvno")); // 의뢰번호
  235. model.makeValue("/root/init/HideData/ophistno", model.getValue(hPath+ "/ophistno")); // 이력번호
  236. for (var iRow=1; iRow<=getNodesetCnt(model, xPathFormat+"/SpecimenLists/specimenlist"); iRow++){
  237. model.setValue(xPathFormat+"/SpecimenLists/specimenlist["+iRow+"]/oprsrvno", model.getValue("/root/init/HideData/oprsrvno"));
  238. }
  239. }
  240. zbcfGetCodeList(new Array("M0260","M0065","M0016", "M0526", "M0527", "M0528", "M0529", "M0029", "M0559"),
  241. new Array("/root/init/M0260list", "/root/init/M0065list", "/root/init/M0016list", "/root/init/M0526list"
  242. , "/root/init/M0527list", "/root/init/M0528list", "/root/init/M0529list", "/root/init/M0029list", "/root/init/M0559list" ), true);
  243. fGetNursHardCdInfo("'111','144', '182', '329','164', '137','154', '155'", getCurrentDate());
  244. group2.visible = true;
  245. // 검체_new 항목 사용 시작하는 기준시간 (공통코드 : 329 항목 )_손성훈.
  246. model.setValue("/root/specdd/chkdd",model.getValue("/root/code/codeinfo/codelist[cdgrupid='329']/cdnm"));
  247. //
  248. /*
  249. 2008-05-19 오후 4:05:41 TimeOut 사용자 요구사항 관련 추가사항 김태범.
  250. 기존에 inputBox 와 Button을 이용하여 PopUp을 사용하던 Flow에서 ComboList를 이용하도록 수정요청
  251. 2009-02-10 ycd 기초데이성 부터 조회하도록 처리
  252. */
  253. fSheet1TimeOutAddInfo();
  254. OpRoomCode_Read(); //수술방조회
  255. OpRecBasic_Read(); //퇴실장소, 피부소독제 조회 , 불일치시 조치사항 리스트 조회
  256. var sRtn = MnphopcrList_Read();
  257. if (sRtn == false) {
  258. bbt_inroom.disabled = true;
  259. bbt_outroom.disabled = true;
  260. btn_rgst_tmp.disabled = true;
  261. btn_rgst_sct.disabled = true;
  262. //btn_forcergst_sct.disabled = true; 2009-02-05 ycd 수술간호기록 수정작업 중 삭제 처리
  263. return;
  264. }
  265. fPackingMergeFalse();
  266. fMnphopco_Read();
  267. model.setValue(xPathData+"/eqmtuseyn","X");
  268. fSheetData3_Read("all");
  269. fSrchCareRecList();
  270. //fSpecimenCheck(); // 검체 해당없음 check //2008-07-14 오후 8:02:43 taebum 235Line에서 초기에 정보를 가져오므로 주석처리함. fSheetData3_Read
  271. //*************************************************************************************************
  272. //사용자 ID Display용 Setting
  273. //2009-02-02 ycd 기록 항목 제거로 인하여 주석 처리
  274. /*
  275. model.setValue("root/init/HideData/timeOutDisplayInfo/perfdr", model.getValue("root/main/MnphopcrData/MnphopcrList/timeoutspec/timeout/perfdr"));
  276. model.setValue("root/init/HideData/timeOutDisplayInfo/nurse1", model.getValue("root/main/MnphopcrData/MnphopcrList/timeoutspec/timeout/nurse1"));
  277. model.setValue("root/init/HideData/timeOutDisplayInfo/anstdr", model.getValue("root/main/MnphopcrData/MnphopcrList/timeoutspec/timeout/anstdr"));
  278. model.setValue("root/init/HideData/timeOutDisplayInfo/nurse2", model.getValue("root/main/MnphopcrData/MnphopcrList/timeoutspec/timeout/nurse2"));
  279. out_perfdr.refresh();
  280. out_nurse1.refresh();
  281. out_anstdr.refresh();
  282. out_nurse2.refresh();
  283. */
  284. //*************************************************************************************************
  285. //2008-08-20 오전 7:25:01 taebum 상태가 확정이면서 부수술일 경우에는 기록작성 할 수 있도록 수정
  286. //2009-02-11 ycd 재수술 여부에 따른 버튼 활성화 부분 추가
  287. if(model.getValue(xPathData + "/reopflag") == "N"){
  288. // ---Test 시 막고하는 부분 ----------------------
  289. if((model.getValue(xPathData+"/opstatcd") < "30") &&
  290. ( (model.getValue(xPathData+"/oprsrvno") == model.getValue(xPathData+"/mainoprsrvno") ||
  291. model.getValue(xPathData+"/mainoprsrvno") == "-" ) ) ){
  292. messageBox("임시저장만 가능합니다.", "I000"); //2008-09-02 오후 7:34:20 taebum
  293. //messageBox("입실 전에는 기록을 작성", "E001"); //2008-09-02 오후 8:12:06 주석처리 taebum
  294. //messageBox("수술준비확인표를 작성하기 전에는 기록을 작성", "E001");
  295. //messageBox("수술진행 상태가 *대기*전에는 기록을 작성", "E001");
  296. //2008-09-02 오후 7:34:20 taebum add
  297. //==================================
  298. inp_patinroomdd.disabled = true;
  299. inp_patinroomhh.disabled = true;
  300. btn_patinroomhh.visible = false;
  301. bbt_inroom.visible = false;
  302. inp_patoutroomdd.disabled = true;
  303. inp_patoutroomhh.disabled = true;
  304. btn_patoutroomhh.visible = false;
  305. bbt_outroom.visible = false;
  306. //btn_patinroomhh.disabled = true;
  307. //btn_patoutroomhh.disabled = true;
  308. //==================================
  309. btn_rgst_sct.disabled = true;
  310. //btn_rgst_tmp.disabled = true; //2008-09-02 오후 8:19:32 taebum 주석처리
  311. //btn_forcergst_sct.disabled = true; //2009-02-05 ycd 수술간호기록 수정작업 중 삭제 처리
  312. //2009-02-17 삭제처리
  313. //전광판 관련 입퇴실 버튼을 활성화 시킨다.
  314. //bbt_outroom.disabled = false;
  315. //bbt_inroom.disabled = false;
  316. }else if( model.getValue(xPathData+"/opstatcd").substr(1,1) == "9"){
  317. messageBox("취소된 수술스케줄 입니다.", "I000");
  318. btn_rgst_tmp.disabled = true;
  319. btn_rgst_sct.disabled = true;
  320. bbt_outroom.disabled = true;
  321. bbt_inroom.disabled = true;
  322. //btn_forcergst_sct.disabled = true; 2009-02-05 ycd 수술간호기록 수정작업 중 삭제 처리
  323. }else if (model.getValue(xPathData+"/ophistcd") != "O"){
  324. messageBox("취소된 수술스케줄 입니다.", "I000");
  325. bbt_outroom.disabled = true;
  326. bbt_inroom.disabled = true;
  327. btn_rgst_tmp.disabled = true;
  328. btn_rgst_sct.disabled = true;
  329. //btn_forcergst_sct.disabled = true; 2009-02-05 ycd 수술간호기록 수정작업 중 삭제 처리
  330. }
  331. //2008-10-12 오후 5:01:15 수술실에서 준비확인 인증저장 안할 경우 메세지 처리
  332. if(model.getValue(xPathData+"/opstatcd") >= "30" && model.getValue(xPathData+"/operchfrecdttm") == ""){ //수술실에서 준비확인 인증저장을 안할 경우
  333. messageBox("수술실에서 준비확인을 하지 않았습니다. 임시저장만 가능합니다.", "I000");
  334. bbt_outroom.disabled = true;
  335. bbt_inroom.disabled = true;
  336. btn_rgst_tmp.disabled = false;
  337. btn_rgst_sct.disabled = true;
  338. //btn_forcergst_sct.disabled = true; 2009-02-05 ycd 수술간호기록 수정작업 중 삭제 처리
  339. }
  340. //2008-09-03 taebum 오전 10:32:44 협진관련 화면 버튼 처리 추가
  341. if( (model.getValue(xPathData+"/oprsrvno") != model.getValue(xPathData+"/mainoprsrvno")) &&
  342. (model.getValue(xPathData+"/mainoprsrvno") != "-" ) ){
  343. /*
  344. if(model.getValue(xPathData+"/opstatcd") < "30"){
  345. //임시저장 기능만.
  346. btn_rgst_sct.disabled = true;
  347. }
  348. */
  349. //2008-09-02 오후 7:34:20 taebum add
  350. //==================================
  351. //입/퇴실 관련 비활성화 처리
  352. inp_patinroomdd.disabled = true;
  353. inp_patinroomhh.disabled = true;
  354. btn_patinroomhh.visible = false;
  355. bbt_inroom.visible = false;
  356. inp_patoutroomdd.disabled = true;
  357. inp_patoutroomhh.disabled = true;
  358. btn_patoutroomhh.visible = false;
  359. bbt_outroom.visible = false;
  360. //bbt_outroom.disabled = true;
  361. //bbt_inroom.disabled = true;
  362. //수술시작/종료 활성화처리
  363. //inp_opfromdd.disabled = false;
  364. //inp_opfromhh.disabled = false;
  365. //bbt_opfromhh.disabled = false;
  366. //bbt_opfromhh.visible = true;
  367. //inp_optodd.disabled = false;
  368. //inp_optohh.disabled = false;
  369. //bbt_optohh.disabled = false;
  370. //bbt_optohh.visible = true;
  371. //퇴실장소 관련 비활성화 처리
  372. img2.disabled = true;
  373. cmb_outplc.disabled = true;
  374. ipt_opoutrmplcenm.disabled = true;
  375. }
  376. //grd_count.isReadOnly(1, 3, 1, 7); //instrument
  377. if (model.getValue(xPathData+"/certno") != ""){ // 인증저장후 자료 처리
  378. btn_rgst_tmp.disabled = true;
  379. }
  380. bbt_reload.disabled = false;
  381. var recendflag = model.getValue("/root/main/MnphopcrData/MnphopcrList/recendflag");
  382. //수술간호기록 마감됐는데도 기록지에서 마감체크가 안됐던 부분 오류 수정 by 박영우 2010-02-11
  383. if( ( recendflag == "1" )||( recendflag == "3" )) {//수술실이 마감에 포함되어 있으면
  384. messageBox("수술기록이 마감된 상태입니다. 기록을 할 수 없습니다.", "I000");
  385. switch1.disabled = true;
  386. //2009-02-09 ycd 수술간호기록 마감처리시 입실저장, 퇴실저장 버튼 비활성화되도록 변경
  387. bbt_inroom.disabled = true;
  388. bbt_outroom.disabled = true;
  389. btn_rgst_tmp.disabled = true;
  390. btn_rgst_sct.disabled = true;
  391. //btn_forcergst_sct.disabled = true; 2009-02-05 ycd 수술간호기록 수정작업 중 삭제 처리
  392. /*
  393. caption37.visible = false;
  394. caption39.visible = false;
  395. caption44.visible = false;
  396. caption45.visible = false;
  397. */
  398. }else {
  399. //2008-08-25 오후 12:40:29 마취의뢰만 할 경우, Angio방일 경우 입/퇴실 저장하는 로직 추가 ====================
  400. //group 로직으로 처리하려고 하였으나, 비정상적인 오류로 inputbox에 입력을 못하는 현상 발생으로 캡션으로 처리
  401. //Angio방은 0041 ~ 0049 임. 현재 0045 BMT방은 잘못된 방으로 삭제 예정
  402. var sAnstreqflag = model.getValue("/root/main/MnphopcrData/MnphopcrList/anstreqflag");
  403. var sRoomcd = model.getValue("/root/main/MnphopcrData/MnphopcrList/opbfpatcnfmspec/opbfpatcnfm/oproom");
  404. //alert("마취의뢰 구분 : "+sAnstreqflag);
  405. //alert("수술방 코드 : "+sRoomcd.substr(0,3));
  406. if((sAnstreqflag == "Y") && (sRoomcd.substr(0,3) == "004")){
  407. //2009-02-11 ycd 삭제 처리
  408. //caption37.visible = true;
  409. //caption39.visible = true;
  410. //caption44.visible = true;
  411. //caption45.visible = true;
  412. //2009-02-11 ycd Angio 환자일 경우 입퇴실 저장만 가능하도록 처리
  413. bbt_inroom.disabled = false;
  414. bbt_outroom.disabled = false;
  415. button7.disabled = true;
  416. button8.disabled = true;
  417. btn_rgst_tmp.disabled = true;
  418. btn_rgst_sct.disabled = true;
  419. //btn_forcergst_sct.disabled = true; 2009-02-05 ycd 수술간호기록 수정작업 중 삭제 처리
  420. }else{
  421. switch1.disabled = false; //2008-08-25 오후 12:52:14 기존 로직 else문 삽입
  422. //caption37.visible = false;
  423. //caption39.visible = false;
  424. //caption44.visible = false;
  425. //caption45.visible = false;
  426. }
  427. //2008-08-25 오후 12:40:29 ===========================================================================
  428. }
  429. }
  430. //---------------------------------------------------------------------------------------------------------
  431. //2009-02-11 ycd 재수술일 경우 처리
  432. //재수술일 경우 상태값에 상관없이 처리함
  433. //---------------------------------------------------------------------------------------------------------
  434. else{
  435. if( model.getValue(xPathData+"/opstatcd").substr(1,1) == "9"){
  436. messageBox("취소된 수술스케줄 입니다.", "I000");
  437. btn_rgst_tmp.disabled = true;
  438. btn_rgst_sct.disabled = true;
  439. //btn_forcergst_sct.disabled = true; 2009-02-05 ycd 수술간호기록 수정작업 중 삭제 처리
  440. bbt_outroom.disabled = true;
  441. bbt_inroom.disabled = true;
  442. }else if (model.getValue(xPathData+"/ophistcd") != "O"){
  443. messageBox("취소된 수술스케줄 입니다.", "I000");
  444. bbt_outroom.disabled = true;
  445. bbt_inroom.disabled = true;
  446. btn_rgst_tmp.disabled = true;
  447. btn_rgst_sct.disabled = true;
  448. //btn_forcergst_sct.disabled = true; 2009-02-05 ycd 수술간호기록 수정작업 중 삭제 처리
  449. }
  450. //2008-09-03 taebum 오전 10:32:44 협진관련 화면 버튼 처리 추가
  451. if( (model.getValue(xPathData+"/oprsrvno") != model.getValue(xPathData+"/mainoprsrvno")) &&
  452. (model.getValue(xPathData+"/mainoprsrvno") != "-" ) ){
  453. //2008-09-02 오후 7:34:20 taebum add
  454. //==================================
  455. //입/퇴실 관련 비활성화 처리
  456. inp_patinroomdd.disabled = true;
  457. inp_patinroomhh.disabled = true;
  458. btn_patinroomhh.visible = false;
  459. bbt_inroom.visible = false;
  460. inp_patoutroomdd.disabled = true;
  461. inp_patoutroomhh.disabled = true;
  462. btn_patoutroomhh.visible = false;
  463. bbt_outroom.visible = false;
  464. //btn_patinroomhh.disabled = true;
  465. //btn_patoutroomhh.disabled = true;
  466. //bbt_outroom.disabled = true;
  467. //bbt_inroom.disabled = true;
  468. //수술시작/종료 활성화처리
  469. //inp_opfromdd.disabled = false;
  470. //inp_opfromhh.disabled = false;
  471. //bbt_opfromhh.disabled = false;
  472. //bbt_opfromhh.visible = true;
  473. //inp_optodd.disabled = false;
  474. //inp_optohh.disabled = false;
  475. //bbt_optohh.disabled = false;
  476. //bbt_optohh.visible = true;
  477. //퇴실장소 관련 비활성화 처리
  478. img2.disabled = true;
  479. cmb_outplc.disabled = true;
  480. ipt_opoutrmplcenm.disabled = true;
  481. }
  482. //grd_count.isReadOnly(1, 3, 1, 7); //instrument
  483. if (model.getValue(xPathData+"/certno") != ""){ // 인증저장후 자료 처리
  484. btn_rgst_tmp.disabled = true;
  485. }
  486. bbt_reload.disabled = false;
  487. var recendflag = model.getValue("/root/main/MnphopcrData/MnphopcrList/recendflag");
  488. //수술간호기록 마감됐는데도 기록지에서 마감체크가 안됐던 부분 오류 수정 by 박영우 2010-02-11
  489. if( ( recendflag == "1" )||( recendflag == "3" )) {//수술실이 마감에 포함되어 있으면
  490. messageBox("수술기록이 마감된 상태입니다. 기록을 할 수 없습니다.", "I000");
  491. switch1.disabled = true;
  492. //2009-02-09 ycd 수술간호기록 마감처리시 입실저장, 퇴실저장 버튼 비활성화되도록 변경
  493. bbt_inroom.disabled = true;
  494. bbt_inroom.disabled = true;
  495. btn_rgst_tmp.disabled = true;
  496. btn_rgst_sct.disabled = true;
  497. //btn_forcergst_sct.disabled = true; 2009-02-05 ycd 수술간호기록 수정작업 중 삭제 처리
  498. /*
  499. caption37.visible = false;
  500. caption39.visible = false;
  501. caption44.visible = false;
  502. caption45.visible = false;
  503. */
  504. }else {
  505. //2008-08-25 오후 12:40:29 마취의뢰만 할 경우, Angio방일 경우 입/퇴실 저장하는 로직 추가 ====================
  506. //group 로직으로 처리하려고 하였으나, 비정상적인 오류로 inputbox에 입력을 못하는 현상 발생으로 캡션으로 처리
  507. //Angio방은 0041 ~ 0049 임. 현재 0045 BMT방은 잘못된 방으로 삭제 예정
  508. var sAnstreqflag = model.getValue("/root/main/MnphopcrData/MnphopcrList/anstreqflag");
  509. var sRoomcd = model.getValue("/root/main/MnphopcrData/MnphopcrList/opbfpatcnfmspec/opbfpatcnfm/oproom");
  510. //alert("마취의뢰 구분 : "+sAnstreqflag);
  511. //alert("수술방 코드 : "+sRoomcd.substr(0,3));
  512. if((sAnstreqflag == "Y") && (sRoomcd.substr(0,3) == "004")){
  513. //2009-02-11 ycd 삭제 처리
  514. //caption37.visible = true;
  515. //caption39.visible = true;
  516. //caption44.visible = true;
  517. //caption45.visible = true;
  518. //2009-02-11 ycd Angio 환자일 경우 입퇴실 저장만 가능하도록 처리
  519. bbt_inroom.disabled = false;
  520. bbt_outroom.disabled = false;
  521. button7.disabled = true;
  522. button8.disabled = true;
  523. btn_rgst_tmp.disabled = true;
  524. btn_rgst_sct.disabled = true;
  525. //btn_forcergst_sct.disabled = true; 2009-02-05 ycd 수술간호기록 수정작업 중 삭제 처리
  526. }else{
  527. switch1.disabled = false; //2008-08-25 오후 12:52:14 기존 로직 else문 삽입
  528. //caption37.visible = false;
  529. //caption39.visible = false;
  530. //caption44.visible = false;
  531. //caption45.visible = false;
  532. }
  533. //2008-08-25 오후 12:40:29 ===========================================================================
  534. }
  535. }
  536. //fInstchk(); // 본원 칠곡 구분_손성훈
  537. model.refresh();
  538. //2008-07-22 오후 9:25:16 바코드 read를 위한 Focus 세팅
  539. model.setFocus("inp_patinroomhh");
  540. //2008-08-28 오전 9:46:06 taebum 상단정보와의 정보 불일치를 막기 위해 추가
  541. model.setAttribute("susulrec_oprsrvno", model.getValue("/root/main/operation/list/oprsrvno"));
  542. model.setAttribute("susulrec_pid", model.getValue("/root/temp/paminfo/list/pid"));
  543. model.setAttribute("susulrec_hngnm", model.getValue("/root/temp/paminfo/list/hngnm"));
  544. group2.visible = false;
  545. model.setFocus("input4");
  546. }
  547. /* ------------------------------------------------- */
  548. /* SMMNP00300_수술기록 */
  549. /* --------------------------------------------------*/
  550. function fReload(pFlag) {
  551. //model.refresh();
  552. var sParamFalg = "B";
  553. if(pFlag == ""){
  554. sParamFalg = "B";
  555. }else{
  556. sParamFalg = pFlag;
  557. }
  558. //기록 가져오기 버튼 클릭시에만 메시지창이 보이도록 수정
  559. if(sParamFalg == "B"){
  560. group2.visible = true;
  561. }
  562. //display 정보 초기화
  563. //2009-02-02 ycd 기록 항목 제거로 인하여 주석 처리
  564. /*
  565. model.setValue("/root/init/HideData/timeOutDisplayInfo/perfdr","");
  566. model.setValue("/root/init/HideData/timeOutDisplayInfo/nurse1","");
  567. model.setValue("/root/init/HideData/timeOutDisplayInfo/anstdr","");
  568. model.setValue("/root/init/HideData/timeOutDisplayInfo/nurse2","");
  569. */
  570. if ( !( (sParamFalg == "B")&&((model.getValue(xPathData+"/anstkindspec/anstkind/anstkindcheck03") != "")
  571. ||(model.getValue(xPathData+"/anstkindspec/anstkind/anstcprchk") != "")
  572. ||(model.getValue(xPathData+"/anstkindspec/anstkind/anstkindcheck99") != "")) ) ) {//국소, CPCR, 마취없음이 아니고 기록가져오기 일때만 셋팅
  573. for(var i = 1; i <= 5; i++){
  574. model.setValue("/root/init/workinst/OpeuLists/opeulist1["+i+"]/entrid1tmp" , "");
  575. model.setValue("/root/init/workinst/OpeuLists/opeulist1["+i+"]/entrid1" , "");
  576. model.setValue("/root/init/workinst/OpeuLists/opeulist1["+i+"]/entrnm1" , "");
  577. model.setValue("/root/init/workinst/OpeuLists/opeulist1["+i+"]/entrid2" , "");
  578. model.setValue("/root/init/workinst/OpeuLists/opeulist1["+i+"]/entrnm2" , "");
  579. model.setValue("/root/init/workinst/OpeuLists/opeulist1["+i+"]/entrid3tmp" , "");
  580. model.setValue("/root/init/workinst/OpeuLists/opeulist1["+i+"]/entrid3" , "");
  581. model.setValue("/root/init/workinst/OpeuLists/opeulist1["+i+"]/entrnm3" , "");
  582. model.setValue("/root/init/workinst/OpeuLists/opeulist1["+i+"]/deptcd1" , "");
  583. model.setValue("/root/init/workinst/OpeuLists/opeulist1["+i+"]/deptcd2" , "");
  584. model.setValue("/root/init/workinst/OpeuLists/opeulist1["+i+"]/deptcd3" , "");
  585. model.setValue("/root/init/workinst/OpeuLists/opeulist1["+i+"]/deptnm1" , "");
  586. model.setValue("/root/init/workinst/OpeuLists/opeulist1["+i+"]/deptnm2" , "");
  587. model.setValue("/root/init/workinst/OpeuLists/opeulist1["+i+"]/deptnm3" , "");
  588. // 2009-02-09 ycd 수술간호기록 화면 수정으로 인하여 추가
  589. model.setValue("/root/init/workinst/OpeuLists/opeulist1["+i+"]/entrtm1" , "");
  590. model.setValue("/root/init/workinst/OpeuLists/opeulist1["+i+"]/entrtm2" , "");
  591. model.setValue("/root/init/workinst/OpeuLists/opeulist1["+i+"]/entrtm3" , "");
  592. }
  593. for(var i = 1; i <= 5; i++){
  594. model.setValue("/root/init/workinst/OpeuLists/opeulist2["+i+"]/entrid1tmp","");
  595. model.setValue("/root/init/workinst/OpeuLists/opeulist2["+i+"]/entrid1","");
  596. model.setValue("/root/init/workinst/OpeuLists/opeulist2["+i+"]/entrnm1","");
  597. model.setValue("/root/init/workinst/OpeuLists/opeulist2["+i+"]/entrid2tmp","");
  598. model.setValue("/root/init/workinst/OpeuLists/opeulist2["+i+"]/entrid2","");
  599. model.setValue("/root/init/workinst/OpeuLists/opeulist2["+i+"]/entrnm2","");
  600. model.setValue("/root/init/workinst/OpeuLists/opeulist2["+i+"]/entrid3tmp","");
  601. model.setValue("/root/init/workinst/OpeuLists/opeulist2["+i+"]/entrid3","");
  602. model.setValue("/root/init/workinst/OpeuLists/opeulist2["+i+"]/entrnm3","");
  603. model.setValue("/root/init/workinst/OpeuLists/opeulist2["+i+"]/deptcd1","");
  604. model.setValue("/root/init/workinst/OpeuLists/opeulist2["+i+"]/deptcd2","");
  605. model.setValue("/root/init/workinst/OpeuLists/opeulist2["+i+"]/deptcd3","");
  606. model.setValue("/root/init/workinst/OpeuLists/opeulist2["+i+"]/deptnm1","");
  607. model.setValue("/root/init/workinst/OpeuLists/opeulist2["+i+"]/deptnm2","");
  608. model.setValue("/root/init/workinst/OpeuLists/opeulist2["+i+"]/deptnm3","");
  609. // 2009-02-09 ycd 수술간호기록 화면 수정으로 인하여 추가
  610. model.setValue("/root/init/workinst/OpeuLists/opeulist2["+i+"]/entrtm1" , "");
  611. model.setValue("/root/init/workinst/OpeuLists/opeulist2["+i+"]/entrtm2" , "");
  612. model.setValue("/root/init/workinst/OpeuLists/opeulist2["+i+"]/entrtm3" , "");
  613. }
  614. var sRtn = MnphopcrList_Read(sParamFalg);
  615. if (sRtn == false) {
  616. bbt_inroom.disabled = true;
  617. bbt_outroom.disabled = true;
  618. btn_rgst_tmp.disabled = true;
  619. btn_rgst_sct.disabled = true;
  620. //btn_forcergst_sct.disabled = true; 2009-02-05 ycd 수술간호기록 수정작업 중 삭제 처리
  621. return;
  622. }
  623. }
  624. fPackingMergeFalse();
  625. fMnphopco_Read();
  626. model.setValue(xPathData+"/eqmtuseyn","X");
  627. fSheetData3_Read("all");
  628. fSrchCareRecList();
  629. fSettingOPdate("all"); //수술관련 시간 참여자 정보에 자동 세팅 처리(집도의입실, 수술시작)
  630. //fSpecimenCheck(); // 검체 해당없음 check
  631. //TimeOut의료진 정보 display
  632. //2009-02-02 ycd 기록 항목 제거로 인하여 주석 처리
  633. /*
  634. model.setValue("root/init/HideData/timeOutDisplayInfo/perfdr", model.getValue("root/main/MnphopcrData/MnphopcrList/timeoutspec/timeout/perfdr"));
  635. model.setValue("root/init/HideData/timeOutDisplayInfo/nurse1", model.getValue("root/main/MnphopcrData/MnphopcrList/timeoutspec/timeout/nurse1"));
  636. model.setValue("root/init/HideData/timeOutDisplayInfo/anstdr", model.getValue("root/main/MnphopcrData/MnphopcrList/timeoutspec/timeout/anstdr"));
  637. model.setValue("root/init/HideData/timeOutDisplayInfo/nurse2", model.getValue("root/main/MnphopcrData/MnphopcrList/timeoutspec/timeout/nurse2"));
  638. */
  639. //2009-02-11 ycd 재수술 여부에 따른 버튼 활성화 부분 추가
  640. if(model.getValue(xPathData + "/reopflag") == "N"){
  641. // ---Test 시 막고하는 부분 ----------------------
  642. if( (model.getValue(xPathData+"/opstatcd") < "30")
  643. &&((model.getValue(xPathData+"/oprsrvno") == model.getValue(xPathData+"/mainoprsrvno"))||(model.getValue(xPathData+"/mainoprsrvno") == "-")) ){
  644. //기록 가져오기 버튼 클릭시에만 메시지창이 보이도록 수정
  645. if(sParamFalg == "B"){
  646. messageBox("임시저장만 가능합니다.", "I000"); //2008-09-02 오후 7:34:20 taebum
  647. }
  648. //messageBox("입실 전에는 기록을 작성", "E001"); //2008-09-02 오후 8:12:06 주석처리 taebum
  649. //messageBox("수술준비확인표를 작성하기 전에는 기록을 작성", "E001");
  650. //messageBox("수술진행 상태가 *대기*전에는 기록을 작성", "E001");
  651. //2008-09-02 오후 7:34:20 taebum add
  652. inp_patinroomdd.disabled = true;
  653. inp_patinroomhh.disabled = true;
  654. btn_patinroomhh.visible = false;
  655. bbt_inroom.visible = false;
  656. inp_patoutroomdd.disabled = true;
  657. inp_patoutroomhh.disabled = true;
  658. btn_patoutroomhh.visible = false;
  659. bbt_outroom.visible = false;
  660. //btn_patinroomhh.disabled = true;
  661. //btn_patoutroomhh.disabled = true;
  662. btn_rgst_sct.disabled = true;
  663. //btn_rgst_tmp.disabled = true; //2008-09-02 오후 8:19:32 taebum 주석처리
  664. //btn_forcergst_sct.disabled = true; //2009-02-05 ycd 수술간호기록 수정작업 중 삭제 처리
  665. //2009-02-17 삭제처리
  666. //전광판 관련 입퇴실 버튼을 활성화 시킨다.
  667. //bbt_outroom.disabled = false;
  668. //bbt_inroom.disabled = false;
  669. }else if( model.getValue(xPathData+"/opstatcd").substr(1,1) == "9"){
  670. messageBox("취소된 수술스케줄 입니다.", "I000");
  671. btn_rgst_tmp.disabled = true;
  672. btn_rgst_sct.disabled = true;
  673. bbt_outroom.disabled = true;
  674. bbt_inroom.disabled = true;
  675. //btn_forcergst_sct.disabled = true; 2009-02-05 ycd 수술간호기록 수정작업 중 삭제 처리
  676. }else if (model.getValue(xPathData+"/ophistcd") != "O"){
  677. messageBox("취소된 수술스케줄 입니다.", "I000");
  678. bbt_outroom.disabled = true;
  679. bbt_inroom.disabled = true;
  680. btn_rgst_tmp.disabled = true;
  681. btn_rgst_sct.disabled = true;
  682. //btn_forcergst_sct.disabled = true; 2009-02-05 ycd 수술간호기록 수정작업 중 삭제 처리
  683. }
  684. //2008-10-12 오후 5:01:15 수술실에서 준비확인 인증저장 안할 경우 메세지 처리
  685. if(model.getValue(xPathData+"/opstatcd") >= "30" && model.getValue(xPathData+"/operchfrecdttm") == ""){ //수술실에서 준비확인 인증저장을 안할 경우
  686. //기록 가져오기 버튼 클릭시에만 메시지창이 보이도록 수정
  687. if(sParamFalg == "B"){
  688. messageBox("수술실에서 준비확인을 하지 않았습니다. 임시저장만 가능합니다.", "I000");
  689. }
  690. bbt_outroom.disabled = true;
  691. bbt_inroom.disabled = true;
  692. btn_rgst_tmp.disabled = false;
  693. btn_rgst_sct.disabled = true;
  694. //btn_forcergst_sct.disabled = true; 2009-02-05 ycd 수술간호기록 수정작업 중 삭제 처리
  695. }
  696. //2008-09-03 taebum 오전 10:32:44 협진관련 화면 버튼 처리 추가
  697. if( (model.getValue(xPathData+"/oprsrvno") != model.getValue(xPathData+"/mainoprsrvno")) &&
  698. (model.getValue(xPathData+"/mainoprsrvno") != "-" ) ){
  699. /*
  700. if(model.getValue(xPathData+"/opstatcd") < "30"){
  701. //임시저장 기능만.
  702. btn_rgst_sct.disabled = true;
  703. }
  704. */
  705. //2008-09-02 오후 7:34:20 taebum add
  706. //==================================
  707. //입/퇴실 관련 비활성화 처리
  708. inp_patinroomdd.disabled = true;
  709. inp_patinroomhh.disabled = true;
  710. btn_patinroomhh.visible = false;
  711. bbt_inroom.visible = false;
  712. inp_patoutroomdd.disabled = true;
  713. inp_patoutroomhh.disabled = true;
  714. btn_patoutroomhh.visible = false;
  715. bbt_outroom.visible = false;
  716. //bbt_outroom.disabled = true;
  717. //bbt_inroom.disabled = true;
  718. //수술시작/종료 활성화처리
  719. //inp_opfromdd.disabled = false;
  720. //inp_opfromhh.disabled = false;
  721. //bbt_opfromhh.disabled = false;
  722. //bbt_opfromhh.visible = true;
  723. //inp_optodd.disabled = false;
  724. //inp_optohh.disabled = false;
  725. //bbt_optohh.disabled = false;
  726. //bbt_optohh.visible = true;
  727. //퇴실장소 관련 비활성화 처리
  728. img2.disabled = true;
  729. cmb_outplc.disabled = true;
  730. ipt_opoutrmplcenm.disabled = true;
  731. }
  732. //grd_count.isReadOnly(1, 3, 1, 7); //instrument
  733. if (model.getValue(xPathData+"/certno") != ""){ // 인증저장후 자료 처리
  734. btn_rgst_tmp.disabled = true;
  735. }
  736. bbt_reload.disabled = false;
  737. var recendflag = model.getValue("/root/main/MnphopcrData/MnphopcrList/recendflag");
  738. //수술간호기록 마감됐는데도 기록지에서 마감체크가 안됐던 부분 오류 수정 by 박영우 2010-02-11
  739. if( ( recendflag == "1" )||( recendflag == "3" )) {//수술실이 마감에 포함되어 있으면
  740. messageBox("수술기록이 마감된 상태입니다. 기록을 할 수 없습니다.", "I000");
  741. switch1.disabled = true;
  742. //2009-02-09 ycd 수술간호기록 마감처리시 입실저장, 퇴실저장 버튼 비활성화되도록 변경
  743. bbt_inroom.disabled = true;
  744. bbt_outroom.disabled = true;
  745. btn_rgst_tmp.disabled = true;
  746. btn_rgst_sct.disabled = true;
  747. //btn_forcergst_sct.disabled = true; 2009-02-05 ycd 수술간호기록 수정작업 중 삭제 처리
  748. /*
  749. caption37.visible = false;
  750. caption39.visible = false;
  751. caption44.visible = false;
  752. caption45.visible = false;
  753. */
  754. }else {
  755. //2008-08-25 오후 12:40:29 마취의뢰만 할 경우, Angio방일 경우 입/퇴실 저장하는 로직 추가 ====================
  756. //group 로직으로 처리하려고 하였으나, 비정상적인 오류로 inputbox에 입력을 못하는 현상 발생으로 캡션으로 처리
  757. //Angio방은 0041 ~ 0049 임. 현재 0045 BMT방은 잘못된 방으로 삭제 예정
  758. var sAnstreqflag = model.getValue("/root/main/MnphopcrData/MnphopcrList/anstreqflag");
  759. var sRoomcd = model.getValue("/root/main/MnphopcrData/MnphopcrList/opbfpatcnfmspec/opbfpatcnfm/oproom");
  760. //alert("마취의뢰 구분 : "+sAnstreqflag);
  761. //alert("수술방 코드 : "+sRoomcd.substr(0,3));
  762. if((sAnstreqflag == "Y") && (sRoomcd.substr(0,3) == "004")){
  763. //2009-02-11 ycd 삭제 처리
  764. //caption37.visible = true;
  765. //caption39.visible = true;
  766. //caption44.visible = true;
  767. //caption45.visible = true;
  768. //2009-02-11 ycd Angio 환자일 경우 입퇴실 저장만 가능하도록 처리
  769. bbt_inroom.disabled = false;
  770. bbt_outroom.disabled = false;
  771. button7.disabled = true;
  772. button8.disabled = true;
  773. btn_rgst_tmp.disabled = true;
  774. btn_rgst_sct.disabled = true;
  775. //btn_forcergst_sct.disabled = true; 2009-02-05 ycd 수술간호기록 수정작업 중 삭제 처리
  776. }else{
  777. switch1.disabled = false; //2008-08-25 오후 12:52:14 기존 로직 else문 삽입
  778. //caption37.visible = false;
  779. //caption39.visible = false;
  780. //caption44.visible = false;
  781. //caption45.visible = false;
  782. }
  783. }
  784. }
  785. //---------------------------------------------------------------------------------------------------------
  786. //2009-02-11 ycd 재수술일 경우 처리
  787. //재수술일 경우 상태값에 상관없이 처리함
  788. //---------------------------------------------------------------------------------------------------------
  789. else{
  790. if( model.getValue(xPathData+"/opstatcd").substr(1,1) == "9"){
  791. messageBox("취소된 수술스케줄 입니다.", "I000");
  792. btn_rgst_tmp.disabled = true;
  793. btn_rgst_sct.disabled = true;
  794. //btn_forcergst_sct.disabled = true; 2009-02-05 ycd 수술간호기록 수정작업 중 삭제 처리
  795. bbt_outroom.disabled = true;
  796. bbt_inroom.disabled = true;
  797. }else if (model.getValue(xPathData+"/ophistcd") != "O"){
  798. messageBox("취소된 수술스케줄 입니다.", "I000");
  799. bbt_outroom.disabled = true;
  800. bbt_inroom.disabled = true;
  801. btn_rgst_tmp.disabled = true;
  802. btn_rgst_sct.disabled = true;
  803. //btn_forcergst_sct.disabled = true; 2009-02-05 ycd 수술간호기록 수정작업 중 삭제 처리
  804. }
  805. //2008-09-03 taebum 오전 10:32:44 협진관련 화면 버튼 처리 추가
  806. if( (model.getValue(xPathData+"/oprsrvno") != model.getValue(xPathData+"/mainoprsrvno")) &&
  807. (model.getValue(xPathData+"/mainoprsrvno") != "-" ) ){
  808. //2008-09-02 오후 7:34:20 taebum add
  809. //==================================
  810. //입/퇴실 관련 비활성화 처리
  811. inp_patinroomdd.disabled = true;
  812. inp_patinroomhh.disabled = true;
  813. btn_patinroomhh.visible = false;
  814. bbt_inroom.visible = false;
  815. inp_patoutroomdd.disabled = true;
  816. inp_patoutroomhh.disabled = true;
  817. btn_patoutroomhh.visible = false;
  818. bbt_outroom.visible = false;
  819. //btn_patinroomhh.disabled = true;
  820. //btn_patoutroomhh.disabled = true;
  821. //bbt_outroom.disabled = true;
  822. //bbt_inroom.disabled = true;
  823. //수술시작/종료 활성화처리
  824. //inp_opfromdd.disabled = false;
  825. //inp_opfromhh.disabled = false;
  826. //bbt_opfromhh.disabled = false;
  827. //bbt_opfromhh.visible = true;
  828. //inp_optodd.disabled = false;
  829. //inp_optohh.disabled = false;
  830. //bbt_optohh.disabled = false;
  831. //bbt_optohh.visible = true;
  832. //퇴실장소 관련 비활성화 처리
  833. img2.disabled = true;
  834. cmb_outplc.disabled = true;
  835. ipt_opoutrmplcenm.disabled = true;
  836. }
  837. //grd_count.isReadOnly(1, 3, 1, 7); //instrument
  838. if (model.getValue(xPathData+"/certno") != ""){ // 인증저장후 자료 처리
  839. btn_rgst_tmp.disabled = true;
  840. }
  841. bbt_reload.disabled = false;
  842. var recendflag = model.getValue("/root/main/MnphopcrData/MnphopcrList/recendflag");
  843. //수술간호기록 마감됐는데도 기록지에서 마감체크가 안됐던 부분 오류 수정 by 박영우 2010-02-11
  844. if( ( recendflag == "1" )||( recendflag == "3" )) {//수술실이 마감에 포함되어 있으면
  845. messageBox("수술기록이 마감된 상태입니다. 기록을 할 수 없습니다.", "I000");
  846. switch1.disabled = true;
  847. //2009-02-09 ycd 수술간호기록 마감처리시 입실저장, 퇴실저장 버튼 비활성화되도록 변경
  848. bbt_inroom.disabled = true;
  849. bbt_inroom.disabled = true;
  850. btn_rgst_tmp.disabled = true;
  851. btn_rgst_sct.disabled = true;
  852. //btn_forcergst_sct.disabled = true; 2009-02-05 ycd 수술간호기록 수정작업 중 삭제 처리
  853. /*
  854. caption37.visible = false;
  855. caption39.visible = false;
  856. caption44.visible = false;
  857. caption45.visible = false;
  858. */
  859. }else {
  860. //2008-08-25 오후 12:40:29 마취의뢰만 할 경우, Angio방일 경우 입/퇴실 저장하는 로직 추가 ====================
  861. //group 로직으로 처리하려고 하였으나, 비정상적인 오류로 inputbox에 입력을 못하는 현상 발생으로 캡션으로 처리
  862. //Angio방은 0041 ~ 0049 임. 현재 0045 BMT방은 잘못된 방으로 삭제 예정
  863. var sAnstreqflag = model.getValue("/root/main/MnphopcrData/MnphopcrList/anstreqflag");
  864. var sRoomcd = model.getValue("/root/main/MnphopcrData/MnphopcrList/opbfpatcnfmspec/opbfpatcnfm/oproom");
  865. //alert("마취의뢰 구분 : "+sAnstreqflag);
  866. //alert("수술방 코드 : "+sRoomcd.substr(0,3));
  867. if((sAnstreqflag == "Y") && (sRoomcd.substr(0,3) == "004")){
  868. //2009-02-11 ycd 삭제 처리
  869. //caption37.visible = true;
  870. //caption39.visible = true;
  871. //caption44.visible = true;
  872. //caption45.visible = true;
  873. //2009-02-11 ycd Angio 환자일 경우 입퇴실 저장만 가능하도록 처리
  874. bbt_inroom.disabled = false;
  875. bbt_outroom.disabled = false;
  876. button7.disabled = true;
  877. button8.disabled = true;
  878. btn_rgst_tmp.disabled = true;
  879. btn_rgst_sct.disabled = true;
  880. //btn_forcergst_sct.disabled = true; 2009-02-05 ycd 수술간호기록 수정작업 중 삭제 처리
  881. }else{
  882. switch1.disabled = false; //2008-08-25 오후 12:52:14 기존 로직 else문 삽입
  883. //caption37.visible = false;
  884. //caption39.visible = false;
  885. //caption44.visible = false;
  886. //caption45.visible = false;
  887. }
  888. }
  889. }
  890. model.refresh();
  891. group2.visible = false;
  892. }
  893. /* ------------------------------------------------- */
  894. /* SMMNP00300_수술기록 */
  895. /* On Load 시 Call */
  896. /* ------------------------------------------------- */
  897. /* group : EMR 간호 수술마취 */
  898. /* ver : 2007.05.15 */
  899. /* by : 최학록 */
  900. /* --------------------------------------------------*/
  901. /* type : function */
  902. /* access : public */
  903. /* desc : 수술방정보 가져오기 */
  904. /* param : 기관코드 */
  905. /* return : */
  906. /* --------------------------------------------------*/
  907. function OpRoomCode_Read() {
  908. model.removenode("/root/send");
  909. model.makeValue("/root/send/flag" , "userid" );
  910. model.makeValue("/root/send/searchitem" , "00009006" );
  911. submit("TRMNP00301", false); // 수술실의 코드와 명칭을 가져온다.
  912. }
  913. /* ------------------------------------------------- */
  914. /* SMMNP00300_수술기록 */
  915. /* On Load 시 Call */
  916. /* ------------------------------------------------- */
  917. /* group : EMR 간호 수술마취 */
  918. /* ver : 2009.03.31 */
  919. /* by : 양천덕 */
  920. /* --------------------------------------------------*/
  921. /* type : function */
  922. /* access : public */
  923. /* desc : 수술후퇴실장소, 피부소독제 정보 조회 */
  924. /* param : 기관코드 */
  925. /* return : */
  926. /* --------------------------------------------------*/
  927. function OpRecBasic_Read() {
  928. model.removenode("/root/send");
  929. model.makeValue("/root/send/cdgrupid" , "041" );
  930. //------(20110512) 불일치시 조치 사항 정보 추가(06)
  931. //model.makeValue("/root/send/lrgclscd" , "04, 05" );
  932. model.makeValue("/root/send/lrgclscd" , "04, 05, 06" );
  933. //------(20110512) 불일치시 조치 사항 정보 추가
  934. submit("TRMNP00324", false); // 퇴실장소구분, 피부소독제 정보 조회, 불일치시 조치 사항 정보 추가
  935. /*
  936. var CountListCapValue = "";
  937. if(getNodesetCount("/root/init/HideData/OpBasicCdList/cntlistresn") > 0 ){
  938. for(var i = 1 ; i <= getNodesetCount("/root/init/HideData/OpBasicCdList/cntlistresn") ; i++){
  939. if(model.getValue("/root/init/HideData/OpBasicCdList/cntlistresn["+i+"]/cdid") != "-" ){
  940. CountListCapValue += model.getValue("/root/init/HideData/OpBasicCdList/cntlistresn["+i+"]/cdnm") +". "
  941. + model.getValue("/root/init/HideData/OpBasicCdList/cntlistresn["+i+"]/cddesc") +" ";
  942. }
  943. }
  944. }
  945. caption11.value = CountListCapValue;
  946. caption11.refresh();
  947. */
  948. }
  949. /* ------------------------------------------------- */
  950. /* SMMNP00300_수술기록 */
  951. /* On Load 시 Call */
  952. /* ------------------------------------------------- */
  953. /* group : EMR 간호 수술마취 */
  954. /* ver : 2009.03.31 */
  955. /* by : 양천덕 */
  956. /* --------------------------------------------------*/
  957. /* type : function */
  958. /* access : public */
  959. /* desc : 수술물품확인 Count관리 내역 정보를 */
  960. /* 조회 요청을 처리한다 */
  961. /* param : 기관코드 */
  962. /* return : */
  963. /* --------------------------------------------------*/
  964. function fMnphopco_Read() {
  965. model.removenode("/root/send");
  966. model.makeValue("/root/send/instcd" , model.getValue("/root/init/HideData/instcd" ));
  967. model.makeValue("/root/send/oprsrvno" , model.getValue("/root/init/HideData/oprsrvno"));
  968. submit("TRMNP00303"); // 수술물품확인 Count관리 내역 조회
  969. //=================================================================
  970. //2008-06-17 오후 5:37:10 taebum add
  971. if(getNodesetCount("/root/main/MnphopcoLists/mnphopcolist") < 1){
  972. // 2009-09-10 멀티 Count Sheet 추가 구현 부분 추가(INSTRUMENT 추가로 Sheet 구분 처리)
  973. fAddCountSheet();
  974. //grd_count.refresh();
  975. //grd_count.isReadOnly(2, grd_count.colRef("nacls"), 2, grd_count.colRef("packqty")) = true;
  976. //grd_count.cellStyle("background-color", 2, grd_count.colRef("nacls"), 2, grd_count.colRef("packqty")) = "#DCDACS";
  977. return;
  978. }
  979. //=================================================================
  980. //Sheet별 스타일 적용을 위하여 별도 함수로 설정
  981. fSetCountSheetStyle();
  982. //grd_count.fixedcellcheckbox(0, grd_count.colRef("nacls")) = true;
  983. //grd_count.fixedcellcheckbox(1, grd_count.colRef("nacls")) = true;
  984. //grd_count.fixedcellcheckbox(1, grd_count.colRef("samey")) = true;
  985. //grd_count.fixedcellcheckbox(1, grd_count.colRef("samen")) = true;
  986. //
  987. // End Of for (var i=1; i<= sRowCnt; i++)
  988. // INSTRUMENT 인경우는 Clear한다.
  989. //model.setValue(CountPath + "[" + 1 +"]/initqty" , ""); // 04
  990. //model.setValue(CountPath + "[" + 1 +"]/addqty" , ""); // 05
  991. //model.setValue(CountPath + "[" + 1 +"]/totqty" , ""); // 06
  992. //model.setValue(CountPath + "[" + 1 +"]/packqty" , ""); // 07
  993. //grd_count.isReadOnly(2, grd_count.colRef("nacls"), 2, grd_count.colRef("packqty")) = true;
  994. //grd_count.cellStyle("background-color", 2, grd_count.colRef("nacls"), 2, grd_count.colRef("packqty")) = "#DCDACS";
  995. }
  996. /* ------------------------------------------------- */
  997. /* SMMNP00300_수술기록 */
  998. /* On Load 시 또는 Count Sheet 추가시 Call */
  999. /* ------------------------------------------------- */
  1000. /* group : EMR 간호 수술마취 */
  1001. /* ver : 2009.09.10 */
  1002. /* by : 양천덕 */
  1003. /* --------------------------------------------------*/
  1004. /* type : function */
  1005. /* access : public */
  1006. /* desc : Count Sheet INSTRUMENT 추가 로직 */
  1007. /* 하드코딩 제거 해야함 */
  1008. /* param : */
  1009. /* return : */
  1010. /* --------------------------------------------------*/
  1011. function fAddCountSheet(){
  1012. var ChkRecNo = "" ;
  1013. var CountSheetRowCnt = getNodesetCount(CountPath);
  1014. var InsRow = eval(CountSheetRowCnt) + 1 ;
  1015. //2009-09-11 ycd Sheet Seq 확인
  1016. for(var i = 1 ; i <= CountSheetRowCnt ; i++){
  1017. ChkRecNo = model.getValue(CountPath + "["+i+"]/recno");
  1018. }
  1019. if(ChkRecNo != "" ){
  1020. ChkRecNo = eval(ChkRecNo) + 1;
  1021. }else{
  1022. ChkRecNo = 1;
  1023. }
  1024. //2009-09-11 ycd Sheet 구분 로우 생성을 하기 위해 Temp 노드에 copy작업 추가
  1025. model.removeNode("/root/temp/MnphopcoLists");
  1026. // 2008-06-30 오전 10:59:20 taebum 신규일 경우 instrument만 자동 생성한다.
  1027. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsRow+"]/codenm1" , "INSTRUMENT" );
  1028. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsRow+"]/codenm2" , "INSTRUMENT" );
  1029. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsRow+"]/codenm3" , "INSTRUMENT" );
  1030. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsRow+"]/nacls" , "false" );
  1031. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsRow+"]/naclsinucd" , "-" );
  1032. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsRow+"]/initqty" , "" );
  1033. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsRow+"]/addqty" , "" );
  1034. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsRow+"]/totqty" , "" );
  1035. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsRow+"]/packqty" , "" );
  1036. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsRow+"]/nursnm11" , "" );
  1037. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsRow+"]/nursnm12" , "" );
  1038. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsRow+"]/nursnm21" , "" );
  1039. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsRow+"]/nursnm22" , "" );
  1040. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsRow+"]/nursnm31" , "" );
  1041. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsRow+"]/nursnm32" , "" );
  1042. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsRow+"]/nursnm41" , "" );
  1043. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsRow+"]/nursnm42" , "" );
  1044. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsRow+"]/samey" , "true" );
  1045. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsRow+"]/samen" , "false" );
  1046. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsRow+"]/nursid11" , "" );
  1047. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsRow+"]/nursid12" , "" );
  1048. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsRow+"]/nursid21" , "" );
  1049. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsRow+"]/nursid22" , "" );
  1050. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsRow+"]/nursid31" , "" );
  1051. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsRow+"]/nursid32" , "" );
  1052. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsRow+"]/nursid41" , "" );
  1053. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsRow+"]/nursid42" , "" );
  1054. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsRow+"]/deptcd11" , "" );
  1055. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsRow+"]/deptcd12" , "" );
  1056. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsRow+"]/deptcd21" , "" );
  1057. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsRow+"]/deptcd22" , "" );
  1058. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsRow+"]/deptcd31" , "" );
  1059. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsRow+"]/deptcd32" , "" );
  1060. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsRow+"]/deptcd41" , "" );
  1061. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsRow+"]/deptcd42" , "" );
  1062. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsRow+"]/deptnm11" , "" );
  1063. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsRow+"]/deptnm12" , "" );
  1064. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsRow+"]/deptnm21" , "" );
  1065. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsRow+"]/deptnm22" , "" );
  1066. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsRow+"]/deptnm31" , "" );
  1067. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsRow+"]/deptnm32" , "" );
  1068. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsRow+"]/deptnm41" , "" );
  1069. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsRow+"]/deptnm42" , "" );
  1070. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsRow+"]/checkid11" , "" );
  1071. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsRow+"]/checkid12" , "" );
  1072. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsRow+"]/checkid21" , "" );
  1073. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsRow+"]/checkid22" , "" );
  1074. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsRow+"]/checkid31" , "" );
  1075. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsRow+"]/checkid32" , "" );
  1076. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsRow+"]/checkid41" , "" );
  1077. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsRow+"]/checkid42" , "" );
  1078. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsRow+"]/packspec" , "" );
  1079. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsRow+"]/kindcd" , "00" );
  1080. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsRow+"]/refseq" , "1" );
  1081. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsRow+"]/recflag" , "I" );
  1082. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsRow+"]/recno" , ChkRecNo );
  1083. //---(20101024) 경북대
  1084. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsRow+"]/discordaction" , "" );
  1085. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsRow+"]/discordactionetc" , "" );
  1086. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsRow+"]/discordactionnm" , "" );
  1087. //---(20101024) 경북대
  1088. fSetCountSheetStyle();
  1089. // grd_count.refresh();
  1090. // grd_count.isReadOnly(InsRow, grd_count.colRef("nacls"), InsRow, grd_count.colRef("packqty")) = true;
  1091. // grd_count.cellStyle("background-color", InsRow, grd_count.colRef("nacls"), InsRow, grd_count.colRef("packqty")) = "#DCDACS";
  1092. }
  1093. /* ------------------------------------------------- */
  1094. /* SMMNP00300_수술기록 */
  1095. /* Count Sheet 삭제 및 복구 시 Call */
  1096. /* ------------------------------------------------- */
  1097. /* group : EMR 간호 수술마취 */
  1098. /* ver : 2009.09.16 */
  1099. /* by : 양천덕 */
  1100. /* --------------------------------------------------*/
  1101. /* type : function */
  1102. /* access : public */
  1103. /* desc : Sheet 삭제 및 복구 */
  1104. /* param : */
  1105. /* return : */
  1106. /* --------------------------------------------------*/
  1107. function fDeleteCountSheet(pRow){
  1108. //if(grd_count.valueMatrix(pRow, grd_count.colRef("recflag")) != "-" ) {
  1109. // messageBox("삭제 및 삭제 취소할 Sheet Title을 선택하십시요", "I");
  1110. // return;
  1111. //}
  1112. var FindDelRecno = grd_count.valueMatrix(pRow, grd_count.colRef("recno"));
  1113. var recflag = grd_count.valueMatrix(pRow, grd_count.colRef("recflag"));
  1114. var CountSheetRowCnt = getNodesetCount(CountPath);
  1115. if( FindDelRecno == "1" && recflag == "-") {
  1116. messageBox("Sheet No.1은 삭제할 수 없습니다.", "E000");
  1117. return;
  1118. }
  1119. if(grd_count.valueMatrix(pRow, grd_count.colRef("recflag")) == "-" ) {
  1120. for(var i = 1 ; i <= CountSheetRowCnt ; i++){
  1121. if(model.getValue("/root/main/MnphopcoLists/mnphopcolist["+i+"]/recno") == FindDelRecno){
  1122. if(model.getValue("/root/main/MnphopcoLists/mnphopcolist["+i+"]/recflag") == "I" ){
  1123. model.setValue("/root/main/MnphopcoLists/mnphopcolist["+i+"]/recflag", "X");
  1124. }else if(model.getValue("/root/main/MnphopcoLists/mnphopcolist["+i+"]/recflag") == "U" ){
  1125. model.setValue("/root/main/MnphopcoLists/mnphopcolist["+i+"]/recflag", "D");
  1126. }else if(model.getValue("/root/main/MnphopcoLists/mnphopcolist["+i+"]/recflag") == "X" ){
  1127. model.setValue("/root/main/MnphopcoLists/mnphopcolist["+i+"]/recflag", "I");
  1128. }else if(model.getValue("/root/main/MnphopcoLists/mnphopcolist["+i+"]/recflag") == "D" ){
  1129. model.setValue("/root/main/MnphopcoLists/mnphopcolist["+i+"]/recflag", "U");
  1130. }
  1131. }
  1132. }
  1133. } else {
  1134. if(grd_count.valueMatrix(pRow, grd_count.colRef("recflag")) == "I") {
  1135. grd_count.valueMatrix(pRow, grd_count.colRef("recflag")) = "X";
  1136. } else if(grd_count.valueMatrix(pRow, grd_count.colRef("recflag")) == "U") {
  1137. grd_count.valueMatrix(pRow, grd_count.colRef("recflag")) = "D";
  1138. } else if(grd_count.valueMatrix(pRow, grd_count.colRef("recflag")) == "X") {
  1139. grd_count.valueMatrix(pRow, grd_count.colRef("recflag")) = "I";
  1140. } else if(grd_count.valueMatrix(pRow, grd_count.colRef("recflag")) == "D") {
  1141. grd_count.valueMatrix(pRow, grd_count.colRef("recflag")) = "D";
  1142. }
  1143. }
  1144. grd_count.rebuildStyle();
  1145. fSetStyle();
  1146. }
  1147. /* ------------------------------------------------- */
  1148. /* SMMNP00300_수술기록 */
  1149. /* On Load 시 또는 Count Sheet 추가시 Call */
  1150. /* ------------------------------------------------- */
  1151. /* group : EMR 간호 수술마취 */
  1152. /* ver : 2009.09.10 */
  1153. /* by : 양천덕 */
  1154. /* --------------------------------------------------*/
  1155. /* type : function */
  1156. /* access : public */
  1157. /* desc : Sheet 구분 Row추가 */
  1158. /* param : */
  1159. /* return : */
  1160. /* --------------------------------------------------*/
  1161. function fSetCountSheetStyle(){
  1162. //스타일 적용전 MAIN -> TEMP NODE로 COPY 처리
  1163. model.makeNode("/root/temp/MnphopcoLists");
  1164. model.removeNodeset("/root/main/MnphopcoLists/mnphopcolist[recflag = '-']");
  1165. model.copyNode("/root/temp/MnphopcoLists", "/root/main/MnphopcoLists");
  1166. model.removeNodeset("/root/main/MnphopcoLists/mnphopcolist");
  1167. var CountSheetRowCnt = getNodesetCount("/root/temp/MnphopcoLists/mnphopcolist");
  1168. var BfChkRecNo = 0;
  1169. var AfChkRecNo = 0;
  1170. var SheetNum = 1;
  1171. //2009-09-11 ycd Sheet 구분 행 추가 및 이전 기록 Node Copy
  1172. for(var i = 1 ; i <= CountSheetRowCnt ; i++){
  1173. AfChkRecNo = model.getValue("/root/temp/MnphopcoLists/mnphopcolist["+i+"]/recno");
  1174. InsSheetRow = eval(getNodesetCount("/root/main/MnphopcoLists/mnphopcolist"))+1;
  1175. if(BfChkRecNo != AfChkRecNo){
  1176. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsSheetRow+"]/codenm1" , "Sheet No." + SheetNum );
  1177. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsSheetRow+"]/codenm2" , "" );
  1178. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsSheetRow+"]/codenm3" , "" );
  1179. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsSheetRow+"]/nacls" , "" );
  1180. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsSheetRow+"]/naclsinucd" , "" );
  1181. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsSheetRow+"]/initqty" , "" );
  1182. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsSheetRow+"]/addqty" , "" );
  1183. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsSheetRow+"]/totqty" , "" );
  1184. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsSheetRow+"]/packqty" , "" );
  1185. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsSheetRow+"]/nursnm11" , "" );
  1186. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsSheetRow+"]/nursnm12" , "" );
  1187. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsSheetRow+"]/nursnm21" , "" );
  1188. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsSheetRow+"]/nursnm22" , "" );
  1189. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsSheetRow+"]/nursnm31" , "" );
  1190. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsSheetRow+"]/nursnm32" , "" );
  1191. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsSheetRow+"]/nursnm41" , "" );
  1192. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsSheetRow+"]/nursnm42" , "" );
  1193. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsSheetRow+"]/samey" , "" );
  1194. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsSheetRow+"]/samen" , "" );
  1195. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsSheetRow+"]/nursid11" , "" );
  1196. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsSheetRow+"]/nursid12" , "" );
  1197. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsSheetRow+"]/nursid21" , "" );
  1198. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsSheetRow+"]/nursid22" , "" );
  1199. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsSheetRow+"]/nursid31" , "" );
  1200. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsSheetRow+"]/nursid32" , "" );
  1201. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsSheetRow+"]/nursid41" , "" );
  1202. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsSheetRow+"]/nursid42" , "" );
  1203. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsSheetRow+"]/deptcd11" , "" );
  1204. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsSheetRow+"]/deptcd12" , "" );
  1205. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsSheetRow+"]/deptcd21" , "" );
  1206. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsSheetRow+"]/deptcd22" , "" );
  1207. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsSheetRow+"]/deptcd31" , "" );
  1208. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsSheetRow+"]/deptcd32" , "" );
  1209. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsSheetRow+"]/deptcd41" , "" );
  1210. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsSheetRow+"]/deptcd42" , "" );
  1211. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsSheetRow+"]/deptnm11" , "" );
  1212. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsSheetRow+"]/deptnm12" , "" );
  1213. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsSheetRow+"]/deptnm21" , "" );
  1214. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsSheetRow+"]/deptnm22" , "" );
  1215. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsSheetRow+"]/deptnm31" , "" );
  1216. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsSheetRow+"]/deptnm32" , "" );
  1217. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsSheetRow+"]/deptnm41" , "" );
  1218. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsSheetRow+"]/deptnm42" , "" );
  1219. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsSheetRow+"]/checkid11" , "" );
  1220. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsSheetRow+"]/checkid12" , "" );
  1221. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsSheetRow+"]/checkid21" , "" );
  1222. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsSheetRow+"]/checkid22" , "" );
  1223. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsSheetRow+"]/checkid31" , "" );
  1224. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsSheetRow+"]/checkid32" , "" );
  1225. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsSheetRow+"]/checkid41" , "" );
  1226. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsSheetRow+"]/checkid42" , "" );
  1227. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsSheetRow+"]/packspec" , "" );
  1228. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsSheetRow+"]/kindcd" , "00" );
  1229. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsSheetRow+"]/refseq" , "1" );
  1230. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsSheetRow+"]/recflag" , "-" );
  1231. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsSheetRow+"]/recno" , AfChkRecNo );
  1232. //-----(20101024) 경북대
  1233. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsSheetRow+"]/discordaction" , "" );
  1234. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsSheetRow+"]/discordactionetc" , "" );
  1235. model.makeValue("/root/main/MnphopcoLists/mnphopcolist["+InsSheetRow+"]/discordactionnm" , "" );
  1236. //-----(20101024) 경북대
  1237. InsSheetRow = eval(InsSheetRow) + 1;
  1238. model.makeNode("/root/main/MnphopcoLists/mnphopcolist["+InsSheetRow+"]");
  1239. model.copyNode("/root/main/MnphopcoLists/mnphopcolist["+InsSheetRow+"]", "/root/temp/MnphopcoLists/mnphopcolist["+i+"]");
  1240. SheetNum++;
  1241. BfChkRecNo = AfChkRecNo;
  1242. }else{
  1243. model.makeNode("/root/main/MnphopcoLists/mnphopcolist["+InsSheetRow+"]");
  1244. model.copyNode("/root/main/MnphopcoLists/mnphopcolist["+InsSheetRow+"]", "/root/temp/MnphopcoLists/mnphopcolist["+i+"]");
  1245. }
  1246. }
  1247. grd_count.rebuild();
  1248. //sRowCnt = grd_count.rows - grd_count.fixedRows;
  1249. //2009-02-26 이전 기록에 대해서도 처리를 할 수 있도록 예외 처리 부분 추가
  1250. /*
  1251. if (grd_count.valueMatrix(i, grd_count.colRef("nacls")) == 'true') {
  1252. if(i == 1){
  1253. fReadOnlyFlag(grd_count, i+1, i+1, grd_count.colRef("nacls"), grd_count.colRef("nursnm42"), true);
  1254. grd_count.cellStyle("background-color", i+1, grd_count.colRef("nacls"), i+1, grd_count.colRef("packqty")) = "#DCDACS";
  1255. }else{
  1256. fReadOnlyFlag(grd_count, i+1, i+1, grd_count.colRef("initqty"), grd_count.colRef("samen"), true);
  1257. }
  1258. }else{
  1259. if(i == 1){
  1260. if(model.getValue(CountPath + "["+ (i) +"]/samen") == 'true'){
  1261. if(model.getValue(xPathData+"/oprsrvno") != model.getValue(xPathData+"/mainoprsrvno") && model.getValue(xPathData+"/mainoprsrvno") != "-" ){
  1262. model.setValue(CountPath + "["+ (i) +"]/nacls", 'true');
  1263. model.setValue(CountPath + "["+ (i) +"]/naclsinucd", "9");
  1264. fReadOnlyFlag(grd_count, i+1, i+1, grd_count.colRef("nacls"), grd_count.colRef("nursnm42"), true);
  1265. grd_count.cellStyle("background-color", i+1, grd_count.colRef("nacls"), i+1, grd_count.colRef("packqty")) = "#DCDACS";
  1266. }else{
  1267. model.setValue(CountPath + "["+ (i) +"]/initqty", "");
  1268. model.setValue(CountPath + "["+ (i) +"]/addqty" , "");
  1269. model.setValue(CountPath + "["+ (i) +"]/totqty" , "");
  1270. model.setValue(CountPath + "["+ (i) +"]/packqty", "");
  1271. grd_count.isReadOnly(i+1, grd_count.colRef("nacls"), i+1, grd_count.colRef("packqty")) = true;
  1272. grd_count.cellStyle("background-color", i+1, grd_count.colRef("nacls"), i+1, grd_count.colRef("packqty")) = "#DCDACS";
  1273. }
  1274. }else{
  1275. model.setValue(CountPath + "["+ (i) +"]/initqty", "");
  1276. model.setValue(CountPath + "["+ (i) +"]/addqty" , "");
  1277. model.setValue(CountPath + "["+ (i) +"]/totqty" , "");
  1278. model.setValue(CountPath + "["+ (i) +"]/packqty", "");
  1279. model.setValue(CountPath + "["+ (i) +"]/samey" , 'true');
  1280. model.setValue(CountPath + "["+ (i) +"]/samen" , 'false');
  1281. grd_count.isReadOnly(i+1, grd_count.colRef("nacls"), i+1, grd_count.colRef("packqty")) = true;
  1282. grd_count.cellStyle("background-color", i+1, grd_count.colRef("nacls"), i+1, grd_count.colRef("packqty")) = "#DCDACS";
  1283. }
  1284. }else{
  1285. grd_count.isReadOnly((i+1), grd_count.colRef("naclsinucd"), (i+1), grd_count.colRef("naclsinucd")) = true;
  1286. }
  1287. }
  1288. }
  1289. */
  1290. // 2009-09-14 ycd 색상 지정
  1291. fSetStyle();
  1292. }
  1293. /* ------------------------------------------------- */
  1294. /* SMMNP00300_수술기록 */
  1295. /* Count Sheet 생상 및 merge 처리 */
  1296. /* ------------------------------------------------- */
  1297. /* group : EMR 간호 수술마취 */
  1298. /* ver : 2009.09.14 */
  1299. /* by : 양천덕 */
  1300. /* --------------------------------------------------*/
  1301. /* type : function */
  1302. /* access : public */
  1303. /* desc : 화면 style 설정 처리 */
  1304. /* param : */
  1305. /* return : */
  1306. /* --------------------------------------------------*/
  1307. function fSetStyle(){
  1308. //2009-09-11 YCD Count Sheet 멀티 기록 처리
  1309. //Sheet 별로 구별할 수 있는 Row 추가 및 스타일 별도 적용
  1310. var CntListOprsrvNo = model.getValue(xPathData+"/oprsrvno");
  1311. var CntListMainOprsrvNo = model.getValue(xPathData+"/mainoprsrvno");
  1312. for (var i = grd_count.fixedRows; i <= grd_count.rows - grd_count.fixedRows + 1 ; i++) {
  1313. var CntListRecFlag = grd_count.valueMatrix(i, grd_count.colRef("recflag"));
  1314. var CntListKindCd = grd_count.valueMatrix(i, grd_count.colRef("kindcd"));
  1315. var CntListNacls = grd_count.valueMatrix(i, grd_count.colRef("nacls"));
  1316. var CntListSamen = grd_count.valueMatrix(i, grd_count.colRef("samen"));
  1317. if(CntListRecFlag == "-"){
  1318. grd_count.mergeByFree(i, grd_count.fixedCols, i, grd_count.cols-1);
  1319. grd_count.isReadOnly(i,grd_count.fixedCols, i, grd_count.cols-1) = true;
  1320. grd_count.rowStyle(i,"data","background-color") = "#c0c0c0";
  1321. grd_count.rowStyle(i,"data","font-weight") = "bold";
  1322. }else{
  1323. //Sheet 삭제 처리
  1324. if(CntListRecFlag == "D" || CntListRecFlag == "X"){
  1325. grd_count.cellStyle("color", i, grd_count.colRef("codenm1"), i, grd_count.colRef("samen")) = "#ff0000";
  1326. grd_count.cellStyle("font_weight", i, grd_count.colRef("codenm1"), i, grd_count.colRef("samen")) = "bold";
  1327. grd_count.cellStyle("background-color", i, grd_count.colRef("codenm1"), i, grd_count.colRef("samen")) = "#ffff99";
  1328. }else{
  1329. if(CntListKindCd == "00"){
  1330. if(CntListNacls == 'true'){
  1331. fReadOnlyFlag(grd_count, i, i, grd_count.colRef("nacls"), grd_count.colRef("nursnm42"), true);
  1332. }else{
  1333. if(CntListSamen == 'true'){
  1334. if(CntListOprsrvNo != CntListMainOprsrvNo && CntListMainOprsrvNo != "-" ){
  1335. grd_count.valueMatrix(i, grd_count.colRef("nacls" )) = 'true';
  1336. grd_count.valueMatrix(i, grd_count.colRef("naclsinucd" )) = "9";
  1337. fReadOnlyFlag(grd_count, i, i, grd_count.colRef("nacls"), grd_count.colRef("nursnm42"), true);
  1338. }else{
  1339. grd_count.valueMatrix(i, grd_count.colRef("initqty" )) = "";
  1340. grd_count.valueMatrix(i, grd_count.colRef("addqty" )) = "";
  1341. grd_count.valueMatrix(i, grd_count.colRef("totqty" )) = "";
  1342. grd_count.valueMatrix(i, grd_count.colRef("packqty" )) = "";
  1343. grd_count.isReadOnly(i, grd_count.colRef("nacls"), i, grd_count.colRef("packqty")) = true;
  1344. }
  1345. }else{
  1346. grd_count.valueMatrix(i, grd_count.colRef("initqty")) = "";
  1347. grd_count.valueMatrix(i, grd_count.colRef("addqty" )) = "";
  1348. grd_count.valueMatrix(i, grd_count.colRef("totqty" )) = "";
  1349. grd_count.valueMatrix(i, grd_count.colRef("packqty")) = "";
  1350. grd_count.valueMatrix(i, grd_count.colRef("samey" )) = 'true';
  1351. grd_count.valueMatrix(i, grd_count.colRef("samen" )) = 'false';
  1352. grd_count.isReadOnly(i, grd_count.colRef("nacls"), i, grd_count.colRef("packqty")) = true;
  1353. }
  1354. grd_count.isReadOnly(i, grd_count.colRef("nacls"), i, grd_count.colRef("packqty")) = true;
  1355. }
  1356. grd_count.cellStyle("background-color", i, grd_count.colRef("nacls"), i, grd_count.colRef("packqty")) = "#DCDACS";
  1357. }else{
  1358. if(CntListNacls == 'true'){
  1359. fReadOnlyFlag(grd_count, i, i, grd_count.colRef("initqty"), grd_count.colRef("samen"), true);
  1360. }else{
  1361. grd_count.isReadOnly(i, grd_count.colRef("naclsinucd"), i, grd_count.colRef("naclsinucd")) = true;
  1362. }
  1363. }
  1364. }
  1365. }
  1366. }
  1367. }
  1368. function fUserInfo() {
  1369. model.removenode("/root/send");
  1370. model.makeValue("/root/send/instcd" , model.getValue("/root/init/HideData/instcd") );
  1371. submit("TRZSU10102"); // 사용자의 코드와 명칭을 가져온다.
  1372. }
  1373. /* ------------------------------------------------- */
  1374. /* SMMNP00300_수술기록 */
  1375. /* On Load 시 Call */
  1376. /* ------------------------------------------------- */
  1377. /* group : EMR 간호 수술마취 */
  1378. /* ver : 2007.05.15 */
  1379. /* by : 최학록 */
  1380. /* --------------------------------------------------*/
  1381. /* type : function */
  1382. /* access : public */
  1383. /* desc :수술기록 정보 가져오기 */
  1384. /* param : 기관코드 */
  1385. /* return : */
  1386. /* --------------------------------------------------*/
  1387. function MnphopcrList_Read(sParamFalg) {
  1388. var sOpCnfmDD = "";
  1389. var xPathOpCd = "/root/init/workinst/OpcdData/opcdlist" ; // 수술전 수술명
  1390. model.removenode("/root/send");
  1391. model.makeValue("/root/send/instcd" , model.getValue("/root/init/HideData/instcd" ));
  1392. model.makeValue("/root/send/pid" , model.getValue("/root/init/HideData/pid" ));
  1393. model.makeValue("/root/send/oprsrvno" , model.getValue("/root/init/HideData/oprsrvno"));
  1394. model.makeValue("/root/send/ophistno" , model.getValue("/root/init/HideData/ophistno"));
  1395. if (submit("TRMNP00302", false)) { // 수술실의 코드와 명칭을 가져온다.
  1396. // alert(getNodesetCount("/root/main/MnphopcrData/MnphopcrList"));
  1397. sOpscaleOrg = model.getValue(xPathData+"/opscale"); //박영우
  1398. sOpscaleChgFlag = false;
  1399. if (getNodesetCount("/root/main/MnphopcrData/MnphopcrList") < 1) {
  1400. messageBox("수술 예약정보가 없습니다. 확인하십시요!", "I000");
  1401. group2.visible = false;
  1402. return false;
  1403. }
  1404. }
  1405. model.setValue(xPathDispDT+"/patinroomdd" , model.getValue(xPathData+"/patinroomdt" ).substr(0,8) ); // 환자입실시간
  1406. model.setValue(xPathDispDT+"/patinroomhh" , model.getValue(xPathData+"/patinroomdt" ).substr(8,4) );
  1407. model.setValue(xPathDispDT+"/patoutroomdd" , model.getValue(xPathData+"/patoutroomdt").substr(0,8) ); // 환자퇴실시간
  1408. model.setValue(xPathDispDT+"/patoutroomhh" , model.getValue(xPathData+"/patoutroomdt").substr(8,4) );
  1409. model.setValue(xPathDispDT+"/perfidarvdd" , model.getValue(xPathData+"/perfidarvdt" ).substr(0,8) ); // 집도의도착일자
  1410. model.setValue(xPathDispDT+"/perfidarvhh" , model.getValue(xPathData+"/perfidarvdt" ).substr(8,4) ); // 집도의도착시간
  1411. model.setValue(xPathDispDT+"/perfidoutdd" , model.getValue(xPathData+"/perfidoutdt" ).substr(0,8) ); // 집도의퇴실일자
  1412. model.setValue(xPathDispDT+"/perfidouthh" , model.getValue(xPathData+"/perfidoutdt" ).substr(8,4) ); // 집도의퇴실시간
  1413. model.setValue(xPathDispDT+"/anstsrtdd" , model.getValue(xPathData+"/anstsrtdt" ).substr(0,8) ); // 마취시작일자
  1414. model.setValue(xPathDispDT+"/anstsrthh" , model.getValue(xPathData+"/anstsrtdt" ).substr(8,4) ); // 마취시작시간
  1415. model.setValue(xPathDispDT+"/anstenddd" , model.getValue(xPathData+"/anstenddt" ).substr(0,8) ); // 마취종료일자
  1416. model.setValue(xPathDispDT+"/anstendhh" , model.getValue(xPathData+"/anstenddt" ).substr(8,4) ); // 마취종료시간
  1417. model.setValue(xPathDispDT+"/opfromdd" , model.getValue(xPathData+"/opfromdt" ).substr(0,8)); // 수술시작일자
  1418. model.setValue(xPathDispDT+"/opfromhh" , model.getValue(xPathData+"/opfromdt" ).substr(8,4)); // 수술시작시간
  1419. model.setValue(xPathDispDT+"/optodd" , model.getValue(xPathData+"/optodt" ).substr(0,8)); // 수술종료일자
  1420. model.setValue(xPathDispDT+"/optohh" , model.getValue(xPathData+"/optodt" ).substr(8,4)); // 수술종료시간
  1421. if ( (sParamFalg == "B")&&((model.getValue(xPathData+"/anstkindspec/anstkind/anstkindcheck03") == "")
  1422. &&(model.getValue(xPathData+"/anstkindspec/anstkind/anstcprchk") == "")
  1423. &&(model.getValue(xPathData+"/anstkindspec/anstkind/anstkindcheck99") == "")) ) {//국소, CPCR, 마취없음이 아니고 기록가져오기 일때만 셋팅
  1424. model.setValue(xPathDispDT+"/anstsrtdd" , model.getValue(xPathData+"/anstanstsrtdt" ).substr(0,8) ); // 마취시작일자
  1425. model.setValue(xPathDispDT+"/anstsrthh" , model.getValue(xPathData+"/anstanstsrtdt" ).substr(8,4) ); // 마취시작시간
  1426. model.setValue(xPathDispDT+"/anstenddd" , model.getValue(xPathData+"/anstanstenddt" ).substr(0,8) ); // 마취종료일자
  1427. model.setValue(xPathDispDT+"/anstendhh" , model.getValue(xPathData+"/anstanstenddt" ).substr(8,4) ); // 마취종료시간
  1428. model.setValue(xPathDispDT+"/opfromdd" , model.getValue(xPathData+"/anstopfromdt" ).substr(0,8)); // 수술시작일자
  1429. model.setValue(xPathDispDT+"/opfromhh" , model.getValue(xPathData+"/anstopfromdt" ).substr(8,4)); // 수술시작시간
  1430. model.setValue(xPathDispDT+"/optodd" , model.getValue(xPathData+"/anstoptodt" ).substr(0,8)); // 수술종료일자
  1431. model.setValue(xPathDispDT+"/optohh" , model.getValue(xPathData+"/anstoptodt" ).substr(8,4)); // 수술종료시간
  1432. }
  1433. //속도개선용으로 막음.20130724_김병국(앞에 가져올때 같이 가져옴.)
  1434. //fGetHardCodeInfo("/root/main/cond", "/root/init/opscale", "154");
  1435. //fGetHardCodeInfo("/root/main/cond", "/root/init/opscaletm", "155");
  1436. model.makeNode("/root/init/opscale");
  1437. model.makeNode("/root/init/opscaletm");
  1438. model.copyNode("/root/init/opscale", "/root/code/codeinfo/codelist[cdgrupid='154']");
  1439. model.copyNode("/root/init/opscale", "/root/code/codeinfo/codelist[cdgrupid='155']");
  1440. fOpTotalTime(); // 총수술시간 계산
  1441. fAnTotalTime(); // 총마취시간 계산
  1442. model.makeValue("/root/init/HideData/opoutrmplcecd", model.getValue(xPathData+ "/opoutrmplcecd")); // 퇴실장소
  1443. XmlDataCheck(); // Xml Data가 없는 경우 구조를 Copy한다.
  1444. // 2007.11.13 Choi
  1445. // model.makeNode(xPathData+"/counspec" ); // 27 Count,내역
  1446. // model.makeNode(xPathData+"/packingspec" ); // 28 Packing내역
  1447. // InstanceNodeCopy(model, xPathData+"/counspec" , xPathFormat+"/counspec" ); // Count,내역
  1448. // InstanceNodeCopy(model, xPathData+"/packingspec", xPathFormat+"/packingspec"); // Packing내역
  1449. sOpCnfmDD = model.getValue(xPathData+"/opcnfmdd");
  1450. sOutflag = model.getValue(xPathData+"/outflag");
  1451. inp_patinroomdd.attribute("color") = "";
  1452. inp_patinroomhh.attribute("color") = "";
  1453. inp_patoutroomdd.attribute("color") = "";
  1454. inp_patoutroomhh.attribute("color") = "";
  1455. // ---------------------------------
  1456. // 진행상태
  1457. // 00 : 임시'
  1458. // 10 : 의뢰'
  1459. // 19 : 의뢰취소'
  1460. // 20 : 예정'
  1461. // 29 : 취소'
  1462. // 30 : 대기'
  1463. // 39 : 대기취소'
  1464. // 40 : 수술'
  1465. // 49 : 수술취소'
  1466. // 50 : 종료'
  1467. // 60 : 회복'
  1468. // 70 : 종료'
  1469. // ---------------------------------
  1470. if( model.getValue(xPathDispDT+"/patinroomdd" ) == "" ) {
  1471. if( getUserInfo("dutplceinstcd") == "017" ) {//빈센트 수술기록일시 입실일시로 셋팅 2010.04.09 K. J. M
  1472. var ccsroprectm = model.getValue(xPathData+"/ccsroprectm");
  1473. if( ccsroprectm != "" ) {
  1474. model.setValue(xPathDispDT+"/patinroomdd", ccsroprectm.substr(0, 8));
  1475. model.setValue(xPathDispDT+"/patinroomhh", ccsroprectm.substr(8, 4));
  1476. }
  1477. }else {
  1478. model.setValue(xPathDispDT+"/patinroomdd" , sOpCnfmDD);
  1479. }
  1480. } else {
  1481. if (model.getValue(xPathData+"/opstatcd") > "39") { // 진행상태
  1482. inp_patinroomdd.attribute("color") = "#0000ff";
  1483. inp_patinroomhh.attribute("color") = "#0000ff";
  1484. }
  1485. }
  1486. //퇴실일자가 없거나, 퇴실시간이 없으면 마취종료시간, 수술종료시간으로 셋팅 2010.05.27 K. J. M
  1487. if( (model.getValue(xPathDispDT+"/patoutroomdd") == "")||(model.getValue(xPathDispDT+"/patoutroomdd") != ""&&model.getValue(xPathDispDT+"/patoutroomhh") == "") ) {
  1488. if( getUserInfo("dutplceinstcd") == "017" ) {//빈센트 마취종료시간 퇴실일시로 셋팅 2010.04.09 K. J. M
  1489. var anstenddd = model.getValue(xPathData+"/anstanstenddt").substr(0,8);
  1490. var anstendhh = model.getValue(xPathData+"/anstanstenddt").substr(8,4);
  1491. var openddd = model.getValue(xPathDispDT+"/optodd");
  1492. var opendhh = model.getValue(xPathDispDT+"/optohh");
  1493. if( anstenddd != ""&&anstendhh != "" ) {
  1494. model.setValue(xPathDispDT+"/patoutroomdd", anstenddd);
  1495. model.setValue(xPathDispDT+"/patoutroomhh", anstendhh);
  1496. }else if( (openddd != "")&&(opendhh != "")&&(chk_anstkindcheck03.value == "S") ){//국소마취일경우 수술종료시간 셋팅
  1497. model.setValue(xPathDispDT+"/patoutroomdd", openddd);
  1498. model.setValue(xPathDispDT+"/patoutroomhh", opendhh);
  1499. }
  1500. }else {
  1501. model.setValue(xPathDispDT+"/patoutroomdd" , sOpCnfmDD);
  1502. }
  1503. }else {
  1504. if( model.getValue(xPathData+"/opstatcd") > "39"&&sOutflag == "Y" ) { // 진행상태+퇴실저장여부
  1505. inp_patoutroomdd.attribute("color") = "#0000ff";
  1506. inp_patoutroomhh.attribute("color") = "#0000ff";
  1507. }
  1508. }
  1509. if (model.getValue(xPathDispDT+"/anstsrtdd" ) == "") model.setValue(xPathDispDT+"/anstsrtdd" , sOpCnfmDD);
  1510. if (model.getValue(xPathDispDT+"/anstenddd" ) == "") model.setValue(xPathDispDT+"/anstenddd" , sOpCnfmDD);
  1511. if (model.getValue(xPathDispDT+"/perfidarvdd" ) == "") model.setValue(xPathDispDT+"/perfidarvdd" , sOpCnfmDD);
  1512. if (model.getValue(xPathDispDT+"/perfidoutdd" ) == "") model.setValue(xPathDispDT+"/perfidoutdd" , sOpCnfmDD);
  1513. if (model.getValue(xPathDispDT+"/opfromdd" ) == "") model.setValue(xPathDispDT+"/opfromdd" , sOpCnfmDD);
  1514. if (model.getValue(xPathDispDT+"/optodd" ) == "") model.setValue(xPathDispDT+"/optodd" , sOpCnfmDD);
  1515. if (model.getValue(xPathData+"/recstat") == "I"){
  1516. //2009-02-02 ycd 삭제 요청으로 삭제 처리
  1517. //model.setValue(xPathData+"/timeoutspec/timeout/timeoutcheck", "1 2 3 4");
  1518. //2008-06-25 오후 1:41:48 taebum 추가요구사항으로 default로 check안되도록 수정함.
  1519. /*
  1520. model.setValue(xPathData+"/druguseyn" , "N" );
  1521. model.setValue(xPathData+"/drgeuseyn" , "N" );
  1522. model.setValue(xPathData+"/eqmtuseyn" , "X" );
  1523. model.setValue(xPathData+"/implantuseyn" , "N" );
  1524. model.setValue(xPathData+"/tnsyn" , "N" );
  1525. model.setValue(xPathData+"/carerecuseyn" , "N" );
  1526. model.setValue(xPathData+"/spcuseyn" , "X" );
  1527. model.setValue(xPathData+"/esuspec/esu/esuyn" , "N");
  1528. model.setValue(xPathData+"/tourniquetspec/tourniquet/tourniquetyn" , "N");
  1529. */
  1530. //===========================================================================================
  1531. //2008-06-18 오후 1:11:39 taebum 요구사항으로 UI 수정 및 로직 수정
  1532. //model.setValue(xPathData+"/warmcoldregmspec/warmcoldregm/warmcoldregmyn" , "N");
  1533. //model.setValue(xPathData+"/warmcoldregmspec/warmcoldregm/ltube/ltubecheck" , "X");
  1534. //model.setValue(xPathData+"/warmcoldregmspec/warmcoldregm/urinary/urinarycheck" , "X");
  1535. //model.setValue(xPathData+"/postureskinupdtspec/postureskinupdt/skinupdtcheck" , "X");
  1536. //model.setValue(xPathData+"/warmcoldregmspec/warmcoldregm/subclavian/subclaviancheck", "X");
  1537. //===========================================================================================
  1538. }
  1539. // 주수술
  1540. if (model.getValue(xPathData+"/opcd") != "") {
  1541. model.removenode(xPathOpCd );
  1542. model.makeNode(xPathOpCd+"[1]" );
  1543. model.makeNode(xPathOpCd+"[1]/opstat" );
  1544. model.makeNode(xPathOpCd+"[1]/subcls" );
  1545. model.makeNode(xPathOpCd+"[1]/opcd" );
  1546. model.makeNode(xPathOpCd+"[1]/calcd" );
  1547. model.makeNode(xPathOpCd+"[1]/opcdname" );
  1548. model.setValue(xPathOpCd+"[1]/opstat" ,"" );
  1549. model.setValue(xPathOpCd+"[1]/subcls" ,"1" );
  1550. model.setValue(xPathOpCd+"[1]/opcd" ,model.getValue(xPathData+"/opcd" ));
  1551. model.setValue(xPathOpCd+"[1]/calcd" ,model.getValue(xPathData+"/calcd" ));
  1552. model.setValue(xPathOpCd+"[1]/opcdname",model.getValue(xPathData+"/opcdnm"));
  1553. }
  1554. // 부수술
  1555. if (model.getValue(xPathData+"/subopcd") != "" && model.getValue(xPathData+"/subopcd") != "-") {
  1556. model.makeNode(xPathOpCd+"[2]" );
  1557. model.makeNode(xPathOpCd+"[2]/opstat" );
  1558. model.makeNode(xPathOpCd+"[2]/subcls" );
  1559. model.makeNode(xPathOpCd+"[2]/opcd" );
  1560. model.makeNode(xPathOpCd+"[2]/calcd" );
  1561. model.makeNode(xPathOpCd+"[2]/opcdname" );
  1562. model.setValue(xPathOpCd+"[2]/opstat" ,"" );
  1563. model.setValue(xPathOpCd+"[2]/subcls" ,"2" );
  1564. model.setValue(xPathOpCd+"[2]/opcd" ,model.getValue(xPathData+"/subopcd" ));
  1565. model.setValue(xPathOpCd+"[2]/calcd" ,model.getValue(xPathData+"/subcalcd" ));
  1566. model.setValue(xPathOpCd+"[2]/opcdname",model.getValue(xPathData+"/subopcdnm"));
  1567. }
  1568. grd_bfopnm.refresh();
  1569. //수술후 수술명 생성 2008-07-17 오전 10:39:20 taebum 기록3에서 만드는 부분 주석처리 후 로직 생성함.
  1570. //OpcdPath = "/root/main/MnphopcrData/MnphopcrList/aftopopnm/aftopoplists";
  1571. var sOprddata = model.getValue("/root/main/MnphopcrData/MnphopcrList/oprddata");
  1572. if(sOprddata != "" && sOprddata != null && sOprddata != "undefined"){
  1573. var sRowArr = sOprddata.split("▩");
  1574. var sColArr = null;
  1575. if(sRowArr.length > 0){
  1576. model.removeNodeSet(OpcdPath);
  1577. for(var j = 0; j < sRowArr.length; j++){
  1578. sColArr = sRowArr[j].split("▦");
  1579. if(sColArr[2] != ""){ //수술코드
  1580. model.makeNode (OpcdPath+"/opcdlist["+(j+1)+"]");
  1581. model.makeValue(OpcdPath+"/opcdlist["+(j+1)+"]/opstat" , sColArr[0]);
  1582. model.makeValue(OpcdPath+"/opcdlist["+(j+1)+"]/subcls" , sColArr[1]);
  1583. model.makeValue(OpcdPath+"/opcdlist["+(j+1)+"]/opcd" , sColArr[2]);
  1584. model.makeValue(OpcdPath+"/opcdlist["+(j+1)+"]/opcdname" , sColArr[3]);
  1585. }
  1586. }
  1587. }
  1588. }
  1589. grd_afopnm.refresh();
  1590. fOpeuDataDisplay();
  1591. fSettingOPdate("all"); //수술관련 시간 참여자 정보에 자동 세팅 처리(집도의입실, 수술시작)
  1592. if (model.getValue(xPathData+"/opbfpatcnfmspec/opbfpatcnfm/oproom")==""){
  1593. model.setValue(xPathData+"/opbfpatcnfmspec/opbfpatcnfm/oproom", model.getValue(xPathData+"/oproomcd"));
  1594. }
  1595. //2008-08-20 오전 11:06:11 taebum 조회된 Data를 잘못된 값으로 Display하는 오류 발생(instacne안에는 제대로 조회됨)
  1596. //===================== 주석처리 하지 말것! ========================================================
  1597. grd_opposture.refresh();
  1598. grd_inscath.refresh();
  1599. //===================================================================================================
  1600. fEsuCheck(); // ESU 해당없음 Check
  1601. fTourniquetCheck(); // Tourniquet 해당없음 Check
  1602. fInscathCheck(); // 삽관기록 데이터 clear
  1603. //====================================================================================================
  1604. //2008-06-18 오전 11:28:55 taebum - 요구사항의 Catheter삽관기록 UI 및 로직 수정요청반영관련 주석처리
  1605. //fWarmcoldregmCheck(); // 냉온요법
  1606. //fSkinupdtcheck(); // 피부변화
  1607. //fUrinarycheck();
  1608. //fLtubecheck();
  1609. //fSubclaviancheck();
  1610. //====================================================================================================
  1611. fTnsRecCheck(); // 수혈기록지 기록여부 체크
  1612. fDelivynCheck(); //2008-08-25 오후 8:19:50 taebum 분만 여부 체크
  1613. fExtcynCheck(); //2008-08-25 오후 8:19:50 taebum 적출물 체크
  1614. fOtynCheck(); //2008-08-25 오후 8:20:56 taebum 장기이식 체크
  1615. //fObRecCheck(); //2012-06.03 오후 02.51 손성훈. 관찰기록 체크
  1616. var StayChk = model.getValue(xPathData + "/staycnfmpat" ) +" " // 대기실 환자명
  1617. + model.getValue(xPathData + "/staycnfmid" ) +" " // 대기실 등록번호
  1618. + model.getValue(xPathData + "/staycnfmdr" ) +" " // 대기실 집도의
  1619. + model.getValue(xPathData + "/staycnfmpart") ; // 대기실 수술부위
  1620. model.setValue(xPathData+"/opbfpatcnfmspec/opbfpatcnfm/opcnfcheck" ,StayChk); // 대기실 Check정보
  1621. model.setValue(xPathData+"/oppartdispyn" ,model.getValue(xPathData+"/staycnfmpartdisp")); // 대기실 수술부위표시
  1622. var sPatInfo = model.getValue(xPathData+"/pid" ) + " " // 등록번호
  1623. + model.getValue(xPathData+"/patname2" ) + " " // 환자명(표시명)
  1624. + model.getValue(xPathData+"/sa" ) + " " // SA
  1625. + model.getValue(xPathData+"/wardcd" ) + " " // 병동
  1626. + model.getValue(xPathData+"/roomcd" ) ; // 병실
  1627. var sPatInfo2= model.getValue(xPathData+"/depthngnm" ) + " " // 진료과
  1628. + model.getValue(xPathData+"/oproomnm" ) + " " // 수술실명
  1629. + model.getValue(xPathData+"/perfdridnm" ) + " " // 집도의
  1630. + model.getValue(xPathData+"/opcdnm" ) ; // 수술명
  1631. model.setValue("/root/init/HideData/patinfo" ,sPatInfo);
  1632. model.setValue("/root/init/HideData/patinfo2",sPatInfo2);
  1633. //2009-02-11 ycd 수술전처치 및 간호상태 확인 기록지 정보 연동 및 TextArea 세팅
  1634. if(getNodesetCount(xPathData+"/curenurgstatspec/ItemCheckLists/ItemCheckList") > 0 ){
  1635. //보낸 물품 & 약품 정보
  1636. var sItemChekInfo1 = "";
  1637. var sItemChekInfo2 = "";
  1638. var sItemChekInfo3 = "";
  1639. var sItemCd1 = "ITM019";
  1640. var sItemCd2 = "ITM021";
  1641. sItemChekInfo1 = model.getValue(xPathData+"/curenurgstatspec/ItemCheckLists/ItemCheckList[ItemCode ='"+ sItemCd1 + "']/ItemInfoBk");
  1642. if(sItemChekInfo1 != ""){
  1643. sItemChekInfo1 = sItemChekInfo1 + " : " + model.getValue(xPathData+"/curenurgstatspec/ItemCheckLists/ItemCheckList[ItemCode ='"+ sItemCd1 + "']/ItemInfo");
  1644. }
  1645. sItemChekInfo2 = model.getValue(xPathData+"/curenurgstatspec/ItemCheckLists/ItemCheckList[ItemCode ='"+ sItemCd2 + "']/ItemInfoBk");
  1646. if(sItemChekInfo2 != ""){
  1647. sItemChekInfo2 = sItemChekInfo2 + " : " + model.getValue(xPathData+"/curenurgstatspec/ItemCheckLists/ItemCheckList[ItemCode ='"+ sItemCd2 + "']/ItemInfo");
  1648. }
  1649. sItemChekInfo3 = sItemChekInfo1 + "\n" + sItemChekInfo2;
  1650. model.setValue(xPathData + "/deptremark" , sItemChekInfo3);
  1651. }
  1652. // 2009-02-19 그리드 형식으로 조회 처리
  1653. model.removenode("/root/temp/anstkindinfo/anstkindlist");
  1654. model.makeNode("/root/temp/anstkindinfo/anstkindlist[1]" );
  1655. model.makeNode("/root/temp/anstkindinfo/anstkindlist[2]" );
  1656. model.makeNode("/root/temp/anstkindinfo/anstkindlist[1]/anstflag" );
  1657. model.makeNode("/root/temp/anstkindinfo/anstkindlist[1]/anstmthdname" );
  1658. model.makeNode("/root/temp/anstkindinfo/anstkindlist[2]/anstflag" );
  1659. model.makeNode("/root/temp/anstkindinfo/anstkindlist[2]/anstmthdname" );
  1660. model.setValue("/root/temp/anstkindinfo/anstkindlist[1]/anstflag" , "1");
  1661. model.setValue("/root/temp/anstkindinfo/anstkindlist[1]/anstmthdname" , model.getValue(xPathData+"/anstmthdname"));
  1662. model.setValue("/root/temp/anstkindinfo/anstkindlist[2]/anstflag" , "2");
  1663. model.setValue("/root/temp/anstkindinfo/anstkindlist[2]/anstmthdname" , model.getValue(xPathData+"/anstmthdsubname"));
  1664. grd_anstlist.refresh();
  1665. //model.setValue(xPathData+"/skindinfspec/skindinf/Skindinfkind", model.getValue(xPathData+"/skindinfspec/skindinf/Skindinfkind")); //피부소독
  1666. var sOpposturecd = model.getValue(xPathData+"/opposturecd");
  1667. var sAnstmthdcd = model.getValue(xPathData+"/anstmthdcd" );
  1668. var sAnstmthdname = model.getValue(xPathData+"/anstmthdname" );
  1669. //2009-02-03 ycd 기록 항목 변경 요청 추가 부분(병동, 대기실, 수술실 사용자 정보 세팅)
  1670. if(getNodesetCount(xPathData+"/opbfpatcnfmspec/opbfpatcnfm/wardnurse") > 0 ){ //기록항목 추가건 반영 후 기록
  1671. model.setValue(xPathData+"/opbfpatcnfmspec/opbfpatcnfm/wardnurse" ,model.getValue(xPathData+"/nurgpartid")); // 병동 기록자NM
  1672. model.setValue(xPathData+"/opbfpatcnfmspec/opbfpatcnfm/wardnursenm" ,model.getValue(xPathData+"/nurgpartnm")); // 병동 기록자NM
  1673. model.setValue(xPathData+"/opbfpatcnfmspec/opbfpatcnfm/cnfnurse" ,model.getValue(xPathData+"/staychfid")); // 대기실 기록자ID
  1674. model.setValue(xPathData+"/opbfpatcnfmspec/opbfpatcnfm/cnfnursenm" ,model.getValue(xPathData+"/staychfidnm")); // 대기실 기록자NM
  1675. model.setValue(xPathData+"/opbfpatcnfmspec/opbfpatcnfm/opnurse" ,model.getValue(xPathData+"/operchfid")); // 수술실 기록자NM
  1676. model.setValue(xPathData+"/opbfpatcnfmspec/opbfpatcnfm/opnursenm" ,model.getValue(xPathData+"/operchfnm")); // 수술실 기록자NM
  1677. model.setValue(xPathData+"/opbfpatcnfmspec/opbfpatcnfm/opocr1chkexec" ,model.getValue(xPathData+"/ocrchk1")); // OCR서식(수술(시술) 부위 표식 확인서 : '0000002304' ) 출력
  1678. model.setValue(xPathData+"/opbfpatcnfmspec/opbfpatcnfm/opocr2chkexec" ,model.getValue(xPathData+"/ocrchk2")); // OCR서식(수술부위 확인 점검표 : '0000002850' ) 출력
  1679. model.setValue(xPathData+"/anstkindspec/anstkind/anstmthdname" ,model.getValue(xPathData+"/anstmthdname")); // 주마취명
  1680. model.setValue(xPathData+"/anstkindspec/anstkind/anstmthdnamesub" ,model.getValue(xPathData+"/anstmthdsubname")); // 부마취명
  1681. } else { //기록항목 추가건 반영 전 기록
  1682. model.makeValue(xPathData+"/opbfpatcnfmspec/opbfpatcnfm/wardnurse" ,model.getValue(xPathData+"/nurgpartid")); // 병동 기록자NM
  1683. model.makeValue(xPathData+"/opbfpatcnfmspec/opbfpatcnfm/wardnursenm" ,model.getValue(xPathData+"/nurgpartnm")); // 병동 기록자NM
  1684. model.makeValue(xPathData+"/opbfpatcnfmspec/opbfpatcnfm/cnfnurse" ,model.getValue(xPathData+"/staychfid")); // 대기실 기록자ID
  1685. model.makeValue(xPathData+"/opbfpatcnfmspec/opbfpatcnfm/cnfnursenm" ,model.getValue(xPathData+"/staychfidnm")); // 대기실 기록자NM
  1686. model.makeValue(xPathData+"/opbfpatcnfmspec/opbfpatcnfm/opnurse" ,model.getValue(xPathData+"/operchfid")); // 수술실 기록자NM
  1687. model.makeValue(xPathData+"/opbfpatcnfmspec/opbfpatcnfm/opnursenm" ,model.getValue(xPathData+"/operchfnm")); // 수술실 기록자NM
  1688. model.makeValue(xPathData+"/opbfpatcnfmspec/opbfpatcnfm/opocr1chkexec" ,model.getValue(xPathData+"/ocrchk1")); // OCR서식(수술(시술) 부위 표식 확인서 : '0000002304' ) 출력
  1689. model.makeValue(xPathData+"/opbfpatcnfmspec/opbfpatcnfm/opocr2chkexec" ,model.getValue(xPathData+"/ocrchk2")); // OCR서식(수술부위 확인 점검표 : '0000002850' ) 출력
  1690. model.makeNode(xPathData+"/opbfpatcnfmspec/opbfpatcnfm/opbfpatchk");
  1691. model.makeNode(xPathData+"/opbfpatcnfmspec/opbfpatcnfm/opbfpatresn");
  1692. model.makeNode(xPathData+"/opbfpatcnfmspec/opbfpatcnfm/opbfpartchk");
  1693. model.makeNode(xPathData+"/opbfpatcnfmspec/opbfpatcnfm/opbfpartresn");
  1694. model.makeNode(xPathData+"/opbfpatcnfmspec/opbfpatcnfm/optimeoutchk");
  1695. model.makeNode(xPathData+"/opbfpatcnfmspec/opbfpatcnfm/opbftimeoutresn");
  1696. model.makeValue(xPathData+"/anstkindspec/anstkind/anstmthdname" ,model.getValue(xPathData+"/anstmthdname")); // 주마취명
  1697. model.makeValue(xPathData+"/anstkindspec/anstkind/anstmthdnamesub" ,model.getValue(xPathData+"/anstmthdsubname")); // 부마취명
  1698. model.makeNode(xPathData+"/anstkindspec/anstkind/anstchngchk");
  1699. model.makeNode(xPathData+"/anstkindspec/anstkind/anstcprchk");
  1700. model.makeNode(xPathData+"/anstkindspec/anstkind/anstbfchngnm");
  1701. model.makeNode(xPathData+"/anstkindspec/anstkind/anstaftchngnm");
  1702. //model.makeNode(xPathData+"/anstkindspec/anstkind/anstopchk");
  1703. }
  1704. // 2009-02-10 ycd 재수술 여부 확인 조회 추가
  1705. var sReOpFlag = model.getValue(xPathData+"/opbfpatcnfmspec/opbfpatcnfm/reopflag");
  1706. // 2009-02-03 ycd 시행,미시행 처리부분 추가
  1707. // 수술전 준비확인 기록 여부에 따른 처리
  1708. if(model.getValue(xPathData+"/opbfpatcnfmspec/opbfpatcnfm/opbfpatchk") == ""){
  1709. if(model.getValue(xPathData+"/opbfcureseqno") != ""){ //수술전 준비확인 기록이 존재하지 않을 경우
  1710. model.setValue(xPathData+"/opbfpatcnfmspec/opbfpatcnfm/opbfpatchk", "Y");
  1711. cmb_opbfpatresn.disabled = true;
  1712. }else{
  1713. model.setValue(xPathData+"/opbfpatcnfmspec/opbfpatcnfm/opbfpatchk", "N");
  1714. cmb_opbfpatresn.disabled = false;
  1715. }
  1716. }else{
  1717. if(model.getValue(xPathData+"/opbfpatcnfmspec/opbfpatcnfm/opbfpatchk") == "N" ){
  1718. cmb_opbfpatresn.disabled = false;
  1719. }else{
  1720. cmb_opbfpatresn.disabled = true;
  1721. }
  1722. }
  1723. // 수술(시술) 부위 표식 확인서 출력 여부에 따른 처리
  1724. if(model.getValue(xPathData+"/opbfpatcnfmspec/opbfpatcnfm/opbfpartchk") == ""){
  1725. if(model.getValue(xPathData+"/ocrchk1") != "" ){
  1726. model.setValue(xPathData+"/opbfpatcnfmspec/opbfpatcnfm/opbfpartchk", "Y");
  1727. cmb_opbfpartresn.disabled = true;
  1728. }else{
  1729. model.setValue(xPathData+"/opbfpatcnfmspec/opbfpatcnfm/opbfpartchk", "N");
  1730. cmb_opbfpartresn.disabled = false;
  1731. }
  1732. }else{
  1733. if(model.getValue(xPathData+"/opbfpatcnfmspec/opbfpatcnfm/opbfpartchk") == "N" ){
  1734. cmb_opbfpartresn.disabled = false;
  1735. }else{
  1736. cmb_opbfpartresn.disabled = true;
  1737. }
  1738. }
  1739. // 수술부위 확인 점검표 출력 여부에 따른 처리
  1740. if(model.getValue(xPathData+"/opbfpatcnfmspec/opbfpatcnfm/optimeoutchk") == ""){
  1741. if(model.getValue(xPathData+"/timeoutdtnrchkyn") != "N" ){
  1742. model.setValue(xPathData+"/opbfpatcnfmspec/opbfpatcnfm/optimeoutchk", "Y");
  1743. cmb_opbftimeoutresn.disabled = true;
  1744. }else{
  1745. model.setValue(xPathData+"/opbfpatcnfmspec/opbfpatcnfm/optimeoutchk", "N");
  1746. cmb_opbftimeoutresn.disabled = false;
  1747. }
  1748. }else{
  1749. if(model.getValue(xPathData+"/opbfpatcnfmspec/opbfpatcnfm/optimeoutchk") == "N" ){
  1750. cmb_opbftimeoutresn.disabled = false;
  1751. }else{
  1752. cmb_opbftimeoutresn.disabled = true;
  1753. }
  1754. }
  1755. // 2009-02-10 ycd 수술기록 진행 상태 표시
  1756. if(model.getValue(xPathData+"/opcertstat") == "Y"){
  1757. model.setValue("/root/init/XmlFormat/opcertviewstat", "확정");
  1758. opt_opcertstat.attribute("color") = "#ff0000";
  1759. }else if(model.getValue(xPathData+"/opcertstat") == "N"){
  1760. model.setValue("/root/init/XmlFormat/opcertviewstat", "임시");
  1761. opt_opcertstat.attribute("color") = "#000000";
  1762. }else{
  1763. model.setValue("/root/init/XmlFormat/opcertviewstat", "");
  1764. opt_opcertstat.attribute("color") = "#000000";
  1765. }
  1766. // 2009-02-19 ycd 협진 상태 표시
  1767. if( model.getValue(xPathData+"/oprsrvno") != model.getValue(xPathData+"/mainoprsrvno") &&
  1768. model.getValue(xPathData+"/mainoprsrvno") != "-" ){
  1769. model.setValue("/root/init/XmlFormat/reopviewflag", "협진");
  1770. }else{
  1771. model.setValue("/root/init/XmlFormat/reopviewflag", "");
  1772. }
  1773. // 2009-02-11 ycd 재수술 상태 표시
  1774. if(model.getValue(xPathData+"/reopflag") == "Y"){
  1775. if(model.getValue("/root/init/XmlFormat/reopviewflag") == ""){
  1776. model.setValue("/root/init/XmlFormat/reopviewflag", "재수술");
  1777. }else{
  1778. model.setValue("/root/init/XmlFormat/reopviewflag", "(재수술)");
  1779. }
  1780. }
  1781. // 2009-02-03 ycd 기록 항목 삭제로 인한 변경
  1782. if (sAnstmthdcd == "G") {
  1783. model.setValue("/root/main/MnphopcrData/MnphopcrList/anstkindspec/anstkind/anstkindcheck01",sAnstmthdcd);
  1784. }
  1785. if (sAnstmthdcd == "P") {
  1786. model.setValue("/root/main/MnphopcrData/MnphopcrList/anstkindspec/anstkind/anstkindcheck02",sAnstmthdcd);
  1787. }
  1788. /*
  1789. if (chk_anstkindcheck01.value == ""){ // 전신
  1790. if (sAnstmthdcd == "G") {
  1791. chk_anstkindcheck01.value = sAnstmthdcd;
  1792. ipt_anstmthdname.value = sAnstmthdname;
  1793. model.setValue("/root/main/MnphopcrData/MnphopcrList/anstkindspec/anstkind/anstkindcheck02","");
  1794. model.setValue("/root/main/MnphopcrData/MnphopcrList/anstkindspec/anstkind/anstkindcheck03","");
  1795. model.setValue("/root/main/MnphopcrData/MnphopcrList/anstkindspec/anstkind/anstkindcheck09","");
  1796. }
  1797. }
  1798. if (chk_anstkindcheck02.value == ""){ // 부위
  1799. if (sAnstmthdcd == "P") {
  1800. chk_anstkindcheck02.value = sAnstmthdcd;
  1801. ipt_anstmthdname.value = sAnstmthdname;
  1802. model.setValue("/root/main/MnphopcrData/MnphopcrList/anstkindspec/anstkind/anstkindcheck01","");
  1803. model.setValue("/root/main/MnphopcrData/MnphopcrList/anstkindspec/anstkind/anstkindcheck03","");
  1804. model.setValue("/root/main/MnphopcrData/MnphopcrList/anstkindspec/anstkind/anstkindcheck09","");
  1805. }
  1806. }
  1807. if (chk_anstkindcheck09.value == ""){ // 기타
  1808. if (sAnstmthdcd == "E") {
  1809. chk_anstkindcheck09.value = sAnstmthdcd;
  1810. ipt_anstmthdname.value = sAnstmthdname;
  1811. model.setValue("/root/main/MnphopcrData/MnphopcrList/anstkindspec/anstkind/anstkindcheck01","");
  1812. model.setValue("/root/main/MnphopcrData/MnphopcrList/anstkindspec/anstkind/anstkindcheck02","");
  1813. model.setValue("/root/main/MnphopcrData/MnphopcrList/anstkindspec/anstkind/anstkindcheck03","");
  1814. }
  1815. }
  1816. //2008-08-28 오전 10:21:15 taebum 마취종류가 전신 또는 국소일 경우 국소 또는 기타가 Check 안되도록
  1817. */
  1818. if (chk_anstkindcheck03.value == ""){ // 국소
  1819. if (sAnstmthdcd == "S") {
  1820. chk_anstkindcheck03.value = sAnstmthdcd;
  1821. //model.setValue("/root/main/MnphopcrData/MnphopcrList/anstkindspec/anstkind/anstkindcheck01","");
  1822. //model.setValue("/root/main/MnphopcrData/MnphopcrList/anstkindspec/anstkind/anstkindcheck02","");
  1823. //model.setValue("/root/main/MnphopcrData/MnphopcrList/anstkindspec/anstkind/anstkindcheck09","");
  1824. }
  1825. }
  1826. // 마취없음 체크
  1827. if (chk_anstkindcheck99.value != ""){
  1828. ipt_anstkindothertext.disabled = false;
  1829. }else{
  1830. ipt_anstkindothertext.disabled = true;
  1831. }
  1832. // 2009-02-19 YCD 삭제 처리
  1833. // 수술중 마취변경 체크
  1834. /*
  1835. if (chk_anstchngchk.value != ""){
  1836. ipt_anstbfchngnm.disabled = false;
  1837. ipt_anstaftchngnm.disabled = false;
  1838. }else{
  1839. ipt_anstbfchngnm.disabled = true;
  1840. ipt_anstaftchngnm.disabled = true;
  1841. }
  1842. */
  1843. //수술체위 정보 세팅
  1844. if (model.getValue(xPathData+"/opposturespec/opposture/opposturelist[1]/opposturekind") == "" ) {
  1845. model.makeValue(xPathData+"/opposturespec/opposture/opposturelist[1]/opposturekind", sOpposturecd );
  1846. model.makeValue(xPathData+"/opposturespec/opposture/opposturelist[1]/opposturefrdt", model.getValue(xPathData+"/anstopfromdt" ).substr(0,8)); // 수술시작일자
  1847. model.makeValue(xPathData+"/opposturespec/opposture/opposturelist[1]/opposturefrtm", model.getValue(xPathData+"/anstopfromdt" ).substr(8,4)); // 수술시작시간
  1848. model.makeNode(xPathData+"/opposturespec/opposture/opposturelist[1]/opposturetodt");
  1849. model.makeNode(xPathData+"/opposturespec/opposture/opposturelist[1]/opposturetotm");
  1850. model.makeNode(xPathData+"/opposturespec/opposture/opposturelist[1]/oppostureterm");
  1851. model.makeNode(xPathData+"/opposturespec/opposture/opposturelist[1]/opposturetot");
  1852. grd_opposture.rebuild();
  1853. }
  1854. fOpTimeControl(""); //국소마취여부를 Check한다.
  1855. opt_cnfnursenm.refresh();
  1856. opt_wardnursenm.refresh();
  1857. opt_opnursenm.refresh();
  1858. //chk_stay.refresh(); //수술전환자확인 2009-02-02 삭제 ycd
  1859. //rdo_oppartdispyn.refresh(); //수술부위표시 2009-02-02 삭제 ycd
  1860. //inp_cnfnurse.refresh(); //대기실간호사ID 2009-02-02 삭제 ycd
  1861. //opt_anstmthdname.refresh();
  1862. //opt_anstmthdnamesub.refresh();
  1863. // 2009-01-23 간호처방 확정상태 색변경 ycd
  1864. cmb_cartstat.refresh();
  1865. opt_ccrtstat.value = cmb_cartstat.label;
  1866. if(model.getValue(xPathData+"/ccrtstat") == "5"){
  1867. opt_ccrtstat.attribute("color") = "#ff0000";
  1868. }else{
  1869. opt_ccrtstat.attribute("color") = "#000000";
  1870. }
  1871. // 2010-04-13 오전 11:15:50 마취기록 마취방법 변경요청건 taebum
  1872. if(model.getValue(xPathData+"/anstmthdchgflag") == "Y"){
  1873. //기존에 마취종류가 국소로 입력되어 있을 경우 국소를 데이터를 없애고, 마취기록정보를 연동한다.
  1874. if(model.getValue("/root/main/MnphopcrData/MnphopcrList/anstkindspec/anstkind/anstkindcheck03") == "S"){
  1875. model.setValue("/root/main/MnphopcrData/MnphopcrList/anstkindspec/anstkind/anstkindcheck03", "");
  1876. fOpTimeControl("");
  1877. }
  1878. caption39.visible = true;
  1879. }else{
  1880. caption39.visible = false;
  1881. }
  1882. }
  1883. // 수혈기록지 기록여부 체크
  1884. function fTnsRecCheck(){
  1885. if(model.getValue(xPathData+"/tnsyn") == "Y"){
  1886. btn_tnsrec.disabled = false;
  1887. }else{
  1888. btn_tnsrec.disabled = true;
  1889. }
  1890. }
  1891. // 분만여부 체크
  1892. function fDelivynCheck(){ //2008-08-25 오후 8:19:50 taebum 분만 여부 체크
  1893. if(model.getValue(xPathData+"/delivyn") == "Y"){
  1894. button28.disabled = false;
  1895. }else{
  1896. button28.disabled = true;
  1897. }
  1898. }
  1899. //적출물 여부 체크
  1900. function fExtcynCheck(){ //2008-08-25 오후 8:19:50 taebum 적출물 체크
  1901. if(model.getValue(xPathData+"/extcyn") == "Y"){
  1902. button12.disabled = false;
  1903. }else{
  1904. button12.disabled = true;
  1905. }
  1906. }
  1907. //장기이식 체크
  1908. function fOtynCheck(){ //2008-08-25 오후 8:20:56 taebum 장기이식 체크
  1909. if(model.getValue(xPathData+"/otyn") == "Y"){
  1910. button29.disabled = false;
  1911. }else{
  1912. button29.disabled = true;
  1913. }
  1914. }
  1915. //관찰기록 여부 체크
  1916. function fObRecCheck(){ //2008-08-25 오후 8:19:50 taebum 적출물 체크
  1917. if(model.getValue(xPathData+"/obrecyn") == "Y"){
  1918. button11.disabled = false;
  1919. }else{
  1920. button11.disabled = true;
  1921. }
  1922. }
  1923. // ESU 해당사없음 체크
  1924. function fEsuCheck(){
  1925. if (model.getValue("/root/main/MnphopcrData/MnphopcrList/esuspec/esu/esuyn") == 'N') {
  1926. //if (chk_esuyn.value == 'N') { //2008-08-07 오후 8:18:35 taebum 속도 개선을 위한 주석처리
  1927. model.removeNodeset(xPathData+"/esuspec/esu/esulist");
  1928. //model.copyNode(xPathData+"/esuspec", xPathFormat+"/esuspec"); 2008-06-25 오후 2:43:32 taebum
  1929. model.setValue(xPathData+"/esuspec/esu/esuyn", "N");
  1930. grp_esu.disabled = true ;
  1931. button19.disabled = true ;
  1932. button2.disabled = true ;
  1933. } else {
  1934. grp_esu.disabled = false ;
  1935. button19.disabled = false ;
  1936. button2.disabled = false ;
  1937. }
  1938. grd_esu.rebuild();
  1939. }
  1940. // 장비사용내역 해당없음 체크 로직
  1941. // 2009-02-16 ycd 기록 데이터 존재하지 않을 경우 해당없음 체크
  1942. function fTourniquetCheck(){
  1943. if (model.getValue("/root/main/MnphopcrData/MnphopcrList/tourniquetspec/tourniquet/tourniquetyn") == 'N') {
  1944. //if (chk_tourniquetyn.value == 'N') {//2008-08-07 오후 8:20:51 속도 개선을 위한 주석처리 taebum
  1945. model.removeNodeset(xPathData+"/tourniquetspec/tourniquet/tourniquetlist");
  1946. //model.copyNode(xPathData+"/tourniquetspec", xPathFormat+"/tourniquetspec"); 2008-07-09 오전 10:18:09 경로 수정으로 변경
  1947. //model.setValue(xPathData+"/tourniquetspec/tourniquet/tourniquetyn","N");
  1948. grd_tourniquet.disabled = true ;
  1949. btn_addtourniquet.disabled = true ;
  1950. bnt_deltourniquet.disabled = true ;
  1951. } else {
  1952. grd_tourniquet.disabled = false ;
  1953. btn_addtourniquet.disabled = false ;
  1954. bnt_deltourniquet.disabled = false ;
  1955. }
  1956. grd_tourniquet.rebuild();
  1957. }
  1958. function fInscathCheck(){
  1959. if(model.getValue("/root/main/MnphopcrData/MnphopcrList/warmcoldregmspec/lists/cathlist/inscath/itemnm") == ""){
  1960. model.removeNodeset("/root/main/MnphopcrData/MnphopcrList/warmcoldregmspec/lists/cathlist/inscath");
  1961. grd_inscath.refresh();
  1962. }
  1963. }
  1964. function fWarmcoldregmCheck(){
  1965. // if (chk_warmcoldregmyn.value == 'N') {
  1966. // fClearGroup(grp_warmcoldregm_urinary , 2);
  1967. // fClearGroup(grp_warmcoldregm_ltube , 3);
  1968. // fClearGroup(grp_warmcoldregm_subclavian, 4);
  1969. // chk_warmcoldregmyn.value = "N";
  1970. //
  1971. // grp_warmcoldregm_urinary.disabled = "true" ;
  1972. // grp_warmcoldregm_ltube.disabled = "true" ;
  1973. // // grp_warmcoldregm_subclavian.disabled = "true" ;
  1974. // }
  1975. // else {
  1976. // grp_warmcoldregm_urinary.disabled = "false" ;
  1977. // grp_warmcoldregm_ltube.disabled = "false" ;
  1978. // // grp_warmcoldregm_subclavian.disabled = "false" ;
  1979. // }
  1980. }
  1981. function fSkinupdtcheck(){
  1982. if (chk_skinupdtcheck.value == 'Y') {
  1983. /*
  1984. fClearGroup(grp_postureskinupdt, 5);
  1985. fClearGroup(grp_postureskinupdt, 6);
  1986. chk_skinupdtcheck.value = "X";
  1987. grp_postureskinupdt.disabled = "true" ;
  1988. */
  1989. datagrid2.disabled = true;
  1990. button15.disabled = true;
  1991. button13.disabled = true;
  1992. model.removeNodeSet("/root/main/MnphopcrData/MnphopcrList/postureskinupdtspec/lists/skinlist");
  1993. datagrid2.refresh();
  1994. }
  1995. else {
  1996. datagrid2.disabled = false;
  1997. button15.disabled = false;
  1998. button13.disabled = false;
  1999. datagrid2.addRow();
  2000. }
  2001. }
  2002. // 2009-04-03 ycd 수술간호 기록 수정으로 인하여 삭제 처리
  2003. /*
  2004. function fWarmColdMethodNoneChech(){
  2005. if(chk_warmnoneflag.value == 'X') {
  2006. datagrid2.disabled = true;
  2007. button16.disabled = true;
  2008. button21.disabled = true;
  2009. model.removeNodeSet("/root/main/MnphopcrData/MnphopcrList/warmcoldregmspec/lists/warmlist/warmcoldregm");
  2010. datagrid3.refresh();
  2011. } else {
  2012. datagrid2.disabled = false;
  2013. button16.disabled = false;
  2014. button21.disabled = false;
  2015. datagrid3.addRow();
  2016. }
  2017. }
  2018. */
  2019. function fUrinarycheck(){
  2020. if (fCheckBoxValueCheck(chk_urinarycheck.value, 'X') ) {
  2021. fClearGroup(grp_warmcoldregm_urinary , 2);
  2022. chk_urinarycheck.value = "X";
  2023. grp_urinary.disabled = "true" ;
  2024. }
  2025. else {
  2026. grp_urinary.disabled = "false" ;
  2027. }
  2028. }
  2029. function fLtubecheck(){
  2030. if (fCheckBoxValueCheck(chk_ltubecheck.value, 'X') ) {
  2031. fClearGroup(grp_warmcoldregm_ltube, 3);
  2032. chk_ltubecheck.value = "X";
  2033. grp_ltube.disabled = "true" ;
  2034. }
  2035. else {
  2036. grp_ltube.disabled = "false" ;
  2037. }
  2038. }
  2039. function fSubclaviancheck(){
  2040. if (fCheckBoxValueCheck(chk_subclaviancheck.value, 'X') ) {
  2041. fClearGroup(grp_warmcoldregm_subclavian, 4);
  2042. chk_subclaviancheck.value = "X";
  2043. grp_subclavian.disabled = "true" ;
  2044. }
  2045. else {
  2046. grp_subclavian.disabled = "false" ;
  2047. }
  2048. }
  2049. function fSkinupdtStatcheck(pPre){
  2050. if (eval(pPre+"none").value == "Y") {
  2051. eval(pPre+"redness" ).value = "";
  2052. eval(pPre+"bulla" ).value = "";
  2053. eval(pPre+"abrasion").value = "";
  2054. eval(pPre+"redness" ).disabled = "true";
  2055. eval(pPre+"bulla" ).disabled = "true";
  2056. eval(pPre+"abrasion").disabled = "true";
  2057. } else {
  2058. eval(pPre+"redness" ).disabled = "false";
  2059. eval(pPre+"bulla" ).disabled = "false";
  2060. eval(pPre+"abrasion").disabled = "false";
  2061. }
  2062. }
  2063. /* ------------------------------------------------- */
  2064. /* desc : 수술기록 자료저장하기 */
  2065. /* param : pModel - Model */
  2066. /* tNode - Target Node */
  2067. /* sNode - Source Node */
  2068. /* return : */
  2069. /* -------------------------------------------------- */
  2070. function fSave(pFlag){
  2071. //2012.09.03 _ 인증저장 할 경우 검체 항목에 '보낸시간' 이 입력 되어 있지 않을때는 '퇴실일시'가 자동 저장 되도록 체크._장수경샘 요청._손성훈.
  2072. for(var i = 1 ; i< grd_spclistnew.rows ; i++ ){
  2073. if (model.getValue("/root/main/SheetData3/SpecimenLists/specimenlistnew[" + i + "]/specimentm") == ""){
  2074. var sOutroomhh = model.getValue("/root/init/workinst/datetimedata/patoutroomhh");
  2075. model.setValue("/root/main/SheetData3/SpecimenLists/specimenlistnew[" + i + "]/specimentm", sOutroomhh );
  2076. }
  2077. }
  2078. grd_spclistnew.gridToInstance();
  2079. // ----------------------------------------2012.09.03_손성훈 //
  2080. model.removenode("/root/send");
  2081. var rtn = fOpeuDataConcatenate(); // 참가자정보 조합
  2082. if(rtn == false) return;
  2083. rtn = fInstance2Save(pFlag); // 수술기록 자료 Copy 하기
  2084. if(rtn == false) return;
  2085. if (pFlag == "C") {
  2086. fCheckMedrList();
  2087. var actcnt = model.getValue("/root/hidden/medrinfo/medrlist/actcnt");
  2088. var totalcnt = model.getValue("/root/hidden/medrinfo/medrlist/totalcnt");
  2089. if(actcnt < totalcnt && totalcnt != 0) {
  2090. messageBox("미투약된 수술중 처방이 존재합니다.", "I");
  2091. }
  2092. //sCertOutFlag = "Y"; // 인증저장 플래그
  2093. //fInOutRoomSave("2"); // 수술기록 1:입실저장,2:퇴실저장,9:입실취소 등록/수정/삭제 요청을 처리한다.
  2094. //sCertOutFlag = "N"; // 인증저장 플래그
  2095. if(chk_opnoyn.value == "Y") {
  2096. } else {
  2097. var rtn = fConfirmInputData3(); // 시간정보 퇴실 저장 여부
  2098. if (rtn == false) return;
  2099. }
  2100. }
  2101. //if (pFlag == "T") {//임시저장
  2102. // fChkInputTime();//입력시간 자릿수 체크
  2103. //}
  2104. fMnphopcrDataConcatenate(pFlag) ; // 수술간호기록정보 조합하기
  2105. rtn = fCountDataSave(pFlag); // 수술기록2 Count정보 저장하기
  2106. if(rtn == false) return;
  2107. // var wUserId = getUserInfo("userid" ); // 사용자
  2108. // var wUserNm = getUserInfo("usernm" ); // 사용자 명
  2109. // var wDeptNm = getUserInfo("posdeptnm"); // 사용자 부서명
  2110. var wDate = getCurrentDate();
  2111. var wTime = getCurrentTime();
  2112. var wDate = wDate.substr(0,4) + "-"
  2113. + wDate.substr(4,2) + "-" + wDate.substr(6,2) + " "
  2114. + wTime.substr(0,2) + ":" + wTime.substr(2,2) ;
  2115. model.setValue("/root/init/workinst/OpOtherData/OpWrtDate", wDate );
  2116. model.setValue("/root/init/workinst/OpOtherData/OpWrtName", getUserInfo("usernm") );
  2117. model.setValue("/root/init/workinst/OpOtherData/OpWrtDept", getUserInfo("posdeptnm"));
  2118. //인증저장 관련 자료 Call
  2119. var CertFlag = true;
  2120. if( pFlag == "C" ) {
  2121. //피부관찰기록 체크 여부 확인
  2122. var SkinRecViewOpenYn = "";
  2123. //피부관찰기록 여부 'Y' 이면서 주수술에 한에서 체크
  2124. if(chk_opnoyn.value == "Y") {
  2125. } else {
  2126. if( model.getValue("/root/code/codeinfo/codelist[cdgrupid='144']/cdid") == "Y" &&
  2127. ( model.getValue(xPathData+"/oprsrvno") == model.getValue(xPathData+"/mainoprsrvno") || model.getValue(xPathData+"/mainoprsrvno") == "-" ) ){
  2128. model.removeNodeset("/root/recinfo/skinrecinfo");
  2129. submit("TRMNP00326", false);
  2130. if( ( model.getValue("/root/code/codeinfo/codelist[cdgrupid='182']/cdid") == model.getValue(xPathData+"/perfdeptcd") )
  2131. &&(( chk_anstkindcheck03.value != "" )||( chk_anstcprchk.value != "" )) || chk_esuyn.value != "" ) {//안과 수술 피부관찰지 체크 제외(국소, CPCR일때) //20110322 이선경(경북대) : ESU 해당없음인경우도 제외
  2132. //피부관찰지 체크 제외
  2133. }else {
  2134. if((model.getValue("/root/recinfo/skinrecinfo/skinreclist/reccnt") == "0" || model.getValue("/root/recinfo/skinrecinfo/skinreclist/tmpreccnt") != "0") && grd_skinsurveylist.rows <= 2){
  2135. messageBox("피부관찰기록 정보가 존재하지 않거나 미인증 기록이 존재합니다.\n수술간호기록III의 피부관찰기록을 작성하거나 피부관찰기록지에서 피부관찰기록을 작성하십시오.","I");
  2136. return;
  2137. }
  2138. if( (model.getValue("/root/recinfo/skinrecinfo/skinreclist/reccnt") == "0" || model.getValue("/root/recinfo/skinrecinfo/skinreclist/tmpreccnt") != "0") && grd_skinsurveylist.rows <= 2 ){
  2139. //messageBox("수술간호기록 저장에 실패하였습니다.\n\n피부관찰기록 정보를 확인 하시고 인증저장 하십시요.", "C");
  2140. return;
  2141. }
  2142. }
  2143. }
  2144. }
  2145. //2008-07-27 오후 3:14:29 인증을 할 경우 적출물기록, 장기이식기록을 조회하여 데이터가 존재할 경우 함께 인증처리 한다.
  2146. fGetExtcOtRecord();
  2147. //인증저장 번호 추출 및 기록 필수 조건 블럭킹
  2148. for(var i = grd_skinsurveylist.fixedRows ; i < grd_skinsurveylist.rows ; i++){
  2149. if(grd_skinsurveylist.rowStatus(i) == 0){
  2150. grd_skinsurveylist.rowStatus(i) = 2;
  2151. }
  2152. if(grd_skinsurveylist.valueMatrix(i, grd_skinsurveylist.colRef("surveypriod")) == ""){
  2153. messageBox("관찰시기 항목은 필수 입력 항목입니다.", "I");
  2154. return;
  2155. }
  2156. if(grd_skinsurveylist.valueMatrix(i, grd_skinsurveylist.colRef("surveyplace")) == ""){
  2157. messageBox("관찰장소 항목은 필수 입력 항목입니다.", "I");
  2158. return;
  2159. }
  2160. if(grd_skinsurveylist.valueMatrix(i, grd_skinsurveylist.colRef("surveynm")) == ""){
  2161. messageBox("관찰자 항목은 필수 입력 항목입니다.", "I");
  2162. return;
  2163. }
  2164. if(grd_skinsurveylist.valueMatrix(i, grd_skinsurveylist.colRef("cnfmrnm")) == ""){
  2165. messageBox("확인의 항목은 필수 입력 항목입니다.", "I");
  2166. return;
  2167. }
  2168. if(grd_skinsurveylist.valueMatrix(i, grd_skinsurveylist.colRef("trobyn")) == "Y" &&
  2169. grd_skinsurveylist.valueMatrix(i, grd_skinsurveylist.colRef("skinstat")) == "" ){
  2170. messageBox("이상유무 'Y'일 경우 피부상태는 필수 입력 항목입니다.", "I");
  2171. return;
  2172. }
  2173. if( grd_skinsurveylist.valueMatrix(i, grd_skinsurveylist.colRef("signno")) != ""){
  2174. sSignNo = grd_skinsurveylist.valueMatrix(i, grd_skinsurveylist.colRef("signno"));
  2175. }
  2176. }
  2177. CertFlag = fSignProcessSet();
  2178. }
  2179. var updtdata = getGridUpdateData(grd_skinsurveylist);
  2180. model.makeValue("/root/send/recsavedata" , updtdata);
  2181. if (CertFlag == false) return; // 인증실패
  2182. if (submit("TXMNP00303", false)){ // 수술간호기록정보,참가자 정보저장
  2183. //messagebox("저장 되었습니다.", "I000" );
  2184. model.setValue(xPathData+"/recstat" , "U"); // record 상태정보 i:신규,u:수정
  2185. //2008-08-28 오후 1:44:05 taebum 입/퇴실 저장이 아닐 경우 수술예약정보는 변경 되지 못하도록 수정.
  2186. //model.setValue(xPathData+"/opstatcd", sOpstatcdnew); // 진행상태
  2187. model.setValue(xPathData+"/org_opoutrmplcecd", sOpoutrmplcecd);
  2188. model.setValue("/root/init/HideData/opoutrmplcecd", model.getValue(xPathData+ "/opoutrmplcecd")); // 퇴실장소
  2189. //==================================================================================================
  2190. if( pFlag == "C" ) {
  2191. model.setValue(xPathData+"/certno" , model.getValue("/root/temp/retdata/certno"));
  2192. btn_rgst_tmp.disabled = true;
  2193. }
  2194. fReload("S");
  2195. //Mnphopcrlist_Read();
  2196. //fMnphopco_Read(); // Count 정보를 다시 읽는다. 그렇지 않으면 오류발생한다.
  2197. //fOpTotalTime();
  2198. //fSettingOPdate("all"); //수술관련 시간 참여자 정보에 자동 세팅 처리(집도의입실, 수술시작)
  2199. }
  2200. btn_specmini.dispatch("DOMActivate"); // 검체_new 크기 축소
  2201. grd_skinsurveylist.clearStatus();
  2202. btn_decrease.dispatch("DOMActivate");
  2203. grd_count.rebuildStyle();
  2204. fSetStyle();
  2205. }
  2206. /* ------------------------------------------------- */
  2207. /* desc : 수술기록 시간 자릿수 체크 */
  2208. /* param : */
  2209. /* return : */
  2210. /* -------------------------------------------------- */
  2211. //function fChkInputTime() {
  2212. // var sFromdd = model.getValue(xPathDispDT+"/perfidarvhh" ); // 집도의입실시간
  2213. // var sFromhh = model.getValue(xPathDispDT+"/patinroomhh" ); // 입실시간
  2214. // var sTodd = model.getValue(xPathDispDT+"/perfidouthh"); // 집도의퇴실시간
  2215. // var sTohh = model.getValue(xPathDispDT+"/patoutroomhh"); // 퇴실시간
  2216. // var sTohh = model.getValue(xPathDispDT+"/optohh"); // 수술종료시간
  2217. // var sTohh = model.getValue(xPathDispDT+"/anstendhh"); // 수술종료시간
  2218. // var sTohh = model.getValue(xPathDispDT+"/optohh"); // 수술종료시간
  2219. // var sTohh = model.getValue(xPathDispDT+"/optohh"); // 수술종료시간
  2220. //
  2221. //
  2222. //
  2223. //}
  2224. /* ------------------------------------------------- */
  2225. /* desc : 수술기록 강제 인증저장하기 */
  2226. /* param : pModel - Model */
  2227. /* tNode - Target Node */
  2228. /* sNode - Source Node */
  2229. /* return : */
  2230. /* -------------------------------------------------- */
  2231. function fOnClickForceSaveBtn(pFlag){
  2232. model.removenode("/root/send");
  2233. var rtn = fOpeuDataConcatenate(); // 참가자정보 조합
  2234. //if(rtn == false) return;
  2235. rtn = fInstance2Save(pFlag); // 수술기록 자료 Copy 하기
  2236. //if(rtn == false) return;
  2237. if (pFlag == "C") {
  2238. var rtn = fConfirmInputData3(); // 시간정보 퇴실 저장 여부
  2239. //if (rtn == false) return;
  2240. }
  2241. fMnphopcrDataConcatenate(pFlag) ; // 수술간호기록정보 조합하기
  2242. rtn = fCountDataSave(pFlag); // 수술기록2 Count정보 저장하기
  2243. //if(rtn == false) return;
  2244. // var wUserId = getUserInfo("userid" ); // 사용자
  2245. // var wUserNm = getUserInfo("usernm" ); // 사용자 명
  2246. // var wDeptNm = getUserInfo("posdeptnm"); // 사용자 부서명
  2247. var wDate = getCurrentDate();
  2248. var wTime = getCurrentTime();
  2249. var wDate = wDate.substr(0,4) + "-"
  2250. + wDate.substr(4,2) + "-" + wDate.substr(6,2) + " "
  2251. + wTime.substr(0,2) + ":" + wTime.substr(2,2) ;
  2252. model.setValue("/root/init/workinst/OpOtherData/OpWrtDate", wDate );
  2253. model.setValue("/root/init/workinst/OpOtherData/OpWrtName", getUserInfo("usernm") );
  2254. model.setValue("/root/init/workinst/OpOtherData/OpWrtDept", getUserInfo("dutplcecd"));
  2255. //인증저장 관련 자료 Call
  2256. var CertFlag = true;
  2257. if (pFlag == "C") {
  2258. //2008-07-27 오후 3:14:29 인증을 할 경우 적출물기록, 장기이식기록을 조회하여 데이터가
  2259. // 존재할 경우 함께 인증처리 한다.
  2260. fGetExtcOtRecord();
  2261. CertFlag = fSignProcessSet();
  2262. }
  2263. if (CertFlag == false) return; // 인증실패
  2264. if (submit("TXMNP00303")){ // 수술간호기록정보,참가자 정보저장
  2265. messageBox("저장 되었습니다.", "I000" );
  2266. model.setValue(xPathData+"/recstat" , "U"); // Record 상태정보 I:신규,U:수정
  2267. //2008-08-28 오후 1:44:05 taebum 입/퇴실 저장이 아닐 경우 수술예약정보는 변경 되지 못하도록 수정.
  2268. //model.setValue(xPathData+"/opstatcd", sOpstatcdnew); // 진행상태
  2269. model.setValue(xPathData+"/org_opoutrmplcecd", sOpoutrmplcecd);
  2270. model.setValue("/root/init/HideData/opoutrmplcecd", model.getValue(xPathData+ "/opoutrmplcecd")); // 퇴실장소
  2271. //==================================================================================================
  2272. if (pFlag == "C") {
  2273. model.setValue(xPathData+"/certno" , model.getValue("/root/temp/retdata/certno"));
  2274. btn_rgst_tmp.disabled = true;
  2275. }
  2276. fMnphopco_Read(); // Count 정보를 다시 읽는다. 그렇지 않으면 오류발생한다.
  2277. fOpTotalTime();
  2278. }
  2279. }
  2280. //이전 같은날 같은 수술방의 직전에 수술한 수술환자의 수술시간 check
  2281. function fValidPreOpdt(){
  2282. var sPre_opdt = model.getValue("/root/main/MnphopcrData/MnphopcrList/pre_optodt");
  2283. var sPre_opdd = "";
  2284. var sPre_optm = "";
  2285. var sPre_opmi = "";
  2286. //2008-09-03 오후 8:24:36 taebum 협진일 경우 return;
  2287. if( (model.getValue(xPathData+"/oprsrvno") != model.getValue(xPathData+"/mainoprsrvno")) &&
  2288. (model.getValue(xPathData+"/mainoprsrvno") != "-" ) ){
  2289. return true;
  2290. }
  2291. if(sPre_opdt != "" && sPre_opdt != null && sPre_opdt != "undefined"){
  2292. sPre_opdd = sPre_opdt.substr(0,8);
  2293. sPre_optm = sPre_opdt.substr(8,2);
  2294. sPre_opmi = sPre_opdt.substr(10,2)
  2295. var sDisplayPreOpdate = sPre_opdt.substr(0,4) + "-"
  2296. + sPre_opdt.substr(4,2) + "-"
  2297. + sPre_opdt.substr(6,2) + " "
  2298. + sPre_optm + ":"
  2299. + sPre_opmi ;
  2300. if(eval(sPre_opdd) > eval(inp_patinroomdd.value)){
  2301. messageBox("이전 수술환자의 퇴실일시를 확인하십시요. 이전 퇴실일시 : "+ sDisplayPreOpdate , "C000");
  2302. return false;
  2303. }else if(eval(sPre_opdd) == eval(inp_patinroomdd.value)){
  2304. if(eval(sPre_optm) > eval((inp_patinroomhh.value).substr(0,2))){
  2305. messageBox("이전 수술환자의 퇴실일시를 확인하십시요. 이전 퇴실일시 : "+ sDisplayPreOpdate , "C000");
  2306. return false;
  2307. }else if(eval(sPre_optm) == eval((inp_patinroomhh.value).substr(0,2))){
  2308. if(eval(sPre_opmi) > eval((inp_patinroomhh.value).substr(2,2))){
  2309. messageBox("이전 수술환자의 퇴실일시를 확인하십시요. 이전 퇴실일시 : "+ sDisplayPreOpdate , "C000");
  2310. return false;
  2311. }
  2312. }
  2313. }
  2314. }
  2315. return true;
  2316. }
  2317. // --------------------------------------------------------------------------
  2318. // 수술기록 1:입실저장,2:퇴실저장,9:입실취소 등록/수정/삭제 요청을 처리한다.
  2319. // --------------------------------------------------------------------------
  2320. function fInOutRoomSave(pFlag){
  2321. //cart 자동 불출 //2008-07-31 오후 8:03:05 수술대기 이상 Cart 불출이하 자동불출 go
  2322. //=======================================================================
  2323. //2008-08-19 오전 10:09:12 taebum 주석처리 요청
  2324. /*
  2325. var sTmpOprsrvno = model.getValue("/root/main/operation/list/oprsrvno");
  2326. var sTmpOproomcd = model.getValue("/root/main/operation/list/oproomcd");
  2327. var sTmpOpstatcd = model.getValue("/root/main/MnphopcrData/MnphopcrList/opstatcd");
  2328. var sTempCartGubn = model.getValue("/root/main/MnphopcrData/MnphopcrList/ccrtstat"); //수술카트
  2329. var sTmpAnstCartGubn = model.getValue("/root/main/MnphopcrData/MnphopcrList/anstccrtstat"); //마취카트
  2330. var cartbaglist = "m▦rownum▦oprsrvno▦oproomcd▦cartgubn";
  2331. var bSubMitFlag = false;
  2332. //수술Cart
  2333. if((parseInt(sTmpOpstatcd) > 29) && (parseInt(sTempCartGubn) < 3) ){ //2008-07-31 오후 8:03:05 수술대기 이상 Cart 불출이하 자동불출 go
  2334. cartbaglist = cartbaglist + "▩" + "u" + "▦" + "1" + "▦" + sTmpOprsrvno + "▦" + sTmpOproomcd + "▦" + "O";
  2335. bSubMitFlag = true;
  2336. }
  2337. if((parseInt(sTmpOpstatcd) > 29) && (parseInt(sTmpAnstCartGubn) < 3) ){
  2338. if(bSubMitFlag == true){
  2339. cartbaglist = cartbaglist + "▩" + "u" + "▦" + "2" + "▦" + sTmpOprsrvno + "▦" + sTmpOproomcd + "▦" + "A";
  2340. }else{
  2341. cartbaglist = cartbaglist + "▩" + "u" + "▦" + "1" + "▦" + sTmpOprsrvno + "▦" + sTmpOproomcd + "▦" + "A";
  2342. bSubMitFlag = true;
  2343. }
  2344. }
  2345. if(bSubMitFlag == true){
  2346. model.removenode("/root/send");
  2347. model.makeValue("/root/send/cartsend" , cartbaglist );
  2348. if(submit("TXMNP03401")){
  2349. if((parseInt(sTmpOpstatcd) > 29) && (parseInt(sTempCartGubn) < 3) ){
  2350. model.setValue("/root/main/MnphopcrData/MnphopcrList/ccrtstat", "3");
  2351. cmb_cartstat.refresh();
  2352. }
  2353. }
  2354. }
  2355. */
  2356. if( sCertOutFlag == "N" ) {//인증저장일때는 인스턴스 삭제 안함
  2357. model.removenode("/root/send");
  2358. }
  2359. sPid = model.getValue("/root/init/HideData/pid" ); // 01 환자번호
  2360. sOprsrvno = model.getValue("/root/init/HideData/oprsrvno"); // 02 수술예약(의뢰)번호(년도+일련번호)
  2361. sOphistno = model.getValue("/root/init/HideData/ophistno"); // 03 예약번호에따른이력번호
  2362. sInstcd = model.getValue("/root/init/HideData/instcd" ); // 04 기관코드
  2363. //2008-06-23 오후 4:52:59 taebum 입/퇴실 시간 저장시 시간이 입력되지 않았을 경우 경고 후 return
  2364. if (pFlag == "1") {
  2365. model.makeValue("/root/send/instcd" , model.getValue("/root/init/HideData/instcd" ));
  2366. model.makeValue("/root/send/pid" , model.getValue("/root/init/HideData/pid" ));
  2367. model.makeValue("/root/send/oprsrvno" , model.getValue("/root/init/HideData/oprsrvno"));
  2368. model.makeValue("/root/send/ophistno" , model.getValue("/root/init/HideData/ophistno"));
  2369. var ccrtstat = "";
  2370. if (submit("TRMNP00350", false)) { // 수술실의 코드와 명칭을 가져온다.
  2371. var ccrtstat = model.getValue("/root/main/CartList/cartlist/ccrtstat");
  2372. if(ccrtstat < 3) {
  2373. var rtn = messageBox("아직 cart미불출 상태입니다 그래도 입실하시겠습니까?", "Q");
  2374. if(rtn != "6") {
  2375. return;
  2376. }
  2377. }
  2378. }
  2379. if(inp_patinroomhh.value == "" || (inp_patinroomhh.value.replace(' ', '')).length < 4){
  2380. messageBox("입실시간을 입력 하시기 바랍니다.", "I000");
  2381. model.setFocus("inp_patinroomhh");
  2382. return;
  2383. }else if(inp_patinroomdd.value == "" || (inp_patinroomdd.value.replace(' ', '')).length < 8){
  2384. messageBox("입실일자를 입력 하시기 바랍니다.", "I000");
  2385. model.setFocus("inp_patinroomdd");
  2386. return;
  2387. }else{
  2388. if(!fValidPreOpdt()){ //이전 수술시작시간 validcheck
  2389. return;
  2390. }
  2391. //2008-10-05 오후 11:47:19 taebum
  2392. //환자 도착시간보다 입실시간이 작을 경우 메세지 호출 추가
  2393. var sPatArriveDt = model.getValue("/root/main/MnphopcrData/MnphopcrList/patarrvdt") +
  2394. model.getValue("/root/main/MnphopcrData/MnphopcrList/patarrvtm");
  2395. var sInroomDt = model.getValue("/root/init/workinst/datetimedata/patinroomdd")+
  2396. model.getValue("/root/init/workinst/datetimedata/patinroomhh");
  2397. if(sPatArriveDt > sInroomDt){
  2398. messageBox("환자도착 시간을 확인 하시기 바랍니다.", "I000");
  2399. model.setFocus("inp_patinroomhh");
  2400. return;
  2401. }
  2402. }
  2403. //입실시간 자동 세팅 부분
  2404. fSettingOPdate("Opfromdt");
  2405. }else if (pFlag == "2") {
  2406. //2009-02-19 ycd 퇴실 저장시 시간 체크 추가
  2407. if(inp_patinroomdd.value == "" || (inp_patinroomdd.value.replace(' ', '')).length < 8){
  2408. messageBox("입실일자를 입력 하시기 바랍니다.", "I000");
  2409. model.setFocus("inp_patoutroomhh");
  2410. return;
  2411. }
  2412. if(inp_patinroomhh.value == "" || (inp_patinroomhh.value.replace(' ', '')).length < 4){
  2413. messageBox("입실시간을 입력 하시기 바랍니다.", "I000");
  2414. model.setFocus("inp_patoutroomhh");
  2415. return;
  2416. }
  2417. if(inp_patoutroomdd.value == "" || (inp_patoutroomdd.value.replace(' ', '')).length < 8){
  2418. messageBox("퇴실일자를 입력 하시기 바랍니다.", "I000");
  2419. model.setFocus("inp_patoutroomdd");
  2420. return;
  2421. }
  2422. if(inp_patoutroomhh.value == "" || (inp_patoutroomhh.value.replace(' ', '')).length < 4 ){
  2423. messageBox("퇴실시간을 입력 하시기 바랍니다.", "I000");
  2424. model.setFocus("inp_patoutroomhh");
  2425. return;
  2426. }
  2427. //2010.04.09 K. J. M 퇴실저장여부 추가
  2428. sOutflag = "Y";
  2429. /* ycd 확실하지 않아 로직 추가 제한
  2430. if(inp_optodd.value == "" || (inp_optodd.value).length < 8 || inp_optohh.value == "" || (inp_optohh.value).length < 4){
  2431. messageBox("수술종료일시를 입력 하시기 바랍니다.", "I000");
  2432. model.setFocus("inp_optohh");
  2433. return;
  2434. }
  2435. if(inp_optodd.value ||inp_optohh.value > inp_patoutroomdd.value || inp_patoutroomhh.value ){
  2436. messageBox("퇴실일시가 수술종료일시보다 이전입니다. 퇴실일시를 확인 하십시오.", "I000");
  2437. model.setFocus("inp_patoutroomhh");
  2438. return;
  2439. }
  2440. */
  2441. if(inp_patinroomdd.value + inp_patinroomhh.value > inp_patoutroomdd.value + inp_patoutroomhh.value ){
  2442. messageBox("퇴실일시가 입실일시보다 이전입니다. 퇴실일시를 확인 하십시오.", "I000");
  2443. model.setFocus("inp_patoutroomhh");
  2444. return;
  2445. }
  2446. //=========================================================================================
  2447. //2008-06-27 오후 3:42:06 taebum add 추가 요구사항
  2448. if(cmb_outplc.value == "" || cmb_outplc.value == "undefined" || cmb_outplc.value == null || cmb_outplc.value == "00" || cmb_outplc.value == "43"){
  2449. messageBox("퇴실장소를 입력 하시기 바랍니다.", "I000");
  2450. model.setFocus("cmb_outplc");
  2451. return;
  2452. }
  2453. //인증저장 후 퇴실장소 입력오류로 수정 불가
  2454. /*
  2455. //2008-06-27 오후 2:52:26 taebum add 추가요구사항
  2456. setParameter("SPMNP00305_message", "입력하신 퇴실장소가 맞습니까?");
  2457. setParameter("SPMNP00305_button1", "확 인");
  2458. setParameter("SPMNP00305_button2", "취 소");
  2459. setParameter("SPMNP00305_buttonFocus", "button2");
  2460. modal("SPMNP00305", "", 300, 400, "SPMNP00305", "width:510px;height:130px;");
  2461. var sResult = getParameter("SPMNP00305_result");
  2462. */
  2463. //alert(sResult);
  2464. //2008-09-04 오후 9:42:57 퇴실 장소 재확인...
  2465. if( (model.getValue(xPathData+"/certno") == "")&&( sCertOutFlag == "Y" )&&( sOpstatcd < "50" ) ){//처음 인증저장시 퇴실저장 확인 2010.02.18 K. J. M
  2466. if (window.alert("퇴실 저장 하시겠습니까?." ,"퇴실장소 확인", 1 | 32) != 1){
  2467. messageBox("퇴실 저장이 취소 되었습니다.", "I000");
  2468. return;
  2469. }
  2470. }else if( ( sCertOutFlag == "N" )&&( pFlag == "2" ) ) {//퇴실저장시 무조건 확인 2010.02.18 K. J. M
  2471. if (window.alert("퇴실 저장 하시겠습니까?." ,"퇴실장소 확인", 1 | 32) != 1){
  2472. messageBox("퇴실 저장이 취소 되었습니다.", "I000");
  2473. return;
  2474. }
  2475. }
  2476. //=========================================================================================
  2477. }
  2478. var sOutplccd = model.getValue("/root/main/MnphopcrData/MnphopcrList/opoutrmplcecd");
  2479. var sOutplcnm = model.getValue("/root/main/MnphopcrData/MnphopcrList/opdisplaynm");//기준자료로 자동셋팅되게 수정 K. J. M 2010.01.21
  2480. if(sOutplccd != "" && sOutplccd != null && sOutplccd != "undefined"){
  2481. if( sOutplcnm == "" ) {//전광판명이 없으면
  2482. // 2009-02-05 ycd 퇴실장소 flag에 따른 전광판용 퇴실장소명 (공통코드 관리시 수정 필요)
  2483. if(sOutplccd == "01"){
  2484. sOutplcnm = "회복실";
  2485. }else if(sOutplccd == "02"){
  2486. sOutplcnm = "병실";
  2487. }else if(sOutplccd == "31"){
  2488. sOutplcnm = "DSC";
  2489. }else if(sOutplccd == "32"){
  2490. sOutplcnm = "주사실";
  2491. }else if(sOutplccd == "21"){
  2492. sOutplcnm = "ICU";
  2493. }else if(sOutplccd == "22"){
  2494. sOutplcnm = "ICU";
  2495. }else if(sOutplccd == "23"){
  2496. sOutplcnm = "ICU";
  2497. }else if(sOutplccd == "24"){
  2498. sOutplcnm = "ICU";
  2499. }else if(sOutplccd == "25"){
  2500. sOutplcnm = "회복실";
  2501. }else if(sOutplccd == "26"){
  2502. sOutplcnm = "회복실";
  2503. }else if(sOutplccd == "99"){
  2504. sOutplcnm = model.getValue("/root/main/MnphopcrData/MnphopcrList/opoutrmplcenm");
  2505. }
  2506. // 2009-02-05 ycd 퇴실장소 추가
  2507. else if(sOutplccd == "27"){
  2508. sOutplcnm = "ICU";
  2509. }else if(sOutplccd == "28"){
  2510. sOutplcnm = "ICU";
  2511. }else if(sOutplccd == "29"){
  2512. sOutplcnm = "ICU";
  2513. }else if(sOutplccd == "20"){
  2514. sOutplcnm = "ICU";
  2515. }
  2516. }
  2517. }
  2518. sJobProc = "pid" + "▦" // 01 환자번호
  2519. + "oprsrvno" + "▦" // 02 수술예약
  2520. + "ophistno" + "▦" // 03 이력번호
  2521. + "instcd" + "▦" // 04 기관코드
  2522. + "jobflag" + "▦" // 05 작업구분(1:입실저장,2:퇴실저장,9:입실취소)
  2523. + "outplcnm" + "▩" // 06 퇴실장소명
  2524. + sPid + "▦" // 01 환자번호
  2525. + sOprsrvno + "▦" // 02 수술예약
  2526. + sOphistno + "▦" // 03 이력번호
  2527. + sInstcd + "▦" // 04 기관코드
  2528. + pFlag + "▦" // 05 작업구분(1:입실저장,2:퇴실저장,9:입실취소)
  2529. + sOutplcnm + "▩"; // 06 퇴실장소명
  2530. model.makeValue("/root/send/JobProc", sJobProc);
  2531. var rtn = fInstance2Save(pFlag); // 수술기록 자료 Copy 하기
  2532. if(rtn == false) return;
  2533. fMnphopcrDataConcatenate("Y"); // 수술간호기록정보 조합하기
  2534. if( submit("TXMNP00301") ){ // 수술간호기록정보,참가자 정보저장
  2535. if( (model.getValue(xPathData+"/certno") == "")&&( sCertOutFlag == "Y" )&&( sOpstatcd < "50" ) ){//처음 인증저장시 퇴실저장 확인 2010.02.18 K. J. M
  2536. messageBox("저장 되었습니다.", "I000" );
  2537. //sOpstatcd = sOpstatcdnew;//수술상태값 변경(인증저장시 퇴실저장여부 체크로직 때문에 바뀐 상태값으로 셋팅)2010.02.19 K. J. M
  2538. }else if( (( sCertOutFlag == "N" )&&( pFlag == "2" ))||( pFlag == "1" )) {//퇴실저장시 무조건 확인 2010.02.18 K. J. M, 입실저장일때
  2539. messageBox("저장 되었습니다.", "I000" );
  2540. }
  2541. model.setValue(xPathData+"/recstat" ,"U"); // Record 상태정보 I:신규,U:수정
  2542. //================================================================================================
  2543. //입실 저장 후 진행사항 정보 관련 null exception error 처리 관련 추가 2008-07-26 오후 1:56:53
  2544. model.setValue(xPathData+"/opstatcd", sOpstatcdnew); // 진행상태
  2545. model.setValue(xPathData+"/org_opoutrmplcecd", sOpoutrmplcecd);
  2546. //================================================================================================
  2547. if( pFlag == "1" ) {
  2548. inp_patinroomdd.attribute("color") = "#0000ff";
  2549. inp_patinroomhh.attribute("color") = "#0000ff";
  2550. if(model.getValue("/root/main/MnphopcrData/MnphopcrList/opposturespec/opposture/opposturelist/opposturefrdt") == ""){
  2551. model.setValue("/root/main/MnphopcrData/MnphopcrList/opposturespec/opposture/opposturelist/opposturefrdt",
  2552. model.getValue("/root/init/workinst/datetimedata/patinroomdd"));
  2553. model.setValue("/root/main/MnphopcrData/MnphopcrList/opposturespec/opposture/opposturelist/opposturefrtm",
  2554. model.getValue("/root/init/workinst/datetimedata/patinroomhh"));
  2555. grd_opposture.refresh();
  2556. }
  2557. }
  2558. if( pFlag == "2" ) {
  2559. inp_patoutroomdd.attribute("color") = "#0000ff";
  2560. inp_patoutroomhh.attribute("color") = "#0000ff";
  2561. }
  2562. //입실/퇴실 smsid 저장한 Setting 2008-07-24 오전 10:35:03 taebum
  2563. model.setValue("/root/main/MnphopcrData/MnphopcrList/patopinsndsmsid" ,model.getValue("/root/sms/MnphopcrList/patopinsndsmsid"));
  2564. model.setValue("/root/main/MnphopcrData/MnphopcrList/patopoutsndsmsid",model.getValue("/root/sms/MnphopcrList/patopoutsndsmsid"));
  2565. }else {//입퇴실저장 실패시 수술상태값 이전으로 돌리기 2010.04.09 K. J. M
  2566. if( pFlag == "1" ) {
  2567. model.setValue(xPathData+"/opstatcd", "30");
  2568. }else if( pFlag == "2" ) {
  2569. model.setValue(xPathData+"/opstatcd", "40");
  2570. }
  2571. //2010.04.09 K. J. M 퇴실저장 실패시 플래그 값 초기화
  2572. sOutflag = "";
  2573. }
  2574. }
  2575. /* ------------------------------------------------- */
  2576. /* desc : 수술기록 자료 Copy 하기 */
  2577. /* param : */
  2578. /* return : */
  2579. /* -------------------------------------------------- */
  2580. function fInstance2Save(pFlag){
  2581. if (pFlag == "C") {
  2582. var rtn = fConfirmInputData1(); // 필수 입력 데이터 확인하기
  2583. if (rtn == false) return false;
  2584. }
  2585. sPid = model.getValue("/root/init/HideData/pid" ); // 01 환자번호
  2586. sOprsrvno = model.getValue("/root/init/HideData/oprsrvno" ); // 02 수술예약(의뢰)번호(년도+일련번호)
  2587. sOphistno = model.getValue("/root/init/HideData/ophistno" ); // 03 예약번호에따른이력번호
  2588. sInstcd = model.getValue("/root/init/HideData/instcd" ); // 04 기관코드
  2589. sOptrustflag = model.getValue(xPathData +"/optrustflag" ); // 05 수술의뢰구분-정규(일반)E응급
  2590. sOppatflag = model.getValue(xPathData +"/oppatflag" ); // 06 수술환자구분
  2591. sOppartdispyn = model.getValue(xPathData +"/oppartdispyn" ); // 08 수술부위표시여부
  2592. sOpscale = model.getValue(xPathData+"/opscale" ); // 수술 스케일
  2593. wPatinroomdd = model.getValue(xPathDispDT+"/patinroomdd" ); // 환자입실일자
  2594. wPatinroomhh = model.getValue(xPathDispDT+"/patinroomhh" ); // 환자입실시간
  2595. wPatoutroomdd = model.getValue(xPathDispDT+"/patoutroomdd" ); // 환자퇴실일자
  2596. wPatoutroomhh = model.getValue(xPathDispDT+"/patoutroomhh" ); // 환자퇴실시간
  2597. wAnstsrtdd = model.getValue(xPathDispDT+"/anstsrtdd" ); // 마취시작일자
  2598. wAnstsrthh = model.getValue(xPathDispDT+"/anstsrthh" ); // 마취시작시간
  2599. wAnstenddd = model.getValue(xPathDispDT+"/anstenddd" ); // 마취종료일자
  2600. wAnstendhh = model.getValue(xPathDispDT+"/anstendhh" ); // 마취종료시간
  2601. wPerfidarvdd = model.getValue(xPathDispDT+"/perfidarvdd" ); // 집도의도착일자
  2602. wPerfidarvhh = model.getValue(xPathDispDT+"/perfidarvhh" ); // 집도의도착시간
  2603. wPerfidoutdd = model.getValue(xPathDispDT+"/perfidoutdd" ); // 집도의퇴실일자
  2604. wPerfidouthh = model.getValue(xPathDispDT+"/perfidouthh" ); // 집도의퇴실시간
  2605. wOpfromdd = model.getValue(xPathDispDT+"/opfromdd" ); // 수술시작일자
  2606. wOpfromhh = model.getValue(xPathDispDT+"/opfromhh" ); // 수술시작시간
  2607. wOptodd = model.getValue(xPathDispDT+"/optodd" ); // 수술종료일자
  2608. wOptohh = model.getValue(xPathDispDT+"/optohh" ); // 수술종료시간
  2609. sDrugUseYN = model.getValue(xPathData+"/druguseyn" ); // 약품사용여부
  2610. sDrgeUseYN = model.getValue(xPathData+"/drgeuseyn" ); // 배액관사용여부
  2611. sEqmtUseYN = model.getValue(xPathData+"/eqmtuseyn" ); // 장비사용여부
  2612. sImplantUseYN = model.getValue(xPathData+"/implantuseyn" ); // Implant사용여부
  2613. sDrugCmt = model.getValue(xPathData+"/drugcmt" ); // 약품비고
  2614. sDrgeCmt = model.getValue(xPathData+"/drgecmt" ); // 배액관비고
  2615. sEqmtCmt = model.getValue(xPathData+"/eqmtcmt" ); // 장비비고
  2616. sImplantCmt = model.getValue(xPathData+"/implantcmt" ); // Implant비고
  2617. sTnsYN = model.getValue(xPathData+"/tnsyn" ); // 수혈여부
  2618. sSpcUseYN = model.getValue(xPathData+"/spcuseyn" ); // 검체사용여부
  2619. sCareRecUseYN = model.getValue(xPathData+"/carerecuseyn" ); // 간호기록사용여부
  2620. //--
  2621. sOpoutrmplcecd = model.getValue(xPathData+"/opoutrmplcecd" ); // 수술후퇴실장소
  2622. sOpoutrmplcenm = model.getValue(xPathData+"/opoutrmplcenm" ); // 수술후퇴실장소기타
  2623. //2008-06-27 오전 10:32:54 taebum 추가요구사항 적용
  2624. sCuthairflag = model.getValue(xPathData+"/cuthairflag"); //삭모
  2625. sXrayflag = model.getValue(xPathData+"/xrayflag"); //X-Ray
  2626. sXraydrugspec = model.getValue(xPathData+"/xraydrugspec"); //X-Ray 조용제 사용입력 text
  2627. sDrsflag = model.getValue(xPathData+"/drsflag"); //Dressing 구분
  2628. sDrsetc = model.getValue(xPathData+"/drsetc"); //Dressing 기타 입력 text
  2629. sNocountdoctid = model.getValue(xPathData+"/nocountdoctid"); //집도의 요청에 의한 계수확인 안함 집도의ID
  2630. sExtcyn = model.getValue(xPathData+"/extcyn"); //적출물 여부
  2631. sSkinstatflag = model.getValue(xPathData+"/skinstatflag"); //피부상태 구분
  2632. sDelivyn = model.getValue(xPathData+"/delivyn"); //분만여부
  2633. sPlatatransid = model.getValue(xPathData+"/platatransid"); //태반운반자 2008-07-07 오후 2:55:43 추가
  2634. sOtyn = model.getValue(xPathData+"/otyn"); //장기이식여부 2008-07-08 오후 9:47:42 add
  2635. sObRecyn = model.getValue(xPathData+"/obrecyn"); //관찰기록여부 2012-06-03 오후 4:56:15 cnrk
  2636. sPatopinsndsmsid = model.getValue(xPathData+"/patopinsndsmsid"); //환자입실smsID 2008-07-22 오후 10:25:51
  2637. sPatopoutsndsmsid = model.getValue(xPathData+"/patopoutsndsmsid"); //환자퇴실smsID 2008-07-22 오후 10:26:06
  2638. //2009-02-09 ycd 수술간호기록 화면 수정 중 추가 기록 항목 세팅
  2639. sEscopeeqmtuseyn = model.getValue(xPathData+"/escopeeqmtuseyn"); //내시경장비사용여부
  2640. sInsuremark = model.getValue(xPathData+"/insuremark"); //보험팀전달사항
  2641. sPrcporderid = model.getValue(xPathData+"/prcporderid"); //처방의사ID
  2642. sDeptremark = model.getValue(xPathData+"/deptremark"); //부서Remark
  2643. sOproomremark = model.getValue(xPathData+"/oproomremark"); //수술실Remark
  2644. sOpcntlistremark = model.getValue(xPathData+"/opcntlistremark"); //수술count리스트 Remark
  2645. sOpcntlisttoexecyn = model.getValue(xPathData+"/opcntlisttoexecyn"); //수술count리스트 Time Out 시행여부
  2646. //2008-07-01 오전 10:55:57 taebum 중환자실용 회복환자 관리 요구사항
  2647. if(pFlag == "2"
  2648. //&& (sOpoutrmplcecd == "21" || sOpoutrmplcecd == "22" || sOpoutrmplcecd == "23" || sOpoutrmplcecd == "24")){
  2649. //2009-02-09 ycd 수술실 퇴실장소 추가로 인하여 수정 처리
  2650. && ( sOpoutrmplcecd == "21" || //내과중환자실
  2651. sOpoutrmplcecd == "22" || //신경외과중환자실
  2652. //sOpoutrmplcecd == "23" || //심장내과중환자실 삭제처리
  2653. sOpoutrmplcecd == "24" || //외과중환자실
  2654. sOpoutrmplcecd == "27" || //2층중환자실
  2655. sOpoutrmplcecd == "28" || //순환기계중환자실
  2656. sOpoutrmplcecd == "29" || //신생아중환자실
  2657. sOpoutrmplcecd == "20" //호흡기내과중환자실
  2658. )){
  2659. //퇴실 장소가 ICU일 경우에만.
  2660. sIcuGoFlag = "Y";
  2661. }else{
  2662. sIcuGoFlag = "N";
  2663. }
  2664. //
  2665. CheckCnt = 0;
  2666. if (wPatinroomhh == "") { // 01 : 환자입실일자
  2667. wPatinroomdd = "";
  2668. }
  2669. if (wPerfidarvhh == "") { // 02 : 집도의도착일자
  2670. wPerfidarvdd = "";
  2671. }
  2672. if (wAnstsrthh == "") { // 03 : 마취시작일자
  2673. wAnstsrtdd = "";
  2674. }
  2675. if (wOpfromhh == "") { // 04 : 수술시작일자
  2676. wOpfromdd = "";
  2677. }
  2678. if (wAnstendhh == "") { // 05 : 마취종료일자
  2679. wAnstenddd = "";
  2680. }
  2681. if (wOptohh == "") { // 06 : 수술종료일자
  2682. wOptodd = "";
  2683. }
  2684. if (wPerfidouthh == "") { // 07 : 집도의퇴실일자
  2685. wPerfidoutdd = "";
  2686. }
  2687. if (wPatoutroomhh == "") { // 08 : 환자퇴실일자
  2688. wPatoutroomdd = "";
  2689. } else {
  2690. CheckCnt++;
  2691. }
  2692. sPatinroomdt = wPatinroomdd // 환자입실일자
  2693. + wPatinroomhh ; // 환자입실시간
  2694. sPatoutroomdt = wPatoutroomdd // 환자퇴실일자
  2695. + wPatoutroomhh; // 환자퇴실시간
  2696. sAnstsrtdt = wAnstsrtdd // 마취시작일자
  2697. + wAnstsrthh ; // 마취시작시간
  2698. sAnstenddt = wAnstenddd // 마취종료일자
  2699. + wAnstendhh ; // 마취종료시간
  2700. sPerfidarvdt = wPerfidarvdd // 집도의도착일자
  2701. + wPerfidarvhh ; // 집도의도착시간
  2702. sPerfidoutdt = wPerfidoutdd // 집도의퇴실일자
  2703. + wPerfidouthh ; // 집도의퇴실시간
  2704. sOpfromdt = wOpfromdd // 수술시작일자
  2705. + wOpfromhh ; // 수술시작시간
  2706. sOptodt = wOptodd // 수술종료일자
  2707. + wOptohh ; // 수술종료시간
  2708. if( pFlag == "T" ) {//임시저장일때 수술시작 종료 시간 자릿수 체크 2010.03.18
  2709. if( (sOpfromdt != "")&&(sOpfromdt.length < 12) ) {
  2710. messageBox("수술시작일시를 확인하십시요.!", "E000");
  2711. return false;
  2712. }else if( (sOptodt != "")&&(sOptodt.length < 12) ) {
  2713. messageBox("수술종료일시를 확인하십시요.!", "E000");
  2714. return false;
  2715. }else if( (sPerfidarvdt != "")&&(sPerfidarvdt.length < 12) ) {
  2716. messageBox("집도의 입실일시를 확인하십시요.!", "E000");
  2717. return false;
  2718. }else if( (sPerfidoutdt != "")&&(sPerfidoutdt.length < 12) ) {
  2719. messageBox("집도의 퇴실일시를 확인하십시요.!", "E000");
  2720. return false;
  2721. }
  2722. }
  2723. sCertno = model.getValue(xPathData+"/certno" ); // 인증코드
  2724. sOpcnfmdd = model.getValue(xPathData+"/opcnfmdd" ); // 수술확정일자(의뢰상태일경우예정일자와동일)
  2725. sOpstatcd = model.getValue(xPathData+"/opstatcd" ); // 진행상태
  2726. sOpstatcdnew = model.getValue(xPathData+"/opstatcd" ); // 진행상태
  2727. sRecstat = model.getValue(xPathData+"/recstat" ); // Record 상태정보 I:신규,U:수정
  2728. sOpbfpatcnfmspec = instance1.selectSingleNode(xPathData+"/opbfpatcnfmspec/opbfpatcnfm" ).xml; // 07 수술전환자확인내역
  2729. sTimeoutspec = instance1.selectSingleNode(xPathData+"/timeoutspec/timeout" ).xml; // 09 TimeOut내역
  2730. sAnstkindspec = instance1.selectSingleNode(xPathData+"/anstkindspec/anstkind" ).xml; // 10 마취종류내역
  2731. sOpposturespec = instance1.selectSingleNode(xPathData+"/opposturespec/opposture" ).xml; // 11 수술체위내역
  2732. sSkindinfspec = instance1.selectSingleNode(xPathData+"/skindinfspec/skindinf" ).xml; // 12 피부소독제내역
  2733. sAftopopnm = instance1.selectSingleNode(xPathData+"/aftopopnm/aftopoplists" ).xml; // 13 수술후수술명
  2734. //sAftopopnm = instance1.selectSingleNode(xPathData+"/aftopopnm/opcdlist" ).xml; // 13 수술후수술명 2008-07-18 오후 5:39:51 taebum 주석처리
  2735. sEsuspec = instance1.selectSingleNode(xPathData+"/esuspec/esu" ).xml; // 21 ESU내역
  2736. sTourniquetspec = instance1.selectSingleNode(xPathData+"/tourniquetspec/tourniquet" ).xml; // 22 Tourniquet내역
  2737. //2009-02-09 ycd 수술간호기록 내역에서 삭제
  2738. sWarmcoldregmspec = instance1.selectSingleNode(xPathData+"/warmcoldregmspec/lists" ).xml; // 23 온냉요법내역, Catheter 삽관기록
  2739. //sPostureskinupdtspec = instance1.selectSingleNode(xPathData+"/postureskinupdtspec/lists" ).xml; // 24 체위에따른피부변화내역
  2740. sCounspec = instance1.selectSingleNode(xPathData+"/counspec/countlist" ).xml; // 27 Count,내역
  2741. sPackingspec = instance1.selectSingleNode(xPathData+"/packingspec/packing" ).xml; // 28 Packing내역
  2742. sOpNursRecTimeRemark = instance1.selectSingleNode(xPathData+"/opnursrectimeremark/delyresnlist" ).xml; // 70 수술지연사유정보
  2743. //sOpDrgeSpec = instance1.selectSingleNode(xPathData+"/warmcoldregmspec/lists" ).xml; // 삽관기록
  2744. sSpcCmt = model.getValue(xPathData+"/spccmt" ); // 71 장비비고
  2745. //--------(20110512)
  2746. fopdicordnmcreate(); //불일치시 자료 전달기능
  2747. //--------(20110512)
  2748. // ---------------------------------
  2749. // 진행상태
  2750. // 00 : 임시'
  2751. // 00 : 임시'
  2752. // 10 : 의뢰'
  2753. // 19 : 의뢰취소'
  2754. // 20 : 예정'
  2755. // 29 : 취소'
  2756. // 30 : 대기'
  2757. // 39 : 대기취소'
  2758. // 40 : 수술'
  2759. // 49 : 수술취소'
  2760. // 50 : 종료'
  2761. // 60 : 회복'
  2762. // 70 : 종료'
  2763. // ---------------------------------
  2764. sOpstatcdnew = sOpstatcd ; // 진행상태
  2765. //2008-06-27 오후 4:25:16 taebum 수정 임시저장일 경우에도 진행상태가 반영이 되어야한다.
  2766. //if (pFlag == "C" || pFlag == "1") {
  2767. if (pFlag == "1") {
  2768. if (sOpstatcd < "40" && sPatinroomdt != "") {
  2769. sOpstatcdnew = "40"; // 진행상태
  2770. sOpoutrmplcecd = "26";//43->26 퇴실장소 기준자료와 동기화시키기위해 변경 2010.01.22 K.J.M
  2771. }
  2772. }
  2773. //2008-06-27 오후 4:25:16 taebum 수정 임시저장일 경우에도 진행상태가 반영이 되어야한다.
  2774. //2008-06-28 오전 11:31:34 taebum 수술실과 분만실이 퇴실장소인 경우는 전광판에 회복중으로 요청
  2775. // 퇴실장소가 수술실인 경우 HIV 환자도 수술실에서 .... 회복한다고 함.
  2776. //if (pFlag == "C" || pFlag == "2"){
  2777. if (pFlag == "2") {
  2778. //if (sOpstatcd < "50" && sPatoutroomdt != "")
  2779. if (sPatoutroomdt != "") {//상태값에 관계없이 퇴실저장시에는 수술상태값 변경2010.02.08 K.J.M
  2780. // 2009-02-09 ycd 퇴실장소 추가로 인하여 조건 추가
  2781. if( sOpoutrmplcecd == "01" || //회복실
  2782. sOpoutrmplcecd == "21" || //내과중환자실
  2783. sOpoutrmplcecd == "22" || //신경외과중환자실
  2784. sOpoutrmplcecd == "23" || //심장내과중환자실
  2785. sOpoutrmplcecd == "24" || //외과중환자실
  2786. sOpoutrmplcecd == "25" || //분만실
  2787. sOpoutrmplcecd == "27" || //2층중환자실
  2788. sOpoutrmplcecd == "28" || //순환기계중환자실
  2789. sOpoutrmplcecd == "29" || //신생아중환자실
  2790. sOpoutrmplcecd == "20" || //호흡기내과중환자실
  2791. sOpoutrmplcecd == "26" //수술실
  2792. ){ // 회복실 입실
  2793. sOpstatcdnew = "60";
  2794. }else{
  2795. sOpstatcdnew = "50"; // 진행상태 퇴실 - 회복실, 중환자실, 분만실, 수술실을 제외한 나머지는 모두 종료처리
  2796. }
  2797. }
  2798. }
  2799. //
  2800. model.setValue(xPathData+"/patinroomdt" , sPatinroomdt ); // 환자입실시간
  2801. model.setValue(xPathData+"/patoutroomdt", sPatoutroomdt); // 환자퇴실시간
  2802. model.setValue(xPathData+"/anstsrtdt" , sAnstsrtdt ); // 마취시작일자
  2803. model.setValue(xPathData+"/anstenddt" , sAnstenddt ); // 마취종료일자
  2804. model.setValue(xPathData+"/perfidarvdt" , sPerfidarvdt ); // 집도의도착일자
  2805. model.setValue(xPathData+"/perfidoutdt" , sPerfidoutdt ); // 집도의퇴실일자
  2806. model.setValue(xPathData+"/opfromdt" , sOpfromdt ); // 수술시작일자
  2807. model.setValue(xPathData+"/optodt" , sOptodt ); // 수술종료일자
  2808. model.setValue(xPathData+"/opstatcd" , sOpstatcdnew ); // 진행상태
  2809. //2009-02-09 ycd 수술간호기록 내역에서 삭제
  2810. //cmb_opstatcd.refresh();
  2811. }
  2812. /* ------------------------------------------------- */
  2813. /* desc : 필수 입력 데이터 확인하기 */
  2814. /* -------------------------------------------------- */
  2815. function fConfirmInputData1(){
  2816. // 집도의 : fUserEnter(xPathData,"/timeoutspec/timeout/perfdr" , "/timeoutspec/timeout/perfdrnm" ,"/timeoutspec/timeout/pertdrdeptcd", "/timeoutspec/timeout/pertdrdeptnm" , inp_perfdrnm.currentText , inp_perfdrnm );
  2817. // 수련의 : fUserEnter(xPathData,"/timeoutspec/timeout/apprtcdr", "/timeoutspec/timeout/apprtcdrnm","/timeoutspec/timeout/apprtcdrdeptcd", "/timeoutspec/timeout/apprtcdrdeptnm", inp_apprtcdrnm.currentText, inp_apprtcdrnm);
  2818. // 마취의 : fUserEnter(xPathData,"/timeoutspec/timeout/anstdr" , "/timeoutspec/timeout/anstdrnm" ,"/timeoutspec/timeout/anstdrdeptcd", "/timeoutspec/timeout/anstdrdeptnm" , inp_anstdrnm.currentText , inp_anstdrnm );
  2819. // 간호사1 : fUserEnter(xPathData,"/timeoutspec/timeout/nurse1" , "/timeoutspec/timeout/nurse1nm" ,"/timeoutspec/timeout/nurse1deptcd", "/timeoutspec/timeout/nurse1deptnm" , inp_nurse1nm.currentText , inp_nurse1nm );
  2820. // 간호사2 : fUserEnter(xPathData,"/timeoutspec/timeout/nurse2" , "/timeoutspec/timeout/nurse2nm" ,"/timeoutspec/timeout/nurse2deptcd" , "/timeoutspec/timeout/nurse2deptnm" , inp_nurse2nm.currentText , inp_nurse2nm );
  2821. //2008-10-21 오전 9:54:44 taebum Timeout 인증 저장시 전체 unCheck 대하여 Blocking 해제
  2822. //alert(model.getValue("/root/main/MnphopcrData/MnphopcrList/timeoutspec/timeout/timeoutcheck"));
  2823. var CheckCnt = 0;
  2824. //2009-02-02 ycd 기록 항목 제거로 인하여 주석 처리
  2825. /*
  2826. if (model.getValue("/root/main/MnphopcrData/MnphopcrList/timeoutspec/timeout/timeoutcheck") != ""
  2827. && model.getValue(xPathData+"/timeoutspec/timeout/perfdr" ) == "") {
  2828. //CheckCnt += 1;
  2829. messageBox("Time Out 수술의를 ","C001");
  2830. return false;
  2831. }
  2832. */
  2833. //
  2834. // if (model.getValue(xPathData+"/timeoutspec/timeout/apprtcdr") == "" || model.getValue(xPathData+"/timeoutspec/timeout/apprtcdrnm")=="") {
  2835. // CheckCnt += 1;
  2836. // // messageBox("Time Out 수련의를 다시","C001");
  2837. // // return false;
  2838. // }
  2839. //
  2840. // if (CheckCnt == 2) {
  2841. // messageBox("Time Out 수술의를 다시","C001");
  2842. // return false;
  2843. // }
  2844. //
  2845. //2009-02-02 ycd 기록 항목 제거로 인하여 주석 처리
  2846. /*
  2847. if (model.getValue("/root/main/MnphopcrData/MnphopcrList/timeoutspec/timeout/timeoutcheck") != ""
  2848. && model.getValue(xPathData+"/timeoutspec/timeout/nurse1" ) == "") {
  2849. messageBox("Time Out 수술간호사를 ","C001");
  2850. return false;
  2851. }
  2852. */
  2853. CheckCnt = 0;
  2854. // 2009-02-09 ycd 수술간호기록 기록내역 변경으로 인하여 CPR 정보 체크 추가
  2855. if (model.getValue(xPathData+"/anstkindspec/anstkind/anstkindcheck01") != "") CheckCnt++; //전신마취
  2856. if (model.getValue(xPathData+"/anstkindspec/anstkind/anstkindcheck02") != "") CheckCnt++; //부위마취
  2857. if (model.getValue(xPathData+"/anstkindspec/anstkind/anstkindcheck03") != "") CheckCnt++; //국소마취
  2858. if (model.getValue(xPathData+"/anstkindspec/anstkind/anstkindcheck99") != "") CheckCnt++; //마취없음
  2859. if (model.getValue(xPathData+"/anstkindspec/anstkind/anstcprchk" ) != "") CheckCnt++; //CPR
  2860. //if (model.getValue(xPathData+"/anstkindspec/anstkind/anstopchk" ) != "") CheckCnt++; //수술없음
  2861. // 2009-02-09 ycd 수술간호기록 기록내역 변경으로 인하여 삭제 항목 체크 부분 삭제
  2862. //if (model.getValue(xPathData+"/anstkindspec/anstkind/anstkindcheck04") != "") CheckCnt++;
  2863. //if (model.getValue(xPathData+"/anstkindspec/anstkind/anstkindcheck05") != "") CheckCnt++;
  2864. //if (model.getValue(xPathData+"/anstkindspec/anstkind/anstkindcheck06") != "") CheckCnt++;
  2865. //if (model.getValue(xPathData+"/anstkindspec/anstkind/anstkindcheck07") != "") CheckCnt++;
  2866. //if (model.getValue(xPathData+"/anstkindspec/anstkind/anstkindcheck08") != "") CheckCnt++;
  2867. //if (model.getValue(xPathData+"/anstkindspec/anstkind/anstkindcheck10") != "") CheckCnt++;
  2868. //if (model.getValue(xPathData+"/anstkindspec/anstkind/anstkindcheck11") != "") CheckCnt++;
  2869. //if (model.getValue(xPathData+"/anstkindspec/anstkind/anstkindcheck12") != "") CheckCnt++;
  2870. //if (model.getValue(xPathData+"/anstkindspec/anstkind/anstkindcheck13") != "") CheckCnt++;
  2871. //if (model.getValue(xPathData+"/anstkindspec/anstkind/anstkindcheck14") != "") CheckCnt++;
  2872. //if (model.getValue(xPathData+"/anstkindspec/anstkind/anstkindcheck15") != "") CheckCnt++;
  2873. //if (model.getValue(xPathData+"/anstkindspec/anstkind/anstkindcheck99") != "") CheckCnt++;
  2874. // 2009-05-15 ycd 주석처리
  2875. //if (CheckCnt == 0) {
  2876. // messageBox("마취종류를 ","C001");
  2877. // return false;
  2878. //}
  2879. //2010-03-03 K. J. M 수술안함일경우 유효성체크 제외
  2880. var opnoyn = model.getValue("/root/main/MnphopcrData/MnphopcrList/opnoyn");
  2881. //2009-02-11 저장시 미시행 사유 등록여부 체크
  2882. if(rdo_opbfpatchk.value == "N" && cmb_opbfpatresn.value == ""){
  2883. messageBox("수술전 환자 확인 미시행 사유를 확인하십시오.","I000");
  2884. return false;
  2885. }
  2886. if( opnoyn != "Y" ) {//수술안함이면 체크안함.
  2887. if(rdo_opbfpartchk.value == "N" && cmb_opbfpartresn.value == ""){
  2888. messageBox("수술부위표시확인 미시행 사유를 확인하십시오.","I000");
  2889. return false;
  2890. }
  2891. if(rdo_optimeoutchk.value == "N" && cmb_opbftimeoutresn.value == ""){
  2892. messageBox("Time Out 미시행 사유를 확인하십시오.","I000");
  2893. return false;
  2894. }
  2895. }
  2896. //2008-09-25 오전 12:43:31 taebum 주석처리
  2897. //if (CheckCnt == 1 && model.getValue(xPathData+"/anstkindspec/anstkind/anstkindcheck03") == "S") { //
  2898. if (model.getValue(xPathData+"/anstkindspec/anstkind/anstkindcheck03") == "S") { //
  2899. CheckCnt = 99;
  2900. }
  2901. //2009-02-02 ycd 기록 항목 제거로 인하여 주석 처리
  2902. /*
  2903. if (CheckCnt != 99) {
  2904. if (model.getValue("/root/main/MnphopcrData/MnphopcrList/timeoutspec/timeout/timeoutcheck") != ""
  2905. && (model.getValue(xPathData+"/timeoutspec/timeout/anstdr" ) == "" || model.getValue(xPathData+"/timeoutspec/timeout/anstdrnm")=="")) {
  2906. messageBox("Time Out 마취의를 ","C001");
  2907. return false;
  2908. }
  2909. if (model.getValue("/root/main/MnphopcrData/MnphopcrList/timeoutspec/timeout/timeoutcheck") != ""
  2910. && (model.getValue(xPathData+"/timeoutspec/timeout/nurse2" ) == "" || model.getValue(xPathData+"/timeoutspec/timeout/nurse2nm")=="")) {
  2911. messageBox("Time Out 마취간호사를 ","C001");
  2912. return false;
  2913. }
  2914. }
  2915. */
  2916. //
  2917. if( opnoyn != "Y" ) {//수술안함이면 체크안함.
  2918. if (grd_opposture.rows < 2) {
  2919. messageBox("수술체위를","C001");
  2920. return false;
  2921. }
  2922. }
  2923. var sListIndex = "";
  2924. var sRowCnt = (grd_opposture.rows - grd_opposture.fixedrows) + 1;
  2925. if( opnoyn != "Y" ) {//수술안함이면 체크안함.
  2926. //2009-02-13 마지막행 수술종료일시로 매핑 및 소요시간 총소요시간 합계처리
  2927. if(model.getValue(xPathData+"/opposturespec/opposture/opposturelist["+(sRowCnt-1)+"]/oppostureterm") == "" ){
  2928. if(inp_optodd.value != "" && inp_optohh.value != ""){
  2929. var iRow = (sRowCnt-1);
  2930. var iCol = grd_opposture.colRef("opposturetotm");
  2931. if (iRow < 1 || iCol == grd_opposture.colRef("opposturekind") || iCol == grd_opposture.colRef("oppostureterm") || iCol == grd_opposture.colRef("opposturetot")) return;
  2932. if (iCol == grd_opposture.colRef("opposturefrtm") || iCol == grd_opposture.colRef("opposturetotm")) {
  2933. grd_opposture.textmatrix(iRow, iCol-1) = inp_optodd.value;
  2934. grd_opposture.textmatrix(iRow, iCol) = inp_optohh.value;
  2935. }
  2936. var pFrDate = model.getValue(xPathData +"/opposturespec/opposture/opposturelist["+iRow+"]/opposturefrdt");
  2937. var pFrTime = model.getValue(xPathData +"/opposturespec/opposture/opposturelist["+iRow+"]/opposturefrtm");
  2938. var pToDate = model.getValue(xPathData +"/opposturespec/opposture/opposturelist["+iRow+"]/opposturetodt");
  2939. var pToTime = model.getValue(xPathData +"/opposturespec/opposture/opposturelist["+iRow+"]/opposturetotm");
  2940. var rTime = fTimeInterval(pFrDate, pToDate, pFrTime, pToTime, "1");
  2941. model.setValue(xPathData +"/opposturespec/opposture/opposturelist["+iRow+"]/oppostureterm", rTime );
  2942. //grd_opposture.refresh();
  2943. fTotalTimeSet();
  2944. }else{
  2945. //if(chk_anstcprchk.value == ""){
  2946. // messageBox("수술종료 일시를 확인하십시오.","I000");
  2947. // return false;
  2948. //}
  2949. }
  2950. }
  2951. for (var i=1; i < sRowCnt; i++) {
  2952. if (model.getValue(xPathData+"/opposturespec/opposture/opposturelist["+i+"]/oppostureterm") == "" ||
  2953. model.getValue(xPathData+"/opposturespec/opposture/opposturelist["+i+"]/opposturekind") == "" ) {
  2954. sListIndex = i;
  2955. }
  2956. }
  2957. //
  2958. if (sListIndex != "") {
  2959. messageBox("수술체위 정보의 누락 부분(체위, 시작시간, 종료시간)을","C001");
  2960. return false;
  2961. }
  2962. if (model.getValue(xPathData+"/skindinfspec/skindinf/Skindinfkind") == "") {
  2963. messageBox("피부 소독제를 선택하십시오.","I000");
  2964. return false;
  2965. }
  2966. if (model.getValue(xPathData+"/opscale") == "") {
  2967. messageBox("수술스케일를 선택하십시오.","I000");
  2968. return false;
  2969. }
  2970. }
  2971. //2008-06-26 오전 11:38:08 tabum - esu, tour, 검체 해당없음 체크
  2972. var sEsuCheckFlag = model.getValue("/root/main/MnphopcrData/MnphopcrList/esuspec/esu/esuyn");
  2973. if(sEsuCheckFlag == "" || sEsuCheckFlag == "undefined" || sEsuCheckFlag == null){
  2974. var iEsuCnt = getNodesetCount("/root/main/MnphopcrData/MnphopcrList/esuspec/esu/esulist");
  2975. var sCut = "";
  2976. var sCoag = "";
  2977. var sWatt = "";
  2978. var sImgpostView = "";
  2979. var iRecCnt = 0;
  2980. for(var k = 1; k <= iEsuCnt; k++){
  2981. sCut = model.getValue("/root/main/MnphopcrData/MnphopcrList/esuspec/esu/esulist["+k+"]/mfrcut");
  2982. sCoag = model.getValue("/root/main/MnphopcrData/MnphopcrList/esuspec/esu/esulist["+k+"]/mfrcong");
  2983. sWatt = model.getValue("/root/main/MnphopcrData/MnphopcrList/esuspec/esu/esulist["+k+"]/bwatt");
  2984. sImgpostView = model.getValue("/root/main/MnphopcrData/MnphopcrList/esuspec/esu/esulist["+k+"]/imgpostview");
  2985. iRecCnt = 0;
  2986. if( (sCut != "" || sCoag != "") && sImgpostView == "" ){
  2987. messageBox("ESU Monopolar기록에 대한 위치 정보를 입력하십시요","I000");
  2988. return false;
  2989. }
  2990. // 2009-02-13 ycd ESU저장 체크 처리 변경으로 인하여 주석처리
  2991. /*
  2992. if(sCut == "" || sCut == null || sCut == "undefined"){
  2993. iRecCnt++;
  2994. }
  2995. if(sCoag == "" || sCoag == null || sCoag == "undefined"){
  2996. iRecCnt++;
  2997. }
  2998. if(sWatt == "" || sWatt == null || sWatt == "undefined"){
  2999. iRecCnt++;
  3000. }
  3001. if(iRecCnt == 3){
  3002. messageBox("ESU 상세 내역을 기록하십시오.","I000");
  3003. return false;
  3004. }
  3005. */
  3006. }
  3007. }
  3008. // 2009-02-16 ycd 검체정보 개수 입력시 취급자 정보 체크 추가
  3009. var sSpcuseynFlag = model.getValue("/root/main/MnphopcrData/MnphopcrList/spcuseyn");
  3010. if(sSpcuseynFlag == "" || sSpcuseynFlag == "undefined" || sSpcuseynFlag == null){
  3011. var iSpcuseCnt = getNodesetCount("/root/main/SheetData3/SpecimenLists/specimenlist");
  3012. var sSpcuseQty = "";
  3013. var sSpcuseChargerId = "";
  3014. var sSpcuseChargerNm = "";
  3015. for(var k = 1 ; k <= iSpcuseCnt ; k++){
  3016. sSpcuseQty = model.getValue("/root/main/SheetData3/SpecimenLists/specimenlist["+k+"]/qty");
  3017. sSpcuseChargerId = model.getValue("/root/main/SheetData3/SpecimenLists/specimenlist["+k+"]/chargerid");
  3018. sSpcuseChargerNm = model.getValue("/root/main/SheetData3/SpecimenLists/specimenlist["+k+"]/chargernm");
  3019. if( sSpcuseQty != "0" && ( sSpcuseChargerId == "" || sSpcuseChargerNm == "" ) ){
  3020. messageBox("검체기록에 대한 취급자 정보를 입력하십시오.","I000");
  3021. return false;
  3022. }
  3023. }
  3024. }
  3025. var sTourniquetFlag = model.getValue("/root/main/MnphopcrData/MnphopcrList/tourniquetspec/tourniquet/tourniquetyn");
  3026. if(sTourniquetFlag == "" || sTourniquetFlag == "undefined" || sTourniquetFlag == null){
  3027. var iToniqCnt = getNodesetCount("/root/main/MnphopcrData/MnphopcrList/tourniquetspec/tourniquet/tourniquetlist");
  3028. var sToniFrdd = "";
  3029. var sToniFrtm = "";
  3030. var sToniTodd = "";
  3031. var sToniTotm = "";
  3032. var iRecCnt = 0;
  3033. for(var k = 1; k <= iToniqCnt; k++){
  3034. sToniFrdd = model.getValue("/root/main/MnphopcrData/MnphopcrList/tourniquetspec/tourniquet/tourniquetlist["+k+"]/startdd");
  3035. sToniFrtm = model.getValue("/root/main/MnphopcrData/MnphopcrList/tourniquetspec/tourniquet/tourniquetlist["+k+"]/starttm");
  3036. sToniTodd = model.getValue("/root/main/MnphopcrData/MnphopcrList/tourniquetspec/tourniquet/tourniquetlist["+k+"]/enddd");
  3037. sToniTotm = model.getValue("/root/main/MnphopcrData/MnphopcrList/tourniquetspec/tourniquet/tourniquetlist["+k+"]/endtm");
  3038. iRecCnt = 0;
  3039. if(sToniFrdd == "" || sToniFrdd == null || sToniFrdd == "undefined"){
  3040. iRecCnt++;
  3041. }
  3042. if(sToniFrtm == "" || sToniFrtm == null || sToniFrtm == "undefined"){
  3043. iRecCnt++;
  3044. }
  3045. if(sToniTodd == "" || sToniTodd == null || sToniTodd == "undefined"){
  3046. iRecCnt++;
  3047. }
  3048. if(sToniTotm == "" || sToniTotm == null || sToniTotm == "undefined"){
  3049. iRecCnt++;
  3050. }
  3051. if(iRecCnt > 0){
  3052. messageBox("Tourniquet 상세 내역을 기록하십시오.","I000");
  3053. return false;
  3054. }
  3055. }
  3056. }
  3057. //2009-02-13 ycd 장비사용기록 사용시작일시, 사용종료일시 기록 누락건 검색 - 사용시작일시 : 수술시작, 사용종료일시 : 수술종료 로 세팅
  3058. /* 장비사용기록시 사용시작일시, 사용종료일시 삭제.2012.05.18_손성훈(본원 칠곡 수술실 간호사 요청사항.)
  3059. var sEqmtUseYnChk = model.getValue("/root/main/MnphopcrData/MnphopcrList/eqmtuseyn");
  3060. if(sEqmtUseYnChk == "" || sEqmtUseYnChk == "undefined" || sEqmtUseYnChk == null){
  3061. var iEqmtUseYnChk = getNodesetCount("/root/main/SheetData3/OpEqmtLists/opeqmtlist");
  3062. var ChkCnt = 0 ;
  3063. for(var i = 1 ; i <= iEqmtUseYnChk ; i++){
  3064. sEqmFromdd = model.getValue("/root/main/SheetData3/OpEqmtLists/opeqmtlist["+ i +"]/fromdd" );
  3065. sEqmFromtm = model.getValue("/root/main/SheetData3/OpEqmtLists/opeqmtlist["+ i +"]/fromtm" );
  3066. sEqmTodd = model.getValue("/root/main/SheetData3/OpEqmtLists/opeqmtlist["+ i +"]/todd" );
  3067. sEqmTotm = model.getValue("/root/main/SheetData3/OpEqmtLists/opeqmtlist["+ i +"]/totm" );
  3068. if( sEqmFromdd == "" && sEqmFromtm == "" ) {
  3069. model.setValue("/root/main/SheetData3/OpEqmtLists/opeqmtlist["+ i +"]/fromdd", inp_opfromdd.value );
  3070. model.setValue("/root/main/SheetData3/OpEqmtLists/opeqmtlist["+ i +"]/fromtm", inp_opfromhh.value );
  3071. }
  3072. if( sEqmTodd == "" && sEqmTotm == "" ) {
  3073. model.setValue("/root/main/SheetData3/OpEqmtLists/opeqmtlist["+ i +"]/todd" , inp_optodd.value );
  3074. model.setValue("/root/main/SheetData3/OpEqmtLists/opeqmtlist["+ i +"]/totm" , inp_optohh.value );
  3075. }
  3076. if( model.getValue("/root/main/SheetData3/OpEqmtLists/opeqmtlist["+ i +"]/fromdd" ) == "" ||
  3077. model.getValue("/root/main/SheetData3/OpEqmtLists/opeqmtlist["+ i +"]/todd" ) == "" ){
  3078. ChkCnt ++;
  3079. }
  3080. }
  3081. if( ChkCnt > 0 ){
  3082. messageBox("장비사용기록 시작, 종료 일시 정보를 확인하십시오.","I000");
  3083. return false;
  3084. }
  3085. }
  3086. */
  3087. /*
  3088. var sCutHairYn = model.getValue("/root/main/MnphopcrData/MnphopcrList/cuthairflag");
  3089. if(sCutHairYn == "" || sCutHairYn == null || sCutHairYn == "undefined"){
  3090. messageBox("삭모 시행 여부를 ","C001");
  3091. return false;
  3092. }
  3093. */
  3094. var sXrayFlag = model.getValue("/root/main/MnphopcrData/MnphopcrList/xrayflag");
  3095. if(sXrayFlag == "" || sXrayFlag == null || sXrayFlag == "undefined"){
  3096. messageBox("X-ray 촬영 여부를 선택하십시오.","I000");
  3097. return false;
  3098. }else{
  3099. var XrayData = sXrayFlag.split(" ");
  3100. for(var i = 0 ; i < XrayData.length ; i++){
  3101. if(XrayData[i] == "3"){
  3102. if(model.getValue("/root/main/MnphopcrData/MnphopcrList/xraydrugspec") == ""){
  3103. messageBox("조영제 종류를 입력하십시오.","I000");
  3104. return false;
  3105. }
  3106. }
  3107. }
  3108. }
  3109. var sDressingFlag = model.getValue("/root/main/MnphopcrData/MnphopcrList/drsflag");
  3110. if(sDressingFlag == "" || sDressingFlag == null || sDressingFlag == "undefined"){
  3111. messageBox("Dressing 내역을 ","C001");
  3112. return false;
  3113. }
  3114. /*
  3115. var sImplantFlag = model.getValue("/root/main/MnphopcrData/MnphopcrList/implantuseyn");
  3116. if(sImplantFlag == "" || sImplantFlag == "undefined" || sImplantFlag == null){
  3117. var sTempData = model.getValue("/root/main/SheetData3/ImplantLists/implantlist/goodhngnm");
  3118. if(sTempData == "" || sTempData == "undefined" || sTempData == null){
  3119. messageBox("Implant / Prosthesis 등록 내역을 다시","C001");
  3120. return false;
  3121. }
  3122. }
  3123. var sDrugFlag = model.getValue("/root/main/MnphopcrData/MnphopcrList/druguseyn");
  3124. if(sDrugFlag == "" || sDrugFlag == "undefined" || sDrugFlag == null){
  3125. var sTempData = model.getValue("/root/main/SheetData3/DrugLists/druglist/drugnm");
  3126. if(sTempData == "" || sTempData == "undefined" || sTempData == null){
  3127. messageBox("수술중 사용한 약품 등록 내역을 다시","C001");
  3128. return false;
  3129. }
  3130. }
  3131. var sDrqeFlag = model.getValue("/root/main/MnphopcrData/MnphopcrList/drgeuseyn");
  3132. if(sDrqeFlag == "" || sDrqeFlag == "undefined" || sDrqeFlag == null){
  3133. var sTempData = model.getValue("/root/main/SheetData3/DrgeLists/drgelist/drgenm");
  3134. if(sTempData == "" || sTempData == "undefined" || sTempData == null){
  3135. messageBox("배액관 내역을 다시","C001");
  3136. return false;
  3137. }
  3138. }
  3139. */
  3140. /*
  3141. var sEqmtFlag = model.getValue("/root/main/MnphopcrData/MnphopcrList/eqmtuseyn");
  3142. if(sEqmtFlag == "" || sEqmtFlag == "undefined" || sEqmtFlag == null){
  3143. var sTempData = model.getValue("/root/main/SheetData3/OpEqmtLists/opeqmtlist/opeqmtnm");
  3144. if(sTempData == "" || sTempData == "undefined" || sTempData == null){
  3145. messageBox("장비 내역을 다시","C001");
  3146. return false;
  3147. }
  3148. }
  3149. */
  3150. return true;
  3151. }
  3152. /* ------------------------------------------------- */
  3153. /* desc : 필수 입력 데이터 확인하기 */
  3154. /* -------------------------------------------------- */
  3155. function fConfirmInputData3(){
  3156. var CheckCnt = 0;
  3157. var sTmpAnstKindChk = "";
  3158. CheckCnt = 0;
  3159. var preopcureflag = model.getValue("/root/main/MnphopcrData/MnphopcrList/preopcureflag");
  3160. // 2009-02-09 ycd 수술기록 체위에 따른 피부변화 삭제 처리
  3161. //체위에 따른 피부변화 CheckCnt
  3162. /*
  3163. var iTempGridCnt = getNodesetCnt(model,"/root/main/MnphopcrData/MnphopcrList/postureskinupdtspec/lists/skinlist");
  3164. var sNomalFlag = model.getValue("/root/main/MnphopcrData/MnphopcrList/postureskinupdtspec/lists/skinflag");
  3165. if(iTempGridCnt > 0){
  3166. /*
  3167. var sAPFlag = "";
  3168. var sRLFlag = "";
  3169. var sPartcd = "";
  3170. var sOpbStat = "";
  3171. for(var i = 1; i <= iTempGridCnt; i++){
  3172. sAPFlag = model.getValue("/root/main/MnphopcrData/MnphopcrList/postureskinupdtspec/lists/skinlist["++"]/apflag");
  3173. sRLFlag = model.getValue("/root/main/MnphopcrData/MnphopcrList/postureskinupdtspec/lists/skinlist["++"]/rlflag");
  3174. sPartcd = model.getValue("/root/main/MnphopcrData/MnphopcrList/postureskinupdtspec/lists/skinlist["++"]/partcd");
  3175. sOpbStat = model.getValue("/root/main/MnphopcrData/MnphopcrList/postureskinupdtspec/lists/skinlist["++"]/opbstat");
  3176. //필요시 validcheck
  3177. }
  3178. }else{
  3179. if(sNomalFlag != "Y"){
  3180. messageBox("체위에 따른 피부변화 상태를 기록하십시오. ","I000");
  3181. }
  3182. }
  3183. */
  3184. // 2009-02-09 ycd 수술기록 체위에 따른 온냉요법 삭제 처리
  3185. //온냉요법 check
  3186. /*
  3187. iTempGridCnt = getNodesetCnt(model,"/root/main/MnphopcrData/MnphopcrList/warmcoldregmspec/lists/warmlist/warmcoldregm");
  3188. var sTmpNoneFlag = model.getValue("/root/main/MnphopcrData/MnphopcrList/warmcoldregmspec/lists/warmlist/warmnoneflag");
  3189. if(iTempGridCnt > 0){
  3190. //필요시 validcheck 추가
  3191. }else{
  3192. /*
  3193. if(sNomalFlag != "X"){
  3194. messageBox("온냉요법 적용 여부를 기록하십시오.","I000");
  3195. return false;
  3196. }
  3197. }
  3198. */
  3199. //2010-03-03 K. J. M 수술안함일경우 유효성체크 제외
  3200. var opnoyn = model.getValue("/root/main/MnphopcrData/MnphopcrList/opnoyn");
  3201. //2010-04-19 K. J. M PHYSSTAT 6 장기기증환자 마취시간하고 수술시간 시간체크 안함
  3202. var physstat = model.getValue("/root/main/MnphopcrData/MnphopcrList/physstat");
  3203. if (model.getValue(xPathData+"/anstkindspec/anstkind/anstkindcheck01") != "") CheckCnt++;
  3204. if (model.getValue(xPathData+"/anstkindspec/anstkind/anstkindcheck02") != "") CheckCnt++;
  3205. if ( CheckCnt > 0 ){
  3206. sTmpAnstKindChk = "M";
  3207. }
  3208. // 2009-02-09 ycd 수술기록 마취기록 연계정보 변경으로 인하여 삭제 처리
  3209. //if (model.getValue(xPathData+"/anstkindspec/anstkind/anstkindcheck09") != "") CheckCnt++;
  3210. //if (model.getValue(xPathData+"/anstkindspec/anstkind/anstkindcheck03") != "") CheckCnt++;
  3211. // 2009-02-09 ycd 수술기록 마취기록 연계정보 변경으로 인하여 추가
  3212. //if (model.getValue(xPathData+"/anstkindspec/anstkind/anstkindcheck99") != "") CheckCnt++; //마취없음
  3213. //if (model.getValue(xPathData+"/anstkindspec/anstkind/anstcprchk") != "") CheckCnt++; //CPR
  3214. //2008-09-25 오전 12:57:03 taebum 주석처리.
  3215. //if (CheckCnt == 1 && model.getValue(xPathData+"/anstkindspec/anstkind/anstkindcheck03") == "S") { //
  3216. // 2009-02-09 ycd 수술기록 마취기록 연계정보 변경으로 인하여 기록 저장시 체크 부분 변경
  3217. if ( model.getValue(xPathData+"/anstkindspec/anstkind/anstcprchk") == "Y" ){ // CPR
  3218. CheckCnt = 99;
  3219. sTmpAnstKindChk = "Y" ;
  3220. }
  3221. if ( model.getValue(xPathData+"/anstkindspec/anstkind/anstkindcheck03") == "S" || // 국소마취
  3222. model.getValue(xPathData+"/anstkindspec/anstkind/anstkindcheck99") == "N" ){ // 마취없음
  3223. CheckCnt = 99;
  3224. sTmpAnstKindChk = "S" ;
  3225. }
  3226. if ( model.getValue("/root/main/MnphopcrData/MnphopcrList/spcuseyn") != "X" ){//검체 해당없음 체크가 풀려있으면 검체확인의 체크
  3227. if (model.getValue("/root/main/operation/list/opcnfmdd") <= model.getValue("/root/specdd/chkdd") ) { //검체 기록을 과거 화면과 분리를 위해_20120904_손성훈.
  3228. var prcporderid = model.getValue("/root/main/MnphopcrData/MnphopcrList/prcporderid");
  3229. if( prcporderid == ""|| prcporderid == null ) {
  3230. messageBox("수술간호기록지의 검체 확인의를 확인하십시오.!","E000");
  3231. return false;
  3232. }
  3233. }else {
  3234. for (var i = 1 ; i< grd_spclistnew.rows ; i++){
  3235. var prcporderid = model.getValue("/root/main/SheetData3/SpecimenLists/specimenlistnew[" + i + "]/prcporderid");
  3236. if( prcporderid == ""|| prcporderid == null ) {
  3237. messageBox("수술간호기록지의 검체 확인의를 확인하십시오.!","E000");
  3238. return false;
  3239. }
  3240. }
  3241. }
  3242. }
  3243. //2009-02-20 YCD 인증 저장 전 처리 필요 부분
  3244. if (sOpstatcd < "40"){
  3245. messageBox("인증저장 전 입실저장을 하시기 바랍니다.","");
  3246. return false;
  3247. }
  3248. if (sOpstatcd < "50"){
  3249. messageBox("인증저장 전 퇴실저장을 하시기 바랍니다.","");
  3250. return false;
  3251. }
  3252. if( sOpstatcd >= "40"&&sOutflag == "N" ) {//수술이상이면서 퇴실저장안한 경우 2010.04.12 K. J. M
  3253. messageBox("인증저장 전 퇴실저장을 하시기 바랍니다.","");
  3254. return false;
  3255. }
  3256. // 2009-02-16 ycd 저장 제어 조건 정리
  3257. // 공동 처리 부분(전신, 부분)======================================================================================================
  3258. if(sPatinroomdt == "" || sPatoutroomdt == "" || sPatinroomdt > sPatoutroomdt){
  3259. messageBox("입실일시, 퇴실일시를 확인 하십시오.","I000");
  3260. return false;
  3261. }
  3262. if( (sPatoutroomdt != "" && sOpoutrmplcecd == "" ) || (sOpoutrmplcecd != "" && (sPatoutroomdt == "")) ){
  3263. messageBox("퇴실장소와 퇴실시간을 확인 하십시오.","I000");
  3264. return false;
  3265. }
  3266. // =================================================================================================================================
  3267. //2010-04-13 오전 11:29:26 마취기록에서 마취기록변경을 체크하였을 경우 마취시작,종료/수술시작,종료 Check 로직 Check 안함 추가 taebum
  3268. var sAnstmthdchgflag = model.getValue(xPathData+"/anstmthdchgflag");
  3269. if( opnoyn != "Y" ) {//수술안함이면 체크안함.
  3270. //2009-02-20 YCD 기타 시간 체크 부분 처리
  3271. if (CheckCnt != 99) { //전신 부위 마취일경우
  3272. if(sAnstsrtdt == "" || sAnstenddt == "" || sAnstsrtdt > sAnstenddt) {
  3273. messageBox("마취기록지의 마취 시작, 종료일시를 확인하십시오.","I000");
  3274. return false;
  3275. }
  3276. if(sOpfromdt == "" || sOptodt == "" || sOpfromdt > sOptodt) {
  3277. messageBox("마취기록지의 수술 시작, 종료일시를 확인하십시오.","I000");
  3278. return false;
  3279. }
  3280. //2009-08-18 마취기록지 수술전처치체크 시 유효성체크 안함. 대기실에서 마취를 먼저 시작할 수 있음.K. J. M 최소현 선생님 요청
  3281. if( preopcureflag == "N" ) {
  3282. if(sAnstmthdchgflag != "Y"){ //2010-04-13 오전 11:33:49 taebum add
  3283. if(sAnstsrtdt > sOpfromdt ){
  3284. messageBox("마취기록지의 마취시작일시를 확인 하십시오. \n\n마취시작일시가 수술시작일시 보다 늦습니다.","I000");
  3285. return false;
  3286. }
  3287. }
  3288. }
  3289. if(sAnstmthdchgflag != "Y"&&physstat != "06" ){//2010-04-13 오전 11:33:49 taebum add, 2010.04.19 K. J. M 장기기증이 아닐때 체크
  3290. if(sAnstenddt < sOptodt ){
  3291. messageBox("마취기록지의 마취종료일시를 확인 하십시오. \n\n수술종료일시가 마취종료일시 보다 늦습니다.","I000");
  3292. return false;
  3293. }
  3294. }
  3295. //2009-08-18 마취기록지 수술전처치체크 시 유효성체크 안함. 대기실에서 마취를 먼저 시작할 수 있음.K. J. M 최소현 선생님 요청
  3296. if( preopcureflag == "N" ) {
  3297. if(sPatinroomdt > sAnstsrtdt ){
  3298. messageBox("입실일시를 확인 하십시오. \n\n입실일시가 마취시작일시 보다 늦습니다.","I000");
  3299. return false;
  3300. }
  3301. }
  3302. if(sPatinroomdt > sOpfromdt ){
  3303. messageBox("입실일시를 확인 하십시오. \n\n입실일시가 수술시작일시 보다 늦습니다.","I000");
  3304. return false;
  3305. }
  3306. if(sAnstenddt > sPatoutroomdt){
  3307. messageBox("퇴실일시를 확인 하십시오. \n\n마취종료일시가 퇴실일시 보다 늦습니다.","I000");
  3308. return false;
  3309. }
  3310. if(sOptodt > sPatoutroomdt){
  3311. messageBox("퇴실일시를 확인 하십시오. \n\n수술종료일시가 퇴실일시 보다 늦습니다.","I000");
  3312. return false;
  3313. }
  3314. if(sPatinroomdt > sPerfidarvdt){
  3315. messageBox("집도의입실 일시를 확인 하십시오. \n\n환자 입실일시가 집도의입실 일시 보다 늦습니다.","I000");
  3316. return false;
  3317. }
  3318. if(sPerfidoutdt > sPatoutroomdt){
  3319. messageBox("집도의퇴실 일시를 확인 하십시오. \n\n집도의퇴실 일시가 환자 퇴실일시 보다 늦습니다.","I000");
  3320. return false;
  3321. }
  3322. //2009-02-13 ycd 수술간호기록 마취종류에 따른 시간 체크 로직 변경
  3323. /*
  3324. var sTmpAnstKind = model.getValue("/root/main/MnphopcrData/MnphopcrList/anstkindspec/anstkind/anstkindcheck03");
  3325. if((sTmpAnstKind != "S") && ((sAnstsrtdt == "" || sAnstenddt == "" || sAnstsrtdt >= sAnstenddt))){
  3326. messageBox("마취 시작, 종료일시를 확인 하십시오.","I000");
  3327. return false;
  3328. }
  3329. if ( (sTmpAnstKind != "S") && (sPatinroomdt > sAnstsrtdt)) {
  3330. //messageBox("마취시작일시가 입실일시 보다 빠릅니다. 다시","C001");
  3331. messageBox(" 입실일시를 확인 하십시오. \n\n 입실일시가 마취시작일시보다 늦습니다.","I000");
  3332. return false;
  3333. }
  3334. */
  3335. /*
  3336. //
  3337. if ((sTmpAnstKind != "S") && (sAnstenddt < sOptodt)) {
  3338. messageBox("마취종료일시가 수술종료일시 보다 빠릅니다. 다시","C001");
  3339. return false;
  3340. }
  3341. //
  3342. if ((sTmpAnstKind != "S") && (sAnstenddt > sPatoutroomdt)) {
  3343. messageBox("환자퇴실일시가 마취종료일시 보다 빠릅니다. 다시","C001");
  3344. return false;
  3345. }
  3346. */
  3347. } else { // 전신, 부위마취가 아닐 경우
  3348. if(sTmpAnstKindChk == "S"){ //CPR만 선택 없이 국소 or 마취없음 선택시
  3349. // 2009-02-26 ycd 체크로직 하나로 합침
  3350. /*
  3351. if (sOpfromdt > sOptodt) {
  3352. //messageBox("수술관련 시간기록을 확인하십시오. \n\n수술종료일시가 수술시작일시 보다 빠릅니다.","I000");
  3353. messageBox("수술관련 시간기록을 확인하십시오.","I000");
  3354. return false;
  3355. }
  3356. if (sPatinroomdt > sOpfromdt) {
  3357. //messageBox("수술관련 시간기록을 확인하십시오. \n\n수술시작일시가 입실일시 보다 빠릅니다.","I000");
  3358. messageBox("수술관련 시간기록을 확인하십시오.","I000");
  3359. return false;
  3360. }
  3361. if (sPatoutroomdt > sOptodt) {
  3362. messageBox("수술관련 시간기록을 확인하십시오. \n\n수술종료일시가 퇴실일시 보다 빠릅니다.","I000");
  3363. return false;
  3364. }
  3365. */
  3366. if(sOpfromdt == "" || sOptodt == "" || sOpfromdt > sOptodt) {
  3367. messageBox("수술 시작, 종료일시를 확인하십시오.","I000");
  3368. return false;
  3369. }
  3370. if(sPatinroomdt > sOpfromdt){
  3371. messageBox("입실일시를 확인 하십시오. \n\n입실일시가 수술시작일시 보다 늦습니다.","I000");
  3372. return false;
  3373. }
  3374. if(sOptodt > sPatoutroomdt){
  3375. messageBox("퇴실일시를 확인 하십시오. \n\n수술종료일시가 퇴실일시 보다 늦습니다.","I000");
  3376. return false;
  3377. }
  3378. if(sPatinroomdt > sPerfidarvdt){
  3379. messageBox("집도의입실 일시를 확인 하십시오. \n\n환자 입실일시가 집도의입실 일시 보다 늦습니다.","I000");
  3380. return false;
  3381. }
  3382. if(sPerfidoutdt > sPatoutroomdt){
  3383. messageBox("집도의퇴실 일시를 확인 하십시오. \n\n집도의퇴실 일시가 환자 퇴실일시 보다 늦습니다.","I000");
  3384. return false;
  3385. }
  3386. }
  3387. }
  3388. }
  3389. // 2009-02-16 ycd 저장 제어 조건 정리
  3390. // 공동 처리 부분(전신, 부분)======================================================================================================
  3391. if( opnoyn != "Y" ) {//수술안함이면 체크안함.
  3392. if(sPerfidarvdt == "" || sPerfidoutdt == "" || sPerfidarvdt > sPerfidoutdt){
  3393. messageBox("집도의 입실일시, 퇴실일시를 확인 하십시오.","I000");
  3394. return false;
  3395. }
  3396. }
  3397. //=================================================================================================================================
  3398. /*
  3399. //
  3400. if ((sTmpAnstKind != "S") && (sOptodt > sPatoutroomdt)) {
  3401. messageBox("환자퇴실일시가 마취종료일시 보다 빠릅니다. 다시","C001");
  3402. return false;
  3403. }
  3404. */
  3405. //2008-08-12 오후 3:22:41 taebum 국소마취일 경우에는 check 안하도록 수정. 입력 자체를 하지 않는다.
  3406. //2009-02-09 ycd 수술기록 마취기록 연계정보 변경으로 인하여 기록 저장시 체크 부분 변경
  3407. /*
  3408. var sTmpAnstKind = model.getValue("/root/main/MnphopcrData/MnphopcrList/anstkindspec/anstkind/anstkindcheck03");
  3409. if((sTmpAnstKind != "S") && ((sAnstsrtdt == "" && sAnstenddt != "") ||
  3410. (sAnstsrtdt != "" && sAnstenddt != "" && sAnstsrtdt > sAnstenddt) )){
  3411. messageBox("마취기록지 수술관련 시간기록을 확인하십시오. ","C001");
  3412. return false;
  3413. }*/
  3414. // 2009-02-16 ycd 기존 로직 삭제 처리
  3415. /*
  3416. if((sPatinroomdt == "" && sPatoutroomdt != "") ||
  3417. (sPatinroomdt != "" && sPatoutroomdt !="" && sPatinroomdt > sPatoutroomdt)){
  3418. messageBox("입실, 퇴실일시를 확인하십시오.","I000");
  3419. return false;
  3420. }
  3421. if((sPatinroomdt == "" || sPatoutroomdt =="" || sPatinroomdt > sPatoutroomdt)){
  3422. messageBox("입실, 퇴실일시를 확인하십시오.","I000");
  3423. return false;
  3424. }
  3425. if( (sTmpAnstKindChk != "Y" ) && (sOpfromdt == "" || sOptodt == "" || (sOpfromdt != "" && sOptodt != "" && sOpfromdt > sOptodt)) ){
  3426. messageBox("수술 시작, 종료일시를 확인하십시오.","I000");
  3427. return false;
  3428. }
  3429. if( (sTmpAnstKindChk != "Y" ) && (sOpfromdt == "" || sOptodt == "" || sOpfromdt > sOptodt)){
  3430. messageBox("수술 시작, 종료일시를 확인하십시오.","I000");
  3431. return false;
  3432. }
  3433. if(sOptodt != "" && sPatoutroomdt != "" && sOptodt > sPatoutroomdt){
  3434. messageBox("수술관련 시간기록을 확인하십시오. \n\n 퇴실일시가 수술종료일시보다 빠릅니다.","I000");
  3435. return false;
  3436. }
  3437. */
  3438. /*
  3439. if((sPerfidarvdt == "" && sPerfidoutdt != "") ||
  3440. (sPerfidarvdt != "" && sPerfidoutdt != "" && sPerfidarvdt > sPerfidoutdt)){
  3441. messageBox("집도의 도착, 퇴실일시를 확인하십시오.","I000");
  3442. return false;
  3443. }
  3444. if((sPerfidarvdt == "" || sPerfidoutdt == "" || sPerfidarvdt > sPerfidoutdt)){
  3445. messageBox("집도의입실, 퇴실일시를 확인하십시오.","I000");
  3446. return false;
  3447. }
  3448. */
  3449. /*
  3450. if(sPatoutroomdt != "" && sOpoutrmplcecd == ""){
  3451. messageBox("퇴실장소가 입력이 되었습니다. 퇴실일시도","C001");
  3452. return false;
  3453. }
  3454. */
  3455. //2009-02-13 인증저장시 Cheke 추가 자동완성 기능 추가
  3456. // var sEsuListCnt = getNodesetCount("/root/main/MnphopcrData/MnphopcrList/esuspec/esu/esulist"); //ESU 기록값 체크
  3457. // var sEsuListCnt = getNodesetCount("/root/main/SheetData3/OpEqmtLists/opeqmtlist");
  3458. // var sEsuListCnt = getNodesetCount("/root/main/MnphopcrData/MnphopcrList/tourniquetspec/tourniquet/tourniquetlist");
  3459. // var sEsuListCnt = getNodesetCount("/root/main/SheetData3/SpecimenLists/specimenlist");
  3460. // var sEsuListCnt = getNodesetCount("/root/main/MnphopcrData/MnphopcrList/opposturespec/opposture/opposturelist");
  3461. //
  3462. // if(getNodesetCount("/root/main/MnphopcrData/MnphopcrList/esuspec/esu/esulist") > 0){
  3463. //
  3464. // }
  3465. /*
  3466. if (sOpoutrmplcecd == ""){
  3467. messageBox("퇴실장소를 확인하십시오.","I000");
  3468. return false;
  3469. }
  3470. */
  3471. //2008-09-04 오후 10:34:39 taebum 주/부수술 모두 확인하도록 수정
  3472. //주수술기록일 경우에만 check
  3473. //if( (model.getValue(xPathData+"/oprsrvno") != model.getValue(xPathData+"/mainoprsrvno")) &&
  3474. // (model.getValue(xPathData+"/mainoprsrvno") != "-" ) ){
  3475. //skip
  3476. //}else{
  3477. // 2009-02-20 YCD 저장 데이터 체크 조건 순서 변경
  3478. /*
  3479. if (sOpstatcd < "40"){
  3480. messageBox("인증저장 전 입실저장을 하시기 바랍니다.","");
  3481. return false;
  3482. }
  3483. if (sOpstatcd < "50"){
  3484. messageBox("인증저장 전 퇴실저장을 하시기 바랍니다.","");
  3485. return false;
  3486. }
  3487. */
  3488. //}
  3489. return true;
  3490. }
  3491. /* ------------------------------------------------- */
  3492. /* desc : 수술간호기록정보 조합하기 */
  3493. /* param : */
  3494. /* return : */
  3495. /* -------------------------------------------------- */
  3496. function fMnphopcrDataConcatenate(pFlag){
  3497. // 00 수술간호기록정보
  3498. //----(20110512) 불일치조치사항 추가
  3499. // sMnphopcrData = "oprsrvno" + "▦" // 01 CHARACTER(10) 수술예약(의뢰)번호(년도+일련번호)
  3500. // + "instcd" + "▦" // 02 CHARACTER(3) 기관코드
  3501. // + "pid" + "▦" // 03 VARCHAR(10) 환자번호
  3502. // + "optrustflag" + "▦" // 04 VARCHAR(1) 수술의뢰구분-정규(일반)E응급
  3503. // + "oppatflag" + "▦" // 05 CHARACTER(1) 수술환자구분
  3504. // + "opbfpatcnfmspec" + "▦" // 06 "SYSIBM"."XML" 수술전환자확인내역
  3505. // + "oppartdispyn" + "▦" // 07 CHARACTER(1) 수술부위표시여부
  3506. // + "timeoutspec" + "▦" // 08 "SYSIBM"."XML" TimeOut내역
  3507. // + "anstkindspec" + "▦" // 09 "SYSIBM"."XML" 마취종류내역
  3508. // + "opposturespec" + "▦" // 10 "SYSIBM"."XML" 수술체위내역
  3509. // + "skindinfspec" + "▦" // 11 "SYSIBM"."XML" 피부소독제내역
  3510. // + "aftopopnm" + "▦" // 12 "SYSIBM"."XML" 수술후수술명
  3511. // + "opscale" + "▦" // 13 CHARACTER(01) 수술스케일 L,M,S
  3512. // + "patinroomdt" + "▦" // 14 CHARACTER(14) 환자입실시간
  3513. // + "patoutroomdt" + "▦" // 15 CHARACTER(14) 환자퇴실시간
  3514. // + "anstsrtdt" + "▦" // 16 CHARACTER(14) 마취시작시간
  3515. // + "anstenddt" + "▦" // 17 CHARACTER(14) 마취종료시간
  3516. // + "perfidarvdt" + "▦" // 18 CHARACTER(14) 집도의도착일시
  3517. // + "perfidoutdt" + "▦" // 19 CHARACTER(14) 집도의퇴실일시
  3518. // + "opfromdt" + "▦" // 20 CHARACTER(14) 수술시작일자
  3519. // + "optodt" + "▦" // 21 CHARACTER(14) 수술종료일자
  3520. // + "opoutrmplcecd" + "▦" // 22 VARCHAR(10) 수술후퇴실장소
  3521. // + "opoutrmplcenm" + "▦" // 23 VARCHAR(50) 수술후퇴실장소기타
  3522. // + "esuspec" + "▦" // 24 "SYSIBM"."XML" ESU내역
  3523. // + "tourniquetspec" + "▦" // 25 "SYSIBM"."XML" Tourniquet내역
  3524. // + "warmcoldregmspec" + "▦" // 26 "SYSIBM"."XML" 온냉요법내역
  3525. // + "postureskinupdtspec" + "▦" // 27 "SYSIBM"."XML" 체위에따른피부변화내역
  3526. // + "counspec" + "▦" // 28 "SYSIBM"."XML" Count,내역
  3527. // + "packingspec" + "▦" // 29 "SYSIBM"."XML" Packing내역
  3528. // + "certno" + "▦" // 30 VARCHAR(17) 인증코드
  3529. // + "opcnfmdd" + "▦" // 31 CHARACTER(8) 수술확정일자(의뢰상태일경우예정일자와동일)
  3530. // + "fstrgstrid" + "▦" // 32 CHARACTER(10) 최초등록자ID(시스템정보)
  3531. // + "lastupdtid" + "▦" // 33 CHARACTER(10) 최종수정자(시스템정보)
  3532. // + "opstatcd" + "▦" // 34 진행상태
  3533. // + "opstatcdnew" + "▦" // 35 진행상태
  3534. // + "ophistno" + "▦" // 36 예약번호에따른이력번호
  3535. // + "recstat" + "▦" // 37 Record 상태정보 I:신규,U:수정
  3536. // + "druguseyn" + "▦" // 38 약품사용여부
  3537. // + "drugcmt" + "▦" // 39 약품비고
  3538. // + "drgeuseyn" + "▦" // 40 배액관사용여부
  3539. // + "drgecmt" + "▦" // 41 배액관비고
  3540. // + "eqmtuseyn" + "▦" // 42 장비사용여부
  3541. // + "eqmtcmt" + "▦" // 43 장비비고
  3542. // + "implantuseyn" + "▦" // 44 Implant 사용 여부
  3543. // + "implantcmt" + "▦" // 45 Implant비고
  3544. // + "tnsyn" + "▦" // 46 수혈여부
  3545. // + "spcuseyn" + "▦" // 47 검체사용여부
  3546. // + "carerecuseyn" + "▦" // 48 간호기록사용여부
  3547. // + "certflag" + "▦" // 49 임시/인증 저장 여부(C:인증, T:임시)
  3548. // + "cuthairflag" + "▦" // 50 삭모구분
  3549. // + "xrayflag" + "▦" // 51 X-Ray 구분
  3550. // + "xraydrugspec" + "▦" // 52 X-Ray 조영제 사용 text
  3551. // + "drsflag" + "▦" // 53 Dressing 구분
  3552. // + "drsetc" + "▦" // 54 Dressing 기타 입력 text
  3553. // + "nocountdoctid" + "▦" // 55 집도의 요청에 이한 계수확인 안함 집도의ID
  3554. // + "icugoflag" + "▦" // 56 ICU 회복환자 관리용 회복실 입실구분
  3555. // + "extcyn" + "▦" // 57 적출물여부
  3556. // + "skinstatflag" + "▦" // 58 피부상태구분
  3557. // + "delivyn" + "▦" // 59 분만여부
  3558. // + "platatransid" + "▦" // 60 태반운반자
  3559. // + "otyn" + "▦" // 61 장기이식여부
  3560. // + "patopinsndsmsid" + "▦" // 62 환자입실smsID
  3561. // + "patopoutsndsmsid" + "▦" // 63 환자퇴실SMSID
  3562. // + "escopeeqmtuseyn" + "▦" // 64 내시경장비사용여부
  3563. // + "insuremark" + "▦" // 65 보험팀전달사항
  3564. // + "prcporderid" + "▦" // 66 처방의사ID
  3565. // + "deptremark" + "▦" // 67 부서Remark
  3566. // + "oproomremark" + "▦" // 68 수술실Remark
  3567. // + "opcntlistremark" + "▦" // 69 수술count리스트 Remark
  3568. // + "opnursrectimeremark" + "▦" // 70 수술지연사유정보
  3569. // + "spccmt" + "▦" // 71 검체비고입력
  3570. // + "opnoyn" + "▦" // 72 수술안함여부
  3571. // + "outflag" + "▦" // 73 퇴실저장여부
  3572. // + "mainoprsrvno" + "▩" // 74 MAINOPRSRVNO
  3573. //
  3574. // sMnphopcrData += sOprsrvno + "▦" // 01 CHARACTER(10) 수술예약(의뢰)번호(년도+일련번호)
  3575. // + sInstcd + "▦" // 02 CHARACTER(3) 기관코드
  3576. // + sPid + "▦" // 03 VARCHAR(10) 환자번호
  3577. // + sOptrustflag + "▦" // 04 VARCHAR(1) 수술의뢰구분-정규(일반)E응급
  3578. // + sOppatflag + "▦" // 05 CHARACTER(1) 수술환자구분
  3579. // + sOpbfpatcnfmspec + "▦" // 06 "SYSIBM"."XML" 수술전환자확인내역
  3580. // + sOppartdispyn + "▦" // 07 CHARACTER(1) 수술부위표시여부
  3581. // + sTimeoutspec + "▦" // 08 "SYSIBM"."XML" TimeOut내역
  3582. // + sAnstkindspec + "▦" // 09 "SYSIBM"."XML" 마취종류내역
  3583. // + sOpposturespec + "▦" // 10 "SYSIBM"."XML" 수술체위내역
  3584. // + sSkindinfspec + "▦" // 11 "SYSIBM"."XML" 피부소독제내역
  3585. // + sAftopopnm + "▦" // 12 "SYSIBM"."XML" 수술후수술명
  3586. // + sOpscale + "▦" // 13 CHARACTER(01) 수술스케일 L,M,S
  3587. // + sPatinroomdt + "▦" // 14 CHARACTER(14) 환자입실시간
  3588. // + sPatoutroomdt + "▦" // 15 CHARACTER(14) 환자퇴실시간
  3589. // + sAnstsrtdt + "▦" // 16 CHARACTER(14) 마취시작시간
  3590. // + sAnstenddt + "▦" // 17 CHARACTER(14) 마취종료시간
  3591. // + sPerfidarvdt + "▦" // 18 CHARACTER(14) 집도의도착일시
  3592. // + sPerfidoutdt + "▦" // 19 CHARACTER(14) 집도의퇴실일시
  3593. // + sOpfromdt + "▦" // 20 CHARACTER(14) 수술시작일자
  3594. // + sOptodt + "▦" // 21 CHARACTER(14) 수술종료일자
  3595. // + sOpoutrmplcecd + "▦" // 22 VARCHAR(10) 수술후퇴실장소
  3596. // + sOpoutrmplcenm + "▦" // 23 VARCHAR(50) 수술후퇴실장소기타
  3597. // + sEsuspec + "▦" // 24 "SYSIBM"."XML" ESU내역
  3598. // + sTourniquetspec + "▦" // 25 "SYSIBM"."XML" Tourniquet내역
  3599. // + sWarmcoldregmspec + "▦" // 26 "SYSIBM"."XML" 온냉요법내역
  3600. // + sPostureskinupdtspec + "▦" // 27 "SYSIBM"."XML" 체위에따른피부변화내역
  3601. // + sCounspec + "▦" // 28 "SYSIBM"."XML" Count,내역
  3602. // + sPackingspec + "▦" // 29 "SYSIBM"."XML" Packing내역
  3603. // + sCertno + "▦" // 30 VARCHAR(17) 인증코드
  3604. // + sOpcnfmdd + "▦" // 31 CHARACTER(8) 수술확정일자(의뢰상태일경우예정일자와동일)
  3605. // + sFstrgstrid + "▦" // 32 CHARACTER(10) 최초등록자ID(시스템정보)
  3606. // + sLastupdtid + "▦" // 33 CHARACTER(10) 최종수정자(시스템정보)
  3607. // + sOpstatcd + "▦" // 34 진행상태
  3608. // + sOpstatcdnew + "▦" // 35 진행상태
  3609. // + sOphistno + "▦" // 36 예약번호에따른이력번호
  3610. // + sRecstat + "▦" // 37 Record 상태정보 I:신규,U:수정
  3611. // + sDrugUseYN + "▦" // 38 약품사용여부분
  3612. // + sDrugCmt + "▦" // 39 약품비고
  3613. // + sDrgeUseYN + "▦" // 40 배액관사용여부
  3614. // + sDrgeCmt + "▦" // 41 배액관비고
  3615. // + sEqmtUseYN + "▦" // 42 장비사용여부
  3616. // + sEqmtCmt + "▦" // 43 장비비고
  3617. // + sImplantUseYN + "▦" // 44 Implant 사용 여부
  3618. // + sImplantCmt + "▦" // 45 Implant비고
  3619. // + sTnsYN + "▦" // 46 수혈여부
  3620. // + sSpcUseYN + "▦" // 47 검체사용여부
  3621. // + sCareRecUseYN + "▦" // 48 간호기록사용여부
  3622. // + pFlag + "▦" // 49 임시/인증 저장 여부(C:인증, T:임시)
  3623. // + sCuthairflag + "▦" // 50 삭모구분
  3624. // + sXrayflag + "▦" // 51 X-Ray 구분
  3625. // + sXraydrugspec + "▦" // 52 X-Ray 조영제 사용 입력 text
  3626. // + sDrsflag + "▦" // 53 Dressing 구분
  3627. // + sDrsetc + "▦" // 54 Dressing 기타 입력 text
  3628. // + sNocountdoctid + "▦" // 55 집도의 요청에 의한 계수확인 안함 집도의ID
  3629. // + sIcuGoFlag + "▦" // 56 중환자실용 회복환자 관리 flag
  3630. // + sExtcyn + "▦" // 57 적출물여부
  3631. // + sSkinstatflag + "▦" // 58 피부상태구분
  3632. // + sDelivyn + "▦" // 59 분만여부
  3633. // + sPlatatransid + "▦" // 60 태반운반자
  3634. // + sOtyn + "▦" // 61 장기이식여부
  3635. // + sPatopinsndsmsid + "▦" // 62 환자입실smsID
  3636. // + sPatopoutsndsmsid + "▦" // 63 환자퇴실SMSID
  3637. // + sEscopeeqmtuseyn + "▦" // 64 내시경장비사용여부
  3638. // + sInsuremark + "▦" // 65 보험팀전달사항
  3639. // + sPrcporderid + "▦" // 66 처방의사ID
  3640. // + sDeptremark + "▦" // 67 부서Remark
  3641. // + sOproomremark + "▦" // 68 수술실Remark
  3642. // + sOpcntlistremark + "▦" // 69 수술count리스트 Remark
  3643. // + sOpNursRecTimeRemark + "▦" // 70 수술지연사유정보
  3644. // + sSpcCmt + "▦" // 71 검체비고입력
  3645. // + model.getValue("/root/main/MnphopcrData/MnphopcrList/opnoyn") + "▦" // 72 수술안함 여부
  3646. // + sOutflag + "▦" // 73 퇴실저장여부
  3647. // + model.getValue("/root/main/MnphopcrData/MnphopcrList/mainoprsrvno") + "▩"; // 74 MAINOPRSRVNO
  3648. sMnphopcrData = "oprsrvno" + "▦" // 01 CHARACTER(10) 수술예약(의뢰)번호(년도+일련번호)
  3649. + "instcd" + "▦" // 02 CHARACTER(3) 기관코드
  3650. + "pid" + "▦" // 03 VARCHAR(10) 환자번호
  3651. + "optrustflag" + "▦" // 04 VARCHAR(1) 수술의뢰구분-정규(일반)E응급
  3652. + "oppatflag" + "▦" // 05 CHARACTER(1) 수술환자구분
  3653. + "opbfpatcnfmspec" + "▦" // 06 "SYSIBM"."XML" 수술전환자확인내역
  3654. + "oppartdispyn" + "▦" // 07 CHARACTER(1) 수술부위표시여부
  3655. + "timeoutspec" + "▦" // 08 "SYSIBM"."XML" TimeOut내역
  3656. + "anstkindspec" + "▦" // 09 "SYSIBM"."XML" 마취종류내역
  3657. + "opposturespec" + "▦" // 10 "SYSIBM"."XML" 수술체위내역
  3658. + "skindinfspec" + "▦" // 11 "SYSIBM"."XML" 피부소독제내역
  3659. + "aftopopnm" + "▦" // 12 "SYSIBM"."XML" 수술후수술명
  3660. + "opscale" + "▦" // 13 CHARACTER(01) 수술스케일 L,M,S
  3661. + "patinroomdt" + "▦" // 14 CHARACTER(14) 환자입실시간
  3662. + "patoutroomdt" + "▦" // 15 CHARACTER(14) 환자퇴실시간
  3663. + "anstsrtdt" + "▦" // 16 CHARACTER(14) 마취시작시간
  3664. + "anstenddt" + "▦" // 17 CHARACTER(14) 마취종료시간
  3665. + "perfidarvdt" + "▦" // 18 CHARACTER(14) 집도의도착일시
  3666. + "perfidoutdt" + "▦" // 19 CHARACTER(14) 집도의퇴실일시
  3667. + "opfromdt" + "▦" // 20 CHARACTER(14) 수술시작일자
  3668. + "optodt" + "▦" // 21 CHARACTER(14) 수술종료일자
  3669. + "opoutrmplcecd" + "▦" // 22 VARCHAR(10) 수술후퇴실장소
  3670. + "opoutrmplcenm" + "▦" // 23 VARCHAR(50) 수술후퇴실장소기타
  3671. + "esuspec" + "▦" // 24 "SYSIBM"."XML" ESU내역
  3672. + "tourniquetspec" + "▦" // 25 "SYSIBM"."XML" Tourniquet내역
  3673. + "warmcoldregmspec" + "▦" // 26 "SYSIBM"."XML" 온냉요법내역
  3674. + "postureskinupdtspec" + "▦" // 27 "SYSIBM"."XML" 체위에따른피부변화내역
  3675. + "counspec" + "▦" // 28 "SYSIBM"."XML" Count,내역
  3676. + "packingspec" + "▦" // 29 "SYSIBM"."XML" Packing내역
  3677. + "certno" + "▦" // 30 VARCHAR(17) 인증코드
  3678. + "opcnfmdd" + "▦" // 31 CHARACTER(8) 수술확정일자(의뢰상태일경우예정일자와동일)
  3679. + "fstrgstrid" + "▦" // 32 CHARACTER(10) 최초등록자ID(시스템정보)
  3680. + "lastupdtid" + "▦" // 33 CHARACTER(10) 최종수정자(시스템정보)
  3681. + "opstatcd" + "▦" // 34 진행상태
  3682. + "opstatcdnew" + "▦" // 35 진행상태
  3683. + "ophistno" + "▦" // 36 예약번호에따른이력번호
  3684. + "recstat" + "▦" // 37 Record 상태정보 I:신규,U:수정
  3685. + "druguseyn" + "▦" // 38 약품사용여부
  3686. + "drugcmt" + "▦" // 39 약품비고
  3687. + "drgeuseyn" + "▦" // 40 배액관사용여부
  3688. + "drgecmt" + "▦" // 41 배액관비고
  3689. + "eqmtuseyn" + "▦" // 42 장비사용여부
  3690. + "eqmtcmt" + "▦" // 43 장비비고
  3691. + "implantuseyn" + "▦" // 44 Implant 사용 여부
  3692. + "implantcmt" + "▦" // 45 Implant비고
  3693. + "tnsyn" + "▦" // 46 수혈여부
  3694. + "spcuseyn" + "▦" // 47 검체사용여부
  3695. + "carerecuseyn" + "▦" // 48 간호기록사용여부
  3696. + "certflag" + "▦" // 49 임시/인증 저장 여부(C:인증, T:임시)
  3697. + "cuthairflag" + "▦" // 50 삭모구분
  3698. + "xrayflag" + "▦" // 51 X-Ray 구분
  3699. + "xraydrugspec" + "▦" // 52 X-Ray 조영제 사용 text
  3700. + "drsflag" + "▦" // 53 Dressing 구분
  3701. + "drsetc" + "▦" // 54 Dressing 기타 입력 text
  3702. + "nocountdoctid" + "▦" // 55 집도의 요청에 이한 계수확인 안함 집도의ID
  3703. + "icugoflag" + "▦" // 56 ICU 회복환자 관리용 회복실 입실구분
  3704. + "extcyn" + "▦" // 57 적출물여부
  3705. + "skinstatflag" + "▦" // 58 피부상태구분
  3706. + "delivyn" + "▦" // 59 분만여부
  3707. + "platatransid" + "▦" // 60 태반운반자
  3708. + "otyn" + "▦" // 61 장기이식여부
  3709. + "patopinsndsmsid" + "▦" // 62 환자입실smsID
  3710. + "patopoutsndsmsid" + "▦" // 63 환자퇴실SMSID
  3711. + "escopeeqmtuseyn" + "▦" // 64 내시경장비사용여부
  3712. + "insuremark" + "▦" // 65 보험팀전달사항
  3713. + "prcporderid" + "▦" // 66 처방의사ID
  3714. + "deptremark" + "▦" // 67 부서Remark
  3715. + "oproomremark" + "▦" // 68 수술실Remark
  3716. + "opcntlistremark" + "▦" // 69 수술count리스트 Remark
  3717. + "opnursrectimeremark" + "▦" // 70 수술지연사유정보
  3718. + "spccmt" + "▦" // 71 검체비고입력
  3719. + "opnoyn" + "▦" // 72 수술안함여부
  3720. + "outflag" + "▦" // 73 퇴실저장여부
  3721. + "mainoprsrvno" + "▦" // 74 MAINOPRSRVNO
  3722. + "opdiscordspec" + "▦" // 75 불일치조치사항
  3723. + "obrecyn" + "▦" // 76 관찰기록여부
  3724. + "calmflag" + "▦" // 77 진정유무
  3725. + "opcntlisttoexecyn" + "▩"; // 78 수술count리스트 Time Out 시행여부
  3726. sMnphopcrData += sOprsrvno + "▦" // 01 CHARACTER(10) 수술예약(의뢰)번호(년도+일련번호)
  3727. + sInstcd + "▦" // 02 CHARACTER(3) 기관코드
  3728. + sPid + "▦" // 03 VARCHAR(10) 환자번호
  3729. + sOptrustflag + "▦" // 04 VARCHAR(1) 수술의뢰구분-정규(일반)E응급
  3730. + sOppatflag + "▦" // 05 CHARACTER(1) 수술환자구분
  3731. + sOpbfpatcnfmspec + "▦" // 06 "SYSIBM"."XML" 수술전환자확인내역
  3732. + sOppartdispyn + "▦" // 07 CHARACTER(1) 수술부위표시여부
  3733. + sTimeoutspec + "▦" // 08 "SYSIBM"."XML" TimeOut내역
  3734. + sAnstkindspec + "▦" // 09 "SYSIBM"."XML" 마취종류내역
  3735. + sOpposturespec + "▦" // 10 "SYSIBM"."XML" 수술체위내역
  3736. + sSkindinfspec + "▦" // 11 "SYSIBM"."XML" 피부소독제내역
  3737. + sAftopopnm + "▦" // 12 "SYSIBM"."XML" 수술후수술명
  3738. + sOpscale + "▦" // 13 CHARACTER(01) 수술스케일 L,M,S
  3739. + sPatinroomdt + "▦" // 14 CHARACTER(14) 환자입실시간
  3740. + sPatoutroomdt + "▦" // 15 CHARACTER(14) 환자퇴실시간
  3741. + sAnstsrtdt + "▦" // 16 CHARACTER(14) 마취시작시간
  3742. + sAnstenddt + "▦" // 17 CHARACTER(14) 마취종료시간
  3743. + sPerfidarvdt + "▦" // 18 CHARACTER(14) 집도의도착일시
  3744. + sPerfidoutdt + "▦" // 19 CHARACTER(14) 집도의퇴실일시
  3745. + sOpfromdt + "▦" // 20 CHARACTER(14) 수술시작일자
  3746. + sOptodt + "▦" // 21 CHARACTER(14) 수술종료일자
  3747. + sOpoutrmplcecd + "▦" // 22 VARCHAR(10) 수술후퇴실장소
  3748. + sOpoutrmplcenm + "▦" // 23 VARCHAR(50) 수술후퇴실장소기타
  3749. + sEsuspec + "▦" // 24 "SYSIBM"."XML" ESU내역
  3750. + sTourniquetspec + "▦" // 25 "SYSIBM"."XML" Tourniquet내역
  3751. + sWarmcoldregmspec + "▦" // 26 "SYSIBM"."XML" 온냉요법내역
  3752. + sPostureskinupdtspec + "▦" // 27 "SYSIBM"."XML" 체위에따른피부변화내역
  3753. + sCounspec + "▦" // 28 "SYSIBM"."XML" Count,내역
  3754. + sPackingspec + "▦" // 29 "SYSIBM"."XML" Packing내역
  3755. + sCertno + "▦" // 30 VARCHAR(17) 인증코드
  3756. + sOpcnfmdd + "▦" // 31 CHARACTER(8) 수술확정일자(의뢰상태일경우예정일자와동일)
  3757. + sFstrgstrid + "▦" // 32 CHARACTER(10) 최초등록자ID(시스템정보)
  3758. + sLastupdtid + "▦" // 33 CHARACTER(10) 최종수정자(시스템정보)
  3759. + sOpstatcd + "▦" // 34 진행상태
  3760. + sOpstatcdnew + "▦" // 35 진행상태
  3761. + sOphistno + "▦" // 36 예약번호에따른이력번호
  3762. + sRecstat + "▦" // 37 Record 상태정보 I:신규,U:수정
  3763. + sDrugUseYN + "▦" // 38 약품사용여부분
  3764. + sDrugCmt + "▦" // 39 약품비고
  3765. + sDrgeUseYN + "▦" // 40 배액관사용여부
  3766. + sDrgeCmt + "▦" // 41 배액관비고
  3767. + sEqmtUseYN + "▦" // 42 장비사용여부
  3768. + sEqmtCmt + "▦" // 43 장비비고
  3769. + sImplantUseYN + "▦" // 44 Implant 사용 여부
  3770. + sImplantCmt + "▦" // 45 Implant비고
  3771. + sTnsYN + "▦" // 46 수혈여부
  3772. + sSpcUseYN + "▦" // 47 검체사용여부
  3773. + sCareRecUseYN + "▦" // 48 간호기록사용여부
  3774. + pFlag + "▦" // 49 임시/인증 저장 여부(C:인증, T:임시)
  3775. + sCuthairflag + "▦" // 50 삭모구분
  3776. + sXrayflag + "▦" // 51 X-Ray 구분
  3777. + sXraydrugspec + "▦" // 52 X-Ray 조영제 사용 입력 text
  3778. + sDrsflag + "▦" // 53 Dressing 구분
  3779. + sDrsetc + "▦" // 54 Dressing 기타 입력 text
  3780. + sNocountdoctid + "▦" // 55 집도의 요청에 의한 계수확인 안함 집도의ID
  3781. + sIcuGoFlag + "▦" // 56 중환자실용 회복환자 관리 flag
  3782. + sExtcyn + "▦" // 57 적출물여부
  3783. + sSkinstatflag + "▦" // 58 피부상태구분
  3784. + sDelivyn + "▦" // 59 분만여부
  3785. + sPlatatransid + "▦" // 60 태반운반자
  3786. + sOtyn + "▦" // 61 장기이식여부
  3787. + sPatopinsndsmsid + "▦" // 62 환자입실smsID
  3788. + sPatopoutsndsmsid + "▦" // 63 환자퇴실SMSID
  3789. + sEscopeeqmtuseyn + "▦" // 64 내시경장비사용여부
  3790. + sInsuremark + "▦" // 65 보험팀전달사항
  3791. + sPrcporderid + "▦" // 66 처방의사ID
  3792. + sDeptremark + "▦" // 67 부서Remark
  3793. + sOproomremark + "▦" // 68 수술실Remark
  3794. + sOpcntlistremark + "▦" // 69 수술count리스트 Remark
  3795. + sOpNursRecTimeRemark + "▦" // 70 수술지연사유정보
  3796. + sSpcCmt + "▦" // 71 검체비고입력
  3797. + model.getValue("/root/main/MnphopcrData/MnphopcrList/opnoyn") + "▦" // 72 수술안함 여부
  3798. + sOutflag + "▦" // 73 퇴실저장여부
  3799. + model.getValue("/root/main/MnphopcrData/MnphopcrList/mainoprsrvno") + "▦" // 74 MAINOPRSRVNO
  3800. + opdiscordspec + "▦" // 75 "SYSIBM"."XML" 불일치시조치사항
  3801. + sObRecyn + "▦" // 76 관찰기록여부
  3802. + model.getValue("/root/main/MnphopcrData/MnphopcrList/calmflag") + "▦" // 77 진정유무
  3803. + sOpcntlisttoexecyn + "▩" // 78 수술count리스트 Time Out 시행여부
  3804. //----(20110512) 불일치조치사항 추가
  3805. model.makeValue("/root/send/MnphopcrList", sMnphopcrData );
  3806. if (pFlag != "Y") {
  3807. fDetailDataConcatenate(); // 기타상세 기록정보 조합하기
  3808. }
  3809. }
  3810. /* ------------------------------------------------- */
  3811. /* desc : 기타상세 기록정보 조합하기 */
  3812. /* -------------------------------------------------- */
  3813. function fDetailDataConcatenate(){
  3814. //ESU 자동 삭제 기능 추가
  3815. var iRow = grd_esu.rows-grd_esu.fixedrows;
  3816. for (var i = iRow; i > 0; i--){
  3817. if ((model.getValue(xPathData+"/esuspec/esu/esulist["+ i +"]/mfrcut" ) == "" || model.getValue(xPathData+"/esuspec/esu/esulist["+ i +"]/mfrcut" ) == "0" ) &&
  3818. (model.getValue(xPathData+"/esuspec/esu/esulist["+ i +"]/mfrcong" ) == "" || model.getValue(xPathData+"/esuspec/esu/esulist["+ i +"]/mfrcong" ) == "0" ) &&
  3819. (model.getValue(xPathData+"/esuspec/esu/esulist["+ i +"]/bwatt" ) == "" || model.getValue(xPathData+"/esuspec/esu/esulist["+ i +"]/bwatt" ) == "0" ) &&
  3820. model.getValue(xPathData+"/esuspec/esu/esulist["+ i +"]/imgpostview" ) == "" ){
  3821. model.removeNodeset(xPathData+"/esuspec/esu/esulist["+ i +"]");
  3822. }
  3823. }
  3824. model.makeValue("/root/send/druglist" , grd_druglist.getUpdateDataAll("i") ); // 약품정보
  3825. //model.makeValue("/root/send/drgelist" , grd_inscath.getUpdateDataAll("i") ); // 삽관정보
  3826. model.makeValue("/root/send/eqmtlist" , grd_opeqmtlist.getUpdateDataAll("i")); // 장비정보
  3827. if (model.getValue("/root/main/operation/list/opcnfmdd") <= model.getValue("/root/specdd/chkdd") ) {
  3828. model.makeValue("/root/send/specimenlist" , grd_spclist.getUpdateDataAll("i") ); // 검체정보
  3829. } else {
  3830. model.makeValue("/root/send/specimenlist" , grd_spclistnew.getUpdateDataAll("i") ); // 검체정보_new_2012.08.30_손성훈.
  3831. }
  3832. //model.makeValue("/root/send/organlist" , datagrid4.getUpdateData()); // 장기이식정보
  3833. }
  3834. /* ------------------------------------------------- */
  3835. /* desc : 수술기록2 Count정보 저장하기 */
  3836. /* param : pModel - Model */
  3837. /* tNode - Target Node */
  3838. /* sNode - Source Node */
  3839. /* return : */
  3840. /* -------------------------------------------------- */
  3841. function fCountDataSave(pFlag){
  3842. var CountMainPath = "/root/main/MnphopcoLists"; // Count Main Path
  3843. var CountListPath = "/root/main/MnphopcoLists/mnphopcolist"; // Count List Path
  3844. var sNode = instance1.selectSingleNode(CountMainPath);
  3845. if (sNode == null) {
  3846. return false;
  3847. }
  3848. //------------
  3849. var DgrsData = "1 1 2 2 3 3 4 4"; // 차수(1:1차,2:2차,3:3차,4:END)
  3850. var FlasData = "1 2 1 2 1 2 1 2"; // 1.소독간호사, 2.순회간호사
  3851. var NursnmData = "nursnm11 nursnm12 nursnm21 nursnm22 nursnm31 nursnm32 nursnm41 nursnm42"; // 확인간호사명
  3852. var NursidData = "nursid11 nursid12 nursid21 nursid22 nursid31 nursid32 nursid41 nursid42"; // 확인간호사ID
  3853. var DeptcdData = "deptcd11 deptcd12 deptcd21 deptcd22 deptcd31 deptcd32 deptcd41 deptcd42"; // 부서코드
  3854. var DeptnmData = "deptnm11 deptnm12 deptnm21 deptnm22 deptnm31 deptnm32 deptnm41 deptnm42"; // 부서명
  3855. var CheckidData = "checkid11 checkid12 checkid21 checkid22 checkid31 checkid32 checkid41 checkid42"; // 확인간호사ID Check
  3856. var Dgrs = DgrsData.split(" ");
  3857. var Flas = FlasData.split(" ");
  3858. var Nursnm = NursnmData.split(" ");
  3859. var Nursid = NursidData.split(" ");
  3860. var Deptcd = DeptcdData.split(" ");
  3861. var Deptnm = DeptnmData.split(" ");
  3862. var Checkid = CheckidData.split(" ");
  3863. var sCheck = "N";
  3864. var CocnCnt = 0;
  3865. var OpcoCnt = 0;
  3866. var OpcoStat = "" ;
  3867. var CountNode = "" ;
  3868. var eNurseData = ""; // 해당없음이 아닌 경우 확인 간호사 1,2,3 모두 들어갔는지 Check.
  3869. var eNurseFlag = false;
  3870. var MnphcocnData = fMnphcocnTitle(); // 수술기록의 계수정보 TITLE
  3871. var MnphopcoData = fMnphopcoTitle(); // 수술기록_계수확인 간호사 정보 TITLE
  3872. //--------(20101024) 경북대
  3873. var discordaction = ""; //불일치 조치사항 추가
  3874. var discordactionetc= ""; //불일치 조치사항 기타 입력 추가
  3875. var discordactionnm = ""; //불일치 조치사항 추가
  3876. //--------(20101024) 경북대
  3877. var nIdx = sNode.childNodes.length;
  3878. var sOprsrvno = model.getValue("/root/init/HideData/oprsrvno"); // 수술예약(의뢰)번호
  3879. var sInstCd = model.getValue("/root/init/HideData/instcd" ); // 기관코드
  3880. for (n = 1; n <= nIdx; n++) {
  3881. sCheck = "N";
  3882. CountNode = CountListPath + "["+ n + "]";
  3883. sKindcd = model.getValue(CountNode+ "/kindcd" ); // 종류코드
  3884. sNacls = model.getValue(CountNode+ "/nacls" ); // 종류해당유무
  3885. sSameyn = model.getValue(CountNode+ "/samey" ); // 계수일치여부
  3886. sRecstat = model.getValue(CountNode+ "/recflag" ); // Record 상태정보 I:신규,U:수정
  3887. sTotQty = model.getValue(CountNode+ "/totqty" ); // Total수량
  3888. //2009-02-09 ycd Count List 해당사유없음 체크시 상세 정보추가
  3889. sNaclsinucd = model.getValue(CountNode+ "/naclsinucd" ); // 해당없음 사유코드
  3890. SCodenm3 = model.getValue(CountNode+ "/codenm3" ); // 기록종류명
  3891. sRecNo = model.getValue(CountNode+ "/recno" ); // Sheet 번호
  3892. //---------(20101024) 경북대
  3893. discordaction = model.getValue(CountNode+ "/discordaction" ); // 불일치사유
  3894. discordactionetc = model.getValue(CountNode+ "/discordactionetc" ); // 불일치사유기타사유
  3895. discordactionnm = model.getValue(CountNode+ "/discordactionnm" ); // 불일치사유
  3896. //---------(20101024) 경북대
  3897. sNacls = (sNacls == "true") ? "Y" : "N" ;
  3898. sSameyn = (sSameyn == "true") ? "Y" : "N" ;
  3899. sTotQty = (sTotQty == "" ) ? "0" : sTotQty;
  3900. if(sRecstat == "-") continue;
  3901. if (sNacls == "Y") {
  3902. if (sRecstat != "I") {
  3903. sCheck = "N";
  3904. sRecstat = "U";
  3905. }
  3906. //2009-02-09 ycd Count List 해당사유없음 체크시 사유정보 입력 체크
  3907. if (sNaclsinucd == "-"){
  3908. messageBox(SCodenm3 + " 기록항목 해당없음에 대한 사유를 입력하십시오." , "I000");
  3909. return false;
  3910. }
  3911. } else {
  3912. if (sTotQty != "0" || sKindcd == "00" || n == 1) { // INSTRUMENT
  3913. sCheck = "Y";
  3914. } else {
  3915. //2008-09-03 오후 1:27:06 taebum 협진관련 로직 추가
  3916. //2009-02-19 ycd 임시저장시 Count List 확인자 입력 체크 제외(협진 체크는 제외)
  3917. //if ((pFlag == "C") && ( (model.getValue(xPathData+"/oprsrvno") == model.getValue(xPathData+"/mainoprsrvno"))
  3918. // || (model.getValue(xPathData+"/mainoprsrvno") == "-") )) {
  3919. if (pFlag == "C"){
  3920. sCheck = "N";
  3921. sRecstat = "D";
  3922. //alert(model.getValue(CountNode + "/codenm3")+"의 수량을 입력하십시요 !!" );
  3923. //2008-08-21 오후 2:06:12 Count List
  3924. //messageBox("Count List 수량을 입력하십시오!" , "I000");
  3925. //return false;
  3926. }
  3927. }
  3928. }
  3929. if (sCheck == "Y") {
  3930. sInitqty = model.getValue(CountNode + "/initqty" ); // 03 최초수량
  3931. sAddqty = model.getValue(CountNode + "/addqty" ); // 04 추가수량
  3932. sPackqty = model.getValue(CountNode + "/packqty" ); // 05 Packing수량
  3933. if (n == 1) {
  3934. sInitqty = "0";
  3935. sAddqty = "0";
  3936. sPackqty = "0";
  3937. }else{
  3938. // 2009-02-27 count list 저장시 packing 수량, total 수량 비교
  3939. if(((eval(sInitqty) + eval(sAddqty)) < eval(sPackqty)) && pFlag == "C"){
  3940. //if(((eval(sInitqty) + eval(sAddqty)) < eval(sPackqty))){
  3941. messageBox(SCodenm3+" 의 Total 수량과 Packing 수량을 확인하십시요." , "I000");
  3942. return false;
  3943. }
  3944. }
  3945. }
  3946. //--(20101024) 경북대
  3947. // MnphcocnData += sOprsrvno + "▦" // 00 수술예약(의뢰)번호
  3948. // + model.getValue(CountNode + "/kindcd" ) + "▦" // 01 종류코드
  3949. // + sInstCd + "▦" // 02 기관코드
  3950. // + model.getValue(CountNode + "/initqty" ) + "▦" // 03 최초수량
  3951. // + model.getValue(CountNode + "/addqty" ) + "▦" // 04 추가수량
  3952. // + model.getValue(CountNode + "/packqty" ) + "▦" // 05 Packing수량
  3953. // + instance1.selectSingleNode(CountNode+"/packspec").xml + "▦" // 06 Packing내역
  3954. // + sNacls + "▦" // 07 종류해당유무
  3955. // + sSameyn + "▦" // 08 계수일치여부
  3956. // + model.getValue(CountNode + "/codenm1" ) + "▦" // 09 종류코드명1
  3957. // + model.getValue(CountNode + "/codenm2" ) + "▦" // 10 종류코드명2
  3958. // + model.getValue(CountNode + "/codenm3" ) + "▦" // 11 종류코드명3
  3959. // + model.getValue(CountNode + "/refseq" ) + "▦" // 12 조회순서
  3960. // + sRecstat + "▦" // 13 Record 상태정보 I:신규,U:수정
  3961. // + sNaclsinucd + "▦" // 14 해당없음의 사유코드
  3962. // + sRecNo + "▩"; // 15 Sheet 번호
  3963. MnphcocnData += sOprsrvno + "▦" // 00 수술예약(의뢰)번호
  3964. + model.getValue(CountNode + "/kindcd" ) + "▦" // 01 종류코드
  3965. + sInstCd + "▦" // 02 기관코드
  3966. + model.getValue(CountNode + "/initqty" ) + "▦" // 03 최초수량
  3967. + model.getValue(CountNode + "/addqty" ) + "▦" // 04 추가수량
  3968. + model.getValue(CountNode + "/packqty" ) + "▦" // 05 Packing수량
  3969. + instance1.selectSingleNode(CountNode+"/packspec").xml + "▦" // 06 Packing내역
  3970. + sNacls + "▦" // 07 종류해당유무
  3971. + sSameyn + "▦" // 08 계수일치여부
  3972. + model.getValue(CountNode + "/codenm1" ) + "▦" // 09 종류코드명1
  3973. + model.getValue(CountNode + "/codenm2" ) + "▦" // 10 종류코드명2
  3974. + model.getValue(CountNode + "/codenm3" ) + "▦" // 11 종류코드명3
  3975. + model.getValue(CountNode + "/refseq" ) + "▦" // 12 조회순서
  3976. + sRecstat + "▦" // 13 Record 상태정보 I:신규,U:수정
  3977. + sNaclsinucd + "▦" // 14 해당없음의 사유코드
  3978. + sRecNo + "▦" // 15 Sheet 번호
  3979. + discordaction + "▦" // 16 불일치사유(추가)
  3980. + discordactionetc + "▦" // 17 불일치사유기타입력(추가)
  3981. + discordactionnm + "▩"; // 16 불일치사유(추가)
  3982. //alert("막음"+discordaction + "/" + discordactionetc);
  3983. //--(20101024) 경북대
  3984. CocnCnt++;
  3985. // 확인간호사 Check
  3986. // I : 입력, U : 수정, D : 입력데이터 삭제, X : 삭제
  3987. if (sRecstat == "D") {
  3988. MnphopcoData += sOprsrvno + "▦" // 00 수술예약(의뢰)번호
  3989. + sKindcd + "▦" // 01 종류(수술기본코드분류:01참조)
  3990. + "" + "▦" // 02 차수(1:1차,2:2차,3:3차,4:END)
  3991. + "X" + "▦" // 03 1.소독간호사, 2.순회간호사
  3992. + "" + "▦" // 04 기관코드
  3993. + "" + "▦" // 05 확인간호사ID
  3994. + "" + "▦" // 06 확인간호사명
  3995. + "" + "▦" // 07 부서코드
  3996. + "" + "▦" // 08 부서명
  3997. + "" + "▦" // 09 일치여부
  3998. + "0" + "▦" // 10 PAD개수
  3999. + "D" + "▦" // 11 Record 상태정보 I:신규,U:수정
  4000. + sRecNo + "▩"; // 12 Sheet 번호
  4001. } else if(sRecstat == "I" || sRecstat == "U") {
  4002. for (var i=0; i < Nursnm.length; i++){
  4003. //---------(20110512)
  4004. //간호사 end 숨김
  4005. if (Nursid[i] == "nursid41" || Nursid[i] == "nursid42" ) {
  4006. sNursid = "-"; // 확인간호사ID
  4007. sNursnm = "-"; // 확인간호사명
  4008. sDeptcd = "-"; // 부서코드
  4009. sDeptnm = "-"; // 부서명
  4010. sCheckid = "-"; // 확인간호사ID Check
  4011. } else {
  4012. sNursid = model.getValue(CountNode + "/" + Nursid[i] ); // 확인간호사ID
  4013. sNursnm = model.getValue(CountNode + "/" + Nursnm[i] ); // 확인간호사명
  4014. sDeptcd = model.getValue(CountNode + "/" + Deptcd[i] ); // 부서코드
  4015. sDeptnm = model.getValue(CountNode + "/" + Deptnm[i] ); // 부서명
  4016. sCheckid = model.getValue(CountNode + "/" + Checkid[i]); // 확인간호사ID Check
  4017. }
  4018. //alert(i+"/"+sNursid+"/"+CountNode + "/" + Nursid[i]);
  4019. //---------(20110512)
  4020. if (sNursid != sCheckid) {
  4021. if (sNursid == "" ) {
  4022. OpcoStat = "D";
  4023. sNursid = sCheckid;
  4024. } else if (sCheckid == "" ) {
  4025. OpcoStat = "I";
  4026. } else {
  4027. OpcoStat = "U";
  4028. }
  4029. MnphopcoData += sOprsrvno + "▦" // 00 수술예약(의뢰)번호
  4030. + sKindcd + "▦" // 01 종류(수술기본코드분류:01참조)
  4031. + Dgrs[i] + "▦" // 02 차수(1:1차,2:2차,3:3차,4:END)
  4032. + Flas[i] + "▦" // 03 1.소독간호사, 2.순회간호사
  4033. + sInstCd + "▦" // 04 기관코드
  4034. + sNursid + "▦" // 05 확인간호사ID
  4035. + sNursnm + "▦" // 06 확인간호사명
  4036. + sDeptcd + "▦" // 07 부서코드
  4037. + sDeptnm + "▦" // 08 부서명
  4038. + sSameyn + "▦" // 09 일치여부
  4039. + sTotQty + "▦" // 10 PAD개수
  4040. + OpcoStat + "▦" // 11 Record 상태정보 I:신규,U:수정
  4041. + sRecNo + "▩"; // 12 Sheet 번호
  4042. OpcoCnt++;
  4043. }
  4044. if (sNacls != "Y") {
  4045. if (sNursid == "") {
  4046. //if ((pFlag == "C") && (model.getValue(xPathData+"/oprsrvno") == model.getValue(xPathData+"/mainoprsrvno")) || (model.getValue(xPathData+"/mainoprsrvno") == "-")) {
  4047. // 2009-02-19 ycd 임시저장시 Count List 확인자 입력 체크 제외(협진 체크는 제외)
  4048. if( model.getValue("/root/main/MnphopcrData/MnphopcrList/opnoyn") != "Y" ) {
  4049. if (pFlag == "C") {
  4050. //alert(model.getValue(CountNode + "/codenm3")+"의 확인자을 입력하십시요 !!" );
  4051. messageBox("Count List 확인자를 입력하십시오!" , "I000");
  4052. return false;
  4053. }
  4054. }
  4055. }
  4056. }
  4057. } // for (var i=0; i < Nursnm.length; i++){
  4058. }
  4059. } // if (sCheck == "Y") {
  4060. //} // for (n = 1; n <= nIdx; n++) {
  4061. model.makeValue("/root/send/MnphcocnList",MnphcocnData);
  4062. model.makeValue("/root/send/MnphopcoList",MnphopcoData);
  4063. // if (submit("TXMNP00302")){ // 수술기록2 Count정보 저장
  4064. // messageBox("자료 저장이", "I002");
  4065. // }
  4066. }
  4067. /* ------------------------------------------------- */
  4068. /* EMR.MNPHCOCN 수술기록의 계수정보 TITLE */
  4069. /* -------------------------------------------------- */
  4070. function fMnphcocnTitle(){
  4071. //---------(20101024) 경북대
  4072. // var TitData = "oprsrvno" + "▦" // 00 수술예약(의뢰)번호 CHAR
  4073. // + "kindcd" + "▦" // 01 종류코드 CHAR
  4074. // + "instcd" + "▦" // 02 기관코드 CHAR
  4075. // + "initqty" + "▦" // 03 최초수량 INT
  4076. // + "addqty" + "▦" // 04 추가수량 INT
  4077. // + "packqty" + "▦" // 05 Packing수량 INT
  4078. // + "packspec" + "▦" // 06 Packing내역 XML
  4079. // + "nacls" + "▦" // 07 종류해당유무 CHAR
  4080. // + "sameyn" + "▦" // 08 계수일치여부 CHAR
  4081. // + "kindnm1" + "▦" // 09 종류코드명1 VCHAR
  4082. // + "kindnm2" + "▦" // 10 종류코드명2 VCHAR
  4083. // + "kindnm3" + "▦" // 11 종류코드명3 VCHAR
  4084. // + "refseq" + "▦" // 12 조회순서 INT
  4085. // + "recstat" + "▦" // 13 Record 상태정보 I:신규,U:수정
  4086. // + "naclsinucd" + "▦" // 14 해양유무사유코드
  4087. // + "recno" + "▩"; // 15 기록번호
  4088. var TitData = "oprsrvno" + "▦" // 00 수술예약(의뢰)번호 CHAR
  4089. + "kindcd" + "▦" // 01 종류코드 CHAR
  4090. + "instcd" + "▦" // 02 기관코드 CHAR
  4091. + "initqty" + "▦" // 03 최초수량 INT
  4092. + "addqty" + "▦" // 04 추가수량 INT
  4093. + "packqty" + "▦" // 05 Packing수량 INT
  4094. + "packspec" + "▦" // 06 Packing내역 XML
  4095. + "nacls" + "▦" // 07 종류해당유무 CHAR
  4096. + "sameyn" + "▦" // 08 계수일치여부 CHAR
  4097. + "kindnm1" + "▦" // 09 종류코드명1 VCHAR
  4098. + "kindnm2" + "▦" // 10 종류코드명2 VCHAR
  4099. + "kindnm3" + "▦" // 11 종류코드명3 VCHAR
  4100. + "refseq" + "▦" // 12 조회순서 INT
  4101. + "recstat" + "▦" // 13 Record 상태정보 I:신규,U:수정
  4102. + "naclsinucd" + "▦" // 14 해양유무사유코드
  4103. + "recno" + "▦" // 15 기록번호
  4104. + "discordaction" + "▦" // 16 불일치사유(추가)
  4105. + "discordactionetc" + "▦" // 17 불일치사유기타입력(추가)
  4106. + "discordactionnm" + "▩"; // 16 불일치사유(추가)
  4107. //---------(20101024) 경북대
  4108. return TitData;
  4109. }
  4110. /* ------------------------------------------------- */
  4111. /* EMR.MNPHOPCO 수술기록_계수확인 간호사 정보 TITLE */
  4112. /* -------------------------------------------------- */
  4113. function fMnphopcoTitle(){
  4114. var TitData = "oprsrvno" + "▦" // 00 수술예약(의뢰)번호 CHAR
  4115. + "kindcd" + "▦" // 01 종류(수술기본코드분류:01참조) CHAR
  4116. + "dgrs" + "▦" // 02 차수(1:1차,2:2차,3:3차,4:END) INT
  4117. + "nursflag" + "▦" // 03 1.소독간호사, 2.순회간호사 CHAR
  4118. + "instcd" + "▦" // 04 기관코드 CHAR
  4119. + "cnfmnursid" + "▦" // 05 확인간호사ID CHAR
  4120. + "cnfmnursnm" + "▦" // 06 확인간호사명 VCHAR
  4121. + "deptcd" + "▦" // 07 부서코드 CHAR
  4122. + "deptnm" + "▦" // 08 부서명 VCHAR
  4123. + "sameyn" + "▦" // 09 일치여부 CHAR
  4124. + "padcnt" + "▦" // 10 PAD개수 INT
  4125. + "recstat" + "▦" // 11 Record 상태정보 I:신규,U:수정
  4126. + "recno" + "▩"; // 12 기록번호
  4127. return TitData;
  4128. }
  4129. /* ------------------------------------------------- */
  4130. /* desc : Instance NodeCopy 하기 */
  4131. /* param : pModel - Model */
  4132. /* tNode - Target Node */
  4133. /* sNode - Source Node */
  4134. /* return : */
  4135. /* -------------------------------------------------- */
  4136. function InstanceNodeCopy(pModel, tNode, sNode) {
  4137. pModel.copyNode(tNode, sNode );
  4138. }
  4139. /* ------------------------------------------------- */
  4140. /* desc : Instance NodeCopy 하기 */
  4141. /* param : pModel - Model */
  4142. /* tNode - Target Node */
  4143. /* sNode - Source Node */
  4144. /* return : */
  4145. /* -------------------------------------------------- */
  4146. function XmlDataCheck() {
  4147. var tNode = "";
  4148. var sNode = "";
  4149. var pNode = "";
  4150. for (var i=0; i < XmlInstNm.length; i++){
  4151. tNode = xPathData + "/" + XmlInstNm[i];
  4152. pNode = instance1.selectSingleNode(tNode);
  4153. if (pNode != null) {
  4154. if (pNode.childNodes.length < 1) {
  4155. sNode = xPathFormat + "/" + XmlInstNm[i];
  4156. InstanceNodeCopy(model, tNode, sNode);
  4157. }
  4158. }
  4159. }
  4160. return;
  4161. }
  4162. /* ------------------------------------------------- */
  4163. /* desc : 수술참가자 조합하기 */
  4164. /* param : pModel - Model */
  4165. /* tNode - Target Node */
  4166. /* sNode - Source Node */
  4167. /* return : */
  4168. /* -------------------------------------------------- */
  4169. function fOpeuDataConcatenate(){
  4170. //2008-08-07 오후 9:57:34 taebum valid check add
  4171. var sOpeu1Cnt = getNodesetCnt(model, "/root/init/workinst/OpeuLists/opeulist1");
  4172. var sTmpUid = "";
  4173. var sTmpUid2 = "";
  4174. var sTmp2Uid = "";
  4175. var sTmp2Uid2 = "";
  4176. var sTmp3Uid = "";
  4177. var sTmp3Uid2 = "";
  4178. if(sOpeu1Cnt > 0){
  4179. for(var i = 1; i < sOpeu1Cnt; i++){
  4180. if(sOpeu1Cnt > 1){
  4181. sTmpUid = model.getValue("/root/init/workinst/OpeuLists/opeulist1["+i+"]/entrid1");
  4182. sTmp2Uid = model.getValue("/root/init/workinst/OpeuLists/opeulist1["+i+"]/entrid2");
  4183. sTmp3Uid = model.getValue("/root/init/workinst/OpeuLists/opeulist1["+i+"]/entrid3");
  4184. for(var j = i+1 ; j <= sOpeu1Cnt; j++){
  4185. sTmpUid2 = model.getValue("/root/init/workinst/OpeuLists/opeulist1["+j+"]/entrid1");
  4186. sTmp2Uid2 = model.getValue("/root/init/workinst/OpeuLists/opeulist1["+j+"]/entrid2");
  4187. sTmp3Uid2 = model.getValue("/root/init/workinst/OpeuLists/opeulist1["+j+"]/entrid3");
  4188. if(sTmpUid != "" && sTmpUid == sTmpUid2){
  4189. messageBox("동일한 집도의 정보가 존재합니다. 확인하십시오.","I000");
  4190. return false;
  4191. }
  4192. if(sTmp2Uid != "" && sTmp2Uid == sTmp2Uid2){
  4193. messageBox("동일한 Assist 정보가 존재합니다. 확인하십시오.","I000");
  4194. return false;
  4195. }
  4196. if(sTmp3Uid != "" && sTmp3Uid == sTmp3Uid2){
  4197. messageBox("동일한 마취의 정보가 존재합니다. 확인하십시오.","I000");
  4198. return false;
  4199. }
  4200. }
  4201. }
  4202. }
  4203. }
  4204. //2008-08-07 오후 11:55:53 taebum valid check add
  4205. var sOpeu2Cnt = getNodesetCnt(model, "/root/init/workinst/OpeuLists/opeulist2");
  4206. sTmpUid = "";
  4207. sTmpUid2 = "";
  4208. sTmp2Uid = "";
  4209. sTmp2Uid2 = "";
  4210. sTmp3Uid = "";
  4211. sTmp3Uid2 = "";
  4212. if(sOpeu2Cnt > 0){
  4213. for(var i = 1; i < sOpeu2Cnt; i++){
  4214. if(sOpeu2Cnt > 1){
  4215. sTmpUid = model.getValue("/root/init/workinst/OpeuLists/opeulist2["+i+"]/entrid1");
  4216. sTmp2Uid = model.getValue("/root/init/workinst/OpeuLists/opeulist2["+i+"]/entrid2");
  4217. sTmp3Uid = model.getValue("/root/init/workinst/OpeuLists/opeulist2["+i+"]/entrid3");
  4218. if(i+1 < sOpeu2Cnt){
  4219. sTmpUid2 = model.getValue("/root/init/workinst/OpeuLists/opeulist2["+(i+1)+"]/entrid1");
  4220. sTmp2Uid2 = model.getValue("/root/init/workinst/OpeuLists/opeulist2["+(i+1)+"]/entrid2");
  4221. sTmp3Uid2 = model.getValue("/root/init/workinst/OpeuLists/opeulist2["+(i+1)+"]/entrid3");
  4222. if(sTmpUid != "" && sTmpUid == sTmpUid2){
  4223. messageBox("동일한 소독간호사 정보가 연속 존재합니다. 확인하십시오.","I000");
  4224. return false;
  4225. }
  4226. if(sTmp2Uid != "" && sTmp2Uid == sTmp2Uid2){
  4227. messageBox("동일한 순환간호사 정보가 연속 존재합니다. 확인하십시오.","I000");
  4228. return false;
  4229. }
  4230. if(sTmp3Uid != "" && sTmp3Uid == sTmp3Uid2){
  4231. messageBox("동일한 마취간호사 정보가 연속 존재합니다. 확인하십시오.","I000");
  4232. return false;
  4233. }
  4234. }
  4235. /*
  4236. for(var j = i+1 ; j <= sOpeu2Cnt; j++){
  4237. sTmpUid2 = model.getValue("/root/init/workinst/OpeuLists/opeulist2["+j+"]/entrid1");
  4238. sTmp2Uid2 = model.getValue("/root/init/workinst/OpeuLists/opeulist2["+j+"]/entrid2");
  4239. sTmp3Uid2 = model.getValue("/root/init/workinst/OpeuLists/opeulist2["+j+"]/entrid3");
  4240. if(sTmpUid != "" && sTmpUid == sTmpUid2){
  4241. messageBox("동일한 소독간호사 정보가 존재합니다. 확인하십시오.","I000");
  4242. return false;
  4243. }
  4244. if(sTmp2Uid != "" && sTmp2Uid == sTmp2Uid2){
  4245. messageBox("동일한 순환간호사 정보가 존재합니다. 확인하십시오.","I000");
  4246. return false;
  4247. }
  4248. if(sTmp3Uid != "" && sTmp3Uid == sTmp3Uid2){
  4249. messageBox("동일한 마취간호사 정보가 존재합니다. 확인하십시오.","I000");
  4250. return false;
  4251. }
  4252. }
  4253. */
  4254. }
  4255. }
  4256. }
  4257. var ii = 1;
  4258. var rValue = "";
  4259. var sPatoutroomdt = model.getValue(xPathDispDT+"/patoutroomdd"); // 15 환자퇴실일자
  4260. if (sPatoutroomdt == "" ) {
  4261. sPatoutroomdt = getCurrentDate();
  4262. }
  4263. var sOutTime = model.getValue(xPathDispDT+"/patoutroomhh");
  4264. if (sOutTime == "" ) {
  4265. sOutTime = getCurrentTime().substr(0,6);
  4266. }
  4267. sOutTime = sOutTime.getRightPad(6,"0");
  4268. sPatoutroomdt += sOutTime; // 15 환자퇴실시간
  4269. sOutTime = sPatoutroomdt.substr(0,4) + "-"
  4270. + sPatoutroomdt.substr(4,2) + "-"
  4271. + sPatoutroomdt.substr(6,2) + " "
  4272. + sPatoutroomdt.substr(8,2) + ":"
  4273. + sPatoutroomdt.substr(10,2) + ":"
  4274. + sPatoutroomdt.substr(12,2) ;
  4275. // alert(sOutTime);
  4276. var sMnphopeuData = "pid" + "▦" // 01 환자번호
  4277. + "oprsrvno" + "▦" // 02 수술예약(의뢰)번호 (년도 + 일련번호)
  4278. + "ophistno" + "▦" // 03 예약번호에 따른 이력번호
  4279. + "entridflag" + "▦" // 04 참가자 ID구분
  4280. + "entrid" + "▦" // 05 참가자ID
  4281. + "entrdt" + "▦" // 06 참가시간
  4282. + "entrnm" + "▦" // 07 참가자명
  4283. + "deptcd" + "▦" // 08 부서코드
  4284. + "deptnm" + "▦" // 09 부서명
  4285. + "refseq" + "▦" // 10 조회순서
  4286. + "outdt" + "▦" // 11 퇴실일시
  4287. + "instcd" + "▦" // 12 기관코드
  4288. + "fstrgstrid" + "▦" // 13 최초등록자ID
  4289. + "lastupdtid" + "▦" // 14 최종수정자
  4290. + "entrtm" + "▩"; // 15 입실시간
  4291. sPid = model.getValue("/root/init/HideData/pid" );
  4292. sOprsrvno = model.getValue("/root/init/HideData/oprsrvno");
  4293. sOphistno = model.getValue("/root/init/HideData/ophistno");
  4294. var sOpeuKey = sPid + "▦" // 환자번호
  4295. + sOprsrvno + "▦" // 수술예약(의뢰)번호 (년도 + 일련번호)
  4296. + sOphistno + "▦" ; // 예약번호에 따른 이력번호
  4297. var sOpeuLast = model.getValue(xPathData+"/instcd")+ "▦" // 기관코드
  4298. + "" + "▦" // 최초등록자ID(시스템정보)
  4299. + "" + "" ; // 최종수정자(시스템정보)
  4300. var iPath = "";
  4301. var sEntrnmData = "entrnm1 entrnm2 entrnm3";
  4302. var sEntridData = "entrid1 entrid2 entrid3";
  4303. var sDeptcdData = "deptcd1 deptcd2 deptcd3";
  4304. var sDeptnmData = "deptnm1 deptnm2 deptnm3";
  4305. var sEntrTmData = "entrtm1 entrtm2 entrtm3";
  4306. var sEntrnm = sEntrnmData.split(" ");
  4307. var sEntrid = sEntridData.split(" ");
  4308. var sDeptcd = sDeptcdData.split(" ");
  4309. var sDeptnm = sDeptnmData.split(" ");
  4310. var sEntrtm = sEntrTmData.split(" ");
  4311. // D1: 집도의, D4: 보조의, D3: 마취의, N1: 소독간호사, N2: 순회간호사, N3: 마취간호사
  4312. var OpeuFlags = "D1*D4*D3#N1*N2*N3";
  4313. var OpeuFlag = OpeuFlags.split("#");
  4314. for (var k=1; k < 3; k++){ // 1: grd_opeu1, 2:grd_opeu2
  4315. wPath = (k == 1) ? OpeuGrid1 : OpeuGrid2;
  4316. var oFlag = OpeuFlag[k-1].split("*");
  4317. for (var j=0; j < sEntrid.length; j++){
  4318. for (var i=1; i < 6; i++){ // Grid Row5
  4319. iPath = wPath + "["+i+"]/";
  4320. if ((model.getValue(iPath+sEntrnm[j]) != "") &&
  4321. (model.getValue(iPath+sEntrid[j]) == "") ) {
  4322. //alert(" , iPath : "+iPath + " , data : "+ iPath+sEntrnm[j]+" , "+ iPath+sEntrid[j] + ", j, : "+ j+ ", sEntrid[j] :"+sEntrid[j]);
  4323. messageBox("수술 참가자를 다시","C001");
  4324. return false;
  4325. }
  4326. //
  4327. if (model.getValue(iPath+sEntrid[j]) != "") {
  4328. rValue += sOpeuKey;
  4329. rValue += oFlag[j] + "▦" // 04 참가자 ID구분
  4330. rValue += model.getValue(iPath+sEntrid[j] ) + "▦" // 05 참가자ID
  4331. rValue += "12" + "▦" // 06 참가시간
  4332. rValue += model.getValue(iPath+sEntrnm[j] ) + "▦" // 07 참가자명
  4333. rValue += model.getValue(iPath+sDeptcd[j] ) + "▦" // 08 부서코드
  4334. rValue += model.getValue(iPath+sDeptnm[j] ) + "▦" // 09 부서명
  4335. rValue += ii + "▦" // 10 조회순서
  4336. rValue += sOutTime + "▦" // 11 퇴실일시
  4337. rValue += sOpeuLast + "▦" // 12
  4338. rValue += model.getValue(iPath+sEntrtm[j] ) + "▩"; // 15 입실시간정보
  4339. ii++;
  4340. }
  4341. }
  4342. }
  4343. }
  4344. sMnphopeuData += rValue;
  4345. model.makeValue("/root/send/MnphopeuList",sMnphopeuData);
  4346. }
  4347. /* ------------------------------------------------- */
  4348. /* desc : 수술참가자 보여주기 */
  4349. /* param : pModel - Model */
  4350. /* tNode - Target Node */
  4351. /* sNode - Source Node */
  4352. /* return : */
  4353. /* -------------------------------------------------- */
  4354. function fOpeuDataDisplay(){
  4355. var ii = 1;
  4356. var jj = 1;
  4357. var kk = 1;
  4358. var c = 0;
  4359. var c1 = 0;
  4360. var c2 = 0;
  4361. var c3 = 0;
  4362. var c4 = 0;
  4363. var c5 = 0;
  4364. var c6 = 0;
  4365. var sNode = "";
  4366. var OpeuList = model.getValue(xPathData+"/opeudata");
  4367. // if (OpeuList == "") {
  4368. // OpeuList = "D1▦D11234▦200705152222▦집도의▦000001▦집도의부서▦1▦2007-05-15 22:22▩" ;
  4369. // OpeuList += "D2▦D21234▦200705152222▦전공의▦000002▦전공의부서▦2▦2007-05-15 22:22▩" ;
  4370. // OpeuList += "D3▦D31234▦200705152222▦마취의▦000003▦마취의부서▦3▦2007-05-15 22:22▩" ;
  4371. // OpeuList += "D4▦D41234▦200705152222▦보조의▦000004▦보조의부서▦4▦2007-05-15 22:22▩" ;
  4372. // OpeuList += "N1▦N11234▦200705152222▦소독간호사▦000005▦소독간부서▦5▦2007-05-15 22:22▩" ;
  4373. // OpeuList += "N2▦N21234▦200705152222▦순회간호사▦000006▦순회간부서▦6▦2007-05-15 22:22▩" ;
  4374. // OpeuList += "N3▦N31234▦200705152222▦마취간호사▦000007▦마취간부서▦7▦2007-05-15 22:22▩" ;
  4375. // OpeuList += "N4▦N41234▦200705152222▦보조간호사▦000008▦보조간부서▦8▦2007-05-15 22:22" ;
  4376. // }
  4377. // OpeuList += "D1▦D11234▦200705152222▦집도의▦000001▦집도의부서▦1▦2007-05-15 22:22▩" ;
  4378. // OpeuList += "D2▦D21234▦200705152222▦전공의▦000002▦전공의부서▦2▦2007-05-15 22:22▩" ;
  4379. // OpeuList += "D3▦D31234▦200705152222▦마취의▦000003▦마취의부서▦3▦2007-05-15 22:22▩" ;
  4380. // OpeuList += "D4▦D41234▦200705152222▦보조의▦000004▦보조의부서▦4▦2007-05-15 22:22▩" ;
  4381. // OpeuList += "N1▦N11234▦200705152222▦소독간호사▦000005▦소독간부서▦5▦2007-05-15 22:22▩" ;
  4382. // OpeuList += "N2▦N21234▦200705152222▦순회간호사▦000006▦순회간부서▦6▦2007-05-15 22:22▩" ;
  4383. // OpeuList += "N3▦N31234▦200705152222▦마취간호사▦000007▦마취간부서▦7▦2007-05-15 22:22▩" ;
  4384. // OpeuList += "N4▦N41234▦200705152222▦보조간호사▦000008▦보조간부서▦8▦2007-05-15 22:22" ;
  4385. //
  4386. // OpeuList += "D1▦98030869▦12 ▦김병로▦77200 ▦외래식당 ▦1▦20070730171724000▩" ;
  4387. // OpeuList += "D3▦39087 ▦12 ▦김병국▦11300 ▦이비인후과 ▦3▦20070730171724000▩" ;
  4388. // OpeuList += "D4▦92010036▦12 ▦어용성▦73411 ▦원무행정Unit ▦2▦20070730171724000▩" ;
  4389. // OpeuList += "N1▦95010019▦12 ▦이훈구▦77200 ▦정보지원팀 ▦4▦20070730171724000▩" ;
  4390. // OpeuList += "N2▦84030289▦12 ▦최영숙▦30786 ▦외래Unit ▦5▦20070730171724000▩" ;
  4391. // OpeuList += "N3▦94030533▦12 ▦박현숙▦50131 ▦간호행정교육팀▦6▦20070730171724000▩" ;
  4392. var OpeuDataRec = OpeuList.split("▩");
  4393. // 기존자료 삭제
  4394. // model.removeNodeset(OpeuPathR);
  4395. model.removenode(OpeuPathR);
  4396. model.makeNode(OpeuPathR);
  4397. var wOpeuGrid = "";
  4398. for (var i=0; i < OpeuDataRec.length; i++){
  4399. var OpeuData = OpeuDataRec[i].split("▦");
  4400. for (var j=0; j < OpeuColumn.length; j++){
  4401. model.setValue(OpeuPathD+"/"+OpeuColumn[j], OpeuData[j]);
  4402. }
  4403. model.duplicate(OpeuPathR, OpeuPathD);
  4404. r = 0;
  4405. c = 0;
  4406. switch(OpeuData[0]){
  4407. case "D1" : // 집도의
  4408. c1++;
  4409. r = c1;
  4410. c = 1 ;
  4411. wOpeuGrid = OpeuGrid1;
  4412. break;
  4413. case "D2" : // 전공의
  4414. c2++;
  4415. r = c2;
  4416. c = 2 ;
  4417. wOpeuGrid = OpeuGrid1;
  4418. break;
  4419. case "D3" : // 마취의
  4420. c3++;
  4421. r = c3;
  4422. c = 3 ;
  4423. wOpeuGrid = OpeuGrid1;
  4424. break;
  4425. case "D4" : // 보조의(Assist)
  4426. c2++;
  4427. r = c2;
  4428. c = 2 ;
  4429. wOpeuGrid = OpeuGrid1;
  4430. break;
  4431. case "N1" : // 소독간호사
  4432. c4++;
  4433. r = c4;
  4434. c = 1 ;
  4435. wOpeuGrid = OpeuGrid2;
  4436. break;
  4437. case "N2" : // 순회간호사
  4438. c5++;
  4439. r = c5;
  4440. c = 2 ;
  4441. wOpeuGrid = OpeuGrid2;
  4442. break;
  4443. case "N3" : // 마취간호사
  4444. c6++;
  4445. r = c6;
  4446. c = 3 ;
  4447. wOpeuGrid = OpeuGrid2;
  4448. }
  4449. if (r > 0 && r < 6) {
  4450. if (c > 0 && c < 4) {
  4451. if( OpeuData[0] == "D1" && ( model.getValue(xPathData+"/oprsrvno") != model.getValue(xPathData+"/mainoprsrvno") ) ){
  4452. }else{
  4453. if( OpeuData[0] == "D1" || OpeuData[0] == "D3" || OpeuData[0] == "N1" || OpeuData[0] == "N2"|| OpeuData[0] == "N3" ){
  4454. model.setValue(wOpeuGrid+"["+r+"]/entrid"+c+"tmp", OpeuData[1].replace(/(^\s*)|(\s*$)/g, ""));
  4455. }
  4456. model.setValue(wOpeuGrid+"["+r+"]/entrid"+c, OpeuData[1].replace(/(^\s*)|(\s*$)/g, ""));
  4457. model.setValue(wOpeuGrid+"["+r+"]/entrnm"+c, OpeuData[3].replace(/(^\s*)|(\s*$)/g, ""));
  4458. model.setValue(wOpeuGrid+"["+r+"]/deptcd"+c, OpeuData[4].replace(/(^\s*)|(\s*$)/g, ""));
  4459. model.setValue(wOpeuGrid+"["+r+"]/deptnm"+c, OpeuData[5].replace(/(^\s*)|(\s*$)/g, ""));
  4460. model.setValue(wOpeuGrid+"["+r+"]/entrtm"+c, OpeuData[8].replace(/(^\s*)|(\s*$)/g, ""));
  4461. }
  4462. }
  4463. }
  4464. }
  4465. if( model.getValue(xPathData+"/perfdrid" ) != "" && model.getValue(OpeuGrid1+"["+1+"]/entrid1")== "" ){
  4466. model.setValue(OpeuGrid1+"["+1+"]/entrid1tmp" , model.getValue(xPathData+"/perfdrid" ));
  4467. model.setValue(OpeuGrid1+"["+1+"]/entrid1" , model.getValue(xPathData+"/perfdrid" ));
  4468. model.setValue(OpeuGrid1+"["+1+"]/entrnm1" , model.getValue(xPathData+"/perfdridnm" ));
  4469. model.setValue(OpeuGrid1+"["+1+"]/deptcd1" , model.getValue(xPathData+"/perfdeptcd" ));
  4470. model.setValue(OpeuGrid1+"["+1+"]/deptnm1" , model.getValue(xPathData+"/depthngnm" ));
  4471. if(model.getValue(OpeuGrid1+"["+1+"]/entrtm1") == ""){
  4472. model.setValue(OpeuGrid1+"["+1+"]/entrtm1" , inp_perfidarvhh.value );
  4473. }else{
  4474. model.setValue(OpeuGrid1+"["+1+"]/entrtm1" , model.getValue(xPathData+"/entrtm1" ));
  4475. }
  4476. }
  4477. }
  4478. /**
  4479. * @group :
  4480. * @ver : 2007.03.16
  4481. * @by : 최학록
  4482. * @---------------------------------------------------
  4483. * @type : function
  4484. * @access : public
  4485. * @desc : 화면 초기화
  4486. * @param :
  4487. * @return :
  4488. * @---------------------------------------------------
  4489. */
  4490. function fInit(){
  4491. var Cnt = 6;
  4492. var ItemCode = "ITM013";
  4493. if (checkOpener()) {
  4494. ItemCode = model.getValue("/root/init/hidden/refinfo/ItemCode");
  4495. }
  4496. grd_StatList2.colWidth(1) = 32 ;
  4497. grd_StatList2.colWidth(2) = 272;
  4498. grd_StatList2.colWidth(3) = 0 ;
  4499. grd_StatList2.attribute("visibility") = "hidden";
  4500. // txt_ItemOther.disabled = false;
  4501. txt_ItemOther.attribute("visibility") = "visible";
  4502. if (ItemCode == "ITM008") { // 알러지여부
  4503. Cnt = 1;
  4504. } else if (ItemCode == "ITM009") { // 수술전 검사
  4505. Cnt = 2;
  4506. txt_ItemOther.attribute("visibility") = "hidden";
  4507. grd_StatList2.attribute("visibility") = "visible";
  4508. } else if (ItemCode == "ITM012") { //수술부위 피부준비
  4509. Cnt = 3;
  4510. txt_ItemOther.attribute("visibility") = "hidden";
  4511. grd_StatList2.attribute("visibility") = "visible";
  4512. } else if (ItemCode == "ITM013") { // 수술전투약
  4513. Cnt = 4;
  4514. } else if (ItemCode == "ITM017") { // 전염성 질환
  4515. Cnt = 5;
  4516. } else if (ItemCode == "ITM018") { // 혈액준비사항
  4517. Cnt = 6;
  4518. grd_StatList2.colWidth(2) = 136;
  4519. grd_StatList2.colWidth(3) = 136;
  4520. txt_ItemOther.attribute("visibility") = "hidden";
  4521. grd_StatList2.attribute("visibility") = "visible";
  4522. }
  4523. model.copyNode(xPathItem , xPathItemTemp+"["+Cnt+"]"); // 환자 수술전 처치 및 간호상태 확인 사항
  4524. grp_biz.refresh();
  4525. }
  4526. /**
  4527. * @group :
  4528. * @ver : 2007.03.16
  4529. * @by : 최학록
  4530. * @---------------------------------------------------
  4531. * @type : function
  4532. * @access : public
  4533. * @desc : 항목 보내기
  4534. * @param :
  4535. * @return :
  4536. * @---------------------------------------------------
  4537. */
  4538. function fSendItem(){
  4539. var Itempath = "";
  4540. var SendData = "";
  4541. var sRowCnt = grd_StatList2.rows - grd_StatList2.fixedrows;
  4542. var iRow = 0;
  4543. for (var i=1; i<= sRowCnt; i++){
  4544. if (model.getValue(xPathItemList+"["+i+"]/ItmCheck") == "true"){
  4545. iRow++;
  4546. if (iRow > 1) {
  4547. SendData += ",";
  4548. }
  4549. SendData += model.getValue(xPathItemList+"["+i+"]/ItmName1");
  4550. }
  4551. }
  4552. if (model.getValue(xPathItem+"/ItemOther") != ""){
  4553. SendData += ",";
  4554. SendData += model.getValue(xPathItem+"/ItemOther");
  4555. }
  4556. opener.javascript.setParameter("SendData", SendData);
  4557. // model.makeValue("/root/init/hidden/refinfo/ItemInfo",SendData);
  4558. //
  4559. // if (checkOpener()){
  4560. // model.copyNode(opener.root.HideData.recinfo, root.hidden.refinfo);
  4561. // } else{
  4562. // alert("상위화면이 변경되어 데이터를 전달할 수 없습니다.");
  4563. // }
  4564. // alert(SendData);
  4565. model.close();
  4566. }
  4567. /**
  4568. * @group :
  4569. * @ver : 2007.03.16
  4570. * @by : 최학록
  4571. * @---------------------------------------------------
  4572. * @type : function
  4573. * @access : public
  4574. * @desc : 조회
  4575. * @param :
  4576. * @return :
  4577. * @---------------------------------------------------
  4578. */
  4579. function fSearch(){
  4580. var sTerm = model.getValue(xRefPath+"/terminfo");
  4581. model.removenode("/root/send");
  4582. model.makeValue("/root/send/attrcnts",model.getValue(xRefPath+"/terminfo"));
  4583. submit("TRMNR01501");
  4584. }
  4585. var GroupPathData = "/root/main/MnphopcrData/MnphopcrList/esuspec/esu" + "*" // 0
  4586. + "/root/main/MnphopcrData/MnphopcrList/tourniquetspec/tourniquet" + "*" // 1
  4587. + "/root/main/MnphopcrData/MnphopcrList/warmcoldregmspec/warmcoldregm/urinary" + "*" // 2
  4588. + "/root/main/MnphopcrData/MnphopcrList/warmcoldregmspec/warmcoldregm/ltube" + "*" // 3
  4589. + "/root/main/MnphopcrData/MnphopcrList/warmcoldregmspec/warmcoldregm/subclavian" + "*" // 4
  4590. + "/root/main/MnphopcrData/MnphopcrList/postureskinupdtspec/postureskinupdt/skinpartafter" + "*" // 5
  4591. + "/root/main/MnphopcrData/MnphopcrList/postureskinupdtspec/postureskinupdt/skinpartbefore" // 6
  4592. var GroupPath = GroupPathData.split("*");
  4593. /* ------------------------------------------------- */
  4594. /* desc : 선택 NODE 하위의 내용을 CLEAR한다. */
  4595. /* return : */
  4596. /* -------------------------------------------------- */
  4597. function fClearGroup(pGroup, pIDX){
  4598. fClearChildNode(GroupPath[pIDX]);
  4599. pGroup.refresh();
  4600. }
  4601. /* ------------------------------------------------- */
  4602. /* desc : 선택 NODE 하위의 내용을 CLEAR한다. */
  4603. /* return : */
  4604. /* -------------------------------------------------- */
  4605. function fClearChildNode(pNode){
  4606. xNode = instance1.selectSingleNode(pNode);
  4607. if (xNode == null) return;
  4608. nLen = xNode.childNodes.length;
  4609. for (var i=0;i<nLen; i++){
  4610. xNode.childNodes(i).text = '';
  4611. }
  4612. }
  4613. /* ------------------------------------------------- */
  4614. /* desc : CheckBox의 값 Check */
  4615. /* param : pCheckData : Check Box의 값 */
  4616. /* pComp : 비교대상 값 */
  4617. /* return : true, false */
  4618. /* -------------------------------------------------- */
  4619. function fCheckBoxValueCheck(pCheckData, pComp){
  4620. return getData2ArrayCheck(pCheckData, " ", pComp);
  4621. }
  4622. /* ------------------------------------------------- */
  4623. /* group : EMR 간호 */
  4624. /* ver : 2007.05.03 */
  4625. /* by : 최학록 */
  4626. /* --------------------------------------------------*/
  4627. /* type : function */
  4628. /* access : public */
  4629. /* desc : GRID 한줄 추가 */
  4630. /* param : pGridNm : DataGrid Name */
  4631. /* pLine : DataGrid Row */
  4632. /* return : */
  4633. /* --------------------------------------------------*/
  4634. function fAddItem(pGridNm,pLine){
  4635. if (pLine == '') {
  4636. pGridNm.addItem();
  4637. }
  4638. else {
  4639. pGridNm.addItem(pLine, "after");
  4640. }
  4641. }
  4642. /* --------------------------------------------------*/
  4643. /* type : function */
  4644. /* access : public */
  4645. /* desc : GRID 한줄 삭제 */
  4646. /* param : pGridNm : DataGrid Name */
  4647. /* pLine : DataGrid Row */
  4648. /* return : */
  4649. /* --------------------------------------------------*/
  4650. function fDeleteItem(pGridNm,pLine){
  4651. if (pLine == '') {
  4652. pGridNm.removeItem();
  4653. }
  4654. else {
  4655. pGridNm.deleteItem(pLine);
  4656. }
  4657. }
  4658. //참여자 정보 Local Data 찾기
  4659. function fFindNurseData(pRow, pCol){
  4660. var iRowCnt = 0;
  4661. var sSuSulNurXpath = "/root/init/HideData/timeOutAddInfo/opnurlist";
  4662. var sAnstNurXpath = "/root/init/HideData/timeOutAddInfo/anstnurlist";
  4663. var sSearchXpath = "";
  4664. var sUsernm = grd_opeu2.valueMatrix(pRow, pCol);
  4665. var sUserid = "";
  4666. var sTempUsernm = "";
  4667. var sTempDeptcd = "";
  4668. var sTempDeptnm = "";
  4669. var iSameCnt = 0;
  4670. if(pCol == 2 || pCol == 4){
  4671. sSearchXpath = sSuSulNurXpath;
  4672. }else if(pCol == 6){
  4673. sSearchXpath = sAnstNurXpath;
  4674. }
  4675. var wCol = pCol / 2; "deptcd"+wCol, "deptnm"+wCol
  4676. iRowCnt = getNodesetCnt(model, sSearchXpath);
  4677. for(var i= 1; i<= iRowCnt; i++){
  4678. sTempUsernm = model.getValue(sSearchXpath+"["+i+"]/usernm");
  4679. if(sUsernm == sTempUsernm){
  4680. sUsernm = sTempUsernm;
  4681. sUserid = model.getValue(sSearchXpath+"["+i+"]/userid");
  4682. sTempDeptcd = model.getValue(sSearchXpath+"["+i+"]/posdeptcd");
  4683. sTempDeptnm = model.getValue(sSearchXpath+"["+i+"]/posdeptnm");
  4684. iSameCnt++;
  4685. }
  4686. }
  4687. if(iSameCnt == 1){
  4688. grd_opeu2.valueMatrix(pRow, pCol) = sUsernm;
  4689. grd_opeu2.valueMatrix(pRow, pCol-1) = sUserid;
  4690. model.setValue("/root/init/workinst/OpeuLists/opeulist2["+pRow+"]/deptcd"+wCol, sTempDeptcd);
  4691. model.setValue("/root/init/workinst/OpeuLists/opeulist2["+pRow+"]/deptnm"+wCol, sTempDeptnm);
  4692. grd_opeu2.refresh();
  4693. return true;
  4694. }
  4695. return false;
  4696. }
  4697. //========================================
  4698. // 사용자 정보, 부서정보 copy
  4699. // 2008-08-07 오후 9:29:00 taebum
  4700. //========================================
  4701. function fMakeUserInfo(pCls, pRow, pCol){
  4702. var sTmpUsernm = "";
  4703. var sTmpDeptnm = "";
  4704. var sTmpDeptcd = "";
  4705. var sTmpUserid = "";
  4706. if(pCls == "1"){ // Doct info
  4707. sTmpUserid = grd_opeu1.valueMatrix(pRow, pCol);
  4708. sTmpUsernm = grd_opeu1.labelMatrix(pRow, pCol);
  4709. if(sTmpUsernm == " "){
  4710. sTmpUsernm = "";
  4711. }
  4712. if(pCol == grd_opeu1.colRef("entrid1") || pCol == grd_opeu1.colRef("entrid3")){
  4713. if(pCol == grd_opeu1.colRef("entrid1")){
  4714. sTmpDeptcd = model.getValue("/root/init/HideData/timeOutAddInfo/opstaffdoctlist[userid='"+sTmpUserid+"']/posdeptcd");
  4715. sTmpDeptnm = model.getValue("/root/init/HideData/timeOutAddInfo/opstaffdoctlist[userid='"+sTmpUserid+"']/posdeptnm");
  4716. }else{
  4717. sTmpDeptcd = model.getValue("/root/init/HideData/timeOutAddInfo/anstdoclist[userid='"+sTmpUserid+"']/posdeptcd");
  4718. sTmpDeptnm = model.getValue("/root/init/HideData/timeOutAddInfo/anstdoclist[userid='"+sTmpUserid+"']/posdeptnm");
  4719. }
  4720. if(pCol == grd_opeu1.colRef("entrid1")){
  4721. model.setValue("/root/init/workinst/OpeuLists/opeulist1["+pRow+"]/entrid1tmp", sTmpUserid);
  4722. model.setValue("/root/init/workinst/OpeuLists/opeulist1["+pRow+"]/entrnm1", sTmpUsernm);
  4723. model.setValue("/root/init/workinst/OpeuLists/opeulist1["+pRow+"]/deptcd1", sTmpDeptcd);
  4724. model.setValue("/root/init/workinst/OpeuLists/opeulist1["+pRow+"]/deptnm1", sTmpDeptnm);
  4725. }else{
  4726. //if(sTmpDeptcd != "" && sTmpDeptnm != ""){
  4727. model.setValue("/root/init/workinst/OpeuLists/opeulist1["+pRow+"]/entrid3tmp", sTmpUserid);
  4728. model.setValue("/root/init/workinst/OpeuLists/opeulist1["+pRow+"]/entrnm3", sTmpUsernm);
  4729. model.setValue("/root/init/workinst/OpeuLists/opeulist1["+pRow+"]/deptcd3", sTmpDeptcd);
  4730. model.setValue("/root/init/workinst/OpeuLists/opeulist1["+pRow+"]/deptnm3", sTmpDeptnm);
  4731. //}
  4732. }
  4733. grd_opeu1.refresh();
  4734. }
  4735. }else if(pCls == "2"){ // nurse info
  4736. sTmpUserid = grd_opeu2.valueMatrix(pRow, pCol);
  4737. sTmpUsernm = grd_opeu2.labelMatrix(pRow, pCol);
  4738. if(sTmpUsernm == " "){
  4739. sTmpUsernm = "";
  4740. }
  4741. if(pCol == grd_opeu2.colRef("entrid1") || pCol == grd_opeu2.colRef("entrid2") || pCol == grd_opeu2.colRef("entrid3")){
  4742. if(pCol == grd_opeu2.colRef("entrid1") || pCol == grd_opeu2.colRef("entrid2")){
  4743. sTmpDeptcd = model.getValue("/root/init/HideData/timeOutAddInfo/opnurlist[userid='"+sTmpUserid+"']/posdeptcd");
  4744. sTmpDeptnm = model.getValue("/root/init/HideData/timeOutAddInfo/opnurlist[userid='"+sTmpUserid+"']/posdeptnm");
  4745. }else if(pCol == grd_opeu2.colRef("entrid3")){
  4746. sTmpDeptcd = model.getValue("/root/init/HideData/timeOutAddInfo/anstnurlist[userid='"+sTmpUserid+"']/posdeptcd");
  4747. sTmpDeptnm = model.getValue("/root/init/HideData/timeOutAddInfo/anstnurlist[userid='"+sTmpUserid+"']/posdeptnm");
  4748. }
  4749. //if(sTmpDeptcd != "" && sTmpDeptnm != ""){
  4750. if(pCol == grd_opeu2.colRef("entrid1")){
  4751. model.setValue("/root/init/workinst/OpeuLists/opeulist2["+pRow+"]/entrid1tmp", sTmpUserid);
  4752. model.setValue("/root/init/workinst/OpeuLists/opeulist2["+pRow+"]/entrnm1", sTmpUsernm);
  4753. model.setValue("/root/init/workinst/OpeuLists/opeulist2["+pRow+"]/deptcd1", sTmpDeptcd);
  4754. model.setValue("/root/init/workinst/OpeuLists/opeulist2["+pRow+"]/deptnm1", sTmpDeptnm);
  4755. }else if(pCol == grd_opeu2.colRef("entrid2")){
  4756. model.setValue("/root/init/workinst/OpeuLists/opeulist2["+pRow+"]/entrid2tmp", sTmpUserid);
  4757. model.setValue("/root/init/workinst/OpeuLists/opeulist2["+pRow+"]/entrnm2", sTmpUsernm);
  4758. model.setValue("/root/init/workinst/OpeuLists/opeulist2["+pRow+"]/deptcd2", sTmpDeptcd);
  4759. model.setValue("/root/init/workinst/OpeuLists/opeulist2["+pRow+"]/deptnm2", sTmpDeptnm);
  4760. }else if(pCol == grd_opeu2.colRef("entrid3")){
  4761. model.setValue("/root/init/workinst/OpeuLists/opeulist2["+pRow+"]/entrid3tmp", sTmpUserid);
  4762. model.setValue("/root/init/workinst/OpeuLists/opeulist2["+pRow+"]/entrnm3", sTmpUsernm);
  4763. model.setValue("/root/init/workinst/OpeuLists/opeulist2["+pRow+"]/deptcd3", sTmpDeptcd);
  4764. model.setValue("/root/init/workinst/OpeuLists/opeulist2["+pRow+"]/deptnm3", sTmpDeptnm);
  4765. }
  4766. grd_opeu2.refresh();
  4767. //}
  4768. }
  4769. // 2009-02-12 ycd 검체 취급자 정보 선택 변경 input -> combo
  4770. //}else if(pCls == "3" && pCol == grd_spclist.colRef("chargerid")){
  4771. // 2009-02-19 ycd 'chargerid' 필드가 두개여서 필드값 세팅
  4772. }else if(pCls == "3" && pCol == 4){
  4773. sTmpUserid = grd_spclist.valueMatrix(pRow, pCol);
  4774. sTmpUsernm = grd_spclist.labelMatrix(pRow, pCol);
  4775. if(sTmpUsernm == ""){
  4776. sTmpUsernm = "";
  4777. }
  4778. model.setValue("/root/main/SheetData3/SpecimenLists/specimenlist["+pRow+"]/chargerid", sTmpUserid);
  4779. model.setValue("/root/main/SheetData3/SpecimenLists/specimenlist["+pRow+"]/chargernm", sTmpUsernm);
  4780. model.setValue("/root/main/SheetData3/SpecimenLists/specimenlist["+pRow+"]/oprsrvno" , model.getValue("/root/main/operation/list/oprsrvno"));
  4781. grd_spclist.refresh();
  4782. //---------------(20101015) 경북대
  4783. //검체정보에 보낸곳추가
  4784. }else if(pCls == "3" && pCol == grd_spclist.colRef("deviposi")){
  4785. sTmpUserid = grd_spclist.valueMatrix(pRow, pCol);
  4786. sTmpUsernm = grd_spclist.labelMatrix(pRow, pCol);
  4787. if(sTmpUsernm == ""){
  4788. sTmpUsernm = "";
  4789. }
  4790. model.setValue("/root/main/SheetData3/SpecimenLists/specimenlist["+pRow+"]/deviposinm", sTmpUsernm);
  4791. model.setValue("/root/main/SheetData3/SpecimenLists/specimenlist["+pRow+"]/oprsrvno" , model.getValue("/root/main/operation/list/oprsrvno"));
  4792. grd_spclist.refresh();
  4793. }
  4794. //---------------(20101015) 경북대
  4795. }
  4796. // --------------------------------------------------
  4797. // 참여자 정보가져오기
  4798. // 2008-08-07 오후 11:17:06 Grid Button 및 input을 combo 로 변경 작업 taebum
  4799. // --------------------------------------------------
  4800. function fOpeuSelect(pCls, pRow, pCol){
  4801. if(pCls == "1" &&(pCol == "2" || pCol == "9")){
  4802. fMakeUserInfo(pCls, pRow, pCol);
  4803. return;
  4804. }else if(pCls == "2"){
  4805. fMakeUserInfo(pCls, pRow, pCol);
  4806. return;
  4807. }else if(pCls == "3"){
  4808. fMakeUserInfo(pCls, pRow, pCol);
  4809. return;
  4810. }
  4811. //2008-08-07 오후 11:12:08 pCls == "2"는 로직을 타지 않음.
  4812. /*
  4813. //참여 간호사 정보 입력시 3자리 Full Name 입력하였을 경우
  4814. if(pCls == "2"){
  4815. if(fFindNurseData(pRow, pCol)){
  4816. return;
  4817. }
  4818. }
  4819. */
  4820. var sData = "011*" // 0 집도의
  4821. + "011*" // 1 Assist
  4822. + "012*" // 2 마취의
  4823. + "015*" // 3 소독간호사
  4824. + "015*" // 4 순회간호사
  4825. + "017" ; // 5 마취간호사
  4826. var tNode = sData.split("*");
  4827. var rPath = (pCls == "1") ? OpeuGrid1 + "["+ pRow + "]/" : OpeuGrid2 + "["+ pRow + "]/"
  4828. var wCol = Math.round(pCol / 3); //2008-09-04 오후 9:58:24 taebum 컬럼 추가로 2로 나누는것을 2.5로 변경
  4829. var rOpeu = model.getValue(rPath+"entrnm"+ wCol).replace(/(^\s*)|(\s*$)/g, "");
  4830. model.setValue(rPath+"entrid"+wCol, "");
  4831. model.setValue(rPath+"deptcd"+wCol, "");
  4832. model.setValue(rPath+"deptnm"+wCol, "");
  4833. var sOpeuGrid = eval("grd_opeu"+pCls); // grd_opeu1,2
  4834. if (rOpeu == "") {
  4835. sOpeuGrid.cellStyle("color", pRow, pCol, pRow, pCol) = "";
  4836. sOpeuGrid.refresh();
  4837. return;
  4838. }
  4839. var wNode = (pCls == "1") ? tNode[wCol-1] : tNode[wCol+2];
  4840. var sSearchdd = model.getValue("/root/main/operation/list/opcnfmdd");
  4841. //2008-07-25 오후 1:53:13 특정일자에 근무했던 정보를 가져오도록 수정
  4842. fUserEnter(rPath,"entrid"+wCol, "entrnm"+wCol ,"deptcd"+wCol, "deptnm"+wCol, rOpeu, sOpeuGrid, "all", wNode, sSearchdd);
  4843. //2008-06-23 오후 5:24:58 taebum 정보가 없을 경우에는 빈칸으로 들어가서 edit 모드로 변경함.
  4844. if (model.getValue(rPath+"entrid"+wCol) =="") {
  4845. //sOpeuGrid.cellStyle("color", pRow, pCol, pRow, pCol) = "#D22D2D";
  4846. sOpeuGrid.valueMatrix(pRow, pCol) = "";
  4847. sOpeuGrid.refresh();
  4848. sOpeuGrid.editCell();
  4849. } else {
  4850. sOpeuGrid.cellStyle("color", pRow, pCol, pRow, pCol) = "";
  4851. }
  4852. }
  4853. // --------------------------------------------------
  4854. // Counter 정보가져오기
  4855. // --------------------------------------------------
  4856. function fCountSelect(pRow, pCol){
  4857. if (pRow < 2) {
  4858. return;
  4859. }
  4860. var rPath = CountPath + "["+ (pRow - 1) + "]"
  4861. if (pCol > grd_count.colRef("packqty") && pCol < grd_count.colRef("samey") ) { // Counter 사원 Check
  4862. sCol = pCol - grd_count.colRef("nursnm11");
  4863. sData = "nursnm11 nursnm12 nursnm21 nursnm22 nursnm31 nursnm32 nursnm41 nursnm42 "
  4864. + "nursid11 nursid12 nursid21 nursid22 nursid31 nursid32 nursid41 nursid42 "
  4865. + "deptcd11 deptcd12 deptcd21 deptcd22 deptcd31 deptcd32 deptcd41 deptcd42 "
  4866. + "deptnm11 deptnm12 deptnm21 deptnm22 deptnm31 deptnm32 deptnm41 deptnm42 ";
  4867. sColumn = sData.split(" ");
  4868. var nursnm = "/" + sColumn[sCol];
  4869. var nursid = "/" + sColumn[sCol+(8*1)];
  4870. var deptcd = "/" + sColumn[sCol+(8*2)];
  4871. var deptnm = "/" + sColumn[sCol+(8*3)];
  4872. model.setValue(rPath+nursid, "");
  4873. model.setValue(rPath+deptcd, "");
  4874. model.setValue(rPath+deptnm, "");
  4875. var rName = model.getValue(rPath+nursnm);
  4876. if (rName == "") {
  4877. grd_count.cellStyle("color", pRow, pCol, pRow, pCol) = "";
  4878. return;
  4879. }
  4880. //2008-07-27 오후 2:04:30 taebum 수술확정일자 기준의 사용자 정보를 조회하도록 수정
  4881. var sSearchdd = model.getValue("/root/main/operation/list/opcnfmdd");
  4882. fUserEnter(rPath, nursid , nursnm, deptcd, deptnm, rName, grd_count, "userid", "015", sSearchdd);
  4883. if (model.getValue(rPath+nursid) =="") {
  4884. grd_count.valueMatrix(pRow, pCol) = "";
  4885. //2009-02-12 ycd 사용자 입력 빨간색 대신 입력값이 사라지도록 처리
  4886. //grd_count.cellStyle("color", pRow, pCol, pRow, pCol) = "#D22D2D";
  4887. //} else {
  4888. //grd_count.cellStyle("color", pRow, pCol, pRow, pCol) = "";
  4889. }
  4890. }
  4891. else if (pCol > grd_count.colRef("nacls") && pCol < grd_count.colRef("totqty")) { //수량 Check
  4892. if (pRow == 2) {
  4893. model.setValue(rPath + "/addqty" , "");
  4894. model.setValue(rPath + "/initqty", "");
  4895. model.setValue(rPath + "/totqty" , "");
  4896. } else {
  4897. tCnt = 0
  4898. aCnt = model.getValue(rPath + "/addqty");
  4899. iCnt = model.getValue(rPath + "/initqty");
  4900. // 2009-02-05 ycd 수량 count 합계 처리 부분 제어문 추가
  4901. if(aCnt != "" || iCnt != ""){
  4902. iCnt = (iCnt == "" ) ? "0" : iCnt;
  4903. aCnt = (aCnt == "" ) ? "0" : aCnt;
  4904. tCnt = parseInt(iCnt)+ parseInt(aCnt);
  4905. //model.setValue(rPath + "/totqty", tCnt);
  4906. grd_count.valueMatrix(pRow, grd_count.colRef("totqty")) = tCnt;
  4907. //grd_count.refresh();
  4908. }else if(aCnt == "" && iCnt == ""){
  4909. grd_count.valueMatrix(pRow, grd_count.colRef("totqty")) = "";
  4910. }else{
  4911. return;
  4912. }
  4913. }
  4914. }
  4915. }
  4916. // --------------------------------------------------
  4917. // Packing화면 Visible 처리하는 함수
  4918. // --------------------------------------------------
  4919. function fPackingVisible(pCol, pRow, pYpos) {
  4920. if (pCol != grd_count.colRef("packqty") || grd_count.valueMatrix(pRow, grd_count.colRef("kindcd")) == "00") {
  4921. fPackingHidden("C");
  4922. return;
  4923. }
  4924. // Mouse Max 675
  4925. var PackInit = "/root/init/XmlFormat";
  4926. var OpcoPath = CountPath + "["+ (grd_count.row-1) + "]"
  4927. opt_packrow.text = grd_count.row - 1;
  4928. opt_kindnm.text = model.getValue(OpcoPath+"/codenm3");
  4929. opt_packtot.text = model.getValue(OpcoPath+"/packqty");
  4930. var sNode = instance1.selectSingleNode(OpcoPath+"/packspec");
  4931. var nIdx = sNode.childNodes.length;
  4932. if (nIdx > 0) {
  4933. model.copyNode(PackInit+"/PackLists", OpcoPath+"/packspec");
  4934. for(var i = 1 ; i <= getNodesetCount(PackInit+"/PackLists") ; i++){
  4935. if(model.getValue(PackInit+"/PackLists/packlist["+i+"]/packcnt") == "" ||
  4936. model.getValue(PackInit+"/PackLists/packlist["+i+"]/packcnt") == "0" ){
  4937. model.setValue(PackInit+"/PackLists/packlist["+i+"]/lt" , "" );
  4938. model.setValue(PackInit+"/PackLists/packlist["+i+"]/center" , "" );
  4939. model.setValue(PackInit+"/PackLists/packlist["+i+"]/rt" , "" );
  4940. model.setValue(PackInit+"/PackLists/packlist["+i+"]/packcnt" , "" );
  4941. }
  4942. }
  4943. } else {
  4944. model.copyNode(PackInit+"/PackLists", PackInit+"/PackInit");
  4945. //
  4946. }
  4947. // fPackingTotal();
  4948. var yPos = pYpos;
  4949. if (yPos > 395) {
  4950. yPos = pYpos - 300;
  4951. }
  4952. if (yPos > 426) {
  4953. yPos = 426;
  4954. }
  4955. grp_packing.refresh();
  4956. //output1.text = pYpos;
  4957. //output2.text = yPos ;
  4958. //output2.text = "85" ;
  4959. // grp_packing.attribute("left") = "635px";
  4960. // grp_packing.attribute("top" ) = yPos+"px"; // "85px";
  4961. grp_packing.attribute("top" ) = "85px"; // "85px";
  4962. grp_packing.attribute("visibility") ="visible";
  4963. }
  4964. // --------------------------------------------------
  4965. // Packing화면 Hidden 처리하는 함수
  4966. // --------------------------------------------------
  4967. function fPackingHidden(pProc) {
  4968. grp_packing.attribute("visibility") ="hidden";
  4969. if (pProc == "C") {
  4970. return;
  4971. }
  4972. fPackingTotal();
  4973. var OpcoPath = CountPath+"["+ opt_packrow.text +"]";
  4974. model.setValue(OpcoPath+"/packqty", opt_packtot.text);
  4975. model.copyNode(OpcoPath+"/packspec", "/root/init/XmlFormat/PackLists");
  4976. grd_count.refresh();
  4977. //grp_packing.attribute("left") = "635px";
  4978. //grp_packing.attribute("top" ) = "85px";
  4979. }
  4980. // 2009-02-07 ycd 부위별 입력 조건 변경으로 인하여 Lt, Center, Rt 입력 수치에 대한 합계 정보를 구함
  4981. function fPackingPartEdit(pRow, pCol){
  4982. //if(grd_opeuinfo1.valueMatrix(pRow, pCol) == "") {
  4983. // return;
  4984. //}
  4985. var sPackCnt = 0;
  4986. if(grd_opeuinfo1.valueMatrix(pRow, grd_opeuinfo1.colRef("lt")) != ""){
  4987. sPackCnt += parseInt(grd_opeuinfo1.valueMatrix(pRow, grd_opeuinfo1.colRef("lt")));
  4988. }
  4989. if(grd_opeuinfo1.valueMatrix(pRow, grd_opeuinfo1.colRef("center")) != ""){
  4990. sPackCnt += parseInt(grd_opeuinfo1.valueMatrix(pRow, grd_opeuinfo1.colRef("center")));
  4991. }
  4992. if(grd_opeuinfo1.valueMatrix(pRow, grd_opeuinfo1.colRef("rt")) != ""){
  4993. sPackCnt += parseInt(grd_opeuinfo1.valueMatrix(pRow, grd_opeuinfo1.colRef("rt")));
  4994. }
  4995. //합계 입력
  4996. if(sPackCnt == 0 ){
  4997. grd_opeuinfo1.valueMatrix(pRow, grd_opeuinfo1.colRef("packcnt")) = "";
  4998. }else{
  4999. grd_opeuinfo1.valueMatrix(pRow, grd_opeuinfo1.colRef("packcnt")) = sPackCnt;
  5000. }
  5001. }
  5002. // Packing수량 합계 구하기
  5003. function fPackingTotal(){
  5004. var pTot = 0;
  5005. var pCnt = "";
  5006. var PackNode = "/root/init/XmlFormat/PackLists";
  5007. var sNode = instance1.selectSingleNode(PackNode);
  5008. if (sNode == null) return;
  5009. var nIdx = sNode.childNodes.length;
  5010. PackNode = PackNode+"/packlist";
  5011. for (n = 1; n <= nIdx; n++) {
  5012. pCnt = model.getValue(PackNode + "["+ n + "]/packcnt");
  5013. pCnt = (pCnt == "" ) ? "0" : pCnt;
  5014. pTot += parseInt(pCnt);
  5015. } // -- End Of for (n = 1; n <= nIdx; n++) --
  5016. opt_packtot.text = pTot;
  5017. }
  5018. // Packing Grid Merge False
  5019. function fPackingMergeFalse(){
  5020. for(var i = grd_count.colRef("nacls") ; i <= grd_count.cols ; i++){
  5021. grd_count.mergeCol(i) = false;
  5022. }
  5023. /*
  5024. grd_count.mergeCol(03) = false;
  5025. grd_count.mergeCol(04) = false;
  5026. grd_count.mergeCol(05) = false;
  5027. grd_count.mergeCol(06) = false;
  5028. grd_count.mergeCol(07) = false;
  5029. grd_count.mergeCol(08) = false;
  5030. grd_count.mergeCol(09) = false;
  5031. grd_count.mergeCol(10) = false;
  5032. grd_count.mergeCol(11) = false;
  5033. grd_count.mergeCol(12) = false;
  5034. grd_count.mergeCol(13) = false;
  5035. grd_count.mergeCol(14) = false;
  5036. grd_count.mergeCol(15) = false;
  5037. grd_count.mergeCol(16) = false;
  5038. grd_count.mergeCol(17) = false;
  5039. */
  5040. }
  5041. // Packing Data Clear
  5042. function fPackingDataClear(pRow){
  5043. var OpcoPath = CountPath+"["+ (pRow-1) +"]";
  5044. //fCountDataClear(pRow);
  5045. fReadOnlyFlag(grd_count, pRow, pRow, grd_count.colRef("initqty"), grd_count.colRef("samen"), true);
  5046. }
  5047. // Grid의 ReadOnly Set
  5048. function fReadOnlyFlag(pGrid, pStrRow, pEndRow, pStrCol, pEndCol, pBool){
  5049. // alert("fReadOnlyFlag("+pGrid+", "+pStrRow+", "+ pEndRow+", "+pStrCol+", "+ pEndCol+", "+ pBool);
  5050. pGrid.isReadOnly(pStrRow, pStrCol, pEndRow, pEndCol)= pBool;
  5051. if (pBool == true) {
  5052. for (var Idx=pStrRow; Idx<= pEndRow; Idx++){
  5053. fCountDataClear(Idx);
  5054. }
  5055. }
  5056. }
  5057. // Count Data Clear
  5058. function fCountDataClear(pRow){
  5059. var OpcoPath = CountPath+"["+ (pRow-1) +"]";
  5060. if ((pRow-1) == 1) { // Instrument
  5061. model.setValue(OpcoPath + "/initqty" , "" ); // 04
  5062. model.setValue(OpcoPath + "/addqty" , "" ); // 05
  5063. model.setValue(OpcoPath + "/totqty" , "" ); // 06
  5064. model.setValue(OpcoPath + "/packqty" , "" ); // 07
  5065. grd_count.cellStyle("background-color", pRow, 03, pRow, 07) = "#DCDACS";
  5066. } else {
  5067. model.setValue(OpcoPath + "/initqty" , "" ); // 04
  5068. model.setValue(OpcoPath + "/addqty" , "" ); // 05
  5069. model.setValue(OpcoPath + "/totqty" , "" ); // 06
  5070. model.setValue(OpcoPath + "/packqty" , "" ); // 07
  5071. }
  5072. model.setValue(OpcoPath + "/nursnm11", "" ); // 08
  5073. model.setValue(OpcoPath + "/nursnm12", "" ); // 09
  5074. model.setValue(OpcoPath + "/nursnm21", "" ); // 10
  5075. model.setValue(OpcoPath + "/nursnm22", "" ); // 11
  5076. model.setValue(OpcoPath + "/nursnm31", "" ); // 12
  5077. model.setValue(OpcoPath + "/nursnm32", "" ); // 13
  5078. model.setValue(OpcoPath + "/nursnm41", "" ); // 14
  5079. model.setValue(OpcoPath + "/nursnm42", "" ); // 15
  5080. model.setValue(OpcoPath + "/samey" , "false"); // 16
  5081. model.setValue(OpcoPath + "/samen" , "true" ); // 17
  5082. model.setValue(OpcoPath + "/nursid11", "");
  5083. model.setValue(OpcoPath + "/nursid12", "");
  5084. model.setValue(OpcoPath + "/nursid21", "");
  5085. model.setValue(OpcoPath + "/nursid22", "");
  5086. model.setValue(OpcoPath + "/nursid31", "");
  5087. model.setValue(OpcoPath + "/nursid32", "");
  5088. model.setValue(OpcoPath + "/nursid41", "");
  5089. model.setValue(OpcoPath + "/nursid42", "");
  5090. model.setValue(OpcoPath + "/deptcd11", "");
  5091. model.setValue(OpcoPath + "/deptcd12", "");
  5092. model.setValue(OpcoPath + "/deptcd21", "");
  5093. model.setValue(OpcoPath + "/deptcd22", "");
  5094. model.setValue(OpcoPath + "/deptcd31", "");
  5095. model.setValue(OpcoPath + "/deptcd32", "");
  5096. model.setValue(OpcoPath + "/deptcd41", "");
  5097. model.setValue(OpcoPath + "/deptcd42", "");
  5098. model.setValue(OpcoPath + "/deptnm11", "");
  5099. model.setValue(OpcoPath + "/deptnm12", "");
  5100. model.setValue(OpcoPath + "/deptnm21", "");
  5101. model.setValue(OpcoPath + "/deptnm22", "");
  5102. model.setValue(OpcoPath + "/deptnm31", "");
  5103. model.setValue(OpcoPath + "/deptnm32", "");
  5104. model.setValue(OpcoPath + "/deptnm41", "");
  5105. model.setValue(OpcoPath + "/deptnm42", "");
  5106. var nIdx = 0;
  5107. var sNode = instance1.selectSingleNode(OpcoPath + "/packspec");
  5108. if (sNode != null) {
  5109. nIdx = sNode.childNodes.length;
  5110. }
  5111. PackNode = OpcoPath + "/packspec/packlist";
  5112. for (n = 1; n <= nIdx; n++) {
  5113. model.setValue(PackNode + "["+ n + "]/packchk", "false");
  5114. model.setValue(PackNode + "["+ n + "]/packcnt", "" );
  5115. model.setValue(PackNode + "["+ n + "]/lt" , "" ); // 07
  5116. model.setValue(PackNode + "["+ n + "]/center" , "" ); // 07
  5117. model.setValue(PackNode + "["+ n + "]/rt" , "" ); // 07
  5118. } // -- End Of for (n = 1; n <= nIdx; n++) --
  5119. }
  5120. // Grid의 CountOnClick Set
  5121. function fCountOnClick(pGrid, pRow, pCol){
  5122. if (pCol == grd_count.colRef("nacls")) {
  5123. if (pRow < 2) {
  5124. if (pGrid.fixedcellischeck(0, grd_count.colRef("nacls")) == true) {
  5125. fReadOnlyFlag(pGrid, 3, pRow - 1, grd_count.colRef("initqty"), grd_count.colRef("samen"), true);
  5126. pGrid.fixedcellcheckbox(1,grd_count.colRef("samey")) = false;
  5127. pGrid.fixedcellcheckbox(1,grd_count.colRef("samen")) = false;
  5128. } else {
  5129. fReadOnlyFlag(pGrid, 3, pRow - 1, grd_count.colRef("initqty"), grd_count.colRef("samen"), false);
  5130. pGrid.fixedcellcheckbox(1,grd_count.colRef("samey")) = true;
  5131. pGrid.fixedcellcheckbox(1,grd_count.colRef("samen")) = true;
  5132. }
  5133. } else {
  5134. if (pGrid.valueMatrix(pRow, pGrid.colRef("nacls")) == 'true') {
  5135. fPackingDataClear(pRow);
  5136. pGrid.isReadOnly(pRow, grd_count.colRef("initqty"), pRow, grd_count.colRef("samen")) = true;
  5137. pGrid.isReadOnly(pRow, pGrid.colRef("naclsinucd"), pRow, pGrid.colRef("naclsinucd")) = false;
  5138. } else {
  5139. pGrid.isReadOnly(pRow, grd_count.colRef("initqty"), pRow, grd_count.colRef("samen")) = false;
  5140. pGrid.isReadOnly(pRow, grd_count.colRef("naclsinucd"), pRow, grd_count.colRef("naclsinucd")) = true;
  5141. model.setValue(CountPath+"["+ (pRow-1) +"]" + "/naclsinucd" , "-" ); // 사유란 초기화
  5142. model.setValue(CountPath+"["+ (pRow-1) +"]" + "/samey" , "true" ); // 16
  5143. model.setValue(CountPath+"["+ (pRow-1) +"]" + "/samen" , "false" ); // 17
  5144. }
  5145. }
  5146. pGrid.valueMatrix(2, pGrid.colRef("nacls")) = 'false';
  5147. pGrid.isReadOnly(2, pGrid.colRef("nacls"), 2, pGrid.colRef("totqty"))= true;
  5148. } else if( pCol == grd_count.colRef("samey")) {
  5149. // 2009-02-10 ycd 오류 처리 계수여부 2개 동시 선택 되던 문제를 위해 func 분리시 삭제 처리
  5150. /*
  5151. if (pGrid.valueMatrix(pGrid.row, grd_count.colRef("nacls")) == 'false') {
  5152. fPackingVisible(pGrid.col, event.targetY);
  5153. }else{
  5154. fPackingHidden("C");
  5155. }
  5156. */
  5157. if(grd_count.valueMatrix(pRow, grd_count.colRef("samey")) == 'true'){
  5158. if(pRow == 2 && model.getValue(xPathData+"/oprsrvno") != model.getValue(xPathData+"/mainoprsrvno") && model.getValue(xPathData+"/mainoprsrvno") != "-" ){
  5159. fReadOnlyFlag(pGrid, pRow, pRow, grd_count.colRef("nursnm11"), grd_count.colRef("nursnm42"), false);
  5160. pGrid.valueMatrix(pRow, grd_count.colRef("nacls")) = 'false';
  5161. pGrid.valueMatrix(pRow, grd_count.colRef("naclsinucd")) = "-";
  5162. }
  5163. grd_count.valueMatrix(pRow, grd_count.colRef("samen")) = 'false';
  5164. }else{
  5165. if(pRow == 2 && model.getValue(xPathData+"/oprsrvno") != model.getValue(xPathData+"/mainoprsrvno") && model.getValue(xPathData+"/mainoprsrvno") != "-" ){
  5166. fReadOnlyFlag(pGrid, pRow, pRow, grd_count.colRef("nursnm11"), grd_count.colRef("nursnm42"), true);
  5167. pGrid.valueMatrix(pRow, grd_count.colRef("nacls")) = 'true';
  5168. pGrid.valueMatrix(pRow, grd_count.colRef("naclsinucd")) = "9";
  5169. }
  5170. grd_count.valueMatrix(pRow, grd_count.colRef("samen")) = 'true';
  5171. }
  5172. } else if( pCol == grd_count.colRef("samen")) {
  5173. if(grd_count.valueMatrix(pRow, grd_count.colRef("samen")) == 'true'){
  5174. if(pRow == 2 && model.getValue(xPathData+"/oprsrvno") != model.getValue(xPathData+"/mainoprsrvno") && model.getValue(xPathData+"/mainoprsrvno") != "-" ){
  5175. fReadOnlyFlag(pGrid, pRow, pRow, grd_count.colRef("nursnm11"), grd_count.colRef("nursnm42"), true);
  5176. pGrid.valueMatrix(pRow, grd_count.colRef("nacls")) = 'true';
  5177. pGrid.valueMatrix(pRow, grd_count.colRef("naclsinucd")) = "9";
  5178. }
  5179. grd_count.valueMatrix(pRow, grd_count.colRef("samey")) = 'false';
  5180. }else{
  5181. if(pRow == 2 && model.getValue(xPathData+"/oprsrvno") != model.getValue(xPathData+"/mainoprsrvno") && model.getValue(xPathData+"/mainoprsrvno") != "-" ){
  5182. fReadOnlyFlag(pGrid, pRow, pRow, grd_count.colRef("nursnm11"), grd_count.colRef("nursnm42"), false);
  5183. pGrid.valueMatrix(pRow, grd_count.colRef("nacls")) = 'false';
  5184. pGrid.valueMatrix(pRow, grd_count.colRef("naclsinucd")) = "-";
  5185. }
  5186. grd_count.valueMatrix(pRow, grd_count.colRef("samey")) = 'true';
  5187. }
  5188. }
  5189. //---------(20101024) 경북대
  5190. if( pCol == grd_count.colRef("discordaction")) {
  5191. var stemp = pGrid.labelMatrix(pRow, grd_count.colRef("discordaction"));
  5192. model.setValue(CountPath+"["+ (pRow-1) +"]" + "/discordactionnm" , stemp);
  5193. }
  5194. //---------(20101024) 경북대
  5195. }
  5196. // Grid의 CountOnClick Set 2009-02-10 ycd 변경요청에 의해 Packing 더블 클릭시 부위별 Packing 정보 입력창 활성화/비활성화 처리
  5197. function fCountOndblclickClick(pGrid, pRow, pCol){
  5198. if(pGrid.valueMatrix(pRow, pGrid.colRef("recflag")) == "-" ){
  5199. fClickCountListPopUpBtn(pRow);
  5200. }else{
  5201. if(pCol == pGrid.colRef("packqty")){
  5202. if (pGrid.valueMatrix(pRow, grd_count.colRef("nacls")) == 'false' && ( pGrid.valueMatrix(pRow, grd_count.colRef("recflag")) == "I" || pGrid.valueMatrix(pRow, grd_count.colRef("recflag")) == "U")) {
  5203. fPackingVisible(pCol, pRow, event.targetY);
  5204. }else{
  5205. fPackingHidden("C");
  5206. }
  5207. }
  5208. }
  5209. }
  5210. // --------------------------------------------------
  5211. // 수술체위 추가
  5212. // --------------------------------------------------
  5213. function fOppostureInsertRow(){
  5214. //2009-02-13 체위 추가시 자동 세팅 처리
  5215. var sOppostureLastRow = getNodesetCount(xPathData +"/opposturespec/opposture/opposturelist");
  5216. if ( sOppostureLastRow == 0 ){
  5217. model.duplicate(xPathData +"/opposturespec/opposture", xPathFormat+"/opposturespec/opposture/opposturelist");
  5218. sOppostureLastRow = getNodesetCount(xPathData +"/opposturespec/opposture/opposturelist");
  5219. model.setValue(xPathData +"/opposturespec/opposture/opposturelist["+sOppostureLastRow+"]/opposturefrdt", inp_opfromdd.value);
  5220. model.setValue(xPathData +"/opposturespec/opposture/opposturelist["+sOppostureLastRow+"]/opposturefrtm", inp_opfromhh.value);
  5221. } else {
  5222. if ( model.getValue(xPathData +"/opposturespec/opposture/opposturelist["+sOppostureLastRow+"]/opposturetodt") == "" ||
  5223. model.getValue(xPathData +"/opposturespec/opposture/opposturelist["+sOppostureLastRow+"]/opposturetotm") == "" ){
  5224. messageBox("수술체위 정보 추가시 이전 체위의 종료시간을 입력하십시오.", "I000");
  5225. return;
  5226. } else {
  5227. model.duplicate(xPathData +"/opposturespec/opposture", xPathFormat+"/opposturespec/opposture/opposturelist");
  5228. sOppostureLastRow = getNodesetCount(xPathData +"/opposturespec/opposture/opposturelist");
  5229. sRtnBfOutoDate = model.getValue(xPathData +"/opposturespec/opposture/opposturelist["+(sOppostureLastRow-1)+"]/opposturetodt") + model.getvalue(xPathData +"/opposturespec/opposture/opposturelist["+(sOppostureLastRow-1)+"]/opposturetotm") + "00";
  5230. var sRtnOutoDate = getDateTime(sRtnBfOutoDate.toDate("YYYYMMDDhhmmss").getAddDate(1, "m"), 'A');
  5231. model.setValue(xPathData +"/opposturespec/opposture/opposturelist["+sOppostureLastRow+"]/opposturefrdt", sRtnOutoDate.substr(0, 8));
  5232. model.setValue(xPathData +"/opposturespec/opposture/opposturelist["+sOppostureLastRow+"]/opposturefrtm", sRtnOutoDate.substr(8, 4));
  5233. }
  5234. }
  5235. grd_opposture.refresh();
  5236. }
  5237. // --------------------------------------------------
  5238. // 수술체위 삭제
  5239. // --------------------------------------------------
  5240. function fOppostureDeleteRow(){
  5241. if (grd_opposture.row > 0) {
  5242. fDeleteItem(grd_opposture, grd_opposture.row) ;
  5243. }
  5244. }
  5245. // 수술명 조회
  5246. function fOpCodePopup(pRow, pCol) {
  5247. var xpos = event.screenX;
  5248. var ypos = event.screenY-300;
  5249. setParameter("SendData", "");
  5250. modal("SPMNP01500");
  5251. // open("SPMNP01500", 1, xpos, ypos,"SPMNP01500","/root/init/WorkData/oplist", "/root/Cond/oplist");
  5252. var iProperties = getParameter("SendData");
  5253. var iSplit_Value = iProperties.split("|");
  5254. if (iSplit_Value.length > 0) {
  5255. if (model.getValue(OpcdPath+"/opcdlist["+pRow+"]/opcd") != iSplit_Value[0]){ // CODE
  5256. model.setValue(OpcdPath+"/opcdlist["+pRow+"]/opstat" ,"수정");
  5257. }
  5258. //
  5259. model.setValue(OpcdPath+"/opcdlist["+pRow+"]/opcd" , iSplit_Value[0]); // CODE
  5260. model.setValue(OpcdPath+"/opcdlist["+pRow+"]/opcdname", iSplit_Value[1]); // NAME
  5261. //} else {
  5262. // model.setValue(OpcdPath+"/opcdlist["+pRow+"]/opstat" ,"");
  5263. }
  5264. }
  5265. // 수술기록 III 조회
  5266. function fSheetData3_Read_xxxxx(pFlag){
  5267. var sSpecimenCd = "";
  5268. if (pFlag == "all"){
  5269. model.removenodeset(xPathSheetData3+"/DrugLists/druglist");
  5270. model.removenodeset(xPathSheetData3+"/DrgeLists/drgelist");
  5271. model.removenodeset(xPathSheetData3+"/ImplantLists/implantlist");
  5272. model.removenodeset(xPathSheetData3+"/OpEqmtLists/opeqmtlist");
  5273. //model.removenodeset(xPathSheetData3+"/OrganLists/organlist");
  5274. }
  5275. model.removenode("/root/send");
  5276. model.makeValue("/root/send/pid" , model.getValue("/root/init/HideData/pid" ));
  5277. model.makeValue("/root/send/oprsrvno" , model.getValue("/root/init/HideData/oprsrvno"));
  5278. // model.makeValue("/root/send/opcnfmdd" , model.getValue(hPath+"/opcnfmdd" ));
  5279. model.makeValue("/root/send/opcnfmdd" , model.getValue(xPathData+"/opcnfmdd" ));
  5280. model.makeValue("/root/send/flag", pFlag);
  5281. if (submit("TRMNP00305")){
  5282. // 약품정보
  5283. if(getNodesetCnt(model, xPathHiddenSheetData3+"/druglist") >0 ){
  5284. model.makeNode(xPathSheetData3+"/DrugLists/druglist");
  5285. model.copyNode(xPathSheetData3+"/DrugLists/druglist" ,xPathHiddenSheetData3+"/druglist");
  5286. }
  5287. // 배액관정보
  5288. // if(model.getValue(xPathData+"/drgeuseyn") != "X" &&
  5289. if(getNodesetCnt(model, xPathHiddenSheetData3+"/drgelist") >0 ){
  5290. model.makeNode(xPathSheetData3+"/DrgeLists/drgelist");
  5291. model.copyNode(xPathSheetData3+"/DrgeLists/drgelist" ,xPathHiddenSheetData3+"/drgelist");
  5292. }
  5293. // 장비 정보
  5294. if(model.getValue(xPathData+"/eqmtuseyn") != "X" &&getNodesetCnt(model, xPathHiddenSheetData3+"/opeqmtlist") >0 ){
  5295. model.makeNode(xPathSheetData3+"/OpEqmtLists/opeqmtlist");
  5296. model.copyNode(xPathSheetData3+"/OpEqmtLists/opeqmtlist" ,xPathHiddenSheetData3+"/opeqmtlist");
  5297. }
  5298. // implant 정보
  5299. //if(model.getValue(xPathData+"/implantuseyn") != "X"
  5300. fSheetData3_Copy("/ImplantLists/implantlist", "/implantlist");
  5301. // if(getNodesetCnt(model, xPathHiddenSheetData3+"/implantlist") >0 ){
  5302. // model.makeNode(xPathSheetData3+"/ImplantLists/implantlist");
  5303. // model.copyNode(xPathSheetData3+"/ImplantLists/implantlist" ,xPathHiddenSheetData3+"/implantlist");
  5304. // }
  5305. // 검체 정보
  5306. model.copyNode(xPathSheetData3+"/SpecimenLists", xPathFormat+"/SpecimenLists");
  5307. // 20071120 Choi
  5308. if(getNodesetCnt(model, xPathHiddenSheetData3+"/specimenlist") >0 ){
  5309. for(var iRow = 1; iRow <= getNodesetCnt(model, xPathHiddenSheetData3+"/specimenlist"); iRow++){
  5310. sSpecimenCd = model.getValue(xPathHiddenSheetData3+"/specimenlist["+iRow+"]/specimencd");
  5311. model.setValue(xPathSheetData3+"/SpecimenLists/specimenlist[specimencd='"+sSpecimenCd+"']/qty" , model.getValue(xPathHiddenSheetData3+"/specimenlist["+iRow+"]/qty"));
  5312. model.setValue(xPathSheetData3+"/SpecimenLists/specimenlist[specimencd='"+sSpecimenCd+"']/chargernm", model.getValue(xPathHiddenSheetData3+"/specimenlist["+iRow+"]/chargernm"));
  5313. model.setValue(xPathSheetData3+"/SpecimenLists/specimenlist[specimencd='"+sSpecimenCd+"']/chargerid", model.getValue(xPathHiddenSheetData3+"/specimenlist["+iRow+"]/chargerid"));
  5314. model.setValue(xPathSheetData3+"/SpecimenLists/specimenlist[specimencd='"+sSpecimenCd+"']/oprsrvno" , model.getValue(xPathHiddenSheetData3+"/specimenlist["+iRow+"]/oprsrvno"));
  5315. }
  5316. }
  5317. if(getNodesetCnt(model, "/root/temp/SheetData3/specimenlistnew") >0 ){
  5318. model.copyNode(xPathSheetData3+"/SpecimenLists/specimenlistnew", "/root/temp/SheetData3/specimenlistnew");
  5319. }
  5320. // Tourniquet 정보
  5321. if(model.getValue(xPathData+"/tourniquetspec/tourniquet/tourniquetyn") != "N" &&
  5322. getNodesetCnt(model, xPathHiddenSheetData3+"/tourniquetlist") > 0 ){
  5323. for(var iRow = 1; iRow <= getNodesetCnt(model, xPathHiddenSheetData3+"/tourniquetlist"); iRow++){
  5324. sTouranstrecno = model.getValue(xPathHiddenSheetData3+"/tourniquetlist["+iRow+"]/anstrecno");
  5325. pchkyn = "N";
  5326. if(getNodesetCnt(model, xPathData+"/tourniquetspec/tourniquet/tourniquetlist") > 0 ){
  5327. for(var cRow = 1 ; cRow <= getNodesetCnt(model, xPathData+"/tourniquetspec/tourniquet/tourniquetlist"); cRow++){
  5328. if(model.getValue(xPathData+"/tourniquetspec/tourniquet/tourniquetlist[anstrecno ='"+sTouranstrecno+"']/startdd") != ""){
  5329. pchkyn ="Y";
  5330. }
  5331. }
  5332. }
  5333. if(pchkyn == "N"){
  5334. insRow = eval(getNodesetCnt(model, xPathData+"/tourniquetspec/tourniquet/tourniquetlist"))+ 1;
  5335. var rSttTime = "";
  5336. pFrDate = model.getValue(xPathHiddenSheetData3+"/tourniquetlist["+iRow+"]/torniquetfromdd" );
  5337. pFrTime = model.getValue(xPathHiddenSheetData3+"/tourniquetlist["+iRow+"]/torniquetfromtm" );
  5338. pToDate = model.getValue(xPathHiddenSheetData3+"/tourniquetlist["+iRow+"]/torniquettodd" );
  5339. pToTime = model.getValue(xPathHiddenSheetData3+"/tourniquetlist["+iRow+"]/torniquettotm" );
  5340. if(pFrDate != "" && pToDate != "" && pFrTime != "" && pToTime != "" ){
  5341. rSttTime = fTimeInterval(pFrDate, pToDate, pFrTime, pToTime, "1");
  5342. }
  5343. model.makeValue(xPathData+"/tourniquetspec/tourniquet/tourniquetlist["+insRow+"]/startdd" , pFrDate );
  5344. model.makeValue(xPathData+"/tourniquetspec/tourniquet/tourniquetlist["+insRow+"]/starttm" , pFrTime );
  5345. model.makeValue(xPathData+"/tourniquetspec/tourniquet/tourniquetlist["+insRow+"]/enddd" , pToDate );
  5346. model.makeValue(xPathData+"/tourniquetspec/tourniquet/tourniquetlist["+insRow+"]/endtm" , pToTime );
  5347. model.makeValue(xPathData+"/tourniquetspec/tourniquet/tourniquetlist["+insRow+"]/termtm" , rSttTime );
  5348. model.makeValue(xPathData+"/tourniquetspec/tourniquet/tourniquetlist["+insRow+"]/pressure" , "" );
  5349. model.makeValue(xPathData+"/tourniquetspec/tourniquet/tourniquetlist["+insRow+"]/posimage" , "" );
  5350. model.makeValue(xPathData+"/tourniquetspec/tourniquet/tourniquetlist["+insRow+"]/posimageview" , "" );
  5351. model.makeValue(xPathData+"/tourniquetspec/tourniquet/tourniquetlist["+insRow+"]/cuffsize" , "" );
  5352. model.makeValue(xPathData+"/tourniquetspec/tourniquet/tourniquetlist["+insRow+"]/applierid" , "" );
  5353. model.makeValue(xPathData+"/tourniquetspec/tourniquet/tourniquetlist["+insRow+"]/appliernm" , "" );
  5354. model.makeValue(xPathData+"/tourniquetspec/tourniquet/tourniquetlist["+insRow+"]/anstrecno" , model.getValue(xPathHiddenSheetData3+"/tourniquetlist["+iRow+"]/anstrecno" ));
  5355. }
  5356. }
  5357. }
  5358. // 수술후 수술명
  5359. xNode = instance1.selectSingleNode(OpcdPath);
  5360. if (xNode == null) {
  5361. nLen = 0;
  5362. model.makeNode(OpcdPath); // Path 생성 /root/main/MnphopcrData/MnphopcrList/aftopopnm/aftopoplists
  5363. } else {
  5364. nLen = xNode.childNodes.length;
  5365. }
  5366. if (getNodesetCnt(model, xPathHiddenSheetData3+"/opcdlist") >0){
  5367. model.makeNode(OpcdPath+"/opcdlist");
  5368. model.copyNode(OpcdPath+"/opcdlist", xPathHiddenSheetData3+"/opcdlist");
  5369. }else{
  5370. if (nLen < 1) {
  5371. model.copyNode(OpcdPath, "/root/init/workinst/OpcdData");
  5372. }
  5373. }
  5374. grd_afopnm.refresh();
  5375. grd_druglist.refresh();
  5376. //grd_inscath.refresh();
  5377. grd_opeqmtlist.refresh();
  5378. grd_implantlist.refresh();
  5379. grd_spclist.refresh();
  5380. grd_tourniquet.refresh();
  5381. }
  5382. }
  5383. // 수술기록 III 조회
  5384. function fSheetData3_Read(pFlag){
  5385. //return;
  5386. var sSpecimenCd = "";
  5387. if (pFlag == "all"){
  5388. model.removenodeset(xPathSheetData3+"/DrugLists/druglist");
  5389. model.removenodeset(xPathSheetData3+"/DrgeLists/drgelist");
  5390. model.removenodeset(xPathSheetData3+"/ImplantLists/implantlist");
  5391. model.removenodeset(xPathSheetData3+"/OpEqmtLists/opeqmtlist");
  5392. }
  5393. model.removenode("/root/send");
  5394. model.makeValue("/root/send/pid" , model.getValue("/root/init/HideData/pid" ));
  5395. model.makeValue("/root/send/oprsrvno" , model.getValue("/root/init/HideData/oprsrvno"));
  5396. // model.makeValue("/root/send/opcnfmdd" , model.getValue(hPath+"/opcnfmdd" ));
  5397. model.makeValue("/root/send/opcnfmdd" , model.getValue(xPathData+"/opcnfmdd" ));
  5398. model.makeValue("/root/send/flag", pFlag);
  5399. if (submit("TRMNP00305", false)){
  5400. fSheetData3_Copy("/DrugLists/druglist" , "/druglist" ); // 약품정보
  5401. fSheetData3_Copy("/DrgeLists/drgelist" , "/drgelist" ); // 배액관정보
  5402. fSheetData3_Copy("/skinserveyinfo/skinserveylist" , "/skinserveylist" ); // 피부관찰기록정보
  5403. //============================================================================
  5404. //2008-06-26 오후 5:12:43 taebum 추가요구사항
  5405. //삽관기록에 배액관으로 처방된 목록이 기본으로 들어오도록 이때는 시기가 intra op 로 해서 추가
  5406. if(model.getValue("/root//root/main/MnphopcrData/MnphopcrList/recstat") == "I"){
  5407. fGetDrgeListForCath();
  5408. }
  5409. //============================================================================
  5410. //2009-02-16 ycd 장비사용기록 해당없음 Y,N 여부에 따른 처리 로직 변경
  5411. if(model.getValue(xPathData+"/eqmtuseyn") != "X" || getNodesetCnt(model, xPathHiddenSheetData3+"/opeqmtlist") > 0 ){
  5412. btn_settingstrdt.disabled = false;
  5413. btn_settingenddt.disabled = false;
  5414. bbt_opeqmt.disabled = false;
  5415. btn_eqmtinfo.disabled = false;
  5416. fSheetData3_Copy("/OpEqmtLists/opeqmtlist" , "/opeqmtlist" ); // 장비 정보
  5417. model.setValue(xPathData+"/eqmtuseyn","");
  5418. chk_eqmtuseyn.refresh();
  5419. }else{
  5420. btn_settingstrdt.disabled = true;
  5421. btn_settingenddt.disabled = true;
  5422. bbt_opeqmt.disabled = true;
  5423. btn_eqmtinfo.disabled = true;
  5424. }
  5425. fSheetData3_Copy("/ImplantLists/implantlist", "/implantlist"); // implant 정보
  5426. //2008-07-03 오후 10:58:15 taebum add
  5427. //fSheetData3_Copy("/OrganLists/organlist", "/organlist"); // 장기이식 정보
  5428. // 검체 정보 체크
  5429. // 2009-02-16 ycd 수정 fSpecimenCheck() 메소드 수정 처리시 같이 수정
  5430. // model.copyNode(xPathSheetData3+"/SpecimenLists", xPathFormat+"/SpecimenLists");
  5431. // 20071120 Choi
  5432. if( model.getValue(xPathData+"/spcuseyn") != "X" ) {
  5433. if (model.getValue("/root/main/operation/list/opcnfmdd") <= model.getValue("/root/specdd/chkdd") ) { //검체 기록을 과거 화면과 분리를 위해_20120904_손성훈.
  5434. if( //model.getValue(xPathData+"/spcuseyn") != "X" &&
  5435. getNodesetCnt(model, xPathHiddenSheetData3+"/specimenlist") > 0 ){
  5436. for(var iRow = 1; iRow <= getNodesetCnt(model, xPathHiddenSheetData3+"/specimenlist"); iRow++){
  5437. sSpecimenCd = model.getValue(xPathHiddenSheetData3+"/specimenlist["+iRow+"]/specimencd");
  5438. model.setValue(xPathSheetData3+"/SpecimenLists/specimenlist[specimencd='"+sSpecimenCd+"']/qty" , model.getValue(xPathHiddenSheetData3+"/specimenlist["+iRow+"]/qty"));
  5439. model.setValue(xPathSheetData3+"/SpecimenLists/specimenlist[specimencd='"+sSpecimenCd+"']/chargernm", model.getValue(xPathHiddenSheetData3+"/specimenlist["+iRow+"]/chargernm"));
  5440. model.setValue(xPathSheetData3+"/SpecimenLists/specimenlist[specimencd='"+sSpecimenCd+"']/chargerid", model.getValue(xPathHiddenSheetData3+"/specimenlist["+iRow+"]/chargerid"));
  5441. model.setValue(xPathSheetData3+"/SpecimenLists/specimenlist[specimencd='"+sSpecimenCd+"']/oprsrvno" , model.getValue(xPathHiddenSheetData3+"/specimenlist["+iRow+"]/oprsrvno"));
  5442. //-----------(20101015) 경북대
  5443. model.setValue(xPathSheetData3+"/SpecimenLists/specimenlist[specimencd='"+sSpecimenCd+"']/deviposi" , model.getValue(xPathHiddenSheetData3+"/specimenlist["+iRow+"]/deviposi"));
  5444. model.setValue(xPathSheetData3+"/SpecimenLists/specimenlist[specimencd='"+sSpecimenCd+"']/deviposinm" , model.getValue(xPathHiddenSheetData3+"/specimenlist["+iRow+"]/deviposinm"));
  5445. //-----------(20101015) 경북대
  5446. }
  5447. }
  5448. fChangGridSetting("grd_spclist");
  5449. }else{
  5450. // 검체항목 변경 _ 손성훈 _2012.08.29 ---------
  5451. if(getNodesetCnt(model, xPathHiddenSheetData3+"/specimenlistnew") > 0 ){
  5452. pNode1 = "/SpecimenLists/specimenlistnew" ;
  5453. pNode2 = "/specimenlistnew" ;
  5454. fSheetData3_Copy(pNode1, pNode2);
  5455. }
  5456. fChangGridSetting("grd_spclistnew"); // 검체항목 변경 _ 손성훈 _2012.08.29
  5457. }
  5458. // ----------------------- 손성훈 _2012.08.29 //
  5459. }else{
  5460. fSpecimenCheck();
  5461. }
  5462. // Tourniquet 정보
  5463. if(model.getValue(xPathData+"/tourniquetspec/tourniquet/tourniquetyn") != "N" &&
  5464. getNodesetCnt(model, xPathHiddenSheetData3+"/tourniquetlist") > 0 ){
  5465. for(var iRow = 1; iRow <= getNodesetCnt(model, xPathHiddenSheetData3+"/tourniquetlist"); iRow++){
  5466. sTouranstrecno = model.getValue(xPathHiddenSheetData3+"/tourniquetlist["+iRow+"]/anstrecno");
  5467. pchkyn = "N";
  5468. if(getNodesetCnt(model, xPathData+"/tourniquetspec/tourniquet/tourniquetlist") > 0 ){
  5469. for(var cRow = 1 ; cRow <= getNodesetCnt(model, xPathData+"/tourniquetspec/tourniquet/tourniquetlist"); cRow++){
  5470. if(model.getValue(xPathData+"/tourniquetspec/tourniquet/tourniquetlist[anstrecno ='"+sTouranstrecno+"']/startdd") != ""){
  5471. pchkyn ="Y";
  5472. }
  5473. }
  5474. }
  5475. if(pchkyn == "N"){
  5476. insRow = eval(getNodesetCnt(model, xPathData+"/tourniquetspec/tourniquet/tourniquetlist"))+ 1;
  5477. var rSttTime = "";
  5478. pFrDate = model.getValue(xPathHiddenSheetData3+"/tourniquetlist["+iRow+"]/torniquetfromdd" );
  5479. pFrTime = model.getValue(xPathHiddenSheetData3+"/tourniquetlist["+iRow+"]/torniquetfromtm" );
  5480. pToDate = model.getValue(xPathHiddenSheetData3+"/tourniquetlist["+iRow+"]/torniquettodd" );
  5481. pToTime = model.getValue(xPathHiddenSheetData3+"/tourniquetlist["+iRow+"]/torniquettotm" );
  5482. if(pFrDate != "" && pToDate != "" && pFrTime != "" && pToTime != "" ){
  5483. rSttTime = fTimeInterval(pFrDate, pToDate, pFrTime, pToTime, "1");
  5484. }
  5485. model.makeValue(xPathData+"/tourniquetspec/tourniquet/tourniquetlist["+insRow+"]/startdd" , pFrDate );
  5486. model.makeValue(xPathData+"/tourniquetspec/tourniquet/tourniquetlist["+insRow+"]/starttm" , pFrTime );
  5487. model.makeValue(xPathData+"/tourniquetspec/tourniquet/tourniquetlist["+insRow+"]/enddd" , pToDate );
  5488. model.makeValue(xPathData+"/tourniquetspec/tourniquet/tourniquetlist["+insRow+"]/endtm" , pToTime );
  5489. model.makeValue(xPathData+"/tourniquetspec/tourniquet/tourniquetlist["+insRow+"]/termtm" , rSttTime );
  5490. model.makeValue(xPathData+"/tourniquetspec/tourniquet/tourniquetlist["+insRow+"]/pressure" , "" );
  5491. model.makeValue(xPathData+"/tourniquetspec/tourniquet/tourniquetlist["+insRow+"]/posimage" , "" );
  5492. model.makeValue(xPathData+"/tourniquetspec/tourniquet/tourniquetlist["+insRow+"]/posimageview" , "" );
  5493. model.makeValue(xPathData+"/tourniquetspec/tourniquet/tourniquetlist["+insRow+"]/cuffsize" , "" );
  5494. model.makeValue(xPathData+"/tourniquetspec/tourniquet/tourniquetlist["+insRow+"]/applierid" , "" );
  5495. model.makeValue(xPathData+"/tourniquetspec/tourniquet/tourniquetlist["+insRow+"]/appliernm" , "" );
  5496. model.makeValue(xPathData+"/tourniquetspec/tourniquet/tourniquetlist["+insRow+"]/anstrecno" , model.getValue(xPathHiddenSheetData3+"/tourniquetlist["+iRow+"]/anstrecno" ));
  5497. }
  5498. }
  5499. }
  5500. /* 2009-02-16 ycd 삭제처리
  5501. var iTotalSpecimentListsCnt = getNodesetCnt(model, xPathSheetData3+"/SpecimenLists/specimenlist");
  5502. for(var i=1; i <= iTotalSpecimentListsCnt; i++ ){
  5503. grd_spclist.cellstyle("background-color", i, 3, i, 3) = "#eaeaea";
  5504. }
  5505. */
  5506. /*
  5507. //opcr list에서 데이터를 가져오는데 왜 여기서 처리하는지 모르겠음. 2008-07-17 오전 10:08:46
  5508. // 수술후 수술명
  5509. xNode = instance1.selectSingleNode(OpcdPath);
  5510. if (xNode == null) {
  5511. nLen = 0;
  5512. model.makeNode(OpcdPath); // Path 생성 /root/main/MnphopcrData/MnphopcrList/aftopopnm/aftopoplists
  5513. } else {
  5514. //nLen = xNode.childNodes.length;
  5515. }
  5516. if (getNodesetCnt(model, xPathHiddenSheetData3+"/opcdlist") >0){
  5517. model.removenodeset(OpcdPath+"/opcdlist");
  5518. model.makeNode(OpcdPath+"/opcdlist");
  5519. model.copyNode(OpcdPath+"/opcdlist", xPathHiddenSheetData3+"/opcdlist");
  5520. }else{
  5521. model.removenodeset(OpcdPath+"/opcdlist");
  5522. if (nLen < 1) {
  5523. model.copyNode(OpcdPath, "/root/init/workinst/OpcdData");
  5524. }
  5525. }
  5526. */
  5527. grd_druglist.refresh();
  5528. grd_opeqmtlist.refresh();
  5529. grd_implantlist.refresh();
  5530. grd_spclist.refresh();
  5531. //grd_inscath.refresh();
  5532. //grd_afopnm.rebuild();
  5533. //datagrid4.rebuild();
  5534. //datagrid4.clearStatus();
  5535. grd_tourniquet.refresh();
  5536. }
  5537. }
  5538. // 수술기록 III Instance Copy
  5539. function fSheetData3_Copy(pNode1, pNode2){
  5540. var NodeCnt = getNodesetCnt(model, xPathHiddenSheetData3+pNode2);
  5541. if (NodeCnt > 0){
  5542. for (var i =1; i <= NodeCnt; i++){
  5543. model.makeNode(xPathSheetData3 + pNode1+"["+i+"]");
  5544. model.copyNode(xPathSheetData3 + pNode1+"["+i+"]" ,xPathHiddenSheetData3+pNode2+"["+i+"]");
  5545. }
  5546. }
  5547. }
  5548. //배액관 정보 삽관기록으로 copy
  5549. function fGetDrgeListForCath(){
  5550. var NodeCnt = getNodesetCnt(model, "/root/main/SheetData3/DrgeLists/drgelist");
  5551. var sCathFalg = "처방";
  5552. if (NodeCnt > 0){
  5553. var sGridInsert = "false";
  5554. for (var i =1; i <= NodeCnt; i++){
  5555. var sItemcd = model.getValue("/root/main/SheetData3/DrgeLists/drgelist["+i+"]/drgecd");
  5556. var sItemNm = model.getValue("/root/main/SheetData3/DrgeLists/drgelist["+i+"]/drgenm");
  5557. var sPartInfo = model.getValue("/root/main/SheetData3/DrgeLists/drgelist["+i+"]/partinfo");
  5558. var sDrgeqty = model.getValue("/root/main/SheetData3/DrgeLists/drgelist["+i+"]/drgeqty");
  5559. var sDrgespec = model.getValue("/root/main/SheetData3/DrgeLists/drgelist["+i+"]/drgespec");
  5560. //기존에 삽관기록에 존재할 경우 skip한다.
  5561. var iCathNodeCnt = getNodesetCnt(model, "/root/main/MnphopcrData/MnphopcrList/warmcoldregmspec/lists/cathlist/inscath");
  5562. var sCatchItemcd = "";
  5563. var sExist = "false";
  5564. for(var j = 1; j <= iCathNodeCnt; j++){
  5565. sCatchItemcd = model.getValue("/root/main/MnphopcrData/MnphopcrList/warmcoldregmspec/lists/cathlist/inscath["+j+"]/itemcd");
  5566. sCatchDrgespec = model.getValue("/root/main/MnphopcrData/MnphopcrList/warmcoldregmspec/lists/cathlist/inscath["+j+"]/spec");
  5567. if(sItemcd == sCatchItemcd && sDrgespec == sCatchDrgespec ){
  5568. sExist = "true";
  5569. }
  5570. }
  5571. if(sExist == "false"){
  5572. grd_inscath.addRow();
  5573. model.setValue("/root/main/MnphopcrData/MnphopcrList/warmcoldregmspec/lists/cathlist/inscath["+(iCathNodeCnt+1)+"]/cathflag", sCathFalg);
  5574. model.setValue("/root/main/MnphopcrData/MnphopcrList/warmcoldregmspec/lists/cathlist/inscath["+(iCathNodeCnt+1)+"]/itemcd", sItemcd);
  5575. model.setValue("/root/main/MnphopcrData/MnphopcrList/warmcoldregmspec/lists/cathlist/inscath["+(iCathNodeCnt+1)+"]/itemnm", sItemNm);
  5576. model.setValue("/root/main/MnphopcrData/MnphopcrList/warmcoldregmspec/lists/cathlist/inscath["+(iCathNodeCnt+1)+"]/partinfo", sPartInfo);
  5577. model.setValue("/root/main/MnphopcrData/MnphopcrList/warmcoldregmspec/lists/cathlist/inscath["+(iCathNodeCnt+1)+"]/qty", sDrgeqty);
  5578. model.setValue("/root/main/MnphopcrData/MnphopcrList/warmcoldregmspec/lists/cathlist/inscath["+(iCathNodeCnt+1)+"]/spec", sDrgespec);
  5579. model.setValue("/root/main/MnphopcrData/MnphopcrList/warmcoldregmspec/lists/cathlist/inscath["+(iCathNodeCnt+1)+"]/actflag", "I");//intra op
  5580. model.setValue("/root/main/MnphopcrData/MnphopcrList/warmcoldregmspec/lists/cathlist/inscath["+(iCathNodeCnt+1)+"]/method", "A");
  5581. sGridInsert = "true";
  5582. }
  5583. }
  5584. if(sGridInsert == "true"){
  5585. grd_inscath.refresh();
  5586. }
  5587. }
  5588. }
  5589. // 수술장비조회 팝업 호출
  5590. function fOpEqmtPopup(){
  5591. var sMsg = "";
  5592. var sOPEqmtCD = "";
  5593. if(model.getValue(xPathData+"/eqmtuseyn") == "X"){
  5594. messageBox("해당없음 선택으로 장비 추가를 할 수","I004");
  5595. return;
  5596. }
  5597. setParameter("SPMNP00300_oproomdept", model.getValue("/root/main/MnphopcrData/MnphopcrList/oproomcd"));
  5598. //modal("SPMNP00301"); // 기존 장비 목록 조회
  5599. modal("SPMNP00360"); // 장비목록 조회.2012.05.17_손성훈
  5600. sMsg = getParameter("SPMNP00300_Return");
  5601. if(sMsg == "") return;
  5602. setParameter("SPMNP00300_Return", "");
  5603. var iRow = grd_opeqmtlist.rows-grd_opeqmtlist.fixedrows;
  5604. for(var i =1; i < sMsg.split("▩").length-1; i++){
  5605. sOPEqmtCD = getArrayData(sMsg, i,0);
  5606. if(model.getValue(xPathSheetData3+"/OpEqmtLists/opeqmtlist[opeqmtcd ='"+sOPEqmtCD+"']/opeqmtcd") != "") continue;
  5607. //
  5608. if ((iRow == 0) ||(model.getValue(xPathSheetData3+"/OpEqmtLists/opeqmtlist["+iRow+"]/opeqmtcd") !="")) {
  5609. grd_opeqmtlist.addRow(false);
  5610. iRow++;
  5611. }
  5612. //
  5613. model.setValue(xPathSheetData3+"/OpEqmtLists/opeqmtlist["+iRow+"]/opeqmtcd", getArrayData(sMsg, i,0));
  5614. model.setValue(xPathSheetData3+"/OpEqmtLists/opeqmtlist["+iRow+"]/opeqmtnm", getArrayData(sMsg, i,1));
  5615. model.setValue(xPathSheetData3+"/OpEqmtLists/opeqmtlist["+iRow+"]/oprsrvno", model.getValue("/root/init/HideData/oprsrvno"));
  5616. }
  5617. grd_opeqmtlist.rebuild();
  5618. }
  5619. // 사용부위 팝업 호출
  5620. function fPartListVisible(pPartFlag, pYpos){
  5621. var yPos = pYpos;
  5622. sPartFlag = pPartFlag;
  5623. if (yPos > 395) {
  5624. yPos = pYpos - 300;
  5625. }
  5626. if (yPos > 426) {
  5627. yPos = 426;
  5628. }
  5629. // 2009-02-05 ycd 수술간호기록 수정작업 중 삭제 처리
  5630. //grp_partlist.attribute("top") = yPos+"px";
  5631. //grp_partlist.visible= true;
  5632. }
  5633. // 사용부위 팝업 설정/취소
  5634. function fPartListHidden(pProc){
  5635. // 2009-02-05 ycd 수술간호기록 수정작업 중 삭제 처리
  5636. //grp_partlist.visible = false;
  5637. var sSendMsg = "";
  5638. var sPartMsg = "";
  5639. var sPart = "";
  5640. var iRow = 0;
  5641. for(iRow=grd_partlist.fixedrows; iRow <= grd_partlist.rows; iRow++){
  5642. sPartMsg = "";
  5643. sPart = "";
  5644. for(var iCol = 1; iCol <= 4; iCol++){
  5645. if(grd_partlist.valueMatrix(iRow, iCol) == "true"){
  5646. if(iCol == 1){
  5647. sPart = "앞";
  5648. }else if(iCol == 2){
  5649. sPart = "뒤";
  5650. }else if(iCol == 3){
  5651. sPart = "왼쪽";
  5652. }else if(iCol == 4){
  5653. sPart = "오른쪽";
  5654. }
  5655. if( sPartMsg != ""){
  5656. sPartMsg += ",";
  5657. }else{
  5658. sPartMsg += "(";
  5659. }
  5660. sPartMsg += sPart;
  5661. grd_partlist.valueMatrix(iRow,iCol) = "";
  5662. }
  5663. }
  5664. if(sPartMsg != ""){
  5665. sPartMsg += ")";
  5666. }
  5667. if(sSendMsg != "" && sPartMsg != ""){
  5668. sSendMsg += ",";
  5669. }
  5670. if(sPartMsg != ""){
  5671. sSendMsg += grd_partlist.valueMatrix(iRow,0)+sPartMsg;
  5672. }
  5673. }
  5674. if(pProc == "C") return;
  5675. if(sPartFlag == "drug"){
  5676. iRow = grd_druglist.row;
  5677. model.setValue(xPathSheetData3+"/DrugLists/druglist["+iRow+"]/partinfo", sSendMsg);
  5678. grd_druglist.rebuild();
  5679. }
  5680. // 2009-02-05 ycd 수술간호기록 수정작업 중 삭제 처리
  5681. /*
  5682. else if(sPartFlag == "drge"){
  5683. iRow = grd_drgelist.row;
  5684. model.setValue(xPathSheetData3+"/DrgeLists/drgelist["+iRow+"]/partinfo", sSendMsg);
  5685. grd_drgelist.rebuild();
  5686. }
  5687. */
  5688. }
  5689. // 검체 체크
  5690. function fSpecimenCheck(){
  5691. /* 2009-02-16 ycd 삭제처리
  5692. if(model.getValue(xPathData+"/spcuseyn") == "X"){
  5693. model.removenodeset(xPathSheetData3+"/SpecimenLists/specimenlist");
  5694. model.copyNode(xPathSheetData3+"/SpecimenLists", xPathFormat+"/SpecimenLists");
  5695. for (var iRow = grd_spclist.fixedrows; iRow <= grd_spclist.rows; iRow++){
  5696. grd_spclist.isReadOnly(iRow, 1, iRow, 5)= true;
  5697. }
  5698. }else{
  5699. fSheetData3_Read("specimen");
  5700. }
  5701. grd_spclist.refresh();
  5702. */
  5703. model.setValue(xPathData+"/prcporderid","");
  5704. model.setValue(xPathData+"/prcpordernm","");
  5705. model.setValue(xPathData+"/spccmt", "");
  5706. ipt_prcpordernm.disabled = true;
  5707. button31.disabled = true;
  5708. img1.disabled = true;
  5709. txt_spccmt.disabled = true;
  5710. opt_prcporderid.refresh();
  5711. ipt_prcpordernm.refresh();
  5712. txt_spccmt.refresh();
  5713. model.removenodeset(xPathSheetData3+"/SpecimenLists/specimenlist");
  5714. model.copyNode(xPathSheetData3+"/SpecimenLists", xPathFormat+"/SpecimenLists");
  5715. fChangGridSetting("grd_spclist");
  5716. fChangGridSetting("grd_spclistnew");
  5717. /* 2009-02-19 ycd 주석처리
  5718. for (var iRow = grd_spclist.fixedrows; iRow <= grd_spclist.rows; iRow++){
  5719. grd_spclist.isReadOnly(iRow, 2, iRow, 5)= true;
  5720. grd_spclist.cellstyle("background-color", i, 0, i, 5) = "#eaeaea";
  5721. }
  5722. grd_spclist.refresh();
  5723. */
  5724. }
  5725. // 간호일지 조회
  5726. function fSrchCareRecList(){
  5727. model.setValue(xPathData+"/carerecuseyn", "");
  5728. model.removenode("/root/send");
  5729. /*
  5730. model.makeValue("/root/send/pid" , model.getValue("/root/init/HideData/pid")); // 등록번호
  5731. model.makeValue("/root/send/indd" , model.getValue(xPathData+"/inpt_indd" )); // 입원일자
  5732. model.makeValue("/root/send/cretno" , model.getValue(xPathData+"/inpt_cretno" )); // 생성번호
  5733. model.makeValue("/root/send/ioflag" , "I" ); // I/O 구분
  5734. */
  5735. // 2009-05-13 YCD 외래 수술 기록도 가능하도록 처리
  5736. model.makeValue("/root/send/pid" , model.getValue("/root/temp/paminfo/list/pid") ); // 등록번호
  5737. model.makeValue("/root/send/cretno" , model.getValue("/root/temp/paminfo/list/cretno") ); // 생성번호
  5738. model.makeValue("/root/send/ioflag" , model.getValue("/root/temp/paminfo/list/ioflag")); // I/O 구분
  5739. if("O" == model.getValue("/root/temp/paminfo/list/ioflag")){
  5740. model.makeValue("/root/send/orddd" , model.getValue("/root/temp/paminfo/list/orddd") ); // 진료일자
  5741. }else{
  5742. model.makeValue("/root/send/indd" , model.getValue("/root/temp/paminfo/list/indd") ); // 입원일자
  5743. }
  5744. model.makeValue("/root/send/dnarflag" , "%" ); // dnar 구분
  5745. model.makeValue("/root/send/sortseq" , "A" ); // 정렬순서(A:오름차순, D:내림차순)
  5746. model.makeValue("/root/send/recflag" , "P" ); // 기록구분
  5747. model.makeValue("/root/send/reclnkkey", model.getValue("/root/init/HideData/oprsrvno")+","+model.getValue("/root/init/HideData/instcd")); // 기록연계키
  5748. model.makeValue("/root/send/instcd" , model.getValue("/root/init/HideData/instcd")); // 기관코드
  5749. model.makeValue("/root/send/prestdt" , getCurrentDate() + getCurrentTime() ); // 현재일시
  5750. submit("TRMNP00308", false);
  5751. btn_carerec.disabled = false;
  5752. /*
  5753. if (model.getValue(xPathData+"/carerecuseyn") == "X"){
  5754. model.removenodeset(xPathSheetData3+"/CareRecLists/carereclist");
  5755. btn_carerec.disabled = true;
  5756. }else{
  5757. model.removenode("/root/send");
  5758. model.makeValue("/root/send/pid" , model.getValue("/root/init/HideData/pid")); // 등록번호
  5759. model.makeValue("/root/send/indd" , model.getValue(xPathData+"/inpt_indd" )); // 입원일자
  5760. model.makeValue("/root/send/cretno" , model.getValue(xPathData+"/inpt_cretno" )); // 생성번호
  5761. model.makeValue("/root/send/ioflag" , "I" ); // I/O 구분
  5762. model.makeValue("/root/send/dnarflag" , "%" ); // dnar 구분
  5763. model.makeValue("/root/send/sortseq" , "A" ); // 정렬순서(A:오름차순, D:내림차순)
  5764. model.makeValue("/root/send/recflag" , "P" ); // 기록구분
  5765. model.makeValue("/root/send/reclnkkey",model.getValue("/root/init/HideData/oprsrvno")+","+model.getValue("/root/init/HideData/instcd")); // 기록연계키
  5766. model.makeValue("/root/send/instcd" , model.getValue("/root/init/HideData/instcd")); // 기관코드
  5767. model.makeValue("/root/send/prestdt" , getCurrentDate() + getCurrentTime() ); // 현재일시
  5768. submit("TRMNP00308", false);
  5769. btn_carerec.disabled = false;
  5770. }
  5771. */
  5772. grd_carereclist.rebuild();
  5773. }
  5774. // 소요시간계산
  5775. function fTimeInterval(pFrDate, pToDate, pFrTime, pToTime, pFlag){
  5776. var HH=0, MM=0, tHH=0;
  5777. var sInHospTMs, sInHospTM;
  5778. var rTime = "";
  5779. //
  5780. if (pFrDate =="" || pFrDate.replace(' ', '').length < 8 ){
  5781. //messageBox("시작 일자를", "C001");
  5782. return rTime;
  5783. }
  5784. //
  5785. if (pToDate =="" || pToDate.replace(' ', '').length < 8 ){
  5786. //messageBox("종료 일자를", "C001");
  5787. return rTime;
  5788. }
  5789. //
  5790. if (pFrTime == "" || pFrTime.replace(' ', '').length < 4 ){
  5791. //messageBox("시작 시간을", "C001");
  5792. return rTime;
  5793. }
  5794. //
  5795. if (pToTime == "" || pToTime.replace(' ', '').length < 4 ){
  5796. // messageBox("종료 시간을", "C001");
  5797. return rTime;
  5798. }
  5799. //
  5800. if (pFrDate > pToDate){
  5801. messageBox("시작 일자가 종료일자보다 크므로 처리할 수", "I004");
  5802. return rTime;
  5803. }
  5804. //
  5805. if (pFrDate >= pToDate){
  5806. if (pFrTime > pToTime){
  5807. messageBox("시작시간("+ pFrTime +") 이 종료시간("+pToTime +") 보다 큽니다.\n입력한 시간을 확인하시기 바랍니다.", "I000");
  5808. return rTime;
  5809. }
  5810. }
  5811. var sDateInterval = getDateInterval(pFrDate , pToDate ); // 두 일자사이의 차(일단위)
  5812. // alert("sTimeInterval = getTimeInterval("+pFrTime+"00, "+pToTime+"00 )" ); // 두 시간사이의 차(초단위)
  5813. var sTimeInterval = getTimeInterval(pFrTime+"00", pToTime+"00" ); // 두 시간사이의 차(초단위)
  5814. tHH = Number(sDateInterval * 24 )
  5815. + Number(sTimeInterval / 3600);
  5816. HH = Math.floor(tHH);
  5817. MM = (HH == 0) ? Math.round(tHH * 60) : Math.round((tHH % HH) * 60);
  5818. HH = lpad(HH, 2, "0");
  5819. MM = lpad(MM, 2, "0");
  5820. if (pFlag =="1") {
  5821. rTime = HH+":"+MM;
  5822. } else {
  5823. rTime = HH+"시간 "+MM+"분";
  5824. }
  5825. // alert(rTime);
  5826. return rTime;
  5827. }
  5828. // 소요시간계산
  5829. function fTimeSplit(pData){
  5830. //2009-02-03 ycd 변경
  5831. /*
  5832. var hTime = pData.split("시간 ");
  5833. if (hTime[0] == "") return 0;
  5834. var wHH = Number(hTime[0]);
  5835. var mTime = hTime[1].split("분");
  5836. return Number(hTime[0]) + (Number(mTime[0])/60);
  5837. */
  5838. var hTime = pData.substr(0,2);
  5839. if (hTime == "") return 0;
  5840. var wHH = Number(hTime);
  5841. var mTime = pData.substr(3,2);
  5842. return Number(hTime) + (Number(mTime)/60);
  5843. }
  5844. function fTotalTimeSet(){
  5845. var TotTime = 0.0;
  5846. var wTime = "";
  5847. var sRowCnt = grd_opposture.rows - grd_opposture.fixedrows;
  5848. for (var i=1; i<= sRowCnt; i++){
  5849. wTime = model.getValue(xPathData +"/opposturespec/opposture/opposturelist["+i+"]/oppostureterm");
  5850. if (wTime != "") {
  5851. TotTime += fTimeSplit(wTime);
  5852. if (i > 1) {
  5853. HH = Math.floor(TotTime);
  5854. MM = (HH == 0) ? Math.round(TotTime * 60) : Math.round((TotTime % HH) * 60);
  5855. model.setValue(xPathData +"/opposturespec/opposture/opposturelist["+i+"]/opposturetot", HH+"시간 "+MM+"분");
  5856. }
  5857. }
  5858. }
  5859. grd_opposture.refresh();
  5860. }
  5861. /* ------------------------------------------------- */
  5862. /* desc : 마취시작,종료시간 입력제한 처리 */
  5863. /* param : 마취종류가 국소인경우는 직접입력한다 */
  5864. /* -------------------------------------------------- */
  5865. function fAnstTimeControl(pAnst) {
  5866. var sDisab = (pAnst == "") ? true : false ;
  5867. var sVisib = (pAnst == "") ? "hidden" : "visible";
  5868. if(pAnst != ""){
  5869. var sTmpOpcnfmdd = model.getValue(xPathData+"/opcnfmdd");
  5870. //model.setValue("/root/init/workinst/datetimedata/anstsrtdd", sTmpOpcnfmdd);
  5871. model.setValue("/root/init/workinst/datetimedata/anstsrtdd", "");
  5872. model.setValue("/root/init/workinst/datetimedata/anstsrthh", "");
  5873. //model.setValue("/root/init/workinst/datetimedata/anstenddd", sTmpOpcnfmdd);
  5874. model.setValue("/root/init/workinst/datetimedata/anstenddd", "");
  5875. model.setValue("/root/init/workinst/datetimedata/anstendhh", "");
  5876. model.setValue("/root/init/workinst/datetimedata/opfromdd", sTmpOpcnfmdd);
  5877. model.setValue("/root/init/workinst/datetimedata/opfromhh", "");
  5878. model.setValue("/root/init/workinst/datetimedata/optodd", sTmpOpcnfmdd);
  5879. model.setValue("/root/init/workinst/datetimedata/optohh", "");
  5880. inp_anstsrtdd.disabled = true;
  5881. inp_anstsrthh.disabled = true;
  5882. bbt_anstsrthh.attribute("visibility")= "hidden";
  5883. inp_anstenddd.disabled = true;
  5884. inp_anstendhh.disabled = true;
  5885. bbt_anstendhh.attribute("visibility")= "hidden";
  5886. }
  5887. inp_opfromdd.disabled = sDisab;
  5888. inp_opfromhh.disabled = sDisab;
  5889. bbt_opfromhh.attribute("visibility")= sVisib;
  5890. inp_optodd.disabled = sDisab;
  5891. inp_optohh.disabled = sDisab;
  5892. bbt_optohh.attribute("visibility") = sVisib;
  5893. inp_anstsrtdd.refresh();
  5894. inp_anstsrthh.refresh();
  5895. bbt_anstsrthh.refresh();
  5896. inp_anstenddd.refresh();
  5897. inp_anstendhh.refresh();
  5898. bbt_anstendhh.refresh();
  5899. inp_opfromdd.refresh();
  5900. inp_opfromhh.refresh();
  5901. inp_optodd.refresh();
  5902. inp_optohh.refresh();
  5903. }
  5904. /* ------------------------------------------------- */
  5905. /* desc : 수술시작,수술시간 입력제한 처리 */
  5906. /* param : 마취종류가 국소인경우는 직접입력한다 */
  5907. /* -------------------------------------------------- */
  5908. function fOpTimeControl(pAnst) {
  5909. var sCheck = 0;
  5910. // 2009-02-04 ycd 마취종류 선택 변경에 의해 삭제 처리
  5911. //var sTmpAntkindCheck01 = model.getValue("/root/main/MnphopcrData/MnphopcrList/anstkindspec/anstkind/anstkindcheck01");
  5912. //var sTmpAntkindCheck02 = model.getValue("/root/main/MnphopcrData/MnphopcrList/anstkindspec/anstkind/anstkindcheck02");
  5913. //var sTmpAntkindCheck09 = model.getValue("/root/main/MnphopcrData/MnphopcrList/anstkindspec/anstkind/anstkindcheck09");
  5914. var sTmpAnstkindcheck03 = model.getValue("/root/main/MnphopcrData/MnphopcrList/anstkindspec/anstkind/anstkindcheck03");
  5915. var sTmpAnstcprchk = model.getValue("/root/main/MnphopcrData/MnphopcrList/anstkindspec/anstkind/anstcprchk");
  5916. var sTmpAnstkindcheck99 = model.getValue("/root/main/MnphopcrData/MnphopcrList/anstkindspec/anstkind/anstkindcheck99");
  5917. //var sAnstmthdcd = model.getValue(xPathData+"/anstmthdcd" );
  5918. var sAnstmthdname = model.getValue(xPathData+"/anstmthdname" );
  5919. var sAnstmthdnamesub = model.getValue(xPathData+"/anstmthdsubname" );
  5920. if( getUserInfo("dutplceinstcd") == "017" ) {//빈센트만 2010.05.27 K. J. M
  5921. var openddd = model.getValue(xPathDispDT+"/optodd");
  5922. var opendhh = model.getValue(xPathDispDT+"/optohh");
  5923. if( (model.getValue(xPathDispDT+"/patoutroomdd") == "")||(model.getValue(xPathDispDT+"/patoutroomdd") != ""&&model.getValue(xPathDispDT+"/patoutroomhh") == "") ) {
  5924. if( (openddd != "")&&(opendhh != "")&&(sTmpAnstkindcheck03 == "S") ){//국소마취일경우 수술종료시간 셋팅
  5925. model.setValue(xPathDispDT+"/patoutroomdd", openddd);
  5926. model.setValue(xPathDispDT+"/patoutroomhh", opendhh);
  5927. }
  5928. }
  5929. }
  5930. // 2009-02-04 ycd 마취종류 선택 변경에 의해 삭제 처리
  5931. //if (sTmpAntkindCheck01 != "") sCheck++; // 전신
  5932. //if (sTmpAntkindCheck02 != "") sCheck++; // 부위
  5933. //2009-02-04 이미 삭제된 부분
  5934. //if (sTmpAntkindCheck09 != "") sCheck++; // 기타
  5935. /*
  5936. //2008-08-28 오후 2:33:08 taebum 국소마취일 경우 주석처리함.
  5937. if (sCheck == 0) {
  5938. if (sTmpAntkindCheck02 == "") sCheck++; // 국소
  5939. model.setValue("/root/main/MnphopcrData/MnphopcrList/anstkindspec/anstkind/anstmthdname", "");
  5940. //ipt_anstmthdname.value = "";
  5941. }
  5942. */
  5943. // 2009-02-04 ycd 마취종류 선택 변경에 의해 삭제 처리
  5944. /*
  5945. if (sCheck != 0) {
  5946. model.setValue(xPathDispDT+"/anstsrtdd", model.getValue(xPathData+"/anstanstsrtdt").substr(0,8) ); // 마취시작일자
  5947. model.setValue(xPathDispDT+"/anstsrthh", model.getValue(xPathData+"/anstanstsrtdt").substr(8,4) ); // 마취시작시간
  5948. model.setValue(xPathDispDT+"/anstenddd", model.getValue(xPathData+"/anstanstenddt").substr(0,8) ); // 마취종료일자
  5949. model.setValue(xPathDispDT+"/anstendhh", model.getValue(xPathData+"/anstanstenddt").substr(8,4) ); // 마취종료시간
  5950. //2008-09-03 오전 10:55:49 taebum 협진관련 추가
  5951. if((model.getValue(xPathData+"/oprsrvno") == model.getValue(xPathData+"/mainoprsrvno")) || (model.getValue(xPathData+"/mainoprsrvno") == "-") ){
  5952. model.setValue(xPathDispDT+"/opfromdd" , model.getValue(xPathData+"/anstopfromdt" ).substr(0,8)); // 수술시작일자
  5953. model.setValue(xPathDispDT+"/opfromhh" , model.getValue(xPathData+"/anstopfromdt" ).substr(8,4)); // 수술시작시간
  5954. model.setValue(xPathDispDT+"/optodd" , model.getValue(xPathData+"/anstoptodt" ).substr(0,8)); // 수술종료일자
  5955. model.setValue(xPathDispDT+"/optohh" , model.getValue(xPathData+"/anstoptodt" ).substr(8,4)); // 수술종료시간
  5956. }else{
  5957. //부수술일 경우
  5958. model.setValue(xPathDispDT+"/opfromdd" , model.getValue(xPathData+"/opfromdt" ).substr(0,8)); // 수술시작일자
  5959. model.setValue(xPathDispDT+"/opfromhh" , model.getValue(xPathData+"/opfromdt" ).substr(8,4)); // 수술시작시간
  5960. model.setValue(xPathDispDT+"/optodd" , model.getValue(xPathData+"/optodt" ).substr(0,8)); // 수술종료일자
  5961. model.setValue(xPathDispDT+"/optohh" , model.getValue(xPathData+"/optodt" ).substr(8,4)); // 수술종료시간
  5962. }
  5963. if (sTmpAntkindCheck01 == "G"){ // 전신
  5964. if(sAnstmthdcd == "G"){
  5965. model.setValue("/root/main/MnphopcrData/MnphopcrList/anstkindspec/anstkind/anstmthdname",sAnstmthdname);
  5966. model.setValue("/root/main/MnphopcrData/MnphopcrList/anstkindspec/anstkind/anstmthdnamesub",sAnstmthdnamesub);
  5967. }
  5968. }
  5969. if (sTmpAntkindCheck02 == "P"){ // 부위
  5970. if(sAnstmthdcd == "P"){
  5971. model.setValue("/root/main/MnphopcrData/MnphopcrList/anstkindspec/anstkind/anstmthdname", sAnstmthdname);
  5972. model.setValue("/root/main/MnphopcrData/MnphopcrList/anstkindspec/anstkind/anstmthdnamesub",sAnstmthdnamesub);
  5973. }
  5974. }
  5975. if (sTmpAntkindCheck09 == "E"){ // 기타
  5976. if(sAnstmthdcd == "E"){
  5977. model.setValue("/root/main/MnphopcrData/MnphopcrList/anstkindspec/anstkind/anstmthdname", sAnstmthdname);
  5978. model.setValue("/root/main/MnphopcrData/MnphopcrList/anstkindspec/anstkind/anstmthdnamesub",sAnstmthdnamesub);
  5979. }
  5980. }
  5981. }
  5982. */
  5983. // 2009-02-04 ycd 마취종류 선택 변경 부분
  5984. model.setValue("/root/main/MnphopcrData/MnphopcrList/anstkindspec/anstkind/anstmthdname", sAnstmthdname);
  5985. model.setValue("/root/main/MnphopcrData/MnphopcrList/anstkindspec/anstkind/anstmthdnamesub",sAnstmthdnamesub);
  5986. model.setValue(xPathDispDT+"/anstsrtdd", model.getValue(xPathData+"/anstanstsrtdt").substr(0,8) ); // 마취시작일자
  5987. model.setValue(xPathDispDT+"/anstsrthh", model.getValue(xPathData+"/anstanstsrtdt").substr(8,4) ); // 마취시작시간
  5988. model.setValue(xPathDispDT+"/anstenddd", model.getValue(xPathData+"/anstanstenddt").substr(0,8) ); // 마취종료일자
  5989. model.setValue(xPathDispDT+"/anstendhh", model.getValue(xPathData+"/anstanstenddt").substr(8,4) ); // 마취종료시간
  5990. sOpCnfmDD = model.getValue(xPathData+"/opcnfmdd");
  5991. if(sTmpAnstkindcheck03 == "" && sTmpAnstcprchk == "" && sTmpAnstkindcheck99 == ""){
  5992. //if((model.getValue(xPathData+"/oprsrvno") == model.getValue(xPathData+"/mainoprsrvno")) || (model.getValue(xPathData+"/mainoprsrvno") == "-") ){
  5993. // model.setValue(xPathDispDT+"/opfromdd" , model.getValue(xPathData+"/opfromdt" ).substr(0,8)); // 수술시작일자
  5994. // model.setValue(xPathDispDT+"/opfromhh" , model.getValue(xPathData+"/opfromdt" ).substr(8,4)); // 수술시작시간
  5995. // model.setValue(xPathDispDT+"/optodd" , model.getValue(xPathData+"/optodt" ).substr(0,8)); // 수술종료일자
  5996. // model.setValue(xPathDispDT+"/optohh" , model.getValue(xPathData+"/optodt" ).substr(8,4)); // 수술종료시간
  5997. //}else{
  5998. //부수술일 경우
  5999. if(model.getValue(xPathDispDT+"/opfromdd") == "" ) model.setValue(xPathDispDT+"/opfromdd" , model.getValue(xPathData+"/anstopfromdt" ).substr(0,8)); // 수술시작일자
  6000. if(model.getValue(xPathDispDT+"/opfromhh") == "" ) model.setValue(xPathDispDT+"/opfromhh" , model.getValue(xPathData+"/anstopfromdt" ).substr(8,4)); // 수술시작시간
  6001. if(model.getValue(xPathDispDT+"/optodd") == "" ) model.setValue(xPathDispDT+"/optodd" , model.getValue(xPathData+"/anstoptodt" ).substr(0,8)); // 수술종료일자
  6002. if(model.getValue(xPathDispDT+"/optohh") == "" ) model.setValue(xPathDispDT+"/optohh" , model.getValue(xPathData+"/anstoptodt" ).substr(8,4)); // 수술종료시간
  6003. //2009-04-16 YCD 무조건 주수술의 정보를 가저옴
  6004. //model.setValue(xPathDispDT+"/opfromdd" , model.getValue(xPathData+"/anstopfromdt" ).substr(0,8)); // 수술시작일자
  6005. //model.setValue(xPathDispDT+"/opfromhh" , model.getValue(xPathData+"/anstopfromdt" ).substr(8,4)); // 수술시작시간
  6006. //model.setValue(xPathDispDT+"/optodd" , model.getValue(xPathData+"/anstoptodt" ).substr(0,8)); // 수술종료일자
  6007. //model.setValue(xPathDispDT+"/optohh" , model.getValue(xPathData+"/anstoptodt" ).substr(8,4)); // 수술종료시간
  6008. //}
  6009. sCheck++;
  6010. }else{
  6011. //if((model.getValue(xPathData+"/oprsrvno") == model.getValue(xPathData+"/mainoprsrvno")) || (model.getValue(xPathData+"/mainoprsrvno") == "-") ){
  6012. // model.setValue(xPathDispDT+"/opfromdd" , model.getValue(xPathData+"/opfromdt" ).substr(0,8)); // 수술시작일자
  6013. // model.setValue(xPathDispDT+"/opfromhh" , model.getValue(xPathData+"/opfromdt" ).substr(8,4)); // 수술시작시간
  6014. // model.setValue(xPathDispDT+"/optodd" , model.getValue(xPathData+"/optodt" ).substr(0,8)); // 수술종료일자
  6015. // model.setValue(xPathDispDT+"/optohh" , model.getValue(xPathData+"/optodt" ).substr(8,4)); // 수술종료시간
  6016. //}else{
  6017. //부수술일 경우
  6018. // model.setValue(xPathDispDT+"/opfromdd" , model.getValue(xPathData+"/anstopfromdt" ).substr(0,8)); // 수술시작일자
  6019. // model.setValue(xPathDispDT+"/opfromhh" , model.getValue(xPathData+"/anstopfromdt" ).substr(8,4)); // 수술시작시간
  6020. // model.setValue(xPathDispDT+"/optodd" , model.getValue(xPathData+"/anstoptodt" ).substr(0,8)); // 수술종료일자
  6021. // model.setValue(xPathDispDT+"/optohh" , model.getValue(xPathData+"/anstoptodt" ).substr(8,4)); // 수술종료시간
  6022. //}
  6023. if(model.getValue(xPathDispDT+"/opfromdd") == "" ) model.setValue(xPathDispDT+"/opfromdd" , model.getValue(xPathData+"/anstopfromdt" ).substr(0,8)); // 수술시작일자
  6024. if(model.getValue(xPathDispDT+"/opfromhh") == "" ) model.setValue(xPathDispDT+"/opfromhh" , model.getValue(xPathData+"/anstopfromdt" ).substr(8,4)); // 수술시작시간
  6025. if(model.getValue(xPathDispDT+"/optodd") == "" ) model.setValue(xPathDispDT+"/optodd" , model.getValue(xPathData+"/anstoptodt" ).substr(0,8)); // 수술종료일자
  6026. if(model.getValue(xPathDispDT+"/optohh") == "" ) model.setValue(xPathDispDT+"/optohh" , model.getValue(xPathData+"/anstoptodt" ).substr(8,4)); // 수술종료시간
  6027. }
  6028. //if (model.getValue(xPathDispDT+"/anstsrtdd" ) == "") model.setValue(xPathDispDT+"/anstsrtdd" , sOpCnfmDD);
  6029. //if (model.getValue(xPathDispDT+"/anstenddd" ) == "") model.setValue(xPathDispDT+"/anstenddd" , sOpCnfmDD);
  6030. if (model.getValue(xPathDispDT+"/perfidarvdd") == "") model.setValue(xPathDispDT+"/perfidarvdd" , sOpCnfmDD);
  6031. if (model.getValue(xPathDispDT+"/perfidoutdd") == "") model.setValue(xPathDispDT+"/perfidoutdd" , sOpCnfmDD);
  6032. if (model.getValue(xPathDispDT+"/opfromdd" ) == "") model.setValue(xPathDispDT+"/opfromdd" , sOpCnfmDD);
  6033. if (model.getValue(xPathDispDT+"/optodd" ) == "") model.setValue(xPathDispDT+"/optodd" , sOpCnfmDD);
  6034. var sDisab = (sCheck != 0) ? true : false ;
  6035. var sVisib = (sCheck != 0) ? "hidden" : "visible";
  6036. if ((model.getValue(xPathData+"/oprsrvno") == model.getValue(xPathData+"/mainoprsrvno")) ||
  6037. (model.getValue(xPathData+"/mainoprsrvno") == "-" ) ){ //주수술일 경우 처리
  6038. inp_opfromdd.disabled = sDisab;
  6039. inp_opfromhh.disabled = sDisab;
  6040. bbt_opfromhh.attribute("visibility")= sVisib;
  6041. inp_optodd.disabled = sDisab;
  6042. inp_optohh.disabled = sDisab;
  6043. bbt_optohh.attribute("visibility") = sVisib;
  6044. }else{ //부수술일 경우 처리
  6045. inp_opfromdd.disabled = false;
  6046. inp_opfromhh.disabled = false;
  6047. bbt_opfromhh.attribute("visibility")= "visible";
  6048. inp_optodd.disabled = false;
  6049. inp_optohh.disabled = false;
  6050. bbt_optohh.attribute("visibility") = "visible";
  6051. }
  6052. /*2008-08-28 오전 10:39:43 전신, 부위일 경우에 국소, 기타 disable 처리
  6053. 2009-02-03 ycd 기록 항목에서 삭제되어 주석처리
  6054. if(sAnstmthdcd == "G" || sAnstmthdcd == "P"){
  6055. chk_anstkindcheck03.disabled = true;
  6056. chk_anstkindcheck09.disabled = true;
  6057. chk_anstkindcheck99.disabled = true;
  6058. ipt_anstkindothertext.disabled = true;
  6059. input3.disabled = true;
  6060. }
  6061. */
  6062. // inp_opfromdd.refresh();
  6063. // inp_opfromhh.refresh();
  6064. // bbt_opfromhh.refresh();
  6065. // inp_optodd.refresh();
  6066. // inp_optohh.refresh();
  6067. // bbt_optohh.refresh();
  6068. grp_time.refresh();
  6069. //ipt_anstmthdname.refresh();
  6070. }
  6071. /* ------------------------------------------------- */
  6072. /* desc : 총수술시간 가져오기 */
  6073. /* -------------------------------------------------- */
  6074. function fOpTotalTime() {
  6075. var opScalecd = model.getValue("/root/init/opscale/codelist/cdid");
  6076. var sAnstmthdcd = model.getValue(xPathData+"/anstmthdcd" ); // 마취구분
  6077. // var sOpscale = model.getValue(xPathData+"/opscale");
  6078. var sFromdd = model.getValue(xPathDispDT+"/patinroomdd" ); // 입실일자
  6079. var sFromhh = model.getValue(xPathDispDT+"/patinroomhh" ); // 입실시간
  6080. var sTodd = model.getValue(xPathDispDT+"/patoutroomdd"); // 퇴실일자
  6081. var sTohh = model.getValue(xPathDispDT+"/patoutroomhh"); // 퇴실시간
  6082. if (sFromhh !="" && sFromhh != null && sTohh !="" && sTohh != null
  6083. && sFromhh != "undefined" && sTohh != "undefined") {
  6084. var rTime = fTimeInterval(sFromdd, sTodd, sFromhh, sTohh);
  6085. model.setValue("/root/init/workinst/OpOtherData/OpTotalTime", rTime );
  6086. opt_OpTotalTime.refresh();
  6087. if (opScalecd =="A") { // 2009. 10. 26 han19 : 이영선선생님 요청사항 : 변경요청번호 : 8861 , Task No : 37761
  6088. // 수술스케일을 입실일시와 퇴실일시를 가지고 계산해서 자동으로 셋티해주도록 하는 로직 추가
  6089. // 기존에 저장된 수술스케일 값이 있더라도 계산된 값에 의해 자동으로 변환하게 셋팅함
  6090. if (sFromdd != sTodd) {
  6091. var sTimeInterval1 = getTimeInterval(sFromhh+"00", "240000" ); // 두 시간사이의 차(초단위)
  6092. var sTimeInterval2 = getTimeInterval("000000", sTohh+"00" ); // 두 시간사이의 차(초단위) )
  6093. } else {
  6094. var sTimeInterval1 = getTimeInterval(sFromhh+"00", sTohh+"00" ); // 두 시간사이의 차(초단위)
  6095. var sTimeInterval2 = "000000"; // 두 시간사이의 차(초단위)
  6096. }
  6097. var opUseTime = (parseInt(sTimeInterval1) + parseInt(sTimeInterval2)) / 60;
  6098. var sTime1 = model.getValue("/root/init/opscaletm/codelist[sortseq= 1]/cdid");
  6099. var sTime2 = model.getValue("/root/init/opscaletm/codelist[sortseq= 2]/cdid");
  6100. var sTime3 = model.getValue("/root/init/opscaletm/codelist[sortseq= 3]/cdid");
  6101. if (opUseTime < parseInt(sTime1)) {
  6102. model.setValue("/root/main/MnphopcrData/MnphopcrList/opscale", "S");
  6103. } else if (opUseTime >= parseInt(sTime1) && opUseTime < parseInt(sTime2) ) {
  6104. model.setValue("/root/main/MnphopcrData/MnphopcrList/opscale", "M");
  6105. } else if (opUseTime >= parseInt(sTime2) && opUseTime < parseInt(sTime3)) {
  6106. model.setValue("/root/main/MnphopcrData/MnphopcrList/opscale", "L");
  6107. } else if (opUseTime >= parseInt(sTime3)) {
  6108. model.setValue("/root/main/MnphopcrData/MnphopcrList/opscale", "X");
  6109. }
  6110. } else if(opScalecd =="B") { // 여의도 성모병원 요청사항: by 박영우 20100122
  6111. // 성모병원은 기존에 저장된 수술스케일 값이 있다면 계산된 값이 아닌 스케일 값으로 대체
  6112. if(sOpscaleChgFlag == true || sOpscaleOrg == "") { // 기존 값이 없거나 변화한 값이 있다면..
  6113. if (sFromdd != sTodd) {
  6114. var sTimeInterval1 = getTimeInterval(sFromhh+"00", "240000" ); // 두 시간사이의 차(초단위)
  6115. var sTimeInterval2 = getTimeInterval("000000", sTohh+"00" ); // 두 시간사이의 차(초단위) )
  6116. } else {
  6117. var sTimeInterval1 = getTimeInterval(sFromhh+"00", sTohh+"00" ); // 두 시간사이의 차(초단위)
  6118. var sTimeInterval2 = "000000"; // 두 시간사이의 차(초단위)
  6119. }
  6120. var opUseTime = (parseInt(sTimeInterval1) + parseInt(sTimeInterval2)) / 60;
  6121. var sGTime1 = 0;
  6122. var sGTime2 = 0;
  6123. var sETime1 = 0;
  6124. var sETime2 = 0;
  6125. if(sAnstmthdcd == "G" || sAnstmthdcd == "P" || sAnstmthdcd == "X" ) { // 전신 or 부위 or Others 2010.03.02 K.J.M
  6126. sGTime1 = model.getValue("/root/init/opscaletm/codelist[sortseq= 2]/cdid");
  6127. sGTime2 = model.getValue("/root/init/opscaletm/codelist[sortseq= 3]/cdid");
  6128. if (opUseTime < parseInt(sGTime1) && sOpscaleOrg != "M") {
  6129. model.setValue("/root/main/MnphopcrData/MnphopcrList/opscale", "M");
  6130. } else if (opUseTime >= parseInt(sGTime1) && opUseTime < parseInt(sGTime2) && sOpscaleOrg != "L" ) {
  6131. model.setValue("/root/main/MnphopcrData/MnphopcrList/opscale", "L");
  6132. } else if (opUseTime >= parseInt(sGTime2) && sOpscaleOrg != "X") {
  6133. model.setValue("/root/main/MnphopcrData/MnphopcrList/opscale", "X");
  6134. }
  6135. } else if(sAnstmthdcd == "S") { //국소
  6136. sETime1 = model.getValue("/root/init/opscaletm/codelist[sortseq= 1]/cdid");
  6137. sETime2 = model.getValue("/root/init/opscaletm/codelist[sortseq= 3]/cdid");
  6138. if (opUseTime < parseInt(sETime1) && sOpscaleOrg != "S") {
  6139. model.setValue("/root/main/MnphopcrData/MnphopcrList/opscale", "S");
  6140. } else if (opUseTime >= parseInt(sETime1) && opUseTime < parseInt(sETime2) && sOpscaleOrg != "M" ) {
  6141. model.setValue("/root/main/MnphopcrData/MnphopcrList/opscale", "M");
  6142. } else if (opUseTime >= parseInt(sETime2) && sOpscaleOrg != "L") {
  6143. model.setValue("/root/main/MnphopcrData/MnphopcrList/opscale", "L");
  6144. }
  6145. }
  6146. sOpscaleOrg = model.getValue("/root/main/MnphopcrData/MnphopcrList/opscale");
  6147. }
  6148. }
  6149. model.refresh();
  6150. }
  6151. }
  6152. /* ------------------------------------------------- */
  6153. /* desc : 총마취시간 가져오기 */
  6154. /* -------------------------------------------------- */
  6155. function fAnTotalTime() {
  6156. var sFromdd = model.getValue(xPathDispDT+"/anstsrtdd" );; // 입실일자
  6157. var sFromhh = model.getValue(xPathDispDT+"/anstsrthh" );; // 입실시간
  6158. var sTodd = model.getValue(xPathDispDT+"/anstenddd" );; // 퇴실일자
  6159. var sTohh = model.getValue(xPathDispDT+"/anstendhh" );; // 퇴실시간
  6160. //if( sFromhh!="" ) {
  6161. // if( sFromhh.length < 4 ) {
  6162. // messageBox("입실시간을 잘못 입력하셨습니다.!", "E000");
  6163. // return;
  6164. // }
  6165. //}
  6166. //if( sTohh!="" ) {
  6167. // if( sTohh.length < 4 ) {
  6168. // messageBox("퇴실시간을 잘못 입력하셨습니다.!", "E000");
  6169. // return;
  6170. // }
  6171. //}
  6172. if( sFromhh!="" && sTohh !="" ) {
  6173. var rTime = fTimeInterval(sFromdd, sTodd, sFromhh, sTohh);
  6174. model.setValue("/root/init/workinst/OpOtherData/AnTotalTime", rTime );
  6175. opt_AnTotalTime.refresh();
  6176. }
  6177. }
  6178. //Timeout User Check
  6179. function fTimeoutUserEnter(pIdx) {
  6180. var sPath = "/timeoutspec/timeout/";
  6181. var sData = "perfdr*perfdrnm*pertdrdeptcd*pertdrdeptnm*011" +"#"
  6182. + "apprtcdr*apprtcdrnm*apprtcdrdeptcd*apprtcdrdeptnm*011" +"#"
  6183. + "anstdr*anstdrnm*anstdrdeptcd*anstdrdeptnm*012" +"#"
  6184. + "nurse1*nurse1nm*nurse1deptcd*nurse1deptnm*015" +"#"
  6185. + "nurse2*nurse2nm*nurse2deptcd*nurse2deptnm*017"
  6186. var tNode = sData.split("#");
  6187. var wNode = tNode[pIdx].split("*");
  6188. var wDoc = eval("inp_"+wNode[1]);
  6189. model.setValue(xPathData+sPath+wNode[0], "");
  6190. model.setValue(xPathData+sPath+wNode[2], "");
  6191. model.setValue(xPathData+sPath+wNode[3], "");
  6192. if (wDoc.currentText == "") {
  6193. wDoc.attribute("color") = "";
  6194. wDoc.refresh();
  6195. return;
  6196. }
  6197. fUserEnter(xPathData,sPath+wNode[0], sPath+wNode[1], sPath+wNode[2], sPath+wNode[3], wDoc.currentText, wDoc,"all",wNode[4]);
  6198. model.removeNodeset("/root/UserData/list");
  6199. if (model.getValue(xPathData+sPath+wNode[0]) =="") {
  6200. wDoc.attribute("color") = "#D22D2D";
  6201. } else {
  6202. wDoc.attribute("color") = "";
  6203. }
  6204. wDoc.refresh();
  6205. }
  6206. // Grid 선택 / 취소
  6207. function fGridCheckToggle(pGrid, pGridNode, pCheck, pValue){
  6208. var wValue = "";
  6209. // 그리드 이벤트가 발생하면 그리드에서 선택된 로우들의 index를 받아옴
  6210. var iRow = pGrid.row; // Grid의 첫 선택 Row
  6211. var sRow = pGrid.selectedRows; // 선택 Grid 수
  6212. var eRow = pGrid.selectedRow(0); // Grid의 첫 선택 Row
  6213. var tRow = pGrid.rows; // Grid의 전체수
  6214. if (instance1.selectSingleNode(pGridNode).childNodes.length == 0) return;
  6215. if (event.ctrlKey == 1) { // ctrlKey 를 누르고 row 선택시 각 그리드의 상태값 변경
  6216. wValue = model.getValue(pGridNode+"/MnpmcartList["+pGrid.row+"]/"+pCheck );
  6217. model.setValue(pGridNode+"/MnpmcartList["+pGrid.row+"]/"+pCheck,((wValue == pValue) ? "" : pValue));
  6218. }
  6219. else if (event.shiftKey == 1) { // shiftKey를 누르고 처음위치와 마지막 위치를 선택하면 선택된 row의 상태값이 변경
  6220. fGridCheckClear(pGridNode,tRow, pCheck);
  6221. if (iRow == eRow){
  6222. fGridCheckSetting(pGridNode, iRow, iRow+sRow,pCheck, pValue);
  6223. } else{
  6224. fGridCheckSetting(pGridNode, eRow, iRow ,pCheck, pValue);
  6225. }
  6226. } else { // 마우스를 클릭한 상태에서 드래하면 처음 위치부터 마지막 위치까지 선택된 row의 상태값이 변경
  6227. fGridCheckClear(pGridNode,tRow, pCheck);
  6228. if (sRow == "1"){
  6229. wValue = model.getValue(pGridNode+"/MnpmcartList["+pGrid.row+"]/"+pCheck );
  6230. model.setValue(pGridNode+"/MnpmcartList["+pGrid.row+"]/"+pCheck ,((wValue == pValue) ? "" : pValue));
  6231. } else {
  6232. if (iRow == eRow){
  6233. fGridCheckSetting(pGridNode, iRow, iRow+sRow-1, pCheck, pValue);
  6234. }else{
  6235. fGridCheckSetting(pGridNode, eRow, iRow , pCheck, pValue);
  6236. }
  6237. }
  6238. }
  6239. pGrid.refresh();
  6240. }
  6241. // // Grid 전 선택값을 Clear 한다.
  6242. // function fGridCheckClear(pGNode, pRow, pCheck){
  6243. //
  6244. // // alert( pGNode);
  6245. //
  6246. // for(ii=1 ; ii < pRow ; ii++){
  6247. // model.setValue(pGNode+"/MnpmcartList["+ii+"]/"+pCheck , "");
  6248. // }
  6249. // }
  6250. //
  6251. // // Grid 전선택값을 Settting 한다.
  6252. // function fGridCheckSetting(pGNode, pSRow, pERow, pCheck, pVal){
  6253. //
  6254. // for (j = pSRow ; j <= pERow ; j++) {
  6255. // model.setValue(pGNode+"/MnpmcartList["+j+"]/"+pCheck , pVal);
  6256. // }
  6257. // }
  6258. // datagrid 에서 선택되어 있는 셀들의 collection 을 반환한다.
  6259. function fSelectedCells(pGrid){
  6260. if (pGrid.row < 2) return;
  6261. var selectedCells = pGrid.selectedCells;
  6262. var sCell = selectedCells.item(0);
  6263. var eCell = selectedCells.item(selectedCells.length-1);
  6264. if (sCell.col < grd_count.colRef("nursnm11") || sCell.col > pGrid.colRef("nursnm42") || sCell.row == eCell.row && sCell.col == eCell.col) return ;
  6265. var cPath = "/root/main/MnphopcoLists/mnphopcolist";
  6266. var tTail = "11 12 21 22 31 32 41 42";
  6267. var sTail = tTail.split(" ");
  6268. var sPosId =(sCell.col % pGrid.colRef("nursnm11"));
  6269. var sInPos =(sCell.col % 2);
  6270. var sNursnm = model.getValue(cPath + "[" +(sCell.row - 1)+"]/nursnm" + sTail[sPosId]);
  6271. var sNursid = model.getValue(cPath + "[" +(sCell.row - 1)+"]/nursid" + sTail[sPosId]);
  6272. var sDeptcd = model.getValue(cPath + "[" +(sCell.row - 1)+"]/deptcd" + sTail[sPosId]);
  6273. var sDeptnm = model.getValue(cPath + "[" +(sCell.row - 1)+"]/deptnm" + sTail[sPosId]);
  6274. if (sNursid == "") {
  6275. if (sNursnm != "") {
  6276. alert("선택 카운터를 확인 하십시요!!!");
  6277. return;
  6278. }
  6279. }
  6280. for (var i=1; i < selectedCells.length; i++) {
  6281. eCell = selectedCells.item(i);
  6282. if (eCell) {
  6283. if (sInPos == (eCell.col % 2) && eval(eCell.col) < pGrid.colRef("samey") && eval(eCell.col) > pGrid.colRef("packqty")) {
  6284. if (model.getValue(cPath + "[" +(eCell.row - 1)+"]/nacls") == "false") {
  6285. sPosId = (eCell.col % pGrid.colRef("nursnm11"));
  6286. model.setValue(cPath + "[" +(eCell.row - 1)+"]/nursnm" + sTail[sPosId], sNursnm);
  6287. model.setValue(cPath + "[" +(eCell.row - 1)+"]/nursid" + sTail[sPosId], sNursid);
  6288. model.setValue(cPath + "[" +(eCell.row - 1)+"]/deptcd" + sTail[sPosId], sDeptcd);
  6289. model.setValue(cPath + "[" +(eCell.row - 1)+"]/deptnm" + sTail[sPosId], sDeptnm);
  6290. }
  6291. }
  6292. }
  6293. }
  6294. }
  6295. //Catheter User Check
  6296. function fCatheterUserEnter(pDoc, pPath1, pPath2, pIdx) {
  6297. var sPath = "/warmcoldregmspec/warmcoldregm/"+pPath1+"/"+pPath2 ;
  6298. var sPath2 = "/warmcoldregmspec/warmcoldregm/"+pPath1+"/"+pPath2+"id";
  6299. var qCls = "D"; // 의사
  6300. if (pIdx != 1) qCls = (pIdx == 2) ? "N" : "A";
  6301. model.setValue(xPathData + sPath2, "");
  6302. if (pDoc.currentText == "") {
  6303. pDoc.attribute("color") = "";
  6304. pDoc.refresh();
  6305. return;
  6306. }
  6307. fUserEnter(xPathData,sPath2, sPath, "", "", pDoc.currentText, pDoc, "all", qCls);
  6308. if (model.getValue(xPathData + sPath2) =="") {
  6309. pDoc.attribute("color") = "#D22D2D";
  6310. } else {
  6311. pDoc.attribute("color") = "";
  6312. }
  6313. pDoc.refresh();
  6314. }
  6315. //
  6316. function fCatheterCheck(pData){
  6317. if (fCheckBoxValueCheck(eval("chk_"+pData+"check").value, 'X') ) {
  6318. fClearGroup(eval("grp_warmcoldregm_"+pData), 4);
  6319. eval("chk_"+pData+"check").value = "X" ;
  6320. eval("grp_"+pData).disabled = "true";
  6321. eval("chk_"+pData+"preop" ).disabled = "true";
  6322. eval("chk_"+pData+"intraop").disabled = "true";
  6323. eval("chk_"+pData+"postop" ).disabled = "true";
  6324. }
  6325. else {
  6326. eval("grp_"+pData).disabled = "false";
  6327. eval("chk_"+pData+"preop" ).disabled = "false";
  6328. eval("chk_"+pData+"intraop").disabled = "false";
  6329. eval("chk_"+pData+"postop" ).disabled = "false";
  6330. }
  6331. }
  6332. // ※ 전자서명 호출
  6333. function fSignProcessSet(pIdx) {
  6334. //2008-07-28 오후 12:28:31 인증시 수술 후 진단명 정보(진료에서 조회한 내역은 삭제 후 저장시킴. taebum
  6335. model.removeNodeset("/root/main/MnphopcrData/MnphopcrList/oprddata");
  6336. certkind = "1";
  6337. var updtdata = getGridUpdateData(grd_skinsurveylist);
  6338. if (Sign.signprocess() == true){ // ▶ 전자인증 관련 환자 인적 정보를 보내줌.
  6339. var wSigninfo = "pid" +"▦" // 01 등록번호
  6340. + "orddd" +"▦" // 02 입원일자(입원,응급)/진료일자(외래)
  6341. + "cretno" +"▦" // 03 생성번호
  6342. + "signno" +"▦" // 04 서명번호(인증번호)
  6343. + "recdd" +"▦" // 05 실제 기록이 이루어진 기록일자
  6344. + "rectm" +"▦" // 06 실제 기록이 이루어진 기록시간
  6345. + "recsaveflag" +"▦" // 07 전자서명 인적정보 변경여부(기록일시 변경되는 경우 : Y, 그외 : N)
  6346. + "signflag" +"▦" // 08 서명자료구분(01 : 진료, 02 : 간호, 03 : LIS, 04 : 진료지원)
  6347. + "signgenrflag" +"▦" // 09 외래/입원구분(코드정의서 M0010 참조)
  6348. + "formcd" +"▦" // 10 각 기록지별 서식코드 0000002473 N57 간호 수술간호기록
  6349. + "orddeptcd" +"▦" // 11 진료부서코드
  6350. + "orddrid" +"▦" // 12 진료의사ID (집도의)
  6351. + "signbfcnts" +"▦" // 13 ▶ 인증할 데이터 정보(미기록 노드 제거된 정보)
  6352. + "signaftcnts" +"▩" // 14 ▶ 공인인증 처리후 데이터
  6353. + sPid +"▦" // 01 등록번호
  6354. + sIndd +"▦" // 02 입원일자(입원,응급)/진료일자(외래)
  6355. + sCretno +"▦" // 03 생성번호
  6356. + model.getValue(xPathData+"/certno" )+"▦" // 04 서명번호(인증번호)
  6357. + getCurrentDate() +"▦" // 05 실제 기록이 이루어진 기록일자
  6358. + getCurrentTime() +"▦" // 06 실제 기록이 이루어진 기록시간
  6359. + "N" +"▦" // 07 전자서명 인적정보 변경여부(기록일시 변경되는 경우 : Y, 그외 : N)
  6360. + "02" +"▦" // 08 서명자료구분(01 : 진료, 02 : 간호, 03 : LIS, 04 : 진료지원)
  6361. + sSignGernalFlag +"▦" // 09 외래/입원구분(코드정의서 M0010 참조) 2008-05-27 오후 3:32:35 김태범 null 값 넘어오는 부분 수정
  6362. + "0000002473" +"▦" // 10 각 기록지별 서식코드 0000002473 N57 간호 수술간호기록
  6363. + model.getValue(xPathData+"/orddeptcd" )+"▦" // 11 진료부서코드
  6364. + model.getValue(xPathData+"/perfdrid" )+"▦" // 12 진료의사ID (집도의)
  6365. + Sign.signedInfos[1] +"▦" // 13 ▶ 인증할 데이터 정보(미기록 노드 제거된 정보)
  6366. + Sign.signedInfos[2] +"▩"; // 14 ▶ 공인인증 처리후 데이터
  6367. model.makeValue("/root/send/signinfo" , wSigninfo);
  6368. model.makeNode("/root/send/signinfo2");
  6369. if(updtdata != "" && updtdata != null) {
  6370. certkind = "2"
  6371. Sign.certreload = false;
  6372. if(Sign.signprocess()) {
  6373. var vSignData = "pid" +"▦" // 01 등록번호
  6374. + "orddd" +"▦" // 02 입원일자(입원,응급)/진료일자(외래)
  6375. + "cretno" +"▦" // 03 생성번호
  6376. + "signno" +"▦" // 04 서명번호(인증번호)
  6377. + "recdd" +"▦" // 05 실제 기록이 이루어진 기록일자
  6378. + "rectm" +"▦" // 06 실제 기록이 이루어진 기록시간
  6379. + "recsaveflag" +"▦" // 07 전자서명 인적정보 변경여부(기록일시 변경되는 경우 : Y, 그외 : N)
  6380. + "signflag" +"▦" // 08 서명자료구분(01 : 진료, 02 : 간호, 03 : LIS, 04 : 진료지원)
  6381. + "signgenrflag" +"▦" // 09 외래/입원구분(코드정의서 M0010 참조)
  6382. + "formcd" +"▦" // 10 각 기록지별 서식코드 0000002473 N57 간호 수술간호기록
  6383. + "orddeptcd" +"▦" // 11 진료부서코드
  6384. + "orddrid" +"▦" // 12 진료의사ID (집도의)
  6385. + "signbfcnts" +"▦" // 13 ▶ 인증할 데이터 정보(미기록 노드 제거된 정보)
  6386. + "signaftcnts" +"▩" // 14 ▶ 공인인증 처리후 데이터
  6387. + sPid +"▦" // 01 등록번호
  6388. + sIndd +"▦" // 02 입원일자(입원,응급)/진료일자(외래)
  6389. + sCretno +"▦" // 03 생성번호
  6390. + sSignNo +"▦" // 04 서명번호(인증번호)
  6391. + getCurrentDate() +"▦" // 05 실제 기록이 이루어진 기록일자
  6392. + getCurrentTime() +"▦" // 06 실제 기록이 이루어진 기록시간
  6393. + "N" +"▦" // 07 전자서명 인적정보 변경여부(기록일시 변경되는 경우 : Y, 그외 : N)
  6394. + "02" +"▦" // 08 서명자료구분(01 : 진료, 02 : 간호, 03 : LIS, 04 : 진료지원)
  6395. + sSignGernalFlag +"▦" // 09 외래/입원구분(코드정의서 M0010 참조) 2008-05-27 오후 3:32:35 김태범 null 값 넘어오는 부분 수정
  6396. + "0900006329" +"▦" // 10 각 기록지별 서식코드 0000002473 N57 간호 수술간호기록
  6397. + model.getValue(xPathData+"/orddeptcd" )+"▦" // 11 진료부서코드
  6398. + model.getValue(xPathData+"/perfdrid" )+"▦" // 12 진료의사ID (집도의)
  6399. + Sign.signedInfos[1] +"▦" // 13 ▶ 인증할 데이터 정보(미기록 노드 제거된 정보)
  6400. + Sign.signedInfos[2] +"▩"; // 14 ▶ 공인인증 처리후 데이터
  6401. model.makeValue("/root/send/signinfo2" , vSignData);
  6402. model.makeValue("/root/send/recsavedata" , updtdata);
  6403. }
  6404. }
  6405. }else{
  6406. return false;
  6407. }
  6408. }
  6409. // ※ 인증데이터 생성함수 만들기
  6410. function fMake_SignData(){
  6411. // ▶ 기록 관련 인스턴스 전체를 copy, 인증에 저장할 모든 Instance AddNode한다.
  6412. if(certkind == "1") {
  6413. model.setValue(xPathData+"/opeudata", "");
  6414. Sign.addnode("/root/main/MnphopcrData" );
  6415. Sign.addnode("/root/main/MnphopcoLists" );
  6416. Sign.addnode("/root/main/SheetData3" );
  6417. Sign.addnode("/root/init/workinst/OpcdData" );
  6418. Sign.addnode("/root/init/workinst/OpeuLists" );
  6419. Sign.addnode("/root/init/workinst/OpOtherData" );
  6420. Sign.addnode("/root/exotinfo/signotlists" );
  6421. Sign.addnode("/root/exotinfo/signexlists" );
  6422. // --------------------------
  6423. var wOprsPath = Sign.XPATH_SIGNINFO + "/MnphopcrData/MnphopcrList";
  6424. //-----------(20110314) 경북대
  6425. //count list의 비고란 추가
  6426. model.setValue(wOprsPath+"/opcntlistremark", model.getValue("/root/main/MnphopcrData/MnphopcrList/opcntlistremark"));
  6427. //implant/prosthesis 비고란 추가
  6428. model.setValue(wOprsPath+"/implantcmt", model.getValue("/root/main/MnphopcrData/MnphopcrList/implantcmt"));
  6429. //수술중 사용한 약품 비고란 추가
  6430. model.setValue(wOprsPath+"/drugcmt", model.getValue("/root/main/MnphopcrData/MnphopcrList/drugcmt"));
  6431. //-----------(20110314) 경북대
  6432. // 수술구분
  6433. var oFlag = model.getValue(wOprsPath+"/optrustflag");
  6434. if (oFlag =="1") model.setValue(wOprsPath+"/optrustflag", "정규");
  6435. if (oFlag =="2") model.setValue(wOprsPath+"/optrustflag", "응급");
  6436. if (oFlag =="3") model.setValue(wOprsPath+"/optrustflag", "추가");
  6437. // Time Out
  6438. var TimeCheck = model.getValue(wOprsPath + "/opbfpatcnfmspec/opbfpatcnfm/opcnfcheck");
  6439. // 수술부위
  6440. var TimeCheck2 = model.getValue(wOprsPath + "/oppart");
  6441. var TimeData = " ";
  6442. if (TimeCheck == "") {
  6443. TimeData += "환자명 등록번호 집도의 수술부위";
  6444. } else {
  6445. TimeData += (TimeCheck.indexOf("1") != -1) ? "v 환자명 " :"";
  6446. TimeData += (TimeCheck.indexOf("2") != -1) ? "v 등록번호 " :"";
  6447. TimeData += (TimeCheck.indexOf("3") != -1) ? "v 집도의 " :"";
  6448. TimeData += (TimeCheck.indexOf("4") != -1) ? "v 수술부위" :"";
  6449. }
  6450. if (TimeCheck2 !="") TimeData += TimeCheck2;
  6451. model.setValue(wOprsPath + "/oppart" , TimeData);
  6452. // 피부 소독제
  6453. var Skindinfkind = model.getValue(wOprsPath + "/skindinfspec/skindinf/Skindinfkind");
  6454. var tempSkindinfkind = Skindinfkind.split(" ");
  6455. var tmpLabel;
  6456. var skindLabel1 = "", skindLabel2= "", skindLabel3= "", skindLabel4= "", skindLabel5= "", skindLabel6= "", skindLabel7= "", skindLabel8 = "", skindLabel9 = "", skindLabel10 = "";
  6457. for( var j = 0; j < tempSkindinfkind.length; j++ ) {
  6458. tmpLabel = tempSkindinfkind[j];
  6459. if( tmpLabel == "BetadineSoap" ) {
  6460. skindLabel1 = "Betadine Soap ";
  6461. }else if( tmpLabel == "BetadineSolution" ) {
  6462. skindLabel2 = "Betadine Solution ";
  6463. }else if( tmpLabel == "Alcohol" ) {
  6464. skindLabel3 = "Alcohol ";
  6465. }else if( tmpLabel == "H2O2" ) {
  6466. skindLabel4 = "H2O2 ";
  6467. }else if( tmpLabel == "Chlorhexidine4%+Alcohol" ) {
  6468. skindLabel5 = "Chlorhexidine4%+Alcohol ";
  6469. }else if( tmpLabel == "Chlorhexidine0.5%" ) {
  6470. skindLabel6 = "Chlorhexidine0.5% ";
  6471. }else if( tmpLabel == "SalineIrrigation" ) {
  6472. skindLabel7 = "SalineIrrigation ";
  6473. }else if( tmpLabel == "기타" ) {
  6474. skindLabel8 = "기타 ";
  6475. }else if( tmpLabel == "ChlorhexidineSoap" ) {
  6476. skindLabel9 = "Chlorhexidine Soap ";
  6477. }else if( tmpLabel == "IodineTincture1%" ) {
  6478. skindLabel10 = "Iodine Tincture 1% ";
  6479. }
  6480. }
  6481. /*var sKind = (Skindinfkind.indexOf("BetadineSoap" ) != -1) ? "Betadine Soap " : ""
  6482. + (Skindinfkind.indexOf("BetadineSolution" ) != -1) ? "Betadine Solution " : ""
  6483. + (Skindinfkind.indexOf("Alcohol" ) != -1) ? "Alcohol " : ""
  6484. + (Skindinfkind.indexOf("H2O2" ) != -1) ? "H2O2 " : ""
  6485. + (Skindinfkind.indexOf("Chlorhexidine4%+Alcohol") != -1) ? "Chlorhexidine4%+Alcohol " : ""
  6486. + (Skindinfkind.indexOf("Chlorhexidine0.05%" ) != -1) ? "Chlorhexidine0.05% " : ""
  6487. + (Skindinfkind.indexOf("SalineIrrigation" ) != -1) ? "SalineIrrigation " : ""
  6488. + (Skindinfkind.indexOf("기타" ) != -1) ? "기타 " : ""
  6489. + model.getValue(wOprsPath + "/skindinfspec/skindinf/SkindOther") ;*/
  6490. var sKind = skindLabel1
  6491. + skindLabel2
  6492. + skindLabel3
  6493. + skindLabel4
  6494. + skindLabel5
  6495. + skindLabel6
  6496. + skindLabel7
  6497. + skindLabel9
  6498. + skindLabel10
  6499. + skindLabel8 ; // 기타가 마지막으로..
  6500. // -- SkindOther 정보는 XSL 파일에서 조합된다.
  6501. //+ model.getValue(wOprsPath + "/skindinfspec/skindinf/SkindOther");
  6502. //2010.02.22 K. J. M 피부소독제 선택한 모든 데이터 저장되도록 수정
  6503. model.setValue(wOprsPath + "/skindinfspec/skindinf/Skindinfkind", sKind);
  6504. //--------(20110512)
  6505. model.setValue(wOprsPath + "/opdiscordspec/opdiscord", opdiscordspec);
  6506. //alert(instance1.selectSingleNode(xPathData+"/opdiscordspec").xml);
  6507. //--------(20110512)
  6508. model.setValue(wOprsPath + "/implantcmt", model.getValue(wOprsPath+"/implantcmt"));
  6509. model.setValue(wOprsPath + "/spccmt", model.getValue(wOprsPath+"/spccmt"));
  6510. var wKind = "";
  6511. var wKindNm = "";
  6512. var sRowCnt = grd_opposture.rows - grd_opposture.fixedrows;
  6513. //인증 내역 코드를 명칭으로 바꾸는 부분 taebum
  6514. for (var i=1; i <= sRowCnt; i++){
  6515. wKind = model.getValue(wOprsPath + "/opposturespec/opposture/opposturelist["+i+"]/opposturekind");
  6516. wKindNm = model.getValue("/root/init/M0016list/M0016[cdid ='"+wKind+"']/cdnm");
  6517. model.setValue(wOprsPath + "/opposturespec/opposture/opposturelist["+i+"]/opposturekind", wKindNm);
  6518. }
  6519. //2008-08-01 오전 9:55:41 add taebum
  6520. //1. 삭모
  6521. var wCuthairflag = model.getValue(wOprsPath + "/cuthairflag");
  6522. var wCuthairflagNm = "";
  6523. if(wCuthairflag != "" && wCuthairflag != "undefined" && wCuthairflag != null){
  6524. if(wCuthairflag == "Y"){
  6525. wCuthairflagNm = "예";
  6526. }else if(wCuthairflag == "Y"){
  6527. wCuthairflagNm = "아니오";
  6528. }
  6529. if(wCuthairflagNm != ""){
  6530. model.setValue(wOprsPath + "/cuthairflag", wCuthairflagNm);
  6531. }
  6532. }
  6533. //2. X-ray List
  6534. var wXrayflag = model.getValue(wOprsPath + "/xrayflag");
  6535. var wXrayArr = wXrayflag.split(" ");
  6536. var wXrayflagNm = "";
  6537. if(wXrayflag != "" && wXrayflag != "undefined" && wXrayflag != null){
  6538. for(var k = 0; k < wXrayArr.length; k++){
  6539. if(wXrayArr[k] != "" && wXrayArr[k] != null && wXrayArr[k] != "undefined"){
  6540. switch (wXrayArr[k]) {
  6541. case "0" :
  6542. wXrayflagNm = wXrayflagNm + "해당없음 ";
  6543. break;
  6544. case "1" :
  6545. wXrayflagNm = wXrayflagNm + "Portable ";
  6546. break;
  6547. case "2" :
  6548. wXrayflagNm = wXrayflagNm + "C-arm ";
  6549. break;
  6550. case "3" :
  6551. wXrayflagNm = wXrayflagNm + "조영제 사용 ";
  6552. //var wXraydrugspec = model.getValue(wOprsPath + "/xraydrugspec");
  6553. //if(wXraydrugspec != "" && wXraydrugspec != "undefined" && wXraydrugspec != null){
  6554. // wXrayflagNm = wXrayflagNm + " : " + wXraydrugspec;
  6555. //}
  6556. break;
  6557. default :
  6558. break;
  6559. }
  6560. }
  6561. }
  6562. if(wXrayflagNm != ""){
  6563. model.setValue(wOprsPath + "/xrayflag", wXrayflagNm);
  6564. }
  6565. }
  6566. //3. Dressing
  6567. var wDrsflagflag = model.getValue(wOprsPath + "/drsflag");
  6568. var wDrsflagflagNm = "";
  6569. if(wDrsflagflag != "" && wDrsflagflag != "undefined" && wDrsflagflag != null){
  6570. switch (wDrsflagflag) {
  6571. case "0" :
  6572. wDrsflagflagNm = "해당없음";
  6573. break;
  6574. case "1" :
  6575. wDrsflagflagNm = "Sterile dressing";
  6576. break;
  6577. case "2" :
  6578. wDrsflagflagNm = "Cast";
  6579. break;
  6580. case "3" :
  6581. wDrsflagflagNm = "Splint";
  6582. break;
  6583. case "9" :
  6584. wDrsflagflagNm = "기타 ";
  6585. var wDrsetc = model.getValue(wOprsPath + "/drsetc");
  6586. if(wDrsetc != "" && wDrsetc != "undefined" && wDrsetc != null){
  6587. wDrsflagflagNm = wDrsflagflagNm + " : " + wDrsetc;
  6588. }
  6589. break;
  6590. default :
  6591. break;
  6592. }
  6593. if(wDrsflagflagNm != ""){
  6594. model.setValue(wOprsPath + "/drsflag", wDrsflagflagNm);
  6595. model.removeNodeSet(wOprsPath + "/drsetc");
  6596. }
  6597. }
  6598. //4. 삽관기록
  6599. sRowCnt = grd_inscath.rows - grd_inscath.fixedrows;
  6600. for (var i=1; i <= sRowCnt; i++){
  6601. wKindNm = grd_inscath.labelmatrix(i, 4);
  6602. model.setValue(wOprsPath + "/warmcoldregmspec/lists/cathlist/inscath["+i+"]/actflag", wKindNm);
  6603. wKindNm = grd_inscath.labelmatrix(i, 5);
  6604. model.setValue(wOprsPath + "/warmcoldregmspec/lists/cathlist/inscath["+i+"]/method", wKindNm);
  6605. }
  6606. // 2009-02-04 ycd 기록화면 수정 작업 (체위에 따른 피부변화 기록 항목 삭제)
  6607. //5. 체위에 따른 피부변화
  6608. /*
  6609. sRowCnt = datagrid2.rows - datagrid2.fixedrows;
  6610. for (var i=1; i <= sRowCnt; i++){
  6611. wKindNm = datagrid2.labelmatrix(i, 0);
  6612. model.setValue(wOprsPath + "/postureskinupdtspec/lists/skinlist["+i+"]/apflag", wKindNm);
  6613. wKindNm = datagrid2.labelmatrix(i, 1);
  6614. model.setValue(wOprsPath + "/postureskinupdtspec/lists/skinlist["+i+"]/rlflag", wKindNm);
  6615. wKindNm = datagrid2.labelmatrix(i, 2);
  6616. model.setValue(wOprsPath + "/postureskinupdtspec/lists/skinlist["+i+"]/partcd", wKindNm);
  6617. wKindNm = datagrid2.labelmatrix(i, 3);
  6618. model.setValue(wOprsPath + "/postureskinupdtspec/lists/skinlist["+i+"]/opbstat", wKindNm);
  6619. wKindNm = datagrid2.labelmatrix(i, 7);
  6620. model.setValue(wOprsPath + "/postureskinupdtspec/lists/skinlist["+i+"]/opaftstat", wKindNm);
  6621. }
  6622. */
  6623. // 2009-02-04 ycd 기록화면 수정 작업 (온냉요법 항목 삭제)
  6624. //6. 온냉요법
  6625. /*
  6626. sRowCnt = datagrid3.rows - datagrid3.fixedrows;
  6627. for (var i=1; i <= sRowCnt; i++){
  6628. wKindNm = datagrid3.labelmatrix(i, 0);
  6629. model.setValue(wOprsPath + "/warmcoldregmspec/lists/warmlist/warmcoldregm["+i+"]/partcd", wKindNm);
  6630. wKindNm = datagrid3.labelmatrix(i, 1);
  6631. model.setValue(wOprsPath + "/warmcoldregmspec/lists/warmlist/warmcoldregm["+i+"]/kindflag", wKindNm);
  6632. wKindNm = datagrid3.labelmatrix(i, 2);
  6633. model.setValue(wOprsPath + "/warmcoldregmspec/lists/warmlist/warmcoldregm["+i+"]/apppart", wKindNm);
  6634. wKindNm = datagrid3.labelmatrix(i, 3);
  6635. model.setValue(wOprsPath + "/warmcoldregmspec/lists/warmlist/warmcoldregm["+i+"]/appkind", wKindNm);
  6636. }
  6637. */
  6638. //7. 적출물기록
  6639. //Grid 정보 - 감염정보가 중복되어 있으므로 속도개선을 위하여 1번째 컬럼명만 한글로 대체함 2번째 줄부터는 코드로 인증
  6640. var wInfectyn = model.getValue(Sign.XPATH_SIGNINFO + "/signexlists/eolist/infectyn");
  6641. var wInfectynNm = "";
  6642. if(wInfectyn != "" && wInfectyn != null && wInfectyn != "undefined"){
  6643. switch (wInfectyn) {
  6644. case "Y" :
  6645. wInfectynNm = "예";
  6646. break;
  6647. case "N" :
  6648. wInfectynNm = "아니오";
  6649. break;
  6650. default :
  6651. break;
  6652. }
  6653. model.setValue(Sign.XPATH_SIGNINFO + "/signexlists/eolist/infectyn", wInfectynNm);
  6654. }
  6655. var wInfectflag = model.getValue(Sign.XPATH_SIGNINFO + "/signexlists/eolist/infectflag");
  6656. var wInfectflagNm = "";
  6657. var wInfectetc = "";
  6658. if(wInfectflag != "" && wInfectflag != null && wInfectflag != "undefined"){
  6659. var wInfectflagArr = wInfectflag.split(" ");
  6660. if(wInfectflagArr.length > 0){
  6661. for(var k = 0; k < wInfectflagArr.length; k++){
  6662. switch (wInfectflagArr[k]) {
  6663. case "01" :
  6664. wInfectflagNm = wInfectflagNm + "* HBs Ag ";
  6665. break;
  6666. case "02" :
  6667. wInfectflagNm = wInfectflagNm + "* HCV Ab ";
  6668. break;
  6669. case "03" :
  6670. wInfectflagNm = wInfectflagNm + "* VDRL ";
  6671. break;
  6672. case "04" :
  6673. wInfectflagNm = wInfectflagNm + "* HIV ";
  6674. break;
  6675. case "05" :
  6676. wInfectflagNm = wInfectflagNm + "* active TB ";
  6677. break;
  6678. //case "06" :
  6679. // wInfectflagNm = "* 기타";
  6680. // wInfectetc = model.getValue(Sign.XPATH_SIGNINFO + "/signexlists/eolist/infectetc");
  6681. // if(wInfectetc != "" && wInfectetc != null && wInfectetc != "undefined"){
  6682. // wInfectflagNm = wInfectflagNm+ " : "+wInfectetc+" ";
  6683. // }
  6684. // break;
  6685. default :
  6686. break;
  6687. }
  6688. }
  6689. model.setValue(Sign.XPATH_SIGNINFO + "/signexlists/eolist/infectflag", wInfectflagNm);
  6690. }
  6691. }
  6692. //8. 장기이식 기록
  6693. sRowCnt = getNodesetCount(Sign.XPATH_SIGNINFO+"/signotlists/organlist");
  6694. var wOtflag = "";
  6695. var wOtsendrecvflag = "";
  6696. var wOtkind = "";
  6697. var wChargspecimenflag = "";
  6698. var wTempNm = "";
  6699. for (var k=1; k <= sRowCnt; k++){
  6700. wOtflag = model.getValue(Sign.XPATH_SIGNINFO+"/signotlists/organlist["+k+"]/otflag");
  6701. wOtsendrecvflag = model.getValue(Sign.XPATH_SIGNINFO+"/signotlists/organlist["+k+"]/otsendrecvflag");
  6702. wOtkind = model.getValue(Sign.XPATH_SIGNINFO+"/signotlists/organlist["+k+"]/otkind");
  6703. wChargspecimenflag = model.getValue(Sign.XPATH_SIGNINFO+"/signotlists/organlist["+k+"]/chargspecimenflag");
  6704. wTempNm = "";
  6705. switch (wOtflag) {
  6706. case "L" :
  6707. wTempNm = "생체 ";
  6708. break;
  6709. case "C" :
  6710. wTempNm = "뇌사 ";
  6711. break;
  6712. default :
  6713. break;
  6714. }
  6715. model.setValue(Sign.XPATH_SIGNINFO+"/signotlists/organlist["+k+"]/otflag", wTempNm);
  6716. wTempNm = "";
  6717. switch (wOtsendrecvflag) {
  6718. case "D" :
  6719. wTempNm = "Donor ";
  6720. break;
  6721. case "R" :
  6722. wTempNm = "Recipient ";
  6723. break;
  6724. default :
  6725. break;
  6726. }
  6727. model.setValue(Sign.XPATH_SIGNINFO+"/signotlists/organlist["+k+"]/otsendrecvflag", wTempNm);
  6728. wTempNm = "";
  6729. switch (wOtkind) {
  6730. case "01" :
  6731. wTempNm = "간";
  6732. break;
  6733. case "02" :
  6734. wTempNm = "각막";
  6735. break;
  6736. case "03" :
  6737. wTempNm = "골수";
  6738. break;
  6739. case "04" :
  6740. wTempNm = "소장";
  6741. break;
  6742. case "06" :
  6743. wTempNm = "심장";
  6744. break;
  6745. case "07" :
  6746. wTempNm = "췌장";
  6747. break;
  6748. case "08" :
  6749. wTempNm = "폐";
  6750. break;
  6751. case "09" :
  6752. wTempNm = "뼈";
  6753. break;
  6754. case "10" :
  6755. wTempNm = "판막";
  6756. break;
  6757. default :
  6758. break;
  6759. }
  6760. model.setValue(Sign.XPATH_SIGNINFO+"/signotlists/organlist["+k+"]/otkind", wTempNm);
  6761. wTempNm = "";
  6762. switch (wChargspecimenflag) {
  6763. case "Y" :
  6764. wTempNm = "예";
  6765. break;
  6766. case "N" :
  6767. wTempNm = "아니오";
  6768. break;
  6769. default :
  6770. break;
  6771. }
  6772. model.setValue(Sign.XPATH_SIGNINFO+"/signotlists/organlist["+k+"]/chargspecimenflag", wTempNm);
  6773. }
  6774. } else {
  6775. model.removeNodeSet(Sign.XPATH_SIGNINFO);
  6776. model.makeNode(Sign.XPATH_SIGNINFO);
  6777. Sign.addnode("/root/main/SheetData3/skinserveyinfo");
  6778. var SignPath = Sign.XPATH_SIGNINFO + "/skinserveyinfo/skinserveylist";
  6779. for(var i = 0 ; i <= getNodesetCount(SignPath) ; i++){
  6780. var sSurveyPriod = model.getValue(SignPath + "["+i+"]/surveypriod");
  6781. var sSurveyPlace = model.getValue(SignPath + "["+i+"]/surveyplace");
  6782. var sSkinStat = model.getValue(SignPath + "["+i+"]/skinstat");
  6783. if( sSurveyPriod != "-" && sSurveyPriod != "" ){
  6784. model.setValue(SignPath + "["+ i +"]/surveypriod", model.getValue("/root/init/M0559list/M0559[cdid = '" + sSurveyPriod +"' ]/cdnm"));
  6785. }
  6786. if( sSurveyPlace != "-" && sSurveyPlace != "" ){
  6787. model.setValue(SignPath + "["+ i +"]/surveyplace", model.getValue("/root/init/M0560list/M0560[cdid = '" + sSurveyPlace +"' ]/cdnm"));
  6788. }
  6789. if(sSkinStat != "" ){
  6790. model.setValue(SignPath + "["+ i +"]/skinstat", model.getValue("/root/code/codeinfo/codelist[cdgrupid = '137' and cdid = '" + sSkinStat +"' ]/cdnm"));
  6791. }
  6792. }
  6793. }
  6794. }
  6795. /* ------------------------------------------------- */
  6796. /* SMMNP00300_수술기록 */
  6797. /* 인증 저장 시 Call */
  6798. /* ------------------------------------------------- */
  6799. /* group : EMR 간호 수술마취 */
  6800. /* ver : 2008-07-27 오후 3:18:21 */
  6801. /* by : 김태범 */
  6802. /* --------------------------------------------------*/
  6803. /* type : function */
  6804. /* access : public */
  6805. /* desc : 수술간호기록 */
  6806. /* 인증저장 시 적출물, 장기이식정보 저장 */
  6807. /* param : */
  6808. /* return : */
  6809. /* --------------------------------------------------*/
  6810. function fGetExtcOtRecord(){
  6811. model.setValue("/root/exotinfo/searchinfo/oprsrvno", sOprsrvno);
  6812. submit("TRMNP00319", false);
  6813. //2008-07-29 오전 1:48:22 인증 내역에 장기이식, 적출물을 포함하기 위한 선처리 작업
  6814. var sExOtListXpath = "/root/exotinfo/extotlists/datalists";
  6815. var NodeCnt = getNodesetCnt(model, sExOtListXpath+"/organlist"); //장기이식
  6816. if (NodeCnt > 0){
  6817. for (var i =1; i <= NodeCnt; i++){
  6818. model.makeNode("/root/exotinfo/signotlists/organlist["+i+"]");
  6819. model.copyNode("/root/exotinfo/signotlists/organlist["+i+"]", sExOtListXpath+"/organlist["+i+"]");
  6820. }
  6821. }
  6822. NodeCnt = getNodesetCnt(model, sExOtListXpath+"/eolist"); //적출물
  6823. if (NodeCnt > 0){
  6824. for (var i =1; i <= NodeCnt; i++){
  6825. model.makeNode("/root/exotinfo/signexlists/eolist["+i+"]");
  6826. model.copyNode("/root/exotinfo/signexlists/eolist["+i+"]", sExOtListXpath+"/eolist["+i+"]");
  6827. }
  6828. }
  6829. // 진정기록(관찰기록) 데이타_ 손성훈.
  6830. NodeCnt = getNodesetCnt(model, sExOtListXpath+"/oblists"); //관찰기록 _ 손성훈.
  6831. model.removeNode("/root/exotinfo/signexlists/oblists"); // 현재 저장 되어 있는 관찰기록정보를 인증저장하기위해.
  6832. if (NodeCnt > 0){
  6833. for (var i =1; i <= NodeCnt; i++){
  6834. model.makeNode("/root/exotinfo/signexlists/oblists["+i+"]");
  6835. model.copyNode("/root/exotinfo/signexlists/oblists["+i+"]", sExOtListXpath+"/oblists["+i+"]");
  6836. }
  6837. }
  6838. }
  6839. /* ------------------------------------------------- */
  6840. /* SMMNP00300_수술기록 */
  6841. /* On Load 시 Call */
  6842. /* ------------------------------------------------- */
  6843. /* group : EMR 간호 수술마취 */
  6844. /* ver : 2008.05.15 */
  6845. /* by : 김태범 */
  6846. /* --------------------------------------------------*/
  6847. /* type : function */
  6848. /* access : public */
  6849. /* desc : 수술간호기록1 */
  6850. /* 진료진(수술실,회복실-의사,간호사) 조회 */
  6851. /* param : */
  6852. /* return : */
  6853. /* --------------------------------------------------*/
  6854. function fSheet1TimeOutAddInfo() {
  6855. model.removenode("/root/send");
  6856. //parameter info(group구분) : 011▦015▦012▦017▦(집도의, 수술간호사, 마취의, 마취간호사)
  6857. model.makeValue("root/send/data1","011▦015▦012▦017▦");//마지막 데이터는 집도의의 로그인 부서정보
  6858. var sUserDeptcd = getUserInfo("dutplcecd");
  6859. var sDeptcd = model.getValue("/root/main/operation/list/perfdeptcd");//opinfo의 perfdeptcd
  6860. var sOpcnfmdd = model.getValue("/root/main/operation/list/opcnfmdd");//opinfo의 수술확정일자
  6861. model.makeValue("root/send/data2", sUserDeptcd);//log in한 부서코드
  6862. model.makeValue("root/send/data3", sDeptcd); //집도과 부서코드
  6863. model.makeValue("root/send/data4", sOpcnfmdd); //수술확정일자
  6864. // 2009-02-02 ycd 기록 항목 제거하여 별도 처리
  6865. submit("TRMNP00309", false);
  6866. // 2009-02-02 ycd 기록 항목 제거로 인하여 주석 처리
  6867. /*
  6868. if(submit("TRMNP00309", false)){
  6869. //각 콤보 박스에 빈row 추가.
  6870. addComboItem( "cmb_perfdr", " ", "", "above" );
  6871. addComboItem( "cmb_nurse1", " ", "", "above" );
  6872. addComboItem( "cmb_anstdr", " ", "", "above" );
  6873. addComboItem( "cmb_nurse2", " ", "", "above" );
  6874. addComboItem( "combo2" , " ", "", "above" );
  6875. }
  6876. */
  6877. //협진 수술일 경우 주수술기록의 TimeOut 정보를 가져온다.
  6878. if((model.getValue(xPathData+"/oprsrvno") != model.getValue(xPathData+"/mainoprsrvno")) &&
  6879. (model.getValue(xPathData+"/mainoprsrvno") != "-" ) ){
  6880. //2009-02-02 ycd 기록 항목 제거로 인하여 주석 처리
  6881. /*
  6882. if(model.getValue("/root/main/MnphopcrData/MnphopcrList/timeoutspec/timeout/perfdr") == "" ||
  6883. model.getValue("/root/main/MnphopcrData/MnphopcrList/timeoutspec/timeout/perfdr") == null ||
  6884. model.getValue("/root/main/MnphopcrData/MnphopcrList/timeoutspec/timeout/perfdr") == "undefined"){
  6885. var sMainoptimeoutinfo = model.getValue("/root/main/MnphopcrData/MnphopcrList/mainoptimeoutinfo");
  6886. if(sMainoptimeoutinfo != "" && sMainoptimeoutinfo != null && sMainoptimeoutinfo != "undefined"){
  6887. var sRowArr = sMainoptimeoutinfo.split("▤");
  6888. if(sRowArr.length > 0){
  6889. var sPerInfodArr = sRowArr[0].split("▥");
  6890. var sAnstInfoArr = sRowArr[1].split("▥");
  6891. var sNur1Arr = sRowArr[2].split("▥");
  6892. var sNur2Arr = sRowArr[3].split("▥");
  6893. var sTimeoutcheck = sRowArr[4];
  6894. if(sPerInfodArr[0] != "" && sPerInfodArr[0] != null && sPerInfodArr[0] != "undefined" &&
  6895. sPerInfodArr[1] != "" && sPerInfodArr[1] != null && sPerInfodArr[1] != "undefined"){
  6896. addComboItem( "cmb_perfdr", sPerInfodArr[1] , sPerInfodArr[0], "above" );
  6897. }
  6898. model.setValue("/root/init/HideData/timeOutDisplayInfo/perfdr", sPerInfodArr[0]);
  6899. model.setValue("/root/main/MnphopcrData/MnphopcrList/timeoutspec/timeout/perfdr", sPerInfodArr[0]);
  6900. model.setValue("/root/main/MnphopcrData/MnphopcrList/timeoutspec/timeout/perfdrnm", sPerInfodArr[1]);
  6901. model.setValue("/root/main/MnphopcrData/MnphopcrList/timeoutspec/timeout/pertdrdeptcd", sPerInfodArr[2]);
  6902. model.setValue("/root/main/MnphopcrData/MnphopcrList/timeoutspec/timeout/pertdrdeptnm", sPerInfodArr[3]);
  6903. model.setValue("/root/init/HideData/timeOutDisplayInfo/anstdr", sAnstInfoArr[0]);
  6904. model.setValue("/root/main/MnphopcrData/MnphopcrList/timeoutspec/timeout/anstdr", sAnstInfoArr[0]);
  6905. model.setValue("/root/main/MnphopcrData/MnphopcrList/timeoutspec/timeout/anstdrnm", sAnstInfoArr[1]);
  6906. model.setValue("/root/main/MnphopcrData/MnphopcrList/timeoutspec/timeout/anstdrdeptcd", sAnstInfoArr[2]);
  6907. model.setValue("/root/main/MnphopcrData/MnphopcrList/timeoutspec/timeout/anstdrdeptnm", sAnstInfoArr[3]);
  6908. model.setValue("/root/init/HideData/timeOutDisplayInfo/nurse1", sNur1Arr[0]);
  6909. model.setValue("/root/main/MnphopcrData/MnphopcrList/timeoutspec/timeout/nurse1", sNur1Arr[0]);
  6910. model.setValue("/root/main/MnphopcrData/MnphopcrList/timeoutspec/timeout/nurse1nm", sNur1Arr[1]);
  6911. model.setValue("/root/main/MnphopcrData/MnphopcrList/timeoutspec/timeout/nurse1deptcd", sNur1Arr[2]);
  6912. model.setValue("/root/main/MnphopcrData/MnphopcrList/timeoutspec/timeout/nurse1deptnm", sNur1Arr[3]);
  6913. model.setValue("/root/init/HideData/timeOutDisplayInfo/nurse2", sNur2Arr[0]);
  6914. model.setValue("/root/main/MnphopcrData/MnphopcrList/timeoutspec/timeout/nurse2", sNur2Arr[0]);
  6915. model.setValue("/root/main/MnphopcrData/MnphopcrList/timeoutspec/timeout/nurse2nm", sNur2Arr[1]);
  6916. model.setValue("/root/main/MnphopcrData/MnphopcrList/timeoutspec/timeout/nurse2deptcd", sNur2Arr[2]);
  6917. model.setValue("/root/main/MnphopcrData/MnphopcrList/timeoutspec/timeout/nurse2deptnm", sNur2Arr[3]);
  6918. //model.setValue("/root/main/MnphopcrData/MnphopcrList/timeoutspec/timeout/timeoutcheck", sTimeoutcheck);
  6919. }
  6920. }
  6921. }
  6922. */
  6923. }
  6924. }
  6925. /* -------------------------------------------------------------*/
  6926. /* SMMNP00300_수술기록 */
  6927. /* TimeOut 의료진 Combo value changed시 */
  6928. /* -------------------------------------------------------------*/
  6929. /* group : EMR 간호 수술마취 */
  6930. /* ver : 2008.05.19 */
  6931. /* by : 김태범 */
  6932. /* -------------------------------------------------------------*/
  6933. /* type : function */
  6934. /* access : public */
  6935. /* desc : 수술간호기록1 */
  6936. /* 해당 의료진의 이름,부서,부서코드 mapping */
  6937. /* param : */
  6938. /* return : */
  6939. /* desc : 2009-02-02 ycd 기록 항목 제거로 인하여 사용 안함 */
  6940. /* -------------------------------------------------------------*/
  6941. function fTimeOutComboValueChanged(pFlag){
  6942. var sUseridXpath = ""; //의료진 id
  6943. var sUsernmXpath = ""; //의료진 이름
  6944. var sDeptcdXpath = ""; //의료진 부서코드
  6945. var sDeptnmXpath = ""; //의료진 부서명
  6946. var sOrinalXpath = ""; //서버에서 조회한 의료진 리스트 xPath
  6947. var sDisplayIdXpath = "root/init/HideData/timeOutDisplayInfo"; //사용자 ID Display용 xPath
  6948. var sDisplayCtrlId = "";
  6949. switch(pFlag){
  6950. case "perfdr" : //수술의(집도의)
  6951. sOrinalXpath = "root/init/HideData/timeOutAddInfo/opdoctlist";
  6952. sUseridXpath = "root/main/MnphopcrData/MnphopcrList/timeoutspec/timeout/perfdr";
  6953. sUsernmXpath = "root/main/MnphopcrData/MnphopcrList/timeoutspec/timeout/perfdrnm";
  6954. sDeptcdXpath = "root/main/MnphopcrData/MnphopcrList/timeoutspec/timeout/pertdrdeptcd";
  6955. sDeptnmXpath = "root/main/MnphopcrData/MnphopcrList/timeoutspec/timeout/pertdrdeptnm";
  6956. sDisplayCtrlId = "out_perfdr";
  6957. break;
  6958. case "nurse1" : //수술 간호사
  6959. sOrinalXpath = "root/init/HideData/timeOutAddInfo/opnurlist";
  6960. sUseridXpath = "root/main/MnphopcrData/MnphopcrList/timeoutspec/timeout/nurse1";
  6961. sUsernmXpath = "root/main/MnphopcrData/MnphopcrList/timeoutspec/timeout/nurse1nm";
  6962. sDeptcdXpath = "root/main/MnphopcrData/MnphopcrList/timeoutspec/timeout/nurse1deptcd";
  6963. sDeptnmXpath = "root/main/MnphopcrData/MnphopcrList/timeoutspec/timeout/nurse1deptnm";
  6964. sDisplayCtrlId = "out_nurse1";
  6965. break;
  6966. case "anstdr" : //마취의
  6967. sOrinalXpath = "root/init/HideData/timeOutAddInfo/anstdoclist";
  6968. sUseridXpath = "root/main/MnphopcrData/MnphopcrList/timeoutspec/timeout/anstdr";
  6969. sUsernmXpath = "root/main/MnphopcrData/MnphopcrList/timeoutspec/timeout/anstdrnm";
  6970. sDeptcdXpath = "root/main/MnphopcrData/MnphopcrList/timeoutspec/timeout/anstdrdeptcd";
  6971. sDeptnmXpath = "root/main/MnphopcrData/MnphopcrList/timeoutspec/timeout/anstdrdeptnm";
  6972. sDisplayCtrlId = "out_anstdr";
  6973. break;
  6974. case "nurse2" : //마취간호사
  6975. sOrinalXpath = "root/init/HideData/timeOutAddInfo/anstnurlist";
  6976. sUseridXpath = "root/main/MnphopcrData/MnphopcrList/timeoutspec/timeout/nurse2";
  6977. sUsernmXpath = "root/main/MnphopcrData/MnphopcrList/timeoutspec/timeout/nurse2nm";
  6978. sDeptcdXpath = "root/main/MnphopcrData/MnphopcrList/timeoutspec/timeout/nurse2deptcd";
  6979. sDeptnmXpath = "root/main/MnphopcrData/MnphopcrList/timeoutspec/timeout/nurse2deptnm";
  6980. sDisplayCtrlId = "out_nurse2";
  6981. break;
  6982. default :
  6983. break;
  6984. }
  6985. if(sUsernmXpath !="" && sUsernmXpath != null && sDeptcdXpath != "" && sDeptcdXpath != null &&
  6986. sDeptnmXpath != "" && sDeptnmXpath != null){
  6987. var userid = model.getValue(sUseridXpath);
  6988. model.setValue(sUsernmXpath, model.getValue(sOrinalXpath+"["+"userid='"+userid+"'"+"]/usernm"));
  6989. model.setValue(sDeptcdXpath, model.getValue(sOrinalXpath+"["+"userid='"+userid+"'"+"]/posdeptcd"));
  6990. model.setValue(sDeptnmXpath, model.getValue(sOrinalXpath+"["+"userid='"+userid+"'"+"]/posdeptnm"));
  6991. //사용자 ID Display용 Setting
  6992. model.setValue(sDisplayIdXpath+"/"+pFlag, model.getValue(sUseridXpath));
  6993. switch(sDisplayCtrlId){
  6994. case "out_perfdr" :
  6995. out_perfdr.refresh();
  6996. break;
  6997. case "out_nurse1" :
  6998. out_nurse1.refresh();
  6999. break;
  7000. case "out_anstdr" :
  7001. out_anstdr.refresh();
  7002. break;
  7003. case "out_nurse2" :
  7004. out_nurse2.refresh();
  7005. break;
  7006. }
  7007. }
  7008. }
  7009. /* ------------------------------------------------- */
  7010. /* group : EMR 간호 수술마취 */
  7011. /* ver : 2008.05.19 */
  7012. /* 2009.09.14 그리드로 제어하도록 변경 */
  7013. /* by : 김태범 */
  7014. /* -------------------------------------------------- */
  7015. /* type : function */
  7016. /* access : public */
  7017. /* desc : 수술간호기록2 */
  7018. /* Count List 조회 팝업 버튼 클릭 시 이벤트 */
  7019. /* param : */
  7020. /* return : */
  7021. /* -------------------------------------------------- */
  7022. function fClickCountListPopUpBtn(pRow){
  7023. var xpos = event.screenX;
  7024. var ypos = event.screenY-300;
  7025. var sCodeList = "";
  7026. var sCodeList = "";
  7027. var sCodeRecNo = grd_count.valueMatrix(pRow, grd_count.colRef("recno"));
  7028. var iLength = getNodesetCount("/root/main/MnphopcoLists/mnphopcolist");
  7029. if(iLength > 0){
  7030. //sql query in () 안에 들어갈 쿼리 생성
  7031. for(var i = 1; i <= iLength; i++){
  7032. if(model.getValue("/root/main/MnphopcoLists/mnphopcolist["+i+"]/recno") != sCodeRecNo) continue ;
  7033. if(sCodeList == ""){
  7034. if(model.getValue("/root/main/MnphopcoLists/mnphopcolist["+i+"]/kindcd") == "" ||
  7035. model.getValue("/root/main/MnphopcoLists/mnphopcolist["+i+"]/kindcd") == null ||
  7036. model.getValue("/root/main/MnphopcoLists/mnphopcolist["+i+"]/kindcd") == "undefined"){
  7037. //
  7038. }else{
  7039. sCodeList = "'"+model.getValue("/root/main/MnphopcoLists/mnphopcolist["+i+"]/kindcd")+"'";
  7040. }
  7041. }else{
  7042. if(model.getValue("/root/main/MnphopcoLists/mnphopcolist["+i+"]/kindcd") == "" ||
  7043. model.getValue("/root/main/MnphopcoLists/mnphopcolist["+i+"]/kindcd") == null ||
  7044. model.getValue("/root/main/MnphopcoLists/mnphopcolist["+i+"]/kindcd") == "undefined"){
  7045. //
  7046. }else{
  7047. sCodeList = sCodeList + ", '" + model.getValue("/root/main/MnphopcoLists/mnphopcolist["+i+"]/kindcd")+"'";
  7048. }
  7049. }
  7050. }
  7051. }
  7052. setParameter("SendData_codeQuery", sCodeList+"▦"+model.getValue("/root/init/HideData/oprsrvno")+"▦"+sCodeRecNo);
  7053. modal("SPMNP00304");
  7054. var sResultArr = getParameter("codeQuery_result_data");
  7055. setParameter("SendData_codeQuery", "");
  7056. var tempSeq = "";
  7057. var iInsertCnt = 0;
  7058. var sRebuildFlag = "false";
  7059. if(sResultArr != "" && sResultArr != "undefined" && sResultArr != null){
  7060. /*
  7061. if(grd_count.fixedcellcheckbox(0, grd_count.colRef("nacls")) == false){
  7062. grd_count.fixedcellcheckbox(0, grd_count.colRef("nacls")) = true;
  7063. grd_count.fixedcellcheckbox(1, grd_count.colRef("nacls")) = true;
  7064. grd_count.fixedcellcheckbox(1, grd_count.colRef("samey")) = true;
  7065. grd_count.fixedcellcheckbox(1, grd_count.colRef("samen")) = true;
  7066. }
  7067. */
  7068. //fPackingMergeFalse();
  7069. var sDisplayRowArr = sResultArr.split("▨");
  7070. if(sDisplayRowArr.length > 0){
  7071. for(var i = 1; i < sDisplayRowArr.length; i++){
  7072. iLength = grd_count.Rows - grd_count.fixedRows + 1;
  7073. var iCnt = 0;
  7074. var rCnt = 0;
  7075. var sTempSeq = 0;
  7076. var sDisplayColArr = sDisplayRowArr[i-1].split("▥");
  7077. if(sDisplayColArr == null || sDisplayColArr == "" || sDisplayColArr == "undefined"){
  7078. break;
  7079. }
  7080. if(iLength > 0){
  7081. for(var j = grd_count.fixedRows; j <= iLength; j++){
  7082. sTempSeq = grd_count.valueMatrix(j, grd_count.colRef("refseq" ));
  7083. sTempRecNo = grd_count.valueMatrix(j, grd_count.colRef("recno" ));
  7084. sTempRecFlag = grd_count.valueMatrix(j, grd_count.colRef("recflag"));
  7085. if( sCodeRecNo == sTempRecNo && parseInt(sTempSeq) < parseInt(sDisplayColArr[5]) ){
  7086. rCnt = j;
  7087. }
  7088. }
  7089. iCnt = rCnt + 1;
  7090. grd_count.insertRow(rCnt, "below", false);
  7091. sRebuildFlag = "true";
  7092. grd_count.valueMatrix(iCnt, grd_count.colRef("codenm1" )) = sDisplayColArr[1] ;
  7093. grd_count.valueMatrix(iCnt, grd_count.colRef("codenm2" )) = sDisplayColArr[2] ;
  7094. grd_count.valueMatrix(iCnt, grd_count.colRef("codenm3" )) = sDisplayColArr[3] ;
  7095. grd_count.valueMatrix(iCnt, grd_count.colRef("nacls" )) = "false" ;
  7096. grd_count.valueMatrix(iCnt, grd_count.colRef("naclsinucd" )) = "-" ;
  7097. grd_count.valueMatrix(iCnt, grd_count.colRef("initqty" )) = "" ;
  7098. grd_count.valueMatrix(iCnt, grd_count.colRef("addqty" )) = "" ;
  7099. grd_count.valueMatrix(iCnt, grd_count.colRef("totqty" )) = "" ;
  7100. grd_count.valueMatrix(iCnt, grd_count.colRef("packqty" )) = "" ;
  7101. grd_count.valueMatrix(iCnt, grd_count.colRef("nursnm11" )) = "" ;
  7102. grd_count.valueMatrix(iCnt, grd_count.colRef("nursnm12" )) = "" ;
  7103. grd_count.valueMatrix(iCnt, grd_count.colRef("nursnm21" )) = "" ;
  7104. grd_count.valueMatrix(iCnt, grd_count.colRef("nursnm22" )) = "" ;
  7105. grd_count.valueMatrix(iCnt, grd_count.colRef("nursnm31" )) = "" ;
  7106. grd_count.valueMatrix(iCnt, grd_count.colRef("nursnm32" )) = "" ;
  7107. grd_count.valueMatrix(iCnt, grd_count.colRef("nursnm41" )) = "" ;
  7108. grd_count.valueMatrix(iCnt, grd_count.colRef("nursnm42" )) = "" ;
  7109. grd_count.valueMatrix(iCnt, grd_count.colRef("samey" )) = "true" ;
  7110. grd_count.valueMatrix(iCnt, grd_count.colRef("samen" )) = "false" ;
  7111. grd_count.valueMatrix(iCnt, grd_count.colRef("nursid11" )) = "" ;
  7112. grd_count.valueMatrix(iCnt, grd_count.colRef("nursid12" )) = "" ;
  7113. grd_count.valueMatrix(iCnt, grd_count.colRef("nursid21" )) = "" ;
  7114. grd_count.valueMatrix(iCnt, grd_count.colRef("nursid22" )) = "" ;
  7115. grd_count.valueMatrix(iCnt, grd_count.colRef("nursid31" )) = "" ;
  7116. grd_count.valueMatrix(iCnt, grd_count.colRef("nursid32" )) = "" ;
  7117. grd_count.valueMatrix(iCnt, grd_count.colRef("nursid41" )) = "" ;
  7118. grd_count.valueMatrix(iCnt, grd_count.colRef("nursid42" )) = "" ;
  7119. grd_count.valueMatrix(iCnt, grd_count.colRef("deptcd11" )) = "" ;
  7120. grd_count.valueMatrix(iCnt, grd_count.colRef("deptcd12" )) = "" ;
  7121. grd_count.valueMatrix(iCnt, grd_count.colRef("deptcd21" )) = "" ;
  7122. grd_count.valueMatrix(iCnt, grd_count.colRef("deptcd22" )) = "" ;
  7123. grd_count.valueMatrix(iCnt, grd_count.colRef("deptcd31" )) = "" ;
  7124. grd_count.valueMatrix(iCnt, grd_count.colRef("deptcd32" )) = "" ;
  7125. grd_count.valueMatrix(iCnt, grd_count.colRef("deptcd41" )) = "" ;
  7126. grd_count.valueMatrix(iCnt, grd_count.colRef("deptcd42" )) = "" ;
  7127. grd_count.valueMatrix(iCnt, grd_count.colRef("deptnm11" )) = "" ;
  7128. grd_count.valueMatrix(iCnt, grd_count.colRef("deptnm12" )) = "" ;
  7129. grd_count.valueMatrix(iCnt, grd_count.colRef("deptnm21" )) = "" ;
  7130. grd_count.valueMatrix(iCnt, grd_count.colRef("deptnm22" )) = "" ;
  7131. grd_count.valueMatrix(iCnt, grd_count.colRef("deptnm31" )) = "" ;
  7132. grd_count.valueMatrix(iCnt, grd_count.colRef("deptnm32" )) = "" ;
  7133. grd_count.valueMatrix(iCnt, grd_count.colRef("deptnm41" )) = "" ;
  7134. grd_count.valueMatrix(iCnt, grd_count.colRef("deptnm42" )) = "" ;
  7135. grd_count.valueMatrix(iCnt, grd_count.colRef("checkid11" )) = "" ;
  7136. grd_count.valueMatrix(iCnt, grd_count.colRef("checkid12" )) = "" ;
  7137. grd_count.valueMatrix(iCnt, grd_count.colRef("checkid21" )) = "" ;
  7138. grd_count.valueMatrix(iCnt, grd_count.colRef("checkid22" )) = "" ;
  7139. grd_count.valueMatrix(iCnt, grd_count.colRef("checkid31" )) = "" ;
  7140. grd_count.valueMatrix(iCnt, grd_count.colRef("checkid32" )) = "" ;
  7141. grd_count.valueMatrix(iCnt, grd_count.colRef("checkid41" )) = "" ;
  7142. grd_count.valueMatrix(iCnt, grd_count.colRef("checkid42" )) = "" ;
  7143. grd_count.valueMatrix(iCnt, grd_count.colRef("packspec" )) = "" ;
  7144. grd_count.valueMatrix(iCnt, grd_count.colRef("kindcd" )) = sDisplayColArr[4] ;
  7145. grd_count.valueMatrix(iCnt, grd_count.colRef("refseq" )) = sDisplayColArr[5] ;
  7146. grd_count.valueMatrix(iCnt, grd_count.colRef("recflag" )) = "I" ;
  7147. grd_count.valueMatrix(iCnt, grd_count.colRef("recno" )) = sCodeRecNo ;
  7148. }
  7149. }
  7150. }
  7151. if(sRebuildFlag == "true"){
  7152. grd_count.rebuild();
  7153. fSetStyle();
  7154. //fPackingMergeFalse();
  7155. }
  7156. //추가건에 대하여 해당없음 Check 여부에 따른 사유 입력 콤보 ReadOnly처리
  7157. for(var i = grd_count.fixedRows ; i <= grd_count.Rows ; i++){
  7158. if(grd_count.valueMatrix(i, grd_count.colRef("nacls")) == 'false'){
  7159. grd_count.isReadOnly(i, grd_count.colRef("naclsinucd"), i, grd_count.colRef("naclsinucd")) = true;
  7160. }
  7161. }
  7162. }
  7163. }
  7164. /**
  7165. * Catheter 삽관기록 항목 추가 버튼 클릭 시 이벤트
  7166. *
  7167. */
  7168. function fOpAddEqmtPopup(){
  7169. var sTempXpath = "/root/main/MnphopcrData/MnphopcrList/warmcoldregmspec/lists/cathlist/inscath";//삽관 정보 xPath
  7170. setParameter("SMMNP00300_searchFlag", "true");
  7171. var xpos = 1;
  7172. var ypos = 1;
  7173. var sGridRefreshFlag = "false";
  7174. modal("SPMNP00340", 1, xpos, ypos,"SPMNP00340", "", "");
  7175. var sResult = getParameter("SMMNP00300_result_data");
  7176. if(sResult != null && sResult != ""){
  7177. setParameter("SMMNP00300_result_data", "");
  7178. var sResultArr = sResult.split("▧");
  7179. if(sResultArr.length > 0){
  7180. var sGoodcd = ""; //삽관 종류
  7181. var sGoodName = ""; //명칭
  7182. var iAddRowCnt= grd_inscath.rows-grd_inscath.fixedRows;
  7183. for(var i = 0; i < sResultArr.length; i++){
  7184. var sResultDetailArr = sResultArr[i].split("▥");
  7185. if(sResultDetailArr.length > 0){
  7186. //팝업에서 넘어온 정보중 겹치는 정보는 제외하고 데이터를 insert한다.
  7187. sGoodcd = sResultDetailArr[0]; //code
  7188. sGoodName = sResultDetailArr[1]; //codename
  7189. var sExsist = "false";
  7190. var iTempGridCnt = getNodesetCount(sTempXpath);//삽관 정보 입력된 건수
  7191. var sTempCode = ""; //기존 삽관기록 정보에 등록된 item코드
  7192. for(var k = 1; k < iTempGridCnt+1; k++){
  7193. //sTempCode = datagrid3.TextMatrix(k, 1);//현재 등록된 삽관 item코드
  7194. sTempCode = grd_inscath.TextMatrix(k, 1);//현재 등록된 삽관 item코드
  7195. //alert("sTempCode : " + sTempCode);
  7196. if(sTempCode == sGoodcd){
  7197. sExsist = "true";
  7198. break;
  7199. }
  7200. }
  7201. if(sExsist == "false"){
  7202. //datagrid3.addRow(true, true);
  7203. iAddRowCnt++;
  7204. sGridRefreshFlag = "true";
  7205. model.makeValue(sTempXpath+"["+iAddRowCnt+"]/itemcd", sGoodcd);
  7206. model.makeValue(sTempXpath+"["+iAddRowCnt+"]/cathflag", "추가");
  7207. model.makeValue(sTempXpath+"["+iAddRowCnt+"]/itemnm", sGoodName);
  7208. model.makeNode(sTempXpath+"["+iAddRowCnt+"]/spec");
  7209. model.makeNode(sTempXpath+"["+iAddRowCnt+"]/qty");
  7210. model.makeValue(sTempXpath+"["+iAddRowCnt+"]/actflag", "P");
  7211. model.makeNode(sTempXpath+"["+iAddRowCnt+"]/method");
  7212. model.makeNode(sTempXpath+"["+iAddRowCnt+"]/partinfo");
  7213. model.makeNode(sTempXpath+"["+iAddRowCnt+"]/actnm");
  7214. model.makeNode(sTempXpath+"["+iAddRowCnt+"]/actid");
  7215. model.makeNode(sTempXpath+"["+iAddRowCnt+"]/actdd");
  7216. model.makeNode(sTempXpath+"["+iAddRowCnt+"]/acttm");
  7217. }
  7218. }
  7219. }
  7220. grd_inscath.rebuild();
  7221. }
  7222. }
  7223. }
  7224. /**
  7225. * 집도의 요청에 의한 계수확인 안함 버튼 클릭 시 이벤트
  7226. *
  7227. */
  7228. function fOnClickNoCountDoctClearBtn(){
  7229. model.setValue("/root/main/MnphopcrData/MnphopcrList/nocountdoctid","");
  7230. combo1.refresh();
  7231. }
  7232. /**
  7233. * 적출물 기록 버튼 클릭 시 이벤트
  7234. *
  7235. */
  7236. function fOnClickExtractObjectFormBtn(){
  7237. var sSendData = "";
  7238. setParameter("SMMNP00300_searchFlag", "true");
  7239. var sSendPinfo1 = model.getValue("/root/main/MnphopcrData/MnphopcrList/opcnfmdd");//수술확정일자
  7240. var sSendPinfo2 = model.getValue("/root/init/HideData/patinfo");
  7241. var sSendPinfo3 = model.getValue("/root/init/HideData/patinfo2");
  7242. //------------(20100915) 경북대
  7243. //원본
  7244. //var sSendDoctinfo = model.getValue(xPathData+"/perfdridnm" ) +"▥"+ // 집도의
  7245. // + model.getValue(xPathData+"/perfdrid" ); // 집도의ID
  7246. // 집도의 사번이 0으로시작하면 앞의 0이 짤린다.
  7247. // 예: 02048 --> 2048
  7248. var sPerfdrid = model.getValue(xPathData+"/perfdrid" );
  7249. var sSendDoctinfo = model.getValue(xPathData+"/perfdridnm" ) +"▥"; // 집도의
  7250. sSendDoctinfo = sSendDoctinfo.concat(sPerfdrid.toString()); // 집도의ID
  7251. //------------(20100915) 경북대
  7252. sPid = model.getValue("/root/init/HideData/pid" ); // 01 환자번호
  7253. sOprsrvno = model.getValue("/root/init/HideData/oprsrvno"); // 02 수술예약(의뢰)번호(년도+일련번호)
  7254. sOphistno = model.getValue("/root/init/HideData/ophistno"); // 03 예약번호에따른이력번호
  7255. sInstcd = model.getValue("/root/init/HideData/instcd" ); // 04 기관코드
  7256. var tempOproomcd = model.getValue(xPathData+"/oproomcd"); // 05 수술방코드
  7257. sSendData = sPid+"▥"+ sOprsrvno +"▥"+ sOphistno +"▥"+ sInstcd +"▥"+ sOpfromdt +"▥"+tempOproomcd+"▨"+ sSendPinfo1+"▥"+sSendPinfo2+"▥"+sSendPinfo3+"▨"+sSendDoctinfo;
  7258. setParameter("SMMNP00300_SearchCondition", sSendData);
  7259. var xpos = 1;
  7260. var ypos = 1;
  7261. var sGridRefreshFlag = "false";
  7262. modal("SPMNP00310", 1, xpos, ypos,"SPMNP00310", "", "");
  7263. }
  7264. /**
  7265. * 관찰기록 버튼 클릭 시 이벤트
  7266. *
  7267. */
  7268. function fOnClickObservationRecordFormBtn(){
  7269. var sSendData = "";
  7270. setParameter("SMMNP00300_searchFlag", "true");
  7271. var sSendPinfo1 = model.getValue("/root/main/MnphopcrData/MnphopcrList/opcnfmdd");//수술확정일자
  7272. var sSendPinfo2 = model.getValue("/root/init/HideData/patinfo");
  7273. var sSendPinfo3 = model.getValue("/root/init/HideData/patinfo2");
  7274. //------------(20100915) 경북대
  7275. //원본
  7276. //var sSendDoctinfo = model.getValue(xPathData+"/perfdridnm" ) +"▥"+ // 집도의
  7277. // + model.getValue(xPathData+"/perfdrid" ); // 집도의ID
  7278. // 집도의 사번이 0으로시작하면 앞의 0이 짤린다.
  7279. // 예: 02048 --> 2048
  7280. var sPerfdrid = model.getValue(xPathData+"/perfdrid" );
  7281. var sSendDoctinfo = model.getValue(xPathData+"/perfdridnm" ) +"▥"; // 집도의
  7282. sSendDoctinfo = sSendDoctinfo.concat(sPerfdrid.toString()); // 집도의ID
  7283. //------------(20100915) 경북대
  7284. sPid = model.getValue("/root/init/HideData/pid" ); // 01 환자번호
  7285. sOprsrvno = model.getValue("/root/init/HideData/oprsrvno"); // 02 수술예약(의뢰)번호(년도+일련번호)
  7286. sOphistno = model.getValue("/root/init/HideData/ophistno"); // 03 예약번호에따른이력번호
  7287. sInstcd = model.getValue("/root/init/HideData/instcd" ); // 04 기관코드
  7288. var tempOproomcd = model.getValue(xPathData+"/oproomcd"); // 05 수술방코드
  7289. sSendData = sPid+"▥"+ sOprsrvno +"▥"+ sOphistno +"▥"+ sInstcd +"▥"+ sOpfromdt +"▥"+tempOproomcd+"▨"+ sSendPinfo1+"▥"+sSendPinfo2+"▥"+sSendPinfo3+"▨"+sSendDoctinfo;
  7290. setParameter("SMMNP00300_SearchCondition", sSendData);
  7291. var xpos = 1;
  7292. var ypos = 1;
  7293. var sGridRefreshFlag = "false";
  7294. modal("SPMNP00315", 1, xpos, ypos,"SPMNP00315", "", "");
  7295. }
  7296. /**
  7297. * 분만정보 조회 버튼 클릭 시 이벤트
  7298. *
  7299. */
  7300. function fOnClickDRinfoBtn(){
  7301. var sSendData = "";
  7302. setParameter("SMMNP00300_DRsearchFlag", "true");
  7303. var sSendPinfo1 = model.getValue("/root/main/MnphopcrData/MnphopcrList/opcnfmdd");
  7304. var sSendPinfo2 = model.getValue("/root/init/HideData/patinfo");
  7305. var sSendPinfo3 = model.getValue("/root/init/HideData/patinfo2");
  7306. sPid = model.getValue("/root/init/HideData/pid" );
  7307. sSendData = sPid +"▥"+ sIndd +"▥"+ sCretno +"▨"+ sSendPinfo1+"▥"+sSendPinfo2+"▥"+sSendPinfo3;
  7308. setParameter("SMMNP00300_DrSearchCondition", sSendData);
  7309. var xpos = 1;
  7310. var ypos = 1;
  7311. modal("SPMNP00320", 1, xpos, ypos,"SPMNP00320", "", "");
  7312. }
  7313. /**
  7314. * 장기이식 버튼 클릭 시 이벤트
  7315. *
  7316. */
  7317. function fOnClickOgInfoBtn(){
  7318. var sSendData = "";
  7319. setParameter("SMMNP00300_OrSearchFlag", "true");
  7320. var sSendPinfo1 = model.getValue("/root/main/MnphopcrData/MnphopcrList/opcnfmdd");
  7321. var sSendPinfo2 = model.getValue("/root/init/HideData/patinfo");
  7322. var sSendPinfo3 = model.getValue("/root/init/HideData/patinfo2");
  7323. sOprsrvno = model.getValue("/root/init/HideData/oprsrvno"); // 01 수술예약(의뢰)번호(년도+일련번호)
  7324. sSendData = sOprsrvno +"▨"+ sSendPinfo1+"▥"+sSendPinfo2+"▥"+sSendPinfo3;
  7325. setParameter("SMMNP00300_OrSearchCondition", sSendData);
  7326. var xpos = 1;
  7327. var ypos = 1;
  7328. modal("SPMNP00330", 1, xpos, ypos,"SPMNP00330", "", "");
  7329. }
  7330. /**
  7331. * 환자 입실일시 값 변경 시 이벤트
  7332. *
  7333. */
  7334. function fValueChangedPatOpRoomIn(){
  7335. var sArriTime = model.getValue("/root/init/workinst/datetimedata/patinroomhh");
  7336. //시간에 입력된 자릿수가 4이상일 경우 바코드에서 넘어온 데이터 이므로 현재 시/분을 넣는다.
  7337. if(sArriTime.length != null && sArriTime.length > 4){
  7338. //alert("sArriTime.length : "+sArriTime.length);
  7339. sArriTime = getCurrentTime().substr(0, 4);
  7340. model.setValue("/root/init/workinst/datetimedata/patinroomhh", sArriTime);
  7341. inp_patinroomhh.refresh();
  7342. fInOutRoomSave("1");
  7343. }
  7344. }
  7345. /**
  7346. * 수술기록 Close시 Event
  7347. *
  7348. */
  7349. function fCloseSuSulRec(){
  7350. //alert("수술기록을 Close 하기전 Cache 정보 oprsrvno : "+model.getAttribute("susulrec_oprsrvno"));
  7351. model.setAttribute("susulrec_oprsrvno", "");
  7352. model.setAttribute("susulrec_pid" , "");
  7353. model.setAttribute("susulrec_hngnm" , "");
  7354. }
  7355. /**
  7356. * BarCode Scan시 이벤트
  7357. *
  7358. */
  7359. function fGetBarCodeScan(){
  7360. //input4.value = input4.currentText;
  7361. var sBarCodeCd = input4.currentText; //model.getValue("/root/init/barcode/value");
  7362. var sPid = model.getValue("/root/main/MnphopcrData/MnphopcrList/pid");
  7363. if(sBarCodeCd == sPid){
  7364. if( (model.getValue(xPathData+"/oprsrvno") != model.getValue(xPathData+"/mainoprsrvno")) &&
  7365. (model.getValue(xPathData+"/mainoprsrvno") != "-" ) ){ //협진 수술일 경우 시간정보가 있을경우에만.
  7366. return;
  7367. if(model.getValue("/root/init/workinst/datetimedata/patinroomhh") != ""){
  7368. fInOutRoomSave("1");
  7369. model.setValue("/root/init/barcode/value", "");
  7370. input4.refresh();
  7371. }
  7372. }else{
  7373. model.setValue("/root/init/workinst/datetimedata/patinroomdd", getCurrentDate());
  7374. model.setValue("/root/init/workinst/datetimedata/patinroomhh", getCurrentTime().substr(0, 4));
  7375. fSettingOPdate("Opfromdt");
  7376. fOpTotalTime();
  7377. fInOutRoomSave("1");
  7378. model.setValue("/root/init/barcode/value", "");
  7379. input4.refresh();
  7380. }
  7381. }else{
  7382. //messageBox("환자 정보가 일치하지 않습니다.", "E000");
  7383. return;
  7384. }
  7385. }
  7386. /**
  7387. * 검체정보 그리드 색, 입력 제어 함수
  7388. *
  7389. */
  7390. function fChangGridSetting(pFlag){
  7391. switch(pFlag){
  7392. case "grd_spclist" :
  7393. grd_spclist.rebuild();
  7394. if(model.getValue(xPathData+"/spcuseyn") == "X"){
  7395. for (var iRow = grd_spclist.fixedrows; iRow <= grd_spclist.rows; iRow++){
  7396. if(grd_spclist.valueMatrix(iRow, grd_spclist.colRef("qty")) == "0"){
  7397. grd_spclist.valueMatrix(iRow, 2) ="";
  7398. grd_spclist.valueMatrix(iRow, 3) ="";
  7399. grd_spclist.valueMatrix(iRow, 4) ="";
  7400. //--(20101015) 경북대
  7401. //grd_spclist.isReadOnly(iRow, grd_spclist.colRef("qty"), iRow, 5) = true;
  7402. //grd_spclist.cellstyle("background-color", iRow, 2, iRow, 5) = "#eaeaea";
  7403. grd_spclist.valueMatrix(iRow, 6) ="";
  7404. grd_spclist.isReadOnly(iRow, grd_spclist.colRef("qty"), iRow, 6) = true;
  7405. grd_spclist.cellstyle("background-color", iRow, 2, iRow, 6) = "#eaeaea";
  7406. //--(20101015) 경북대
  7407. }
  7408. }
  7409. }else{
  7410. for (var iRow = grd_spclist.fixedrows; iRow <= grd_spclist.rows; iRow++){
  7411. if(grd_spclist.valueMatrix(iRow, grd_spclist.colRef("qty")) == "0"){
  7412. grd_spclist.valueMatrix(iRow, 2) ="";
  7413. grd_spclist.valueMatrix(iRow, 3) ="";
  7414. grd_spclist.valueMatrix(iRow, 4) ="";
  7415. grd_spclist.isReadOnly(iRow, grd_spclist.colRef("qty"), iRow, grd_spclist.colRef("qty")) = false;
  7416. //--(20101015) 경북대
  7417. //grd_spclist.isReadOnly(iRow, 3, iRow, 5) = true;
  7418. //grd_spclist.cellstyle("background-color", iRow, 2, iRow, 5) = "#eaeaea";
  7419. grd_spclist.valueMatrix(iRow, 6) ="";
  7420. grd_spclist.isReadOnly(iRow, 3, iRow, 6) = true;
  7421. grd_spclist.cellstyle("background-color", iRow, 2, iRow, 6) = "#eaeaea";
  7422. //--(20101015) 경북대
  7423. }else{
  7424. grd_spclist.isReadOnly(iRow, 2, iRow, 5 )= false;
  7425. grd_spclist.cellstyle("background-color", iRow, 2, iRow, 5) = "#ffffff";
  7426. }
  7427. }
  7428. }
  7429. break;
  7430. case "grd_spclistnew" :
  7431. grd_spclistnew.rebuild();
  7432. if(model.getValue(xPathData+"/spcuseyn") == "X"){
  7433. for (var iRow = grd_spclistnew.fixedrows; iRow <= grd_spclistnew.rows; iRow++){
  7434. if(grd_spclistnew.valueMatrix(iRow, grd_spclistnew.colRef("qty")) == "0"){
  7435. grd_spclistnew.valueMatrix(iRow, 2) ="";
  7436. grd_spclistnew.valueMatrix(iRow, 3) ="";
  7437. grd_spclistnew.valueMatrix(iRow, 4) ="";
  7438. //--(20101015) 경북대
  7439. //grd_spclist.isReadOnly(iRow, grd_spclist.colRef("qty"), iRow, 5) = true;
  7440. //grd_spclist.cellstyle("background-color", iRow, 2, iRow, 5) = "#eaeaea";
  7441. grd_spclistnew.valueMatrix(iRow, 6) ="";
  7442. grd_spclistnew.isReadOnly(iRow, grd_spclistnew.colRef("qty"), iRow, 6) = true;
  7443. grd_spclistnew.cellstyle("background-color", iRow, 2, iRow, 6) = "#eaeaea";
  7444. //--(20101015) 경북대
  7445. }
  7446. }
  7447. }else{
  7448. for (var iRow = grd_spclistnew.fixedrows; iRow <= grd_spclistnew.rows; iRow++){
  7449. grd_spclistnew.isReadOnly(iRow, 2, iRow, 5 )= false;
  7450. grd_spclistnew.cellstyle("background-color", iRow, 2, iRow, 5) = "#ffffff";
  7451. }
  7452. }
  7453. break;
  7454. }
  7455. }
  7456. /**
  7457. * 수술관련 시간 참여자 정보에 자동 세팅 처리(집도의입실, 수술시작)
  7458. * 2009-02-20 ycd 추가
  7459. */
  7460. function fSettingOPdate(pFlag){
  7461. switch(pFlag){
  7462. case "all" :
  7463. if(model.getValue("/root/init/workinst/datetimedata/perfidarvhh") != ""){
  7464. if(model.getValue("/root/init/workinst/OpeuLists/opeulist1[1]/entrid1") != ""){
  7465. model.setValue("/root/init/workinst/OpeuLists/opeulist1[1]/entrtm1", model.getValue("/root/init/workinst/datetimedata/perfidarvhh"));
  7466. }
  7467. }
  7468. if(model.getValue("/root/init/workinst/datetimedata/patinroomhh") != ""){
  7469. if(model.getValue("/root/init/workinst/OpeuLists/opeulist1[1]/entrid2") != "" && model.getValue("/root/init/workinst/OpeuLists/opeulist1[1]/entrtm2") == "" ){
  7470. model.setValue("/root/init/workinst/OpeuLists/opeulist1[1]/entrtm2", model.getValue("/root/init/workinst/datetimedata/patinroomhh"));
  7471. }
  7472. if(model.getValue("/root/init/workinst/OpeuLists/opeulist2[1]/entrid1") != "" && model.getValue("/root/init/workinst/OpeuLists/opeulist2[1]/entrtm1") == "" ){
  7473. model.setValue("/root/init/workinst/OpeuLists/opeulist2[1]/entrtm1", model.getValue("/root/init/workinst/datetimedata/patinroomhh") );
  7474. }
  7475. if(model.getValue("/root/init/workinst/OpeuLists/opeulist2[1]/entrid2") != "" && model.getValue("/root/init/workinst/OpeuLists/opeulist2[1]/entrtm2") == "" ){
  7476. model.setValue("/root/init/workinst/OpeuLists/opeulist2[1]/entrtm2", model.getValue("/root/init/workinst/datetimedata/patinroomhh"));
  7477. }
  7478. }
  7479. break;
  7480. case "Perfidarvdt" :
  7481. if(model.getValue("/root/init/workinst/datetimedata/perfidarvhh") != ""){
  7482. if(model.getValue("/root/init/workinst/OpeuLists/opeulist1[1]/entrid1") != ""){
  7483. model.setValue("/root/init/workinst/OpeuLists/opeulist1[1]/entrtm1", model.getValue("/root/init/workinst/datetimedata/perfidarvhh"));
  7484. }
  7485. }
  7486. break;
  7487. case "Opfromdt" :
  7488. if(model.getValue("/root/init/workinst/datetimedata/patinroomhh") != ""){
  7489. if(model.getValue("/root/init/workinst/OpeuLists/opeulist1[1]/entrid2") != "" && model.getValue("/root/init/workinst/OpeuLists/opeulist1[1]/entrtm2") == "" ){
  7490. model.setValue("/root/init/workinst/OpeuLists/opeulist1[1]/entrtm2", model.getValue("/root/init/workinst/datetimedata/patinroomhh"));
  7491. }
  7492. if(model.getValue("/root/init/workinst/OpeuLists/opeulist2[1]/entrid1") != "" && model.getValue("/root/init/workinst/OpeuLists/opeulist2[1]/entrtm1") == "" ){
  7493. model.setValue("/root/init/workinst/OpeuLists/opeulist2[1]/entrtm1", model.getValue("/root/init/workinst/datetimedata/patinroomhh"));
  7494. }
  7495. if(model.getValue("/root/init/workinst/OpeuLists/opeulist2[1]/entrid2") != "" && model.getValue("/root/init/workinst/OpeuLists/opeulist2[1]/entrtm2") == "" ){
  7496. model.setValue("/root/init/workinst/OpeuLists/opeulist2[1]/entrtm2", model.getValue("/root/init/workinst/datetimedata/patinroomhh"));
  7497. }
  7498. }
  7499. break;
  7500. }
  7501. grd_opeu1.refresh();
  7502. grd_opeu2.refresh();
  7503. }
  7504. /**
  7505. * 수술지연시간 계산 로직
  7506. * 2009-03-27 ycd 추가
  7507. */
  7508. function fCalcDelyTime(){
  7509. var sDelyTm1 = ""; //수술실 퇴실 - 수술실 입실
  7510. var sDelyTm2 = ""; //수술실 입실 - 마취시작
  7511. var sDelyTm3 = ""; //수술실 입실 - 집도의 입실
  7512. var sDelyTm4 = ""; //마취시작 - 집도의 입실
  7513. var sPrePatOutdd = "";
  7514. var sPrePatOuthh = "";
  7515. //퇴실 - 입실 시간계산 2009.08.21 K.J.M
  7516. var sDelyTmPath = "/root/main/MnphopcrData/MnphopcrList/opnursrectimeremark/delyresnlist/";
  7517. var sPrePatOuttm = model.getValue("/root/main/MnphopcrData/MnphopcrList/prepatouttm");
  7518. if( sPrePatOuttm != "" ) {
  7519. sPrePatOutdd = sPrePatOuttm.substr(0, 8);
  7520. sPrePatOuthh = sPrePatOuttm.substr(8, 4);
  7521. }
  7522. if(inp_patinroomdd.value != "" && inp_patinroomhh.value != "" && sPrePatOutdd != "" && sPrePatOuthh != "" ) {
  7523. sDelyTm1 = fTimeInterval(sPrePatOutdd, inp_patinroomdd.value, sPrePatOuthh, inp_patinroomhh.value, "1");
  7524. }
  7525. if(inp_patinroomdd.value != "" && inp_patinroomhh.value != "" && inp_anstsrtdd.value != "" && inp_anstsrthh.value != ""){
  7526. sDelyTm2 = fTimeInterval(inp_patinroomdd.value, inp_anstsrtdd.value, inp_patinroomhh.value, inp_anstsrthh.value, "1");
  7527. }
  7528. if(inp_patinroomdd.value != "" && inp_patinroomhh.value != "" && inp_perfidarvdd.value != "" && inp_perfidarvhh.value != ""){
  7529. sDelyTm3 = fTimeInterval(inp_patinroomdd.value, inp_perfidarvdd.value, inp_patinroomhh.value, inp_perfidarvhh.value, "1");
  7530. }
  7531. if(inp_anstsrtdd.value != "" && inp_anstsrthh.value != "" && inp_perfidarvdd.value != "" && inp_perfidarvhh.value != ""){
  7532. sDelyTm4 = fTimeInterval(inp_anstsrtdd.value, inp_perfidarvdd.value, inp_anstsrthh.value, inp_perfidarvhh.value, "1");
  7533. }
  7534. model.setValue(sDelyTmPath+"delytime1", sDelyTm1.replace(':' , ''));
  7535. model.setValue(sDelyTmPath+"delytime2", sDelyTm2.replace(':' , ''));
  7536. model.setValue(sDelyTmPath+"delytime3", sDelyTm3.replace(':' , ''));
  7537. model.setValue(sDelyTmPath+"delytime4", sDelyTm4.replace(':' , ''));
  7538. model.refresh();
  7539. /*
  7540. ipt_delytime2.value = sDelyTm2.replace(':' , '');
  7541. ipt_delytime3.value = sDelyTm3.replace(':' , '');
  7542. ipt_delytime4.value = sDelyTm4.replace(':' , '');
  7543. */
  7544. }
  7545. //----------(20110512)
  7546. // 불일치 조치사항 명칭저장
  7547. function fopdicordnmcreate(){
  7548. // 불일치 조치사항의 코드에 대한 명칭저장하기
  7549. // 기존것 제거
  7550. var tempXPath1 = xPathData+"/opdiscordspec/opdiscord/opdiscordnm";
  7551. var iRow = getNodesetCount(tempXPath1);
  7552. for (var i = iRow; i > 0; i--){
  7553. model.removeNodeset(tempXPath1+"["+ i +"]");
  7554. }
  7555. // 불일치조치사항 기준자료(체크컨트롤) 새로 생성
  7556. var tempXPath2 = "/root/init/HideData/OpBasicCdList/opdiscordlist";
  7557. var tempV = "";
  7558. iRow = getNodesetCount(tempXPath2);
  7559. for (var i = 1; i <= iRow; i++){
  7560. //alert("i:"+ i + "/" + model.getValue(tempXPath2 + "[" + i + "]/cdnm"));
  7561. var schkflag = fopdicordnmfind(i);
  7562. tempV = model.getValue(tempXPath2 + "[" + i + "]/cdnm");
  7563. if (i == iRow) {
  7564. tempV = tempV + "(" +
  7565. model.getValue("/root/main/MnphopcrData/MnphopcrList/opdiscordspec/opdiscord/opdiscordetc") +
  7566. ")";
  7567. }
  7568. model.makeNode(tempXPath1 + "[" + i + "]"); //명칭정보
  7569. model.makeNode(tempXPath1 + "[" + i + "]/chk"); //체크여부
  7570. model.makeNode(tempXPath1 + "[" + i + "]/nm"); //명칭정보
  7571. model.setValue(tempXPath1 + "[" + i + "]/chk",schkflag); //체크여부
  7572. model.setValue(tempXPath1 + "[" + i + "]/nm",tempV); //명칭정보
  7573. }
  7574. chkopdicord.refresh();
  7575. // 변수에 저장
  7576. opdiscordspec = instance1.selectSingleNode(xPathData+"/opdiscordspec/opdiscord").xml;
  7577. //alert(opdiscordspec);
  7578. }
  7579. // 불일치 조치사항에서 체크사항 찾기
  7580. function fopdicordnmfind(sIdx){
  7581. var i =0;
  7582. var item;
  7583. var rtnflag="";
  7584. for(i=0; i<chkopdicord.length; i++)
  7585. {
  7586. item = chkopdicord.item(i);
  7587. if( i == (sIdx-1) && item.selected == "1" ) {
  7588. rtnflag = "체크";
  7589. return rtnflag;
  7590. }
  7591. }
  7592. return rtnflag;
  7593. }
  7594. function fInstchk(){ // 본원 칠곡 제어_손성훈.(제거.12.05.22)
  7595. /* var sInstcd = getUserInfo("dutplceinstcd") ;
  7596. if (sInstcd == "032"){
  7597. button5.visible = false;
  7598. opt_opocr2chkexec.visible = true;
  7599. }
  7600. */
  7601. }
  7602. function fCheckMedrList() {
  7603. model.makeValue("/root/send/reqdata/pid", model.getValue("root/main/paminfo/list/pid"));
  7604. model.makeValue("/root/send/reqdata/indd", model.getValue("root/main/paminfo/list/indd"));
  7605. model.makeValue("/root/send/reqdata/cretno", model.getValue("root/main/paminfo/list/cretno"));
  7606. submit("TRMNP00327");
  7607. }
  7608. function fGridOnButtonClickEvent(){
  7609. var iRow = grd_skinsurveylist.row;
  7610. var iCol = grd_skinsurveylist.col;
  7611. if (iRow < 2 ){
  7612. return;
  7613. }
  7614. if( iCol == grd_skinsurveylist.colRef("trobpart")) {
  7615. //부위 표시 POPUP 호출
  7616. fPopupBedSoreImg();
  7617. }
  7618. if( iCol == grd_skinsurveylist.colRef("surveynm")) {
  7619. var iRow = iRow - 1;
  7620. var sGridXpath = "/root/main/SheetData3/skinserveyinfo/skinserveylist";
  7621. var sSearchdd = model.getValue("/root/main/operation/list/opcnfmdd");
  7622. var sChargerNm = "";
  7623. fUseridPopup("", sGridXpath+"["+iRow+"]/surveyid", sGridXpath+"["+iRow+"]/surveynm", "" , "", grd_skinsurveylist, "", sSearchdd);
  7624. if(grd_skinsurveylist.rowStatus(grd_skinsurveylist.row) == "0") {
  7625. grd_skinsurveylist.rowStatus(grd_skinsurveylist.row) = "2";
  7626. }
  7627. return;
  7628. }
  7629. if( iCol == grd_skinsurveylist.colRef("cnfmrnm")) {
  7630. var iRow = iRow - 1;
  7631. var sGridXpath = "/root/main/SheetData3/skinserveyinfo/skinserveylist";
  7632. var sSearchdd = model.getValue("/root/main/operation/list/opcnfmdd");
  7633. var sChargerNm = "";
  7634. fUseridPopup("", sGridXpath+"["+iRow+"]/cnfmrid", sGridXpath+"["+iRow+"]/cnfmrnm", "" , "", grd_skinsurveylist, "", sSearchdd);
  7635. if(grd_skinsurveylist.rowStatus(grd_skinsurveylist.row) == "0") {
  7636. grd_skinsurveylist.rowStatus(grd_skinsurveylist.row) = "2";
  7637. }
  7638. return;
  7639. }
  7640. }
  7641. //이상부위 선택 popup화면 호출
  7642. function fPopupBedSoreImg(){
  7643. var iRow = grd_skinsurveylist.row;
  7644. var iCol = grd_skinsurveylist.col;
  7645. //팝업창에 부위 값이 있으면 기존값 셋팅
  7646. //이미저장되어있으면 수정하지 못하도록 확인버튼을 막아주는 flag를 set한다.
  7647. var PartTail = grd_skinsurveylist.textmatrix(iRow,grd_skinsurveylist.colRef("trobpart"));
  7648. if(isSearchString(PartTail, "(R)") == true){
  7649. PartTail = PartTail.replace("(R)", ",(R),");
  7650. }
  7651. if(isSearchString(PartTail, "(L)") == true){
  7652. PartTail = PartTail.replace("(L)", ",(L),");
  7653. }
  7654. WordLen = getStringLength(PartTail);
  7655. if( PartTail.substr(WordLen -1, WordLen) ==","){
  7656. PartTail = PartTail.substr(0, WordLen -1);
  7657. }
  7658. setParameter("partall", PartTail);
  7659. setParameter('editable', 't');
  7660. modal("SPMNP06800",1, event.screenX-200, event.screenY+50); //이미지호출
  7661. //팝업에서 아무것도 선택하지 않고 close를 눌렀을때..
  7662. if( getParameter("returnnull") == "close" ){
  7663. return ;
  7664. } else {
  7665. //욕창발생부위 값을 grid에 set
  7666. var retStr = getParameter('retStr');
  7667. grd_skinsurveylist.valueMatrix(iRow, grd_skinsurveylist.colRef("trobpart")) = retStr;
  7668. //그리드 상태값 변경
  7669. if(grd_skinsurveylist.rowStatus(iRow) == 0){
  7670. grd_skinsurveylist.rowStatus(iRow) = 2;
  7671. }
  7672. }
  7673. }
  7674. //관찰자, 확인의 이름 및 사용자 번호 입력값에 대한 정보 조회
  7675. function fUserSelect(pRow, pCol){
  7676. var nRow = pRow - 1;
  7677. var rPath = "/root/main/SheetData3/skinserveyinfo/skinserveylist["+ nRow + "]/"
  7678. var rUserNmColnm = "";
  7679. var rUserIdColnm = "";
  7680. if(pCol == grd_skinsurveylist.colRef("surveynm")){
  7681. rUserNmColnm = "surveynm";
  7682. rUserIdColnm = "surveyid";
  7683. rDeptNmColnm = "surveydeptnm";
  7684. rDeptCdColnm = "surveydeptcd";
  7685. var wNode = "020";
  7686. }else{
  7687. rUserNmColnm = "cnfmrnm";
  7688. rUserIdColnm = "cnfmrid";
  7689. rDeptNmColnm = "cnfmrdeptnm";
  7690. rDeptCdColnm = "cnfmrdeptcd";
  7691. var wNode = "011";
  7692. }
  7693. var rUserInfo = model.getValue(rPath+rUserNmColnm).replace(/(^\s*)|(\s*$)/g, "");
  7694. model.setValue(rPath+rUserNmColnm, "");
  7695. if (rUserInfo == "") {
  7696. grd_skinsurveylist.cellStyle("color", pRow, pCol, pRow, pCol) = "";
  7697. grd_skinsurveylist.refresh();
  7698. return;
  7699. }
  7700. //var wNode = "011";
  7701. var sSearchdd = model.getValue("/root/main/operation/list/opcnfmdd");
  7702. //특정일자에 근무했던 정보를 가져오도록 수정
  7703. fUserEnter(rPath, rUserIdColnm , rUserNmColnm, rDeptNmColnm, rDeptCdColnm, rUserInfo, grd_skinsurveylist, "all", wNode, sSearchdd);
  7704. //정보가 없을 경우에는 빈칸으로 들어가서 edit 모드로 변경함.
  7705. if (model.getValue(rPath+rUserIdColnm) =="") {
  7706. grd_skinsurveylist.valueMatrix(pRow, pCol) = "";
  7707. grd_skinsurveylist.refresh();
  7708. grd_skinsurveylist.editCell();
  7709. } else {
  7710. grd_skinsurveylist.cellStyle("color", pRow, pCol, pRow, pCol) = "";
  7711. }
  7712. }
  7713. function fChngTrobYn(pRow){
  7714. if(grd_skinsurveylist.valueMatrix(pRow, grd_skinsurveylist.colRef("trobyn")) == "N"){
  7715. grd_skinsurveylist.isReadOnly(pRow, grd_skinsurveylist.colRef("recstat"), pRow, grd_skinsurveylist.colRef("recstat")) = true;
  7716. grd_skinsurveylist.isReadOnly(pRow, grd_skinsurveylist.colRef("trobpart"), pRow, grd_skinsurveylist.colRef("skinstat")) = true;
  7717. grd_skinsurveylist.valueMatrix(pRow, grd_skinsurveylist.colRef("trobpart")) = "";
  7718. grd_skinsurveylist.valueMatrix(pRow, grd_skinsurveylist.colRef("trobwidth")) = "";
  7719. grd_skinsurveylist.valueMatrix(pRow, grd_skinsurveylist.colRef("trobheight")) = "";
  7720. grd_skinsurveylist.valueMatrix(pRow, grd_skinsurveylist.colRef("troblength")) = "";
  7721. grd_skinsurveylist.valueMatrix(pRow, grd_skinsurveylist.colRef("skinstat")) = "";
  7722. }else{
  7723. grd_skinsurveylist.isReadOnly(pRow, grd_skinsurveylist.colRef("recstat"), pRow, grd_skinsurveylist.colRef("skinstat")) = false;
  7724. grd_skinsurveylist.isReadOnly(pRow, grd_skinsurveylist.colRef("recstat"), pRow, grd_skinsurveylist.colRef("recstat")) = true;
  7725. }
  7726. }
  7727. function fOpRecovRec(){
  7728. model.resetInstanceNode("/root/rectemp/reqdata");
  7729. model.resetInstanceNode("/root/rectemp/opanstform");
  7730. var nPid = model.getValue("/root/main/paminfo/list/pid");
  7731. var nOrddd = model.getValue("/root/main/paminfo/list/indd");
  7732. var nCretno = model.getValue("/root/main/paminfo/list/cretno");
  7733. var sHngnm = model.getValue("/root/main/paminfo/list/hngnm");
  7734. var sSex = model.getValue("/root/main/paminfo/list/sex");
  7735. var sAge = model.getValue("/root/main/paminfo/list/age");
  7736. var sOrddeptnm = model.getValue("/root/main/paminfo/list/orddeptnm");
  7737. var nRoomcd = model.getValue("/root/main/paminfo/list/roomcd");
  7738. var nOprsrvno = model.getValue(hPath+"/oprsrvno");
  7739. var nOpcnfmdd = model.getValue(hPath+"/opcnfmdd");
  7740. var nInstcd = model.getValue("/root/init/HideData/instcd");
  7741. var nFormcd = "1500016350";
  7742. if( sAge < 12 ){
  7743. nFormcd = "1500016351";
  7744. }
  7745. model.setValue("/root/rectemp/reqdata/oprsrvno", nOprsrvno);
  7746. model.setValue("/root/rectemp/reqdata/formcd", nFormcd);
  7747. model.setValue("/root/rectemp/reqdata/instcd", nInstcd);
  7748. model.setValue("/root/rectemp/reqdata/pid", nPid);
  7749. model.setValue("/root/rectemp/reqdata/orddd", nOrddd);
  7750. model.setValue("/root/rectemp/reqdata/cretno", nCretno);
  7751. model.setValue("/root/rectemp/reqdata/opcnfmdd", nOpcnfmdd);
  7752. submit("TRMNP00328", false);
  7753. var nFormrecseq = model.getValue("/root/rectemp/opanstform/formseqno"); // 기록키
  7754. var nEspiseq = model.getValue("/root/rectemp/opanstform/espiseq"); //인증키
  7755. if (nFormrecseq == "" || nFormrecseq == "0")
  7756. {
  7757. messageBox("진정, 회복 기록지 작성 내역이 없습니다.", "I");
  7758. return;
  7759. }
  7760. //setParameter("SSMMR01100_getTopYn", "N");
  7761. var sDisparam = nPid +"▦" + sHngnm +"▦" + sSex+ "/" + sAge + "▦" + sOrddeptnm +"▦" + nRoomcd + "▦";
  7762. setParameter("disppatinfo", sDisparam); //등록번호▦환자명▦성별/나이▦진료과▦병실▦
  7763. setParameter("oprsrvno", nOprsrvno);
  7764. setParameter("opcnfmdd", nOpcnfmdd);
  7765. //setParameter("topyn", "N");
  7766. setParameter("formrecseq", nFormrecseq);
  7767. setParameter("openmode", "recform");
  7768. modal("SSMMR01100", 1, 0, 0 ,"", "", "");
  7769. }
  7770. //----------(20110512)
  7771. /* ------------------------------------------------- */
  7772. /* ------End Of List ------------------------------- */
  7773. /* -------------------------------------------------- */
  7774. /*
  7775. //2008-07-09 오전 11:24:44 수술기록II packing 부위 관련 Backup Data
  7776. <packlist>
  7777. <packchk>false</packchk>
  7778. <packnm>Abdominal </packnm>
  7779. <packcnt>0</packcnt>
  7780. </packlist>
  7781. <packlist>
  7782. <packchk>false</packchk>
  7783. <packnm>Anal </packnm>
  7784. <packcnt>0</packcnt>
  7785. </packlist>
  7786. <packlist>
  7787. <packchk>false</packchk>
  7788. <packnm>Vaginal </packnm>
  7789. <packcnt>0</packcnt>
  7790. </packlist>
  7791. <packlist>
  7792. <packchk>false</packchk>
  7793. <packnm>Ear(Lt.) </packnm>
  7794. <packcnt>0</packcnt>
  7795. </packlist>
  7796. <packlist>
  7797. <packchk>false</packchk>
  7798. <packnm>Ear(Rt.) </packnm>
  7799. <packcnt>0</packcnt>
  7800. </packlist>
  7801. <packlist>
  7802. <packchk>false</packchk>
  7803. <packnm>Nasal(Lt.)</packnm>
  7804. <packcnt>0</packcnt>
  7805. </packlist>
  7806. <packlist>
  7807. <packchk>false</packchk>
  7808. <packnm>Nasal(Rt.)</packnm>
  7809. <packcnt>0</packcnt>
  7810. </packlist>
  7811. <packlist>
  7812. <packchk>false</packchk>
  7813. <packnm>기타 </packnm>
  7814. <packcnt>0</packcnt>
  7815. </packlist>
  7816. */