SMPMI00400_재원변경관리.xrw 345 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * 제 목 : SMPMI00400_재원변경관리.xrw
  4. * 설 명 : 재원변경관리
  5. * 설 계 자 : 홍영표...
  6. * 작 성 자 : 홍영표
  7. * 작 성 일 : 2007.04.09
  8. * 수정이력 : 2008.07.13 최병진 - pmcmptdc 테이블 사용하지 않음에 따른 관련 로직 제거
  9. * 2009.10.15 JHP - 전문의 직위코드 명예교수(1781) 추가, 성가요청 팀장님 확인받음.
  10. * 2009.12.16 JHP - 재원유형이력에 수가재계산구분값 입력(P0027) - 완화의학과 관련 암환자 정액제 적용기준 확인값값
  11. * 기 타 :
  12. * 구현예정 : 1. 진료비 소급일자 Insert 서버로직 반영 : 완료
  13. * 2. 병실현황 조회(돋보기) popup 화면 구성 및 연동 : 완료
  14. * 3. 보험정보변경시 자보,산재,공상은 추가하고 나머지는 종료일자와 이력관리하는 로직 반영 : 완료
  15. * 4.
  16. -->
  17. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
  18. <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2002/01/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
  19. <xhtml:head>
  20. <xhtml:title>재원변경관리</xhtml:title>
  21. <model id="model1">
  22. <instance id="instance1">
  23. <root xmlns="">
  24. <send>
  25. <data1>
  26. <pid/>
  27. <indd/>
  28. <cretno/>
  29. <prestdd/>
  30. <mskind/>
  31. <mode>0</mode>
  32. <insukind/>
  33. </data1>
  34. <ipatflag>3</ipatflag>
  35. <srchcond1>0</srchcond1>
  36. <srchcond2/>
  37. <disccd/>
  38. <hngnm/>
  39. <rrgstn/>
  40. <s_ptbs>
  41. <ptbs_status/>
  42. </s_ptbs>
  43. <s_ptin>
  44. <ptin_status/>
  45. </s_ptin>
  46. <s_inpt>
  47. <inpt_status/>
  48. </s_inpt>
  49. <s_iphs>
  50. <iphs_status/>
  51. </s_iphs>
  52. <s_icdr>
  53. <icdr_status/>
  54. </s_icdr>
  55. <s_ipsc>
  56. <ipsc_status/>
  57. </s_ipsc>
  58. <ioflag/>
  59. <data5>
  60. <srchcond/>
  61. <pid/>
  62. <hngnm/>
  63. <rrgstno1/>
  64. <rrgstno2/>
  65. <autoflag/>
  66. </data5>
  67. <data8>
  68. <pid/>
  69. <insukind/>
  70. <insucd/>
  71. <appdd/>
  72. <instcd/>
  73. </data8>
  74. <data14>
  75. <srchcond/>
  76. <pid/>
  77. <hngnm/>
  78. </data14>
  79. <data15>
  80. <pid/>
  81. <insukind/>
  82. <insucd/>
  83. <appdd/>
  84. <instcd/>
  85. <checkflag/>
  86. <suppkind/>
  87. </data15>
  88. <data16>
  89. <roomcd/>
  90. </data16>
  91. <data17>
  92. <pid/>
  93. <indd/>
  94. <cretno/>
  95. <mskind/>
  96. <orddeptcd/>
  97. <medispclid/>
  98. <deciflag/>
  99. </data17>
  100. <data20>
  101. <data20_status/>
  102. <data20_pid/>
  103. <data20_cretno/>
  104. <data20_instcd/>
  105. <data20_mskind/>
  106. <data20_indd/>
  107. <data20_dschdd/>
  108. <data20_insukind/>
  109. <data20_suppkind/>
  110. <data20_disccd/>
  111. </data20>
  112. <data21>
  113. <srchcond/>
  114. <srchcnts/>
  115. <insuflag/>
  116. </data21>
  117. <data9>
  118. <mode/>
  119. <pid/>
  120. <indd/>
  121. <insukind/>
  122. <orddeptcd/>
  123. </data9>
  124. <data10>
  125. <list/>
  126. <todo_pid/>
  127. <todo_indd/>
  128. <todo_cretno/>
  129. <todo_mskind/>
  130. <todo_instcd/>
  131. <todo_fromdd/>
  132. <todo_todd/>
  133. <todo_insukind/>
  134. <todo_suppkind/>
  135. </data10>
  136. <data11>
  137. <pam_code/>
  138. </data11>
  139. <data22>
  140. <pid/>
  141. <indd/>
  142. <cretno/>
  143. <mskind/>
  144. <histstat/>
  145. <ioflag/>
  146. </data22>
  147. <data25>
  148. <sess_posinstcd/>
  149. <ioflag/>
  150. </data25>
  151. <data26/>
  152. <data41/>
  153. <data29>
  154. <pid/>
  155. <rgstno1/>
  156. <rgstno2/>
  157. <name/>
  158. <orddd/>
  159. </data29>
  160. </send>
  161. <main>
  162. <ptbs>
  163. <ptbs_status/>
  164. <ptbs_pid/>
  165. <ptbs_hngnm/>
  166. <ptbs_rrgstno1/>
  167. <ptbs_rrgstno2/>
  168. <ptbs_sex/>
  169. <ptbs_age/>
  170. <ptbs_vipyn/>
  171. <ptbs_forgeryn/>
  172. <ptbs_brthdd/>
  173. <ptbs_hometel/>
  174. <ptbs_mpphontel/>
  175. <ptbs_zipcd1/>
  176. <ptbs_zipcd2/>
  177. <ptbs_zipcdaddr/>
  178. <ptbs_zipcdseq/>
  179. <ptbs_detladdr/>
  180. <ptbs_remfact/>
  181. <ptbs_recmyn/>
  182. <ptbs_recmerid/>
  183. <ptbs_recmerrela/>
  184. <ptbs_dethyn/>
  185. <ptbs_dethdt/>
  186. </ptbs>
  187. <ptin>
  188. <ptin_status/>
  189. <ptin_pid/>
  190. <ptin_insukind/>
  191. <ptin_todd/>
  192. <ptin_insucd/>
  193. <ptin_insuno/>
  194. <ptin_insdrela/>
  195. <ptin_insdnm/>
  196. <ptin_insdrrgstno1/>
  197. <ptin_insdrrgstno2/>
  198. <ptin_fromdd/>
  199. <ptin_histstat/>
  200. <ptin_insucdnm/>
  201. </ptin>
  202. <h_cnst>
  203. <cnst>
  204. <cnst_pid/>
  205. <cnst_orddeptcd/>
  206. <cnst_insuflag/>
  207. <cnst_ordreqkind/>
  208. <cnst_todd/>
  209. <cnst_seqno/>
  210. <cnst_instcd/>
  211. <cnst_histstat/>
  212. <cnst_fromdd/>
  213. <cnst_fstrgstrid/>
  214. <cnst_fstrgstdt/>
  215. <cnst_lastupdtrid/>
  216. <cnst_lastupdtdt/>
  217. <cnst_orddeptcd_before/>
  218. <cnst_insuflag_before/>
  219. <cnst_ordreqkind_before/>
  220. <cnst_todd_before/>
  221. <cnst_seqno_before/>
  222. <cnst_stat/>
  223. </cnst>
  224. </h_cnst>
  225. <inpt>
  226. <inpt_status/>
  227. <inpt_hngnm/>
  228. <inpt_rrgstno/>
  229. <inpt_sex/>
  230. <inpt_age/>
  231. <inpt_brthdd/>
  232. <inpt_pid/>
  233. <inpt_indd/>
  234. <inpt_cretno/>
  235. <inpt_seqno/>
  236. <inpt_instcd/>
  237. <inpt_mskind/>
  238. <inpt_histstat/>
  239. <inpt_intm/>
  240. <inpt_inpath>I</inpt_inpath>
  241. <inpt_arvpath/>
  242. <inpt_ordrslt/>
  243. <inpt_hospbrthyn/>
  244. <inpt_rsrvinyn/>
  245. <inpt_dschdd/>
  246. <inpt_dschtm/>
  247. <inpt_dschtype/>
  248. <inpt_dethdt/>
  249. <inpt_indschacptstat/>
  250. <inpt_medcostestmflag/>
  251. <inpt_fsexamflag/>
  252. <inpt_fsexammanlyn/>
  253. <inpt_medamtpostyn/>
  254. <inpt_medamtfreeresn/>
  255. <inpt_holiflag/>
  256. <inpt_brateflag/>
  257. <inpt_ordtype/>
  258. <inpt_ermngtamtcalcyn/>
  259. <inpt_erbrthflag/>
  260. <inpt_erchospath/>
  261. <inpt_erorddeptcd/>
  262. <inpt_hosoutexptresncd/>
  263. <inpt_insukind/>
  264. <inpt_suppkind/>
  265. <inpt_centcd/>
  266. <inpt_dutdeptcd/>
  267. <inpt_suporddeptcd/>
  268. <inpt_orddeptcd/>
  269. <inpt_medispclid/>
  270. <inpt_atdoctid/>
  271. <inpt_specordyn/>
  272. <inpt_wardcd/>
  273. <inpt_roomcd/>
  274. <inpt_bedcd/>
  275. <inpt_roomgrdecd/>
  276. <inpt_roomtypecd/>
  277. <inpt_rqsthospcd/>
  278. <inpt_rqstdrid/>
  279. <inpt_hospiceyn/>
  280. <inpt_drgyn/>
  281. <inpt_bmtyn/>
  282. <inpt_clincstdyyn/>
  283. <inpt_clincstdycd/>
  284. <inpt_batlockid/>
  285. <inpt_batlockyn/>
  286. <inpt_prcplockid/>
  287. <inpt_ordcostretcdd/>
  288. <inpt_ordcostcalcdd/>
  289. <inpt_inacptdt/>
  290. <inpt_inacptchrgid/>
  291. <inpt_eroutdt/>
  292. <inpt_careinrmdd/>
  293. <inpt_careinrmtm/>
  294. <inpt_careinrmrgstrid/>
  295. <inpt_dietprcpcopyflag/>
  296. <inpt_incncldt/>
  297. <inpt_incnclchrgid/>
  298. <inpt_inoutcvrtyn/>
  299. <inpt_dschcnclyn/>
  300. <inpt_dschcnclresn/>
  301. <inpt_dschcncldt/>
  302. <inpt_dschcnclcharid/>
  303. <inpt_dschdclrtyn/>
  304. <inpt_dschdclrdt/>
  305. <inpt_dschdclrtrgstid/>
  306. <inpt_dschdclrtrgstdt/>
  307. <inpt_dschrgstacptdt/>
  308. <inpt_dschrgstacptcharid/>
  309. <inpt_dschnotiyn/>
  310. <inpt_dschnotidt/>
  311. <inpt_dschnotirgstid/>
  312. <inpt_dschnotirgstdt/>
  313. <inpt_visitrefyn/>
  314. <inpt_keepdschcnclresn/>
  315. <inpt_calclastdd/>
  316. <inpt_dschjudgprcsstat/>
  317. <inpt_lastjudgdt/>
  318. <inpt_lastmdlclamdd/>
  319. <inpt_lastjudgendid/>
  320. <inpt_spcljudgflag/>
  321. <inpt_probjudgflag/>
  322. <inpt_mainjudgid/>
  323. <inpt_medcaredayno/>
  324. <inpt_dschcntcyn/>
  325. <inpt_dscharngmnmemo/>
  326. <inpt_ownbmaxbadd/>
  327. <inpt_nblsyn/>
  328. <inpt_fstrgstrid/>
  329. <inpt_fstrgstdt/>
  330. <inpt_lastupdtrid/>
  331. <inpt_lastupdtdt/>
  332. <inpt_recovwardcd/>
  333. <inpt_recovmovedd/>
  334. <inpt_recovinrmdt/>
  335. <inpt_recovoutdt/>
  336. <inpt_ordreqformflag/>
  337. <inpt_handicaprbookpossnyn>N</inpt_handicaprbookpossnyn>
  338. <inpt_undersixageyn/>
  339. <inpt_spclcd/>
  340. <inpt_calcdd/>
  341. <inpt_calctm/>
  342. <inpt_badcd/>
  343. <inpt_ermedispclid/>
  344. <inpt_uncocd/>
  345. <inpt_pmflag/>
  346. <inpt_emplno/>
  347. <inpt_suppkindsubyn/>
  348. <inpt_ownbflag/>
  349. <inpt_opertodd/>
  350. <inpt_onlnno/>
  351. <inpt_careoutrmdt/>
  352. <inpt_careoutrmdelyresn/>
  353. <inpt_careoutrmrgstid/>
  354. <inpt_etcordflag/>
  355. <inpt_spclsuppkind/>
  356. <inpt_orgordtype/>
  357. <inpt_subdeptcd/>
  358. <inpt_coopteamcd/>
  359. <inpt_specordtype/>
  360. <inpt_iprcaddyn/>
  361. </inpt>
  362. <iphs>
  363. <iphs_status/>
  364. <iphs_pid/>
  365. <iphs_indd/>
  366. <iphs_cretno/>
  367. <iphs_fromdd/>
  368. <iphs_seqno/>
  369. <iphs_instcd/>
  370. <iphs_mskind/>
  371. <iphs_todd/>
  372. <iphs_histstat/>
  373. <iphs_indschacptstat/>
  374. <iphs_insukind/>
  375. <iphs_suppkind/>
  376. <iphs_suppkindresn/>
  377. <iphs_calcscorrecalflag/>
  378. <iphs_drgyn/>
  379. <iphs_bmtyn/>
  380. <iphs_cpyn>N</iphs_cpyn>
  381. <iphs_clincstdycd/>
  382. <iphs_disccd/>
  383. <iphs_rcptyn/>
  384. <iphs_clamkey/>
  385. <iphs_clamlastdd/>
  386. <iphs_judgmdlid/>
  387. <iphs_fstrgstrid/>
  388. <iphs_fstrgstdt/>
  389. <iphs_lastupdtrid/>
  390. <iphs_lastupdtdt/>
  391. <iphs_rareobstflag>I</iphs_rareobstflag>
  392. <iphs_ownbmaxgradeflag/>
  393. <iphs_emplnm/>
  394. <iphs_famyrelnm/>
  395. <iphs_preststatnm/>
  396. <iphs_profacptyn/>
  397. <iphs_profacptdd/>
  398. <iphs_remark/>
  399. <iphs_drgno/>
  400. <iphs_dschjudgprcsstat/>
  401. <iphs_judgdt/>
  402. <iphs_lastjudgendid/>
  403. <iphs_lastjudgendnm/>
  404. <iphs_etcordflag/>
  405. <iphs_handicaprbookpossnyn/>
  406. <iphs_forcesepcd/>
  407. <iphs_judgchgyn/>
  408. <iphs_judgchgdd/>
  409. <iphs_uncocd/>
  410. </iphs>
  411. <icdr>
  412. <icdr_status/>
  413. <icdr_pid/>
  414. <icdr_indd/>
  415. <icdr_cretno/>
  416. <icdr_fromdd/>
  417. <icdr_seqno/>
  418. <icdr_instcd/>
  419. <icdr_mskind/>
  420. <icdr_todd/>
  421. <icdr_histstat/>
  422. <icdr_acptflagcd/>
  423. <icdr_appflagcd/>
  424. <icdr_centcd/>
  425. <icdr_dutdeptcd/>
  426. <icdr_suporddeptcd/>
  427. <icdr_orddeptcd/>
  428. <icdr_medispclid/>
  429. <icdr_atdoctid/>
  430. <icdr_specordyn>N</icdr_specordyn>
  431. <icdr_wardcd/>
  432. <icdr_roomcd/>
  433. <icdr_bedcd/>
  434. <icdr_roomgrdecd/>
  435. <icdr_roomtypecd/>
  436. <icdr_wardcd2/>
  437. <icdr_roomcd2/>
  438. <icdr_bedcd2/>
  439. <icdr_roomgrdecd2/>
  440. <icdr_roomtypecd2/>
  441. <icdr_oxyyn/>
  442. <icdr_suctyn/>
  443. <icdr_prestremcd/>
  444. <icdr_chngprestrem/>
  445. <icdr_fstrgstrid/>
  446. <icdr_fstrgstdt/>
  447. <icdr_lastupdtrid/>
  448. <icdr_lastupdtdt/>
  449. <icdr_subdeptcd/>
  450. <icdr_coopteamcd/>
  451. <icdr_specordtype/>
  452. </icdr>
  453. <ipsc>
  454. <ipsc_status/>
  455. <ipsc_pid/>
  456. <ipsc_indd/>
  457. <ipsc_cretno/>
  458. <ipsc_recaldd/>
  459. <ipsc_recalfromdd/>
  460. <ipsc_recaltodd/>
  461. <ipsc_seqno/>
  462. <ipsc_instcd/>
  463. <ipsc_mskind/>
  464. <ipsc_histstat/>
  465. <ipsc_genrdd/>
  466. <ipsc_tretrslt/>
  467. <ipsc_errcnts/>
  468. <ipsc_retcgenrplce/>
  469. <ipsc_calctretflag/>
  470. <ipsc_fstrgstrid/>
  471. <ipsc_fstrgstdt/>
  472. <ipsc_lastupdtrid/>
  473. <ipsc_lastupdtdt/>
  474. </ipsc>
  475. <srdg>
  476. <srdg_pid/>
  477. <srdg_insuflag/>
  478. <srdg_suppkind/>
  479. <srdg_insukind/>
  480. <srdg_todd/>
  481. <srdg_seqno/>
  482. <srdg_instcd/>
  483. <srdg_histstat/>
  484. <srdg_fromdd/>
  485. <srdg_seridiagno/>
  486. <srdg_apppsnnm/>
  487. <srdg_rela/>
  488. <srdg_acptdd/>
  489. <srdg_acpttm/>
  490. <srdg_acptid/>
  491. <srdg_remfact/>
  492. <srdg_fstrgstrid/>
  493. <srdg_fstrgstdt/>
  494. <srdg_lastupdtrid/>
  495. <srdg_lastupdtdt/>
  496. <srdg_insuflag_before/>
  497. <srdg_suppkind_before/>
  498. <srdg_todd_before/>
  499. <srdg_seqno_before/>
  500. <srdg_stat/>
  501. </srdg>
  502. <aipm>
  503. <aipm_pid/>
  504. <aipm_suppkind/>
  505. <aipm_insucmpycd/>
  506. <aipm_insucdnm/>
  507. <aipm_paylimamt/>
  508. <aipm_aprvfromdd/>
  509. <aipm_aprvtodd/>
  510. <aipm_paygrntno/>
  511. </aipm>
  512. <icpm>
  513. <icpm_pid/>
  514. <icpm_mngtno/>
  515. <icpm_bizplcenm/>
  516. <icpm_inducsbrchcd/>
  517. <icpm_insucdnm/>
  518. <icpm_acddd/>
  519. <icpm_ordopendd/>
  520. <icpm_apryfromdd/>
  521. <icpm_aprytodd/>
  522. <icpm_spredayno/>
  523. </icpm>
  524. <admi/>
  525. <disc>
  526. <disc_pid/>
  527. <disc_indd/>
  528. <disc_disccd/>
  529. <disc_rareobstflag/>
  530. <disc_emplname/>
  531. <disc_rrgstno1/>
  532. <disc_rrgstno2/>
  533. <disc_realemplno/>
  534. <disc_discuncocd/>
  535. <disc_famyrelcd/>
  536. <disc_famyrelnm/>
  537. <disc_preststatnm/>
  538. <disc_remark/>
  539. </disc>
  540. <h_inpt>
  541. <inpt/>
  542. </h_inpt>
  543. <h_iphs>
  544. <iphs/>
  545. </h_iphs>
  546. <h_icdr>
  547. <icdr/>
  548. </h_icdr>
  549. <popupendflag/>
  550. <patinfo>
  551. <patinfolist>
  552. <pid/>
  553. <hngnm/>
  554. <indd/>
  555. <bthdt/>
  556. </patinfolist>
  557. </patinfo>
  558. <rooa>
  559. <rooa>
  560. <rooa_pid/>
  561. <rooa_insuflag/>
  562. <rooa_suppkind/>
  563. <rooa_insukind/>
  564. <rooa_todd/>
  565. <rooa_seqno/>
  566. <rooa_instcd/>
  567. <rooa_histstat/>
  568. <rooa_fromdd/>
  569. <rooa_rareobstno/>
  570. <rooa_apppsnnm/>
  571. <rooa_rela/>
  572. <rooa_acptdd/>
  573. <rooa_acpttm/>
  574. <rooa_acptid/>
  575. <rooa_remfact/>
  576. <rooa_fstrgstrid/>
  577. <rooa_fstrgstdt/>
  578. <rooa_lastupdtrid/>
  579. <rooa_lastupdtdt/>
  580. <rooa_insuflag_before/>
  581. <rooa_suppkind_before/>
  582. <rooa_todd_before/>
  583. <rooa_seqno_before/>
  584. <rooa_stat/>
  585. </rooa>
  586. </rooa>
  587. </main>
  588. <hidden>
  589. <rcv>
  590. <ptbs>
  591. <ptbs_status/>
  592. <ptbs_pid/>
  593. <ptbs_hngnm/>
  594. <ptbs_rrgstno1/>
  595. <ptbs_rrgstno2/>
  596. <ptbs_sex/>
  597. <ptbs_age/>
  598. <ptbs_vipyn/>
  599. <ptbs_forgeryn/>
  600. <ptbs_brthdd/>
  601. <ptbs_hometel/>
  602. <ptbs_mpphontel/>
  603. <ptbs_zipcd1/>
  604. <ptbs_zipcd2/>
  605. <ptbs_zipcdaddr/>
  606. <ptbs_zipcdseq/>
  607. <ptbs_detladdr/>
  608. <ptbs_remfact/>
  609. <ptbs_recmyn/>
  610. <ptbs_recmerid/>
  611. <ptbs_recmerrela/>
  612. </ptbs>
  613. <ptin>
  614. <ptin_status/>
  615. <ptin_pid/>
  616. <ptin_insukind/>
  617. <ptin_insucd/>
  618. <ptin_insuno/>
  619. <ptin_insdrela/>
  620. <ptin_insdnm/>
  621. <ptin_insdrrgstno1/>
  622. <ptin_insdrrgstno2/>
  623. <ptin_fromdd/>
  624. <ptin_todd/>
  625. <ptin_histstat/>
  626. </ptin>
  627. <icdr/>
  628. <iphs/>
  629. <inpt/>
  630. <admi/>
  631. <disc/>
  632. </rcv>
  633. <h_rcv>
  634. <ptin/>
  635. <srdg/>
  636. <!-- 20091215 JHP 수정추가 희귀번호 보여주기 rooa 추가 변경번호 9553 -->
  637. <rooa/>
  638. <aipm/>
  639. <icpm/>
  640. </h_rcv>
  641. <original>
  642. <inpt/>
  643. <iphs/>
  644. <icdr/>
  645. <srdg/>
  646. <!-- 20091215 JHP 수정추가 희귀번호 보여주기 rooa 추가 변경번호 9553 -->
  647. <rooa/>
  648. <aipm/>
  649. <icpm/>
  650. <patinfo>
  651. <patinfolist>
  652. <pid/>
  653. <hngnm/>
  654. <indd/>
  655. <bthdt/>
  656. <sickbabyyn/>
  657. <immatureyn/>
  658. </patinfolist>
  659. </patinfo>
  660. <adrv>
  661. <adrv_pid/>
  662. <adrv_inrsrvrem/>
  663. </adrv>
  664. </original>
  665. <flag>
  666. <iphs_flag/>
  667. <icdr_flag/>
  668. <icdr_app_flag/>
  669. <rcv_flag>
  670. <ptbs_count/>
  671. <ptin_count/>
  672. <inpt_count/>
  673. <iphs_count/>
  674. <icdr_count/>
  675. </rcv_flag>
  676. </flag>
  677. <temp>
  678. <ptin>
  679. <ptin_status/>
  680. <ptin_pid/>
  681. <ptin_insukind/>
  682. <ptin_insucd/>
  683. <ptin_insucdnm/>
  684. <ptin_insuno/>
  685. <ptin_insdrela/>
  686. <ptin_insdnm/>
  687. <ptin_insdrrgstno1/>
  688. <ptin_insdrrgstno2/>
  689. <ptin_fromdd/>
  690. <ptin_todd/>
  691. <ptin_histstat/>
  692. </ptin>
  693. <srdg>
  694. <srdg_pid/>
  695. <srdg_insuflag/>
  696. <srdg_suppkind/>
  697. <srdg_insukind/>
  698. <srdg_todd/>
  699. <srdg_seqno/>
  700. <srdg_instcd/>
  701. <srdg_histstat/>
  702. <srdg_fromdd/>
  703. <srdg_seridiagno/>
  704. <srdg_apppsnnm/>
  705. <srdg_rela/>
  706. <srdg_acptdd/>
  707. <srdg_acpttm/>
  708. <srdg_acptid/>
  709. <srdg_remfact/>
  710. <srdg_fstrgstrid/>
  711. <srdg_fstrgstdt/>
  712. <srdg_lastupdtrid/>
  713. <srdg_lastupdtdt/>
  714. <srdg_insuflag_before/>
  715. <srdg_suppkind_before/>
  716. <srdg_todd_before/>
  717. <srdg_seqno_before/>
  718. <srdg_stat/>
  719. </srdg>
  720. <aipm>
  721. <aipm_pid/>
  722. <aipm_suppkind/>
  723. <aipm_insucmpycd/>
  724. <aipm_insucdnm/>
  725. <aipm_paylimamt/>
  726. <aipm_aprvfromdd/>
  727. <aipm_aprvtodd/>
  728. </aipm>
  729. <icpm>
  730. <icpm_pid/>
  731. <icpm_mngtno/>
  732. <icpm_bizplcenm/>
  733. <icpm_inducsbrchcd/>
  734. <icpm_insucdnm/>
  735. <icpm_acddd/>
  736. <icpm_ordopendd/>
  737. <icpm_aprvfromdd/>
  738. <icpm_aprvtodd/>
  739. <icpm_spredayno/>
  740. </icpm>
  741. </temp>
  742. <init>
  743. <disccd>
  744. <cd/>
  745. <nm/>
  746. </disccd>
  747. <insukind>
  748. <cd/>
  749. <nm/>
  750. </insukind>
  751. <suppkind>
  752. <cd/>
  753. <nm/>
  754. <up/>
  755. <io/>
  756. </suppkind>
  757. <orddeptcd>
  758. <cd/>
  759. <nm/>
  760. <orddeptflag/>
  761. </orddeptcd>
  762. <orddrid>
  763. <cd/>
  764. <nm/>
  765. <dp/>
  766. <sp/>
  767. </orddrid>
  768. <wardcd>
  769. <cd/>
  770. <nm/>
  771. <of/>
  772. </wardcd>
  773. <roomcd>
  774. <cd/>
  775. <nm/>
  776. <wd/>
  777. <gr/>
  778. <ty/>
  779. </roomcd>
  780. <bedcd>
  781. <cd/>
  782. <nm/>
  783. <wd/>
  784. <rm/>
  785. </bedcd>
  786. <flag>
  787. <prestdd/>
  788. <mskindflag/>
  789. </flag>
  790. <insucd>
  791. <cd/>
  792. <nm/>
  793. </insucd>
  794. <uncocd>
  795. <cd/>
  796. <nm/>
  797. </uncocd>
  798. <suppkindhist>
  799. <cd/>
  800. <nm/>
  801. <up/>
  802. <io/>
  803. <fromdd/>
  804. <todd/>
  805. </suppkindhist>
  806. </init>
  807. <source>
  808. <pid/>
  809. <indd/>
  810. <cretno/>
  811. <mskind/>
  812. </source>
  813. <target/>
  814. <userpopupinfo>
  815. <param/>
  816. <flag/>
  817. <searchitem/>
  818. </userpopupinfo>
  819. <oneselect/>
  820. <popup>
  821. <insuflag/>
  822. <srchcnts/>
  823. <srchcond/>
  824. <pid/>
  825. </popup>
  826. <roomcheck>
  827. <rsltroom/>
  828. </roomcheck>
  829. <d_rcv>
  830. <drnb>
  831. <pid/>
  832. <bthdt/>
  833. <hngnm/>
  834. <indd/>
  835. <sickbabyyn/>
  836. <immatureyn/>
  837. </drnb>
  838. </d_rcv>
  839. <check/>
  840. <etc>
  841. <disccd/>
  842. </etc>
  843. <iphschk>
  844. <temp/>
  845. <temp1/>
  846. </iphschk>
  847. <printers>
  848. <deci_printer/>
  849. <card_printer/>
  850. </printers>
  851. <h_receipt>
  852. <receipt>
  853. <pid/>
  854. <hngnm/>
  855. <sex/>
  856. <age/>
  857. <religncd/>
  858. <rrgstno/>
  859. <orddeptcd/>
  860. <orddeptnm/>
  861. <specordyn/>
  862. <medispclid/>
  863. <wardcd/>
  864. <roomcd/>
  865. <bedcd/>
  866. <indd/>
  867. <barcode/>
  868. </receipt>
  869. </h_receipt>
  870. <building1/>
  871. <building2/>
  872. <visitrefyn/>
  873. <ScndSuptrgtFlag/>
  874. <roomgrdelist>
  875. <roomgrde>
  876. <cdid/>
  877. <cdnm/>
  878. <newcdid/>
  879. <typecd/>
  880. <yn/>
  881. <cdyn/>
  882. </roomgrde>
  883. </roomgrdelist>
  884. <rsrvyn/>
  885. <rsltflag>
  886. <indeciprint>
  887. <indd/>
  888. <roomcd/>
  889. <wardcd/>
  890. <wardnm/>
  891. <orddeptcd/>
  892. <orddeptnm/>
  893. <orddrid/>
  894. <orddrnm/>
  895. <pid/>
  896. <hngnm/>
  897. <rrgstno/>
  898. <hometel/>
  899. <insukind/>
  900. <bedcnt/>
  901. <diffamt/>
  902. <inrgstid/>
  903. <inrgstnm/>
  904. <diagnm/>
  905. <cretno/>
  906. <mskind/>
  907. <medispclid/>
  908. <insukindcd/>
  909. </indeciprint>
  910. <patappinfo1>
  911. <pid/>
  912. <hngnm/>
  913. <rrgstno1/>
  914. <rrgstno2/>
  915. <choiflag/>
  916. <ordtype/>
  917. <orddd/>
  918. <orddeptcd/>
  919. <orddrid/>
  920. <specordyn/>
  921. <fromdd/>
  922. <rsrvdd/>
  923. <rsrvrgstflag/>
  924. <elctappdd/>
  925. <elctappsignkey/>
  926. <elctappsigncnts/>
  927. <elctapprelakey/>
  928. <elctapprelacnts/>
  929. <lmcd/>
  930. <lmdrid1/>
  931. <lmdrid2/>
  932. <lmdrid3/>
  933. <lmspecyn/>
  934. <nmcd/>
  935. <nmdrid1/>
  936. <nmdrid2/>
  937. <nmdrid3/>
  938. <nmspecyn/>
  939. <apcd/>
  940. <apdrid1/>
  941. <apdrid2/>
  942. <apdrid3/>
  943. <apspecyn/>
  944. <rdcd/>
  945. <rddrid1/>
  946. <rddrid2/>
  947. <rddrid3/>
  948. <rdspecyn/>
  949. <rtcd/>
  950. <rtdrid1/>
  951. <rtdrid2/>
  952. <rtdrid3/>
  953. <rtspecyn/>
  954. <ancd/>
  955. <andrid1/>
  956. <andrid2/>
  957. <andrid3/>
  958. <anspecyn/>
  959. <npcd/>
  960. <npdrid1/>
  961. <npdrid2/>
  962. <npdrid3/>
  963. <npspecyn/>
  964. <hospnm/>
  965. <signimgsign/>
  966. <signimgrela/>
  967. <signimgsign1/>
  968. <signimgrela1/>
  969. <elctsignkey1/>
  970. <elctsigncnts1/>
  971. <elctsignkey2/>
  972. <elctsigncnts2/>
  973. </patappinfo1>
  974. </rsltflag>
  975. <autinsuinfo/>
  976. </hidden>
  977. <init>
  978. <P0002list>
  979. <P0002>
  980. <cdid/>
  981. <cdnm/>
  982. </P0002>
  983. </P0002list>
  984. <P0006list>
  985. <P0006>
  986. <cdnm/>
  987. <cdid/>
  988. </P0006>
  989. </P0006list>
  990. <P0015list>
  991. <P0015>
  992. <cdnm/>
  993. <cdid/>
  994. </P0015>
  995. </P0015list>
  996. <P0016list>
  997. <P0016>
  998. <cdnm/>
  999. <cdid/>
  1000. </P0016>
  1001. </P0016list>
  1002. <P0019list>
  1003. <P0019>
  1004. <cdnm/>
  1005. <cdid/>
  1006. </P0019>
  1007. </P0019list>
  1008. <P0021list>
  1009. <P0021>
  1010. <cdnm/>
  1011. <cdid/>
  1012. </P0021>
  1013. </P0021list>
  1014. <P0363list>
  1015. <P0363>
  1016. <cdid/>
  1017. <cdnm/>
  1018. </P0363>
  1019. </P0363list>
  1020. <P0032list>
  1021. <P0032>
  1022. <cdnm/>
  1023. <cdid/>
  1024. </P0032>
  1025. </P0032list>
  1026. <P0051list>
  1027. <P0051>
  1028. <cdnm/>
  1029. <cdid/>
  1030. </P0051>
  1031. </P0051list>
  1032. <P0149list>
  1033. <P0149>
  1034. <cdid/>
  1035. <cdnm/>
  1036. </P0149>
  1037. </P0149list>
  1038. <P0160list>
  1039. <P0160>
  1040. <cdnm/>
  1041. <cdid/>
  1042. </P0160>
  1043. </P0160list>
  1044. <M0157list>
  1045. <M0157>
  1046. <cdnm/>
  1047. <cdid/>
  1048. </M0157>
  1049. </M0157list>
  1050. <P0313list>
  1051. <P0313>
  1052. <cdnm/>
  1053. <cdid/>
  1054. </P0313>
  1055. </P0313list>
  1056. <P0327list>
  1057. <P0327>
  1058. <cdnm/>
  1059. <cdid/>
  1060. </P0327>
  1061. </P0327list>
  1062. <P0360list>
  1063. <P0360>
  1064. <cdnm/>
  1065. <cdid/>
  1066. </P0360>
  1067. </P0360list>
  1068. <P0363list>
  1069. <P0363>
  1070. <cdnm/>
  1071. <cdid/>
  1072. </P0363>
  1073. </P0363list>
  1074. <P0342list>
  1075. <P0342>
  1076. <cdnm/>
  1077. <cdid/>
  1078. </P0342>
  1079. </P0342list>
  1080. <P0312list>
  1081. <P0312>
  1082. <cdnm/>
  1083. <cdid/>
  1084. </P0312>
  1085. </P0312list>
  1086. <P0027list>
  1087. <P0027>
  1088. <cdnm>-</cdnm>
  1089. <cdid>-</cdid>
  1090. </P0027>
  1091. </P0027list>
  1092. <PAM>
  1093. <P0018list>
  1094. <P0018>
  1095. <cdid/>
  1096. <cdnm/>
  1097. <detl/>
  1098. </P0018>
  1099. </P0018list>
  1100. <P0041list>
  1101. <P0041>
  1102. <cdid/>
  1103. <cdnm/>
  1104. <detl/>
  1105. </P0041>
  1106. </P0041list>
  1107. <PK020list>
  1108. <PK020>
  1109. <cdid/>
  1110. <cdnm/>
  1111. </PK020>
  1112. </PK020list>
  1113. <PK043list>
  1114. <PK043>
  1115. <cdid/>
  1116. <cdnm/>
  1117. </PK043>
  1118. </PK043list>
  1119. <PK059list>
  1120. <PK059>
  1121. <cdid/>
  1122. <cdnm/>
  1123. </PK059>
  1124. </PK059list>
  1125. <PK062list>
  1126. <PK062>
  1127. <cdid/>
  1128. <cdnm/>
  1129. </PK062>
  1130. </PK062list>
  1131. <PK018list>
  1132. <PK018>
  1133. <cdid/>
  1134. <cdnm/>
  1135. </PK018>
  1136. </PK018list>
  1137. <PK084list>
  1138. <PK084>
  1139. <cdid/>
  1140. <cdnm/>
  1141. </PK084>
  1142. </PK084list>
  1143. <PK225list>
  1144. <PK225>
  1145. <cdid/>
  1146. <cdnm/>
  1147. </PK225>
  1148. </PK225list>
  1149. <P6571list>
  1150. <P6571>
  1151. <cdid/>
  1152. <cdnm/>
  1153. </P6571>
  1154. </P6571list>
  1155. <P0022list>
  1156. <P0022>
  1157. <cdid/>
  1158. <cdnm/>
  1159. </P0022>
  1160. </P0022list>
  1161. <P0032list>
  1162. <P0032>
  1163. <cdid/>
  1164. <cdnm/>
  1165. </P0032>
  1166. </P0032list>
  1167. </PAM>
  1168. </init>
  1169. <temp>
  1170. <insucdlist/>
  1171. </temp>
  1172. <tempchk>
  1173. <specapp>
  1174. <rgstyn/>
  1175. </specapp>
  1176. <specchk>
  1177. <stat/>
  1178. <pid/>
  1179. <hngnm/>
  1180. <rrgstno1/>
  1181. <rrgstno2/>
  1182. <choiflag/>
  1183. <ordtype/>
  1184. <orddd/>
  1185. <orddeptcd/>
  1186. <orddrid/>
  1187. <specordyn/>
  1188. <fromdd/>
  1189. <rsrvdd/>
  1190. </specchk>
  1191. </tempchk>
  1192. <temp10>
  1193. <disclist>
  1194. <disccd/>
  1195. </disclist>
  1196. </temp10>
  1197. </root>
  1198. </instance>
  1199. <submission id="TRZBC00101" mediatype="application/x-www-form-urlencoded" method="post"/>
  1200. <submission id="TRPAM00105" mediatype="application/x-www-form-urlencoded" method="post"/>
  1201. <submission id="TRPMI00401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/hidden/rcv"/>
  1202. <submission id="TRPMI00402" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data1" resultref="/root/hidden/rcv"/>
  1203. <submission id="TRPMI00403" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data1" resultref="/root/hidden/rcv"/>
  1204. <submission id="TRPMI00102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data1" resultref="/root/hidden/rcv"/>
  1205. <submission id="TRPMI00109" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data15" resultref="/root/hidden/h_rcv"/>
  1206. <submission id="TRPMI00203" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/ptbs"/>
  1207. <submission id="TRPMI00106" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/hidden/init"/>
  1208. <submission id="TRPMI02301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data14" resultref="/root/hidden/original/patinfo"/>
  1209. <submission id="TXPMI00401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/hidden/flag/rcv_flag"/>
  1210. <submission id="TXPMI00402" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data20" resultref="/root/hidden/flag/rcv_flag"/>
  1211. <!-- 신생아산모내역조회 -->
  1212. <submission id="TRPMI00111" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data16" resultref="/root/hidden/roomcheck"/>
  1213. <submission id="TRPAC00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp"/>
  1214. <submission id="TRPMI00114" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data21" resultref="/root/temp/insucdlist"/>
  1215. <submission id="TRPMI00113" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data40" resultref="/root/hidden/h_deciprint"/>
  1216. <submission id="TRPMI00404" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data14" resultref="/root/hidden/d_rcv"/>
  1217. <submission id="TRPMI00107" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data9" resultref="/root/hidden/check"/>
  1218. <submission id="TXPMI00403" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data10" resultref="/root/hidden/flag/rcv_flag"/>
  1219. <submission id="TRPMC03802" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/discpat" replace="instance" resultref="/root/temp/result"/>
  1220. <!-- <submission id="TRPMI00118" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data11" resultref="/root/hidden/printers"/> -->
  1221. <submission id="TRPMI00112" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data22" resultref="/root/hidden/h_receipt"/>
  1222. <!-- 20090603, JHP, 등급죽은거 산거 구분 보기 위해서 추가함. TRPMB00303 참조, 기존에 cdid와, cdnm만 있었는데 typecd추가함. (등급콤보에 모두적용)_ 입원등록, 입원예약, 병실배정, 전과전실승인 -->
  1223. <submission id="TRPMI00405" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data25" resultref="/root/hidden/roomgrdelist"/>
  1224. <submission id="TRPMI00406" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data26" replace="instance" resultref="/root/tempchk"/>
  1225. <submission id="TRPMO00120" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/checkjabosasae" resultref="/root/hidden/rcv"/>
  1226. <submission id="TRPMI01202" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data41" resultref="/root/hidden/rsltflag"/>
  1227. <submission id="TRPMI01203" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/hidden/autinsuinfo"/>
  1228. <submission id="TRPAO00118" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data29" resultref="/root/temp10"/>
  1229. <submission id="TRPMC01701" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/temp/handcappat/send" resultref="/root/temp/handcappat"/>
  1230. </model>
  1231. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  1232. <script type="javascript" src="../../../com/commonweb/js/utilHelper.js"/>
  1233. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  1234. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  1235. <script type="javascript" src="../../../pam/opatmngtweb/js/PMOCOM.js"/>
  1236. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  1237. <script type="javascript" src="../../../com/zipcodeweb/js/ZBP001.js"/>
  1238. <script type="javascript" src="../../../pam/pamcomnweb/js/PAM.js"/>
  1239. <script type="javascript" src="../../../pam/pamcomnweb/js/PAM001.js"/>
  1240. <script type="javascript" src="../../../pam/ipatmngtweb/js/PMI001.js"/>
  1241. <script type="javascript" src="../../../emr/prcpmngtweb/js/MMO001.js"/>
  1242. <script type="javascript" ev:event="xforms-ready">
  1243. <![CDATA[
  1244. // 2009년 03월 20일, JHP
  1245. // 서울성모이전으로 프린터를 2tray와 1tray짜리를 동시에 사용한다. 수납쪽(영수증, 중간계산서)은 1tray, 등록쪽(약정서, 입원카드)은 2tray를 쓰는데
  1246. // 1트레이는 기본이므로 수납쪽은 그냥 둔다. 근데 2트레이는 렉스퍼트 출력시 트레이번호를 셋팅값으로 박아줘야하는데 프린터 정보는 동적으로 가지고 올수 없기때문에
  1247. // 임의의 경로에 txt파일을 만들어 트레이값을 설정하여 저장하여놓고 불러와서 트레이번호를 매겨준다.
  1248. // 이때 해당 파일이 없으면 해당파일을 사용자가 만들어준다.
  1249. //fSetPrinterTray();
  1250. //20090602 JHP 추가_ 등급을 공통코드로 가져오는데 이는 입원료 수가 매핑과 관련해서 종료된 입원료를 컨트롤 할수 있는 소지가 있기에
  1251. // 실제 수가와 매핑코드를 조회하여 살아있는 입원료 등급 코드를 가져온다.
  1252. // 해당 조회를 실행한다음에 병실등급에 해당하는 콤보박스를 이걸로 바꾼다. 기존은 P0025(/root/init/P0025list/P0025)였다.
  1253. var sUserInfosS = getUserInfos();
  1254. sUserInfosS = sUserInfosS + "|";
  1255. var UserInfosS_Array = sUserInfosS.split("|");
  1256. var userid = UserInfosS_Array[0]; //사용자번호
  1257. var usernm = UserInfosS_Array[1]; //사용자이름
  1258. //var posinstcd = UserInfosS_Array[2]; //소속기관코드
  1259. //var posinstnm = UserInfosS_Array[3]; //소속기관명
  1260. var posinstcd = UserInfosS_Array[6]; //근무지기관코드 2009.04.15
  1261. var posinstnm = UserInfosS_Array[7]; //근무지기관명 2009.04.15
  1262. var posdeptcd = UserInfosS_Array[4]; //소속부서코드
  1263. var posdeptnm = UserInfosS_Array[5]; //소속부서명
  1264. model.setValue("/root/send/data25/sess_posinstcd",posinstcd);
  1265. submit("TRPMI00405");
  1266. // 로딩창 열기
  1267. var sWindowMsg = "화면 로딩중입니다..";
  1268. callLoadingWindow(sWindowMsg);
  1269. //2007.07.26 kshin 추가
  1270. //세션정보
  1271. fGetUserInfosSampling();
  1272. // 20091216 JHP 수가재계산구분(IPHS.calcscorrecalflag) 공통코드(P0027) 추가
  1273. zbcfGetCodeList(new Array("P0002","P0006","P0015","P0016","P0019",
  1274. "P0021","P0363","P0032","P0051","P0148",
  1275. "P0160","M0157","P0313","P0327","P0360",
  1276. "P0363","P0342","P0312","P0027"),
  1277. new Array("/root/init/P0002list", "/root/init/P0006list", "/root/init/P0015list","/root/init/P0016list","/root/init/P0019list",
  1278. "/root/init/P0021list","/root/init/P0363list","/root/init/P0032list","/root/init/P0051list","/root/init/P0148list",
  1279. "/root/init/P0160list","/root/init/M0157list","/root/init/P0313list","/root/init/P0327list","/root/init/P0360list",
  1280. "/root/init/P0363list","/root/init/P0342list","/root/init/P0312list","/root/init/P0027list"));
  1281. // 원무공통코드 조회
  1282. pamfGetCodeList(new Array("P0018", "PK020", "P0041", "PK043", "PK059", "PK062", "PK018", "PK084", "P6571", "P0022", "PK225", "P0032"),
  1283. new Array("/root/init/PAM/P0018list", "/root/init/PAM/PK020list", "/root/init/PAM/P0041list", "/root/init/PAM/PK043list", "/root/init/PAM/PK059list", "/root/init/PAM/PK062list", "/root/init/PAM/PK018list", "/root/init/PAM/PK084list", "/root/init/PAM/P6571list", "/root/init/PAM/P0022list", "/root/init/PAM/PK225list", "/root/init/PAM/P0032list"));
  1284. // 개인정보이용동의서 출력을 위한 서식코드 취득
  1285. reqHardCodeInfo("/root/send/reqdata", "/root/init/prncd", "5604");
  1286. reqHardCodeInfo("/root/send/reqdata", "/root/init/atdoctid", "515");
  1287. // 2009.08.07 - zzui - 입원약정서 상병,참고사항 숨김(성가만 적용) - 시작
  1288. //pamfGetCodeList(new Array("P0041"), new Array("/root/init/PAM/P0041list"));
  1289. var rsrvYN = model.getValue("/root/init/PAM/P0041list/P0041[cdid = 'F01']/cdnm");
  1290. model.setValue("/root/hidden/rsrvyn", rsrvYN);
  1291. // 2009.08.07 - zzui - 입원약정서 상병,참고사항 숨김(성가만 적용) - 끝
  1292. // 2009.05.13 - 입원약정서, 입원환자카드 프린터명
  1293. var sDeciPrinter = model.getValue("/root/init/PAM/P0018list/P0018[cdid = '1']/cdnm");
  1294. var sCardPrinter = model.getValue("/root/init/PAM/P0018list/P0018[cdid = '2']/cdnm");
  1295. model.setValue("/root/hidden/printers/deci_printer", sDeciPrinter); // 입원약정서
  1296. model.setValue("/root/hidden/printers/card_printer", sCardPrinter); // 입원등록카드
  1297. cmb_orddeptcd.choices.itemset.attribute("nodeset") = "/root/hidden/init/orddeptcd[orddeptflag = 'D']"
  1298. model.setValue("/root/send/ioflag","I");
  1299. submit("TRPMI00106");
  1300. model.setFocus("input17");
  1301. cap_brateout.visible = false;
  1302. addComboItem("combo32","-","-","above"); // 장애미수 - 설정
  1303. model.refresh();
  1304. if(model.getValue("/root/hidden/source/pid") != "" && model.getValue("/root/hidden/source/pid") != null) {
  1305. model.setValue("/root/send/ipatflag",'3');
  1306. model.setValue("/root/send/srchcond1",'1');
  1307. model.setValue("/root/send/srchcond2",model.getValue("/root/hidden/source/pid"));
  1308. fQuery1();
  1309. if(datagrid2.rows > 1) // 재원내역에 조회된 결과값이 있으면 해당환자의 정보를 조회한다.
  1310. {
  1311. fQuery("1");
  1312. combo6.dispatch("xforms-select");
  1313. }
  1314. } else if (checkOpener() && opener.javascript.getParameter("pid") != "" && opener.javascript.getParameter("pid") != null ) {
  1315. model.setValue("/root/send/ipatflag",'3');
  1316. model.setValue("/root/send/srchcond1",'1');
  1317. model.setValue("/root/send/srchcond2", opener.javascript.getParameter("pid"));
  1318. fQuery1();
  1319. if(datagrid2.rows > 1) // 재원내역에 조회된 결과값이 있으면 해당환자의 정보를 조회한다.
  1320. {
  1321. fQuery("1");
  1322. combo6.dispatch("xforms-select");
  1323. }
  1324. }
  1325. model.refresh();
  1326. // 로딩창 닫기
  1327. removeLoadingWindow();
  1328. // 상급병실 파라미터 초기화
  1329. setParameter("SPZHA20101_PARM_PID", "");
  1330. setParameter("SPZHA20101_PARM_INDD", "");
  1331. ]]>
  1332. </script>
  1333. <script type="javascript">
  1334. <![CDATA[
  1335. function fCheckSpecOrdApp(){
  1336. // if (model.getValue("/root/main/inpt/inpt_specordyn") == "N") {
  1337. // return false;
  1338. // }
  1339. // 선택진료폐지일자 이전의 진료에 대해서만 선택진료신청서 출력 by 조중래 20171227
  1340. if (model.getValue("/root/init/PAM/P0032list/P0032[cdid='150']/cdnm") > model.getValue("/root/main/icdr/icdr_fromdd")) {
  1341. model.makeValue("/root/send/data26/pid", model.getValue("/root/main/ptbs/ptbs_pid")); //환자번호
  1342. model.makeValue("/root/send/data26/instcd", model.getValue("/root/hidden/session/posinstcd")); //기관코드
  1343. model.makeValue("/root/send/data26/indd", model.getValue("/root/main/inpt/inpt_indd")); //입원일자
  1344. model.makeValue("/root/send/data26/orddeptcd", model.getValue("/root/main/inpt/inpt_orddeptcd")); //진료과
  1345. model.makeValue("/root/send/data26/medispclid", model.getValue("/root/main/inpt/inpt_medispclid")); //진료의
  1346. model.makeValue("/root/send/data26/ordtype", model.getValue("/root/main/inpt/inpt_ordtype")); //진료형태 2009/10/13
  1347. submit("TRPMI00406");
  1348. if (model.getValue("/root/tempchk/specapp/rgstyn") == "N") {
  1349. var sOrddeptcd = instance1.selectSingleNode("/root/hidden/init/orddeptcd[cd='" + model.getValue("/root/main/inpt/inpt_orddeptcd") + "']");
  1350. if (sOrddeptcd == null) {
  1351. var sOrddeptcdMsg = "";
  1352. } else {
  1353. var sOrddeptcdMsg = "[" + sOrddeptcd.nm.nodeValue + "]";
  1354. }
  1355. var sOrddrid = instance1.selectSingleNode("/root/hidden/init/orddrid[cd='" + model.getValue("/root/main/inpt/inpt_medispclid") + "']");
  1356. if (sOrddrid == null) {
  1357. var ssOrddridMsg = "";
  1358. } else {
  1359. var sOrddridMsg = " [" + sOrddrid.nm.nodeValue + "]";
  1360. }
  1361. sMsg = sOrddeptcdMsg + sOrddridMsg
  1362. if( messageBox(sMsg + " 선택진료 등록이 되어 있지 않습니다. 등록하시겠습니까?", "Q999", "") == 6 ){
  1363. /*
  1364. model.makeValue("/root/tempchk/specchk/stat", "");
  1365. model.makeValue("/root/tempchk/specchk/pid", model.getValue("/root/main/ptbs/ptbs_pid"));
  1366. model.makeValue("/root/tempchk/specchk/hngnm", model.getValue("/root/main/ptbs/ptbs_hngnm"));
  1367. model.makeValue("/root/tempchk/specchk/rrgstno1", model.getValue("/root/main/ptbs/ptbs_rrgstno1"));
  1368. model.makeValue("/root/tempchk/specchk/rrgstno2", model.getValue("/root/main/ptbs/ptbs_rrgstno2"));
  1369. model.makeValue("/root/tempchk/specchk/choiflag", "");
  1370. model.makeValue("/root/tempchk/specchk/ordtype", "I");
  1371. model.makeValue("/root/tempchk/specchk/orddd", model.getValue("/root/main/inpt/inpt_indd"));
  1372. model.makeValue("/root/tempchk/specchk/orddeptcd", model.getValue("/root/main/inpt/inpt_orddeptcd"));
  1373. model.makeValue("/root/tempchk/specchk/orddrid", model.getValue("/root/main/inpt/inpt_medispclid"));
  1374. if (model.getValue("/root/main/inpt/inpt_specordyn") != "N") {
  1375. model.makeValue("/root/tempchk/specchk/specordyn", "Y");
  1376. } else {
  1377. model.makeValue("/root/tempchk/specchk/specordyn", "N");
  1378. }
  1379. model.makeValue("/root/tempchk/specchk/fromdd", model.getValue("/root/main/inpt/inpt_indd"));
  1380. model.makeValue("/root/tempchk/specchk/rsrvdd", "");
  1381. modal("SMPMC06500", "1", "0", "0" ,"SMPMC06500", "/root/tempchk/specchk", "/root/main/patappinfo/patappinfo1");
  1382. */
  1383. var s_pid = model.getValue("/root/main/ptbs/ptbs_pid");
  1384. var s_ordtype = "I";
  1385. var s_orddd = model.getValue("/root/main/inpt/inpt_indd");
  1386. var s_orddeptcd = model.getValue("/root/main/inpt/inpt_orddeptcd");
  1387. var s_orddrid = model.getValue("/root/main/inpt/inpt_medispclid");
  1388. var s_fromdd = model.getValue("/root/main/inpt/inpt_indd");
  1389. var s_cretno = model.getValue("/root/main/inpt/inpt_cretno");
  1390. var s_hngnm = model.getValue("/root/main/ptbs/ptbs_hngnm");
  1391. var s_rrgstno1 = model.getValue("/root/main/ptbs/ptbs_rrgstno1");
  1392. var s_rrgstno2 = model.getValue("/root/main/ptbs/ptbs_rrgstno2");
  1393. fCallSpecPopUp(s_pid,s_ordtype,s_orddd,s_orddeptcd,s_orddrid,s_fromdd,s_hngnm,s_rrgstno1,s_rrgstno2,s_cretno);
  1394. return true;
  1395. }
  1396. }
  1397. }
  1398. }
  1399. // 2009.09.23 zzui - 선택진료 추가 끝
  1400. //2007.07.26 kshin 추가
  1401. //세션정보
  1402. function fGetUserInfosSampling()
  1403. {
  1404. var sUserInfosS = getUserInfos();
  1405. sUserInfosS = sUserInfosS + "|";
  1406. var UserInfosS_Array = sUserInfosS.split("|");
  1407. var userid = UserInfosS_Array[0]; //사용자번호
  1408. var usernm = UserInfosS_Array[1]; //사용자이름
  1409. //var posinstcd = UserInfosS_Array[2]; //소속기관코드
  1410. //var posinstnm = UserInfosS_Array[3]; //소속기관명
  1411. var posinstcd = UserInfosS_Array[6]; //근무지기관코드 2009.04.15
  1412. var posinstnm = UserInfosS_Array[7]; //근무지기관명 2009.04.15
  1413. var posdeptcd = UserInfosS_Array[4]; //소속부서코드
  1414. var posdeptnm = UserInfosS_Array[5]; //소속부서명
  1415. model.makeNode("/root/hidden/session/" + "userid");
  1416. model.makeNode("/root/hidden/session/" + "usernm");
  1417. model.makeNode("/root/hidden/session/" + "posinstcd");
  1418. model.makeNode("/root/hidden/session/" + "posinstnm");
  1419. model.makeNode("/root/hidden/session/" + "posdeptcd");
  1420. model.makeNode("/root/hidden/session/" + "posdeptnm")
  1421. if (userid == null || userid == "" || userid == " " || userid == "-") userid = "pam";
  1422. //if (posinstcd == null || posinstcd == "" || posinstcd == " " || posinstcd == "-") posinstcd = "";
  1423. model.setValue("/root/hidden/session/userid",userid);
  1424. model.setValue("/root/hidden/session/usernm",usernm);
  1425. model.setValue("/root/hidden/session/posinstcd",posinstcd);
  1426. model.setValue("/root/hidden/session/posinstnm",posinstnm);
  1427. model.setValue("/root/hidden/session/posdeptcd",posdeptcd);
  1428. model.setValue("/root/hidden/session/posdeptnm",posdeptnm);
  1429. model.refresh();
  1430. }
  1431. // PMI001.js 로 이동 주석처리
  1432. /*
  1433. function fInDeciPrintlss(vpid, vindd, vcretno, vmskind, vorddeptcd, vmedispclid, vdeciflag)
  1434. {
  1435. model.removeNodeset("/root/hidden/h_deciprint/deciprint");
  1436. model.makeNode("/root/hidden/h_deciprint/deciprint/indd"); //입원일 - 입원일시
  1437. model.makeNode("/root/hidden/h_deciprint/deciprint/inpath"); //입원경로
  1438. //입원구분
  1439. model.makeNode("/root/hidden/h_deciprint/deciprint/roomcd"); //입원병실
  1440. model.makeNode("/root/hidden/h_deciprint/deciprint/orddeptcd"); //진료과
  1441. model.makeNode("/root/hidden/h_deciprint/deciprint/orddrid"); //선택의
  1442. model.makeNode("/root/hidden/h_deciprint/deciprint/specordyn"); //선택의/지정의
  1443. model.makeNode("/root/hidden/h_deciprint/deciprint/pid"); //등록번호
  1444. model.makeNode("/root/hidden/h_deciprint/deciprint/hngnm"); //환자성명
  1445. model.makeNode("/root/hidden/h_deciprint/deciprint/rrgstno"); //주민번호
  1446. model.makeNode("/root/hidden/h_deciprint/deciprint/sex"); //성별1
  1447. model.makeNode("/root/hidden/h_deciprint/deciprint/religncd"); //종교
  1448. model.makeNode("/root/hidden/h_deciprint/deciprint/address"); //주소 = 상위주소 + 하위주소
  1449. model.makeNode("/root/hidden/h_deciprint/deciprint/hometel"); //전화번호
  1450. model.makeNode("/root/hidden/h_deciprint/deciprint/mpphontel"); //휴대폰
  1451. //근무처
  1452. //근무처연락처
  1453. model.makeNode("/root/hidden/h_deciprint/deciprint/insukind"); //보험유형
  1454. model.makeNode("/root/hidden/h_deciprint/deciprint/insucd"); //기관기호
  1455. model.makeNode("/root/hidden/h_deciprint/deciprint/insuno"); //증번호
  1456. model.makeNode("/root/hidden/h_deciprint/deciprint/insdnm"); //세대주(피보험자)
  1457. model.makeNode("/root/hidden/h_deciprint/deciprint/diagcd"); //상병코드
  1458. model.makeNode("/root/hidden/h_deciprint/deciprint/termhngnm"); //상병명
  1459. model.makeNode("/root/hidden/h_deciprint/deciprint/inschedd"); //입원예정일
  1460. model.makeNode("/root/hidden/h_deciprint/deciprint/opschedd"); //수술예정일
  1461. model.makeNode("/root/hidden/h_deciprint/deciprint/indirecdrnm"); //의뢰자
  1462. model.makeNode("/root/hidden/h_deciprint/deciprint/inrsrvacptdt"); //의뢰일시
  1463. model.makeNode("/root/hidden/h_deciprint/deciprint/handicapryn1"); //장애인유무체크
  1464. model.makeNode("/root/hidden/h_deciprint/deciprint/handicapryn2"); //장애인유무체크
  1465. model.makeNode("/root/hidden/h_deciprint/deciprint/inrsrvrem"); //원무참고사항
  1466. model.makeNode("/root/hidden/h_deciprint/deciprint/cnstyn"); //의뢰서제출여부
  1467. model.makeValue("/root/send/data17/pid", vpid);
  1468. model.makeValue("/root/send/data17/indd", vindd);
  1469. model.makeValue("/root/send/data17/cretno", vcretno);
  1470. model.makeValue("/root/send/data17/mskind", vmskind);
  1471. model.makeValue("/root/send/data17/orddeptcd", vorddeptcd);
  1472. model.makeValue("/root/send/data17/medispclid", vmedispclid);
  1473. model.makeValue("/root/send/data17/deciflag", vdeciflag);
  1474. if (submit("TRPMI00113") == true) {
  1475. var indd = model.getValue("/root/hidden/h_deciprint/deciprint/indd");
  1476. if (indd != null && indd != " " && indd != "") {
  1477. var s_indd = indd.substr(0,4) + "-" +
  1478. indd.substr(4,2) + "-" +
  1479. indd.substr(6,2);
  1480. model.setValue("/root/hidden/h_deciprint/deciprint/indd",s_indd);
  1481. // model.setValue("/root/hidden/h_deciprint/deciprint/mm",indd.substr(4,2));
  1482. // model.setValue("/root/hidden/h_deciprint/deciprint/dd",indd.substr(6,2));
  1483. var rrgstno = model.getValue("/root/hidden/h_deciprint/deciprint/rrgstno");
  1484. var s_rrgstno = rrgstno.substr(0,6) + "-" + rrgstno.substr(6,7);
  1485. model.setValue("/root/hidden/h_deciprint/deciprint/rrgstno",s_rrgstno);
  1486. var sinschedd = model.getValue("/root/hidden/h_deciprint/deciprint/inschedd");
  1487. var sopschedd = model.getValue("/root/hidden/h_deciprint/deciprint/opschedd");
  1488. var sinrsrvacptdt = model.getValue("/root/hidden/h_deciprint/deciprint/inrsrvacptdt");
  1489. var s_inrsrvacptdt = sinrsrvacptdt.substr(0,4) + "/" +
  1490. sinrsrvacptdt.substr(4,2) + "/" +
  1491. sinrsrvacptdt.substr(6,2) + " " +
  1492. sinrsrvacptdt.substr(8,2) + ":" +
  1493. sinrsrvacptdt.substr(10,2);
  1494. model.setValue("/root/hidden/h_deciprint/deciprint/inrsrvacptdt","");
  1495. if (sinschedd != null && sinschedd != "" && sinschedd != " ") {
  1496. model.setValue ("/root/hidden/h_deciprint/deciprint/inschedd", sinschedd.substr(0,4) + "년" + " " + sinschedd.substr(4,2) + "월" + " " + sinschedd.substr(6.2) + "일");
  1497. }
  1498. if (sopschedd != null && sopschedd != "" && sopschedd != " ") {
  1499. model.setValue ("/root/hidden/h_deciprint/deciprint/opschedd",sopschedd.substr(0,4) + "년" + " " + sopschedd.substr(4,2) + "월" + " " + sopschedd.substr(6.2) + "일");
  1500. }
  1501. if (sinrsrvacptdt != null && sinrsrvacptdt != "" && sinrsrvacptdt != " ") {
  1502. model.setValue("/root/hidden/h_deciprint/deciprint/inrsrvacptdt",s_inrsrvacptdt);
  1503. }
  1504. // 2009.08.05 - zzui - 입원약정서 상병,참고사항 숨김(성가만 적용) - 시작
  1505. var rsrvYn = model.getValue("/root/hidden/rsrvyn");
  1506. if (rsrvYn == 'N'){
  1507. model.setValue("/root/hidden/h_deciprint/deciprint/inrsrvrem","");
  1508. model.setValue("/root/hidden/h_deciprint/deciprint/diagcd","");
  1509. model.setValue("/root/hidden/h_deciprint/deciprint/termhngnm","");
  1510. }
  1511. // 2009.08.05 - zzui - 입원약정서 상병,참고사항 숨김(성가만 적용) - 끝
  1512. /*
  1513. var sPrinter;
  1514. var trayno;
  1515. // 2009.06.19 - local에 설정된 파일을 우선시 한다.
  1516. // print1:입원약정서, print2:입원환자카드, print3:선택신청
  1517. var printInfo = pmifGetPrintSetting("print1");
  1518. if (printInfo.length == 2) {
  1519. sPrinter = printInfo[0];
  1520. trayno = printInfo[1];
  1521. } else {
  1522. // 2008.09.21 입원약정서 출력용 프린터 이름 조회 - 최병진
  1523. sPrinter = model.getValue("/root/hidden/printers/deci_printer");
  1524. if (isNull(sPrinter)) {
  1525. sPrinter = "true";
  1526. }
  1527. // 2009년 03월 20일, JHP, 트레이정보를 받아서 넣는다.
  1528. trayno = model.getValue("/root/hidden/pam/printer/value");
  1529. }
  1530. exeReportPreview("RPPMI01200", "XMLSTR" , "" , "" , sPrinter , "", "", "", "", "true", "", "",trayno);
  1531. //공통코드 P0045에서 프린터 명칭과 트레이 호출 - 입원환자팔찌 프린터
  1532. fGetPrintName();
  1533. var print_name = getGlobalVariable("SPPAO00100_P0045_2_nm","p");
  1534. var print_tray = getGlobalVariable("SPPAO00100_P0045_2_tray","p");
  1535. //호출끝
  1536. //alert("입원팔찌 프린터명: " + print_name + " 트레이번호: " + print_tray);
  1537. //입원환자팔찌 프린터
  1538. if(print_name != "false"){
  1539. exeReportPreview("RPPMI01200", "XMLSTR" , "" , "" , print_name , "", "", "", "", "true", "", "",print_tray);
  1540. }
  1541. } else {
  1542. var sOrdType = model.getValue("/root/main/inpt/inpt_ordtype");
  1543. if (sOrdType == "E" || sOrdType == "D") {
  1544. messageBox("응급/DSC/CHEMO 환자입니다. [전과전실승인]화면에서 출력하십시오.!", "I");
  1545. }
  1546. }
  1547. }
  1548. }
  1549. */
  1550. //병실 성별 체크 2007.11.21 신준영
  1551. function fRoomSexCheck(inpt_wardcd, inpt_roomcd, ptbs_sex, inpt_sex, flag, rrgstno)
  1552. {
  1553. if (fRoomSexGubunCheck(rrgstno)) {
  1554. return true;
  1555. }
  1556. if (flag == 1) {
  1557. if (ptbs_sex != inpt_sex) {
  1558. if (inpt_sex != "A" && inpt_sex != "" && inpt_sex != " " && inpt_sex != null) {
  1559. messageBox("환자 성별과 병실정보 성별이 다릅니다. 다른 병실을","C002");
  1560. model.setValue("/root/main/icdr/icdr_roomcd","");
  1561. model.setValue("/root/main/icdr/icdr_roomgrdecd","");
  1562. model.setValue("/root/main/icdr/icdr_roomtypecd","");
  1563. model.refresh();
  1564. return false;
  1565. }
  1566. }
  1567. //분만실("2100300000")일 경우 남자 체크
  1568. if (inpt_wardcd == "2100300000") {
  1569. if (ptbs_sex == "M") {
  1570. messageBox("성별이 남자입니다. 다른병동을","C002");
  1571. model.setValue("/root/main/icdr/icdr_wardcd",model.getValue("/root/hidden/original/inpt/inpt_wardcd"));
  1572. model.setValue("/root/main/icdr/icdr_roomcd","");
  1573. model.setValue("/root/main/icdr/icdr_roomgrdecd","");
  1574. model.setValue("/root/main/icdr/icdr_roomtypecd","");
  1575. model.refresh();
  1576. return false;
  1577. }
  1578. }
  1579. } else if (flag == 2) {
  1580. if (ptbs_sex != inpt_sex) {
  1581. if (inpt_sex != "A" && inpt_sex != "" && inpt_sex != " " && inpt_sex != null) {
  1582. messageBox("환자 성별과 병실정보 성별이 다릅니다. 다른 병실을","C002");
  1583. model.setValue("/root/main/icdr/icdr_roomcd2","");
  1584. model.setValue("/root/main/icdr/icdr_roomgrdecd2","");
  1585. model.setValue("/root/main/icdr/icdr_roomtypecd2","");
  1586. model.refresh();
  1587. return false;
  1588. }
  1589. }
  1590. //분만실("2100300000")일 경우 남자 체크
  1591. if (inpt_wardcd == "2100300000") {
  1592. if (ptbs_sex == "M") {
  1593. messageBox("성별이 남자입니다. 다른병동을","C002");
  1594. model.setValue("/root/main/icdr/icdr_wardcd2",model.getValue("/root/hidden/original/inpt/inpt_wardcd2"));
  1595. model.setValue("/root/main/icdr/icdr_roomcd2","");
  1596. model.setValue("/root/main/icdr/icdr_roomgrdecd2","");
  1597. model.setValue("/root/main/icdr/icdr_roomtypecd2","");
  1598. model.refresh();
  1599. return false;
  1600. }
  1601. }
  1602. }
  1603. }
  1604. function fSuppkindSet()
  1605. {
  1606. //2007.10.18 건강보험,의료급여2종일때 6세미만 유형보조 체크
  1607. var ptbs_age = model.getValue("/root/main/ptbs/ptbs_age");
  1608. var iphs_insukind = model.getValue("/root/main/iphs/iphs_insukind");
  1609. if (iphs_insukind == "11" || iphs_insukind == "22") {
  1610. // if (ptbs_age == null || ptbs_age == " " || ptbs_age == "") {
  1611. // alert("1");
  1612. // model.setValue("/root/main/iphs/iphs_suppkind","00");
  1613. // } else
  1614. if ( ptbs_age >= 0 && ptbs_age < 6) {
  1615. // alert("2");
  1616. model.setValue("/root/main/iphs/iphs_suppkind","08");
  1617. } //else {
  1618. // alert("3");
  1619. // model.setValue("/root/main/iphs/iphs_suppkind","00");
  1620. }
  1621. // } else {
  1622. // alert("4");
  1623. // model.setValue("/root/main/iphs/iphs_suppkind","00");
  1624. // }
  1625. // 입원요율에 따른 보조유형 재설정
  1626. // 외래요율
  1627. if (model.getValue("/root/main/inpt/inpt_brateflag") != null && model.getValue("/root/main/inpt/inpt_brateflag") == "O") {
  1628. cmb_suppkind.choices.itemset.attribute("nodeset") = "/root/hidden/init/suppkind[up = '"+ iphs_insukind +"' and (io = 'A' or io = 'O')]";
  1629. // 입원요율
  1630. } else {
  1631. cmb_suppkind.choices.itemset.attribute("nodeset") = "/root/hidden/init/suppkind[up = '"+ iphs_insukind +"' and (io = 'A' or io = 'I')]";
  1632. }
  1633. cmb_suppkind.refresh();
  1634. }
  1635. //2007.12.17 보험자명칭 조회
  1636. function fInsunmRef(vInsucd,vInsukind) {
  1637. model.resetInstanceNode("/root/send/data21");
  1638. model.makeValue("/root/send/data21/srchcond", "1");
  1639. model.makeValue("/root/send/data21/srchcnts", vInsucd);
  1640. model.makeValue("/root/send/data21/insuflag", vInsukind.substr(0,1));
  1641. if (submit("TRPMI00114")) {
  1642. if (model.getValue("/root/temp/insucdlist/incd/insucdnm") != "") {
  1643. var vinsucdnm = model.getValue("/root/temp/insucdlist/incd/insucdnm");
  1644. return vinsucdnm;
  1645. } else {
  1646. return "-";
  1647. }
  1648. }
  1649. }
  1650. //병상수 체크 2007.11.21 신준영
  1651. function fRoomBedCntCheck(flag)
  1652. {
  1653. if (flag == 1) {
  1654. var icdr_roomcd = model.getValue("/root/main/icdr/icdr_roomcd");
  1655. model.setValue("/root/send/data16/roomcd",icdr_roomcd);
  1656. submit("TRPMI00111");
  1657. var rm_chk = model.getValue("/root/hidden/roomcheck/rsltroom/rm_chk");
  1658. if (rm_chk < 1 && icdr_roomcd != "ERBD") {
  1659. messageBox("빈병상이 아닙니다. 다른 병실을","C002");
  1660. return false;
  1661. } else {
  1662. if(icdr_roomcd == "ERBD") {
  1663. model.setValue("/root/main/icdr/icdr_wardcd",2280200000);
  1664. model.setValue("/root/main/icdr/icdr_roomcd",icdr_roomcd);
  1665. model.setValue("/root/main/icdr/icdr_roomgrdecd","S1401");
  1666. model.setValue("/root/main/icdr/icdr_roomtypecd","S14");
  1667. }
  1668. return true;
  1669. }
  1670. } else if (flag == 2) {
  1671. var icdr_roomcd = model.getValue("/root/main/icdr/icdr_roomcd2");
  1672. model.setValue("/root/send/data16/roomcd",icdr_roomcd);
  1673. submit("TRPMI00111");
  1674. var rm_chk = model.getValue("/root/hidden/roomcheck/rsltroom/rm_chk");
  1675. if (rm_chk < 1) {
  1676. messageBox("빈병상이 아닙니다. 다른 병실을","C002");
  1677. return false;
  1678. } else {
  1679. return true;
  1680. }
  1681. }
  1682. }
  1683. function fInsdrelaSet()
  1684. {
  1685. //보험유형이 건강보험/의료보험/일반 일경우에는 피보험자관계 체크
  1686. var iphs_insukind = model.getValue("/root/main/iphs/iphs_insukind");
  1687. // alert(ptin_insukind);
  1688. if (iphs_insukind == gsBoHeom || iphs_insukind == gsBoHo1 || iphs_insukind == gsBoHo2 || iphs_insukind == gsIlBan) {
  1689. model.setValue("/root/main/ptin/ptin_insuno","-");
  1690. model.setValue("/root/main/ptin/ptin_insdrela","1");
  1691. model.setValue("/root/main/ptin/ptin_insdnm",model.getValue("/root/main/ptbs/ptbs_hngnm"));
  1692. model.setValue("/root/main/ptin/ptin_insdrrgstno1",model.getValue("/root/main/ptbs/ptbs_rrgstno1"));
  1693. model.setValue("/root/main/ptin/ptin_insdrrgstno2",model.getValue("/root/main/ptbs/ptbs_rrgstno2"));
  1694. } else {
  1695. // model.setValue("/root/main/iphs/iphs_suppkind","00");
  1696. model.setValue("/root/main/iphs/iphs_suppkindresn","-");
  1697. // model.setValue("/root/main/ptin/ptin_insucd","-");
  1698. model.setValue("/root/main/ptin/ptin_insdrela","");
  1699. // model.setValue("/root/main/ptin/ptin_insucdnm","-");
  1700. model.setValue("/root/main/ptin/ptin_insuno","-");
  1701. model.setValue("/root/main/ptin/ptin_insdnm","-");
  1702. model.setValue("/root/main/ptin/ptin_insdrrgstno1","-");
  1703. model.setValue("/root/main/ptin/ptin_insdrrgstno2","-");
  1704. // model.setValue("/root/main/ptin/ptin_insdrela","-");
  1705. }
  1706. }
  1707. //2010-11-09 이동식 수정
  1708. //산재 보조유형을 조회조건으로 추가
  1709. function fGetPTIN(vpid,vinsukind,vsuppkind,vinsucd,vappdd) {
  1710. fGetPTIN(vpid,vinsukind,vsuppkind,vinsucd,vappdd, '');
  1711. }
  1712. //2007.07.26 kshin 추가
  1713. function fGetPTIN(vpid,vinsukind,vsuppkind,vinsucd,vappdd, vsuppkind)
  1714. {
  1715. var iphs_insukind = model.getValue("/root/main/iphs/iphs_insukind");
  1716. //등록번호,보험유형,보험자코드 세팅
  1717. model.setValue("/root/send/data15/pid", vpid);
  1718. model.setValue("/root/send/data15/insukind", vinsukind);
  1719. model.setValue("/root/send/data15/insucd", vinsucd);
  1720. model.setValue("/root/send/data15/appdd", vappdd);
  1721. model.setValue("/root/send/data15/instcd", model.getValue("/root/hidden/session/posinstcd"));
  1722. model.setValue("/root/send/data15/checkflag", "1");
  1723. model.setValue("/root/send/data15/suppkind", vsuppkind);
  1724. // /root/hidden/h_rcv/h_ptin/ptin 해당 노드에 결과값 받음
  1725. submit("TRPMI00109");
  1726. //조회하기전에 clear
  1727. //model.resetInstanceNode("/root/main/outrgst/ptin");
  1728. //model.setValue("/root/main/outrgst/ptin/ptin_insukind",vinsukind);
  1729. //조회된 경우, 화면의 보험정보에 세팅
  1730. var ptin_pid = model.getValue("/root/hidden/h_rcv/ptin/ptin_pid");
  1731. if (ptin_pid != null && ptin_pid != "" && ptin_pid != " " ) {
  1732. copyNodeType("/root/main/ptin","/root/hidden/h_rcv/ptin","replace");
  1733. copyNodeType("/root/hidden/original/ptin","/root/hidden/h_rcv/ptin","replace");
  1734. fSuppkindSet();
  1735. } else {
  1736. //copyNodesetType("/root/hidden/h_rcv/ptin","/root/hidden/temp/ptin","replace");
  1737. model.setValue("/root/main/ptin/ptin_pid",vpid);
  1738. model.setValue("/root/main/ptin/ptin_insukind",model.getValue("/root/send/data15/insukind"));
  1739. fSuppkindSet();
  1740. model.setValue("/root/main/iphs/iphs_suppkindresn","-");
  1741. model.setValue("/root/main/ptin/ptin_insucdnm","-");
  1742. if (vinsukind == gsBoHeom){
  1743. model.setValue("/root/main/ptin/ptin_insucd","0015");
  1744. model.setValue("/root/main/ptin/ptin_insucdnm", fInsunmRef( model.getValue("/root/main/ptin/ptin_insucd"),model.getValue("/root/main/ptin/ptin_insukind")));
  1745. } else {
  1746. model.setValue("/root/main/ptin/ptin_insucd","-");
  1747. model.setValue("/root/main/ptin/ptin_insucdnm","-");
  1748. }
  1749. fInsdrelaSet();
  1750. model.setValue("/root/main/ptin/ptin_fromdd",getCurrentDate());
  1751. model.setValue("/root/main/ptin/ptin_todd","99991231");
  1752. model.refresh();
  1753. }
  1754. //조회된 경우, 화면의 중증정보에 세팅
  1755. var srdg_pid = model.getValue("/root/hidden/h_rcv/srdg/srdg_pid");
  1756. if (srdg_pid != null && srdg_pid != "" && srdg_pid != " " ) {
  1757. copyNodeType("/root/main/srdg","/root/hidden/h_rcv/srdg","replace");
  1758. copyNodeType("/root/hidden/original/srdg","/root/hidden/h_rcv/srdg","replace");
  1759. } else {
  1760. //copyNodesetType("/root/hidden/h_rcv/srdg","/root/hidden/temp/srdg","replace");
  1761. }
  1762. // 20091215 JHP 수정추가 희귀정보보여주기 변경요청번호 9553 세팅
  1763. // 20091215 JHP 수정추가 희귀질환번호가 있을때 보여주기, 중증번호 동시존재시 해당 기준에 따라서 보여주기
  1764. var rooa_pid = model.getValue("/root/hidden/h_rcv/rooa/rooa/rooa_pid");
  1765. if (rooa_pid != null && rooa_pid != "" && rooa_pid != " " ) {
  1766. copyNodeType("/root/main/rooa","/root/hidden/h_rcv/rooa/rooa","replace");
  1767. copyNodeType("/root/hidden/original/rooa","/root/hidden/h_rcv/rooa/rooa","replace");
  1768. } else {
  1769. }
  1770. //조회된 경우, 화면의 자보정보 세팅
  1771. var aipm_pid = model.getValue("/root/hidden/h_rcv/aipm/aipm_pid");
  1772. if (aipm_pid != null && aipm_pid != "" && aipm_pid != " " ) {
  1773. copyNodeType("/root/main/aipm","/root/hidden/h_rcv/aipm","replace");
  1774. //여기부터
  1775. model.setValue("/root/main/iphs/iphs_suppkind",model.getValue("/root/main/aipm/aipm_suppkind"));
  1776. copyNodeType("/root/hidden/original/aipm","/root/hidden/h_rcv/aipm","replace");
  1777. } else {
  1778. //copyNodesetType("/root/hidden/h_rcv/aipm","/root/hidden/temp/aipm","replace");
  1779. if (iphs_insukind == gsJaboKind){
  1780. messageBox("자보환자등록 자료가 존재하지않아 변경","E001");
  1781. /* 2008.09.25 - 전액본인부담으로 넣을 수 있도록 주석처리
  1782. model.setValue("/root/main/iphs/iphs_insukind",model.getValue("/root/main/h_iphs/iphs/iphs_insukind"));
  1783. var siphs_insukind = model.getValue("/root/main/iphs/iphs_insukind");
  1784. if (siphs_insukind == gsBoHeom || siphs_insukind == gsBoHo1 || siphs_insukind == gsBoHo2 ||
  1785. siphs_insukind == gsIlBan || siphs_insukind == gsForIn || siphs_insukind == gsImSang) {
  1786. copyNodeType("/root/main/ptin","/root/hidden/original/ptin","replace");
  1787. }
  1788. fInsukindTabSetting();
  1789. */
  1790. }
  1791. }
  1792. //조회된 경우, 화면의 산재정보 세팅
  1793. var icpm_pid = model.getValue("/root/hidden/h_rcv/icpm/icpm_pid");
  1794. if (icpm_pid != null && icpm_pid != "" && icpm_pid != " " ) {
  1795. copyNodeType("/root/main/icpm","/root/hidden/h_rcv/icpm","replace");
  1796. copyNodeType("/root/hidden/original/icpm","/root/hidden/h_rcv/icpm","replace");
  1797. } else {
  1798. //copyNodesetType("/root/hidden/h_rcv/icpm","/root/hidden/temp/icpm","replace");
  1799. if (iphs_insukind == gsSanJae || iphs_insukind == gsGongSang){
  1800. // 2009.06.10 - 전액본인부담으로 변경할 수 있도록 메시지만 출력
  1801. // messageBox("산재 또는 공상환자등록 자료가 존재하지않아 변경","E001");
  1802. // model.setValue("/root/main/iphs/iphs_insukind",model.getValue("/root/main/h_iphs/iphs/iphs_insukind"));
  1803. /*
  1804. var siphs_insukind = model.getValue("/root/main/iphs/iphs_insukind");
  1805. if (siphs_insukind == gsBoHeom || siphs_insukind == gsBoHo1 || siphs_insukind == gsBoHo2 ||
  1806. siphs_insukind == gsIlBan || siphs_insukind == gsForIn || siphs_insukind == gsImSang) {
  1807. copyNodeType("/root/main/ptin","/root/hidden/original/ptin","replace");
  1808. }
  1809. */
  1810. messageBox("산재등록정보가 존재하지 않습니다!","I");
  1811. fInsukindTabSetting();
  1812. }
  1813. }
  1814. model.refresh();
  1815. }
  1816. function fInitSetting(){
  1817. combo2.choices.itemset.attribute("nodeset") = "/root/hidden/init/orddrid";
  1818. combo2.refresh();
  1819. }
  1820. // 진료과,병동,병실의 콤보값을 셋팅한다.
  1821. function fComboNodeSet(arg1){
  1822. if (arg1 == 0){
  1823. var sorddeptcd = model.getValue("/root/main/icdr/icdr_orddeptcd");
  1824. combo2.choices.itemset.attribute("nodeset") = "/root/hidden/init/orddrid[dp = '" + sorddeptcd + "' ]";
  1825. combo2.refresh();
  1826. combo16.choices.itemset.attribute("nodeset") = "/root/hidden/init/orddrid[dp = '" + sorddeptcd + "' ]";
  1827. combo16.refresh();
  1828. var swardcd = model.getValue("/root/main/icdr/icdr_wardcd");
  1829. if (swardcd == null || swardcd == " " || swardcd == "") {
  1830. combo3.choices.itemset.attribute("nodeset") = "/root/hidden/init/roomcd";
  1831. combo3.refresh();
  1832. combo22.choices.itemset.attribute("nodeset") = "/root/hidden/init/bedcd";
  1833. combo22.refresh();
  1834. } else {
  1835. combo3.choices.itemset.attribute("nodeset") = "/root/hidden/init/roomcd[wd = '" + swardcd + "' ]";
  1836. combo3.refresh();
  1837. combo22.choices.itemset.attribute("nodeset") = "/root/hidden/init/bedcd[wd = '" + swardcd + "' ]";
  1838. combo22.refresh();
  1839. }
  1840. var swardcd2 = model.getValue("/root/main/icdr/icdr_wardcd2");
  1841. if (swardcd2 == null || swardcd2 == " " || swardcd2 == "" || swardcd2 == "-") {
  1842. combo12.choices.itemset.attribute("nodeset") = "/root/hidden/init/roomcd";
  1843. combo12.refresh();
  1844. combo23.choices.itemset.attribute("nodeset") = "/root/hidden/init/bedcd";
  1845. combo23.refresh();
  1846. } else {
  1847. combo12.choices.itemset.attribute("nodeset") = "/root/hidden/init/roomcd[wd = '" + swardcd2 + "' ]";
  1848. combo12.refresh();
  1849. combo23.choices.itemset.attribute("nodeset") = "/root/hidden/init/bedcd[wd = '" + swardcd2 + "' ]";
  1850. combo23.refresh();
  1851. }
  1852. var iinsukind = model.getValue("/root/main/iphs/iphs_insukind");
  1853. // 입원요율에 따른 보조유형 재설정
  1854. // 외래요율
  1855. if (model.getValue("/root/main/inpt/inpt_brateflag") != null && model.getValue("/root/main/inpt/inpt_brateflag") == "O") {
  1856. cmb_suppkind.choices.itemset.attribute("nodeset") = "/root/hidden/init/suppkind[up = '" + iinsukind + "' and (io = 'A' or io = 'O')]";
  1857. // 입원요율
  1858. } else {
  1859. cmb_suppkind.choices.itemset.attribute("nodeset") = "/root/hidden/init/suppkind[up = '" + iinsukind + "' and (io = 'A' or io = 'I')]";
  1860. }
  1861. cmb_suppkind.refresh();
  1862. }else if (arg1 == 1){
  1863. var sorddeptcd = model.getValue("/root/main/icdr/icdr_orddeptcd");
  1864. //2010-12-16 이동식 수정 - jobposcd 사용 부분 삭제
  1865. // combo2.choices.itemset.attribute("nodeset") = "/root/hidden/init/orddrid[dp = '" + sorddeptcd + "' and (jobposcd = 1782 or jobposcd = 1784 or jobposcd = 1786 or jobposcd = 1847 or jobposcd = 1848 or jobposcd = 1849 or jobposcd = 0545 or jobposcd = 1845 or jobposcd = 1781)]";
  1866. // combo2.refresh();
  1867. // combo16.choices.itemset.attribute("nodeset") = "/root/hidden/init/orddrid[dp = '" + sorddeptcd + "' and (jobposcd != 1782 and jobposcd != 1784 and jobposcd != 1786 and jobposcd != 1847 and jobposcd != 1848 and jobposcd != 1849 and jobposcd != 0545 and jobposcd != 1845 or jobposcd != 1781)]";
  1868. // combo16.refresh();
  1869. combo2.choices.itemset.attribute("nodeset") = "/root/hidden/init/orddrid[dp = '" + sorddeptcd + "' and jobposcd = 1782 ]";
  1870. combo2.refresh();
  1871. combo16.choices.itemset.attribute("nodeset") = "/root/hidden/init/orddrid[dp = '" + sorddeptcd + "' ]";
  1872. combo16.refresh();
  1873. }else if (arg1 == 2){
  1874. var swardcd = model.getValue("/root/main/icdr/icdr_wardcd");
  1875. if (swardcd == null || swardcd == " " || swardcd == "") {
  1876. combo3.choices.itemset.attribute("nodeset") = "/root/hidden/init/roomcd"
  1877. //model.resetInstanceNode("/root/main/icdr/icdr_roomcd");
  1878. combo3.refresh();
  1879. combo22.choices.itemset.attribute("nodeset") = "/root/hidden/init/bedcd";
  1880. combo22.refresh();
  1881. } else {
  1882. combo3.choices.itemset.attribute("nodeset") = "/root/hidden/init/roomcd[wd = '" + swardcd + "' ]";
  1883. //model.resetInstanceNode("/root/main/icdr/icdr_roomcd");
  1884. combo3.refresh();
  1885. combo22.choices.itemset.attribute("nodeset") = "/root/hidden/init/bedcd[wd = '" + swardcd + "' ]";
  1886. combo22.refresh();
  1887. }
  1888. } else if (arg1 == 3){
  1889. var swardcd2 = model.getValue("/root/main/icdr/icdr_wardcd2");
  1890. if (swardcd2 == null || swardcd2 == " " || swardcd2 == "" || swardcd2 == "-") {
  1891. combo12.choices.itemset.attribute("nodeset") = "/root/hidden/init/roomcd"
  1892. //model.resetInstanceNode("/root/main/icdr/icdr_roomcd2");
  1893. combo12.refresh();
  1894. combo23.choices.itemset.attribute("nodeset") = "/root/hidden/init/bedcd";
  1895. combo23.refresh();
  1896. } else {
  1897. combo12.choices.itemset.attribute("nodeset") = "/root/hidden/init/roomcd[wd = '" + swardcd2 + "' ]";
  1898. //model.resetInstanceNode("/root/main/icdr/icdr_roomcd2");
  1899. combo12.refresh();
  1900. combo23.choices.itemset.attribute("nodeset") = "/root/hidden/init/bedcd[wd = '" + swardcd2 + "' ]";
  1901. combo23.refresh();
  1902. }
  1903. } else if (arg1 == 4){
  1904. var iinsukind = model.getValue("/root/main/iphs/iphs_insukind");
  1905. // 입원요율에 따른 보조유형 재설정
  1906. // 외래요율
  1907. if (model.getValue("/root/main/inpt/inpt_brateflag") != null && model.getValue("/root/main/inpt/inpt_brateflag") == "O") {
  1908. cmb_suppkind.choices.itemset.attribute("nodeset") = "/root/hidden/init/suppkind[up = '" + iinsukind + "' and (io = 'A' or io = 'O')]";
  1909. // 입원요율
  1910. } else {
  1911. cmb_suppkind.choices.itemset.attribute("nodeset") = "/root/hidden/init/suppkind[up = '" + iinsukind + "' and (io = 'A' or io = 'I')]";
  1912. }
  1913. cmb_suppkind.refresh();
  1914. }else if (arg1 == 5){ // 특진여부 셋팅
  1915. // 2009.02.23 - 진료과코드도 조건으로 추가
  1916. var sOrddeptcd = model.getValue("/root/main/icdr/icdr_orddeptcd");
  1917. var sMedispclid = model.getValue("/root/main/icdr/icdr_medispclid");
  1918. //var sspecordyn = model.getValue("/root/hidden/init/orddrid[cd = '" + sMedispclid + "' ]/sp")
  1919. var sSpecOrdYN = model.getValue("/root/hidden/init/orddrid[dp='"+ sOrddeptcd +"' and cd='" + sMedispclid + "']/sp");
  1920. if (sSpecOrdYN == "Y") {
  1921. model.setValue("/root/main/icdr/icdr_specordyn", "Y");
  1922. } else {
  1923. model.setValue("/root/main/icdr/icdr_specordyn", "N");
  1924. }
  1925. //if (sspecordyn == null || sspecordyn == ""){
  1926. // sspecordyn = "N";
  1927. //}
  1928. //model.setValue("/root/main/icdr/icdr_specordyn", sspecordyn);
  1929. radio7.refresh();
  1930. } else if (arg1 == 6){ // 형태에 따른 병실 등급
  1931. var sroomtypecd = model.getValue("/root/main/icdr/icdr_roomtypecd");
  1932. if (sroomtypecd == null || sroomtypecd == " " || sroomtypecd == "") {
  1933. //combo7.choices.itemset.attribute("nodeset") = "/root/hidden/init/roomgrdecd"
  1934. combo7.choices.itemset.attribute("nodeset") = "/root/hidden/roomgrdelist/roomgrde";
  1935. combo7.refresh();
  1936. } else {
  1937. //combo7.choices.itemset.attribute("nodeset") = "/root/hidden/init/roomgrdecd[typecd = '" + sroomtypecd + "' ]";
  1938. combo7.choices.itemset.attribute("nodeset") = "/root/hidden/roomgrdelist/roomgrde[typecd = '" + sroomtypecd + "' ]";
  1939. combo7.refresh();
  1940. }
  1941. } else if (arg1 == 7){ // 형태2에 따른 병실 등급2
  1942. var sroomtypecd = model.getValue("/root/main/icdr/icdr_roomtypecd2");
  1943. if (sroomtypecd == null || sroomtypecd == " " || sroomtypecd == "") {
  1944. //combo9.choices.itemset.attribute("nodeset") = "/root/hidden/init/roomgrdecd"
  1945. combo9.choices.itemset.attribute("nodeset") = "/root/hidden/roomgrdelist/roomgrde"
  1946. combo9.refresh();
  1947. } else {
  1948. //combo9.choices.itemset.attribute("nodeset") = "/root/hidden/init/roomgrdecd[typecd = '" + sroomtypecd + "' ]";
  1949. combo9.choices.itemset.attribute("nodeset") = "/root/hidden/roomgrdelist/roomgrde[typecd = '" + sroomtypecd + "' ]";
  1950. combo9.refresh();
  1951. }
  1952. }
  1953. }
  1954. // 부유형은 병실변경하지 못하도록 기능제한 ( 일단 보류 )
  1955. function fChngRoomSet()
  1956. {
  1957. var sinpt_mskind = model.getValue("/root/main/inpt/inpt_mskind");
  1958. if (sinpt_mskind == 'M'){
  1959. combo3.disabled = false;
  1960. combo5.disabled = false;
  1961. combo7.disabled = false;
  1962. combo8.disabled = false;
  1963. combo9.disabled = false;
  1964. combo10.disabled = false;
  1965. combo12.disabled = false;
  1966. combo13.disabled = false;
  1967. button19.disabled = false;
  1968. button20.disabled = false;
  1969. } else if (sinpt_mskind == 'S'){
  1970. combo3.disabled = true;
  1971. combo5.disabled = true;
  1972. combo7.disabled = true;
  1973. combo8.disabled = true;
  1974. combo9.disabled = true;
  1975. combo10.disabled = true;
  1976. combo12.disabled = true;
  1977. combo13.disabled = true;
  1978. button19.disabled = true;
  1979. button20.disabled = true;
  1980. }
  1981. }
  1982. var is_prcs = '0'; // 인적사항의 조회가능여부 flag
  1983. var curruntrow = 0;
  1984. // 환자각종 정보 조회 : 인적사항, 보험정보, 감면정보, 재원유형, 재원이력, 신생아/산모내역, 입금내역 등
  1985. function fQuery(curruntrow){
  1986. if (model.getValue("/root/hidden/original/inpt["+curruntrow+"]/inpt_pid") =="" ||model.getValue("/root/hidden/original/inpt["+curruntrow+"]/inpt_pid") == null){
  1987. return;
  1988. }
  1989. //2008.01.07 인스턴스 수정
  1990. // model.setValue("/root/send/mode",'0');
  1991. // model.setValue("/root/send/prestdd",getCurrentDate());
  1992. // model.setValue("/root/send/pid",model.getValue("/root/hidden/original/inpt["+curruntrow+"]/inpt_pid"));
  1993. // model.setValue("/root/send/indd",model.getValue("/root/hidden/original/inpt["+curruntrow+"]/inpt_indd"));
  1994. // model.setValue("/root/send/cretno",model.getValue("/root/hidden/original/inpt["+curruntrow+"]/inpt_cretno"));
  1995. // model.setValue("/root/send/mskind",model.getValue("/root/hidden/original/inpt["+curruntrow+"]/inpt_mskind"));
  1996. // model.setValue("/root/send/insukind",model.getValue("/root/hidden/original/inpt["+curruntrow+"]/inpt_insukind"));
  1997. model.setValue("/root/send/data1/mode",'0');
  1998. model.setValue("/root/send/data1/prestdd",getCurrentDate());
  1999. model.setValue("/root/send/data1/pid",model.getValue("/root/hidden/original/inpt["+curruntrow+"]/inpt_pid"));
  2000. model.setValue("/root/send/data1/indd",model.getValue("/root/hidden/original/inpt["+curruntrow+"]/inpt_indd"));
  2001. model.setValue("/root/send/data1/cretno",model.getValue("/root/hidden/original/inpt["+curruntrow+"]/inpt_cretno"));
  2002. model.setValue("/root/send/data1/mskind",model.getValue("/root/hidden/original/inpt["+curruntrow+"]/inpt_mskind"));
  2003. model.setValue("/root/send/data1/insukind",model.getValue("/root/hidden/original/inpt["+curruntrow+"]/inpt_insukind"));
  2004. // 기존의 값은 Reset해야함. ( 값이 없을경우 기존의 값이 현재의 값처럼 오인될수 있음 )
  2005. model.resetInstanceNode("/root/main/ptbs");
  2006. model.resetInstanceNode("/root/main/ptin");
  2007. model.resetInstanceNode("/root/main/inpt");
  2008. model.resetInstanceNode("/root/main/iphs");
  2009. model.resetInstanceNode("/root/main/icdr");
  2010. model.resetInstanceNode("/root/main/nbmo");
  2011. model.resetInstanceNode("/root/main/admi");
  2012. model.resetInstanceNode("/root/main/h_inpt/inpt");
  2013. model.resetInstanceNode("/root/main/h_iphs/iphs");
  2014. model.resetInstanceNode("/root/main/h_icdr/icdr");
  2015. model.resetInstanceNode("/root/hidden/flag/icdr_app_flag");
  2016. model.resetInstanceNode("/root/main/srdg");
  2017. model.resetInstanceNode("/root/hidden/etc/disccd");
  2018. //model.refresh();
  2019. //기존의 노드를 삭제하지 않으면 현재의 노드가 추가되는 경우가 있음
  2020. model.removeNodeset("/root/main/ptbs");
  2021. model.removeNodeset("/root/main/ptin");
  2022. model.removeNodeset("/root/main/aipm");
  2023. model.removeNodeset("/root/main/icpm");
  2024. model.removeNodeset("/root/main/inpt");
  2025. model.removeNodeset("/root/main/iphs");
  2026. model.removeNodeset("/root/main/icdr");
  2027. // model.removeNodeset("/root/main/admi");
  2028. model.removeNodeset("/root/main/h_inpt/inpt");
  2029. model.removeNodeset("/root/main/h_iphs/iphs");
  2030. model.removeNodeset("/root/main/h_icdr/icdr");
  2031. model.removeNodeset("/root/hidden/original/ptbs");
  2032. model.removeNodeset("/root/hidden/original/ptin");
  2033. model.removeNodeset("/root/hidden/original/iphs");
  2034. model.removeNodeset("/root/hidden/original/icdr");
  2035. model.removeNodeset("/root/hidden/original/aipm");
  2036. model.removeNodeset("/root/hidden/original/icpm");
  2037. model.removeNodeset("/root/hidden/original/adrv");
  2038. //model.refresh();
  2039. model.resetInstanceNode("/root/hidden/rcv");
  2040. model.resetInstanceNode("/root/hidden/d_rcv");
  2041. if (submit("TRPMI00102","false") == true){ // 환자기본정보를 조회한다. (환자인적, 보험내역, 할인정보)
  2042. copyNodeType("/root/main", "/root/hidden/rcv", "after");
  2043. copyNodeType("/root/hidden/original", "/root/hidden/rcv", "after");
  2044. // 보험, 감면정보는 없다가 신규로 등록하는 사람이 있으므로 인스턴스 노드를 삭제하면 신규 등록시에는 인스턴스 노드가 없어 등록할수 없다.
  2045. // 그럼므로 신규일경우 생성한다. original쪽에도 같이 복사해야 저장시 변경여부를 체크해서 submit을 보낼수 있다.
  2046. if( document.models( 0 ).instances( 0 ).selectSingleNode("/root/main/ptin") == null ){
  2047. model.makeNode("/root/main/ptin");
  2048. model.makeNode("/root/hidden/original/ptin");
  2049. copyNodeType("/root/main/ptin", "/root/hidden/temp/ptin", "after");
  2050. copyNodeType("/root/hidden/original/ptin", "/root/hidden/temp/ptin", "after");
  2051. }
  2052. // 2008.10.19 - 재원변경관리 이기 때문에 할인코드가 설정되어 있을 때만 보여준다.
  2053. var sIphsDisccd = model.getValue("/root/main/iphs/iphs_disccd");
  2054. if (!isNull(sIphsDisccd) && sIphsDisccd != "-") {
  2055. // 2008.10.09 최종내원이력 중 감면정보가 있으면 자동으로 감면코드 셋팅
  2056. /*
  2057. var sDisccd = model.getValue("/root/main/disc/disc_disccd");
  2058. var sRareobstflag = model.getValue("/root/main/disc/disc_rareobstflag");
  2059. if (!isNull(sDisccd)) {
  2060. model.setValue("/root/main/iphs/iphs_disccd", sDisccd);
  2061. }
  2062. // 2008.10.09 최종내원이력 중 희귀난치대상여부가 있으면 자동으로 셋팅
  2063. if (!isNull(sRareobstflag)) {
  2064. model.setValue("/root/main/iphs/iphs_rareobstflag", sRareobstflag);
  2065. }
  2066. */
  2067. model.setValue("/root/main/iphs/iphs_emplnm", model.getValue("/root/main/disc/disc_emplname"));
  2068. model.setValue("/root/main/iphs/iphs_famyrelnm", model.getValue("/root/main/disc/disc_famyrelnm"));
  2069. model.setValue("/root/main/iphs/iphs_preststatnm", model.getValue("/root/main/disc/disc_preststatnm"));
  2070. model.setValue("/root/main/iphs/iphs_remark", model.getValue("/root/main/disc/disc_remark"));
  2071. }
  2072. }
  2073. submit("TRPMI00402","false"); // 재원이력을 조회한다. (재원유형, 재원이력)
  2074. //submit("TRPMI00402"); // 재원이력을 조회한다. (재원유형, 재원이력)
  2075. //copyNodeType("/root/main", "/root/hidden/rcv", "after");
  2076. copyNodeType("/root/hidden/original", "/root/hidden/rcv", "after");
  2077. //2008.01.07 신생아 산모내역 조회 수정 - 환자번호가 신생아일경우 산모내역을 디스플레이,환자번호가 산모일경우 신생아 내역을 디스플레이
  2078. model.setValue("/root/send/data14/pid",model.getValue("/root/main/ptbs/ptbs_pid"));
  2079. submit("TRPMI00404","false");
  2080. // model.setValue("/root/send/data14/srchcond","1");
  2081. // model.setValue("/root/send/data14/pid",model.getValue("/root/main/ptbs/ptbs_pid"));
  2082. // submit("TRPMI02301","false"); // 신생아산모내역을 조회한다.
  2083. submit("TRPMI00403","false"); // 입금내역을 조회한다. (입금내역)
  2084. var admi_node = instance1.selectSingleNode("/root/hidden/rcv/admi");
  2085. if (admi_node != null) {
  2086. copyNodesetType("/root/main/admi","/root/hidden/rcv/admi","replace");
  2087. }
  2088. // copyNodeType("/root/hidden/original", "/root/hidden/rcv", "after");
  2089. //2008.01.14 장애,중증정보 체크
  2090. model.setValue("/root/send/data9/mode","11");
  2091. model.setValue("/root/send/data9/pid",model.getValue("/root/main/ptbs/ptbs_pid"));
  2092. model.setValue("/root/send/data9/indd", model.getValue("/root/hidden/original/inpt/inpt_indd"));
  2093. model.setValue("/root/send/data9/insukind", model.getValue("/root/hidden/original/inpt["+curruntrow+"]/inpt_insukind"));
  2094. model.setValue("/root/send/data9/orddeptcd", model.getValue("/root/hidden/original/inpt["+curruntrow+"]/inpt_orddeptcd"));
  2095. submit("TRPMI00107");
  2096. model.resetInstanceNode("/root/send/data9");
  2097. var srdg_node = instance1.selectSingleNode("/root/hidden/check/srdg");
  2098. if (srdg_node != null) {
  2099. copyNodeType("/root/main/srdg","/root/hidden/check/srdg","replace");
  2100. }
  2101. // 20091215 JHP 수정추가 희귀정보보여주기 변경요청번호 9553 세팅
  2102. // 20091215 JHP 수정추가 희귀질환번호가 있을때 보여주기, 중증번호 동시존재시 해당 기준에 따라서 보여주기
  2103. var rooa_node = instance1.selectSingleNode("/root/hidden/check/rooa");
  2104. if (rooa_node != null) {
  2105. copyNodeType("/root/main/rooa","/root/hidden/check/rooa","replace");
  2106. }
  2107. // 20091215 JHP 재원변경화면 희귀질환번호 보여주기 추가 변경요청번호 9553 중증, 희귀 동시존재시 디스플레이변경
  2108. // 20091215 JHP 수정추가 희귀질환번호가 있을때 보여주기, 중증번호 동시존재시 해당 기준에 따라서 보여주기
  2109. fItemRareMsg();
  2110. // 재원이력변경에 쓸 인스턴스 생성 및 복사
  2111. model.makeNode("/root/main/inpt"); // main에 해당노드가 없으면 복사가 안되므로 추가한다.
  2112. model.makeNode("/root/main/iphs");
  2113. model.makeNode("/root/main/icdr");
  2114. model.makeNode("/root/main/h_inpt/inpt"); // "h_" 노드는 사용자가 데이터를 변경하였을때 변경된 사항을 비교하기 위해 사용한다.
  2115. model.makeNode("/root/main/h_iphs/iphs"); // "h_" 노드는 original쪽에 여러개의 row가 있을수 있는 경우 선택한 한건만 "h_" 노드로 복사해서 변경사항을 비교하고 나머지는 original과 비교한다.
  2116. model.makeNode("/root/main/h_icdr/icdr");
  2117. copyNodeType("/root/main/inpt","/root/hidden/original/inpt["+curruntrow+"]","after");
  2118. copyNodeType("/root/main/iphs","/root/hidden/original/iphs[1]","after"); // 우선 재원내역의 첫번째 row를 적용한다.
  2119. copyNodeType("/root/main/icdr","/root/hidden/original/icdr[icdr_lastyn = 'Y']" ,"after"); // 2008.12.20 신청정보를 제외한 것중 최종내역 선택 // 우선 재원이력의 첫번째 row를 적용한다.
  2120. copyNodeType("/root/main/h_inpt/inpt","/root/hidden/original/inpt["+curruntrow+"]","after");
  2121. copyNodeType("/root/main/h_iphs/iphs","/root/hidden/original/iphs[1]","after"); // 우선 재원내역의 첫번째 row를 적용한다.
  2122. copyNodeType("/root/main/h_icdr/icdr","/root/hidden/original/icdr[icdr_lastyn = 'Y']","after"); // 2008.12.20 신청정보를 제외한 것중 최종내역 선택 // 우선 재원이력의 첫번째 row를 적용한다.
  2123. // 전과전실이력의 선택한내용이 신청내용일경우 "신청승인여부"를 체크한다.
  2124. if (model.getValue("/root/main/icdr/icdr_acptflagcd") == '1') {
  2125. bool4.visible = true;
  2126. caption44.visible = true;
  2127. model.setValue("/root/hidden/flag/icdr_app_flag",'Y');
  2128. } else if (model.getValue("/root/main/icdr/icdr_acptflagcd") != '1') {
  2129. bool4.visible = false;
  2130. caption44.visible = false;
  2131. model.setValue("/root/hidden/flag/icdr_app_flag",'N');
  2132. }
  2133. //model.setValue("/root/main/iphs/iphs_fromdd",getCurrentDate());
  2134. //model.setValue("/root/main/icdr/icdr_fromdd",getCurrentDate());
  2135. //model.setValue("/root/hidden/flag/iphs_flag","N"); // 재원유형을 선택했는지 여부를 관리한다.
  2136. //model.setValue("/root/hidden/flag/icdr_flag","N"); // 재원이력을 선택했는지 여부를 관리한다.
  2137. //2008.01.14 수정 - 자보,산재,공상이면 내역을 조회한다
  2138. /* 2009.11.13 MYIIM 수정
  2139. @ desc model.getValue("/root/hidden/original/inpt["+curruntrow+"]/inpt_insukind") == "31" 제거
  2140. 재원이력에서 가져와야지 자보마스터에서 조회하여 세팅되어 있음 자보마스터 내역과 다른걸 체크할 수 없음.
  2141. */
  2142. // 자보의 경우 재원유형이력에서 정보를 조회 by 조중래 20130705
  2143. if (model.getValue("/root/hidden/original/inpt["+curruntrow+"]/inpt_insukind") == "31" ) {
  2144. model.setValue("/root/main/aipm/aipm_insucmpycd", model.getValue("/root/hidden/original/iphs["+1+"]/iphs_insucd"));
  2145. }
  2146. if (model.getValue("/root/hidden/original/inpt["+curruntrow+"]/inpt_insukind") == "41"
  2147. || model.getValue("/root/hidden/original/inpt["+curruntrow+"]/inpt_insukind") == "42") {
  2148. combo15.dispatch("xforms-select");
  2149. } else {
  2150. fInsukindTabSetting();
  2151. }
  2152. fComboNodeSet(0);
  2153. // fChngRoomSet();
  2154. model.refresh();
  2155. datagrid1.rebuild(); // 적용안하면 이전값이 화면에 보이므로 꼭 갱신해야한다.
  2156. datagrid2.rebuild(); // 적용안하면 이전값이 화면에 보이므로 꼭 갱신해야한다.
  2157. datagrid3.rebuild();
  2158. datagrid4.rebuild();
  2159. //fComboNodeSet(4);
  2160. // 2008.12.20 - 신청정보가 아닌 이력중 최종 내역을 선택되도록 인덱스 설정
  2161. var iIcdrCount = getNodesetCount("/root/hidden/original/icdr");
  2162. var iLastYnIndex = 0;
  2163. for (var idx = 1 ; idx < iIcdrCount ; idx++) {
  2164. var sCurrentLastYn = model.getValue("/root/hidden/original/icdr[" + idx + "]/icdr_lastyn");
  2165. if (sCurrentLastYn == "Y") {
  2166. iLastYnIndex = idx;
  2167. break;
  2168. }
  2169. }
  2170. //datagrid4.row = iLastYnIndex;
  2171. // 구현완료 : iphs와 icdr의 첫번째 ROW를 자동으로 Select 한다.
  2172. datagrid3.isSelected(1) = true;
  2173. datagrid4.isSelected(iLastYnIndex) = true;
  2174. model.setValue("/root/hidden/flag/iphs_flag","Y"); // 재원유형을 선택했는지 여부를 관리한다.
  2175. model.setValue("/root/hidden/flag/icdr_flag","Y"); // 재원이력을 선택했는지 여부를 관리한다.
  2176. is_prcs = '1' // 조회되었을때 인적사항에서의 조회기능을 막고 수정기능으로 변경한다.
  2177. // 구현예정 : 6세미만에서 벗어날때 유형보조 자동변경 및 메세지 처리
  2178. // 외래요율 표시 기능 추가(보험유형 수정관련)
  2179. if (model.getValue("/root/main/inpt/inpt_brateflag") == "O") {
  2180. cap_brateout.visible = true;
  2181. } else {
  2182. cap_brateout.visible = false;
  2183. }
  2184. // 2009.03.26 - 재원환자조회 시 차상위2종체크로직을 태워서 변경이 있으면 메시지를 뿌리고 값을 변경한다.
  2185. // 2009.04.06 - 알람만 주고 보조유형은 자동으로 변경하지 않도록 수정
  2186. var sInsuKind = model.getValue("/root/hidden/original/iphs/iphs_insukind");
  2187. var sInsuKindNew = model.getValue("/root/hidden/original/iphs/iphs_insukind_new");
  2188. var sSuppKind = model.getValue("/root/hidden/original/iphs/iphs_suppkind");
  2189. var sSuppKindNew = model.getValue("/root/hidden/original/iphs/iphs_suppkind_new");
  2190. if (!isNull(sSuppKindNew) && sSuppKind != sSuppKindNew) {
  2191. if (parseInt(sSuppKindNew) == 32) {
  2192. messageBox("[차상위1종] 대상 환자입니다!!", "I");
  2193. //model.setValue("/root/main/iphs/iphs_suppkind", sSuppKindNew);
  2194. }
  2195. if (parseInt(sSuppKindNew) >= 33) {
  2196. messageBox("[차상위2종] 대상 환자입니다!!", "I");
  2197. //model.setValue("/root/main/iphs/iphs_suppkind", sSuppKindNew);
  2198. }
  2199. }
  2200. // 2009.04.22 사망환자알람메시지
  2201. var sDethYn = model.getValue("/root/main/ptbs/ptbs_dethyn");
  2202. var sDethDt = model.getValue("/root/main/ptbs/ptbs_dethdt");
  2203. fCheckDethYN(sDethYn, sDethDt);
  2204. // 격리병실정보 표시 추가 by 조중래 20120621
  2205. fGetPatIsolateInfo(model.getValue("/root/main/inpt/inpt_isolateinfo"));
  2206. }
  2207. // 조회조건에 따른 조회문장(재원/가퇴원/퇴원에 따른 구분조회)
  2208. function fQuery1()
  2209. {
  2210. model.resetInstanceNode("/root/main");
  2211. model.resetInstanceNode("/root/hidden/original");
  2212. model.resetInstanceNode("/root/hidden/d_rcv");
  2213. model.resetInstanceNode("/root/hidden/etc");
  2214. model.resetInstanceNode("/root/send/data1");
  2215. model.removeNodeset("/root/main/inpt");
  2216. model.removeNodeset("/root/hidden/original/inpt");
  2217. submit("TRPMI00401","false");
  2218. var h_inpt_node = instance1.selectSingleNode("/root/hidden/rcv/inpt");
  2219. if(h_inpt_node == null){
  2220. messageBox("재원중인 내역이","I004");
  2221. return;
  2222. }
  2223. copyNodeType("/root/hidden/original", "/root/hidden/rcv", "after");
  2224. model.setValue("/root/hidden/flag/iphs_flag","N");
  2225. model.setValue("/root/hidden/flag/icdr_flag","N");
  2226. model.setValue("/root/hidden/flag/icdr_app_flag","N");
  2227. datagrid2.rebuild();
  2228. }
  2229. // 환자보험정보 조회 ( 보험유형 콤보로 항목이 변경되었을때 )
  2230. function fQuery_ptin()
  2231. {
  2232. model.setValue("/root/send/data1/mode",'2');
  2233. model.setValue("/root/send/data1/prestdd",model.getValue("/root/main/iphs/iphs_fromdd"));
  2234. model.setValue("/root/send/data1/pid",model.getValue("/root/main/inpt/inpt_pid"));
  2235. model.setValue("/root/send/data1/indd",model.getValue("/root/main/inpt/inpt_indd"));
  2236. model.setValue("/root/send/data1/mskind",model.getValue("/root/main/inpt/inpt_mskind"));
  2237. model.setValue("/root/send/data1/insukind",model.getValue("/root/main/iphs/iphs_insukind"));
  2238. submit("TRPMI00102","false"); // 환자기본정보를 조회한다. (환자인적, 보험내역, 할인정보)
  2239. // "/root/hidden/original/ptin"의 값에는 copyNode하지 않는다. 그래야 저장시 변경된 보험정보가 새로운 적용일자로 저장될수 있다.
  2240. // 기존의 값은 Reset해야함. ( 값이 없을경우 기존의 값이 현재의 값처럼 오인될수 있음 )
  2241. model.resetInstanceNode("/root/main/ptin");
  2242. model.resetInstanceNode("/root/hidden/original/ptin");
  2243. copyNodeType("/root/main/ptin", "/root/hidden/rcv/ptin", "replace");
  2244. copyNodeType("/root/hidden/original/ptin", "/root/hidden/rcv/ptin", "replace");
  2245. // 보험, 감면정보는 없다가 신규로 등록하는 사람이 있으므로 인스턴스 노드를 삭제하면 신규 등록시에는 인스턴스 노드가 없어 등록할수 없다.
  2246. // 그럼므로 신규일경우 생성한다. original쪽에도 같이 복사해야 저장시 변경여부를 체크해서 submit을 보낼수 있다.
  2247. var sptin_pid = model.getValue("/root/main/ptin/ptin_pid")
  2248. if( sptin_pid == null || sptin_pid == "" || sptin_pid == " " || sptin_pid == "-")
  2249. {
  2250. model.setValue("/root/main/ptin/ptin_insukind",model.getValue("/root/send/insukind"));
  2251. // model.makeNode("/root/main/ptin");
  2252. // copyNodeType("/root/main/ptin", "/root/hidden/temp/ptin", "replace");
  2253. // copyNodeType("/root/hidden/original/ptin", "/root/hidden/temp/ptin", "replace");
  2254. }
  2255. //2008.01.14 수정 - 자보,산재,공상이면 내역을 조회한다
  2256. //combo15.dispatch("xforms-value-changed"); // 보험형태별 UI를 반영한다.
  2257. /*if (model.getValue("/root/hidden/original/inpt["+curruntrow+"]/inpt_insukind") == "31" || model.getValue("/root/hidden/original/inpt["+curruntrow+"]/inpt_insukind") == "41"
  2258. || model.getValue("/root/hidden/original/inpt["+curruntrow+"]/inpt_insukind") == "42") {
  2259. combo15.dispatch("xforms-value-changed");
  2260. } else {
  2261. fInsukindTabSetting();
  2262. }*/
  2263. // 자보의 경우 ipsh기준으로 보험사 정보를 참조하도록 수정 by 조중래 20130705
  2264. if (model.getValue("/root/main/iphs/iphs_insukind") == "31") {
  2265. model.setValue("/root/main/aipm/aipm_insucmpycd", model.getValue("/root/main/iphs/iphs_insucd"));
  2266. model.makeValue("/root/main/aipm/aipm_paygrntno", "");
  2267. }
  2268. if ( model.getValue("/root/hidden/original/inpt["+curruntrow+"]/inpt_insukind") == "41"
  2269. || model.getValue("/root/hidden/original/inpt["+curruntrow+"]/inpt_insukind") == "42") {
  2270. combo15.dispatch("xforms-value-changed");
  2271. } else {
  2272. fInsukindTabSetting();
  2273. }
  2274. // fInsukindTabSetting();
  2275. //combo15.dispatch("xforms-value-changed"); // 보험형태별 UI를 반영한다.
  2276. }
  2277. //필수 사항 체크(Validation Check)
  2278. function fCheckFactChangeSave(arg1){
  2279. var wardcd = model.getValue("/root/main/icdr/icdr_wardcd");
  2280. var roomcd = model.getValue("/root/main/icdr/icdr_roomcd");
  2281. var bedcd = model.getValue("/root/main/icdr/icdr_bedcd");
  2282. var roomgrdecd = model.getValue("/root/main/icdr/icdr_roomgrdecd");
  2283. var roomtypecd = model.getValue("/root/main/icdr/icdr_roomtypecd");
  2284. if( wardcd == '-' || wardcd == '' || wardcd == '0000000000' ){
  2285. messageBox("병동정보가 입력되지 않았습니다. 확인 후 재원변경하세요!", "E999", "");
  2286. return false;
  2287. }else if( roomcd == '-' || roomcd == '' || roomcd == '000000' ){
  2288. messageBox("병실정보가 입력되지 않았습니다. 확인 후 재원변경하세요!", "E999", "");
  2289. return false;
  2290. }else if( bedcd == '-' || bedcd == '' ){
  2291. messageBox("병상정보가 입력되지 않았습니다. 확인 후 재원변경하세요!", "E999", "");
  2292. return false;
  2293. }else if( roomgrdecd == '-' || roomgrdecd == ''){
  2294. messageBox("병실등급정보가 입력되지 않았습니다. 확인 후 재원변경하세요!", "E999", "");
  2295. //return false;
  2296. }else if( roomtypecd == '-' || roomtypecd == '' ){
  2297. messageBox("병실형태가 입력되지 않았습니다. 확인 후 재원변경하세요!", "E999", "");
  2298. //return false;
  2299. }
  2300. if (arg1 == 1 || arg1 == 2) {
  2301. //2008.01.14 장애내역 체크
  2302. if (model.getValue("/root/main/iphs/iphs_insukind") == "11"
  2303. || model.getValue("/root/main/iphs/iphs_insukind") == "21" || model.getValue("/root/main/iphs/iphs_insukind") == "22") {
  2304. var hndc_node = instance1.selectSingleNode("/root/hidden/check/hndc");
  2305. if (hndc_node != null && model.getValue("/root/main/iphs/iphs_handicaprbookpossnyn") != "Y") {
  2306. messageBox("장애내역이 있습니다.장애인 여부를 변경하세요.!","E999","");
  2307. return false;
  2308. }
  2309. }
  2310. //입원환자인지 체크
  2311. var sinpt_cretno = model.getValue("/root/main/inpt/inpt_cretno");
  2312. if (sinpt_cretno == null || sinpt_cretno == ""){
  2313. var sinhospyn = model.getValue("/root/main/ptbs/ptbs_inhospyn");
  2314. if (sinhospyn != "Y"){
  2315. messageBox("입원등록이 정보가 없어서 재원변경을 ","E001");
  2316. return false;
  2317. }
  2318. }
  2319. //가퇴원자나 퇴원자는 유형변경을 막는다.
  2320. //가퇴원환자는 유형변경이 되어야 한다. 2007.10.04 홍영표 ( 박광섭 요구 )
  2321. var sindschacptstat = model.getValue("/root/main/inpt/inpt_indschacptstat");
  2322. if (sindschacptstat == "D" ){
  2323. messageBox("퇴원중인 환자는 재원변경을 ","E001");
  2324. return false;
  2325. }
  2326. //퇴원심사진행상태 체크. 2007.09.03 홍영표
  2327. // 심사과(4070700000), 심사팀(4072000000)의 경우에는 체크하지 않도록 수정 by 조중래 20131211
  2328. if (getUserInfo("dutplcecd") != "4070700000"
  2329. && getUserInfo("dutplcecd") != "4072000000") {
  2330. // 미심 이외의 경우, 심사와 관련된 항목이 변경된 경우 변경제어처리
  2331. if (model.getValue("/root/main/inpt/inpt_dschjudgprcsstat") != "A" ) {
  2332. // 심사관련 항목 변경여부 조회
  2333. if (fJudgCheck() == "Y") {
  2334. messageBox("퇴원심사가 진행중이거나 완료되어 재원변경을 ","E001");
  2335. return false;
  2336. }
  2337. }
  2338. }
  2339. // 전과전실적용일자는 오늘보다 클수 없다..
  2340. if(model.getValue("/root/main/iphs/iphs_fromdd") > getCurrentDate() || model.getValue("/root/main/icdr/icdr_fromdd") > getCurrentDate()){
  2341. messageBox("적용일자는 오늘일자보다 클수 ", "I004");
  2342. return false;
  2343. }
  2344. // 2008.12.03 - iphs, icdr의 변경이 있는 항목에 대해서만 체크하도록 로직 수정
  2345. var ins = document.models( 0 ).instances( 0 );
  2346. var h_iphs_pat = ins.selectSingleNode("/root/main/h_iphs/iphs");
  2347. var iphs_pat = ins.selectSingleNode("/root/main/iphs");
  2348. var bIsIphsModified = false; // iphs 변경여부
  2349. if (h_iphs_pat == null){
  2350. bIsIphsModified = false;
  2351. } else if (iphs_pat == null){
  2352. bIsIphsModified = false;
  2353. } else if (h_iphs_pat.xml == iphs_pat.xml) {
  2354. bIsIphsModified = false;
  2355. } else {
  2356. bIsIphsModified = true;
  2357. }
  2358. var h_icdr_pat = ins.selectSingleNode("/root/main/h_icdr/icdr");
  2359. var icdr_pat = ins.selectSingleNode("/root/main/icdr");
  2360. var bIsIcdrModified = false; // icdr 변경여부
  2361. if (h_icdr_pat == null){
  2362. bIsIcdrModified = false;
  2363. } else if (icdr_pat == null){
  2364. bIsIcdrModified = false;
  2365. } else if (h_icdr_pat.xml == icdr_pat.xml) {
  2366. bIsIcdrModified = false;
  2367. } else {
  2368. bIsIcdrModified = true;
  2369. }
  2370. // 최종중간청구일자 이전 데이터는 수정할수 없다. 2007.09.03 홍영표
  2371. var slastmdlclamdd = model.getValue("/root/main/inpt/inpt_lastmdlclamdd");
  2372. if (slastmdlclamdd != null && slastmdlclamdd != "" && slastmdlclamdd != "-" && slastmdlclamdd != "00000000"){
  2373. if ((model.getValue("/root/main/iphs/iphs_fromdd") <= slastmdlclamdd && bIsIphsModified == true)
  2374. || (model.getValue("/root/main/icdr/icdr_fromdd") <= slastmdlclamdd && bIsIcdrModified == true)){
  2375. // 심사관련 항목 변경여부 조회
  2376. if (fJudgCheck() == "Y") {
  2377. messageBox("최종중간청구일자 이전 데이터는 수정 할수 ", "I004");
  2378. return false;
  2379. }
  2380. }
  2381. }
  2382. // 2008.11.28 - 최병진. 외래요율일 때는 아래 체크로직 타지 않도록 수정
  2383. // 2009.03.26 - 차상위 2종 외래보조유형 체크 추가
  2384. var sBrateFlag = model.getValue("/root/main/inpt/inpt_brateflag");
  2385. /*
  2386. if (sBrateFlag == "I") {
  2387. //2008.01.10 산정특례(07),인공신장투석(02),복막관류술(03),장기이식(04) => 정상(00)으로 셋팅
  2388. if(model.getValue("/root/main/iphs/iphs_suppkind") == "02" || model.getValue("/root/main/iphs/iphs_suppkind") == "03" ||
  2389. model.getValue("/root/main/iphs/iphs_suppkind") == "04" || model.getValue("/root/main/iphs/iphs_suppkind") == "07" ||
  2390. model.getValue("/root/main/iphs/iphs_suppkind") == "10" || model.getValue("/root/main/iphs/iphs_suppkind") == "11" ||
  2391. model.getValue("/root/main/iphs/iphs_suppkind") == "34" || model.getValue("/root/main/iphs/iphs_suppkind") == "35" ||
  2392. model.getValue("/root/main/iphs/iphs_suppkind") == "36" || model.getValue("/root/main/iphs/iphs_suppkind") == "37" ||
  2393. model.getValue("/root/main/iphs/iphs_suppkind") == "38" || model.getValue("/root/main/iphs/iphs_suppkind") == "45") {
  2394. messageBox("입원에서는 적용되지 않는 보조유형입니다. 보조유형을 확인하세요!","E999","");
  2395. return false;
  2396. }
  2397. }
  2398. */
  2399. if (model.getValue("/root/main/iphs/iphs_suppkind") == ""
  2400. || model.getValue("/root/main/iphs/iphs_suppkind") == null) {
  2401. messageBox("보조유형이 선택되지 않았습니다. 보조유형을 확인하세요!","E999","");
  2402. return false;
  2403. }
  2404. //2011.01.12 산정특례(07), 가정간호(10), 가정간호(등록암)(11), 차상위2종 가정간호(37), 차상위2종 가정간호 등록암(38), 차상위2종 산정특례(45)
  2405. if(model.getValue("/root/main/iphs/iphs_suppkind") == "07" ||
  2406. model.getValue("/root/main/iphs/iphs_suppkind") == "10" || model.getValue("/root/main/iphs/iphs_suppkind") == "11" ||
  2407. model.getValue("/root/main/iphs/iphs_suppkind") == "37" || model.getValue("/root/main/iphs/iphs_suppkind") == "38" ||
  2408. model.getValue("/root/main/iphs/iphs_suppkind") == "45") {
  2409. messageBox("입원에서는 적용되지 않는 보조유형입니다. 보조유형을 확인하세요!","E999","");
  2410. return false;
  2411. }
  2412. // 응급실,DSC환자는 전과전실못하게 막는다. 2007.10.18 홍영표
  2413. var sinpt_ordtype = model.getValue("/root/main/inpt/inpt_ordtype");
  2414. var sicdr_wardcd = model.getValue("/root/main/icdr/icdr_wardcd");
  2415. var sicdr_orddeptcd = model.getValue("/root/main/icdr/icdr_orddeptcd");
  2416. if (sinpt_ordtype == 'E') {
  2417. // if ( sicdr_wardcd != gsWardCd_ER1 || sicdr_orddeptcd != gsOrddeptCd_ER ) {
  2418. // messageBox("응급실환자는 전과전실 할수 ", "I004");
  2419. // return false;
  2420. // }
  2421. //응급실환자는 전실말 블럭킹!!
  2422. if ( sicdr_wardcd != gsWardCd_ER1 ) {
  2423. messageBox("응급실환자는 전과전실 할수 ", "I004");
  2424. return false;
  2425. }
  2426. //2007.10.19 진찰료 미산정인경우 사유코드 필수 입력
  2427. var inpt_medcostestmflag = model.getValue("/root/main/inpt/inpt_medcostestmflag");
  2428. //진찰료 미산정
  2429. if (inpt_medcostestmflag == "N")
  2430. {
  2431. var inpt_medamtfreeresn = model.getValue("/root/main/inpt/inpt_medamtfreeresn");
  2432. if (inpt_medamtfreeresn == null || inpt_medamtfreeresn == "" || inpt_medamtfreeresn == " " || inpt_medamtfreeresn == "-" || inpt_medamtfreeresn == "00")
  2433. {
  2434. messageBox("진찰료 미산정인 경우 사유를 입력하셔야합니다!","E999","");
  2435. return false;
  2436. }
  2437. }
  2438. } else if (sinpt_ordtype == 'D'){
  2439. var ins = document.models(0).instances(0);
  2440. var original_icdr_pat = ins.selectSingleNode("/root/hidden/original/icdr[icdr_lastyn = 'Y']");
  2441. var icdr_pat = ins.selectSingleNode("/root/main/icdr");
  2442. var sOrgWardcd = model.getValue("/root/hidden/original/icdr[1]/icdr_wardcd");
  2443. var sWardcd = model.getValue("/root/main/icdr/icdr_wardcd");
  2444. var sOrgRoomcd = model.getValue("/root/hidden/original/icdr[1]/icdr_roomcd");
  2445. var sRoomcd = model.getValue("/root/main/icdr/icdr_roomcd");
  2446. // 2008.11.03 - 병실이외의 정보는 변경할 수 있도록 수정
  2447. if (sOrgWardcd != sWardcd || sOrgRoomcd != sRoomcd) {
  2448. messageBox("DSC/CHEMO 환자는 병실변경을 할 수 ", "I004");
  2449. return false;
  2450. }
  2451. // 2008.11.03 - 병실이외의 정보는 변경할 수 있도록 수정에 따른 주석처리
  2452. // 조건 이외의 변경은 허용
  2453. /*
  2454. if (icdr_pat.xml != original_icdr_pat.xml) {
  2455. // 2008.10.16 병동만 체크시 CHEMO가 제외되므로 original로 체크
  2456. //if ( sicdr_wardcd != gsWardcd_DSC ) {
  2457. messageBox("DSC환자는 전과전실 할수 ", "I004");
  2458. return false;
  2459. //}
  2460. }
  2461. */
  2462. }
  2463. // 2008.10.27 부유형은 병실변경을 할 수 없도록 막음 - 최병진
  2464. var iIcdrRow = datagrid4.row;
  2465. if (iIcdrRow < 1) iIcdrRow = 1; // 선택되어 있지 않으면 첫번째로 설정
  2466. var sMskind = model.getValue("/root/main/inpt/inpt_mskind");
  2467. var sWardcd = model.getValue("/root/main/icdr/icdr_wardcd");
  2468. var sRoomcd = model.getValue("/root/main/icdr/icdr_roomcd");
  2469. var sRoomtypecd = model.getValue("/root/main/icdr/icdr_roomtypecd");
  2470. var sRoomgrdecd = model.getValue("/root/main/icdr/icdr_roomgrdecd");
  2471. var sOrgWardcd = model.getValue("/root/hidden/original/icdr[" + iIcdrRow + "]/icdr_wardcd");
  2472. var sOrgRoomcd = model.getValue("/root/hidden/original/icdr[" + iIcdrRow + "]/icdr_roomcd");
  2473. var sOrgRoomtypecd = model.getValue("/root/hidden/original/icdr[" + iIcdrRow + "]/icdr_roomtypecd");
  2474. var sOrgRoomgrdecd = model.getValue("/root/hidden/original/icdr[" + iIcdrRow + "]/icdr_roomgrdecd");
  2475. if (sMskind == "S") {
  2476. if (sWardcd != sOrgWardcd || sRoomcd != sOrgRoomcd || sRoomtypecd != sOrgRoomtypecd || sRoomgrdecd != sOrgRoomgrdecd) {
  2477. messageBox("[부유형]의 병실정보를 변경할 수 없습니다!", "I");
  2478. return;
  2479. }
  2480. }
  2481. }
  2482. if (arg1 == 1 ) {
  2483. // 수납된 내역 체크(해당iphs만) 2007.10.15 홍영표
  2484. var srcptyn = model.getValue("/root/main/iphs/iphs_rcptyn");
  2485. // 2008.10.27 퇴원환자만 재원변경 막도록 추가
  2486. var sIndschAcptStat = model.getValue("/root/main/inpt/inpt_indschacptstat");
  2487. if (srcptyn == "Y" && model.getValue("/root/main/inpt/inpt_dschdd") != "99991231" && sIndschAcptStat == "D") {
  2488. messageBox("수납된 내역이 있어서 재원변경을 ","E001");
  2489. return false;
  2490. }
  2491. } else if (arg1 == 2 ) { // 전체기간재원유형변경 모듈만 체크하는 사항
  2492. // 수납된 내역 체크(입원기간 전체) 2007.10.15 홍영표
  2493. var srcptyn = model.getValue("/root/hidden/original/iphs[iphs_rcptyn = 'Y']/iphs_rcptyn");
  2494. // 2008.10.27 퇴원환자만 재원변경 막도록 추가
  2495. var sIndschAcptStat = model.getValue("/root/main/inpt/inpt_indschacptstat" && sIndschAcptStat == "D");
  2496. if (srcptyn == "Y" && model.getValue("/root/main/inpt/inpt_dschdd") != "99991231"){
  2497. messageBox("수납된 내역이 있어서 재원변경을 ","E001");
  2498. return false;
  2499. }
  2500. // 2007.10.15 홍영표
  2501. // 환자보험유형은 통합저장안되며 전체기간재원유형변경을 할려면 먼저 보험유형과 기간을 등록,변경한후 실행해야한다.
  2502. // 자보,산재,공상은 마스터 등록이 없으면 보험유형 변경이 안되므로 나머지 유형만 체크한다.(PTIN만)
  2503. var sindd = model.getValue("/root/main/inpt/inpt_indd");
  2504. var sdschdd = model.getValue("/root/main/inpt/inpt_dschdd");
  2505. var sptin_pid = model.getValue("/root/hidden/h_rcv/ptin/ptin_pid");
  2506. var siphs_insukind = model.getValue("/root/main/iphs/iphs_insukind");
  2507. var sptin_fromdd = model.getValue("/root/hidden/h_rcv/ptin/ptin_fromdd");
  2508. var sptin_todd = model.getValue("/root/hidden/h_rcv/ptin/ptin_todd");
  2509. if (siphs_insukind == gsBoHeom || siphs_insukind == gsBoHo1 || siphs_insukind == gsBoHo2 ||
  2510. siphs_insukind == gsIlBan || siphs_insukind == gsForIn || siphs_insukind == gsImSang) {
  2511. if (sptin_pid != null && sptin_pid != "" && sptin_pid != " " ) {
  2512. if ( sptin_fromdd > sindd && sptin_todd < sdschdd ){
  2513. messageBox("해당되는 환자보험유형 취득,종료일자가 재원기간 범위를 벋어나서 전체기간재원유형변경을 ","E001");
  2514. return false;
  2515. }
  2516. } else {
  2517. messageBox("해당되는 환자보험유형이 없어 전체기간재원유형변경을 ","E001");
  2518. return false;
  2519. }
  2520. }
  2521. }
  2522. //2008.01.09 6세미만 체크및 28일 이전 신생아 체크
  2523. var ptbs_age = parseInt(model.getValue("/root/main/ptbs/ptbs_age"));
  2524. var s_insukind = model.getValue("/root/main/iphs/iphs_insukind");
  2525. var ptbs_birthdd = model.getValue("/root/main/ptbs/ptbs_brthdd");
  2526. var dayno = getDateInterval(ptbs_birthdd,getCurrentDate()); // (dateHelper.js) 두 일자사이의 차를 일단위로 반환
  2527. var sScndSuppKind = model.getValue("/root/hidden/original/iphs/iphs_suppkind_new"); // 환자조회 시 lib태운 후 들어온 보조유형 값
  2528. var sScndSuptrgtFlag = model.getValue("/root/hidden/ScndSuptrgtFlag"); // 공단자격조회 후 들어온 차상위2종구분
  2529. if (s_insukind == "11" || s_insukind == "22") {
  2530. if (ptbs_age >= 0 && ptbs_age < 6 ) {
  2531. if (dayno >= 1 && dayno <= 28 && s_insukind == "11") {
  2532. if (model.getValue("/root/main/iphs/iphs_suppkind") != "31") {
  2533. var result1 = messageBox("28일 이전의 신생아 환자입니다. 보조유형을 [신생아]로 변경하시겠습니까? (Y/N)","Q000","");
  2534. if (result1 == "6") {
  2535. model.setValue("/root/main/iphs/iphs_suppkind", "31");
  2536. //model.setFocus("cmb_suppkind");
  2537. //model.refresh();
  2538. return true;
  2539. }
  2540. else {
  2541. return true;
  2542. }
  2543. }
  2544. } else {
  2545. if ((!isNull(sScndSuppKind) && parseInt(sScndSuppKind) >= 33) || sScndSuptrgtFlag == "2") {
  2546. if (model.getValue("/root/main/iphs/iphs_suppkind") != "41") {
  2547. var result2 = messageBox("6세미만 환자입니다.! 보조유형을 [차상위2종 6세미만]으로 변경하시겠습니까?(Y/N)","Q000","");
  2548. if (result2 == "6") { //아니오
  2549. model.setValue("/root/main/iphs/iphs_suppkind", "41");
  2550. //model.setFocus("cmb_suppkind");
  2551. //model.refresh();
  2552. return true;
  2553. }
  2554. else {
  2555. return true;
  2556. }
  2557. }
  2558. } else {
  2559. if (model.getValue("/root/main/iphs/iphs_suppkind") != "08") {
  2560. var result2 = messageBox("6세미만 환자입니다.! 보조유형을 [6세미만]으로 변경하시겠습니까?(Y/N)","Q000","");
  2561. if (result2 == "6") { //아니오
  2562. model.setValue("/root/main/iphs/iphs_suppkind", "08");
  2563. //model.setFocus("cmb_suppkind");
  2564. //model.refresh();
  2565. return true;
  2566. }
  2567. else {
  2568. return true;
  2569. }
  2570. }
  2571. }
  2572. }
  2573. }
  2574. }
  2575. // 2009.03.30 - 차상위2종 입원정신과 체크
  2576. if (s_insukind == "11" && (parseInt(sScndSuppKind) >= 33 || sScndSuptrgtFlag == "2" )&& (model.getValue("/root/main/iphs/iphs_suppkind") != "41" && model.getValue("/root/main/iphs/iphs_suppkind") != "43")) {
  2577. var sOrddeptCd = model.getValue("/root/main/icdr/icdr_orddeptcd");
  2578. if (sOrddeptCd == "2030000000") {
  2579. var result = messageBox("[차상위2종] 환자입니다. 보조유형을 [차상위2종 입원정신과]로 변경하시겠습니까?", "Q");
  2580. if (result == "6") {
  2581. model.setValue("/root/main/iphs/iphs_suppkind", "43");
  2582. }
  2583. }
  2584. }
  2585. // 2009.03.30 - 차상위2종 입원정신과 체크
  2586. if (s_insukind == "11" && (parseInt(sScndSuppKind) >= 33 || sScndSuptrgtFlag == "2") && model.getValue("/root/main/iphs/iphs_suppkind") == "43") {
  2587. var sOrddeptCd = model.getValue("/root/main/icdr/icdr_orddeptcd");
  2588. if (sOrddeptCd != "2030000000") {
  2589. var result = messageBox("[정신과] 환자가 아닙니다. 보조유형을 [차상위2종 정상]으로 변경하시겠습니까?", "Q");
  2590. if (result == "6") {
  2591. model.setValue("/root/main/iphs/iphs_suppkind", "33");
  2592. }
  2593. }
  2594. }
  2595. //입력사항 체크(환자인적-성명)
  2596. var sptbs_hngnm = model.getValue("/root/main/ptbs/ptbs_hngnm");
  2597. if (sptbs_hngnm == null || sptbs_hngnm == "" || sptbs_hngnm == " ")
  2598. {
  2599. messageBox("환자인적사항에 성명을","C001");
  2600. return false;
  2601. }
  2602. //입력사항 체크(환자인적-주민등록번호)
  2603. var sptbs_rrgstno1 = model.getValue("/root/main/ptbs/ptbs_rrgstno1");
  2604. var sptbs_rrgstno2 = model.getValue("/root/main/ptbs/ptbs_rrgstno2");
  2605. if (sptbs_rrgstno1 == null || sptbs_rrgstno1 == "" || sptbs_rrgstno1 == " " || sptbs_rrgstno2 == null || sptbs_rrgstno2 == "" || sptbs_rrgstno2 == " ")
  2606. {
  2607. messageBox("환자인적사항에 주민번호를","C001");
  2608. return false;
  2609. }
  2610. //입력사항 체크(환자인적-성별)
  2611. var sptbs_sex = model.getValue("/root/main/ptbs/ptbs_sex");
  2612. if (sptbs_sex == null || sptbs_sex == "" || sptbs_sex == " ")
  2613. {
  2614. messageBox("환자인적사항에 성별을","C002");
  2615. return false;
  2616. }
  2617. //입력사항 체크(환자인적-생년월일)
  2618. var sptbs_brthdd = model.getValue("/root/main/ptbs/ptbs_brthdd");
  2619. if (sptbs_brthdd == null || sptbs_brthdd == "" || sptbs_brthdd == " ")
  2620. {
  2621. messageBox("환자인적사항에 생년월일을","C001");
  2622. return false;
  2623. }
  2624. //입력사항 체크(환자인적-우편번호)
  2625. var sptbs_zipcd1 = model.getValue("/root/main/ptbs/ptbs_zipcd1");
  2626. var sptbs_zipcd2 = model.getValue("/root/main/ptbs/ptbs_zipcd2");
  2627. if (sptbs_zipcd1 == null || sptbs_zipcd1 == "" || sptbs_zipcd1 == " " || sptbs_zipcd2 == null || sptbs_zipcd2 == "" || sptbs_zipcd2 == " ")
  2628. {
  2629. messageBox("환자인적사항에 우편번호를","C001");
  2630. return false;
  2631. }
  2632. //입력사항 체크(보험-보험유형)
  2633. var siphs_insukind = model.getValue("/root/main/iphs/iphs_insukind");
  2634. if (siphs_insukind == null || siphs_insukind == "" || siphs_insukind == " " || siphs_insukind == "-" )
  2635. {
  2636. messageBox("환자보험에 보험유형을","C002");
  2637. return false;
  2638. }
  2639. //입력사항 체크(보험-보험보조유형)
  2640. var siphs_suppkind = model.getValue("/root/main/iphs/iphs_suppkind");
  2641. if (siphs_suppkind == null || siphs_suppkind == "" || siphs_suppkind == " ")
  2642. {
  2643. messageBox("환자보험에 유형보조를","C002");
  2644. return false;
  2645. }
  2646. if (siphs_insukind == gsBoHeom || siphs_insukind == gsBoHo1 || siphs_insukind == gsBoHo2) {
  2647. //입력사항 체크(보험-보험보험자기호)
  2648. var sptin_insucd = model.getValue("/root/main/ptin/ptin_insucd");
  2649. if (sptin_insucd == null || sptin_insucd == "" || sptin_insucd == " " || sptin_insucd == "-")
  2650. {
  2651. messageBox("환자보험에 보험자기호를","C002");
  2652. return false;
  2653. }
  2654. // 2008.09.05 건강보험일 때만 보험증번호 체크하도록 조건 추가
  2655. if (siphs_insukind == gsBoHeom) {
  2656. //입력사항 체크(보험-보험증번호)
  2657. var sptin_insuno = model.getValue("/root/main/ptin/ptin_insuno");
  2658. if (sptin_insuno == null || sptin_insuno == "" || sptin_insuno == " " || sptin_insuno == "-")
  2659. {
  2660. messageBox("환자보험에 보험증번호를","C001");
  2661. return false;
  2662. }
  2663. }
  2664. //입력사항 체크(보험-피보험자관계)
  2665. var sptin_insdrela = model.getValue("/root/main/ptin/ptin_insdrela");
  2666. if (sptin_insdrela == null || sptin_insdrela == "" || sptin_insdrela == " ")
  2667. {
  2668. messageBox("환자보험에 피보험자관계를","C002");
  2669. return false;
  2670. }
  2671. //입력사항 체크(보험-피보험자성명)
  2672. var sptin_insdnm = model.getValue("/root/main/ptin/ptin_insdnm");
  2673. if (sptin_insdnm == null || sptin_insdnm == "" || sptin_insdnm == " ")
  2674. {
  2675. messageBox("환자보험에 피보험자성명을","C001");
  2676. return false;
  2677. }
  2678. // 2008.07.09 최병진 주석처리 - 환자의 주민번호가 유효(정확)하면 피보험자 주민번호 없어도 된다.
  2679. //입력사항 체크(보험-피보험자주민번호)
  2680. //var sptin_insdrrgstno1 = model.getValue("/root/main/ptin/ptin_insdrrgstno1");
  2681. // var sptin_insdrrgstno2 = model.getValue("/root/main/ptin/ptin_insdrrgstno2");
  2682. // if (sptin_insdrrgstno1 == null || sptin_insdrrgstno1 == "" || sptin_insdrrgstno1 == " " || sptin_insdrrgstno2 == null || sptin_insdrrgstno2 == "" || sptin_insdrrgstno2 == " ")
  2683. // {
  2684. // messageBox("환자보험에 피보험자주민번호를","C001");
  2685. // return false;
  2686. // }
  2687. //입력사항 체크(보험-취득일자)
  2688. var sptin_fromdd = model.getValue("/root/main/ptin/ptin_fromdd");
  2689. if (sptin_fromdd == null || sptin_fromdd == "" || sptin_fromdd == " ")
  2690. {
  2691. messageBox("환자보험에 취득일자를","C001");
  2692. return false;
  2693. }
  2694. }else if (siphs_insukind == gsJaboKind ){ // 자보
  2695. //var sJaboKindPid = model.getValue("/root/main/aipm/aipm_pid");
  2696. //2009.11.15 MYKIM 자보마스터가 아닌 재원정보에서 가져옴.
  2697. var sJaboKindPid = model.getValue("/root/main/iphs/iphs_pid");
  2698. var sSuppKind = model.getValue("/root/main/iphs/iphs_suppkind");
  2699. if (isNull(sJaboKindPid)) {
  2700. if (sSuppKind != "01") { // 전액본인부담
  2701. messageBox("자보등록을 먼저 ","C001");
  2702. return false;
  2703. }
  2704. } /*else { // 승인기간을 벗어나면 메세지 처리한다.
  2705. var siphs_fromdd = model.getValue("/root/main/iphs/iphs_fromdd");
  2706. var saprvfromdd = model.getValue("/root/main/aipm/aipm_aprvfromdd");
  2707. var saprvtodd = model.getValue("/root/main/aipm/aipm_aprvtodd");
  2708. if (siphs_fromdd < saprvfromdd || siphs_fromdd > saprvtodd ) {
  2709. messageBox("보험유형 적용일자가 자보승인기간을 ","E003");
  2710. return false;
  2711. }
  2712. }*/
  2713. }else if (siphs_insukind == gsSanJae ){ // 산재
  2714. var sSanJaePid = model.getValue("/root/main/icpm/icpm_pid");
  2715. var sSuppKind = model.getValue("/root/main/iphs/iphs_suppkind");
  2716. if (isNull(sSanJaePid)) {
  2717. if (sSuppKind != "01") { // 전액본인부담
  2718. messageBox("산재등록을 먼저 ","C001");
  2719. return false;
  2720. }
  2721. }
  2722. }else if (siphs_insukind == gsGongSang ){ // 공상
  2723. var sGongSangPid = model.getValue("/root/main/icpm/icpm_pid");
  2724. if (sGongSangPid == null || sGongSangPid == "" || sGongSangPid == " ")
  2725. {
  2726. messageBox("공상등록을 먼저 ","C001");
  2727. return false;
  2728. }
  2729. }
  2730. //입력사항 체크(진료과)
  2731. var sorddeptcd = model.getValue("/root/main/icdr/icdr_orddeptcd");
  2732. if (sorddeptcd == null || sorddeptcd == "" || sorddeptcd == " ")
  2733. {
  2734. messageBox("진료과를","C002");
  2735. return false;
  2736. }
  2737. //입력사항 체크(전문의)
  2738. var smedispclid = model.getValue("/root/main/icdr/icdr_medispclid");
  2739. if (smedispclid == null || smedispclid == "" || smedispclid == " " || smedispclid == "-")
  2740. {
  2741. messageBox("전문의를","C002");
  2742. return false;
  2743. }
  2744. // 수정추가이력 : 20100219 JHP
  2745. // 진료과 변경에 따른 전문의 주치의 변경여부 확인 시작
  2746. var beforeorddeptcd = model.getValue("/root/main/h_icdr/icdr/icdr_orddeptcd");
  2747. var afterorddeptcd = model.getValue("/root/main/icdr/icdr_orddeptcd");
  2748. var beforemedispclid = model.getValue("/root/main/h_icdr/icdr/icdr_medispclid");
  2749. var aftermedispclid = model.getValue("/root/main/icdr/icdr_medispclid");
  2750. var beforeatdoctid = model.getValue("/root/main/h_icdr/icdr/icdr_atdoctid");
  2751. var afteratdoctid = model.getValue("/root/main/icdr/icdr_atdoctid");
  2752. /*2010-12-24 이동식 수정 이거 왜 체크함??? 경북대 칠곡의 경우 의사가 다른과에 중복 소속 가능.
  2753. if(beforeorddeptcd != afterorddeptcd){
  2754. if(beforemedispclid == aftermedispclid){
  2755. messageBox("전문의를","C002");
  2756. return false;
  2757. }
  2758. if(beforeatdoctid != '-' && beforeatdoctid != null){
  2759. if(beforeatdoctid == afteratdoctid){
  2760. messageBox("주치의를","C002");
  2761. return false;
  2762. }
  2763. }
  2764. }
  2765. */
  2766. // 진료과 변경에 따른 전문의 주치의 변경여부 확인 끝
  2767. //입력사항 체크(병동,병실)
  2768. var swardcd = model.getValue("/root/main/icdr/icdr_wardcd");
  2769. var sroomcd = model.getValue("/root/main/icdr/icdr_roomcd");
  2770. if (swardcd == null || swardcd == "" || swardcd == " " || swardcd == "-")
  2771. {
  2772. messageBox("병동을","C002");
  2773. return false;
  2774. }
  2775. if (sroomcd == null || sroomcd == "" || sroomcd == " " || sroomcd == "-")
  2776. {
  2777. messageBox("병실을","C002");
  2778. return false;
  2779. }
  2780. var sroomtypecd = model.getValue("/root/main/icdr/icdr_roomtypecd");
  2781. var sroomgrdecd = model.getValue("/root/main/icdr/icdr_roomgrdecd");
  2782. if (sroomtypecd == null || sroomtypecd == "" || sroomtypecd == " " || sroomtypecd == "-")
  2783. {
  2784. messageBox("병실형태을","C002");
  2785. return false;
  2786. }
  2787. if (sroomgrdecd == null || sroomgrdecd == "" || sroomgrdecd == " " || sroomgrdecd == "-")
  2788. {
  2789. messageBox("병실등급을","C002");
  2790. return false;
  2791. }
  2792. // DRG 유효성 검사 추가
  2793. // DRG는 건강보험일 경우에만 유효 by 조중래 20130627
  2794. if ((model.getValue("/root/main/iphs/iphs_drgyn") == "A" || model.getValue("/root/main/iphs/iphs_drgyn") == "Y")
  2795. && model.getValue("/root/main/iphs/iphs_insukind") != "11") {
  2796. messageBox("DRG는 건강보험의 경우에만 적용 가능합니다. \r\n현재 DRG정보는 처리되지 않습니다. ", "C000")
  2797. model.setValue("/root/main/inpt/inpt_drgyn", "N");
  2798. model.setValue("/root/main/iphs/iphs_drgyn", "N");
  2799. model.setValue("/root/main/iphs/iphs_drgno", "");
  2800. model.refresh();
  2801. }
  2802. var disccd = model.getValue("/root/main/iphs/iphs_disccd");
  2803. // 미용목적성형의 경우 감면정보 적용여부 점검 by 조중래 20140217
  2804. if (model.getValue("/root/main/iphs/iphs_insukind") == "51" && model.getValue("/root/main/iphs/iphs_suppkind") == "85") {
  2805. // 모발이식센터이외의 경우 블러킹
  2806. if (disccd != '-' && model.getValue("/root/main/icdr/icdr_orddeptcd") != "2450000000") {
  2807. alert("미용목적성형의 경우, 감면적용이 불가능합니다.");
  2808. return false;
  2809. }
  2810. // 모발이식센터의 경우라도 모발관련(PK059) 코드가 아니면 블러킹
  2811. if (disccd != '-' && model.getValue("/root/main/icdr/icdr_orddeptcd") == "2450000000" && model.getValue("/root/init/PAM/PK059list/PK059[cdid = '" + disccd + "']/cdnm") != "Y") {
  2812. alert("모발이식센터의 경우 모발이식관련 감면코드만 적용가능합니다.\r\n(원무공통코드 - PK059)");
  2813. return false;
  2814. }
  2815. }
  2816. // 본인부담상한제 금액 검증
  2817. fOwnBMaxGradeFlagSet();
  2818. // 완화의료병동(3050136000) 일경우 값 셋팅함.
  2819. var scalcscorrecalflag = model.getValue("/root/main/iphs/iphs_calcscorrecalflag");
  2820. var sWardCd = model.getValue("/root/main/icdr/icdr_wardcd");
  2821. if(sWardCd == '3050136000' && scalcscorrecalflag != "9"){
  2822. if (messageBox("호스피스병동 환자의 수가계산 구분이 [완화의료정액]이 아닙니다. \r\n[완화의료정액]으로 설정하시겠습니까?", "Q000") == "6") {
  2823. model.setValue("/root/main/iphs/iphs_calcscorrecalflag","9");
  2824. }
  2825. }else if(sWardCd != '3050136000' && scalcscorrecalflag == "9") {
  2826. alert("호스피스병동 이외의 경우 수가계산 구분 [완화의료정액]을 사용할 수 없습니다.");
  2827. return false;
  2828. }
  2829. return true;
  2830. }
  2831. //2008.01.18 재원심사중이여도 수정가능 항목체크
  2832. // 2008.09.09 할인, 보험자기호, 보험증번호는 청구에 관계없이 수정가능하도록 변경 - 최병진
  2833. // 심사완료 후 변경되면 안되는 항목점검으로 수정 by 조중래 20151209
  2834. // 심사와 관련된 항목이 수정된 경우 Y 리턴
  2835. function fJudgCheck() {
  2836. var sCheckYN = "N";
  2837. // 심사와 관련된 항목이 수정된 경우
  2838. if ( model.getValue("/root/main/inpt/inpt_fsexamflag") != model.getValue("/root/main/h_inpt/inpt/inpt_fsexamflag")
  2839. || model.getValue("/root/main/inpt/inpt_medcostestmflag") != model.getValue("/root/main/h_inpt/inpt/inpt_medcostestmflag")
  2840. || model.getValue("/root/main/inpt/inpt_etcordflag") != model.getValue("/root/main/h_inpt/inpt/inpt_etcordflag")
  2841. || model.getValue("/root/main/iphs/iphs_fromdd") != model.getValue("/root/main/h_iphs/iphs/iphs_fromdd")
  2842. || model.getValue("/root/main/iphs/iphs_todd") != model.getValue("/root/main/h_iphs/iphs/iphs_todd")
  2843. || model.getValue("/root/main/iphs/iphs_insukind") != model.getValue("/root/main/h_iphs/iphs/iphs_insukind")
  2844. || model.getValue("/root/main/iphs/iphs_suppkind") != model.getValue("/root/main/h_iphs/iphs/iphs_suppkind")
  2845. || model.getValue("/root/main/iphs/iphs_calcscorrecalflag") != model.getValue("/root/main/h_iphs/iphs/iphs_calcscorrecalflag")
  2846. || model.getValue("/root/main/iphs/iphs_rareobstflag") != model.getValue("/root/main/h_iphs/iphs/iphs_rareobstflag")
  2847. || model.getValue("/root/main/iphs/iphs_etcordflag") != model.getValue("/root/main/h_iphs/iphs/iphs_etcordflag")
  2848. || model.getValue("/root/main/iphs/iphs_ownbmaxgradeflag") != model.getValue("/root/main/h_iphs/iphs/iphs_ownbmaxgradeflag")
  2849. || model.getValue("/root/main/iphs/iphs_handicaprbookpossnyn") != model.getValue("/root/main/h_iphs/iphs/iphs_handicaprbookpossnyn")
  2850. || model.getValue("/root/main/icdr/icdr_orddeptcd") != model.getValue("/root/main/h_icdr/icdr/icdr_orddeptcd")
  2851. || model.getValue("/root/main/icdr/icdr_medispclid") != model.getValue("/root/main/h_icdr/icdr/icdr_medispclid")
  2852. || model.getValue("/root/main/icdr/icdr_specordyn") != model.getValue("/root/main/h_icdr/icdr/icdr_specordyn")
  2853. || model.getValue("/root/main/icdr/icdr_roomgrdecd") != model.getValue("/root/main/h_icdr/icdr/icdr_roomgrdecd")
  2854. ) {
  2855. sCheckYN = "Y";
  2856. } else {
  2857. sCheckYN = "N";
  2858. }
  2859. return sCheckYN;
  2860. }
  2861. // 저장시 항목별 변경사항을 체크한다.
  2862. function fChangeSave(){
  2863. var ins = document.models( 0 ).instances( 0 );
  2864. var ptbs_flag = null;
  2865. var ptin_flag = null;
  2866. var inpt_flag = null;
  2867. var iphs_flag = null;
  2868. var icdr_flag = null;
  2869. var iphs_insukind_flag = null;
  2870. var iphs_suppkind_flag = null;
  2871. var iphs_disccd_flag = null;
  2872. var iphs_calcscorrecalflag_flag = null;
  2873. var icdr_roomgrdecd_flag = null;
  2874. var icdr_roomtypecd_flag = null;
  2875. var icdr_specordyn_flag = null;
  2876. var icdr_medispclid_flag = null;
  2877. // 1. 환자인적사항 변경여부 체크
  2878. var h_ptbs_pat = ins.selectSingleNode("/root/hidden/original/ptbs");
  2879. var ptbs_pat = ins.selectSingleNode("/root/main/ptbs");
  2880. model.resetInstanceNode("/root/send/s_ptbs");
  2881. if(h_ptbs_pat == null){
  2882. ptbs_flag = null; // 데이터가 없으면 인스턴스 노드가 없다.
  2883. }else if (ptbs_pat == null){
  2884. ptbs_flag = null;
  2885. }else if (h_ptbs_pat.xml == ptbs_pat.xml) {
  2886. ptbs_flag = null;
  2887. }else if (h_ptbs_pat.xml != ptbs_pat.xml){
  2888. ptbs_flag = 'U';
  2889. model.setValue("/root/main/ptbs/ptbs_status",ptbs_flag);
  2890. copyNodeType("/root/send/s_ptbs", "/root/main/ptbs", "replace");
  2891. //submit("TXPMI00401");
  2892. }
  2893. // 2. 환자보험내역 변경여부 체크 ( 산재,자보,공상은 제외한다.)
  2894. var iphs_insukind = model.getValue("/root/main/iphs/iphs_insukind");
  2895. if (iphs_insukind == gsBoHeom || iphs_insukind == gsBoHo1 || iphs_insukind == gsBoHo2 ||
  2896. iphs_insukind == gsIlBan || iphs_insukind == gsForIn || iphs_insukind == gsImSang) {
  2897. var h_ptin_pat = ins.selectSingleNode("/root/hidden/original/ptin");
  2898. var ptin_pat = ins.selectSingleNode("/root/main/ptin");
  2899. model.resetInstanceNode("/root/send/s_ptin");
  2900. if(h_ptin_pat == null){
  2901. ptin_flag = null; // 데이터가 없으면 인스턴스 노드가 없다. 그러면 에러난다.
  2902. }else if (ptin_pat == null){
  2903. ptin_flag = null;
  2904. }else if (h_ptin_pat.xml == ptin_pat.xml) {
  2905. ptin_flag = null;
  2906. }else if (h_ptin_pat.xml != ptin_pat.xml) {
  2907. ptin_flag = 'U';
  2908. model.setValue("/root/main/ptin/ptin_status",ptin_flag);
  2909. // 2008.09.30 최병진 새로운 보험정보관리 로직 적용을 위해서 주석처리 - 과거내역도 변경가능
  2910. // model.setValue("/root/main/ptin/ptin_fromdd",model.getValue("/root/main/iphs/iphs_fromdd"));
  2911. // model.setValue("/root/main/ptin/ptin_todd",model.getValue("/root/main/iphs/iphs_todd")); // 필요에 따라서는 풀수 있다. (2007.09.19 홍영표)
  2912. if(model.getValue("/root/main/ptin/ptin_pid") == "" ){
  2913. model.setValue("/root/main/ptin/ptin_pid",model.getValue("/root/main/ptbs/ptbs_pid"));
  2914. model.setValue("/root/main/ptin/ptin_todd",'99991231');
  2915. model.setValue("/root/main/ptin/ptin_histstat",'Y');
  2916. }
  2917. copyNodeType("/root/send/s_ptin", "/root/main/ptin", "replace");
  2918. //submit("TXPMI00402");
  2919. }
  2920. }
  2921. // 재원내역정보(유형) 변경여부는 환자보험내역(ㄱ.보험유형, ㄴ.유형보조)과 환자감면(ㄷ.직원감면)의 내용이 변경되어도 적용되어야한다.
  2922. // 보험유형의 항목이 재원유형의 보험유형과 보조유형으로 대체됨에 따라 소스 수정됨(지금은 소급여부 체크시에만 사용한다.)
  2923. // ㄱ.보험유형 변경체크
  2924. var h_iphs_insukind = ins.selectSingleNode("/root/main/h_iphs/iphs/iphs_insukind");
  2925. var iphs_insukind = ins.selectSingleNode("/root/main/iphs/iphs_insukind");
  2926. if(h_iphs_insukind == null){
  2927. iphs_insukind_flag = null; // 데이터가 없으면 인스턴스 노드가 없다. 그러면 에러난다.
  2928. }else if (iphs_insukind == null){
  2929. iphs_insukind_flag = null;
  2930. }else if (h_iphs_insukind.xml == iphs_insukind.xml) {
  2931. iphs_insukind_flag = null;
  2932. }else if (h_iphs_insukind.xml != iphs_insukind.xml) {
  2933. iphs_insukind_flag = 'U';
  2934. }
  2935. //model.setValue("/root/main/iphs/iphs_insukind",model.getValue("/root/main/ptin/ptin_insukind"));
  2936. // ㄴ.유형보조 변경체크
  2937. var h_iphs_suppkind = ins.selectSingleNode("/root/main/h_iphs/iphs/iphs_suppkind");
  2938. var iphs_suppkind = ins.selectSingleNode("/root/main/iphs/iphs_suppkind");
  2939. if(h_iphs_suppkind == null){
  2940. iphs_suppkind_flag = null; // 데이터가 없으면 인스턴스 노드가 없다. 그러면 에러난다.
  2941. }else if (iphs_suppkind == null){
  2942. iphs_suppkind_flag = null;
  2943. }else if (h_iphs_suppkind.xml == iphs_suppkind.xml) {
  2944. iphs_suppkind_flag = null;
  2945. }else if (h_iphs_suppkind.xml != iphs_suppkind.xml) {
  2946. iphs_suppkind_flag = 'U';
  2947. }
  2948. // ㄷ.할인코드 변경체크
  2949. var h_iphs_disccd = ins.selectSingleNode("/root/main/h_iphs/iphs/iphs_disccd");
  2950. var iphs_disccd = ins.selectSingleNode("/root/main/iphs/iphs_disccd");
  2951. if(h_iphs_disccd == null){
  2952. iphs_disccd_flag = null; // 데이터가 없으면 인스턴스 노드가 없다. 그러면 에러난다.
  2953. }else if (iphs_disccd == null){
  2954. iphs_disccd_flag = null;
  2955. }else if (h_iphs_disccd.xml == iphs_disccd.xml) {
  2956. iphs_disccd_flag = null;
  2957. }else if (h_iphs_disccd.xml != iphs_disccd.xml) {
  2958. iphs_disccd_flag = 'U';
  2959. }
  2960. //model.setValue("/root/main/iphs/iphs_suppkind",model.getValue("/root/main/ptin/ptin_suppkind"));
  2961. // ㄹ.수가계산 코드체크
  2962. var h_iphs_calcscorrecalflag = ins.selectSingleNode("/root/main/h_iphs/iphs/iphs_calcscorrecalflag");
  2963. var iphs_calcscorrecalflag = ins.selectSingleNode("/root/main/iphs/iphs_calcscorrecalflag");
  2964. if(h_iphs_calcscorrecalflag == null){
  2965. iphs_calcscorrecalflag_flag = null; // 데이터가 없으면 인스턴스 노드가 없다. 그러면 에러난다.
  2966. }else if (iphs_calcscorrecalflag == null){
  2967. iphs_calcscorrecalflag_flag = null;
  2968. }else if (h_iphs_calcscorrecalflag.xml == iphs_calcscorrecalflag.xml) {
  2969. iphs_calcscorrecalflag_flag = null;
  2970. }else if (h_iphs_calcscorrecalflag.xml != iphs_calcscorrecalflag.xml) {
  2971. iphs_calcscorrecalflag_flag = 'U';
  2972. }
  2973. // 4. 입원등록정보 변경여부 체크
  2974. // INPT 입원등록의 경우 IPHS나 ICDR에서 변경한 사항이 있으면 INPT에도 반영을 해야한다.
  2975. // 단, IPHS와 ICDR의 내역중 가장 최근내용이 수정되었을때만 반영해야 한다. ( TODD가 99991231인경우만 )
  2976. // iphs_todd == inpt_dschdd 일때만 입원정보에 반영
  2977. if ( model.getValue("/root/main/iphs/iphs_todd") == model.getValue("/root/main/inpt/inpt_dschdd")){
  2978. model.setValue("/root/main/inpt/inpt_insukind", model.getValue("/root/main/iphs/iphs_insukind"));
  2979. model.setValue("/root/main/inpt/inpt_suppkind", model.getValue("/root/main/iphs/iphs_suppkind"));
  2980. model.setValue("/root/main/inpt/inpt_drgyn", model.getValue("/root/main/iphs/iphs_drgyn"));
  2981. model.setValue("/root/main/inpt/inpt_bmtyn", model.getValue("/root/main/iphs/iphs_bmtyn"));
  2982. model.setValue("/root/main/inpt/inpt_clincstdycd", model.getValue("/root/main/iphs/iphs_clincstdycd"));
  2983. }
  2984. var sicdr_app_flag = isNull(model.getValue("/root/hidden/flag/icdr_app_flag"));
  2985. var sicdr_acptflagcd = isNull(model.getValue("/root/main/icdr/icdr_acptflagcd"));
  2986. if ( model.getValue("/root/main/icdr/icdr_acptflagcd") == "-"
  2987. || model.getValue("/root/main/icdr/icdr_acptflagcd") == ""
  2988. ||model.getValue("/root/main/icdr/icdr_acptflagcd") == null) { // 신청내역이 아닌 원무에서의 변경의 경우 inpt에 바로반영한다.
  2989. if ( model.getValue("/root/main/icdr/icdr_todd") == model.getValue("/root/main/inpt/inpt_dschdd") ){
  2990. model.setValue("/root/main/inpt/inpt_dutdeptcd", model.getValue("/root/main/icdr/icdr_dutdeptcd"));
  2991. model.setValue("/root/main/inpt/inpt_centcd", model.getValue("/root/main/icdr/icdr_centcd"));
  2992. model.setValue("/root/main/inpt/inpt_suporddeptcd", model.getValue("/root/main/icdr/icdr_suporddeptcd"));
  2993. model.setValue("/root/main/inpt/inpt_orddeptcd", model.getValue("/root/main/icdr/icdr_orddeptcd"));
  2994. model.setValue("/root/main/inpt/inpt_medispclid", model.getValue("/root/main/icdr/icdr_medispclid"));
  2995. model.setValue("/root/main/inpt/inpt_atdoctid", model.getValue("/root/main/icdr/icdr_atdoctid"));
  2996. model.setValue("/root/main/inpt/inpt_specordyn", model.getValue("/root/main/icdr/icdr_specordyn"));
  2997. model.setValue("/root/main/inpt/inpt_wardcd", model.getValue("/root/main/icdr/icdr_wardcd"));
  2998. model.setValue("/root/main/inpt/inpt_roomcd", model.getValue("/root/main/icdr/icdr_roomcd"));
  2999. model.setValue("/root/main/inpt/inpt_bedcd", model.getValue("/root/main/icdr/icdr_bedcd"));
  3000. model.setValue("/root/main/inpt/inpt_roomgrdecd", model.getValue("/root/main/icdr/icdr_roomgrdecd"));
  3001. model.setValue("/root/main/inpt/inpt_roomtypecd", model.getValue("/root/main/icdr/icdr_roomtypecd"));
  3002. }
  3003. } else if ( model.getValue("/root/main/icdr/icdr_acptflagcd") == "1"
  3004. && model.getValue("/root/hidden/flag/icdr_app_flag") == "Y"
  3005. && model.getValue("/root/main/icdr/icdr_appflagcd") == "2" ) { // 신청내역이면서 승인여부 "Y" 인경우 그리고 전과신청만 INPT에 바로반영한다.(전실신청이나 전과+전실은 간호 확인후 반영한다.)
  3006. // alert(sicdr_app_flag);
  3007. // alert(sicdr_acptflagcd);
  3008. if ( model.getValue("/root/main/icdr/icdr_todd") == model.getValue("/root/main/inpt/inpt_dschdd") ){
  3009. model.setValue("/root/main/inpt/inpt_dutdeptcd", model.getValue("/root/main/icdr/icdr_dutdeptcd"));
  3010. model.setValue("/root/main/inpt/inpt_centcd", model.getValue("/root/main/icdr/icdr_centcd"));
  3011. model.setValue("/root/main/inpt/inpt_suporddeptcd", model.getValue("/root/main/icdr/icdr_suporddeptcd"));
  3012. model.setValue("/root/main/inpt/inpt_orddeptcd", model.getValue("/root/main/icdr/icdr_orddeptcd"));
  3013. model.setValue("/root/main/inpt/inpt_medispclid", model.getValue("/root/main/icdr/icdr_medispclid"));
  3014. model.setValue("/root/main/inpt/inpt_atdoctid", model.getValue("/root/main/icdr/icdr_atdoctid"));
  3015. model.setValue("/root/main/inpt/inpt_specordyn", model.getValue("/root/main/icdr/icdr_specordyn"));
  3016. model.setValue("/root/main/inpt/inpt_wardcd", model.getValue("/root/main/icdr/icdr_wardcd"));
  3017. model.setValue("/root/main/inpt/inpt_roomcd", model.getValue("/root/main/icdr/icdr_roomcd"));
  3018. model.setValue("/root/main/inpt/inpt_bedcd", model.getValue("/root/main/icdr/icdr_bedcd"));
  3019. model.setValue("/root/main/inpt/inpt_roomgrdecd", model.getValue("/root/main/icdr/icdr_roomgrdecd"));
  3020. model.setValue("/root/main/inpt/inpt_roomtypecd", model.getValue("/root/main/icdr/icdr_roomtypecd"));
  3021. }
  3022. }
  3023. // 2009.07.07 -- 과거로직 제거
  3024. /*
  3025. // 입원환자를 응급실로 전과전실시에는 입원취소를 하고 응급실로 되돌리는 것으로 판단하고 INPT의 ordtype을 I -> E로 셋팅한다. 2007.09.28 홍영표
  3026. var sicdr_wardcd = model.getValue("/root/main/icdr/icdr_wardcd");
  3027. // var sicdr_orddeptcd = model.getValue("/root/main/icdr/icdr_orddeptcd");
  3028. // if ( sicdr_wardcd == gsWardCd_ER1 && sicdr_orddeptcd == gsOrddeptCd_ER ) {
  3029. if ( sicdr_wardcd == gsWardCd_ER1 ) {
  3030. var sinpt_ordtype = model.getValue("/root/main/inpt/inpt_ordtype");
  3031. // alert("sinpt_ordtype : " + sinpt_ordtype);
  3032. if ( sinpt_ordtype == 'I' ){
  3033. model.setValue("/root/main/inpt/inpt_ordtype", 'E');
  3034. model.setValue("/root/main/icdr/icdr_ordtype", 'E');
  3035. messageBox("응급실로 전환합니다.","I999");
  3036. }
  3037. }
  3038. // alert("44");
  3039. // 입원환자를 DSC로 전과전실시에는 입원취소를 하고 DSC로 되돌리는 것으로 판단하고 INPT의 ordtype을 I -> D로 셋팅한다. 2007.09.28 홍영표
  3040. if ( sicdr_wardcd == gsWardcd_DSC ) {
  3041. var sinpt_ordtype = model.getValue("/root/main/inpt/inpt_ordtype");
  3042. if ( sinpt_ordtype == 'I' ){
  3043. model.setValue("/root/main/inpt/inpt_ordtype", 'D');
  3044. model.setValue("/root/main/icdr/icdr_ordtype", 'D');
  3045. messageBox("DSC로 전환합니다.","I999");
  3046. }
  3047. }
  3048. */
  3049. var h_inpt_pat = ins.selectSingleNode("/root/main/h_inpt/inpt");
  3050. var inpt_pat = ins.selectSingleNode("/root/main/inpt");
  3051. model.resetInstanceNode("/root/send/s_inpt");
  3052. if (h_inpt_pat == null){
  3053. inpt_flag = null;
  3054. }else if (inpt_pat == null){
  3055. inpt_flag = null;
  3056. }else if (h_inpt_pat.xml == inpt_pat.xml) {
  3057. inpt_flag = null;
  3058. }else if (h_inpt_pat.xml != inpt_pat.xml) {
  3059. inpt_flag = 'U';
  3060. model.setValue("/root/main/inpt/inpt_status",inpt_flag);
  3061. copyNodeType("/root/send/s_inpt", "/root/main/inpt", "replace");
  3062. //submit("TXPMI00404");
  3063. }
  3064. // 5. 재원내역정보(유형) 변경여부 체크
  3065. var h_iphs_pat = ins.selectSingleNode("/root/main/h_iphs/iphs");
  3066. var iphs_pat = ins.selectSingleNode("/root/main/iphs");
  3067. model.resetInstanceNode("/root/send/s_iphs");
  3068. //model.alert("h_iphs_pat.xml : " + h_iphs_pat.xml + "\n" +
  3069. // "iphs_pat.xml : " + iphs_pat.xml);
  3070. if (h_iphs_pat == null){
  3071. iphs_flag = null;
  3072. }else if (iphs_pat == null){
  3073. iphs_flag = null;
  3074. }else if (h_iphs_pat.xml == iphs_pat.xml) {
  3075. iphs_flag = null;
  3076. }else if (h_iphs_pat.xml != iphs_pat.xml) {
  3077. iphs_flag = 'U';
  3078. model.setValue("/root/main/iphs/iphs_status",iphs_flag);
  3079. // DRG정보가 초기화된 경우 심사인터페이스 처리위한 파라미터 추가 by 조중래
  3080. if ((model.getValue("/root/main/h_iphs/iphs/drgyn") == "A" || model.getValue("/root/main/h_iphs/iphs/drgyn") == "Y")
  3081. && (model.getValue("/root/main/iphs/drgyn") != "A" && model.getValue("/root/main/iphs/drgyn") != "Y")) {
  3082. model.makeValue("/root/main/iphs/iphs_drgstatus", "X");
  3083. }
  3084. // 수정추가 : 2009.05.28 JHP, 임상시험유형으로 보험유형변경시 계정감면은 무조건 '-'... 김흥준과장님 요청.. 시작 -------------------------
  3085. // 주유형일때...
  3086. if( model.getValue("/root/main/iphs/iphs_insukind") == "71" ){
  3087. model.setValue("/root/main/iphs/iphs_disccd", "-");
  3088. }
  3089. // 수정추가 : 2009.05.28 JHP, 임상시험유형으로 보험유형변경시 계정감면은 무조건 '-'... 김흥준과장님 요청.. 끝 -------------------------
  3090. //<!-- 수정이력 : JHP 20090803 상한액 관련 IPHS ownbmaxgradeflag : '본인부담상한액 차등적용 구분 (-:해당없음, 1:400, 2:300, 3:200만원)' 추가-->
  3091. // 본인부담상한액 차등적용구분 값체크. 기본적으로 400만원이고 사용자가 임으로 300으로 바꿀수 있음. 200은 보조유형 50(희귀난치산정특례)일때 가능
  3092. fOwnBMaxGradeFlagSet();
  3093. // var ssuppkindobmgf = model.getValue("/root/main/iphs/iphs_suppkind");
  3094. // var ownbmaxgradeflag = model.getValue("/root/main/iphs/iphs_ownbmaxgradeflag");
  3095. /*
  3096. if(ssuppkindobmgf == "32" || ssuppkindobmgf == "33" || ssuppkindobmgf == "34" || ssuppkindobmgf == "35" || ssuppkindobmgf == "36" || ssuppkindobmgf == "37" || ssuppkindobmgf == "38" ||
  3097. ssuppkindobmgf == "39" || ssuppkindobmgf == "40" || ssuppkindobmgf == "41" || ssuppkindobmgf == "42" || ssuppkindobmgf == "43" || ssuppkindobmgf == "44" || ssuppkindobmgf == "45" ||
  3098. ssuppkindobmgf == "46"){
  3099. if(ownbmaxgradeflag != "3"){
  3100. messageBox("차상위 환자는 본인부담상한액 200만원","I009");
  3101. model.setValue("/root/main/iphs/iphs_ownbmaxgradeflag","3");
  3102. }
  3103. }else{
  3104. if (ownbmaxgradeflag == null || ownbmaxgradeflag ==" " || ownbmaxgradeflag == "") {
  3105. messageBox("본인부담상한액정보가 미존재함으로 기본상한액적용됩니다.","");
  3106. model.setValue("/root/main/iphs/iphs_ownbmaxgradeflag","1");
  3107. }else if(ownbmaxgradeflag == "3"){
  3108. messageBox("차상위 환자에 대해 본인부담상한액 200만원 적용됩니다. \n기본상한액적용됩니다.","");
  3109. model.setValue("/root/main/iphs/iphs_ownbmaxgradeflag","1");
  3110. }
  3111. }
  3112. */
  3113. // if (ownbmaxgradeflag == null || ownbmaxgradeflag ==" " || ownbmaxgradeflag == "") {
  3114. // messageBox("본인부담상한액정보가 미존재함으로 기본상한액적용됩니다.","");
  3115. // model.setValue("/root/main/iphs/iphs_ownbmaxgradeflag","1");
  3116. // }
  3117. copyNodeType("/root/send/s_iphs", "/root/main/iphs", "replace");
  3118. //submit("TXPMI00405");
  3119. }
  3120. //model.alert("s_iphs : " + ins.selectSingleNode("/root/send/s_iphs").xml);
  3121. // 6. 재원이력정보(진료과,병실,의사 등) 변경여부 체크
  3122. var h_icdr_pat = ins.selectSingleNode("/root/main/h_icdr/icdr");
  3123. var icdr_pat = ins.selectSingleNode("/root/main/icdr");
  3124. model.resetInstanceNode("/root/send/s_icdr");
  3125. // 전과전실이력중 신청내역을 승인할경우에는 신청내역을 변경하지 않아도 신청승인여부만 체크되어있으면 승인처리한다.
  3126. if ( model.getValue("/root/hidden/flag/icdr_app_flag") == 'Y' ) {
  3127. icdr_flag = 'I';
  3128. model.setValue("/root/main/icdr/icdr_status",icdr_flag);
  3129. copyNodeType("/root/send/s_icdr", "/root/main/icdr", "replace");
  3130. }else if ( model.getValue("/root/hidden/flag/icdr_app_flag") != 'Y' ) {
  3131. if (h_icdr_pat == null){
  3132. icdr_flag = null;
  3133. }else if (icdr_pat == null){
  3134. icdr_flag = null;
  3135. }else if (h_icdr_pat.xml == icdr_pat.xml) {
  3136. icdr_flag = null;
  3137. }else if (h_icdr_pat.xml != icdr_pat.xml) {
  3138. icdr_flag = 'U';
  3139. model.setValue("/root/main/icdr/icdr_status",icdr_flag);
  3140. copyNodeType("/root/send/s_icdr", "/root/main/icdr", "replace");
  3141. // 의사변경여부 설정
  3142. if (model.getValue("/root/main/h_icdr/icdr/icdr_medispclid") != model.getValue("/root/main/icdr/icdr_medispclid")) {
  3143. model.makeValue("/root/send/s_icdr/icdr_medispclid_flag", "Y");
  3144. } else {
  3145. model.makeValue("/root/send/s_icdr/icdr_medispclid_flag", "N");
  3146. }
  3147. //submit("TXPMI00406");
  3148. }
  3149. }
  3150. // 7. 소급일자 체크 및 처리( IPHS : 보험유형, 보조유형, 감면코드 / ICDR : 병실등급, 병실형태, 특진여부 발생시)
  3151. // inpt 체크로직 추가 : 초재진구분, 진찰료산정여부, 기타구분 by 조중래 20150410
  3152. var sIpsc_yn = null;
  3153. var sIpsc_inpt_yn = null;
  3154. var sIpsc_iphs_yn = null;
  3155. var sIpsc_icdr_yn = null;
  3156. var sIpsc_fromdd = null;
  3157. var sIpsc_todd = null;
  3158. // 7.1 재원유형의 소급적용일자 체크
  3159. //2008.01.18 퇴원통보일자가 있는경우 iphs_todd를 통보일자로 넣어주고 그날까지만 소급한다.
  3160. var iphs_fromdd = model.getValue("/root/main/iphs/iphs_fromdd");
  3161. var iphs_todd = model.getValue("/root/main/iphs/iphs_todd");
  3162. var inpt_dschnotidt = model.getValue("/root/main/inpt/inpt_dschnotidt");
  3163. inpt_dschnotidt = inpt_dschnotidt.substr(0, 8)
  3164. if (iphs_fromdd <= getCurrentDate()){
  3165. // 보험유형
  3166. if(iphs_insukind_flag == 'U'){
  3167. sIpsc_iphs_yn = 'Y';
  3168. }
  3169. // 보조유형
  3170. if (iphs_suppkind_flag == 'U'){
  3171. sIpsc_iphs_yn = 'Y';
  3172. }
  3173. // 할인코드
  3174. if (iphs_disccd_flag == 'U'){
  3175. sIpsc_iphs_yn = 'Y';
  3176. }
  3177. // 수가계산
  3178. if (iphs_calcscorrecalflag_flag == 'U') {
  3179. sIpsc_iphs_yn = 'Y';
  3180. }
  3181. // 소급할일자 범위 산정 ( 적용일자가 오늘보다 적어도 소급할 항목의 변경이 있을때만 반영한다. )
  3182. if(sIpsc_iphs_yn == 'Y'){
  3183. sIpsc_fromdd = iphs_fromdd;
  3184. // 완화의료 소급시작일자 보정처리
  3185. if (iphs_calcscorrecalflag_flag == 'U') {
  3186. // 직전유형의 최종일자에 의약품 관리료 생성을 위하여
  3187. // 현재유형 시작일자에서 하루를 감해서 설정(입원당일 제외)
  3188. if (iphs_fromdd > model.getValue("/root/main/inpt/inpt_indd")) {
  3189. iphs_fromdd = iphs_fromdd.toDate().getAddDate(-1, 'D');
  3190. sIpsc_fromdd = iphs_fromdd.getDateFormat("YYYYMMDD");
  3191. }
  3192. }
  3193. if(iphs_todd < getCurrentDate()){
  3194. sIpsc_todd = iphs_todd;
  3195. } else if (iphs_todd >= getCurrentDate()){
  3196. // sIpsc_todd = getCurrentDate();
  3197. // sIpsc_todd = sIpsc_todd.toDate().getAddDate(-1, 'D');
  3198. // sIpsc_todd = sIpsc_todd.getDateFormat("YYYYMMDD")
  3199. if (inpt_dschnotidt != null && inpt_dschnotidt != " " && inpt_dschnotidt != "" && inpt_dschnotidt != "-") {
  3200. if(getCurrentDate() >= inpt_dschnotidt) {
  3201. sIpsc_todd = inpt_dschnotidt;
  3202. } else {
  3203. sIpsc_todd = getCurrentDate();
  3204. // sIpsc_todd = sIpsc_todd.toDate().getAddDate(-1, 'D');
  3205. // sIpsc_todd = sIpsc_todd.getDateFormat("YYYYMMDD")
  3206. }
  3207. } else {
  3208. sIpsc_todd = getCurrentDate();
  3209. // sIpsc_todd = sIpsc_todd.toDate().getAddDate(-1, 'D');
  3210. // sIpsc_todd = sIpsc_todd.getDateFormat("YYYYMMDD")
  3211. }
  3212. }
  3213. }
  3214. }
  3215. // 7.2 전과전실의 소급적용일자 체크
  3216. var icdr_fromdd = model.getValue("/root/main/icdr/icdr_fromdd");
  3217. var icdr_todd = model.getValue("/root/main/icdr/icdr_todd");
  3218. if (icdr_fromdd <= getCurrentDate()){
  3219. // ㄹ.병실등급 변경체크
  3220. var h_icdr_roomgrdecd = ins.selectSingleNode("/root/main/h_icdr/icdr/icdr_roomgrdecd");
  3221. var icdr_roomgrdecd = ins.selectSingleNode("/root/main/icdr/icdr_roomgrdecd");
  3222. if(h_icdr_roomgrdecd == null){
  3223. icdr_roomgrdecd_flag = null; // 데이터가 없으면 인스턴스 노드가 없다. 그러면 에러난다.
  3224. }else if (icdr_roomgrdecd == null){
  3225. icdr_roomgrdecd_flag = null;
  3226. }else if (h_icdr_roomgrdecd.xml == icdr_roomgrdecd.xml) {
  3227. icdr_roomgrdecd_flag = null;
  3228. }else if (h_icdr_roomgrdecd.xml != icdr_roomgrdecd.xml) {
  3229. icdr_roomgrdecd_flag = 'U';
  3230. }
  3231. // ㅁ.병실형태 변경체크
  3232. var h_icdr_roomtypecd = ins.selectSingleNode("/root/main/h_icdr/icdr/icdr_roomtypecd");
  3233. var icdr_roomtypecd = ins.selectSingleNode("/root/main/icdr/icdr_roomtypecd");
  3234. if(h_icdr_roomtypecd == null){
  3235. icdr_roomtypecd_flag = null; // 데이터가 없으면 인스턴스 노드가 없다. 그러면 에러난다.
  3236. }else if (icdr_roomtypecd == null){
  3237. icdr_roomtypecd_flag = null;
  3238. }else if (h_icdr_roomtypecd.xml == icdr_roomtypecd.xml) {
  3239. icdr_roomtypecd_flag = null;
  3240. }else if (h_icdr_roomtypecd.xml != icdr_roomtypecd.xml) {
  3241. icdr_roomtypecd_flag = 'U';
  3242. }
  3243. // ㅂ.특진의사여부 변경체크
  3244. var h_icdr_specordyn = ins.selectSingleNode("/root/main/h_icdr/icdr/icdr_specordyn");
  3245. var icdr_specordyn = ins.selectSingleNode("/root/main/icdr/icdr_specordyn");
  3246. if(h_icdr_specordyn == null){
  3247. icdr_specordyn_flag = null; // 데이터가 없으면 인스턴스 노드가 없다. 그러면 에러난다.
  3248. }else if (icdr_specordyn == null){
  3249. icdr_specordyn_flag = null;
  3250. }else if (h_icdr_specordyn.xml == icdr_specordyn.xml) {
  3251. icdr_specordyn_flag = null;
  3252. }else if (h_icdr_specordyn.xml != icdr_specordyn.xml) {
  3253. icdr_specordyn_flag = 'U';
  3254. }
  3255. // ㅅ.의사 변경체크
  3256. var h_icdr_medispclid = ins.selectSingleNode("/root/main/h_icdr/icdr/icdr_medispclid");
  3257. var icdr_medispclid = ins.selectSingleNode("/root/main/icdr/icdr_medispclid");
  3258. if(h_icdr_medispclid == null){
  3259. icdr_medispclid_flag = null; // 데이터가 없으면 인스턴스 노드가 없다. 그러면 에러난다.
  3260. }else if (icdr_medispclid == null){
  3261. icdr_medispclid_flag = null;
  3262. }else if (h_icdr_medispclid.xml == icdr_medispclid.xml) {
  3263. icdr_medispclid_flag = null;
  3264. }else if (h_icdr_medispclid.xml != icdr_medispclid.xml) {
  3265. icdr_medispclid_flag = 'U';
  3266. }
  3267. if(icdr_roomgrdecd_flag == 'U'){
  3268. sIpsc_icdr_yn = 'Y';
  3269. } else if (icdr_roomtypecd_flag == 'U'){
  3270. sIpsc_icdr_yn = 'Y';
  3271. } else if (icdr_specordyn_flag == 'U'){
  3272. sIpsc_icdr_yn = 'Y';
  3273. } else if (icdr_medispclid_flag == 'U') {
  3274. sIpsc_icdr_yn = 'Y';
  3275. }
  3276. // 소급할일자 범위 산정 ( 적용일자가 오늘보다 적어도 소급할 항목의 변경이 있을때만 반영한다. )
  3277. if(sIpsc_icdr_yn == 'Y'){
  3278. if(sIpsc_fromdd == null) {
  3279. sIpsc_fromdd = icdr_fromdd;
  3280. }else if(icdr_fromdd <= sIpsc_fromdd){
  3281. sIpsc_fromdd = icdr_fromdd;
  3282. }
  3283. if(icdr_todd < getCurrentDate()) {
  3284. if(sIpsc_todd == null) {
  3285. sIpsc_todd = icdr_todd;
  3286. }else if(icdr_todd >= sIpsc_todd){
  3287. sIpsc_todd = icdr_todd;
  3288. }
  3289. } else if (icdr_todd >= getCurrentDate()){
  3290. // sIpsc_todd = getCurrentDate();
  3291. // sIpsc_todd = sIpsc_todd.toDate().getAddDate(-1, 'D');
  3292. // sIpsc_todd = sIpsc_todd.getDateFormat("YYYYMMDD")
  3293. if (inpt_dschnotidt != null && inpt_dschnotidt != " " && inpt_dschnotidt != "" && inpt_dschnotidt != "-") {
  3294. if(getCurrentDate() >= inpt_dschnotidt) {
  3295. sIpsc_todd = inpt_dschnotidt;
  3296. } else {
  3297. sIpsc_todd = getCurrentDate();
  3298. sIpsc_todd = sIpsc_todd.toDate().getAddDate(-1, 'D');
  3299. sIpsc_todd = sIpsc_todd.getDateFormat("YYYYMMDD")
  3300. }
  3301. } else {
  3302. sIpsc_todd = getCurrentDate();
  3303. sIpsc_todd = sIpsc_todd.toDate().getAddDate(-1, 'D');
  3304. sIpsc_todd = sIpsc_todd.getDateFormat("YYYYMMDD")
  3305. }
  3306. }
  3307. }
  3308. }
  3309. // 7.3 입원마스터의 소급적용일자 체크
  3310. if ((model.getValue("/root/main/inpt/inpt_fsexamflag") != model.getValue("/root/main/h_inpt/inpt/inpt_fsexamflag"))
  3311. || (model.getValue("/root/main/inpt/inpt_medcostestmflag") != model.getValue("/root/main/h_inpt/inpt/inpt_medcostestmflag"))
  3312. || (model.getValue("/root/main/inpt/inpt_etcordflag") != model.getValue("/root/main/h_inpt/inpt/inpt_etcordflag"))) {
  3313. sIpsc_inpt_yn = "Y"
  3314. sIpsc_fromdd = model.getValue("/root/main/inpt/inpt_indd");
  3315. // 종료일자는 IPHS, ICDR에서 적용되지 않았을 때만 설정
  3316. if (sIpsc_todd == null || sIpsc_todd == "") {
  3317. sIpsc_todd = model.getValue("/root/main/inpt/inpt_indd");
  3318. }
  3319. }
  3320. // 7.4 소급처리할 데이터 생성
  3321. if (sIpsc_inpt_yn == 'Y' || sIpsc_iphs_yn == 'Y'||sIpsc_icdr_yn == 'Y'){
  3322. sIpsc_yn = 'Y';
  3323. }
  3324. if (sIpsc_yn == 'Y') {
  3325. model.resetInstanceNode("/root/main/ipsc");
  3326. model.resetInstanceNode("/root/send/s_ipsc");
  3327. model.setValue("/root/main/ipsc/ipsc_status","U");
  3328. model.setValue("/root/main/ipsc/ipsc_pid",model.getValue("/root/main/inpt/inpt_pid"));
  3329. model.setValue("/root/main/ipsc/ipsc_indd",model.getValue("/root/main/inpt/inpt_indd"));
  3330. model.setValue("/root/main/ipsc/ipsc_cretno",model.getValue("/root/main/inpt/inpt_cretno"));
  3331. model.setValue("/root/main/ipsc/ipsc_recalfromdd",sIpsc_fromdd);
  3332. model.setValue("/root/main/ipsc/ipsc_recaltodd",sIpsc_todd);
  3333. model.setValue("/root/main/ipsc/ipsc_instcd",model.getValue("/root/main/inpt/inpt_instcd"));
  3334. model.setValue("/root/main/ipsc/ipsc_mskind",model.getValue("/root/main/inpt/inpt_mskind"));
  3335. model.setValue("/root/main/ipsc/ipsc_histstat","Y");
  3336. model.setValue("/root/main/ipsc/ipsc_genrdd",getCurrentDate());
  3337. model.setValue("/root/main/ipsc/ipsc_tretrslt","M");
  3338. model.setValue("/root/main/ipsc/ipsc_retcgenrplce","W");
  3339. // 삭제예정 : // 입원등록테이블(INPT)에 진료비 소급일자를 업데이트 한다.
  3340. // model.setValue("/root/main/inpt/inpt_ordcostretcdd",sIpsc_fromdd);
  3341. // inpt_flag = 'U';
  3342. // model.setValue("/root/main/inpt/inpt_status",'U');
  3343. // copyNodeType("/root/send/s_inpt", "/root/main/inpt", "replace"); // 기존의 INPT변경사항에 상관없이 다시한번 COPY한다.
  3344. copyNodeType("/root/send/s_ipsc", "/root/main/ipsc", "replace");
  3345. // 구현예정(서버모듈) : 소급테이블에 같은날짜에 처리결과가 없는경우에만 건너뛴다. 해당날짜에 처리결과가 있으면 다시 소급등록한다. : 완료 (무조건 등록한다)
  3346. }
  3347. /*
  3348. model.alert( "ptbs_flag:" + ptbs_flag +
  3349. "\n"+"ptin_flag:" + ptin_flag +
  3350. "\n"+"inpt_flag:" + inpt_flag +
  3351. "\n"+"iphs_flag:" + iphs_flag +
  3352. "\n"+"icdr_flag:" + icdr_flag +
  3353. "\n"+"ipsc_flag:" + sIpsc_yn);
  3354. */
  3355. /* 2009.11.15 MYKIM 추가
  3356. * desc 재원 중 환자를 조회시 현재 보조유형이나 기간이 맞지 않는 환자인 경우 수정하도록 유도함.
  3357. * but 마스터를 확인하고 변경해야할 경우도 있으므로 자보내역을 수정하지 않아도 저장은 됨. (김흥준 과장 요청)
  3358. */
  3359. if (model.getValue("/root/hidden/original/inpt/inpt_insukind") == "31" ) {
  3360. fCheckJabo();
  3361. }
  3362. // 8. 전체변경데이터를 모아서 변경한다.
  3363. // 구현예정 : 변경된 값이 있을때만 submit 던지고 아니면 변경된사항이 없다는 메세지 처리한다. : 완료
  3364. if (ptbs_flag == 'U' || ptin_flag == 'U' || inpt_flag == 'U' || iphs_flag == 'U' || icdr_flag == 'I' || icdr_flag == 'U' ||sIpsc_yn == 'Y'){
  3365. if ( submit("TXPMI00401") == true ) {
  3366. // 상급병실신청용 팝업표시
  3367. // 실료차가 있는 병실이거나, 격리병실의 경우에는 상급병실신청팝업 띄움 111114 조중래
  3368. // 병실이 변경되었거나, 병실등급이 변경되었을 경우에만 처리
  3369. if (( model.getValue("/root/main/icdr/icdr_roomcd") != model.getValue("/root/main/h_icdr/icdr/icdr_roomcd" ))
  3370. || ( model.getValue("/root/main/icdr/icdr_roomgrdecd") != model.getValue("/root/main/h_icdr/icdr/icdr_roomgrdecd") )) {
  3371. var diffamt = 0;
  3372. var roomgrdecd = model.getValue("/root/main/icdr/icdr_roomgrdecd");
  3373. var nodeList = instance1.selectNodes("/root/hidden/init/roomgrdecd");
  3374. // 병실등급으로 병실차액을 가져옴
  3375. for ( i = 1; i < nodeList.length; i++) {
  3376. var cd = model.getValue("/root/hidden/init/roomgrdecd[" + i + "]/cd");
  3377. if (cd == roomgrdecd) {
  3378. // 병실차액 설정
  3379. diffamt = model.getValue("/root/hidden/init/roomgrdecd[" + i + "]/cdamt");
  3380. break;
  3381. }
  3382. }
  3383. // 실료차가 있는 병실이거나, 격리병실의 경우에는 상급병실신청팝업 띄움 111114 조중래
  3384. if (diffamt > 0 || roomgrdecd == 'S0701') {
  3385. fUpRoomSignMngt(model.getValue("/root/main/inpt/inpt_pid"), model.getValue("/root/main/inpt/inpt_indd"), "Y");
  3386. }
  3387. }
  3388. // 변경이 성공하면 세부사항을 최신DB내역으로 갱신한다. 안그러면 연속 변경저장시 오류발생함.
  3389. // curruntrow는 원래 선택해서 변수에 담은 재원내역 Row
  3390. // 구현예정 : 리턴값 체크해서 성공시에만 재조회한다. 그리고 INPT의 변경사항에 대한 변경값 REFRESH기능 필요 : 완료
  3391. model.resetInstanceNode("/root/send/s_ptbs");
  3392. model.resetInstanceNode("/root/send/s_ptin");
  3393. model.resetInstanceNode("/root/send/s_inpt");
  3394. model.resetInstanceNode("/root/send/s_iphs");
  3395. model.resetInstanceNode("/root/send/s_icdr");
  3396. model.resetInstanceNode("/root/send/s_ipsc");
  3397. model.setValue("/root/send/ipatflag",'3');
  3398. model.setValue("/root/send/srchcond1",'1');
  3399. model.setValue("/root/send/srchcond2",model.getValue("/root/main/ptbs/ptbs_pid"));
  3400. fipatrefchlind('1');
  3401. fQuery1();
  3402. if(datagrid2.rows > 1) // 재원내역에 조회된 결과값이 있으면 해당환자의 정보를 조회한다.
  3403. {
  3404. fQuery("1");
  3405. }
  3406. }
  3407. } else {
  3408. messageBox("변경되어진 항목이 ","I004");
  3409. }
  3410. //submit("TXPMI00401");
  3411. // messageBox( "ptbs_flag:" + ptbs_flag +
  3412. // "\n"+"ptin_flag:" + ptin_flag +
  3413. // "\n"+"inpt_flag:" + inpt_flag +
  3414. // "\n"+"iphs_flag:" + iphs_flag +
  3415. // "\n"+"icdr_flag:" + icdr_flag +
  3416. // "\n"+"ipsc_flag:" + sIpsc_yn , "I001");
  3417. }
  3418. function fipatrefchlind(ipatrefflag)
  3419. {
  3420. if (ipatrefflag == '1' || ipatrefflag == '13') {
  3421. input11.attribute("top") = "8xp";
  3422. input11.attribute("left") = "365px";
  3423. input36.visible = false;
  3424. combo24.visible = false;
  3425. input11.visible = true;
  3426. model.setFocus("input11");
  3427. model.refresh();
  3428. } else if (ipatrefflag == '2') {
  3429. combo24.attribute("top") = "8xp";
  3430. combo24.attribute("left") = "365xp";
  3431. input36.visible = false;
  3432. combo24.visible = true;
  3433. input11.visible = false;
  3434. combo24.choices.itemset.attribute("nodeset") = "/root/hidden/init/orddeptcd";
  3435. combo24.refresh();
  3436. } else if (ipatrefflag == '3') {
  3437. combo24.attribute("top") = "8xp";
  3438. combo24.attribute("left") = "365xp";
  3439. input36.visible = false;
  3440. combo24.visible = true;
  3441. input11.visible = false;
  3442. combo24.choices.itemset.attribute("nodeset") = "/root/hidden/init/orddrid";
  3443. combo24.refresh();
  3444. } else if (ipatrefflag == '4') {
  3445. combo24.attribute("top") = "8xp";
  3446. combo24.attribute("left") = "365xp";
  3447. input36.visible = false;
  3448. combo24.visible = true;
  3449. input11.visible = false;
  3450. combo24.choices.itemset.attribute("nodeset") = "/root/hidden/init/orddrid";
  3451. combo24.refresh();
  3452. } else if (ipatrefflag == '5') {
  3453. combo24.attribute("top") = "8xp";
  3454. combo24.attribute("left") = "365xp";
  3455. input36.visible = false;
  3456. combo24.visible = true;
  3457. input11.visible = false;
  3458. combo24.choices.itemset.attribute("nodeset") = "/root/hidden/init/wardcd";
  3459. combo24.refresh();
  3460. } else if (ipatrefflag == '6' || ipatrefflag == '7') {
  3461. input36.attribute("top") = "8xp";
  3462. input36.attribute("left") = "365xp";
  3463. input36.visible = true;
  3464. combo24.visible = false;
  3465. input11.visible = false;
  3466. model.setValue("/root/send/srchcond2", getCurrentDate());
  3467. model.refresh();
  3468. } else if (ipatrefflag == '8') {
  3469. combo24.attribute("top") = "8xp";
  3470. combo24.attribute("left") = "365xp";
  3471. input36.visible = false;
  3472. combo24.visible = true;
  3473. input11.visible = false;
  3474. combo24.choices.itemset.attribute("nodeset") = "/root/hidden/init/insukind";
  3475. combo24.refresh();
  3476. } else if (ipatrefflag == '0') {
  3477. combo24.visible = false;
  3478. input36.visible = false;
  3479. input11.visible = false;
  3480. }
  3481. }
  3482. // function fPidVeri()
  3483. // {
  3484. // var ptbs_pid = model.getValue("/root/main/ptbs/ptbs_pid").getTrim();
  3485. //
  3486. // if (ptbs_pid != null && ptbs_pid != "" && ptbs_pid != " " && ptbs_pid != "-")
  3487. // {
  3488. // if (ptbs_pid.length != 0)
  3489. // {
  3490. // if (ptbs_pid.isNumber() == true)
  3491. // {
  3492. // //환자조회
  3493. // }
  3494. // else{
  3495. // messageBox("환자번호는 숫자만 입력해야합니다!","E999","");
  3496. // fOneInstanceReset("all"); //단일구조 인스턴스 초기화
  3497. // fMultiInstanceReset(); //멀티구조 인스턴스 초기화
  3498. // fMultiInstanceCopy(); //멀티 인스턴스 copy
  3499. // fBaseDataInit("all"); //기본데이터 초기화
  3500. // model.refresh();
  3501. // return false;
  3502. // }
  3503. // }
  3504. // else{
  3505. // fOneInstanceReset("all"); //단일구조 인스턴스 초기화
  3506. // fMultiInstanceReset(); //멀티구조 인스턴스 초기화
  3507. // fMultiInstanceCopy(); //멀티 인스턴스 copy
  3508. // fBaseDataInit("all"); //기본데이터 초기화
  3509. // model.refresh();
  3510. // return false;
  3511. // }
  3512. // }
  3513. // else{
  3514. // fOneInstanceReset("all"); //단일구조 인스턴스 초기화
  3515. // fMultiInstanceReset(); //멀티구조 인스턴스 초기화
  3516. // fMultiInstanceCopy(); //멀티 인스턴스 copy
  3517. // fBaseDataInit("all"); //기본데이터 초기화
  3518. // model.refresh();
  3519. // return false;
  3520. // }
  3521. // }
  3522. function fAgeVeri()
  3523. {
  3524. var ptbs_age = model.getValue("/root/main/ptbs/ptbs_age");
  3525. if (ptbs_age != null && ptbs_age != "" && ptbs_age != " " && ptbs_age != "-")
  3526. {
  3527. if (ptbs_age.length >= 1)
  3528. {
  3529. if (ptbs_age.isNumber() != true)
  3530. {
  3531. messageBox("나이항목의 형식이 ","E004");
  3532. model.setFocus("ipt_age");
  3533. return false;
  3534. }
  3535. }
  3536. }
  3537. }
  3538. function fHngNmVeri(gubn)
  3539. {
  3540. var ptbs_hngnm;
  3541. if (gubn == "xforms-next") ptbs_hngnm = model.getValue("/root/main/ptbs/ptbs_hngnm");
  3542. else if (gubn == "onkeypress" || gubn == "onkeyup")
  3543. {
  3544. ptbs_hngnm = (input2.currentText).toString();
  3545. }
  3546. //한글 한글자를 그냥 길이1로 계산
  3547. if (eval((ptbs_hngnm.length).toString()) < 2)
  3548. {
  3549. messageBox("환자성명은 2글자 이상 ","C001");
  3550. model.setFocus("input2");
  3551. return false;
  3552. }
  3553. }
  3554. function fRrgstNo1Veri()
  3555. {
  3556. var ptbs_rrgstno1 = model.getValue("/root/main/ptbs/ptbs_rrgstno1");
  3557. if (ptbs_rrgstno1 != null && ptbs_rrgstno1 != "" && ptbs_rrgstno1 != " " && ptbs_rrgstno1 != "-")
  3558. {
  3559. if (ptbs_rrgstno1.length != 6)
  3560. {
  3561. messageBox("주민번호1은 6자리 이상 ","C001");
  3562. model.setFocus("input15");
  3563. return false;
  3564. }
  3565. if (ptbs_rrgstno1.isNumber() != true)
  3566. {
  3567. messageBox("주민번호1은 숫자형태로 ","C001");
  3568. model.setFocus("input15");
  3569. return false;
  3570. }
  3571. }
  3572. else
  3573. {
  3574. messageBox("주민번호1은 6자리 이상 ","C001");
  3575. model.setFocus("input15");
  3576. return false;
  3577. }
  3578. }
  3579. function fRrgstNo2Veri()
  3580. {
  3581. var ptbs_brthdd;
  3582. var ptbs_rrgstno1 = model.getValue("/root/main/ptbs/ptbs_rrgstno1");
  3583. var ptbs_rrgstno2 = model.getValue("/root/main/ptbs/ptbs_rrgstno2");
  3584. if (ptbs_rrgstno1.length != 6)
  3585. {
  3586. messageBox("주민번호1은 6자리 이상 ","C001");
  3587. model.setFocus("input38");
  3588. return false;
  3589. }
  3590. var gubn = ptbs_rrgstno2.substr(0,1);
  3591. switch(gubn){
  3592. case '1' :
  3593. case '2' :
  3594. case '5' :
  3595. case '6' :
  3596. ptbs_brthdd = '19'.concat(ptbs_rrgstno1);
  3597. break;
  3598. case '3' :
  3599. case '4' :
  3600. case '7' :
  3601. case '8' :
  3602. ptbs_brthdd = '20'.concat(ptbs_rrgstno1);
  3603. break;
  3604. case '9' :
  3605. case '0' :
  3606. ptbs_brthdd = '18'.concat(ptbs_rrgstno1);
  3607. break;
  3608. default :
  3609. ptbs_brthdd = '19'.concat(ptbs_rrgstno1);
  3610. break;
  3611. }
  3612. model.setValue("/root/main/ptbs/ptbs_brthdd",ptbs_brthdd);
  3613. if (isValidDateTime(ptbs_brthdd, "YYYYMMDD") == false)
  3614. {
  3615. messageBox("주민번호 앞6자리 형식오류입니다. 올바른 일자형태로 ","C001");
  3616. model.setValue("/root/main/ptbs/ptbs_rrgstno1","");
  3617. model.setValue("/root/main/ptbs/ptbs_rrgstno2","");
  3618. model.setValue("/root/main/ptbs/ptbs_brthdd","");
  3619. model.refresh();
  3620. return false;
  3621. }
  3622. var ptbs_sex = model.getValue("/root/main/ptbs/ptbs_rrgstno2");
  3623. model.setValue("/root/main/ptbs/ptbs_sex",getGender(ptbs_sex));
  3624. //var ptbs_age = ptbs_rrgstno1.concat(ptbs_rrgstno2);
  3625. var ptbs_age = ptbs_rrgstno1;
  3626. model.setValue("/root/main/ptbs/ptbs_age",getFullAge(model.getValue("/root/main/ptbs/ptbs_brthdd")));
  3627. model.refresh();
  3628. if (isResidentNo(ptbs_age) == false)
  3629. {
  3630. messageBox("유효하지 않은 주민번호 ","E008");
  3631. return false;
  3632. }
  3633. }
  3634. function fHomeTelVeri()
  3635. {
  3636. var ptbs_hometel = model.getValue("/root/main/ptbs/ptbs_hometel");
  3637. if (ptbs_hometel != null && ptbs_hometel != "" && ptbs_hometel != " " && ptbs_hometel != "-" )
  3638. {
  3639. if (ptbs_hometel.length >= 1)
  3640. {
  3641. if (ptbs_hometel.length < 7)
  3642. {
  3643. messageBox("전화번호는 7자리 이상 ","C001");
  3644. model.setFocus("input1");
  3645. return false;
  3646. }
  3647. }
  3648. }
  3649. }
  3650. function fMpphonTelVeri()
  3651. {
  3652. var ptbs_mpphontel = model.getValue("/root/main/ptbs/ptbs_mpphontel");
  3653. if (ptbs_mpphontel != null && ptbs_mpphontel != "" && ptbs_mpphontel != " " && ptbs_mpphontel != "-")
  3654. {
  3655. if (ptbs_mpphontel.length >= 1)
  3656. {
  3657. if (ptbs_mpphontel.length < 10)
  3658. {
  3659. messageBox("휴대폰 전화번호는 10자리 이상 ","C001");
  3660. model.setFocus("input11");
  3661. return false;
  3662. }
  3663. else
  3664. {
  3665. var ptbs_mpphontel_sub = ptbs_mpphontel.substr(0,3);
  3666. if (ptbs_mpphontel_sub != "011" && ptbs_mpphontel_sub != "010" && ptbs_mpphontel_sub != "017" &&
  3667. ptbs_mpphontel_sub != "016" && ptbs_mpphontel_sub != "019" && ptbs_mpphontel_sub != "018")
  3668. {
  3669. messageBox("휴대폰 앞3자리 형식이 ","E004");
  3670. model.setFocus("input11");
  3671. return false;
  3672. }
  3673. }
  3674. }
  3675. }
  3676. }
  3677. //보험 탭 세팅하기
  3678. function fInsukindTabSetting(){
  3679. var iphs_insukind = model.getValue("/root/main/iphs/iphs_insukind");
  3680. //보조유형 세팅하기
  3681. model.setValue("/root/main/ptin/ptin_insukind",model.getValue("/root/main/iphs/iphs_insukind"));
  3682. // 입원요율에 따른 보조유형 재설정
  3683. // 외래요율
  3684. if (model.getValue("/root/main/inpt/inpt_brateflag") != null && model.getValue("/root/main/inpt/inpt_brateflag") == "O") {
  3685. cmb_suppkind.choices.itemset.attribute("nodeset") = "/root/hidden/init/suppkind[up = '" + iphs_insukind + "' and (io = 'A' or io = 'O')]";
  3686. } else {
  3687. cmb_suppkind.choices.itemset.attribute("nodeset") = "/root/hidden/init/suppkind[up = '" + iphs_insukind + "' and (io = 'A' or io = 'I')]";
  3688. }
  3689. //건강보험,의료급여1,2종,일반,외국인
  3690. if (iphs_insukind == gsBoHeom || iphs_insukind == gsBoHo1 || iphs_insukind == gsBoHo2 ||
  3691. iphs_insukind == gsIlBan || iphs_insukind == gsForIn || iphs_insukind == gsImSang) {
  3692. model.toggle("case_base");
  3693. }
  3694. //산재
  3695. if (iphs_insukind == gsSanJae) {
  3696. model.toggle("case_inducs");
  3697. }
  3698. //자보
  3699. if (iphs_insukind == gsJaboKind) {
  3700. model.toggle("case_ta");
  3701. }
  3702. //공상
  3703. if (iphs_insukind == gsGongSang) {
  3704. model.toggle("case_dutywund");
  3705. }
  3706. }
  3707. function fPatEmplInfoRefDir() {
  3708. var rrgstno1 = model.getValue("/root/main/ptbs/ptbs_rrgstno1");
  3709. var rrgstno2 = model.getValue("/root/main/ptbs/ptbs_rrgstno2");
  3710. var hngnm = model.getValue("/root/main/ptbs/ptbs_hngnm");
  3711. var rrgstno = rrgstno1 + rrgstno2;
  3712. var pid = model.getValue("/root/main/ptbs/ptbs_pid");
  3713. model.makeNode("/root/temp/result/famylist");
  3714. //send
  3715. model.makeNode("/root/send/discpat/checkcount");
  3716. model.makeNode("/root/send/discpat/rrgstno1");
  3717. model.makeNode("/root/send/discpat/rrgstno2");
  3718. model.makeNode("/root/send/discpat/rrgstno");
  3719. model.makeNode("/root/send/discpat/emplnm");
  3720. model.makeNode("/root/send/discpat/pid");
  3721. model.setValue("/root/send/discpat/checkcount", 1);
  3722. model.setValue("/root/send/discpat/rrgstno1", rrgstno1);
  3723. model.setValue("/root/send/discpat/rrgstno2", rrgstno2);
  3724. model.setValue("/root/send/discpat/rrgstno", rrgstno);
  3725. model.setValue("/root/send/discpat/emplnm", hngnm);
  3726. model.setValue("/root/send/discpat/pid", pid);
  3727. if( rrgstno1.length == 6 && rrgstno2.length == 7 ){
  3728. submit("TRPMC03802");
  3729. if( getNodesetCount("/root/temp/result/famylist/cretinstcd") > 0 ){
  3730. model.setValue("/root/main/inpt/inpt_emplno", model.getValue("/root/temp/result/famylist/emplno")); // 직원번호
  3731. model.setValue("/root/main/iphs/iphs_emplnm", model.getValue("/root/temp/result/famylist/emplnm")); // 직원성명
  3732. model.setValue("/root/main/iphs/iphs_disccd", model.getValue("/root/temp/result/famylist/discuncocd")); // 할인코드(discuncocd)
  3733. model.setValue("/root/main/iphs/iphs_famyrelnm", model.getValue("/root/temp/result/famylist/famyrelnm")); // 관계
  3734. model.setValue("/root/main/iphs/iphs_preststatnm", model.getValue("/root/temp/result/famylist/preststatnm")); // 근무상태
  3735. model.setValue("/root/main/iphs/iphs_profacptyn", model.getValue("/root/temp/result/famylist/profacptyn")); // 증명서접수여부
  3736. model.setValue("/root/main/iphs/iphs_profacptdd", model.getValue("/root/temp/result/famylist/profacptdd")); // 증명서접수일자
  3737. model.setValue("/root/main/iphs/iphs_remark", model.getValue("/root/temp/result/famylist/remark")); // 참고사항
  3738. }
  3739. }
  3740. model.refresh();
  3741. }
  3742. // 2008.07.13 인사정보 조회 함수로 분리
  3743. function fPatEmplInfoRef() {
  3744. //2007.11.28 인사정보의 직원, 직원가족정보 조회
  3745. var rrgstno1 = model.getValue("/root/main/ptbs/ptbs_rrgstno1");
  3746. var rrgstno2 = model.getValue("/root/main/ptbs/ptbs_rrgstno2");
  3747. var hngnm = model.getValue("/root/main/ptbs/ptbs_hngnm");
  3748. var pid = model.getValue("/root/main/ptbs/ptbs_pid");
  3749. // 2008.07.12 - 직원정보 조회 방법변경에 따른 소스수정
  3750. if( rrgstno1.length == 6 && rrgstno2.length == 7 ){
  3751. var sEmplInfo = fGetPsnWorkInfo(rrgstno1 + rrgstno2, hngnm, pid);
  3752. if (!isNull(sEmplInfo)) {
  3753. var arrayEmplInfo = sEmplInfo.split("▦");
  3754. model.setValue("/root/main/inpt/inpt_emplno", arrayEmplInfo[0]); // 직원번호
  3755. model.setValue("/root/main/iphs/iphs_emplnm", arrayEmplInfo[1]); // 직원성명
  3756. model.setValue("/root/main/iphs/iphs_disccd", arrayEmplInfo[2]); // 할인코드(discuncocd)
  3757. model.setValue("/root/main/iphs/iphs_famyrelnm", arrayEmplInfo[3]); // 관계
  3758. model.setValue("/root/main/iphs/iphs_preststatnm", arrayEmplInfo[4]); // 근무상태
  3759. model.setValue("/root/main/iphs/iphs_profacptyn", arrayEmplInfo[5]); // 증명서접수여부
  3760. model.setValue("/root/main/iphs/iphs_profacptdd", arrayEmplInfo[6]); // 증명서접수일자
  3761. model.setValue("/root/main/iphs/iphs_remark", arrayEmplInfo[7]); // 참고사항
  3762. }
  3763. }
  3764. model.refresh();
  3765. }
  3766. function fInRgstCardIss() {
  3767. var inpt_pid = model.getValue("/root/main/inpt/inpt_pid");
  3768. if (inpt_pid == null || inpt_pid == " " || inpt_pid == "") {
  3769. messageBox("환자번호가 없거나 재원중인 환자가 아닙니다.!","E999","");
  3770. return false;
  3771. }
  3772. model.setValue("/root/send/data22/pid",model.getValue("/root/main/inpt/inpt_pid"));
  3773. model.setValue("/root/send/data22/indd",model.getValue("/root/main/inpt/inpt_indd"));
  3774. model.setValue("/root/send/data22/cretno",model.getValue("/root/main/inpt/inpt_cretno"));
  3775. model.setValue("/root/send/data22/mskind",model.getValue("/root/main/inpt/inpt_mskind"));
  3776. model.setValue("/root/send/data22/histstat",model.getValue("/root/main/inpt/inpt_histstat"));
  3777. model.setValue("/root/send/data22/ioflag", "I");
  3778. if (submit("TRPMI00112")) {
  3779. model.resetInstanceNode("/root/send/data22");
  3780. }
  3781. var rrgstno = model.getValue("/root/hidden/h_receipt/receipt/rrgstno");
  3782. var s_rrgstno = rrgstno.substr(0,6) + "-" + rrgstno.substr(6,1);
  3783. model.setValue("/root/hidden/h_receipt/receipt/rrgstno",s_rrgstno);
  3784. // 2009.10.23 - rexpert에서 자체적으로 생성
  3785. //var wardcd = model.getValue("/root/hidden/h_receipt/receipt/wardcd");
  3786. //var roomcd = model.getValue("/root/hidden/h_receipt/receipt/roomcd");
  3787. //var swardcd = wardcd.replace("병동", "") + " " + roomcd + "호";
  3788. //var swardcd = wardcd + " " + roomcd + "호"; // 2008.09.01 병동명 다나오도록 수정
  3789. //model.setValue("/root/hidden/h_receipt/receipt/wardcd",swardcd);
  3790. var sindd = model.getValue("/root/hidden/h_receipt/receipt/indd");
  3791. model.setValue("/root/hidden/h_receipt/receipt/indd",sindd.substr(0, 4) + "/" + sindd.substr(4,2) + "/" + sindd.substr(6,2));
  3792. //2007.10.23 정신과일 경우 약어 나오지 않게 요청
  3793. if (model.getValue("/root/hidden/h_receipt/receipt/orddeptcd") == "2030000000") {
  3794. model.setValue("/root/hidden/h_receipt/receipt/orddeptnm","");
  3795. }
  3796. /*
  3797. var sPrinter;
  3798. var trayno;
  3799. // 2009.06.19 - local에 설정된 파일을 우선시 한다.
  3800. // print1:입원약정서, print2:입원환자카드, print3:선택신청
  3801. var printInfo = pmifGetPrintSetting("print2");
  3802. if (printInfo.length == 2) {
  3803. sPrinter = printInfo[0];
  3804. trayno = printInfo[1];
  3805. } else {
  3806. // 2008.09.21 입원약정서 출력용 프린터 이름 조회 - 최병진
  3807. sPrinter = model.getValue("/root/hidden/printers/card_printer");
  3808. if (isNull(sPrinter)) {
  3809. sPrinter = "true";
  3810. }
  3811. // 2009년 03월 20일, JHP, 트레이정보를 받아서 넣는다.
  3812. trayno = model.getValue("/root/hidden/pam/printer/value");
  3813. }
  3814. exeReportPreview("RPPMI03100", "XMLSTR" , "" , "" , sPrinter , "", "", "", "", "true", "", "", trayno);
  3815. */
  3816. //공통코드 P0045에서 프린터 명칭과 트레이 호출 - 입원환자카드(네임판)
  3817. fGetPrintName();
  3818. var print_name = getGlobalVariable("SPPAO00100_P0045_3_nm","p");
  3819. var print_tray = getGlobalVariable("SPPAO00100_P0045_3_tray","p");
  3820. //호출끝
  3821. //입원환자카드(네임판)
  3822. if(print_name != "false"){
  3823. exeReportPreview("RPPMI03100", "XMLSTR" , "" , "" , print_name , "", "", "", "", "", "", "grp_card", print_tray);
  3824. }
  3825. }
  3826. // 2009년 03월 20일, JHP
  3827. // 서울성모이전으로 프린터를 2tray와 1tray짜리를 동시에 사용한다. 수납쪽(영수증, 중간계산서)은 1tray, 등록쪽(약정서, 입원카드)은 2tray를 쓰는데
  3828. // 1트레이는 기본이므로 수납쪽은 그냥 둔다. 근데 2트레이는 렉스퍼트 출력시 트레이번호를 셋팅값으로 박아줘야하는데 프린터 정보는 동적으로 가지고 올수 없기때문에
  3829. // 임의의 경로에 txt파일을 만들어 트레이값을 설정하여 저장하여놓고 불러와서 트레이번호를 매겨준다.
  3830. // 이때 해당 파일이 없으면 해당파일을 사용자가 만들어준다.
  3831. function fSetPrinterTray(){
  3832. var printerfileno = document.readIniFile("Tray", "trayno", "X", "C:\\cmcnuprinter\\printer.ini");
  3833. if ( printerfileno == "X") {
  3834. if ( messageBox("프린터 트레이정보가 존재하지 않습니다. ''예 = 트레이1개'', ''아니오 = 트레이2개'' ","Q003") == "6"){
  3835. printerfileno = "1";
  3836. } else {
  3837. printerfileno = "2";
  3838. }
  3839. var fso = new ActiveXObject("Scripting.FileSystemObject");
  3840. var a = fso.CreateFolder("C:\\cmcnuprinter");
  3841. document.writeinifile("Tray", "trayno", printerfileno,"C:\\cmcnuprinter\\printer.ini");
  3842. model.makeValue("/root/hidden/pam/printer/value",printerfileno);
  3843. model.setValue("/root/hidden/pam/printer/value",printerfileno);
  3844. } else {
  3845. model.makeValue("/root/hidden/pam/printer/value",printerfileno);
  3846. model.setValue("/root/hidden/pam/printer/value",printerfileno);
  3847. }
  3848. }
  3849. function fCheckJabo(gubun)
  3850. {
  3851. var sPid = model.getValue("/root/main/ptbs/ptbs_pid");
  3852. var sIndd = model.getValue("/root/main/inpt/inpt_indd");
  3853. var sOrddeptcd = model.getValue("/root/main/inpt/inpt_orddeptcd");
  3854. var sInsuKind = model.getValue("/root/main/iphs/iphs_insukind");
  3855. var sSuppKind = model.getValue("/root/main/iphs/iphs_suppkind");
  3856. var sInsucd = "";
  3857. //2009.11.20 MYKIM 수정 .입원등록시는 무조건 ioflag가 i로 입력하지만 재원변경에서는 응급환자도 있음.
  3858. //var sIOFlag = "I";
  3859. var sIOFlag = model.getValue("/root/main/inpt/inpt_ordtype");
  3860. var sInsuKindNm = "";
  3861. if (sInsuKind == gsInsu_JaboKind) {
  3862. sInsuKindNm = "자보";
  3863. sInsucd = model.getValue("/root/main/aipm/aipm_insucmpycd");
  3864. }
  3865. // 자보, 산재, (+공상)
  3866. if (sInsuKind == gsInsu_JaboKind || sInsuKind == gsInsu_SanJae || sInsuKind == gsInsu_GongSang) {
  3867. // PAM.js - 등록내역 및 기간 체크
  3868. var bIsTrue = checkJaboSanjae(sPid, sIndd, sOrddeptcd, sInsuKind, sSuppKind, sInsucd, sIOFlag);
  3869. if (bIsTrue == false) {
  3870. messageBox("[" + sInsuKindNm + "]등록정보의 보조유형과 기간을 확인하십시오!", "I");
  3871. //환자번호만 쳤을 때는 자보 마스터내역과 맞지 않을 경우 자보 팝업 띄워줌.
  3872. if(gubun=="1"){
  3873. button61.dispatch("DOMActivate");
  3874. }
  3875. return false;
  3876. }
  3877. }
  3878. }
  3879. // 20091215 JHP 수정추가 희귀질환번호가 있을때 보여주기, 중증번호 동시존재시 해당 기준에 따라서 보여주기
  3880. // 변경요청번호 9553.
  3881. function fItemRareMsg(){
  3882. var itemmsg = model.getValue("/root/main/srdg/srdg_pid");
  3883. var raremsg = model.getValue("/root/main/rooa/rooa/rooa_pid");
  3884. // 중증번호만 존재시..itemmsg
  3885. if(itemmsg != "" && raremsg == ""){
  3886. cap_sdoa.attribute("text") = "중증번호";
  3887. cap_rooa.visible = false;
  3888. opt_srdginsukind.visible = true;
  3889. opt_rooainsukind.visible= false;
  3890. opt_srdgseridiagno.visible = true;
  3891. opt_rooarareobstno.visible= false;
  3892. opt_srdgfromdd.visible = true;
  3893. opt_rooafromdd.visible= false;
  3894. opt_srdgtodd.visible = true;
  3895. opt_rooatodd.visible= false;
  3896. // 희귀번호만 존재시.. raremsg
  3897. }else if(itemmsg == "" && raremsg != ""){
  3898. cap_sdoa.attribute("text") = "희귀번호";
  3899. cap_rooa.visible = false;
  3900. opt_srdginsukind.visible = false;
  3901. opt_rooainsukind.visible= true;
  3902. opt_srdgseridiagno.visible = false;
  3903. opt_rooarareobstno.visible= true;
  3904. opt_srdgfromdd.visible = false;
  3905. opt_rooafromdd.visible= true;
  3906. opt_srdgtodd.visible = false;
  3907. opt_rooatodd.visible= true;
  3908. // 두번호 모두 존재시.. itemmsg, raremsg
  3909. }else if(itemmsg != "" && raremsg != ""){
  3910. cap_sdoa.attribute("text") = "중증";
  3911. cap_rooa.visible = true;
  3912. cap_sdoa.attribute("color") = "red";
  3913. cap_rooa.attribute("color") = "black";
  3914. opt_srdginsukind.visible = true;
  3915. opt_rooainsukind.visible= false;
  3916. opt_srdgseridiagno.visible = true;
  3917. opt_rooarareobstno.visible= false;
  3918. opt_srdgfromdd.visible = true;
  3919. opt_rooafromdd.visible= false;
  3920. opt_srdgtodd.visible = true;
  3921. opt_rooatodd.visible= false;
  3922. }else{
  3923. cap_sdoa.attribute("text") = "중증번호";
  3924. cap_rooa.visible = false;
  3925. opt_srdginsukind.visible = true;
  3926. opt_rooainsukind.visible= false;
  3927. opt_srdgseridiagno.visible = true;
  3928. opt_rooarareobstno.visible= false;
  3929. opt_srdgfromdd.visible = true;
  3930. opt_rooafromdd.visible= false;
  3931. opt_srdgtodd.visible = true;
  3932. opt_rooatodd.visible= false;
  3933. }
  3934. model.refresh();
  3935. }
  3936. // 입퇴원결정서 추가 노회식 20101218
  3937. function fInDeciPrint2() {
  3938. model.removenode("/root/hidden/rsltflag/indeciprint/diagnm");
  3939. model.makeNode("/root/hidden/rsltflag/indeciprint/diagnm");
  3940. model.setValue("/root/hidden/rsltflag/indeciprint/diagnm", model.getValue("/root/temp/diagnm"));
  3941. //공통코드 P0045에서 프린터 명칭과 트레이 호출 - 입퇴원결정서
  3942. fGetPrintName();
  3943. var print_name = getGlobalVariable("SPPAO00100_P0045_6_nm","p");
  3944. var print_tray = getGlobalVariable("SPPAO00100_P0045_6_tray","p");
  3945. //호출끝
  3946. //입퇴원결정서 프린터
  3947. if(print_name != "false"){
  3948. exeReportPreview("RPPMI01201", "XMLSTR", "", "", print_name, "", "", "", "", "true", "", "", print_tray, "", "", "", "", "", "", "", "");
  3949. }
  3950. // 자보환자안내문 출력
  3951. if(model.getValue("/root/hidden/rsltflag/indeciprint/insukindcd") == "31") {
  3952. //공통코드 P0045에서 프린터 명칭과 트레이 호출 - 자보환자안내문
  3953. // fGetPrintName();
  3954. submit("TRPMI01203");
  3955. var print_name = getGlobalVariable("SPPAO00100_P0045_100_nm","p");
  3956. var print_tray = getGlobalVariable("SPPAO00100_P0045_100_tray","p");
  3957. //호출끝
  3958. //디폴트 프린터
  3959. if(print_name != "false"){
  3960. exeReportPreview("RPPMI01203", "XMLSTR", "", "", print_name, "", "", "", "", "true", "", "", print_tray, "", "", "2", "", "", "", "", "");
  3961. }
  3962. }
  3963. }
  3964. /*
  3965. 본인부담상한제 최종 정리 by 조중래 20140311
  3966. (관련근거 : 보건복지부 고시 제2013-139호, 제2013-196호)
  3967. 1. 가입자의 소득수준별 연간 의료비 본인부담상한액을 달리함
  3968. 2. 가입자의 소득수준의 결정은 다음연도 4월이며, 이때 결정된 소득수준을 기준으로
  3969. 환불금액이 결정되며, 환불절차에 따라 환불이 이루어짐
  3970. 3. 2의 내용에 의하여 진료일 해당연도의 소득수준은 그 다음연도에 결정되므로
  3971. 요양기관 사전적용의 경우 소득수준은 가입자의 100/90에 해당하는 단계로 적용
  3972. 위 고시에 의거하여, 보험유형관리화면에서 건강보험의 본인부담상한금액을 설정(원무팀)
  3973. 해당 금액을 읽어들여 코드로 변환하여 사용
  3974. (pam.pmbminsu.ownbmaxammt -> pam.pmcmcode.cdgrupid='PK062' -> pam.pmihiphs.ownbmaxgradeflag)
  3975. */
  3976. function fOwnBMaxGradeFlagSet(){
  3977. // 건강보험만 적용
  3978. if (model.getValue("/root/main/iphs/iphs_insukind") == "11"
  3979. && model.getValue("/root/main/iphs/iphs_suppkind") != "01") {
  3980. var suppkind = model.getValue("/root/main/iphs/iphs_suppkind");
  3981. var fromdd = model.getValue("/root/main/iphs/iphs_fromdd");
  3982. var ownbmaxamt = model.getValue("/root/hidden/init/suppkindhist[up='11' and cd='" + suppkind + "' and fromdd<='" + fromdd + "' and todd>='" + fromdd + "']/amt");
  3983. var ownbmaxappyn = model.getValue("/root/hidden/init/suppkindhist[up='11' and cd='" + suppkind + "' and fromdd<='" + fromdd + "' and todd>='" + fromdd + "']/ownbmaxappyn");
  3984. var ownbmaxgradeflag = model.getValue("/root/init/PAM/PK062list/PK062[cdnm='" + ownbmaxamt + "']/cdid");
  3985. if (ownbmaxgradeflag == null || ownbmaxgradeflag == "") {
  3986. alert("본인부담상한금액을 조회할 수 없습니다. 본인부담상한금액을 확인하십시오.");
  3987. model.setValue("/root/main/iphs/iphs_ownbmaxgradeflag", "-");
  3988. model.refreshpart("/root/main/iphs/iphs_ownbmaxgradeflag");
  3989. return false;
  3990. } else {
  3991. // 본인부담상한금 적용인 경우에만
  3992. if (ownbmaxappyn == "Y") {
  3993. model.setValue("/root/main/iphs/iphs_ownbmaxgradeflag", ownbmaxgradeflag);
  3994. } else {
  3995. model.setValue("/root/main/iphs/iphs_ownbmaxgradeflag", "-");
  3996. }
  3997. model.refreshpart("/root/main/iphs/iphs_ownbmaxgradeflag");
  3998. }
  3999. } else {
  4000. model.setValue("/root/main/iphs/iphs_ownbmaxgradeflag", "-");
  4001. model.refreshpart("/root/main/iphs/iphs_ownbmaxgradeflag");
  4002. }
  4003. }
  4004. /*
  4005. * 자보환자안내문 출력 함수 - 입퇴원결정서 와 같이 출력되었으나 상급병실 신청서 전자서명 관계로 입원등록시 입퇴원결정서 출력을 하지 않아
  4006. * 안내문출력함수를 따로 만듬. 2011.11.22. 노회식
  4007. */
  4008. function fAutoPrint() {
  4009. //자보동의서 전자동의서를 위한 처리로직 추가 by 조중래 20130305
  4010. if (model.getValue("/root/init/PAM/PK018list/PK018[cdid='" + app.clientIp + "']/cdnm") == "Y"
  4011. && messageBox("자보동의서", "Q017") == "6") {
  4012. model.makeValue("/root/temp/consent/pid", model.getValue("/root/main/inpt/inpt_pid"));
  4013. model.makeValue("/root/temp/consent/orddd", model.getValue("/root/main/inpt/inpt_indd"));
  4014. model.makeValue("/root/temp/consent/cretno", model.getValue("/root/main/inpt/inpt_cretno"));
  4015. model.makeValue("/root/temp/consent/ordtype", "I");
  4016. model.makeValue("/root/temp/consent/flag", "J"); // J:자보동의서
  4017. model.makeValue("/root/temp/consent/formcd", model.getValue("/root/init/prncd/hardcd[cdseqno='8']/hardcd")); // 8:자보동의서
  4018. fPrintOcrConsent("/root/temp/consent");
  4019. }else{
  4020. //공통코드 P0045에서 프린터 명칭과 트레이 호출 - 자보환자안내문
  4021. submit("TRPMI01203");
  4022. var print_name = getGlobalVariable("SPPAO00100_P0045_100_nm","p");
  4023. var print_tray = getGlobalVariable("SPPAO00100_P0045_100_tray","p");
  4024. //호출끝
  4025. //디폴트 프린터
  4026. if(print_name != "false"){
  4027. exeReportPreview("RPPMI01203", "XMLSTR", "", "", print_name, "", "", "", "", "true", "", "", print_tray, "", "", "2", "", "", "", "", "");
  4028. }
  4029. }
  4030. }
  4031. // 산재환자안내문 출력 함수 추가 by 조중래 20130313
  4032. function fIndPrint() {
  4033. // 산재동의서 전자동의서를 위한 처리로직 추가 by 조중래 20130305
  4034. if (model.getValue("/root/init/PAM/PK018list/PK018[cdid='" + app.clientIp + "']/cdnm") == "Y"
  4035. && messageBox("산재동의서", "Q017") == "6") {
  4036. model.makeValue("/root/temp/consent/pid", model.getValue("/root/main/inpt/inpt_pid"));
  4037. model.makeValue("/root/temp/consent/orddd", model.getValue("/root/main/inpt/inpt_indd"));
  4038. model.makeValue("/root/temp/consent/cretno", model.getValue("/root/main/inpt/inpt_cretno"));
  4039. model.makeValue("/root/temp/consent/ordtype", "I");
  4040. model.makeValue("/root/temp/consent/flag", "I"); // I:산재동의서
  4041. model.makeValue("/root/temp/consent/formcd", model.getValue("/root/init/prncd/hardcd[cdseqno='9']/hardcd")); // 9:산재동의서
  4042. fPrintOcrConsent("/root/temp/consent");
  4043. }
  4044. }
  4045. ]]>
  4046. </script>
  4047. </xhtml:head>
  4048. <xhtml:body guideline="2,628;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  4049. <group id="group1" style="left:0px; top:13px; width:1195px; height:744px; ">
  4050. <select1 id="combo25" ref="/root/main/ptbs/ptbs_recmerrela" visibility="hidden" appearance="minimal" style="left:292px; top:199px; width:105px; height:19px; ">
  4051. <choices>
  4052. <itemset nodeset="/root/init/P0327list/P0327">
  4053. <label ref="cdnm"/>
  4054. <value ref="cdid"/>
  4055. </itemset>
  4056. </choices>
  4057. </select1>
  4058. <button id="button16" class="icon_search" visibility="hidden" style="left:272px; top:200px; width:16px; height:16px; ">
  4059. <caption/>
  4060. <script type="javascript" ev:event="DOMActivate">
  4061. <![CDATA[
  4062. model.removeNodeset("/root/hidden/oneselect");
  4063. model.makeNode("/root/hidden/oneselect");
  4064. model.setValue("/root/hidden/userpopupinfo/param", "_OneS");
  4065. model.setValue("/root/hidden/userpopupinfo/flag","userid");
  4066. model.setValue("/root/hidden/userpopupinfo/searchitem",model.getValue("/root/main/ptbs/ptbs_recmerid"));
  4067. modal("../../userdeptinfoweb/xrw/SPZSU10103_사용자부서선택조회", "", "200", "200", "SPZSU10103","/root/hidden/userpopupinfo","/root/main/temp");
  4068. var iParam = getParameter("SPZSU10103_");
  4069. setCSVToNode("/root/hidden/oneselect", iParam);
  4070. clearParameter("SPZSU10103_");
  4071. model.setValue("/root/main/ptbs/ptbs_recmerid",model.getValue("/root/hidden/oneselect/list/userid"));
  4072. model.refresh();
  4073. ]]>
  4074. </script>
  4075. </button>
  4076. <output id="output24" ref="/root/main/ptbs/ptbs_recmerid" class="output_fix" visibility="hidden" appearance="output" style="left:188px; top:199px; width:80px; height:19px; "/>
  4077. <caption id="caption64" visibility="hidden" style="left:133px; top:200px; width:50px; height:20px; font-size:8pt; ">직원소개</caption>
  4078. <bool id="bool2" visibility="hidden" checkvalue="Y,N" ref="/root/main/ptbs/ptbs_recmyn" style="left:114px; top:200px; width:20px; height:20px; text-align:left; "/>
  4079. <caption id="caption16" class="cell_1" visibility="hidden" style="left:0px; top:198px; width:112px; height:23px; vertical-align:middle; ">직원소개/추천인</caption>
  4080. <line id="line16" class="line_2" visibility="hidden" style="x1:0px; y1:244px; x2:397px; y2:244px; "/>
  4081. <line id="line46" class="line_2" style="x1:868px; y1:377px; x2:1194px; y2:377px; "/>
  4082. <line id="line37" class="line_2" style="x1:868px; y1:329px; x2:1194px; y2:329px; "/>
  4083. <line id="line40" class="line_2" style="x1:868px; y1:497px; x2:1194px; y2:497px; "/>
  4084. <line id="line50" class="line_2" style="x1:868px; y1:668px; x2:1194px; y2:668px; "/>
  4085. <line id="line60" class="line_2" style="x1:868px; y1:425px; x2:1194px; y2:425px; "/>
  4086. <line id="line39" class="line_2" style="x1:868px; y1:257px; x2:1194px; y2:257px; "/>
  4087. <line id="line49" class="line_2" style="x1:868px; y1:353px; x2:1194px; y2:353px; "/>
  4088. <line id="line23" class="line_2" style="x1:868px; y1:281px; x2:1194px; y2:281px; "/>
  4089. <line id="line56" class="line_2" style="x1:868px; y1:401px; x2:1194px; y2:401px; "/>
  4090. <line id="line45" class="line_2" style="x1:868px; y1:644px; x2:1194px; y2:644px; "/>
  4091. <line id="line44" class="line_2" style="x1:868px; y1:572px; x2:1194px; y2:572px; "/>
  4092. <line id="line43" class="line_2" style="x1:868px; y1:305px; x2:1194px; y2:305px; "/>
  4093. <line id="line21" class="line_2" style="x1:868px; y1:449px; x2:1194px; y2:449px; "/>
  4094. <line id="line42" class="line_2" style="x1:868px; y1:620px; x2:1194px; y2:620px; "/>
  4095. <line id="line53" class="line_2" style="x1:868px; y1:716px; x2:1194px; y2:716px; "/>
  4096. <line id="line41" class="line_2" style="x1:868px; y1:596px; x2:1194px; y2:596px; "/>
  4097. <line id="line52" class="line_2" style="x1:868px; y1:692px; x2:1194px; y2:692px; "/>
  4098. <select1 id="combo16" ref="/root/main/icdr/icdr_atdoctid" class="combo_default" appearance="minimal" itemcount="10" style="left:1094px; top:599px; width:100px; height:19px; ">
  4099. <choices>
  4100. <itemset nodeset="/root/hidden/init/orddrid">
  4101. <label ref="nmsp"/>
  4102. <value ref="cd"/>
  4103. </itemset>
  4104. </choices>
  4105. </select1>
  4106. <select1 id="combo26" ref="/root/main/ptbs/ptbs_sex" appearance="minimal" style="left:314px; top:31px; width:53px; height:19px; ">
  4107. <choices>
  4108. <itemset nodeset="/root/init/P0313list/P0313">
  4109. <label ref="cdnm"/>
  4110. <value ref="cdid"/>
  4111. </itemset>
  4112. </choices>
  4113. </select1>
  4114. <select1 id="combo12" ref="/root/main/icdr/icdr_roomcd2" class="combo_default" disabled="true" appearance="minimal" editmode="inputsearch" itemcount="30" style="left:1066px; top:695px; width:54px; height:19px; ">
  4115. <choices>
  4116. <itemset nodeset="/root/hidden/init/roomcd">
  4117. <label ref="nm"/>
  4118. <value ref="cd"/>
  4119. </itemset>
  4120. </choices>
  4121. <script type="javascript" ev:event="xforms-select">
  4122. <![CDATA[
  4123. // 2008.09.30 - 최병진 주석처리 - 병동정보 없어도 팝업되도록
  4124. /*
  4125. if (isNull(model.getValue("/root/main/icdr/icdr_wardcd1"))){
  4126. model.setValue("/root/main/icdr/icdr_roomcd2", "");
  4127. messageBox("병동2를 먼저","C002");
  4128. return;
  4129. }
  4130. */
  4131. model.resetInstanceNode("/root/main/icdr/icdr_bedcd2");
  4132. var icdr_wardcd = model.getValue("/root/main/icdr/icdr_wardcd2");
  4133. var icdr_roomcd = model.getValue("/root/main/icdr/icdr_roomcd2");
  4134. // var icdr_bedcd = model.getValue("/root/main/icdr/icdr_bedcd2");
  4135. var ptbs_sex = model.getValue("/root/main/ptbs/ptbs_sex");
  4136. var ptbs_rrgstno = model.getValue("/root/main/ptbs/ptbs_rrgstno1").concat(model.getValue("/root/main/ptbs/ptbs_rrgstno2"));
  4137. var inpt_sex = model.getValue("/root/hidden/init/roomcd[cd = '" + icdr_roomcd + "' ]/sex");
  4138. var flag = 2;
  4139. // 병실형태 - 집중치료(S02)일 때는 병상수체크 제외
  4140. var sRoomTypeCd = model.getValue("/root/hidden/init/roomcd[cd = '" + icdr_roomcd + "' ]/ty");
  4141. if (sRoomTypeCd != "S02") {
  4142. //병상수 체크
  4143. if (fRoomBedCntCheck(2) == false) {
  4144. model.setValue("/root/main/icdr/icdr_roomcd2","");
  4145. model.setValue("/root/main/icdr/icdr_bedcd2","");
  4146. model.setValue("/root/main/icdr/icdr_roomgrdecd2","");
  4147. model.setValue("/root/main/icdr/icdr_roomtypecd2","");
  4148. model.refresh();
  4149. return false;
  4150. }
  4151. }
  4152. //병실 성별 체크
  4153. if (fRoomSexCheck(icdr_wardcd, icdr_roomcd, ptbs_sex, inpt_sex, flag, ptbs_rrgstno) == false) {
  4154. model.setValue("/root/main/icdr/icdr_roomcd2","");
  4155. model.setValue("/root/main/icdr/icdr_bedcd2","");
  4156. model.setValue("/root/main/icdr/icdr_roomgrdecd2","");
  4157. model.setValue("/root/main/icdr/icdr_roomtypecd2","");
  4158. model.refresh();
  4159. return false;
  4160. }
  4161. model.setValue("/root/main/icdr/icdr_wardcd2", model.getValue("/root/hidden/init/roomcd[cd = '" + icdr_roomcd + "' ]/wd"));
  4162. model.setValue("/root/main/icdr/icdr_roomgrdecd2", model.getValue("/root/hidden/init/roomcd[cd = '" + icdr_roomcd + "' ]/gr"));
  4163. model.setValue("/root/main/icdr/icdr_roomtypecd2", model.getValue("/root/hidden/init/roomcd[cd = '" + icdr_roomcd + "' ]/ty"));
  4164. combo23.choices.itemset.attribute("nodeset") = "/root/hidden/init/bedcd[rm = '" + icdr_roomcd + "' ]";
  4165. combo23.refresh();
  4166. fComboNodeSet(7); // 형태에 따른 등급 셋팅
  4167. model.refresh();
  4168. ]]>
  4169. </script>
  4170. </select1>
  4171. <select1 id="combo3" ref="/root/main/icdr/icdr_roomcd" class="combo_default" disabled="true" appearance="minimal" editmode="inputsearch" itemcount="30" style="left:1066px; top:647px; width:54px; height:19px; ">
  4172. <choices>
  4173. <itemset nodeset="/root/hidden/init/roomcd">
  4174. <label ref="nm"/>
  4175. <value ref="cd"/>
  4176. </itemset>
  4177. </choices>
  4178. <script type="javascript" ev:event="xforms-value-changed">
  4179. <![CDATA[
  4180. model.resetInstanceNode("/root/main/icdr/icdr_bedcd");
  4181. var icdr_wardcd = model.getValue("/root/main/icdr/icdr_wardcd");
  4182. var icdr_roomcd = model.getValue("/root/main/icdr/icdr_roomcd");
  4183. // var icdr_bedcd = model.getValue("/root/main/icdr/icdr_bedcd");
  4184. var ptbs_sex = model.getValue("/root/main/ptbs/ptbs_sex");
  4185. var ptbs_rrgstno = model.getValue("/root/main/ptbs/ptbs_rrgstno1").concat(model.getValue("/root/main/ptbs/ptbs_rrgstno2"));
  4186. var inpt_sex = model.getValue("/root/hidden/init/roomcd[cd = '" + icdr_roomcd + "' ]/sex");
  4187. var flag = 1;
  4188. // 병실형태 - 집중치료(S02)일 때는 병상수체크 제외, 신생아(S01), 분만(S09) 추가
  4189. var sRoomTypeCd = model.getValue("/root/hidden/init/roomcd[cd = '" + icdr_roomcd + "' ]/ty");
  4190. if (sRoomTypeCd != "S01" && sRoomTypeCd != "S02" && sRoomTypeCd != "S09") {
  4191. //병상수 체크
  4192. if (fRoomBedCntCheck(1) == false) {
  4193. model.setValue("/root/main/icdr/icdr_roomcd","");
  4194. model.setValue("/root/main/icdr/icdr_bedcd","");
  4195. model.setValue("/root/main/icdr/icdr_roomgrdecd","");
  4196. model.setValue("/root/main/icdr/icdr_roomtypecd","");
  4197. model.refresh();
  4198. return false;
  4199. }
  4200. }
  4201. //병실 성별 체크
  4202. if (fRoomSexCheck(icdr_wardcd, icdr_roomcd, ptbs_sex, inpt_sex, flag, ptbs_rrgstno) == false) {
  4203. model.setValue("/root/main/icdr/icdr_roomcd2","");
  4204. model.setValue("/root/main/icdr/icdr_bedcd2","");
  4205. model.setValue("/root/main/icdr/icdr_roomgrdecd2","");
  4206. model.setValue("/root/main/icdr/icdr_roomtypecd2","");
  4207. model.refresh();
  4208. return false;
  4209. }
  4210. // var sroomcd = model.getValue("/root/main/icdr/icdr_roomcd");
  4211. if(icdr_roomcd == "ERBD") {
  4212. model.setValue("/root/main/icdr/icdr_wardcd",model.getValue("/root/hidden/init/roomcd[cd = '" + icdr_roomcd + "' ]/wd"));
  4213. model.setValue("/root/main/icdr/icdr_roomgrdecd",model.getValue("/root/hidden/init/roomcd[cd = '" + icdr_roomcd + "' ]/gr"));
  4214. model.setValue("/root/main/icdr/icdr_roomtypecd",model.getValue("/root/hidden/init/roomcd[cd = '" + icdr_roomcd + "' ]/ty"));
  4215. }
  4216. //2007.07.27 병실선택시 병동이 바뀌도록 요구
  4217. model.setValue("/root/main/icdr/icdr_wardcd",model.getValue("/root/hidden/init/roomcd[cd = '" + icdr_roomcd + "' ]/wd"));
  4218. model.setValue("/root/main/icdr/icdr_roomgrdecd",model.getValue("/root/hidden/init/roomcd[cd = '" + icdr_roomcd + "' ]/gr"));
  4219. model.setValue("/root/main/icdr/icdr_roomtypecd",model.getValue("/root/hidden/init/roomcd[cd = '" + icdr_roomcd + "' ]/ty"));
  4220. combo22.choices.itemset.attribute("nodeset") = "/root/hidden/init/bedcd[rm = '" + icdr_roomcd + "' ]";
  4221. combo22.refresh();
  4222. fComboNodeSet(6); // 형태에 따른 등급 셋팅
  4223. model.refresh();
  4224. ]]>
  4225. </script>
  4226. </select1>
  4227. <group id="group2" style="left:402px; top:10px; width:792px; height:35px; ">
  4228. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:791px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
  4229. <caption id="caption1" class="search_name" style="left:15px; top:9px; width:90px; height:17px; ">조회구분 :</caption>
  4230. <button id="button1" class="btn1_letter2" style="left:720px; top:7px; width:56px; height:22px; ">
  4231. <caption>조회</caption>
  4232. <script type="javascript" ev:event="DOMActivate">
  4233. <![CDATA[
  4234. var sFlag = model.getValue("/root/send/ipatflag");
  4235. if (sFlag == "2") {
  4236. var sCond1 = model.getValue("/root/send/srchcond1");
  4237. var sCond2 = model.getValue("/root/send/srchcond2");
  4238. if (sCond1 == "0" && isNull(sCond2)) {
  4239. messageBox("가퇴원/퇴원 조회 시 세부조회조건을 선택해야 합니다.", "I");
  4240. return;
  4241. }
  4242. }
  4243. // 격리환자정보 초기화
  4244. cap_isolate.visible = false;
  4245. cap_isolate.hint = "";
  4246. fQuery1();
  4247. ]]>
  4248. </script>
  4249. </button>
  4250. <line id="line2" class="line_4" style="x1:705px; y1:7px; x2:705px; y2:29px; border-color:#ffe4bb; border-left-style:solid; "/>
  4251. <select1 id="radio1" ref="/root/send/ipatflag" class="radio_search" appearance="full" cellspacing="5" cols="2" overflow="visible" style="left:108px; top:10px; width:137px; height:16px; border-style:none; ">
  4252. <choices>
  4253. <item>
  4254. <label>재원</label>
  4255. <value>3</value>
  4256. </item>
  4257. <item>
  4258. <label>가퇴원/퇴원</label>
  4259. <value>2</value>
  4260. </item>
  4261. </choices>
  4262. <script type="javascript" ev:event="xforms-value-changed">
  4263. <![CDATA[
  4264. // 2008.09.25 가퇴원/퇴원 조회 시 '퇴원일자'를 기본 조건으로 설정
  4265. var sFlag = model.getValue("/root/send/ipatflag");
  4266. if (sFlag == "3") {
  4267. model.setValue("/root/send/srchcond1", "7");
  4268. fipatrefchlind("0");
  4269. }
  4270. if (sFlag == "2") {
  4271. model.setValue("/root/send/srchcond1", "7");
  4272. fipatrefchlind("7");
  4273. }
  4274. ]]>
  4275. </script>
  4276. </select1>
  4277. <select1 id="combo1" ref="/root/send/srchcond1" class="combo_search" appearance="minimal" style="left:253px; top:8px; width:102px; height:19px; ">
  4278. <choices>
  4279. <item>
  4280. <label>환자번호</label>
  4281. <value>1</value>
  4282. </item>
  4283. <item>
  4284. <label>환자이름</label>
  4285. <value>13</value>
  4286. </item>
  4287. <item>
  4288. <label>진료과</label>
  4289. <value>2</value>
  4290. </item>
  4291. <item>
  4292. <label>전문의</label>
  4293. <value>3</value>
  4294. </item>
  4295. <item>
  4296. <label>주치의</label>
  4297. <value>4</value>
  4298. </item>
  4299. <item>
  4300. <label>병동</label>
  4301. <value>5</value>
  4302. </item>
  4303. <item>
  4304. <label>입원일자</label>
  4305. <value>6</value>
  4306. </item>
  4307. <item>
  4308. <label>퇴원일자</label>
  4309. <value>7</value>
  4310. </item>
  4311. <item>
  4312. <label>보험유형</label>
  4313. <value>8</value>
  4314. </item>
  4315. <item>
  4316. <label>전체</label>
  4317. <value>0</value>
  4318. </item>
  4319. </choices>
  4320. <script type="javascript" ev:event="xforms-select">
  4321. <![CDATA[
  4322. var ipatrefflag = model.getValue("/root/send/srchcond1");
  4323. model.resetInstanceNode("/root/send/srchcond2");
  4324. input11.refresh();
  4325. input36.refresh();
  4326. combo24.refresh();
  4327. fipatrefchlind(ipatrefflag);
  4328. if (ipatrefflag == '0'){
  4329. button1.dispatch("DOMActivate");
  4330. }
  4331. ]]>
  4332. </script>
  4333. </select1>
  4334. <input id="input36" ref="/root/send/srchcond2" class="input_default" visibility="hidden" inputtype="date" format="yyyy-mm-dd" style="left:370px; top:8px; width:102px; height:19px; "/>
  4335. <input id="input11" ref="/root/send/srchcond2" class="input_default" visibility="hidden" style="left:365px; top:8px; width:102px; height:19px; ">
  4336. <script type="javascript" ev:event="onkeypress">
  4337. <![CDATA[
  4338. inputEnterKey("button1", "DOMActivate");
  4339. ]]>
  4340. </script>
  4341. </input>
  4342. <select1 id="combo24" ref="/root/send/srchcond2" class="combo_default" visibility="hidden" appearance="minimal" style="left:375px; top:8px; width:102px; height:19px; ">
  4343. <choices>
  4344. <itemset nodeset="/root/hidden/init/wardcd">
  4345. <label ref="nm"/>
  4346. <value ref="cd"/>
  4347. </itemset>
  4348. </choices>
  4349. <script type="javascript" ev:event="xforms-select">
  4350. <![CDATA[
  4351. button1.dispatch("DOMActivate");
  4352. ]]>
  4353. </script>
  4354. </select1>
  4355. </group>
  4356. <caption id="caption2" class="tit_2" style="left:5px; top:10px; width:100px; height:13px; font-family:돋움; vertical-align:middle; ">인적사항</caption>
  4357. <caption id="cap_privacy" visibility="hidden" style="left:116px; top:3px; width:60px; height:20px; font-size:10pt; font-weight:bold; color:#000000; text-align:center; background-color:#ff0000; border-color:#000000; border-style:solid; ">사생활</caption>
  4358. <caption id="cap_isolate" visibility="hidden" style="left:177px; top:3px; width:44px; height:20px; font-size:10pt; font-weight:bold; color:#000000; text-align:center; background-color:#ff0000; border-color:#000000; border-style:solid; ">격리</caption>
  4359. <caption id="caption40" class="tit_2" style="left:407px; top:55px; width:170px; height:13px; font-family:돋움; vertical-align:middle; ">재원내역</caption>
  4360. <caption id="caption42" class="tit_2" style="left:873px; top:215px; width:102px; height:13px; font-family:돋움; vertical-align:middle; ">재원유형변경</caption>
  4361. <input id="input5" ref="/root/main/iphs/iphs_fromdd" class="input_default" inputtype="date" style="left:991px; top:260px; width:100px; height:19px; ">
  4362. <script type="javascript" ev:event="xforms-value-changed">
  4363. <![CDATA[
  4364. if( input5.value > getCurrentDate() || input5.value > model.getValue("/root/main/h_iphs/iphs/iphs_todd")){
  4365. messageBox("오늘일자나 종료일자보다 클수 ", "I004");
  4366. input5.value = input5.attribute("_value");
  4367. }else if (input5.value < model.getValue("/root/main/h_iphs/iphs/iphs_fromdd")){
  4368. messageBox("이력일자보다 작을수 ", "I004");
  4369. input5.value = input5.attribute("_value");
  4370. }
  4371. ]]>
  4372. </script>
  4373. <script type="javascript" ev:event="onbuttonclick">
  4374. <![CDATA[
  4375. input5.attribute("_value") = input5.value;
  4376. ]]>
  4377. </script>
  4378. </input>
  4379. <input id="input6" ref="/root/main/iphs/iphs_todd" class="input_default" disabled="true" inputtype="date" style="left:1094px; top:260px; width:100px; height:19px; ">
  4380. <script type="javascript" ev:event="ondblclick">
  4381. <![CDATA[
  4382. input6.attribute("_value") = input6.value;
  4383. ]]>
  4384. </script>
  4385. <script type="javascript" ev:event="xforms-value-changed">
  4386. <![CDATA[
  4387. if( input6.value > model.getValue("/root/main/h_iphs/iphs/iphs_todd") || input6.value < model.getValue("/root/main/h_iphs/iphs/iphs_fromdd")){
  4388. messageBox("적용일자보다 작거나 종료일자보다 클수 ", "I004");
  4389. input6.value = input6.attribute("_value");
  4390. }
  4391. ]]>
  4392. </script>
  4393. </input>
  4394. <output id="output1" ref="/root/main/inpt/inpt_indd" class="output_fix" format="yyyy-mm-dd" style="left:991px; top:236px; width:100px; height:19px; "/>
  4395. <output id="output2" ref="/root/main/inpt/inpt_dschdd" class="output_fix" format="yyyy-mm-dd" style="left:1094px; top:236px; width:100px; height:19px; "/>
  4396. <select1 id="combo4" ref="/root/main/inpt/inpt_fsexamflag" class="combo_default" appearance="minimal" style="left:991px; top:284px; width:100px; height:19px; ">
  4397. <choices>
  4398. <itemset nodeset="/root/init/P0021list/P0021">
  4399. <label ref="cdnm"/>
  4400. <value ref="cdid"/>
  4401. </itemset>
  4402. </choices>
  4403. </select1>
  4404. <select1 id="combo5" ref="/root/main/icdr/icdr_wardcd" class="combo_default" disabled="true" appearance="minimal" style="left:992px; top:647px; width:72px; height:19px; ">
  4405. <choices>
  4406. <itemset nodeset="/root/hidden/init/wardcd">
  4407. <label ref="nm"/>
  4408. <value ref="cd"/>
  4409. </itemset>
  4410. </choices>
  4411. <script type="javascript" ev:event="xforms-select">
  4412. <![CDATA[
  4413. model.resetInstanceNode("/root/main/icdr/icdr_roomcd");
  4414. model.resetInstanceNode("/root/main/icdr/icdr_bedcd");
  4415. fComboNodeSet(2);
  4416. ]]>
  4417. </script>
  4418. </select1>
  4419. <!-- 20090602 JHP 수정 : 병실등급 살아있는걸로만...(기존거는 주석처리) nodeset="/root/hidden/init/roomgrdecd" label ref="nm" value ref="cd"-->
  4420. <select1 id="combo7" ref="/root/main/icdr/icdr_roomgrdecd" class="combo_default" appearance="minimal" style="left:1094px; top:671px; width:100px; height:19px; ">
  4421. <choices>
  4422. <itemset nodeset="/root/hidden/roomgrdelist/roomgrde">
  4423. <label ref="cdnm"/>
  4424. <value ref="cdid"/>
  4425. </itemset>
  4426. </choices>
  4427. <script type="javascript" ev:event="xforms-select">
  4428. <![CDATA[
  4429. /*
  4430. var cdid = combo7.value;
  4431. var newcdid = model.getValue("/root/hidden/roomgrdelist/roomgrde[cdid = '" + cdid + "']/newcdid");
  4432. var cdnm = model.getValue("/root/hidden/roomgrdelist/roomgrde[cdid = '" + cdid + "']/cdnm");
  4433. if(newcdid == "" || newcdid == null) {
  4434. messageBox("'" + cdnm + "' \n\n수가코드 종료된 병실등급입니다.!!!!!!!!!!!!! ","I007");
  4435. */
  4436. //20090720 - zzu - cdnm 공통코드기준아닌 수가기준으로 보여주기
  4437. var cdid = combo7.value;
  4438. var yn = model.getValue("/root/hidden/roomgrdelist/roomgrde[cdid = '" + cdid + "']/yn");
  4439. var cdyn = model.getValue("/root/hidden/roomgrdelist/roomgrde[cdid = '" + cdid + "']/cdyn");
  4440. var cdnm = model.getValue("/root/hidden/roomgrdelist/roomgrde[cdid = '" + cdid + "']/cdnm");
  4441. if(yn == "종료됨" || cdyn == "종료됨") {
  4442. messageBox("'" + cdnm + "' \n\n수가코드 종료된 병실등급입니다.!!!!!!!!!!!!! ","I007");
  4443. }
  4444. ]]>
  4445. </script>
  4446. </select1>
  4447. <select1 id="combo8" ref="/root/main/icdr/icdr_roomtypecd" class="combo_default" appearance="minimal" style="left:991px; top:671px; width:100px; height:19px; ">
  4448. <choices>
  4449. <itemset nodeset="/root/hidden/init/roomtypecd">
  4450. <label ref="nm"/>
  4451. <value ref="cd"/>
  4452. </itemset>
  4453. </choices>
  4454. <script type="javascript" ev:event="xforms-select">
  4455. <![CDATA[
  4456. fComboNodeSet(6); // 형태에 따른 등급 셋팅
  4457. ]]>
  4458. </script>
  4459. </select1>
  4460. <!-- 20090602 JHP 수정 : 병실등급 살아있는걸로만...(기존거는 주석처리) nodeset="/root/hidden/init/roomgrdecd" label ref="nm" value ref="cd"-->
  4461. <select1 id="combo9" ref="/root/main/icdr/icdr_roomgrdecd2" class="combo_default" appearance="minimal" style="left:1094px; top:719px; width:100px; height:19px; ">
  4462. <choices>
  4463. <itemset nodeset="/root/hidden/roomgrdelist/roomgrde">
  4464. <label ref="cdnm"/>
  4465. <value ref="cdid"/>
  4466. </itemset>
  4467. </choices>
  4468. <script type="javascript" ev:event="xforms-select">
  4469. <![CDATA[
  4470. /*
  4471. var cdid = combo8.value;
  4472. var newcdid = model.getValue("/root/hidden/roomgrdelist/roomgrde[cdid = '" + cdid + "']/newcdid");
  4473. var cdnm = model.getValue("/root/hidden/roomgrdelist/roomgrde[cdid = '" + cdid + "']/cdnm");
  4474. if(newcdid == "" || newcdid == null) {
  4475. messageBox("'" + cdnm + "' \n\n수가코드 종료된 병실등급입니다.!!!!!!!!!!!!! ","I007");
  4476. */
  4477. //20090720 - zzu - cdnm 공통코드기준아닌 수가기준으로 보여주기
  4478. var cdid = combo9.value;
  4479. var yn = model.getValue("/root/hidden/roomgrdelist/roomgrde[cdid = '" + cdid + "']/yn");
  4480. var cdyn = model.getValue("/root/hidden/roomgrdelist/roomgrde[cdid = '" + cdid + "']/cdyn");
  4481. var cdnm = model.getValue("/root/hidden/roomgrdelist/roomgrde[cdid = '" + cdid + "']/cdnm");
  4482. if(yn == "종료됨" || cdyn == "종료됨") {
  4483. messageBox("'" + cdnm + "' \n\n수가코드 종료된 병실등급입니다.!!!!!!!!!!!!! ","I007");
  4484. }
  4485. ]]>
  4486. </script>
  4487. </select1>
  4488. <select1 id="combo10" ref="/root/main/icdr/icdr_roomtypecd2" class="combo_default" appearance="minimal" style="left:991px; top:719px; width:100px; height:19px; ">
  4489. <choices>
  4490. <itemset nodeset="/root/hidden/init/roomtypecd">
  4491. <label ref="nm"/>
  4492. <value ref="cd"/>
  4493. </itemset>
  4494. </choices>
  4495. <script type="javascript" ev:event="xforms-select">
  4496. <![CDATA[
  4497. fComboNodeSet(7); // 형태에 따른 등급 셋팅
  4498. ]]>
  4499. </script>
  4500. </select1>
  4501. <select1 id="combo11" ref="/root/main/inpt/inpt_inpath" class="combo_default" disabled="true" appearance="minimal" style="left:991px; top:381px; width:100px; height:19px; ">
  4502. <choices>
  4503. <itemset nodeset="/root/init/P0002list/P0002">
  4504. <label ref="cdnm"/>
  4505. <value ref="cdid"/>
  4506. </itemset>
  4507. </choices>
  4508. </select1>
  4509. <select1 id="combo13" ref="/root/main/icdr/icdr_wardcd2" class="combo_default" disabled="true" appearance="minimal" style="left:992px; top:695px; width:72px; height:19px; ">
  4510. <choices>
  4511. <itemset nodeset="/root/hidden/init/wardcd">
  4512. <label ref="nm"/>
  4513. <value ref="cd"/>
  4514. </itemset>
  4515. </choices>
  4516. <script type="javascript" ev:event="xforms-select">
  4517. <![CDATA[
  4518. model.resetInstanceNode("/root/main/icdr/icdr_roomcd2");
  4519. model.resetInstanceNode("/root/main/icdr/icdr_bedcd2");
  4520. fComboNodeSet(3);
  4521. ]]>
  4522. </script>
  4523. </select1>
  4524. <output id="output5" class="output_fix" format="#,###" style="left:115px; top:199px; width:140px; height:19px; text-align:right; "/>
  4525. <output id="output6" class="output_fix" format="#,###" style="left:258px; top:199px; width:139px; height:19px; text-align:right; "/>
  4526. <select1 id="combo15" ref="/root/main/iphs/iphs_insukind" class="combo_default" appearance="minimal" style="left:115px; top:416px; width:282px; height:19px; ">
  4527. <choices>
  4528. <itemset nodeset="/root/hidden/init/insukind">
  4529. <label ref="nm"/>
  4530. <value ref="cd"/>
  4531. </itemset>
  4532. </choices>
  4533. <script type="javascript" ev:event="xforms-select">
  4534. <![CDATA[
  4535. //보험 탭 세팅하기
  4536. fInsukindTabSetting();
  4537. var sptbs_pid = isNull(model.getValue("/root/main/ptbs/ptbs_pid"));
  4538. if (sptbs_pid == false ) {
  4539. //환자의 보험정보 조회(환자별 보험정보 테이블에서)
  4540. fGetPTIN(model.getValue("/root/main/ptbs/ptbs_pid")
  4541. ,model.getValue("/root/main/ptin/ptin_insukind")
  4542. ,""
  4543. ,""
  4544. ,getCurrentDate()
  4545. );
  4546. //fSuppkindSet();
  4547. // 보조유형 초기화
  4548. model.setValue("/root/main/iphs/iphs_suppkind", "");
  4549. }
  4550. // 본인부담상한제 처리
  4551. fOwnBMaxGradeFlagSet();
  4552. model.refresh();
  4553. ]]>
  4554. </script>
  4555. </select1>
  4556. <caption id="caption50" class="tit_2" style="left:5px; top:395px; width:55px; height:13px; ">보험</caption>
  4557. <select1 id="cmb_suppkind" ref="/root/main/iphs/iphs_suppkind" class="combo_default" appearance="minimal" itemcount="10" style="left:115px; top:440px; width:139px; height:19px; ">
  4558. <choices>
  4559. <itemset nodeset="/root/hidden/init/suppkind">
  4560. <label ref="nm"/>
  4561. <value ref="cd"/>
  4562. </itemset>
  4563. </choices>
  4564. <script type="javascript" ev:event="xforms-value-changed">
  4565. <![CDATA[
  4566. var ssuppkindobmgf = model.getValue("/root/main/iphs/iphs_suppkind");
  4567. // var ownbmaxgradeflag = model.getValue("/root/main/iphs/iphs_ownbmaxgradeflag");
  4568. if( model.getValue("/root/main/ptbs/ptbs_pid") != '' && model.getValue("/root/main/ptin/ptin_insukind") == gsSanJae ){
  4569. fGetPTIN( model.getValue("/root/main/ptbs/ptbs_pid")
  4570. ,model.getValue("/root/main/ptin/ptin_insukind")
  4571. ,""
  4572. ,""
  4573. ,getCurrentDate()
  4574. ,ssuppkindobmgf
  4575. );
  4576. }
  4577. fOwnBMaxGradeFlagSet();
  4578. // if (ownbmaxgradeflag == null || ownbmaxgradeflag ==" " || ownbmaxgradeflag == "") {
  4579. // messageBox("본인부담상한액정보가 미존재함으로 기본상한액적용됩니다.","");
  4580. // model.setValue("/root/main/iphs/iphs_ownbmaxgradeflag","1");
  4581. // }
  4582. /*
  4583. if(ssuppkindobmgf == "32" || ssuppkindobmgf == "33" || ssuppkindobmgf == "34" || ssuppkindobmgf == "35" || ssuppkindobmgf == "36" || ssuppkindobmgf == "37" ||ssuppkindobmgf == "38" ||
  4584. ssuppkindobmgf == "39" || ssuppkindobmgf == "40" || ssuppkindobmgf == "41" || ssuppkindobmgf == "42" || ssuppkindobmgf == "43" || ssuppkindobmgf == "44" || ssuppkindobmgf == "45" ||
  4585. ssuppkindobmgf == "46"){
  4586. if(ownbmaxgradeflag != "3"){
  4587. messageBox("차상위 환자는 본인부담상한액 200만원","I009");
  4588. model.setValue("/root/main/iphs/iphs_ownbmaxgradeflag","3");
  4589. }
  4590. }else{
  4591. if (ownbmaxgradeflag == null || ownbmaxgradeflag ==" " || ownbmaxgradeflag == "") {
  4592. messageBox("본인부담상한액정보가 미존재함으로 기본상한액적용됩니다.","");
  4593. model.setValue("/root/main/iphs/iphs_ownbmaxgradeflag","1");
  4594. }else if(ownbmaxgradeflag == "3"){
  4595. messageBox("차상위 환자에 대해 본인부담상한액 200만원 적용됩니다. \n기본상한액적용됩니다.","");
  4596. model.setValue("/root/main/iphs/iphs_ownbmaxgradeflag","1");
  4597. }
  4598. }
  4599. */
  4600. model.refresh();
  4601. ]]>
  4602. </script>
  4603. </select1>
  4604. <select1 id="combo18" ref="/root/main/iphs/iphs_suppkindresn" class="combo_default" appearance="minimal" style="left:257px; top:440px; width:140px; height:19px; ">
  4605. <choices>
  4606. <itemset nodeset="/root/init/P0032list/P0032">
  4607. <label ref="cdnm"/>
  4608. <value ref="cdid"/>
  4609. </itemset>
  4610. </choices>
  4611. </select1>
  4612. <button id="button3" class="btn2_letter2" style="left:310px; top:390px; width:42px; height:19px; ">
  4613. <caption>장애</caption>
  4614. <script type="javascript" ev:event="DOMActivate">
  4615. <![CDATA[
  4616. model.resetInstanceNode("/root/send/data14");
  4617. model.setValue("/root/send/data14/srchcond", 1);
  4618. model.setValue("/root/send/data14/pid", model.getValue("/root/main/ptbs/ptbs_pid"));
  4619. modal("../../../pam/patinfomngtweb/xrw/SMPMC01700", "1","", "", "SMPMC01700", "/root/send/data14", "/root/source");
  4620. ]]>
  4621. </script>
  4622. </button>
  4623. <line id="line7" class="line_1" style="x1:0px; y1:410px; x2:397px; y2:410px; "/>
  4624. <button id="button6" class="btn2_letter2" style="left:355px; top:390px; width:42px; height:19px; ">
  4625. <caption>중증</caption>
  4626. <script type="javascript" ev:event="DOMActivate">
  4627. <![CDATA[
  4628. //2007.12.06 중증 진료화면 사용
  4629. var pid = model.getValue("/root/main/ptbs/ptbs_pid");
  4630. setParameter("SPMRD00900_pid", pid); //등록번호
  4631. setParameter("SPMRD00900_genrflagcd", 'I'); //외래='O', 입원='I'
  4632. modal("SPMRD00900", "1","100", "100", "SPMRD00900", "", "");
  4633. //보험정보 재조회
  4634. combo15.dispatch("xforms-select");
  4635. // model.resetInstanceNode("/root/send/data14");
  4636. // model.setValue("/root/send/data14/srchcond", 1);
  4637. // model.setValue("/root/send/data14/pid", model.getValue("/root/main/ptbs/ptbs_pid"));
  4638. // modal("../../../pam/patinfomngtweb/xrw/SMPMC01200", "1","", "", "SMPMC01200", "/root/send/data14", "/root/source");
  4639. ]]>
  4640. </script>
  4641. </button>
  4642. <line id="line4" class="line_1" style="x1:868px; y1:230px; x2:1194px; y2:230px; "/>
  4643. <select1 id="radio7" ref="/root/main/icdr/icdr_specordyn" appearance="full" cellspacing="8" cols="2" overflow="hidden" style="left:991px; top:625px; width:100px; height:20px; border-style:none; ">
  4644. <choices>
  4645. <item>
  4646. <label>Yes</label>
  4647. <value>Y</value>
  4648. </item>
  4649. <item>
  4650. <label>No</label>
  4651. <value>N</value>
  4652. </item>
  4653. </choices>
  4654. </select1>
  4655. <select1 id="combo19" ref="/root/main/inpt/inpt_clincstdycd" class="combo_default" disabled="true" appearance="minimal" style="left:1094px; top:333px; width:100px; height:19px; ">
  4656. <choices>
  4657. <item>
  4658. <label>Yes</label>
  4659. <value>Y</value>
  4660. </item>
  4661. <item>
  4662. <label>No</label>
  4663. <value>N</value>
  4664. </item>
  4665. </choices>
  4666. </select1>
  4667. <input id="input7" ref="/root/main/inpt/inpt_dschnotidt" class="input_default" disabled="true" format="yyyy-mm-dd hh:nn:ss" style="left:991px; top:452px; width:121px; height:19px; "/>
  4668. <select1 id="combo20" ref="/root/main/inpt/inpt_dschjudgprcsstat" class="combo_default" disabled="true" appearance="minimal" style="left:1094px; top:501px; width:100px; height:19px; ">
  4669. <choices>
  4670. <itemset nodeset="/root/init/P0363list/P0363">
  4671. <label ref="cdnm"/>
  4672. <value ref="cdid"/>
  4673. </itemset>
  4674. </choices>
  4675. </select1>
  4676. <select1 id="combo21" ref="/root/main/inpt/inpt_dschtype" class="combo_default" disabled="true" appearance="minimal" style="left:1094px; top:381px; width:100px; height:19px; ">
  4677. <choices>
  4678. <itemset nodeset="/root/init/M0157list/M0157">
  4679. <label ref="cdnm"/>
  4680. <value ref="cdid"/>
  4681. </itemset>
  4682. </choices>
  4683. </select1>
  4684. <line id="line28" class="line_1" style="x1:0px; y1:636px; x2:397px; y2:636px; "/>
  4685. <caption id="caption60" class="tit_2" style="left:5px; top:621px; width:144px; height:13px; ">감면</caption>
  4686. <button id="button13" class="btn2_letter6" style="left:311px; top:616px; width:86px; height:19px; ">
  4687. <caption>직원가족사항</caption>
  4688. <script type="javascript" ev:event="DOMActivate">
  4689. <![CDATA[
  4690. button29.dispatch("DOMActivate");
  4691. ]]>
  4692. </script>
  4693. </button>
  4694. <caption id="caption62" class="tit_2" style="left:407px; top:402px; width:159px; height:14px; ">진료과병실변경이력</caption>
  4695. <line id="line5" class="line_1" style="x1:402px; y1:230px; x2:863px; y2:230px; "/>
  4696. <line id="line6" class="line_1" style="x1:402px; y1:69px; x2:1194px; y2:69px; "/>
  4697. <datagrid id="datagrid2" nodeset="/root/hidden/original/inpt" caption="O^상태^ER경유^병동^병실^병상^환자번호^환자성명^진료과^주/부^입원일자^시간^퇴원일자^시간^보험유형^보험보조유형^소급일자^진료비계산일자^심사^최종정산일^연구용^주민번호^생년월일^진료형태^최초접수자^최초접수일시^최종수정담당자^최종수정일시^cretno" colsep="^" colwidth="24, 40, 50, 80, 50, 50, 79, 63, 86, 55, 80, 45, 80, 45, 65, 80, 80, 90, 80, 80, 100, 112, 90, 60, 83, 116, 90, 121, 10" dataheight="23" explorerbar="sort" frozencols="7" mergecellsfixedrows="bycolrec" rowheight="23" rowsep="|" style="left:402px; top:74px; width:792px; height:131px; ">
  4698. <col type="inputbutton"/>
  4699. <col disabled="true" ref="inpt_indschacptstat" type="combo">
  4700. <choices>
  4701. <itemset nodeset="/root/init/P0019list/P0019">
  4702. <label ref="cdnm"/>
  4703. <value ref="cdid"/>
  4704. </itemset>
  4705. </choices>
  4706. </col>
  4707. <col disabled="true" ref="inpt_inpath" type="combo">
  4708. <choices>
  4709. <itemset nodeset="/root/init/P0002list/P0002">
  4710. <label ref="cdnm"/>
  4711. <value ref="cdid"/>
  4712. </itemset>
  4713. </choices>
  4714. </col>
  4715. <col disabled="true" ref="inpt_wardcd" type="combo">
  4716. <choices>
  4717. <itemset nodeset="/root/hidden/init/wardcd">
  4718. <label ref="nm"/>
  4719. <value ref="cd"/>
  4720. </itemset>
  4721. </choices>
  4722. </col>
  4723. <col disabled="true" ref="inpt_roomcd" type="combo">
  4724. <choices>
  4725. <itemset nodeset="/root/hidden/init/roomcd">
  4726. <label ref="nm"/>
  4727. <value ref="cd"/>
  4728. </itemset>
  4729. </choices>
  4730. </col>
  4731. <col disabled="true" ref="inpt_bedcd" type="combo">
  4732. <choices>
  4733. <itemset nodeset="/root/hidden/init/bedcd">
  4734. <label ref="nm"/>
  4735. <value ref="cd"/>
  4736. </itemset>
  4737. </choices>
  4738. </col>
  4739. <col ref="inpt_pid"/>
  4740. <col ref="inpt_hngnm"/>
  4741. <col disabled="true" ref="inpt_orddeptnm" type="output"/>
  4742. <col disabled="true" ref="inpt_mskind" type="combo">
  4743. <choices>
  4744. <itemset nodeset="/root/init/P0006list/P0006">
  4745. <label ref="cdnm"/>
  4746. <value ref="cdid"/>
  4747. </itemset>
  4748. </choices>
  4749. </col>
  4750. <col ref="inpt_indd" format="yyyy-mm-dd"/>
  4751. <col ref="inpt_intm" format="hh:nn"/>
  4752. <col ref="inpt_dschdd" format="yyyy-mm-dd"/>
  4753. <col ref="inpt_dschtm" format="hh:nn"/>
  4754. <col disabled="true" ref="inpt_insukind" type="combo">
  4755. <choices>
  4756. <itemset nodeset="/root/hidden/init/insukind">
  4757. <label ref="nm"/>
  4758. <value ref="cd"/>
  4759. </itemset>
  4760. </choices>
  4761. </col>
  4762. <col disabled="true" ref="inpt_suppkind" type="combo">
  4763. <choices>
  4764. <itemset nodeset="/root/hidden/init/suppkind">
  4765. <label ref="nm"/>
  4766. <value ref="cd"/>
  4767. </itemset>
  4768. </choices>
  4769. </col>
  4770. <col ref="inpt_ordcostretcdd" format="yyyy-mm-dd"/>
  4771. <col ref="inpt_ordcostcalcdd" format="yyyy-mm-dd"/>
  4772. <col disabled="true" ref="inpt_dschjudgprcsstat" type="combo">
  4773. <choices>
  4774. <itemset nodeset="/root/init/P0363list/P0363">
  4775. <label ref="cdnm"/>
  4776. <value ref="cdid"/>
  4777. </itemset>
  4778. </choices>
  4779. </col>
  4780. <col ref="inpt_calclastdd" format="yyyy-mm-dd"/>
  4781. <col ref="inpt_clincstdycd"/>
  4782. <col ref="inpt_rrgstno" format="999999-9999999"/>
  4783. <col ref="inpt_brthdd" format="yyyy-mm-dd"/>
  4784. <col ref="inpt_ordtype" style="text-align:center; "/>
  4785. <col ref="inpt_fstrgstrid"/>
  4786. <col ref="inpt_fstrgstdt" format="yyyy-mm-dd hh:nn:ss"/>
  4787. <col ref="inpt_lastupdtrid"/>
  4788. <col ref="inpt_lastupdtdt" format="yyyy-mm-dd hh:nn:ss"/>
  4789. <col ref="inpt_cretno" visibility="hidden"/>
  4790. <script type="javascript" ev:event="ondblclick">
  4791. <![CDATA[
  4792. if(isDataCell()){
  4793. curruntrow = datagrid2.row;
  4794. var fmlydisc = model.getValue("/root/main/iphs/iphs_disccd");
  4795. // 로딩창 열기
  4796. var sWindowMsg = "환자의 정보를 조회중입니다...";
  4797. callLoadingWindow(sWindowMsg);
  4798. // 각종환자정보 조회 ( 현재 선택된 재원내역 Row )
  4799. fQuery(curruntrow);
  4800. var iphsdisc = model.getValue("/root/main/iphs/iphs_disccd");
  4801. if ( fmlydisc != iphsdisc ) {
  4802. messageBox("입원등록시 등록된 감면코드가 직원감면정보에 등록된 감면코드와 다릅니다. 확인하십시오.", "E999");
  4803. }
  4804. //2007.11.28 인사정보의 직원, 직원가족정보 조회
  4805. fPatEmplInfoRef();
  4806. model.refresh();
  4807. // 로딩창 닫기
  4808. removeLoadingWindow();
  4809. }
  4810. ]]>
  4811. </script>
  4812. <script type="javascript" ev:event="onaftersort">
  4813. <![CDATA[
  4814. datagrid2.gridToInstance();
  4815. ]]>
  4816. </script>
  4817. </datagrid>
  4818. <caption id="caption63" class="tit_2" style="left:407px; top:215px; width:95px; height:13px; font-family:돋움; vertical-align:middle; ">
  4819. <![CDATA[재원유형이력]]>
  4820. <script type="javascript" ev:event="ondblclick">
  4821. <![CDATA[
  4822. //button9.visible = true;
  4823. ]]>
  4824. </script>
  4825. </caption>
  4826. <line id="line8" class="line_1" style="x1:402px; y1:417px; x2:863px; y2:417px; "/>
  4827. <datagrid id="datagrid3" nodeset="/root/hidden/original/iphs" caption="S^^적용일자^종료일자^유형^보조^희귀/결핵^장애^DRG상태^DRG번호^할인^보험사코드^SNo^최종수정담당자^최종수정일시^상한차등구분^수가계산구분^심사상태^심사일시^심사자^심사자^강제분리사유^심사후처방변경^심사후처방변경" colsep="^" colwidth="30, 25, 80, 80, 80, 80, 60, 32, 64, 72, 200, 100, 30, 110, 110, 80, 100, 65, 120, 100, 100, 100, 25, 80" dataheight="23" defaultrows="2" mergecellsfixedrows="bycolrec" rowheight="23" rowsep="|" style="left:402px; top:235px; width:461px; height:159px; ">
  4828. <col ref="iphs_histstat" visibility="hidden"/>
  4829. <col ref="checkflag" type="checkbox"/>
  4830. <col ref="iphs_fromdd" format="yyyy-mm-dd" style="text-align:center; "/>
  4831. <col ref="iphs_todd" format="yyyy-mm-dd" style="text-align:center; "/>
  4832. <col disabled="true" ref="iphs_insukind" type="combo" style="text-align:center; ">
  4833. <choices>
  4834. <itemset nodeset="/root/hidden/init/insukind">
  4835. <label ref="nm"/>
  4836. <value ref="cd"/>
  4837. </itemset>
  4838. </choices>
  4839. </col>
  4840. <col disabled="true" ref="iphs_suppkind" type="combo">
  4841. <choices>
  4842. <itemset nodeset="/root/hidden/init/suppkind">
  4843. <label ref="nm"/>
  4844. <value ref="cd"/>
  4845. </itemset>
  4846. </choices>
  4847. </col>
  4848. <col disabled="true" ref="iphs_rareobstflag" type="combo" style="text-align:center; ">
  4849. <choices>
  4850. <item>
  4851. <label>정상</label>
  4852. <value>I</value>
  4853. </item>
  4854. <item>
  4855. <label>결핵</label>
  4856. <value>L</value>
  4857. </item>
  4858. <item>
  4859. <label>희귀</label>
  4860. <value>H</value>
  4861. </item>
  4862. </choices>
  4863. </col>
  4864. <col ref="iphs_handicaprbookpossnyn" style="text-align:center; "/>
  4865. <col disabled="true" ref="iphs_drgyn" type="combo" style="text-align:center; ">
  4866. <choices>
  4867. <itemset nodeset="/root/init/PAM/PK020list/PK020">
  4868. <label ref="cdnm"/>
  4869. <value ref="cdid"/>
  4870. </itemset>
  4871. </choices>
  4872. </col>
  4873. <col ref="iphs_drgno" style="text-align:center; "/>
  4874. <col disabled="true" ref="iphs_disccd" type="combo">
  4875. <choices>
  4876. <itemset nodeset="/root/hidden/init/disccd">
  4877. <label ref="nm"/>
  4878. <value ref="cd"/>
  4879. </itemset>
  4880. </choices>
  4881. </col>
  4882. <col ref="iphs_insucd" style="text-align:center; "/>
  4883. <col ref="iphs_seqno"/>
  4884. <col ref="iphs_lastupdtrnm"/>
  4885. <col ref="iphs_lastupdtdt"/>
  4886. <col disabled="true" ref="iphs_ownbmaxgradeflag" type="combo">
  4887. <choices>
  4888. <item>
  4889. <label>1</label>
  4890. <value>400</value>
  4891. </item>
  4892. <item>
  4893. <label>2</label>
  4894. <value>300</value>
  4895. </item>
  4896. <item>
  4897. <label>3</label>
  4898. <value>200</value>
  4899. </item>
  4900. </choices>
  4901. </col>
  4902. <col disabled="true" ref="iphs_calcscorrecalflag" type="combo">
  4903. <choices>
  4904. <itemset nodeset="/root/init/P0027list/P0027">
  4905. <label ref="cdnm"/>
  4906. <value ref="cdid"/>
  4907. </itemset>
  4908. </choices>
  4909. </col>
  4910. <col disabled="true" ref="iphs_dschjudgprcsstat" type="combo" style="text-align:center; ">
  4911. <choices>
  4912. <itemset nodeset="/root/init/P0363list/P0363">
  4913. <label ref="cdnm"/>
  4914. <value ref="cdid"/>
  4915. </itemset>
  4916. </choices>
  4917. </col>
  4918. <col ref="iphs_judgdt" format="yyyy-mm-dd hh:nn:ss"/>
  4919. <col ref="iphs_lastjudgendid" style="text-align:center; "/>
  4920. <col ref="iphs_lastjudgendnm" style="text-align:center; "/>
  4921. <col disabled="true" ref="iphs_forcesepcd" type="combo" style="text-align:center; ">
  4922. <choices>
  4923. <itemset nodeset="/root/init/PAM/PK084list/PK084">
  4924. <label ref="cdnm"/>
  4925. <value ref="cdid"/>
  4926. </itemset>
  4927. </choices>
  4928. </col>
  4929. <col ref="iphs_judgchgyn" style="text-align:center; "/>
  4930. <col ref="iphs_judgchgdd" format="yyyy-mm-dd" style="text-align:center; "/>
  4931. <script type="javascript" ev:event="onclick">
  4932. <![CDATA[
  4933. if( datagrid3.isCell(event.target) && datagrid3.row >= datagrid3.fixedRows ){
  4934. var curruntrow = datagrid3.row;
  4935. var curruntrow1 = curruntrow + 1;
  4936. if(curruntrow < 1) return false; // 스크롤시 onclick 이벤트가 적용되므로
  4937. else
  4938. {
  4939. model.removeNodeset("/root/main/iphs");
  4940. model.removeNodeset("/root/main/h_iphs");
  4941. model.makeNode("/root/main/iphs");
  4942. model.makeNode("/root/main/h_iphs/iphs");
  4943. copyNodeType("/root/main/iphs","/root/hidden/original/iphs["+curruntrow+"]","after"); // 재원내역의 선택한 row를 적용한다.
  4944. copyNodeType("/root/main/h_iphs/iphs","/root/hidden/original/iphs["+curruntrow+"]","after"); // 재원내역의 선택한 row를 적용한다.
  4945. model.setValue("/root/hidden/flag/iphs_flag","Y"); // 재원유형을 선택했는지 여부를 관리한다.
  4946. // 구현예정 : 선택한 유형의 보험정보나 감면정보를 조회한다. : 완료
  4947. fQuery_ptin();
  4948. model.refresh();
  4949. }
  4950. }
  4951. ]]>
  4952. </script>
  4953. </datagrid>
  4954. <input id="input1" ref="/root/main/ptbs/ptbs_hometel" class="input_default" style="left:115px; top:103px; width:128px; height:19px; ">
  4955. <script type="javascript" ev:event="xforms-next">
  4956. <![CDATA[
  4957. if (fHomeTelVeri() == false) return;
  4958. ]]>
  4959. </script>
  4960. <script type="javascript" ev:event="onkeypress">
  4961. <![CDATA[
  4962. if (event.keyCode == "13")
  4963. {
  4964. setInputNodeCurText();
  4965. if (fHomeTelVeri() == false) return;
  4966. }
  4967. ]]>
  4968. </script>
  4969. </input>
  4970. <button id="button5" class="icon_search" style="left:227px; top:32px; width:16px; height:16px; ">
  4971. <caption/>
  4972. <script type="javascript" ev:event="DOMActivate">
  4973. <![CDATA[
  4974. var ptbs_pid = model.getValue("/root/main/ptbs/ptbs_pid");
  4975. if (ptbs_pid == null || ptbs_pid ==" " || ptbs_pid == "") {
  4976. model.resetInstanceNode("/root/send/data5");
  4977. } else {
  4978. model.resetInstanceNode("/root/send/data5");
  4979. model.setValue("/root/send/data5/pid",model.getValue("/root/main/ptbs/ptbs_pid"));
  4980. model.setValue("/root/send/data5/srchcond","1")
  4981. }
  4982. modal("../../../pam/commonweb/xrw/SPPMC02500", "1","150", "150", "SPPMC02500", "/root/send/data5", "/root/send");
  4983. if ( model.getValue("/root/main/popupendflag") == "ok" ) {
  4984. model.setValue("/root/main/ptbs/ptbs_pid",model.getValue("/root/main/patinfo/patinfolist/pid"));
  4985. model.setValue("/root/send/ipatflag",'3');
  4986. model.setValue("/root/send/srchcond1",'1');
  4987. model.setValue("/root/send/srchcond2",model.getValue("/root/main/ptbs/ptbs_pid"));
  4988. // 로딩창 열기
  4989. var sWindowMsg = "환자의 정보를 조회중입니다...";
  4990. callLoadingWindow(sWindowMsg);
  4991. fQuery1();
  4992. if(datagrid2.rows > 1) // 재원내역에 조회된 결과값이 있으면 해당환자의 정보를 조회한다.
  4993. {
  4994. fQuery("1")
  4995. combo6.dispatch("xforms-select");
  4996. }
  4997. //2007.11.28 인사정보의 직원, 직원가족정보 조회
  4998. fPatEmplInfoRef();
  4999. model.refresh();
  5000. // 로딩창 닫기
  5001. removeLoadingWindow();
  5002. }
  5003. ]]>
  5004. </script>
  5005. </button>
  5006. <input id="input8" ref="/root/main/ptbs/ptbs_zipcd1" class="input_default" style="left:115px; top:127px; width:30px; height:19px; "/>
  5007. <input id="input9" ref="/root/main/ptbs/ptbs_zipcd2" class="input_default" style="left:148px; top:127px; width:30px; height:19px; "/>
  5008. <button id="button15" class="icon_search" style="left:205px; top:128px; width:16px; height:16px; ">
  5009. <caption/>
  5010. <script type="javascript" ev:event="DOMActivate">
  5011. <![CDATA[
  5012. /*
  5013. var rcv_zipcdhead_path = '/root/main/ptbs/ptbs_zipcd1';
  5014. var rcv_zipcdfoot_path = '/root/main/ptbs/ptbs_zipcd2';
  5015. var rcv_seqno_path = '/root/main/ptbs/ptbs_zipcdseq';
  5016. var rcv_address_path = '/root/main/ptbs/ptbs_zipcdaddr';
  5017. var term = model.getValue("recv_zipcdhead_path");
  5018. zbcfOpenZipCodeList("address"
  5019. , term
  5020. , rcv_zipcdhead_path
  5021. , rcv_zipcdfoot_path
  5022. , rcv_seqno_path
  5023. , rcv_address_path
  5024. , ""
  5025. , "/root/main/ptbs/ptbs_detladdr"
  5026. );
  5027. */
  5028. zbcfOpenZipCodeList("combination"
  5029. , ""
  5030. , "/root/main/ptbs/ptbs_zipcd1"
  5031. , "/root/main/ptbs/ptbs_zipcd2"
  5032. , "/root/main/ptbs/ptbs_zipcdseq"
  5033. , "/root/main/ptbs/ptbs_zipcdaddr"
  5034. , ""
  5035. , "/root/main/ptbs/ptbs_detladdr"
  5036. , "/root/main/ptbs/ptbs_builno"
  5037. );
  5038. ]]>
  5039. </script>
  5040. </button>
  5041. <output id="opt_addr" ref="/root/main/ptbs/ptbs_zipcdaddr" class="output_fix" appearance="output" style="left:225px; top:127px; width:172px; height:19px; ">
  5042. <script type="javascript" ev:event="onmouseover">
  5043. <![CDATA[
  5044. opt_addr.hint = opt_addr.label;
  5045. ]]>
  5046. </script>
  5047. </output>
  5048. <input id="input2" ref="/root/main/ptbs/ptbs_hngnm" class="input_s_essential" imemode="hangul" style="left:115px; top:55px; width:109px; height:19px; ">
  5049. <script type="javascript" ev:event="onkeypress">
  5050. <![CDATA[
  5051. if( event.keyCode == 13){
  5052. setInputNodeCurText();
  5053. if (fHngNmVeri("onkeypress") == false) return;
  5054. model.setValue("/root/send/data5/autoflag","Y");
  5055. model.setValue("/root/send/data5/hngnm", input2.currentText);
  5056. inputEnterKey("button7", "DOMActivate");
  5057. }
  5058. ]]>
  5059. </script>
  5060. </input>
  5061. <input id="input12" ref="/root/main/ptbs/ptbs_mpphontel" class="input_default" style="left:246px; top:103px; width:151px; height:19px; ">
  5062. <script type="javascript" ev:event="xforms-next">
  5063. <![CDATA[
  5064. if (fMpphonTelVeri() == false) return;
  5065. ]]>
  5066. </script>
  5067. <script type="javascript" ev:event="onkeypress">
  5068. <![CDATA[
  5069. if (event.keyCode == "13")
  5070. {
  5071. setInputNodeCurText();
  5072. if (fMpphonTelVeri() == false) return;
  5073. }
  5074. ]]>
  5075. </script>
  5076. </input>
  5077. <input id="input14" ref="/root/main/ptbs/ptbs_detladdr" class="input_default" style="left:115px; top:151px; width:282px; height:19px; "/>
  5078. <input id="input15" ref="/root/main/ptbs/ptbs_rrgstno1" class="input_s_essential" style="left:115px; top:79px; width:50px; height:19px; ">
  5079. <script type="javascript" ev:event="xforms-next">
  5080. <![CDATA[
  5081. //if (fRrgstNo1Veri() == false) return;
  5082. ]]>
  5083. </script>
  5084. <script type="javascript" ev:event="onkeypress">
  5085. <![CDATA[
  5086. if (event.keyCode == "13")
  5087. {
  5088. setInputNodeCurText();
  5089. //if (fRrgstNo1Veri() == false) return;
  5090. }
  5091. ]]>
  5092. </script>
  5093. </input>
  5094. <line id="line1" class="line_1" style="x1:0px; y1:25px; x2:397px; y2:25px; "/>
  5095. <input id="input16" ref="/root/main/ptbs/ptbs_brthdd" class="input_default" format="yyyy-mm-dd" style="left:314px; top:79px; width:83px; height:19px; text-align:center; "/>
  5096. <input id="input17" ref="/root/main/ptbs/ptbs_pid" class="input_s_essential" appearance="input" style="left:115px; top:31px; width:109px; height:19px; ">
  5097. <script type="javascript" ev:event="onkeypress">
  5098. <![CDATA[
  5099. if( event.keyCode == 13){
  5100. //if (fPidVeri() == false) return;
  5101. // if( is_prcs == '0' ) // 이미 조회되었을때 인적사항에서의 조회기능을 막고 수정기능으로 변경한다. ( '0' : 조회기능 , '1' : 수정기능 ){
  5102. model.setValue("/root/send/ipatflag",'3');
  5103. model.setValue("/root/send/srchcond1",'1');
  5104. model.setValue("/root/send/srchcond2",input17.currentText);
  5105. input11.attribute("top") = "8xp";
  5106. input11.attribute("left") = "365px";
  5107. input36.visible = false;
  5108. combo24.visible = false;
  5109. input11.visible = true;
  5110. // 격리병실정보 초기화
  5111. cap_isolate.visible = false;
  5112. cap_isolate.hint = "";
  5113. // 로딩창 열기
  5114. var sWindowMsg = "환자의 정보를 조회중입니다...";
  5115. callLoadingWindow(sWindowMsg);
  5116. fQuery1();
  5117. if(datagrid2.rows > 1 && model.getValue("/root/hidden/original/inpt[1]/pid") != null ) // 재원내역에 조회된 결과값이 있으면 해당환자의 정보를 조회한다.
  5118. {
  5119. fQuery("1");
  5120. //20091014 입원원무팀 조진희샘 요청 : 입원 선택메세지창 띄우는 시점은 입원일자 2009/10/08부터 입원한 환자부터 띄워달라.
  5121. var inddspec = model.getValue("/root/init/PAM/P0041list/P0041[cdid = 'J01']/cdnm");
  5122. if(model.getValue("/root/main/inpt/inpt_indd") >= inddspec){
  5123. fCheckSpecOrdApp(); //2009.09.23 zzui - 입원일자에 선택진료 서명이 없는 환자 선택진료창 띄우기
  5124. }
  5125. combo6.dispatch("xforms-select");
  5126. }else{
  5127. //messageBox("재원정보가 ","I004");
  5128. model.setFocus("input17");
  5129. }
  5130. //2007.11.28 인사정보의 직원, 직원가족정보 조회
  5131. fPatEmplInfoRef();
  5132. //2009.11.13 MYKIM 자보 내역 체크(자보 마스터와 비교함)
  5133. if (model.getValue("/root/hidden/original/inpt/inpt_insukind") == "31" ) {
  5134. fCheckJabo("1");
  5135. }
  5136. // }else{
  5137. // messageBox("신환환자이거나 이미 조회한 상태 ", "E008");
  5138. // return;
  5139. // }
  5140. // 신우편번호 수정대상여부 체크 by 조중래 20150729
  5141. if (model.getValue("/root/init/PAM/P0022list/P0022[cdid='94']/cdnm") == "Y"
  5142. && fNewZipCode(model.getValue("/root/main/ptbs/ptbs_zipcd1"), model.getValue("/root/main/ptbs/ptbs_zipcd2"))) {
  5143. button15.dispatch("DOMActivate");
  5144. }
  5145. model.refresh();
  5146. // 로딩창 닫기
  5147. removeLoadingWindow();
  5148. }
  5149. ]]>
  5150. </script>
  5151. </input>
  5152. <textarea id="textarea1" ref="/root/main/ptbs/ptbs_remfact" scroll="vertical" editable="false" style="left:115px; top:223px; width:282px; height:86px; "/>
  5153. <caption id="caption8" class="cell_1" style="left:246px; top:30px; width:65px; height:23px; vertical-align:middle; ">성별/나이</caption>
  5154. <caption id="caption17" class="cell_1" style="left:246px; top:78px; width:65px; height:23px; vertical-align:middle; ">생년월일</caption>
  5155. <caption id="caption5" class="cell_1" style="left:0px; top:223px; width:112px; height:88px; vertical-align:middle; ">참고사항</caption>
  5156. <input id="input22" ref="/root/main/ptbs/ptbs_age" class="input_default" style="left:370px; top:31px; width:27px; height:19px; text-align:right; ">
  5157. <script type="javascript" ev:event="xforms-next">
  5158. <![CDATA[
  5159. if (fAgeVeri() == false) return;
  5160. ]]>
  5161. </script>
  5162. <script type="javascript" ev:event="onkeypress">
  5163. <![CDATA[
  5164. if (event.keyCode == "13")
  5165. {
  5166. setInputNodeCurText();
  5167. if (fAgeVeri() == false) return;
  5168. }
  5169. ]]>
  5170. </script>
  5171. </input>
  5172. <input id="input24" ref="/root/hidden/d_rcv/drnb/hngnm" class="input_default" disabled="true" style="left:505px; top:624px; width:119px; height:19px; "/>
  5173. <select1 id="radio4" ref="/root/hidden/d_rcv/drnb/sickbabyyn" disabled="true" appearance="full" cellspacing="8" cols="2" overflow="visible" style="left:505px; top:698px; width:119px; height:20px; background-color:transparent; border-style:none; ">
  5174. <choices>
  5175. <item>
  5176. <label>Yes</label>
  5177. <value>Y</value>
  5178. </item>
  5179. <item>
  5180. <label>No</label>
  5181. <value>N</value>
  5182. </item>
  5183. </choices>
  5184. </select1>
  5185. <caption id="caption39" class="cell_1" style="left:402px; top:720px; width:100px; height:23px; vertical-align:middle; ">미숙아여부</caption>
  5186. <caption id="caption41" class="tit_2" style="left:407px; top:579px; width:144px; height:13px; ">신생아/산모내역</caption>
  5187. <input id="input25" ref="/root/hidden/d_rcv/drnb/pid" class="input_default" disabled="true" style="left:505px; top:648px; width:119px; height:19px; "/>
  5188. <select1 id="radio6" ref="/root/hidden/d_rcv/drnb/immatureyn" disabled="true" appearance="full" cellspacing="8" cols="2" overflow="visible" style="left:505px; top:723px; width:119px; height:20px; background-color:transparent; border-style:none; ">
  5189. <choices>
  5190. <item>
  5191. <label>Yes</label>
  5192. <value>Y</value>
  5193. </item>
  5194. <item>
  5195. <label>No</label>
  5196. <value>N</value>
  5197. </item>
  5198. </choices>
  5199. </select1>
  5200. <input id="input32" ref="/root/hidden/d_rcv/drnb/indd" class="input_default" disabled="true" format="yyyy-mm-dd" style="left:505px; top:672px; width:119px; height:19px; "/>
  5201. <input id="input33" class="input_default" style="left:246px; top:55px; width:151px; height:19px; "/>
  5202. <input id="input27" ref="/root/hidden/d_rcv/drnb/bthdt" class="input_default" disabled="true" format="yyyy-mm-dd hh:nn:ss" style="left:505px; top:600px; width:119px; height:19px; "/>
  5203. <select1 id="combo2" ref="/root/main/icdr/icdr_medispclid" class="combo_default" appearance="minimal" itemcount="10" style="left:991px; top:599px; width:100px; height:19px; ">
  5204. <choices>
  5205. <itemset nodeset="/root/hidden/init/orddrid">
  5206. <label ref="nmsp"/>
  5207. <value ref="cd"/>
  5208. </itemset>
  5209. </choices>
  5210. <script type="javascript" ev:event="xforms-select">
  5211. <![CDATA[
  5212. fComboNodeSet(5); // 특진여부 셋팅
  5213. ]]>
  5214. </script>
  5215. </select1>
  5216. <output id="input40" ref="/root/main/iphs/iphs_emplnm" class="output_fix" appearance="output" style="left:115px; top:666px; width:75px; height:19px; "/>
  5217. <button id="button29" class="icon_search" style="left:194px; top:667px; width:16px; height:16px; ">
  5218. <caption/>
  5219. <script type="javascript" ev:event="DOMActivate">
  5220. <![CDATA[
  5221. setParameter("SPPMC03800_emplid", '');
  5222. setParameter("SPPMC03800_emplnm", model.getValue("/root/main/ptbs/ptbs_hngnm"));
  5223. setParameter("SPPMC03800_rrgstno1", model.getValue("/root/main/ptbs/ptbs_rrgstno1"));
  5224. setParameter("SPPMC03800_rrgstno2", model.getValue("/root/main/ptbs/ptbs_rrgstno2"));
  5225. setParameter("SPPMC03800_pid", model.getValue("/root/main/ptbs/ptbs_pid"));
  5226. modal("SPPMC03800", "1","150", "150", "SPPMC03800", "", "");
  5227. //선택한 직원정보 세팅
  5228. var emplno = getParameter("SPPMC03800_emplid");
  5229. var emplnm = getParameter("SPPMC03800_emplnm");
  5230. var discuncocd = getParameter("SPPMC03800_discuncocd");
  5231. var famyrelnm = getParameter("SPPMC03800_famyrelnm");
  5232. var preststatnm = getParameter("SPPMC03800_preststatnm");
  5233. var profacptyn = getParameter("SPPMC03800_profacptyn");
  5234. var profacptdd = getParameter("SPPMC03800_profacptdd");
  5235. var remark = getParameter("SPPMC03800_remark");
  5236. clearParameter("SPPMC03800_emplid");
  5237. clearParameter("SPPMC03800_emplnm");
  5238. clearParameter("SPPMC03800_discuncoflag");
  5239. clearParameter("SPPMC03800_discuncocd");
  5240. clearParameter("SPPMC03800_pid");
  5241. clearParameter("SPPMC03800_famyrelnm");
  5242. clearParameter("SPPMC03800_preststatnm");
  5243. clearParameter("SPPMC03800_profacptyn");
  5244. clearParameter("SPPMC03800_profacptdd");
  5245. clearParameter("SPPMC03800_remark");
  5246. if ( emplno == "" || emplno == null) {
  5247. emplno = "-";
  5248. }
  5249. if ( emplnm == "" || emplnm == null) {
  5250. emplnm = "-";
  5251. }
  5252. if ( discuncocd == "" || discuncocd == null) {
  5253. discuncocd = "-";
  5254. }
  5255. if ( famyrelnm == "" || famyrelnm == null) {
  5256. famyrelnm = "-";
  5257. }
  5258. if ( preststatnm == "" || preststatnm == null) {
  5259. preststatnm = "-";
  5260. }
  5261. if ( profacptyn == "" || profacptyn == null) {
  5262. profacptyn = "-";
  5263. }
  5264. if ( profacptdd == "" || profacptdd == null) {
  5265. profacptdd = "-";
  5266. }
  5267. if ( remark == "" || remark == null) {
  5268. remark = "-";
  5269. }
  5270. // if( emplno != '' && emplno != ' ' ){
  5271. model.setValue("/root/main/inpt/inpt_emplno", emplno); // 직원번호
  5272. model.setValue("/root/main/iphs/iphs_emplnm", emplnm); // 직원성명
  5273. model.setValue("/root/main/iphs/iphs_disccd", discuncocd); // 감면계정
  5274. model.setValue("/root/main/iphs/iphs_famyrelnm", famyrelnm); // 관계
  5275. model.setValue("/root/main/iphs/iphs_preststatnm", preststatnm); // 근무상태
  5276. model.setValue("/root/main/iphs/iphs_profacptyn", profacptyn); // 증명서접수여부
  5277. model.setValue("/root/main/iphs/iphs_profacptdd", profacptdd); // 증명서접수일자
  5278. model.setValue("/root/main/iphs/iphs_remark", remark); // 참고사항
  5279. // } else {
  5280. // model.setValue("/root/main/inpt/inpt_emplno", "-"); // 직원번호
  5281. // model.setValue("/root/main/iphs/iphs_emplnm", "-"); // 직원성명
  5282. // model.setValue("/root/main/iphs/iphs_disccd", "-"); // 감면계정
  5283. // model.setValue("/root/main/iphs/iphs_famyrelnm", "-"); // 관계
  5284. // model.setValue("/root/main/iphs/iphs_preststatnm", "-"); // 근무상태
  5285. // model.setValue("/root/main/iphs/iphs_profacptyn", "-"); // 증명서접수여부
  5286. // model.setValue("/root/main/iphs/iphs_profacptdd", "-"); // 증명서접수일자
  5287. // model.setValue("/root/main/iphs/iphs_remark", "-"); // 참고사항
  5288. // }
  5289. model.refresh();
  5290. ]]>
  5291. </script>
  5292. </button>
  5293. <output id="input41" ref="/root/main/inpt/inpt_emplno" class="output_fix" appearance="output" style="left:214px; top:666px; width:183px; height:19px; "/>
  5294. <caption id="caption52" class="cell_1" style="left:0px; top:713px; width:112px; height:29px; vertical-align:middle; ">참고사항</caption>
  5295. <select1 id="combo6" ref="/root/main/iphs/iphs_disccd" class="combo_default" disabled="true" appearance="minimal" editmode="search" itemcount="10" showvalue="true" style="left:193px; top:642px; width:204px; height:19px; ">
  5296. <choices>
  5297. <itemset nodeset="/root/hidden/init/disccd">
  5298. <label ref="nm"/>
  5299. <value ref="cd"/>
  5300. </itemset>
  5301. </choices>
  5302. <script type="javascript" ev:event="xforms-select">
  5303. <![CDATA[
  5304. // 2008.07.13 주석처리
  5305. /*
  5306. var sptbs_pid = isNull(model.getValue("/root/main/ptbs/ptbs_pid"));
  5307. var ptdc_disccd = model.getValue("/root/main/ptdc/ptdc_disccd");
  5308. if (ptdc_disccd != null && ptdc_disccd != " " && ptdc_disccd != "" && ptdc_disccd != "-") {
  5309. model.setValue("/root/hidden/etc/disccd",ptdc_disccd);
  5310. }
  5311. //model.setValue("/root/main/ptin/ptin_suppkind",model.getValue("/root/main/iphs/iphs_suppkind"));
  5312. //model.setValue("/root/main/ptin/ptin_suppkindresn",model.getValue("/root/main/iphs/iphs_suppkindresn"));
  5313. if (sptbs_pid == false ){
  5314. fQuery_ptdc();
  5315. var sptdc_pid = isNull(model.getValue("/root/main/ptdc/ptdc_pid"));
  5316. if (sptdc_pid == false ){
  5317. model.setValue("/root/main/ptdc/ptdc_disccd",model.getValue("/root/send/disccd"));
  5318. }
  5319. }
  5320. model.refresh();
  5321. */
  5322. ]]>
  5323. </script>
  5324. </select1>
  5325. <textarea id="textarea2" ref="/root/main/iphs/iphs_remark" scroll="autovscroll" editable="false" style="left:115px; top:713px; width:282px; height:27px; "/>
  5326. <output id="output3" ref="/root/main/iphs/iphs_preststatnm" class="output_fix" appearance="output" style="left:215px; top:690px; width:182px; height:19px; "/>
  5327. <line id="line3" class="line_2" style="x1:0px; y1:52px; x2:397px; y2:52px; "/>
  5328. <button id="button7" class="icon_search" style="left:227px; top:56px; width:16px; height:16px; ">
  5329. <caption/>
  5330. <script type="javascript" ev:event="DOMActivate">
  5331. <![CDATA[
  5332. var ptbs_hngnm = model.getValue("/root/main/ptbs/ptbs_hngnm");
  5333. if (ptbs_hngnm == null || ptbs_hngnm ==" " || ptbs_hngnm == "") {
  5334. model.resetInstanceNode("/root/send/data5");
  5335. } else {
  5336. model.setValue("/root/send/data5/hngnm",model.getValue("/root/main/ptbs/ptbs_hngnm"));
  5337. model.setValue("/root/send/data5/srchcond","2")
  5338. }
  5339. modal("../../../pam/commonweb/xrw/SPPMC02500", "1","150", "150", "SPPMC02500", "/root/send/data5", "/root/send");
  5340. model.resetInstanceNode("/root/send/data5");
  5341. if ( model.getValue("/root/main/popupendflag") == "ok" ) {
  5342. model.setValue("/root/main/ptbs/ptbs_pid",model.getValue("/root/main/patinfo/patinfolist/pid"));
  5343. model.setValue("/root/send/ipatflag",'3');
  5344. model.setValue("/root/send/srchcond1",'1');
  5345. model.setValue("/root/send/srchcond2",model.getValue("/root/main/ptbs/ptbs_pid"));
  5346. // 로딩창 열기
  5347. var sWindowMsg = "환자의 정보를 조회중입니다...";
  5348. callLoadingWindow(sWindowMsg);
  5349. fQuery1();
  5350. if(datagrid2.rows > 1) // 재원내역에 조회된 결과값이 있으면 해당환자의 정보를 조회한다.
  5351. {
  5352. fQuery("1");
  5353. combo6.dispatch("xforms-select");
  5354. }
  5355. //2007.11.28 인사정보의 직원, 직원가족정보 조회
  5356. fPatEmplInfoRef();
  5357. model.refresh();
  5358. // 로딩창 닫기
  5359. removeLoadingWindow();
  5360. } else {
  5361. var ptbs_pid = model.getValue("/root/main/ptbs/ptbs_pid");
  5362. if (ptbs_pid != null && ptbs_pid != "" ){
  5363. model.setValue("/root/main/ptbs/ptbs_hngnm",model.getValue("/root/hidden/original/ptbs[ptbs_pid = "+ ptbs_pid +"]/ptbs_hngnm"));
  5364. }else{
  5365. model.setValue("/root/main/ptbs/ptbs_hngnm","");
  5366. }
  5367. input2.refresh();
  5368. }
  5369. ]]>
  5370. </script>
  5371. </button>
  5372. <button id="button17" class="icon_search" style="left:227px; top:80px; width:16px; height:16px; ">
  5373. <caption/>
  5374. <script type="javascript" ev:event="DOMActivate">
  5375. <![CDATA[
  5376. var ptbs_rrgstno1 = model.getValue("/root/main/ptbs/ptbs_rrgstno1");
  5377. var ptbs_rrgstno2 = model.getValue("/root/main/ptbs/ptbs_rrgstno2");
  5378. if ((ptbs_rrgstno1 == null || ptbs_rrgstno1 ==" " || ptbs_rrgstno1 == "")&&(ptbs_rrgstno2 == null || ptbs_rrgstno2 ==" " || ptbs_rrgstno2 == "")) {
  5379. model.resetInstanceNode("/root/send/data5");
  5380. } else {
  5381. model.setValue("/root/send/data5/rrgstno1",model.getValue("/root/main/ptbs/ptbs_rrgstno1"));
  5382. model.setValue("/root/send/data5/rrgstno2",model.getValue("/root/main/ptbs/ptbs_rrgstno2"));
  5383. model.setValue("/root/send/data5/srchcond","3")
  5384. }
  5385. modal("../../../pam/commonweb/xrw/SPPMC02500", "1","150", "150", "SPPMC02500", "/root/send/data5", "/root/send");
  5386. model.resetInstanceNode("/root/send/data5");
  5387. if ( model.getValue("/root/main/popupendflag") == "ok" ) {
  5388. model.setValue("/root/main/ptbs/ptbs_pid",model.getValue("/root/main/patinfo/patinfolist/pid"));
  5389. model.setValue("/root/send/ipatflag",'3');
  5390. model.setValue("/root/send/srchcond1",'1');
  5391. model.setValue("/root/send/srchcond2",model.getValue("/root/main/ptbs/ptbs_pid"));
  5392. fQuery1();
  5393. if(datagrid2.rows > 1) // 재원내역에 조회된 결과값이 있으면 해당환자의 정보를 조회한다.
  5394. {
  5395. fQuery("1")
  5396. }
  5397. //2007.11.28 인사정보의 직원, 직원가족정보 조회
  5398. fPatEmplInfoRef();
  5399. } else {
  5400. }
  5401. ]]>
  5402. </script>
  5403. </button>
  5404. <line id="line9" class="line_2" style="x1:0px; y1:76px; x2:397px; y2:76px; "/>
  5405. <line id="line10" class="line_2" style="x1:0px; y1:100px; x2:397px; y2:100px; "/>
  5406. <line id="line11" class="line_2" style="x1:0px; y1:124px; x2:397px; y2:124px; "/>
  5407. <line id="line12" class="line_2" style="x1:0px; y1:148px; x2:397px; y2:148px; "/>
  5408. <line id="line13" class="line_2" style="x1:0px; y1:172px; x2:397px; y2:172px; "/>
  5409. <line id="line14" class="line_2" style="x1:0px; y1:196px; x2:397px; y2:196px; "/>
  5410. <line id="line15" class="line_2" style="x1:0px; y1:221px; x2:397px; y2:221px; "/>
  5411. <line id="line17" class="line_3" style="x1:0px; y1:311px; x2:397px; y2:311px; "/>
  5412. <line id="line19" class="line_2" style="x1:0px; y1:437px; x2:397px; y2:437px; "/>
  5413. <line id="line20" class="line_2" style="x1:0px; y1:461px; x2:397px; y2:461px; "/>
  5414. <line id="line26" class="line_3" style="x1:0px; y1:605px; x2:397px; y2:605px; "/>
  5415. <line id="line27" class="line_2" style="x1:402px; y1:645px; x2:624px; y2:645px; "/>
  5416. <line id="line29" class="line_2" style="x1:402px; y1:669px; x2:624px; y2:669px; "/>
  5417. <line id="line30" class="line_2" style="x1:402px; y1:693px; x2:624px; y2:693px; "/>
  5418. <line id="line31" class="line_2" style="x1:402px; y1:718px; x2:624px; y2:718px; "/>
  5419. <line id="line32" class="line_3" style="x1:402px; y1:742px; x2:624px; y2:742px; "/>
  5420. <line id="line33" class="line_2" style="x1:0px; y1:663px; x2:397px; y2:663px; "/>
  5421. <line id="line34" class="line_2" style="x1:0px; y1:687px; x2:397px; y2:687px; "/>
  5422. <line id="line35" class="line_2" style="x1:0px; y1:711px; x2:397px; y2:711px; "/>
  5423. <line id="line36" class="line_2" style="x1:0px; y1:735px; x2:35px; y2:735px; "/>
  5424. <line id="line38" class="line_3" style="x1:0px; y1:742px; x2:397px; y2:742px; "/>
  5425. <line id="line51" class="line_2" style="x1:890px; y1:694px; x2:1194px; y2:694px; "/>
  5426. <line id="line61" class="line_3" style="x1:868px; y1:742px; x2:1194px; y2:742px; "/>
  5427. <caption id="caption10" class="cell_1" style="left:0px; top:126px; width:112px; height:23px; vertical-align:middle; ">우편번호</caption>
  5428. <caption id="caption11" class="cell_1" style="left:0px; top:54px; width:112px; height:23px; vertical-align:middle; ">성명[한/영]</caption>
  5429. <caption id="caption4" class="cell_1" style="left:0px; top:198px; width:112px; height:23px; vertical-align:middle; ">외래미수/퇴원미수</caption>
  5430. <caption id="caption13" class="cell_1" style="left:0px; top:150px; width:112px; height:23px; vertical-align:middle; ">하위주소</caption>
  5431. <caption id="caption14" class="cell_1" style="left:0px; top:78px; width:112px; height:23px; vertical-align:middle; ">주민번호</caption>
  5432. <caption id="caption15" class="cell_1" style="left:0px; top:174px; width:112px; height:23px; vertical-align:middle; ">외국인여부 / VIP</caption>
  5433. <caption id="caption7" class="cell_1" style="left:0px; top:30px; width:112px; height:23px; vertical-align:middle; ">환자번호</caption>
  5434. <caption id="caption9" class="cell_1" style="left:0px; top:102px; width:112px; height:23px; vertical-align:middle; ">연락처/휴대폰</caption>
  5435. <caption id="caption51" class="cell_1" style="left:0px; top:439px; width:112px; height:23px; vertical-align:middle; ">유형보조/보조사유</caption>
  5436. <caption id="caption49" class="cell_1" style="left:0px; top:415px; width:112px; height:23px; vertical-align:middle; ">보험유형</caption>
  5437. <caption id="caption45" class="cell_1" style="left:0px; top:641px; width:112px; height:23px; vertical-align:middle; ">직원감면</caption>
  5438. <caption id="caption57" class="cell_1" style="left:0px; top:689px; width:112px; height:23px; vertical-align:middle; ">직원관계/재직여부</caption>
  5439. <caption id="caption59" class="cell_1" style="left:0px; top:665px; width:112px; height:23px; vertical-align:middle; ">직원성명</caption>
  5440. <caption id="caption20" class="cell_1" style="left:402px; top:623px; width:100px; height:23px; vertical-align:middle; ">산모성명</caption>
  5441. <caption id="caption3" class="cell_1" style="left:402px; top:671px; width:100px; height:23px; vertical-align:middle; ">산모입원일자</caption>
  5442. <caption id="caption19" class="cell_1" style="left:402px; top:695px; width:100px; height:23px; vertical-align:middle; ">환아여부</caption>
  5443. <caption id="caption30" class="cell_1" style="left:868px; top:670px; width:120px; height:23px; vertical-align:middle; ">형태1/등급1</caption>
  5444. <caption id="caption31" class="cell_1" style="left:868px; top:694px; width:120px; height:23px; vertical-align:middle; ">병동2/병실2/병상2</caption>
  5445. <caption id="caption21" class="cell_1" style="left:868px; top:574px; width:120px; height:23px; vertical-align:middle; ">진료과</caption>
  5446. <caption id="caption32" class="cell_1" style="left:868px; top:718px; width:120px; height:23px; vertical-align:middle; ">형태2/등급2</caption>
  5447. <caption id="caption22" class="cell_1" style="left:868px; top:598px; width:120px; height:23px; vertical-align:middle; ">전문의/담당의</caption>
  5448. <caption id="caption33" class="cell_1" style="left:868px; top:379px; width:120px; height:23px; font-size:9pt; vertical-align:middle; ">입원경로/퇴원형태</caption>
  5449. <caption id="caption12" class="cell_1" style="left:868px; top:235px; width:120px; height:23px; vertical-align:middle; ">입원/퇴원일자</caption>
  5450. <caption id="caption23" class="cell_1" style="left:868px; top:283px; width:120px; height:23px; vertical-align:middle; ">초재진/본인부담</caption>
  5451. <caption id="caption24" class="cell_1" style="left:868px; top:622px; width:120px; height:23px; vertical-align:middle; ">선택진료/신청승인</caption>
  5452. <caption id="caption25" class="cell_1" style="left:868px; top:355px; width:120px; height:23px; vertical-align:middle; ">DRG상태/번호</caption>
  5453. <caption id="caption36" class="cell_1" style="left:868px; top:403px; width:120px; height:23px; vertical-align:middle; ">희귀결핵/구분</caption>
  5454. <caption id="caption38" class="cell_1" style="left:868px; top:427px; width:121px; height:23px; vertical-align:middle; ">장애인/입원유형</caption>
  5455. <caption id="caption18" class="cell_1" style="left:868px; top:259px; width:120px; height:23px; vertical-align:middle; ">적용/종료일자</caption>
  5456. <caption id="caption29" class="cell_1" style="left:868px; top:646px; width:120px; height:23px; vertical-align:middle; ">병동1/병실1/병상1</caption>
  5457. <button id="button8" class="btn2_letter6" visibility="hidden" style="left:790px; top:49px; width:86px; height:19px; ">
  5458. <caption>전과전실조회</caption>
  5459. <script type="javascript" ev:event="DOMActivate">
  5460. <![CDATA[
  5461. model.resetInstanceNode("/root/hidden/source");
  5462. model.setValue("/root/hidden/source/pid",model.getValue("/root/main/inpt/inpt_pid"));
  5463. model.setValue("/root/hidden/source/indd",model.getValue("/root/main/inpt/inpt_indd"));
  5464. model.setValue("/root/hidden/source/cretno",model.getValue("/root/main/inpt/inpt_cretno"));
  5465. model.setValue("/root/hidden/source/mskind",model.getValue("/root/main/inpt/inpt_mskind"));
  5466. if (model.getValue("/root/hidden/source/pid") != null && model.getValue("/root/hidden/source/pid") != ""){
  5467. modal("../../../pam/ipatmngtweb/xrw/SPPMI01900", "1","50", "50", "SPPMI01900", "/root/hidden/source", "/root/hidden/target");
  5468. }
  5469. ]]>
  5470. </script>
  5471. </button>
  5472. <line id="line62" class="line_2" style="x1:402px; y1:621px; x2:624px; y2:622px; "/>
  5473. <caption id="caption34" class="cell_1" style="left:402px; top:599px; width:100px; height:23px; vertical-align:middle; ">출산일자</caption>
  5474. <caption id="caption35" class="cell_1" style="left:402px; top:647px; width:100px; height:23px; vertical-align:middle; ">등록번호</caption>
  5475. <line id="line63" class="line_1" style="x1:632px; y1:594px; x2:862px; y2:594px; "/>
  5476. <caption id="caption37" class="tit_2" style="left:635px; top:579px; width:144px; height:13px; ">입금내역</caption>
  5477. <datagrid id="datagrid4" nodeset="/root/hidden/original/icdr" caption="S^접수구분^신청구분^적용일자^종료일자^병동1^병실1^병상1^등급1^형태1^병동2^병실2^병상2^등급2^형태2^진료과^전문의^담당의^선택여부^Oxy여부^Suction여부^비고1^비고2^SNo^최종수정담당자^최종수정일시" colsep="^" colwidth="30, 60, 60, 80, 80, 70, 60, 50, 100, 70, 70, 60, 63, 100, 70, 130, 100, 100, 62, 60, 75, 140, 100, 30, 110, 110" dataheight="23" defaultrows="2" mergecellsfixedrows="bycolrec" rowheight="23" rowsep="|" style="left:402px; top:422px; width:461px; height:146px; ">
  5478. <col ref="icdr_histstat" visibility="hidden"/>
  5479. <col disabled="true" ref="icdr_acptflagcd" type="combo">
  5480. <choices>
  5481. <item>
  5482. <label>신청</label>
  5483. <value>1</value>
  5484. </item>
  5485. <item>
  5486. <label>승인</label>
  5487. <value>2</value>
  5488. </item>
  5489. <item>
  5490. <label>확인</label>
  5491. <value>3</value>
  5492. </item>
  5493. </choices>
  5494. </col>
  5495. <col disabled="true" ref="icdr_appflagcd" type="combo">
  5496. <choices>
  5497. <item>
  5498. <label>전실</label>
  5499. <value>1</value>
  5500. </item>
  5501. <item>
  5502. <label>전과</label>
  5503. <value>2</value>
  5504. </item>
  5505. <item>
  5506. <label>전과+전실</label>
  5507. <value>3</value>
  5508. </item>
  5509. <item>
  5510. <label>재원변경</label>
  5511. <value>4</value>
  5512. </item>
  5513. </choices>
  5514. </col>
  5515. <col ref="icdr_fromdd" format="yyyy-mm-dd"/>
  5516. <col ref="icdr_todd" format="yyyy-mm-dd"/>
  5517. <col disabled="true" ref="icdr_wardcd" type="combo">
  5518. <choices>
  5519. <itemset nodeset="/root/hidden/init/wardcd">
  5520. <label ref="nm"/>
  5521. <value ref="cd"/>
  5522. </itemset>
  5523. </choices>
  5524. </col>
  5525. <col ref="icdr_roomcd"/>
  5526. <col ref="icdr_bedcd"/>
  5527. <col disabled="true" ref="icdr_roomgrdecd" type="combo">
  5528. <choices>
  5529. <itemset nodeset="/root/hidden/init/roomgrdecd">
  5530. <label ref="nm"/>
  5531. <value ref="cd"/>
  5532. </itemset>
  5533. </choices>
  5534. </col>
  5535. <col disabled="true" ref="icdr_roomtypecd" type="combo">
  5536. <choices>
  5537. <itemset nodeset="/root/hidden/init/roomtypecd">
  5538. <label ref="nm"/>
  5539. <value ref="cd"/>
  5540. </itemset>
  5541. </choices>
  5542. </col>
  5543. <col disabled="true" ref="icdr_wardcd2" type="combo">
  5544. <choices>
  5545. <itemset nodeset="/root/hidden/init/wardcd">
  5546. <label ref="nm"/>
  5547. <value ref="cd"/>
  5548. </itemset>
  5549. </choices>
  5550. </col>
  5551. <col ref="icdr_roomcd2"/>
  5552. <col ref="icdr_bedcd2"/>
  5553. <col disabled="true" ref="icdr_roomgrdecd2" type="combo">
  5554. <choices>
  5555. <itemset nodeset="/root/hidden/init/roomgrdecd">
  5556. <label ref="nm"/>
  5557. <value ref="cd"/>
  5558. </itemset>
  5559. </choices>
  5560. </col>
  5561. <col disabled="true" ref="icdr_roomtypecd2" type="combo">
  5562. <choices>
  5563. <itemset nodeset="/root/hidden/init/roomtypecd">
  5564. <label ref="nm"/>
  5565. <value ref="cd"/>
  5566. </itemset>
  5567. </choices>
  5568. </col>
  5569. <col disabled="true" ref="icdr_orddeptnm" type="output"/>
  5570. <col disabled="true" ref="icdr_medispclnm" type="output"/>
  5571. <col disabled="true" ref="icdr_atdoctnm" type="output"/>
  5572. <col ref="icdr_specordyn"/>
  5573. <col ref="icdr_oxyyn" style="text-align:center; "/>
  5574. <col ref="icdr_suctyn" style="text-align:center; "/>
  5575. <col disabled="true" ref="icdr_prestremcd" type="combo">
  5576. <choices>
  5577. <itemset nodeset="/root/init/P0360list/P0360">
  5578. <label ref="cdnm"/>
  5579. <value ref="cdid"/>
  5580. </itemset>
  5581. </choices>
  5582. </col>
  5583. <col ref="icdr_chngprestrem"/>
  5584. <col ref="icdr_seqno"/>
  5585. <col ref="icdr_lastupdtrnm"/>
  5586. <col ref="icdr_lastupdtdt"/>
  5587. <script type="javascript" ev:event="onclick">
  5588. <![CDATA[
  5589. //2008.01.27 전과전실 이력 클릭시 전과전실변경내용에 영향을 주지 않게 요청.
  5590. if( datagrid4.isCell(event.target) && datagrid4.row >= datagrid4.fixedRows ){
  5591. var curruntrow = datagrid4.row;
  5592. if(isDataCell()) {
  5593. // 2008.10.19 - 전과, 전실 신청내역은 전과전실승인화면에서 처리하도록 임시 막음
  5594. var sAppFlag = model.getValue("/root/hidden/original/icdr["+curruntrow+"]/icdr_appflagcd");
  5595. if (!isNull(sAppFlag)) {
  5596. messageBox("전과, 전실 신청내역은 [전과전실승인]화면에서 처리하십시오!", "I");
  5597. return;
  5598. }
  5599. model.removeNodeset("/root/main/icdr");
  5600. model.removeNodeset("/root/main/h_icdr/icdr");
  5601. model.makeNode("/root/main/icdr");
  5602. model.makeNode("/root/main/h_icdr/icdr");
  5603. copyNodeType("/root/main/icdr","/root/hidden/original/icdr["+curruntrow+"]","after"); // 재원이력의 선택한 row를 적용한다.
  5604. copyNodeType("/root/main/h_icdr/icdr","/root/hidden/original/icdr["+curruntrow+"]","after"); // 재원이력의 선택한 row를 적용한다.
  5605. // 2008.10.12 임시주석처리
  5606. // 전과전실이력의 선택한내용이 신청내용일경우 "신청승인여부"를 체크한다.
  5607. /*
  5608. if (model.getValue("/root/main/icdr/icdr_acptflagcd") == '1') {
  5609. bool4.visible = true;
  5610. caption44.visible = true;
  5611. model.setValue("/root/hidden/flag/icdr_app_flag",'Y');
  5612. } else if (model.getValue("/root/main/icdr/icdr_acptflagcd") != '1') {
  5613. bool4.visible = false;
  5614. caption44.visible = false;
  5615. model.setValue("/root/hidden/flag/icdr_app_flag",'N');
  5616. }
  5617. model.setValue("/root/hidden/flag/icdr_flag","Y"); // 재원이력을 선택했는지 여부를 관리한다.
  5618. */
  5619. fComboNodeSet(1); // 전문의 설정
  5620. fComboNodeSet(6); // 형태에 따른 등급 셋팅
  5621. fComboNodeSet(7); // 형태에 따른 등급 셋팅
  5622. model.refresh();
  5623. }
  5624. //fInitSetting();
  5625. }
  5626. ]]>
  5627. </script>
  5628. </datagrid>
  5629. <caption id="caption61" class="cell_1" style="left:868px; top:550px; width:120px; height:23px; vertical-align:middle; ">적용/종료일자</caption>
  5630. <button id="button19" class="icon_search" style="left:1178px; top:649px; width:16px; height:16px; ">
  5631. <caption/>
  5632. <script type="javascript" ev:event="DOMActivate">
  5633. <![CDATA[
  5634. //구현예정: datagrid2의 선택되어진 row 가 없으면 메세지 처리
  5635. // model.alert("확인! 변경할 재원내역과 재원이력을 정확히 선택하십시요!");
  5636. //구현예정: datagrid2의 선택되어진 row 가 부유형이면 병실 변경 팝업 을 오픈 하지 않는다. 확인요함!
  5637. // model.alert("확인! 주유형입원내역만 병실정보를 변경할 수 있습니다!");
  5638. //구현예정: 병실정보팝업 처리 ( 잔여병상에 따른 색상처리 및 메세지 처리 ) : 완료
  5639. model.removenode("/root/hidden/target");
  5640. model.makeNode("/root/hidden/target");
  5641. // 2008.09.30 - 최병진 주석처리 - 병동정보 없어도 팝업되도록
  5642. //if (model.getValue("/root/main/icdr/icdr_wardcd") != null && model.getValue("/root/main/icdr/icdr_wardcd") != ""){
  5643. setParameter("SMPMI00100_Param1", model.getValue("/root/main/icdr/icdr_orddeptcd"));
  5644. modal("SPPMI02001", "1","50", "50", "SPPMI02001", "", "");
  5645. // modal("../../../pam/ipatmngtweb/xrw/SPPMI02000", "1","50", "50", "SPPMI02000", "/root/main/icdr/icdr_wardcd", "/root/hidden/target/wardcd");
  5646. var swardcd = instance1.selectSingleNode("/root/hidden/target/grdbedspec/wardcd");
  5647. if (swardcd != null) {
  5648. var inpt_wardcd = model.getValue("/root/hidden/target/grdbedspec/wardcd");
  5649. var inpt_roomcd = model.getValue("/root/hidden/target/grdbedspec/roomcd");
  5650. var ptbs_sex = model.getValue("/root/main/ptbs/ptbs_sex");
  5651. var ptbs_rrgstno = model.getValue("/root/main/ptbs/ptbs_rrgstno1").concat(model.getValue("/root/main/ptbs/ptbs_rrgstno2"));
  5652. var inpt_sex = model.getValue("/root/hidden/target/grdbedspec/sex");
  5653. var flag = 1;
  5654. if( model.getValue("/root/hidden/target/grdbedspec/roomtypecd") != 'S02' ){
  5655. if (fRoomSexCheck(inpt_wardcd, inpt_roomcd, ptbs_sex, inpt_sex, flag, ptbs_rrgstno) == false) {
  5656. return false;
  5657. }
  5658. }
  5659. model.setValue("/root/main/icdr/icdr_wardcd",model.getValue("/root/hidden/target/grdbedspec/wardcd"));
  5660. model.setValue("/root/main/icdr/icdr_roomcd",model.getValue("/root/hidden/target/grdbedspec/roomcd"));
  5661. model.setValue("/root/main/icdr/icdr_bedcd",model.getValue("/root/hidden/target/grdbedspec/bedcd"));
  5662. model.setValue("/root/main/icdr/icdr_roomgrdecd",model.getValue("/root/hidden/target/grdbedspec/roomgrdecd"));
  5663. model.setValue("/root/main/icdr/icdr_roomtypecd",model.getValue("/root/hidden/target/grdbedspec/roomtypecd"));
  5664. fComboNodeSet(2);
  5665. model.setValue("/root/main/icdr/icdr_fromdd", getCurrentDate());
  5666. model.refresh();
  5667. }
  5668. //}
  5669. ]]>
  5670. </script>
  5671. </button>
  5672. <button id="button20" class="icon_search" style="left:1178px; top:699px; width:16px; height:16px; ">
  5673. <caption/>
  5674. <script type="javascript" ev:event="DOMActivate">
  5675. <![CDATA[
  5676. model.removenode("/root/hidden/target");
  5677. model.makeNode("/root/hidden/target");
  5678. // 2008.09.30 - 최병진 주석처리 - 병동정보 없어도 팝업되도록
  5679. //if (model.getValue("/root/main/icdr/icdr_wardcd2") != null && model.getValue("/root/main/icdr/icdr_wardcd2") != ""){
  5680. var sWardCd2 = model.getValue("/root/main/icdr/icdr_wardcd2");
  5681. if (sWardCd2 == "-") {
  5682. model.setValue("/root/main/icdr/icdr_wardcd2", "");
  5683. }
  5684. setParameter("SMPMI00100_Param1", model.getValue("/root/main/icdr/icdr_orddeptcd"));
  5685. modal("SPPMI02001", "1","50", "50", "SPPMI02001", "", "");
  5686. // modal("../../../pam/ipatmngtweb/xrw/SPPMI02000", "1","50", "50", "SPPMI02000", "/root/main/icdr/icdr_wardcd2", "/root/hidden/target/wardcd");
  5687. var swardcd = instance1.selectSingleNode("/root/hidden/target/grdbedspec/wardcd");
  5688. if (swardcd != null) {
  5689. var inpt_wardcd = model.getValue("/root/hidden/target/grdbedspec/wardcd");
  5690. var inpt_roomcd = model.getValue("/root/hidden/target/grdbedspec/roomcd");
  5691. var ptbs_sex = model.getValue("/root/main/ptbs/ptbs_sex");
  5692. var ptbs_rrgstno = model.getValue("/root/main/ptbs/ptbs_rrgstno1").concat(model.getValue("/root/main/ptbs/ptbs_rrgstno2"));
  5693. var inpt_sex = model.getValue("/root/hidden/target/grdbedspec/sex");
  5694. var flag = 2;
  5695. if( model.getValue("/root/hidden/target/grdbedspec/roomtypecd") != 'S02' ){
  5696. if (fRoomSexCheck(inpt_wardcd, inpt_roomcd, ptbs_sex, inpt_sex, flag, ptbs_rrgstno) == false) {
  5697. return false;
  5698. }
  5699. }
  5700. model.setValue("/root/main/icdr/icdr_wardcd2",model.getValue("/root/hidden/target/grdbedspec/wardcd"));
  5701. model.setValue("/root/main/icdr/icdr_roomcd2",model.getValue("/root/hidden/target/grdbedspec/roomcd"));
  5702. model.setValue("/root/main/icdr/icdr_bedcd2",model.getValue("/root/hidden/target/grdbedspec/bedcd"));
  5703. model.setValue("/root/main/icdr/icdr_roomgrdecd2",model.getValue("/root/hidden/target/grdbedspec/roomgrdecd"));
  5704. model.setValue("/root/main/icdr/icdr_roomtypecd2",model.getValue("/root/hidden/target/grdbedspec/roomtypecd"));
  5705. fComboNodeSet(3);
  5706. model.setValue("/root/main/icdr/icdr_fromdd", getCurrentDate());
  5707. model.refresh();
  5708. }
  5709. //} else {
  5710. // messageBox("병동2를 먼저","C002");
  5711. //}
  5712. ]]>
  5713. </script>
  5714. </button>
  5715. <line id="line48" class="line_1" style="x1:868px; y1:545px; x2:1194px; y2:545px; "/>
  5716. <input id="input23" ref="/root/main/icdr/icdr_fromdd" class="input_default" inputtype="date" style="left:991px; top:551px; width:100px; height:19px; ">
  5717. <script type="javascript" ev:event="xforms-value-changed">
  5718. <![CDATA[
  5719. if(model.getValue("/root/main/icdr/icdr_fromdd") > getCurrentDate() || input23.value >model.getValue("/root/main/icdr/icdr_todd")){
  5720. messageBox("오늘일자나 종료일자보다 클수 ", "I004");
  5721. input23.value = input23.attribute("_value");
  5722. }else if (input23.value < input23.attribute("_value")){
  5723. messageBox("이력일자보다 작을수 ", "I004");
  5724. input23.value = input23.attribute("_value");
  5725. }
  5726. ]]>
  5727. </script>
  5728. <script type="javascript" ev:event="onbuttonclick">
  5729. <![CDATA[
  5730. input23.attribute("_value") = input23.value;
  5731. ]]>
  5732. </script>
  5733. </input>
  5734. <input id="input35" ref="/root/main/icdr/icdr_todd" class="input_default" disabled="true" inputtype="date" style="left:1094px; top:551px; width:100px; height:19px; "/>
  5735. <caption id="caption27" class="tit_2" style="left:873px; top:530px; width:170px; height:13px; font-family:돋움; vertical-align:middle; ">진료과병실변경</caption>
  5736. <bool id="bool1" checkvalue="Y,N" ref="/root/main/ptbs/ptbs_vipyn" style="left:209px; top:175px; width:20px; height:20px; text-align:left; "/>
  5737. <caption id="caption28" style="left:228px; top:175px; width:30px; height:20px; font-size:8pt; ">VIP</caption>
  5738. <bool id="bool3" checkvalue="Y,N" ref="/root/main/ptbs/ptbs_forgeryn" style="left:114px; top:175px; width:20px; height:20px; text-align:left; "/>
  5739. <bool id="bool4" disabled="true" checkvalue="Y,N" ref="/root/hidden/flag/icdr_app_flag" style="left:1097px; top:623px; width:20px; height:20px; text-align:left; "/>
  5740. <caption id="caption44" style="left:1118px; top:624px; width:75px; height:20px; ">신청승인여부</caption>
  5741. <caption id="caption65" style="left:133px; top:175px; width:38px; height:20px; font-size:8pt; ">외국인</caption>
  5742. <input id="input38" ref="/root/main/ptbs/ptbs_rrgstno2" class="input_s_essential" style="left:168px; top:79px; width:56px; height:19px; ">
  5743. <script type="javascript" ev:event="xforms-next">
  5744. <![CDATA[
  5745. //if (fRrgstNo2Veri() == false) return;
  5746. ]]>
  5747. </script>
  5748. <script type="javascript" ev:event="onkeypress">
  5749. <![CDATA[
  5750. if (event.keyCode == "13")
  5751. {
  5752. setInputNodeCurText();
  5753. //if (fRrgstNo2Veri() == false) return;
  5754. model.setValue("/root/send/data5/autoflag", "Y");
  5755. inputEnterKey("button17", "DOMActivate");
  5756. }
  5757. ]]>
  5758. </script>
  5759. <script type="javascript" ev:event="xforms-value-changed">
  5760. <![CDATA[
  5761. ]]>
  5762. </script>
  5763. </input>
  5764. <input id="input13" ref="/root/main/ptbs/ptbs_zipcdseq" class="input_default" style="left:181px; top:127px; width:20px; height:19px; "/>
  5765. <switch id="switch2" style="left:0px; top:463px; width:397px; height:147px; ">
  5766. <case id="case_base" selected="true">
  5767. <line id="line138" class="line_2" style="x1:0px; y1:46px; x2:394px; y2:46px; "/>
  5768. <line id="line137" class="line_2" style="x1:0px; y1:22px; x2:394px; y2:22px; "/>
  5769. <line id="line141" class="line_2" style="x1:0px; y1:118px; x2:394px; y2:118px; "/>
  5770. <line id="line140" class="line_2" style="x1:0px; y1:94px; x2:394px; y2:94px; "/>
  5771. <line id="line139" class="line_2" style="x1:0px; y1:70px; x2:394px; y2:70px; "/>
  5772. <caption id="caption127" class="cell_1" style="left:0px; top:72px; width:110px; height:23px; vertical-align:middle; ">피보험자 주민번호</caption>
  5773. <caption id="cap_sdoa" class="cell_1" style="left:0px; top:120px; width:110px; height:23px; vertical-align:middle; ">
  5774. <![CDATA[중증번호]]>
  5775. <script type="javascript" ev:event="onclick">
  5776. <![CDATA[
  5777. // 20091215 JHP 수정추가 희귀질환번호가 있을때 보여주기, 중증번호 동시존재시 해당 기준에 따라서 보여주기
  5778. cap_sdoa.attribute("color") = "red";
  5779. cap_rooa.attribute("color") = "black";
  5780. opt_srdginsukind.visible = true;
  5781. opt_rooainsukind.visible= false;
  5782. opt_srdgseridiagno.visible = true;
  5783. opt_rooarareobstno.visible= false;
  5784. opt_srdgfromdd.visible = true;
  5785. opt_rooafromdd.visible= false;
  5786. opt_srdgtodd.visible = true;
  5787. opt_rooatodd.visible= false;
  5788. model.refresh();
  5789. ]]>
  5790. </script>
  5791. </caption>
  5792. <caption id="cap_rooa" class="cell_1" visibility="hidden" style="left:30px; top:120px; width:80px; height:23px; text-align:left; vertical-align:middle; padding-left:0; ">
  5793. <![CDATA[/희귀]]>
  5794. <script type="javascript" ev:event="onclick">
  5795. <![CDATA[
  5796. // 20091215 JHP 수정추가 희귀질환번호가 있을때 보여주기, 중증번호 동시존재시 해당 기준에 따라서 보여주기
  5797. cap_sdoa.attribute("color") = "black";
  5798. cap_rooa.attribute("color") = "red";
  5799. opt_srdginsukind.visible = false;
  5800. opt_rooainsukind.visible= true;
  5801. opt_srdgseridiagno.visible = false;
  5802. opt_rooarareobstno.visible= true;
  5803. opt_srdgfromdd.visible = false;
  5804. opt_rooafromdd.visible= true;
  5805. opt_srdgtodd.visible = false;
  5806. opt_rooatodd.visible= true;
  5807. model.refresh();
  5808. ]]>
  5809. </script>
  5810. </caption>
  5811. <output id="opt_srdginsukind" ref="/root/main/srdg/srdg_insukind" class="output_fix" style="left:82px; top:122px; width:25px; height:19px; "/>
  5812. <output id="opt_rooainsukind" ref="/root/main/rooa/rooa/rooa_insukind" class="output_fix" style="left:82px; top:122px; width:25px; height:19px; "/>
  5813. <output id="opt_srdgseridiagno" ref="/root/main/srdg/srdg_seridiagno" class="output_fix" appearance="output" style="left:114px; top:122px; width:96px; height:19px; "/>
  5814. <output id="opt_rooarareobstno" ref="/root/main/rooa/rooa/rooa_rareobstno" class="output_fix" appearance="output" style="left:114px; top:122px; width:96px; height:19px; "/>
  5815. <output id="opt_srdgfromdd" ref="/root/main/srdg/srdg_fromdd" class="output_fix" format="yyyy-mm-dd" appearance="output" style="left:212px; top:122px; width:90px; height:19px; "/>
  5816. <output id="opt_rooafromdd" ref="/root/main/rooa/rooa/rooa_fromdd" class="output_fix" format="yyyy-mm-dd" appearance="output" style="left:212px; top:122px; width:90px; height:19px; "/>
  5817. <output id="opt_srdgtodd" ref="/root/main/srdg/srdg_todd" class="output_fix" format="yyyy-mm-dd" appearance="output" style="left:305px; top:122px; width:90px; height:19px; "/>
  5818. <output id="opt_rooatodd" ref="/root/main/rooa/rooa/rooa_todd" class="output_fix" format="yyyy-mm-dd" appearance="output" style="left:305px; top:122px; width:90px; height:19px; "/>
  5819. <caption id="caption129" class="cell_1" style="left:0px; top:48px; width:110px; height:23px; vertical-align:middle; ">피보관계/피보성명</caption>
  5820. <caption id="caption130" class="cell_1" style="left:0px; top:0px; width:110px; height:23px; vertical-align:middle; ">보험자기호/명칭</caption>
  5821. <caption id="caption131" class="cell_1" style="left:0px; top:96px; width:110px; height:23px; vertical-align:middle; ">취득일자/종료일자</caption>
  5822. <caption id="caption132" class="cell_1" style="left:0px; top:24px; width:110px; height:23px; vertical-align:middle; ">보험증번호</caption>
  5823. <input id="ipt_insucd" ref="/root/main/ptin/ptin_insucd" class="input_default" navindex="43" style="left:114px; top:1px; width:116px; height:19px; "/>
  5824. <input id="ipt_insunm" ref="/root/main/ptin/ptin_insucdnm" class="input_default" navindex="44" style="left:256px; top:1px; width:139px; height:19px; "/>
  5825. <input id="ipt_insuno" ref="/root/main/ptin/ptin_insuno" class="input_default" navindex="46" maxlength="20" style="left:114px; top:25px; width:256px; height:19px; "/>
  5826. <select1 id="cmb_insdrela" ref="/root/main/ptin/ptin_insdrela" class="combo_default" navindex="48" appearance="minimal" style="left:114px; top:49px; width:139px; height:19px; ">
  5827. <choices>
  5828. <itemset nodeset="/root/init/P0016list/P0016">
  5829. <label ref="cdnm"/>
  5830. <value ref="cdid"/>
  5831. </itemset>
  5832. </choices>
  5833. <script type="javascript" ev:event="xforms-value-changed">
  5834. <![CDATA[
  5835. var ptin_insdrela = model.getValue("/root/main/ptin/ptin_insdrela");
  5836. // if (ptin_insdrela != "" && ptin_insdrela != "-")
  5837. // {
  5838. if (ptin_insdrela == "1") //본인
  5839. {
  5840. model.setValue("/root/main/ptin/ptin_insdnm",model.getValue("/root/main/ptbs/ptbs_hngnm"));
  5841. model.setValue("/root/main/ptin/ptin_insdrrgstno1",model.getValue("/root/main/ptbs/ptbs_rrgstno1"));
  5842. model.setValue("/root/main/ptin/ptin_insdrrgstno2",model.getValue("/root/main/ptbs/ptbs_rrgstno2"));
  5843. model.setFocus("ipt_fromdd"); //취득일자
  5844. }
  5845. else
  5846. {
  5847. model.setValue("/root/main/ptin/ptin_insdnm","-");
  5848. model.setValue("/root/main/ptin/ptin_insdrrgstno1","-");
  5849. model.setValue("/root/main/ptin/ptin_insdrrgstno2","-");
  5850. model.setFocus("ipt_insdnm"); //피보성명
  5851. }
  5852. // }
  5853. model.refresh();
  5854. ]]>
  5855. </script>
  5856. </select1>
  5857. <input id="ipt_insdnm" ref="/root/main/ptin/ptin_insdnm" class="input_default" navindex="49" style="left:256px; top:49px; width:139px; height:19px; "/>
  5858. <input id="ipt_insdrrgstno1" ref="/root/main/ptin/ptin_insdrrgstno1" class="input_default" navindex="50" maxlength="6" style="left:114px; top:73px; width:139px; height:19px; "/>
  5859. <input id="ipt_insdrrgstno2" ref="/root/main/ptin/ptin_insdrrgstno2" class="input_default" navindex="51" maxlength="7" style="left:256px; top:73px; width:139px; height:19px; "/>
  5860. <input id="ipt_fromdd" ref="/root/main/ptin/ptin_fromdd" class="input_default" navindex="52" inputtype="date" style="left:114px; top:97px; width:139px; height:19px; "/>
  5861. <input id="ipt_todd" ref="/root/main/ptin/ptin_todd" class="input_default" navindex="53" inputtype="date" style="left:256px; top:97px; width:139px; height:19px; "/>
  5862. <button id="btn_insucd_search" class="icon_search" navindex="45" style="left:236px; top:4px; width:16px; height:16px; ">
  5863. <caption/>
  5864. <script type="javascript" ev:event="DOMActivate">
  5865. <![CDATA[
  5866. var ptin_insukind = model.getValue("/root/main/iphs/iphs_insukind");
  5867. //보험
  5868. if (ptin_insukind == gsBoHeom) {
  5869. model.setValue("/root/hidden/popup/insuflag","1");
  5870. //보호1종,보호2종
  5871. } else if (ptin_insukind == gsBoHo1 || ptin_insukind == gsBoHo2) {
  5872. model.setValue("/root/hidden/popup/insuflag","2");
  5873. //자보
  5874. } else if (ptin_insukind == gsJaboKind) {
  5875. model.setValue("/root/hidden/popup/insuflag","3");
  5876. //산재,공상
  5877. } else if (ptin_insukind == gsSanJae || ptin_insukind == gsGongSang) {
  5878. model.setValue("/root/hidden/popup/insuflag","4");
  5879. //일반
  5880. } else if (ptin_insukind == gsIlBan) {
  5881. model.setValue("/root/hidden/popup/insuflag","5");
  5882. //외국인
  5883. } else if (ptin_insukind == gsForIn) {
  5884. model.setValue("/root/hidden/popup/insuflag","6");
  5885. //임상시험
  5886. } else if (ptin_insukind == gsImSang) {
  5887. model.setValue("/root/hidden/popup/insuflag","7");
  5888. }
  5889. var ptin_insucd = model.getValue("/root/main/ptin/ptin_insucd");
  5890. if (ptin_insucd == null || ptin_insucd == "" || ptin_insucd == " " || ptin_insucd == "-") {
  5891. } else {
  5892. model.setValue("/root/hidden/popup/srchcnts",ptin_insucd);
  5893. model.setValue("/root/hidden/popup/srchcond","1");
  5894. }
  5895. modal("../../../pam/pamcomnweb/xrw/SPPMB01500", "1","400", "400", "SPPMB01500", "/root/hidden/popup", "/root/send");
  5896. if (getParameter("SPPMB01500_RTN") == "N" || getParameter("SPPMB01500_RTN") == "") return;
  5897. if (getParameter("SPPMB01500_RTN") == "Y") {
  5898. var insucd = getParameter("SPPMB01500_insucd");
  5899. var insucdnm = getParameter("SPPMB01500_insucdnm");
  5900. model.setValue("/root/main/ptin/ptin_insucd", insucd);
  5901. model.setValue("/root/main/ptin/ptin_insucdnm", insucdnm);
  5902. model.refresh();
  5903. }
  5904. ]]>
  5905. </script>
  5906. </button>
  5907. <button id="btn_insuno_search" class="icon_search" navindex="47" style="left:376px; top:28px; width:16px; height:16px; ">
  5908. <caption/>
  5909. <script type="javascript" ev:event="DOMActivate">
  5910. <![CDATA[
  5911. //보험증번호 조회(보험자격조회)
  5912. var parm = model.getValue("/root/main/ptbs/ptbs_rrgstno1") +
  5913. model.getValue("/root/main/ptbs/ptbs_rrgstno2") + "▦" + //주민번호
  5914. model.getValue("/root/main/ptbs/ptbs_hngnm") + "▦" + //이름
  5915. getCurrentDate() + "▦" +//진료일자
  5916. "" + "▦" + //생성번호
  5917. "" + "▦" + //진료형태
  5918. "" + "▦" + //퇴원일자
  5919. "" + "▦" + //본인일부부담금
  5920. "" + "▦" + //기관부담금
  5921. model.getValue("/root/main/ptbs/ptbs_pid") + "▦" + //등록번호
  5922. "" + "▦" ; //진료과
  5923. setParameter("SPPMC03900_PARM",parm);
  5924. // setParameter("SPPMC03700_RTN","");
  5925. modal("SPPMC03900", "1","150", "150", "SPPMC03900", "", "");
  5926. if (getParameter("SPPMC03900_RTN") == "N" || getParameter("SPPMC03900_RTN") == "") return;
  5927. if (getParameter("SPPMC03900_RTN") == "Y") {
  5928. //return 값이 있으면, 보험유형,증번호,보험자기호,취득일자,피보험자성명
  5929. var sInsuKind = getParameter("SPPMC03900_insukind");
  5930. var sInsuNo = getParameter("SPPMC03900_insuno");
  5931. var sInsuCD = getParameter("SPPMC03900_insucd");
  5932. var sInsdNm = getParameter("SPPMC03900_insdnm");
  5933. var sInsuFromDD = getParameter("SPPMC03900_insufromdd");
  5934. // 2008.09.17 - 희귀난치대상자, 차상위대상여부 추가
  5935. var sRareObstFlag = getParameter("SPPMC03900_rareobstflag");
  5936. var sDisRegPrson3 = getParameter("SPPMC03900_suppkind"); // 차상위대상자일 경우 보조유형의 차상위에 해당하는 '32'를 넘겨줌, 아니면, '00'
  5937. var sOwnbFlag = getParameter("SPPMC03900_ownbflag");
  5938. var sSetInsuCD = "";
  5939. clearParameter("SPPMC03900_");
  5940. if (isNull(sInsuCD)) {
  5941. // 건강보험 지역가입자일 경우 기본값으로 설정
  5942. if (sInsuKind == "11") {
  5943. sSetInsuCD = "0015"
  5944. }
  5945. } else {
  5946. sSetInsuCD = sInsuCD;
  5947. }
  5948. // 2008.11.06 - 세대주성명과 환자이름이 같으면 본인으로 관계 설정
  5949. var sHngnm = model.getValue("/root/main/ptbs/ptbs_hngnm");
  5950. if (sHngnm == sInsdNm) {
  5951. model.setValue("/root/main/ptin/ptin_insdrela", "1");
  5952. }
  5953. //return 값이 있으면, 보험유형,증번호,보험자기호,취득일자,피보험자성명
  5954. model.setValue("/root/main/iphs/iphs_insukind", sInsuKind);
  5955. model.setValue("/root/main/ptin/ptin_insukind", sInsuKind);
  5956. fInsukindTabSetting();
  5957. model.setValue("/root/main/ptin/ptin_insucd", sSetInsuCD);
  5958. model.setValue("/root/main/ptin/ptin_insuno", sInsuNo);
  5959. model.setValue("/root/main/ptin/ptin_insdnm", sInsdNm);
  5960. model.setValue("/root/main/ptin/ptin_fromdd", sInsuFromDD);
  5961. model.setValue("/root/main/ptin/ptin_todd", "99991231");
  5962. // 희귀난치대상자
  5963. model.setValue("/root/main/iphs/iphs_rareobstflag", sRareObstFlag);
  5964. // 차상위대상자 - 보조유형으로 설정
  5965. if (sDisRegPrson3 == "32") { // 차상위1종
  5966. model.setValue("/root/main/iphs/iphs_suppkind", "32");
  5967. model.setValue("/root/hidden/ScndSuptrgtFlag", "1");
  5968. }
  5969. if (sDisRegPrson3 == "33") { // 차상위2종
  5970. model.setValue("/root/main/iphs/iphs_suppkind", "33");
  5971. model.setValue("/root/hidden/ScndSuptrgtFlag", "2");
  5972. }
  5973. // 본인부담구분
  5974. if (!isNull(sOwnbFlag)) {
  5975. model.setValue("/root/main/inpt/inpt_ownbflag", sOwnbFlag);
  5976. }
  5977. //피보험자성명이 환자명과 같으면, 관계에 [본인]세팅
  5978. // if ( model.getValue("/root/main/ptbs/ptbs_hngnm") == model.getValue("/root/main/ptin/ptin_insdnm") ) {
  5979. // model.setValue("/root/main/ptin/ptin_insdrela","1");
  5980. // cmb_insdrela.dispatch("xforms-value-changed");
  5981. // }
  5982. model.refresh();
  5983. }
  5984. ]]>
  5985. </script>
  5986. </button>
  5987. </case>
  5988. <case id="case_inducs">
  5989. <line id="line144" class="line_2" style="x1:0px; y1:22px; x2:395px; y2:22px; "/>
  5990. <line id="line145" class="line_2" style="x1:0px; y1:46px; x2:395px; y2:46px; "/>
  5991. <line id="line146" class="line_2" style="x1:0px; y1:70px; x2:395px; y2:70px; "/>
  5992. <line id="line147" class="line_2" style="x1:0px; y1:94px; x2:395px; y2:94px; "/>
  5993. <line id="line148" class="line_3" style="x1:0px; y1:118px; x2:395px; y2:118px; "/>
  5994. <output id="output74" ref="/root/main/icpm/icpm_acddd" class="output_fix" format="yyyy-mm-dd" appearance="output" style="left:115px; top:73px; width:140px; height:19px; "/>
  5995. <output id="output7" ref="/root/main/icpm/icpm_aprytodd" class="output_fix" format="yyyy-mm-dd" appearance="output" style="left:258px; top:97px; width:139px; height:19px; "/>
  5996. <caption id="caption135" class="cell_1" style="left:0px; top:48px; width:112px; height:23px; vertical-align:middle; ">산재지사</caption>
  5997. <output id="output75" ref="/root/main/icpm/icpm_ordopendd" class="output_fix" format="yyyy-mm-dd" appearance="output" style="left:258px; top:73px; width:139px; height:19px; "/>
  5998. <caption id="caption136" class="cell_1" style="left:0px; top:24px; width:112px; height:23px; vertical-align:middle; ">사업장명</caption>
  5999. <output id="output76" ref="/root/main/icpm/icpm_apryfromdd" class="output_fix" format="yyyy-mm-dd" appearance="output" style="left:115px; top:97px; width:140px; height:19px; "/>
  6000. <caption id="caption137" class="cell_1" style="left:0px; top:72px; width:112px; height:23px; vertical-align:middle; ">사고일자/진료개시</caption>
  6001. <output id="output70" ref="/root/main/icpm/icpm_mngtno" class="output_fix" appearance="output" style="left:115px; top:1px; width:282px; height:19px; "/>
  6002. <output id="output71" ref="/root/main/icpm/icpm_bizplcenm" class="output_fix" appearance="output" style="left:115px; top:25px; width:282px; height:19px; "/>
  6003. <output id="output72" ref="/root/main/icpm/icpm_inducsbrchcd" class="output_fix" appearance="output" style="left:115px; top:49px; width:105px; height:19px; "/>
  6004. <caption id="caption133" class="cell_1" style="left:0px; top:0px; width:112px; height:23px; vertical-align:middle; ">관리번호</caption>
  6005. <output id="output8" ref="/root/main/icpm/icpm_insucdnm" class="output_fix" appearance="output" style="left:223px; top:49px; width:174px; height:19px; "/>
  6006. <caption id="caption134" class="cell_1" style="left:0px; top:96px; width:112px; height:23px; vertical-align:middle; ">요양승인기간</caption>
  6007. </case>
  6008. <case id="case_ta">
  6009. <caption id="caption139" class="cell_1" style="left:0px; top:96px; width:112px; height:23px; vertical-align:middle; ">승인기간</caption>
  6010. <caption id="caption140" class="cell_1" style="left:0px; top:72px; width:112px; height:23px; vertical-align:middle; ">승인과</caption>
  6011. <caption id="caption141" class="cell_1" style="left:0px; top:0px; width:112px; height:23px; vertical-align:middle; ">보험회사</caption>
  6012. <caption id="caption143" class="cell_1" style="left:0px; top:48px; width:112px; height:23px; vertical-align:middle; ">발생금액</caption>
  6013. <caption id="caption144" class="cell_1" style="left:0px; top:24px; width:112px; height:23px; vertical-align:middle; ">지불보증번호/한도</caption>
  6014. <line id="line150" class="line_2" style="x1:0px; y1:22px; x2:395px; y2:22px; "/>
  6015. <line id="line151" class="line_2" style="x1:0px; y1:46px; x2:395px; y2:46px; "/>
  6016. <line id="line152" class="line_2" style="x1:0px; y1:70px; x2:395px; y2:70px; "/>
  6017. <line id="line153" class="line_2" style="x1:0px; y1:94px; x2:395px; y2:94px; "/>
  6018. <line id="line154" class="line_3" style="x1:0px; y1:118px; x2:395px; y2:118px; "/>
  6019. <output id="output77" ref="/root/main/aipm/aipm_insucmpycd" class="output_fix" appearance="output" style="left:115px; top:1px; width:110px; height:19px; "/>
  6020. <output id="output78" ref="/root/main/aipm/aipm_paylimamt" class="output_fix" format="#,###" appearance="output" style="left:258px; top:25px; width:134px; height:19px; text-align:right; "/>
  6021. <output id="output79" class="output_fix" format="#,###" appearance="output" style="left:115px; top:49px; width:276px; height:19px; "/>
  6022. <output id="output80" class="output_fix" appearance="output" style="left:115px; top:74px; width:276px; height:19px; "/>
  6023. <output id="output81" ref="/root/main/aipm/aipm_aprvfromdd" class="output_fix" format="yyyy-mm-dd" appearance="output" style="left:115px; top:97px; width:140px; height:19px; "/>
  6024. <output id="output9" ref="/root/main/aipm/aipm_aprvtodd" class="output_fix" format="yyyy-mm-dd" appearance="output" style="left:258px; top:97px; width:134px; height:19px; "/>
  6025. <button id="button24" class="btn5_letter2" style="left:348px; top:1px; width:42px; height:19px; ">
  6026. <caption>조회</caption>
  6027. <script type="javascript" ev:event="DOMActivate">
  6028. <![CDATA[
  6029. //자보환자 심사에 따른 제어 로직 추가 by 조중래 20130703
  6030. setParameter("SPPMC02601_PID", model.getValue("/root/main/ptbs/ptbs_pid"));
  6031. setParameter("SPPMC02601_ORDDD", model.getValue("/root/main/iphs/iphs_fromdd"));
  6032. //사고번호조회화면 호출
  6033. modal("SPPMC02601");
  6034. var okflag = getParameter("SPPMC02601_OKFLAG");
  6035. var suppkind = getParameter("SPPMC02601_SUPPKIND");
  6036. var insucd = getParameter("SPPMC02601_INSUCD");
  6037. var insunm = getParameter("SPPMC02601_INSUNM");
  6038. var paygrntno = getParameter("SPPMC02601_PAYGRNTNO");
  6039. if(okflag == "Y"){
  6040. if(suppkind != ""){
  6041. model.setValue("root/main/iphs/iphs_suppkind", suppkind);
  6042. }
  6043. if(insucd != ""){
  6044. model.setValue("/root/main/aipm/aipm_insucmpycd", insucd);
  6045. model.setValue("/root/main/aipm/aipm_insucdnm", insunm);
  6046. model.setValue("/root/main/iphs/iphs_insucd", insucd);
  6047. }
  6048. if(paygrntno != ""){
  6049. model.makeValue("/root/main/aipm/aipm_paygrntno", paygrntno);
  6050. }
  6051. }
  6052. model.refresh();
  6053. ]]>
  6054. </script>
  6055. </button>
  6056. <output id="output10" ref="/root/main/aipm/aipm_paygrntno" class="output_fix" appearance="output" style="left:115px; top:25px; width:140px; height:19px; text-align:right; "/>
  6057. <select1 id="combo29" ref="/root/main/aipm/aipm_insucmpycd" class="output_fix" disabled="true" appearance="minimal" style="left:228px; top:1px; width:117px; height:19px; ">
  6058. <choices>
  6059. <itemset nodeset="/root/hidden/init/insucd">
  6060. <label ref="nm"/>
  6061. <value ref="cd"/>
  6062. </itemset>
  6063. </choices>
  6064. </select1>
  6065. </case>
  6066. <case id="case_dutywund">
  6067. <caption id="caption145" class="cell_1" style="left:0px; top:0px; width:112px; height:23px; vertical-align:middle; ">공상적용 잔여일수</caption>
  6068. <line id="line155" class="line_3" style="x1:0px; y1:22px; x2:395px; y2:22px; "/>
  6069. <output id="output83" ref="/root/main/icpm/icpm_spredayno" class="output_fix" appearance="output" style="left:115px; top:1px; width:282px; height:19px; "/>
  6070. </case>
  6071. </switch>
  6072. <button id="button9" class="btn4_letter10" visibility="hidden" style="left:711px; top:208px; width:152px; height:22px; ">
  6073. <caption>전체기간재원유형변경</caption>
  6074. <script type="javascript" ev:event="DOMActivate">
  6075. <![CDATA[
  6076. //전체기간재원유형변경 2007.10.05 홍영표 ( inpt, iphs, ptin, ptdc 변경 )
  6077. var inpt_hngnm = model.getValue("/root/main/inpt/inpt_hngnm");
  6078. var inpt_indd = model.getValue("/root/main/inpt/inpt_indd");
  6079. var iphs_insukind = model.getValue("/root/main/iphs/iphs_insukind");
  6080. var iphs_insukindnm = model.getValue("/root/hidden/init/insukind[cd = '"+ iphs_insukind +"']/nm");
  6081. var iphs_suppkind = model.getValue("/root/main/iphs/iphs_suppkind");
  6082. var iphs_suppkindnm = model.getValue("/root/hidden/init/suppkind[cd = '"+ iphs_suppkind +"']/nm");
  6083. var ptdc_disccd = model.getValue("/root/main/ptdc/ptdc_disccd");
  6084. var ptdc_disccdnm = model.getValue("/root/hidden/init/disccd[cd = '"+ ptdc_disccd +"']/nm");
  6085. var smsgrtn = messageBox(inpt_hngnm + " 환자의 입원 전체기간의 \n\n보험유형을 '"+ iphs_insukindnm + "' 의 '"+ iphs_suppkindnm +"' 으로 \n\n감면은 '" + ptdc_disccdnm +"' 으로 변경을","Q004");
  6086. if (smsgrtn == "6"){
  6087. if (fCheckFactChangeSave(2) == true) { //필수입력사항 체크
  6088. model.resetInstanceNode("/root/send/data20");
  6089. model.setValue("/root/send/data20/data20_status", "U");
  6090. model.setValue("/root/send/data20/data20_pid", model.getValue("/root/main/inpt/inpt_pid"));
  6091. model.setValue("/root/send/data20/data20_cretno", model.getValue("/root/main/inpt/inpt_cretno"));
  6092. model.setValue("/root/send/data20/data20_instcd", model.getValue("/root/main/inpt/inpt_instcd"));
  6093. model.setValue("/root/send/data20/data20_mskind", model.getValue("/root/main/inpt/inpt_mskind"));
  6094. model.setValue("/root/send/data20/data20_indd", model.getValue("/root/main/inpt/inpt_indd"));
  6095. model.setValue("/root/send/data20/data20_dschdd", model.getValue("/root/main/inpt/inpt_dschdd"));
  6096. model.setValue("/root/send/data20/data20_insukind", iphs_insukind);
  6097. model.setValue("/root/send/data20/data20_suppkind", iphs_suppkind);
  6098. model.setValue("/root/send/data20/data20_disccd", ptdc_disccd);
  6099. if ( submit("TXPMI00402") == true ) {
  6100. model.setValue("/root/send/ipatflag",'3');
  6101. model.setValue("/root/send/srchcond1",'1');
  6102. model.setValue("/root/send/srchcond2",model.getValue("/root/main/ptbs/ptbs_pid"));
  6103. fipatrefchlind('1');
  6104. fQuery1();
  6105. if(datagrid2.rows > 1) // 재원내역에 조회된 결과값이 있으면 해당환자의 정보를 조회한다.
  6106. {
  6107. fQuery("1")
  6108. }
  6109. }
  6110. }
  6111. button9.visible = false;
  6112. }else if (smsgrtn == "7"){
  6113. button9.visible = false;
  6114. return;
  6115. }
  6116. ]]>
  6117. </script>
  6118. </button>
  6119. <select1 id="radio2" ref="/root/main/inpt/inpt_medcostestmflag" appearance="full" cellspacing="8" cols="3" overflow="visible" style="left:991px; top:309px; width:100px; height:20px; border-style:none; ">
  6120. <choices>
  6121. <item>
  6122. <label>Yes</label>
  6123. <value>Y</value>
  6124. </item>
  6125. <item>
  6126. <label>No</label>
  6127. <value>N</value>
  6128. </item>
  6129. </choices>
  6130. <script type="javascript" ev:event="xforms-value-changed">
  6131. <![CDATA[
  6132. var inpt_medcostestmflag = model.getValue("/root/main/inpt/inpt_medcostestmflag");
  6133. if (inpt_medcostestmflag == "Y") {
  6134. cmb_medamtfreeresn.disabled = true;
  6135. model.setValue("/root/main/inpt/inpt_medamtfreeresn","");
  6136. } else if (inpt_medcostestmflag == "N") {
  6137. cmb_medamtfreeresn.disabled = false;
  6138. model.setFocus("cmb_medamtfreeresn");
  6139. }
  6140. model.refresh();
  6141. ]]>
  6142. </script>
  6143. </select1>
  6144. <select1 id="cmb_medamtfreeresn" ref="/root/main/inpt/inpt_medamtfreeresn" disabled="true" appearance="minimal" style="left:1094px; top:308px; width:100px; height:19px; ">
  6145. <choices>
  6146. <itemset nodeset="/root/init/P0342list/P0342">
  6147. <label ref="cdnm"/>
  6148. <value ref="cdid"/>
  6149. </itemset>
  6150. </choices>
  6151. </select1>
  6152. <select1 id="cmb_orddeptcd" ref="/root/main/icdr/icdr_orddeptcd" class="combo_default" appearance="minimal" style="left:991px; top:575px; width:203px; height:19px; ">
  6153. <choices>
  6154. <itemset nodeset="/root/hidden/init/orddeptcd">
  6155. <label ref="nm"/>
  6156. <value ref="cd"/>
  6157. </itemset>
  6158. </choices>
  6159. <script type="javascript" ev:event="xforms-select">
  6160. <![CDATA[
  6161. fComboNodeSet(1);
  6162. ]]>
  6163. </script>
  6164. </select1>
  6165. <select1 id="radio3" ref="/root/main/iphs/iphs_handicaprbookpossnyn" appearance="full" cols="2" overflow="hidden" style="left:991px; top:429px; width:59px; height:20px; border-style:none; ">
  6166. <choices>
  6167. <item>
  6168. <label>Y</label>
  6169. <value>Y</value>
  6170. </item>
  6171. <item>
  6172. <label>N</label>
  6173. <value>N</value>
  6174. </item>
  6175. </choices>
  6176. <script type="javascript" ev:event="xforms-select">
  6177. <![CDATA[
  6178. //2008.01.10 장애인내역조회
  6179. if (model.getValue("/root/main/iphs/iphs_handicaprbookpossnyn") == "Y") {
  6180. model.setValue("/root/send/data9/mode","12");
  6181. model.setValue("/root/send/data9/pid",model.getValue("/root/main/ptbs/ptbs_pid"));
  6182. submit("TRPMI00107","false");
  6183. var hndc_node = instance1.selectSingleNode("/root/hidden/check/hndc");
  6184. if (hndc_node == null) {
  6185. messageBox("장애내역이 없습니다.장애내역 등록을 해주세요.","E999","");
  6186. model.setValue("/root/main/iphs/iphs_handicaprbookpossnyn","N");
  6187. model.refresh();
  6188. return false;
  6189. }
  6190. }
  6191. ]]>
  6192. </script>
  6193. </select1>
  6194. <input id="input3" ref="/root/main/iphs/iphs_disccd" class="input_default" disabled="true" imemode="alpha" style="left:115px; top:642px; width:75px; height:19px; ">
  6195. <script type="javascript" ev:event="onkeypress">
  6196. <![CDATA[
  6197. if (event.keyCode == "13") {
  6198. var sDisccd = input3.currentText.toUpperCase();
  6199. // 존재하지 않는 할인코드 입력시 메시지 처리
  6200. var sCheckDisccd = model.getValue("/root/hidden/init/disccd[cd = '" + sDisccd + "']/cd");
  6201. if (isNull(sCheckDisccd)) {
  6202. messageBox("존재하지 않는 감면계정입니다. [해당사항 없음]으로 설정합니다.!!", "I");
  6203. model.setValue("/root/main/iphs/iphs_disccd", "-");
  6204. model.setFocus("input3");
  6205. } else {
  6206. model.setValue("/root/main/iphs/iphs_disccd", sDisccd);
  6207. model.setFocus("combo6");
  6208. }
  6209. input3.refresh();
  6210. combo6.refresh();
  6211. }
  6212. ]]>
  6213. </script>
  6214. <script type="javascript" ev:event="xforms-value-changed">
  6215. <![CDATA[
  6216. var sDisccd = input3.currentText.toUpperCase();
  6217. // 존재하지 않는 할인코드 입력시 메시지 처리
  6218. var sCheckDisccd = model.getValue("/root/hidden/init/disccd[cd = '" + sDisccd + "']/cd");
  6219. if (isNull(sCheckDisccd)) {
  6220. messageBox("존재하지 않는 감면계정입니다. [해당사항 없음]으로 설정합니다.!!", "I");
  6221. model.setValue("/root/main/iphs/iphs_disccd", "-");
  6222. model.setFocus("input3");
  6223. } else {
  6224. model.setValue("/root/main/iphs/iphs_disccd", sDisccd);
  6225. model.setFocus("combo6");
  6226. }
  6227. input3.refresh();
  6228. combo6.refresh();
  6229. ]]>
  6230. </script>
  6231. </input>
  6232. <datagrid id="datagrid1" nodeset="/root/main/admi" caption="입금구분^현금입금액^카드결재액^적용일자^수납일자^영수증^작업시간" colsep="^" colwidth="70, 90, 90, 90, 90, 80, 80" dataheight="23" mergecellsfixedrows="bycolrec" rowheight="23" rowsep="|" style="left:632px; top:599px; width:230px; height:142px; ">
  6233. <col disabled="true" ref="admi_rcptflag" type="combo">
  6234. <choices>
  6235. <itemset nodeset="/root/init/P0312list/P0312">
  6236. <label ref="cdnm"/>
  6237. <value ref="cdid"/>
  6238. </itemset>
  6239. </choices>
  6240. </col>
  6241. <col ref="admi_cashamt" format="#,###" style="text-align:right; "/>
  6242. <col ref="admi_cardamt" format="#,###" style="text-align:right; "/>
  6243. <col ref="admi_appdd" format="yyyy-mm-dd" style="text-align:center; "/>
  6244. <col ref="admi_rcptexecdd" format="yyyy-mm-dd" style="text-align:center; "/>
  6245. <col ref="admi_rcptno" style="text-align:right; "/>
  6246. <col ref="admi_rcpttm" format="hh:nn:ss" style="text-align:center; "/>
  6247. </datagrid>
  6248. <button id="button11" class="btn4_letter5" visibility="visible" style="left:771px; top:208px; width:92px; height:22px; ">
  6249. <caption>유형합치기</caption>
  6250. <script type="javascript" ev:event="DOMActivate">
  6251. <![CDATA[
  6252. var result = messageBox("[유형합치기]를", "Q004");
  6253. if (result == "06") {
  6254. model.removeNodeset("/root/send/data10");
  6255. model.makeNode("/root/send/data10");
  6256. // 2008.07.17 주석처리 - 아래 조건 서버에서 체크
  6257. /*
  6258. var cur_row = datagrid3.row;
  6259. var cur_row1 = cur_row - 1;
  6260. var cur_row2 = cur_row + 1;
  6261. if (model.getValue("/root/hidden/original/iphs["+ cur_row +"]/checkflag") == "true") {
  6262. if (model.getValue("/root/hidden/original/iphs["+ cur_row1 + "]/checkflag") == "true" ||
  6263. model.getValue("/root/hidden/original/iphs["+ cur_row2 + "]/checkflag") == "true") {
  6264. if (model.getValue("/root/hidden/original/iphs["+ cur_row1 + "]/checkflag") == "true") {
  6265. if (model.getValue("/root/hidden/original/iphs["+ cur_row +"]/iphs_insukind") !=
  6266. model.getValue("/root/hidden/original/iphs["+ cur_row1 +"]/iphs_insukind")) {
  6267. messageBox("보험유형이 틀려 합칠 수","I004");
  6268. model.refresh();
  6269. return false;
  6270. }
  6271. }
  6272. if (model.getValue("/root/hidden/original/iphs["+ cur_row2 + "]/checkflag") == "true") {
  6273. if (model.getValue("/root/hidden/original/iphs["+ cur_row +"]/iphs_insukind") !=
  6274. model.getValue("/root/hidden/original/iphs["+ cur_row2 +"]/iphs_insukind")) {
  6275. messageBox("보험유형이 틀려 합칠 수","I004");
  6276. model.refresh();
  6277. return false;
  6278. }
  6279. }
  6280. } else {
  6281. messageBox("보험유형을 합칠수","I004");
  6282. model.refresh();
  6283. return false;
  6284. }
  6285. }
  6286. */
  6287. var nodeList = instance1.selectNodes("/root/hidden/original/iphs[checkflag='true']");
  6288. var rCSV = getNodeListCSV(nodeList);
  6289. model.setValue("/root/hidden/iphschk/temp", rCSV);
  6290. var CSV = model.getValue("/root/hidden/iphschk/temp");
  6291. setCSVToNode("/root/send/data10", CSV);
  6292. var iphs_cnt = getNodesetCount("/root/send/data10/list");
  6293. if (iphs_cnt > 1) {
  6294. for(i = 1; i <= iphs_cnt; i++) {
  6295. var s_insukind = model.getValue("/root/send/data10/list[1]/iphs_insukind");
  6296. if (s_insukind != model.getValue("/root/send/data10/list[" + i +"]/iphs_insukind")) {
  6297. messageBox("다른 보험유형이 있어 합칠 수","I004");
  6298. return false;
  6299. }
  6300. }
  6301. // 가장 작은 시작일자와 가장 큰 종료일자 찾기
  6302. var first_fromdd = model.getValue("/root/send/data10/list[1]/iphs_fromdd");
  6303. var last_todd = model.getValue("/root/send/data10/list[1]/iphs_todd");
  6304. for(i = 1; i <= iphs_cnt ; i++) {
  6305. var next_fromdd = model.getValue("/root/send/data10/list[" + i +"]/iphs_fromdd")
  6306. if (first_fromdd > next_fromdd) {
  6307. first_fromdd = next_fromdd;
  6308. }
  6309. var next_todd = model.getValue("/root/send/data10/list[" + i +"]/iphs_todd")
  6310. if (last_todd < next_todd) {
  6311. last_todd = next_todd;
  6312. }
  6313. }
  6314. model.makeValue("/root/send/data10/todo_pid", model.getValue("/root/send/data10/list[1]/iphs_pid"));
  6315. model.makeValue("/root/send/data10/todo_indd", model.getValue("/root/send/data10/list[1]/iphs_indd"));
  6316. model.makeValue("/root/send/data10/todo_cretno", model.getValue("/root/send/data10/list[1]/iphs_cretno"));
  6317. model.makeValue("/root/send/data10/todo_mskind", model.getValue("/root/send/data10/list[1]/iphs_mskind"));
  6318. model.makeValue("/root/send/data10/todo_instcd", model.getValue("/root/send/data10/list[1]/iphs_instcd"));
  6319. model.makeValue("/root/send/data10/todo_fromdd", first_fromdd);
  6320. model.makeValue("/root/send/data10/todo_todd", last_todd);
  6321. //model.makeValue("/root/send/data10/todo_insukind", model.getValue("/root/send/data10/list[1]/iphs_insukind"));
  6322. //model.makeValue("/root/send/data10/todo_suppkind", model.getValue("/root/send/data10/list[1]/iphs_suppkind"));
  6323. }
  6324. if (iphs_cnt > 1) {
  6325. submit("TXPMI00403");
  6326. //if(submit("TXPMI00403")) {
  6327. //model.resetInstanceNode("/root/send/s_ptbs");
  6328. //model.resetInstanceNode("/root/send/s_ptin");
  6329. //model.resetInstanceNode("/root/send/s_inpt");
  6330. //model.resetInstanceNode("/root/send/s_iphs");
  6331. //model.resetInstanceNode("/root/send/s_icdr");
  6332. //model.resetInstanceNode("/root/send/s_ipsc");
  6333. var sPid = model.getValue("/root/main/ptbs/ptbs_pid");
  6334. model.resetInstanceNode("/root/send");
  6335. model.removeNodeset("/root/send/data10");
  6336. model.makeNode("/root/send/data10");
  6337. model.resetInstanceNode("/root/main");
  6338. model.resetInstanceNode("/root/hidden/h_rcv");
  6339. model.resetInstanceNode("/root/hidden/flag");
  6340. model.resetInstanceNode("/root/hidden/temp");
  6341. model.resetInstanceNode("/root/hidden/iphschk");
  6342. model.resetInstanceNode("/root/hidden/original");
  6343. model.setValue("/root/send/ipatflag",'3');
  6344. model.setValue("/root/send/srchcond1",'1');
  6345. model.setValue("/root/send/srchcond2", sPid);
  6346. fipatrefchlind('1');
  6347. fQuery1();
  6348. //}
  6349. if(datagrid2.rows > 1) // 재원내역에 조회된 결과값이 있으면 해당환자의 정보를 조회한다.
  6350. {
  6351. fQuery("1")
  6352. }
  6353. } else {
  6354. messageBox("보험유형이 2개이상이여야 합치기가","I006");
  6355. return false;
  6356. }
  6357. model.refresh();
  6358. }
  6359. ]]>
  6360. </script>
  6361. </button>
  6362. <output id="output12" ref="/root/main/iphs/iphs_famyrelnm" class="output_fix" appearance="output" style="left:115px; top:690px; width:94px; height:19px; "/>
  6363. <line id="line24" class="line_1" style="x1:402px; y1:594px; x2:624px; y2:594px; "/>
  6364. <line id="line25" class="line_3" style="x1:632px; y1:742px; x2:862px; y2:742px; "/>
  6365. <button id="button61" class="btn2_letter2" style="left:265px; top:390px; width:42px; height:19px; ">
  6366. <caption>자보</caption>
  6367. <script type="javascript" ev:event="DOMActivate">
  6368. <![CDATA[
  6369. setParameter("SMPMC02600_pid", model.getValue("/root/main/ptbs/ptbs_pid")); //등록번호
  6370. modal("SMPMC02600");
  6371. ]]>
  6372. </script>
  6373. </button>
  6374. <caption id="caption147" class="tit_2" style="left:5px; top:323px; width:144px; height:13px; ">예약정보</caption>
  6375. <textarea id="textarea6" ref="/root/hidden/original/adrv/adrv_inrsrvrem" scroll="vertical" editable="false" style="left:115px; top:344px; width:282px; height:38px; "/>
  6376. <caption id="caption148" class="cell_1" style="left:0px; top:343px; width:112px; height:41px; vertical-align:middle; ">원무 전달사항</caption>
  6377. <line id="line123" class="line_1" style="x1:0px; y1:338px; x2:397px; y2:338px; "/>
  6378. <line id="line126" class="line_3" style="x1:0px; y1:384px; x2:397px; y2:384px; "/>
  6379. <button id="button18" class="btn2_letter4" visibility="visible" style="left:1129px; top:49px; width:64px; height:19px; ">
  6380. <caption>엑셀저장</caption>
  6381. <script type="javascript" ev:event="DOMActivate">
  6382. <![CDATA[
  6383. var fileName = window.fileDialog("save", ",", false, getCurrentDate(), "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  6384. if (fileName != "")
  6385. {
  6386. datagrid2.saveExcel(fileName, "SheetName", false, false, "", "", false);
  6387. }
  6388. ]]>
  6389. </script>
  6390. </button>
  6391. <select id="checkbox1" ref="/root/main/inpt/inpt_visitrefyn" overflow="visible" appearance="full" style="left:69px; top:33px; width:40px; height:20px; border-style:none; ">
  6392. <choices>
  6393. <item>
  6394. <label>숨김</label>
  6395. <value>Y</value>
  6396. </item>
  6397. </choices>
  6398. <script type="javascript" ev:event="xforms-select">
  6399. <![CDATA[
  6400. model.setValue("/root/main/inpt/inpt_visitrefyn", "Y");
  6401. ]]>
  6402. </script>
  6403. <script type="javascript" ev:event="xforms-deselect">
  6404. <![CDATA[
  6405. model.setValue("/root/main/inpt/inpt_visitrefyn", "N");
  6406. ]]>
  6407. </script>
  6408. </select>
  6409. <select1 id="combo17" ref="/root/main/inpt/inpt_etcordflag" class="combo_default" appearance="minimal" style="left:991px; top:477px; width:100px; height:19px; ">
  6410. <choices>
  6411. <item>
  6412. <label>-</label>
  6413. <value>-</value>
  6414. </item>
  6415. <item>
  6416. <label>주사</label>
  6417. <value>J</value>
  6418. </item>
  6419. <item>
  6420. <label>사본발행</label>
  6421. <value>D</value>
  6422. </item>
  6423. <item>
  6424. <label>진단서발행</label>
  6425. <value>G</value>
  6426. </item>
  6427. <item>
  6428. <label>응급실접퇴</label>
  6429. <value>X</value>
  6430. </item>
  6431. </choices>
  6432. </select1>
  6433. <line id="line18" class="line_2" style="x1:868px; y1:473px; x2:1194px; y2:473px; "/>
  6434. <caption id="caption6" class="cell_1" style="left:868px; top:475px; width:120px; height:23px; vertical-align:middle; ">기타구분/수가계산</caption>
  6435. <!-- 수정이력 : JHP 20090804 상한액 관련 IPHS ownbmaxgradeflag : '본인부담상한액 차등적용 구분 (-:해당없음, 1:400, 2:300, 3:200만원)' 추가-->
  6436. <select1 id="cmb_ownbmaxgradeflag" ref="/root/main/iphs/iphs_ownbmaxgradeflag" class="combo_default" appearance="minimal" style="left:1115px; top:452px; width:79px; height:19px; text-align:center; ">
  6437. <choices>
  6438. <itemset nodeset="/root/init/PAM/PK062list/PK062">
  6439. <label ref="cdnm"/>
  6440. <value ref="cdid"/>
  6441. </itemset>
  6442. </choices>
  6443. </select1>
  6444. <!-- 수정이력 : JHP 20091221 수가재계산구분 IPHS calcscorrecalflag : '완화의학호스피스병동구분 _ P0027' ('7':완화정액수가16일미만, '8':완화정액수가16일이상)' 추가-->
  6445. <select1 id="cmb_calcscorrecalflag" ref="/root/main/iphs/iphs_calcscorrecalflag" class="combo_default" appearance="minimal" style="left:1094px; top:477px; width:100px; height:19px; ">
  6446. <choices>
  6447. <itemset nodeset="/root/init/P0027list/P0027">
  6448. <label ref="cdnm"/>
  6449. <value ref="cdid"/>
  6450. </itemset>
  6451. </choices>
  6452. </select1>
  6453. <select1 id="combo22" ref="/root/main/icdr/icdr_bedcd" class="combo_default" disabled="true" appearance="minimal" editmode="inputsearch" itemcount="30" style="left:1122px; top:647px; width:54px; height:19px; ">
  6454. <choices>
  6455. <itemset nodeset="/root/hidden/init/bedcd">
  6456. <label ref="nm"/>
  6457. <value ref="cd"/>
  6458. </itemset>
  6459. </choices>
  6460. </select1>
  6461. <select1 id="combo23" ref="/root/main/icdr/icdr_bedcd2" class="combo_default" disabled="true" appearance="minimal" editmode="inputsearch" itemcount="30" style="left:1122px; top:695px; width:54px; height:19px; ">
  6462. <choices>
  6463. <itemset nodeset="/root/hidden/init/bedcd">
  6464. <label ref="nm"/>
  6465. <value ref="cd"/>
  6466. </itemset>
  6467. </choices>
  6468. </select1>
  6469. <button id="button39" class="btn2_letter4" style="left:199px; top:390px; width:64px; height:19px; ">
  6470. <caption>산재공상</caption>
  6471. <script type="javascript" ev:event="DOMActivate">
  6472. <![CDATA[
  6473. setParameter("SMPMC02700_pid", model.getValue("/root/main/ptbs/ptbs_pid")); //등록번호
  6474. modal("SMPMC02700", "1","100", "100", "SMPMC02700", "", "");
  6475. ]]>
  6476. </script>
  6477. </button>
  6478. <select1 id="combo27" ref="/root/main/iphs/iphs_rareobstflag" class="combo_default" appearance="minimal" style="left:991px; top:404px; width:100px; height:19px; ">
  6479. <choices>
  6480. <itemset nodeset="/root/init/PAM/P6571list/P6571">
  6481. <label ref="cdnm"/>
  6482. <value ref="cdid"/>
  6483. </itemset>
  6484. </choices>
  6485. </select1>
  6486. <button id="btn_remfact" class="btn2_letter2" style="left:68px; top:258px; width:42px; height:19px; ">
  6487. <caption>펼침</caption>
  6488. <script type="javascript" ev:event="DOMActivate">
  6489. <![CDATA[
  6490. if (model.getValue("/root/main/ptbs/ptbs_pid") == "") {
  6491. return;
  6492. }
  6493. model.setValue("/root/main/ptbs/ptbs_remfact",
  6494. fCallSpecPopUp_remfact(model.getValue("/root/main/ptbs/ptbs_pid"),model.getValue("/root/main/ptbs/ptbs_remfact")));
  6495. textarea1.refresh();
  6496. ]]>
  6497. </script>
  6498. </button>
  6499. <select1 id="radio5" ref="/root/main/iphs/iphs_cpyn" disabled="true" appearance="full" cellspacing="8" cols="2" overflow="hidden" style="left:991px; top:334px; width:100px; height:20px; border-style:none; ">
  6500. <choices>
  6501. <item>
  6502. <label>Yes</label>
  6503. <value>Y</value>
  6504. </item>
  6505. <item>
  6506. <label>No</label>
  6507. <value>N</value>
  6508. </item>
  6509. </choices>
  6510. </select1>
  6511. <caption id="caption46" class="cell_1" style="left:868px; top:331px; width:120px; height:23px; vertical-align:middle; ">CP여부/임상시험</caption>
  6512. <input id="input4" ref="/root/main/iphs/iphs_drgno" disabled="true" style="left:1094px; top:357px; width:100px; height:19px; "/>
  6513. <select1 id="combo28" ref="/root/main/iphs/iphs_drgyn" disabled="true" appearance="minimal" style="left:991px; top:357px; width:100px; height:19px; ">
  6514. <choices>
  6515. <itemset nodeset="/root/init/PAM/PK020list/PK020">
  6516. <label ref="cdnm"/>
  6517. <value ref="cdid"/>
  6518. </itemset>
  6519. </choices>
  6520. </select1>
  6521. <input id="input18" ref="/root/main/inpt/inpt_ownbflag" disabled="true" style="left:1094px; top:284px; width:100px; height:19px; color:#0000ff; text-align:center; "/>
  6522. <caption id="caption43" class="cell_1" style="left:868px; top:451px; width:120px; height:23px; vertical-align:middle; ">
  6523. <![CDATA[퇴원통보/상한차등]]>
  6524. <script type="javascript" ev:event="ondblclick">
  6525. <![CDATA[
  6526. fOwnBMaxGradeFlagSet();
  6527. ]]>
  6528. </script>
  6529. </caption>
  6530. <line id="line22" class="line_3" style="x1:867px; y1:523px; x2:1193px; y2:523px; "/>
  6531. <caption id="caption48" class="cell_1" style="left:868px; top:307px; width:120px; height:23px; vertical-align:middle; ">진찰료산정/사유</caption>
  6532. <select1 id="combo30" ref="/root/main/iphs/iphs_etcordflag" class="combo_default" appearance="minimal" style="left:1094px; top:404px; width:100px; height:19px; ">
  6533. <choices>
  6534. <itemset nodeset="/root/init/PAM/PK043list/PK043">
  6535. <label ref="cdnm"/>
  6536. <value ref="cdid"/>
  6537. </itemset>
  6538. </choices>
  6539. </select1>
  6540. <caption id="cap_brateout" visibility="hidden" style="left:75px; top:393px; width:107px; height:20px; font-weight:bold; color:#ff0000; vertical-align:middle; ">
  6541. <![CDATA[[외래요율환자]]]>
  6542. <hint>
  6543. <![CDATA[보조유형이 전체 또는 외래에 해당하는 유형으로 설정됩니다.]]>
  6544. </hint>
  6545. </caption>
  6546. <caption id="caption47" class="cell_1" style="left:868px; top:499px; width:120px; height:23px; vertical-align:middle; ">분리사유/사전심사</caption>
  6547. <select1 id="combo31" ref="/root/main/iphs/iphs_forcesepcd" appearance="minimal" style="left:991px; top:501px; width:100px; height:19px; ">
  6548. <choices>
  6549. <itemset nodeset="/root/init/PAM/PK084list/PK084">
  6550. <label ref="cdnm"/>
  6551. <value ref="cdid"/>
  6552. </itemset>
  6553. </choices>
  6554. </select1>
  6555. <select1 id="combo32" ref="/root/main/iphs/iphs_uncocd" appearance="minimal" style="left:1050px; top:429px; width:80px; height:19px; ">
  6556. <choices>
  6557. <itemset nodeset="/root/init/PAM/PK225list/PK225">
  6558. <label ref="cdnm"/>
  6559. <value ref="cdid"/>
  6560. </itemset>
  6561. </choices>
  6562. </select1>
  6563. <button id="button2" class="btn2_letter4" style="left:1130px; top:429px; width:64px; height:19px; ">
  6564. <caption>보호입원</caption>
  6565. <script type="javascript" ev:event="DOMActivate">
  6566. <![CDATA[
  6567. setParameter("SPPMI03800_PID", model.getValue("/root/main/ptbs/ptbs_pid"));
  6568. // 보호입원 대상자 조회화면
  6569. modal ("SPPMI03800");
  6570. ]]>
  6571. </script>
  6572. </button>
  6573. </group>
  6574. <group id="group4" style="left:0px; top:0px; width:1195px; height:13px; ">
  6575. <caption id="caption26" class="tit_1" style="left:0px; top:0px; width:100px; height:13px; font-family:돋움; vertical-align:middle; ">재원변경관리</caption>
  6576. </group>
  6577. <group id="group3" style="left:0px; top:757px; width:1195px; height:27px; ">
  6578. <button id="button31" class="btn3_letter3" style="left:391px; top:4px; width:68px; height:22px; ">
  6579. <caption>진단서</caption>
  6580. <script type="javascript" ev:event="DOMActivate">
  6581. <![CDATA[
  6582. modal("SMMMR02300");
  6583. ]]>
  6584. </script>
  6585. </button>
  6586. <button id="button34" class="btn3_letter4" visibility="visible" style="left:225px; top:4px; width:72px; height:22px; ">
  6587. <caption>환자팔찌</caption>
  6588. </button>
  6589. <button id="button12" class="btn4_letter4" style="left:1114px; top:4px; width:80px; height:22px; ">
  6590. <caption>재원변경</caption>
  6591. <script type="javascript" ev:event="DOMActivate">
  6592. <![CDATA[
  6593. //감면정보 확인
  6594. model.setValue("/root/send/data29/pid", model.getValue("/root/main/ptbs/ptbs_pid") );
  6595. model.setValue("/root/send/data29/name", model.getValue("/root/main/ptbs/ptbs_hngnm") );
  6596. model.setValue("/root/send/data29/rgstno1", model.getValue("/root/main/ptbs/ptbs_rrgstno1") );
  6597. model.setValue("/root/send/data29/rgstno2", model.getValue("/root/main/ptbs/ptbs_rrgstno2") );
  6598. model.setValue("/root/send/data29/orddd", model.getValue("/root/main/iphs/iphs_fromdd") );
  6599. var siphs_flag = model.getValue("/root/hidden/flag/iphs_flag"); // 재원유형을 선택했는지 여부를 관리한다.
  6600. var sicdr_flag = model.getValue("/root/hidden/flag/icdr_flag"); // 재원이력을 선택했는지 여부를 관리한다.
  6601. if( siphs_flag != 'Y') {
  6602. messageBox("변경할 재원유형을 ", "C002");
  6603. return false;
  6604. } else if (sicdr_flag != 'Y' ) {
  6605. messageBox("변경할 재원이력을 ", "C002");
  6606. return false;
  6607. } else {
  6608. var sAnswer = messageBox("변경하시겠습니까?", "Q");
  6609. if (sAnswer == "6") {
  6610. if (fCheckFactChangeSave(1) == true) { //필수입력사항 체크
  6611. // 로딩창 열기
  6612. var sWindowMsg = "재원변경 처리중입니다..";
  6613. callLoadingWindow(sWindowMsg);
  6614. fChangeSave(); //재원변경실행
  6615. //2010-12-17 이동식 - 선택진료 서명 체크로직 추가
  6616. fCheckSpecOrdApp();
  6617. combo6.dispatch("xforms-select");
  6618. model.refresh();
  6619. //로딩창 닫기
  6620. removeLoadingWindow();
  6621. }
  6622. }
  6623. }
  6624. ]]>
  6625. </script>
  6626. </button>
  6627. <line id="line58" class="line_6" style="x1:0px; y1:0px; x2:1194px; y2:0px; "/>
  6628. <button id="button10" class="btn3_letter3" style="left:71px; top:4px; width:68px; height:22px; ">
  6629. <caption>약정서</caption>
  6630. <script type="javascript" ev:event="DOMActivate">
  6631. <![CDATA[
  6632. //2008.01.04 재원변경관리에서 입원약정서 출력하는 조건은 입원환자의 최종내역을 찍는다.
  6633. var ptbs_inhospyn = model.getValue("/root/main/ptbs/ptbs_inhospyn");
  6634. var inpt_pid = model.getValue("/root/main/inpt/inpt_pid");
  6635. var inpt_orgordtype = model.getValue("/root/main/inpt/inpt_orgordtype");
  6636. if (ptbs_inhospyn == "Y" && inpt_pid != null && inpt_pid != " " && inpt_pid != "") {
  6637. var sDeciFlag = "I"; //default : 입원
  6638. if (inpt_orgordtype == "E" || inpt_orgordtype == "D" || inpt_orgordtype == "C") {
  6639. sDeciFlag = "C"; // 전과전실승인과 같은 로직을 타도록 수정
  6640. } else {
  6641. sDeciFlag = "I"; // 입원
  6642. }
  6643. setGlobalVariable("SPPAO00100_강제출력여부", "Y" ,"p");
  6644. fInDeciPrintlss(model.getValue("/root/main/inpt/inpt_pid"),
  6645. model.getValue("/root/main/inpt/inpt_indd"),
  6646. model.getValue("/root/main/inpt/inpt_cretno"),
  6647. model.getValue("/root/main/inpt/inpt_mskind"),
  6648. model.getValue("/root/main/inpt/inpt_orddeptcd"),
  6649. model.getValue("/root/main/inpt/inpt_medispclid"),
  6650. sDeciFlag);
  6651. setGlobalVariable("SPPAO00100_강제출력여부", "" ,"p");
  6652. } else {
  6653. messageBox("재원 중인 환자가 아닙니다.!","E999","");
  6654. return false;
  6655. }
  6656. ]]>
  6657. </script>
  6658. </button>
  6659. <button id="btn_SMASB02100" class="btn3_letter4" visibility="visible" style="left:545px; top:4px; width:80px; height:22px; ">
  6660. <caption>격리병실</caption>
  6661. <script type="javascript" ev:event="DOMActivate">
  6662. <![CDATA[
  6663. modal("SMASB02100");
  6664. ]]>
  6665. </script>
  6666. </button>
  6667. <button id="button14" class="btn3_letter4" style="left:308px; top:4px; width:116px; height:22px; ">
  6668. <caption>입원카드</caption>
  6669. <script type="javascript" ev:event="DOMActivate">
  6670. <![CDATA[
  6671. setGlobalVariable("SPPAO00100_강제출력여부", "Y" ,"p");
  6672. fInRgstCardIss();
  6673. setGlobalVariable("SPPAO00100_강제출력여부", "" ,"p");
  6674. ]]>
  6675. </script>
  6676. </button>
  6677. <button id="button4" class="btn3_letter4" style="left:627px; top:4px; width:80px; height:22px; ">
  6678. <caption>전과전실</caption>
  6679. <script type="javascript" ev:event="DOMActivate">
  6680. <![CDATA[
  6681. // 현재선택한 전과전실 데이터의 전과전실승인 프로그램으로 연동한다.
  6682. var spid = model.getValue("/root/main/ptbs/ptbs_pid");
  6683. model.setValue("/root/hidden/source/pid", spid);
  6684. modal("../../../pam/ipatmngtweb/xrw/SMPMI01600", "1","50", "50", "SMPMI01600", "/root/hidden/source/pid", "/root/hidden/source/pid");
  6685. ]]>
  6686. </script>
  6687. </button>
  6688. <button id="button36" class="btn3_letter7" style="left:710px; top:4px; width:116px; height:22px; ">
  6689. <caption>진료비상세내역</caption>
  6690. <script type="javascript" ev:event="DOMActivate">
  6691. <![CDATA[
  6692. if (model.getValue("/root/main/ptbs/ptbs_pid") == "" || model.getValue("/root/main/ptbs/ptbs_pid") == null) {
  6693. modal("../../../pam/inordamtmngtweb/xrw/SMPAI00200", "1","","", "SMPAI00200", "","");
  6694. } else {
  6695. modal("../../../pam/inordamtmngtweb/xrw/SMPAI00200", "1","","", "SMPAI00200", "/root/main/ptbs/ptbs_pid","/root/send/pid");
  6696. }
  6697. ]]>
  6698. </script>
  6699. </button>
  6700. <button id="button23" class="btn3_letter4" style="left:462px; top:4px; width:80px; height:22px; ">
  6701. <caption>선택신청</caption>
  6702. <script type="javascript" ev:event="DOMActivate">
  6703. <![CDATA[
  6704. // 입원같은 경우에는 무조건 입력을 하기때문에 기여부를 존재하는것 자체가 무의미한다.
  6705. // 하여 일단 해당 입력값들을 넘긴다음에 해당건이 존재하면 이력으로 발생을 시키고
  6706. // 없으면 입력한다.
  6707. // 넘길값들 인스턴스에 담기
  6708. /*
  6709. model.makeNode("/root/hidden/patappinfo/patappinfo1/stat");
  6710. model.makeNode("/root/hidden/patappinfo/patappinfo1/pid");
  6711. model.makeNode("/root/hidden/patappinfo/patappinfo1/hngnm");
  6712. model.makeNode("/root/hidden/patappinfo/patappinfo1/rrgstno1");
  6713. model.makeNode("/root/hidden/patappinfo/patappinfo1/rrgstno2");
  6714. model.makeNode("/root/hidden/patappinfo/patappinfo1/choiflag");
  6715. model.makeNode("/root/hidden/patappinfo/patappinfo1/ordtype");
  6716. model.makeNode("/root/hidden/patappinfo/patappinfo1/orddd");
  6717. model.makeNode("/root/hidden/patappinfo/patappinfo1/orddeptcd");
  6718. model.makeNode("/root/hidden/patappinfo/patappinfo1/orddrid");
  6719. model.makeNode("/root/hidden/patappinfo/patappinfo1/specordyn");
  6720. model.makeNode("/root/hidden/patappinfo/patappinfo1/fromdd");
  6721. model.makeNode("/root/hidden/patappinfo/patappinfo1/rsrvdd");
  6722. model.makeNode("/root/hidden/patappinfo/patappinfo1/flag");
  6723. model.setValue("/root/hidden/patappinfo/patappinfo1/stat", ""); // stat
  6724. model.setValue("/root/hidden/patappinfo/patappinfo1/pid", model.getValue("/root/main/ptbs/ptbs_pid")); // pid
  6725. model.setValue("/root/hidden/patappinfo/patappinfo1/hngnm", model.getValue("/root/main/ptbs/ptbs_hngnm")); // hngnm
  6726. model.setValue("/root/hidden/patappinfo/patappinfo1/rrgstno1", model.getValue("/root/main/ptbs/ptbs_rrgstno1")); // rrgstno1
  6727. model.setValue("/root/hidden/patappinfo/patappinfo1/rrgstno2", model.getValue("/root/main/ptbs/ptbs_rrgstno2")); // rrgstno2
  6728. model.setValue("/root/hidden/patappinfo/patappinfo1/choiflag", ""); // choiflag
  6729. model.setValue("/root/hidden/patappinfo/patappinfo1/ordtype", "I"); // ordtype
  6730. model.setValue("/root/hidden/patappinfo/patappinfo1/orddd", model.getValue("/root/main/inpt/inpt_indd")); // orddd
  6731. model.setValue("/root/hidden/patappinfo/patappinfo1/orddeptcd", model.getValue("/root/main/inpt/inpt_orddeptcd")); // orddeptcd
  6732. model.setValue("/root/hidden/patappinfo/patappinfo1/orddrid", model.getValue("/root/main/inpt/inpt_medispclid")); // orddrid
  6733. model.setValue("/root/hidden/patappinfo/patappinfo1/specordyn", "Y"); // specordyn
  6734. model.setValue("/root/hidden/patappinfo/patappinfo1/fromdd", model.getValue("/root/main/inpt/inpt_indd")); // fromdd
  6735. model.setValue("/root/hidden/patappinfo/patappinfo1/rsrvdd", ""); // rsrvdd
  6736. model.setValue("/root/hidden/patappinfo/patappinfo1/flag", "ins"); // flag(upt, ins)
  6737. // 선택진료신청화면열기
  6738. modal("../../patinfomngtweb/xrw/SMPMC06500_선택진료신청관리", "", "100", "100", "SMPMC06500","/root/hidden/patappinfo/patappinfo1","/root/main/patappinfo/patappinfo1");
  6739. model.removeNodeset("/root/hidden/patappinfo/patappinfo1");
  6740. model.refresh();
  6741. */
  6742. var s_pid = model.getValue("/root/main/ptbs/ptbs_pid");
  6743. var s_ordtype = "I";
  6744. var s_orddd = model.getValue("/root/main/inpt/inpt_indd");
  6745. var s_orddeptcd = model.getValue("/root/main/inpt/inpt_orddeptcd");
  6746. var s_orddrid = model.getValue("/root/main/inpt/inpt_medispclid");
  6747. var s_fromdd = model.getValue("/root/main/inpt/inpt_indd");
  6748. var s_cretno = model.getValue("/root/main/inpt/inpt_cretno");
  6749. var s_hngnm = model.getValue("/root/main/ptbs/ptbs_hngnm");
  6750. var s_rrgstno1 = model.getValue("/root/main/ptbs/ptbs_rrgstno1");
  6751. var s_rrgstno2 = model.getValue("/root/main/ptbs/ptbs_rrgstno2");
  6752. fCallSpecPopUp(s_pid,s_ordtype,s_orddd,s_orddeptcd,s_orddrid,s_fromdd,s_hngnm,s_rrgstno1,s_rrgstno2,s_cretno);
  6753. ]]>
  6754. </script>
  6755. </button>
  6756. <button id="button21" class="btn3_letter3" style="left:0px; top:4px; width:104px; height:22px; ">
  6757. <caption>결정서</caption>
  6758. <script type="javascript" ev:event="DOMActivate">
  6759. <![CDATA[
  6760. var inpt_pid = model.getValue("/root/main/inpt/inpt_pid");
  6761. if (!isNull(inpt_pid)) {
  6762. model.makeNode("/root/send/data41/pid");
  6763. model.makeNode("/root/send/data41/indd");
  6764. model.makeNode("/root/send/data41/orddeptcd");
  6765. model.makeNode("/root/send/data41/cretno");
  6766. model.makeNode("/root/send/data41/instcd");
  6767. model.makeNode("/root/send/data41/wardcd");
  6768. model.makeNode("/root/send/data41/roomcd");
  6769. model.makeNode("/root/send/data41/roomgrdecd");
  6770. model.makeNode("/root/send/data41/fromdd");
  6771. model.setValue("/root/send/data41/pid", model.getValue("/root/main/inpt/inpt_pid"));
  6772. model.setValue("/root/send/data41/indd", model.getValue("/root/main/inpt/inpt_indd"));
  6773. model.setValue("/root/send/data41/orddeptcd", model.getValue("/root/main/inpt/inpt_orddeptcd"));
  6774. model.setValue("/root/send/data41/cretno", model.getValue("/root/main/inpt/inpt_cretno"));
  6775. model.setValue("/root/send/data41/instcd", model.getValue("/root/main/inpt/inpt_instcd"));
  6776. model.setValue("/root/send/data41/wardcd", model.getValue("/root/main/icdr/icdr_wardcd"));
  6777. model.setValue("/root/send/data41/roomcd", model.getValue("/root/main/icdr/icdr_roomcd"));
  6778. model.setValue("/root/send/data41/roomgrdecd", model.getValue("/root/main/icdr/icdr_roomgrdecd"));
  6779. model.setValue("/root/send/data41/fromdd", model.getValue("/root/main/icdr/icdr_fromdd"));
  6780. submit("TRPMI01202");
  6781. model.makeValue("/root/hidden/rsltflag/patappinfo1/signimgsign", model.getValue("/root/hidden/rsltflag/patappinfo1/elctappsigncnts"));
  6782. model.makeValue("/root/hidden/rsltflag/patappinfo1/signimgrela", model.getValue("/root/hidden/rsltflag/patappinfo1/elctapprelacnts"));
  6783. // 상급병실 신청내역 있을경우 기존 병실정보에 엎어서 출력.
  6784. if (model.getValue("/root/hidden/rsltflag/patappinfo1/wardnm") != "" && model.getValue("/root/hidden/rsltflag/patappinfo1/wardnm") != null) {
  6785. model.setValue("/root/hidden/rsltflag/indeciprint/wardnm", model.getValue("/root/hidden/rsltflag/patappinfo1/wardnm"));
  6786. model.setValue("/root/hidden/rsltflag/indeciprint/roomcd", model.getValue("/root/hidden/rsltflag/patappinfo1/roomcd"));
  6787. model.setValue("/root/hidden/rsltflag/indeciprint/bedcnt", model.getValue("/root/hidden/rsltflag/patappinfo1/bedcnt"));
  6788. model.setValue("/root/hidden/rsltflag/indeciprint/diffamt", model.getValue("/root/hidden/rsltflag/patappinfo1/extrapay"));
  6789. }
  6790. // 전과전실 선택진료 사인 추가 2011.11.17 노회식
  6791. model.makeValue("/root/hidden/rsltflag/patappinfo1/signimgsign1", model.getValue("/root/hidden/rsltflag/patappinfo1/elctsigncnts1"));
  6792. model.makeValue("/root/hidden/rsltflag/patappinfo1/signimgrela1", model.getValue("/root/hidden/rsltflag/patappinfo1/elctsigncnts2"));
  6793. setGlobalVariable("SPPAO00100_강제출력여부", "Y" ,"p");
  6794. fInDeciPrint2();
  6795. setGlobalVariable("SPPAO00100_강제출력여부", "" ,"p");
  6796. } else {
  6797. messageBox("검색된 입원환자가 없습니다.","E");
  6798. return false;
  6799. }
  6800. ]]>
  6801. </script>
  6802. </button>
  6803. <button id="button22" class="btn3_letter4" style="left:142px; top:4px; width:80px; height:22px; ">
  6804. <caption>상급병실</caption>
  6805. <script type="javascript" ev:event="DOMActivate">
  6806. <![CDATA[
  6807. fUpRoomSignMngt(model.getValue("/root/main/inpt/inpt_pid"), model.getValue("/root/main/inpt/inpt_indd"), "N");
  6808. ]]>
  6809. </script>
  6810. </button>
  6811. <button id="button25" class="btn3_letter7" style="left:829px; top:4px; width:128px; height:22px; ">
  6812. <caption>자보산재동의서</caption>
  6813. <script type="javascript" ev:event="DOMActivate">
  6814. <![CDATA[
  6815. var insukind = model.getValue("/root/main/iphs/iphs_insukind");
  6816. if (insukind != '31' && insukind != '41') {
  6817. messageBox("자보 또는 산재의 경우만 출력가능합니다.", "C000");
  6818. return;
  6819. }
  6820. if (insukind == "31") {
  6821. //자보환자안내문 출력
  6822. fAutoPrint();
  6823. } else if (insukind == "41") {
  6824. //산재환자안내문 출력
  6825. fIndPrint();
  6826. }
  6827. ]]>
  6828. </script>
  6829. </button>
  6830. </group>
  6831. <select1 id="cmb_building" ref="/root/hidden/building1" class="combo_default" visibility="hidden" appearance="minimal" style="left:945px; top:660px; width:35px; height:19px; ">
  6832. <choices>
  6833. <item>
  6834. <label>-</label>
  6835. <value>-</value>
  6836. </item>
  6837. <item>
  6838. <label>본관</label>
  6839. <value>M</value>
  6840. </item>
  6841. <item>
  6842. <label>별관</label>
  6843. <value>S</value>
  6844. </item>
  6845. </choices>
  6846. <script type="javascript" ev:event="xforms-select">
  6847. <![CDATA[
  6848. var sBuilding = model.getValue("/root/hidden/building1");
  6849. if (sBuilding != null) {
  6850. combo5.choices.itemset.attribute("nodeset") = "/root/hidden/init/wardcd[build = '" + sBuilding + "' ]";
  6851. combo5.refresh();
  6852. }
  6853. ]]>
  6854. </script>
  6855. </select1>
  6856. <select1 id="combo14" ref="/root/hidden/building2" class="combo_default" visibility="hidden" appearance="minimal" style="left:945px; top:708px; width:35px; height:19px; ">
  6857. <choices>
  6858. <item>
  6859. <label>-</label>
  6860. <value>-</value>
  6861. </item>
  6862. <item>
  6863. <label>본관</label>
  6864. <value>M</value>
  6865. </item>
  6866. <item>
  6867. <label>별관</label>
  6868. <value>S</value>
  6869. </item>
  6870. </choices>
  6871. <script type="javascript" ev:event="xforms-select">
  6872. <![CDATA[
  6873. var sBuilding = model.getValue("/root/hidden/building2");
  6874. if (sBuilding != null) {
  6875. combo13.choices.itemset.attribute("nodeset") = "/root/hidden/init/wardcd[build = '" + sBuilding + "' ]";
  6876. combo13.refresh();
  6877. }
  6878. ]]>
  6879. </script>
  6880. </select1>
  6881. </xhtml:body>
  6882. </xhtml:html>