SMADT30100_마약향정처방관리.xfdl 278 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SMADT30100" position="absolute 0 0 1213 785" titletext="마약/향정약 처방관리" oninit="SMADT30100_oninit" onload="SMADT30100_onload" ontimer="SMADT30100_ontimer">
  5. <Layouts>
  6. <Layout>
  7. <Shape id="line02" class="line_10" position="absolute 0 243 1211 249" anchor="left top right"/>
  8. <Div id="grp_srch" taborder="50" position="absolute 0 25 776 216" class="div_SA"/>
  9. <Tab id="switch1" taborder="49" tabindex="0" class="tab_Normal" position="absolute 0 235 1211 754" anchor="all">
  10. <Tabpages>
  11. <Tabpage id="case1">
  12. <Layouts>
  13. <Layout>
  14. <Grid id="grd_narclist" class="datagrid2" taborder="0" binddataset="ds_main_narclist_narclist" useinputpanel="false" position="absolute 0 0 1211 506" cellclickbound="cell" selecttype="multirow" anchor="all" cellsizingtype="col" onkeyup="switch1_grd_onkeyup" oncelldblclick="switch1_case1_grd_narclist_oncelldblclick" onrbuttonup="switch1_case1_grd_narclist_onrbuttonup" cellsizebandtype="allband" autoenter="key" onheadclick="switch1_case1_grd_narclist_onheadclick">
  15. <Formats>
  16. <Format id="default">
  17. <Columns>
  18. <Column size="30" band="left"/>
  19. <Column size="20" band="left"/>
  20. <Column size="56" band="left"/>
  21. <Column size="33" band="left"/>
  22. <Column size="54" band="left"/>
  23. <Column size="55" band="left"/>
  24. <Column size="67" band="left"/>
  25. <Column size="50" band="left"/>
  26. <Column size="50" band="left"/>
  27. <Column size="70" band="left"/>
  28. <Column size="40" band="left"/>
  29. <Column size="62" band="left"/>
  30. <Column size="50" band="left"/>
  31. <Column size="74"/>
  32. <Column size="150"/>
  33. <Column size="28"/>
  34. <Column size="30"/>
  35. <Column size="36"/>
  36. <Column size="29"/>
  37. <Column size="35"/>
  38. <Column size="31"/>
  39. <Column size="40"/>
  40. <Column size="28"/>
  41. <Column size="40"/>
  42. <Column size="29"/>
  43. <Column size="28"/>
  44. <Column size="32"/>
  45. <Column size="28"/>
  46. <Column size="28"/>
  47. <Column size="29"/>
  48. <Column size="32"/>
  49. <Column size="35"/>
  50. <Column size="8"/>
  51. <Column size="70"/>
  52. <Column size="8"/>
  53. <Column size="80"/>
  54. <Column size="70"/>
  55. <Column size="8"/>
  56. <Column size="0"/>
  57. <Column size="0"/>
  58. <Column size="70"/>
  59. <Column size="9"/>
  60. <Column size="70"/>
  61. <Column size="9"/>
  62. <Column size="70"/>
  63. <Column size="9"/>
  64. <Column size="70"/>
  65. <Column size="0"/>
  66. <Column size="0"/>
  67. <Column size="7"/>
  68. <Column size="70"/>
  69. <Column size="100"/>
  70. <Column size="7"/>
  71. <Column size="85"/>
  72. <Column size="7"/>
  73. <Column size="85"/>
  74. <Column size="0"/>
  75. <Column size="0"/>
  76. <Column size="0"/>
  77. <Column size="0"/>
  78. <Column size="0"/>
  79. <Column size="0"/>
  80. <Column size="0"/>
  81. <Column size="0"/>
  82. <Column size="0"/>
  83. <Column size="0"/>
  84. <Column size="0"/>
  85. <Column size="0"/>
  86. <Column size="0"/>
  87. <Column size="0"/>
  88. <Column size="0"/>
  89. <Column size="0"/>
  90. <Column size="0"/>
  91. <Column size="0"/>
  92. <Column size="0"/>
  93. </Columns>
  94. <Rows>
  95. <Row size="30" band="head"/>
  96. <Row size="24"/>
  97. </Rows>
  98. <Band id="head">
  99. <Cell/>
  100. <Cell col="1" displaytype="checkbox" edittype="checkbox"/>
  101. <Cell col="2" text="불출상태" wordwrap="char"/>
  102. <Cell col="3" text="처방&#10;상태" wordwrap="char"/>
  103. <Cell col="4" text="반환상태" wordwrap="char"/>
  104. <Cell col="5" text="반납상태" wordwrap="char"/>
  105. <Cell col="6" text="처방일자" wordwrap="char"/>
  106. <Cell col="7" text="투약번호" wordwrap="char"/>
  107. <Cell col="8" text="처방구분" wordwrap="char"/>
  108. <Cell col="9" text="수행부서" wordwrap="char"/>
  109. <Cell col="10" text="병실" wordwrap="char"/>
  110. <Cell col="11" text="환자번호" wordwrap="char"/>
  111. <Cell col="12" text="환자명" wordwrap="char"/>
  112. <Cell col="13" text="약품코드" wordwrap="char"/>
  113. <Cell col="14" text="약품명" wordwrap="char"/>
  114. <Cell col="15" colspan="2" text="총량" wordwrap="char" taborder="undefined"/>
  115. <Cell col="17" colspan="2" text="일수량" wordwrap="char" taborder="undefined"/>
  116. <Cell col="19" colspan="2" text="1회수량" wordwrap="char" taborder="undefined"/>
  117. <Cell col="21" colspan="2" text="일용량" wordwrap="char" taborder="undefined"/>
  118. <Cell col="23" colspan="2" text="1회용량" wordwrap="char" taborder="undefined"/>
  119. <Cell col="25" text="횟수" wordwrap="char"/>
  120. <Cell col="26" colspan="2" text="잔량" wordwrap="char" taborder="undefined"/>
  121. <Cell col="28" colspan="2" text="반환횟수" wordwrap="char" taborder="undefined"/>
  122. <Cell col="30" colspan="2" text="반환수량" wordwrap="char" taborder="undefined"/>
  123. <Cell col="32" style="align:left;padding:0 0 0 8;" text="불출신청일자" wordwrap="char"/>
  124. <Cell col="33" text="불출&#10;신청자" wordwrap="char"/>
  125. <Cell col="34" style="align:left;padding:0 0 0 8;" text="조제일시" wordwrap="char"/>
  126. <Cell col="35" text="출고부서"/>
  127. <Cell col="36" text="조제&#10;약사" wordwrap="char"/>
  128. <Cell col="37" style="align:left;padding:0 0 0 8;" text="투약일시" wordwrap="char"/>
  129. <Cell col="38" text="투약&#10;약사" wordwrap="char"/>
  130. <Cell col="39" text="수령일시" wordwrap="char"/>
  131. <Cell col="40" text="수령&#10;담당자" wordwrap="char"/>
  132. <Cell col="41" style="align:left;padding:0 0 0 8;" text="병동수령일시" wordwrap="char"/>
  133. <Cell col="42" text="부서확인&#10;간호사" wordwrap="char"/>
  134. <Cell col="43" style="align:left;padding:0 0 0 8;" text="간호투약일시" wordwrap="char"/>
  135. <Cell col="44" text="간호투약&#10;간호사" wordwrap="char"/>
  136. <Cell col="45" style="align:left;padding:0 0 0 8;" text="반환신청일시" wordwrap="char"/>
  137. <Cell col="46" text="반환신청&#10;간호사" wordwrap="char"/>
  138. <Cell col="47" text="반환일시" wordwrap="char"/>
  139. <Cell col="48" text="반환&#10;담당자" wordwrap="char"/>
  140. <Cell col="49" style="align:left;padding:0 0 0 8;" text="반환확인일시" wordwrap="char"/>
  141. <Cell col="50" text="반환확인&#10;약사" wordwrap="char"/>
  142. <Cell col="51" text="반환사유" wordwrap="char"/>
  143. <Cell col="52" style="align:left;padding:0 0 0 8;" text="잔량반납&#10;신청일시" wordwrap="char"/>
  144. <Cell col="53" text="잔량반납신청&#10;간호사" wordwrap="char"/>
  145. <Cell col="54" style="align:left;padding:0 0 0 8;" text="잔량반납&#10;확인일시" wordwrap="char"/>
  146. <Cell col="55" text="잔량반납확인&#10;약사" wordwrap="char"/>
  147. <Cell col="56" text="prcpno"/>
  148. <Cell col="57" text="prcphistno"/>
  149. <Cell col="58" text="drugdd"/>
  150. <Cell col="59" text="drugno"/>
  151. <Cell col="60" text="ioflag"/>
  152. <Cell col="61" text="instcd"/>
  153. <Cell col="62" text="narcflag"/>
  154. <Cell col="63" text="prntflag"/>
  155. <Cell col="64" text="orddd"/>
  156. <Cell col="65" text="orddeptcd"/>
  157. <Cell col="66" text="prcpgenrflag"/>
  158. <Cell col="67" text="prntdt"/>
  159. <Cell col="68" text="caption1"/>
  160. <Cell col="69" text="반납반환&#10;표시여부"/>
  161. <Cell col="70" text="투약기록&#10;완료여부"/>
  162. <Cell col="71" text="간호&#10;실시횟수"/>
  163. <Cell col="72" text="간호&#10;반환횟수"/>
  164. <Cell col="73" text="투약x반환불가&#10;횟수"/>
  165. <Cell col="74"/>
  166. </Band>
  167. <Band id="body">
  168. <Cell celltype="head" text="expr:currow+1"/>
  169. <Cell col="1" displaytype="checkbox" edittype="expr:utlf_isNull(getColumn(currow, 'narcstat')) || getColumn(currow, 'narcstat') == '1' ? 'none' : 'checkbox'" style="background2:#f0f0f0ff;controlbackground:EXPR(utlf_isNull(getColumn(currow, 'narcstat')) || getColumn(currow, 'narcstat') == '1' ? 'silver' : '');controlborder:EXPR(utlf_isNull(getColumn(currow, 'narcstat')) || getColumn(currow, 'narcstat') == '1' ? '1 solid #708090cc' : ''));" text="bind:sel" expr="expr:(sel==&quot;Y&quot;||sel==1)?1:0"/>
  170. <Cell col="2" displaytype="combo" edittype="combo" style="align:left top;padding:4 2 3 2;background2:#f0f0f0ff;" text="bind:narcstat" wordwrap="char" combodataset="ds_cmb_narcstat" combocodecol="value" combodatacol="label" autosizerow="limitmin"/>
  171. <Cell col="3" style="align:center top;padding:4 2 3 2;background2:#f0f0f0ff;" text="bind:prcphistcd" wordwrap="char" autosizerow="limitmin"/>
  172. <Cell col="4" displaytype="combo" edittype="combo" style="align:left top;padding:4 2 3 2;background2:#f0f0f0ff;" text="bind:cnclstat" wordwrap="char" combodataset="ds_cmb_cnclstat" combocodecol="value" combodatacol="label" autosizerow="limitmin"/>
  173. <Cell col="5" displaytype="combo" edittype="combo" style="align:left top;padding:4 2 3 2;background2:#f0f0f0ff;" text="bind:rtnstat" wordwrap="char" combodataset="ds_cmb_rtnstat" combocodecol="value" combodatacol="label" autosizerow="limitmin"/>
  174. <Cell col="6" style="align:left top;padding:4 2 3 2;background2:#f0f0f0ff;" text="bind:prcpdd" wordwrap="char" mask="expr:utlf_isNull(prcpdd) || prcpdd=='-' ? '' : '####/##/##'" autosizerow="limitmin"/>
  175. <Cell col="7" displaytype="text" style="align:center top;padding:4 2 3 2;background2:#f0f0f0ff;" text="bind:drugno" wordwrap="char" autosizerow="limitmin"/>
  176. <Cell col="8" style="align:left top;padding:4 2 3 2;background2:#f0f0f0ff;" text="bind:prcpkindnm" wordwrap="char" autosizerow="limitmin"/>
  177. <Cell col="9" style="align:left top;padding:4 2 3 2;background2:#f0f0f0ff;" text="bind:issdeptcdnm" wordwrap="char" autosizerow="limitmin"/>
  178. <Cell col="10" style="align:left top;padding:4 2 3 2;background2:#f0f0f0ff;" text="bind:roomcd" wordwrap="char" autosizerow="limitmin"/>
  179. <Cell col="11" style="align:left top;padding:4 2 3 2;background2:#f0f0f0ff;color:EXPR(dethyn == 'Y' ? '#0000ff' : '');font:EXPR(dethyn == 'Y' ? 'dotum,9,bold' : '');" text="bind:pid" wordwrap="char" tooltiptext="expr:dethyn == 'Y' ? '사망일자:' + dethdd : ''" autosizerow="limitmin"/>
  180. <Cell col="12" style="align:left top;padding:4 2 3 2;background2:#f0f0f0ff;color:EXPR(dethyn == 'Y' ? '#0000ff' : '');font:EXPR(dethyn == 'Y' ? 'dotum,9,bold' : '');" text="bind:patnm" wordwrap="char" tooltiptext="expr:dethyn == 'Y' ? '사망일자:' + dethdd : ''" autosizerow="limitmin"/>
  181. <Cell col="13" displaytype="text" style="align:left top;padding:4 2 3 2;background2:#f0f0f0ff;" text="bind:prcpcd" wordwrap="char" autosizerow="limitmin"/>
  182. <Cell col="14" displaytype="text" style="align:left top;padding:4 2 1 2;background2:#f0f0f0ff;" text="bind:drugnm" wordwrap="char" autosizerow="limitmin"/>
  183. <Cell col="15" style="align:right;padding:0 2 0 0;background2:#f0f0f0ff;" text="bind:totdrugqty"/>
  184. <Cell col="16" style="background2:#f0f0f0ff;" text="bind:prcpqtyunit"/>
  185. <Cell col="17" style="align:right;padding:0 2 0 0;background2:#f0f0f0ff;" text="bind:dayprcpqty"/>
  186. <Cell col="18" style="background2:#f0f0f0ff;" text="bind:dayprcpqtyunit"/>
  187. <Cell col="19" style="align:right;padding:0 2 0 0;background2:#f0f0f0ff;" text="bind:prcpqty2"/>
  188. <Cell col="20" style="background2:#f0f0f0ff;" text="bind:prcpqtyunit2"/>
  189. <Cell col="21" style="align:right;padding:0 2 0 0;background2:#f0f0f0ff;" text="bind:prcpvol"/>
  190. <Cell col="22" style="background2:#f0f0f0ff;" text="bind:prcpvolunit"/>
  191. <Cell col="23" style="align:right;padding:0 2 0 0;background2:#f0f0f0ff;" text="bind:prcpvol2"/>
  192. <Cell col="24" style="background2:#f0f0f0ff;" text="bind:prcpvolunit2"/>
  193. <Cell col="25" style="align:right;padding:0 2 0 0;background2:#f0f0f0ff;" text="bind:prcptims"/>
  194. <Cell col="26" style="align:right;padding:0 2 0 0;background2:#f0f0f0ff;" text="bind:spreqty"/>
  195. <Cell col="27" style="background2:#f0f0f0ff;" text="bind:prcpvolunit"/>
  196. <Cell col="28" style="align:right;padding:0 2 0 0;background2:#f0f0f0ff;" text="bind:rtnqty" mask="99999999999"/>
  197. <Cell col="29" style="background2:#f0f0f0ff;" text="bind:rtnunit"/>
  198. <Cell col="30" style="align:right;padding:0 2 0 0;background2:#f0f0f0ff;" text="bind:returnqty"/>
  199. <Cell col="31" style="background2:#f0f0f0ff;" text="bind:prcpqtyunit"/>
  200. <Cell col="32" style="background2:#f0f0f0ff;" text="bind:reqdt" mask="expr:utlf_isNull(reqdt) || reqdt=='-' ? '' : '####/##/## ##:##'"/>
  201. <Cell col="33" style="background2:#f0f0f0ff;" text="bind:reqidnm"/>
  202. <Cell col="34" style="background2:#f0f0f0ff;" text="bind:prcpdt" mask="expr:utlf_isNull(prcpdt) || prcpdt=='-' ? '' : '####/##/## ##:##'"/>
  203. <Cell col="35" displaytype="combo" style="background2:#f0f0f0ff;" text="bind:stocdeptcd" combodataset="ds_init_misdeptlist_deptlist" combocodecol="deptcd" combodatacol="deptnm"/>
  204. <Cell col="36" style="background2:#f0f0f0ff;" text="bind:prcpidnm"/>
  205. <Cell col="37" style="background2:#f0f0f0ff;" text="bind:drugdt" mask="expr:utlf_isNull(drugdt) || drugdt=='-' ? '' : '####/##/## ##:##'"/>
  206. <Cell col="38" style="background2:#f0f0f0ff;" text="bind:drugidnm"/>
  207. <Cell col="39" style="background2:#f0f0f0ff;" text="bind:delivedt" mask="expr:utlf_isNull(delivedt) || delivedt=='-' ? '' : '####/##/##'"/>
  208. <Cell col="40" style="background2:#f0f0f0ff;" text="bind:deliveidnm"/>
  209. <Cell col="41" style="background2:#f0f0f0ff;" text="bind:acptdt" mask="expr:utlf_isNull(acptdt) || acptdt=='-' ? '' : '####/##/## ##:##'"/>
  210. <Cell col="42" style="background2:#f0f0f0ff;" text="bind:acptidnm"/>
  211. <Cell col="43" style="background2:#f0f0f0ff;" text="bind:nrexecdt" mask="expr:utlf_isNull(nrexecdt) || nrexecdt=='-' ? '' : '####/##/## ##:##'"/>
  212. <Cell col="44" style="background2:#f0f0f0ff;" text="bind:nrexecridnm"/>
  213. <Cell col="45" style="background2:#f0f0f0ff;" text="bind:rtnappdt" mask="expr:utlf_isNull(rtnappdt) || rtnappdt=='-' ? '' : '####/##/## ##:##'"/>
  214. <Cell col="46" style="background2:#f0f0f0ff;" text="bind:rtnappidnm"/>
  215. <Cell col="47" style="background2:#f0f0f0ff;" text="bind:rtndt" mask="expr:utlf_isNull(rtndt) || rtndt=='-' ? '' : '####/##/##''"/>
  216. <Cell col="48" style="background2:#f0f0f0ff;" text="bind:rtnidnm"/>
  217. <Cell col="49" style="background2:#f0f0f0ff;" text="bind:rtncnfmdt" mask="expr:utlf_isNull(rtncnfmdt) || rtncnfmdt=='-' ? '' : '####/##/## ##:##'"/>
  218. <Cell col="50" style="background2:#f0f0f0ff;" text="bind:rtncnfmidnm"/>
  219. <Cell col="51" displaytype="text" style="background2:#f0f0f0ff;" text="bind:rtnresn"/>
  220. <Cell col="52" style="background2:#f0f0f0ff;" text="bind:spredt" mask="expr:utlf_isNull(spredt) || spredt=='-' ? '' : '####/##/## ##:##'"/>
  221. <Cell col="53" style="background2:#f0f0f0ff;" text="bind:spreidnm"/>
  222. <Cell col="54" style="background2:#f0f0f0ff;" text="bind:sprecnfmdt" mask="expr:utlf_isNull(sprecnfmdt) || sprecnfmdt=='-' ? '' : '####/##/## ##:##'"/>
  223. <Cell col="55" style="background2:#f0f0f0ff;" text="bind:sprecnfmidnm"/>
  224. <Cell col="56" text="bind:prcpno"/>
  225. <Cell col="57" text="bind:prcphistno"/>
  226. <Cell col="58" text="bind:drugdd"/>
  227. <Cell col="59" text="bind:drugno"/>
  228. <Cell col="60" text="bind:ioflag"/>
  229. <Cell col="61" text="bind:instcd"/>
  230. <Cell col="62" text="bind:narcflag"/>
  231. <Cell col="63" text="bind:prntflag"/>
  232. <Cell col="64" text="bind:orddd"/>
  233. <Cell col="65" text="bind:orddeptcd"/>
  234. <Cell col="66" text="bind:prcpgenrflag"/>
  235. <Cell col="67" text="bind:prntdt"/>
  236. <Cell col="68" text="bind:presqty2"/>
  237. <Cell col="69" text="bind:statvisible"/>
  238. <Cell col="70" text="bind:medrendyn"/>
  239. <Cell col="71" text="bind:medrqty"/>
  240. <Cell col="72" text="bind:medrtims"/>
  241. <Cell col="73" text="bind:medrx"/>
  242. <Cell col="74" text="bind:drugseqno"/>
  243. </Band>
  244. </Format>
  245. </Formats>
  246. </Grid>
  247. </Layout>
  248. </Layouts>
  249. </Tabpage>
  250. <Tabpage id="case2">
  251. <Layouts>
  252. <Layout>
  253. <Grid id="grd_sprelist" class="datagrid2" taborder="1" binddataset="ds_main_narclist_narclist" useinputpanel="false" position="absolute 0 0 1211 506" cellclickbound="cell" selecttype="multirow" anchor="all" cellsizingtype="col" onkeyup="switch1_grd_onkeyup" extendsizetype="row" autosizingtype="row" cellsizebandtype="allband">
  254. <Formats>
  255. <Format id="default">
  256. <Columns>
  257. <Column size="30" band="left"/>
  258. <Column size="20" band="left"/>
  259. <Column size="60" band="left"/>
  260. <Column size="80" band="left"/>
  261. <Column size="65" band="left"/>
  262. <Column size="58" band="left"/>
  263. <Column size="90"/>
  264. <Column size="150"/>
  265. <Column size="50"/>
  266. <Column size="33"/>
  267. <Column size="34"/>
  268. <Column size="26"/>
  269. <Column size="50"/>
  270. <Column size="29"/>
  271. <Column size="34"/>
  272. <Column size="50"/>
  273. <Column size="34"/>
  274. <Column size="100"/>
  275. <Column size="65"/>
  276. <Column size="100"/>
  277. <Column size="62"/>
  278. <Column size="0"/>
  279. <Column size="0"/>
  280. <Column size="0"/>
  281. <Column size="0"/>
  282. <Column size="0"/>
  283. <Column size="0"/>
  284. <Column size="0"/>
  285. <Column size="0"/>
  286. <Column size="0"/>
  287. <Column size="0"/>
  288. <Column size="0"/>
  289. </Columns>
  290. <Rows>
  291. <Row size="30" band="head"/>
  292. <Row size="24"/>
  293. </Rows>
  294. <Band id="head">
  295. <Cell/>
  296. <Cell col="1" displaytype="checkbox" edittype="checkbox"/>
  297. <Cell col="2" text="상태"/>
  298. <Cell col="3" text="처방일자"/>
  299. <Cell col="4" text="환자번호"/>
  300. <Cell col="5" text="환자명"/>
  301. <Cell col="6" text="약품코드"/>
  302. <Cell col="7" text="약품명"/>
  303. <Cell col="8" colspan="2" text="총량" taborder="undefined"/>
  304. <Cell col="10" colspan="2" text="일수량" taborder="undefined"/>
  305. <Cell col="12" colspan="2" text="일용량" taborder="undefined"/>
  306. <Cell col="14" text="횟수"/>
  307. <Cell col="15" colspan="2" text="잔량" taborder="undefined"/>
  308. <Cell col="17" text="반납신청일시"/>
  309. <Cell col="18" text="반납신청&#10;담당자"/>
  310. <Cell col="19" text="반납확인일시"/>
  311. <Cell col="20" text="반납확인&#10;담당자"/>
  312. <Cell col="21" text="prcpno"/>
  313. <Cell col="22" text="prcphistno"/>
  314. <Cell col="23" text="drugdd"/>
  315. <Cell col="24" text="drugno"/>
  316. <Cell col="25" text="ioflag"/>
  317. <Cell col="26" text="instcd"/>
  318. <Cell col="27" text="narcflag"/>
  319. <Cell col="28" text="prntflag"/>
  320. <Cell col="29" text="orddd"/>
  321. <Cell col="30" text="orddeptcd"/>
  322. <Cell col="31" text="prcpgenrflag"/>
  323. </Band>
  324. <Band id="body">
  325. <Cell celltype="head" text="expr:currow+1"/>
  326. <Cell col="1" displaytype="checkbox" edittype="expr:utlf_isNull(getColumn(currow, 'narcstat')) || getColumn(currow, 'narcstat') == '1' ? 'none' : 'checkbox'" style="background2:#f0f0f0ff;controlbackground:EXPR(utlf_isNull(getColumn(currow, 'narcstat')) || getColumn(currow, 'narcstat') == '1' ? 'silver' : '');controlborder:EXPR(utlf_isNull(getColumn(currow, 'narcstat')) || getColumn(currow, 'narcstat') == '1' ? '1 solid #708090cc' : ''));" text="bind:sel" expr="expr:(sel==&quot;Y&quot;||sel==1)?1:0"/>
  327. <Cell col="2" displaytype="combo" edittype="combo" style="padding:3 2 3 2;background2:#f0f0f0ff;" text="bind:narcstat" wordwrap="char" combodataset="ds_cmb_narcstat2" combocodecol="value" combodatacol="label" autosizerow="limitmin"/>
  328. <Cell col="3" style="padding:3 2 3 2;background2:#f0f0f0ff;" text="bind:prcpdd" wordwrap="char" mask="expr:utlf_isNull(prcpdd) || prcpdd=='-' ? '' : '####/##/##'" autosizerow="limitmin"/>
  329. <Cell col="4" style="padding:3 2 3 2;background2:#f0f0f0ff;" text="bind:pid" wordwrap="char" autosizerow="limitmin"/>
  330. <Cell col="5" style="padding:3 2 3 2;background2:#f0f0f0ff;" text="bind:patnm" wordwrap="char" autosizerow="limitmin"/>
  331. <Cell col="6" displaytype="text" style="padding:3 2 3 2;background2:#f0f0f0ff;" text="bind:prcpcd" wordwrap="char" autosizerow="limitmin"/>
  332. <Cell col="7" displaytype="text" style="padding:3 2 3 2;background2:#f0f0f0ff;" text="bind:drugnm" wordwrap="char" autosizerow="limitmin"/>
  333. <Cell col="8" style="align:right;padding:0 2 0 0;background2:#f0f0f0ff;" text="bind:totdrugqty"/>
  334. <Cell col="9" style="background2:#f0f0f0ff;" text="bind:prcpqtyunit"/>
  335. <Cell col="10" style="align:right;padding:0 2 0 0;background2:#f0f0f0ff;" text="bind:dayprcpqty"/>
  336. <Cell col="11" style="background2:#f0f0f0ff;" text="bind:prcpqtyunit"/>
  337. <Cell col="12" style="align:right;padding:0 2 0 0;background2:#f0f0f0ff;" text="bind:prcpvol"/>
  338. <Cell col="13" style="background2:#f0f0f0ff;" text="bind:prcpvolunit"/>
  339. <Cell col="14" style="align:right;padding:0 2 0 0;background2:#f0f0f0ff;" text="bind:prcptims"/>
  340. <Cell col="15" style="align:right;padding:0 2 0 0;background2:#f0f0f0ff;" text="bind:spreqty"/>
  341. <Cell col="16" style="background2:#f0f0f0ff;" text="bind:prcpvolunit"/>
  342. <Cell col="17" style="background2:#f0f0f0ff;" text="bind:spredt" mask="expr:utlf_isNull(spredt) || spredt=='-' ? '' : '####/##/## ##:##'"/>
  343. <Cell col="18" style="background2:#f0f0f0ff;" text="bind:spreidnm"/>
  344. <Cell col="19" style="background2:#f0f0f0ff;" text="bind:sprecnfmdt" mask="expr:utlf_isNull(sprecnfmdt) || sprecnfmdt=='-' ? '' : '####/##/## ##:##'"/>
  345. <Cell col="20" style="background2:#f0f0f0ff;" text="bind:sprecnfmidnm"/>
  346. <Cell col="21" text="bind:prcpno"/>
  347. <Cell col="22" text="bind:prcphistno"/>
  348. <Cell col="23" text="bind:drugdd"/>
  349. <Cell col="24" text="bind:drugno"/>
  350. <Cell col="25" text="bind:ioflag"/>
  351. <Cell col="26" text="bind:instcd"/>
  352. <Cell col="27" text="bind:narcflag"/>
  353. <Cell col="28" text="bind:prntflag"/>
  354. <Cell col="29" text="bind:orddd"/>
  355. <Cell col="30" text="bind:orddeptcd"/>
  356. <Cell col="31" text="bind:prcpgenrflag"/>
  357. </Band>
  358. </Format>
  359. </Formats>
  360. </Grid>
  361. <ActiveX id="CommAX" position="absolute 270 155 315 200" progid="{B721F534-D025-466B-8A28-7CF40E700ACD}" useautobitmapcache="1" anchor="default" taborder="2" visible="false"/>
  362. </Layout>
  363. </Layouts>
  364. </Tabpage>
  365. <Tabpage id="case3">
  366. <Layouts>
  367. <Layout>
  368. <Grid id="grd_outnarc" class="datagrid2" taborder="0" binddataset="ds_main_narclist_narclist" useinputpanel="false" position="absolute 0 0 1211 506" cellclickbound="cell" selecttype="multirow" anchor="all" cellsizingtype="col" onkeyup="switch1_grd_onkeyup" extendsizetype="row" autosizingtype="row" cellsizebandtype="allband" oncelldblclick="switch1_case3_grd_outnarc_oncelldblclick" onrbuttonup="switch1_case3_grd_outnarc_onrbuttonup" ontextchanged="switch1_case3_grd_outnarc_ontextchanged" autoenter="key" onheadclick="switch1_case3_grd_outnarc_onheadclick">
  369. <Formats>
  370. <Format id="default">
  371. <Columns>
  372. <Column size="30" band="left"/>
  373. <Column size="20" band="left"/>
  374. <Column size="65" band="left"/>
  375. <Column size="40" band="left"/>
  376. <Column size="70" band="left"/>
  377. <Column size="70" band="left"/>
  378. <Column size="53" band="left"/>
  379. <Column size="50" band="left"/>
  380. <Column size="52" band="left"/>
  381. <Column size="70" band="left"/>
  382. <Column size="80" band="left"/>
  383. <Column size="65" band="left"/>
  384. <Column size="61" band="left"/>
  385. <Column size="90"/>
  386. <Column size="150"/>
  387. <Column size="40"/>
  388. <Column size="35"/>
  389. <Column size="40"/>
  390. <Column size="35"/>
  391. <Column size="40"/>
  392. <Column size="35"/>
  393. <Column size="40"/>
  394. <Column size="35"/>
  395. <Column size="40"/>
  396. <Column size="35"/>
  397. <Column size="30"/>
  398. <Column size="30"/>
  399. <Column size="40"/>
  400. <Column size="35"/>
  401. <Column size="55"/>
  402. <Column size="35"/>
  403. <Column size="40"/>
  404. <Column size="35"/>
  405. <Column size="8"/>
  406. <Column size="70"/>
  407. <Column size="8"/>
  408. <Column size="80"/>
  409. <Column size="70"/>
  410. <Column size="0"/>
  411. <Column size="0"/>
  412. <Column size="8"/>
  413. <Column size="70"/>
  414. <Column size="7"/>
  415. <Column size="70"/>
  416. <Column size="10"/>
  417. <Column size="70"/>
  418. <Column size="10"/>
  419. <Column size="70"/>
  420. <Column size="100"/>
  421. <Column size="6"/>
  422. <Column size="85"/>
  423. <Column size="7"/>
  424. <Column size="85"/>
  425. <Column size="0"/>
  426. <Column size="0"/>
  427. <Column size="0"/>
  428. <Column size="0"/>
  429. <Column size="0"/>
  430. <Column size="0"/>
  431. <Column size="0"/>
  432. <Column size="0"/>
  433. <Column size="0"/>
  434. <Column size="0"/>
  435. <Column size="0"/>
  436. <Column size="0"/>
  437. <Column size="0"/>
  438. <Column size="0"/>
  439. <Column size="0"/>
  440. <Column size="0"/>
  441. </Columns>
  442. <Rows>
  443. <Row size="30" band="head"/>
  444. <Row size="24"/>
  445. </Rows>
  446. <Band id="head">
  447. <Cell/>
  448. <Cell col="1" displaytype="checkbox" edittype="checkbox"/>
  449. <Cell col="2" text="불출상태" wordwrap="char"/>
  450. <Cell col="3" text="처방&#10;상태" wordwrap="char"/>
  451. <Cell col="4" text="반환상태" wordwrap="char"/>
  452. <Cell col="5" text="반납상태" wordwrap="char"/>
  453. <Cell col="6" text="약품&#10;구분" wordwrap="char"/>
  454. <Cell col="7" text="투약번호" wordwrap="char"/>
  455. <Cell col="8" text="처방구분" wordwrap="char"/>
  456. <Cell col="9" text="수행부서" wordwrap="char"/>
  457. <Cell col="10" text="처방일자" wordwrap="char"/>
  458. <Cell col="11" text="환자번호" wordwrap="char"/>
  459. <Cell col="12" text="환자명" wordwrap="char"/>
  460. <Cell col="13" text="약품코드" wordwrap="char"/>
  461. <Cell col="14" text="약품명" wordwrap="char"/>
  462. <Cell col="15" colspan="2" text="총량" wordwrap="char" taborder="undefined"/>
  463. <Cell col="17" colspan="2" text="일수량" wordwrap="char" taborder="undefined"/>
  464. <Cell col="19" colspan="2" text="1회수량" wordwrap="char" taborder="undefined"/>
  465. <Cell col="21" colspan="2" text="일용량" wordwrap="char" taborder="undefined"/>
  466. <Cell col="23" colspan="2" text="1회용량" wordwrap="char" taborder="undefined"/>
  467. <Cell col="25" text="횟수" wordwrap="char"/>
  468. <Cell col="26" text="일수" wordwrap="char"/>
  469. <Cell col="27" colspan="2" text="잔량" wordwrap="char" taborder="undefined"/>
  470. <Cell col="29" colspan="2" text="반환횟수" wordwrap="char" taborder="undefined"/>
  471. <Cell col="31" colspan="2" text="반환수량" wordwrap="char" taborder="undefined"/>
  472. <Cell col="33" style="align:left;padding:0 0 0 8;" text="불출신청일자" wordwrap="char"/>
  473. <Cell col="34" text="불출&#10;신청자" wordwrap="char"/>
  474. <Cell col="35" style="align:left;padding:0 0 0 8;" text="조제일시" wordwrap="char"/>
  475. <Cell col="36" text="출고부서"/>
  476. <Cell col="37" text="조제약사" wordwrap="char"/>
  477. <Cell col="38" text="투약일시" wordwrap="char"/>
  478. <Cell col="39" text="투약약사" wordwrap="char"/>
  479. <Cell col="40" style="align:left;padding:0 0 0 8;" text="수령일시" wordwrap="char"/>
  480. <Cell col="41" text="수령&#10;담당자" wordwrap="char"/>
  481. <Cell col="42" style="align:left;padding:0 0 0 8;" text="부서확인&#10;일시" wordwrap="char"/>
  482. <Cell col="43" text="부서확인&#10;간호사" wordwrap="char"/>
  483. <Cell col="44" style="align:left;padding:0 0 0 8;" text="반환신청일시" wordwrap="char"/>
  484. <Cell col="45" text="반환신청&#10;간호사" wordwrap="char"/>
  485. <Cell col="46" style="align:left;padding:0 0 0 8;" text="반환확인일시" wordwrap="char"/>
  486. <Cell col="47" text="반환확인&#10;약사" wordwrap="char"/>
  487. <Cell col="48" text="반환사유" wordwrap="char"/>
  488. <Cell col="49" style="align:left;padding:0 0 0 8;" text="반납신청&#10;일시" wordwrap="char"/>
  489. <Cell col="50" text="잔량반납신청&#10;간호사" wordwrap="char"/>
  490. <Cell col="51" style="align:left;padding:0 0 0 8;" text="반납확인&#10;일시" wordwrap="char"/>
  491. <Cell col="52" text="잔량반납확인&#10;약사" wordwrap="char"/>
  492. <Cell col="53" text="prcpno"/>
  493. <Cell col="54" text="prcphistno"/>
  494. <Cell col="55" text="drugdd"/>
  495. <Cell col="56" text="drugno"/>
  496. <Cell col="57" text="ioflag"/>
  497. <Cell col="58" text="instcd"/>
  498. <Cell col="59" text="narcflag"/>
  499. <Cell col="60" text="prntflag"/>
  500. <Cell col="61" text="orddd"/>
  501. <Cell col="62" text="orddeptcd"/>
  502. <Cell col="63" text="prcpgenrflag"/>
  503. <Cell col="64" text="drugkind"/>
  504. <Cell col="65" text="rtndrugtims"/>
  505. <Cell col="66" text="rtndrugdayno"/>
  506. <Cell col="67" text="rtnstocqty"/>
  507. <Cell col="68"/>
  508. </Band>
  509. <Band id="body">
  510. <Cell celltype="head" text="expr:currow+1"/>
  511. <Cell col="1" displaytype="checkbox" edittype="expr:utlf_isNull(getColumn(currow, 'narcstat')) || getColumn(currow, 'narcstat') == '1' ? 'none' : 'checkbox'" style="background2:#f0f0f0ff;controlbackground:EXPR(utlf_isNull(getColumn(currow, 'narcstat')) || getColumn(currow, 'narcstat') == '1' ? 'silver' : '');controlborder:EXPR(utlf_isNull(getColumn(currow, 'narcstat')) || getColumn(currow, 'narcstat') == '1' ? '1 solid #708090cc' : ''));" text="bind:sel" expr="expr:(sel==&quot;Y&quot;||sel==1)?1:0"/>
  512. <Cell col="2" displaytype="combo" edittype="combo" style="align:left top;padding:4 2 1 2;background2:#f0f0f0ff;" text="bind:narcstat" wordwrap="char" combodataset="ds_cmb_narcstat2" combocodecol="value" combodatacol="label" autosizerow="limitmin"/>
  513. <Cell col="3" style="align:center top;padding:4 2 1 2;background2:#f0f0f0ff;" text="bind:prcphistcd" wordwrap="char" autosizerow="limitmin"/>
  514. <Cell col="4" displaytype="combo" edittype="combo" style="align:left top;padding:4 2 1 2;background2:#f0f0f0ff;" text="bind:cnclstat" wordwrap="char" combodataset="ds_cmb_cnclstat" combocodecol="value" combodatacol="label" autosizerow="limitmin"/>
  515. <Cell col="5" displaytype="combo" edittype="combo" style="align:left top;padding:4 2 1 2;background2:#f0f0f0ff;" text="bind:rtnstat" wordwrap="char" combodataset="ds_cmb_rtnstat" combocodecol="value" combodatacol="label" autosizerow="limitmin"/>
  516. <Cell col="6" style="align:left top;padding:4 2 1 2;background2:#f0f0f0ff;" text="bind:drugkindnm" wordwrap="char" autosizerow="limitmin"/>
  517. <Cell col="7" displaytype="text" style="align:center top;padding:4 2 1 2;background2:#f0f0f0ff;" text="bind:drugno" wordwrap="char" autosizerow="limitmin"/>
  518. <Cell col="8" style="align:left top;padding:4 2 1 2;background2:#f0f0f0ff;" text="bind:prcpkindnm" wordwrap="char" autosizerow="limitmin"/>
  519. <Cell col="9" style="align:left top;padding:4 2 1 2;background2:#f0f0f0ff;" text="bind:issdeptcdnm" wordwrap="char" autosizerow="limitmin"/>
  520. <Cell col="10" style="align:left top;padding:4 2 1 2;background2:#f0f0f0ff;" text="bind:prcpdd" wordwrap="char" mask="expr:utlf_isNull(prcpdd) || prcpdd=='-' ? '' : '####/##/##'" autosizerow="limitmin"/>
  521. <Cell col="11" style="align:left top;padding:4 2 1 2;background2:#f0f0f0ff;" text="bind:pid" wordwrap="char" autosizerow="limitmin"/>
  522. <Cell col="12" style="align:left top;padding:4 2 1 2;background2:#f0f0f0ff;" text="bind:patnm" wordwrap="char" autosizerow="limitmin"/>
  523. <Cell col="13" displaytype="text" style="align:left top;padding:4 2 1 2;background2:#f0f0f0ff;" text="bind:prcpcd" wordwrap="char" autosizerow="limitmin"/>
  524. <Cell col="14" displaytype="text" style="align:left top;padding:4 2 1 2;background2:#f0f0f0ff;" text="bind:drugnm" wordwrap="char" autosizerow="limitmin"/>
  525. <Cell col="15" style="align:right;background2:#f0f0f0ff;" text="bind:totdrugqty"/>
  526. <Cell col="16" style="background2:#f0f0f0ff;" text="bind:prcpqtyunit"/>
  527. <Cell col="17" style="align:right;background2:#f0f0f0ff;" text="bind:dayprcpqty"/>
  528. <Cell col="18" style="background2:#f0f0f0ff;" text="bind:dayprcpqtyunit"/>
  529. <Cell col="19" style="align:right;background2:#f0f0f0ff;" text="bind:prcpqty2"/>
  530. <Cell col="20" style="background2:#f0f0f0ff;" text="bind:prcpqtyunit2"/>
  531. <Cell col="21" style="align:right;background2:#f0f0f0ff;" text="bind:prcpvol"/>
  532. <Cell col="22" style="background2:#f0f0f0ff;" text="bind:prcpvolunit"/>
  533. <Cell col="23" style="align:right;background2:#f0f0f0ff;" text="bind:prcpvol2"/>
  534. <Cell col="24" style="background2:#f0f0f0ff;" text="bind:prcpvolunit2"/>
  535. <Cell col="25" style="align:right;background2:#f0f0f0ff;" text="bind:prcptims"/>
  536. <Cell col="26" style="align:right;background2:#f0f0f0ff;" text="bind:prcpdayno"/>
  537. <Cell col="27" style="align:right;background2:#f0f0f0ff;" text="bind:spreqty"/>
  538. <Cell col="28" style="background2:#f0f0f0ff;" text="bind:prcpvolunit"/>
  539. <Cell col="29" displaytype="text" edittype="text" style="align:right;background:left middle;background2:#f0f0f0ff left middle;backgroundimage:URL('..\..\..\IMAGES\ast\ICON\icon_input.png');" class="gridinput" text="bind:rtnqty" editautoselect="true"/>
  540. <Cell col="30" style="background2:#f0f0f0ff;" text="bind:rtnunit"/>
  541. <Cell col="31" style="align:right;background2:#f0f0f0ff;" text="bind:returnqty"/>
  542. <Cell col="32" style="background2:#f0f0f0ff;" text="bind:prcpqtyunit"/>
  543. <Cell col="33" style="background2:#f0f0f0ff;" text="bind:reqdt" mask="expr:utlf_isNull(reqdt) || reqdt=='-' ? '' : '####/##/## ##:##'"/>
  544. <Cell col="34" style="background2:#f0f0f0ff;" text="bind:reqidnm"/>
  545. <Cell col="35" style="background2:#f0f0f0ff;" text="bind:prcpdt" mask="expr:utlf_isNull(prcpdt) || prcpdt=='-' ? '' : '####/##/## ##:##'"/>
  546. <Cell col="36" displaytype="combo" style="background2:#f0f0f0ff;" text="bind:stocdeptcd" combodataset="ds_init_misdeptlist_deptlist" combocodecol="deptcd" combodatacol="deptnm"/>
  547. <Cell col="37" style="background2:#f0f0f0ff;" text="bind:prcpidnm"/>
  548. <Cell col="38" style="background2:#f0f0f0ff;" text="bind:drugdt" mask="expr:utlf_isNull(drugdt) || drugdt=='-' ? '' : '####/##/## ##:##'"/>
  549. <Cell col="39" style="background2:#f0f0f0ff;" text="bind:drugidnm"/>
  550. <Cell col="40" style="background2:#f0f0f0ff;" text="bind:delivedt" mask="expr:utlf_isNull(delivedt) || delivedt=='-' ? '' : '####/##/## ##:##'"/>
  551. <Cell col="41" style="background2:#f0f0f0ff;" text="bind:deliveidnm"/>
  552. <Cell col="42" style="background2:#f0f0f0ff;" text="bind:acptdt" mask="expr:utlf_isNull(acptdt) || acptdt=='-' ? '' : '####/##/## ##:##'"/>
  553. <Cell col="43" style="background2:#f0f0f0ff;" text="bind:acptidnm"/>
  554. <Cell col="44" style="background2:#f0f0f0ff;" text="bind:rtnappdt" mask="expr:utlf_isNull(rtnappdt) || rtnappdt=='-' ? '' : '####/##/## ##:##'"/>
  555. <Cell col="45" style="background2:#f0f0f0ff;" text="bind:rtnappidnm"/>
  556. <Cell col="46" style="background2:#f0f0f0ff;" text="bind:rtncnfmdt" mask="expr:utlf_isNull(rtncnfmdt) || rtncnfmdt=='-' ? '' : '####/##/## ##:##'"/>
  557. <Cell col="47" style="background2:#f0f0f0ff;" text="bind:rtncnfmidnm"/>
  558. <Cell col="48" displaytype="text" style="background2:#f0f0f0ff;" text="bind:rtnresn"/>
  559. <Cell col="49" style="background2:#f0f0f0ff;" text="bind:spredt" mask="expr:utlf_isNull(spredt) || spredt=='-' ? '' : '####/##/## ##:##'"/>
  560. <Cell col="50" style="background2:#f0f0f0ff;" text="bind:spreidnm"/>
  561. <Cell col="51" style="background2:#f0f0f0ff;" text="bind:sprecnfmdt" mask="expr:utlf_isNull(sprecnfmdt) || sprecnfmdt=='-' ? '' : '####/##/## ##:##'"/>
  562. <Cell col="52" style="background2:#f0f0f0ff;" text="bind:sprecnfmidnm"/>
  563. <Cell col="53" text="bind:prcpno"/>
  564. <Cell col="54" text="bind:prcphistno"/>
  565. <Cell col="55" text="bind:drugdd"/>
  566. <Cell col="56" text="bind:drugno"/>
  567. <Cell col="57" text="bind:ioflag"/>
  568. <Cell col="58" text="bind:instcd"/>
  569. <Cell col="59" text="bind:narcflag"/>
  570. <Cell col="60" text="bind:prntflag"/>
  571. <Cell col="61" text="bind:orddd"/>
  572. <Cell col="62" text="bind:orddeptcd"/>
  573. <Cell col="63" text="bind:prcpgenrflag"/>
  574. <Cell col="64" text="bind:drugkind"/>
  575. <Cell col="65" text="bind:rtndrugtims"/>
  576. <Cell col="66" text="bind:rtndrugdayno"/>
  577. <Cell col="67" text="bind:rtnstocqty"/>
  578. <Cell col="68" text="bind:drugseqno"/>
  579. </Band>
  580. </Format>
  581. </Formats>
  582. </Grid>
  583. </Layout>
  584. </Layouts>
  585. </Tabpage>
  586. </Tabpages>
  587. </Tab>
  588. <Button position="absolute 1131 759 1211 781" id="btn_excel" class="btn7" taborder="46" text="엑셀저장" anchor="right bottom" onclick="btn_excel_onclick"/>
  589. <Button position="absolute 1024 759 1128 781" id="button8" class="btn6" taborder="45" text="반환반납장부" anchor="right bottom" onclick="button8_onclick"/>
  590. <Button position="absolute 893 759 1021 781" id="button9" class="btn6" taborder="44" text="잔류마약폐기장부" anchor="right bottom" onclick="button9_onclick"/>
  591. <Button position="absolute 794 759 890 781" id="button1" class="btn6" taborder="43" text="불출확인서" anchor="right bottom" onclick="button1_onclick"/>
  592. <Div position="absolute 535 512 978 729" id="group5" visible="false" class="div_SA2">
  593. <Layouts>
  594. <Layout>
  595. <Grid position="absolute 6 7 436 182" id="datagrid2" visible="true" scrollbars="autoboth" binddataset="ds_main_detlprcplist_detlprcpinfo" anchor="default">
  596. <Formats>
  597. <Format id="default">
  598. <Columns>
  599. <Column size="30" band="left"/>
  600. <Column size="0"/>
  601. <Column size="0"/>
  602. <Column size="0"/>
  603. <Column size="0"/>
  604. <Column size="0"/>
  605. <Column size="81"/>
  606. <Column size="71"/>
  607. <Column size="0"/>
  608. <Column size="0"/>
  609. <Column size="121"/>
  610. <Column size="0"/>
  611. <Column size="0"/>
  612. <Column size="0"/>
  613. <Column size="0"/>
  614. <Column size="90"/>
  615. </Columns>
  616. <Rows>
  617. <Row size="24" band="head"/>
  618. <Row size="24"/>
  619. </Rows>
  620. <Band id="head">
  621. <Cell/>
  622. <Cell col="1" text="구분"/>
  623. <Cell col="2" text="ioflag"/>
  624. <Cell col="3" text="처방번호"/>
  625. <Cell col="4" text="투약번호"/>
  626. <Cell col="5" text="병실"/>
  627. <Cell col="6" text="실시일자"/>
  628. <Cell col="7" text="실시시간"/>
  629. <Cell col="8" text="집계일시"/>
  630. <Cell col="9" text="집계부서"/>
  631. <Cell col="10" text="시행부서"/>
  632. <Cell col="11" text="발행부서"/>
  633. <Cell col="12" text="마감일시"/>
  634. <Cell col="13" text="출력일시"/>
  635. <Cell col="14" text="execrid"/>
  636. <Cell col="15" text="실시자"/>
  637. </Band>
  638. <Band id="body">
  639. <Cell celltype="head" text="expr:currow+1"/>
  640. <Cell col="1" text="bind:ioflagnm"/>
  641. <Cell col="2" text="bind:ioflag"/>
  642. <Cell col="3" text="bind:prcpno"/>
  643. <Cell col="4" text="bind:drugno"/>
  644. <Cell col="5" text="bind:roomcd"/>
  645. <Cell col="6" text="bind:execdd" mask="expr:utlf_isNull(execdd) || execdd=='-' ? '' : '####-##-##'"/>
  646. <Cell col="7" text="bind:exectm" mask="expr:utlf_isNull(exectm) || exectm=='-' ? '' : '##:##'"/>
  647. <Cell col="8" text="bind:drugsumdt" mask="yyyy-mm-dd hh:nn:ss"/>
  648. <Cell col="9" text="bind:sumdeptnm"/>
  649. <Cell col="10" displaytype="text" text="bind:execdeptnm"/>
  650. <Cell col="11" text="bind:issdeptcdnm"/>
  651. <Cell col="12" text="bind:sumdt" mask="yyyy-mm-dd hh:nn:ss"/>
  652. <Cell col="13" text="bind:prntdt" mask="yyyy-mm-dd hh:nn:ss"/>
  653. <Cell col="14" text="bind:execrid"/>
  654. <Cell col="15" displaytype="text" text="bind:execrnm"/>
  655. </Band>
  656. </Format>
  657. </Formats>
  658. </Grid>
  659. <Button position="absolute 380 188 436 210" id="button10" class="btn4" text="닫기" anchor="default" onclick="group5_button10_onclick"/>
  660. </Layout>
  661. </Layouts>
  662. </Div>
  663. <Static id="caption19" text="마약/향정약 처방관리(Ver 1230)" class="tit_1" position="absolute 0 0 240 25"/>
  664. <Div id="group2" taborder="47" position="absolute 0 24 1211 216" anchor="left top right" onkeyup="group_onkeyup">
  665. <Layouts>
  666. <Layout>
  667. <Shape id="roundrect2" type="roundrectangle" position="absolute 781 1 1211 192" anchor="all"/>
  668. <Edit id="input8" taborder="0" class="input_search" position="absolute 92 139 192 158" anchor="default" style="font:Dotum,9,bold;" onkeydown="group2_input8_onkeydown" autoselect="true"/>
  669. <Edit id="input9" taborder="1" class="input_search" enable="false" position="absolute 92 166 217 185" anchor="default" style="font:Dotum,9,bold;" onkeydown="group2_input9_onkeydown" autoselect="true"/>
  670. <Static id="caption1" text="마약구분 :" class="search_name" visible="false" position="absolute 475 61 561 78" anchor="default"/>
  671. <Shape id="line13" class="line_4" position="absolute 697 5 703 100" anchor="default" linetype="vertical"/>
  672. <Static id="caption2" text="환자번호 :" class="search_name" position="absolute 10 140 96 157" anchor="default"/>
  673. <Combo id="combo2" taborder="2" codecolumn="codecolumn" datacolumn="datacolumn" class="combo_essential" position="absolute 92 7 211 26" anchor="default" style="font:Dotum,9,bold;" onitemchanged="group2_combo2_onitemchanged">
  674. <Dataset id="innerdataset">
  675. <ColumnInfo>
  676. <Column id="codecolumn"/>
  677. <Column id="datacolumn"/>
  678. </ColumnInfo>
  679. <Rows>
  680. <Row>
  681. <Col id="codecolumn">1</Col>
  682. <Col id="datacolumn">처방일자</Col>
  683. </Row>
  684. <Row>
  685. <Col id="codecolumn">2</Col>
  686. <Col id="datacolumn">적용일자</Col>
  687. </Row>
  688. <Row>
  689. <Col id="codecolumn">3</Col>
  690. <Col id="datacolumn">불출신청일자</Col>
  691. </Row>
  692. <Row>
  693. <Col id="codecolumn">4</Col>
  694. <Col id="datacolumn">실시일자</Col>
  695. </Row>
  696. <Row>
  697. <Col id="codecolumn">5</Col>
  698. <Col id="datacolumn">반환저장일자</Col>
  699. </Row>
  700. <Row>
  701. <Col id="codecolumn">6</Col>
  702. <Col id="datacolumn">잔량저장일자</Col>
  703. </Row>
  704. <Row>
  705. <Col id="codecolumn">7</Col>
  706. <Col id="datacolumn">불출일자</Col>
  707. </Row>
  708. <Row>
  709. <Col id="codecolumn">8</Col>
  710. <Col id="datacolumn">조제일자</Col>
  711. </Row>
  712. </Rows>
  713. </Dataset>
  714. </Combo>
  715. <Button id="button61" taborder="3" class="icon_search" position="absolute 197 140 213 156" anchor="default" onclick="group2_button61_onclick"/>
  716. <Static id="caption3" text="마약종류 :" class="search_name" position="absolute 793 10 879 27" anchor="default"/>
  717. <Static id="caption4" text="~" position="absolute 335 7 348 27" anchor="default"/>
  718. <Radio id="radio1" taborder="4" columncount="3" rowcount="1" codecolumn="codecolumn" datacolumn="datacolumn" class="radio_search" visible="false" position="absolute 550 58 685 78" anchor="default" style="font:Dotum,9,bold;">
  719. <Dataset id="innerdataset">
  720. <ColumnInfo>
  721. <Column id="codecolumn"/>
  722. <Column id="datacolumn"/>
  723. </ColumnInfo>
  724. <Rows>
  725. <Row>
  726. <Col id="codecolumn">T</Col>
  727. <Col id="datacolumn">전체</Col>
  728. </Row>
  729. <Row>
  730. <Col id="codecolumn">N</Col>
  731. <Col id="datacolumn">마약</Col>
  732. </Row>
  733. <Row>
  734. <Col id="codecolumn">P</Col>
  735. <Col id="datacolumn">향정</Col>
  736. </Row>
  737. </Rows>
  738. </Dataset>
  739. </Radio>
  740. <Shape id="line1" linetype="horizontal" class="line_2" position="absolute 5 159 766 165" anchor="default"/>
  741. <Radio id="radio2" taborder="5" columncount="3" rowcount="1" codecolumn="codecolumn" datacolumn="datacolumn" class="radio_search" position="absolute 92 32 247 52" anchor="default" style="font:Dotum,9,bold;">
  742. <Dataset id="innerdataset">
  743. <ColumnInfo>
  744. <Column id="codecolumn"/>
  745. <Column id="datacolumn"/>
  746. </ColumnInfo>
  747. <Rows>
  748. <Row>
  749. <Col id="codecolumn">T</Col>
  750. <Col id="datacolumn">전체</Col>
  751. </Row>
  752. <Row>
  753. <Col id="codecolumn">D</Col>
  754. <Col id="datacolumn">약</Col>
  755. </Row>
  756. <Row>
  757. <Col id="codecolumn">I</Col>
  758. <Col id="datacolumn">주사</Col>
  759. </Row>
  760. </Rows>
  761. </Dataset>
  762. </Radio>
  763. <Static id="caption6" text="병동 :" class="search_name" position="absolute 230 140 300 157" anchor="default"/>
  764. <Radio id="radio3" taborder="6" columncount="-1" rowcount="-1" codecolumn="codecolumn" datacolumn="datacolumn" class="radio_search" position="absolute 92 59 722 79" anchor="default" index="-1" style="textpadding:0 3 0 3;font:Dotum,9,bold;" onitemchanged="group2_radio3_onitemchanged">
  765. <Dataset id="innerdataset">
  766. <ColumnInfo>
  767. <Column id="codecolumn"/>
  768. <Column id="datacolumn"/>
  769. </ColumnInfo>
  770. <Rows>
  771. <Row>
  772. <Col id="codecolumn">T</Col>
  773. <Col id="datacolumn">전체</Col>
  774. </Row>
  775. <Row>
  776. <Col id="codecolumn">1</Col>
  777. <Col id="datacolumn">미신청</Col>
  778. </Row>
  779. <Row>
  780. <Col id="codecolumn">2</Col>
  781. <Col id="datacolumn">불출신청</Col>
  782. </Row>
  783. <Row>
  784. <Col id="codecolumn">3</Col>
  785. <Col id="datacolumn">출력완료</Col>
  786. </Row>
  787. <Row>
  788. <Col id="codecolumn">4</Col>
  789. <Col id="datacolumn">조제완료</Col>
  790. </Row>
  791. <Row>
  792. <Col id="codecolumn">5</Col>
  793. <Col id="datacolumn">불출</Col>
  794. </Row>
  795. <Row>
  796. <Col id="codecolumn">6</Col>
  797. <Col id="datacolumn">부서확인</Col>
  798. </Row>
  799. <Row>
  800. <Col id="codecolumn">7</Col>
  801. <Col id="datacolumn">실 불출신청</Col>
  802. </Row>
  803. <Row>
  804. <Col id="codecolumn">8</Col>
  805. <Col id="datacolumn">재출력</Col>
  806. </Row>
  807. </Rows>
  808. </Dataset>
  809. </Radio>
  810. <Shape id="line3" linetype="horizontal" class="line_2" position="absolute 5 105 766 111" anchor="default"/>
  811. <Static id="caption7" text="바코드 :" class="search_name" position="absolute 10 167 98 184" anchor="default"/>
  812. <Calendar id="ipt_lastdd" taborder="8" class="input_search" position="absolute 350 7 450 26" anchor="default" style="font:Dotum,9,bold;" autoselect="true" dateformat="yyyy-MM-dd"/>
  813. <Shape id="line4" linetype="horizontal" class="line_2" position="absolute 5 52 694 58" anchor="default"/>
  814. <Shape id="line5" linetype="horizontal" class="line_2" position="absolute 5 27 694 33" anchor="default"/>
  815. <Static id="caption9" text="조회구간 :" class="search_name" position="absolute 10 8 96 25" anchor="default"/>
  816. <Calendar id="ipt_fstdd" taborder="7" class="input_search" position="absolute 232 7 332 26" anchor="default" style="font:Dotum,9,bold;" autoselect="true" dateformat="yyyy-MM-dd" value="null"/>
  817. <Grid id="datagrid1" taborder="9" binddataset="ds_temp_srchcond_narclist" useinputpanel="false" position="absolute 788 33 1204 153" anchor="all" selecttype="multirow" cellclickbound="cell" cellsizingtype="col" autofittype="col">
  818. <Formats>
  819. <Format id="default">
  820. <Columns>
  821. <Column size="30" band="left"/>
  822. <Column size="46"/>
  823. <Column size="220"/>
  824. <Column size="100"/>
  825. </Columns>
  826. <Rows>
  827. <Row size="24" band="head"/>
  828. <Row size="24"/>
  829. </Rows>
  830. <Band id="head">
  831. <Cell/>
  832. <Cell col="1" style="font:Dotum,9,bold;" text="선택"/>
  833. <Cell col="2" style="font:Dotum,9,bold;" text="명칭"/>
  834. <Cell col="3" style="font:Dotum,9,bold;" text="코드"/>
  835. </Band>
  836. <Band id="body">
  837. <Cell celltype="head" style="font:Dotum,9,bold;" text="expr:currow+1"/>
  838. <Cell col="1" displaytype="checkbox" edittype="checkbox" style="background2:#f0f0f0ff;" text="bind:sel" expr="expr:(sel==&quot;Y&quot;||sel==1)?1:0"/>
  839. <Cell col="2" displaytype="text" style="background2:#f0f0f0ff;font:Dotum,10,bold;" text="bind:narcnm"/>
  840. <Cell col="3" displaytype="text" style="background2:#f0f0f0ff;font:Dotum,10,bold;" text="bind:narccd"/>
  841. </Band>
  842. </Format>
  843. </Formats>
  844. </Grid>
  845. <Button id="btn_sea" taborder="10" text="조회" class="btn1" position="absolute 705 35 761 57" anchor="default" onclick="group2_btn_sea_onclick"/>
  846. <Combo id="cmb_ward" taborder="11" innerdataset="@ds_temp_srchcond_ward" codecolumn="wardcd" datacolumn="wardnm" position="absolute 290 139 390 158" anchor="default" style="font:Dotum,9,bold;"/>
  847. <Static id="caption5" text="조회구분 :" class="search_name" position="absolute 10 34 96 51" anchor="default"/>
  848. <Static id="caption8" text="담당자 :" class="search_name" position="absolute 480 167 568 184" anchor="default"/>
  849. <Edit id="opt_usernm" taborder="12" readonly="true" class="output" position="absolute 675 166 755 185" anchor="default" style="font:Dotum,9,bold;" autoselect="true"/>
  850. <Edit id="ipt_srchid" taborder="13" class="input_search" position="absolute 565 166 665 185" anchor="default" style="font:Dotum,9,bold;" onkeydown="group2_ipt_srchid_onkeydown" autoselect="true"/>
  851. <Radio id="rdo_drugflag" taborder="14" columncount="-1" rowcount="-1" codecolumn="codecolumn" datacolumn="datacolumn" position="absolute 432 32 597 52" anchor="default" index="-1" style="textpadding:0 5 0 3;font:Dotum,9,bold;" onitemchanged="group2_rdo_drugflag_onitemchanged">
  852. <Dataset id="innerdataset">
  853. <ColumnInfo>
  854. <Column id="codecolumn"/>
  855. <Column id="datacolumn"/>
  856. </ColumnInfo>
  857. <Rows>
  858. <Row>
  859. <Col id="codecolumn">I</Col>
  860. <Col id="datacolumn">병동</Col>
  861. </Row>
  862. <Row>
  863. <Col id="codecolumn">L</Col>
  864. <Col id="datacolumn">퇴원/외박/외출</Col>
  865. </Row>
  866. </Rows>
  867. </Dataset>
  868. </Radio>
  869. <Static id="caption10" text="투약번호 :" class="search_name" position="absolute 395 140 481 157" anchor="default"/>
  870. <MaskEdit id="input2" taborder="15" mask="99999" class="input_search" position="absolute 480 139 545 158" anchor="default" style="font:Dotum,9,bold;" onkeydown="group2_input2_onkeydown" autoselect="true"/>
  871. <Radio id="radio4" taborder="16" columncount="3" rowcount="1" codecolumn="codecolumn" datacolumn="datacolumn" class="radio_search" position="absolute 879 7 1022 27" anchor="default" style="font:Dotum,9,bold;" onitemchanged="group2_radio4_onitemchanged">
  872. <Dataset id="innerdataset">
  873. <ColumnInfo>
  874. <Column id="codecolumn"/>
  875. <Column id="datacolumn"/>
  876. </ColumnInfo>
  877. <Rows>
  878. <Row>
  879. <Col id="codecolumn">M</Col>
  880. <Col id="datacolumn">마약</Col>
  881. </Row>
  882. <Row>
  883. <Col id="codecolumn">H</Col>
  884. <Col id="datacolumn">향정</Col>
  885. </Row>
  886. <Row>
  887. <Col id="codecolumn">A</Col>
  888. <Col id="datacolumn">전체</Col>
  889. </Row>
  890. </Rows>
  891. </Dataset>
  892. </Radio>
  893. <Static id="caption12" text="수행부서 :" class="search_name" position="absolute 550 140 640 157" anchor="default"/>
  894. <Combo id="combo3" taborder="17" innerdataset="@ds_temp_drugdeptinfo_dept" codecolumn="deptcd" datacolumn="deptnm" position="absolute 640 139 760 158" columncount="2" anchor="default" style="font:Dotum,9,bold;"/>
  895. <Radio id="radio5" taborder="18" columncount="3" rowcount="0" codecolumn="codecolumn" datacolumn="datacolumn" position="absolute 276 32 429 52" anchor="default" style="font:Dotum,9,bold;" onitemchanged="group2_radio5_onitemchanged">
  896. <Dataset id="innerdataset">
  897. <ColumnInfo>
  898. <Column id="codecolumn"/>
  899. <Column id="datacolumn"/>
  900. </ColumnInfo>
  901. <Rows>
  902. <Row>
  903. <Col id="codecolumn"/>
  904. <Col id="datacolumn">전체</Col>
  905. </Row>
  906. <Row>
  907. <Col id="codecolumn">O</Col>
  908. <Col id="datacolumn">외래</Col>
  909. </Row>
  910. <Row>
  911. <Col id="codecolumn">I</Col>
  912. <Col id="datacolumn">병동</Col>
  913. </Row>
  914. </Rows>
  915. </Dataset>
  916. </Radio>
  917. <Edit id="input1" taborder="19" class="input_search" position="absolute 335 166 460 185" anchor="default" style="font:Dotum,9,bold;" onkeydown="group2_input1_onkeydown" autoselect="true"/>
  918. <Static id="caption11" text="잔량확인 :" class="search_name" position="absolute 240 167 328 184" anchor="default"/>
  919. <Tab id="switch2" taborder="20" tabindex="0" class="tab_Normal" position="absolute 5 99 776 137" anchor="default">
  920. <Tabpages>
  921. <Tabpage id="case4">
  922. <Layouts>
  923. <Layout>
  924. <Radio id="rdo_cncl" taborder="16" columncount="-1" rowcount="-1" codecolumn="codecolumn" datacolumn="datacolumn" position="absolute 90 1 434 21" anchor="default" index="-1" style="textpadding:0 2 0 2;font:Dotum,9,bold;">
  925. <Dataset id="innerdataset">
  926. <ColumnInfo>
  927. <Column id="codecolumn"/>
  928. <Column id="datacolumn"/>
  929. </ColumnInfo>
  930. <Rows>
  931. <Row>
  932. <Col id="codecolumn">T</Col>
  933. <Col id="datacolumn">전체</Col>
  934. </Row>
  935. <Row>
  936. <Col id="codecolumn">0</Col>
  937. <Col id="datacolumn">반환대상</Col>
  938. </Row>
  939. <Row>
  940. <Col id="codecolumn">1</Col>
  941. <Col id="datacolumn">반환신청</Col>
  942. </Row>
  943. <Row>
  944. <Col id="codecolumn">2</Col>
  945. <Col id="datacolumn">반환확인</Col>
  946. </Row>
  947. <Row>
  948. <Col id="codecolumn">7</Col>
  949. <Col id="datacolumn">반환종료</Col>
  950. </Row>
  951. </Rows>
  952. </Dataset>
  953. </Radio>
  954. <CheckBox id="checkbox1" taborder="17" position="absolute 3 1 89 21" anchor="default" text="반환대상만" style="font:Dotum,9,bold;" truevalue="Y" onclick="group2_switch2_case4_checkbox1_onclick"/>
  955. <CheckBox id="checkbox3" taborder="18" position="absolute 424 1 512 21" anchor="default" text="반납대상만" style="font:Dotum,9,bold;" truevalue="Y" onclick="group2_switch2_case4_checkbox3_onclick"/>
  956. <Radio id="rdo_rtn" taborder="19" columncount="-1" rowcount="-1" codecolumn="codecolumn" datacolumn="datacolumn" class="radio_search" position="absolute 512 1 770 21" anchor="default" style="textpadding:0 2 0 2;font:Dotum,9,bold;">
  957. <Dataset id="innerdataset">
  958. <ColumnInfo>
  959. <Column id="codecolumn"/>
  960. <Column id="datacolumn"/>
  961. </ColumnInfo>
  962. <Rows>
  963. <Row>
  964. <Col id="codecolumn">T</Col>
  965. <Col id="datacolumn">전체</Col>
  966. </Row>
  967. <Row>
  968. <Col id="codecolumn">0</Col>
  969. <Col id="datacolumn">잔량대상</Col>
  970. </Row>
  971. <Row>
  972. <Col id="codecolumn">1</Col>
  973. <Col id="datacolumn">잔량신청</Col>
  974. </Row>
  975. <Row>
  976. <Col id="codecolumn">2</Col>
  977. <Col id="datacolumn">잔량확인</Col>
  978. </Row>
  979. </Rows>
  980. </Dataset>
  981. </Radio>
  982. </Layout>
  983. </Layouts>
  984. </Tabpage>
  985. <Tabpage id="case5">
  986. <Layouts>
  987. <Layout>
  988. <CheckBox id="checkbox5" taborder="1" position="absolute 3 1 91 21" anchor="default" text="반환대상만" style="font:Dotum,9,bold;" onclick="group2_switch2_case5_checkbox5_onclick" truevalue="Y"/>
  989. <CheckBox id="checkbox6" taborder="2" position="absolute 374 1 462 21" anchor="default" text="반납대상만" style="font:Dotum,9,bold;" onclick="group2_switch2_case5_checkbox6_onclick" truevalue="Y"/>
  990. <CheckBox id="checkbox7" taborder="3" position="absolute 674 1 754 21" anchor="default" text="미불출만" style="font:Dotum,9,bold;" onclick="group2_switch2_case5_checkbox7_onclick" truevalue="Y"/>
  991. <Radio id="radio6" taborder="4" columncount="-1" rowcount="-1" codecolumn="codecolumn" datacolumn="datacolumn" position="absolute 90 1 364 21" anchor="default" index="-1" style="textpadding:0 5 0 3;font:Dotum,9,bold;">
  992. <Dataset id="innerdataset">
  993. <ColumnInfo>
  994. <Column id="codecolumn"/>
  995. <Column id="datacolumn"/>
  996. </ColumnInfo>
  997. <Rows>
  998. <Row>
  999. <Col id="codecolumn">T</Col>
  1000. <Col id="datacolumn">전체</Col>
  1001. </Row>
  1002. <Row>
  1003. <Col id="codecolumn">1</Col>
  1004. <Col id="datacolumn">반환신청</Col>
  1005. </Row>
  1006. <Row>
  1007. <Col id="codecolumn">2</Col>
  1008. <Col id="datacolumn">반환확인</Col>
  1009. </Row>
  1010. <Row>
  1011. <Col id="codecolumn">7</Col>
  1012. <Col id="datacolumn">반환종료</Col>
  1013. </Row>
  1014. </Rows>
  1015. </Dataset>
  1016. </Radio>
  1017. <Radio id="radio7" taborder="5" columncount="-1" rowcount="-1" codecolumn="codecolumn" datacolumn="datacolumn" class="radio_search" position="absolute 467 1 668 21" anchor="default" index="-1" style="textpadding:0 5 0 3;font:Dotum,9,bold;">
  1018. <Dataset id="innerdataset">
  1019. <ColumnInfo>
  1020. <Column id="codecolumn"/>
  1021. <Column id="datacolumn"/>
  1022. </ColumnInfo>
  1023. <Rows>
  1024. <Row>
  1025. <Col id="codecolumn">T</Col>
  1026. <Col id="datacolumn">전체</Col>
  1027. </Row>
  1028. <Row>
  1029. <Col id="codecolumn">1</Col>
  1030. <Col id="datacolumn">잔량신청</Col>
  1031. </Row>
  1032. <Row>
  1033. <Col id="codecolumn">2</Col>
  1034. <Col id="datacolumn">잔량확인</Col>
  1035. </Row>
  1036. </Rows>
  1037. </Dataset>
  1038. </Radio>
  1039. </Layout>
  1040. </Layouts>
  1041. </Tabpage>
  1042. </Tabpages>
  1043. </Tab>
  1044. <Static id="caption13" text="실출고부서" position="absolute 460 7 530 27" anchor="default" style="color:red;font:Dotum,9,bold;"/>
  1045. <Combo id="combo1" taborder="21" innerdataset="@ds_init_misdeptlist_deptlist" codecolumn="deptcd" datacolumn="deptnm" position="absolute 534 7 665 26" anchor="default" style="font:Dotum,9,bold;"/>
  1046. <Static id="caption14" text="처방구분 :" class="search_name" position="absolute 10 85 96 102" anchor="default"/>
  1047. <CheckBox id="checkbox8" taborder="23" position="absolute 92 86 137 101" anchor="default" text="전체" style="font:Dotum,9,bold;" truevalue="Y" onclick="group2_checkbox8_onclick"/>
  1048. <Div id="grp_prntdt" taborder="24" visible="false" position="absolute 624 80 1146 107" anchor="default">
  1049. <Layouts>
  1050. <Layout>
  1051. <Shape id="roundrect3" type="roundrectangle" position="absolute 0 0 516 25" anchor="default"/>
  1052. <Static id="caption15" text="출력시간 :" class="search_name" position="absolute 7 5 96 22" anchor="default"/>
  1053. <Combo id="cmb_prntdt" taborder="1" innerdataset="ds_temp_prntdt_item" codecolumn="wardnm" datacolumn="wardnm" position="absolute 95 3 510 22" columncount="1" anchor="default" style="font:Dotum,9,bold;" onitemchanged="group2_grp_prntdt_cmb_prntdt_onitemchanged"/>
  1054. </Layout>
  1055. </Layouts>
  1056. </Div>
  1057. <cp_checkboxList id="checkbox2" titletext="CheckBox List" taborder="25" text="cp_checkboxList01" scrollbars="none" visible="false" position="absolute 1042 7 1182 30" style="background:transparent; " col="1" row="1" cellspacing="2" vcellspacing="0" itemWidth="100" itemHeight="20" overflow="visible"/>
  1058. <cp_checkboxList id="chk_prcpkind" titletext="CheckBox List" taborder="26" text="cp_checkboxList00" scrollbars="none" position="absolute 149 83 401 106" style="background:transparent;font:Dotum,9,bold;" col="1" row="1" cellspacing="2" vcellspacing="0" itemWidth="100" itemHeight="20" overflow="visible"/>
  1059. <Shape id="line00" class="line_2" position="absolute 87 77 696 83"/>
  1060. <CheckBox id="chk_auto" taborder="22" position="absolute 710 59 755 79" anchor="default" text="자동" style="font:Dotum,9,bold;" onclick="group2_chk_auto_onclick" truevalue="Y"/>
  1061. <Static id="cap_automess" text="자동 출력중!!" position="absolute 797 164 1136 186" style="color:red;font:Dotum,15,bold;"/>
  1062. </Layout>
  1063. </Layouts>
  1064. </Div>
  1065. <Div id="group4" taborder="48" position="absolute 0 216 1211 243" anchor="left top right" onkeyup="group_onkeyup">
  1066. <Layouts>
  1067. <Layout>
  1068. <Button id="btn_rtn" taborder="43" text="반환확인" class="btn4" position="absolute 882 5 962 27" anchor="top right" onclick="group4_btn_rtn_onclick"/>
  1069. <Button id="btn_prt" taborder="44" text="일괄처리" class="btn3" position="absolute 0 5 84 27" anchor="default" onclick="group4_btn_prt_onclick"/>
  1070. <Button id="btn_drugcncl" taborder="45" text="불출취소" class="btn4" visible="false" position="absolute 799 5 879 27" anchor="top right"/>
  1071. <Button id="btn_spre" taborder="46" text="잔량확인" class="btn4" position="absolute 1048 5 1128 27" anchor="top right" onclick="group4_btn_spre_onclick"/>
  1072. <Button id="btn_prcpcncl" taborder="47" text="조제취소" class="btn4" visible="false" position="absolute 627 5 707 27" anchor="top right"/>
  1073. <Button id="btn_prcp" taborder="48" text="조제확인" class="btn4" visible="false" position="absolute 681 5 761 27" anchor="top right" onclick="group4_btn_prcp_onclick"/>
  1074. <Button id="button7" taborder="49" text="라벨재출력" class="btn6" position="absolute 194 5 286 27" anchor="default" onclick="group4_button7_onclick"/>
  1075. <CheckBox id="checkbox4" taborder="50" position="absolute 554 11 629 26" anchor="default" text="라벨생략" truevalue="Y" onclick="group4_checkbox4_onclick"/>
  1076. <Button id="button5" taborder="51" text="바코드불출" class="btn3" position="absolute 289 5 381 27" anchor="default" onclick="group4_button5_onclick"/>
  1077. <Button id="btn_prnt" taborder="52" text="프린터설정" class="btn3" position="absolute 384 5 476 27" anchor="default" onclick="group4_btn_prnt_onclick"/>
  1078. <Button id="btn_sprecncl" taborder="53" text="잔량취소" class="btn4" position="absolute 1131 5 1211 27" anchor="top right" onclick="group4_btn_sprecncl_onclick"/>
  1079. <Button id="btn_rtncncl" taborder="54" text="반환취소" class="btn4" position="absolute 965 5 1045 27" anchor="top right" onclick="group4_btn_rtncncl_onclick"/>
  1080. <CheckBox id="chk_all" taborder="55" enable="false" position="absolute 480 11 552 26" anchor="default" text="일괄처리" truevalue="Y" onclick="group4_chk_all_onclick"/>
  1081. <Button id="button2" taborder="56" text="처방전재출력" class="btn6" position="absolute 87 5 191 27" anchor="default" onclick="group4_button2_onclick"/>
  1082. <Button id="btn_drug" taborder="57" text="불출확인" class="btn4" visible="false" position="absolute 773 5 853 27" anchor="top right" onclick="group4_btn_drug_onclick"/>
  1083. </Layout>
  1084. </Layouts>
  1085. </Div>
  1086. <CheckBox id="chk_grdAll" taborder="51" value="N" truevalue="Y" falsevalue="N" onclick="chk_grdAll_onclick" position="absolute 32 253 48 273"/>
  1087. <Button id="Button00" taborder="52" text="통합마약불출점검" position="absolute 1 759 133 781" onclick="Button00_onclick" anchor="left bottom" class="btn3"/>
  1088. <Button id="Button02" taborder="53" text="일반마약불출" position="absolute 136 759 240 781" anchor="left bottom" onclick="Button02_onclick" class="btn3"/>
  1089. </Layout>
  1090. </Layouts>
  1091. <Objects>
  1092. <Dataset id="ds_temp_chkcashinfo_narclist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep"/>
  1093. <Dataset id="ds_hidden" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  1094. <ColumnInfo/>
  1095. </Dataset>
  1096. <Dataset id="ds_temp_srchcond_narclist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep" oncolumnchanged="ds_temp_srchcond_narclist_oncolumnchanged">
  1097. <ColumnInfo>
  1098. <Column id="sel" type="STRING" size="256"/>
  1099. <Column id="narcnm" type="STRING" size="256"/>
  1100. <Column id="narccd" type="STRING" size="256"/>
  1101. </ColumnInfo>
  1102. <Rows>
  1103. <Row>
  1104. <Col id="sel"/>
  1105. <Col id="narcnm"/>
  1106. <Col id="narccd"/>
  1107. </Row>
  1108. </Rows>
  1109. </Dataset>
  1110. <Dataset id="ds_temp" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  1111. <ColumnInfo>
  1112. <Column id="drugdeptinfo" type="STRING" size="256"/>
  1113. <Column id="reprnt" type="STRING" size="256"/>
  1114. </ColumnInfo>
  1115. <Rows>
  1116. <Row/>
  1117. </Rows>
  1118. </Dataset>
  1119. <Dataset id="ds_temp_hosp" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  1120. <ColumnInfo>
  1121. <Column id="hosp" type="STRING" size="256"/>
  1122. </ColumnInfo>
  1123. <Rows>
  1124. <Row>
  1125. <Col id="hosp"/>
  1126. </Row>
  1127. </Rows>
  1128. </Dataset>
  1129. <Dataset id="ds_temp_userinfo_userinfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  1130. <ColumnInfo>
  1131. <Column id="userid" type="STRING" size="256"/>
  1132. <Column id="usernm" type="STRING" size="256"/>
  1133. <Column id="userdeptcd" type="STRING" size="256"/>
  1134. <Column id="userdeptnm" type="STRING" size="256"/>
  1135. </ColumnInfo>
  1136. <Rows>
  1137. <Row>
  1138. <Col id="userid"/>
  1139. <Col id="usernm"/>
  1140. <Col id="userdeptcd"/>
  1141. <Col id="userdeptnm"/>
  1142. </Row>
  1143. </Rows>
  1144. </Dataset>
  1145. <Dataset id="ds_main_narclist_narclist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep" oncolumnchanged="ds_main_narclist_narclist_oncolumnchanged">
  1146. <ColumnInfo>
  1147. <Column id="sel" type="STRING" size="256"/>
  1148. <Column id="prcpdd" type="STRING" size="256"/>
  1149. <Column id="pid" type="STRING" size="256"/>
  1150. <Column id="patnm" type="STRING" size="256"/>
  1151. <Column id="issdeptcdnm" type="STRING" size="256"/>
  1152. <Column id="roomcd" type="STRING" size="256"/>
  1153. <Column id="prcpcd" type="STRING" size="256"/>
  1154. <Column id="drugnm" type="STRING" size="256"/>
  1155. <Column id="totdrugqty" type="STRING" size="256"/>
  1156. <Column id="dayprcpqty" type="STRING" size="256"/>
  1157. <Column id="prcpqty" type="STRING" size="256"/>
  1158. <Column id="prcpqtyunit" type="STRING" size="256"/>
  1159. <Column id="prcptims" type="STRING" size="256"/>
  1160. <Column id="prcpdayno" type="STRING" size="256"/>
  1161. <Column id="rtnqty" type="STRING" size="256"/>
  1162. <Column id="returnqty" type="STRING" size="256"/>
  1163. <Column id="rtnunit" type="STRING" size="256"/>
  1164. <Column id="prcpdt" type="STRING" size="256"/>
  1165. <Column id="prcpidnm" type="STRING" size="256"/>
  1166. <Column id="drugdt" type="STRING" size="256"/>
  1167. <Column id="drugidnm" type="STRING" size="256"/>
  1168. <Column id="delivedt" type="STRING" size="256"/>
  1169. <Column id="deliveidnm" type="STRING" size="256"/>
  1170. <Column id="acptdt" type="STRING" size="256"/>
  1171. <Column id="acptidnm" type="STRING" size="256"/>
  1172. <Column id="rtnappdt" type="STRING" size="256"/>
  1173. <Column id="rtnappidnm" type="STRING" size="256"/>
  1174. <Column id="rtndt" type="STRING" size="256"/>
  1175. <Column id="rtnidnm" type="STRING" size="256"/>
  1176. <Column id="rtncnfmdt" type="STRING" size="256"/>
  1177. <Column id="rtncnfmidnm" type="STRING" size="256"/>
  1178. <Column id="rtnresn" type="STRING" size="256"/>
  1179. <Column id="spreqty" type="STRING" size="256"/>
  1180. <Column id="spredt" type="STRING" size="256"/>
  1181. <Column id="spreidnm" type="STRING" size="256"/>
  1182. <Column id="sprecnfmdt" type="STRING" size="256"/>
  1183. <Column id="sprecnfmidnm" type="STRING" size="256"/>
  1184. <Column id="prcpno" type="STRING" size="256"/>
  1185. <Column id="prcphistno" type="STRING" size="256"/>
  1186. <Column id="drugdd" type="STRING" size="256"/>
  1187. <Column id="drugno" type="STRING" size="256"/>
  1188. <Column id="ioflag" type="STRING" size="256"/>
  1189. <Column id="instcd" type="STRING" size="256"/>
  1190. <Column id="narcflag" type="STRING" size="256"/>
  1191. <Column id="narcstat" type="STRING" size="256"/>
  1192. <Column id="cnclstat" type="STRING" size="256"/>
  1193. <Column id="rtnstat" type="STRING" size="256"/>
  1194. <Column id="prntflag" type="STRING" size="256"/>
  1195. <Column id="returnflag" type="STRING" size="256"/>
  1196. <Column id="orddd" type="STRING" size="256"/>
  1197. <Column id="orddeptcd" type="STRING" size="256"/>
  1198. <Column id="prcpgenrflag" type="STRING" size="256"/>
  1199. <Column id="drugflag" type="STRING" size="256"/>
  1200. <Column id="drugkind" type="STRING" size="256"/>
  1201. <Column id="drugkindnm" type="STRING" size="256"/>
  1202. <Column id="sumdt" type="STRING" size="256"/>
  1203. <Column id="reqid" type="STRING" size="256"/>
  1204. <Column id="reqidnm" type="STRING" size="256"/>
  1205. <Column id="reqdt" type="STRING" size="256"/>
  1206. <Column id="statvisible" type="STRING" size="256"/>
  1207. <Column id="medrendyn" type="STRING" size="256"/>
  1208. <Column id="medrqty" type="STRING" size="256"/>
  1209. <Column id="medrtims" type="STRING" size="256"/>
  1210. <Column id="medrx" type="STRING" size="256"/>
  1211. <Column id="rtndrugtims" type="STRING" size="256"/>
  1212. <Column id="rtndrugdayno" type="STRING" size="256"/>
  1213. <Column id="rtnstocqty" type="STRING" size="256"/>
  1214. <Column id="engnm" type="STRING" size="256"/>
  1215. <Column id="abbrnm" type="STRING" size="256"/>
  1216. <Column id="util" type="STRING" size="256"/>
  1217. <Column id="mthdcnts1" type="STRING" size="256"/>
  1218. <Column id="mthdcnts2" type="STRING" size="256"/>
  1219. <Column id="mthdcnts3" type="STRING" size="256"/>
  1220. <Column id="mthdcnts4" type="STRING" size="256"/>
  1221. <Column id="drugdesc" type="STRING" size="256"/>
  1222. <Column id="mthddesc" type="STRING" size="256"/>
  1223. <Column id="stocdeptcd" type="STRING" size="256"/>
  1224. <Column id="prcpdd2" type="STRING" size="256"/>
  1225. <Column id="dayprcpqty2" type="STRING" size="256"/>
  1226. <Column id="totdrugqty2" type="STRING" size="256"/>
  1227. <Column id="resultqty" type="STRING" size="256"/>
  1228. <Column id="spcldrug" type="STRING" size="256"/>
  1229. <Column id="dethyn" type="STRING" size="256"/>
  1230. <Column id="dethdd" type="STRING" size="256"/>
  1231. </ColumnInfo>
  1232. <Rows>
  1233. <Row>
  1234. <Col id="sel"/>
  1235. <Col id="prcpdd"/>
  1236. <Col id="pid"/>
  1237. <Col id="patnm"/>
  1238. <Col id="issdeptcdnm"/>
  1239. <Col id="roomcd"/>
  1240. <Col id="prcpcd"/>
  1241. <Col id="drugnm"/>
  1242. <Col id="totdrugqty"/>
  1243. <Col id="dayprcpqty"/>
  1244. <Col id="prcpqty"/>
  1245. <Col id="prcpqtyunit"/>
  1246. <Col id="prcptims"/>
  1247. <Col id="prcpdayno"/>
  1248. <Col id="rtnqty"/>
  1249. <Col id="returnqty"/>
  1250. <Col id="rtnunit"/>
  1251. <Col id="prcpdt"/>
  1252. <Col id="prcpidnm"/>
  1253. <Col id="drugdt"/>
  1254. <Col id="drugidnm"/>
  1255. <Col id="delivedt"/>
  1256. <Col id="deliveidnm"/>
  1257. <Col id="acptdt"/>
  1258. <Col id="acptidnm"/>
  1259. <Col id="rtnappdt"/>
  1260. <Col id="rtnappidnm"/>
  1261. <Col id="rtndt"/>
  1262. <Col id="rtnidnm"/>
  1263. <Col id="rtncnfmdt"/>
  1264. <Col id="rtncnfmidnm"/>
  1265. <Col id="rtnresn"/>
  1266. <Col id="spreqty"/>
  1267. <Col id="spredt"/>
  1268. <Col id="spreidnm"/>
  1269. <Col id="sprecnfmdt"/>
  1270. <Col id="sprecnfmidnm"/>
  1271. <Col id="prcpno"/>
  1272. <Col id="prcphistno"/>
  1273. <Col id="drugdd"/>
  1274. <Col id="drugno"/>
  1275. <Col id="ioflag"/>
  1276. <Col id="instcd"/>
  1277. <Col id="narcflag"/>
  1278. <Col id="narcstat"/>
  1279. <Col id="cnclstat"/>
  1280. <Col id="rtnstat"/>
  1281. <Col id="prntflag"/>
  1282. <Col id="returnflag"/>
  1283. <Col id="orddd"/>
  1284. <Col id="orddeptcd"/>
  1285. <Col id="prcpgenrflag"/>
  1286. <Col id="drugflag"/>
  1287. <Col id="drugkind"/>
  1288. <Col id="drugkindnm"/>
  1289. <Col id="sumdt"/>
  1290. <Col id="reqid"/>
  1291. <Col id="reqidnm"/>
  1292. <Col id="reqdt"/>
  1293. <Col id="statvisible"/>
  1294. <Col id="medrendyn"/>
  1295. <Col id="medrqty"/>
  1296. <Col id="medrtims"/>
  1297. <Col id="medrx"/>
  1298. <Col id="rtndrugtims"/>
  1299. <Col id="rtndrugdayno"/>
  1300. <Col id="rtnstocqty"/>
  1301. <Col id="engnm"/>
  1302. <Col id="abbrnm"/>
  1303. <Col id="util"/>
  1304. <Col id="mthdcnts1"/>
  1305. <Col id="mthdcnts2"/>
  1306. <Col id="mthdcnts3"/>
  1307. <Col id="mthdcnts4"/>
  1308. <Col id="drugdesc"/>
  1309. <Col id="mthddesc"/>
  1310. <Col id="stocdeptcd"/>
  1311. </Row>
  1312. </Rows>
  1313. </Dataset>
  1314. <Dataset id="ds_send_userinfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  1315. <ColumnInfo>
  1316. <Column id="userid" type="STRING" size="256"/>
  1317. </ColumnInfo>
  1318. <Rows>
  1319. <Row>
  1320. <Col id="userid"/>
  1321. </Row>
  1322. </Rows>
  1323. </Dataset>
  1324. <Dataset id="ds_prtinfo_narclist_narclist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep"/>
  1325. <Dataset id="ds_temp_srchcond_ward" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  1326. <ColumnInfo>
  1327. <Column id="wardcd" type="STRING" size="256"/>
  1328. <Column id="wardnm" type="STRING" size="256"/>
  1329. </ColumnInfo>
  1330. <Rows>
  1331. <Row>
  1332. <Col id="wardcd"/>
  1333. <Col id="wardnm"/>
  1334. </Row>
  1335. </Rows>
  1336. </Dataset>
  1337. <Dataset id="ds_prtinfo_hosp" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  1338. <ColumnInfo>
  1339. <Column id="hosp" type="STRING" size="256"/>
  1340. <Column id="narcflag" type="STRING" size="256"/>
  1341. <Column id="pastillyn" type="STRING" size="256"/>
  1342. </ColumnInfo>
  1343. <Rows>
  1344. <Row>
  1345. <Col id="hosp"/>
  1346. <Col id="narcflag"/>
  1347. <Col id="pastillyn"/>
  1348. </Row>
  1349. </Rows>
  1350. </Dataset>
  1351. <Dataset id="ds_init_barcdprntsetup" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  1352. <ColumnInfo>
  1353. <Column id="setupinfo" type="STRING" size="256"/>
  1354. </ColumnInfo>
  1355. <Rows>
  1356. <Row>
  1357. <Col id="setupinfo"/>
  1358. </Row>
  1359. </Rows>
  1360. </Dataset>
  1361. <Dataset id="ds_temp_srchcond_dept" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  1362. <ColumnInfo>
  1363. <Column id="deptcd" type="STRING" size="256"/>
  1364. <Column id="deptnm" type="STRING" size="256"/>
  1365. </ColumnInfo>
  1366. <Rows>
  1367. <Row>
  1368. <Col id="deptcd"/>
  1369. <Col id="deptnm"/>
  1370. </Row>
  1371. </Rows>
  1372. </Dataset>
  1373. <Dataset id="ds_init" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep"/>
  1374. <Dataset id="ds_send_prntdt_narcdata" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep"/>
  1375. <Dataset id="ds_hidden_popup_prcp_item" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  1376. <ColumnInfo>
  1377. <Column id="hardcdnm" type="STRING" size="256"/>
  1378. <Column id="hardcd" type="STRING" size="256"/>
  1379. </ColumnInfo>
  1380. <Rows>
  1381. <Row>
  1382. <Col id="hardcdnm">실시내역</Col>
  1383. <Col id="hardcd">Execlist</Col>
  1384. </Row>
  1385. </Rows>
  1386. </Dataset>
  1387. <Dataset id="ds_temp_narclist_narclist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep"/>
  1388. <Dataset id="ds_init_misdeptlist_deptlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  1389. <ColumnInfo>
  1390. <Column id="deptnm" type="STRING" size="256"/>
  1391. <Column id="deptcd" type="STRING" size="256"/>
  1392. </ColumnInfo>
  1393. <Rows>
  1394. <Row>
  1395. <Col id="deptnm"/>
  1396. <Col id="deptcd"/>
  1397. </Row>
  1398. </Rows>
  1399. </Dataset>
  1400. <Dataset id="ds_send_srchcond" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  1401. <ColumnInfo>
  1402. <Column id="deptflag" type="STRING" size="256"/>
  1403. <Column id="narcflag" type="STRING" size="256"/>
  1404. </ColumnInfo>
  1405. <Rows>
  1406. <Row>
  1407. <Col id="deptflag"/>
  1408. <Col id="narcflag">M</Col>
  1409. </Row>
  1410. </Rows>
  1411. </Dataset>
  1412. <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  1413. <ColumnInfo>
  1414. <Column id="lblskip" type="STRING" size="256"/>
  1415. <Column id="chkall" type="STRING" size="256"/>
  1416. <Column id="scrnid" type="STRING" size="256"/>
  1417. </ColumnInfo>
  1418. <Rows>
  1419. <Row/>
  1420. </Rows>
  1421. </Dataset>
  1422. <Dataset id="ds_temp_srchinfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep" oncolumnchanged="ds_temp_srchinfo_oncolumnchanged">
  1423. <ColumnInfo>
  1424. <Column id="narcflag" type="STRING" size="256"/>
  1425. <Column id="timeflag" type="STRING" size="256"/>
  1426. <Column id="fst_dd" type="STRING" size="256"/>
  1427. <Column id="last_dd" type="STRING" size="256"/>
  1428. <Column id="pid" type="STRING" size="256"/>
  1429. <Column id="ward" type="STRING" size="256"/>
  1430. <Column id="srchdrugno" type="STRING" size="256"/>
  1431. <Column id="barcode" type="STRING" size="256"/>
  1432. <Column id="srchdrugkind" type="STRING" size="256"/>
  1433. <Column id="srchioflag" type="STRING" size="256"/>
  1434. <Column id="drugflag" type="STRING" size="256"/>
  1435. <Column id="srchroot" type="STRING" size="256"/>
  1436. <Column id="narcstat" type="STRING" size="256"/>
  1437. <Column id="cnclflag" type="STRING" size="256"/>
  1438. <Column id="cnclstat" type="STRING" size="256"/>
  1439. <Column id="rtnflag" type="STRING" size="256"/>
  1440. <Column id="rtnstat" type="STRING" size="256"/>
  1441. <Column id="narctypeflag" type="STRING" size="256"/>
  1442. <Column id="narctype" type="STRING" size="256"/>
  1443. <Column id="srchid" type="STRING" size="256"/>
  1444. <Column id="narccd" type="STRING" size="256"/>
  1445. <Column id="srchdeptcd" type="STRING" size="256"/>
  1446. <Column id="prtab" type="STRING" size="256"/>
  1447. <Column id="barcodespre" type="STRING" size="256"/>
  1448. <Column id="nodeliveflag" type="STRING" size="256"/>
  1449. <Column id="stocdeptcd" type="STRING" size="256"/>
  1450. <Column id="autoprnt" type="STRING" size="256"/>
  1451. <Column id="srchprcpkind" type="STRING" size="256"/>
  1452. <Column id="srchprcpkindall" type="STRING" size="256"/>
  1453. <Column id="prntdt" type="STRING" size="256"/>
  1454. <Column id="issdeptcd" type="STRING" size="256"/>
  1455. <Column id="wardnm" type="STRING" size="256"/>
  1456. <Column id="selkey" type="STRING" size="256"/>
  1457. <Column id="selkeyall" type="STRING" size="256"/>
  1458. </ColumnInfo>
  1459. <Rows>
  1460. <Row>
  1461. <Col id="narcflag"/>
  1462. <Col id="timeflag">2</Col>
  1463. <Col id="fst_dd"/>
  1464. <Col id="last_dd"/>
  1465. <Col id="pid"/>
  1466. <Col id="ward"/>
  1467. <Col id="srchdrugno"/>
  1468. <Col id="barcode"/>
  1469. <Col id="srchdrugkind"/>
  1470. <Col id="srchioflag">I</Col>
  1471. <Col id="drugflag">I</Col>
  1472. <Col id="srchroot"/>
  1473. <Col id="narcstat"/>
  1474. <Col id="cnclflag"/>
  1475. <Col id="cnclstat"/>
  1476. <Col id="rtnflag"/>
  1477. <Col id="rtnstat"/>
  1478. <Col id="narctypeflag"/>
  1479. <Col id="narctype"/>
  1480. <Col id="srchid"/>
  1481. <Col id="narccd"/>
  1482. <Col id="srchdeptcd"/>
  1483. <Col id="prtab"/>
  1484. <Col id="barcodespre"/>
  1485. <Col id="nodeliveflag"/>
  1486. <Col id="stocdeptcd"/>
  1487. <Col id="autoprnt"/>
  1488. <Col id="srchprcpkind"/>
  1489. <Col id="srchprcpkindall"/>
  1490. <Col id="prntdt"/>
  1491. <Col id="issdeptcd"/>
  1492. <Col id="wardnm"/>
  1493. <Col id="selkey"/>
  1494. <Col id="selkeyall"/>
  1495. </Row>
  1496. </Rows>
  1497. </Dataset>
  1498. <Dataset id="ds_main_detlprcplist_detlprcpinfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  1499. <ColumnInfo>
  1500. <Column id="ioflagnm" type="STRING" size="256"/>
  1501. <Column id="ioflag" type="STRING" size="256"/>
  1502. <Column id="prcpno" type="STRING" size="256"/>
  1503. <Column id="drugno" type="STRING" size="256"/>
  1504. <Column id="execdd" type="STRING" size="256"/>
  1505. <Column id="exectm" type="STRING" size="256"/>
  1506. <Column id="drugsumdt" type="STRING" size="256"/>
  1507. <Column id="execdeptnm" type="STRING" size="256"/>
  1508. <Column id="execdeptcd" type="STRING" size="256"/>
  1509. <Column id="issdeptcd" type="STRING" size="256"/>
  1510. <Column id="issdeptcdnm" type="STRING" size="256"/>
  1511. <Column id="execdrnm" type="STRING" size="256"/>
  1512. </ColumnInfo>
  1513. <Rows>
  1514. <Row>
  1515. <Col id="ioflagnm"/>
  1516. <Col id="ioflag"/>
  1517. <Col id="prcpno"/>
  1518. <Col id="drugno"/>
  1519. <Col id="execdd"/>
  1520. <Col id="exectm"/>
  1521. <Col id="drugsumdt"/>
  1522. <Col id="execdeptnm"/>
  1523. <Col id="execdeptcd"/>
  1524. <Col id="issdeptcd"/>
  1525. <Col id="issdeptcdnm"/>
  1526. <Col id="execdrnm"/>
  1527. </Row>
  1528. </Rows>
  1529. </Dataset>
  1530. <Dataset id="ds_send_srchinfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  1531. <Dataset id="ds_temp_drugdeptinfo_dept" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  1532. <Dataset id="ds_temp_dutdeptinfo_dept" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  1533. <Dataset id="ds_main_barcdprntsetup" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  1534. <Dataset id="ds_data_setupinfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  1535. <Dataset id="ds_data_comm01" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  1536. <Dataset id="ds_data_comm02" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  1537. <Dataset id="ds_data_comm03" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  1538. <Dataset id="ds_data_blank" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  1539. <Dataset id="ds_init_lbltype_item" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  1540. <Dataset id="ds_init_nartype_item" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  1541. <Dataset id="ds_cmb_narcstat" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  1542. <ColumnInfo>
  1543. <Column id="label" type="STRING" size="256"/>
  1544. <Column id="value" type="STRING" size="256"/>
  1545. </ColumnInfo>
  1546. <Rows>
  1547. <Row>
  1548. <Col id="label">미신청</Col>
  1549. <Col id="value">1</Col>
  1550. </Row>
  1551. <Row>
  1552. <Col id="label">불출신청</Col>
  1553. <Col id="value">2</Col>
  1554. </Row>
  1555. <Row>
  1556. <Col id="label">출력완료</Col>
  1557. <Col id="value">3</Col>
  1558. </Row>
  1559. <Row>
  1560. <Col id="label">조제완료</Col>
  1561. <Col id="value">4</Col>
  1562. </Row>
  1563. <Row>
  1564. <Col id="label">불출</Col>
  1565. <Col id="value">5</Col>
  1566. </Row>
  1567. <Row>
  1568. <Col id="label">부서확인</Col>
  1569. <Col id="value">6</Col>
  1570. </Row>
  1571. </Rows>
  1572. </Dataset>
  1573. <Dataset id="ds_cmb_cnclstat" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  1574. <ColumnInfo>
  1575. <Column id="label" type="STRING" size="256"/>
  1576. <Column id="value" type="STRING" size="256"/>
  1577. </ColumnInfo>
  1578. <Rows>
  1579. <Row>
  1580. <Col id="label">-</Col>
  1581. <Col id="value"/>
  1582. </Row>
  1583. <Row>
  1584. <Col id="label">반환대상</Col>
  1585. <Col id="value">0</Col>
  1586. </Row>
  1587. <Row>
  1588. <Col id="label">반환신청</Col>
  1589. <Col id="value">1</Col>
  1590. </Row>
  1591. <Row>
  1592. <Col id="label">반환확인</Col>
  1593. <Col id="value">2</Col>
  1594. </Row>
  1595. <Row>
  1596. <Col id="label">반환종료</Col>
  1597. <Col id="value">7</Col>
  1598. </Row>
  1599. <Row>
  1600. <Col id="label">미불출</Col>
  1601. <Col id="value">10</Col>
  1602. </Row>
  1603. </Rows>
  1604. </Dataset>
  1605. <Dataset id="ds_cmb_rtnstat" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  1606. <ColumnInfo>
  1607. <Column id="label" type="STRING" size="256"/>
  1608. <Column id="value" type="STRING" size="256"/>
  1609. </ColumnInfo>
  1610. <Rows>
  1611. <Row>
  1612. <Col id="label">-</Col>
  1613. <Col id="value"/>
  1614. </Row>
  1615. <Row>
  1616. <Col id="label">잔량대상</Col>
  1617. <Col id="value">0</Col>
  1618. </Row>
  1619. <Row>
  1620. <Col id="label">잔량신청</Col>
  1621. <Col id="value">1</Col>
  1622. </Row>
  1623. <Row>
  1624. <Col id="label">잔량확인</Col>
  1625. <Col id="value">2</Col>
  1626. </Row>
  1627. <Row>
  1628. <Col id="label">미불출</Col>
  1629. <Col id="value">10</Col>
  1630. </Row>
  1631. </Rows>
  1632. </Dataset>
  1633. <Dataset id="ds_cmb_narcstat2" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  1634. <ColumnInfo>
  1635. <Column id="label" type="STRING" size="256"/>
  1636. <Column id="value" type="STRING" size="256"/>
  1637. </ColumnInfo>
  1638. <Rows>
  1639. <Row>
  1640. <Col id="label">미신청</Col>
  1641. <Col id="value">1</Col>
  1642. </Row>
  1643. <Row>
  1644. <Col id="label">불출신청</Col>
  1645. <Col id="value">2</Col>
  1646. </Row>
  1647. <Row>
  1648. <Col id="label">출력완료</Col>
  1649. <Col id="value">3</Col>
  1650. </Row>
  1651. <Row>
  1652. <Col id="label">조제완료</Col>
  1653. <Col id="value">4</Col>
  1654. </Row>
  1655. <Row>
  1656. <Col id="label">불출</Col>
  1657. <Col id="value">5</Col>
  1658. </Row>
  1659. <Row>
  1660. <Col id="label">부서확인</Col>
  1661. <Col id="value">6</Col>
  1662. </Row>
  1663. <Row>
  1664. <Col id="label">반납신청</Col>
  1665. <Col id="value">7</Col>
  1666. </Row>
  1667. <Row>
  1668. <Col id="label">반납확인</Col>
  1669. <Col id="value">8</Col>
  1670. </Row>
  1671. <Row>
  1672. <Col id="label">반환신청</Col>
  1673. <Col id="value">9</Col>
  1674. </Row>
  1675. <Row>
  1676. <Col id="label">반환확인</Col>
  1677. <Col id="value">0</Col>
  1678. </Row>
  1679. </Rows>
  1680. </Dataset>
  1681. <Dataset id="ds_temp_prntdt_item" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  1682. <Dataset id="ds_init_srchprcpkind" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  1683. <ColumnInfo>
  1684. <Column id="cdid" type="STRING" size="256"/>
  1685. <Column id="cdnm" type="STRING" size="256"/>
  1686. </ColumnInfo>
  1687. <Rows>
  1688. <Row>
  1689. <Col id="cdid">R</Col>
  1690. <Col id="cdnm">정규</Col>
  1691. </Row>
  1692. <Row>
  1693. <Col id="cdid">A</Col>
  1694. <Col id="cdnm">추가</Col>
  1695. </Row>
  1696. <Row>
  1697. <Col id="cdid">W</Col>
  1698. <Col id="cdnm">응급</Col>
  1699. </Row>
  1700. <Row>
  1701. <Col id="cdid">M</Col>
  1702. <Col id="cdnm">Admission</Col>
  1703. </Row>
  1704. <Row>
  1705. <Col id="cdid">P</Col>
  1706. <Col id="cdnm">PRN</Col>
  1707. </Row>
  1708. </Rows>
  1709. </Dataset>
  1710. <Dataset id="ds_init_narctypeflag" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  1711. <ColumnInfo>
  1712. <Column id="cdid" type="STRING" size="256"/>
  1713. <Column id="cdnm" type="STRING" size="256"/>
  1714. </ColumnInfo>
  1715. <Rows>
  1716. <Row>
  1717. <Col id="cdid">T</Col>
  1718. <Col id="cdnm">전체</Col>
  1719. </Row>
  1720. <Row>
  1721. <Col id="cdid">A</Col>
  1722. <Col id="cdnm">처방가능약</Col>
  1723. </Row>
  1724. </Rows>
  1725. </Dataset>
  1726. <Dataset id="ds_send_narcinfo_srchinfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep"/>
  1727. <Dataset id="ds_send_narcinfo_narclist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep"/>
  1728. <Dataset id="ds_send_narcinfo_userinfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep"/>
  1729. <Dataset id="ds_send_prntinfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  1730. <Dataset id="ds_main_prntlist_patinfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  1731. <Dataset id="ds_main_prntlist_diaginfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  1732. <Dataset id="ds_main_prntlist_prntlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  1733. <Dataset id="ds_main_prntlist_resn" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  1734. <Dataset id="ds_data_pcllist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  1735. <Dataset id="ds_temp_ret" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  1736. <Dataset id="ds_main_rtnlist_rtnlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  1737. <Dataset id="ds_hidden_popup_item" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  1738. <ColumnInfo>
  1739. <Column id="hardcdnm" type="STRING" size="256"/>
  1740. <Column id="hardcd" type="STRING" size="256"/>
  1741. </ColumnInfo>
  1742. <Rows>
  1743. <Row>
  1744. <Col id="hardcdnm">실시내역</Col>
  1745. <Col id="hardcd">Execlist</Col>
  1746. </Row>
  1747. <Row>
  1748. <Col id="hardcdnm">매핑취소</Col>
  1749. <Col id="hardcd">getMappingList</Col>
  1750. </Row>
  1751. <Row>
  1752. <Col id="hardcdnm">신규전송</Col>
  1753. <Col id="hardcd">getTranList</Col>
  1754. </Row>
  1755. </Rows>
  1756. </Dataset>
  1757. <Dataset id="ds_main_sumlist_sumlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  1758. <Dataset id="ds_prtinfo_sumlist_sumlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  1759. <Dataset id="ds_main_rtnprntlist_prntlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  1760. <Dataset id="ds_sendnarcstoc" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  1761. <Dataset id="ds_stocsend" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  1762. <ColumnInfo>
  1763. <Column id="drugcd" type="STRING" size="256"/>
  1764. </ColumnInfo>
  1765. <Rows>
  1766. <Row/>
  1767. </Rows>
  1768. </Dataset>
  1769. <Dataset id="ds_stocrece" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  1770. <ColumnInfo>
  1771. <Column id="dataokflag" type="STRING" size="256"/>
  1772. </ColumnInfo>
  1773. <Rows>
  1774. <Row/>
  1775. </Rows>
  1776. </Dataset>
  1777. <Dataset id="ds_init_chrglist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  1778. <ColumnInfo>
  1779. <Column id="cdid" type="STRING" size="256"/>
  1780. <Column id="cdnm" type="STRING" size="256"/>
  1781. </ColumnInfo>
  1782. <Rows>
  1783. <Row/>
  1784. </Rows>
  1785. </Dataset>
  1786. </Objects>
  1787. <Bind>
  1788. <BindItem id="item0" compid="group2.input8" propid="value" datasetid="ds_temp_srchinfo" columnid="pid"/>
  1789. <BindItem id="item1" compid="group2.input9" propid="value" datasetid="ds_temp_srchinfo" columnid="barcode"/>
  1790. <BindItem id="item3" compid="group2.combo2" propid="value" datasetid="ds_temp_srchinfo" columnid="timeflag"/>
  1791. <BindItem id="item4" compid="group2.radio1" propid="value" datasetid="ds_temp_srchinfo" columnid="narcflag"/>
  1792. <BindItem id="item5" compid="group2.radio2" propid="value" datasetid="ds_temp_srchinfo" columnid="srchdrugkind"/>
  1793. <BindItem id="item6" compid="group2.radio3" propid="value" datasetid="ds_temp_srchinfo" columnid="narcstat"/>
  1794. <BindItem id="item7" compid="group2.ipt_lastdd" propid="value" datasetid="ds_temp_srchinfo" columnid="last_dd"/>
  1795. <BindItem id="item8" compid="group2.ipt_fstdd" propid="value" datasetid="ds_temp_srchinfo" columnid="fst_dd"/>
  1796. <BindItem id="item9" compid="group2.cmb_ward" propid="value" datasetid="ds_temp_srchinfo" columnid="ward"/>
  1797. <BindItem id="item10" compid="group2.opt_usernm" propid="value" datasetid="ds_temp_userinfo_userinfo" columnid="usernm"/>
  1798. <BindItem id="item11" compid="group2.ipt_srchid" propid="value" datasetid="ds_temp_srchinfo" columnid="srchid"/>
  1799. <BindItem id="item12" compid="group2.rdo_drugflag" propid="value" datasetid="ds_temp_srchinfo" columnid="drugflag"/>
  1800. <BindItem id="item13" compid="group2.input2" propid="value" datasetid="ds_temp_srchinfo" columnid="srchdrugno"/>
  1801. <BindItem id="item14" compid="group2.radio4" propid="value" datasetid="ds_send_srchcond" columnid="narcflag"/>
  1802. <BindItem id="item15" compid="group2.combo3" propid="value" datasetid="ds_temp_srchinfo" columnid="srchdeptcd"/>
  1803. <BindItem id="item16" compid="group2.radio5" propid="value" datasetid="ds_temp_srchinfo" columnid="srchioflag"/>
  1804. <BindItem id="item17" compid="group2.input1" propid="value" datasetid="ds_temp_srchinfo" columnid="barcodespre"/>
  1805. <BindItem id="item18" compid="group2.switch2.case4.rdo_cncl" propid="value" datasetid="ds_temp_srchinfo" columnid="cnclstat"/>
  1806. <BindItem id="item19" compid="group2.switch2.case4.checkbox1" propid="value" datasetid="ds_temp_srchinfo" columnid="cnclflag"/>
  1807. <BindItem id="item20" compid="group2.switch2.case4.checkbox3" propid="value" datasetid="ds_temp_srchinfo" columnid="rtnflag"/>
  1808. <BindItem id="item21" compid="group2.switch2.case4.rdo_rtn" propid="value" datasetid="ds_temp_srchinfo" columnid="rtnstat"/>
  1809. <BindItem id="item22" compid="group2.switch2.case5.checkbox5" propid="value" datasetid="ds_temp_srchinfo" columnid="cnclflag"/>
  1810. <BindItem id="item23" compid="group2.switch2.case5.checkbox6" propid="value" datasetid="ds_temp_srchinfo" columnid="rtnflag"/>
  1811. <BindItem id="item24" compid="group2.switch2.case5.checkbox7" propid="value" datasetid="ds_temp_srchinfo" columnid="nodeliveflag"/>
  1812. <BindItem id="item25" compid="group2.switch2.case5.radio6" propid="value" datasetid="ds_temp_srchinfo" columnid="cnclstat"/>
  1813. <BindItem id="item26" compid="group2.switch2.case5.radio7" propid="value" datasetid="ds_temp_srchinfo" columnid="rtnstat"/>
  1814. <BindItem id="item27" compid="group2.combo1" propid="value" datasetid="ds_temp_srchinfo" columnid="stocdeptcd"/>
  1815. <BindItem id="item28" compid="group2.chk_auto" propid="value" datasetid="ds_temp_srchinfo" columnid="autoprnt"/>
  1816. <BindItem id="item30" compid="group2.checkbox8" propid="value" datasetid="ds_temp_srchinfo" columnid="srchprcpkindall"/>
  1817. <BindItem id="item31" compid="group2.grp_prntdt.cmb_prntdt" propid="value" datasetid="ds_temp_srchinfo" columnid="wardnm"/>
  1818. <BindItem id="item32" compid="group4.checkbox4" propid="value" datasetid="ds_send" columnid="lblskip"/>
  1819. <BindItem id="item33" compid="group4.chk_all" propid="value" datasetid="ds_send" columnid="chkall"/>
  1820. </Bind>
  1821. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  1822. * System Name :
  1823. * Job Name :
  1824. * Creator :
  1825. * Make Date : 2016-10-07
  1826. * Description :
  1827. *---------------------------------------------------------------------------------------
  1828. * Modify Date Modifier Modify Description
  1829. *---------------------------------------------------------------------------------------
  1830. * 2016-10-07 Live Converter TF->XP
  1831. *
  1832. *---------------------------------------------------------------------------------------
  1833. ****************************************************************************************/
  1834. //=======================================================================================
  1835. // Lib Include
  1836. //---------------------------------------------------------------------------------------
  1837. include "com_commonxp::comm_main.xjs";
  1838. include "com_commodulexp::SSZFM00901.xjs";
  1839. include "emr_prcpmngtxp::MMO001.xjs";
  1840. //include "ast_pharmacyxp::SMADT30100.xjs";
  1841. //=======================================================================================
  1842. // Global Form Variable
  1843. //---------------------------------------------------------------------------------------
  1844. var arErrorCode = new HashArray();
  1845. var nextFlag = "GO";
  1846. var gTimer = 0;
  1847. var sleepTime = 1000;
  1848. var rtnprntflag = "N"; // 20110422_laboru_경북대병원_반환처방전 반환확인 시 자동출력 될때 메시지 창 안뜨게 하기
  1849. var totqtyflag = "Y"; // 201120712 경북대병원_반환처방전 반환수량 (-) 뜨게하기 김치국
  1850. var autocnt = 0;
  1851. //=======================================================================================
  1852. // Function
  1853. //---------------------------------------------------------------------------------------
  1854. //=======================================================================================
  1855. // SMADT30100.xjs 시작
  1856. //---------------------------------------------------------------------------------------
  1857. /****************************************************************************************
  1858. * Argument : N/A
  1859. * Description : 초기화
  1860. ****************************************************************************************/
  1861. function fInit() {
  1862. grdf_initGrid(switch1.case1.grd_narclist);
  1863. grdf_initGrid(switch1.case2.grd_sprelist);
  1864. grdf_initGrid(switch1.case3.grd_outnarc);
  1865. grdf_setGridSort(group2.datagrid1);
  1866. //구분 초기화(전체)
  1867. ds_temp_srchinfo.setColumn( 0, "narcflag", "T");
  1868. ds_temp_srchinfo.setColumn( 0, "srchdrugkind", "T");
  1869. ds_temp_srchinfo.setColumn( 0, "drugflag", "I");
  1870. ds_temp_srchinfo.setColumn( 0, "narcstat", "T");
  1871. ds_temp_srchinfo.setColumn( 0, "cnclstat", "");
  1872. ds_temp_srchinfo.setColumn( 0, "rtnstat", "");
  1873. ds_temp_srchinfo.setColumn( 0, "narctypeflag", "T");
  1874. ds_temp_srchinfo.setColumn( 0, "srchioflag", "I");
  1875. group2.switch2.case4.rdo_cncl.enable = false;
  1876. group2.switch2.case4.rdo_rtn.enable = false;
  1877. group2.cap_automess.visible = false; /// 2017년 5월16일 김치국 자동 출력메세지
  1878. fChgIOFlag();
  1879. //토글초기\
  1880. ds_temp_srchinfo.setColumn( 0, "srchroot", "M");
  1881. switch1.tabindex = 0;
  1882. //조회날짜 초기화
  1883. ds_temp_srchinfo.setColumn( 0, "fst_dd", utlf_getCurrentDate());
  1884. ds_temp_srchinfo.setColumn( 0, "last_dd", utlf_getCurrentDate());
  1885. //병동 Combo 조회
  1886. ds_send_srchcond.setColumn( 0, "deptflag", "W");
  1887. call_TRADT30101();
  1888. dsf_addDsItem(ds_temp_srchcond_ward,"wardcd","wardnm","전체","");
  1889. group2.cmb_ward.index = 0;
  1890. //로그인 사용자 셋팅
  1891. var userid = sysf_getUserId();
  1892. ds_temp_srchinfo.setColumn( 0, "srchid", userid);
  1893. fChgUserID();
  1894. //바코드프린터설정 초기화
  1895. ds_send.setColumn(0,"scrnid",frmf_getScreenID());
  1896. var oParam = {};
  1897. oParam.id = "TRLLC90101";
  1898. oParam.service = "diagtestapplib.LisCommon";
  1899. oParam.method = "reqGetSetUpInfo";
  1900. oParam.inds = "scrnid=ds_send";
  1901. oParam.outds = "ds_main_barcdprntsetup=getSetUpInfo";
  1902. oParam.async = false;
  1903. //oParam.callback = "cf_TRLLC90101";
  1904. tranf_submit(oParam);
  1905. var prntsetupinfo = ds_main_barcdprntsetup.getColumn(0,"prntsetupinfo"); //프린터설정 XML형식
  1906. lf_convertXmlToDs(prntsetupinfo);
  1907. var comm = ds_data_comm02.getColumn(0,"comm");
  1908. var prntkind = ds_data_setupinfo.getColumn(0,"prntkind");
  1909. if(comm == "2") {
  1910. ds_data_comm02.setColumn(0,"comm", "1");
  1911. }
  1912. if(prntkind == "1") {
  1913. ds_data_setupinfo.setColumn(0,"prntkind", "5");
  1914. }
  1915. //라벨 출력 형식 옵션
  1916. dsf_createDsRow("ds_req", [
  1917. {col:"prcpflag", type:"STRING", size:256, val:""}
  1918. ]);
  1919. var oParam = {};
  1920. oParam.id = "TRADT30106";
  1921. oParam.service = "pharmacyprescriptionapp.Narcotics";
  1922. oParam.method = "reqGetLblType3";
  1923. oParam.inds = "req=ds_req";
  1924. oParam.outds = "ds_init_lbltype_item=item";
  1925. oParam.async = false;
  1926. //oParam.callback = "cf_TRADT30106";
  1927. tranf_submit(oParam);
  1928. //잔량옵션
  1929. dsf_createDsRow("ds_req", [
  1930. {col:"prcpflag", type:"STRING", size:256, val:""}
  1931. ,{col:"code", type:"STRING", size:256, val:"CHRG"}
  1932. ]);
  1933. var oParam = {};
  1934. oParam.id = "TRADT30107";
  1935. oParam.service = "pharmacyprescriptionapp.Narcotics";
  1936. oParam.method = "reqGetNarType";
  1937. oParam.inds = "req=ds_req";
  1938. oParam.outds = "ds_init_nartype_item=item";
  1939. oParam.async = false;
  1940. //oParam.callback = "cf_TRADT30107";
  1941. tranf_submit(oParam);
  1942. var oParam = {};
  1943. oParam.id = "TRADT30108";
  1944. oParam.service = "pharmacyprescriptionapp.Narcotics";
  1945. oParam.method = "reqGetNaesiWorkId";
  1946. oParam.inds = "req=ds_req";
  1947. oParam.outds = "ds_init_chrglist=workid";
  1948. oParam.async = false;
  1949. //oParam.callback = "cf_TRADT30107";
  1950. tranf_submit(oParam);
  1951. // 출고부서 조회, 설정
  1952. var oParam = {};
  1953. oParam.id = "TRADT01106";
  1954. oParam.service = "pharmacyprescriptionapp.DrugPrint";
  1955. oParam.method = "reqGetMisDeptlist";
  1956. oParam.inds = "";
  1957. oParam.outds = "ds_init_misdeptlist_deptlist=deptlist";
  1958. oParam.async = false;
  1959. //oParam.callback = "cf_TRADT01106";
  1960. tranf_submit(oParam);
  1961. if(ds_init_misdeptlist_deptlist.rowcount == 1) {
  1962. group2.combo1.index = 0;
  1963. } else {
  1964. // 입원주사조제실 제거
  1965. if(ds_init_misdeptlist_deptlist.getColumn(0,"deptcd") == "3242104000") {
  1966. // combo1.choices.itemset.attribute("nodeset") = "/root/init/misdeptlist/deptlist[deptcd != '3242104000' ]";
  1967. ds_init_misdeptlist_deptlist.filter("deptcd!='3242104000'");
  1968. } else {
  1969. group2.combo1.index = 0;
  1970. }
  1971. }
  1972. group2.combo1.updateToDataset();
  1973. //1일기준인지 1회기준인지 체크하여 컬럼을 hidden
  1974. var colHidnValue = lf_grdBaseColHidn("D");
  1975. //1회 기준
  1976. if( colHidnValue == "C" ) {
  1977. switch1.case3.grd_outnarc.setFormatColProperty(switch1.case3.grd_outnarc.getBindCellIndex("body","prcpvol"),"size",0);
  1978. switch1.case3.grd_outnarc.setFormatColProperty(switch1.case3.grd_outnarc.getBindCellIndex("body","prcpvolunit"),"size",0);
  1979. switch1.case3.grd_outnarc.setFormatColProperty(switch1.case3.grd_outnarc.getBindCellIndex("body","dayprcpqty"),"size",0);
  1980. switch1.case3.grd_outnarc.setFormatColProperty(switch1.case3.grd_outnarc.getBindCellIndex("body","dayprcpqtyunit"),"size",0);
  1981. switch1.case1.grd_narclist.setFormatColProperty(switch1.case1.grd_narclist.getBindCellIndex("body","prcpvol"),"size",0);
  1982. switch1.case1.grd_narclist.setFormatColProperty(switch1.case1.grd_narclist.getBindCellIndex("body","prcpvolunit"),"size",0);
  1983. switch1.case1.grd_narclist.setFormatColProperty(switch1.case1.grd_narclist.getBindCellIndex("body","dayprcpqty"),"size",0);
  1984. switch1.case1.grd_narclist.setFormatColProperty(switch1.case1.grd_narclist.getBindCellIndex("body","dayprcpqtyunit"),"size",0);
  1985. } else {
  1986. switch1.case3.grd_outnarc.setFormatColProperty(switch1.case3.grd_outnarc.getBindCellIndex("body","prcpvol2"),"size",0);
  1987. switch1.case3.grd_outnarc.setFormatColProperty(switch1.case3.grd_outnarc.getBindCellIndex("body","prcpvolunit2"),"size",0);
  1988. switch1.case3.grd_outnarc.setFormatColProperty(switch1.case3.grd_outnarc.getBindCellIndex("body","prcpqty2"),"size",0);
  1989. switch1.case3.grd_outnarc.setFormatColProperty(switch1.case3.grd_outnarc.getBindCellIndex("body","prcpqtyunit2"),"size",0);
  1990. switch1.case1.grd_narclist.setFormatColProperty(switch1.case1.grd_narclist.getBindCellIndex("body","prcpvol2"),"size",0);
  1991. switch1.case1.grd_narclist.setFormatColProperty(switch1.case1.grd_narclist.getBindCellIndex("body","prcpvolunit2"),"size",0);
  1992. switch1.case1.grd_narclist.setFormatColProperty(switch1.case1.grd_narclist.getBindCellIndex("body","prcpqty2"),"size",0);
  1993. switch1.case1.grd_narclist.setFormatColProperty(switch1.case1.grd_narclist.getBindCellIndex("body","prcpqtyunit2"),"size",0);
  1994. }
  1995. }
  1996. /****************************************************************************************
  1997. * Argument : N/A
  1998. * Description : 마약리스트 조회
  1999. ****************************************************************************************/
  2000. function fGetNarcData() {
  2001. //조회시 마약종류를 조회조건에 추가 START
  2002. var narccdlist = "";
  2003. var objExt = new ExtCommon();
  2004. var arrTmp = objExt.findRows(ds_temp_srchcond_narclist, "sel", "Y");
  2005. // trace("arrTmp : " + arrTmp.length);
  2006. for(var i = 0; i < arrTmp.length; i++) {
  2007. if(ds_temp_srchcond_narclist.getColumn(arrTmp[i],"sel") == "Y") {
  2008. if(utlf_isNull(narccdlist)) {
  2009. narccdlist = "'" + ds_temp_srchcond_narclist.getColumn(arrTmp[i],"narccd") + "'";
  2010. } else {
  2011. narccdlist += ",'" + ds_temp_srchcond_narclist.getColumn(arrTmp[i],"narccd") + "'";
  2012. }
  2013. }
  2014. }
  2015. // trace("narccdlist : " + narccdlist);
  2016. ds_temp_srchinfo.setColumn(0,"narccd", narccdlist);
  2017. //조회시 마약종류를 조회조건에 추가 END
  2018. // grd_narclist.fixedcellischeck(0, 1) = false;
  2019. // grd_outnarc.fixedcellischeck(0, 1) = false;
  2020. // switch1.case1.grd_narclist.setCellProperty("Head",1,"text",0);
  2021. // switch1.case3.grd_outnarc.setCellProperty("Head",1,"text",0);
  2022. chk_grdAll.enableevent = false;
  2023. chk_grdAll.value = "N";
  2024. chk_grdAll.enableevent = true;
  2025. ds_send_srchinfo.enableevent = false;
  2026. ds_send_srchinfo.copyData(ds_temp_srchinfo);
  2027. if( ds_temp_srchinfo.getColumn(0, "prtab") == "Y") { // 향정반환반납장부 출력조건
  2028. ds_send_srchinfo.setColumn( 0, "cnclflag", "Y");
  2029. ds_send_srchinfo.setColumn( 0, "rtnflag", "Y");
  2030. ds_send_srchinfo.setColumn( 0, "rtnstat", "T");
  2031. ds_send_srchinfo.setColumn( 0, "cnclstat", "T");
  2032. ds_send_srchinfo.setColumn( 0, "narcstat", "");
  2033. }
  2034. ds_send_srchinfo.enableevent = true;
  2035. if(group2.chk_auto.value != "Y") {
  2036. call_TRADT30102();
  2037. } else if(group2.chk_auto.value == "Y") {
  2038. ds_temp_narclist_narclist.clearData();
  2039. dsf_createDsRow("ds_req", [
  2040. {col:"narcflag", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"narcflag")}
  2041. , {col:"timeflag", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"timeflag")}
  2042. , {col:"fst_dd", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"fst_dd")}
  2043. , {col:"last_dd", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"last_dd")}
  2044. , {col:"srchdrugkind", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"srchdrugkind")}
  2045. , {col:"srchioflag", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"srchioflag")}
  2046. , {col:"drugflag", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"drugflag")}
  2047. , {col:"srchroot", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"srchroot")}
  2048. , {col:"narcstat", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"narcstat")}
  2049. , {col:"cnclstat", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"cnclstat")}
  2050. , {col:"rtnstat", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"rtnstat")}
  2051. , {col:"nodeliveflag", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"nodeliveflag")}
  2052. , {col:"narctype", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"narctype")}
  2053. , {col:"pid", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"pid")}
  2054. , {col:"ward", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"ward")}
  2055. , {col:"srchdrugno", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"srchdrugno")}
  2056. , {col:"barcode", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"barcode")}
  2057. , {col:"narccd", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"narccd")}
  2058. , {col:"barcode_2", type:"STRING", size:256, val:""}
  2059. , {col:"srchdeptcd", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"srchdeptcd")}
  2060. , {col:"prntdt", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"prntdt")}
  2061. , {col:"issdeptcd", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"issdeptcd")}
  2062. , {col:"srchprcpkind", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"srchprcpkind")}
  2063. , {col:"kuflag", type:"STRING", size:256, val:"Y"}
  2064. ]);
  2065. var oParam = {};
  2066. oParam.id = "TRADT30110";
  2067. oParam.service = "pharmacyprescriptionapp.Narcotics";
  2068. oParam.method = "reqGetNarcData";
  2069. oParam.inds = "req=ds_req";
  2070. oParam.outds = "ds_temp_narclist_narclist=narclist";
  2071. oParam.async = false;
  2072. oParam.callback = "cf_TRADT30110";
  2073. tranf_submit(oParam);
  2074. }
  2075. }
  2076. function cf_TRADT30110(sSvcId, nErrorCode, sErrorMsg) {
  2077. if(nErrorCode < 0) return;
  2078. dsf_setDefaultVal(ds_temp_narclist_narclist, "sel:Y");
  2079. // dsf_setTypeFormat(ds_temp_narclist_narclist, "prcptims:INT^prcpdayno:INT^rtnqty:INT^prcpno:INT^prcphistno:INT^drugno:INT^drugseqno:INT");
  2080. // fMakeCopyColumn(ds_temp_narclist_narclist,"prcpqtyunit","dayprcpqtyunit");
  2081. // fMakeCopyColumn(ds_temp_narclist_narclist,"prcpqtyunit","prcpqtyunit2");
  2082. // fMakeCopyColumn(ds_temp_narclist_narclist,"prcpvolunit","prcpvolunit2");
  2083. }
  2084. /****************************************************************************************
  2085. * Argument : N/A
  2086. * Description : 바코드 변경시
  2087. ****************************************************************************************/
  2088. function fChgBarcode() {
  2089. var sBar = ds_temp_srchinfo.getColumn(0,"barcode").toUpperCase();
  2090. ds_temp_srchinfo.setColumn(0,"barcode", sBar);
  2091. if(sBar.length >= 21){
  2092. if(utlf_isNull(ds_temp_userinfo_userinfo.getColumn(0, "userid"))) {
  2093. sysf_messageBox("사용자ID가 없습니다. 사용자ID부터","C001");
  2094. ds_temp_srchinfo.setColumn( 0, "srchid","");
  2095. group2.ipt_srchid.setFocus();
  2096. } else if(sBar.substr(0,1) != "M" && sBar.substr(0,1) != "H"){
  2097. sysf_messageBox("바코드 정보가 다릅니다. 바코드를 다시","C001");
  2098. ds_temp_srchinfo.setColumn( 0, "barcode","");
  2099. group2.input9.setFocus();
  2100. } else {
  2101. //바코드로 먼저 해당처방을 조회함
  2102. fGetNarcData();
  2103. //바코드로 Acting처리가 가능한 처방인지 체크함
  2104. //바코드로 처리가능한 Acting : 조제완료, 불출, 잔량반납확인, 반환확인
  2105. //바코드로 조회시 데이터는 한건만 조회됨.
  2106. if(sBar.substr(2,1) == "O" || sBar.substr(2,1) == "E" || sBar.substr(2,1) == "D"){
  2107. if(ds_temp_srchinfo.getColumn(0, "srchroot") == "M"){
  2108. if(ds_main_narclist_narclist.getColumn(0, "narcstat")=="3"){
  2109. //바코드로 취소는 불가능 조회만가능
  2110. ds_main_narclist_narclist.setColumn( 0 , "sel","Y");
  2111. fNarcActing("Prcp");
  2112. return;
  2113. } else if(ds_main_narclist_narclist.getColumn(0, "narcstat")=="4"){
  2114. //바코드로 취소는 불가능 조회만가능
  2115. ds_main_narclist_narclist.setColumn( 0 , "sel","Y");
  2116. //fNarcActing("Drug");
  2117. sysf_messageBox("불출확인은 마약불출화면에서 마약수령자가 처리해야합니다.","I900");
  2118. return;
  2119. }
  2120. } else {
  2121. if(ds_main_narclist_narclist.getColumn(0, "narcstat")=="7"){
  2122. //반납신청상태가 아니면 반납확인을 할수없음.
  2123. //반납확인상태이면 조회만 가능
  2124. fNarcActing("Spre");
  2125. return;
  2126. }
  2127. }
  2128. } else {
  2129. if(ds_main_narclist_narclist.getColumn(0, "narcstat")=="9"){
  2130. //반환신청상태가 아니면 반환확인을 할수없음.
  2131. //그외 상태는 조회만 가능
  2132. fNarcActing("Rtn");
  2133. return;
  2134. }
  2135. }
  2136. ds_temp_srchinfo.setColumn(0,"barcode","");
  2137. }
  2138. } else {
  2139. sysf_messageBox("바코드 정보가 다릅니다.\n다시","C001");
  2140. ds_temp_srchinfo.setColumn(0,"barcode","");
  2141. group2.input9.setFocus();
  2142. }
  2143. }
  2144. /****************************************************************************************
  2145. * Argument : N/A
  2146. * Description : 바코드 변경시
  2147. ****************************************************************************************/
  2148. function fChgBarcodeSpre() {
  2149. var sBar = ds_temp_srchinfo.getColumn(0, "barcodespre").toUpperCase();
  2150. ds_temp_srchinfo.setColumn( 0, "barcodespre", sBar);
  2151. if(sBar.length >= 21){
  2152. if(utlf_isNull(ds_temp_userinfo_userinfo.getColumn(0, "userid"))) {
  2153. sysf_messageBox("사용자ID가 없습니다. 사용자ID부터","C001");
  2154. ds_temp_srchinfo.setColumn( 0, "srchid","");
  2155. group2.ipt_srchid.setFocus();
  2156. } else if(sBar.substr(0,1) != "M" && sBar.substr(0,1) != "H"){
  2157. sysf_messageBox("바코드 정보가 다릅니다. 바코드를 다시","C001");
  2158. ds_temp_srchinfo.setColumn( 0, "barcode","");
  2159. ds_temp_srchinfo.setColumn( 0, "barcodespre","");
  2160. group2.input1.setFocus();
  2161. } else {
  2162. //바코드로 먼저 해당처방을 조회함
  2163. ds_temp_srchinfo.setColumn( 0, "barcode",ds_temp_srchinfo.getColumn(0, "barcodespre"));
  2164. fGetNarcData();
  2165. //바코드로 Acting처리가 가능한 처방인지 체크함
  2166. //바코드로 처리가능한 Acting : 조제완료, 불출, 잔량반납확인, 반환확인
  2167. //바코드로 조회시 데이터는 한건만 조회됨.
  2168. ds_main_narclist_narclist.setColumn( 0 , "sel","Y");
  2169. fNarcActing("Spre");
  2170. ds_temp_srchinfo.setColumn( 0, "barcode","");
  2171. ds_temp_srchinfo.setColumn( 0, "barcodespre","");
  2172. }
  2173. } else {
  2174. sysf_messageBox("바코드 정보가 다릅니다.\n다시","C001");
  2175. ds_temp_srchinfo.setColumn( 0, "barcodespre","");
  2176. group2.input1.setFocus();
  2177. }
  2178. }
  2179. /****************************************************************************************
  2180. * Argument : sActing - 액팅구분
  2181. * Description : 마약 Acting 버튼 클릭시
  2182. ****************************************************************************************/
  2183. function fNarcActing(sActing) {
  2184. if(utlf_isNull(ds_temp_userinfo_userinfo.getColumn(0, "userid"))) {
  2185. sysf_messageBox("사용자ID가 없습니다. 사용자ID를 먼저","C001");
  2186. ds_temp_srchinfo.setColumn( 0, "srchid","");
  2187. group2.ipt_srchid.setFocus();
  2188. return;
  2189. }
  2190. var iActing_Cnt = 0; // 행위 구분을 위한 카운트값
  2191. var sActing_nm = ""; // 해당 행위의 명칭
  2192. var sActingAfter = "";
  2193. var selCnt = 0;
  2194. var RtnCnfmYN = "N";
  2195. var chkAll = ds_send.getColumn(0,"chkall"); // 경북대병원 일괄처리 추가
  2196. // var chkAll1 = ds_send.getColumn(0,"chkall1"); // 경북대병원 일괄처리 추가(불출까지)
  2197. //액팅전 체크표시 cash
  2198. fChkCash("before");
  2199. ds_send_narcinfo_narclist.clear();
  2200. dsf_copyColInfo(ds_send_narcinfo_narclist,ds_main_narclist_narclist);
  2201. /////2018년 3월 마약통합관리 dataset copy 김치국
  2202. ds_sendnarcstoc.clear();
  2203. dsf_copyColInfo(ds_sendnarcstoc,ds_main_narclist_narclist);
  2204. // **** 체크박스 선택 값 카운트 Start ****
  2205. for(var i = 0 ; i < ds_main_narclist_narclist.rowcount ; i++){
  2206. var sel = ds_main_narclist_narclist.getColumn(i, "sel");
  2207. var sNarcStat = ds_main_narclist_narclist.getColumn(i, "narcstat");
  2208. if(sel == "Y" && sNarcStat != "1") selCnt++; // 선택된 값(sel == "Y") 들 중 미신청 값은 제외
  2209. }
  2210. if(selCnt == 0) {
  2211. sysf_messageBox("선택된 데이터가","I004");
  2212. return;
  2213. }
  2214. //실출고부서 값 확인(조제확인/ 반환확인 시)
  2215. if((sActing == "Prcp" || sActing == "Rtn" ) && utlf_isNull(ds_temp_srchinfo.getColumn(0, "stocdeptcd"))) {
  2216. sysf_messageBox("실출고부서를 지정하십시오 ","I999");
  2217. return;
  2218. }
  2219. // **** 체크박스 선택 값 카운트 End ****
  2220. for(var i = 0; i < ds_main_narclist_narclist.rowcount; i++) {
  2221. var sel = ds_main_narclist_narclist.getColumn(i, "sel"); // 선택여부
  2222. var sNarcStat = ds_main_narclist_narclist.getColumn(i, "narcstat"); // 불출상태
  2223. var sCnclStat = ds_main_narclist_narclist.getColumn(i, "cnclstat"); // 반환상태
  2224. var sRtnStat = ds_main_narclist_narclist.getColumn(i, "rtnstat"); // 반납상태
  2225. var sDrugFlag = ds_main_narclist_narclist.getColumn(i, "drugflag"); // 마약_향정구분
  2226. var sReturnFlag = ds_main_narclist_narclist.getColumn(i, "returnflag"); // 반납여부
  2227. var sDrugKind = ds_main_narclist_narclist.getColumn(i, "drugkind"); // 발생구분
  2228. var sIOflag = ds_main_narclist_narclist.getColumn(i, "ioflag"); // 입원_외래구분
  2229. var sPrcphistcd = ds_main_narclist_narclist.getColumn(i, "prcphistcd"); // 처방상태
  2230. var sPid = ds_main_narclist_narclist.getColumn(i, "pid"); // 환자번호
  2231. var sPrcpcd = ds_main_narclist_narclist.getColumn(i, "prcpcd"); // 약품코드
  2232. var sDrugno = ds_main_narclist_narclist.getColumn(i, "drugno"); // 약품코드
  2233. var sMsg = "*투약번호 : "+sDrugno+" *환자번호 : "+ sPid+ " *약품코드 : "+ sPrcpcd + "\n";
  2234. //=========================================== 제한조건 체크 Start ================================================//
  2235. // 변수명 parameter 명칭 동작가능상태 //
  2236. //------------------------------------------------------------------------------------------------------------//
  2237. // sCnclStat 1. 7 : 반환종료 sCnclStat == "7" ( 진행불가 ) //
  2238. //------------------------------------------------------------------------------------------------------------//
  2239. // sActing
  2240. // 1. Prcp : 조제확인 sNarcStat == "3" [출력완료] //
  2241. // 2. PrcpCncl : 조제취소 sNarcStat == "4" [조제완료] //
  2242. // 3. Drug : 불출확인 sNarcStat == "4" [조제완료] //
  2243. // 4. DrugCncl : 불출취소 sNarcStat == "5" [불출] //
  2244. // 5. Rtn : 반환확인 sCnclStat == "1" [반환신청] //
  2245. // 6. RtnCncl : 반환취소 (2009-05-05 추가) sCnclStat == "2" [반환확인] //
  2246. // 7. Spre : 잔량확인 sRtnStat == "1" [잔량신청] //
  2247. // 8. SpreCncl : 잔량취소 (2009-05-05 추가) sRtnStat == "2" [잔량확인] //
  2248. //============================================================================================================//
  2249. if(sel == "Y"){
  2250. //// 2018년 마약통합관리 정보 저장 데이타set copy 김치국
  2251. ///// 해당 관리 항목만 하기위한 데이타 찾기
  2252. ds_stocsend.setColumn(0,"drugcd" , sPrcpcd );
  2253. var oParam = {};
  2254. oParam.id = "TRADT12008";
  2255. oParam.service = "pharmacydrugsumapp.NarcManagent";
  2256. oParam.method = "reqGetNarcStocDataOk";
  2257. oParam.inds = "req=ds_stocsend";
  2258. oParam.outds = "ds_stocrece=stocdataok";
  2259. oParam.async = false;
  2260. tranf_submit(oParam);
  2261. var cOkFlag = ds_stocrece.getColumn(0, "dataokflag");
  2262. if (cOkFlag == 1 ) {
  2263. var dRow = ds_sendnarcstoc.addRow();
  2264. ds_sendnarcstoc.copyRow(dRow,ds_main_narclist_narclist,i);
  2265. dsf_makeValue(ds_sendnarcstoc,"stocdeptcd","string", ds_temp_srchinfo.getColumn(0, "stocdeptcd") );
  2266. ds_sendnarcstoc.setColumn(dRow,"stocdeptcd" , ds_temp_srchinfo.getColumn(0, "stocdeptcd") );
  2267. ///
  2268. }
  2269. /////////////////////
  2270. // *** 반환종료 *** 처방 메시지 처리 (진행불가) Start
  2271. if(sCnclStat == "7" && (sNarcStat == "3" || sNarcStat == "4")){
  2272. //메세지처리 반환종료 된 처방입니다.
  2273. sysf_messageBox(sMsg+"반환종료 되었습니다. 반환처방전을 출력","I008");
  2274. return;
  2275. } else if(sCnclStat == "7" && sNarcStat == "2"){
  2276. //메세지처리 : 반환종료되었습니다.
  2277. sysf_messageBox(sMsg+"반환종료 되었습니다.","");
  2278. return;
  2279. }
  2280. // *** 반환종료 *** 처방 메시지 처리 (진행불가) End
  2281. // 경북대병원 일괄처리(Prcpdrug)추가
  2282. if(sActing == "Prcpdrug") {
  2283. if(utlf_isNull(chkAll)) {
  2284. sysf_messageBox("일괄처리가 체크되지", "E007");
  2285. return;
  2286. }
  2287. if(sNarcStat == "2" && chkAll == "Y") {
  2288. // astfCopyNodeSet("/root/send/narcinfo/narclist", "/root/main/narclist/narclist["+i+"]");
  2289. var nRow = ds_send_narcinfo_narclist.addRow();
  2290. ds_send_narcinfo_narclist.copyRow(nRow,ds_main_narclist_narclist,i);
  2291. sActing_nm = "불출"
  2292. iActing_Cnt++;
  2293. } else { // 불출상태가 [미신청]일때
  2294. sActing_nm = "불출"
  2295. }
  2296. }else if(sActing == "Prcp"){ // ***조제확인*** 출력완료 일 때만 기능 동작
  2297. // 경북대병원 일괄처리 추가.. 일괄처리시 불출신청 체크 안함.
  2298. if(sNarcStat == "2" && utlf_isNull(chkAll)){ // [불출신청] 상태일 때
  2299. sysf_messageBox("마약처방전이 출력되지","E007");
  2300. return;
  2301. }
  2302. if(parseInt(sNarcStat, 10) > 3){ // [출력완료] 상태 이상일 때
  2303. sysf_messageBox("이미 조제완료된 처방","E008");
  2304. return;
  2305. }
  2306. // 경북대병원 일괄처리시 조제완료까지 처리
  2307. if(sNarcStat == "2" && chkAll == "Y") {
  2308. // astfCopyNodeSet("/root/send/narcinfo/narclist", "/root/main/narclist/narclist["+i+"]");
  2309. var nRow = ds_send_narcinfo_narclist.addRow();
  2310. ds_send_narcinfo_narclist.copyRow(nRow,ds_main_narclist_narclist,i);
  2311. sActing_nm = "조제완료";
  2312. iActing_Cnt++;
  2313. //// 2018년 마약통합관리 정보 저장 데이타set copy 김치국
  2314. var dRow = ds_sendnarcstoc.addRow();
  2315. ds_sendnarcstoc.copyRow(dRow,ds_main_narclist_narclist,i);
  2316. //////
  2317. } else { // 불출상태가 [미신청]일때
  2318. sActing_nm = "조제완료";
  2319. }
  2320. if(sNarcStat == "3"){ // [출력완료] 일 때만 기능 동작
  2321. // astfCopyNodeSet("/root/send/narcinfo/narclist", "/root/main/narclist/narclist["+i+"]");
  2322. var nRow = ds_send_narcinfo_narclist.addRow();
  2323. ds_send_narcinfo_narclist.copyRow(nRow,ds_main_narclist_narclist,i);
  2324. sActing_nm = "조제완료";
  2325. iActing_Cnt++;
  2326. } else { // 불출상태가 [미신청]일때
  2327. sActing_nm = "조제완료";
  2328. }
  2329. } else if(sActing == "PrcpCncl"){ // ***조제취소***
  2330. if(!utlf_isNull(sCnclStat)){
  2331. if(sysf_messageBox("반환된 처방입니다. 조제취소를", "Q002") == "7") {
  2332. return;
  2333. }
  2334. }
  2335. if(sNarcStat == "4"){ // [조제완료] 상태일 때
  2336. // astfCopyNodeSet("/root/send/narcinfo/narclist", "/root/main/narclist/narclist["+i+"]");
  2337. var nRow = ds_send_narcinfo_narclist.addRow();
  2338. ds_send_narcinfo_narclist.copyRow(nRow,ds_main_narclist_narclist,i);
  2339. iActing_Cnt++;
  2340. }
  2341. sActing_nm = "조제취소";
  2342. } else if(sActing == "Drug"){ // ***불출확인***
  2343. // 경북대병원 일괄처리 추가 (출력 --> 불출까지)
  2344. // if(sNarcStat == "4" && chkAll == "Y" && chkAll1 == "Y"){ // [조제완료] 상태일 때
  2345. // // astfCopyNodeSet("/root/send/narcinfo/narclist", "/root/main/narclist/narclist["+i+"]");
  2346. // var nRow = ds_send_narcinfo_narclist.addRow();
  2347. // ds_send_narcinfo_narclist.copyRow(nRow,ds_main_narclist_narclist,i);
  2348. // iActing_Cnt++;
  2349. // sActing_nm = "불출";
  2350. // }
  2351. // else if 가되어 맞는게 아닐지? 위 조건이 맞는다면 아래쪽도 당연히 타서 두줄이 생성되게 된다..
  2352. if(sNarcStat == "4"){ // [조제완료] 상태일 때
  2353. // astfCopyNodeSet("/root/send/narcinfo/narclist", "/root/main/narclist/narclist["+i+"]");
  2354. var nRow = ds_send_narcinfo_narclist.addRow();
  2355. ds_send_narcinfo_narclist.copyRow(nRow,ds_main_narclist_narclist,i);
  2356. iActing_Cnt++;
  2357. }
  2358. sActing_nm = "불출";
  2359. } else if(sActing == "DrugCncl"){ // ***불출취소***
  2360. if(!utlf_isNull(sCnclStat)) {
  2361. if(sysf_messageBox("반환된 처방입니다. 불출취소를", "Q002") == "7") {
  2362. return;
  2363. }
  2364. }
  2365. if(sNarcStat == "5"){ // [불출] 상태일 때
  2366. // astfCopyNodeSet("/root/send/narcinfo/narclist", "/root/main/narclist/narclist["+i+"]");
  2367. var nRow = ds_send_narcinfo_narclist.addRow();
  2368. ds_send_narcinfo_narclist.copyRow(nRow,ds_main_narclist_narclist,i);
  2369. iActing_Cnt++;
  2370. }
  2371. sActing_nm = "불출취소";
  2372. } else if(sActing == "Spre"){ // ***잔량확인***
  2373. // 20091111 이선경 수정 : 잔량확인 가능한 조건 변경
  2374. // 1. 잔량이 0 이 아닌 경우 (실제 잔량이 있는 경우)는 잔량신청일 경우만 잔량확인이 되도록
  2375. // 2. 잔량이 0 인 경우(빈 앰플반납하는 경우)는 부서확인일 경우만 잔량확인이 되도록
  2376. // 20091201 이선경 수정 : 처방상태가 O 인 경우만 잔량확인 가능하도록 조건 추가
  2377. var spreqty = ds_main_narclist_narclist.getColumn(i, "spreqty");
  2378. if(sPrcphistcd == "O" && ((spreqty > 0 && sRtnStat == "1") || (spreqty == "0" && sNarcStat >= "6" ))) {
  2379. // astfCopyNodeSet("ds_send_narcinfo_narclist", "ds_main_narclist_narclist["+i+"]");
  2380. var nRow = ds_send_narcinfo_narclist.addRow();
  2381. ds_send_narcinfo_narclist.copyRow(nRow,ds_main_narclist_narclist,i);
  2382. iActing_Cnt++;
  2383. // [반환신청] 이거나 [외래] 경구약 혹은 외용제이면서 처방상태(sReturnFlag)가 [D_C]일 경우
  2384. // 반환일시가 존재할때.
  2385. if((sCnclStat == "1" || (sIOflag == "O" && (sDrugKind == "N" || sDrugKind == "Y") && sReturnFlag == "Y"))
  2386. && !utlf_isNull(ds_main_narclist_narclist.getColumn(i, "rtndt"))){
  2387. var vb_prcpcd = ds_main_narclist_narclist.getColumn(i, "prcpcd");
  2388. var vb_Chk = sysf_messageBox(vb_prcpcd+"마약에 대해 반환확인 데이터가 존재합니다.\n반환확인을 ", "Q004");
  2389. if(vb_Chk == 6){
  2390. // model.makeValue("/root/send/narcinfo/narclist["+getNodesetCount("/root/send/narcinfo/narclist")+"]/acting_after", "Rtn");
  2391. ds_send_narcinfo_narclist.addColumn("acting_after","string");
  2392. ds_send_narcinfo_narclist.setColumn(ds_send_narcinfo_narclist.rowcount-1,"acting_after","Rtn");
  2393. }
  2394. }
  2395. } else {
  2396. sysf_messageBox(sMsg+"잔량 처리 대상이 아닙니다", "");
  2397. }
  2398. sActing_nm = "잔량반납확인";
  2399. } else if(sActing == "SpreCncl"){ // ***잔량취소***
  2400. if(sRtnStat == "2"){ // [잔량확인] 일 때
  2401. // astfCopyNodeSet("/root/send/narcinfo/narclist", "/root/main/narclist/narclist["+i+"]");
  2402. var nRow = ds_send_narcinfo_narclist.addRow();
  2403. ds_send_narcinfo_narclist.copyRow(nRow,ds_main_narclist_narclist,i);
  2404. iActing_Cnt++;
  2405. }
  2406. sActing_nm = "잔량취소";
  2407. } else if(sActing == "Rtn"){ // ***반환확인***
  2408. /*
  2409. 1. 입원 약주사, 외래주사는 간호사가 반환신청을 함
  2410. 2. 퇴원/외박/외출은 약국에서 반환을 수행(삭제, 간호에서 반환신청해야함)
  2411. 3. 외래 원내 약/외용약은 약국에서 반환을 수행
  2412. */
  2413. if(sCnclStat == "1"){ // [반환신청]상태일 때 (입원/외래 공통)
  2414. if(!utlf_isNull(ds_main_narclist_narclist.getColumn(i, "rtnqty"))){
  2415. //병동추가 처방도 반환확인시 ast.adthdrug에 반환정보 insert
  2416. if(ds_temp_srchinfo.getColumn(0, "narcflag") == "H") {
  2417. fIptRtnCnts(i);
  2418. }
  2419. // astfCopyNodeSet("ds_send_narcinfo_narclist", "ds_main_narclist_narclist["+i+"]");
  2420. var nRow = ds_send_narcinfo_narclist.addRow();
  2421. ds_send_narcinfo_narclist.copyRow(nRow,ds_main_narclist_narclist,i);
  2422. iActing_Cnt++;
  2423. } else {
  2424. sysf_messageBox("반환량이 없습니다. 반환량을","C001");
  2425. return;
  2426. }
  2427. if(sRtnStat == "1" && !utlf_isNull(ds_main_narclist_narclist.getColumn(i, "rtndt"))) {
  2428. var vb_Chk = sysf_messageBox("잔량확인 데이터가 존재합니다.\n잔랑반납확인을 ", "Q004");
  2429. if(vb_Chk == 6){
  2430. // model.makeValue("/root/send/narcinfo/narclist["+getNodesetCount("/root/send/narcinfo/narclist")+"]/acting_after", "Spre");
  2431. ds_send_narcinfo_narclist.addColumn("acting_after","string");
  2432. ds_send_narcinfo_narclist.setColumn(ds_send_narcinfo_narclist.rowcount-1,"acting_after","Spre");
  2433. }
  2434. }
  2435. } else if(sIOflag == "O" && (sDrugKind == "N" || sDrugKind == "Y") && sReturnFlag == "Y"){ // [외래] 경구/외용약이면서 prcphistcd가 D,C 일 때
  2436. if(utlf_isNull(ds_main_narclist_narclist.getColumn(i, "rtnqty"))) {
  2437. sysf_messageBox("반환량이 없습니다. 반환량을","C001");
  2438. return;
  2439. }
  2440. if(isNaN(ds_main_narclist_narclist.getColumn(i, "rtnqty"))){
  2441. sysf_messageBox("반환량은 숫자로","C001");
  2442. ds_main_narclist_narclist.setColumn( i , "rtnqty", "");
  2443. return;
  2444. }
  2445. // astfCopyNodeSet("ds_send_narcinfo_narclist", "ds_main_narclist_narclist["+i+"]");
  2446. var nRow = ds_send_narcinfo_narclist.addRow();
  2447. ds_send_narcinfo_narclist.copyRow(nRow,ds_main_narclist_narclist,i);
  2448. iActing_Cnt++;
  2449. if(sRtnStat == "1" && !utlf_isNull(ds_main_narclist_narclist.getColumn(i, "rtndt"))) {
  2450. var vb_prcpcd = ds_main_narclist_narclist.getColumn(i, "prcpcd");
  2451. var vb_Chk = sysf_messageBox(vb_prcpcd+"마약에 대해 잔량확인 데이터가 존재합니다.\n잔랑반납확인을 ", "Q004");
  2452. if(vb_Chk == 6){
  2453. // model.makeValue("/root/send/narcinfo/narclist["+getNodesetCount("/root/send/narcinfo/narclist")+"]/acting_after", "Spre");
  2454. ds_send_narcinfo_narclist.addColumn("acting_after","string");
  2455. ds_send_narcinfo_narclist.setColumn(ds_send_narcinfo_narclist.rowcount-1,"acting_after","Spre");
  2456. }
  2457. }
  2458. }
  2459. sActing_nm = "반환확인";
  2460. RtnCnfmYN = "Y";
  2461. rtnprntflag = "Y";
  2462. } else if(sActing == "RtnCncl"){ // ***반환취소***
  2463. if(sCnclStat == "2"){ // [반환확인] 일 때
  2464. // astfCopyNodeSet("/root/send/narcinfo/narclist", "/root/main/narclist/narclist["+i+"]");
  2465. var nRow = ds_send_narcinfo_narclist.addRow();
  2466. ds_send_narcinfo_narclist.copyRow(nRow,ds_main_narclist_narclist,i);
  2467. iActing_Cnt++;
  2468. }
  2469. sActing_nm = "반환취소";
  2470. }
  2471. }
  2472. }
  2473. //=========================================== 제한조건 체크 Start ===========================================
  2474. if(iActing_Cnt == 0 && utlf_isNull(ds_temp_srchinfo.getColumn(0,"barcode"))) {
  2475. sysf_messageBox("선택된 데이터중에 ["+sActing_nm+"]할 데이터가 없거나 \n선택된 데이터가","I004");
  2476. return;
  2477. } else if(iActing_Cnt == 0 && !utlf_isNull(ds_temp_srchinfo.getColumn(0,"barcode"))) {
  2478. sysf_messageBox("이미","I001");
  2479. ds_temp_srchinfo.setColumn( 0, "barcode","");
  2480. group2.input9.setFocus();
  2481. return;
  2482. }
  2483. ds_send_narcinfo_srchinfo.copyData(ds_temp_srchinfo);
  2484. ds_send_narcinfo_userinfo.copyData(ds_temp_userinfo_userinfo);
  2485. dsf_makeValue(ds_send_narcinfo_srchinfo,"acting","string",sActing);
  2486. //조제확인시 라벨자동출력은 fNarcLBLPrint 함수에서 처방조회시 가져온 ioflag로 체크해서 출력 여부 결정
  2487. //(수정원인 : 외래,병동 전체 조회 후 조제확인시 라벨자동출력이 안되는 현상이 있음)
  2488. //경북대병원 처방전 일괄처리할때 라벨도 같이 출력 되도록 함.
  2489. if ( ds_send.getColumn(0,"lblskip") != "Y" && sActing == "Prcpdrug"){
  2490. fNarcLBLPrintR("Prnt");
  2491. //라벨 출력 횟수 저장
  2492. call_TXADT30102();
  2493. }
  2494. // 반환처방전 자동출력 2009.07.30 pymi
  2495. if(sActing_nm == "반환확인" || RtnCnfmYN == "Y") {
  2496. fNarcPrint();
  2497. }
  2498. // 2013년 3월26일 김치국 아래 수행을 밑으로 내림
  2499. call_TXADT30101();
  2500. //액팅전 체크표시 다시 표시
  2501. // grd_narclist.fixedcellischeck(0, 1) = false;
  2502. // grd_outnarc.fixedcellischeck(0, 1) = false;
  2503. // switch1.case1.grd_narclist.setCellProperty("Head",1,"text",0);
  2504. // switch1.case3.grd_outnarc.setCellProperty("Head",1,"text",0);
  2505. chk_grdAll.value = "N";
  2506. fChkCash("after");
  2507. ds_temp_srchinfo.setColumn(0,"barcode","");
  2508. group2.input9.setFocus();
  2509. }
  2510. /****************************************************************************************
  2511. * Argument : N/A
  2512. * Description : 마약처방전 출력
  2513. ****************************************************************************************/
  2514. function fNarcPrint() {
  2515. if(utlf_isNull(ds_temp_userinfo_userinfo.getColumn(0, "userid"))) {
  2516. sysf_messageBox("사용자ID가 없습니다. 사용자ID를 먼저","C001");
  2517. ds_temp_srchinfo.setColumn( 0, "barcode","");
  2518. group2.input9.setFocus();
  2519. return;
  2520. }
  2521. var chkAll = ds_send.getColumn(0,"chkall"); //경북대병원 일괄처리 추가
  2522. //액팅전 체크표시 cash
  2523. fChkCash("before");
  2524. ds_send_prntinfo.clear();
  2525. dsf_copyColInfo(ds_send_prntinfo,ds_main_narclist_narclist);
  2526. for(var i = 0; i < ds_main_narclist_narclist.rowcount ; i++){
  2527. var sel = ds_main_narclist_narclist.getColumn(i, "sel");
  2528. var narcstat = ds_main_narclist_narclist.getColumn(i, "narcstat"); // 불출상태
  2529. var cnclstat = ds_main_narclist_narclist.getColumn(i, "cnclstat"); // 반환상태
  2530. var ioflag = ds_main_narclist_narclist.getColumn(i, "ioflag"); // 입원외래구분
  2531. var prntdt = ds_main_narclist_narclist.getColumn(i, "prntdt"); // 처방전출력일시
  2532. var sPid = ds_main_narclist_narclist.getColumn(i, "pid"); // 환자번호
  2533. var sPrcpcd = ds_main_narclist_narclist.getColumn(i, "prcpcd"); // 처방명
  2534. var sDrugno = ds_main_narclist_narclist.getColumn(i, "drugno"); // 투약번호
  2535. var rpt = ds_temp.getColumn(0, "reprnt"); // 재출력구분 경북대병원 처방전 재출력 추가
  2536. var msg = "*투약번호 : "+sDrugno+" *환자번호 : "+ sPid+ " *약품코드 : "+ sPrcpcd + "\n";
  2537. var result = "";
  2538. var prntyn = ""; // 출력가능 여부
  2539. if(sel == "Y"){
  2540. // 경북대병원 처방전 재출력시 재출력 체크 하지 않게 함.
  2541. if (rpt=="Y" && narcstat == "1" || rpt == "Y" && narcstat == "2") {
  2542. alert("일괄처리후 재출력할수 있습니다.");
  2543. return;
  2544. }
  2545. if(!utlf_isNull(prntdt) && narcstat > 2 && rpt != "Y" && rtnprntflag != "Y") {
  2546. var prntdata = prntdt.substring(0,4) + "년" + prntdt.substring(4,6) + "월" + prntdt.substring(6,8) + "일" +
  2547. prntdt.substring(8,10) + ":" + prntdt.substring(10,12) + ":" + prntdt.substring(12,14);
  2548. result = sysf_messageBox(prntdata + "에 출력한 처방입니다. 재출력을","Q003");
  2549. } else {
  2550. result = "6";
  2551. }
  2552. if(result == "6") {
  2553. ds_send_prntinfo.addRow();
  2554. ds_send_prntinfo.copyRow(0,ds_main_narclist_narclist,i);
  2555. dsf_makeValue(ds_send_prntinfo,"prntid","string",ds_temp_userinfo_userinfo.getColumn(0,"userid"));
  2556. // ************************ [반환처방전] 출력 ************************
  2557. if(!utlf_isNull(cnclstat)) {
  2558. if(ioflag == "I"){
  2559. // 반환신청, 반환확인, 반환종료시(출력완료, 조제완료 일 때만) 반환처방전 출력 가능
  2560. // 반환신청일때는 제외, 반환확인, 반환종료상태만 가능
  2561. // 2013년 3월 26일 김치국 반환신청(cnclstat == "1")일때도 처방전 출력으로 원복
  2562. if(cnclstat == "1" || cnclstat == "2" || (parseInt(narcstat) >= 3 && parseInt(narcstat) <= 4 && cnclstat == "7")){
  2563. dsf_makeValue(ds_send_prntinfo,"prntflag","string","D");
  2564. prntyn = "Y";
  2565. } else {
  2566. if(cnclstat == "7" ){
  2567. //메세지처리 반환종료 된 처방입니다.
  2568. sysf_messageBox(msg+"반환","I002");
  2569. continue;
  2570. } else {
  2571. //메세지처리 반환확인해야 합니다.
  2572. sysf_messageBox(msg+"반환확인시 반환처방전 출력","I006");
  2573. continue;
  2574. }
  2575. continue;
  2576. }
  2577. } else {
  2578. if(cnclstat == "0"){
  2579. //반환확인후 출력가능합니다.
  2580. sysf_messageBox(msg+"반환확인후 출력","I006");
  2581. continue;
  2582. } else {
  2583. dsf_makeValue(ds_send_prntinfo,"prntflag","string","D");
  2584. prntyn = "Y";
  2585. }
  2586. }
  2587. // ************************ [마약처방전] 출력 ************************
  2588. } else {
  2589. if(narcstat == "1"){
  2590. //불출신청이 되어야 출력가능합니다.
  2591. sysf_messageBox(msg+"불출신청 이후 출력","I006");
  2592. continue;
  2593. } else {
  2594. dsf_makeValue(ds_send_prntinfo,"prntflag","string","O");
  2595. prntyn = "Y";
  2596. }
  2597. }
  2598. if(prntyn == "Y"){
  2599. call_TRADT30103();
  2600. if(!utlf_isNull(ds_main_prntlist_patinfo.getColumn(0, "drugno"))) {
  2601. //처방전에 DUR이 존재하면 RFADT30105 존재하지 않으면 RFADT30100 출력
  2602. var resn = ds_main_prntlist_resn.getColumn(0, "resnnm");
  2603. // 반환일경우 수량에 (-) 표시
  2604. if (cnclstat == "0" || cnclstat == "1" || cnclstat == "2" || cnclstat == "7" ) {
  2605. var totdrugqty = ds_main_prntlist_prntlist.getColumn(0, "totdrugqty");
  2606. totdrugqty = totdrugqty * -1 ;
  2607. ds_main_prntlist_prntlist.setColumn( 0, "totdrugqty", totdrugqty );
  2608. }
  2609. if( utlf_isNull(resn) ){
  2610. //1일기준인지 1회기준인지 체크하여 컬럼을 hidden
  2611. var colHidnValue = lf_grdBaseColHidn("D");
  2612. if( colHidnValue == "C") {//1회 기준
  2613. dsf_makeValue(ds_main_prntlist_patinfo,"prcpvolchk","string","Y");
  2614. }
  2615. // 경북대병원_마약처방전 폼 변경
  2616. // RFADT30100 ==> RFADT30106
  2617. // RFADT30105 ==> RFADT30107
  2618. // exeReportPreview("RFADT30106", "XMLSTR", "", "", "true","","","","","true");
  2619. var objCxtCommon = new ExtCommon();
  2620. var objImgeData = objCxtCommon.encodeBase64(ds_main_prntlist_patinfo.getColumn(0, "signdata"));
  2621. ds_main_prntlist_patinfo.addColumn("sign","string");
  2622. ds_main_prntlist_patinfo.setColumn(0, "sign", objImgeData);
  2623. var objDOM = rptf_createDOM(); // DOM 객체 설정
  2624. rptf_setNodeListToDOM(objDOM, "/root/main/prntlist/prntlist", ds_main_prntlist_prntlist); // 데이터셋 1
  2625. rptf_setNodeListToDOM(objDOM, "/root/main/prntlist/patinfo" , ds_main_prntlist_patinfo); // 데이터셋 2
  2626. rptf_setNodeListToDOM(objDOM, "/root/main/prntlist/diaginfo", ds_main_prntlist_diaginfo); // 데이터셋 3
  2627. rptf_setNodeListToDOM(objDOM, "/root/temp/userinfo/userinfo", ds_temp_userinfo_userinfo); // 데이터셋 4
  2628. var objParam = new Object();
  2629. objParam.xml_data_XML1 = objDOM.documentElement.source; // 최상의노드 XML 스트링 추출
  2630. var option = "open=0;save=0;directprint=1;printdialog=0;print=0;zoom=0;";
  2631. var prtOption = "printername=";
  2632. rptf_exeReportPreview30(["RFADT30106"],[objParam], option, prtOption);
  2633. }else{
  2634. // exeReportPreview("RFADT30107", "XMLSTR", "", "", "true","","","","","true");
  2635. var objCxtCommon = new ExtCommon();
  2636. var objImgeData = objCxtCommon.encodeBase64(ds_main_prntlist_patinfo.getColumn(0, "signdata"));
  2637. ds_main_prntlist_patinfo.addColumn("sign","string");
  2638. ds_main_prntlist_patinfo.setColumn(0, "sign", objImgeData);
  2639. var objDOM1 = rptf_createDOM(); // DOM 객체 설정
  2640. var objDOM2 = rptf_createDOM(); // DOM 객체 설정
  2641. rptf_setNodeListToDOM(objDOM1, "/root/main/prntlist/prntlist" , ds_main_prntlist_prntlist); // 데이터셋 1
  2642. rptf_setNodeListToDOM(objDOM1, "/root/main/prntlist/patinfo" , ds_main_prntlist_patinfo); // 데이터셋 2
  2643. rptf_setNodeListToDOM(objDOM1, "/root/main/prntlist/diaginfo" , ds_main_prntlist_diaginfo); // 데이터셋 3
  2644. rptf_setNodeListToDOM(objDOM1, "/root/main/prntlist/resn" , ds_main_prntlist_resn); // 데이터셋 4
  2645. rptf_setNodeListToDOM(objDOM2, "/root/main/prntlist/resn" , ds_main_prntlist_resn); // 데이터셋 1
  2646. var objParam = new Object();
  2647. objParam.xml_data_XML1 = objDOM1.documentElement.source; // 최상의노드 XML 스트링 추출
  2648. objParam.xml_data_XML2 = objDOM2.documentElement.source; // 최상의노드 XML 스트링 추출
  2649. var option = "open=0;save=0;directprint=1;printdialog=0;print=0;zoom=0;";
  2650. var prtOption = "printername=";
  2651. rptf_exeReportPreview30(["RFADT30107"],[objParam], option, prtOption);
  2652. }
  2653. }
  2654. }
  2655. }
  2656. }
  2657. }
  2658. // 20101206 wify 경북대병원 처방전 출력후 체크표시 및 출력완료 표시
  2659. if ( utlf_isNull(chkAll) ) {
  2660. fGetNarcData();
  2661. // grd_narclist.fixedcellischeck(0, 1) = false;
  2662. // grd_outnarc.fixedcellischeck(0, 1) = false;
  2663. // switch1.case1.grd_narclist.setCellProperty("Head",1,"text",0);
  2664. // switch1.case3.grd_outnarc.setCellProperty("Head",1,"text",0);
  2665. chk_grdAll.value = "N";
  2666. //액팅전 체크표시 다시 표시
  2667. fChkCash("after");
  2668. }
  2669. }
  2670. /****************************************************************************************
  2671. * Argument : chk - 출력구분
  2672. * Description : 마약라벨 출력 (사용안함 - fNarcLBLPrintR 로 대체)
  2673. ****************************************************************************************/
  2674. function fNarcLBLPrint(chk) {
  2675. // var reprint="";
  2676. //
  2677. // model.copyNode("/root/init/barcdprntsetup", "/root/main/barcdprntsetup");
  2678. //
  2679. // //20091015 이선경 수정 : 자동출력 기본이 병동(퇴원제외)만이나 lbltype3이 "Y"이면 외래, 퇴원도 모두 출력됨
  2680. // var lbltype3 = model.getValue("/root/init/lbltype/item/lbltype3");
  2681. //
  2682. // for(var i = grd_narclist.fixedRows; i < grd_narclist.rows; i++){
  2683. // var sel = model.getValue("/root/main/narclist/narclist["+i+"]/sel");
  2684. // var sNarcStat = model.getValue("/root/main/narclist/narclist["+i+"]/narcstat");
  2685. // var ioflag = model.getValue("/root/main/narclist/narclist["+i+"]/ioflag");
  2686. // var drugflag = model.getValue("/root/main/narclist/narclist["+i+"]/drugflag");
  2687. // var sPrcphistcd = model.getValue("/root/main/narclist/narclist["+ i +"]/prcphistcd"); // 2010.03.15 pymi
  2688. // //model.removeNodeset("/root/send/narcinfo/narclist");
  2689. //
  2690. // //20091015 이선경 수정 : 조제확인시 라벨자동출력은 fNarcLBLPrint 함수에서 처방조회시 가져온 ioflag로 체크해서 출력 여부 결정
  2691. // //(수정원인 : 외래,병동 전체 조회 후 조제확인시 라벨자동출력이 안되는 현상이 있음)
  2692. //
  2693. // if(sel == 'Y' && ((chk == "Prnt" && sNarcStat == "3" && sPrcphistcd != "D" && (lbltype3 == "Y" || (ioflag == "I" && drugflag != "L" && drugflag != "G"))) || (chk == "Reprnt" && parseInt(sNarcStat,10) > 3))){ // 2010.03.15 pymi 반환완료된 처방 제외
  2694. // // Comm 설정
  2695. // //CommAX.CommPort = "1"; // 출력 Port
  2696. // //CommAX.Settings = "9600,n,8,1"; // Comm 설정
  2697. // PrnKind = model.getvalue("/root/init/barcdprntsetup/prntsetupinfo/setupinfo/prntkind");
  2698. // PrnMarginLeft = model.getvalue("/root/init/barcdprntsetup/prntsetupinfo/setupinfo/blank/left");
  2699. // PrnMarginTop = model.getvalue("/root/init/barcdprntsetup/prntsetupinfo/setupinfo/blank/top");
  2700. // var commkind = model.getvalue("/root/init/barcdprntsetup/prntsetupinfo/setupinfo/commkind")
  2701. // if ( PrnKind ==7 ) {
  2702. // CommAX.PrnKind =4;
  2703. // } else {
  2704. // CommAX.PrnKind =PrnKind;
  2705. // }
  2706. //
  2707. // if(commkind == "02") {
  2708. // CommAX.PortNm = 1;
  2709. // } else {
  2710. // CommAX.PortNm = 2;
  2711. // }
  2712. //
  2713. // if(commkind == "01") {
  2714. // CommAX.PrtNm = model.getvalue("/root/init/barcdprntsetup/prntsetupinfo/setupinfo/comm01/setupval");
  2715. // }
  2716. //
  2717. // var sSndMsg = ""; //라벨출력내용
  2718. //
  2719. // if ( model.getValue("/root/main/narclist/narclist["+i+"]/lblprnttims")>0 ){
  2720. // reprint ="(재)";
  2721. // }
  2722. //
  2723. // //astfCopyNodeSet("/root/send/narcinfo/narclist", "/root/main/narclist/narclist["+i+"]");
  2724. //
  2725. // //if ( CommAX.PortOpen() == true) {
  2726. // //시작(X, Y)
  2727. // sSndMsg += astfStartFormat(0, 0, "S");
  2728. // //라벨이름
  2729. // var nm = "";
  2730. // if(model.getValue("/root/main/narclist/narclist["+i+"]/narcflag") == "M") {
  2731. // nm = "마 약";
  2732. // }else {
  2733. // nm = "향 정";
  2734. // }
  2735. // sSndMsg += astfPrintOut(50, 40, 10, nm,"");
  2736. //
  2737. // //처방일자
  2738. // sSndMsg += astfPrintOut(245, 40, 34, fGetDateString(model.getValue("/root/main/narclist/narclist["+i+"]/prcpdd")),"");
  2739. // //환자번호
  2740. // sSndMsg += astfPrintOut(245, 75, 34, model.getValue("/root/main/narclist/narclist["+i+"]/pid"),"");
  2741. // //수행부서명
  2742. // var issdept = model.getValue("/root/main/narclist/narclist["+i+"]/issdeptcdnm");
  2743. // sSndMsg += astfPrintOut(35, 120, 3,issdept.substring(0, 5) ,"");
  2744. // //병실
  2745. // sSndMsg += astfPrintOut(150, 120, 3, "("+model.getValue("/root/main/narclist/narclist["+i+"]/roomcd") + ")","");
  2746. // //환자이름+투약번호
  2747. // var sPid_Drugno = model.getValue("/root/main/narclist/narclist["+i+"]/patnm")
  2748. // + " (" + model.getValue("/root/main/narclist/narclist["+i+"]/drugno")+reprint + ")";
  2749. // sSndMsg += astfPrintOut(245, 120, 3, sPid_Drugno,"");
  2750. // //선그리기
  2751. // sSndMsg += astfGraphicBox(10, 155, 450, 0, 3);
  2752. //
  2753. // //마약코드
  2754. // sSndMsg += astfPrintOut(30, 170, 3, model.getValue("/root/main/narclist/narclist["+i+"]/prcpcd"),"");
  2755. //
  2756. // //1일기준인지 1회기준인지 체크
  2757. // var colHidnValue = grdBaseColHidn("D");
  2758. // if( colHidnValue == "C") {//1회 기준
  2759. // //일용량
  2760. // sSndMsg += astfPrintOut(250, 170, 4, model.getValue("/root/main/narclist/narclist["+i+"]/prcpvol2")+model.getValue("/root/main/narclist/narclist["+i+"]/prcpvolunit"),"");
  2761. // //일수량
  2762. // sSndMsg += astfPrintOut(360, 170, 4, model.getValue("/root/main/narclist/narclist["+i+"]/prcpqty2")+model.getValue("/root/main/narclist/narclist["+i+"]/prcpqtyunit"),"");
  2763. // } else {
  2764. // //일용량
  2765. // sSndMsg += astfPrintOut(250, 170, 4, model.getValue("/root/main/narclist/narclist["+i+"]/prcpvol")+model.getValue("/root/main/narclist/narclist["+i+"]/prcpvolunit"),"");
  2766. // //일수량
  2767. // sSndMsg += astfPrintOut(360, 170, 4, model.getValue("/root/main/narclist/narclist["+i+"]/totdrugqty")+model.getValue("/root/main/narclist/narclist["+i+"]/prcpqtyunit"),"");
  2768. // }
  2769. //
  2770. // //마약명칭
  2771. // sSndMsg += astfPrintOut(30, 210, 28, "("+model.getValue("/root/main/narclist/narclist["+i+"]/drugnm")+")","");
  2772. //
  2773. // // 바코드(21자리) : 마약구분(1)+입원/외래구분(1)+반납구분(1)+처방일자(8)+처방번호(10)
  2774. // var narcflag = model.getValue("/root/main/narclist/narclist["+i+"]/narcflag");
  2775. // var ioflag = model.getValue("/root/main/narclist/narclist["+i+"]/ioflag");
  2776. // var returnflag = model.getValue("/root/main/narclist/narclist["+i+"]/returnflag");
  2777. // if(returnflag ==""){
  2778. // returnflag = "O";
  2779. // } else {
  2780. // returnflag = "D";
  2781. // }
  2782. // var prcpdd = model.getValue("/root/main/narclist/narclist["+i+"]/prcpdd");
  2783. // var prcpno = model.getValue("/root/main/narclist/narclist["+i+"]/prcpno");
  2784. // var drugseqno ="";
  2785. // if ( ioflag =="O" ){
  2786. // drugseqno = model.getValue("/root/main/narclist/narclist["+i+"]/drugseqno");
  2787. // }
  2788. // var iLen = prcpno.length;
  2789. // for(var j=iLen; j<10; j++) {
  2790. // prcpno = "0" + prcpno;
  2791. // }
  2792. //
  2793. // var sResult = narcflag+ioflag+returnflag+prcpdd+prcpno+drugseqno;
  2794. //
  2795. // //바코드(변환)
  2796. // if(PrnKind == "2" || PrnKind == "7" ) {
  2797. // sSndMsg += astfBarCode_Code39(100, 242, "N", 40, sResult, "S");
  2798. // } else {
  2799. // sSndMsg += astfBarCode_Code39(30, 245, "N", 40, sResult, "S");
  2800. // }
  2801. // //sSndMsg += astfPrintOut(30, 310, 28, sResult,"");
  2802. // //처방입력일시
  2803. // sSndMsg += astfPrintOut(30, 310, 28, "처방입력일시 : "+fGetDateString(model.getValue("/root/main/narclist/narclist["+i+"]/rgstdt")),"");
  2804. //
  2805. //
  2806. // sSndMsg += astfEndFormat(0);
  2807. // CommAX.SendMsg(sSndMsg);
  2808. // sSndMsg = "";
  2809. //
  2810. // gTimer = window.setInterval("fStopTimer()",10000);
  2811. //
  2812. // //CommAX.PortClose();
  2813. // model.refresh();
  2814. //
  2815. // //}
  2816. // }
  2817. // }
  2818. // //submit("TXADT30102");
  2819. }
  2820. /****************************************************************************************
  2821. * Argument : N/A
  2822. * Description : 사용안함
  2823. ****************************************************************************************/
  2824. function fStopTimer() {
  2825. // window.clearinterval(gTimer);
  2826. }
  2827. /****************************************************************************************
  2828. * Argument : s - 문자열
  2829. * Description : 날자 Mask 적용
  2830. ****************************************************************************************/
  2831. function fGetDateString(s){
  2832. var dates = "";
  2833. if(s.length > 8){
  2834. dates = s.substring(0,4) +"/" +s.substring(4,6)+"/" +s.substring(6,8)+" "+s.substring(8,10)+":"+s.substring(10,12)+":"+s.substring(12,14);
  2835. } else {
  2836. dates = s.substring(0,4) +"/" +s.substring(4,6)+"/" +s.substring(6,8);
  2837. }
  2838. return dates;
  2839. }
  2840. /****************************************************************************************
  2841. * Argument : rowid - 행
  2842. * Description : 반환량입력시
  2843. ****************************************************************************************/
  2844. function fIptRtnCnts(rowid) {
  2845. var RtnCnts = ds_main_narclist_narclist.getColumn(rowid,"rtnqty");
  2846. var RtnCnfmDt = ds_main_rtnlist_rtnlist.getColumn(rowid,"rtncnfmdt");
  2847. if(!utlf_isNull(RtnCnts)) {
  2848. //반납의뢰인 약품만 반납처리함
  2849. if(!utlf_isNull(RtnCnfmDt)){
  2850. sysf_messageBox("반환종료된 약품","E008");
  2851. return;
  2852. }
  2853. //반납량을 입력하지 않았을 경우
  2854. if(RtnCnts == "0"){
  2855. sysf_messageBox("반환량을","C001");
  2856. ds_main_narclist_narclist.setColumn(rowid,"rtnqty", "");
  2857. return;
  2858. }
  2859. if(isNaN(RtnCnts)){
  2860. sysf_messageBox("반환량은 숫자로","C001");
  2861. ds_main_narclist_narclist.setColumn(rowid,"rtnqty", "");
  2862. return;
  2863. }
  2864. //반납로직을 위한 변수 선언
  2865. var IOFlag = ds_main_narclist_narclist.getColumn(rowid, "ioflag");
  2866. var PrcpClscd = ds_main_narclist_narclist.getColumn(rowid, "prcpclscd");
  2867. var PrcpGenrflag = ds_main_narclist_narclist.getColumn(rowid, "prcpgenrflag");
  2868. var PrcpKindcd = ds_main_narclist_narclist.getColumn(rowid, "prcpkindcd");
  2869. if(IOFlag == "O"){
  2870. //수가계산방식에 따른 변화량
  2871. var sCalcmthdcd = ds_main_narclist_narclist.getColumn(rowid, "calcmthdcd");
  2872. //반납재고량 계산을 위한 변수 선언
  2873. var DeliveCrite = ds_main_narclist_narclist.getColumn(rowid, "delivecrite");
  2874. var iRtnCnts = parseInt(RtnCnts, 10);
  2875. var iLimitCnts = 0;
  2876. var PrcpQty = parseFloat(ds_main_narclist_narclist.getColumn(rowid, "prcpqty"));
  2877. var DayPrcpQty = parseFloat(ds_main_narclist_narclist.getColumn(rowid, "dayprcpqty"));
  2878. var PrcpTims = parseInt(ds_main_narclist_narclist.getColumn(rowid, "prcptims"), 10);
  2879. var PrcpDayno = parseInt(ds_main_narclist_narclist.getColumn(rowid, "prcpdayno"), 10);
  2880. var RtnStocQty = 0;
  2881. if(PrcpClscd == "A4" || sCalcmthdcd == 4){
  2882. //외래 외용제 (수량반납)
  2883. if(sCalcmthdcd == 4){
  2884. iLimitCnts = DayPrcpQty;
  2885. } else if(sCalcmthdcd == 5){
  2886. iLimitCnts = DayPrcpQty*PrcpDayno;
  2887. } else {
  2888. iLimitCnts = DayPrcpQty*PrcpDayno;
  2889. }
  2890. if(iRtnCnts > iLimitCnts){
  2891. sysf_messageBox("반납 가능한 양을","E003");
  2892. ds_main_narclist_narclist.setColumn(rowid, "rtncnts", "");
  2893. return;
  2894. }
  2895. RtnStocQty = fCalStocQty("Q", DeliveCrite, iRtnCnts, "", "", rowid);
  2896. //투약내역에 들어간 반납결과 수치 계산
  2897. ds_main_narclist_narclist.setColumn(rowid, "rtndrugtims" , ds_main_narclist_narclist.getColumn(rowid, "prcptims"));
  2898. ds_main_narclist_narclist.setColumn(rowid, "rtndrugdayno", ds_main_narclist_narclist.getColumn(rowid, "prcpdayno"));
  2899. } else if(PrcpGenrflag == "O" ||
  2900. ((PrcpGenrflag == "I" || PrcpGenrflag == "E" || PrcpGenrflag == "D") && (PrcpKindcd == "50" || PrcpKindcd == "60" || PrcpKindcd == "70")) ){
  2901. //외래 약주사 또는 입원에서 전환된 퇴원/외출/외박약 (일수반납)
  2902. iLimitCnts = PrcpDayno;
  2903. if(iRtnCnts > iLimitCnts){
  2904. sysf_messageBox("반납 가능한 양을","E003");
  2905. ds_main_narclist_narclist.setColumn(rowid, "rtncnts", "");
  2906. return;
  2907. }
  2908. RtnStocQty = fCalStocQty("D", DeliveCrite, iRtnCnts, PrcpQty, PrcpTims, rowid);
  2909. //투약내역에 들어간 반납결과 수치 계산
  2910. ds_main_narclist_narclist.setColumn(rowid, "rtndrugtims" , ds_main_narclist_narclist.getColumn(rowid, "prcptims"));
  2911. ds_main_narclist_narclist.setColumn(rowid, "rtndrugdayno", iRtnCnts);
  2912. } else if(PrcpGenrflag == "I" || PrcpGenrflag == "E" || PrcpGenrflag == "D"){
  2913. //입원에서 전환된 그외 처방 (횟수반납)
  2914. iLimitCnts = PrcpTims*PrcpDayno;
  2915. if(iRtnCnts > iLimitCnts){
  2916. sysf_messageBox("반납 가능한 양을","E003");
  2917. ds_main_narclist_narclist.setColumn(rowid, "rtncnts", "");
  2918. return;
  2919. }
  2920. RtnStocQty = fCalStocQty("T", DeliveCrite, iRtnCnts, PrcpQty, "", "", rowid);
  2921. //투약내역에 들어간 반납결과 수치 계산
  2922. var temp = iRtnCnts%PrcpDayno;
  2923. var RtnDrugDayno = 0;
  2924. var RtnDrugTims = 0;
  2925. RtnDrugTims = iRtnCnts;
  2926. RtnDrugDayno = 1;
  2927. ds_main_narclist_narclist.setColumn(rowid, "rtndrugtims" , RtnDrugTims);
  2928. ds_main_narclist_narclist.setColumn(rowid, "rtndrugdayno", RtnDrugDayno);
  2929. }
  2930. } else if(IOFlag == "I"){
  2931. //반납재고량 계산을 위한 변수 선언
  2932. var DeliveCrite = ds_main_narclist_narclist.getColumn(rowid, "delivecrite");
  2933. var iRtnCnts = parseInt(RtnCnts, 10);
  2934. var iLimitCnts = 0;
  2935. var PrcpQty = parseFloat(ds_main_narclist_narclist.getColumn(rowid, "prcpqty"));
  2936. var DayPrcpQty = parseFloat(ds_main_narclist_narclist.getColumn(rowid, "dayprcpqty"));
  2937. var PrcpTims = parseInt(ds_main_narclist_narclist.getColumn(rowid, "prcptims"), 10);
  2938. var PrcpDayno = parseInt(ds_main_narclist_narclist.getColumn(rowid, "prcpdayno"), 10);
  2939. var RtnStocQty = 0;
  2940. if(PrcpClscd == "A4"){
  2941. //외래 외용제 (수량반납)
  2942. if(sCalcmthdcd == 4){
  2943. iLimitCnts = DayPrcpQty;
  2944. } else if(sCalcmthdcd == 5){
  2945. iLimitCnts = DayPrcpQty*PrcpDayno;
  2946. } else {
  2947. iLimitCnts = DayPrcpQty*PrcpDayno;
  2948. }
  2949. if(iRtnCnts > iLimitCnts){
  2950. sysf_messageBox("반납 가능한 양을","E003");
  2951. ds_main_narclist_narclist.setColumn(rowid, "rtncnts", "");
  2952. return;
  2953. }
  2954. RtnStocQty = fCalStocQty("Q", DeliveCrite, iRtnCnts, "", "", rowid);
  2955. //투약내역에 들어간 반납결과 수치 계산
  2956. ds_main_narclist_narclist.setColumn(rowid, "rtndrugtims" , ds_main_narclist_narclist.getColumn(rowid, "prcptims"));
  2957. ds_main_narclist_narclist.setColumn(rowid, "rtndrugdayno", ds_main_narclist_narclist.getColumn(rowid, "prcpdayno"));
  2958. } else if(PrcpGenrflag == "O" ||
  2959. ((PrcpGenrflag == "I" || PrcpGenrflag == "E" || PrcpGenrflag == "D") && (PrcpKindcd == "50" || PrcpKindcd == "60" || PrcpKindcd == "70")) ){
  2960. //외래 약주사 또는 입원에서 전환된 퇴원/외출/외박약 (일수반납)
  2961. iLimitCnts = PrcpDayno;
  2962. if(iRtnCnts > iLimitCnts){
  2963. sysf_messageBox("반납 가능한 양을","E003");
  2964. ds_main_narclist_narclist.setColumn(rowid, "rtncnts", "");
  2965. return;
  2966. }
  2967. RtnStocQty = fCalStocQty("D", DeliveCrite, iRtnCnts, PrcpQty, PrcpTims, rowid);
  2968. //투약내역에 들어간 반납결과 수치 계산
  2969. ds_main_narclist_narclist.setColumn(rowid, "rtndrugtims" , ds_main_narclist_narclist.getColumn(rowid, "prcptims"));
  2970. ds_main_narclist_narclist.setColumn(rowid, "rtndrugdayno", iRtnCnts);
  2971. } else if(PrcpGenrflag == "I" || PrcpGenrflag == "E" || PrcpGenrflag == "D"){
  2972. //입원에서 전환된 그외 처방 (횟수반납)
  2973. iLimitCnts = PrcpTims*PrcpDayno;
  2974. if(iRtnCnts > iLimitCnts){
  2975. sysf_messageBox("반납 가능한 양을","E003");
  2976. ds_main_narclist_narclist.setColumn(rowid, "rtncnts", "");
  2977. return;
  2978. }
  2979. RtnStocQty = fCalStocQty("T", DeliveCrite, iRtnCnts, PrcpQty, "", rowid);
  2980. //투약내역에 들어간 반납결과 수치 계산
  2981. var temp = iRtnCnts%PrcpDayno;
  2982. var RtnDrugDayno = 0;
  2983. var RtnDrugTims = 0;
  2984. RtnDrugTims = iRtnCnts;
  2985. RtnDrugDayno = 1;
  2986. ds_main_narclist_narclist.setColumn(rowid, "rtndrugtims" , RtnDrugTims);
  2987. ds_main_narclist_narclist.setColumn(rowid, "rtndrugdayno", RtnDrugDayno);
  2988. }
  2989. }
  2990. ds_main_narclist_narclist.setColumn(rowid, "rtnstocqty", fChkFloat(RtnStocQty));
  2991. ds_main_narclist_narclist.setColumn(rowid, "sel", "Y");
  2992. }
  2993. }
  2994. /****************************************************************************************
  2995. * Argument : qty - number
  2996. * Description : fChkFloat
  2997. ****************************************************************************************/
  2998. function fChkFloat(qty) {
  2999. var fQty = parseFloat(qty);
  3000. var fRst = "";
  3001. if(fQty%1 == 0){
  3002. fRst = parseInt(qty);
  3003. } else {
  3004. fRst = qty;
  3005. }
  3006. return fRst;
  3007. }
  3008. /****************************************************************************************
  3009. * Argument : N/A
  3010. * Description : 병동/외래구분 체크시 - 사용안함
  3011. ****************************************************************************************/
  3012. function fChkIOFlag() {
  3013. var chk = ds_temp_srchinfo.getColumn(0, "srchioflag");
  3014. if(chk.length == 7){
  3015. ds_temp_srchinfo.setColumn( 0, "iototalflag", "T");
  3016. } else {
  3017. ds_temp_srchinfo.setColumn( 0, "iototalflag", "");
  3018. }
  3019. }
  3020. /****************************************************************************************
  3021. * Argument : N/A
  3022. * Description : userid 변경시
  3023. ****************************************************************************************/
  3024. function fChgUserID() {
  3025. var sUserid = ds_temp_srchinfo.getColumn(0,"srchid");
  3026. ds_send_userinfo.setColumn( 0, "userid", sUserid);
  3027. dsf_createDsRow("ds_req", [
  3028. {col:"userid", type:"STRING", size:256, val:ds_send_userinfo.getColumn(0,"userid")}
  3029. ]);
  3030. var oParam = {};
  3031. oParam.id = "TRADT30104";
  3032. oParam.service = "pharmacyprescriptionapp.DrugReturn";
  3033. oParam.method = "reqGetUserInfo";
  3034. oParam.inds = "req=ds_req";
  3035. oParam.outds = "ds_temp_userinfo_userinfo=userinfo";
  3036. oParam.async = false;
  3037. //oParam.callback = "cf_TRADT30104";
  3038. tranf_submit(oParam);
  3039. if(utlf_isNull(ds_temp_userinfo_userinfo.getColumn(0, "userid"))){
  3040. sysf_messageBox("사용자ID 정보가 없습니다.\n다시","C001");
  3041. ds_temp_srchinfo.setColumn( 0, "srchid","");
  3042. group2.ipt_srchid.setFocus();
  3043. } else {
  3044. ds_temp_srchinfo.setColumn( 0, "srchid","");
  3045. group2.ipt_srchid.setFocus();
  3046. group2.input9.setFocus();
  3047. }
  3048. }
  3049. /****************************************************************************************
  3050. * Argument : N/A
  3051. * Description : 토글클릭시 - 사용안함
  3052. ****************************************************************************************/
  3053. function fClickToggle(chk) {
  3054. if(chk == "1"){
  3055. ds_temp_srchinfo.setColumn( 0, "srchroot", "M");
  3056. } else if(chk == "2"){
  3057. ds_temp_srchinfo.setColumn( 0, "srchroot", "R");
  3058. }
  3059. fChgSwitch();
  3060. fGetNarcData();
  3061. }
  3062. /****************************************************************************************
  3063. * Argument : N/A
  3064. * Description : 입원외래구분 클릭시
  3065. ****************************************************************************************/
  3066. function fChgIOFlag() {
  3067. var ioflag = ds_temp_srchinfo.getColumn(0, "srchioflag");
  3068. // ========================== 병동, 퇴원_외박_외출 radio 컨트롤 visible ==========================
  3069. if(ioflag == "O"){
  3070. ds_temp_srchinfo.setColumn( 0, "drugflag", "");
  3071. group2.rdo_drugflag.visible = false;
  3072. switch1.case3.grd_outnarc.setFormatColProperty(switch1.case3.grd_outnarc.getBindCellIndex("body","prcpkindnm"),"size",0); //처방구분숨기기
  3073. if(ds_temp_srchinfo.getColumn(0, "narcflag") == "H") {
  3074. //group2.combo2.index = 3; //외래향정일때 실시일자
  3075. } else {
  3076. group2.combo2.index = 1; //그외 적용일자
  3077. }
  3078. } else if(ioflag == "I"){
  3079. ds_temp_srchinfo.setColumn( 0, "drugflag", "I");
  3080. group2.rdo_drugflag.visible = true;
  3081. switch1.case3.grd_outnarc.setFormatColProperty(switch1.case3.grd_outnarc.getBindCellIndex("body","prcpkindnm"),"size",52); //처방구분보이기
  3082. group2.combo2.index = 1; //그외 적용일자
  3083. }
  3084. // =========================================================================================
  3085. // ========================== 병동 Combo 조회===========================
  3086. dsf_makeValue(ds_send_srchcond,"deptflag","string","W");
  3087. dsf_createDsRow("ds_req", [
  3088. {col:"deptflag", type:"STRING", size:256, val:ds_send_srchcond.getColumn(0,"deptflag")}
  3089. ]);
  3090. var oParam = {};
  3091. oParam.id = "TRADT30401";
  3092. oParam.service = "pharmacyprescriptionapp.Narcotics";
  3093. oParam.method = "reqGetNursSrchList";
  3094. oParam.inds = "req=ds_req";
  3095. oParam.outds = "ds_temp_srchcond_dept=dept";
  3096. oParam.async = false;
  3097. //oParam.callback = "cf_TRADT30401";
  3098. tranf_submit(oParam);
  3099. ds_temp_drugdeptinfo_dept.copyData(ds_temp_srchcond_dept); //수행부서 셋팅
  3100. dsf_addDsItem(ds_temp_drugdeptinfo_dept,"deptcd","deptnm","수술실 마취","3073100000"); //수행부서 셋팅
  3101. dsf_addDsItem(ds_temp_drugdeptinfo_dept,"deptcd","deptnm","수술실 회복실","3073300000"); //수행부서 셋팅
  3102. dsf_addDsItem(ds_temp_drugdeptinfo_dept,"deptcd","deptnm","전체",""); //???
  3103. dsf_addDsItem(ds_temp_srchcond_dept,"deptcd","deptnm","3073100000","수술실 마취"); //불출신청부서 셋팅
  3104. dsf_addDsItem(ds_temp_srchcond_dept,"deptcd","deptnm","3073300000","수술실 회복실"); //불출신청부서 셋팅
  3105. dsf_createDsRow("ds_req", [
  3106. {col:"deptcd", type:"STRING", size:256, val:""}
  3107. ]);
  3108. var oParam = {};
  3109. oParam.id = "TRADT30405";
  3110. oParam.service = "pharmacyprescriptionapp.Narcotics";
  3111. oParam.method = "reqGetOutDeptInfo";
  3112. oParam.inds = "req=ds_req";
  3113. oParam.outds = "ds_temp_dutdeptinfo_dept=dept";
  3114. oParam.async = false;
  3115. //oParam.callback = "cf_TRADT30405";
  3116. tranf_submit(oParam);
  3117. dsf_copyDs(ds_temp_drugdeptinfo_dept, ds_temp_dutdeptinfo_dept, "after");
  3118. dsf_copyDs(ds_temp_srchcond_dept, ds_temp_dutdeptinfo_dept, "after");
  3119. dsf_addDsItem(ds_temp_srchcond_dept,"deptcd","deptnm","","");
  3120. fChgSwitch();
  3121. fGetNarcData();
  3122. call_TRADT30101();
  3123. }
  3124. /****************************************************************************************
  3125. * Argument : N/A
  3126. * Description : switch case변경
  3127. ****************************************************************************************/
  3128. function fChgSwitch() {
  3129. var srchroot = ds_temp_srchinfo.getColumn(0, "srchroot");
  3130. var ioflag = ds_temp_srchinfo.getColumn(0, "srchioflag");
  3131. var drugflag = ds_temp_srchinfo.getColumn(0, "drugflag");
  3132. if(srchroot == "M"){
  3133. if(ioflag == "O"){
  3134. switch1.tabindex = 2;
  3135. } else {
  3136. if(drugflag == "L"){
  3137. switch1.tabindex = 2;
  3138. } else {
  3139. switch1.tabindex = 0;
  3140. }
  3141. }
  3142. } else if(srchroot == "R"){
  3143. switch1.tabindex = 1;
  3144. }
  3145. }
  3146. /****************************************************************************************
  3147. * Argument : param_grid
  3148. * Description : 환자별 조회인지 체크
  3149. ****************************************************************************************/
  3150. function fChkPatSearch(param_grid) {
  3151. var pid = ds_temp_srchinfo.getColumn(0,"pid");
  3152. if(!utlf_isNull(pid) && param_grid.rowcount != 0){
  3153. for(var i = 0; i < param_grid.rowcount; i++){
  3154. if(ds_main_narclist_narclist.getColumn(i,"narcstat") != "1"){
  3155. ds_main_narclist_narclist.setColumn(i,"sel", "Y");
  3156. }
  3157. }
  3158. }
  3159. }
  3160. /****************************************************************************************
  3161. * Argument : chk - 전후 구분
  3162. * Description : 액팅후 체크표시 cach
  3163. ****************************************************************************************/
  3164. function fChkCash(chk) {
  3165. var pid = ds_temp_srchinfo.getColumn(0,"pid");
  3166. var param_grid = "";
  3167. if(switch1.tabindex == 0){
  3168. param_grid = switch1.case1.grd_narclist;
  3169. } else {
  3170. param_grid = switch1.case3.grd_outnarc;
  3171. }
  3172. if(param_grid.rowcount != 0){
  3173. if(chk == "before"){
  3174. ds_temp_chkcashinfo_narclist.clear();
  3175. dsf_copyColInfo(ds_temp_chkcashinfo_narclist,ds_main_narclist_narclist);
  3176. for(var i = 0 ; i < param_grid.rowcount ; i++){
  3177. if(ds_main_narclist_narclist.getColumn(i, "sel") == "Y"){
  3178. ds_temp_chkcashinfo_narclist.copyRow(ds_temp_chkcashinfo_narclist.addRow(),ds_main_narclist_narclist,i);
  3179. }
  3180. }
  3181. } else if (chk == "after"){
  3182. for(var a = 0; a < ds_temp_chkcashinfo_narclist.rowcount; a++){
  3183. var cash_prcpdd = ds_temp_chkcashinfo_narclist.getColumn(a, "prcpdd");
  3184. var cash_prcpno = ds_temp_chkcashinfo_narclist.getColumn(a, "prcpno");
  3185. for(var b = 0; b < param_grid.rowcount ; b++){
  3186. var search_prcpdd = ds_main_narclist_narclist.getColumn(b, "prcpdd");
  3187. var search_prcpno = ds_main_narclist_narclist.getColumn(b, "prcpno");
  3188. if(cash_prcpdd == search_prcpdd && cash_prcpno == search_prcpno){
  3189. ds_main_narclist_narclist.setColumn( b , "sel", "Y");
  3190. }
  3191. }
  3192. }
  3193. }
  3194. }
  3195. }
  3196. /****************************************************************************************
  3197. * Argument : RtnType, DeliveCrite, RtnCnts, Qty, Tims, rowid
  3198. * Description : 불출계산에 따른 반납재고량 계산
  3199. * : 계산 방식
  3200. * : 원처방 불출량(totdrugqty) - 살아있는처방 불출량 계산 = 반환된 불출량
  3201. ****************************************************************************************/
  3202. function fCalStocQty(RtnType, DeliveCrite, RtnCnts, Qty, Tims, rowid) {
  3203. var dResult = 0;
  3204. var PackVol = parseFloat(ds_main_narclist_narclist.getColumn(rowid, "packvol"));
  3205. var NearIntNum = 0;
  3206. var RoundNum = 0;
  3207. //수가계산방식에 따른 변화량
  3208. var sCalcmthdcd = ds_main_narclist_narclist.getColumn(rowid, "calcmthdcd");
  3209. if ( utlf_isNull(Tims) ) { Tims = 1; }
  3210. if(RtnType == "Q"){
  3211. //수량반납
  3212. //외용약만 수량반납하므로 무조건 올림처리
  3213. dResult = Math.ceil(RtnCnts);
  3214. } else if(RtnType == "T"){
  3215. // 횟수반납
  3216. // 횟수반납시에는 RtnCnts가 횟수이므로 Tims는 제외
  3217. //살아있는 처방 불출량 계산을 위한 횟수 변환
  3218. var iPrcptims = ds_main_narclist_narclist.getColumn(rowid, "prcptims");
  3219. var itotdrugqty = ds_main_narclist_narclist.getColumn(rowid, "totdrugqty");
  3220. if(iPrcptims == RtnCnts){
  3221. //살아있는 처방이 없으므로 불출량은 원처방 불출량(totdrugqty)임
  3222. return itotdrugqty;
  3223. } else {
  3224. //살아있는 처방이 있으면 살아있는 처방의 횟수를 계산
  3225. RtnCnts = iPrcptims - RtnCnts;
  3226. }
  3227. // 1 : 단가*수량*횟수*일수
  3228. // 4 : 단가*수량
  3229. // 5 : 단가*수량*일수
  3230. if(sCalcmthdcd == "1"){
  3231. //초기화 없이 다 계산처리함
  3232. } else if(sCalcmthdcd == "4" || sCalcmthdcd == "5"){
  3233. //횟수, 일수 1로 초기화
  3234. RtnCnts = "1";
  3235. }
  3236. if (DeliveCrite == "1") {
  3237. // 처방대로
  3238. dResult = Math.round(Qty*RtnCnts*1000)/1000;
  3239. } else if (DeliveCrite == "2") {
  3240. // 1/4 1회 올림 --> 1/2 1회 올림 수정
  3241. dResult = Math.round(Math.ceil(Qty)*Tims*RtnCnts*1000)/1000;
  3242. } else if (DeliveCrite == "3") {
  3243. // 1/2 1회 올림
  3244. dResult = Math.round(Math.ceil(Qty)*RtnCnts*1000)/1000;
  3245. } else if (DeliveCrite == "4") {
  3246. // 1/4 1일 올림
  3247. NearIntNum = Math.floor(Qty*Tims);
  3248. RoundNum = (Qty*Tims) - NearIntNum;
  3249. if(RoundNum >= 0.5){
  3250. dResult = Math.round((NearIntNum+0.5)*(RtnCnts/Tims)*1000)/1000;
  3251. } else {
  3252. dResult = Math.round((NearIntNum+1)*(RtnCnts/Tims)*1000)/1000;
  3253. }
  3254. } else if (DeliveCrite == "5") {
  3255. // 1/2 1일 올림
  3256. dResult = Math.round(Math.ceil(Qty*Tims)*(RtnCnts/Tims)*1000)/1000;
  3257. } else if (DeliveCrite == "6") {
  3258. // 계산후 올림
  3259. dResult = Math.ceil(Qty*RtnCnts);
  3260. }
  3261. // 원처방 불출량(totdrugqty) - 살아있는처방 불출량 계산 = 반환된 불출량
  3262. dResult = itotdrugqty - dResult;
  3263. } else if(RtnType == "D"){
  3264. //일수반납
  3265. //살아있는 처방 불출량 계산을 위한 횟수 변환
  3266. var iPrcpDayno = ds_main_narclist_narclist.getColumn(rowid, "prcpdayno");
  3267. var itotdrugqty = ds_main_narclist_narclist.getColumn(rowid, "totdrugqty");
  3268. if(iPrcpDayno == RtnCnts){
  3269. //살아있는 처방이 없으므로 불출량은 원처방 불출량(totdrugqty)임
  3270. return itotdrugqty;
  3271. } else {
  3272. //살아있는 처방이 있으면 살아있는 처방의 횟수를 계산
  3273. RtnCnts = iPrcpDayno - RtnCnts;
  3274. }
  3275. // 1 : 단가*수량*횟수*일수
  3276. // 4 : 단가*수량
  3277. // 5 : 단가*수량*일수
  3278. if(sCalcmthdcd == "1"){
  3279. //초기화 없이 다 계산처리함
  3280. } else if(sCalcmthdcd == "4"){
  3281. //횟수, 일수 1로 초기화
  3282. Tims = "1";
  3283. RtnCnts = "1";
  3284. } else if(sCalcmthdcd == "5"){
  3285. //횟수 1로 초기화
  3286. Tims = "1";
  3287. }
  3288. if (DeliveCrite == "1") {
  3289. // 처방대로
  3290. dResult = Math.round(Qty*Tims*RtnCnts*1000)/1000;
  3291. } else if (DeliveCrite == "2") {
  3292. // 1/4 1회 올림 --> 1/2 1회 올림 수정
  3293. dResult = Math.round(Math.ceil(Qty)*Tims*RtnCnts*1000)/1000;
  3294. } else if (DeliveCrite == "3") {
  3295. // 1/2 1회 올림
  3296. dResult = Math.round(Math.ceil(Qty)*Tims*RtnCnts*1000)/1000;
  3297. } else if (DeliveCrite == "4") {
  3298. // 1/4 1일 올림
  3299. NearIntNum = Math.floor(Qty*Tims);
  3300. RoundNum = (Qty*Tims) - NearIntNum;
  3301. if(RoundNum >= 0.5){
  3302. dResult = Math.round((NearIntNum+0.5)*RtnCnts*1000)/1000;
  3303. } else {
  3304. dResult = Math.round((NearIntNum+1)*RtnCnts*1000)/1000;
  3305. }
  3306. } else if (DeliveCrite == "5") {
  3307. // 1/2 1일 올림
  3308. dResult = Math.round(Math.ceil(Qty*Tims)*RtnCnts*1000)/1000;
  3309. } else if (DeliveCrite == "6") {
  3310. // 계산후 올림
  3311. dResult = Math.ceil(Qty*Tims*RtnCnts);
  3312. }
  3313. // 원처방 불출량(totdrugqty) - 살아있는처방 불출량 계산 = 반환된 불출량
  3314. dResult = itotdrugqty - dResult;
  3315. }
  3316. return dResult;
  3317. }
  3318. /****************************************************************************************
  3319. * Argument : chk - 출력구분
  3320. * Description : 마약라벨 출력
  3321. ****************************************************************************************/
  3322. function fNarcLBLPrintR(chk) {
  3323. var reprint = "";
  3324. //20091015 이선경 수정 : 자동출력 기본이 병동(퇴원제외)만이나 lbltype3이 "Y"이면 외래, 퇴원도 모두 출력됨
  3325. var lbltype3 = ds_init_lbltype_item.getColumn(0, "lbltype3");
  3326. var prcpclscdflag = "N";
  3327. dsf_createDs("ds_temp_print");
  3328. ds_main_narclist_narclist.filter("sel=='Y'");
  3329. ds_temp_print.copyData(ds_main_narclist_narclist,true);
  3330. ds_main_narclist_narclist.filter("");
  3331. for(var i = 0; i < ds_temp_print.rowcount; i++){
  3332. var sel = ds_temp_print.getColumn(i, "sel");
  3333. var sNarcStat = ds_temp_print.getColumn(i, "narcstat");
  3334. var ioflag = ds_temp_print.getColumn(i, "ioflag");
  3335. var drugflag = ds_temp_print.getColumn(i, "drugflag");
  3336. var sPrcphistcd = ds_temp_print.getColumn(i, "prcphistcd"); // 2010.03.15 pymi
  3337. var pastillyn = ds_temp_print.getColumn(i, "pastillyn"); // 2019.07.10 향정수불여부 마약주사를 향정으로 분류하기 위해
  3338. //20091015 이선경 수정 : 조제확인시 라벨자동출력은 fNarcLBLPrint 함수에서 처방조회시 가져온 ioflag로 체크해서 출력 여부 결정
  3339. //(수정원인 : 외래,병동 전체 조회 후 조제확인시 라벨자동출력이 안되는 현상이 있음)
  3340. if(sel == "Y" && ((chk == "Prnt" && sNarcStat == "2" && sPrcphistcd != "D" && (lbltype3 == "Y" || (ioflag == "I" && drugflag != "L" && drugflag != "G"))) || (chk == "Reprnt" && parseInt(sNarcStat,10) > 3))){ // 2010.03.15 pymi 반환완료된 처방 제외
  3341. var PrnKind = ds_data_setupinfo.getColumn(0, "prntkind");
  3342. var PrnMarginLeft = ds_data_blank.getColumn(0, "left");
  3343. var PrnMarginTop = ds_data_blank.getColumn(0, "top");
  3344. var commkind = ds_data_setupinfo.getColumn(0, "commkind");
  3345. if(ds_temp_print.getColumn(i, "prcpclscd") == "A6") {
  3346. prcpclscdflag = "Y"; // 20120724_주사라벨이 아닐때만
  3347. }
  3348. if ( ds_temp_print.getColumn(i, "lblprnttims") > 0 ){
  3349. reprint ="(재)";
  3350. }
  3351. // 바코드(21자리) : 마약구분(1)+입원_외래구분(1)+반납구분(1)+처방일자(8)+처방번호(10)
  3352. var narcflag = ds_temp_print.getColumn(i, "narcflag");
  3353. var ioflag = ds_temp_print.getColumn(i, "ioflag");
  3354. var returnflag = ds_temp_print.getColumn(i, "returnflag");
  3355. if(utlf_isNull(returnflag)) {
  3356. returnflag = "O";
  3357. } else {
  3358. returnflag = "D";
  3359. }
  3360. var prcpdd = ds_temp_print.getColumn(i, "prcpdd");
  3361. var prcpno = ds_temp_print.getColumn(i, "prcpno");
  3362. var drugseqno = "";
  3363. if ( ioflag =="O" ){
  3364. drugseqno = ds_temp_print.getColumn(i, "drugseqno");
  3365. }
  3366. var iLen = prcpno.length;
  3367. for(var j = iLen ; j < 10 ; j++) {
  3368. prcpno = "0" + prcpno;
  3369. }
  3370. var sResult = narcflag+ioflag+returnflag+prcpdd+prcpno+drugseqno;
  3371. // ds_temp_print.setColumn( i, "barcode", sResult);
  3372. dsf_makeValue(ds_temp_print,"barcode","string",sResult,i);
  3373. //라벨이름
  3374. var nm = "";
  3375. if(ds_temp_print.getColumn(i, "narcflag") == "M") {
  3376. if(pastillyn == "Y") {
  3377. nm ="향 정";
  3378. } else if(pastillyn == "N") {
  3379. nm = "마 약";
  3380. }
  3381. }else {
  3382. nm = "향 정";
  3383. }
  3384. ds_temp_print.setColumn( i , "drugkindnm", nm);
  3385. ds_temp_print.setColumn( i , "prcpdd" , fGetDateString(ds_temp_print.getColumn(i, "prcpdd")) );
  3386. // issdeptcdnm 글자 수 5자이상 자르기 안되게 수정 2011.9.23. jmkim
  3387. var issdept = ds_temp_print.getColumn(i, "issdeptcdnm");
  3388. ds_temp_print.setColumn( i , "issdeptcdnm", issdept + "("+ds_temp_print.getColumn(i, "roomcd") + ")" );
  3389. // issdeptcdnm(발행부서) 문자열 길이가 15자 이상일 때 체크 2011.9.23 jmkim ex. 508병동(무균)(1111)
  3390. var issdeptcdnmvalue = ds_temp_print.getColumn(i, "issdeptcdnm");
  3391. if(issdeptcdnmvalue.length >= 15) ds_temp_print.setColumn( i, "issdeptcdnmlengthflag", "Y");
  3392. var sPid_Drugno = ds_temp_print.getColumn(i, "patnm") + " (" + ds_temp_print.getColumn(i, "drugno")+reprint + ")";
  3393. ds_temp_print.setColumn( i , "patnm", sPid_Drugno);
  3394. // 2015년 1월 15일 김치국
  3395. var unit = ds_temp_print.getColumn(i, "totdrugqty")+ds_temp_print.getColumn(i, "prcpqtyunit");
  3396. // ds_temp_print.setColumn( i, "unit" , unit);
  3397. dsf_makeValue(ds_temp_print,"unit","string",unit,i);
  3398. ds_temp_print.setColumn( i , "drugnm", "("+ds_temp_print.getColumn(i, "drugnm")+")" );
  3399. // 20120719_일일수량과 영문상품명 추가
  3400. // ds_temp_print.setColumn( i, "qtyname", ds_temp_print.getColumn(i, "totdrugqty") + " " + ds_temp_print.getColumn(i, "lblnm"));
  3401. dsf_makeValue(ds_temp_print,"qtyname","string",ds_temp_print.getColumn(i, "totdrugqty") + " " + ds_temp_print.getColumn(i, "lblnm"),i);
  3402. var day = ds_temp_print.getColumn(i, "prcpdayno");
  3403. var prcptims = ds_temp_print.getColumn(i, "prcptims");
  3404. var prcpqty2 = ds_temp_print.getColumn(i, "prcpqty2");
  3405. var prcpqtyunit = ds_temp_print.getColumn(i, "prcpqtyunit");
  3406. // ds_temp_print.setColumn( i, "narcunit", "1일 " + prcptims + "회 " + prcpqty2 + prcpqtyunit + "씩 " + day + "일분");
  3407. dsf_makeValue(ds_temp_print,"narcunit","string","1일 " + prcptims + "회 " + prcpqty2 + prcpqtyunit + "씩 " + day + "일분",i);
  3408. var rgstdt = "처방입력일시 : "+ fGetDateString(ds_temp_print.getColumn(i, "rgstdt")) ;
  3409. ds_temp_print.setColumn( i , "rgstdt" , rgstdt);
  3410. } else {
  3411. ds_temp_print.deleteRow(i);
  3412. i--;
  3413. }
  3414. }
  3415. var instcd = sysf_getUserInfo("dutplceinstcd");
  3416. if(group2.chk_auto.value != "Y") {
  3417. var posx = "";
  3418. var posy = "";
  3419. posx = ds_data_pcllist.getColumn(ds_data_pcllist.findRow("barnm","RFADT30111"),"xpos");
  3420. posy = ds_data_pcllist.getColumn(ds_data_pcllist.findRow("barnm","RFADT30111"),"ypos");
  3421. if(utlf_isNull(posx)) posx = "0";
  3422. if(utlf_isNull(posy)) posy = "0";
  3423. var printnm = ds_data_pcllist.getColumn(ds_data_pcllist.findRow("barnm","RFADT30111"),"prtnm");
  3424. if(instcd == "031") { // 20120724_임시로 본원, 칠곡 구분
  3425. // 2015년 4월9일 김치국 마약처방을 ATC출력물로 통일
  3426. var objDOM = rptf_createDOM(); // DOM 객체 설정
  3427. rptf_setNodeListToDOM(objDOM, "/root/main/narclist/narclist", ds_temp_print); // 데이터셋 1
  3428. var objParam = new Object();
  3429. objParam.xml_data_XML1 = objDOM.documentElement.source; // 최상의노드 XML 스트링 추출
  3430. var option = "open=0;save=0;directprint=1;printdialog=0;print=0;zoom=0;async=true;";
  3431. var prntOtion = "offsetx=" + posx + ";" + "offsety=" + posy + ";" + "printername="+printnm+";";
  3432. rptf_exeReportPreview30(["RFADT30113"],[objParam], option, prntOtion);
  3433. } else {
  3434. if(prcpclscdflag == "Y" ) {
  3435. var objDOM = rptf_createDOM(); // DOM 객체 설정
  3436. rptf_setNodeListToDOM(objDOM, "/root/main/narclist/narclist", ds_temp_print); // 데이터셋 1
  3437. var objParam = new Object();
  3438. objParam.xml_data_XML1 = objDOM.documentElement.source; // 최상의노드 XML 스트링 추출
  3439. var option = "open=0;save=0;directprint=1;printdialog=0;print=0;zoom=0;async=true;";
  3440. var prntOtion = "offsetx=" + posx + ";" + "offsety=" + posy + ";" + "printername="+printnm+";";
  3441. rptf_exeReportPreview30(["RFADT30111"],[objParam], option, prntOtion);
  3442. } else {
  3443. var objDOM = rptf_createDOM(); // DOM 객체 설정
  3444. rptf_setNodeListToDOM(objDOM, "/root/main/narclist/narclist", ds_temp_print); // 데이터셋 1
  3445. var objParam = new Object();
  3446. objParam.xml_data_XML1 = objDOM.documentElement.source; // 최상의노드 XML 스트링 추출
  3447. var option = "open=0;save=0;directprint=1;printdialog=0;print=0;zoom=0;async=true;";
  3448. var prntOtion = "offsetx=" + posx + ";" + "offsety=" + posy + ";" + "printername="+printnm+";";
  3449. rptf_exeReportPreview30(["RFADT30112"],[objParam], option, prntOtion);
  3450. }
  3451. }
  3452. } else if(group2.chk_auto.value == "Y") {
  3453. if(instcd == "031") { // 20120724_임시로 본원, 칠곡 구분
  3454. var printnm = "";
  3455. // 2015년 4월9일 김치국 마약처방을 ATC출력물로 통일
  3456. var objDOM = rptf_createDOM(); // DOM 객체 설정
  3457. rptf_setNodeListToDOM(objDOM, "/root/main/narclist/narclist", ds_temp_print); // 데이터셋 1
  3458. var objParam = new Object();
  3459. objParam.xml_data_XML1 = objDOM.documentElement.source; // 최상의노드 XML 스트링 추출
  3460. var option = "open=0;save=0;directprint=1;printdialog=0;print=0;zoom=0;async=true;";
  3461. var prntOtion = "offsetx=" + posx + ";" + "offsety=" + posy + ";" + "printername="+printnm+";";
  3462. rptf_exeReportPreview30(["RFADT30113"],[objParam], option, prntOtion);
  3463. } else {
  3464. if(prcpclscdflag == "Y" ) {
  3465. var objDOM = rptf_createDOM(); // DOM 객체 설정
  3466. rptf_setNodeListToDOM(objDOM, "/root/main/narclist/narclist", ds_temp_print); // 데이터셋 1
  3467. var objParam = new Object();
  3468. objParam.xml_data_XML1 = objDOM.documentElement.source; // 최상의노드 XML 스트링 추출
  3469. var option = "open=0;save=0;directprint=1;printdialog=0;print=0;zoom=0;async=true;";
  3470. var prntOtion = "offsetx=" + posx + ";" + "offsety=" + posy + ";" + "printername="+printnm+";";
  3471. rptf_exeReportPreview30(["RFADT30111"],[objParam], option, prntOtion);
  3472. } else {
  3473. var objDOM = rptf_createDOM(); // DOM 객체 설정
  3474. rptf_setNodeListToDOM(objDOM, "/root/main/narclist/narclist", ds_temp_print); // 데이터셋 1
  3475. var objParam = new Object();
  3476. objParam.xml_data_XML1 = objDOM.documentElement.source; // 최상의노드 XML 스트링 추출
  3477. var option = "open=0;save=0;directprint=1;printdialog=0;print=0;zoom=0;async=true;";
  3478. var prntOtion = "offsetx=" + posx + ";" + "offsety=" + posy + ";" + "printername="+printnm+";";
  3479. rptf_exeReportPreview30(["RFADT30112"],[objParam], option, prntOtion);
  3480. }
  3481. }
  3482. }
  3483. call_TRADT30102();
  3484. }
  3485. /****************************************************************************************
  3486. * Argument : N/A
  3487. * Description : 자동조회 함수 실행
  3488. ****************************************************************************************/
  3489. function fAutoOutNarc() {
  3490. // 실불출신청 대상 조회
  3491. fGetNarcData();
  3492. autocnt = autocnt + 1;
  3493. group2.cap_automess.text = '자동 출력 '+autocnt+'번 실행중!.';
  3494. if(ds_temp_narclist_narclist.rowcount > 0 && nextFlag == "GO") {
  3495. nextflag = "STOP";
  3496. ds_main_narclist_narclist.clearData();
  3497. dsf_copyColInfo(ds_main_narclist_narclist,ds_temp_narclist_narclist,true);
  3498. ds_main_narclist_narclist.addRow();
  3499. ds_main_narclist_narclist.copyRow(0,ds_temp_narclist_narclist,0);
  3500. ds_main_narclist_narclist.setColumn(0,"sel","Y");
  3501. fNarcActing_auto("Prcpdrug");
  3502. }
  3503. }
  3504. /****************************************************************************************
  3505. * Argument : sActing - 실행구분
  3506. * Description : 자동조회 함수 실행
  3507. ****************************************************************************************/
  3508. function fNarcActing_auto(sActing) {
  3509. if(utlf_isNull(ds_temp_userinfo_userinfo.getColumn(0, "userid"))) {
  3510. sysf_messageBox("사용자ID가 없습니다. 사용자ID를 먼저","C001");
  3511. ds_temp_srchinfo.setColumn( 0, "srchid","");
  3512. group2.ipt_srchid.setFocus();
  3513. return;
  3514. }
  3515. var iActing_Cnt = 0; // 행위 구분을 위한 카운트값
  3516. var sActing_nm = ""; // 해당 행위의 명칭
  3517. var sActingAfter = "";
  3518. var selCnt = 0;
  3519. var RtnCnfmYN = "N";
  3520. var chkAll = ds_send.getColumn(0, "chkall"); // 경북대병원 일괄처리 추가
  3521. // var chkAll1 = ds_send.getColumn(0, "chkall1"); // 경북대병원 일괄처리 추가(불출까지)
  3522. //액팅전 체크표시 cash
  3523. fChkCash("before");
  3524. ds_send_narcinfo_narclist.clear();
  3525. dsf_copyColInfo(ds_send_narcinfo_narclist,ds_main_narclist_narclist);
  3526. ds_send_prntinfo.clear();
  3527. dsf_copyColInfo(ds_send_prntinfo,ds_main_narclist_narclist);
  3528. for(var i = 0; i < ds_main_narclist_narclist.rowcount; i++){
  3529. var sel = ds_main_narclist_narclist.getColumn(i, "sel");
  3530. var narcstat = ds_main_narclist_narclist.getColumn(i, "narcstat"); // 불출상태
  3531. var cnclstat = ds_main_narclist_narclist.getColumn(i, "cnclstat"); // 반환상태
  3532. var ioflag = ds_main_narclist_narclist.getColumn(i, "ioflag"); // 입원외래구분
  3533. var prntdt = ds_main_narclist_narclist.getColumn(i, "prntdt"); // 처방전출력일시
  3534. var sPid = ds_main_narclist_narclist.getColumn(i, "pid"); // 환자번호
  3535. var sPrcpcd = ds_main_narclist_narclist.getColumn(i, "prcpcd"); // 처방명
  3536. var sDrugno = ds_main_narclist_narclist.getColumn(i, "drugno"); // 투약번호
  3537. var rpt = ds_temp.getColumn(0, "reprnt"); //재출력구분 경북대병원 처방전 재출력 추가
  3538. if(sel == "Y"){
  3539. // 경북대병원 일괄처리(Prcpdrug)추가
  3540. if(sActing == "Prcpdrug") {
  3541. if(utlf_isNull(chkAll)) {
  3542. sysf_messageBox("일괄처리가 체크되지", "E007");
  3543. return;
  3544. }
  3545. if(narcstat == "2" && chkAll == "Y") {
  3546. var nRow = ds_send_narcinfo_narclist.addRow();
  3547. ds_send_narcinfo_narclist.copyRow(nRow,ds_main_narclist_narclist,i);
  3548. sActing_nm = "불출"
  3549. iActing_Cnt++;
  3550. //// 2018년 3월 21일 마약통합관리 정보 저장 데이타set copy 김치국
  3551. var dRow = ds_sendnarcstoc.addRow();
  3552. ds_sendnarcstoc.copyRow(dRow,ds_main_narclist_narclist,i);
  3553. //////
  3554. } else { // 불출신청 상태가 아닌데 일괄처리시 진행안되게 수정 2014.8.28 김치국
  3555. sysf_messageBox("불출신청 자료만 일괄처리로 처리 할 수 있습니다.");
  3556. return;
  3557. }
  3558. }
  3559. // 처방전
  3560. ds_send_prntinfo.copyRow(ds_send_prntinfo.addRow(),ds_main_narclist_narclist,i);
  3561. dsf_makeValue( ds_send_prntinfo, "prntid" , "string", ds_temp_userinfo_userinfo.getColumn(0, "userid"));
  3562. dsf_makeValue( ds_send_prntinfo, "prntflag" , "string", "O");
  3563. call_TRADT30103();
  3564. if(!utlf_isNull(ds_main_prntlist_patinfo.getColumn(0, "drugno"))){
  3565. //처방전에 DUR이 존재하면 RFADT30105 존재하지 않으면 RFADT30100 출력
  3566. var resn = ds_main_prntlist_resn.getColumn(0, "resnnm");
  3567. if( utlf_isNull(resn) ){
  3568. //1일기준인지 1회기준인지 체크하여 컬럼을 hidden
  3569. var colHidnValue = lf_grdBaseColHidn("D");
  3570. if( colHidnValue == "C") {//1회 기준
  3571. dsf_makeValue( ds_main_prntlist_patinfo, "prcpvolchk", "string", "Y");
  3572. }
  3573. //20101119_wify_경북대병원_마약처방전 폼 변경
  3574. // RFADT30100 ==> RFADT30106
  3575. // RFADT30105 ==> RFADT30107
  3576. var objCxtCommon = new ExtCommon();
  3577. var objImgeData = objCxtCommon.encodeBase64(ds_main_prntlist_patinfo.getColumn(0, "signdata"));
  3578. ds_main_prntlist_patinfo.addColumn("sign","string");
  3579. ds_main_prntlist_patinfo.setColumn(0, "sign", objImgeData);
  3580. var objDOM = rptf_createDOM(); // DOM 객체 설정
  3581. rptf_setNodeListToDOM(objDOM, "/root/main/prntlist/prntlist", ds_main_prntlist_prntlist); // 데이터셋 1
  3582. rptf_setNodeListToDOM(objDOM, "/root/main/prntlist/patinfo" , ds_main_prntlist_patinfo); // 데이터셋 2
  3583. rptf_setNodeListToDOM(objDOM, "/root/main/prntlist/diaginfo", ds_main_prntlist_diaginfo); // 데이터셋 3
  3584. rptf_setNodeListToDOM(objDOM, "/root/temp/userinfo/userinfo", ds_temp_userinfo_userinfo); // 데이터셋 4
  3585. var objParam = new Object();
  3586. objParam.xml_data_XML1 = objDOM.documentElement.source; // 최상의노드 XML 스트링 추출
  3587. var option = "open=0;save=0;directprint=1;printdialog=0;print=0;zoom=0;";
  3588. var prtOption = "printername=";
  3589. rptf_exeReportPreview30(["RFADT30106"],[objParam], option, prtOption);
  3590. }else{
  3591. var objCxtCommon = new ExtCommon();
  3592. var objImgeData = objCxtCommon.encodeBase64(ds_main_prntlist_patinfo.getColumn(0, "signdata"));
  3593. ds_main_prntlist_patinfo.addColumn("sign","string");
  3594. ds_main_prntlist_patinfo.setColumn(0, "sign", objImgeData);
  3595. var objDOM1 = rptf_createDOM(); // DOM 객체 설정
  3596. var objDOM2 = rptf_createDOM(); // DOM 객체 설정
  3597. rptf_setNodeListToDOM(objDOM1, "/root/main/prntlist/prntlist" , ds_main_prntlist_prntlist); // 데이터셋 1
  3598. rptf_setNodeListToDOM(objDOM1, "/root/main/prntlist/patinfo" , ds_main_prntlist_patinfo); // 데이터셋 2
  3599. rptf_setNodeListToDOM(objDOM1, "/root/main/prntlist/diaginfo" , ds_main_prntlist_diaginfo); // 데이터셋 3
  3600. rptf_setNodeListToDOM(objDOM1, "/root/main/prntlist/resn" , ds_main_prntlist_resn); // 데이터셋 4
  3601. rptf_setNodeListToDOM(objDOM2, "/root/main/prntlist/resn" , ds_main_prntlist_resn); // 데이터셋 1
  3602. var objParam = new Object();
  3603. objParam.xml_data_XML1 = objDOM1.documentElement.source; // 최상의노드 XML 스트링 추출
  3604. objParam.xml_data_XML2 = objDOM2.documentElement.source; // 최상의노드 XML 스트링 추출
  3605. var option = "open=0;save=0;directprint=1;printdialog=0;print=0;zoom=0;";
  3606. var prtOption = "printername=";
  3607. rptf_exeReportPreview30(["RFADT30107"],[objParam], option, prtOption);
  3608. }
  3609. nextFlag ="GO";
  3610. fSleep(sleepTime);
  3611. }
  3612. }
  3613. }
  3614. ds_send_narcinfo_srchinfo.copyData(ds_temp_srchinfo);
  3615. ds_send_narcinfo_userinfo.copyData(ds_temp_userinfo_userinfo);
  3616. dsf_makeValue( ds_send_narcinfo_srchinfo, "acting", "string", sActing);
  3617. //조제확인시 라벨자동출력은 fNarcLBLPrint 함수에서 처방조회시 가져온 ioflag로 체크해서 출력 여부 결정
  3618. //(수정원인 : 외래,병동 전체 조회 후 조제확인시 라벨자동출력이 안되는 현상이 있음)
  3619. //경북대병원 처방전 일괄처리할때 라벨도 같이 출력 되도록 함.
  3620. if ( nextFlag =="GO" && ds_send.getColumn(0,"lblskip") != "Y" && sActing == "Prcpdrug"){
  3621. fNarcLBLPrintR("Prnt");
  3622. call_TXADT30102();
  3623. }
  3624. call_TXADT30101();
  3625. //액팅전 체크표시 다시 표시
  3626. fChkCash("after");
  3627. }
  3628. /****************************************************************************************
  3629. * Argument : numberMillis - 1초
  3630. * Description : fSleep 1초쉼
  3631. ****************************************************************************************/
  3632. function fSleep(numberMillis) {
  3633. var now = new Date();
  3634. var exitTime = now.getTime() + numberMillis;
  3635. while (true) {
  3636. now = new Date();
  3637. if (now.getTime() > exitTime) return;
  3638. }
  3639. }
  3640. /****************************************************************************************
  3641. * Argument : N/A
  3642. * Description : 불출확인서 출력시 출력일자 설정
  3643. ****************************************************************************************/
  3644. function fSetNarcPrintDt() {
  3645. if ( ds_main_narclist_narclist.rowcount == 0 )
  3646. return;
  3647. var dsUpdate = grdf_getGridUpdateData(switch1.case1.grd_narclist, "all");
  3648. grdf_setStatusColumn(dsUpdate, "m");
  3649. ds_send_prntdt_narcdata.copyData(dsUpdate,true);
  3650. dsf_createDsRow("ds_narcdata", [
  3651. {col:"m", type:"STRING", size:256, val:ds_send_prntdt_narcdata.getColumn(0,"m")}
  3652. , {col:"drugdd", type:"STRING", size:256, val:ds_send_prntdt_narcdata.getColumn(0,"drugdd")}
  3653. , {col:"drugno", type:"INT", size:256, val:ds_send_prntdt_narcdata.getColumn(0,"drugno")}
  3654. , {col:"prcpno", type:"INT", size:256, val:ds_send_prntdt_narcdata.getColumn(0,"prcpno")}
  3655. , {col:"ioflag", type:"STRING", size:256, val:ds_send_prntdt_narcdata.getColumn(0,"ioflag")}
  3656. ]);
  3657. var oParam = {};
  3658. oParam.id = "TXADT30104";
  3659. oParam.service = "pharmacyprescriptionapp.Narcotics";
  3660. oParam.method = "reqSetNarcPrintDt";
  3661. oParam.inds = "narcdata=ds_narcdata";
  3662. oParam.outds = "ds_temp_ret=item";
  3663. oParam.async = false;
  3664. //oParam.callback = "cf_TXADT30104";
  3665. tranf_submit(oParam);
  3666. }
  3667. /****************************************************************************************
  3668. * Argument : N/A
  3669. * Description : 재출력 선택시 출력일자(콤보박스) 조회
  3670. ****************************************************************************************/
  3671. function fGetNarcPrintDt() {
  3672. var narccdlist = "";
  3673. for(var i = 0; i < ds_temp_srchcond_narclist.rowcount; i++) {
  3674. if(ds_temp_srchcond_narclist.getColumn(i, "sel") == "Y") {
  3675. if(utlf_isNull(narccdlist)) {
  3676. narccdlist = "'" + ds_temp_srchcond_narclist.getColumn(i, "narccd") + "'";
  3677. } else {
  3678. narccdlist += ",'" + ds_temp_srchcond_narclist.getColumn(i, "narccd") + "'";
  3679. }
  3680. }
  3681. }
  3682. ds_temp_srchinfo.setColumn( 0, "narccd", narccdlist);
  3683. //이선경 2008-07-22 start (조회시 마약종류를 조회조건에 추가)
  3684. // grd_narclist.fixedcellischeck(0, 1) = false;
  3685. // grd_outnarc.fixedcellischeck(0, 1) = false;
  3686. // switch1.case1.grd_narclist.setCellProperty("Head",1,"text",0);
  3687. // switch1.case3.grd_outnarc.setCellProperty("Head",1,"text",0);
  3688. chk_grdAll.value = "N";
  3689. ds_send_srchinfo.copyData(ds_temp_srchinfo);
  3690. if( ds_temp_srchinfo.getColumn(0, "prtab") == "Y") { // 향정반환반납장부 출력조건 2009.05.18 pymi
  3691. ds_send_srchinfo.setColumn( 0, "cnclflag", "Y");
  3692. ds_send_srchinfo.setColumn( 0, "rtnflag", "Y");
  3693. ds_send_srchinfo.setColumn( 0, "rtnstat", "T");
  3694. ds_send_srchinfo.setColumn( 0, "cnclstat", "T");
  3695. ds_send_srchinfo.setColumn( 0, "narcstat", "");
  3696. }
  3697. var oParam = {};
  3698. oParam.id = "TRADT30111";
  3699. oParam.service = "pharmacyprescriptionapp.Narcotics";
  3700. oParam.method = "reqGetNarcPrintDt";
  3701. oParam.inds = "req=ds_send_srchinfo";
  3702. oParam.outds = "ds_temp_prntdt_item=item";
  3703. oParam.async = false;
  3704. //oParam.callback = "cf_TRADT30111";
  3705. tranf_submit(oParam);
  3706. }
  3707. //=======================================================================================
  3708. // SMADT30100.xjs 종료
  3709. //---------------------------------------------------------------------------------------
  3710. /****************************************************************************************
  3711. * Argument : N/A
  3712. * Description : 마약항정리스트 조회
  3713. ****************************************************************************************/
  3714. function call_TRADT30102() {
  3715. ds_main_narclist_narclist.clearData();
  3716. // ds_main_narclist_narclist.enableevent = false;
  3717. dsf_createDsRow("ds_req", [
  3718. {col:"narcflag", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"narcflag")}
  3719. , {col:"timeflag", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"timeflag")}
  3720. , {col:"fst_dd", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"fst_dd")}
  3721. , {col:"last_dd", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"last_dd")}
  3722. , {col:"srchdrugkind", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"srchdrugkind")}
  3723. , {col:"srchioflag", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"srchioflag")}
  3724. , {col:"drugflag", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"drugflag")}
  3725. , {col:"srchroot", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"srchroot")}
  3726. , {col:"narcstat", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"narcstat")}
  3727. , {col:"cnclstat", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"cnclstat")}
  3728. , {col:"rtnstat", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"rtnstat")}
  3729. , {col:"nodeliveflag", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"nodeliveflag")}
  3730. , {col:"narctype", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"narctype")}
  3731. , {col:"pid", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"pid")}
  3732. , {col:"ward", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"ward")}
  3733. , {col:"srchdrugno", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"srchdrugno")}
  3734. , {col:"barcode", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"barcode")}
  3735. , {col:"narccd", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"narccd")}
  3736. , {col:"barcode_2", type:"STRING", size:256, val:""}
  3737. , {col:"srchdeptcd", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"srchdeptcd")}
  3738. , {col:"srchprcpkind", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"srchprcpkind")}
  3739. , {col:"srchprcpkindall", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"srchprcpkindall")}
  3740. , {col:"prntdt", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"prntdt")}
  3741. , {col:"issdeptcd", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"issdeptcd")}
  3742. , {col:"selkey", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"selkey")}
  3743. , {col:"kuflag", type:"STRING", size:256, val:"Y"}
  3744. ]);
  3745. var oParam = {};
  3746. oParam.id = "TRADT30102";
  3747. oParam.service = "pharmacyprescriptionapp.Narcotics";
  3748. oParam.method = "reqGetNarcData";
  3749. oParam.inds = "req=ds_req";
  3750. oParam.outds = "ds_main_narclist_narclist=narclist";
  3751. oParam.async = false;
  3752. oParam.callback = "cf_TRADT30102";
  3753. tranf_submit(oParam);
  3754. }
  3755. function cf_TRADT30102(sSvcId, nErrorCode, sErrorMsg) {
  3756. if(nErrorCode < 0) return;
  3757. // dsf_setTypeFormat(ds_main_narclist_narclist, "prcptims:INT^prcpdayno:INT^rtnqty:INT^prcpno:INT^prcphistno:INT^drugno:INT");
  3758. if(utlf_isNull(ds_main_narclist_narclist.getColumnInfo("dayprcpqtyunit"))) {
  3759. ds_main_narclist_narclist.enableevent = false;
  3760. switch1.case3.grd_outnarc.enableredraw = false;
  3761. ds_main_narclist_narclist.addColumn("dayprcpqtyunit","string");
  3762. ds_main_narclist_narclist.addColumn("prcpqtyunit2","string");
  3763. ds_main_narclist_narclist.addColumn("prcpvolunit2","string");
  3764. var nCnt = ds_main_narclist_narclist.rowcount;
  3765. for(var i = 0 ; i < nCnt ; i++) {
  3766. var nvalue = ds_main_narclist_narclist.getColumn(i,"prcpqtyunit");
  3767. ds_main_narclist_narclist.setColumn(i,"dayprcpqtyunit",nvalue);
  3768. ds_main_narclist_narclist.setColumn(i,"prcpqtyunit2",nvalue);
  3769. ds_main_narclist_narclist.setColumn(i,"prcpvolunit2",ds_main_narclist_narclist.getColumn(i,"prcpvolunit"));
  3770. }
  3771. ds_main_narclist_narclist.enableevent = true;
  3772. switch1.case3.grd_outnarc.enableredraw = true;
  3773. ds_main_narclist_narclist.enableevent = true;
  3774. }
  3775. }
  3776. /****************************************************************************************
  3777. * Argument : N/A
  3778. * Description : 임시 병동/마약항정리스트 조회
  3779. ****************************************************************************************/
  3780. function call_TRADT30101() {
  3781. var oParam = {};
  3782. oParam.id = "TRADT30101";
  3783. oParam.service = "pharmacyprescriptionapp.Narcotics";
  3784. oParam.method = "reqGetSrchList";
  3785. oParam.inds = "req=ds_send_srchcond";
  3786. oParam.outds = "ds_temp_srchcond_ward=ward ds_temp_srchcond_narclist=narclist";
  3787. oParam.async = false;
  3788. oParam.callback = "cf_TRADT30101";
  3789. tranf_submit(oParam);
  3790. }
  3791. function cf_TRADT30101(sSvcId, nErrorCode, sErrorMsg) {
  3792. if(nErrorCode < 0) return;
  3793. ds_temp_srchcond_ward.updateColID("deptcd","wardcd");
  3794. ds_temp_srchcond_ward.updateColID("deptnm","wardnm");
  3795. }
  3796. /****************************************************************************************
  3797. * Argument : objDs - Dataset ID
  3798. * : sColSrc - 원본 컬럼
  3799. * : sColTgt - 생성할 컬럼
  3800. * Description : 데이터셋 특정컬럼 카피하여 새컬럼 생성
  3801. ****************************************************************************************/
  3802. function fMakeCopyColumn(objDs,sColSrc,sColTgt) {
  3803. if(utlf_isNull(objDs.getColumnInfo(sColTgt))) objDs.addColumn(sColTgt,"string");
  3804. for(var i = 0 ; i < objDs.rowcount ; i++) {
  3805. objDs.setColumn(i,sColTgt,objDs.getColumn(i,sColSrc));
  3806. }
  3807. }
  3808. /******************************************************************
  3809. * Argument : obj - dataset
  3810. * Description : 멀티체크박스 세팅
  3811. ******************************************************************/
  3812. function lf_setMultiCheckBox(obj) {
  3813. // 멀티체크박스 세팅
  3814. if(!utlf_isNull(obj.getColumn(0,"srchprcpkind"))) {
  3815. group2.chk_prcpkind.setData(obj.getColumn(0,"srchprcpkind").split(" "),null,false);
  3816. }
  3817. if(!utlf_isNull(obj.getColumn(0,"narctypeflag"))) {
  3818. group2.chk_prcpkind.setData(obj.getColumn(0,"narctypeflag").split(" "),null,false);
  3819. }
  3820. }
  3821. /******************************************************************
  3822. * Argument : N/A
  3823. * Description : chekboxlist set
  3824. ******************************************************************/
  3825. function fn_setChkboxList() {
  3826. // 처방구분 - chk_prcpkind
  3827. var sProp1="col=6,row=1,cellspacing=5,vcellspacing=0,itemWidth=80,itemHeight=20,overflow='visible'";
  3828. group2.chk_prcpkind.setInitComp(sProp1, ds_init_srchprcpkind, "cdid", "cdnm", "fn_narcstat");
  3829. for(var i = 0 ; i < ds_init_srchprcpkind.rowcount; i++) {
  3830. var chkId = "group2.chk_prcpkind.chk_"+i;
  3831. eval(chkId).font = "arial,9,bold";
  3832. }
  3833. // checkbox2
  3834. var sProp1="col=2,row=1,cellspacing=5,vcellspacing=0,itemWidth=-1,itemHeight=20,overflow=''";
  3835. group2.checkbox2.setInitComp(sProp1, ds_init_narctypeflag, "cdid", "cdnm", "fn_narctypeflag");
  3836. for(var i = 0 ; i < ds_init_narctypeflag.rowcount; i++) {
  3837. var chkId = "group2.checkbox2.chk_"+i;
  3838. eval(chkId).font = "arial,9,bold";
  3839. }
  3840. }
  3841. function fn_narcstat() {
  3842. ds_temp_srchinfo.setColumn(0,"srchprcpkind",String(group2.chk_prcpkind.getData()).replace(","," "));
  3843. }
  3844. function fn_narctypeflag() {
  3845. ds_temp_srchinfo.setColumn(0,"narctypeflag",String(group2.checkbox2.getData()).replace(","," "));
  3846. }
  3847. /******************************************************************
  3848. * Argument : N/A
  3849. * Description : 출력정보조회
  3850. ******************************************************************/
  3851. function call_TRADT30103() {
  3852. var oParam = {};
  3853. oParam.id = "TRADT30103";
  3854. oParam.service = "pharmacyprescriptionapp.Narcotics";
  3855. oParam.method = "reqGetNarcPrntData";
  3856. oParam.inds = "req=ds_send_prntinfo";
  3857. oParam.outds = "ds_main_prntlist_patinfo=patinfo ds_main_prntlist_diaginfo=diaginfo ds_main_prntlist_prntlist=prntlist ds_main_prntlist_resn=resn";
  3858. oParam.async = false;
  3859. //oParam.callback = "cf_TRADT30103";
  3860. tranf_submit(oParam);
  3861. }
  3862. /******************************************************************
  3863. * Argument : N/A
  3864. * Description : 액팅처리?
  3865. ******************************************************************/
  3866. function call_TXADT30101() {
  3867. dsf_createDs("ds_req", [
  3868. {col:"prcpdd", type:"STRING", size:256}
  3869. , {col:"prcpno", type:"INT", size:256}
  3870. , {col:"prcphistno", type:"INT", size:256}
  3871. , {col:"prcphistcd", type:"STRING", size:256}
  3872. , {col:"drugdd", type:"STRING", size:256}
  3873. , {col:"drugno", type:"INT", size:256}
  3874. , {col:"drugseqno", type:"INT", size:256}
  3875. , {col:"ioflag", type:"STRING", size:256}
  3876. , {col:"instcd", type:"STRING", size:256}
  3877. , {col:"drugdt", type:"STRING", size:256}
  3878. , {col:"delivedt", type:"STRING", size:256}
  3879. , {col:"rtndt", type:"STRING", size:256}
  3880. , {col:"rtncnfmdt", type:"STRING", size:256}
  3881. , {col:"rtnqty", type:"BIGDECIMAL", size:256}
  3882. , {col:"returnqty", type:"BIGDECIMAL", size:256}
  3883. , {col:"rtndrugtims", type:"BIGDECIMAL", size:256}
  3884. , {col:"rtndrugdayno", type:"BIGDECIMAL", size:256}
  3885. , {col:"rtnstocqty", type:"BIGDECIMAL", size:256}
  3886. , {col:"prcpcd", type:"STRING", size:256}
  3887. , {col:"drugnm", type:"STRING", size:256}
  3888. , {col:"drugkind", type:"STRING", size:256}
  3889. , {col:"drugflag", type:"STRING", size:256}
  3890. , {col:"acting_after", type:"STRING", size:256}
  3891. , {col:"selfprcpflag", type:"STRING", size:256}
  3892. , {col:"sprevol", type:"STRING", size:256}
  3893. ]);
  3894. dsf_setTypeFormat(ds_req, "prcpno:INT^prcphistno:INT^drugno:INT^drugseqno:INT");
  3895. for(var i = 0 ; i < ds_send_narcinfo_narclist.rowcount ; i++) {
  3896. var nRow = ds_req.addRow();
  3897. ds_req.copyRow(nRow, ds_send_narcinfo_narclist, i);
  3898. }
  3899. var oParam = {};
  3900. oParam.id = "TXADT30101";
  3901. oParam.service = "pharmacyprescriptionapp.Narcotics";
  3902. oParam.method = "reqExeNarcData";
  3903. oParam.inds = "req=ds_req srch=ds_send_narcinfo_srchinfo user=ds_send_narcinfo_userinfo";
  3904. oParam.outds = "ds_main_narclist_narclist=narclist";
  3905. oParam.async = false;
  3906. oParam.callback = "cf_TXADT30101";
  3907. tranf_submit(oParam);
  3908. }
  3909. function cf_TXADT30101(sSvcId, nErrorCode, sErrorMsg) {
  3910. if(nErrorCode < 0) return;
  3911. fMakeCopyColumn(ds_main_narclist_narclist,"prcpqtyunit","prcpqtyunit2");
  3912. fMakeCopyColumn(ds_main_narclist_narclist,"prcpvolunit","prcpvolunit2");
  3913. }
  3914. /******************************************************************
  3915. * Argument : N/A
  3916. * Description : 라벨 출력 횟수 저장
  3917. ******************************************************************/
  3918. function call_TXADT30102() {
  3919. dsf_createDs("ds_req", [
  3920. {col:"prcpdd", type:"STRING", size:256}
  3921. , {col:"prcpno", type:"INT", size:256}
  3922. , {col:"prcphistno", type:"INT", size:256}
  3923. , {col:"drugdd", type:"STRING", size:256}
  3924. , {col:"drugno", type:"INT", size:256}
  3925. , {col:"ioflag", type:"STRING", size:256}
  3926. , {col:"instcd", type:"STRING", size:256}
  3927. , {col:"drugdt", type:"STRING", size:256}
  3928. , {col:"delivedt", type:"STRING", size:256}
  3929. , {col:"rtndt", type:"STRING", size:256}
  3930. , {col:"rtncnfmdt", type:"STRING", size:256}
  3931. , {col:"rtnqty", type:"BIGDECIMAL", size:256}
  3932. , {col:"prcpcd", type:"STRING", size:256}
  3933. , {col:"drugnm", type:"STRING", size:256}
  3934. , {col:"drugkind", type:"STRING", size:256}
  3935. , {col:"drugflag", type:"STRING", size:256}
  3936. , {col:"acting_after", type:"STRING", size:256}
  3937. ]);
  3938. dsf_setTypeFormat(ds_req, "prcpno:INT^prcphistno:INT^drugno:INT");
  3939. for(var i = 0 ; i < ds_send_narcinfo_narclist.rowcount ; i++) {
  3940. var nRow = ds_req.addRow();
  3941. ds_req.copyRow(nRow, ds_send_narcinfo_narclist, i);
  3942. }
  3943. var oParam = {};
  3944. oParam.id = "TXADT30102";
  3945. oParam.service = "pharmacyprescriptionapp.Narcotics";
  3946. oParam.method = "reqExeNarcLblCnt";
  3947. oParam.inds = "req=ds_req srch=ds_send_narcinfo_srchinfo user=ds_send_narcinfo_userinfo";
  3948. oParam.outds = "ds_temp_ret=item";
  3949. oParam.async = false;
  3950. //oParam.callback = "cf_TXADT30102";
  3951. tranf_submit(oParam);
  3952. }
  3953. /****************************************************************************************
  3954. * Argument : objDs - Dataset ID
  3955. * : sColSrc - 원본 컬럼
  3956. * : sColTgt - 생성할 컬럼
  3957. * Description : 데이터셋 특정컬럼 카피하여 새컬럼 생성
  3958. ****************************************************************************************/
  3959. function fMakeCopyColumn(objDs,sColSrc,sColTgt) {
  3960. if(utlf_isNull(objDs.getColumnInfo(sColTgt))) objDs.addColumn(sColTgt,"string");
  3961. for(var i = 0 ; i < objDs.rowcount ; i++) {
  3962. objDs.setColumn(i,sColTgt,objDs.getColumn(i,sColSrc));
  3963. }
  3964. }
  3965. /******************************************************************
  3966. * Argument : N/A
  3967. * Description : 프린터설정
  3968. ******************************************************************/
  3969. function fSetPrint() {
  3970. var prntsetupinfo = ds_main_barcdprntsetup.getColumn(0, "prntsetupinfo");
  3971. var objArg = new Object();
  3972. objArg.arg_sSetupInfo = prntsetupinfo;
  3973. objArg.arg_sCallBackFunction = "lf_convertXmlToDs";
  3974. frmf_modal("SPZUR00300", "SPZUR00300", objArg, null, 0, 20, 150, null, null, null, null, null, "M");
  3975. if(!utlf_isNull(frmf_getParameter("SetupInfo")))
  3976. ds_main_barcdprntsetup.setColumn(0,"prntsetupinfo",frmf_clearParameter("SetupInfo"));
  3977. }
  3978. /******************************************************************
  3979. * Argument : N/A
  3980. * Description : 불출확인서 출력내역조회
  3981. ******************************************************************/
  3982. function call_TRADT30109() {
  3983. dsf_createDsRow("ds_req", [
  3984. {col:"narcflag", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"narcflag")}
  3985. , {col:"timeflag", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"timeflag")}
  3986. , {col:"fst_dd", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"fst_dd")}
  3987. , {col:"last_dd", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"last_dd")}
  3988. , {col:"srchdrugkind", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"srchdrugkind")}
  3989. , {col:"srchioflag", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"srchioflag")}
  3990. , {col:"drugflag", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"drugflag")}
  3991. , {col:"srchroot", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"srchroot")}
  3992. , {col:"narcstat", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"narcstat")}
  3993. , {col:"cnclstat", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"cnclstat")}
  3994. , {col:"rtnstat", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"rtnstat")}
  3995. , {col:"nodeliveflag", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"nodeliveflag")}
  3996. , {col:"narctype", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"narctype")}
  3997. , {col:"pid", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"pid")}
  3998. , {col:"ward", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"ward")}
  3999. , {col:"srchdrugno", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"srchdrugno")}
  4000. , {col:"barcode", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"barcode")}
  4001. , {col:"narccd", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"narccd")}
  4002. , {col:"barcode_2", type:"STRING", size:256, val:""}
  4003. , {col:"srchdeptcd", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"srchdeptcd")}
  4004. , {col:"srchprcpkind", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"srchprcpkind")}
  4005. , {col:"srchprcpkindall", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"srchprcpkindall")}
  4006. , {col:"prntdt", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"prntdt")}
  4007. , {col:"issdeptcd", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"issdeptcd")}
  4008. , {col:"selkey", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"selkey")}
  4009. ]);
  4010. var oParam = {};
  4011. oParam.id = "TRADT30109";
  4012. oParam.service = "pharmacyprescriptionapp.Narcotics";
  4013. oParam.method = "reqGetSumNarcData";
  4014. oParam.inds = "req=ds_req";
  4015. oParam.outds = "ds_main_sumlist_sumlist=sumlist";
  4016. oParam.async = false;
  4017. //oParam.callback = "cf_TRADT30109";
  4018. tranf_submit(oParam);
  4019. }
  4020. /******************************************************************
  4021. * Argument : N/A
  4022. * Description : 불출확인서 출력
  4023. ******************************************************************/
  4024. function lf_print_RFADT30108() {
  4025. var objDOM = rptf_createDOM(); // DOM 객체 설정
  4026. rptf_setNodeListToDOM(objDOM, "/root/prtinfo/hosp" , ds_prtinfo_hosp);
  4027. rptf_setNodeListToDOM(objDOM, "/root/prtinfo/narclist/narclist" , ds_prtinfo_narclist_narclist);
  4028. rptf_setNodeListToDOM(objDOM, "/root/prtinfo/sumlist/sumlist" , ds_prtinfo_sumlist_sumlist);
  4029. var objParam = new Object();
  4030. objParam.xml_data_XML1 = objDOM.documentElement.source; // 최상의노드 XML 스트링 추출
  4031. var option = "open=1;save=1;directprint=1;printdialog=0;print=1;zoom=0;";
  4032. var prtOption = "printername=";
  4033. rptf_exeReportPreview30(["RFADT30108"],[objParam], option, prtOption);
  4034. }
  4035. //=======================================================================================
  4036. // Event
  4037. //---------------------------------------------------------------------------------------
  4038. /****************************************************************************************
  4039. * Components : Form
  4040. * Description : 화면 처음 초기화시 폼초기화
  4041. ****************************************************************************************/
  4042. function SMADT30100_oninit(obj:Form, e:InitEventInfo)
  4043. {
  4044. frmf_initForm(obj); // 폼 초기화
  4045. }
  4046. /****************************************************************************************
  4047. * Components : Form
  4048. * Description : 화면 처음 초기화시 폼초기화
  4049. ****************************************************************************************/
  4050. function SMADT30100_onload(obj:Form, e:LoadEventInfo)
  4051. {
  4052. fn_setChkboxList();
  4053. fInit();
  4054. ds_send.setColumn(0,"chkall","Y");
  4055. frmf_createPopupMenuDs("pmn_menu", "pmn_menu_onmenuclick", ds_hidden_popup_item);
  4056. }
  4057. // ds에 생성된 id별 함수 실행
  4058. function pmn_menu_onmenuclick(obj:PopupMenu, e:MenuClickEventInfo)
  4059. {
  4060. // eval(e.id + "()");
  4061. if(e.id == "Execlist") {
  4062. var row = 0;
  4063. if(switch1.tabindex == 0) {
  4064. row = switch1.case1.grd_narclist.currentrow;
  4065. } else {
  4066. row = switch1.case3.grd_outnarc.currentrow;
  4067. }
  4068. dsf_createDsRow("ds_req", [
  4069. {col:"pid", type:"STRING", size:256, val:ds_main_narclist_narclist.getColumn(row,"pid")}
  4070. , {col:"prcpno", type:"STRING", size:256, val:ds_main_narclist_narclist.getColumn(row,"prcpno")}
  4071. , {col:"prcpdd", type:"STRING", size:256, val:ds_main_narclist_narclist.getColumn(row,"orgprcpdd")}
  4072. , {col:"orddeptflag", type:"STRING", size:256, val:""}
  4073. ]);
  4074. var oParam = {};
  4075. oParam.id = "TRADT10311";
  4076. oParam.service = "pharmacyprescriptionapp.BeforeCure";
  4077. oParam.method = "reqGetDetlPrcpInfo";
  4078. oParam.inds = "req=ds_req";
  4079. oParam.outds = "ds_main_detlprcplist_detlprcpinfo=detlprcpinfo";
  4080. oParam.async = false;
  4081. oParam.callback = "cf_TRADT10311";
  4082. tranf_submit(oParam);
  4083. if(arErrorCode.pop("TRADT10311") > -1) {
  4084. group5.visible = true;
  4085. }
  4086. } else if(e.id == "getMappingList") {
  4087. var iRow = ds_main_narclist_narclist.rowposition;
  4088. var chrgid = sysf_getUserInfo("userid");
  4089. var id="";
  4090. var cnt = 0;
  4091. for(var i =0; i< ds_init_chrglist.rowcount; i++) {
  4092. id = ds_init_chrglist.getColumn(i, "cdid");
  4093. if(id == chrgid) {
  4094. cnt++;
  4095. }
  4096. }
  4097. if(cnt == 0 && chrgid != "AST") {
  4098. sysf_messageBox("담당자만 매핑취소 작업을 할 수 있습니다.");
  4099. return;
  4100. }
  4101. var drugdd = "";
  4102. var drugno = "";
  4103. var pid = "";
  4104. var prcpcd = "";
  4105. drugdd = ds_main_narclist_narclist.getColumn(iRow, "drugdd");
  4106. drugno = ds_main_narclist_narclist.getColumn(iRow, "drugno");
  4107. pid = ds_main_narclist_narclist.getColumn(iRow, "pid");
  4108. prcpcd = ds_main_narclist_narclist.getColumn(iRow, "prcpcd");
  4109. var objArg = new Object();
  4110. objArg.arg_flag = "mapping";
  4111. objArg.arg_pid = pid;
  4112. objArg.arg_drugdd = drugdd;
  4113. objArg.arg_drugno = drugno;
  4114. objArg.arg_prcpcd = prcpcd;
  4115. //alert("pid: " + pid + " drugdd: " + drugdd + " drugno: " + drugno + " prpcd: " + prcpcd);
  4116. frmf_modal("SMADT12270", "SMADT12270", objArg, null, 0, 20, 150, null, null, null, null, null, "M");
  4117. } else if(e.id == "getTranList") {
  4118. var iRow = ds_main_narclist_narclist.rowposition;
  4119. var chrgid = sysf_getUserInfo("userid");
  4120. var id="";
  4121. var cnt = 0;
  4122. for(var i =0; i< ds_init_chrglist.rowcount; i++) {
  4123. id = ds_init_chrglist.getColumn(i, "cdid");
  4124. if(id == chrgid) {
  4125. cnt++;
  4126. }
  4127. }
  4128. if(cnt == 0 && chrgid != "AST") {
  4129. sysf_messageBox("담당자만 신규전송 작업을 할 수 있습니다.");
  4130. return;
  4131. }
  4132. var drugdd = "";
  4133. var drugno = "";
  4134. var pid = "";
  4135. var prcpcd = "";
  4136. drugdd = ds_main_narclist_narclist.getColumn(iRow, "drugdd");
  4137. drugno = ds_main_narclist_narclist.getColumn(iRow, "drugno");
  4138. pid = ds_main_narclist_narclist.getColumn(iRow, "pid");
  4139. prcpcd = ds_main_narclist_narclist.getColumn(iRow, "prcpcd");
  4140. var objArg = new Object();
  4141. objArg.arg_flag = "tran";
  4142. objArg.arg_pid = pid;
  4143. objArg.arg_drugdd = drugdd;
  4144. objArg.arg_drugno = drugno;
  4145. objArg.arg_prcpcd = prcpcd;
  4146. //alert("pid: " + pid + " drugdd: " + drugdd + " drugno: " + drugno + " prpcd: " + prcpcd);
  4147. frmf_modal("SMADT12270", "SMADT12270", objArg, null, 0, 20, 150, null, null, null, null, null, "M");
  4148. }
  4149. }
  4150. function cf_TRADT10311(sSvcId, nErrorCode, sErrorMsg) {
  4151. arErrorCode.push(sSvcId, nErrorCode);
  4152. }
  4153. /****************************************************************************************
  4154. * Components : CheckBox
  4155. * Description : 일괄처리 체크
  4156. ****************************************************************************************/
  4157. function group4_chk_all_onclick(obj:CheckBox, e:ClickEventInfo)
  4158. {
  4159. if(obj.value == false) ds_send.setColumn(0,"chkall","");
  4160. }
  4161. /****************************************************************************************
  4162. * Components : Dataset
  4163. * Description : 체크박스 체크시 처리
  4164. ****************************************************************************************/
  4165. function ds_main_narclist_narclist_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
  4166. {
  4167. if(e.columnid=="sel") {
  4168. obj.setColumn(e.row,e.columnid,(e.newvalue=="Y"||e.newvalue==1)?"Y":"N");
  4169. }
  4170. }
  4171. /****************************************************************************************
  4172. * Components : Combo
  4173. * Description : 조회기간 조건 변경
  4174. ****************************************************************************************/
  4175. function group2_combo2_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
  4176. {
  4177. if(obj.value == "5") {
  4178. group2.switch2.case4.checkbox1.value = "Y";
  4179. frmf_inputEnterKey("group2.switch2.case4.checkbox1", "onclick", new ClickEventInfo);
  4180. group2.switch2.case5.checkbox5.value = "Y";
  4181. frmf_inputEnterKey("group2.switch2.case5.checkbox5", "onclick", new ClickEventInfo);
  4182. }
  4183. }
  4184. /****************************************************************************************
  4185. * Components : CheckBox
  4186. * Description : 반환대상 체크박스 체크시 처리 1
  4187. ****************************************************************************************/
  4188. function group2_switch2_case4_checkbox1_onclick(obj:CheckBox, e:ClickEventInfo)
  4189. {
  4190. if(obj.value == false) ds_temp_srchinfo.setColumn(0,"cnclflag","");
  4191. if(ds_temp_srchinfo.getColumn(0,"cnclflag") == "Y"){
  4192. group2.switch2.case4.rdo_cncl.enable = true;
  4193. ds_temp_srchinfo.setColumn(0,"cnclstat","T");
  4194. ds_temp_srchinfo.setColumn(0,"narcstat","");
  4195. } else {
  4196. group2.switch2.case4.rdo_cncl.enable = false;
  4197. ds_temp_srchinfo.setColumn(0,"cnclstat", "");
  4198. if(ds_temp_srchinfo.getColumn(0,"rtnflag") != "Y") {
  4199. ds_temp_srchinfo.setColumn(0,"narcstat","T");
  4200. }
  4201. }
  4202. }
  4203. /****************************************************************************************
  4204. * Components : CheckBox
  4205. * Description : 반환대상 체크박스 체크시 처리 2
  4206. ****************************************************************************************/
  4207. function group2_switch2_case5_checkbox5_onclick(obj:CheckBox, e:ClickEventInfo)
  4208. {
  4209. if(obj.value == false) ds_temp_srchinfo.setColumn(0,"cnclflag","");
  4210. if(ds_temp_srchinfo.getColumn(0, "cnclflag") == "Y"){
  4211. group2.switch2.case5.radio6.enable = true;
  4212. ds_temp_srchinfo.setColumn( 0, "cnclstat", "T");
  4213. ds_temp_srchinfo.setColumn( 0, "narcstat", "");
  4214. } else {
  4215. group2.switch2.case5.radio6.enable = false;
  4216. ds_temp_srchinfo.setColumn( 0, "cnclstat", "");
  4217. if(ds_temp_srchinfo.getColumn(0, "rtnflag") != "Y") {
  4218. ds_temp_srchinfo.setColumn( 0, "narcstat", "T");
  4219. }
  4220. }
  4221. }
  4222. /****************************************************************************************
  4223. * Components : CheckBox
  4224. * Description : 반납대상 체크박스 체크시 처리 1
  4225. ****************************************************************************************/
  4226. function group2_switch2_case4_checkbox3_onclick(obj:CheckBox, e:ClickEventInfo)
  4227. {
  4228. if(obj.value == false) ds_temp_srchinfo.setColumn(0,"rtnflag","");
  4229. if(ds_temp_srchinfo.getColumn(0, "rtnflag") == "Y"){
  4230. group2.switch2.case4.rdo_rtn.enable = true;
  4231. ds_temp_srchinfo.setColumn( 0, "rtnstat", "T");
  4232. ds_temp_srchinfo.setColumn( 0, "narcstat", "");
  4233. } else {
  4234. group2.switch2.case4.rdo_rtn.enable = false;
  4235. ds_temp_srchinfo.setColumn( 0, "rtnstat", "");
  4236. if(ds_temp_srchinfo.getColumn(0, "cnclflag") != "Y") {
  4237. ds_temp_srchinfo.setColumn( 0, "narcstat", "T");
  4238. }
  4239. }
  4240. }
  4241. /****************************************************************************************
  4242. * Components : CheckBox
  4243. * Description : 반납대상 체크박스 체크시 처리 2
  4244. ****************************************************************************************/
  4245. function group2_switch2_case5_checkbox6_onclick(obj:CheckBox, e:ClickEventInfo)
  4246. {
  4247. if(obj.value == false) ds_temp_srchinfo.setColumn(0,"rtnflag","");
  4248. if(ds_temp_srchinfo.getColumn(0, "rtnflag") == "Y"){
  4249. group2.switch2.case5.radio7.enable = true;
  4250. ds_temp_srchinfo.setColumn( 0, "rtnstat", "T");
  4251. ds_temp_srchinfo.setColumn( 0, "narcstat", "");
  4252. } else {
  4253. group2.switch2.case5.radio7.enable = false;
  4254. ds_temp_srchinfo.setColumn( 0, "rtnstat", "");
  4255. if(ds_temp_srchinfo.getColumn(0, "cnclflag") != "Y") {
  4256. ds_temp_srchinfo.setColumn( 0, "narcstat", "T");
  4257. }
  4258. }
  4259. }
  4260. /****************************************************************************************
  4261. * Components : CheckBox
  4262. * Description : 미불출만 체크박스 체크시 처리
  4263. ****************************************************************************************/
  4264. function group2_switch2_case5_checkbox7_onclick(obj:CheckBox, e:ClickEventInfo)
  4265. {
  4266. if(obj.value == false) ds_temp_srchinfo.setColumn(0,"nodeliveflag","");
  4267. }
  4268. /****************************************************************************************
  4269. * Components : Radio
  4270. * Description : 외래/병동 구분 선택
  4271. ****************************************************************************************/
  4272. function group2_radio5_onitemchanged(obj:Radio, e:ItemChangeEventInfo)
  4273. {
  4274. fChgIOFlag();
  4275. }
  4276. /****************************************************************************************
  4277. * Components : Radio
  4278. * Description : 병동 / 퇴원등 구분
  4279. ****************************************************************************************/
  4280. function group2_rdo_drugflag_onitemchanged(obj:Radio, e:ItemChangeEventInfo)
  4281. {
  4282. fChgSwitch();
  4283. fGetNarcData();
  4284. }
  4285. /****************************************************************************************
  4286. * Components : Radio
  4287. * Description : 불출신청 종류 구분
  4288. ****************************************************************************************/
  4289. function group2_radio3_onitemchanged(obj:Radio, e:ItemChangeEventInfo)
  4290. {
  4291. ds_temp_srchinfo.setColumn( 0, "cnclflag","");
  4292. ds_temp_srchinfo.setColumn( 0, "cnclstat","");
  4293. ds_temp_srchinfo.setColumn( 0, "rtnflag","");
  4294. ds_temp_srchinfo.setColumn( 0, "rtnstat","");
  4295. group2.switch2.case4.rdo_cncl.enable = false;
  4296. group2.switch2.case4.rdo_rtn.enable = false;
  4297. group2.grp_prntdt.cmb_prntdt.value = "";
  4298. if (obj.value == "8") { //재출력
  4299. group2.grp_prntdt.visible = true;
  4300. group2.switch2.case4.rdo_cncl.value = "T";
  4301. group2.switch2.case4.rdo_rtn.value = "T";
  4302. fGetNarcPrintDt();
  4303. } else {
  4304. group2.grp_prntdt.cmb_prntdt.value = "";
  4305. group2.grp_prntdt.visible = false;
  4306. }
  4307. }
  4308. /****************************************************************************************
  4309. * Components : CheckBox
  4310. * Description : 처방구분 전체 선택
  4311. ****************************************************************************************/
  4312. function group2_checkbox8_onclick(obj:CheckBox, e:ClickEventInfo)
  4313. {
  4314. if(obj.value == false) ds_temp_srchinfo.setColumn(0,"srchprcpkindall","");
  4315. var allflag = ds_temp_srchinfo.getColumn(0,"srchprcpkindall");
  4316. // 전체선택
  4317. if (allflag == "Y") {
  4318. group2.chk_prcpkind.setEnable(false);
  4319. } else {
  4320. group2.chk_prcpkind.setEnable(true);
  4321. }
  4322. }
  4323. /****************************************************************************************
  4324. * Components : Dataset
  4325. * Description : 체크박스 바인딩데이터 수정시 체크박스에 반영
  4326. ****************************************************************************************/
  4327. function ds_temp_srchinfo_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
  4328. {
  4329. lf_setMultiCheckBox(obj);
  4330. }
  4331. /****************************************************************************************
  4332. * Components : CheckBox
  4333. * Description : 자동 체크시
  4334. ****************************************************************************************/
  4335. function group2_chk_auto_onclick(obj:CheckBox, e:ClickEventInfo)
  4336. {
  4337. if(obj.value == false) ds_temp_srchinfo.setColumn(0,"autoprnt","");
  4338. if(obj.value == "Y") {
  4339. group2.radio2.enable = false;
  4340. group2.radio3.enable = false;
  4341. group2.radio5.enable = false;
  4342. group2.radio3.value = "7";
  4343. group2.rdo_drugflag.enable = false;
  4344. group2.switch2.case4.checkbox1.enable = false;
  4345. group2.switch2.case4.checkbox3.enable = false;
  4346. group2.switch2.case4.rdo_cncl.value = "";
  4347. group2.switch2.case4.rdo_rtn.value = "";
  4348. group2.radio5.value = "O";
  4349. group4.chk_all.value = "Y";
  4350. group2.cap_automess.visible = true; /// 자동출력 김치국
  4351. } else {
  4352. group2.radio2.enable = true;
  4353. group2.radio3.enable = true;
  4354. group2.radio5.enable = true;
  4355. group2.rdo_drugflag.enable = true;
  4356. group2.switch2.case4.checkbox1.enable = true;
  4357. group2.switch2.case4.checkbox3.enable = true;
  4358. group2.cap_automess.visible = false; // 자동출력 김치국
  4359. }
  4360. var autoflag = ds_temp_srchinfo.getColumn(0,"autoprnt");
  4361. if (autoflag == "Y" && nextFlag == "GO") {
  4362. if (gTimer == 0) {
  4363. gTimer = 1;
  4364. fAutoOutNarc() ;
  4365. this.setTimer(0,13000);
  4366. }
  4367. } else {
  4368. if (gTimer != 0) {
  4369. this.killTimer(0);
  4370. gTimer = 0;
  4371. }
  4372. }
  4373. }
  4374. /****************************************************************************************
  4375. * Components : Form
  4376. * Description : 타이머 함수 실행
  4377. ****************************************************************************************/
  4378. function SMADT30100_ontimer(obj:Form, e:TimerEventInfo)
  4379. {
  4380. if(e.timerid == 0) fAutoOutNarc();
  4381. }
  4382. /****************************************************************************************
  4383. * Components : Combo
  4384. * Description : 출력시간 선택
  4385. ****************************************************************************************/
  4386. function group2_grp_prntdt_cmb_prntdt_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
  4387. {
  4388. ds_temp_srchinfo.setColumn(0,"prntdt" ,eval(obj.innerdataset).lookup("wardnm",obj.value,"prntdt"));
  4389. ds_temp_srchinfo.setColumn(0,"issdeptcd",eval(obj.innerdataset).lookup("wardnm",obj.value,"issdeptcd"));
  4390. }
  4391. /****************************************************************************************
  4392. * Components : Edit
  4393. * Description : 환자번호 입력 후 엔터로 조회
  4394. ****************************************************************************************/
  4395. function group2_input8_onkeydown(obj:Edit, e:KeyEventInfo)
  4396. {
  4397. if(e.keycode == 13) {
  4398. obj.updateToDataset();
  4399. fGetNarcData();
  4400. }
  4401. }
  4402. /****************************************************************************************
  4403. * Components : Button
  4404. * Description : 환자조회 팝업 오픈
  4405. ****************************************************************************************/
  4406. function group2_button61_onclick(obj:Button, e:ClickEventInfo)
  4407. {
  4408. frmf_modal("SPPMC02500", "SPPMC02500", "", "", 1, 200, 200, "", "", "", "", "", "M");
  4409. ds_temp_srchinfo.setColumn(0,"pid" , ds_patinfolist.getColumn(0,"pid") ); // 등록번호 설정
  4410. }
  4411. /****************************************************************************************
  4412. * Components : Edit
  4413. * Description : 투약번호 입력 후 엔터로 조회
  4414. ****************************************************************************************/
  4415. function group2_input2_onkeydown(obj:MaskEdit, e:KeyEventInfo)
  4416. {
  4417. if(e.keycode == 13) {
  4418. obj.updateToDataset();
  4419. fGetNarcData();
  4420. }
  4421. }
  4422. /****************************************************************************************
  4423. * Components : Edit
  4424. * Description : 바코드 입력 후 엔터로 처리
  4425. ****************************************************************************************/
  4426. function group2_input9_onkeydown(obj:Edit, e:KeyEventInfo)
  4427. {
  4428. if(e.keycode == 13) {
  4429. obj.updateToDataset();
  4430. obj.enable = false;
  4431. fChgBarcode();
  4432. group2.input9.enable = true;
  4433. group2.input9.setFocus();
  4434. }
  4435. }
  4436. /****************************************************************************************
  4437. * Components : Edit
  4438. * Description : 잔량확인 입력 후 엔터로 처리
  4439. ****************************************************************************************/
  4440. function group2_input1_onkeydown(obj:Edit, e:KeyEventInfo)
  4441. {
  4442. if(e.keycode == 13) {
  4443. obj.updateToDataset();
  4444. group2.input1.enable = false;
  4445. fChgBarcodeSpre();
  4446. group2.input1.enable = true;
  4447. group2.input1.setFocus();
  4448. }
  4449. }
  4450. /****************************************************************************************
  4451. * Components : Edit
  4452. * Description : 담당자 입력 후 엔터로 처리
  4453. ****************************************************************************************/
  4454. function group2_ipt_srchid_onkeydown(obj:Edit, e:KeyEventInfo)
  4455. {
  4456. if(e.keycode == 13) {
  4457. obj.updateToDataset();
  4458. fChgUserID();
  4459. }
  4460. }
  4461. /****************************************************************************************
  4462. * Components : Radio
  4463. * Description : 마약종류 선택시 조회
  4464. ****************************************************************************************/
  4465. function group2_radio4_onitemchanged(obj:Radio, e:ItemChangeEventInfo)
  4466. {
  4467. call_TRADT30101();
  4468. ds_temp_srchinfo.setColumn( 0, "narcflag", ds_send_srchcond.getColumn(0, "narcflag"));
  4469. //반환대상, 반납대상, 미불출 조건 변경
  4470. if(ds_temp_srchinfo.getColumn(0, "narcflag") == "M"){
  4471. group2.switch2.tabindex = 0;
  4472. group2.combo2.index = 1; //그외 적용일자
  4473. } else if(ds_temp_srchinfo.getColumn(0, "narcflag") == "H"){
  4474. group2.switch2.tabindex = 1;
  4475. if(ds_temp_srchinfo.getColumn(0, "srchioflag") == "O") {
  4476. group2.combo2.index = 3; //향정외래일때 실시일자
  4477. } else {
  4478. group2.combo2.index = 1; //그외 적용일자
  4479. }
  4480. } else {
  4481. group2.switch2.tabindex = 0;
  4482. //combo2.select(1); //그외 적용일자
  4483. }
  4484. fGetNarcData();
  4485. }
  4486. /****************************************************************************************
  4487. * Components : Button
  4488. * Description : 일괄처리 실행
  4489. ****************************************************************************************/
  4490. function group4_btn_prt_onclick(obj:Button, e:ClickEventInfo)
  4491. {
  4492. fNarcPrint();
  4493. if( ds_send.getColumn(0, "chkall") == "Y" ) {
  4494. /// 2014년 11.6 김치국 불출상태가 '1' = 불출신청이면서 일괄처리 버튼 누를시 에러를 발생 시킴
  4495. for( var i = 0; i < ds_main_narclist_narclist.rowcount; i++){
  4496. var sel = ds_main_narclist_narclist.getColumn(i, "sel");
  4497. var cnclstat = ds_main_narclist_narclist.getColumn(i, "cnclstat"); // 반환상태
  4498. if(sel == "Y"){
  4499. if ( cnclstat == "1") {
  4500. alert("반환신청 자료는 일괄처리 할 수 없습니다");
  4501. return;
  4502. }
  4503. }
  4504. }
  4505. fNarcActing("Prcpdrug");
  4506. }
  4507. // 처방전이나 라벨 출력 시 병동이나 수행부서를 조건으로 걸고 진행한 후 다시 공란으로 돌아가게 수정
  4508. ds_temp_srchinfo.setColumn(0, "ward", "");
  4509. ds_temp_srchinfo.setColumn(0, "srchdeptcd", "");
  4510. //// 2018년 마약통합관리 정보 저장 데이타set copy 김치국
  4511. if ( ds_sendnarcstoc.rowcount > 0 ){
  4512. var objArg = new Object(); //ds_sendnarcstoc
  4513. objArg.arg_ds_sendnarcstoc = ds_sendnarcstoc;
  4514. objArg.arg_flag = "Prcp";
  4515. frmf_modal("SMADT12001", "SMADT12001", objArg, null, null, null, null, null, null, null, null, null, "M");
  4516. }
  4517. //////
  4518. }
  4519. /****************************************************************************************
  4520. * Components : Button
  4521. * Description : 처방전재출력 실행
  4522. ****************************************************************************************/
  4523. function group4_button2_onclick(obj:Button, e:ClickEventInfo)
  4524. {
  4525. // 경북대병원 처방전재출력 추가.
  4526. ds_temp.setColumn( 0, "reprnt", "Y");
  4527. fNarcPrint();
  4528. ds_temp.setColumn( 0, "reprnt", "N");
  4529. // 처방전이나 라벨 출력 시 병동이나 수행부서를 조건으로 걸고 진행한 후 다시 공란으로 돌아가게 수정
  4530. ds_temp_srchinfo.setColumn( 0, "ward", "");
  4531. ds_temp_srchinfo.setColumn( 0, "srchdeptcd", "");
  4532. }
  4533. /****************************************************************************************
  4534. * Components : Button
  4535. * Description : 라벨재출력 실행
  4536. ****************************************************************************************/
  4537. function group4_button7_onclick(obj:Button, e:ClickEventInfo)
  4538. {
  4539. fNarcLBLPrintR("Reprnt");
  4540. // 처방전이나 라벨 출력 시 병동이나 수행부서를 조건으로 걸고 진행한 후 다시 공란으로 돌아가게 수정
  4541. ds_temp_srchinfo.setColumn( 0, "ward", "");
  4542. ds_temp_srchinfo.setColumn( 0, "srchdeptcd", "");
  4543. }
  4544. /****************************************************************************************
  4545. * Components : Button
  4546. * Description : 바코드불출 팝업 오픈
  4547. ****************************************************************************************/
  4548. function group4_button5_onclick(obj:Button, e:ClickEventInfo)
  4549. {
  4550. frmf_modal("SMADT30600", "SMADT30600", null, null, null, null, null, null, null, null, null, null, "P");
  4551. }
  4552. /****************************************************************************************
  4553. * Components : Button
  4554. * Description : 프린터설정 팝업 오픈
  4555. ****************************************************************************************/
  4556. function group4_btn_prnt_onclick(obj:Button, e:ClickEventInfo)
  4557. {
  4558. fSetPrint();
  4559. }
  4560. /****************************************************************************************
  4561. * Components : CheckBox
  4562. * Description : 라벨생략 체크박스 선택
  4563. ****************************************************************************************/
  4564. function group4_checkbox4_onclick(obj:CheckBox, e:ClickEventInfo)
  4565. {
  4566. if(obj.value == false) ds_send.setColumn(0,"lblskip","");
  4567. }
  4568. /****************************************************************************************
  4569. * Components : Grid
  4570. * Description : 조제확인 불출확인 버튼 활성/비활성
  4571. ****************************************************************************************/
  4572. function switch1_grd_onkeyup(obj:Grid, e:KeyEventInfo)
  4573. {
  4574. if( e.keycode == 121 ){
  4575. group4.btn_prcp.visible = true;
  4576. group4.btn_drug.visible = true;
  4577. }
  4578. if( e.keycode == 120 ){
  4579. group4.btn_prcp.visible = false;
  4580. group4.btn_drug.visible = false;
  4581. }
  4582. }
  4583. /****************************************************************************************
  4584. * Components : Div
  4585. * Description : 조제확인 불출확인 버튼 활성/비활성
  4586. ****************************************************************************************/
  4587. function group_onkeyup(obj:Div, e:KeyEventInfo)
  4588. {
  4589. if( e.keycode == 121 ){
  4590. group4.btn_prcp.visible = true;
  4591. group4.btn_drug.visible = true;
  4592. }
  4593. if( e.keycode == 120 ){
  4594. group4.btn_prcp.visible = false;
  4595. group4.btn_drug.visible = false;
  4596. }
  4597. }
  4598. /****************************************************************************************
  4599. * Components : Button
  4600. * Description : 조제확인
  4601. ****************************************************************************************/
  4602. function group4_btn_prcp_onclick(obj:Button, e:ClickEventInfo)
  4603. {
  4604. fNarcActing("Prcp");
  4605. }
  4606. /****************************************************************************************
  4607. * Components : Button
  4608. * Description : 불출확인
  4609. ****************************************************************************************/
  4610. function group4_btn_drug_onclick(obj:Button, e:ClickEventInfo)
  4611. {
  4612. fNarcActing("Drug");
  4613. }
  4614. /****************************************************************************************
  4615. * Components : Button
  4616. * Description : 반환확인
  4617. ****************************************************************************************/
  4618. function group4_btn_rtn_onclick(obj:Button, e:ClickEventInfo)
  4619. {
  4620. fNarcActing("Rtn");
  4621. fGetNarcData();
  4622. //// 2018년 마약통합관리 정보 저장 데이타set copy 김치국
  4623. if ( ds_sendnarcstoc.rowcount > 0 ){
  4624. var objArg = new Object(); //ds_sendnarcstoc
  4625. objArg.arg_ds_sendnarcstoc = ds_sendnarcstoc;
  4626. objArg.arg_flag = "Rtn";
  4627. frmf_modal("SMADT12001", "SMADT12001", objArg, null, null, null, null, null, null, null, null, null, "M");
  4628. }
  4629. //////
  4630. }
  4631. /****************************************************************************************
  4632. * Components : Button
  4633. * Description : 반환취소
  4634. ****************************************************************************************/
  4635. function group4_btn_rtncncl_onclick(obj:Button, e:ClickEventInfo)
  4636. {
  4637. fNarcActing("RtnCncl");
  4638. fGetNarcData();
  4639. }
  4640. /****************************************************************************************
  4641. * Components : Button
  4642. * Description : 잔량확인
  4643. ****************************************************************************************/
  4644. function group4_btn_spre_onclick(obj:Button, e:ClickEventInfo)
  4645. {
  4646. fNarcActing("Spre");
  4647. //// 2018년 마약통합관리 정보 저장 데이타set copy 김치국
  4648. if ( ds_sendnarcstoc.rowcount > 0 ){
  4649. var objArg = new Object(); //ds_sendnarcstoc
  4650. objArg.arg_ds_sendnarcstoc = ds_sendnarcstoc;
  4651. objArg.arg_flag = "Spre";
  4652. frmf_modal("SMADT12001", "SMADT12001", objArg, null, null, null, null, null, null, null, null, null, "M");
  4653. }
  4654. //////
  4655. }
  4656. /****************************************************************************************
  4657. * Components : Button
  4658. * Description : 잔량취소
  4659. ****************************************************************************************/
  4660. function group4_btn_sprecncl_onclick(obj:Button, e:ClickEventInfo)
  4661. {
  4662. fNarcActing("SpreCncl");
  4663. }
  4664. /****************************************************************************************
  4665. * Components : Grid
  4666. * Description : 리스트 더블클릭
  4667. ****************************************************************************************/
  4668. function switch1_case1_grd_narclist_oncelldblclick(obj:Grid, e:GridClickEventInfo)
  4669. {
  4670. var cRow = e.row;
  4671. if( cRow > -1 ){
  4672. ds_temp_srchinfo.setColumn(0, "pid", ds_main_narclist_narclist.getColumn(cRow, "pid"));
  4673. fGetNarcData();
  4674. //환자별 조회라면 체크 표시
  4675. fChkPatSearch(obj);
  4676. }
  4677. }
  4678. function switch1_case1_grd_narclist_onrbuttonup(obj:Grid, e:GridMouseEventInfo)
  4679. {
  4680. //setPopupMenu("grd_narclist", true, "/root/hidden/popup/prcp/item", "name", "param");
  4681. if(e.row > -1){
  4682. grdf_setSelectedCell(obj, e); // 선택된 행 확실히 선택해줌
  4683. pmn_menu.trackPopup(e.screenX,e.screenY);
  4684. }
  4685. return true;
  4686. }
  4687. /****************************************************************************************
  4688. * Components : CheckBox
  4689. * Description : 그리드 전체 선택 기능
  4690. ****************************************************************************************/
  4691. function chk_grdAll_onclick(obj:CheckBox, e:ClickEventInfo)
  4692. {
  4693. if(obj.value == "Y") {
  4694. for ( var i = 0 ; i < ds_main_narclist_narclist.rowcount ; i++ ){
  4695. var narcstat = ds_main_narclist_narclist.getColumn(i,"narcstat");
  4696. if(narcstat == "1"){
  4697. ds_main_narclist_narclist.setColumn(i,"sel","N");
  4698. } else {
  4699. ds_main_narclist_narclist.setColumn(i,"sel","Y");
  4700. }
  4701. }
  4702. } else {
  4703. dsf_setFixVal(ds_main_narclist_narclist, "sel:N");
  4704. // for ( var i = 0 ; i < ds_main_narclist_narclist.rowcount ; i++ ){
  4705. // ds_main_narclist_narclist.setColumn(i,"sel","N");
  4706. // }
  4707. }
  4708. }
  4709. /****************************************************************************************
  4710. * Components : Button
  4711. * Description : 마약향정 리스트 조회
  4712. ****************************************************************************************/
  4713. function group2_btn_sea_onclick(obj:Button, e:ClickEventInfo)
  4714. {
  4715. if (group2.radio3.value == "8") {
  4716. if (utlf_isNull(group2.grp_prntdt.cmb_prntdt.value)) {
  4717. sysf_messageBox("출력할 출력일시를 선택", "I008");
  4718. group2.grp_prntdt.cmb_prntdt.setFocus();
  4719. return;
  4720. }
  4721. }
  4722. ds_temp_srchinfo.setColumn(0,"selkey", "");
  4723. fGetNarcData();
  4724. }
  4725. /****************************************************************************************
  4726. * Components : Grid
  4727. * Description : 리스트 더블클릭
  4728. ****************************************************************************************/
  4729. function switch1_case3_grd_outnarc_oncelldblclick(obj:Grid, e:GridClickEventInfo)
  4730. {
  4731. if(e.row > -1){
  4732. ds_temp_srchinfo.setColumn(0,"pid",ds_main_narclist_narclist.getColumn(e.row,"pid"));
  4733. fGetNarcData();
  4734. //환자별 조회라면 체크 표시
  4735. fChkPatSearch(obj);
  4736. }
  4737. }
  4738. function switch1_case3_grd_outnarc_onrbuttonup(obj:Grid, e:GridMouseEventInfo)
  4739. {
  4740. // setPopupMenu("grd_narclist", true, "/root/hidden/popup/prcp/item", "name", "param");
  4741. if(e.row > -1){
  4742. grdf_setSelectedCell(obj, e); // 선택된 행 확실히 선택해줌
  4743. pmn_menu.trackPopup(e.screenX,e.screenY);
  4744. }
  4745. return true;
  4746. }
  4747. /****************************************************************************************
  4748. * Components : Grid
  4749. * Description : 반환횟수 입력시 반환량 계산
  4750. ****************************************************************************************/
  4751. function switch1_case3_grd_outnarc_ontextchanged(obj:Grid, e:GridEditTextChangedEventInfo)
  4752. {
  4753. if(e.col == 29 && ds_temp_srchinfo.getColumn(0,"narcflag") == "H") {
  4754. fIptRtnCnts(e.row);
  4755. }
  4756. }
  4757. /****************************************************************************************
  4758. * Components : Button
  4759. * Description : 실시내역 숨기기
  4760. ****************************************************************************************/
  4761. function group5_button10_onclick(obj:Button, e:ClickEventInfo)
  4762. {
  4763. group5.visible = false;
  4764. }
  4765. /****************************************************************************************
  4766. * Components : Button
  4767. * Description : 불출확인서 출력
  4768. ****************************************************************************************/
  4769. function button1_onclick(obj:Button, e:ClickEventInfo)
  4770. {
  4771. var val = group2.cmb_ward.value;
  4772. var val1 = group2.radio3.value;
  4773. if(val1 == "5" || val1== "7" || val1== "8") {
  4774. if (val1 == "8") {
  4775. if (utlf_isNull(group2.grp_prntdt.cmb_prntdt.value)) {
  4776. sysf_messageBox("출력할 출력일시를 선택", "I008");
  4777. group2.grp_prntdt.cmb_prntdt.setFocus();
  4778. return;
  4779. }
  4780. }
  4781. var sSelKey = "";
  4782. var sSelKeyall = "";
  4783. var iCnt = ds_main_narclist_narclist.rowcount;
  4784. var selCnt = ds_main_narclist_narclist.getCaseCount("sel=='Y'");
  4785. if (selCnt == 0) {
  4786. sysf_messageBox("출력할 처방을 선택", "I008");
  4787. return;
  4788. }
  4789. for (var i = 0; i < iCnt; i++) {
  4790. if (ds_main_narclist_narclist.getColumn(i,"sel") == "Y") {
  4791. sSelKey += "'"+ ds_main_narclist_narclist.getColumn(i,"drugno") +
  4792. ""+ ds_main_narclist_narclist.getColumn(i,"pid") +
  4793. ""+ ds_main_narclist_narclist.getColumn(i,"prcpdd")+ "',";
  4794. sSelKeyall += "'"+ ds_main_narclist_narclist.getColumn(i,"drugno") +
  4795. ""+ ds_main_narclist_narclist.getColumn(i,"pid") +
  4796. ""+ ds_main_narclist_narclist.getColumn(i,"prcpdd")+
  4797. ""+ ds_main_narclist_narclist.getColumn(i,"prcpno")+
  4798. ""+ ds_main_narclist_narclist.getColumn(i,"drugseqno")+"',";
  4799. }
  4800. }
  4801. sSelKey = sSelKey.replace(/,$/g, "");
  4802. sSelKeyall = sSelKeyall.replace(/,$/g, "");
  4803. ds_temp_srchinfo.setColumn( 0, "selkey" , sSelKey); //체크된 불출집계내역
  4804. ds_temp_srchinfo.setColumn( 0, "selkeyall" , sSelKeyall); //체크된 불출집계내역
  4805. fGetNarcData();
  4806. //경북대병원 조회목록출력 변경 ==> 마약불출확인서
  4807. var befrNacrFlag = ds_send_srchinfo.getColumn(0,"narcflag");
  4808. dsf_createDs("ds_temp_setnarclist");
  4809. //마약
  4810. if (ds_main_narclist_narclist.getCaseCount("narcflag=='M' && sel=='Y'") > 0) {
  4811. ds_send_srchinfo.setColumn(0,"narcflag", "M");
  4812. var drugkind = ds_send_srchinfo.getColumn(0,"srchdrugkind");
  4813. {//마약 주사
  4814. ds_send_srchinfo.setColumn(0,"srchdrugkind", "I");
  4815. call_TRADT30109();
  4816. ds_prtinfo_sumlist_sumlist.copyData(ds_main_sumlist_sumlist);
  4817. ds_prtinfo_hosp.setColumn(0,"hosp", "");
  4818. if (ds_main_narclist_narclist.getCaseCount("narcflag=='M' && pastillyn != 'Y' && drugkind=='M' && sel=='Y'") > 0) {
  4819. ds_prtinfo_hosp.setColumn(0,"narcflag" , "M");
  4820. ds_prtinfo_hosp.setColumn(0,"pastillyn", "N");
  4821. ds_temp_setnarclist.copyData(ds_main_narclist_narclist);
  4822. ds_temp_setnarclist.filter("narcflag=='M' && pastillyn != 'Y' && drugkind=='M' && sel=='Y'");
  4823. ds_prtinfo_narclist_narclist.copyData(ds_temp_setnarclist,true);
  4824. lf_print_RFADT30108();
  4825. ds_prtinfo_hosp.setColumn(0,"hosp", "Y");
  4826. lf_print_RFADT30108();
  4827. ds_temp_setnarclist.clear();
  4828. }
  4829. }
  4830. {//마약 먹는약/외용약
  4831. ds_send_srchinfo.setColumn(0,"srchdrugkind", "D");
  4832. call_TRADT30109();
  4833. ds_prtinfo_sumlist_sumlist.copyData(ds_main_sumlist_sumlist);
  4834. ds_prtinfo_hosp.setColumn(0,"hosp", "");
  4835. if (ds_main_narclist_narclist.getCaseCount("narcflag=='M' && pastillyn != 'Y' && sel=='Y' && (drugkind=='N' || drugkind=='Y')") > 0) {
  4836. ds_prtinfo_hosp.setColumn(0,"narcflag", "M");
  4837. ds_prtinfo_hosp.setColumn(0,"pastillyn", "N");
  4838. ds_temp_setnarclist.copyData(ds_main_narclist_narclist);
  4839. ds_temp_setnarclist.filter("narcflag=='M' && pastillyn != 'Y' && sel=='Y' && (drugkind=='N' || drugkind=='Y')");
  4840. ds_prtinfo_narclist_narclist.copyData(ds_temp_setnarclist,true);
  4841. lf_print_RFADT30108();
  4842. ds_prtinfo_hosp.setColumn(0,"hosp", "Y");
  4843. lf_print_RFADT30108();
  4844. ds_temp_setnarclist.clear();
  4845. }
  4846. }
  4847. {//마약이면서 향정수불인것
  4848. ds_send_srchinfo.setColumn(0,"srchdrugkind", "P");
  4849. call_TRADT30109();
  4850. ds_prtinfo_sumlist_sumlist.copyData(ds_main_sumlist_sumlist);
  4851. ds_prtinfo_hosp.setColumn(0,"hosp", "");
  4852. if (ds_main_narclist_narclist.getCaseCount("narcflag=='M' && pastillyn == 'Y' && sel=='Y'") > 0) {
  4853. ds_prtinfo_hosp.setColumn(0,"narcflag", "M");
  4854. ds_prtinfo_hosp.setColumn(0,"pastillyn", "Y");
  4855. ds_temp_setnarclist.copyData(ds_main_narclist_narclist);
  4856. ds_temp_setnarclist.filter("narcflag=='M' && pastillyn == 'Y' && sel=='Y'");
  4857. ds_prtinfo_narclist_narclist.copyData(ds_temp_setnarclist,true);
  4858. lf_print_RFADT30108();
  4859. ds_prtinfo_hosp.setColumn(0,"hosp", "Y");
  4860. lf_print_RFADT30108();
  4861. ds_temp_setnarclist.clear();
  4862. }
  4863. }
  4864. ds_send_srchinfo.setColumn(0,"srchdrugkind", drugkind);
  4865. }
  4866. //향정
  4867. if (ds_main_narclist_narclist.getCaseCount("narcflag=='H' && sel=='Y'") > 0) {
  4868. ds_send_srchinfo.setColumn(0,"narcflag", "H");
  4869. call_TRADT30109();
  4870. ds_prtinfo_sumlist_sumlist.copyData(ds_main_sumlist_sumlist);
  4871. ds_temp_setnarclist.copyData(ds_main_narclist_narclist);
  4872. ds_temp_setnarclist.filter("narcflag=='H' && sel=='Y'");
  4873. ds_prtinfo_narclist_narclist.copyData(ds_temp_setnarclist,true);
  4874. ds_prtinfo_hosp.setColumn(0,"hosp" , "");
  4875. ds_prtinfo_hosp.setColumn(0,"narcflag" , "H");
  4876. lf_print_RFADT30108();
  4877. ds_prtinfo_hosp.setColumn(0,"hosp", "Y");
  4878. lf_print_RFADT30108();
  4879. ds_temp_setnarclist.clear();
  4880. }
  4881. if (val1 != "8") { //재출력인 경우를 제외하고 출력일자 설정
  4882. fSetNarcPrintDt(); //출력일자 설정
  4883. }
  4884. ds_send_srchinfo.setColumn(0,"narcflag", befrNacrFlag);
  4885. } else {
  4886. alert("불출구분(불출/실불출신청/재출력)중 하나를 선택해주세요");
  4887. return false;
  4888. }
  4889. }
  4890. /****************************************************************************************
  4891. * Components : Button
  4892. * Description : 잔류마약폐기장부 출력
  4893. ****************************************************************************************/
  4894. function button9_onclick(obj:Button, e:ClickEventInfo)
  4895. {
  4896. ds_send_srchinfo.copyData(ds_temp_srchinfo);
  4897. ds_send_srchinfo.setColumn( 0, "srchioflag" ,"");
  4898. ds_send_srchinfo.setColumn( 0, "rtnflag" ,"Y");
  4899. ds_send_srchinfo.setColumn( 0, "pid" ,"");
  4900. ds_send_srchinfo.setColumn( 0, "srchdrugno" ,"");
  4901. ds_send_srchinfo.setColumn( 0, "rtnstat" ,"2"); //잔량확인건만 -"2"
  4902. ds_send_srchinfo.setColumn( 0, "cnclflag" ,"");
  4903. ds_send_srchinfo.setColumn( 0, "cnclstat" ,"");
  4904. ds_send_srchinfo.setColumn( 0, "narcstat" ,"");
  4905. call_TRADT30102();
  4906. var objDOM = rptf_createDOM(); // DOM 객체 설정
  4907. rptf_setNodeListToDOM(objDOM, "/root/main/narclist/narclist", ds_main_narclist_narclist); // 데이터셋 1
  4908. rptf_setNodeListToDOM(objDOM, "/root/send/srchinfo" , ds_send_srchinfo); // 데이터셋 2
  4909. var objParam = new Object();
  4910. objParam.xml_data_XML1 = objDOM.documentElement.source; // 최상의노드 XML 스트링 추출
  4911. var option = "directprint=1;printdialog=0;";
  4912. rptf_exeReportPreview30(["RFADT30102"],[objParam], option);
  4913. }
  4914. /****************************************************************************************
  4915. * Components : Button
  4916. * Description : 반환반납장부 출력
  4917. ****************************************************************************************/
  4918. function button8_onclick(obj:Button, e:ClickEventInfo)
  4919. {
  4920. ds_send_srchinfo.copyData(ds_temp_srchinfo);
  4921. ds_send_srchinfo.setColumn( 0, "cnclflag" ,"Y");
  4922. ds_send_srchinfo.setColumn( 0, "cnclstat" ,"T");
  4923. ds_send_srchinfo.setColumn( 0, "rtnflag" ,"Y");
  4924. ds_send_srchinfo.setColumn( 0, "rtnstat" ,"T");
  4925. ds_send_srchinfo.setColumn( 0, "pid" ,"");
  4926. ds_send_srchinfo.setColumn( 0, "srchdrugno" ,"");
  4927. ds_send_srchinfo.setColumn( 0, "narcstat" ,"");
  4928. dsf_makeValue( ds_send_srchinfo, "usernm", "string", sysf_getUserName());
  4929. dsf_createDsRow("ds_req", [
  4930. {col:"narcflag", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"narcflag")}
  4931. , {col:"timeflag", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"timeflag")}
  4932. , {col:"fst_dd", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"fst_dd")}
  4933. , {col:"last_dd", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"last_dd")}
  4934. , {col:"srchdrugkind", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"srchdrugkind")}
  4935. , {col:"srchioflag", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"srchioflag")}
  4936. , {col:"drugflag", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"drugflag")}
  4937. , {col:"srchroot", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"srchroot")}
  4938. , {col:"narcstat", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"narcstat")}
  4939. , {col:"cnclstat", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"cnclstat")}
  4940. , {col:"rtnstat", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"rtnstat")}
  4941. , {col:"nodeliveflag", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"nodeliveflag")}
  4942. , {col:"narctype", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"narctype")}
  4943. , {col:"pid", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"pid")}
  4944. , {col:"ward", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"ward")}
  4945. , {col:"srchdrugno", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"srchdrugno")}
  4946. , {col:"barcode", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"barcode")}
  4947. , {col:"narccd", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"narccd")}
  4948. , {col:"barcode_2", type:"STRING", size:256, val:""}
  4949. , {col:"srchdeptcd", type:"STRING", size:256, val:ds_send_srchinfo.getColumn(0,"srchdeptcd")}
  4950. ]);
  4951. var oParam = {};
  4952. oParam.id = "TRADT30108";
  4953. oParam.service = "pharmacyprescriptionapp.Narcotics";
  4954. oParam.method = "reqGetNarcRtnPrntList";
  4955. oParam.inds = "req=ds_req";
  4956. oParam.outds = "ds_main_rtnprntlist_prntlist=narclist";
  4957. oParam.async = false;
  4958. //oParam.callback = "cf_TRADT30108";
  4959. tranf_submit(oParam);
  4960. if(!utlf_isNull(ds_main_rtnprntlist_prntlist.getColumn(0,"pid"))) {
  4961. if ( ds_temp_srchinfo.getColumn(0,"narcflag") == "H") { //향정
  4962. var objDOM = rptf_createDOM(); // DOM 객체 설정
  4963. rptf_setNodeListToDOM(objDOM, "/root/main/rtnprntlist/prntlist", ds_main_rtnprntlist); // 데이터셋 1
  4964. rptf_setNodeListToDOM(objDOM, "/root/send/srchinfo", ds_send_srchinfo); // 데이터셋 2
  4965. var objParam = new Object();
  4966. objParam.xml_data_XML1 = objDOM.documentElement.source; // 최상의노드 XML 스트링 추출
  4967. var option = "directprint=1;printdialog=0;";
  4968. rptf_exeReportPreview30(["RFADT30103"],[objParam], option);
  4969. } else if ( ds_temp_srchinfo.getColumn(0,"narcflag") == "M"){//마약
  4970. var objDOM = rptf_createDOM(); // DOM 객체 설정
  4971. rptf_setNodeListToDOM(objDOM, "/root/main/rtnprntlist/prntlist", ds_main_rtnprntlist); // 데이터셋 1
  4972. rptf_setNodeListToDOM(objDOM, "/root/send/srchinfo", ds_send_srchinfo); // 데이터셋 2
  4973. var objParam = new Object();
  4974. objParam.xml_data_XML1 = objDOM.documentElement.source; // 최상의노드 XML 스트링 추출
  4975. var option = "directprint=1;printdialog=0;";
  4976. rptf_exeReportPreview30(["RFADT30101"],[objParam], option);
  4977. }
  4978. }
  4979. }
  4980. /****************************************************************************************
  4981. * Components : Button
  4982. * Description : 엑셀저장
  4983. ****************************************************************************************/
  4984. function btn_excel_onclick(obj:Button, e:ClickEventInfo)
  4985. {
  4986. if( ds_main_narclist_narclist.rowcount > 0 ){
  4987. grdf_exportExcel(switch1.case1.grd_narclist, "SheetName", "SheetName", false, "", "user", false);
  4988. } else {
  4989. sysf_messageBox("조회된 데이터가 ", "I004");
  4990. }
  4991. }
  4992. //
  4993. // function switch1_case3_grd_outnarc_onheadclick(obj:Grid, e:GridClickEventInfo)
  4994. // {
  4995. // if(e.col == 1) fn_chkAll(obj);
  4996. // }
  4997. //
  4998. // /******************************************************************
  4999. // * Argument : fn_chkAll(obj)
  5000. // * Description : head checkbox click event
  5001. // ******************************************************************/
  5002. // function fn_chkAll(obj){
  5003. // if( obj.getCellProperty("Head", 1, "displaytype") == "checkbox"){
  5004. // if( utlf_isNull(obj.getCellProperty("Head", 1, "text")) ){
  5005. // obj.setCellProperty("Head", 1, "text","expr:1");
  5006. // for( var i = 0; i < ds_main_narclist.rowcount; i++ ){
  5007. // var narcstat = ds_main_narclist.getColumn(i, "narcstat");
  5008. // if( narcstat == "1"){
  5009. // ds_main_narclist.setColumn(i, "sel", "");
  5010. // } else {
  5011. // ds_main_narclist.setColumn(i, "sel", "1");
  5012. // }
  5013. // }
  5014. // } else {
  5015. // obj.setCellProperty("Head", 1, "text","");
  5016. // for( var i = 0; i < ds_main_narclist.rowcount; i++ ){
  5017. // ds_main_narclist.setColumn(i, "sel", "");
  5018. // }
  5019. // }
  5020. // }
  5021. // }
  5022. //
  5023. function switch1_case1_grd_narclist_onheadclick(obj:Grid, e:GridClickEventInfo)
  5024. {
  5025. obj.enableevent = false;
  5026. if(e.col == 1) fn_chkAll(obj);
  5027. obj.enableevent = true;
  5028. }
  5029. /******************************************************************
  5030. * Argument : fn_chkAll(obj)
  5031. * Description : head checkbox click event
  5032. ******************************************************************/
  5033. function fn_chkAll(obj){
  5034. if( obj.getCellProperty("Head", 1, "displaytype") == "checkbox"){
  5035. if( utlf_isNull(obj.getCellProperty("Head", 1, "text")) ){
  5036. obj.setCellProperty("Head", 1, "text","expr:1");
  5037. for( var i = 0; i < ds_main_narclist_narclist.rowcount; i++ ){
  5038. var narcstat = ds_main_narclist_narclist.getColumn(i, "narcstat");
  5039. if( narcstat == "1"){
  5040. ds_main_narclist_narclist.setColumn(i, "sel", "N");
  5041. } else {
  5042. ds_main_narclist_narclist.setColumn(i, "sel", "Y");
  5043. }
  5044. }
  5045. } else {
  5046. obj.setCellProperty("Head", 1, "text", "");
  5047. for( var i = 0; i < ds_main_narclist_narclist.rowcount; i++ ){
  5048. ds_main_narclist_narclist.setColumn(i, "sel", "N");
  5049. }
  5050. }
  5051. }
  5052. }
  5053. function switch1_case3_grd_outnarc_onheadclick(obj:Grid, e:GridClickEventInfo)
  5054. {
  5055. obj.enableevent = false;
  5056. if(e.col == 1) fn_chkAll(obj);
  5057. obj.enableevent = true;
  5058. }
  5059. function ds_temp_srchcond_narclist_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
  5060. {
  5061. if(e.columnid=="sel") {
  5062. obj.setColumn(e.row,e.columnid,(e.newvalue=="Y"||e.newvalue==1)?"Y":"N");
  5063. }
  5064. }
  5065. function Button00_onclick(obj:Button, e:ClickEventInfo)
  5066. {
  5067. //// 2018년 마약통합관리 정보 저장 데이타set copy 김치국
  5068. /////2018년 3월 마약통합관리 dataset copy 김치국
  5069. ds_sendnarcstoc.clear();
  5070. dsf_copyColInfo(ds_sendnarcstoc,ds_main_narclist_narclist);
  5071. for(var i = 0; i < ds_main_narclist_narclist.rowcount; i++) {
  5072. var sel = ds_main_narclist_narclist.getColumn(i, "sel"); // 선택여부
  5073. if(sel == "Y"){
  5074. var sPrcpcd = ds_main_narclist_narclist.getColumn(i, "prcpcd"); // 약품코드
  5075. ds_stocsend.setColumn(0,"drugcd" , sPrcpcd );
  5076. var oParam = {};
  5077. oParam.id = "TRADT12008";
  5078. oParam.service = "pharmacydrugsumapp.NarcManagent";
  5079. oParam.method = "reqGetNarcStocDataOk";
  5080. oParam.inds = "req=ds_stocsend";
  5081. oParam.outds = "ds_stocrece=stocdataok";
  5082. oParam.async = false;
  5083. tranf_submit(oParam);
  5084. var cOkFlag = ds_stocrece.getColumn(0, "dataokflag");
  5085. if (cOkFlag == 1 ) {
  5086. var dRow = ds_sendnarcstoc.addRow();
  5087. ds_sendnarcstoc.copyRow(dRow,ds_main_narclist_narclist,i);
  5088. dsf_makeValue(ds_sendnarcstoc,"stocdeptcd","string", ds_temp_srchinfo.getColumn(0, "stocdeptcd") );
  5089. ds_sendnarcstoc.setColumn(dRow,"stocdeptcd" , ds_temp_srchinfo.getColumn(0, "stocdeptcd") );
  5090. }
  5091. }
  5092. }
  5093. if ( ds_sendnarcstoc.rowcount > 0 ){
  5094. var objArg = new Object(); //ds_sendnarcstoc
  5095. objArg.arg_ds_sendnarcstoc = ds_sendnarcstoc;
  5096. objArg.arg_flag = "Spre";
  5097. frmf_modal("SMADT12003", "SMADT12003", objArg, null, null, null, null, null, null, null, null, null, "M");
  5098. }
  5099. //////
  5100. }
  5101. function Button02_onclick(obj:Button, e:ClickEventInfo)
  5102. {
  5103. //// 2018년 마약통합관리 정보 저장 데이타set copy 김치국
  5104. /////2018년 3월 마약통합관리 dataset copy 김치국
  5105. ds_sendnarcstoc.clear();
  5106. dsf_copyColInfo(ds_sendnarcstoc,ds_main_narclist_narclist);
  5107. for(var i = 0; i < ds_main_narclist_narclist.rowcount; i++) {
  5108. var sel = ds_main_narclist_narclist.getColumn(i, "sel"); // 선택여부
  5109. if(sel == "Y"){
  5110. var sPrcpcd = ds_main_narclist_narclist.getColumn(i, "prcpcd"); // 약품코드
  5111. ds_stocsend.setColumn(0,"drugcd" , sPrcpcd );
  5112. var oParam = {};
  5113. oParam.id = "TRADT12008";
  5114. oParam.service = "pharmacydrugsumapp.NarcManagent";
  5115. oParam.method = "reqGetNarcStocDataOk";
  5116. oParam.inds = "req=ds_stocsend";
  5117. oParam.outds = "ds_stocrece=stocdataok";
  5118. oParam.async = false;
  5119. tranf_submit(oParam);
  5120. var cOkFlag = ds_stocrece.getColumn(0, "dataokflag");
  5121. if (cOkFlag == 1 ) {
  5122. var dRow = ds_sendnarcstoc.addRow();
  5123. ds_sendnarcstoc.copyRow(dRow,ds_main_narclist_narclist,i);
  5124. dsf_makeValue(ds_sendnarcstoc,"stocdeptcd","string", ds_temp_srchinfo.getColumn(0, "stocdeptcd") );
  5125. ds_sendnarcstoc.setColumn(dRow,"stocdeptcd" , ds_temp_srchinfo.getColumn(0, "stocdeptcd") );
  5126. }
  5127. }
  5128. }
  5129. if ( ds_sendnarcstoc.rowcount > 0 ){
  5130. var objArg = new Object(); //ds_sendnarcstoc
  5131. objArg.arg_ds_sendnarcstoc = ds_sendnarcstoc;
  5132. objArg.arg_flag = "Prcp";
  5133. frmf_modal("SMADT12008", "SMADT12008", objArg, null, null, null, null, null, null, null, null, null, "M");
  5134. }
  5135. }
  5136. ]]></Script>
  5137. </Form>
  5138. </FDL>