1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726 |
- // =================================================================================================
- // - 2009.04.27 Creation JHP
- //==================================================================================================
- /* --------------------------------------------------------------------------------------------------
- Fucntion Name || Description
- -----------------------------------------------------------------------------------------------------
- 2009.07.23 JHP
- 심사화면 환자 메세지 여부확인: fGetPatMsgYn
- 환자기준 전송메세지작성 : fPatJudgPatMsgTrsm
- 처방기준 전송메세지작성 : fOrderJudgPatMsgTrsm
- 해당건 환자 전체 메세지 보기 : fJudgPatMsgTrsmRef
-
- 2009.08.13 JHP
- 처방사유조회 : fPrcpResnRef
- 환자번호 첫자리 문자인경우 환자번호로 인식 fChkPidWordNumber
- */
- // 수정이력 :
- // 20090811 수정추가 JHP, 변경요청 858 재원심사에서 계산처방 조회시 진료과는 전체로 넘겨야함. 하여 기존 것. 주석, 빈값 넘김으로 수정
- // 20090811 수정추가 JHP, 변경요청 858 재원심사에서 계산처방 조회시 진료과는 전체로 넘겨야함. 진료과별 의사를 보기때문에 의사도 일단 전체로 해놓음.
- // 20090817 수정추가 JHP, 수정요청 계산처방시행조회 화면 edicd 조회조건에 존재하기에 추가함. 없으면 singlenode 에러남.
- var VAL_today = getCurrentDate();
- var VAL_fromdd = VAL_today.toDate().getAddDate(-6,"M").getDateFormat("YYYYMM");
- var VAL_userid = getUserId();
- var VAL_usernm = getUserName();
- function fOpenSMPIS00500Detail() {
- model.makeValue("/root/hidden/smpis00500/cond/patunitsrch", model.getValue("/root/main/item1/iteminfo/pid"));
- model.makeValue("/root/hidden/smpis00500/cond/code", grd_ordlist.valueMatrix(grd_ordlist.row, grd_ordlist.colRef("snglcalcscorcd")));
- model.makeValue("/root/hidden/smpis00500/cond/datecond", "");
- model.makeValue("/root/hidden/smpis00500/cond/fromdd", model.getValue("/root/main/item1/iteminfo/indd1"));
- model.makeValue("/root/hidden/smpis00500/cond/todd", model.getValue("/root/main/item1/iteminfo/dschdd"));
- model.makeValue("/root/hidden/smpis00500/cond/ioflag", "I");
- model.makeValue("/root/hidden/smpis00500/cond/orddeptcd", "");
- model.makeValue("/root/hidden/smpis00500/cond/orddrid", "");
- model.makeValue("/root/hidden/smpis00500/cond/codecond", "");
- model.makeValue("/root/hidden/smpis00500/cond/judgrid", "");
- model.makeValue("/root/hidden/smpis00500/cond/cancer", "");
- model.makeValue("/root/hidden/smpis00500/cond/large", "");
- model.makeValue("/root/hidden/smpis00500/cond/middle", "");
- model.makeValue("/root/hidden/smpis00500/cond/small", "");
- model.makeValue("/root/hidden/smpis00500/cond/edicd", "");
- modal("SMPIS00500", "1", "10", "10", "SMPIS00500", "/root/hidden/smpis00500/cond", "/root/send", "", "");
- }
- function fOpenSMPIS00600Detail() {
- fOpenSMPIS00600Call("false");
- }
- function fOpenSMPIS00600Detail2() {
- fOpenSMPIS00600Call("true");
- }
- function fOpenSMPIS00600Call(cutonly) {
- model.makeValue("/root/hidden/smpis00600/cond/patunitsrch", model.getValue("/root/main/item1/iteminfo/pid"));
- model.makeValue("/root/hidden/smpis00600/cond/code", grd_ordlist.valueMatrix(grd_ordlist.row, grd_ordlist.colRef("snglcalcscorcd")));
- model.makeValue("/root/hidden/smpis00600/cond/clamym", "");
- model.makeValue("/root/hidden/smpis00600/cond/clamymfrom", VAL_fromdd);
- model.makeValue("/root/hidden/smpis00600/cond/clamdgfrom", "");
- model.makeValue("/root/hidden/smpis00600/cond/clamymto", VAL_today);
- model.makeValue("/root/hidden/smpis00600/cond/clamdgto", "");
- model.makeValue("/root/hidden/smpis00600/cond/clamflag", "");
- model.makeValue("/root/hidden/smpis00600/cond/ioflag", "I");
- model.makeValue("/root/hidden/smpis00600/cond/insukind", model.getValue("/root/main/item1/iteminfo/insukindcd"));
- model.makeValue("/root/hidden/smpis00600/cond/orddeptcd", model.getValue("/root/main/item1/iteminfo/orddeptcd"));
- model.makeValue("/root/hidden/smpis00600/cond/orddrid", model.getValue("/root/main/item1/iteminfo/medispclid"));
- model.makeValue("/root/hidden/smpis00600/cond/cutonly", cutonly);
- modal("SMPIS00600", "1", "10", "10", "SMPIS00600", "/root/hidden/smpis00600/cond", "/root/send", "", "");
- }
- //화면 open시(와 초기화 버튼 클릭시) 화면 초기화 기능을 수행한다.
- function fInitialize() {
- // 공통코드를 조회한다.
- zbcfGetCodeList(
- new Array("P0111","P0110","P0112","P0008","P0010","P0117","P0506","P0551"),
- new Array("/root/init/P0111list","/root/init/P0110list","/root/init/P0112list","/root/init/P0008list","/root/init/P0010list","/root/init/P0117list","/root/init/P0506list","/root/init/P0551list"), false );
-
- model.setValue("/root/send/listval/uuee/scrnid","SMPIJ00300");
-
- // 2013.02.19 - 부가코드 원무공통코드조회
- pamfGetCodeList(new Array(
- "PK029"
- ),
- new Array("/root/init/PAM/PK029list"
- ));
-
- if ( submit("TRPIJ00407",false) ) {
- var grd_name = model.getValue("/root/hidden/listval/uuee[compsnm='grd_ordlist']/compsnm");
- var refdata = model.getValue("/root/hidden/listval/uuee[compsnm='grd_ordlist']/compscnts");
- var sizedata = model.getValue("/root/hidden/listval/uuee[compsnm='grd_ordlist']/compssizecnts");
-
- var diag_grd_name = model.getValue("/root/hidden/listval/uuee[compsnm='grd_diaglist']/compsnm");
- var diag_refdata = model.getValue("/root/hidden/listval/uuee[compsnm='grd_diaglist']/compscnts");
- var diag_sizedata = model.getValue("/root/hidden/listval/uuee[compsnm='grd_diaglist']/compssizecnts");
-
- if (grd_name != "") {
- setOrderInfoOfCol("grd_ordlist",refdata,sizedata);
- }
-
- if (diag_grd_name != "") {
- setOrderInfoOfCol("grd_diaglist",diag_refdata,diag_sizedata);
- }
- }
-
- // model.refresh(); - 불필요해서 제거 - 20080731 박창원
-
- fSetRdoReset();
-
- btn_clspcd.selected = true;
- // 20091109 JHP 심사메모버튼으로 변경시 case도 심사메모에 해당하는 것으로 변경해야함.
- model.toggle("case_spclspec");
-
- model.setValue("/root/send/totalsumflag", "Y");
- model.setValue("/root/send/unitflag", "-");
-
- btn_attData.attribute("class") = "btn2_letter4";
- var indd = model.getValue("/root/main/item1/iteminfo/indd");
- model.setValue("/root/send/indd",indd);
-
- model.setValue("/root/send/curdd",VAL_today);
-
- submit("TRPIJ00305",false);
- // 코딩을 위하여 임사로 모든 권한을 준다.
- //model.setValue("/root/hidden/properties/auth", "11100000");
-
- // (common.js) 현재 로그인한 사용자 번호(ID)
- model.makevalue("/root/hidden/userid",VAL_userid);
- model.makevalue("/root/hidden/usernm",VAL_usernm);
-
- }
- /* 대상자조회에서 대상자 선택하여 넘어올때 메세지 여부 확인, JHP. 2009.07.23 */
- function fGetPatMsgYn(){
- var cnt = getNodesetCount("/root/main/msglist/list");
- if(cnt > 0){
- img_msg.visible = true;
- }else{
- img_msg.visible = false;
- }
- }
- /* 환자기준 전송메세지작성, JHP. 2009.07.16 */
- function fPatJudgPatMsgTrsm() {
- if (!isNull(model.getvalue("/root/main/item1/iteminfo/pid"))) {
- fMsgTrsmMakeNode("P");
- } else {
- messageBox("기본정보가 ", "I004");
- }
- model.refresh();
- modal("SPPIZ01900_심사환자메세지작성", "", "400", "300", "", "/root/tmp/msgtrsm/info", "/root/main/patinfo");
- model.removenode("/root/tmp/msgtrsm");
- }
- /* 처방기준 전송메세지작성, JHP. 2009.07.16 */
- function fOrderJudgPatMsgTrsm() {
- if (!isNull(model.getvalue("/root/main/item1/iteminfo/pid"))) {
-
- if(grd_ordlist.row <= 0){
- return;
- }
- fMsgTrsmMakeNode("O");
- } else {
- messageBox("기본정보가 ", "I004");
- }
- model.refresh();
- modal("SPPIZ01900_심사환자메세지작성", "", "400", "300", "", "/root/tmp/msgtrsm/info", "/root/main/patinfo");
- model.removenode("/root/tmp/msgtrsm");
- }
- function fMsgTrsmMakeNode(kindflag) {
-
- // 인스턴스생성
- model.makeValue("/root/tmp/msgtrsm/info/instcd", "");
- model.makeValue("/root/tmp/msgtrsm/info/msgwrtedd", VAL_today);
- model.makeValue("/root/tmp/msgtrsm/info/msgwrteno", "");
- model.makeValue("/root/tmp/msgtrsm/info/msgwrtehistno", "");
- model.makeValue("/root/tmp/msgtrsm/info/histstat", "Y");
- model.makeValue("/root/tmp/msgtrsm/info/pid", model.getValue("/root/main/item1/iteminfo/pid"));
- model.makeValue("/root/tmp/msgtrsm/info/orddd", model.getValue("/root/main/item1/iteminfo/indd1"));
- model.makeValue("/root/tmp/msgtrsm/info/cretno", model.getValue("/root/main/item1/iteminfo/cretno"));
- model.makeValue("/root/tmp/msgtrsm/info/mskind", model.getValue("/root/main/item1/iteminfo/mskind"));
- model.makeValue("/root/tmp/msgtrsm/info/orddeptcd", model.getValue("/root/main/item1/iteminfo/orddeptcd"));
- model.makeValue("/root/tmp/msgtrsm/info/orddrid", model.getValue("/root/main/item1/iteminfo/medispclid"));
- model.makeValue("/root/tmp/msgtrsm/info/orddrnm", model.getValue("/root/main/item1/iteminfo/medispclnm"));
- model.makeValue("/root/tmp/msgtrsm/info/ordtype", "I");
- model.makeValue("/root/tmp/msgtrsm/info/ordqty", 0);
- model.makeValue("/root/tmp/msgtrsm/info/ordtims", 0);
- model.makeValue("/root/tmp/msgtrsm/info/orddays", 0);
- model.makeValue("/root/tmp/msgtrsm/info/rgstrid", "-");
- model.makeValue("/root/tmp/msgtrsm/info/rgstdd", "-");
- model.makeValue("/root/tmp/msgtrsm/info/rgsttm", "-");
- model.makeValue("/root/tmp/msgtrsm/info/sendphone", "");
- model.makeValue("/root/tmp/msgtrsm/info/anybodyyn", "N");
- model.makeValue("/root/tmp/msgtrsm/info/sendflag", "O");
- model.makeValue("/root/tmp/msgtrsm/info/senddate", "");
- model.makeValue("/root/tmp/msgtrsm/info/sendid", VAL_userid);
- model.makeValue("/root/tmp/msgtrsm/info/deliveid", "-");
- model.makeValue("/root/tmp/msgtrsm/info/recvdate", "");
- model.makeValue("/root/tmp/msgtrsm/info/recvid", "");
- model.makeValue("/root/tmp/msgtrsm/info/recvcnfmyn", "N");
- model.makeValue("/root/tmp/msgtrsm/info/recvcnfmid", VAL_userid);
- model.makeValue("/root/tmp/msgtrsm/info/sendmsg", "");
- model.makeValue("/root/tmp/msgtrsm/info/recvmsg", "");
- model.makeValue("/root/tmp/msgtrsm/info/fstrgstrid", "");
- model.makeValue("/root/tmp/msgtrsm/info/fstrgstdt", "");
- model.makeValue("/root/tmp/msgtrsm/info/lastupdtrid", "");
- model.makeValue("/root/tmp/msgtrsm/info/lastupdtdt", "");
-
- if (kindflag == "P") {
- model.makeValue("/root/tmp/msgtrsm/info/kindflag", kindflag);
- model.makeValue("/root/tmp/msgtrsm/info/grupcalcscorcd", "-");
- model.makeValue("/root/tmp/msgtrsm/info/snglcalcscorcd", "-");
- model.makeValue("/root/tmp/msgtrsm/info/prcpdd", "-");
- model.makeValue("/root/tmp/msgtrsm/info/prcpno", 0);
- model.makeValue("/root/tmp/msgtrsm/info/prcppayflag", "-");
- } else if (kindflag == "O") {
- model.makeValue("/root/tmp/msgtrsm/info/kindflag", kindflag); // 처방기준 'O', chk
- model.makeValue("/root/tmp/msgtrsm/info/grupcalcscorcd", grd_ordlist.valueMatrix(grd_ordlist.row, grd_ordlist.colRef("grupcalcscorcd"))); //chk
- model.makeValue("/root/tmp/msgtrsm/info/snglcalcscorcd", grd_ordlist.valueMatrix(grd_ordlist.row, grd_ordlist.colRef("snglcalcscorcd")));; //chk
- model.makeValue("/root/tmp/msgtrsm/info/prcpdd", ""); // 서버단에서 조회하여 가져와야함. chk(입원만)
- model.makeValue("/root/tmp/msgtrsm/info/prcpno", ""); // 서버단에서 조회하여 가져와야함. chk(입원만)
- model.makeValue("/root/tmp/msgtrsm/info/prcppayflag", ""); // 서버단에서 조회하여 가져와야함. chk (입원만)
- }
-
- }
- // 환자 전체 메세지 내용 조회하여 하나씩 보기.
- function fJudgPatMsgTrsmRef(){
- model.makeValue("/root/tmp/msgtrsm/info/refyn", "Y");
- model.makeValue("/root/tmp/msgtrsm/info/pid", model.getValue("/root/main/item1/iteminfo/pid"));
- model.makeValue("/root/tmp/msgtrsm/info/orddd", model.getValue("/root/main/item1/iteminfo/indd1"));
- model.makeValue("/root/tmp/msgtrsm/info/cretno", model.getValue("/root/main/item1/iteminfo/cretno"));
- model.makeValue("/root/tmp/msgtrsm/info/mskind", model.getValue("/root/main/item1/iteminfo/mskind"));
- model.makeValue("/root/tmp/msgtrsm/info/orddeptcd", model.getValue("/root/main/item1/iteminfo/orddeptcd"));
- model.makeValue("/root/tmp/msgtrsm/info/orddrid", model.getValue("/root/main/item1/iteminfo/medispclid"));
- model.makeValue("/root/tmp/msgtrsm/info/ordtype", "I");
-
- modal("SMPIJ02600_메세지현황", "", "100", "100", "", "/root/tmp/msgtrsm/info", "/root/init/openchk");
- model.removeNode("/root/tmp/msgtrsm");
- }
- // 처방사유조회
- // history.. 진료에 있는화면 기본조건으로 팝업사용..YS(윤샘)요청
- function fPrcpResnRef(){
- // 세션값 받기
- model.makeValue("/root/tmp/prcpresnref/info/pid", model.getValue("/root/main/item1/iteminfo/pid")); // 등록번호
- model.makeValue("/root/tmp/prcpresnref/info/fromdd", model.getValue("/root/main/item1/iteminfo/indd1")); // 처방시작일 default indd
- model.makeValue("/root/tmp/prcpresnref/info/todd", model.getValue("/root/main/item1/iteminfo/dschdd")); // 처방종료일 default dschdd
- model.makeValue("/root/tmp/prcpresnref/info/orddeptcd", "-"); // 진료과 : 주진료과
- model.makeValue("/root/tmp/prcpresnref/info/orddrid", "-"); // 주치의 : default "-"
- model.makeValue("/root/tmp/prcpresnref/info/mainjudgid", "-"); // 심사자 : 현재심사자
- model.makeValue("/root/tmp/prcpresnref/info/prcpcd", grd_ordlist.valueMatrix(grd_ordlist.row, grd_ordlist.colRef("grupcalcscorcd"))); // 수가코드 : 그룹코드
- model.makeValue("/root/tmp/prcpresnref/info/insukind", model.getValue("/root/main/item1/iteminfo/insukindcd")); // 보험유형 : 환자보험유형
- model.makeValue("/root/tmp/prcpresnref/info/ioflag", "I"); // 내원유형 : default "-"
- model.makeValue("/root/tmp/prcpresnref/info/resncd", "FF"); // 사유구분 : default "FF" 중복처방
- model.makeValue("/root/tmp/prcpresnref/info/popup", "judg"); // 팝업사용처구분 : judg(심사)
-
- modal("SPMMO19000_중복처방사유조회", "", "400", "300", "", "/root/tmp/prcpresnref/info", "/root/tmp/prcpresnref/info");
- model.removeNode("/root/tmp/prcpresnref");
-
- }
- // 환자번호 문자 숫자 여부 판단. (isNaN 숫자가아닐경우 true, isFinite 숫자일경우 true)
- // 성가환자번호중 첫글자가 문자인경우가 있어서 판단함.
- // 현재 재원메인은 적용안함. 대상자조회만 따로 화면에 적용함.
- function fChkPidWordNumber(pid)
- {
- if( typeof( this ) == "undefined" ) return false;
- if( this.length == 0 ) return false;
- var thisSting = pid.toString();
- var firstpid = "";
-
- for( var i=0; i < thisSting.length; i++ ){
- var thisNumber = thisSting.substring( i, i+1 );
- // 숫자가 아니면
- if( isNaN( thisNumber ) ) firstpid = firstpid + 'W';
- // 숫자면
- if( isNaN( thisNumber ) == false ) firstpid = firstpid + 'N';
- // 공백이면 FALSE 리턴
- if( " " == thisNumber ) firstpid = firstpid + 'L';
- }
-
- var firstpidYN = firstpid.substring( 0, 2 );
-
- // 첫번째 두번째 글자 여부
- // 문자숫자, 숫자숫자 : pid로 판단 : true
- // 문자문자, 숫자문자 : 글자로 판단 : false
- // 그외 : 글자로 판단 : false
- if ( firstpidYN == "WN"){ return true}
- else if ( firstpidYN == "NN"){ return true}
- else if ( firstpidYN == "WW"){ return false}
- else if ( firstpidYN == "NW"){ return false}
- else { return false }
- }
- //선택된환자 주,부유형에 따른 보험정보 리스트를 갖고 온다. (pmihiphs)
- function fGetInsulist(){
- //색상 초기화
- opt_patientinfo.attribute("background-color") = "transparent";
- cmb_itemraremsg.attribute("background-color") = "transparent";
-
- // 기존 Open 되어 있는 윈도우 중 대상자 조회화면을 제외한 모든 창을 닫는다.
- var judgOpenWindow = getChildWindow("SPPMC02500"); // SPPMC02500_대상자 조회.xrw
- var childCnt = window.children.length;
- childCnt = eval(childCnt) + 1;
-
- for( var i = childCnt; i > 1; i-- ) {
- var child = window.children.item(i-1);
- if (judgOpenWindow != child) {
- window.children.item(i-1).close();
- }
- }
-
- model.removeNodeset("/root/main/list1");
- model.resetInstanceNode("/root/hidden/sppiz00300/cond");
- model.resetInstanceNode("/root/hidden/sppiz00300/rslt");
- model.resetInstanceNode("/root/hidden/smpiz00100/cond");
- model.resetInstanceNode("/root/hidden/smpiz00100/rslt");
- model.setValue("/root/send/indd1", model.getValue("/root/main/item1/iteminfo/indd1"));
- model.setValue("/root/send/curdd",VAL_today);
- submit("TRPIJ00309",false);
- }
- //대상자 조회에서 선택된환자의 보험정보 리스트를 조회 한 후 최종것을 선택 하여 환자 정보를 자동 조회 환다.
- function fSelectInsulist(getinsukind, getmskind, getflag){
- var nodecnt = getNodesetCount("/root/main/list1/insulist");
- if (nodecnt == 0) { // 보험내역이 없는겨우
- return;
- }
-
- var mskind = "";
- var fromdd = "";
- var todd = "";
- var insukind = "";
- var suppkind = "";
- var cretno = "";
- var seqno = "";
- var row = 0;
- // 대상자 조회에서 선택된 내용이 조회되도록 수정 - 박창원
- // 유형이 같은 데이타 중 마지막 데이타 선택
- var personflag = model.getValue("/root/send/personflag");
- if (personflag != "9") {
- //주석 처리함. 2007.08.22 박도형
- //위의 로직 수정. 시작일자가 최종일자로 데이터 가져옴 plet2.
- var maxfromdd = model.getXPathValue("max(/root/main/list1/insulist[mskind='"+getmskind+"']/fromdd)");
- mskind = model.getValue("/root/main/list1/insulist[mskind='"+getmskind+"' and fromdd='"+maxfromdd+"']/mskind");
- fromdd = model.getValue("/root/main/list1/insulist[mskind='"+getmskind+"' and fromdd='"+maxfromdd+"']/fromdd");
- todd = model.getValue("/root/main/list1/insulist[mskind='"+getmskind+"' and fromdd='"+maxfromdd+"']/todd");
- insukind = model.getValue("/root/main/list1/insulist[mskind='"+getmskind+"' and fromdd='"+maxfromdd+"']/insukind");
- suppkind = model.getValue("/root/main/list1/insulist[mskind='"+getmskind+"' and fromdd='"+maxfromdd+"']/suppkind");
- cretno = model.getValue("/root/main/list1/insulist[mskind='"+getmskind+"' and fromdd='"+maxfromdd+"']/cretno");
- seqno = model.getValue("/root/main/list1/insulist[mskind='"+getmskind+"' and fromdd='"+maxfromdd+"']/seqno");
-
- model.setValue("/root/send/mskind",mskind);
- model.setValue("/root/send/fromdd",fromdd);
- model.setValue("/root/send/todd",todd);
- model.setValue("/root/send/ordfromdd",fromdd);
- model.setValue("/root/send/ordtodd",todd);
- model.setValue("/root/send/insukind",insukind);
- model.setValue("/root/send/suppkind",suppkind);
- model.setValue("/root/send/cretno",cretno);
- model.setValue("/root/send/seqno",seqno);
- }
- // 검색조건 초기화
- model.setValue("/root/hidden/list1/isclcond/matractflag","");
- model.setValue("/root/hidden/list1/isclcond/calcpayflag","");
- model.setValue("/root/hidden/list1/isclcond/snglcalcscorcls","");
- model.setValue("/root/hidden/list1/isclcond/cpflag","");
- model.setValue("/root/hidden/list1/isclcond/edicd","");
- model.setValue("/root/hidden/list1/isclcond/snglcalcscorcd","");
- model.setValue("/root/hidden/list1/isclcond/actingflag","");
- grd_ordlist.attribute("nodeset") = "/root/main/list2/iscllist";
- fGetItemInfo(getflag);
-
- }
- // 처방 Grid 마우스 오른쪽 "처방주석입력"
- function fOrderGridInsertCmt() {
- var rdounitflag = model.getValue("/root/send/unitflag");
- var pid = model.getValue("/root/main/item1/iteminfo/pid");
- var indd = model.getValue("/root/main/item1/iteminfo/indd1");
- var rows = grd_clcjlist.rows;
-
- if (rdounitflag == "M") {
- // 줄단위로 셋팅하고 처리
- model.setValue(rdo_unitflag.attribute("ref"), "J");
- grd_clcjlist.attribute("nodeset") = "/root/main/list4/clcjlist[unitflag = 'J']";
- grd_clcjlist.rebuild();
- // 단위에 에 따라 해당 행있는 특정코드 콤보 재설정
- for (var i=1; i< rows; i++) {
- var unitflag = grd_clcjlist.valueMatrix(i, grd_clcjlist.colRef("unitflag"));
- var status = grd_clcjlist.valueMatrix(i, grd_clcjlist.colRef("status"));
-
- if (status != "") {
- grd_clcjlist.rowStatus(i) = status;
- }
- if (unitflag == "M") {
- grd_clcjlist.cellComboNodeset(i,3) = "/root/init/P0117list/P0117[minval = 'M'' and cdid != 'MX999']";
- } else if (unitflag == "J") {
- grd_clcjlist.cellComboNodeset(i,3) = "/root/init/P0117list/P0117[minval = 'J']";
- }
- }
- }
-
- model.removenode("/root/hidden/sppij00500/rslt"); // SPPIJ00500_특정내역상세관리 에서 선택된 결과가 copyNode되는 경로임
- model.removenode("/root/hidden/sppij00500/cond");
- for (var k=0; k < grd_ordlist.selectedRows; k++ ) {
- var row = grd_ordlist.selectedRow(k);
- var edicd = grd_ordlist.valueMatrix(row, grd_ordlist.colref("edicd"));
- var calcscorcd = grd_ordlist.valueMatrix(row, grd_ordlist.colref("snglcalcscorcd"));
-
- if (edicd) {
- } else {
- messageBox("EDI코드가 없는 경우 해당 줄단위 특정내역이", "I004"); ///EDI코드가 없는 경우 해당 줄단위 특정내역이 없습니다.
- return;
- }
- }
-
- var rowcnt = 1;
- var setrow = 0;
- for (var k=0; k < grd_ordlist.selectedRows; k++ ) {
- var row = grd_ordlist.selectedRow(k);
- var edicd = grd_ordlist.valueMatrix(row, grd_ordlist.colref("edicd"));
- var calcscorcd = grd_ordlist.valueMatrix(row, grd_ordlist.colref("snglcalcscorcd"));
-
- if (rows == 1) {
- model.makevalue("/root/hidden/sppij00500/cond/pid", pid);
- model.makevalue("/root/hidden/sppij00500/cond/indd", indd);
- model.makevalue("/root/hidden/sppij00500/cond/edicd", edicd);
- model.makevalue("/root/hidden/sppij00500/cond/unitflag","J");
- model.makevalue("/root/hidden/sppij00500/cond/flag", "I");
- model.makevalue("/root/hidden/sppij00500/cond/spclcd", "JX999");
- model.makevalue("/root/hidden/sppij00500/cond/spclcdnm", "");
- model.makevalue("/root/hidden/sppij00500/cond/detldesc", "특정내역의 구분코드가 없는 경우에는 기타 줄번호(확장 번호)단위의 기타내역에 기재");
- model.makevalue("/root/hidden/sppij00500/cond/spclspec", "");
- model.makevalue("/root/hidden/sppij00500/cond/remfact","X(700)");
- model.makevalue("/root/hidden/sppij00500/cond/rownum", "");
- model.makevalue("/root/hidden/sppij00500/cond/calcscorcd", calcscorcd);
- } else if (getNodesetCount(grd_clcjlist.nodeset+"[calcscorcd='"+calcscorcd+"']") == 0) {
-
- model.makevalue("/root/hidden/sppij00500/cond/pid", pid);
- model.makevalue("/root/hidden/sppij00500/cond/indd", indd);
- model.makevalue("/root/hidden/sppij00500/cond/edicd", edicd);
- model.makevalue("/root/hidden/sppij00500/cond/unitflag","J");
- model.makevalue("/root/hidden/sppij00500/cond/flag", "I");
- model.makevalue("/root/hidden/sppij00500/cond/spclcd", "JX999");
- model.makevalue("/root/hidden/sppij00500/cond/spclcdnm", "");
- model.makevalue("/root/hidden/sppij00500/cond/detldesc", "특정내역의 구분코드가 없는 경우에는 기타 줄번호(확장 번호)단위의 기타내역에 기재");
- model.makevalue("/root/hidden/sppij00500/cond/spclspec", "");
- model.makevalue("/root/hidden/sppij00500/cond/remfact","X(700)");
- model.makevalue("/root/hidden/sppij00500/cond/rownum", "");
- model.makevalue("/root/hidden/sppij00500/cond/calcscorcd", calcscorcd);
-
- model.makevalue("/root/hidden/sppij00500/cond/list["+ rowcnt +"]/pid", pid);
- model.makevalue("/root/hidden/sppij00500/cond/list["+ rowcnt +"]/indd", indd);
- model.makevalue("/root/hidden/sppij00500/cond/list["+ rowcnt +"]/edicd", edicd);
- model.makevalue("/root/hidden/sppij00500/cond/list["+ rowcnt +"]/unitflag","J");
- model.makevalue("/root/hidden/sppij00500/cond/list["+ rowcnt +"]/flag", "I");
- model.makevalue("/root/hidden/sppij00500/cond/list["+ rowcnt +"]/spclcd", "JX999");
- model.makevalue("/root/hidden/sppij00500/cond/list["+ rowcnt +"]/spclcdnm", "");
- model.makevalue("/root/hidden/sppij00500/cond/list["+ rowcnt +"]/detldesc", "특정내역의 구분코드가 없는 경우에는 기타 줄번호(확장 번호)단위의 기타내역에 기재");
- model.makevalue("/root/hidden/sppij00500/cond/list["+ rowcnt +"]/spclspec", "");
- model.makevalue("/root/hidden/sppij00500/cond/list["+ rowcnt +"]/remfact","X(700)");
- model.makevalue("/root/hidden/sppij00500/cond/list["+ rowcnt +"]/rownum", "");
- model.makevalue("/root/hidden/sppij00500/cond/list["+ rowcnt +"]/calcscorcd", calcscorcd);
-
- rowcnt = rowcnt+1;
- } else {
- for (var i=1; i<rows; i++) {
- var clcjedicd = grd_clcjlist.valueMatrix( i,grd_clcjlist.colRef("edicd"));
- var spclcd = grd_clcjlist.valueMatrix( i,grd_clcjlist.colRef("spclcd"));
-
- if ( edicd == clcjedicd) {
- model.makevalue("/root/hidden/sppij00500/cond/pid", pid);
- model.makevalue("/root/hidden/sppij00500/cond/indd", indd);
- model.makevalue("/root/hidden/sppij00500/cond/list["+ rowcnt +"]/flag", "U");
- model.makevalue("/root/hidden/sppij00500/cond/list["+ rowcnt +"]/edicd", grd_clcjlist.valueMatrix( i,grd_clcjlist.colRef("edicd")));
- model.makevalue("/root/hidden/sppij00500/cond/list["+ rowcnt +"]/detldesc", grd_clcjlist.valueMatrix( i,grd_clcjlist.colRef("detldesc")));
- model.makevalue("/root/hidden/sppij00500/cond/list["+ rowcnt +"]/spclcd", grd_clcjlist.valueMatrix( i,grd_clcjlist.colRef("spclcd")));
- model.makevalue("/root/hidden/sppij00500/cond/list["+ rowcnt +"]/spclcdnm", "");
- model.makevalue("/root/hidden/sppij00500/cond/list["+ rowcnt +"]/spclspec", grd_clcjlist.valueMatrix( i,grd_clcjlist.colRef("spclspec")));
- model.makevalue("/root/hidden/sppij00500/cond/list["+ rowcnt +"]/remfact", grd_clcjlist.valueMatrix( i,grd_clcjlist.colRef("remfact")));
- model.makevalue("/root/hidden/sppij00500/cond/list["+ rowcnt +"]/rownum", i);
- model.makevalue("/root/hidden/sppij00500/cond/list["+ rowcnt +"]/unitflag","J")
- model.makevalue("/root/hidden/sppij00500/cond/list["+ rowcnt +"]/oldspclcd", grd_clcjlist.valueMatrix( i,grd_clcjlist.colRef("spclcd")));
- model.makevalue("/root/hidden/sppij00500/cond/list["+ rowcnt +"]/oldspclspec", grd_clcjlist.valueMatrix( i,grd_clcjlist.colRef("spclspec")));
- model.makevalue("/root/hidden/sppij00500/cond/list["+ rowcnt +"]/calcscorcd", grd_clcjlist.valueMatrix( i,grd_clcjlist.colRef("calcscorcd")));
-
- rowcnt = rowcnt+1;
-
- // 특정내역 상세 화면에 보여줄 특정내역 선택
- setrow = i;
-
- }
-
- model.makevalue("/root/hidden/sppij00500/cond/edicd", edicd);
- model.makevalue("/root/hidden/sppij00500/cond/unitflag","J");
-
- if ( model.getValue("/root/main/list4/clcjlist["+ setrow +"]/spclcd") == "JX999" ) {
- model.makevalue("/root/hidden/sppij00500/cond/pid", pid);
- model.makevalue("/root/hidden/sppij00500/cond/indd", indd);
- model.makevalue("/root/hidden/sppij00500/cond/flag", "U");
- model.makevalue("/root/hidden/sppij00500/cond/spclcd", grd_clcjlist.valueMatrix(setrow,grd_clcjlist.colRef("spclcd")));
- model.makevalue("/root/hidden/sppij00500/cond/spclcdnm", "");
- model.makevalue("/root/hidden/sppij00500/cond/detldesc", grd_clcjlist.valueMatrix(setrow,grd_clcjlist.colRef("detldesc")));
- model.makevalue("/root/hidden/sppij00500/cond/spclspec", grd_clcjlist.valueMatrix(setrow,grd_clcjlist.colRef("spclspec")));
- model.makevalue("/root/hidden/sppij00500/cond/remfact", grd_clcjlist.valueMatrix(setrow,grd_clcjlist.colRef("remfact")));
- model.makevalue("/root/hidden/sppij00500/cond/rownum", setrow);
- model.makevalue("/root/hidden/sppij00500/cond/calcscorcd", grd_clcjlist.valueMatrix(setrow,grd_clcjlist.colRef("calcscorcd")));
-
- } else {
- model.makevalue("/root/hidden/sppij00500/cond/pid", pid);
- model.makevalue("/root/hidden/sppij00500/cond/indd", indd);
- model.makevalue("/root/hidden/sppij00500/cond/flag", "I");
- model.makevalue("/root/hidden/sppij00500/cond/spclcd", "JX999");
- model.makevalue("/root/hidden/sppij00500/cond/spclcdnm", "");
- model.makevalue("/root/hidden/sppij00500/cond/detldesc", "특정내역의 구분코드가 없는 경우에는 기타 줄번호(확장 번호)단위의 기타내역에 기재");
- model.makevalue("/root/hidden/sppij00500/cond/spclspec", "");
- model.makevalue("/root/hidden/sppij00500/cond/remfact","X(700)");
- model.makevalue("/root/hidden/sppij00500/cond/rownum", "");
- model.makevalue("/root/hidden/sppij00500/cond/calcscorcd", calcscorcd);
- }
-
- }
-
- }
- }
-
- model.removenode("/root/hidden/sppij00500/rslt");
- modal("SPPIJ00500" ,"", "10", "10", "SPPIJ00500", "/root/hidden/sppij00500", "/root/hidden/clcj", "", ""); // SPPIJ00500_특정내역상세관리.xrw
- var rsltcnt = getNodesetCount("/root/hidden/sppij00500/rslt/list");
-
- // 처리 건수
- if (rsltcnt > 0) {
-
- for(var i=rsltcnt; i>0; i--) {
-
- var flag = model.getValue("/root/hidden/sppij00500/rslt/list["+ i +"]/flag");
- var rownum = model.getValue("/root/hidden/sppij00500/rslt/list["+ i +"]/rownum");
- var edicd = model.getValue("/root/hidden/sppij00500/rslt/list["+ i +"]/edicd");
- var newspclcd = model.getValue("/root/hidden/sppij00500/rslt/list["+ i +"]/spclcd");
- var newspclcdnm = model.getValue("/root/hidden/sppij00500/rslt/list["+ i +"]/spclcdnm");
- var newspclspec = model.getValue("/root/hidden/sppij00500/rslt/list["+ i +"]/spclspec");
- var newremfact = model.getValue("/root/hidden/sppij00500/rslt/list["+ i +"]/remfact ");
- var newdetldesc = model.getValue("/root/hidden/sppij00500/rslt/list["+ i +"]/detldesc");
- var newdcalcscorcd = model.getValue("/root/hidden/sppij00500/rslt/list["+ i +"]/calcscorcd");
- var oldspclcd = model.getValue("/root/hidden/sppij00500/rslt/list["+ i +"]/oldspclcd");
- var oldspclspec = model.getValue("/root/hidden/sppij00500/rslt/list["+ i +"]/oldspclspec");
-
- // 특정코드 추가인 경우
- if (flag == "I") {
- var clcjrow = grd_clcjlist.rows - 1; // 특정내역 Grid 가장 마지막 줄에 추가한다.
- grd_clcjlist.insertRow(clcjrow++, true,false,false);
-
- grd_clcjlist.valueMatrix(clcjrow, grd_clcjlist.colRef("pid")) = model.getValue("/root/send/pid");
- grd_clcjlist.valueMatrix(clcjrow, grd_clcjlist.colRef("indd")) = model.getValue("/root/send/indd");
- grd_clcjlist.valueMatrix(clcjrow, grd_clcjlist.colRef("cretno")) = model.getValue("/root/send/cretno");
- grd_clcjlist.valueMatrix(clcjrow, grd_clcjlist.colRef("fromdd")) = model.getValue("/root/send/fromdd");
- grd_clcjlist.valueMatrix(clcjrow, grd_clcjlist.colRef("mskind")) = model.getValue("/root/send/mskind");
- grd_clcjlist.valueMatrix(clcjrow, grd_clcjlist.colRef("unitflag")) = "J";
- grd_clcjlist.valueMatrix(clcjrow, grd_clcjlist.colRef("edicd")) = edicd;
- grd_clcjlist.valueMatrix(clcjrow, grd_clcjlist.colRef("spclcd")) = newspclcd;
- //grd_clcjlist.valueMatrix(clcjrow, grd_clcjlist.colRef("spclcdnm")) = newspclcdnm;
- grd_clcjlist.valueMatrix(clcjrow, grd_clcjlist.colRef("spclspec")) = newspclspec;
- grd_clcjlist.valueMatrix(clcjrow, grd_clcjlist.colRef("remfact")) = newremfact;
- grd_clcjlist.valueMatrix(clcjrow, grd_clcjlist.colRef("detldesc")) = newdetldesc;
- grd_clcjlist.valueMatrix(clcjrow, grd_clcjlist.colRef("calcscorcd")) = newdcalcscorcd
- grd_clcjlist.valueMatrix(clcjrow, grd_clcjlist.colRef("spclmemoflag")) = "E";
- grd_clcjlist.valueMatrix(clcjrow, grd_clcjlist.colRef("status")) = "3";
-
- // 처방Grid에서도 해당 줄단위 특정내역의 'T' 컬럼의 "*" 를 표시한다.
- var rowcnt = getNodesetCount("/root/main/list2/iscllist"); // 필터
- rowcnt = eval(rowcnt) + 1;
- for (var j = 1; j < rowcnt; j++) {
- //for (var j = 1; j < grd_ordlist.rows; j++) {
- var clcjedicd = model.getValue("/root/main/list2/iscllist["+ j +"]/edicd");
- if (edicd == clcjedicd) {
- model.setValue("/root/main/list2/iscllist["+ j +"]/text", "*");
- //model.refresh(); 최적화 문제로 변경 - 20080731 박창원
- //model.refreshpart("/root/main/list2/iscllist/text");
- }
- }
-
- // 특정코드 변경인 경우
- } else if (flag == "U") {
-
- grd_clcjlist.valueMatrix(rownum, grd_clcjlist.colRef("spclcd")) = newspclcd;
- //grd_clcjlist.valueMatrix(rownum, grd_clcjlist.colRef("spclcdnm")) = newspclcdnm;
- grd_clcjlist.valueMatrix(rownum, grd_clcjlist.colRef("spclspec")) = newspclspec;
- grd_clcjlist.valueMatrix(rownum, grd_clcjlist.colRef("remfact")) = newremfact;
- grd_clcjlist.valueMatrix(rownum, grd_clcjlist.colRef("detldesc")) = newdetldesc;
- grd_clcjlist.valueMatrix(rownum, grd_clcjlist.colRef("calcscorcd")) = newdcalcscorcd;
- if ( grd_clcjlist.valueMatrix(rownum, grd_clcjlist.colRef("status")) != "3") {
- grd_clcjlist.valueMatrix(rownum, grd_clcjlist.colRef("status")) = "0";
- }
-
- //model.refresh(); 최적화 문제로 변경 - 20080731 박창원
- model.refreshpart("/root/main/list4/clcjlist");
- // 특정코드, 특정내역이 변경되었거나 삭제된 특정코드를 조회하여 "확인"을 선택한 경우
- if (oldspclcd != newspclcd || oldspclspec != newspclspec || grd_clcjlist.rowstatus(row) == 4) {
- var rowstatus = grd_clcjlist.rowstatus(rownum);
- if (rowstatus == 1 || rowstatus == 3) { // 1 : insert, 3 : insert & new
- } else {
- grd_clcjlist.rowstatus(rownum) = 2; // 2 : update 상태로 stat를 변경한다.
- grd_clcjlist.valueMatrix(rownum, grd_clcjlist.colRef("status")) = "2";
- }
- }
-
- // 처방Grid에서도 해당 줄단위 특정내역의 'T' 컬럼의 "*" 를 표시한다.
- var rowcnt = getNodesetCount("/root/main/list2/iscllist"); // 필터
- rowcnt = eval(rowcnt) + 1;
- for (var j = 1; j < rowcnt; j++) {
- //for (var j = 1; j < grd_ordlist.rows; j++) {
- var clcjedicd = model.getValue("/root/main/list2/iscllist["+ j +"]/edicd");
- if (edicd == clcjedicd) {
- model.setValue("/root/main/list2/iscllist["+ j +"]/text", "*");
- //model.refresh(); 최적화 문제로 변경 - 20080731 박창원
- model.refreshpart("/root/main/list2/iscllist/text");
- }
- }
- model.setValue("/root/hidden/item1/message", "특정코드 - "+ newspclcd +" / 특정내역 : "+ newspclspec +" / 기재형식 : "+ newremfact);
- model.refreshpart("/root/hidden/item1/message");
-
- // 특정코드 삭제인 경우
- } else if (flag == "D" && rownum != "" ) {
-
- var cnt = 0;
-
- for (var j = 1; j < grd_clcjlist.rows; j++) {
- var clcjedicd = model.getValue("/root/main/list4/clcjlist["+ j +"]/edicd");
- if (edicd == clcjedicd) {
- if (grd_clcjlist.rowstatus(j) != 4) {
- cnt++;
- }
- }
- }
-
- if (cnt > 0) {
- } else {
- grd_ordlist.valueMatrix(row, grd_ordlist.colref("text")) = "";
- //model.resetInstanceNode("/root/main/list2/iscllist["+ row +"]/text");
- }
-
- // 특정내역 Grid에서 삭제
- var rowstatus = grd_clcjlist.rowstatus(rownum);
- if (rowstatus == 1 || rowstatus == 3) { // 1 : insert, 3 : insert & new
- grd_clcjlist.deleteRow(rownum, false); // 해당 라인을 Grid에서 삭제한다.
- } else { // 0 : new, 2 : update
- grd_clcjlist.rowstatus(rownum) = 4; // 4 : delete 상태로 stat를 변경한다.
- }
- grd_clcjlist.row = rownum;
-
- var rowcnt = getNodesetCount("/root/main/list2/iscllist"); // 필터
- rowcnt = eval(rowcnt) + 1;
- for (var j = 1; j < rowcnt; j++) {
- //for (var j = 1; j < grd_ordlist.rows; j++) {
- var clcjedicd = model.getValue("/root/main/list2/iscllist["+ j +"]/edicd");
- if (edicd == clcjedicd) {
- model.setValue("/root/main/list2/iscllist["+ j +"]/text", "");
- //model.refresh(); 최적화 문제로 변경 - 20080731 박창원
- model.refreshpart("/root/main/list2/iscllist/text");
- }
- }
-
- } // 특정 코드 상태 따른 if end
- } // for end
- var rdounitflag = model.getValue("/root/send/unitflag");
- if (rdounitflag == "-") {
- for (var i=1; i<grd_clcjlist.rows; i++) {
- var delstatus = grd_clcjlist.rowStatus(i);
- var delspclspec = grd_clcjlist.valueMatrix(i, grd_clcjlist.colRef("spclspec"));
- if (delstatus == 1 || delstatus == 3) { // 0 : new, 3 : insert & new
- if (delspclspec == "") {
- grd_clcjlist.deleteItem(i);
- }
- }
- }
-
- // 입력행 추가
- fSpclGridInsertRow();
-
- } else if (rdounitflag == "M") {
- grd_clcjlist.attribute("nodeset") = "/root/main/list4/clcjlist[unitflag = 'M']";
- grd_clcjlist.rebuild();
- } else if (rdounitflag == "J") {
- grd_clcjlist.attribute("nodeset") = "/root/main/list4/clcjlist[unitflag = 'J']";
- grd_clcjlist.rebuild();
- }
- for (var i=1; i<grd_clcjlist.rows; i++) {
- var unitflag = grd_clcjlist.valueMatrix(i, grd_clcjlist.colRef("unitflag"));
- var status = grd_clcjlist.valueMatrix(i, grd_clcjlist.colRef("status"));
-
- if (status != "") {
- grd_clcjlist.rowStatus(i) = status;
- }
-
- if (unitflag == "M") {
- grd_clcjlist.cellComboNodeset(i,3) = "/root/init/P0117list/P0117[minval = 'M' and cdid != 'MX999']";
- } else if (unitflag == "J") {
- grd_clcjlist.cellComboNodeset(i,3) = "/root/init/P0117list/P0117[minval = 'J']";
- }
-
- }
- //fSaveClcjList();
- } // 처리 건수 if end
-
- //model.refresh(); 최적화 문제로 변경 - 20080731 박창원
-
-
- }
- //재원심사 인적사항, 보험내역, 상병, 금액내역을 갖고 온다.
- function fGetItemInfo(paramFlag){
- group9.visible = false;
-
- btn_attData.attribute("class") = "btn2_letter4";
- btn_drginfo.attribute("visibility") = "hidden";
- // NST 관련버튼 초기화(2015.11.16 LEJ)
- btn_nst.disabled = true;
- btn_nst.attribute("class") = "btn2_letter8";
- btn_nst.attribute("text") = "NST";
-
-
- // 읽기전용을 위한 변수
- var readonly = model.getValue("/root/send/readonly");
- // 오픈일자를 가져옴 - 하드코딩 제거 20090302 박창원, 의정부,여의도,성가,빈센트를 위해서 예외작업함 나중에 제거필요
- var opendd = model.getValue("/root/main/item1/iteminfo/opendd");
- if(ipt_pid.currentText.length >0)
- {
- model.resetInstanceNode("/root/main/item1/iteminfo");
- model.resetInstanceNode("/root/main/item18/cnstinfo");
- model.removeNodeset("/root/main/list1/insulist");
- model.removeNodeset("/root/main/list3/diaglist");
- model.removeNodeset("/root/main/list2/iscllist");
- model.setValue("/root/hidden/item1/vcode","");
- grd_ordlist.refresh();
-
- model.setValue("/root/send/curdd",VAL_today);
- model.makeValue("/root/send/paramflag",paramFlag);
-
- asyncSend("TRPIJ00322", "/root/send", "/root/chklist/goso", "responseHandlerTRPIJ00322");
- if(!submit("TRPIJ00301")){
- messageBox("선택된 환자가","I004");
- return;
- }
- //model.refresh();
- // 20091109 JHP 빈센트 병원 오류확인, fGetItemInfo에서 상단정보는 환자 정보 조회후에 바로 상단정보셋팅되게 바꾸게 요청함.
- // 하여 delPatientInfos(), fSetOutPatPamInfo()를 상단쪽 환자정보조회 이후로 이동시킴. 와 윤영옥, 정승우, 박창원.
- // 상단에 환자정보 초기화하고 기입하기 (이미 퇴원환자는 제외)
- delPatientInfos();
- fSetOutPatPamInfo();
-
- //처방조회조건부분 클리어
- fSetRdoReset();
- fGetSelectedOrderData();
-
- // 처방내역을 갖고 온다.
- fGetIsclList(paramFlag);
-
- // 2009.07.27 기존 상단에 제목줄 무조건 히든.
- // grd_insuhistory.rowhidden(0)=true;
- // 2009.07.27 4건이상이면 안없애고 4건이하면 없앤다.
- var nodecnt = getNodesetCount("/root/main/list1/insulist");
- if(nodecnt < 4) {
- grd_insuhistory.rowhidden(0)=true;
- }
-
- // 수정추가, 2009.07.27 유형정보가 많을경우 스크롤바 생겨서 일수가 안보이기때문에 버튼을 두어서 많이 보게끔했다.
- // 다른거 손대면 일이커지니깡. ㅋㅋ
- // 일단 먼저 버튼에 초기화형식으로 모두 숨김해놓는다.
- btn_insuhistoryup.visible = false;
- btn_insuhistorydown.visible = false;
- grd_insuhistory.attribute("height") = "77";
-
- // 유형갯수에 따라서 버튼보여주고 길이체크한다.
- var nodecnt = getNodesetCount("/root/main/list1/insulist");
- if(nodecnt >= 4) {
- btn_insuhistorydown.visible = true;
- }
- //상병이 한건도 없는경우 자동으로 처방상병을 갱신한다.
- if(grd_diaglist.rows < 2)
- {
- if(grd_diaglist.rows == 1){
- var chkdiag = model.getValue("/root/main/list3/diaglist["+ 1 +"]/diagcd");
- if(!chkdiag){
- fRefreshDiag();
- }
- }
- }
-
- fSpclGridInsertRow();
- // 20080811 자동으로 상병줄추가 제외하기로함
- fDiagGridInsertRow();
- var lastjudgendid = model.getValue("/root/main/item1/iteminfo/lastjudgendid");
- var lastjudgendnm = model.getValue("/root/main/item1/iteminfo/lastjudgendnm");
- var opyn = model.getValue("/root/main/item1/iteminfo/opflag");
- var age = model.getValue("/root/main/item1/iteminfo/age");
- model.setValue("/root/send/age",age);
- var userid = model.getValue("/root/hidden/userid");
-
- btn_save.disabled = false;
- //상세화면 저장버튼 처리를 위해 넣어 놓는다. - 2007-11.29 박도형
- model.setValue("root/hidden/item1/chksave","N");
- btn_recalc.disabled = false;
- btn_sugicalc.disabled = false;
- btn_dclrtclose.disabled = false;
- btn_dschclose.disabled = false;
- btn_totjudgclose.disabled = false;
- btn_dschclosecancel.disabled = false;
- btn_midregist.disabled = false;
- btn_midregistyn.disabled = false;
-
- }else
- {
- messageBox("환자번호를","C001");
- return;
- }
- // 수술심사상태를 가져온다. -- 수술심사상태는 수술이 있는 사람만 가져온다. - 20080922 박창원
- //if (opyn == "Y") {
- // fGetOperStat();
- //}
-
- // 외래 필수 심사 품목 조회를 위해 요율 칼럼을 불러온다! (2012.06.01 LEJ)
- var brateflag = model.getValue("/root/main/item1/iteminfo/brateflag");
- model.setValue("/root/send/brateflag",brateflag);
-
- fGetPatMsgYn();
-
- // 진료비 계산내역을 갖고 온다.
- //fGetCalc();
- //항목별소계
- //fSetItemSubTotal();
- // 특정내역 중 MT015, MT016 정보가 입력된 환자인지를 확인한다.
- fCheckSpclSpecData();
- // 2008. 01. 27 박지욱 추가 (처방 색깔 항 구분에 따라 흰색-회색 구분되도록 처리)
- //fSetOrderColorByEdiitem();
- //범례 색깔을 표시한다.
- //fSetColorSpclJudgOrder();
- //특정내역이 있는 처방에 'T'필드에 *표를 해준다.
- //fSetOrdSpclTxt();
- //중간청구 등록여부, 심사 마감상태, 문제환자여부를 체크하여 버튼의 색상을 셋팅해준다.
- fSetItemInfoSetting();
-
- // 마이그레이션된 중간청구등록이 되지 않은 데이터에 대하여 일괄적으로 중간청구 등록일을 20081003 으로 한다. - 20081003 박창원
- var midcflag = model.getValue("/root/main/item1/iteminfo/midcflag");
- var indd = model.getValue("/root/main/item1/iteminfo/indd1");
- var fromdd = model.getValue("/root/main/item1/iteminfo/fromdd");
- if (midcflag == "N" && indd < opendd && fromdd == opendd) {
- model.setValue("/root/main/item1/iteminfo/lastmdlclamdd",opendd);
- }
- // 하단의 희귀난치성 산정특례환자의 등록번호 함수로 대체함. 20091020 JHP (추가작업발생)############################################# 시작
- // // 희귀난치성 산정특례환자의 등록번호를 보여준다. - 20090622 박창원
- // var raremsg = model.getValue("/root/main/item1/iteminfo/raremsg");
- //
- // if (raremsg != '-') {
- // model.setValue("/root/main/item1/iteminfo/itemmsg",raremsg);
- // model.refresh();
- // }
- // 중증번호, 희귀난치번호 보여주는 방법 변경에 따른 수정.
- fItemRareMsg();
- // 하단의 희귀난치성 산정특례환자의 등록번호 함수로 대체함. 20091020 JHP (추가작업발생)############################################# 끝
-
- // 희귀난치여부 표시 - 20080811 박창원 추가
- var rareyn = model.getValue("/root/main/item1/iteminfo/rareyn");
- cap_rare.visible= false;
- cap_tb.visible= false;
- cap_g1.visible = false;
- cap_c1c.visible= false;
- cap_c2e.visible= false;
- cap_c2f.visible= false;
- cap_cp.visible= false;
-
- if (rareyn == "Y") {
- cap_rare.visible= true;
- }else if(rareyn == "T") {
- cap_tb.visible= true;
- }
- // 차상위 표시
- var cfe = model.getValue("/root/main/item1/iteminfo/cfe");
- var dcuc = model.getValue("/root/main/item1/iteminfo/dcuc");
- if (cfe == "C") {
- cap_c1c.visible= true;
- } else if (cfe == "E") {
- cap_c2e.visible= true;
- } else if (cfe == "F") {
- cap_c2f.visible= true;
- } else if (dcuc =="G") {
- cap_g1.visible = true;
- }
- // 완화의료 시범사업...20091228 정승우 환자구분추가
- pm_flag.visible=false;
- var calcscorrecalflag = model.getValue("/root/main/item1/iteminfo/calcscorrecalflag");
- if (calcscorrecalflag == "7" || calcscorrecalflag == "8") {
- pm_flag.visible=true;
- }
-
- var cpflag = model.getValue("/root/main/item1/iteminfo/cpyn");
-
- if (cpflag == "Y") {
- cap_cp.visible=true;
- }
-
- //메세지 클리어
- model.setValue("/root/hidden/item1/message","");
-
- // 20091109 JHP 심사메모버튼으로 변경시 case도 심사메모에 해당하는 것으로 변경해야함.
- var sixtimyn = model.getValue("/root/main/item1/iteminfo/sixtimyn");
- if (sixtimyn == "Y"){
- btn_clspcd.selected = true;
- model.toggle("case_spclspec");
- } else {
- btn_judgrmk.selected = true;
- model.toggle("case_judgrmemo");
- }
-
- model.setValue("/root/hidden/item1/snglcalcscorcd", "");
- model.setValue("/root/hidden/item1/edicd", "");
- //분만정보 체크
- fCheckBorn();
- //수술여부 체크
- fCheckOper();
- //퇴원메모여부 체크
- fCheckDschMemo();
- //공여자 수혜자 체크
- fCheckDnorPat();
-
- // 수정추가 20090813 외래요율환자 일경우 보험, 보조유형 정보가 맞는지 확인하여 체크
- fOutRateInsuSuppflag();
-
- // 특이환자 버튼 설정 - 20080923 박창원
- if (model.getValue("/root/main/item1/iteminfo/pamprobjudgflag") == "Y") {
- btn_patspcfyn.attribute("background-image") = "../../../com/commonweb/images/icon_btn_s.gif"; // 주황색
- } else {
- btn_patspcfyn.attribute("background-image") = "../../../com/commonweb/images/icon_btn.gif"; // 파란색
- }
- // 자보한도액 초과자 체크 : 자보환자일때만 자보발생금액 버튼 활성화 초과자는 자보발생금액 버튼 색깔변경 - 20080923 박창원
- var insukind = model.getValue("/root/main/item1/iteminfo/insukindcd");
- var suppkind = model.getValue("/root/main/item1/iteminfo/suppkindcd");
- var suppkindflag = model.getValue("/root/main/item1/iteminfo/suppkindcd");
- if ( insukind == "31" && suppkind == "18") {
- var paylimityn = model.getValue("/root/main/item1/iteminfo/paylimityn");
- // 자보발생금액 버튼 설정
- if (paylimityn == "Y") {
- btn_autolimit.attribute("background-image") = "../../../com/commonweb/images/icon_btn_s.gif"; // 주황색
- } else {
- btn_autolimit.attribute("background-image") = "../../../com/commonweb/images/icon_btn.gif"; // 파란색
- }
- } else { // 자보자손이 아닐경우 파란색으로 - 20081108 박창원
- btn_autolimit.attribute("background-image") = "../../../com/commonweb/images/icon_btn.gif"; // 파란색
- }
-
- // 20091016 JHP 요청번호8558 진료상병과심사상병체크 ############################################################################################ 시작
- fCheckEmrDiagPamDiag();
- // 20091016 JHP 요청번호8558 진료상병과심사상병체크 ############################################################################################ 끝
-
-
-
- // 사망환자 메세지 20090602 박창원
- var dethdt = model.getValue("/root/main/item1/iteminfo/dethdt");
- var maxexecdd = model.getValue("/root/main/item1/iteminfo/maxexecddt");
- var dethdd = dethdt.substr(0,8);
-
- if (dethdt != '-') {
- if (maxexecdd > dethdd) {
- messageBox("사망일자 이후 실시처방이 있습니다. 정리 후 ","C003");
- }
- else {
- messageBox("사망환자[사망시간 "+ dethdt.substr(0,4) + ":" + dethdt.substr(4,2) + ":" + dethdt.substr(6,2) + " " + dethdt.substr(8,2) + ":" + dethdt.substr(10,2) + "]", "I005");
-
- // 20090921 수정추가 : JHP inpt 사망정보 존재하면 진료결과의 값을 사망으로바꾸어서 저장할때 저장되게끔한다..
- var dschdd = model.getValue("/root/main/item1/iteminfo/dschdd");
- var ordrslt = model.getValue("/root/main/item1/iteminfo/ordrslt");
- // 퇴원일자와 사망일자가 동일할 때만 진료결과 체크한다.
- if(dethdd == dschdd && ordrslt != "4"){
- model.setValue("/root/main/item1/iteminfo/ordrslt","4");
- }
- }
- }
- // 당일외래진료후 입원환자 및 덤프된 원내,원외 약제 체크 알럿 - 20090616 박창원
- var todayoutyn = model.getValue("/root/main/item1/iteminfo/todayoutyn");
- var dumpinyn = model.getValue("/root/main/item1/iteminfo/dumpinyn");
- var dumpoutyn = model.getValue("/root/main/item1/iteminfo/dumpoutyn");
- var lastjudgdt = model.getValue("/root/main/item1/iteminfo/lastjudgdt");
- var dumpclamkeyexistyn = model.getValue("/root/main/item1/iteminfo/dumpclamkeyexistyn");
- var serdiagfromdd = model.getValue("/root/main/item1/iteminfo/serdiagfromdd"); //중증시작일자
-
- if (todayoutyn == "Y" && lastjudgdt == "-") {
- if (dumpinyn == "N" && dumpoutyn == "N") {
- messageBox("당일 외래진료 후 입원처리된", "I005");
- } else if (dumpinyn == "Y" && dumpoutyn == "N") {
- messageBox("당일 외래진료 후 입원처리되고 원내 약제 덤프처방이 있는", "I005");
- } else if (dumpinyn == "N" && dumpoutyn == "Y") {
- messageBox("당일 외래진료 후 입원처리되고 원외 약제 덤프처방이 있는", "I005");
- }else if (dumpinyn == "Y" && dumpoutyn == "Y") {
- messageBox("당일 외래진료 후 입원처리되고 원내/원외 약제 덤프처방이 있는", "I005");
- }
- }
-
- // 6시간미만여부체크 - 20080722 박창원
- var sixtimyn = model.getValue("/root/main/item1/iteminfo/sixtimyn");
- if (sixtimyn == "Y" && indd < serdiagfromdd) {
- messageBox("중증등록일과 입원일자가 다르므로 재원 이력 분리 후 중증 적용 바랍니다", "I005");
- }
- // 본인부담상한제 대상자체크 - 200800808 박창원
- var ownbmaxyn = model.getValue("/root/main/item8/ownbmaxamt/ownbmaxyn");
- if (ownbmaxyn == "Y") {
- messageBox("본인부담상한제 대상", "I005");
- }
-
- var ownbmaxgradeflag = model.getValue("/root/main/item1/iteminfo/ownbmaxgradeflag");
- var ownlimmitamt = model.getValue("/root/main/item1/iteminfo/ownlimmitamt"); // 본인부담 상한 구분에 따른 상한기준액
- var suppkindflag = model.getValue("/root/main/item1/iteminfo/suppkindcd");
- var ownbmaxgrade = model.getValue("/root/main/item1/iteminfo/ownbmaxgrade"); // 보험유형과 재원이력의 본인부담 상한 구분 비교
-
- // 수정추가 : 20090820 : JHP : 상한제 차등구분(iphs의 ownbmaxgradeflag)을 확인하여 보조유형 차상위 환자에 대해서는 상한제 차등구분이 200만원 코드인 3인지 확인한다.
- // 2011.01.17 경북대병원 차상위 상한금액구분 메시지 삭제요청
- /*
- if(suppkindflag == '32' ||suppkindflag == '33' ||suppkindflag == '34' ||suppkindflag == '35' ||suppkindflag == '36' ||suppkindflag == '37' ||suppkindflag == '38' ||suppkindflag == '39' ||
- suppkindflag == '40' ||suppkindflag == '41' ||suppkindflag == '42' ||suppkindflag == '43' ||suppkindflag == '44' ||suppkindflag == '45' ||suppkindflag == '46'){
- if(ownbmaxgradeflag != "3"){
- messageBox("차상위 환자입니다. 현재 상한제금액구분이 200만원이 아니므로 \n원무팀에 요청하시어 상한제금액구분을 변경","I008");
- }
- }
- */
-
-
- // 응급실을 통하여 소아과로 입원한 6세미만 환자는 유형을 변경할 것인지 알럿을 띄워준다.
- // 현재과(PD),입원경로(응급실),6세미만, 보험유형은 보험과 보호만, 재원중인 환자로 보조유형이 6세미만이 아닌 환자를 조건으로함 - 20081007 박창원
- // 입원경로 조건을 없앰 - 20081013 박창원
- // 신생아 추가 - 20081013 박창원
- var age = parseInt(model.getValue("/root/main/item1/iteminfo/age"));
- var inpath = model.getValue("/root/main/item1/iteminfo/inpath");
- var orddeptcd = model.getValue("/root/main/item1/iteminfo/orddeptcd");
- var rrgstno = model.getValue("/root/main/item1/iteminfo/rrgstno");
- var canceryn = "N"; // 6세미만과 등록암이 공존하지 못하도록 20090602 박창원
- var indschacptstat = model.getValue("/root/main/item1/iteminfo/indschacptstat");
- var babyyn ="N";
- var end6yn = "N";
- var brthdd = "20" + rrgstno.substr(0,6);
- var cfe = model.getValue("/root/main/item1/iteminfo/cfe");
- // 신생아를 구별지음
-
- if (indschacptstat != 'D' && dumpclamkeyexistyn == "Y") {
- messageBox("외래 자료 수집이 된 재원 내 실시처방이 있습니다. 외래 사후 자료를 생성 삭제한 후 Dump처리","I008");
- }
-
- //응급실 관리료 여부 체크
- var nog3reasnyn = model.getValue("/root/main/item1/iteminfo/nog3reasnyn");
- if (nog3reasnyn == "Y") {
- messageBox("응급 의료관리료 미발생 환자입니다.","I007");
- }
-
- if (rrgstno.substr(7,1) == "3" || rrgstno.substr(7,1) == "4" || rrgstno.substr(7,1) == "7" || rrgstno.substr(7,1) == "8" && (cfe != "E" && cfe != "F")) {
- var interval = getDateInterval(brthdd,indd);
- if (interval < "28") {
- babyyn = "Y";
- }
- }
- // 6세미만 생일 여부를 판단함
- if ((rrgstno.substr(7,1) == "3" || rrgstno.substr(7,1) == "4" || rrgstno.substr(7,1) == "7" || rrgstno.substr(7,1) == "8") && age <= 6) {
- var curdd = VAL_today.substr(2,6);
- brthdd = brthdd.substr(2,6);
- if (age == 6) {
- if (brthdd >= curdd) {
- end6yn = "N";
- } else if (brthdd < curdd) {
- end6yn = "Y";
- }
- } else if(age < 6) {
- end6yn = "N";
- } else if (age > 6) {
- end6yn ="Y";
- }
- }
-
- //35세 이상 고위험 임신부 관련 메세지 (2015.07.29 LEJ)
- if (orddeptcd == "2100000000" && age >= 35 ){
- if (model.getValue("/root/main/item17/obgydiag/obgydiagyn") == "Y"){ //임신 상병 체크 추가 (2015.10.05 LEJ)
- messageBox("35세 이상 고위험 임신부 입원진료 내역입니다!!","I007");
- }
- }
-
- if ( (insukind == "11" || insukind == "21" || insukind == "22") && suppkind != "31" && !(insukind == "22" && suppkind == "08") ){ //20100318 정승우 신생아유형은 메세지 뜨지 않도록 적용하고 버튼도 보이지 않도록
- //산정특례여부 체크
- fCheckEssc();
- //산정특례 + 정상요율 + 퇴원확정인 경우는 메시지t처리 한다.
- var chkBtn = "False";
- if(btn_esscdiag.visible){
- chkBtn = "True";
- }else{
- chkBtn = "False";
- }
-
- // 희귀난치성 산정특례 체크 - 20090622 박창원
- var rareesscyn = model.getValue("/root/main/item12/rareessc/rareesscyn");
-
- //20100318 정승우 메세지 정리 보조유형이 50이면 띄우지 않는다.
- //if (chkBtn == "True" && rareesscyn == "Y" && suppkindflag != "50") {
- // messageBox("희귀난치성 산정특례", "I005");
- // 희귀난치성 산정특례 환자의 경우 메세지후 return때문에 진행안되는 부분 comment 처리 - 20100221 박창원
- //return;
- //}
- var rare = model.getValue("/root/main/list1/insulist[rare='H']/rare");
- if (rare.length > 0 && (indschacptstat == 'A' || indschacptstat == 'T') ){
- messageBox("희귀대불 환자입니다. 자격", "I007");
- }
-
- if (insukind == "11") {
-
- if (ownbmaxgrade == 'Y') {
- messageBox("환자의 본인부담 상한구분이 보험유형 기준자료의 상한구분과 일치하지 않습니다. ", "I007");
- }
- else {
- // 연도별 분리 안 된 이력 중 본인부담 상한액 초과 환자 메세지 발생
- var todd = model.getValue("/root/main/item1/iteminfo/todd");
- var dschnotidt = model.getValue("/root/main/item1/iteminfo/dschnotidt");
- var curyear = VAL_today.substr(0,4);
- var fromyear = fromdd.substr(0,4);
- var toyear = todd.substr(0,4);
- if ( todd == "99991231" ) {
- if ( dschnotidt.substr(0,8) == "99991231" || dschnotidt.substr(0,8) == "" ) {
- toyear = curyear ;
- }
- else {
- toyear = dschnotidt.substr(0,4) ;
- }
- }
- if ( fromyear != toyear && cfe != 'F' ) {
- if(parseInt(model.getValue("/root/main/item2/itemcalc/ownbpayamt")) > ownlimmitamt) {
- messageBox("연도별 분리 되지 않은 본인부담상한제 환자입니다. \n재원 분리 ", "I007");
- }
- }
- else {
- //본임부담상한제 체크 : 기준 금액 이상이면 메시지 발생.
- if ((indschacptstat == 'A' || indschacptstat == 'T')) {
- if(parseInt(model.getValue("/root/main/item2/itemcalc/ownbpayamt")) > ownlimmitamt) {
- messageBox("본인부담상한제 환자", "I009");
- }
- }
- }
- }
- }
-
- // 중증수술 처방이 있을경우 상병이 맞지 않으면 Alert - 20080908 박창원
- var chkSuppkind = model.getValue("/root/main/item1/iteminfo/suppkindcd");
- var insukind = model.getValue("/root/main/item1/iteminfo/insukindcd");
- var v191prcpyn = model.getValue("/root/main/item1/iteminfo/v191prcpyn");
- var v192prcpyn = model.getValue("/root/main/item1/iteminfo/v192prcpyn");
- var v191diagyn = model.getValue("/root/main/item1/iteminfo/v191diagyn");
- var v192diagyn = model.getValue("/root/main/item1/iteminfo/v192diagyn");
- var vcode = model.getvalue("/root/hidden/item1/vcode");
- // 20090602 개심개두는 입원요율만 적용되게
- var sixtimyn = model.getValue("/root/main/item1/iteminfo/sixtimyn");
- // 개심개두 상병 메세지 통합 - 20081010 박창원
- var opmessageyn = "N";
-
- if (v191prcpyn == "Y" && chkSuppkind != "05" && chkSuppkind != "32" && chkSuppkind != "34" && sixtimyn == "N") { // 20090325 차상위 2종추가
- //if (v191diagyn == "N") { // 개심/개두 수술인 경우 상병과 상관없이 보조유형 적용 안 되면 메세지 띄움 (2015.02.10 LEJ)
- messageBox("중증해당 수술이 있습니다. 상병을", "I007");
- opmessageyn = "Y";
- //}
- }
- if (v192prcpyn == "Y" && chkSuppkind != "05" && chkSuppkind != "32" && chkSuppkind != "34") { // 20090325 차상위 2종추가
- //if (v192diagyn == "N" && opmessageyn == "N") { // 개심/개두 수술인 경우 상병과 상관없이 보조유형 적용 안 되면 메세지 띄움 (2015.02.10 LEJ)
- messageBox("중증해당 수술이 있습니다. 상병을", "I007");
- //}
- }
- // 개두술 관련 적용 약제 추가에 따른 재원심사 알림 메세지 [입퇴 + 외퇴] : (해당 약제 + 해당 상병)이면서 보조유형이 개두술이 아닌 경우 메세지 (2015.02.10 LEJ)
- if (v191prcpyn == "D" && v191diagyn == "Y" && chkSuppkind != "05" && chkSuppkind != "39") {
- messageBox("개심/개두 관련 약제가 있습니다. 보조 유형을", "I007");
- opmessageyn = "Y";
- }
- // 개심술 관련 적용 약제 추가에 따른 재원심사 알림 메세지 [입퇴 + 외퇴] : (해당 약제 + 해당 상병)이면서 보조유형이 개심술이 아닌 경우 메세지 (2015.02.10 LEJ)
- if (v192prcpyn == "D" && v192diagyn == "Y" && chkSuppkind != "05" && chkSuppkind != "39") {
- messageBox("개심/개두 관련 약제가 있습니다. 보조 유형을", "I007");
- opmessageyn = "Y";
- }
- if(insukind == "11" && chkBtn == "True" && chkSuppkind != "05" && chkSuppkind != "06" && chkSuppkind != "32" && chkSuppkind != "39" && cfe != "C" && chkSuppkind != "40" && chkSuppkind != "50" ){ //20090325 차상위 2종추가
- messageBox("중증정보가 존재하는", "I005");
- canceryn = "Y";
- }
- if( (insukind == "21" || insukind == "22") && chkBtn == "True" && chkSuppkind != "05" && chkSuppkind != "06" && chkSuppkind != "32" && cfe != "C" && chkSuppkind != "39" && chkSuppkind != "40" && chkSuppkind != "50" ){ //20090325 차상위 2종추가
- if (!(sixtimyn == "N" && end6yn == "N" && babyyn == "N" && age <= 6)) {
- messageBox("중증정보가 존재하는", "I005");
- }
- }
- } else {
- btn_esscdiag.visible= false;
- }
-
- // 6시간 미만여부 추가 - 20081105 박창원
- // 진료과 제한 조건 삭제 - 20090219 박창원
- // 조건 삭제 20091008 JHP 박창원 요청.( insukind == "21" || insukind == "22" )
- if (sixtimyn == "N" && babyyn == "Y" &&age == 0 && indd >= "20080101" && (insukind == "11") && suppkind != "31" && cfe != "C" && readonly != "Y") {
- var msg = messageBox("입원한 신생아 입니다. 신생아 유형을 적용","S001");
- if (msg == 6) { // 신생아 요율을 적용한다.
- Insuchange("31");
- }
- }
- // 6시간 미만여부 추가 - 20081105 박창원
- // 진료과 제한조건 삭제 - 20080219 박창원
- // 희귀난치일때 6세미만 메세지 적용안함 - 20100630 박창원
- if (insukind == "11") {
- var opchkyn = model.getValue("/root/main/item11/drginfo/opchkyn");
- var drgmchkyn = model.getValue("/root/main/item11/drginfo/drgmchkyn");
- var fromdd = model.getValue("/root/main/item1/iteminfo/fromdd");
- var dschjudgprcsstat = model.getValue("/root/main/item1/iteminfo/dschjudgprcsstat");
- var indaycnt = parseInt(model.getValue("/root/main/list1/insulist[fromdd='"+fromdd+"']/indaycnt"));
- if (opchkyn == "Y" && indaycnt <= 30 ) {
- btn_drginfo.attribute("visibility") = "visible";
- } else {
- btn_drginfo.attribute("visibility") = "hidden";
- }
-
- if (opchkyn == "Y" && (indschacptstat == 'A' || indschacptstat == 'T') && indaycnt <= 30 ) {
- messageBox("DRG 대상입니다.","I");
- } else if ( opchkyn == "Y" && (indschacptstat == 'A' || indschacptstat == 'T') && indaycnt > 30 ) {
- messageBox("DRG 대상입니다만 재원일수 초과 입니다.","I");
- }
- var zdiagcd = model.getValue("/root/main/list3/diaglist[diagcd='Z201']/seqno");
- if (suppkind == "00" && zdiagcd != "") {
- messageBox("잠복결핵 대상입니다.","I");
- }
-
- if (sixtimyn == "N" && end6yn == "N" && canceryn == "N" && babyyn == "N" && age <= 6 && suppkind != "08" && suppkind != "41" && suppkind != "06"
- && cfe != "C" && suppkind != "40" && readonly != "Y"
- && suppkind != "46" && suppkind != "50" && suppkind != "51" && dschjudgprcsstat != "C") {
- var msg = messageBox("6세미만 환자입니다. 6세미만 유형을 적용","S001");
- if (msg == 6) { // 6세미만 요율을 적용한다.
- var cfe = model.getValue("/root/main/item1/iteminfo/cfe");
- if (cfe == "E" || cfe == "F") {
- var suppkind = "41";
- } else {
- var suppkind = "08";
- }
- Insuchange(suppkind);
- }
- }
- }
- if (insukind == "21" || insukind == "22"){
- if (sixtimyn == "N" && end6yn == "N" && babyyn == "N" && age <= 6 && suppkind != "08" && suppkind != "41" && readonly != "Y" ) {
- var msg = messageBox("6세미만 환자입니다. 6세미만 유형을 적용","S001");
- if (msg == 6) { // 6세미만 요율을 적용한다.
- var cfe = model.getValue("/root/main/item1/iteminfo/cfe");
- var suppkind = "08";
- if (cfe == "E" || cfe == "F") {
- suppkind = "41";
- }
-
- Insuchange(suppkind);
- }
- }
- }
- if (insukind == "31"){
- var paygrntyn = model.getValue("/root/main/item1/iteminfo/paygrntyn");
-
- if (paygrntyn != "Y") {
- messageBox("자동차보험 지급보증번호 누락입니다.","I007");
- }
- }
- //진료결과 체크 - 중간청구인경우 : 계속, 퇴원인경우 : 퇴원
- var dschnotiyn = model.getValue("/root/main/item1/iteminfo/dschnotiyn");
- var ordrslt = model.getValue("/root/main/item1/iteminfo/ordrslt");
-
- if(dschnotiyn == "Y"){
- if(ordrslt == "" || ordrslt == "-" || ordrslt == "1"){
- if(ordrslt != "4"){
- model.setValue("/root/main/item1/iteminfo/ordrslt","9");
- }
- }
- }else{
- if(ordrslt == "" || ordrslt == "-"){
- model.setValue("/root/main/item1/iteminfo/ordrslt","1");
- }
- }
-
- //응급 6시간 미만 체크를 위하여 넣어 둔다.
- var ordtype = model.getValue("/root/main/item1/iteminfo/ordtype");
- var brateflag = model.getValue("/root/main/item1/iteminfo/brateflag");
-
- model.setValue("/root/send/ordtype",ordtype);
- model.setValue("/root/send/brateflag",brateflag);
-
- //본인부담율이 20%가 아닌 경우 상단정보에 보조유형정보를 붉은 색으로 표시해준다.
- var insukind = model.getValue("/root/main/item1/iteminfo/insukindcd");
- var payownbrate = model.getValue("/root/main/item1/iteminfo/ownrate");
-
- //보험인경우 본인부담율 20%가 아니면 붉은색으로 표시해준다.
- if(insukind == "11"){
- if(payownbrate == "20"){
- opt_suppkind.attribute("class") = "output_fix";
- cmb_suppkind.attribute("class") = "combo_default";
- opt_ownrate.attribute("class") = "output_fix";
- }else{
- opt_suppkind.attribute("color") = "#ff0066";
- cmb_suppkind.attribute("color") = "#ff0066";
- opt_ownrate.attribute("color") = "#ff0066";
- }
- //보호 2종인경우 본인부담율 15%가 아니면 붉은색으로 표시해준다.
- }else if(insukind == "22"){
- if(payownbrate == "15"){
- opt_suppkind.attribute("class") = "output_fix";
- cmb_suppkind.attribute("class") = "combo_default";
- opt_ownrate.attribute("class") = "output_fix";
- }else{
- opt_suppkind.attribute("color") = "#ff0066";
- cmb_suppkind.attribute("color") = "#ff0066";
- opt_ownrate.attribute("color") = "#ff0066";
- }
- //나머지는 정상 색깔로 표시해 준다.
- }else{
- opt_suppkind.attribute("class") = "output_fix";
- cmb_suppkind.attribute("class") = "combo_default";
- opt_ownrate.attribute("class") = "output_fix";
- }
- // 마이그레이션 환자는 조회만 되게 한다. - 20080819 박창원
- var mig = model.getValue("/root/main/item1/iteminfo/mig");
- var dschjudgprcsstat = model.getValue("/root/main/item1/iteminfo/dschjudgprcsstat");
- var indschacptstat = model.getValue("/root/main/item1/iteminfo/indschacptstat");
- var dschnotiyn = model.getValue("/root/main/item1/iteminfo/dschnotiyn");
- var dschdclrtyn = model.getValue("/root/main/item1/iteminfo/dschdclrtyn");
-
- // NST 상태 표시 추가 ( 2015.11.16 LEJ)
- btn_nst.disabled = true;
- btn_nst.attribute("class") = "btn2_letter8";
- btn_nst.attribute("text") = "NST";
-
- var cnststat = model.getValue("/root/main/item18/cnstinfo/cnststat");
- var nstcnt = model.getValue("/root/main/item18/cnstinfo/nstcnt");
- if (cnststat != "-" && cnststat != ""){
- btn_nst.disabled = false;
- if (nstcnt >= "2" && nstcnt != ""){
- btn_nst.attribute("text") = "NST : " + cnststat + "(" + nstcnt + ")" ;
- } else {
- btn_nst.attribute("text") = "NST : " + cnststat;
- }
- if (cnststat == "회신" || cnststat == "회신확정"){
- btn_nst.attribute("color") = "#ff0066";
- }
- }
-
- // 심사중
- if (readonly == "Y") {
- btn_save.disabled = true;
- btn_recalc.disabled = true;
- btn_sugicalc.disabled = true;
- btn_dclrtclose.disabled = true;
- btn_dschclose.disabled = true;
- btn_totjudgclose.disabled = true;
- btn_dschclosecancel.disabled = true;
- btn_midregist.disabled = true;
- btn_midregistyn.disabled = true;
- //상세화면 저장버튼 처리를 위해 넣어 놓는다. - 2007-11.29 박도형
- model.setValue("root/hidden/item1/chksave","Y");
- }else if (indschacptstat == "D") { // 퇴원이 완료되면 세부계산내역 저장이 안되게 20080911
- messageBox("퇴원 처리된 환자입니다. 요율변경 및 계산내역 수정은", "E001");
- btn_save.disabled = true;
- btn_recalc.disabled = true;
- btn_sugicalc.disabled = true;
- btn_dclrtclose.disabled = true;
- btn_dschclose.disabled = true;
- btn_totjudgclose.disabled = true;
- btn_dschclosecancel.disabled = true;
- btn_midregist.disabled = true;
- btn_midregistyn.disabled = true;
- //상세화면 저장버튼 처리를 위해 넣어 놓는다. - 2007-11.29 박도형
- model.setValue("root/hidden/item1/chksave","Y");
- } else if (indschacptstat == "T" && (dschjudgprcsstat == "C" || dschjudgprcsstat == "E" || dschjudgprcsstat == "G" ) ) { // 가퇴원 일단추가 가퇴원은 재 판단해서 블로킹 로직을 만든다. - 20081005 박창원
- messageBox("가퇴원 처리가된 마감 환자입니다. 요율변경 및 계산내역 수정은", "E001");
- btn_save.disabled = true;
- btn_recalc.disabled = true;
- btn_sugicalc.disabled = true;
- btn_dclrtclose.disabled = true;
- btn_dschclose.disabled = true;
- btn_totjudgclose.disabled = true;
- btn_dschclosecancel.disabled = false;
- btn_midregist.disabled = true;
- btn_midregistyn.disabled = true;
- //상세화면 저장버튼 처리를 위해 넣어 놓는다. - 2007-11.29 박도형
- model.setValue("root/hidden/item1/chksave","Y");
- } else if (dschjudgprcsstat == "B" ) {
- if ( lastjudgendid != userid ) {
- messageBox(lastjudgendnm + "님이 퇴원심사 진행중입니다. 저장은", "E001");
- btn_save.disabled = true;
- btn_recalc.disabled = true;
- btn_sugicalc.disabled = true;
- btn_dclrtclose.disabled = true;
- btn_dschclose.disabled = true;
- btn_totjudgclose.disabled = true;
- btn_dschclosecancel.disabled = true;
- btn_midregist.disabled = true;
- btn_midregistyn.disabled = true;
- //상세화면 저장버튼 처리를 위해 넣어 놓는다. - 2007-11.29 박도형
- model.setValue("root/hidden/item1/chksave","Y");
- } else {
- btn_dschclosecancel.disabled = true;
- if (dschnotiyn == "Y") { // 퇴원확정인 경우 예고 심사 비활성
- btn_dclrtclose.disabled = true;
- } else if (dschdclrtyn == "Y" && dschnotiyn == "N") { // 퇴원예고인 경우 퇴원마감, 통합마감 비활성
- btn_dschclose.disabled = true;
- btn_totjudgclose.disabled = true;
- }
- }
- // 심사완료, 통합심사완료
- } else if (dschjudgprcsstat == "C" || dschjudgprcsstat == "E" || dschjudgprcsstat == "G" ) {
- messageBox("퇴원마감이나 통합심사마감 처리가된 환자입니다. 요율변경 및 계산내역 수정은", "E001");
- btn_save.disabled = true;
- btn_recalc.disabled = true;
- btn_sugicalc.disabled = true;
- btn_dclrtclose.disabled = true;
- btn_dschclose.disabled = true;
- btn_totjudgclose.disabled = true;
- btn_midregist.disabled = true;
- btn_midregistyn.disabled = true;
- btn_dschclosecancel.disabled = false;
- //상세화면 저장버튼 처리를 위해 넣어 놓는다. - 2007-11.29 박도형
- model.setValue("root/hidden/item1/chksave","Y");
- } else if (dschjudgprcsstat == "A" && dschnotiyn == "N") {
- btn_dschclose.disabled = true;
- btn_totjudgclose.disabled = true;
- btn_dschclosecancel.disabled = true;
- if (dschdclrtyn == "N") { // 퇴원예고 안 된 경우 예고심사 비활성
- btn_dclrtclose.disabled = true;
- }
- } else if (dschjudgprcsstat == "A" && dschnotiyn == "Y") {
- btn_dschclosecancel.disabled = true;
- btn_dclrtclose.disabled = true;
- //} else if (orddeptcd == "2280000000" && dschnotiyn == "Y" && sixtimyn == "Y" ) { // 응급실환자의 경고 alert 추가 - 20081003 박창원
- // 20091019 JHP 번호가 하드코딩되어있어서 삭제함 기존("... 응급수납 T.1813으로 연락후...") 번호삭제 - 이미숙 요청
- // var msg = messageBox("수납이 가능한 상태입니다.(응급실은 무심사 퇴원 가능함),처방수정을 하시려면 반드시 응급수납으로 연락후 처리하시기 바랍니다. 처방 검색만 하시려면(수정불가)","S001");
- // if (msg == 6) {
- // btn_save.disabled = true;
- // btn_recalc.disabled = true;
- // btn_sugicalc.disabled = true;
- // btn_dschclose.disabled = true;
- // btn_totjudgclose.disabled = true;
- // btn_midregist.disabled = true;
- // btn_midregistyn.disabled = true;
- // btn_dschclosecancel.disabled = false;
- //상세화면 저장버튼 처리를 위해 넣어 놓는다. - 2007-11.29 박도형
- // model.setValue("root/hidden/item1/chksave","Y");
- // }
- }
- //if (indschacptstat == "T" && (dschjudgprcsstat == "A" || dschjudgprcsstat == "B" || dschjudgprcsstat == "F") ) { // 가퇴원 메세지 추가 - 20081005 박창원
- // messageBox("가퇴원 환자","I009");
- //}
-
- // AS-IS 데이터가 비정상적인 액팅이 되었을때 alert - 20081013 박창원 - 한시적 루틴
- var abnormalactingyn = model.getValue("/root/main/item1/iteminfo/abnormalactingyn");
- var abnormalexip = model.getValue("/root/main/item1/iteminfo/abnormalexip");
- var abnormaliscl = model.getValue("/root/main/item1/iteminfo/abnormaliscl");
- var indate = model.getValue("/root/main/item1/iteminfo/indd1");
- var spcdrugyn = model.getValue("/root/main/item1/iteminfo/spcdrugyn") ;
- var dcuc = model.getValue("/root/main/item1/iteminfo/dcuc");
- var jinyn = model.getValue("/root/main/item1/iteminfo/jinyn");
- var erjinyn = model.getValue("/root/main/item1/iteminfo/erjinyn");
-
- if (abnormalactingyn == "Y" && indate < opendd) {
- messageBox("AS-IS 처방이 비정상적으로 TO-BE 기간에 시행된 처방이 있습니다.","I007");
- }
- // 특수조제료 발생 처방이 있는데 주사제무균조제료가 발생하지 않았을 경우 메세지 - 20081108 박창원
- // 계산내역에 IJ0041 <> ast.adbmdrug - pcldrug ='D'
- // IJ0042 <> ast.adbmdrug - pcldrug in ('B','T')
- // IJ0043 <> ast.adbmdrug - pcldrug ='C' 계산내역에 주사무균조제료 갯수와 처방갯수가 틀리면 메시지 처리
- if (spcdrugyn == "Y" && dschnotiyn == "Y") {
- messageBox("주사제 무균조제료 발생 오류입니다.","I007");
- }
- // 실시처방과 계산내역이 맞지 않을경우 Alert - 20081110 박창원
- if ( (abnormaliscl == "Y" || abnormalexip == "Y") && dschnotiyn == "Y")
- {
- messageBox("실시내역과 계산내역이 일치하지 않습니다. 재계산 후.","I007");
- }
- // 미시행 처방이 있을 경우 alert - 20081013 박창원
- if (dschnotiyn == "Y" && fChkClose() == false) {
- messageBox("미 시행된 처방이 있습니다.","I007");
- }
-
- if (dcuc == "G") {
- messageBox("긴급지원 대상자 입니다.","I007");
- }
- // 동일과 내 1회 이상 진찰료(응급 전문의진찰료 포함) 발생 시 메세지 (2016.01.14 LEJ)
- if (jinyn == "Y") {
- messageBox("동일과 내 1회 이상 진찰료(응급 전문의진찰료 포함)가 발생했습니다.","I007");
- }
-
- // KTAS 4,5등급 환자에 응급 전문의진찰료 발생 시 메세지 (2016.01.14 LEJ)
- if (erjinyn == "Y") {
- messageBox("KTAS 4,5등급 환자에 응급 전문의진찰료가 발생했습니다.","I007");
- }
-
- // 명단위, 줄단위에 따라 특정코드 콤보 리스트 변경 및 특정코드에 해당하는 상세설명 적용
- var p0117list = instance1.selectSingleNode("/root/init/P0117list");
- for (var i=0; i<grd_clcjlist.rows; i++) {
- var unitflag = model.getValue("/root/main/list4/clcjlist["+ i + "]/unitflag");
- var spclcd = model.getValue("/root/main/list4/clcjlist["+ i + "]/spclcd");
-
- if (unitflag == "M") {
- if (p0117list != null) {
- var p0117 = p0117list.childNodes;
- for (var j = 1; j <= p0117.length; j++) {
- var cdid = model.getValue("/root/init/P0117list/P0117["+ j +"]/cdid");
- if (cdid == spclcd) {
- model.setValue("/root/main/list4/clcjlist["+ i +"]/detldesc", model.getValue("/root/init/P0117list/P0117["+ j +"]/detldesc"));
- j = p0117.length + 1;
- }
- }
- }
- grd_clcjlist.cellComboNodeset(i,3) = "/root/init/P0117list/P0117[minval = 'M' and cdid != 'MX999']";
- } else if (unitflag == "J") {
- if (p0117list != null) {
- var p0117 = p0117list.childNodes;
- for (var j = 1; j <= p0117.length; j++) {
- var cdid = model.getValue("/root/init/P0117list/P0117["+ j +"]/cdid");
- if (cdid == spclcd) {
- model.setValue("/root/main/list4/clcjlist["+ i +"]/detldesc", model.getValue("/root/init/P0117list/P0117["+ j +"]/detldesc"));
- j = p0117.length + 1;
- }
- }
- }
- grd_clcjlist.cellComboNodeset(i,3) = "/root/init/P0117list/P0117[minval = 'J']";
- }
- }
- // 최적화 문제로 추가 - 20081015 박창원
- grd_clcjlist.refresh();
-
- var orddeptcd = model.getValue("/root/main/item1/iteminfo/orddeptcd");
- var erorddeptcd = model.getValue("/root/main/item1/iteminfo/erorddeptcd");
-
- // 의료급여 정신과정액인경우 보조유형 메시지 처리
- if ((insukind == "21" || insukind == "22")
- && (suppkind != "14")
- && (orddeptcd == "2030000000" || erorddeptcd == "2030000000")) {
- messageBox("의료급여 정신과정액환자입니다. 보조유형을 14. 보호정신과정액으로 변경하세요.","I007");
- }
- model.refresh();
- }
- // 처방 색깔 항 구분에 따라 흰색-회색 구분되도록 처리한다.
- function fSetOrderColorByEdiitem() {
- var rowcnt = grd_ordlist.rows;
- var ediitem2 = "";
- var color = "#f4f4f4";
-
- for (var i = 0; i < rowcnt; i++) { // Grid 필터링 이후 Grid 상에 표시된 처방 개수만큼 돌면서
- //for (var i = 1; i < grd_ordlist.rows; i++) { // Grid 필터링 이후 Grid 상에 표시된 처방 개수만큼 돌면서
- //Color 표시 범례
- //1. 문제처방 : #fcd2c1
- //2. 선별심사 : #ffe79d
- //3. 선별심사 + 문제처방 : #7BE6B7
- //4. 야간, 공휴가산 : #ffff00(밝은노랑)
- var status = grd_ordlist.rowHidden(i);
- if (status == false) {
- var ediitem1 = grd_ordlist.valueMatrix(i, grd_ordlist.colRef("item1"));
- if (ediitem1.length > 0) {
- if (ediitem1 == ediitem2) {
- grd_ordlist.rowStyle(i,"data","background-color") = color;
- } else {
- ediitem2 = ediitem1;
- if (color == "#ffffff") {
- grd_ordlist.rowStyle(i,"data","background-color") = "#f4f4f4";
- color = "#f4f4f4";
-
- } else {
- grd_ordlist.rowStyle(i,"data","background-color") = "#ffffff";
- color = "#ffffff";
- }
- }
- }
- }
- }
- }
- // 상단에 환자정보 기입하기
- // 수정추가 : 20091006 JHP 상단정보로 파라미터 값 넘길때 기존엔 param 에 첫번재 값이 기준없이 무조건 I였는데 .응급기준을 확인하여 응급일때는 E로 나머지는 I로 셋팅한다.
- function fSetOutPatPamInfo() {
- var pid = model.getValue("root/main/item1/iteminfo/pid");
- var indd = model.getValue("root/main/item1/iteminfo/indd1");
- var cretno = model.getValue("root/main/item1/iteminfo/cretno");
- var instcd = model.getValue("root/main/item1/iteminfo/instcd");
- var ordtype = model.getValue("root/main/item1/iteminfo/ordtype");
-
- // 수정추가 퇴원환자일경우 상단정보 파라미터에 srchdd를 퇴원일자로 넣어주고 아니면 현재일자를 넣어준다. 20090916, JHP,(현대김영학 참조)
- var indschacptstat = model.getValue("root/main/item1/iteminfo/indschacptstat");
- var dschdd = model.getValue("root/main/item1/iteminfo/dschdd");
-
- if(indschacptstat == "D" || indschacptstat == "T"){
- var srchdd = dschdd;
- }else{
- var srchdd = VAL_today;
- }
-
- // param 첫번째 붙는 값은 외래 : O, 입원 : I, 지원부서 : S, 수술 : T, 응급 : E, 의뢰 : C
- //var param = "I" + "▦" + pid + "▦" + indd + "▦" + cretno + "▦" + instcd + "▦" + srchdd;
- if(ordtype == "E"){
- var param = "E" + "▦" + pid + "▦" + indd + "▦" + cretno + "▦" + instcd + "▦" + srchdd;
- }else{
- var param = "I" + "▦" + pid + "▦" + indd + "▦" + cretno + "▦" + instcd + "▦" + srchdd;
- }
-
- setParameter("condparam", param);
- setParameter("errflag", "Y");
- modal("SPMMO08900", 1, 0, 0, "", "", "", "left:0; right:0; width:0; height:0; sysmenu:hidden; caption:hidden; min:hidden, max:hidden;");
- var useyn = getParameter("SPMMO08900_rtn_useyn");
- if(useyn == "Y") {
- setParameter("SPMMO08900_rtn_useyn", "");
- }else{
- }
- }
- function fGetOperStat() {
- submit("TRPIJ00314",false);
- }
- // 처방내역을 갖고 온다.
- function fGetIsclList(paramFlag){
-
- // 수정추가 paramFlag에따라서 조회조건 놔둔다. 20090728 JHP
- if(paramFlag == "IPHS"){
- // 재원심사메인화면 우측상단 유형에서 더블클릭햇을때...JHP 20090728
- // 더블클릭시 값 지정하기에 따로 값셋팅안한다. ...JHP 20090728
- }else if(paramFlag == "Srch"){
- // 대상자조회에서 퇴원모드시 조회조건의 값이 있으면 이걸로 셋팅한다. ...JHP 20090728
- // 수정추가 JHP 20090427 퇴원모드조회조건 추가.. 신규 시작
- var dschmodesrch = model.getValue("/root/send/dschmodesrch"); // 퇴원모드 조회 조건
- var indschacptstat = model.getValue("/root/main/item1/iteminfo/indschacpstat"); // 입퇴원진행상태
- var lastjudgdt = model.getValue("/root/main/item1/iteminfo/lastjudgdt"); // 최종심사일시
- var lastmdlclamdd = model.getValue("/root/main/item1/iteminfo/lastmdlclamdd"); // 최종중간청구일시
- var indd = model.getValue("/root/main/item1/iteminfo/indd1"); // 입원일
- var lastjudgdt2 = "";
- var lastmdlclamdd2 = "";
-
- if (lastjudgdt != "" && lastjudgdt != "-") {
- // 수정, 최종심사일 다음날이 아니라 해당일부터여서 하루 더하는거 뺌. 20090729 JHP(yyy)요청
- lastjudgdt2 = lastjudgdt.toDate("YYYYMMDD");
- //lastjudgdt2 = lastjudgdt2.getAddDate(1);
- lastjudgdt2 = lastjudgdt2.getDateFormat();
- }
- // lastmdlclamdd 에 하루를 더한다.(중간청구 일자가 있으면)
- if (lastmdlclamdd != "" && lastmdlclamdd != "-" && lastmdlclamdd == null) {
- lastmdlclamdd2 = lastmdlclamdd.toDate("YYYYMMDD");
- lastmdlclamdd2 = lastmdlclamdd2.getAddDate(1);
- lastmdlclamdd2 = lastmdlclamdd2.getDateFormat();
- }
-
- if(dschmodesrch == "1"){
- if (lastmdlclamdd != "" && lastmdlclamdd != "-" && lastmdlclamdd == null) {
- if(lastmdlclamdd2 >= VAL_today){
- model.setValue("/root/send/ordfromdd",VAL_today);
- } else {
- model.setValue("/root/send/ordfromdd",lastmdlclamdd2);
- }
- model.setValue("/root/send/ordtodd",VAL_today);
- } else {
- model.setValue("/root/send/ordfromdd", indd);
- model.setValue("/root/send/ordtodd", VAL_today);
- }
- }else if(dschmodesrch == "2"){
- if(lastjudgdt != "" && lastjudgdt != "-"){
- if(lastjudgdt2 >= VAL_today){
- model.setValue("/root/send/ordfromdd",VAL_today);
- } else {
- model.setValue("/root/send/ordfromdd",lastjudgdt2);
- }
- model.setValue("/root/send/ordtodd",VAL_today);
- }else{
- model.setValue("/root/send/ordfromdd", indd);
- model.setValue("/root/send/ordtodd", VAL_today);
- }
-
- }else{
- // 아무것도 아닐때는 (퇴원모드조건아니면...) 처방구분 아무것도 아닌거하고 같다.
- //model.setValue("/root/send/ordfromdd", fromdd);
- //model.setValue("/root/send/ordtodd", todd);
-
- var ordfromdd = model.getValue("/root/send/fromdd");
- var ordtodd = model.getValue("/root/send/todd");
- var maxhopedd = model.getValue("/root/main/item1/iteminfo/maxhopedd");
- var tmp = model.getValue("/root/main/item1/iteminfo/lastjudgdt");
- var lastjudgdt = tmp.substr(0,4) + tmp.substr(4,2) + tmp.substr(6,2);
- var indd = model.getValue("/root/main/item1/iteminfo/indd1");
- var dschdd = model.getValue("/root/main/item1/iteminfo/dschdd");
- var dschnotiyn = model.getValue("/root/main/item1/iteminfo/dschnotiyn");
- var indschacptstat = model.getValue("/root/main/item1/iteminfo/indschacptstat");
- var lastmdlclamdd = model.getValue("/root/main/item1/iteminfo/lastmdlclamdd");
-
- // ordfromdd는 기본적으로 입원일로
- ordfromdd = indd;
- // ordtodd가 99991231이면 현재일로 set
- if (ordtodd == "99991231") {
- ordtodd = VAL_today;
- }
-
- // maxhopedd가 있는 경우에는 ordtodd를 maxhopedd로 set
- if (maxhopedd != "") {
- ordtodd = maxhopedd
- }
- // 최종심사일자가 있는 경우 최종심사일로 부터 시작일을 설정
- if (lastjudgdt != "" && lastjudgdt != "-") {
- ordfromdd = lastjudgdt;
- }
-
- // 퇴원환자 처리
- if (indschacptstat == "D") {
- ordfromdd = indd;
- ordtodd = dschdd;
- /* if (lastmdlclamdd != "") {
- ordfromdd = lastmdlclamdd;
- } */
- } else if (dschnotiyn == "Y") { // 퇴원확정환자는 디폴트로 입원일부터 중간청구 발생자는 중간청구 이후로
- ordfromdd = indd;
- if (lastmdlclamdd != "" && lastmdlclamdd != "-") {
- ordfromdd = lastmdlclamdd;
- }
- }
-
- // 시작일이 종료일보다 큰경우 종료일을 시작일과 동일하게 맞추어 준다.
- if (ordfromdd > ordtodd) {
- ordtodd = ordfromdd;
- }
- var opendd = model.getValue("/root/main/item1/iteminfo/opendd");
- if (ordfromdd < opendd) {
- ordfromdd = opendd;
- }
- model.setValue("/root/send/ordfromdd", ordfromdd);
- model.setValue("/root/send/ordtodd", ordtodd);
- }
- // 수정추가 JHP 20090427 퇴원모드조회조건 추가.. 신규 끝
- }else{
- // 기타는 값을 넣지 않아서 기본적으로 원래것을 타게 한다. ...JHP 20090728
-
- // 날짜 조회 전면 수정함 - 20081111 박창원
- /* [재원조회기간]
- 1-1. 재원심사 (재원퇴원심사 불문하고)
- default 심사일자~max hopdd(없으면 현재일)까지 조회
- 심사중에 조회기간을 조정시 상세내역 닫힌 후에도 그 환자를 저장하고 나가기 전까지는 그 조회기간으로 조회
- 상세에서 기간을 조회하면 메인화면도 조정됨
-
- 1-2. 체크박스 체크시(메인화면에서)
- default 입원시작일~max hopdd
- 중간청구시작일~오늘일자(중간청구한 환자-청구생성완료)
- 심사중에 조회기간을 조정시 상세내역 닫힌 후에도 그 환자를 저장하고 나가기 전까지는 그 조회기간으로 조회
- 상세에서 기간을 조회하면 메인화면도 조정됨
-
- 2. 퇴원 완료된 환자 조회시
- 입원일~퇴원일
- 중간청구시작일~오늘일자(중간청구한 환자-청구생성완료) */
-
- var ordfromdd = model.getValue("/root/send/fromdd");
- var ordtodd = model.getValue("/root/send/todd");
- var maxhopedd = model.getValue("/root/main/item1/iteminfo/maxhopedd");
- var tmp = model.getValue("/root/main/item1/iteminfo/lastjudgdt");
- var lastjudgdt = tmp.substr(0,4) + tmp.substr(4,2) + tmp.substr(6,2);
- var indd = model.getValue("/root/main/item1/iteminfo/indd1");
- var dschdd = model.getValue("/root/main/item1/iteminfo/dschdd");
- var dschnotiyn = model.getValue("/root/main/item1/iteminfo/dschnotiyn");
- var indschacptstat = model.getValue("/root/main/item1/iteminfo/indschacptstat");
- var lastmdlclamdd = model.getValue("/root/main/item1/iteminfo/lastmdlclamdd");
-
- // ordfromdd는 기본적으로 입원일로
- ordfromdd = indd;
- // ordtodd가 99991231이면 현재일로 set
- if (ordtodd == "99991231") {
- ordtodd = VAL_today;
- }
-
- // maxhopedd가 있는 경우에는 ordtodd를 maxhopedd로 set
- if (maxhopedd != "") {
- ordtodd = maxhopedd
- }
- // 최종심사일자가 있는 경우 최종심사일로 부터 시작일을 설정
- if (lastjudgdt != "" && lastjudgdt != "-") {
- ordfromdd = lastjudgdt;
- }
-
- // 퇴원환자 처리
- if (indschacptstat == "D") {
- ordfromdd = indd;
- ordtodd = dschdd;
- /* if (lastmdlclamdd != "") {
- ordfromdd = lastmdlclamdd;
- } */
- } else if (dschnotiyn == "Y") { // 퇴원확정환자는 디폴트로 입원일부터 중간청구 발생자는 중간청구 이후로
- ordfromdd = indd;
- if (lastmdlclamdd != "" && lastmdlclamdd != "-") {
- ordfromdd = lastmdlclamdd;
- }
- }
-
- // 시작일이 종료일보다 큰경우 종료일을 시작일과 동일하게 맞추어 준다.
- if (ordfromdd > ordtodd) {
- ordtodd = ordfromdd;
- }
- var opendd = model.getValue("/root/main/item1/iteminfo/opendd");
- if (ordfromdd < opendd) {
- ordfromdd = opendd;
- }
- model.setValue("/root/send/ordfromdd", ordfromdd);
- model.setValue("/root/send/ordtodd", ordtodd);
- }
- model.setValue("/root/send/mig", model.getValue("/root/main/item1/iteminfo/mig"));
- model.refresh();
- //처방조회 옵션에 항목구분에 처방이 있는 것만 Bold로 보여준다.
- fSetItemBold();
-
- // 20091126 수정추가 JHP 요청번호 8496, 주사제 4항1목, 마취제 5항 1목에 대해 1회량이 20이 넘으면 메세지 처리요청 ####################시작
- fChkinjanstmsg();
-
- }
- // 처방내역을 갖고 온다.
- function fGetIsclList_FromTo(){
- //model.resetInstanceNode("/root/send");
- var ordfromdd = model.getValue("/root/send/ordfromdd");
- var ordtodd = model.getValue("/root/send/ordtodd");
-
-
- //처방조회 시작일자와 종료일자가 없는 경우 보험내역 시작 종료일로 셋팅해 준다.
- if(ordfromdd == ""){
- model.setValue("/root/send/ordfromdd", model.getValue("/root/send/fromdd"));
- }
- if(ordtodd == ""){
- model.setValue("/root/send/ordtodd", model.getValue("/root/send/todd"));
- }
-
- if(ipt_pid.currentText.length >0) {
- var row = grd_ordlist.row;
- model.removeNodeset("/root/main/list2/iscllist");
- grd_ordlist.refresh();
-
- submit("TRPIJ00302");
- //model.refresh(); 최적화 문제로 대체
- //model.refreshpart("/root/main/list2/iscllist");
- grd_ordlist.row = row;
- grd_ordlist.topRow = row - 3;
-
- //처방조회 옵션에 항목구분에 처방이 있는 것만 Bold로 보여준다.
- fSetItemBold();
-
- } else {
- messageBox("환자번호를","C001");
- return;
- }
- }
- // 진료비 계산내역을 갖고 온다.
- function fGetCalc(){
- if(ipt_pid.currentText.length >0)
- {
- model.resetInstanceNode("/root/main/item2/itemcalc");
- var totalsumflag = model.getValue("/root/send/totalsumflag");
- if(!totalsumflag){
- model.setValue("/root/send/totalsumflag","N");
- }
- submit("TRPIJ00303");
- if(!totalsumflag){
- model.setValue("/root/send/totalsumflag","");
- }
-
- }else
- {
- //messageBox("환자번호를","C001");
- return;
-
- }
- }
- //중간청구 등록여부, 심사 마감상태, 문제환자여부, dump 유무 를 체크하여 버튼의 색상을 셋팅해준다.
- function fSetItemInfoSetting(){
- //중간청구 등록 여부
- var midcflag = model.getValue("/root/main/item1/iteminfo/midcflag");
- //분할 제외 대상자 여부
- var midregistyn = model.getValue("/root/main/item1/iteminfo/midregistyn");
-
- if(midcflag == "Y"){
- btn_midregist.attribute("class") = "btn2_letter6";
- btn_midregist.attribute("color") = "#ff0066";
- btn_midregist.disabled = false;
- btn_midregistyn.disabled = true;
- btn_midcomplete.disabled= false;
- btn_midcancel.disabled = false;
- } else {
- btn_midregist.attribute("class") = "btn2_letter6";
- btn_midregistyn.disabled = false;
- btn_midcomplete.disabled= true;
- btn_midcancel.disabled = true;
- // 분할 제외 대상자 인 경우
- if (midregistyn == "Y") {
- btn_midregistyn.attribute("class") = "btn2_letter6";
- btn_midregistyn.attribute("color") = "#ff0066";
- btn_midregist.disabled = true;
- } else {
- btn_midregistyn.attribute("class") = "btn2_letter6";
- //btn_midregistyn.attribute("class") = "btn2_letter6";
- btn_midregist.disabled = false;
- }
- }
-
- //퇴원심사 상태
- var dschjudgprcsstat = model.getValue("/root/main/item1/iteminfo/dschjudgprcsstat");
- if(dschjudgprcsstat == "C" ){ //퇴원마감
- btn_dschclose.attribute("class") = "btn5_letter6";
- btn_dschclose.attribute("color") = "#ff0066";
- btn_totjudgclose.attribute("class") = "btn2_letter6";
- btn_midcancel.visible = true;
- }else if(dschjudgprcsstat == "E" ){ //통합심사마감
- btn_totjudgclose.attribute("class") = "btn5_letter6";
- btn_totjudgclose.attribute("color") = "#ff0066";
- btn_dschclose.attribute("class") = "btn2_letter6";
- }else{
- btn_dschclose.attribute("class") = "btn2_letter6";
- btn_totjudgclose.attribute("class") = "btn2_letter6";
- btn_midcancel.visible = false;
- }
-
- //문제환자 여부
- var probjudgflag = model.getValue("/root/main/item1/iteminfo/probjudgflag");
- if(probjudgflag == "G"){
- model.setValue("/root/hidden/item1/probpatgreen","Y");
- model.setValue("/root/hidden/item1/probpatred","");
- }else if(probjudgflag == "R"){
- model.setValue("/root/hidden/item1/probpatred","Y");
- model.setValue("/root/hidden/item1/probpatgreen","");
- }else{
- model.setValue("/root/hidden/item1/probpatgreen","");
- model.setValue("/root/hidden/item1/probpatred","");
- }
-
- //dump 유무 : 버튼 빨간색 표기
- var dumpexistyn = model.getValue("/root/main/item1/iteminfo/dumpexistyn");
- if(dumpexistyn == "Y"){
- btn_dump.attribute("class") = "btn2_letter6";
- btn_dump.attribute("color") = "#ff0066";
- btn_dump.disabled = false;
- }else{
- btn_dump.attribute("class") = "btn2_letter6";
- }
-
- var recalcyn = model.getValue("/root/main/item1/iteminfo/recalcyn");
- if(recalcyn == "Y"){
- btn_recalc.attribute("class") = "btn2_letter6";
- btn_recalc.attribute("color") = "#ff0066";
- btn_recalc.disabled = false;
- }else{
- btn_recalc.attribute("class") = "btn2_letter6";
- }
-
- }
- //////////////////////////////////////////////////////////////////////////////////////////////////////////////
- //상병처리 관련 코딩 시작 //
- //////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
- // 상병 Grid 마우스 오른쪽 버튼 클릭시 팝업 메뉴 "상병순서 위로"
- function fDiagSeqUp() {
-
- var rowstatus = grd_diaglist.rowstatus(grd_diaglist.row);
- if (rowstatus == 4) { // 4 : delete
- return;
- }
- var diagseq = parseInt(model.getValue("/root/main/list3/diaglist["+ grd_diaglist.row +"]/seqno")); // 선택된 줄의 NO
- if (diagseq > 1) { // 첫번째 줄이 아닌 경우
- model.setValue("/root/main/list3/diaglist["+ grd_diaglist.row +"]/seqno", --diagseq);
- if (rowstatus == 0 || rowstatus == 2) {
- grd_diaglist.rowstatus(grd_diaglist.row) = 2; // 2 : update
- }
- // 바로 위 상병순서와 중복되는 경우
- var nextrow = grd_diaglist.row - 1;
- var nextdiagseq = model.getValue("/root/main/list3/diaglist["+ nextrow +"]/seqno");
- if (diagseq == nextdiagseq) {
- model.setValue("/root/main/list3/diaglist["+ nextrow +"]/seqno", ++diagseq);
- // rowstatus = grd_diaglist.rowstatus(nextrow);
- // if (rowstatus == 0 || rowstatus == 2) {
- // grd_diaglist.rowstatus(nextrow) = 2; // 2 : update
- // }
- }
- fSortDiagNo();
- }
- }
- // 상병 Grid 마우스 오른쪽 버튼 클릭시 팝업 메뉴 "상병순서 아래로"
- function fDiagSeqDown() {
- var rowstatus = grd_diaglist.rowstatus(grd_diaglist.row);
- if (rowstatus == 4) { // 4 : delete
- return;
- }
- // 삭제 상태가 아닌 마지막 줄을 찾는다.
- var lastRow = grd_diaglist.rows - 1;
- for (var i = 1; i < grd_diaglist.rows; i++) {
- if (grd_diaglist.rowstatus(i) == 4) { // delete
- lastRow = i - 1;
- i = grd_diaglist.rows;
- }
- }
- var diagseq = parseInt(model.getValue("/root/main/list3/diaglist["+ grd_diaglist.row +"]/seqno")); // 선택된 줄의 NO
- if (diagseq < lastRow) { // 마지막 줄이 아닌 경우
- model.setValue("/root/main/list3/diaglist["+ grd_diaglist.row +"]/seqno", ++diagseq);
- if (rowstatus == 0 || rowstatus == 2) {
- grd_diaglist.rowstatus(grd_diaglist.row) = 2; // 2 : update
- }
- // 바로 아래 상병순서와 중복되는 경우
- var nextrow = grd_diaglist.row + 1;
- var nextdiagseq = model.getValue("/root/main/list3/diaglist["+ nextrow +"]/seqno");
- if (diagseq == nextdiagseq) {
- model.setValue("/root/main/list3/diaglist["+ nextrow +"]/seqno", --diagseq);
- }
- fSortDiagNo();
- }
- }
- // "상병순서 위로/아래로" 순서 변경 후에 상병 순서 NO에 따라 sorting 작업
- function fSortDiag() {
- var maxRow = parseInt(grd_diaglist.rows) - 1; // rows는 타이틀부분 부터 개수를 센다
- grd_diaglist.sort(1, 1, maxRow, 1) = "asc"; // 타이틀을 제외한 data 부분의 첫 줄의 row = 1
- // model.refresh(); 최적화문제로 대체 20080731 박창원
- model.refreshpart("/root/main/list3/diaglist");
- // Sort 된 Grid 상의 Data 순서와 Instance Node 상의 Data 순서를 동일하게 맞춰준다.
- grd_diaglist.gridToInstance();
- }
- // "상병순서 위로/아래로" 순서 변경 후에 상병 순서 NO에 따라 sorting 작업
- function fSortDiagNo2() {
-
- var delcnt = 0;
- for (var i = 1; i < grd_diaglist.rows; i++) {
- grd_diaglist.rowHidden(i) = false;
- }
-
- var cldino = 1;
- for (var i = 1; i < grd_diaglist.rows; i++) {
- model.setValue("/root/main/list3/diaglist[" + i + "]/seqno", i);
- rowstatus = grd_diaglist.rowstatus(i);
- }
- var maxRow = parseInt(grd_diaglist.rows) - 1; // rows는 타이틀부분 부터 개수를 센다
- grd_diaglist.sort(1, grd_diaglist.colRef("seqno"), maxRow , grd_diaglist.colRef("seqno")) = "asc"; // 타이틀을 제외한 data 부분의 첫 줄의 row = 1 / col = 3 : no
- if (delcnt > 0) {
- grd_diaglist.sort(1, grd_diaglist.colRef("seqno"), maxRow - delcnt, grd_diaglist.colRef("seqno")) = "asc"; // 타이틀을 제외한 data 부분의 첫 줄의 row = 1 / col = 3 : no
- }
- // Sort 된 Grid 상의 Data 순서와 Instance Node 상의 Data 순서를 동일하게 맞춰준다.
- grd_diaglist.gridToInstance();
-
- var rowstatus;
- for (var i = 1; i < grd_diaglist.rows; i++) {
- rowstatus = grd_diaglist.rowstatus(i);
- if (rowstatus > 3) { // 삭제상태
- grd_diaglist.rowHidden(i) = true;
- } else {
- grd_diaglist.rowHidden(i) = false;
- }
- }
- }
- function fSortDiagNo() {
-
- var maxRow = parseInt(grd_diaglist.rows) - 1; // rows는 타이틀부분 부터 개수를 센다
- grd_diaglist.sort(1, 1, maxRow, 1) = "asc"; // 타이틀을 제외한 data 부분의 첫 줄의 row = 1
- // model.refresh(); 최적화문제로 대체 20080731 박창원
- model.refreshpart("/root/main/list3");
-
- // Sort 된 Grid 상의 Data 순서와 Instance Node 상의 Data 순서를 동일하게 맞춰준다.
- grd_diaglist.gridToInstance();
-
- //루핑을 돌면서 순번을 맞춰주고, 모두 insert모드로 바꿔준다.
- //상병은 History를 남기지 않고 그냥 모두 삭제 후 다시 insert로 처리한다.
- //상병 순번이 key라서 update로 하면 바뀐 seq입력시 기존것이 아직 안바뀌었으면 Dup에러 발생함으로.
- for(i =1; i<grd_diaglist.rows;i++){
- model.setValue("/root/main/list3/diaglist[" + i + "]/seqno", i);
- grd_diaglist.rowstatus(i) = 1;
- }
- }
- function fDiagGridAddRow(addyn, selectyn) {
- var iInsertRow = 0;
- if (grd_diaglist.rows == 1 || addyn == "Y") {
- iInsertRow = grd_diaglist.row;
- grd_diaglist.addRow(false, false);
- } else {
-
- iInsertRow = grd_diaglist.row;
- grd_diaglist.insertRow(iInsertRow, "below", false,false);
- }
-
- var nowRow = 0;
- nowRow = grd_diaglist.row;
-
- model.setValue("/root/main/list3/diaglist["+ grd_diaglist.row +"]/seqno", grd_diaglist.row);
- // 청구과, 진료개시일은 주상병을 기준으로 부여한다.
- var clamdeptcd = model.getValue("/root/main/list3/diaglist/orddeptcd");
- if (clamdeptcd == "") { // 주상병의 진료과가 입력되지 않은 경우 인적사항의 청구과를 입력한다.
- clamdeptcd = model.getValue("/root/main/item1/iteminfo/orddeptcd");
- }
- model.setValue("/root/main/list3/diaglist["+ grd_diaglist.row +"]/orddeptcd", clamdeptcd);
-
- var ordfromdd = model.getValue("/root/main/list3//diaglist/ordfromdd");
- if (ordfromdd) {
- model.setValue("/root/main/list3//diaglist["+ grd_diaglist.row +"]/ordfromdd", ordfromdd);
- } else {
- model.setValue("/root/main/list3//diaglist["+ grd_diaglist.row +"]/ordfromdd", model.getValue("/root/main/item1/iteminfo/indd"));
- }
- model.setValue("/root/main/list3/diaglist["+ grd_diaglist.row +"]/toot", "-");
-
- // 상병이력조회에서 호출된 경우가 아니면
- if (selectyn != "Y") {
- fSortDiagNo2(true);
- }
-
- // edit mode 설정위한것임 절대 지우지 말것.
- grd_diaglist.refresh();
-
- if (addyn != "Y") {
- grd_diaglist.row = nowRow;
- grd_diaglist.col = grd_diaglist.colRef("diagcd");
- grd_diaglist.dispatch("onentercell");
- }
- }
- // 상병 Grid 마우스 오른쪽 버튼 클릭시 팝업 메뉴 "행 추가"
- function fDiagGridInsertRow() {
-
- // 2008.03.06 박지욱 추가 (상병의 진료개시일은 중간청구최종시작일자, 중간청구등록이 없으면 입원일자 세팅)
- model.removenode("/root/hidden/mdlclamrgst");
- model.makeNode("/root/hidden/mdlclamrgst");
-
- var indd = model.getValue("/root/main/item1/iteminfo/indd");
- var deptcd = model.getValue("/root/main/item1/iteminfo/orddeptcd");
- //속도개선 plet2 상병리스트에서 마지막 날짜를 가져오도록.
- //submit("TRPIJ00313");
- var fromdd = model.getXPathValue("/root/main/list3/diaglist[last()]/ordfromdd");
- if (fromdd == "") {
- var indd = model.getValue("/root/send/ordfromdd");
- fromdd = indd;
- }
-
- // 삭제 상태가 아닌 마지막 줄을 찾는다.
- var diagrow = grd_diaglist.rows - grd_diaglist.fixedRows; // 상병 Grid 가장 마지막 줄에 추가한다.
- grd_diaglist.insertRow(diagrow++, true,false,false);
- model.setValue("/root/main/list3/diaglist[" + diagrow + "]/seqno", diagrow);
- model.setValue("/root/main/list3/diaglist[" + diagrow + "]/ordfromdd", fromdd); // 진료개시일
- model.setValue("/root/main/list3/diaglist[" + diagrow + "]/orddeptcd", deptcd); // 진료과
-
- fSortDiagNo();
- // 행추가 시 맨 밑에 행이 보일 수 있드록 추가 ( 2007.10.09 김건기 )
- grd_diaglist.bottomRow = grd_diaglist.rows;
-
- // 행추가 후 상병코드 컬럼으로 포커스 이동 ( 2007.10.09 김건기 )
- model.setFocus("grd_diaglist");
-
- // edit mode 설정위한것임 절대 지우지 말것.
- grd_diaglist.refresh();
-
- grd_diaglist.row = diagrow;
- grd_diaglist.col = grd_diaglist.colref("diagcd");
- //grd_diaglist.dispatch("onentercell");
- //grd_diaglist.editCell();
- }
- // 상병 다섯줄 추가
- function fDiagGridInsertRow5() { // 20080826 박창원 추가
- // 2008.03.06 박지욱 추가 (상병의 진료개시일은 중간청구최종시작일자, 중간청구등록이 없으면 입원일자 세팅)
- model.removenode("/root/hidden/mdlclamrgst");
- model.makeNode("/root/hidden/mdlclamrgst");
-
- var indd = model.getValue("/root/main/item1/iteminfo/indd");
- var deptcd = model.getValue("/root/main/item1/iteminfo/orddeptcd");
-
- var fromdd = model.getXPathValue("/root/main/list3/diaglist[last()]/ordfromdd");
- if (fromdd == "") {
- var indd = model.getValue("/root/send/ordfromdd");
- fromdd = indd;
- }
-
- for (var i = 1; i <= 5; i++) {
- var lastRow = grd_diaglist.rows - 1;
- var diagrow = lastRow; // 상병 Grid 가장 마지막 줄에 추가한다.
- grd_diaglist.insertRow(diagrow++, true,false,false);
- model.setValue("/root/main/list3/diaglist[" + diagrow + "]/seqno", diagrow);
- model.setValue("/root/main/list3/diaglist[" + diagrow + "]/ordfromdd", fromdd); // 진료개시일
- model.setValue("/root/main/list3/diaglist[" + diagrow + "]/orddeptcd", deptcd); // 진료과
- }
- fSortDiagNo();
- // 행추가 시 맨 밑에 행이 보일 수 있드록 추가 ( 2007.10.09 김건기 )
- grd_diaglist.topRow = grd_diaglist.rows - 6;
-
- // 행추가 후 상병코드 컬럼으로 포커스 이동 ( 2007.10.09 김건기 )
- model.setFocus("grd_diaglist");
- grd_diaglist.row = diagrow - 5;
- grd_diaglist.col = grd_diaglist.colref("diagcd");
- grd_diaglist.dispatch("onentercell");
- grd_diaglist.editCell();
- }
- // 상병 Grid 마우스 오른쪽 버튼 클릭시 팝업 메뉴 "행 삭제"
- function fDiagGridDeleteRow() {
- //상병은 삭제시 무조건 삭제를 날려 버린다.
- for( var i = 0; i < grd_diaglist.selectedRows; i++ ){
- var cRrow = grd_diaglist.selectedRow(i);
- grd_diaglist.rowstatus(cRrow) = 4; // 4 : delete 상태로 stat를 변경한다.
- }
- var tmp = grd_diaglist.rows;
- for(var k = tmp; k >= 0;k--){
- if(grd_diaglist.rowstatus(k) == "4"){
- grd_diaglist.deleteRow(k, false);
- }
- }
- //model.refresh(); 최적회 때문에 20080731 박창원
- model.refreshpart("/root/main/list3/diaglist");
- fSortDiagNo();
- }
- // 상병코드 조회 팝업
- function fSearchDiageCode() {
-
- var row = grd_diaglist.row;
- var diagcd = model.getValue("/root/main/list3/diaglist["+ row + "]/diagcd");
-
- model.removeNodeset("/root/hidden/sppiz00400/rslt");
- // 상병 Data가 2007년 이후로 설정되어 있으므로 임시로 현재 날짜를 넘긴다.
- //model.makeValue("/root/hidden/sppiz00400/cond/basedd", model.getValue("/root/main/item1/clbs/clamdd"));
- model.resetInstanceNode("/root/hidden/sppiz00400/cond");
- model.makeValue("/root/hidden/sppiz00400/cond/basedd", VAL_today); // (dateHelper.js) 현재날짜 반환
- model.makeValue("/root/hidden/sppiz00400/cond/diagcd", diagcd);
- model.makeNode("/root/hidden/sppiz00400/cond/diagnm");
- model.makeValue("/root/hidden/sppiz00400/cond/selectedrdodiagkind","1");
-
- if(diagcd){
- submit("TRPIJ00308",false); // 입력된 상병코드로 emr.mrtmicd10 테이블을 조회한다.
-
- var rsltList = instance1.selectSingleNode("/root/hidden/sppiz00400");
- if (rsltList != null && rsltList.childNodes.length == 1) {
- // 조회된 결과가 1건이면
- fSetDiagCdNm();
- } else {
- // 조회된 결과가 없거나 여러 건이면
- // 상병코드 조회를 위해 SPPIZ00400_상병코드조회.xrw 를 호출한다.
- fSearchSPPIZ00400();
- }
- } else {
- // 상병코드 입력 없이 상병명 선택 시
- fSearchSPPIZ00400();
- }
- }
- // 상병코드 조회를 위해 SPPIZ00400_상병코드조회.xrw 를 호출한다.
- function fSearchSPPIZ00400() {
- model.removeNodeset("/root/hidden/sppiz00400/rslt");
- model.makeNode("/root/hidden/sppiz00400/rslt/diagcd");
- model.makeNode("/root/hidden/sppiz00400/rslt/diaghngnm");
- model.makeNode("/root/hidden/sppiz00400/rslt/diagengnm");
-
- model.resetInstanceNode("/root/hidden/sppiz00400/cond");
- model.makeValue("/root/hidden/sppiz00400/cond/basedd", VAL_today); // (dateHelper.js) 현재날짜 반환
- model.makeValue("/root/hidden/sppiz00400/cond/diagcd", model.getValue("/root/main/list3/diaglist["+ grd_diaglist.row + "]/diagcd"));
- model.makeNode("/root/hidden/sppiz00400/cond/diagnm");
- model.makeValue("/root/hidden/sppiz00400/cond/selectedrdodiagkind","3"); // 사용자가 직접검색하여 입력 할수 있도록 임의의 값(3)을 넣어줌
- modal("SPPIZ00400" ,"", "10", "10", "SPPIZ00400", "/root/hidden/sppiz00400/cond", "/root/init", "", ""); // SPPIZ00400_상병코드조회.xrw
- }
- // [SPPIZ00400_상병코드조회.xrw 에서 호출] 상병조회 팝업에서 상병을 더블클릭 했을경우 상병 그리드에 반영
- function fSetDiagCdNm() {
- var diagcd = model.getValue("/root/hidden/sppiz00400/rslt/diagcd");
- var diaghngnm = model.getValue("/root/hidden/sppiz00400/rslt/diaghngnm");
- var diagengnm = model.getValue("/root/hidden/sppiz00400/rslt/diagengnm");
- var spclcd = model.getValue("/root/hidden/sppiz00400/rslt/spclcd");
- var currRow = grd_diaglist.row;
-
- //20090810 JHP 수정추가. 상병 조회팝업에서 상병조회 후 적용하려고 할때 인스턴스 증가(행추가)하여 적용시킨다.
- if(grd_diaglist.row <= 0){
- fDiagGridInsertRow();
- grd_diaglist.endEditCell();
- }else{
- var chkdiagcd = model.getValue("/root/main/list3/diaglist["+ currRow + "]/diagcd");
- var chkdiagnm = model.getValue("/root/main/list3/diaglist["+ currRow + "]/diagnm");
- if((chkdiagcd != "" || chkdiagcd != " " || chkdiagcd != null) &&
- (chkdiagnm == "" || chkdiagnm == " " || chkdiagnm == null)){
- ;
- }else if((chkdiagcd != "" || chkdiagcd != " " || chkdiagcd != null) &&
- (chkdiagnm != "" || chkdiagnm != " " || chkdiagnm != null)){
- ;
- }else{
- fDiagGridInsertRow();
- grd_diaglist.endEditCell();
- }
- }
-
- if (diagcd) {
- grd_diaglist.endEditCell();
- model.setValue("/root/main/list3/diaglist["+ currRow + "]/diagcd", diagcd);
- }
- if (diaghngnm) {
- model.setValue("/root/main/list3/diaglist["+ currRow + "]/diagnm", diaghngnm);
- }
- if(diagengnm){
- model.setValue("/root/main/list3/diaglist["+ currRow + "]/diagengnm", diagengnm);
- }
- if(spclcd){
- model.setValue("/root/main/list3/diaglist["+ currRow + "]/vcode", spclcd);
- }
- var chk_key = model.getValue("/root/main/list3/diaglist["+ currRow + "]/pid");
-
- //신규로 불러온 입력되는 경우는 Insert시 key값이 없으므로 기본 정보에서 읽어다 넣어 준다.
- if(chk_key){
- return;
- }else{
- //Pid
- model.setValue("/root/main/list3/diaglist["+ currRow + "]/pid",model.getValue("/root/send/pid"));
- //Indd
- model.setValue("/root/main/list3/diaglist["+ currRow + "]/indd",model.getValue("/root/send/indd"));
- //Cretno
- model.setValue("/root/main/list3/diaglist["+ currRow + "]/cretno",model.getValue("/root/send/cretno"));
- //fromdd
- model.setValue("/root/main/list3/diaglist["+ currRow + "]/fromdd",model.getValue("/root/send/fromdd"));
- //mskind
- model.setValue("/root/main/list3/diaglist["+ currRow + "]/mskind",model.getValue("/root/send/mskind"));
- //drinptyn
- model.setValue("/root/main/list3/diaglist["+ currRow + "]/drinptyn","N");
- //addflag
- model.setValue("/root/main/list3/diaglist["+ currRow + "]/addflag","Y");
- if(grd_diaglist.row >1){
- //orddeptcd
- model.setValue("/root/main/list3/diaglist["+ currRow + "]/orddeptcd",model.getValue("/root/main/list3/diaglist[1]/orddeptcd"));
- //ordfromdd
- model.setValue("/root/main/list3/diaglist["+ currRow + "]/ordfromdd",model.getValue("/root/main/list3/diaglist[1]/ordfromdd"));
- }
-
- //저장후 빈행을 추가해 준다.
- //20080811 자동으로 줄추가 되는 기능 제외
- fDiagGridInsertRow();
- }
-
- // model.refresh(); 최적화 문제로 대체 20080731 박창원
- model.refreshpart("/root/main/list3/diaglist");
- }
- function fChangeRate() {
- grp_changeownbrate.visible = true;
- }
- function fUpdDiag() {
- var chk = model.getValue("/root/main/item1/iteminfo/patnm");
- if(chk){
- //fGetIsclList
- fRefreshDiag(); // 특정 환자에 대한 전상병 내역을 조회한다.
- // 20080811 제외하기로함(상병줄추가(자동)
- //fDiagGridInsertRow();
- }
- }
- function fChangeRate1() {
- // 6시간 미만 환자는 입원에만 해당하는 요율을 적용할 수 없다. - 20081105 박창원
- var suppkind = cmb_suppkindlist.value;
- var sixtimyn = model.getValue("/root/main/item1/iteminfo/sixtimyn");
- var suppkindcd = model.getValue("/root/main/item1/iteminfo/suppkindcd");
-
- //20090325 차상위 2종추가 - 박창원
- if (sixtimyn == "Y" && (suppkind == "05" || suppkind == "08" || suppkind == "09" || suppkind == "31" || suppkind == "39" || suppkind == "41" || suppkind == "42" || suppkind == "43")) {
- messageBox("6시간 미만환자는 입원에만 적용되는 보조유형으로 변경을","E001");
- grp_changeownbrate.visible = false;
- return;
- }
-
- // 6세미만, 신생아는 조건에 맞지 않으면 Block - 20090103 박창원
- if (suppkind == "08" || suppkind == "31" || suppkind == "41")
- var age = parseInt(model.getValue("/root/main/item1/iteminfo/age"));
- var indd = model.getValue("/root/main/item1/iteminfo/indd1");
- var insukindcd = model.getValue("/root/main/item1/iteminfo/insukindcd");
- var inpath = model.getValue("/root/main/item1/iteminfo/inpath");
- var orddeptcd = model.getValue("/root/main/item1/iteminfo/orddeptcd");
- var rrgstno = model.getValue("/root/main/item1/iteminfo/rrgstno");
- var sixtimyn = model.getValue("/root/main/item1/iteminfo/sixtimyn");
- var babyyn ="N";
- var end6yn = "N";
- var brthdd = "20" + rrgstno.substr(0,6);
- var readonly = model.getValue("/root/send/readonly");
-
- // 신생아를 구별지음
- if (rrgstno.substr(7,1) == "3" || rrgstno.substr(7,1) == "4" || rrgstno.substr(7,1) == "7" || rrgstno.substr(7,1) == "8") {
- var interval = getDateInterval(brthdd,indd);
- if (interval < "28") {
- babyyn = "Y";
- }
- }
- // 6세미만 생일 여부를 판단함
- if ((rrgstno.substr(7,1) == "3" || rrgstno.substr(7,1) == "4") && age <= 6) {
- if (age == 6) {
- if (brthdd >= VAL_today) {
- end6yn = "Y";
- }
- } else if (age == 6){
- if (brthdd < VAL_today) {
- end6yn = "N";
- }
- } else if(age < 6) {
- end6yn = "Y";
- } else if (age > 6) {
- end6yn ="N";
- }
- }
-
- var reqdeptno = model.getValue("/root/hidden/list2/dept[deptcd='"+orddeptcd+"']reqdeptno");
- if (sixtimyn == "N" && babyyn == "Y" &&age == 0 && indd >= "20080101" && reqdeptno == "11" && (insukindcd == "11" || insukindcd == "21" || insukindcd == "22")) {
- if (suppkind != "31") {
- messageBox("신생아 조건에 맞지 않아 변경을","E001");
- grp_changeownbrate.visible = false;
- return;
- }
- }
-
- if (sixtimyn == "N" && end6yn == "Y" && babyyn == "N" && age <= 6 && reqdeptno == "11" && (insukindcd == "11" || insukindcd == "21" || insukindcd == "22")) {
- if (suppkind != "08" && suppkind != "41") { // 20090325 차상위 2종 조건 추가 - 박창원
- if (suppkind != "31") {
- messageBox("6세미만 조건에 맞지 않아 변경을","E001");
- grp_changeownbrate.visible = false;
- return;
- }
- }
- }
-
- var msg = messageBox("선택하신 요율을 적용","S001");
- if(msg !=6){
- return;
- }else{
- Insuchange(suppkind);
- }
- }
- //////////////////////////////////////////////////////////////////////////////////////////////////////////////
- //상병조회버튼에 대한 처리 //
- //////////////////////////////////////////////////////////////////////////////////////////////////////////////
- // 수가 조회
- function fSetSrchCalcScorCdPop(){
- model.setValue("/root/hidden/smpic00100/cond/calcscorcd", grd_ordlist.valueMatrix(grd_ordlist.row, grd_ordlist.colRef("snglcalcscorcd")));
- model.setValue("/root/hidden/smpic00100/cond/judgflag", "Y");
- modal("SMPIC00100", 1,150, 150, "SMPIC00100", "/root/hidden/smpic00100/cond", "/root/temp/item6", "", "");
- }
- // 보험인정기준관리 화면 호출 20091105 수정추가 JHP 요청번호 : 5874
- function fSetSrchInsuRcogBaseMngt(){
- var calcscorcd = grd_ordlist.valueMatrix(grd_ordlist.row, grd_ordlist.colRef("snglcalcscorcd"));
- model.setValue("root/hidden/sppiz01600/cond/calcscorcd", calcscorcd);
- // SPPIZ01600_보험인정기준조회 팝업 연결 (선택된 row의 처방코드를 넘겨준다.)
- modal("SPPIZ01600", 1,150, 150, "SPPIZ01600", "/root/hidden/sppiz01600/cond/calcscorcd", "/root/send/item3/calcscorcd", "", "");
- }
- // 보험인정기준관리 화면 호출 20091105 수정추가 JHP 요청번호 : 5874 호출함수. - 미사용
- function getOpenInsuRcogBaseMngtChk(){
- var temp = getChildWindow("ddd");
- var nodecnt = 0;
- var xPathFunction = "count(/root/main/h_limi/limi)";
- while (nodecnt == 0)
- {
- nodecnt = temp.model.getXPathValue(xPathFunction);
- if (nodecnt >= 500){
- temp.messageBox("해당코드 인정기준을 확인합니다.","I002");
- temp.model.setValue("/root/main/right/h_limt/limt/limt_calcscorcd" ,grd_ordlist.valueMatrix(grd_ordlist.row, grd_ordlist.colRef("snglcalcscorcd")));
- temp.ipt_calcscorcd.dispatch("onkeypress");
- temp.model.refresh();
- break;
- }
- }
- }
- // 약품편람 호출 - 20080930 박창원
- function fOpenDrugDic() {
- open("SMADB01900","","","","bbb","","","","");
- var temp = getChildWindow("bbb");
- // 필터링 할 경우 row값을 제대로 못 가져와서 valueMatrix로 변경함. 2012.02.16 LEJ
- temp.model.setValue("/root/hidden/receivedata/srchdrugcd", grd_ordlist.valueMatrix(grd_ordlist.row,grd_ordlist.colRef("snglcalcscorcd")));
- }
- // 의약품정보 호출 - 20080930 박창원
- function fOpenDruginfo() {
- open("SMADB00100","","","","ccc","","","","");
- var temp = getChildWindow("ccc");
- temp.model.setValue("/root/send/srchinfo/srchcd", grd_ordlist.valueMatrix(grd_ordlist.row,grd_ordlist.colRef("snglcalcscorcd")));
- }
- // 환자단위 메시지 전송
- function fSendMsgPat() {
- model.makeValue("/root/temp/opentab", "pmsg");
- zmifOpenMessagePopup("/root/temp"); // root/temp/opentab 에 receivemsg (받은메세지함) 값을 주고 오픈한다.
- }
- // 처방단위 메시지 전송
- function fSendMsgOrder() {
- model.makeValue("/root/temp/opentab", "pmsg");
- zmifOpenMessagePopup("/root/temp"); // root/temp/opentab 에 pmsg (환자메세지작성창) 값을 주고 오픈한다.
- }
-
- // 처방상병을 끌고 온다.
- function fRefreshDiag() {
- if(model.getValue("/root/main/item1/iteminfo/patnm")){
- // 심사대상자의 등록번호를 조건으로 하여 전체 상병이력을 조회한다.
- var cnt = grd_diaglist.rows;
- submit("TRPIJ00306");
- // model.refresh(); 최적화문제로 주석처리 - 20081015 박창원
- for(var i = 1; i < grd_diaglist.rows; i++) {
- var chkflag = model.getValue("/root/main/list3/diaglist["+ i + "]/chkflag");
-
- if(chkflag == "2"){
- grd_diaglist.rowstatus(i) = 1;
- }
-
- }
- }
- }
- // 특정 환자에 대한 청구상병을 조회한다.
- function fGetClamDiagHistList() {
- if(model.getValue("/root/main/item1/iteminfo/patnm")){
- // 심사대상자의 등록번호를 조건으로 하여 전체 청구 상병이력을 조회한다.
- model.setValue("/root/hidden/smpiz00100/cond/pid", model.getValue("/root/main/item1/iteminfo/pid"));
- model.setValue("/root/hidden/smpiz00100/cond/ordfromdd", model.getValue("/root/main/item1/iteminfo/indd"));
- model.setValue("/root/hidden/smpiz00100/cond/ordtodd", model.getValue("/root/main/item1/iteminfo/dschdd"));
- model.setValue("/root/hidden/smpiz00100/cond/srchflag", "pam"); // 검색구분 Radio : 청구
- modal("SMPIZ00100" ,"", "10", "10", "SMPIZ00100", "/root/hidden/smpiz00100/cond", "/root/init", "", ""); // SMPIZ00100_외래입원상병이력조회.xrw
- // model.refresh(); 최적화 문제로 20080731 박창원
-
- var rsltNode = instance1.selectSingleNode("/root/hidden/smpiz00100/rslt");
- var originpid = model.getValue("/root/main/item1/iteminfo/pid");
-
- if (rsltNode != null) {
- for (var i = 1; i <= rsltNode.childNodes.length; i++) {
-
- var diagcd = model.getValue("/root/hidden/smpiz00100/rslt/diag["+ i +"]/diagcd");
- var isSame = false;
- for (var j = grd_diaglist.fixedRows; j < grd_diaglist.rows; j++) {
- if (diagcd == model.getValue("/root/main/list3/diaglist["+ j +"]/diagcd")) {
- // 동일한 상병이 존재하는 경우
- isSame = true;
- j = grd_diaglist.rows;
- }
- }
- // 동일한 상병이 없는 경우
- if (isSame == false) {
- grd_diaglist.addRow(false,true);
- var pid = model.getValue("/root/main/item1/iteminfo/pid");
- var indd = model.getValue("/root/main/item1/iteminfo/indd1");
- var cretno = model.getValue("/root/main/item1/iteminfo/cretno");
- var fromdd = model.getValue("/root/main/item1/iteminfo/fromdd");
- var mskind = model.getValue("/root/main/item1/iteminfo/mskind");
-
- var ruleoutyn = model.getValue("/root/hidden/smpiz00100/rslt/diag["+ i +"]/diagkindcd");
- if(ruleoutyn == "C"){
- model.setValue("/root/main/list3/diaglist["+ grd_diaglist.row +"]/ruleoutyn", "false");
- }else{
- model.setValue("/root/main/list3/diaglist["+ grd_diaglist.row +"]/ruleoutyn", "true");
- }
- model.setValue("/root/main/list3/diaglist["+ grd_diaglist.row +"]/pid", pid);
- model.setValue("/root/main/list3/diaglist["+ grd_diaglist.row +"]/indd", indd);
- model.setValue("/root/main/list3/diaglist["+ grd_diaglist.row +"]/cretno", cretno);
- model.setValue("/root/main/list3/diaglist["+ grd_diaglist.row +"]/fromdd", fromdd);
- model.setValue("/root/main/list3/diaglist["+ grd_diaglist.row +"]/mskind", mskind);
- model.setValue("/root/main/list3/diaglist["+ grd_diaglist.row +"]/addflag", "Y");
- model.setValue("/root/main/list3/diaglist["+ grd_diaglist.row +"]/drinptyn", "N");
-
- model.setValue("/root/main/list3/diaglist["+ grd_diaglist.row +"]/seqno", grd_diaglist.row);
- model.setValue("/root/main/list3/diaglist["+ grd_diaglist.row +"]/diagcd", model.getValue("/root/hidden/smpiz00100/rslt/diag["+ i +"]/diagcd"));
- model.setValue("/root/main/list3/diaglist["+ grd_diaglist.row +"]/diagnm", model.getValue("/root/hidden/smpiz00100/rslt/diag["+ i +"]/diaghngnm"));
- model.setValue("/root/main/list3/diaglist["+ grd_diaglist.row +"]/diagengnm", model.getValue("/root/hidden/smpiz00100/rslt/diag["+ i +"]/diagengnm"));
- // 청구과, 진료개시일은 주상병을 기준으로 부여한다.
- var clamdeptcd = model.getValue("/root/main/list3/diaglist/orddeptcd");
- if (clamdeptcd == "") { // 주상병의 진료과가 입력되지 않은 경우 인적사항의 진료과를 입력한다.
- clamdeptcd = model.getValue("/root/main/item1/iteminfo/orddeptcd");
- }
- model.setValue("/root/main/list3/diaglist["+ grd_diaglist.row +"]/orddeptcd", clamdeptcd);
- model.setValue("/root/main/list3/diaglist["+ grd_diaglist.row +"]/ordfromdd", model.getValue("/root/main/list3/diaglist/ordfromdd"));
- model.setValue("/root/main/list3/diaglist["+ grd_diaglist.row +"]/toot", "-");
- }
- }
- fSortDiagNo(true);
- }
-
- }
- }
- //////////////////////////////////////////////////////////////////////////////////////////////////////////////
- //상병처리 관련 코딩 끝 //
- //////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
- //////////////////////////////////////////////////////////////////////////////////////////////////////////////
- //처장 Filter 관련 코딩 //
- //////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
-
- // 처방 조회부 - 재행/급여/항목구분 Radio 선택에 따라 처방 내역을 보여준다.
- function fGetSelectedOrderData() {
-
- var matractflag = model.getValue("/root/hidden/list1/isclcond/matractflag");
- var calcpayflag = model.getValue("/root/hidden/list1/isclcond/calcpayflag");
- var snglcalcscorcls = model.getValue("/root/hidden/list1/isclcond/snglcalcscorcls");
- var cpflag = model.getValue("/root/hidden/list1/isclcond/cpflag");
- var edicd = model.getValue("/root/hidden/list1/isclcond/edicd");
- var snglcalcscorcd = model.getValue("/root/hidden/list1/isclcond/snglcalcscorcd");
- var actingflag = model.getValue("/root/hidden/list1/isclcond/actingflag");
- var calcamtflag = model.getValue("/root/hidden/list1/isclcond/calcamtflag");
- var tmp = "/root/main/list2/iscllist["
- var chk = "0";
- //재료행위 구분
- if(matractflag){
- tmp = tmp + matractflag;
- chk = "1";
- }
-
- //급여구분
- if(calcpayflag){
- if(chk == "1"){
- tmp = tmp + " and " + calcpayflag;
- }else{
- tmp = tmp + calcpayflag;
- chk = "1";
- }
- }
-
- //항목구분
- if(snglcalcscorcls) {
- if(chk == "1"){
- tmp = tmp + " and (" + snglcalcscorcls + ")";
- }else{
- tmp = tmp + "(" + snglcalcscorcls + ")";
- chk = "1";
- }
- }
-
- // 시행구분 여부
- if(actingflag) {
- if(chk == "1"){
- tmp = tmp + " and " + actingflag;
- }else{
- tmp = tmp + actingflag;
- chk = "1";
- }
- }
-
- //CP여부
- if(cpflag) {
- if(chk == "1"){
- tmp = tmp + " and " + cpflag;
- }else{
- tmp = tmp + cpflag;
- chk = "1";
- }
- }
-
- //수가코드
- if(snglcalcscorcd) {
- if(chk == "1"){
- tmp = tmp + " and " + snglcalcscorcd;
- }else{
- tmp = tmp + snglcalcscorcd;
- chk = "1";
- }
- }
-
- //항목구분
- if(edicd) {
- if(chk == "1"){
- tmp = tmp + " and " + edicd;
- }else{
- tmp = tmp + edicd;
- chk = "1";
- }
- }
- //zero 수가 제외구분
- if(calcamtflag) {
- if(chk == "1"){
- tmp = tmp + " and " + calcamtflag;
- }else{
- tmp = tmp + calcamtflag;
- chk = "1";
- }
- }
-
- if(chk == "0")
- {
- tmp = "/root/main/list2/iscllist";
- }else{
- tmp = tmp + "]";
- }
-
- grd_ordlist.attribute("nodeset") = tmp ;
- grd_ordlist.rebuild();
- grd_ordlist.resizeCells();
- //grd_ordlist.gridToInstance();
- grd_ordlist.row = 0; // 그리드의 첫줄부터 표시되도록 포커스를 0으로 설정한다.
-
- // 2008. 01. 27 박지욱 추가 (처방 색깔 항 구분에 따라 흰색-회색 구분되도록 처리)
- //fSetOrderColorByEdiitem();
- //항목별소계
- fSetItemSubTotal();
-
- // 처방 Grid의 내용이 변경된 경우, 선별심사 처방 색깔 구분을 다시 처리한다.
- fSetColorSpclJudgOrder();
-
- //fSetOrdSpclTxt();
- // model.refresh(); 최적화 문제로 대체 20080731 박창원
- model.refreshpart("/root/main/list2/iscllist");
- }
- // 처방조회부, 처방 Grid용 Group의 컨트롤 크기를 설정한다.
- function fSetOrderControlSize() {
-
- if(grp_calc.attribute("top") == "305"){
- //기존위치에 +200한 위치, 처방그리드는 사이즈 +200
- grp_calc.attribute("top") = "105";
- grp_calc.attribute("height") = "640";
- grd_ordlist.attribute("height") = "518";
- cap_paylimamt.attribute("top") = "595";
- opt_paylimamt.attribute("top") = "620";
- swt_spclmemo.visible = "false";
- grd_diaglist.visible = "false";
- }else{
- grp_calc.attribute("top") = "305";
- grp_calc.attribute("height") = "440";
- grd_ordlist.attribute("height") = "318";
-
- cap_paylimamt.attribute("top") = "395";
- opt_paylimamt.attribute("top") = "420";
- swt_spclmemo.visible = "true";
-
- grd_diaglist.visible = "true";
- }
- }
- //////////////////////////////////////////////////////////////////////////////////////////////////////////////
- //처장 Filter 관련 코딩 끝 //
- //////////////////////////////////////////////////////////////////////////////////////////////////////////////
- //////////////////////////////////////////////////////////////////////////////////////////////////////////////
- //특정내역 관련 코딩 //
- //////////////////////////////////////////////////////////////////////////////////////////////////////////////
- // 특정 환자에 대해 그동안 작성된 심사자메모, 청구메모 내역을 조회한다.
- function fGetMemoHistList() {
- if(model.getValue("/root/main/item1/iteminfo/patnm")){
- model.removeNodeset("/root/hidden/sppiz00300/rslt");
- model.makevalue("/root/hidden/sppiz00300/cond/pid", model.getValue("/root/main/item1/iteminfo/pid"));
- model.makevalue("/root/hidden/sppiz00300/cond/orddeptcd", model.getValue("/root/main/item1/iteminfo/orddeptcd"));
- model.makevalue("/root/hidden/sppiz00300/cond/ioflag", "I");
- model.makevalue("/root/hidden/sppiz00300/cond/refterm", "2");
- model.makevalue("/root/hidden/sppiz00300/cond/anofildinclyn", "Y");
- model.makevalue("/root/hidden/sppiz00300/cond/fromdd", "");
- model.makevalue("/root/hidden/sppiz00300/cond/todd", "");
-
- modal("SPPIZ00300" ,"", "10", "10", "SPPIZ00300", "/root/hidden/sppiz00300/cond", "/root/init", "", ""); // SPPIZ00300_메모이력조회.xrw
-
- var SelectMemo = instance1.selectSingleNode("/root/hidden/sppiz00300/rslt");
- if (SelectMemo != null) {
- var choimemo = model.getValue("/root/hidden/sppiz00300/rslt/choimemo").getTrim(); // (stringHelper.js) 문자열 앞뒤에 있는 공백 제거
- var choiedicd = model.getValue("/root/hidden/sppiz00300/rslt/edicd");
- if (choimemo) {
- model.setValue("/root/hidden/sppiz00300/rslt/choimemo", choimemo);
- var destRef = model.getValue("/root/hidden/sppiz00300/rslt/destRef");
- if (destRef == "judgmemo") { // 심사메모로 전달
- var judgmemo = model.getValue("root/main/item1/iteminfo/judgrmk");
- if (judgmemo) { // 기존 심사메모가 공백이 아닌 경우 선택된 메모를 심사화면 메모 뒤에 덧붙인다.
- model.setValue("root/main/item1/iteminfo/judgrmk", judgmemo +" \n"+ choimemo);
- } else {
- if (choiedicd) { // 처방별 메모를 전달하는 경우임
- // 동일한 EDI 코드가 있을 경우만 추가
- var rowcnt = getNodesetCount("/root/main/list2/iscllist"); // 필터
- rowcnt = eval(rowcnt) + 1;
- //for (var j = 1; j < grd_ordlist.rows; j++) {
- for (var j = 1; j < rowcnt; j++) {
- var clodedicd = model.getValue("/root/main/list2/iscllist["+ j +"]/edicd");
- if (choiedicd == clodedicd) {
- model.setValue("/root/main/item1/iteminfo/judgrmk", choimemo);
- j = grd_ordlist.rows;
- }
- }
- } else {
- model.setValue("root/main/item1/iteminfo/judgrmk", choimemo);
- }
- }
- model.toggle("case_judgrmemo"); // 해당 tab 으로 토글시킨다.
- }
- else if (destRef == "edimemo") { // 청구메모로 전달
- var edimemo = model.getValue("/root/main/item1/iteminfo/edirmk");
- if (edimemo) { // 기존 청구메모가 공백이 아닌 경우 선택된 메모를 심사화면 메모 뒤에 덧붙인다.
- model.setValue("/root/main/item1/iteminfo/edirmk", edimemo +" \n"+ choimemo);
- } else {
- if (choiedicd) { // 처방별 메모를 전달하는 경우임
- // 동일한 EDI 코드가 있을 경우 * 표시
- var rowcnt = getNodesetCount("/root/main/list2/iscllist"); // 필터
- rowcnt = eval(rowcnt) + 1;
- //for (var j = 1; j < grd_ordlist.rows; j++) {
- for (var j = 1; j < rowcnt; j++) {
- var clodedicd = model.getValue("/root/main/list2/iscllist["+ j +"]/edicd");
- if (choiedicd == clodedicd) {
- model.setValue("/root/main/item1/iteminfo/edirmk", choimemo);
- //j = grd_ordlist.rows;
- j = rowcnt;
- }
- }
- } else {
- model.setValue("root/main/item1/iteminfo/edirmk", choimemo);
- }
- }
- model.toggle("case_ediclammemo"); // 해당 tab 으로 토글시킨다.
- }
- else if (destRef == "prcpmemo") { // 처방별 주석로 전달
-
- // 동일한 EDI 코드가 있을 경우 * 표시
- var rowcnt = getNodesetCount("/root/main/list2/iscllist"); // 필터
- rowcnt = eval(rowcnt) + 1;
- for (var j = 1; j < rowcnt; j++) {
- //for (var j = 1; j < grd_ordlist.rows; j++) {
- var iscledicd = model.getValue("/root/main/list2/iscllist["+ j +"]/edicd");
- if (choiedicd == iscledicd) {
- model.setValue("/root/main/list2/iscllist["+ j +"]/text", "*");
- }
- }
- for (var i=1; i<grd_clcjlist.rows; i++) {
-
- var edicd = model.getValue("/root/main/list4/clcjlist["+i+"]/edicd");
- var spclspec = model.getValue("/root/main/list4/clcjlist["+i+"]/spclspec");
-
- if (choiedicd == edicd) {
- var ans = messageBox("등록된 메모가 있습니다. 기존 내역에 추가할 경우 예(Yes)\n 새로운 내역으로 변경하시려면 아니오(No) 선택하여 주십시요", "S003"); ///수정사항이 있습니다. 저장하시려면 예(Yes)\n변경하시려면 아니오(No)
- if (ans == 6) { // 6: yes
-
- // 'JX999' 코드를 추가한다.
- fSpclGridInsertRow(); // 특정내역 Grid 마우스 오른쪽 버튼 클릭시 팝업 메뉴 "행 추가"
- var clsprow = grd_ordlist.row;
-
- model.setValue("/root/main/list4/clcjlist["+ clsprow +"]/unitflag", "J");
- model.setValue("/root/main/list4/clcjlist["+ clsprow +"]/edicd", choiedicd);
- model.setValue("/root/main/list4/clcjlist["+ clsprow +"]/spclcd", "JX999");
- model.setValue("/root/main/list4/clcjlist["+ clsprow +"]/spclcdnm", "JX999 기타내역");
- model.setValue("/root/main/list4/clcjlist["+ clsprow +"]/spclspec", spclspec + "\n"+ choimemo);
- model.setValue("/root/main/list4/clcjlist["+ clsprow +"]/remfact", "X(700)");
-
- return;
- }
- else if (ans == 7) { // 7:no
- model.setValue("/root/main/list4/clcjlist["+ i +"]/spclspec", choimemo);
- return ;
- }
- else if (ans == 2) { // 2:cancel
- return ;
- }
- }
- }
-
- // 신규로 특정 내역을 추가하는 경우
- var rowcnt = getNodesetCount("/root/main/list2/iscllist"); // 필터
- rowcnt = eval(rowcnt) + 1;
- for (var j = 1; j < rowcnt; j++) {
- //for (var j = 1; j < grd_ordlist.rows; j++) {
- var iscledicd = model.getValue("/root/main/list2/iscllist["+ j +"]/edicd");
- if (choiedicd == iscledicd) {
- // 'JX999' 코드를 추가한다.
- fSpclGridInsertRow(); // 특정내역 Grid 마우스 오른쪽 버튼 클릭시 팝업 메뉴 "행 추가"
- var clsprow = grd_clsphist.row;
-
- model.setValue("/root/main/list4/clcjlist["+ clsprow +"]/unitflag", "J");
- model.setValue("/root/main/list4/clcjlist["+ clsprow +"]/edicd", choiedicd);
- model.setValue("/root/main/list4/clcjlist["+ clsprow +"]/spclcd", "JX999");
- model.setValue("/root/main/list4/clcjlist["+ clsprow +"]/spclcdnm", "JX999 기타내역");
- model.setValue("/root/main/list4/clcjlist["+ clsprow +"]/spclspec", spclspec + "\n"+ choimemo);
- model.setValue("/root/main/list4/clcjlist["+ clsprow +"]/remfact", "X(700)");
-
- return;
- }
- }
- }
-
- model.refresh();
- }
- }
- }
- }
- // 특정내역 중 MT015, MT016 내역을 조회하여 "소명자료" Btn (첨부물 자료관리) Popup 화면에 표시한다.
- function fGetAttachedDataList() {
- if(model.getValue("/root/main/item1/iteminfo/patnm")){
- //model.removeNodeset("/root/hidden/sppiz00200/cond/clsp");
- model.setValue("/root/hidden/sppiz00200/cond/clsp/rowstat","");
- model.setValue("/root/hidden/sppiz00200/cond/clsp/unitflag","");
- model.setValue("/root/hidden/sppiz00200/cond/clsp/spclcd","");
- model.setValue("/root/hidden/sppiz00200/cond/clsp/spclspec", "");
- model.setValue("/root/hidden/sppiz00200/cond/clsp/initedilnno", "");
- model.setValue("/root/hidden/sppiz00200/cond/clsp/calcscorcd", "");
- model.setValue("/root/hidden/sppiz00200/cond/clsp/seqno", "");
- model.setValue("/root/hidden/sppiz00200/cond/clsp/spclformat","");
-
- // 특정내역 Grid에서 "행 삭제"한 경우 MT015 / MT016 자료를 표시하지 않도록 하는 기능 필요함
- // (작성할 것!!!!!!!!!!!!!!!!!!!!!!!)
- for (var i = 1; i < grd_clcjlist.rows; i++) {
- var tmp = model.getValue("/root/main/list4/clcjlist["+ i +"]/spclcd");
- if(tmp == "MT015" || tmp == "MT016"){
- model.setValue("/root/hidden/sppiz00200/cond/clsp/rowstat","-");
- model.setValue("/root/hidden/sppiz00200/cond/clsp/unitflag","M");
- model.setValue("/root/hidden/sppiz00200/cond/clsp/spclcd", model.getValue("/root/main/list4/clcjlist["+ i +"]/spclcd"));
- model.setValue("/root/hidden/sppiz00200/cond/clsp/spclspec", model.getValue("/root/main/list4/clcjlist["+ i +"]/spclspec"));
- model.setValue("/root/hidden/sppiz00200/cond/clsp/initedilnno", grd_clcjlist.row);
- model.setValue("/root/hidden/sppiz00200/cond/clsp/calcscorcd", model.getValue("/root/main/list4/clcjlist["+ i +"]/edicd"));
- model.setValue("/root/hidden/sppiz00200/cond/clsp/seqno", "1");
- model.setValue("/root/hidden/sppiz00200/cond/clsp/spclformat", model.getValue("/root/main/list4/clcjlist["+ i +"]/remfact"));
- }
- }
-
- modal("SPPIZ00200" ,"", "10", "10", "SPPIZ00200"); // SPPIZ00200_첨부물자료관리.xrw
- fDisplayAttachedDataList()
- fCheckSpclSpecData();
- }
- }
- // "소명자료" Btn (첨부물 자료관리) Popup 화면에서 특정내역 중 MT015, MT016 정보가 입력된 환자인지를 확인한다.
- // 특정내역 MT004가 입력된 환자인지 체크한다.
- function fDisplayAttachedDataList() {
- var isAttachedDataList = false;
- var cSrcNode = instance1.selectSingleNode("/root/hidden/sppiz00200/rslt/clsp");
- if (cSrcNode == null) { // 특정내역이 없는 경우임
- return;
- }
- if (model.getValue("/root/hidden/sppiz00200/rslt/clsp/unitflag") == "") { // "취소" 선택시에 버튼 색이 변경되지 않도록
- return;
- }
- var cSrcChildNodeList = cSrcNode.childNodes;
- for (var i = 1; i <= cSrcChildNodeList.length; i++) {
- var spclcd = model.getValue("/root/hidden/sppiz00200/rslt/clsp["+i+"]/spclcd");
- if (spclcd == "MT015" || spclcd == "MT016") {
- var rowstat = model.getValue("/root/hidden/sppiz00200/rslt/clsp["+i+"]/rowstat")
- if (rowstat != 'D') {
- var spclspec = model.getValue("/root/hidden/sppiz00200/rslt/clsp["+i+"]/spclspec");
- if (spclspec) {
- isAttachedDataList = true;
- }
- // 특정내역 Grid 에서 해당 내용을 삽입 또는 수정한다.
- if (rowstat == "I") { // 삽입
- fSpclGridInsertRow();
- model.setValue("/root/main/list4/clcjlist[" + grd_clcjlist.row + "]/spclcd", spclcd);
- model.setValue("/root/main/list4/clcjlist[" + grd_clcjlist.row + "]/spclspec", spclspec);
- if (spclcd == "MT015") {
- model.setValue("/root/main/list4/clcjlist[" + grd_clcjlist.row + "]/remfact", "X(2)");
- } else {
- model.setValue("/root/main/list4/clcjlist[" + grd_clcjlist.row + "]/remfact", "X(200)");
- }
- } else if (rowstat == "U") { // 수정
- for (var j = 1; j < grd_clcjlist.rows; j++) {
- var gridspclcd = model.getValue("/root/main/list4/clcjlist["+ j +"]/spclcd");
- var gridspclspec = model.getValue("/root/main/list4/clcjlist["+ j +"]/spclspec");
- var gridrowstatus = grd_clcjlist.rowstatus(j);
- if (gridspclcd == spclcd) {
- model.setValue("/root/main/list4/clcjlist[" + j + "]/spclspec", spclspec);
- if (gridrowstatus == 1 || gridrowstatus == 3) { // 1 : insert, 3 : insert & new
- } else {
- grd_clcjlist.rowstatus(j) = 2; // 2 : update 상태로 stat를 변경한다.
- }
- }
- }
- }
- } else { // 삭제
- // 특정내역 Grid 에서 해당 내용을 삭제한다.
- for (var j = 1; j < grd_clcjlist.rows; j++) {
- var gridspclcd = model.getValue("/root/main/list4/clcjlist["+ j +"]/spclcd");
- var gridspclspec = model.getValue("/root/main/list4/clcjlist["+ j +"]/spclspec");
- var gridrowstatus = grd_clcjlist.rowstatus(j);
- if (gridspclcd == spclcd) {
- if (gridrowstatus == 1 || gridrowstatus == 3) { // 1 : insert, 3 : insert & new
- grd_clcjlist.deleteRow(j, false); // 해당 라인을 Grid에서 삭제한다.
- } else { // 0 : new, 2 : update
- grd_clcjlist.rowstatus(j) = 4; // 4 : delete 상태로 stat를 변경한다.
- }
- }
- }
- }
- }
- }
- if (isAttachedDataList) {
- btn_attData.attribute("class") = "btn5_letter4";
- btn_attData.attribute("color") = "#cc3333";
- } else {
- btn_attData.attribute("class") = "btn2_letter4";
- }
- }
- // DB에서 조회한 특정내역 중 MT015, MT016 정보가 입력된 환자인지를 확인한다.
- // 특정내역 MT004가 입력된 환자인지 체크한다.
- function fCheckSpclSpecData() {
- var cSrcNode = instance1.selectSingleNode("/root/main/list4/clcjlist");
- if (cSrcNode == null) { // 특정내역이 없는 경우임
- return;
- }
- //var cSrcChildNodeList = cSrcNode.childNodes;
- // for (var i = 1; i <= cSrcChildNodeList.length; i++) {
- var spclcdMT015 = model.getValue("/root/main/list4/clcjlist[spclcd='MT015' or spclcd='MT016']/spclcd");
- var spclcdMT004 = model.getValue("/root/main/list4/clcjlist[spclcd='MT004']/spclcd");
- if (spclcdMT015.length > 0) {
- btn_attData.attribute("class") = "btn5_letter4";
- btn_attData.attribute("color") = "#ff0066";
- } else {
- btn_attData.attribute("class") = "btn2_letter4";
- }
-
- if(spclcdMT004 == "MT004") {
- btn_mt004.attribute("class") = "btn5_letter4";
- btn_mt004.attribute("color") = "#ff0066";
- } else {
- btn_mt004.attribute("class") = "btn2_letter4";
- }
- // }
-
- }
- //줄단위 추가
- function fSpclGridInsertRow() {
- // 특정내역 Grid 상에서 직접 행을 추가하는 경우 : 명세서단위 특정내역만을 추가할 수 있다.
- // 줄단위 특정내역의 경우, 처방 Grid에서 'T' 컬럼을 더블클릭하여 특정내역 상세관리 Popup을 통해 입력한다.
-
- var clcjrow = 0;
-
- if(grd_clcjlist.rows > 1){
- clcjrow = grd_clcjlist.rows - 1; // 특정내역 Grid 가장 마지막 줄에 추가한다.
-
- var chkdata = model.getValue("/root/main/list4/clcjlist[" + clcjrow + "]/spclcd");
-
- if(chkdata == ""){
- return;
- }
- }
- grd_clcjlist.insertRow(clcjrow++, true,false,false);
- grd_clcjlist.cellComboNodeset(clcjrow,3) = "/root/init/P0117list/P0117[minval = 'M' and cdid != 'MX999']";
-
- model.setValue("/root/main/list4/clcjlist[" + (grd_clcjlist.rows - 1) + "]/pid", model.getValue("/root/send/pid"));
- model.setValue("/root/main/list4/clcjlist[" + (grd_clcjlist.rows - 1) + "]/indd", model.getValue("/root/send/indd"));
- model.setValue("/root/main/list4/clcjlist[" + (grd_clcjlist.rows - 1) + "]/cretno", model.getValue("/root/send/cretno") );
- model.setValue("/root/main/list4/clcjlist[" + (grd_clcjlist.rows - 1) + "]/fromdd", model.getValue("/root/send/fromdd"));
- model.setValue("/root/main/list4/clcjlist[" + (grd_clcjlist.rows - 1) + "]/mskind", model.getValue("/root/send/mskind"));
- model.setValue("/root/main/list4/clcjlist[" + (grd_clcjlist.rows - 1) + "]/unitflag", "M");
- model.setValue("/root/main/list4/clcjlist[" + (grd_clcjlist.rows - 1) + "]/spclmemoflag","E" );
- model.setValue("/root/main/list4/clcjlist[" + (grd_clcjlist.rows - 1) + "]/status", "3");
-
- grd_clcjlist.row = grd_clcjlist.rows;
- grd_clcjlist.rowstatus(grd_clcjlist.row) = 1;
- // grd_clcjlist.gridToInstance(); 최적화문제로 주석처리 - 20081015 박창원
- }
- // 특정내역 Grid 마우스 오른쪽 버튼 클릭시 팝업 메뉴 "행 삭제"
- function fSpclGridDeleteRow() {
- var rowstatus = grd_clcjlist.rowstatus(grd_clcjlist.row);
- for( var i = grd_clcjlist.selectedRows; i >= 0 ; i-- ){
- var cRrow = grd_clcjlist.selectedRow(i);
- if (rowstatus == 4) { // 4 : delete
- return;
- }
- else if (rowstatus == 1 || rowstatus == 3) { // 1 : insert, 3 : insert & new
- grd_clcjlist.deleteRow(cRrow, false); // 해당 라인을 Grid에서 삭제한다.
- } else { // 0 : new, 2 : update
- model.setValue("/root/main/list4/clcjlist[" + grd_clcjlist.row + "]/status", 4);
- grd_clcjlist.rowstatus(cRrow) = 4; // 4 : delete 상태로 stat를 변경한다.
- }
- }
-
- fCheckSpclSpecData();
- //특정내역이 있는 처방에 'T'필드에 *표를 해준다.
- //fSetOrdSpclTxt();
- //model.refresh(); 최적화 문제로 대체 20080731 박창원
- model.refreshpart("/root/main/list2/iscllist");
- model.refreshpart("/root/main/list4/clcjlist");
- }
- // 특정내역 Grid 에서 선택한 줄단위 특정내역을 조회하고, 명세서단위 특정내역을 수정/입력한다.
- function fSetDocRefLnSpclSpec(){
- model.removenode("/root/hidden/sppij00500/rslt"); // SPPIJ00500_특정내역상세관리 에서 선택된 결과가 copyNode되는 경로임
- model.removenode("/root/hidden/sppij00500/cond/list");
-
- model.resetInstanceNode("/root/hidden/sppij00500/cond");
-
- var row = grd_clcjlist.row;
- var rows = grd_clcjlist.rows;
- var edicd = grd_clcjlist.valueMatrix(row, grd_clcjlist.colRef("edicd"));
- var oldspclcd = grd_clcjlist.valueMatrix(row, grd_clcjlist.colRef("spclcd"));
- var oldspclcdnm = "";
- var oldspclspec = grd_clcjlist.valueMatrix(row, grd_clcjlist.colRef("spclspec"));
- var oldremfact = grd_clcjlist.valueMatrix(row, grd_clcjlist.colRef("remfact"));
- var olddetldesc = grd_clcjlist.valueMatrix(row, grd_clcjlist.colRef("detldesc"));
- //줄단위 명단위 특정내역 구분.
- var unitflag = grd_clcjlist.valueMatrix(row, grd_clcjlist.colRef("unitflag"));
- var calcscorcd = grd_clcjlist.valueMatrix(row, grd_clcjlist.colRef("calcscorcd"));
-
- // pid,indd추가 결과조회 팝업호출을 위하여 - 20080922 박창원
- var pid = model.getValue("/root/main/item1/iteminfo/pid");
- var indd = model.getValue("/root/main/item1/iteminfo/indd1");
-
-
- var rowcnt = 1;
- var setrow =0 ;
-
- if(unitflag == "J"){
- if (edicd ) {
- for (var i=1; i<rows; i++) {
-
- var grdedicd = grd_clcjlist.valueMatrix(i, grd_clcjlist.colRef("edicd"));
-
- if ( edicd == grdedicd) {
- model.makevalue("/root/hidden/sppij00500/cond/list["+ rowcnt +"]/pid", pid);
- model.makevalue("/root/hidden/sppij00500/cond/list["+ rowcnt +"]/indd", indd);
- model.makevalue("/root/hidden/sppij00500/cond/list["+ rowcnt +"]/flag", "U");
- model.makevalue("/root/hidden/sppij00500/cond/list["+ rowcnt +"]/edicd", grd_clcjlist.valueMatrix(i, grd_clcjlist.colRef("edicd")));
- model.makevalue("/root/hidden/sppij00500/cond/list["+ rowcnt +"]/spclcd", grd_clcjlist.valueMatrix(i, grd_clcjlist.colRef("spclcd")));
- model.makevalue("/root/hidden/sppij00500/cond/list["+ rowcnt +"]/spclcdnm", "");
- model.makevalue("/root/hidden/sppij00500/cond/list["+ rowcnt +"]/spclspec", grd_clcjlist.valueMatrix(i, grd_clcjlist.colRef("spclspec")));
- model.makevalue("/root/hidden/sppij00500/cond/list["+ rowcnt +"]/detldesc", grd_clcjlist.valueMatrix(i, grd_clcjlist.colRef("detldesc")));
- model.makevalue("/root/hidden/sppij00500/cond/list["+ rowcnt +"]/remfact", grd_clcjlist.valueMatrix(i, grd_clcjlist.colRef("remfact")));
- model.makevalue("/root/hidden/sppij00500/cond/list["+ rowcnt +"]/unitflag", grd_clcjlist.valueMatrix(i, grd_clcjlist.colRef("unitflag")));
- model.makevalue("/root/hidden/sppij00500/cond/list["+ rowcnt +"]/rownum", i);
- model.makevalue("/root/hidden/sppij00500/cond/list["+ rowcnt +"]/oldspclcd", grd_clcjlist.valueMatrix(i, grd_clcjlist.colRef("spclcd")));
- model.makevalue("/root/hidden/sppij00500/cond/list["+ rowcnt +"]/oldspclspec", grd_clcjlist.valueMatrix(i, grd_clcjlist.colRef("spclspec")));
- model.makevalue("/root/hidden/sppij00500/cond/list["+ rowcnt +"]/calcscorcd", grd_clcjlist.valueMatrix(i, grd_clcjlist.colRef("calcscorcd")));
-
- if (row == i) {
- setrow = i;
- }
- rowcnt = rowcnt+1;
- }
- }
-
- model.setValue("/root/hidden/sppij00500/cond/pid", pid);
- model.setValue("/root/hidden/sppij00500/cond/indd", indd);
- model.setValue("/root/hidden/sppij00500/cond/flag", "U");
- model.setValue("/root/hidden/sppij00500/cond/edicd", edicd);
- model.setValue("/root/hidden/sppij00500/cond/spclcd", oldspclcd);
- model.setValue("/root/hidden/sppij00500/cond/spclcdnm", oldspclcdnm);
- model.setValue("/root/hidden/sppij00500/cond/detldesc", olddetldesc);
- model.setValue("/root/hidden/sppij00500/cond/spclspec", oldspclspec);
- model.setValue("/root/hidden/sppij00500/cond/remfact", oldremfact);
- model.setValue("/root/hidden/sppij00500/cond/rownum", setrow);
- model.setValue("/root/hidden/sppij00500/cond/unitflag", "J");
- model.setValue("/root/hidden/sppij00500/cond/calcscorcd", calcscorcd);
-
-
- //var unitflag = model.getValue("/root/main/list4/clcjlist["+ row +"]/unitflag");
-
- var unitflag = grd_clcjlist.valueMatrix(row, grd_clcjlist.colRef("unitflag"))
-
- // 삭제상태인 경우 처방Grid에서 입력,수정은 가능하지만 특정내역Grid에서는 편집할 수 없다.
- var rowstatus = grd_clcjlist.rowstatus(row);
- if (rowstatus == 4) { // 4 : delete
- messageBox("삭제된 특정내역은 수정할 수", "I004"); ///삭제된 특정내역은 수정할 수 없습니다.
- return;
- }
- modal("SPPIJ00500" ,"", "10", "10", "SPPIJ00500", "/root/hidden/sppij00500", "/root/hidden/clcj", "", ""); // SPPIJ00500_특정내역상세관리.xrw
- var rsltcnt = getNodesetCount("/root/hidden/sppij00500/rslt/list");
-
- // 처리 건수
- if (rsltcnt > 0) {
-
- for(var i=rsltcnt; i>0; i--) {
-
- var flag = model.getValue("/root/hidden/sppij00500/rslt/list["+ i +"]/flag");
- var rownum = model.getValue("/root/hidden/sppij00500/rslt/list["+ i +"]/rownum");
- var edicd = model.getValue("/root/hidden/sppij00500/rslt/list["+ i +"]/edicd");
- var newspclcd = model.getValue("/root/hidden/sppij00500/rslt/list["+ i +"]/spclcd");
- var newspclcdnm = model.getValue("/root/hidden/sppij00500/rslt/list["+ i +"]/spclcdnm");
- var newspclspec = model.getValue("/root/hidden/sppij00500/rslt/list["+ i +"]/spclspec");
- var newremfact = model.getValue("/root/hidden/sppij00500/rslt/list["+ i +"]/remfact");
- var newdetldesc = model.getValue("/root/hidden/sppij00500/rslt/list["+ i +"]/detldesc");
- oldspclcd = model.getValue("/root/hidden/sppij00500/rslt/list["+ i +"]/oldspclcd");
- oldspclspec = model.getValue("/root/hidden/sppij00500/rslt/list["+ i +"]/oldspclspec");
-
- // 특정코드 추가인 경우
- if (flag == "I") {
-
- var clsprow = grd_clcjlist.rows - 1; // 특정내역 Grid 가장 마지막 줄에 추가한다.
- grd_clcjlist.insertRow(clsprow++, true,false,false);
-
- grd_clcjlist.valueMatrix(clsprow, grd_clcjlist.colRef("unitflag")) = unitflag;
- grd_clcjlist.valueMatrix(clsprow, grd_clcjlist.colRef("spclcd")) = newspclcd;
- //grd_clcjlist.valueMatrix(clsprow, grd_clcjlist.colRef("spclcdnm")) = newspclcdnm;
- grd_clcjlist.valueMatrix(clsprow, grd_clcjlist.colRef("spclspec")) = newspclspec;
- grd_clcjlist.valueMatrix(clsprow, grd_clcjlist.colRef("remfact")) = newremfact;
- grd_clcjlist.valueMatrix(clsprow, grd_clcjlist.colRef("detldesc")) = newdetldesc;
- grd_clcjlist.valueMatrix(clsprow, grd_clcjlist.colRef("edicd")) = edicd;
- grd_clcjlist.valueMatrix(clsprow, grd_clcjlist.colRef("status")) = "3";
- // 특정코드 변경인 경우
- } else if (flag == "U") {
-
- grd_clcjlist.valueMatrix(rownum, grd_clcjlist.colRef("unitflag")) = unitflag;
- grd_clcjlist.valueMatrix(rownum, grd_clcjlist.colRef("spclcd")) = newspclcd;
- //grd_clcjlist.valueMatrix(rownum, grd_clcjlist.colRef("spclcdnm")) = newspclcdnm;
- grd_clcjlist.valueMatrix(rownum, grd_clcjlist.colRef("spclspec")) = newspclspec;
- grd_clcjlist.valueMatrix(rownum, grd_clcjlist.colRef("remfact")) = newremfact;
- grd_clcjlist.valueMatrix(rownum, grd_clcjlist.colRef("detldesc")) = newdetldesc;
- grd_clcjlist.valueMatrix(rownum, grd_clcjlist.colRef("edicd")) = edicd;
-
- if ( grd_clcjlist.valueMatrix(rownum, grd_clcjlist.colRef("status")) != "3") {
- grd_clcjlist.valueMatrix(rownum, grd_clcjlist.colRef("status")) = "0";
- }
- model.refresh();
- // 특정코드, 특정내역이 변경되었거나 삭제된 특정코드를 조회하여 "확인"을 선택한 경우
- if (oldspclcd != newspclcd || oldspclspec != newspclspec || grd_clcjlist.rowstatus(row) == 4) {
- var rowstatus = grd_clcjlist.rowstatus(rownum);
- if (rowstatus == 1 || rowstatus == 3) { // 1 : insert, 3 : insert & new
- } else {
- grd_clcjlist.rowstatus(rownum) = 2; // 2 : update 상태로 stat를 변경한다.
- grd_clcjlist.valueMatrix(rownum, grd_clcjlist.colRef("status")) = "2";
- }
- }
-
- // 처방Grid에서도 해당 줄단위 특정내역의 'T' 컬럼의 "*" 를 표시한다.
- var rowcnt = getNodesetCount("/root/main/list2/iscllist"); // 필터
- rowcnt = eval(rowcnt) + 1;
- for (var j = 1; j < rowcnt; j++) {
- //for (var j = 1; j < grd_ordlist.rows; j++) {
- var clcjedicd = model.getValue("/root/main/list2/iscllist["+ j +"]/edicd");
- if (edicd == clcjedicd) {
- if(newspclcd == "JX999"){
- model.setValue("/root/main/list2/iscllist["+ j +"]/text", "#");
- }else{
- model.setValue("/root/main/list2/iscllist["+ j +"]/text", "*");
- }
-
- //model.refresh(); 최적화 문제로 대체 20080731 박창원
- model.refreshpart("/root/main/list2/iscllist");
- }
- }
- model.setValue("/root/hidden/item1/message", "특정코드 - "+ newspclcd +" / 특정내역 : "+ newspclspec +" / 기재형식 : "+ newremfact);
-
- // 특정코드 삭제인 경우
- } else if (flag == "D" && rownum != "" ) {
-
- // 특정내역 Grid에서 삭제
- if (rowstatus == 1 || rowstatus == 3) { // 1 : insert, 3 : insert & new
- grd_clcjlist.deleteRow(rownum, false); // 해당 라인을 Grid에서 삭제한다.
- } else { // 0 : new, 2 : update
- grd_clcjlist.rowstatus(rownum) = 4; // 4 : delete 상태로 stat를 변경한다.
- }
-
- // 처방Grid에서도 해당 줄단위 특정내역의 삭제 처리를 한다.
- // 줄번호가 부여된 줄단위 특정내역이 삭제된 경우, 처방Grid의 'T' 컬럼의 "*" 를 삭제한다.
- //var clcjedicd = model.getValue("/root/main/list4/clcjlist["+ rownum +"]/edicd"); //root/main/list4/clcjlist/edicd
- var clcjedicd = grd_clcjlist.valueMatrix( rownum,grd_clcjlist.colRef("edicd"));
-
- if (clcjedicd) {
- var isSameLn = false;
- for (var j = 1; j < grd_clcjlist.rows; j++) {
- if (grd_clcjlist.rowstatus(j) != 4) {
- isSameLn = true; // 같은 줄번호에 여러개의 특정내역이 있는 경우임
- }
- }
- }
- if (isSameLn == false) { // 동일한 줄번호의 특정내역이 없는 경우
- var rowcnt = getNodesetCount("/root/main/list2/iscllist"); // 필터
- rowcnt = eval(rowcnt) + 1;
- for (var j = 1; j < rowcnt; j++) {
- //for (var j = 1; j < grd_ordlist.rows; j++) {
- var iscldicd = model.getValue("/root/main/list2/iscllist["+ j +"]/edicd");
- if (clcjedicd == iscldicd) {
- model.resetInstanceNode("/root/main/list2/iscllist["+ j +"]/text");
- //model.refresh(); 최적화 문제로 대체 20080731 박창원
- model.refreshpart("/root/main/list2/iscllist");
- }
- }
- }
- } // 특정코드 비교 if
- } // end for
- var rdounitflag = model.getValue("/root/send/unitflag");
- if (rdounitflag == "-") {
- for (var i=1; i<grd_clcjlist.rows; i++) {
- var delstatus = grd_clcjlist.rowStatus(i);
- var delspclspec = grd_clcjlist.valueMatrix(i, grd_clcjlist.colRef("spclspec"));
- if (delstatus == 1 || delstatus == 3) { // 0 : new, 3 : insert & new
- if (delspclspec == "") {
- grd_clcjlist.deleteItem(i);
- }
- }
- }
-
- // 입력행 추가
- fSpclGridInsertRow();
-
- } else if (rdounitflag == "M") {
- grd_clcjlist.attribute("nodeset") = "/root/main/list4/clcjlist[unitflag = 'M']";
- grd_clcjlist.rebuild();
-
- } else if (rdounitflag == "J") {
- grd_clcjlist.attribute("nodeset") = "/root/main/list4/clcjlist[unitflag = 'J']";
- grd_clcjlist.rebuild();
- }
- for (var i=1; i<grd_clcjlist.rows; i++) {
- var unitflag = grd_clcjlist.valueMatrix(i, grd_clcjlist.colRef("unitflag"));
- var status = grd_clcjlist.valueMatrix(i, grd_clcjlist.colRef("status"));
-
- if (status != "") {
- grd_clcjlist.rowStatus(i) = status;
- }
-
- if (unitflag == "M") {
- grd_clcjlist.cellComboNodeset(i,3) = "/root/init/P0117list/P0117[minval = 'M'and cdid != 'MX999']";
- } else if (unitflag == "J") {
- grd_clcjlist.cellComboNodeset(i,3) = "/root/init/P0117list/P0117[minval = 'J' ]";
- }
-
- }
- } // 처리 건수
- } else {
- messageBox("EDI코드가 없는 경우 해당 줄단위 특정내역이", "I004"); ///EDI코드가 없는 경우 해당 줄단위 특정내역이 없습니다.
- }
- //명단위 특정내역으르 클릭한경우(unitflag =="M") 또는 빈칸을 클릭한경우는 명단위 특정내역으로 구분한다. 2007.09.23 박도형
- }else{
- model.removenode("/root/hidden/sppij00500/rslt"); // SPPIZ00500_특정내역상세관리 에서 선택된 결과가 copyNode되는 경로임
- model.resetInstanceNode("/root/hidden/sppij00500/cond");
-
-
- var edicd = grd_clcjlist.valueMatrix(row, grd_clcjlist.colRef("edicd"));
- var spclcd = grd_clcjlist.valueMatrix(row, grd_clcjlist.colRef("spclcd"));
- var spclcdnm = "";
- var spclspec = grd_clcjlist.valueMatrix(row, grd_clcjlist.colRef("spclspec"));
- var remfact = grd_clcjlist.valueMatrix(row, grd_clcjlist.colRef("remfact"));
- var detldesc = grd_clcjlist.valueMatrix(row, grd_clcjlist.colRef("detldesc"));
- //줄단위 명단위 특정내역 구분.
- var unitflag = grd_clcjlist.valueMatrix(row, grd_clcjlist.colRef("unitflag"));
- var calcscorcd = grd_clcjlist.valueMatrix(row, grd_clcjlist.colRef("calcscorcd"));
-
- model.setValue("/root/hidden/sppij00500/cond/pid", pid);
- model.setValue("/root/hidden/sppij00500/cond/indd", indd);
- model.setValue("/root/hidden/sppij00500/cond/edicd", edicd);
- model.setValue("/root/hidden/sppij00500/cond/spclcd", spclcd);
- model.setValue("/root/hidden/sppij00500/cond/spclcdnm", spclcdnm);
- model.setValue("/root/hidden/sppij00500/cond/remfact", remfact);
- model.setValue("/root/hidden/sppij00500/cond/spclspec", spclspec);
- model.makevalue("/root/hidden/sppij00500/cond/unitflag", "M");
- model.makevalue("/root/hidden/sppij00500/cond/calcscorcd", calcscorcd);
- // 명단위도 기존 입력된 내역까지 다 보낸다. 2008.01.04 박지욱
- var rowcnt = 1;
- for (var i=1; i<grd_clcjlist.rows; i++) {
-
- var unitflag = grd_clcjlist.valueMatrix(i, grd_clcjlist.colRef("unitflag"));
- var spclcd = grd_clcjlist.valueMatrix(i, grd_clcjlist.colRef("spclcd"));
-
- if (unitflag == "M" && grd_clcjlist.rowstatus(i) != 4 && spclcd != "") {
- model.makevalue("/root/hidden/sppij00500/cond/list["+ rowcnt +"]/pid", pid);
- model.makevalue("/root/hidden/sppij00500/cond/list["+ rowcnt +"]/indd", indd);
- model.makevalue("/root/hidden/sppij00500/cond/list["+ rowcnt +"]/flag", "U");
- model.makevalue("/root/hidden/sppij00500/cond/list["+ rowcnt +"]/edicd", grd_clcjlist.valueMatrix(i, grd_clcjlist.colRef("edicd")));
- model.makevalue("/root/hidden/sppij00500/cond/list["+ rowcnt +"]/spclcd", grd_clcjlist.valueMatrix(i, grd_clcjlist.colRef("spclcd")));
- model.makevalue("/root/hidden/sppij00500/cond/list["+ rowcnt +"]/spclcdnm", grd_clcjlist.valueMatrix(i, grd_clcjlist.colRef("spclcdnm")));
- model.makevalue("/root/hidden/sppij00500/cond/list["+ rowcnt +"]/spclspec", grd_clcjlist.valueMatrix(i, grd_clcjlist.colRef("spclspec")));
- model.makevalue("/root/hidden/sppij00500/cond/list["+ rowcnt +"]/detldesc", grd_clcjlist.valueMatrix(i, grd_clcjlist.colRef("detldesc")));
- model.makevalue("/root/hidden/sppij00500/cond/list["+ rowcnt +"]/remfact", grd_clcjlist.valueMatrix(i, grd_clcjlist.colRef("remfact")));
- model.makevalue("/root/hidden/sppij00500/cond/list["+ rowcnt +"]/unitflag", grd_clcjlist.valueMatrix(i, grd_clcjlist.colRef("unitflag")));
- model.makevalue("/root/hidden/sppij00500/cond/list["+ rowcnt +"]/rownum", i);
- model.makevalue("/root/hidden/sppij00500/cond/list["+ rowcnt +"]/oldspclcd", grd_clcjlist.valueMatrix(i, grd_clcjlist.colRef("spclcd")));
- model.makevalue("/root/hidden/sppij00500/cond/list["+ rowcnt +"]/oldspclspec", grd_clcjlist.valueMatrix(i, grd_clcjlist.colRef("spclspec")));
- model.makevalue("/root/hidden/sppij00500/cond/list["+ rowcnt +"]/calcscorcd", calcscorcd);
-
- if (row == i) {
- setrow = i;
- }
- rowcnt = rowcnt+1;
- }
- }
-
- modal("SPPIJ00500" ,"", "10", "10", "SPPIJ00500", "/root/hidden/sppij00500", "/root/hidden/clcj", "", "");
-
- var rsltcnt = getNodesetCount("/root/hidden/sppij00500/rslt/list");
-
- // 처리 건수
- if (rsltcnt > 0) {
- for(var i=rsltcnt; i>0; i--) {
-
- var flag = model.getValue("/root/hidden/sppij00500/rslt/list["+ i +"]/flag");
- var rownum = model.getValue("/root/hidden/sppij00500/rslt/list["+ i +"]/rownum");
- var edicd = model.getValue("/root/hidden/sppij00500/rslt/list["+ i +"]/edicd");
- var newspclcd = model.getValue("/root/hidden/sppij00500/rslt/list["+ i +"]/spclcd");
- var newspclcdnm = model.getValue("/root/hidden/sppij00500/rslt/list["+ i +"]/spclcdnm");
- var newspclspec = model.getValue("/root/hidden/sppij00500/rslt/list["+ i +"]/spclspec");
- var newremfact = model.getValue("/root/hidden/sppij00500/rslt/list["+ i +"]/remfact");
- var newdetldesc = model.getValue("/root/hidden/sppij00500/rslt/list["+ i +"]/detldesc");
-
- // 특정코드 추가인 경우
- if (flag == "I") {
-
- var clsprow = grd_clcjlist.rows - 1; // 특정내역 Grid 가장 마지막 줄에 추가한다.
- grd_clcjlist.insertRow(clsprow++, true,false,false);
-
- grd_clcjlist.valueMatrix(clsprow, grd_clcjlist.colRef("unitflag")) = unitflag;
- grd_clcjlist.valueMatrix(clsprow, grd_clcjlist.colRef("spclcd")) = newspclcd;
- //grd_clcjlist.valueMatrix(clsprow, grd_clcjlist.colRef("spclcdnm")) = newspclcdnm;
- grd_clcjlist.valueMatrix(clsprow, grd_clcjlist.colRef("spclspec")) = newspclspec;
- grd_clcjlist.valueMatrix(clsprow, grd_clcjlist.colRef("remfact")) = newremfact;
- grd_clcjlist.valueMatrix(clsprow, grd_clcjlist.colRef("detldesc")) = newdetldesc;
- grd_clcjlist.valueMatrix(clsprow, grd_clcjlist.colRef("edicd")) = edicd;
- grd_clcjlist.valueMatrix(clsprow, grd_clcjlist.colRef("status")) = "3";
-
- // pid, indd, cretno, fromdd, mskind, spclmemoflag, seqno 세팅
- grd_clcjlist.valueMatrix(clsprow, grd_clcjlist.colRef("pid")) = model.getValue("/root/send/pid");
- grd_clcjlist.valueMatrix(clsprow, grd_clcjlist.colRef("indd")) = model.getValue("/root/send/indd");
- grd_clcjlist.valueMatrix(clsprow, grd_clcjlist.colRef("cretno")) = model.getValue("/root/send/cretno");
- grd_clcjlist.valueMatrix(clsprow, grd_clcjlist.colRef("fromdd")) = model.getValue("/root/send/fromdd");
- grd_clcjlist.valueMatrix(clsprow, grd_clcjlist.colRef("mskind")) = model.getValue("/root/send/mskind");
- grd_clcjlist.valueMatrix(clsprow, grd_clcjlist.colRef("spclmemoflag")) = "E";
-
- // 특정코드 변경인 경우
- } else if (flag == "U") {
-
- grd_clcjlist.valueMatrix(rownum, grd_clcjlist.colRef("unitflag")) = unitflag;
- grd_clcjlist.valueMatrix(rownum, grd_clcjlist.colRef("spclcd")) = newspclcd;
- //grd_clcjlist.valueMatrix(rownum, grd_clcjlist.colRef("spclcdnm")) = newspclcdnm;
- grd_clcjlist.valueMatrix(rownum, grd_clcjlist.colRef("spclspec")) = newspclspec;
- grd_clcjlist.valueMatrix(rownum, grd_clcjlist.colRef("remfact")) = newremfact;
- grd_clcjlist.valueMatrix(rownum, grd_clcjlist.colRef("detldesc")) = newdetldesc;
- grd_clcjlist.valueMatrix(rownum, grd_clcjlist.colRef("edicd")) = edicd;
-
- if ( grd_clcjlist.valueMatrix(rownum, grd_clcjlist.colRef("status")) != "3") {
- grd_clcjlist.valueMatrix(rownum, grd_clcjlist.colRef("status")) = "0";
- }
-
- model.setValue("/root/hidden/item1/message", "특정코드 - "+ newspclcd +" / 특정내역 : "+ newspclspec +" / 기재형식 : "+ newremfact);
-
- // 특정코드 삭제인 경우
- } else if (flag == "D" && rownum != "" ) {
-
- // 특정내역 Grid에서 삭제
- if (rowstatus == 1 || rowstatus == 3) { // 1 : insert, 3 : insert & new
- grd_clcjlist.deleteRow(rownum, false); // 해당 라인을 Grid에서 삭제한다.
- } else { // 0 : new, 2 : update
- grd_clcjlist.rowstatus(rownum) = 4; // 4 : delete 상태로 stat를 변경한다.
- grd_clcjlist.valueMatrix(rownum, grd_clcjlist.colRef("status")) = "4";
- }
- }
- }
- // 그리드 정렬 & 한줄추가
- //fSortSpclNo();
- //fSaveClcjList();
- } // 처리건수
- }
- }
- // 처방 행 삭제 or 삭제취소 후에 특정내역 sorting 작업
- function fSortSpclNo() {
- // 빈 줄을 삭제한다.
- for (var i = 1; i < grd_clcjlist.rows; i++) {
- var rowstatus = grd_clcjlist.rowstatus(i);
- var spclcd = model.getValue("/root/main/list4/clcjlist["+ i +"]/spclcd");
- if (rowstatus == 1 || rowstatus == 3) { // 1 : insert, 3 : insert & new
- if (spclcd == "") {
- // 줄을 삭제한다.
- grd_clcjlist.deleteRow(i, false);
- i--;
- }
- }
- }
-
- // JS010(특정코드:야간가산)의 hhmm이 야간(18~09시)가 아니면 특정내역 Grid에 빨간색으로 표시
- for(var i = 1; i < grd_clcjlist.rows; i++) {
- grd_clcjlist.rowStyle(i, "data", "color") = "#000000";
- var spclcd = model.getValue("/root/main/list4/clcjlist["+ i + "]/spclcd");
- var spclspec = model.getValue("/root/main/list4/clcjlist["+ i + "]/spclspec");
- if (spclcd == "JS010") {
- var js010chk = false;
- if (spclspec.length >= 12) {
- var ccyymmddhhmm = spclspec.substr(0, 12);
- if (isValidDateTime(ccyymmddhhmm, "YYYYMMDDhhmm")) { // (dateHelper.js) 유효한 날짜, 시간 인지 점검
- var hhmm = parseInt(spclspec.substr(8, 4), 10); // '09' 와 같은 형식으로 입력한 경우 -> 9로 처리
- if (hhmm >= 1800 || hhmm < 900) {
- js010chk = true;
- }
- }
- }
- if (js010chk == false) {
- grd_clcjlist.rowStyle(i, "data", "color") = "#ff3333"; // ff3333=붉은색
- }
- }
- }
-
- grd_clcjlist.colsort(grd_clcjlist.colRef("unitflag")) = "desc";
- grd_clcjlist.colsort(grd_clcjlist.colRef("edicd")) = "asc";
- grd_clcjlist.colsort(grd_clcjlist.colRef("spclcd")) = "asc";
- grd_clcjlist.colsort(grd_clcjlist.colRef("status")) = "desc";
- var maxRow = parseInt(grd_clcjlist.rows) - 1; // rows는 타이틀부분 부터 개수를 센다.
- var maxCol = parseInt(grd_clcjlist.cols) - 1;
- grd_clcjlist.sort(grd_clcjlist.fixedRows, grd_clcjlist.fixedCols, maxRow, maxCol) = "usersort";
- // Sort 된 Grid 상의 Data 순서와 Instance Node 상의 Data 순서를 동일하게 맞춰준다.
- grd_clcjlist.gridToInstance();
-
- // 빈줄 추가
- fSpclGridInsertRow();
- }
- function fSetLnUnitSpclcjec() { // 'T' 필드 더블클릭시 호출한다.
- var rdounitflag = model.getValue("/root/send/unitflag");
- // pid,indd추가 결과조회 팝업호출을 위하여 - 20080922 박창원
- var pid = model.getValue("/root/main/item1/iteminfo/pid");
- var indd = model.getValue("/root/main/item1/iteminfo/indd1");
-
- if (rdounitflag == "M") {
- // 줄단위로 셋팅하고 처리
- rdo_unitflag.value = "J";
-
- grd_clcjlist.attribute("nodeset") = "/root/main/list4/clcjlist[unitflag = 'J']";
- grd_clcjlist.rebuild();
- // 단위에 필터에 따라 해당 행있는 특정코드 콤보 재설정
- for (var i=1; i<grd_clcjlist.rows; i++) {
- var unitflag = grd_clcjlist.valueMatrix(i, grd_clcjlist.colRef("unitflag"));
- var status = grd_clcjlist.valueMatrix(i, grd_clcjlist.colRef("status"));
-
- if (status != "") {
- grd_clcjlist.rowStatus(i) = status;
- }
- if (unitflag == "M") {
- grd_clcjlist.cellComboNodeset(i,3) = "/root/init/P0117list/P0117[minval = 'M'' and cdid != 'MX999']";
- } else if (unitflag == "J") {
- grd_clcjlist.cellComboNodeset(i,3) = "/root/init/P0117list/P0117[minval = 'J']";
- }
- }
- }
-
- var row = grd_ordlist.row;
- var rows = grd_clcjlist.rows;
-
- model.removenode("/root/hidden/sppij00500/rslt"); // SPPIJ00500_특정내역상세관리 에서 선택된 결과가 copyNode되는 경로임
- model.removenode("/root/hidden/sppij00500/cond");
- // 처방 Grid에서 줄번호가 부여된 경우
- //var edicd = model.getValue("/root/main/list2/iscllist["+ row +"]/edicd");
- var edicd = grd_ordlist.valueMatrix(row, grd_ordlist.colref("edicd"));
- var calcscorcd = grd_ordlist.valueMatrix(row, grd_ordlist.colref("snglcalcscorcd")); // 수정추가 JHP 특정내역에 수가코드 추가하기. 20090423
- var rowcnt = 1;
- var setrow = 0;
- if (edicd) {
- if (rows == 1) {
- model.makevalue("/root/hidden/sppij00500/cond/calcscorcd", calcscorcd); // 수정추가 JHP 특정내역에 수가코드 추가하기. 20090423
- model.makevalue("/root/hidden/sppij00500/cond/edicd", edicd);
- model.makevalue("/root/hidden/sppij00500/cond/pid", pid);
- model.makevalue("/root/hidden/sppij00500/cond/pid", indd);
- model.makevalue("/root/hidden/sppij00500/cond/unitflag","J");
- model.makevalue("/root/hidden/sppij00500/cond/flag", "I");
- model.makevalue("/root/hidden/sppij00500/cond/spclcd", "JX999");
- model.makevalue("/root/hidden/sppij00500/cond/spclcdnm", "");
- model.makevalue("/root/hidden/sppij00500/cond/detldesc", "");
- model.makevalue("/root/hidden/sppij00500/cond/spclspec", "");
- model.makevalue("/root/hidden/sppij00500/cond/remfact","");
- model.makevalue("/root/hidden/sppij00500/cond/rownum", "");
-
- } else {
-
- for (var i=1; i<rows; i++) {
-
- var clcjcalcscorcd = grd_clcjlist.valueMatrix( i,grd_clcjlist.colRef("calcscorcd"));
- var clcjedicd = grd_clcjlist.valueMatrix( i,grd_clcjlist.colRef("edicd"));
- var spclcd = grd_clcjlist.valueMatrix( i,grd_clcjlist.colRef("spclcd"));
-
- if ( edicd == clcjedicd) {
- model.makevalue("/root/hidden/sppij00500/cond/list["+ rowcnt +"]/flag", "U");
- model.makevalue("/root/hidden/sppij00500/cond/list["+ rowcnt +"]/calcscorcd", grd_clcjlist.valueMatrix( i,grd_clcjlist.colRef("calcscorcd"))); // 수정추가 JHP 특정내역에 수가코드 추가하기. 20090423
- model.makevalue("/root/hidden/sppij00500/cond/list["+ rowcnt +"]/edicd", grd_clcjlist.valueMatrix( i,grd_clcjlist.colRef("edicd")));
- model.makevalue("/root/hidden/sppij00500/cond/list["+ rowcnt +"]/detldesc", grd_clcjlist.valueMatrix( i,grd_clcjlist.colRef("detldesc")));
- model.makevalue("/root/hidden/sppij00500/cond/list["+ rowcnt +"]/spclcd", grd_clcjlist.valueMatrix( i,grd_clcjlist.colRef("spclcd")));
- model.makevalue("/root/hidden/sppij00500/cond/list["+ rowcnt +"]/spclcdnm", "");
- model.makevalue("/root/hidden/sppij00500/cond/list["+ rowcnt +"]/spclspec", grd_clcjlist.valueMatrix( i,grd_clcjlist.colRef("spclspec")));
- model.makevalue("/root/hidden/sppij00500/cond/list["+ rowcnt +"]/remfact", grd_clcjlist.valueMatrix( i,grd_clcjlist.colRef("remfact")));
- model.makevalue("/root/hidden/sppij00500/cond/list["+ rowcnt +"]/rownum", i);
- model.makevalue("/root/hidden/sppij00500/cond/list["+ rowcnt +"]/unitflag","J")
- model.makevalue("/root/hidden/sppij00500/cond/list["+ rowcnt +"]/oldspclcd", grd_clcjlist.valueMatrix( i,grd_clcjlist.colRef("spclcd")));
- model.makevalue("/root/hidden/sppij00500/cond/list["+ rowcnt +"]/oldspclspec", grd_clcjlist.valueMatrix( i,grd_clcjlist.colRef("spclspec")));
- model.makevalue("/root/hidden/sppij00500/cond/list["+ rowcnt +"]/pid", pid);
- model.makevalue("/root/hidden/sppij00500/cond/list["+ rowcnt +"]/indd", indd);
- model.makevalue("/root/hidden/sppij00500/cond/list["+ rowcnt +"]/calcscorcd", "");
-
- rowcnt = rowcnt+1;
-
- // 특정내역 상세 화면에 보여줄 특정내역 선택
- setrow = i;
-
- }
- model.makevalue("/root/hidden/sppij00500/cond/calcscorcd", calcscorcd);
- model.makevalue("/root/hidden/sppij00500/cond/edicd", edicd);
- model.makevalue("/root/hidden/sppij00500/cond/unitflag","J");
-
- if ( setrow != 0 ) {
- model.makevalue("/root/hidden/sppij00500/cond/pid", pid);
- model.makevalue("/root/hidden/sppij00500/cond/indd", indd);
- model.makevalue("/root/hidden/sppij00500/cond/flag", "U");
- model.makevalue("/root/hidden/sppij00500/cond/spclcd", grd_clcjlist.valueMatrix(setrow,grd_clcjlist.colRef("spclcd")));
- model.makevalue("/root/hidden/sppij00500/cond/spclcdnm", "");
- model.makevalue("/root/hidden/sppij00500/cond/detldesc", grd_clcjlist.valueMatrix(setrow,grd_clcjlist.colRef("detldesc")));
- model.makevalue("/root/hidden/sppij00500/cond/spclspec", grd_clcjlist.valueMatrix(setrow,grd_clcjlist.colRef("spclspec")));
- model.makevalue("/root/hidden/sppij00500/cond/remfact", grd_clcjlist.valueMatrix(setrow,grd_clcjlist.colRef("remfact")));
- model.makevalue("/root/hidden/sppij00500/cond/rownum", setrow);
- model.makevalue("/root/hidden/sppij00500/cond/calcscorcd", "");
-
- } else {
- model.makevalue("/root/hidden/sppij00500/cond/pid", pid);
- model.makevalue("/root/hidden/sppij00500/cond/indd", indd);
- model.makevalue("/root/hidden/sppij00500/cond/flag", "I");
- model.makevalue("/root/hidden/sppij00500/cond/spclcd", "JX999");
- model.makevalue("/root/hidden/sppij00500/cond/spclcdnm", "");
- model.makevalue("/root/hidden/sppij00500/cond/detldesc", "");
- model.makevalue("/root/hidden/sppij00500/cond/spclspec", "");
- model.makevalue("/root/hidden/sppij00500/cond/remfact","");
- model.makevalue("/root/hidden/sppij00500/cond/rownum", "");
- model.makevalue("/root/hidden/sppij00500/cond/calcscorcd", "");
- }
-
- }
- }
- model.removenode("/root/hidden/sppij00500/rslt");
- modal("SPPIJ00500" ,"", "10", "10", "SPPIJ00500", "/root/hidden/sppij00500", "/root/hidden/clcj", "", ""); // SPPIJ00500_특정내역상세관리.xrw
- var rsltcnt = getNodesetCount("/root/hidden/sppij00500/rslt/list");
-
- // 처리 건수
- if (rsltcnt > 0) {
-
- for(var i=rsltcnt; i>0; i--) {
-
- var flag = model.getValue("/root/hidden/sppij00500/rslt/list["+ i +"]/flag");
- var rownum = model.getValue("/root/hidden/sppij00500/rslt/list["+ i +"]/rownum");
- var calcscorcd = model.getValue("/root/hidden/sppij00500/rslt/list["+ i +"]/calcscorcd");
- var edicd = model.getValue("/root/hidden/sppij00500/rslt/list["+ i +"]/edicd");
- var newspclcd = model.getValue("/root/hidden/sppij00500/rslt/list["+ i +"]/spclcd");
- var newspclcdnm = model.getValue("/root/hidden/sppij00500/rslt/list["+ i +"]/spclcdnm");
- var newspclspec = model.getValue("/root/hidden/sppij00500/rslt/list["+ i +"]/spclspec");
- var newremfact = model.getValue("/root/hidden/sppij00500/rslt/list["+ i +"]/remfact ");
- var newdetldesc = model.getValue("/root/hidden/sppij00500/rslt/list["+ i +"]/detldesc");
- var oldspclcd = model.getValue("/root/hidden/sppij00500/rslt/list["+ i +"]/oldspclcd");
- var oldspclspec = model.getValue("/root/hidden/sppij00500/rslt/list["+ i +"]/oldspclspec");
-
- // 특정코드 추가인 경우
- if (flag == "I") {
- var clcjrow = grd_clcjlist.rows - 1; // 특정내역 Grid 가장 마지막 줄에 추가한다.
- grd_clcjlist.insertRow(clcjrow++, true,false,false);
-
- grd_clcjlist.valueMatrix(clcjrow, grd_clcjlist.colRef("pid")) = model.getValue("/root/send/pid");
- grd_clcjlist.valueMatrix(clcjrow, grd_clcjlist.colRef("indd")) = model.getValue("/root/send/indd");
- grd_clcjlist.valueMatrix(clcjrow, grd_clcjlist.colRef("cretno")) = model.getValue("/root/send/cretno");
- grd_clcjlist.valueMatrix(clcjrow, grd_clcjlist.colRef("fromdd")) = model.getValue("/root/send/fromdd");
- grd_clcjlist.valueMatrix(clcjrow, grd_clcjlist.colRef("mskind")) = model.getValue("/root/send/mskind");
- grd_clcjlist.valueMatrix(clcjrow, grd_clcjlist.colRef("unitflag")) = "J";
- grd_clcjlist.valueMatrix(clcjrow, grd_clcjlist.colRef("calcscorcd")) = calcscorcd;
- grd_clcjlist.valueMatrix(clcjrow, grd_clcjlist.colRef("edicd")) = edicd;
- grd_clcjlist.valueMatrix(clcjrow, grd_clcjlist.colRef("spclcd")) = newspclcd;
- //grd_clcjlist.valueMatrix(clcjrow, grd_clcjlist.colRef("spclcdnm")) = newspclcdnm;
- grd_clcjlist.valueMatrix(clcjrow, grd_clcjlist.colRef("spclspec")) = newspclspec;
- grd_clcjlist.valueMatrix(clcjrow, grd_clcjlist.colRef("remfact")) = newremfact;
- grd_clcjlist.valueMatrix(clcjrow, grd_clcjlist.colRef("detldesc")) = newdetldesc;
- grd_clcjlist.valueMatrix(clcjrow, grd_clcjlist.colRef("spclmemoflag")) = "E";
- grd_clcjlist.valueMatrix(clcjrow, grd_clcjlist.colRef("status")) = "3";
-
- // 처방Grid에서도 해당 줄단위 특정내역의 'T' 컬럼의 "*" 를 표시한다.
- var rowcnt = getNodesetCount("/root/main/list2/iscllist"); // 필터
- rowcnt = eval(rowcnt) + 1;
- for (var j = 1; j < rowcnt; j++) {
- //for (var j = 1; j < grd_ordlist.rows; j++) {
- var clcjedicd = model.getValue("/root/main/list2/iscllist["+ j +"]/edicd");
- if (edicd == clcjedicd) {
- model.setValue("/root/main/list2/iscllist["+ j +"]/text", "*");
- //model.refresh(); 최적화 문제로 20080731 박창원
- }
- }
-
- // 특정코드 변경인 경우
- } else if (flag == "U") {
-
- grd_clcjlist.valueMatrix(rownum, grd_clcjlist.colRef("spclcd")) = newspclcd;
- //grd_clcjlist.valueMatrix(rownum, grd_clcjlist.colRef("spclcdnm")) = newspclcdnm;
- grd_clcjlist.valueMatrix(rownum, grd_clcjlist.colRef("spclspec")) = newspclspec;
- grd_clcjlist.valueMatrix(rownum, grd_clcjlist.colRef("remfact")) = newremfact;
- grd_clcjlist.valueMatrix(rownum, grd_clcjlist.colRef("detldesc")) = newdetldesc;
- if ( grd_clcjlist.valueMatrix(rownum, grd_clcjlist.colRef("status")) != "3") {
- grd_clcjlist.valueMatrix(rownum, grd_clcjlist.colRef("status")) = "0";
- }
-
- model.refresh();
- // 특정코드, 특정내역이 변경되었거나 삭제된 특정코드를 조회하여 "확인"을 선택한 경우
- if (oldspclcd != newspclcd || oldspclspec != newspclspec || grd_clcjlist.rowstatus(row) == 4) {
- var rowstatus = grd_clcjlist.rowstatus(rownum);
- if (rowstatus == 1 || rowstatus == 3) { // 1 : insert, 3 : insert & new
- } else {
- grd_clcjlist.rowstatus(rownum) = 2; // 2 : update 상태로 stat를 변경한다.
- grd_clcjlist.valueMatrix(rownum, grd_clcjlist.colRef("status")) = "2";
- }
- }
-
- // 처방Grid에서도 해당 줄단위 특정내역의 'T' 컬럼의 "*" 를 표시한다.
- var rowcnt = getNodesetCount("/root/main/list2/iscllist"); // 필터
- rowcnt = eval(rowcnt) + 1;
- for (var j = 1; j < rowcnt; j++) {
- //for (var j = 1; j < grd_ordlist.rows; j++) {
- var clcjedicd = model.getValue("/root/main/list2/iscllist["+ j +"]/edicd");
- if (edicd == clcjedicd) {
- model.setValue("/root/main/list2/iscllist["+ j +"]/text", "*");
- //model.refresh(); 최적화 문제로 20080731 박창원
- }
- }
- model.setValue("/root/hidden/item1/message", "특정코드 - "+ newspclcd +" / 특정내역 : "+ newspclspec +" / 기재형식 : "+ newremfact);
-
- // 특정코드 삭제인 경우
- } else if (flag == "D" && rownum != "" ) {
-
- var cnt = 0;
-
- for (var j = 1; j < grd_clcjlist.rows; j++) {
- var clcjedicd = model.getValue("/root/main/list4/clcjlist["+ j +"]/edicd");
- if (edicd == clcjedicd) {
- if (grd_clcjlist.rowstatus(j) != 4) {
- cnt++;
- }
- }
- }
-
- if (cnt > 0) {
- } else {
- grd_ordlist.valueMatrix(row, grd_ordlist.colref("text")) = "";
- //model.resetInstanceNode("/root/main/list2/iscllist["+ row +"]/text");
- }
-
- // 특정내역 Grid에서 삭제
- var rowstatus = grd_clcjlist.rowstatus(rownum);
- if (rowstatus == 1 || rowstatus == 3) { // 1 : insert, 3 : insert & new
- grd_clcjlist.deleteRow(rownum, false); // 해당 라인을 Grid에서 삭제한다.
- } else { // 0 : new, 2 : update
- grd_clcjlist.rowstatus(rownum) = 4; // 4 : delete 상태로 stat를 변경한다.
- }
- grd_clcjlist.row = rownum;
-
- var rowcnt = getNodesetCount("/root/main/list2/iscllist"); // 필터
- rowcnt = eval(rowcnt) + 1;
- for (var j = 1; j < rowcnt; j++) {
- //for (var j = 1; j < grd_ordlist.rows; j++) {
- var clcjedicd = model.getValue("/root/main/list2/iscllist["+ j +"]/edicd");
- if (edicd == clcjedicd) {
- model.setValue("/root/main/list2/iscllist["+ j +"]/text", "");
- //model.refresh(); 최적화 문제로 20080731 박창원
- }
- }
-
- } // 특정 코드 상태 따른 if end
- } // for end
- var rdounitflag = model.getValue("/root/send/unitflag");
- if (rdounitflag == "-") {
- for (var i=1; i<grd_clcjlist.rows; i++) {
- var delstatus = grd_clcjlist.rowStatus(i);
- var delspclspec = grd_clcjlist.valueMatrix(i, grd_clcjlist.colRef("spclspec"));
- if (delstatus == 1 || delstatus == 3) { // 0 : new, 3 : insert & new
- if (delspclspec == "") {
- grd_clcjlist.deleteItem(i);
- }
- }
- }
-
- // 입력행 추가
- fSpclGridInsertRow();
-
- } else if (rdounitflag == "M") {
- grd_clcjlist.attribute("nodeset") = "/root/main/list4/clcjlist[unitflag = 'M']";
- grd_clcjlist.rebuild();
- } else if (rdounitflag == "J") {
- grd_clcjlist.attribute("nodeset") = "/root/main/list4/clcjlist[unitflag = 'J']";
- grd_clcjlist.rebuild();
- }
- for (var i=1; i<grd_clcjlist.rows; i++) {
- var unitflag = grd_clcjlist.valueMatrix(i, grd_clcjlist.colRef("unitflag"));
- var status = grd_clcjlist.valueMatrix(i, grd_clcjlist.colRef("status"));
-
- if (status != "") {
- grd_clcjlist.rowStatus(i) = status;
- }
-
- if (unitflag == "M") {
- grd_clcjlist.cellComboNodeset(i,3) = "/root/init/P0117list/P0117[minval = 'M' and cdid != 'MX999']";
- } else if (unitflag == "J") {
- grd_clcjlist.cellComboNodeset(i,3) = "/root/init/P0117list/P0117[minval = 'J']";
- }
-
- }
- } // 처리 건수 if end
-
- //model.refresh(); 최적화 문제로 대체 20080731 박창원
- model.refreshpart("/root/main/list2/iscllist");
- model.refreshpart("/root/main/list4/clcjlist");
-
- } else {
- messageBox("EDI코드가 없는 경우 해당 줄단위 특정내역이", "I004"); ///EDI코드가 없는 경우 해당 줄단위 특정내역이 없습니다.
- }
- }
-
- function fGetStageTNM(){
- model.removenode("/root/hidden/smpij02000/rslt"); // SMPIZ02000_환자별암병기분류조회 에서 선택된 결과가 copyNode되는 경로임
- model.resetInstanceNode("/root/hidden/smpij02000/cond");
-
- model.setValue("/root/hidden/smpij02000/cond/pid", model.getValue("/root/main/item1/iteminfo/pid"));
- model.setValue("/root/hidden/smpij02000/cond/insuflag", "");
-
- modal("SMPIJ02000" ,"", "10", "10", "SMPIJ02000", "/root/hidden/smpij02000/cond", "/root/send/list01", "", "");
- }
- //심사자 메모 팝업 갱신
- function fSetJudgMemoRefresh(){
- model.refresh();
- var memo = model.getValue("/root/hidden/sppiz00700/rslt/memo");
- var tmp = model.getValue("/root/main/item1/iteminfo/judgrmk");
- if(tmp){
- tmp = tmp + " ";
- }
- model.setValue("/root/main/item1/iteminfo/judgrmk",tmp + memo);
- //model.refresh(); 최적화 문제로 대체 20080731 박창원
- model.refresh();
- }
- //EDI 메모 팝업 갱신
- function fSetEdiMemoRefresh(){
- var memo = model.getValue("/root/hidden/sppiz00700/rslt/memo");
- var tmp = model.getValue("/root/main/item1/iteminfo/edirmk");
- if(tmp){
- tmp = tmp + " ";
- }
- model.setValue("/root/main/item1/iteminfo/edirmk",tmp + memo);
- //model.refresh(); 최적화 문제로 대체 20080731 박창원
- model.refresh();
- }
- //확인코드(JT001) 줄단위 특정내역 입력
- function fCnfmCdInsert(){
- var trgtManWindow = getChildWindow("SPPIJ00500");
- //var edicd = model.getValue("/root/main/list2/iscllist[" + grd_ordlist.row + "]/edicd");
- var edicd = grd_ordlist.valueMatrix(grd_ordlist.row, grd_ordlist.colref("edicd"));
-
- var selectededicd = "";
- var row = 0;
- model.removenode("/root/hidden/sppij00500/rslt"); // SPPIZ00500_특정내역상세관리 에서 선택된 결과가 copyNode되는 경로임
- model.resetInstanceNode("/root/hidden/sppij00500/cond");
-
- if(edicd){
- for (var i = 1; i < grd_clcjlist.rows; i++) {
- if(edicd == model.getValue("/root/main/list4/clcjlist["+ i +"]/edicd")){
- model.setValue("/root/hidden/sppij00500/cond/edicd", model.getValue("/root/main/list4/clcjlist["+ i +"]/edicd"));
- model.setValue("/root/hidden/sppij00500/cond/spclcd", model.getValue("/root/main/list4/clcjlist["+ i +"]/spclcd"));
- model.setValue("/root/hidden/sppij00500/cond/remfact", model.getValue("/root/main/list4/clcjlist["+ i +"]/remfact"));
- model.setValue("/root/hidden/sppij00500/cond/spclspec", model.getValue("/root/main/list4/clcjlist["+ i +"]/spclspec"));
- model.setValue("/root/hidden/sppij00500/cond/row", i);
- selectededicd = edicd;
- row = i;
- }
- }
- //이미 등록된 확인코드가 있는경우
- if(selectededicd){
- model.setValue("/root/hidden/sppij00500/cond/unitflag", "J");
-
- var chk = model.getValue("/root/hidden/sppij00500/cond/spclcd");
- if(chk == "JT001"){
- model.removeNodeset("root/hidden/sppiz01100/rslt");
- model.makeValue("/root/hidden/sppiz01100/cond/code", model.getValue("/root/hidden/sppij00500/cond/spclspec"));
- model.makeValue("/root/hidden/sppiz01100/edicd", edicd);
- modal("SPPIZ01100" ,"", "10", "10", "SPPIZ01100", "/root/hidden/sppiz01100", "/root/init/sppiz01100", "", ""); // SPPIZ01100_확인코드조회
- if (instance1.selectSingleNode("root/hidden/sppiz01100/rslt")) {
- model.setValue("/root/main/list4/clcjlist["+ row +"]/spclspec", model.getValue("root/hidden/sppiz01100/rslt/code"));
- //Combo 줄단위 코드로 셋팅
- grd_clcjlist.cellComboNodeset(row,3) = "/root/init/P0117list/P0117[minval = 'J']";
- grd_ordlist.valueMatrix(grd_ordlist.row, grd_ordlist.colref("cnfmcd")) = model.getValue("root/hidden/sppiz01100/rslt/code");
- model.refresh();
- fSpclGridInsertRow() ;
- }
- }
- //등록된 확인코드가 없으면 신규로 발생시켜준다.
- }else{
-
- model.removeNodeset("root/hidden/sppiz01100/rslt");
- model.makeValue("/root/hidden/sppiz01100/cond/code", "");
- modal("SPPIZ01100" ,"", "10", "10", "SPPIZ01100", "/root/hidden/sppiz01100", "/root/init/sppiz01100", "", ""); // SPPIZ01100_확인코드조회
-
- if (instance1.selectSingleNode("root/hidden/sppiz01100/rslt")) {
- fSpclGridInsertRow() ;
-
- var row = grd_clcjlist.rows - 1;
- //Combo 줄단위 코드로 셋팅
- grd_clcjlist.cellComboNodeset(row,3) = "/root/init/P0117list/P0117[minval = 'J']";
-
- model.setValue("/root/main/list4/clcjlist["+ row +"]/edicd", edicd);
- model.setValue("/root/main/list4/clcjlist["+ row +"]/spclcd", "JT001");
- model.setValue("/root/main/list4/clcjlist[" + row + "]/unitflag","J");
- model.setValue("/root/main/list4/clcjlist[" + row + "]/spclmemoflag","E" );
- model.setValue("/root/main/list4/clcjlist[" + row + "]/remfact", "X(5)");
- model.setValue("/root/main/list4/clcjlist[" + row + "]/spclspec", model.getValue("root/hidden/sppiz01100/rslt/code"));
-
- grd_ordlist.valueMatrix(grd_ordlist.row, grd_ordlist.colref("cnfmcd")) = model.getValue("root/hidden/sppiz01100/rslt/code");
- //model.setValue("/root/main/list2/iscllist[" + grd_ordlist.row + "]/cnfmcd",model.getValue("root/hidden/sppiz01100/rslt/code"));
- fSpclGridInsertRow() ;
- }
- }
- //특정내역이 있는 처방에 'T'필드에 *표를 해준다.
- //fSetOrdSpclTxt();
- }
-
- }
- ///////////////////////////////////////////////////////////////////////////
- //특정내역 관련 코딩 종료 //
- ///////////////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////////////
- // 조합기호(ipt_cmpyno)를 입력하면 해당 조합명칭을 조회한다.
- function fGetCmpyNm() {
- /*var rrgstno = model.getValue("/root/main/item1/iteminfo/rrgstno");
- rrgstno = rrgstno.replace("-","");
-
- //보험증번호 조회(보험자격조회)
- var parm = rrgstno + "▦" + //주민번호
- model.getValue("/root/main/item1/iteminfo/patnm") + "▦" + //이름
- model.getValue("/root/main/item1/iteminfo/indd") + "▦";//진료일자
-
- setParameter("SPPMC03700_PARM",parm);
- setParameter("SPPMC03700_RTN","");
-
- modal("SPPMC03700", "1","400", "400", "SPPMC03700", "", "", "", ""); */
-
-
- }
- //보조유형이 바뀌는경우
- function fSetPatSuppRate() {
- // 보조유형ID과 요율%로 combo 의 value
- // 보조유형NM과 요율%로 combo 의 label
- //cmb_suppkind.choices.itemset.attribute("nodeset") = "/root/main/item4/insu[suppkind = '"+ cmb_suppkind.value +"']";
- var suppkindcd = model.getValue("/root/main/item4/insu/suppkind");
- var payownbrate = model.getValue("/root/main/item4/insu/ownbrate");
- model.setValue("/root/main/item1/iteminfo/suppkindcd", suppkindcd);
- model.setValue("/root/main/item1/iteminfo/ownrate", payownbrate);
-
- if(payownbrate == "20"){
- opt_suppkind.attribute("class") = "output_fix";
- }else{
- opt_suppkind.attribute("color") = "#ff0066";
- }
- //model.refresh(); 최적화 문제로 대체 20080731 박창원
- model.refreshpart("/root/main/item1/iteminfo");
- }
- ///////////////////////////////////////////////////////////////////////////
- //처방 관련 코딩 시작 //
- ///////////////////////////////////////////////////////////////////////////
- //처방조회 옵션에 항목구분에 처방이 있는 것만 Bold로 보여준다.
- //이건 처음에 로드했을때 한번만 도는것이라서 따로 분리하여 만듬. 2007.09.09 박도형
- // 최적화 문제로 else if를 사용하여 수정 - 20081017 박창원
- function fSetItemBold(){
- rdo_ordfilflag.item(0).attribute("font-weight") = "bold"; // "전체" 항목은 default 로 굵게 표시한다.
- //우선 초기화를 한다.
- rdo_ordfilflag.item(1).attribute("font-weight") = "normal";
- rdo_ordfilflag.item(2).attribute("font-weight") = "normal";
- rdo_ordfilflag.item(3).attribute("font-weight") = "normal";
- rdo_ordfilflag.item(4).attribute("font-weight") = "normal";
- rdo_ordfilflag.item(5).attribute("font-weight") = "normal";
- rdo_ordfilflag.item(6).attribute("font-weight") = "normal";
- rdo_ordfilflag.item(7).attribute("font-weight") = "normal";
- rdo_ordfilflag.item(8).attribute("font-weight") = "normal";
- rdo_ordfilflag.item(9).attribute("font-weight") = "normal";
- rdo_ordfilflag.item(10).attribute("font-weight") = "normal";
- rdo_ordfilflag.item(11).attribute("font-weight") = "normal";
- rdo_ordfilflag.item(12).attribute("font-weight") = "normal";
-
- // 처방 조회부 항목구분 Radio에서 해당 처방이 있는 item을 굵게 표시한다.
- var item1 = model.getValue("/root/main/list2/iscllist[item1='01']/item1"); //항목구분 에 Bold처리하기 위한 체크
- var item2 = model.getValue("/root/main/list2/iscllist[item1='02']/item1");
- var item3 = model.getValue("/root/main/list2/iscllist[item1='03']/item1");
- var item4 = model.getValue("/root/main/list2/iscllist[item1='04']/item1");
- var item5 = model.getValue("/root/main/list2/iscllist[item1='05']/item1");
- var item6 = model.getValue("/root/main/list2/iscllist[item1='06']/item1");
- var item7 = model.getValue("/root/main/list2/iscllist[item1='07']/item1");
- var item8 = model.getValue("/root/main/list2/iscllist[item1='08']/item1");
- var item9 = model.getValue("/root/main/list2/iscllist[item1='09']/item1");
- var item10 = model.getValue("/root/main/list2/iscllist[item1='10']/item1");
- var itemSS = model.getValue("/root/main/list2/iscllist[item1='SS']/item1");
- var itemAA = model.getValue("/root/main/list2/iscllist[item1='AA']/item1");
- var itemBB = model.getValue("/root/main/list2/iscllist[item1='BB']/item1");
-
- if (item1 == "01") {
- rdo_ordfilflag.item(1).attribute("font-weight") = "bold";
- }
- if (item2 == "02") {
- rdo_ordfilflag.item(2).attribute("font-weight") = "bold";
- }
- if (item3 == "03") {
- rdo_ordfilflag.item(3).attribute("font-weight") = "bold";
- }
- if (item4 == "04") {
- rdo_ordfilflag.item(4).attribute("font-weight") = "bold";
- }
- if (item5 == "05") {
- rdo_ordfilflag.item(5).attribute("font-weight") = "bold";
- }
- if (item6 == "06") {
- rdo_ordfilflag.item(6).attribute("font-weight") = "bold";
- }
- if (item7 == "07") {
- rdo_ordfilflag.item(7).attribute("font-weight") = "bold";
- }
- if (item8 == "08") {
- rdo_ordfilflag.item(8).attribute("font-weight") = "bold";
- }
- if (item9 == "09") {
- rdo_ordfilflag.item(9).attribute("font-weight") = "bold";
- }
- if (item10 == "10") {
- rdo_ordfilflag.item(10).attribute("font-weight") = "bold";
- }
- if (itemSS == "SS") {
- rdo_ordfilflag.item(11).attribute("font-weight") = "bold";
- }
- if (itemAA == "AA" || itemBB == "BB" ) {
- rdo_ordfilflag.item(12).attribute("font-weight") = "bold";
- }
- }
- // 20091126 수정추가 JHP 요청번호 8496, 주사제 4항1목, 마취제 5항 1목에 대해 1회량이 20이 넘으면 메세지 처리요청 ####################시작
- function fChkinjanstmsg(){
- var visualcalcscorcd = "-";
- // SNGLEARNCLS - > 05, 04, 09 (처방분류에서 주사제/내분비대사/ Insulin&Antidiabetics 제외) 구현해야함.
- // 20091130 JHP snglearncls값 확인하여 050409값일때는 메세지 처리 제외한다.
- // 처방for 로직 수정 속도개선 plet2
- var nodelist = model.instances(0).selectNodes("/root/main/list2/iscllist[item1='04' and item2='01' and calcqty>= 20 and snglearncls!='050409']/snglcalcscorcd");
- if (nodelist.length > 0) {
- var i=0;
- while(nodelist.nextNode()){
- visualcalcscorcd = visualcalcscorcd + ', ' + nodelist.item(i).value;
- ++i;
- }
- }
-
- if(visualcalcscorcd != "-"){
- messageBox("1회량 20이상인 주사제가 존재합니다.(인슐린제외) \n\n(" + visualcalcscorcd + ")\n\n","I007");
- }
- }
- // 항목별소계
- function fSetItemSubTotal() {
- grd_ordlist.rebuildStyle();
- grd_ordlist.rebuild();
-
- // ****************************************************************************************************************
- // 항목별 소계 subtotal 김상진 20101122
- // ****************************************************************************************************************
- // #ffff0| 밝은노랑
- // #d9e3fe 옅은파랑
- // #eeddff 옅은보라
- // #b9fcf8 밝은하늘
- // #cefcfa 옅은하늘
- var grdobj = document.controls.item("grd_ordlist");
- if (model.getValue(chk_showsubtotal.attribute("ref")) == "Y") {
- var col_hngnm = grdobj.colRef("hngnm");
- var col_item1 = grdobj.colRef("item1");
- var subtot_style = "background-color:#cefcfa; color:#0000ff;font-weight:bold;"
- var subtot_fromat = "format:(-)#,###; roundmode:round; roundposition:0"
- grdobj.subtotalposition= "below";
- grdobj.subtotal("sum", col_item1, grdobj.colRef("hospaddamt"),subtot_fromat, subtot_style, col_hngnm, col_hngnm, true);
- grdobj.subtotal("sum", col_item1, grdobj.colRef("specamt"),subtot_fromat, subtot_style, col_hngnm, col_hngnm, true);
- grdobj.subtotal("sum", col_item1, grdobj.colRef("totordamt"),subtot_fromat, subtot_style, col_hngnm, col_hngnm, true);
- grdobj.subtotal("sum", col_item1, grdobj.colRef("calcamt"),subtot_fromat, subtot_style, col_hngnm, col_hngnm, true);
- var srchnm = "";
- var fild1 = "0";
- var rowno = grdobj.findRow(srchnm,grdobj.fixedrows ,col_item1, true, true);
- while( rowno > 0){
- var fild1 = "0";
- fild1 = grd_ordlist.valueMatrix(rowno, col_hngnm);
- if(fild1 == "01"){
- grd_ordlist.valueMatrix(rowno, col_hngnm) = "진찰료 소계";
- }else if(fild1== "02"){
- grd_ordlist.valueMatrix(rowno, col_hngnm) = "입원료 소계";
- }else if(fild1 == "03"){
- grd_ordlist.valueMatrix(rowno, col_hngnm) = "투약료 소계";
- }else if(fild1 == "04"){
- grd_ordlist.valueMatrix(rowno, col_hngnm) = "주사료 소계";
- }else if(fild1 == "05"){
- grd_ordlist.valueMatrix(rowno, col_hngnm) = "마취료 소계";
- }else if(fild1 == "06"){
- grd_ordlist.valueMatrix(rowno, col_hngnm) = "이학료 소계";
- }else if(fild1 == "07"){
- grd_ordlist.valueMatrix(rowno, col_hngnm) = "정신료 소계";
- }else if(fild1 == "08"){
- grd_ordlist.valueMatrix(rowno, col_hngnm) = "수술료 소계";
- }else if(fild1 == "09"){
- grd_ordlist.valueMatrix(rowno, col_hngnm) = "검사료 소계";
- }else if(fild1 == "10"){
- grd_ordlist.valueMatrix(rowno, col_hngnm) = "방사선 소계";
- }else if(fild1 == "SS"){
- grd_ordlist.valueMatrix(rowno, col_hngnm) = "특수 소계";
- }
- rowno = grdobj.findRow(srchnm, rowno + 1,col_item1,true,true);
- }
- }
- }
-
-
- //범례 색깔을 표시한다.
- function fSetColorSpclJudgOrder() {
- //일단 수정변경 : 20090915 : JHP 필터기능으로 숨김기능이 제어가 되어서 for문을 돌릴때 i의 제어가 어렵다 하여 datagrid의 rows로 for문을 돌리는걸로 변경한다.
- if (model.getValue(chk_showitemcoloryn.attribute("ref")) == "Y") {
- fSetOrderColorByEdiitem();
- }
- //Color 표시 범례
- //1. 문제처방 : #fcd2c1
- //2. 선별심사 : #ffe79d
- //3. 선별심사 + 문제처방 : #7BE6B7
- //4. 야간, 공휴가산 : #ffff00(밝은노랑)
- //선별심사, 문제처방 체크 (기왕증, CP보다 우선시 한다. -심사자가 기왕증 ,CP여부를 확인하고 문제처방을 한경우 임으로)
- var grdobj = document.controls.item("grd_ordlist");
- var col_hngnm = grdobj.colRef("hngnm");
-
- var col_probordyn = grdobj.colRef("probordyn");
- var srchnm = "Y";
- var spcljudgyn = "";
- rowno = grdobj.findRow(srchnm,grdobj.fixedrows ,col_probordyn, true, true);
- while( rowno > 0){
- grd_ordlist.rowStyle(rowno,"data","background-color") = "#fcd2c1";
- rowno = grdobj.findRow(srchnm,rowno + 1 ,col_probordyn, true, true);
- }
-
- var col_spcljudgyn = grdobj.colRef("spcljudgyn");
- var probordyn = "";
- var rowno = grdobj.findRow(srchnm,grdobj.fixedrows ,col_spcljudgyn, true, true);
- while( rowno > 0){
- grd_ordlist.rowStyle(rowno,"data","background-color") = "#ffe79d";
- probordyn = grdobj.valueMatrix(rowno, col_probordyn);
- if (probordyn == "Y"){ //둘다 체크된경우
- grd_ordlist.rowStyle(rowno,"data","background-color") = "#7BE6B7";
- }
- rowno = grdobj.findRow(srchnm,rowno + 1 ,col_spcljudgyn, true, true);
- }
- // 야간가산(산정의미 두번째 "1'), 공휴가산(산정의미 두번째자리 "5")
- var col_estmmeancd = grdobj.colRef("estmmeancd");
- var col_pay100 = grdobj.colRef("pay100");
- srchnm = "1";
- rowno = grdobj.findRow(srchnm,grdobj.fixedrows ,col_estmmeancd, false, false);
- while( rowno > 0){
- if ( grdobj.valueMatrix(rowno,col_estmmeancd).substr(1, 1) == srchnm ){
- grdobj.cellStyle("background-color", rowno, col_estmmeancd, rowno, col_pay100) = "#ffff00";
- }
- rowno = grdobj.findRow(srchnm,rowno + 1 ,col_estmmeancd, false, false);
- }
- // 야간가산(산정의미 두번째 "1'), 공휴가산(산정의미 두번째자리 "5")
- srchnm = "5";
- rowno = grdobj.findRow(srchnm,grdobj.fixedrows ,col_estmmeancd, false, false);
- while( rowno > 0){
- if ( grdobj.valueMatrix(rowno,col_estmmeancd).substr(1, 1) == srchnm ){
- grdobj.cellStyle("background-color", rowno, col_estmmeancd, rowno, col_pay100) = "#ffff00";
- }
- rowno = grdobj.findRow(srchnm,rowno + 1 ,col_estmmeancd, false, false);
- }
-
- //응급가산 ( '2','3','P','Q' )
- var erindt = model.getValue("/root/main/item1/iteminfo/erindt");
- var eroutdt = model.getValue("/root/main/item1/iteminfo/eroutdt");
- var outdate = eroutdt.toDate("YYYYMMDDhhmm").getDateFormat("YYYYMMDDhhmm");
- var in24date = erindt.toDate("YYYYMMDDhhmm").getAddDate(24,"h").getDateFormat("YYYYMMDDhhmm");
- var basedate = "";
- var execddtm = "";
-
- if (outdate < in24date ) {
- basedate = outdate;
- } else {
- basedate = in24date;
- }
-
- srchnm = "2";
- rowno = grdobj.findRow(srchnm,grdobj.fixedrows ,col_estmmeancd, false, false);
- while( rowno > 0){
- if ( grdobj.valueMatrix(rowno,col_estmmeancd).substr(1, 1) == srchnm ){
- execddtm =grdobj.valueMatrix(rowno,grdobj.colRef("execddtm")).toDate("YYYYMMDDhhmm").getDateFormat("YYYYMMDDhhmm") ;
- if (execddtm > basedate) {
- grdobj.cellStyle("background-color", rowno, col_estmmeancd, rowno, col_pay100) = "#ffff00";
- }
- }
- rowno = grdobj.findRow(srchnm,rowno + 1 ,col_estmmeancd, false, false);
- }
-
- srchnm = "3";
- rowno = grdobj.findRow(srchnm,grdobj.fixedrows ,col_estmmeancd, false, false);
- while( rowno > 0){
- if ( grdobj.valueMatrix(rowno,col_estmmeancd).substr(1, 1) == srchnm ){
- execddtm =grdobj.valueMatrix(rowno,grdobj.colRef("execddtm")).toDate("YYYYMMDDhhmm").getDateFormat("YYYYMMDDhhmm") ;
- if (execddtm > basedate) {
- grdobj.cellStyle("background-color", rowno, col_estmmeancd, rowno, col_pay100) = "#ffff00";
- }
- }
- rowno = grdobj.findRow(srchnm,rowno + 1 ,col_estmmeancd, false, false);
- }
-
- srchnm = "P";
- rowno = grdobj.findRow(srchnm,grdobj.fixedrows ,col_estmmeancd, false, false);
- while( rowno > 0){
- if ( grdobj.valueMatrix(rowno,col_estmmeancd).substr(1, 1) == srchnm ){
- execddtm =grdobj.valueMatrix(rowno,grdobj.colRef("execddtm")).toDate("YYYYMMDDhhmm").getDateFormat("YYYYMMDDhhmm") ;
- if (execddtm > basedate) {
- grdobj.cellStyle("background-color", rowno, col_estmmeancd, rowno, col_pay100) = "#ffff00";
- }
- }
- rowno = grdobj.findRow(srchnm,rowno + 1 ,col_estmmeancd, false, false);
- }
-
- srchnm = "Q";
- rowno = grdobj.findRow(srchnm,grdobj.fixedrows ,col_estmmeancd, false, false);
- while( rowno > 0){
- if ( grdobj.valueMatrix(rowno,col_estmmeancd).substr(1, 1) == srchnm ){
- execddtm =grdobj.valueMatrix(rowno,grdobj.colRef("execddtm")).toDate("YYYYMMDDhhmm").getDateFormat("YYYYMMDDhhmm") ;
- if (execddtm > basedate) {
- grdobj.cellStyle("background-color", rowno, col_estmmeancd, rowno, col_pay100) = "#ffff00";
- }
- }
- rowno = grdobj.findRow(srchnm,rowno + 1 ,col_estmmeancd, false, false);
- }
- //DRG 수술구분
- var col_drgopyn = grdobj.colRef("drgopyn");
- srchnm = "Y";
- rowno = grdobj.findRow(srchnm,grdobj.fixedrows ,col_drgopyn, true, true);
- while( rowno > 0){
- grdobj.cellStyle("background-color", rowno, col_pay100, rowno, col_pay100) = "#fec34d";
- rowno = grdobj.findRow(srchnm,rowno + 1 ,col_drgopyn, true, true);
- }
-
- // 급여구분 본인부담, 일반 색깔구분
- var col_calcpayflag = grdobj.colRef("calcpayflag");
- srchnm = "1";
- rowno = grdobj.findRow(srchnm,grdobj.fixedrows ,col_calcpayflag, true, true);
- while( rowno > 0){
- grdobj.cellStyle("background-color", rowno, col_calcpayflag, rowno, col_calcpayflag) = "#00ff00";
- rowno = grdobj.findRow(srchnm,rowno + 1 ,col_calcpayflag, true, true);
- }
- srchnm = "2";
- rowno = grdobj.findRow(srchnm,grdobj.fixedrows ,col_calcpayflag, true, true);
- while( rowno > 0){
- var pynpy = grdobj.valueMatrix(rowno,grdobj.colRef("pynpy"));
- if (pynpy != 0) {
- grdobj.cellStyle("background-color", rowno, col_calcpayflag, rowno, col_calcpayflag) = "#ccccff";
- } else {
- grdobj.cellStyle("background-color", rowno, col_calcpayflag, rowno, col_calcpayflag) = "#ff99cc";
- }
- rowno = grdobj.findRow(srchnm,rowno + 1 ,col_calcpayflag, true, true);
- }
- // 외래 필수심사 품목 표기
- var col_bfjudgyn = grdobj.colRef("bfjudgyn");
- srchnm = "Y";
- rowno = grdobj.findRow(srchnm,grdobj.fixedrows ,col_bfjudgyn, true, true);
- while( rowno > 0){
- grdobj.cellStyle("background-color", rowno, col_hngnm, rowno, col_hngnm) = "#f7a08b";
- rowno = grdobj.findRow(srchnm,rowno + 1 ,col_bfjudgyn, true, true);
- }
- // 응급수가 표기 : 별표1 (2015.12.30.LEJ)
- var col_pordarcptyn = grdobj.colRef("pordarcptyn");
- srchnm = "1";
- rowno = grdobj.findRow(srchnm,grdobj.fixedrows ,col_pordarcptyn, true, true);
- while( rowno > 0){
- grdobj.cellStyle("background-color", rowno, col_pordarcptyn, rowno, col_pordarcptyn) = "#66CCFF";
- rowno = grdobj.findRow(srchnm,rowno + 1 ,col_pordarcptyn, true, true);
- }
- // 응급수가 표기 : 별표2 (2015.12.30.LEJ)
- var col_pordarcptyn = grdobj.colRef("pordarcptyn");
- srchnm = "2";
- rowno = grdobj.findRow(srchnm,grdobj.fixedrows ,col_pordarcptyn, true, true);
- while( rowno > 0){
- grdobj.cellStyle("background-color", rowno, col_pordarcptyn, rowno, col_pordarcptyn) = "#FF66FF";
- rowno = grdobj.findRow(srchnm,rowno + 1 ,col_pordarcptyn, true, true);
- }
- // 응급수가 표기 : 별표3 (2015.12.30.LEJ)
- var col_pordarcptyn = grdobj.colRef("pordarcptyn");
- srchnm = "3";
- rowno = grdobj.findRow(srchnm,grdobj.fixedrows ,col_pordarcptyn, true, true);
- while( rowno > 0){
- grdobj.cellStyle("background-color", rowno, col_pordarcptyn, rowno, col_pordarcptyn) = "#339933";
- rowno = grdobj.findRow(srchnm,rowno + 1 ,col_pordarcptyn, true, true);
- }
- var spclcnt = grd_clcjlist.rows;
- var col_edicd = grdobj.colRef("edicd");
- var spclcd = "";
- var spclspec = "";
- var spcledicd = "";
- var spclunitflag = "";
- for (var i = 0; i < spclcnt; i++) {
- spclcd = grd_clcjlist.valueMatrix(i, grd_clcjlist.colRef("spclcd"));
- spclspec = grd_clcjlist.valueMatrix(i, grd_clcjlist.colRef("spclspec"));
- spcledicd = grd_clcjlist.valueMatrix(i, grd_clcjlist.colRef("edicd"));
- spclunitflag = grd_clcjlist.valueMatrix(i, grd_clcjlist.colRef("unitflag"));
-
- if (spclunitflag == 'J') { // 줄단위 특정내역인 경우만 적용한다. (2015.03.30 LEJ)
- rowno = grdobj.findRow(spcledicd,grdobj.fixedrows ,col_edicd, true, true);
- while( rowno > 0){
- if(spclcd == "JT001"){
- grdobj.valueMatrix(rowno,grdobj.colRef("cnfmcd")) = spclspec;
- }else{
- grdobj.valueMatrix(rowno,grdobj.colRef("text")) = "*";
- }
- rowno = grdobj.findRow(spcledicd,rowno + 1 ,col_edicd, true, true);
- }
- }
- }
- }
- //특정내역이 있는 처방에 'T'필드에 *표를 해준다.
- function fSetOrdSpclTxt(){
- var cSrcNode = instance1.selectSingleNode("/root/main/list2/iscllist");
- if (cSrcNode == null) { // 특정내역이 없는 경우임
- return;
- }
-
- var rowcnt = getNodesetCount("/root/main/list2/iscllist");
- rowcnt = eval(rowcnt) + 1;
-
- // grd_clcjlist.findRow 로 변경(최적화문제) - 20081017 박창원
- for (var i = 1; i < rowcnt ; i++) { // Grid 필터링 이후 Grid 상에 표시된 처방 개수만큼 돌면서
- var edicd = model.getValue("/root/main/list2/iscllist[" + i + "]/edicd");
- var spcl = grd_clcjlist.rows;
- model.setValue("/root/main/list2/iscllist[" + i + "]/text", "");
- if(spcl > 0){
-
- if (edicd != "") {
- var row = grd_clcjlist.findRow(edicd, 0, grd_clcjlist.colRef("edicd"), false, true);
-
- if ( row > 0 ) {
- var spclcd = model.getValue("/root/main/list4/clcjlist[" + row + "]/spclcd");
- var spclspec = model.getValue("/root/main/list4/clcjlist[" + row + "]/spclspec");
- var spcledicd = model.getValue("/root/main/list4/clcjlist[" + row + "]/spcledicd");
-
- if(edicd == spcledicd){
- if(spclcd == "JT001"){
- model.setValue("/root/main/list2/iscllist[" + i + "]/cnfmcd", spclspec);
- }else{
- model.setValue("/root/main/list2/iscllist[" + i + "]/text", "*");
- }
- }
- }
- }
- }
- }
- grd_ordlist.refresh();
- }
- // 처방 치식 입력
- function fOrderToothInput() {
- var row = grd_ordlist.mouseRow;
- model.setValue("/root/hidden/sppiz00600/cond/pid", model.getValue("/root/main/item1/clbs/pid"));
- model.setValue("/root/hidden/sppiz00600/cond/toot", model.getValue("/root/main/list2/clod[" + row + "]/toot"));
- model.removenode("/root/hidden/sppiz00600/rslt"); // SPPIZ00600_상병및처방별치식 에서 선택된 결과가 copyNode되는 경로임
- modal("SPPIZ00600" ,"", "10", "10", "SPPIZ00600", "/root/hidden/sppiz00600/cond", "/root/hidden/cond", "", ""); // SPPIZ00600_상병및처방별치식.xrw
- var tootSelect = instance1.selectSingleNode("/root/hidden/sppiz00600/rslt");
- if (tootSelect != null) { // 취소를 누른 경우를 제외시킴
- var toot = model.getValue("/root/hidden/sppiz00600/rslt/toot");
- model.setValue("/root/main/list3/diaglist[" + row + "]/toothYN", model.getValue("/root/hidden/sppiz00600/rslt/toothYN"));
- model.setValue("/root/main/list3/diaglist[" + row + "]/toot", toot);
- model.refresh();
- if (model.getValue("/root/hidden/sppiz00600/cond/toot") != toot) { // 치식번호가 변경된 경우
- var diagstatus = grd_diaglist.rowstatus(row);
- if (diagstatus == 0 || diagstatus == 2) { // 0 : new, 2 : update
- grd_diaglist.rowstatus(row) = 2; // 2 : update
- }
- }
- }
- }
- ///////////////////////////////////////////////////////////////////////////
- //처방 관련 코딩 끝 //
- ///////////////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////////////
- //저장로직 관련 코딩 시작 //
- ///////////////////////////////////////////////////////////////////////////
- //저장로직
- function fSaveMain(flag){
-
- // 1. 기본적인 누락정보를 확인한다.
- if (fCheckSave()){
- } else {
- return false;
- }
-
- fSaveAll();
-
- //fGetItemInfo();
- //보험, 급여환자인경우는 중증여부를 체크한다.
- var chkInsukind = model.getValue("/root/main/item1/iteminfo/insukindcd");
- if(chkInsukind == "11" || chkInsukind == "21" || chkInsukind == "22"){
- if (flag != "P") {
- //1. 중증, 산정특례 변경 여부 체크
- fUpdtCheckEssc(flag);
- }
- }
- return true;
- }
- function fSaveAll(){
-
- model.setValue("/root/send/item1/iteminfo",getNodeListCSV(instance1.selectNodes("/root/main/item1/iteminfo")));
-
- //상병은 전체 삭제 날리고 다시 insert시킨다.
- //빈데이터를 삭제한다.
- var rowcnt = grd_diaglist.rows;
- for (var i = rowcnt; i > 0; i--) { // Grid 필터링 이후 Grid 상에 표시된 처방 개수만큼 돌면서
- var diagcd = model.getValue("/root/main/list3/diaglist[" + i + "]/diagcd");
- if(diagcd == ""){
- grd_diaglist.deleteRow(i, false);
- }else{
- grd_diaglist.rowstatus(i) = 3;
- }
- }
- var updtdiag = getGridUpdateData(grd_diaglist);
- if(updtdiag) {
- model.setValue("/root/send/diaglist",grd_diaglist.getUpdateData());
- }
-
- if (btn_save.disabled == false) {
- //빈데이터를 삭제한다.
- for (var i = 1; i < grd_clcjlist.rows; i++) { // Grid 필터링 이후 Grid 상에 표시된 특정내역 개수만큼 돌면서
- var spclcd = model.getValue("/root/main/list4/clcjlist[" + i + "]/spclcd");
-
- if(spclcd == ""){
- var rowstatus = grd_clcjlist.rowstatus(i);
- if (rowstatus == 4) { // 4 : delete
- return;
- }
- else if (rowstatus == 1 || rowstatus == 3) { // 1 : insert, 3 : insert & new
- grd_clcjlist.deleteRow(i, false); // 해당 라인을 Grid에서 삭제한다.
- } else { // 0 : new, 2 : update
- grd_clcjlist.rowstatus(i) = 4; // 4 : delete 상태로 stat를 변경한다.
- }
- }
-
- }
-
- var updtclcj = getGridUpdateData(grd_clcjlist);
- if(updtclcj) {
- model.setValue("/root/send/clcjlist",grd_clcjlist.getUpdateData());
- //if ( submit("TXPIJ00303") ) {
- //삭제였던 특정내역은 그리드에서 지워 버린다.
-
- for (var d = grd_clcjlist.rows; d > 0 ; d--) {
- var delstatus = grd_clcjlist.rowstatus(d);
- if(delstatus == 4){
- grd_clcjlist.deleteRow(d, false); // 해당 라인을 Grid에서 삭제한다.
- }
- }
- grd_clcjlist.clearStatus();
- // }
- }
-
- //저장후 빈행을 추가해 준다.
- fSpclGridInsertRow() ;
- }
-
- //특정내역 처리
- var judgrmk = model.getValue("/root/main/item1/iteminfo/judgrmk");
- var edirmk = model.getValue("/root/main/item1/iteminfo/edirmk");
- var tstrmk = model.getValue("/root/main/item1/iteminfo/tstrmk");
- var dumprmk = model.getValue("/root/main/item1/iteminfo/dumprmk");
- // var tmpedirmk = strTrim(edirmk);
- model.removenode("/root/main/list5");
-
- if(judgrmk){
- fSetJudgEDIMemo(judgrmk, "Y");
- }
-
- if(edirmk){
- fSetJudgEDIMemo(edirmk, "N");
- }
-
- if(tstrmk){
- fSetJudgEDIMemo(tstrmk, "T");
- }
- if(dumprmk){
- fSetJudgEDIMemo(dumprmk, "D");
- }
- model.setValue("/root/send/spclspec",getNodeListCSV(instance1.selectNodes("/root/main/list5/judgrmk")));
-
- submit("TXPIJ00309",false);
-
- }
- //저장전 데이터 유효성을 점검한다.
- function fCheckSave(){
-
- var bfmonth6 = VAL_today.toDate().getAddDate(-180,'D');
- var brthdd = model.getValue("/root/main/item1/iteminfo/brthdd").toDate();
- var snglcalcscorcls0210 = model.getValue("/root/main/list2/iscllist[snglcalcscorcls='0210' and calcpayflag='0' and snglcalcscorcd != 'Z9000' and snglcalcscorcd != 'Z9000-1' and snglcalcscorcd != 'Q9140001' and snglcalcscorcd != 'Q9140002']/snglcalcscorcls");
- var snglcalcscorcls0211 = model.getValue("/root/main/list2/iscllist[snglcalcscorcls='0211' and calcpayflag='0' and snglcalcscorcd != 'Z9000' and snglcalcscorcd != 'Z9000-1' and snglcalcscorcd != 'Q9140001' and snglcalcscorcd != 'Q9140002']/snglcalcscorcls");
-
- if ((bfmonth6 <= brthdd ) && (snglcalcscorcls0210 != "" || snglcalcscorcls0211 != "") ) {
- if (messageBox("6개월 미만 소아환자에게 식이 청구되었습니다. 확인바랍니다. 저장","S001") == 6) {
- return true;
- } else {
- return false;
- }
- } else {
- return true;
- }
- }
- //상병리스트를 저장한다.
- function fSaveDiagList(){
- //상병은 전체 삭제 날리고 다시 insert시킨다.
- //빈데이터를 삭제한다.
- var rowcnt = grd_diaglist.rows;
- for (var i = rowcnt; i > 0; i--) { // Grid 필터링 이후 Grid 상에 표시된 처방 개수만큼 돌면서
- var diagcd = model.getValue("/root/main/list3/diaglist[" + i + "]/diagcd");
- if(diagcd == ""){
- grd_diaglist.deleteRow(i, false);
- }else{
- grd_diaglist.rowstatus(i) = 3;
- }
- }
- var updtdiag = getGridUpdateData(grd_diaglist);
- if(updtdiag) {
- model.setValue("/root/send/diaglist",grd_diaglist.getUpdateData());
- if ( submit("TXPIJ00302",false) ) {
- }
- }
-
- model.refreshpart("/root/main/list3/diaglist");
- }
- //특정내역을 저장 한다.
- function fSaveClcjList(){
- if (btn_save.disabled == false) {
- //빈데이터를 삭제한다.
- for (var i = 1; i < grd_clcjlist.rows; i++) { // Grid 필터링 이후 Grid 상에 표시된 특정내역 개수만큼 돌면서
- var spclcd = model.getValue("/root/main/list4/clcjlist[" + i + "]/spclcd");
-
- if(spclcd == ""){
- var rowstatus = grd_clcjlist.rowstatus(i);
- if (rowstatus == 4) { // 4 : delete
- return;
- }
- else if (rowstatus == 1 || rowstatus == 3) { // 1 : insert, 3 : insert & new
- grd_clcjlist.deleteRow(i, false); // 해당 라인을 Grid에서 삭제한다.
- } else { // 0 : new, 2 : update
- grd_clcjlist.rowstatus(i) = 4; // 4 : delete 상태로 stat를 변경한다.
- }
- }
-
- }
-
- var updtclcj = getGridUpdateData(grd_clcjlist);
- if(updtclcj) {
- model.setValue("/root/send/clcjlist",grd_clcjlist.getUpdateData());
- if ( submit("TXPIJ00303",false) ) {
- //삭제였던 특정내역은 그리드에서 지워 버린다.
-
- for (var d = grd_clcjlist.rows; d > 0 ; d--) {
- var delstatus = grd_clcjlist.rowstatus(d);
- if(delstatus == 4){
- grd_clcjlist.deleteRow(d, false); // 해당 라인을 Grid에서 삭제한다.
- }
- }
- grd_clcjlist.clearStatus();
- }
- }
-
- //저장후 빈행을 추가해 준다.
- fSpclGridInsertRow() ;
- }
- }
- //인적사항 저장
- function fSaveItemInfo(){
- submit("TXPIJ00301",false);
- }
- function strTrim(str){
- return str.replace(/(^\s*)|(\s*$)/g, "");
- }
- //심사제 메모를 저장한다.
- function fSaveJudgrmk(){
- //특정내역 처리
- var judgrmk = model.getValue("/root/main/item1/iteminfo/judgrmk");
- var edirmk = model.getValue("/root/main/item1/iteminfo/edirmk");
- var tstrmk = model.getValue("/root/main/item1/iteminfo/tstrmk");
- // var tmpedirmk = strTrim(edirmk);
- model.removenode("/root/main/list5");
-
- if(judgrmk){
- fSetJudgEDIMemo(judgrmk, "Y");
- }
-
- //if(edirmk){
- fSetJudgEDIMemo(edirmk, "N");
- //}
-
- if(tstrmk){
- fSetJudgEDIMemo(tstrmk, "T");
- }
- model.setValue("/root/main/item1/iteminfo/judgrmk_orign",judgrmk);
- model.setValue("/root/main/item1/iteminfo/edirmk_orign",edirmk);
- model.setValue("/root/main/item1/iteminfo/tstrmk_orign",tstrmk);
-
-
- submit("TXPIJ00304",false);
-
- }
- //원무 계산서를 작성한다.
- function fSaveCalcAmt(flag){
-
- var cnt = 1;
- var pid = model.getValue("/root/send/pid");
- var indd = model.getValue("/root/send/indd");
- var futureinsuyn = model.getValue("/root/main/item1/iteminfo/futureinsuyn");
-
- model.resetInstanceNode("/root/send/insulist");
- var instcd = model.getValue("/root/main/item1/iteminfo/instcd");
-
- model.makeNode("/root/send/insu");
- copyNodeType("/root/send/insu","/root/main/list1","replace");
-
- var nodecnt = getNodesetCount("/root/send/insu/insulist");
-
- // 배열 생성
- var insuArray = new Array(nodecnt);
- for (var i = 0; i<nodecnt; i++) {
- insuArray[i] = new Array(grd_insuhistory.colref("indd"));
- }
- var row = 1;
-
- for (var i = 0; i<nodecnt; i++) {
- insuArray[i][0] = model.getValue("/root/send/insu/insulist["+ row + "]/insukind");
- insuArray[i][1] = model.getValue("/root/send/insu/insulist["+ row + "]/suppkind");
- insuArray[i][2] = model.getValue("/root/send/insu/insulist["+ row + "]/mskind");
- insuArray[i][3] = model.getValue("/root/send/insu/insulist["+ row + "]/fromdd");
- insuArray[i][4] = model.getValue("/root/send/insu/insulist["+ row + "]/todd");
- insuArray[i][5] = model.getValue("/root/send/insu/insulist["+ row + "]/cretno");
- insuArray[i][6] = model.getValue("/root/send/insu/insulist["+ row + "]/seqno");
- insuArray[i][7] = model.getValue("/root/send/insu/insulist["+ row + "]/pid");
- insuArray[i][8] = model.getValue("/root/send/insu/insulist["+ row + "]/indd");
- insuArray[i][9] = model.getValue("/root/send/insu/insulist["+ row + "]/dschnotidt");
- insuArray[i][10] = flag;
- //할인계정 추가
- insuArray[i][11] = model.getValue("/root/send/insu/insulist["+ row + "]/disccd");
- insuArray[i][12] = model.getValue("/root/send/insu/insulist["+ row + "]/todd");
- insuArray[i][13] = model.getValue("/root/send/insu/insulist["+ row + "]/ownbmaxgradeflag"); // 본인부담상한 구분 추가 20140320 LEJ
- // insuArray[i][13] = model.getValue("/root/send/insu/insulist["+ row + "]/maxynm"); // 최종유형 날짜 처리를 위해서 20080924 박창원
- // insuArray[i][14] = model.getValue("/root/send/insu/insulist["+ row + "]/maxyns"); // 최종유형 날짜 처리를 위해서 20080924 박창원
- row++;
- }
-
- // 종료일 기준으로 sort
- for (var i = 0; i<nodecnt; i++) {
- for (var j = i+1; j<nodecnt; j++) {
- var oldtodd = eval(insuArray[i][4]);
- var newtodd = eval(insuArray[j][4]);
-
- if (oldtodd > newtodd) {
-
- var tempinsukind = insuArray[j][0];
- var tempsuppkind = insuArray[j][1];
- var tempmskind = insuArray[j][2];
- var tempfromdd = insuArray[j][3];
- var temptodd = insuArray[j][4];
- var tempcretno = insuArray[j][5];
- var tempseqno = insuArray[j][6];
- var temppid = insuArray[j][7];
- var tempindd = insuArray[j][8];
- var tempdschnotidt = insuArray[j][9];
- var tempflag = insuArray[j][10];
- var tempdisccd = insuArray[j][11];
- var temporgtodd = insuArray[i][12];
- var tempownbmaxgradeflag = insuArray[i][13];
-
- insuArray[j][0] = insuArray[i][0];
- insuArray[j][1] = insuArray[i][1];
- insuArray[j][2] = insuArray[i][2];
- insuArray[j][3] = insuArray[i][3];
- insuArray[j][4] = insuArray[i][4];
- insuArray[j][5] = insuArray[i][5];
- insuArray[j][6] = insuArray[i][6];
- insuArray[j][7] = insuArray[i][7];
- insuArray[j][8] = insuArray[i][8];
- insuArray[j][9] = insuArray[i][9];
- insuArray[j][10]= insuArray[i][10];
- insuArray[j][11]= insuArray[i][11];
- insuArray[j][12]= insuArray[i][12];
- insuArray[j][13]= insuArray[i][13];
-
- insuArray[i][0] = tempinsukind;
- insuArray[i][1] = tempsuppkind;
- insuArray[i][2] = tempmskind;
- insuArray[i][3] = tempfromdd;
- insuArray[i][4] = temptodd;
- insuArray[i][5] = tempcretno;
- insuArray[i][6] = tempseqno;
- insuArray[i][7] = temppid;
- insuArray[i][8] = tempindd;
- insuArray[i][9] = tempdschnotidt;
- insuArray[i][10]= tempflag;
- insuArray[i][11]= tempdisccd;
- insuArray[i][12]= temporgtodd;
- insuArray[i][13]= tempownbmaxgradeflag;
-
- }
- }
- }
-
- // 배열에 있는 데이타를 node로 다시 copy
- model.removenode("/root/send/insu");
-
- row = 1;
-
- var mskind = model.getValue("/root/send/mskind");
-
- for (var i = 0; i<nodecnt; i++) {
-
- var mskind_calc = insuArray[i][2];
-
- if(mskind == mskind_calc){
- model.makevalue("/root/send/insu/insulist["+ row + "]/insukind", insuArray[i][0]);
- model.makevalue("/root/send/insu/insulist["+ row + "]/suppkind", insuArray[i][1]);
- model.makevalue("/root/send/insu/insulist["+ row + "]/mskind", insuArray[i][2]);
- model.makevalue("/root/send/insu/insulist["+ row + "]/fromdd", insuArray[i][3]);
-
- // 마지막 데이타의 종료일자가 '99991231'일 경우 퇴원 통보일시로 변경
- // 종료일자만 체크 - 20080924
- if (insuArray[i][4] == "99991231" || insuArray[i][4] == "") {
- model.makevalue("/root/send/insu/insulist["+ row + "]/todd", insuArray[i][9]);
- model.makevalue("/root/send/insu/insulist["+ row + "]/orgtodd", "99991231");
- } else {
- // 미래유형이 있는경우 처리한다. 미래유형이 있는경우 마지막 데이터는 종료일이 99991231이 아님
- // 미래유형이 있는 경우 종료일을 퇴원통보일로 맞춰주고 orgtodd는 99991231로 set 한다.
- if (futureinsuyn == "Y" && row == nodecnt) {
- model.makevalue("/root/send/insu/insulist["+ row + "]/todd", insuArray[i][9]);
- model.makevalue("/root/send/insu/insulist["+ row + "]/orgtodd", "99991231");
- }
- model.makevalue("/root/send/insu/insulist["+ row + "]/todd", insuArray[i][4]);
- model.makevalue("/root/send/insu/insulist["+ row + "]/orgtodd", insuArray[i][12]);
- }
- model.makevalue("/root/send/insu/insulist["+ row + "]/cretno", insuArray[i][5]);
- model.makevalue("/root/send/insu/insulist["+ row + "]/seqno", insuArray[i][6]);
- model.makevalue("/root/send/insu/insulist["+ row + "]/pid", insuArray[i][7]);
- model.makevalue("/root/send/insu/insulist["+ row + "]/indd", insuArray[i][8]);
- model.makevalue("/root/send/insu/insulist["+ row + "]/dschnotidt", insuArray[i][9]);
- model.makevalue("/root/send/insu/insulist["+ row + "]/instcd", instcd);
- model.makevalue("/root/send/insu/insulist["+ row + "]/flag", insuArray[i][10]);
- model.makevalue("/root/send/insu/insulist["+ row + "]/disccd", insuArray[i][11]);
- model.makevalue("/root/send/insu/insulist["+ row + "]/ownbmaxgradeflag", insuArray[i][13]);
-
- row++;
- }
- }
-
- if (submit("TXPIJ00306", false)) {
- return 1;
- } else {
- return 0;
- }
- }
- // 심사자메모, EDI청구메모를 특정내역 형식에 맞춰 설정한다.
- function fSetJudgEDIMemo(spclmemo, usermemoyn) {
- var item5Path = "";
- var item5Node = "";
-
- if (usermemoyn == "Y") {
- item5Path = "/root/main/list5/judgrmk[";
- item5Node = "U";
- } else if(usermemoyn == "N"){
- item5Path = "/root/main/list5/judgrmk[";
- item5Node = "E";
- } else if(usermemoyn == "D"){
- item5Path = "/root/main/list5/judgrmk[";
- item5Node = "D";
- } else{
- item5Path = "/root/main/list5/judgrmk[";
- item5Node = "T";
- }
-
-
- var iSpclCdCnt = 0;
- var spclcnt = instance1.selectSingleNode("/root/main/list5");
- if(spclcnt != null){
- var spcllist = spclcnt.childNodes;
- iSpclCdCnt = spcllist.length ; // DB에 저장될 MX999 코드 개수
- }
-
- var iSpclCdTotLength = getStringLength(spclmemo); // (stringHelper.js) 문자열의 길이를 구한다.
-
- // 수정추가 JHP 20090811 심사메모 4000byte초과시 alert메세지 띄우면서 안되게끔... 일단... clob으로 안되기때문에....
- if (iSpclCdTotLength > 4000){
- messageBox("심사/EDI메모내용이 너무길어 저장을 ","E001");
- return false;
- }
-
- var indd = model.getValue("/root/main/item1/iteminfo/indd1");
-
- if (iSpclCdTotLength > 1333) { // 새로 입력된 특정코드가 700byte를 넘는다.
- // 영문(700자), 한글(350자) 길이로 잘라서 n개의 특정코드를 만든다.
- var iLen = 0; // 특정내역 길이가 700 byte가 되었는지 계산
- var iStartInx = 0; // 특정내역 시작 index
- var iCharCnt = 0; // 몇글자로 구성되는지 계산
-
- for (var i=0; i < spclmemo.length; i++) {
- var sBit = spclmemo.charAt(i);
- iCharCnt++;
- if (escape(sBit).length > 4) {
- iLen = iLen + 2;
- } else {
- iLen = iLen + 1;
- }
- if (iLen == 1333 || iLen > 1333) { // 영문(700자), 한글(350자)
- iSpclCdCnt++;
- //model.makeValue(item5Path + iSpclCdCnt + "]/" + item5Node + "usermemoyn", usermemoyn);
- if (iLen == 350) { // 700byte로 길이가 끝난 경우
- model.makeValue(item5Path + iSpclCdCnt + "]/spclspec", spclmemo.substr(iStartInx, iCharCnt));
- model.makeValue(item5Path + iSpclCdCnt + "]/spclmemoflag", item5Node);
- model.makeValue(item5Path + iSpclCdCnt + "]/m", "i");
- model.makeValue(item5Path + iSpclCdCnt + "]/unitflag", "M");
- model.makeValue(item5Path + iSpclCdCnt + "]/spclcd", "MX999");
- model.makeValue(item5Path + iSpclCdCnt + "]/seqno", iSpclCdCnt);
- model.makeValue(item5Path + iSpclCdCnt + "]/pid", model.getValue("/root/main/item1/iteminfo/pid"));
- model.makeValue(item5Path + iSpclCdCnt + "]/indd",indd);
- model.makeValue(item5Path + iSpclCdCnt + "]/mskind", model.getValue("/root/main/item1/iteminfo/mskind"));
- model.makeValue(item5Path + iSpclCdCnt + "]/cretno", model.getValue("/root/main/item1/iteminfo/cretno"));
- model.makeValue(item5Path + iSpclCdCnt + "]/fromdd", model.getValue("/root/main/item1/iteminfo/fromdd"));
- model.makeValue(item5Path + iSpclCdCnt + "]/instcd", "");
- model.makeValue(item5Path + iSpclCdCnt + "]/lastupdtrid", "");
-
- iStartInx += iCharCnt;
- }
- else if (iLen > 350) { // 영문(700자), 한글(350자)를 넘는 경우
- model.makeValue(item5Path + iSpclCdCnt + "]/spclspec", spclmemo.substr(iStartInx, iCharCnt - 1));
- model.makeValue(item5Path + iSpclCdCnt + "]/spclmemoflag", item5Node);
- model.makeValue(item5Path + iSpclCdCnt + "]/m", "i");
- model.makeValue(item5Path + iSpclCdCnt + "]/unitflag", "M");
- model.makeValue(item5Path + iSpclCdCnt + "]/spclcd", "MX999");
- model.makeValue(item5Path + iSpclCdCnt + "]/seqno", iSpclCdCnt);
- model.makeValue(item5Path + iSpclCdCnt + "]/pid", model.getValue("/root/main/item1/iteminfo/pid"));
- model.makeValue(item5Path + iSpclCdCnt + "]/indd", indd);
- model.makeValue(item5Path + iSpclCdCnt + "]/mskind", model.getValue("/root/main/item1/iteminfo/mskind"));
- model.makeValue(item5Path + iSpclCdCnt + "]/cretno", model.getValue("/root/main/item1/iteminfo/cretno"));
- model.makeValue(item5Path + iSpclCdCnt + "]/fromdd", model.getValue("/root/main/item1/iteminfo/fromdd"));
- model.makeValue(item5Path + iSpclCdCnt + "]/instcd", "");
- model.makeValue(item5Path + iSpclCdCnt + "]/lastupdtrid", "");
-
- iStartInx += (iCharCnt - 1);
- }
-
- iCharCnt = 0;
- iLen = 0;
- if (parseInt(iSpclCdTotLength / 1333) == iSpclCdCnt) {
- i = spclmemo.length;
- if ((iSpclCdTotLength % 1333) != 0) { // 700Byte 씩 자르고 남은 길이가 있는 경우
- iSpclCdCnt++;
- //model.makeValue(item5Path + iSpclCdCnt + "]/" + item5Node + "usermemoyn", usermemoyn);
- model.makeValue(item5Path + iSpclCdCnt + "]/spclspec", spclmemo.substring(iStartInx, spclmemo.length));
- model.makeValue(item5Path + iSpclCdCnt + "]/spclmemoflag", item5Node);
- model.makeValue(item5Path + iSpclCdCnt + "]/m", "i");
- model.makeValue(item5Path + iSpclCdCnt + "]/unitflag", "M");
- model.makeValue(item5Path + iSpclCdCnt + "]/spclcd", "MX999");
- model.makeValue(item5Path + iSpclCdCnt + "]/seqno", iSpclCdCnt);
- model.makeValue(item5Path + iSpclCdCnt + "]/pid", model.getValue("/root/main/item1/iteminfo/pid"));
- model.makeValue(item5Path + iSpclCdCnt + "]/indd", indd);
- model.makeValue(item5Path + iSpclCdCnt + "]/mskind", model.getValue("/root/main/item1/iteminfo/mskind"));
- model.makeValue(item5Path + iSpclCdCnt + "]/cretno", model.getValue("/root/main/item1/iteminfo/cretno"));
- model.makeValue(item5Path + iSpclCdCnt + "]/fromdd", model.getValue("/root/main/item1/iteminfo/fromdd"));
- model.makeValue(item5Path + iSpclCdCnt + "]/instcd", "");
- model.makeValue(item5Path + iSpclCdCnt + "]/lastupdtrid", "");
-
- }
- }
- }
- }
- } else { // 새로 입력된 특정코드는 700byte를 넘지 않는다.
- //if (iSpclCdTotLength > 0) { // 새로 추가된 내용이 있다.
- iSpclCdCnt++;
- //model.makeValue(item5Path + iSpclCdCnt + "]/" + item5Node + "usermemoyn", usermemoyn);
- model.makeValue(item5Path + iSpclCdCnt + "]/spclspec", spclmemo);
- model.makeValue(item5Path + iSpclCdCnt + "]/spclmemoflag", item5Node);
- model.makeValue(item5Path + iSpclCdCnt + "]/m", "i");
- model.makeValue(item5Path + iSpclCdCnt + "]/unitflag", "M");
- model.makeValue(item5Path + iSpclCdCnt + "]/spclcd", "MX999");
- model.makeValue(item5Path + iSpclCdCnt + "]/seqno", "1");
- model.makeValue(item5Path + iSpclCdCnt + "]/pid", model.getValue("/root/main/item1/iteminfo/pid"));
- model.makeValue(item5Path + iSpclCdCnt + "]/indd", indd);
- model.makeValue(item5Path + iSpclCdCnt + "]/mskind", model.getValue("/root/main/item1/iteminfo/mskind"));
- model.makeValue(item5Path + iSpclCdCnt + "]/cretno", model.getValue("/root/main/item1/iteminfo/cretno"));
- model.makeValue(item5Path + iSpclCdCnt + "]/fromdd", model.getValue("/root/main/item1/iteminfo/fromdd"));
- model.makeValue(item5Path + iSpclCdCnt + "]/instcd", "");
- model.makeValue(item5Path + iSpclCdCnt + "]/lastupdtrid", "");
-
- //}
- }
- }
- // 미래유형 정리 및 퇴원시 현황으로 HISTORY 유지하면서 inpt,iphs변경
-
- //심사 완료 처리
- function fJudgEnd(){
- model.setValue("/root/main/item1/iteminfo/dschjudgprcsstat","C");
- var indd = model.getValue("/root/main/item1/iteminfo/indd1");
-
- model.makevalue("/root/main/item1/iteminfo/indd1", indd);
- if(submit("TXPIJ00301",false)) { //심사완료전 저장이 제대로 처리되지 않았을 경우네는 E70을 발생시키지 않게 한다. 20080908 박창원
- fSaveCalcAmt("I");
- fSetItemInfoSetting();
- return 1;
- }else {
- model.setValue("/root/main/item1/iteminfo/dschjudgprcsstat","B");
- fSetItemInfoSetting();
- return 0;
- }
- }
- //통합심사 완료 처리
- function fJudgAllEnd(){
- model.setValue("/root/main/item1/iteminfo/dschjudgprcsstat","E");
-
- var indd = model.getValue("/root/main/item1/iteminfo/indd1");
-
- model.makevalue("/root/main/item1/iteminfo/indd1", indd);
- if(submit("TXPIJ00301",false)) { //심사완료전 저장이 제대로 처리되지 않았을 경우네는 E70을 발생시키지 않게 한다. 20080908 박창원
- fSaveCalcAmt("I");
- fSetItemInfoSetting();
- return 1;
- } else {
- model.setValue("/root/main/item1/iteminfo/dschjudgprcsstat","B");
- fSetItemInfoSetting();
- return 0;
- }
- }
- //퇴원마감 취소 처리
- function fJudgEndCancel(){
- model.setValue("/root/main/item1/iteminfo/dschjudgprcsstat","A");
-
- if (submit("TXPIJ00301",false)) {
- submit("TXPIJ03203",false);
- fSetItemInfoSetting();
- return 1;
- } else {
- model.setValue("/root/main/item1/iteminfo/dschjudgprcsstat","B");
- fSetItemInfoSetting();
- return 0;
- }
- }
- //예고심사 완료 처리
- function fJudgDclrtEnd(){
- model.setValue("/root/main/item1/iteminfo/dschjudgprcsstat","G");
-
- var indd = model.getValue("/root/main/item1/iteminfo/indd1");
-
- model.makevalue("/root/main/item1/iteminfo/indd1", indd);
- if(submit("TXPIJ00301",false)) { //심사완료전 저장이 제대로 처리되지 않았을 경우네는 E70을 발생시키지 않게 한다. 20080908 박창원
- fSaveCalcAmt("I");
- fSetItemInfoSetting();
- return 1;
- } else {
- model.setValue("/root/main/item1/iteminfo/dschjudgprcsstat","B");
- fSetItemInfoSetting();
- return 0;
- }
- }
- ///////////////////////////////////////////////////////////////////////////
- //저장로직 관련 코딩 종료 //
- ///////////////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////////////
- //체크로직 관련 코딩 종료
- //1. 중증, 산정특례 여부 체크
- //2. 분만여부 체크
- //3. 수술여부 체크
- ///////////////////////////////////////////////////////////////////////////
- //1. 중증, 산정특례 여부 체크
- // 기존로직이 보험 암환자의 경우 입원일 기준으로만 적용되게 되어있어 수정함 - 20081105 박창원
- function fCheckEssc(){
- var chk = model.getValue("/root/main/item1/iteminfo/patnm");
- var pid = model.getValue("/root/main/item1/iteminfo/pid");
- var indd = model.getValue("/root/main/item1/iteminfo/indd1");
- var mskind = model.getValue("/root/main/item1/iteminfo/mskind");
- var insukind = model.getValue("/root/main/item1/iteminfo/insukindcd");
- var suppkind = model.getValue("/root/main/item1/iteminfo/suppkindcd");
- var cretno = model.getValue("/root/main/item1/iteminfo/cretno");
- var fromdd = model.getValue("/root/main/item1/iteminfo/fromdd");
- var insuflag = "";
- // 새로운기준적용을 위해 여기서부터 변수추가 - 20081105 박창원
- var dschdd = model.getValue("/root/main/item1/iteminfo/dschdd");
-
- btn_esscdiag.visible = false;
-
- // 희귀난치 산정특례 처리 - 20090622 박창원, 7월1일부터 적용, H환자는 제외외어야함
- var rareesscyn = model.getValue("/root/main/item12/rareessc/rareesscyn");
-
- if (insukind == "11" && suppkind != "32" && rareesscyn == "Y" && suppkind != "01" && fromdd >= "20090701") {
- // 20090930 JHP 희귀난치 등록여부 확인위해 추가함. -- 시작
- var anohosprgstflag = model.getValue("/root/main/item13/rooa/anohosprgstflag");
- var rareobstno = model.getValue("/root/main/item13/rooa/rareobstno");
- var rareobstfromdd = model.getValue("/root/main/item13/rooa/rareobstfromdd");
- var rareobsttodd = model.getValue("/root/main/item13/rooa/rareobsttodd");
- var signyn = model.getValue("/root/main/item13/rooa/signyn");
-
- //20091109 JHP 희귀난치 메세지는 상병에 R/O 상병일 경우는 메세지 제외함.
- var ruleoutyn = model.getValue("/root/main/list3/diaglist[1]/ruleoutyn");
- if(ruleoutyn == 'true'){
- // 주상병 R/O일때에는 희귀난치 메세지 처리 안함.
- }else{
- if (fromdd >= "20091001") { // 10월1일 이후에는 등록번호가 반드시 있어야한다. - 추가코딩필요
- // 타병원등록 여부 , Y:타병원,N:우리병원
- if(anohosprgstflag == "Y"){
- // 희귀난치 번호여부
- if(rareobstno == null || rareobstno == '-'){
- messageBox("## 희귀난치정보 ## : 타병원등록이나 희귀난치번호가 ","I004");
- } else {
- btn_esscdiag.visible = true;
- btn_esscdiag.attribute("class") = "btn5_letter4";
- btn_esscdiag.attribute("color") = "#ff0066";
- return;
- }
- } else if(anohosprgstflag == "N"){
- // 희귀난치 번호여부
- if(rareobstno == null || rareobstno == '-'){
- if(signyn == "Y"){
- btn_esscdiag.visible = true;
- btn_esscdiag.attribute("class") = "btn5_letter4";
- btn_esscdiag.attribute("color") = "#ff0066";
- return;
- } else {
- messageBox("## 희귀난치정보 ## : 재원병원등록이나 등록번호 및 서명정보가 ","I004");
- }
- } else{
- btn_esscdiag.visible = true;
- btn_esscdiag.attribute("class") = "btn5_letter4";
- btn_esscdiag.attribute("color") = "#ff0066";
- return;
- }
- } else {
- // 희귀난치 data(mmohrooa)에 정보없음.
- messageBox("## 희귀난치정보 ## : 등록번호 및 서명정보가 ","I004");
- }
- } else {
- btn_esscdiag.visible = true;
- btn_esscdiag.attribute("class") = "btn5_letter4";
- btn_esscdiag.attribute("color") = "#ff0066";
- return;
- }
- }
- }
-
- if (insukind > "22" || suppkind == "01" ) {
- return;
- }
- if(chk){
- var isEsscV193 = false;
- var isEsscV191 = false;
- var isEsscVisible = true;
- var cEsscCnt = getNodesetCount("/root/main/chkessc");
- if (cEsscCnt == 0 && rareesscyn != "Y" ) { // 특정내역이 없는 경우임
- return;
- } else {
- var chkspclcd = model.getValue("/root/main/chkessc/chkessc[vcode='V191' or vcode='V192']/vcode");
- var spclcd = model.getValue("/root/main/chkessc/chkessc[vcode='V193']/vcode");
- if (chkspclcd.length > 0) {
- isEsscV191 = true;
- //이미 체크된건이 V193인경우 V193으로 처리 한다.
- var chk = model.getValue("/root/hidden/item1/vcode");
- if(chk == "V193"){
- model.setValue("/root/hidden/item1/vcode","V193");
- }else{
- model.setValue("/root/hidden/item1/vcode",chkspclcd);
- }
- }
- if(spclcd == "V193" && suppkind != "32") { // 차상위는 중증등록버튼이 활성화되지 않게한다. 20090227 박창원
- model.setValue("/root/hidden/item1/vcode",spclcd);
- var suppkindcd = model.getValue("/root/main/item1/iteminfo/suppkindcd");
-
- isEsscV193 = true;
- // V193인경우 이미 적용하면 끝이기때문에 일부로 보여지지 않도록 했었지만
- // 사용자 요구사항으로 그냥 버튼 살아 있게 한다. 2007.12.07 박도형
- //if (suppkindcd == "06") {
- // isEsscVisible = false;
- //}
- }
- }
-
- // 데이타 변경 후 중증 질환 체크 변경 유무 확인을 위한 flag 값 추가 : 2007.10.08 김건기 => fUpdtCheckEssc()에서 사용
- model.setValue("/root/hidden/updtchkessc/esscV193",isEsscV193);
- model.setValue("/root/hidden/updtchkessc/esscV191",isEsscV191);
- if (isEsscV191) {
- if (isEsscVisible) {
- btn_esscdiag.visible = true;
- } else {
- btn_esscdiag.visible = false;
- }
-
- btn_esscdiag.attribute("class") = "btn5_letter4";
- btn_esscdiag.attribute("color") = "#ff0066";
- } else {
- btn_esscdiag.attribute("class") = "btn2_letter4";
- btn_esscdiag.visible = false;
- if (isEsscV193) {
- if (isEsscVisible) {
- btn_esscdiag.visible = true;
- } else {
- btn_esscdiag.visible = false;
- }
- btn_esscdiag.attribute("class") = "btn5_letter4";
- btn_esscdiag.attribute("color") = "#ff0066";
- } else {
- btn_esscdiag.attribute("class") = "btn2_letter4";
- btn_esscdiag.visible = false;
- }
- }
- }
- }
- //2. 분만여부 체크
- function fCheckBorn(){
- var cBorn = instance1.selectSingleNode("/root/main/item1/iteminfo");
- if (cBorn == null) { // 출산정보가 없는경우임.
- btn_babymother.attribute("class") = "btn5_letter4";
- btn_babymother.visible = false;
- return;
- }else{
- var cBornbaby = model.getValue("/root/main/item1/iteminfo/bornbaby");
- if(cBornbaby == "Y"){
- btn_babymother.visible = true;
- btn_babymother.attribute("class") = "btn5_letter4";
- btn_babymother.attribute("color") = "#ff0066";
- }else{
- btn_babymother.attribute("class") = "btn5_letter4";
- btn_babymother.visible = false;
- }
-
- }
- }
- //3. 수술여부체크
- function fCheckOper(){
- var cOper = instance1.selectSingleNode("/root/main/item1/iteminfo");
- if (cOper == null) { // 출산정보가 없는경우임.
- btn_operdiag.attribute("class") = "btn5_letter4";
- btn_operdiag.visible = false;
- return;
- }else{
- var cOperDiag = model.getValue("/root/main/item1/iteminfo/opflag");
- if(cOperDiag == "Y"){
- btn_operdiag.visible = true;
- btn_operdiag.attribute("class") = "btn5_letter4";
- btn_operdiag.attribute("color") = "#ff0066";
-
- // 수술심사상태에 따른 캡션변경
- //미심
- var cnt1 = model.getValue("/root/main/item10/operstat/cnt1");
- //보류
- var cnt2 = model.getValue("/root/main/item10/operstat/cnt2");
- //완료
- var cnt3 = model.getValue("/root/main/item10/operstat/cnt3");
- // 수술이 추가되었을때 - 수술심사테이블에 데이터가 들어가지 않은 경우는 미심이 포함되어 있어 미심이다. - 20071014 박창원
- var nonpijhoper = model.getValue("/root/main/item10/operstat/nonpijhoper");
-
- if (cnt1 > "0" || nonpijhoper == "Y") {
- btn_operdiag.attribute("text")= "수술(미)";
- return;
- }
- if (cnt1 < "1" && cnt2 > "0") {
- btn_operdiag.attribute("text")= "수술(보)";
- }
- if (cnt1 < "1" && cnt2 < "1" && cnt3 > "0") {
- btn_operdiag.attribute("text")= "수술(완)";
- }
- if (cnt1 < "1" && cnt2 < "1" && cnt3 < "1") {
- btn_operdiag.attribute("text")= "수술(미)";
- }
-
-
- }else{
- btn_operdiag.attribute("class") = "btn5_letter4";
- btn_operdiag.visible = false;
- }
- }
- }
- //4. 퇴원메모 체크
- function fCheckDschMemo(){
- var cDschMemo = instance1.selectSingleNode("/root/main/item1/iteminfo");
- if (cDschMemo == null) {
- btn_dschmemo.attribute("class") = "btn5_letter4";
- btn_dschmemo.visible = false;
- return;
- }else{
- var cDschMemo = model.getValue("/root/main/item1/iteminfo/dschnotiyn");
- if(cDschMemo == "Y"){
- btn_dschmemo.visible = true;
- btn_dschmemo.attribute("class") = "btn5_letter4";
- btn_dschmemo.attribute("color") = "#ff0066";
- }else{
- btn_dschmemo.attribute("class") = "btn5_letter4";
- btn_dschmemo.visible = false;
- }
- }
- }
- // 5.공여수혜자 여부 체크
- function fCheckDnorPat(){
- var cDnorPat = instance1.selectSingleNode("/root/main/item8/patdnorinfo");
- if (cDnorPat == null) {
- btn_patdnor.attribute("class") = "btn5_letter3";
- btn_patdnor.visible = false;
- return;
- }else{
- var cDnorPID = model.getValue("/root/main/item8/patdnorflag");
- var cPatDnorFlag = model.getValue("/root/main/item8/patdnorinfo/patdnorflag");
- //if(cDschMemo == "D"){
- if(cPatDnorFlag == "D"){
- btn_patdnor.visible = true;
- btn_patdnor.attribute("text")= "수혜자"
- btn_patdnor.attribute("class") = "btn5_letter3";
- btn_patdnor.attribute("color") = "#ff0066";
- //}else if (cDschMemo == "P"){
- }else if (cPatDnorFlag == "P"){
- btn_patdnor.visible = true;
- btn_patdnor.attribute("text")= "공여자"
- btn_patdnor.attribute("class") = "btn5_letter3";
- btn_patdnor.attribute("color") = "#ff0066";
- }else{
- btn_dschmemo.attribute("class") = "btn5_letter4";
- btn_dschmemo.visible = false;
- }
- }
- }
- // 20091019 JHP 진료상병 심사상병 체크로직 추가 (** 10/9 보험팀장 정례회의 결정사항임)
- // 재원심사시 혹은 퇴원심사시 진료 주상병과 심사 주상병이 상이 한 경우
- // [진료 주상병과 심사 주상병이 다릅니다.확인하시고 진료에 수정요청 하십시요
- // ( 퇴원시 외래 FU검사의 요율에 오류가 있을 수 있습니다)] 라는 알럿을 주도록 함.
- // 1. 적용대상 : 보험유형 11, 21, 22
- // 단 보조유형 00정상, 01전액본인부담, 입원에만 존재하는 보조유형 제외
- // 2. 조회시 ICD10 색인 분류 상 상위 구분 (영문 1자리와 숫자 2자리)으로 비교 하도록 함
- // -> 진료 D619 상병과 심사 D618은 알럿 팝업 안뜨도록 함.
- //for문 속도개선 plet2
- function fCheckEmrDiagPamDiag(){
- var insukind = model.getValue("/root/main/item14/emrdiagpamdiag/insukind");
- var suppkind = model.getValue("/root/main/item14/emrdiagpamdiag/suppkind");
- var notsuppkind = model.getValue("/root/main/item14/emrdiagpamdiag/notsuppkind");
- var emrmaindiag = model.getValue("/root/main/item14/emrdiagpamdiag/emrmaindiag");
- var pammaindiag = model.getValue("/root/main/item14/emrdiagpamdiag/pammaindiag");
- var notsuppkindchk = model.getXPathValue("contains(/root/main/item14/emrdiagpamdiag/notsuppkind,'"+suppkind+"')");
- var fstemrdiag2 = emrmaindiag.substring(0, 3);
- var fstpamdiag2 = pammaindiag.substring(0, 3);
-
- var fstemrdiag3 = emrmaindiag.substring(0, 4);
- var fstpamdiag3 = pammaindiag.substring(0, 4);
-
-
- // 입원제외 보조유형 배열과 보조유형 체크
- var suppchk = "N";
- if(notsuppkindchk == true){
- suppchk = "Y";
- }
-
- // 1. 보험유형 11, 21, 22 이면 알럿
- if(insukind == "11" || insukind == "21" || insukind == "22"){
- // 00, 01, suppchk(입원제외보조유형)이 아니면 알럿
- if(suppkind == "00" || suppkind =="01" || suppchk == "Y"){
- }else{
- // 둘다 null 이 아니면 알럿(원래는 NULL인데 글자수로 잘라서 NUL임)
- if(fstemrdiag2 == 'NUL' || fstpamdiag2 == 'NUL'){
- }else{
- // 진료상병 심사상병 다르면 알럿
- if(fstemrdiag2 != fstpamdiag2){
- messageBox("[진료 주상병(" + fstemrdiag2 +"-)과 심사 주상병(" + fstpamdiag2 + "-)이 다릅니다. 확인하시고 진료에 수정요청 하십시요.\n( 퇴원시 외래 FU검사의 요율에 오류가 있을 수 있습니다)]\n","I007");
- }
- }
- }
- }
- }
- function fItemRareMsg(){
- var srchrslt = "";
- var itemmsg = model.getValue("/root/main/item1/iteminfo/itemmsg");
- var raremsg = model.getValue("/root/main/item1/iteminfo/raremsg");
- var serdiagfromdd = model.getValue("/root/main/item1/iteminfo/serdiagfromdd"); //중증시작일자
- var serdiagtodd = model.getValue("/root/main/item1/iteminfo/serdiagtodd"); //중증종료일자
- var rareobstfromdd = model.getValue("/root/main/item1/iteminfo/rareobstfromdd"); //희귀시작일자
- var rareobsttodd = model.getValue("/root/main/item1/iteminfo/rareobsttodd"); //희귀종료일자
- var dschnotidt = model.getValue("/root/main/item1/iteminfo/dschnotidt"); //퇴원일자
- dschnotidt = (dschnotidt.length > 0 ? dschnotidt.substring(0 , 8) : "");
- var suppkind = model.getValue("/root/main/item1/iteminfo/suppkindcd");
- var rooamsgcnt = getNodesetCount("/root/main/rarecancermsglist/rarecancermsg[cd!='00']/nm");
- var sdoamsgcnt = getNodesetCount("/root/main/rarecancermsglist/rarecancermsg[cd='00']/nm");
- var rooamsg = model.getXPathValue("/root/main/rarecancermsglist/rarecancermsg[cd!='00']/nm");
- var sdoamsg = model.getXPathValue("/root/main/rarecancermsglist/rarecancermsg[cd='00']/nm");
- var rooamsgtooth = model.getXPathValue("/root/main/rarecancermsglist/rarecancermsg[cd!='00' and cd!='01']/nm");
- var rooamsgcd = model.getXPathValue("/root/main/rarecancermsglist/rarecancermsg[cd!='00']/cd");
- var sdoamsgcd = model.getXPathValue("/root/main/rarecancermsglist/rarecancermsg[cd='00']/cd");
- var rooamsgtoothcd = model.getXPathValue("/root/main/rarecancermsglist/rarecancermsg[cd!='00' and cd!='01']/cd");
- cmb_itemraremsg.visible = false;
- //두번호 모두 존재시.
- if ((rooamsgcnt > 0) && (sdoamsgcnt > 0)) {
- opt_patientinfo.attribute("background-color") = "transparent";
- //희귀종료일자가 퇴원일자,입원일자보다 빠를시 색상변경
- //중증종료일자가 퇴원일자,입원일자보다 빠를시 색상변경
- if (
- ((dschnotidt != "" && (dschnotidt > serdiagtodd )) || (dschnotidt == "" && (VAL_today > serdiagtodd )) )||
- ((dschnotidt != "" && (dschnotidt > rareobsttodd )) || (dschnotidt == "" && (VAL_today> rareobsttodd )))
- ) {
- cmb_itemraremsg.attribute("background-color") = "#ff9900";
- } else {
- cmb_itemraremsg.attribute("background-color") = "transparent";
- }
-
- cmb_itemraremsg.visible = true;
- opt_patientinfo.visible = false;
- roundrect1.visible = false;
- // 등록암 보조유형일경우(06.등록암, 11.가정간호등록암, 32.차상위1종, 40.차상위2종등록암
- // if (suppkind == "06" || suppkind == "11" || suppkind == "32" || suppkind == "40") {
- // model.setValue(cmb_itemraremsg.attribute("ref"), sdoamsg);
- // } else if (suppkind == "87" || suppkind == "88" || suppkind == "89") {
- // model.setValue(cmb_itemraremsg.attribute("ref"), rooamsgtoothcd);
- // } else {
- // model.setValue(cmb_itemraremsg.attribute("ref"), rooamsgcd);
- // }
- cmb_itemraremsg.select(0);
- } else if (rooamsgcnt > 0) {
- //희귀종료일자가 퇴원일자,입원일자보다 빠를시 색상변경
- if ((dschnotidt != "" && (dschnotidt > rareobsttodd )) || (dschnotidt == "" && (VAL_today > rareobsttodd ))) {
- if (rooamsgcnt == 1) {
- opt_patientinfo.attribute("background-color") = "#ff9900";
- } else {
- cmb_itemraremsg.attribute("background-color") = "#ff9900";
- }
- } else {
- opt_patientinfo.attribute("background-color") = "transparent";
- cmb_itemraremsg.attribute("background-color") = "transparent";
- }
-
- if (suppkind == "87" || suppkind == "88" || suppkind == "89") {
- if (rooamsgcnt == 1) {
- srchrslt += rooamsgtooth; // 희귀등록번호
- model.setValue(opt_patientinfo.attribute("ref"), rooamsgtooth);
- opt_patientinfo.visible = true;
- roundrect1.visible = true;
- } else {
- cmb_itemraremsg.visible = true;
- opt_patientinfo.visible = false;
- roundrect1.visible = false;
- model.setValue(cmb_itemraremsg.attribute("ref"), rooamsgtoothcd);
- }
- } else {
- if (rooamsgcnt == 1) {
- srchrslt += rooamsg; // 희귀등록번호
- model.setValue(opt_patientinfo.attribute("ref"), rooamsg);
- opt_patientinfo.visible = true;
- roundrect1.visible = true;
- } else {
- cmb_itemraremsg.visible = true;
- opt_patientinfo.visible = false;
- roundrect1.visible = false;
- //model.setValue(cmb_itemraremsg.attribute("ref"), rooamsgcd);
- cmb_itemraremsg.select(0);
- }
- }
- } else if (sdoamsgcnt > 0) {
- //중증종료일자가 퇴원일자,입원일자보다 빠를시 색상변경
- if ((dschnotidt != "" && (dschnotidt > serdiagtodd )) || (dschnotidt == "" && (VAL_today > serdiagtodd))) {
- opt_patientinfo.attribute("background-color") = "#ff9900";
- } else {
- opt_patientinfo.attribute("background-color") = "transparent";
- }
- cmb_itemraremsg.attribute("background-color") = "transparent";
-
- if (sdoamsgcnt == 1) {
- srchrslt += sdoamsg; // 중증등록정보
- model.setValue(opt_patientinfo.attribute("ref"), sdoamsg);
- opt_patientinfo.visible = true;
- roundrect1.visible = true;
- } else {
- cmb_itemraremsg.visible = true;
- opt_patientinfo.visible = false;
- roundrect1.visible = false;
- //model.setValue(cmb_itemraremsg.attribute("ref"), sdoamsgcd);
- cmb_itemraremsg.select(0);
- }
- } else {
- opt_patientinfo.attribute("background-color") = "transparent";
- cmb_itemraremsg.attribute("background-color") = "transparent";
- opt_patientinfo.visible = true;
- roundrect1.visible = true;
- cmb_itemraremsg.visible = false;
- }
- opt_patientinfo.refresh();
- cmb_itemraremsg.refresh();
- }
-
- //Link 연결 팝업
- function fLinkPopMenu(trgtWindow, cond, send){
- var trgtManWindow = getChildWindow(trgtWindow);
- if (trgtManWindow == null) {
- open(trgtWindow ,"", "10", "10",trgtWindow, cond, send);
-
- } else {
- activateChild(trgtWindow);
- model.refresh();
- }
- }
- // 통합심사마감
- function fDschallEnd() {
- fDschjudgEndType("A");
- }
- // 퇴원마감
- function fDschjudgEnd() {
- fDschjudgEndType("");
- }
- // 예고심사 : 2014.06.09 LEJ
- function fDschdclrtEnd() {
- fDschjudgEndType("G");
- }
- function fDschjudgEndType(dschjudgendtype) {
- var chk = model.getValue("/root/main/item1/iteminfo/patnm");
- if(chk){
- // 퇴원마감시 간호확정이 취소되었는지 실시한 확인 후 진행한다.
- // 타인이 간호 확정을 취소할때 마감되는 상황이 발생되지 않기 위함
- // 간호 확정이 취소된 경우에는 대상자 조회 호면을 refresh 하고
- // 메인화면의 심사상태를 'A' 미심상태로 하고 간호 퇴원통보 여부도 'N'으로 세팅한다.- 20080927 박창원
- model.makeValue("/root/send/checkyn","Y");
- if (!submit("TRPIJ00315", false)) {
- messageBox("실시간 환자상태 체크에 실패 했습니다.기본데이터 이상이나 시스템 오류입니다.관리자 문의 후", "C003");
- return;
- }
-
- model.makeValue("/root/send/checkyn","N");
- // 퇴원마감시 퇴원확정일시 이후 처방이 있으면 alert - 20081112 박창원
- var maxexectm = model.getValue("/root/main/item11/endcnclstat/maxexectm").substr(0,8);
- var dschnotidt = model.getValue("/root/main/item1/iteminfo/dschnotidt").substr(0,8);
- var dschnotiyn = model.getValue("/root/main/item11/endcnclstat/dschnotiyn");
- var ipscendyn = model.getValue("/root/main/item11/endcnclstat/ipscendyn");
- var dumpexistyn = model.getValue("/root/main/item11/endcnclstat/dumpexistyn");
- var dupexecdd = model.getValue("/root/main/item11/endcnclstat/dupexecdd");
- var dumpclamkeyexistyn = model.getValue("/root/main/item11/endcnclstat/dumpclamkeyexistyn");
- var paygrntyn = model.getValue("/root/main/item11/endcnclstat/paygrntyn");
- var dschdclrtyn = model.getValue("/root/main/item11/endcnclstat/dschdclrtyn");
- var dschjudgprcsstatyn = model.getValue("/root/main/item11/endcnclstat/dschjudgprcsstatyn");
-
-
- if (dschnotiyn != 'N' && maxexectm > dschnotidt) {
- var msg = messageBox("퇴원확정이후" + maxexectm + "일자 실시처방이 있습니다. 계속 ", "S001");
- if (msg != "6") {
- return;
- }
- }
-
- if (dschjudgendtype != 'G' && dschnotiyn == 'N') {
- messageBox("간호 퇴원확정이 취소된 상태 입니다. 마감 ", "E001");
- // 무조건 대상자 조회 화면을 refresh
- var trgtManWindow = getChildWindow("SMPIJ00200");
- trgtManWindow.javascript.fGetInBfJudgTrgtManList();
- trgtManWindow.javascript.fCountPat();
- trgtManWindow.model.refresh();
-
- // 메인화면의 심사상태를 미심으로 퇴원통보여부를 'N'으로
- model.setValue("/root/main/item1/iteminfo/dschnotiyn", "N");
- model.setValue("/root/main/item1/iteminfo/dschjudgprcsstat", "A");
- model.refresh();
- return;
- } else if (dschjudgendtype == 'G' && dschdclrtyn == 'N') {
- messageBox("의사 퇴원예고가 취소된 상태 입니다. 마감 ", "E001");
- // 무조건 대상자 조회 화면을 refresh
- var trgtManWindow = getChildWindow("SMPIJ00200");
- trgtManWindow.javascript.fGetInBfJudgTrgtManList();
- trgtManWindow.javascript.fCountPat();
- trgtManWindow.model.refresh();
-
- // 메인화면의 심사상태를 미심으로 퇴원통보여부를 'N'으로
- model.setValue("/root/main/item1/iteminfo/dschnotiyn", "N");
- model.setValue("/root/main/item1/iteminfo/dschdclrtyn", "N");
- model.setValue("/root/main/item1/iteminfo/dschjudgprcsstat", "A");
- model.refresh();
- return;
- }
-
- // 20091007 JHP 병실료계산(PAM.FN_PI_GETADMAMTCALCYN) 및 처방계산(PAM.FN_PI_GETCALCMISSYN) 맞는지 확인
- // 20091113 JHP 부유형은 무조건 Y로 넘어오지만 부유형통에 계산내역이 없을경우에는 값자체가 없기때문에 메세지가뜬다..하여 부유형일 경우는 메세지 제외시킨다.
-
- var admamtcalcyn = model.getValue("/root/main/item11/endcnclstat/admamtcalcyn");
- //var calcmissyn = model.getValue("/root/main/item11/endcnclstat/calcmissyn"); -- 일단 처방은 추후 반영 - 20091013 박창원
-
- var chkmskind = model.getValue("/root/main/item1/iteminfo/mskind");
- var brateflag = model.getValue("/root/main/item1/iteminfo/brateflag");
- // 입원요율일 경우만 병실료 체크한다.
- if (brateflag == "I") {
- if (admamtcalcyn != "Y") {
- if(chkmskind != "S"){
- messageBox("계산되지 않은 병실료가 존재합니다. \n확인후 재계산(전수계산)","I008");
- return;
- }
- }
- }
-
- // 2011.04.28 syjung 소급계산완료 여부. N이면 소급계산할 데이터가 남아 있으므로 퇴원마감 할 수 없음.
- if (ipscendyn == "N") {
- messageBox("완료되지 않은 소급계산 내역이 존재합니다. 재계산","I008");
- return;
- }
-
- // 2011.06.14 syjung 외래에서 덤프되지 않은 처방 존재 여부. Y면 덤프되지 않은 처방이 있으므로 퇴원마감 할 수 없음.
- if (dumpexistyn == "Y") {
- messageBox("입원 당일 외래에서 덤프되지 않은 처방이 존재합니다. 재원심사 화면에서 [▶Dump] 내역을 ","I007");
- return;
- }
-
- if (dumpclamkeyexistyn == "Y") {
- if(messageBox("외래 자료 수집이 된 재원 내 실시처방이 있습니다. 외래 사후 자료를 생성 삭제한 후 Dump처리 하십시오.", "Q003") == 6) {
- modal("SPPIJ03500");
- if (model.getValue("/root/main/item1/iteminfo/dumprmk") == "" ) {
- messageBox("사유를", "C001");
- return;
- }
- } else {
- return;
- }
- }
-
- if (dupexecdd != "") {
- dupexecdd = dupexecdd.toDate().getDateFormat("YYYY/MM/DD")
- messageBox(dupexecdd + "중복계산 내역이 존재합니다. " + dupexecdd + "일 재계산","I008");
- return;
- }
-
- //기재점검 중증, 산정특례 여부 체크
- if (fGetDiagSpclcdCheck() == false) {
- return false;
- }
-
- // 주부유형이 함께 있는 환자에 대해서는 퇴원마감시 알럿을 띄워준다.
- var msyn = model.getValue("/root/main/item1/iteminfo/msyn");
-
- if (msyn == "Y") {
- messageBox("다른 보험 유형정보가 존재하오니 해당건 퇴원마감여부도 확인하여 주세요. 해당건 미마감 시 퇴원수납 할 수","I004");
- }
-
- var cOperDiag = model.getValue("/root/main/item1/iteminfo/opflag");
-
- // 수술심사 미완료시 응급,chemo,dsc는 알럿만 정규퇴원은 blcok - 20090114 박창원
- var ordtype = model.getValue("/root/main/item1/iteminfo/ordtype");
- var insukind = model.getValue("/root/main/item1/iteminfo/insukindcd");
- // 연도별 분리 안 된 이력 중 본인부담 상한액 초과 환자 메세지 발생 ( 2016.03.11 LEJ )
- var insukind = model.getValue("/root/main/item1/iteminfo/insukind");
- var cfe = model.getValue("/root/main/item1/iteminfo/cfe");
- var ownlimmitamt = model.getValue("/root/main/item1/iteminfo/ownlimmitamt"); // 본인부담 상한 구분에 따른 상한기준액
- var fromdd = model.getValue("/root/main/item1/iteminfo/fromdd");
- var todd = model.getValue("/root/main/item1/iteminfo/todd");
- var curyear = VAL_today.substr(0,4);
- var fromyear = fromdd.substr(0,4);
- var toyear = todd.substr(0,4);
- if ( todd == "99991231" ) {
- if ( dschnotidt == "99991231" || dschnotidt == "" ) {
- toyear = curyear ;
- }
- else {
- toyear = dschnotidt.substr(0,4) ;
- }
- }
- if ( insukind == "11" && fromyear != toyear && cfe != 'F' ) {
- if(parseInt(model.getValue("/root/main/item2/itemcalc/ownbpayamt")) > ownlimmitamt) {
- var msg = messageBox("연도별 분리 되지 않은 본인부담상한제 환자입니다. \n계속","S001");
- if(msg != 6) {
- return;
- }
- }
- }
-
- if(dschnotiyn == "Y" || (dschjudgendtype == 'G' && dschdclrtyn == 'Y')){
- // 수술심사가 완료되지 않았습니다. - 20080821 박창원
- if ( ordtype != "I" && ((btn_operdiag.attribute("text")== "수술(미)") ||(btn_operdiag.attribute("text")== "수술(보)")) && (cOperDiag == "Y" || cOperDiag == "YY" || cOperDiag == "YN") ) {
- var msg = messageBox("수술심사가 완료되지 않았습니다. 계속","S001");
- if(msg != 6) {
- return;
- }
- }
- if ( ordtype == "I" && ((btn_operdiag.attribute("text")== "수술(미)") ||(btn_operdiag.attribute("text")== "수술(보)")) && (cOperDiag == "Y" || cOperDiag == "YY" || cOperDiag == "YN") ) {
- messageBox("수술심사가 완료되지 않았습니다. 마감","E001");
- return;
- }
- // 소급내역이 존재합니다. 처리후 마감해주세요.
- // 10월3일 이전 소급건은 조건에서 제외한다. - 20081004 박창원
- if (model.getValue("/root/main/item11/recal[1]/recalcdd") != "") {
- messageBox("소급내역이 존재합니다. 마감","E001");
- return;
- }
-
- //약 반환 확인유무 및 창 호출.
- if (fCheckReturnPrcpExist() == false) {
- return;
- }
-
- if (insukind == "31"){
- if (paygrntyn != "Y") {
- messageBox("자동차보험 지급보증번호 누락입니다.","I007");
- return;
- }
- }
-
- if ((dschjudgendtype != 'G' && fChkClose() == true) || dschjudgendtype == 'G') {
- // 예고심사 환자가 미시행처방이 있는 경우 마감 제어는 하지 않는다!
- if (dschjudgendtype == 'G' && fChkClose() == false) {
- var msg = messageBox("예고심사 환자 미시행 처방 내역이 있습니다. 마감","S001");
- if(msg != 6) {
- return;
- }
- }
- if (fSaveMain("C") == true) {
- //maxexectm 없다는건 iscl이 존재 하지 않는 것임.
-
- var dschantichk = model.getValue("/root/hidden/result/getdschcalccheck/dschantichk");
- if (dschantichk == "Y") {
- var msg = messageBox("수술 예방적 항생제 평가 대상자입니다.\n항생제 퇴원약 사용 여부를 재확인하시기 바랍니다. \n계속","S001");
- if(msg != 6) {
- return;
- }
- }
-
- if (maxexectm == "") {
- if ( messageBox("유형에 계산된 처방 내역이 하나도 없습니다. 마감","Q004") != 6 ) {
- return false;
- }
- }
- // 입원 계산 자료 검증(2012.11.30 LeeEunJung)
- var check0 = model.getValue("/root/hidden/result/getdschcalccheck/check0");
- var check1 = model.getValue("/root/hidden/result/getdschcalccheck/check1");
- var check2 = model.getValue("/root/hidden/result/getdschcalccheck/check2");
- var check3 = model.getValue("/root/hidden/result/getdschcalccheck/check3");
- var check4 = model.getValue("/root/hidden/result/getdschcalccheck/check4");
- var check5 = model.getValue("/root/hidden/result/getdschcalccheck/check5");
-
- if (check0 =="Y"||check1 =="Y"||check2 =="Y"||check3 =="Y"||check4 =="Y"||check5 =="Y") {
- messageBox("계산자료 검증 시 오류가 체크되었습니다. 전체 재계산 후 문제 해결이 안 되면 전산실로 문의","I008");
- return false;
- }
- // 건강보험 정상 16일 이상 재원환자에 대해 장기재원 불가피 주상병 존재하는 경우 알림
- var longtermchk = model.getValue("/root/hidden/result/getdschcalccheck/longtermchk");
- if (longtermchk == "Y") {
- var msg = messageBox("장기재원 불가피 주상병이 있는 16일 이상 입원료 발생 환자 입니다.\n보조 유형을 확인하시기 바랍니다. \n계속","S001");
- if(msg != 6) {
- return;
- }
- }
-
- //응급실 관리료 여부 체크
- var nog3reasnyn = model.getValue("/root/hidden/result/getdschcalccheck/nog3reasnyn");
- if (nog3reasnyn == "Y") {
- messageBox("응급 의료관리료 미발생 환자입니다.","I007");
- return false;
- }
- if (fGetDrgOpenPopup("O") == false) {
- return false;
- }
- if (dschjudgendtype == "G" && dschjudgprcsstatyn > 0){
- messageBox("입원이력 내 미심상태가 있습니다.","I007");
- return false;
- }
-
- if (dschjudgendtype == "A") {
- if (fJudgAllEnd()){
- // 2. 화면 클리어 (공통)
- fJudgEndClear();
-
- messageBox("통합심사마감 처리가","I002");
- } else {
- messageBox("마감 처리가 되지","E007");
- }
- } else if (dschjudgendtype == "G") { // 예고심사 추가 (2014.06.19 LEJ)
- if (fJudgDclrtEnd()){
- // 2. 화면 클리어 (공통)
- fJudgEndClear();
-
- messageBox("예고심사마감 처리가","I002");
- } else {
- messageBox("마감 처리가 되지","E007");
- }
- } else {
- if (fJudgEnd()){
- // 2. 화면 클리어 (공통)
- fJudgEndClear();
- messageBox("퇴원마감 처리가","I002");
- } else {
- messageBox("마감 처리가 되지","E007");
- }
- }
-
- }
- } else {
- messageBox("미시행 처방 내역이 있습니다. 마감","E001");
- }
- }
- else {
- messageBox("유형에 계산된 처방 내역이 하나도 없습니다. 마감","E001");
- return;
- }
- }
- }
- function fJudgEndClear() {
- // 2. 화면 클리어 (공통)
- delPatientInfos();
- fSetRdoReset();
- btn_judgrmk.selected = true;
-
- model.setValue("/root/send/totalsumflag", "Y");
- model.setValue("/root/send/unitflag", "-");
- //상세화면 저장버튼 처리를 위해 넣어 놓는다. - 2007-11.29 박도형
- model.setValue("root/hidden/item1/chksave","N");
-
- btn_esscdiag.attribute("class") = "btn2_letter4";
- btn_babymother.attribute("class") = "btn2_letter4";
- btn_operdiag.attribute("class") = "btn2_letter4";
- btn_mt004.attribute("class") = "btn2_letter4";
- btn_attData.attribute("class") = "btn2_letter4";
- btn_operdiag.attribute("class") = "btn2_letter4";
- btn_patdnor.attribute("class") = "btn_letter3";
-
- btn_esscdiag.visible = true;
- btn_babymother.visible = true;
- btn_operdiag.visible = true;
- btn_mt004.visible = true;
- btn_attData.visible = true;
- btn_operdiag.visible = true;
- btn_patdnor.visible= true;
- btn_save.disabled = false;
-
- btn_recalc.disabled = false;
- btn_sugicalc.disabled = false;
- btn_dschclose.disabled = false;
- btn_totjudgclose.disabled = false;
- btn_dschclosecancel.disabled = false;
- btn_midcomplete.disabled = false;
- btn_midcancel.disabled = false;
- btn_midregist.disabled = false;
- btn_midregistyn.disabled = false;
- group9.visible = false;
-
- btn_dschclose.attribute("class") = "btn2_letter6";
- btn_totjudgclose.attribute("class") = "btn2_letter6";
- btn_dschclosecancel.attribute("class") = "btn2_letter6";
- btn_midregist.attribute("class") = "btn2_letter6";
- btn_midregistyn.attribute("class") = "btn2_letter6";
-
- model.resetInstanceNode("/root/main/item1/iteminfo");
- model.resetInstanceNode("/root/main/item2/itemcalc");
- model.resetInstanceNode("/root/main/item2/incd");
- model.resetInstanceNode("/root/main/item4/insu");
- model.resetInstanceNode("/root/send");
-
- model.removenode("/root/main/list1");
- model.makeNode("/root/main/list1");
-
- model.removenode("/root/main/list2");
- model.makeNode("/root/main/list2");
-
- model.removenode("/root/main/list3");
- model.makeNode("/root/main/list3");
-
- model.removenode("/root/main/list4");
- model.makeNode("/root/main/list4");
-
- model.refresh();
- // 무조건 대상자 조회 화면을 refresh - 20080926 박창원
- var trgtManWindow = getChildWindow("SMPIJ00200");
- trgtManWindow.javascript.fGetInBfJudgTrgtManList();
- trgtManWindow.javascript.fCountPat();
- trgtManWindow.model.refresh();
- }
- // 치식 팝업용 데이타 생성
- function fSetToothPop(row, flag) {
- model.removenode("/root/hidden/sppiz00600/cond/list");
- model.makeNode("/root/hidden/sppiz00600/cond/list");
- // 상병
- var cntdiag = getNodesetCount("/root/main/list3/diaglist");
- // 처방
- var cntiscl = getNodesetCount("/root/main/list2/iscllist");
- var cd = "";
- var cdnm = "";
- var orddd = "";
- var toot = "";
- var rowcnt = 1;
-
- for (i=1; i<=cntdiag; i++) {
-
- cd = model.getValue("/root/main/list3/diaglist["+ i + "]/diagcd");
- cdnm = model.getValue("/root/main/list3/diaglist["+ i + "]/diagnm");
- orddd = model.getValue("/root/main/list3/diaglist["+ i + "]/ordfromdd");
- toot = model.getValue("/root/main/list3/diaglist["+ i + "]/toot");
- estmcls = model.getValue("/root/main/list2/iscllist["+ i + "]/estmcls"); //20100318 정승우 의정부 오류로 추가
-
- if (cd != "") {
- if ((toot != "-" && toot != "") || estmcls == "U") {
- var milktoothstr = "ABCDE000";
- var subTootStr = "";
-
- for (var inx = 0; inx < 32; inx++) {
- var tootnum = toot.substr(inx,1);
- if (tootnum == "*") { // 선택된 영구치의 경우 1~8 사이 숫자로 표시한다.
- if (inx < 8) {
- subTootStr += (8 - inx);
- }
- else if (inx > 7 && inx < 16) {
- subTootStr += (inx - 7);
- }
- else if (inx > 15 && inx < 24) {
- subTootStr += (24 - inx);
- } else {
- subTootStr += (inx - 23);
- }
- } else if (tootnum == "#") { // 선택된 유치의 경우 A~E 사이 알파벳으로 표시한다.
- if (inx < 8) {
- subTootStr += milktoothstr.charAt(7 - inx);
- }
- else if (inx > 7 && inx < 16) {
- subTootStr += milktoothstr.charAt(inx - 8);
- }
- else if (inx > 15 && inx < 24) {
- subTootStr += milktoothstr.charAt(23 - inx);
- } else {
- subTootStr += milktoothstr.charAt(inx - 24);
- }
- } else { // if (tootnum == "0") 선택되지 않은 경우 공백으로 처리한다.
- subTootStr += " ";
- }
- }
-
- //치식 표기를 설정한다.
- if (row == i && flag == "1" ) {
- model.makevalue("/root/hidden/sppiz00600/cond/list/toothapplist[" + rowcnt + "]/chos", "true");
- } else {
- model.makevalue("/root/hidden/sppiz00600/cond/list/toothapplist[" + rowcnt + "]/chos", "false");
- }
- model.makevalue("/root/hidden/sppiz00600/cond/list/toothapplist[" + rowcnt + "]/flag", "상병");
- model.makevalue("/root/hidden/sppiz00600/cond/list/toothapplist[" + rowcnt + "]/cd", cd);
- model.makevalue("/root/hidden/sppiz00600/cond/list/toothapplist[" + rowcnt + "]/cdnm", cdnm);
- model.makevalue("/root/hidden/sppiz00600/cond/list/toothapplist[" + rowcnt + "]/rightupper", subTootStr.substr(0, 8));
- model.makevalue("/root/hidden/sppiz00600/cond/list/toothapplist[" + rowcnt + "]/leftupper", subTootStr.substr(8, 8));
- model.makevalue("/root/hidden/sppiz00600/cond/list/toothapplist[" + rowcnt + "]/rightlower", subTootStr.substr(16, 8));
- model.makevalue("/root/hidden/sppiz00600/cond/list/toothapplist[" + rowcnt + "]/leftlower", subTootStr.substr(24, 8));
- model.makevalue("/root/hidden/sppiz00600/cond/list/toothapplist[" + rowcnt + "]/orddd", orddd);
- model.makevalue("/root/hidden/sppiz00600/cond/list/toothapplist[" + rowcnt + "]/toot", toot);
- model.makevalue("/root/hidden/sppiz00600/cond/list/toothapplist[" + rowcnt + "]/row", i);
- model.makevalue("/root/hidden/sppiz00600/cond/list/toothapplist[" + rowcnt + "]/pid", "");
- model.makevalue("/root/hidden/sppiz00600/cond/list/toothapplist[" + rowcnt + "]/indd", "");
- model.makevalue("/root/hidden/sppiz00600/cond/list/toothapplist[" + rowcnt + "]/cretno", "");
- model.makevalue("/root/hidden/sppiz00600/cond/list/toothapplist[" + rowcnt + "]/instcd", "");
- model.makevalue("/root/hidden/sppiz00600/cond/list/toothapplist[" + rowcnt + "]/execdd", "");
- model.makevalue("/root/hidden/sppiz00600/cond/list/toothapplist[" + rowcnt + "]/calcseqno", "");
- model.makevalue("/root/hidden/sppiz00600/cond/list/toothapplist[" + rowcnt + "]/calcscorseqno", "");
-
- rowcnt = rowcnt+1;
-
- } else {
- if (row == i && flag == "1" ) {
-
- model.makevalue("/root/hidden/sppiz00600/cond/list/toothapplist[" + rowcnt + "]/chos", "true");
- model.makevalue("/root/hidden/sppiz00600/cond/list/toothapplist[" + rowcnt + "]/flag", "상병");
- model.makevalue("/root/hidden/sppiz00600/cond/list/toothapplist[" + rowcnt + "]/cd", cd);
- model.makevalue("/root/hidden/sppiz00600/cond/list/toothapplist[" + rowcnt + "]/cdnm", cdnm);
- model.makevalue("/root/hidden/sppiz00600/cond/list/toothapplist[" + rowcnt + "]/rightupper", "");
- model.makevalue("/root/hidden/sppiz00600/cond/list/toothapplist[" + rowcnt + "]/leftupper", "");
- model.makevalue("/root/hidden/sppiz00600/cond/list/toothapplist[" + rowcnt + "]/rightlower", "");
- model.makevalue("/root/hidden/sppiz00600/cond/list/toothapplist[" + rowcnt + "]/leftlower", "");
- model.makevalue("/root/hidden/sppiz00600/cond/list/toothapplist[" + rowcnt + "]/orddd", orddd);
- model.makevalue("/root/hidden/sppiz00600/cond/list/toothapplist[" + rowcnt + "]/toot", "");
- model.makevalue("/root/hidden/sppiz00600/cond/list/toothapplist[" + rowcnt + "]/row", i);
- model.makevalue("/root/hidden/sppiz00600/cond/list/toothapplist[" + rowcnt + "]/pid", "");
- model.makevalue("/root/hidden/sppiz00600/cond/list/toothapplist[" + rowcnt + "]/indd", "");
- model.makevalue("/root/hidden/sppiz00600/cond/list/toothapplist[" + rowcnt + "]/cretno", "");
- model.makevalue("/root/hidden/sppiz00600/cond/list/toothapplist[" + rowcnt + "]/instcd", "");
- model.makevalue("/root/hidden/sppiz00600/cond/list/toothapplist[" + rowcnt + "]/execdd", "");
- model.makevalue("/root/hidden/sppiz00600/cond/list/toothapplist[" + rowcnt + "]/calcseqno", "");
- model.makevalue("/root/hidden/sppiz00600/cond/list/toothapplist[" + rowcnt + "]/calcscorseqno", "");
-
- rowcnt = rowcnt+1;
- }
- }
- } // if cd != ""
- } // for end
-
- for (i=1; i<=cntiscl; i++) {
- cd = model.getValue("/root/main/list2/iscllist["+ i + "]/snglcalcscorcd");
- cdnm = model.getValue("/root/main/list2/iscllist["+ i + "]/hngnm");
- orddd = model.getValue("/root/main/list2/iscllist["+ i + "]/ordfromdd");
- toot = model.getValue("/root/main/list2/iscllist["+ i + "]/tootfact");
- estmcls = model.getValue("/root/main/list2/iscllist["+ i + "]/estmcls");
-
- if ((toot != "-" && toot != "") || estmcls == "U") {
- var milktoothstr = "ABCDE000";
- var subTootStr = "";
- var tmpStr = "";
-
- for (var inx = 0; inx < 32; inx++) {
- var tootnum = toot.substr(inx,1);
- if (tootnum == "*") { // 선택된 영구치의 경우 1~8 사이 숫자로 표시한다.
- if (inx < 8) {
- subTootStr += (8 - inx);
- }
- else if (inx > 7 && inx < 16) {
- subTootStr += (inx - 7);
- }
- else if (inx > 15 && inx < 24) {
- subTootStr += (24 - inx);
- } else {
- subTootStr += (inx - 23);
- }
- } else if (tootnum == "#") { // 선택된 유치의 경우 A~E 사이 알파벳으로 표시한다.
- if (inx < 8) {
- subTootStr += milktoothstr.charAt(7 - inx);
- }
- else if (inx > 7 && inx < 16) {
- subTootStr += milktoothstr.charAt(inx - 8);
- }
- else if (inx > 15 && inx < 24) {
- subTootStr += milktoothstr.charAt(23 - inx);
- } else {
- subTootStr += milktoothstr.charAt(inx - 24);
- }
- } else { // if (tootnum == "0") 선택되지 않은 경우 공백으로 처리한다.
- subTootStr += " ";
- }
- }
-
- //치식 표기를 설정한다.
- if (row == i && flag == "2" ) {
- model.makeValue("/root/hidden/sppiz00600/cond/list/toothapplist[" + rowcnt + "]/chos", "true");
- } else {
- model.makeValue("/root/hidden/sppiz00600/cond/list/toothapplist[" + rowcnt + "]/chos", "false");
- }
- model.makeValue("/root/hidden/sppiz00600/cond/list/toothapplist[" + rowcnt + "]/flag", "처방");
- model.makeValue("/root/hidden/sppiz00600/cond/list/toothapplist[" + rowcnt + "]/cd", cd);
- model.makeValue("/root/hidden/sppiz00600/cond/list/toothapplist[" + rowcnt + "]/cdnm", cdnm);
- model.makeValue("/root/hidden/sppiz00600/cond/list/toothapplist[" + rowcnt + "]/rightupper", subTootStr.substr(0, 8));
- model.makeValue("/root/hidden/sppiz00600/cond/list/toothapplist[" + rowcnt + "]/leftupper", subTootStr.substr(8, 8));
- model.makeValue("/root/hidden/sppiz00600/cond/list/toothapplist[" + rowcnt + "]/rightlower", subTootStr.substr(16, 8));
- model.makeValue("/root/hidden/sppiz00600/cond/list/toothapplist[" + rowcnt + "]/leftlower", subTootStr.substr(24, 8));
- model.makeValue("/root/hidden/sppiz00600/cond/list/toothapplist[" + rowcnt + "]/orddd", orddd);
- model.makeValue("/root/hidden/sppiz00600/cond/list/toothapplist[" + rowcnt + "]/toot", toot);
- model.makeValue("/root/hidden/sppiz00600/cond/list/toothapplist[" + rowcnt + "]/row", i);
- rowcnt = rowcnt+1;
- } else {
- if (row == i && flag == "2" ) {
- model.makeValue("/root/hidden/sppiz00600/cond/list/toothapplist[" + rowcnt + "]/chos", "true");
- model.makeValue("/root/hidden/sppiz00600/cond/list/toothapplist[" + rowcnt + "]/flag", "처방");
- model.makeValue("/root/hidden/sppiz00600/cond/list/toothapplist[" + rowcnt + "]/cd", cd);
- model.makeValue("/root/hidden/sppiz00600/cond/list/toothapplist[" + rowcnt + "]/cdnm", cdnm);
- model.makeValue("/root/hidden/sppiz00600/cond/list/toothapplist[" + rowcnt + "]/rightupper", "");
- model.makeValue("/root/hidden/sppiz00600/cond/list/toothapplist[" + rowcnt + "]/leftupper", "");
- model.makeValue("/root/hidden/sppiz00600/cond/list/toothapplist[" + rowcnt + "]/rightlower", "");
- model.makeValue("/root/hidden/sppiz00600/cond/list/toothapplist[" + rowcnt + "]/leftlower", "");
- model.makeValue("/root/hidden/sppiz00600/cond/list/toothapplist[" + rowcnt + "]/orddd", orddd);
- model.makeValue("/root/hidden/sppiz00600/cond/list/toothapplist[" + rowcnt + "]/toot", "");
- model.makeValue("/root/hidden/sppiz00600/cond/list/toothapplist[" + rowcnt + "]/row", i);
- rowcnt = rowcnt+1;
- }
- }
- }
- }
- // 치식 팝어에 받은 데이타
- function fGetToothPop() {
-
- var tootSelectcnt = getNodesetCount("/root/hidden/sppiz00600/rslt/list");
-
- var flag = "";
- var row = "";
- var toot = "";
-
- tootSelectcnt = eval(tootSelectcnt) + 1;
-
- for (var i=1; i<tootSelectcnt; i++) {
-
- flag = model.getValue("/root/hidden/sppiz00600/rslt/list["+ i +"]/flag");
- row = model.getValue("/root/hidden/sppiz00600/rslt/list["+ i +"]/row");
-
- var rlsttoot = model.getValue("/root/hidden/sppiz00600/rslt/list["+ i +"]/toot");
- var rlsttoot1 = model.getValue("/root/hidden/sppiz00600/rslt/list["+ i +"]/toot1");
-
-
- if (rlsttoot == "") {
- rlsttoot = "-";
- }
- if (rlsttoot1 == "") {
- rlsttoot1 = "-";
- }
-
- if (flag == "1") {
- toot = model.getValue("/root/main/list3/diaglist["+ row +"]/toot");
- model.setValue("/root/main/list3/diaglist["+ row +"]/toot", rlsttoot);
- model.setValue("/root/main/list3/diaglist["+ row +"]/toot1", rlsttoot1);
- if (rlsttoot != toot) { // 치식번호가 변경된 경우
- var diagstatus = grd_diaglist.rowstatus(row);
- if (diagstatus == 0 || diagstatus == 2) { // 0 : new, 2 : update
- grd_diaglist.rowstatus(row) = 2; // 2 : update
- }
- }
- }
- }
- }
- //1. 중증, 산정특례 변경 여부 체크
- function fUpdtCheckEssc(flag){
- var pid = model.getValue("/root/main/item1/iteminfo/pid");
- var indd = model.getValue("/root/main/item1/iteminfo/indd1");
- var mskind = model.getValue("/root/main/item1/iteminfo/mskind");
- var insukind = model.getValue("/root/main/item1/iteminfo/insukindcd");
- var suppkind = model.getValue("/root/main/item1/iteminfo/suppkindcd");
- var cretno = model.getValue("/root/main/item1/iteminfo/cretno");
- var fromdd = model.getValue("/root/main/item1/iteminfo/fromdd");
- var dschdd = model.getValue("/root/main/item1/iteminfo/dschdd");
- var insuflag = "";
-
- var isEsscdiag = btn_esscdiag.visible;
- var isEsscdiagUpdt = false;
- var isUpdtEsscV193 = model.getValue("/root/hidden/updtchkessc/esscV193");
- var isUpdtEsscV191 = model.getValue("/root/hidden/updtchkessc/esscV191");
- var rareesscyn = model.getValue("/root/hidden/result/rareessc/rareesscyn");
-
- model.setValue("/root/hidden/item1/vcode","");
- // 희귀난치 산정특례 추가 - 20100224 박창원
- if(suppkind == "05" || suppkind == "06" || suppkind == "39" || suppkind == "40" || suppkind == "50" || suppkind == "31" || (insukind == "22" && suppkind == "08")){ // 20090325 차상위2종 추가 - 박창원 20100318 정승우 신생아 / 보호2종 6세미만 추가
- return;
- }
- if(pid){
- var isEsscV193 = false;
- var isEsscV191 = false;
-
- var isEsscVisible = true;
-
- var cEsscCnt = getNodesetCount("/root/hidden/result/chkessc");
- if (cEsscCnt == 0 && rareesscyn != "Y" ) { // 특정내역이 없는 경우임
- return;
- } else {
- var chkspclcd = model.getValue("/root/hidden/result/chkessc[vcode='V191' or vcode='V192']/vcode");
- var spclcd = model.getValue("/root/hidden/result/chkessc[vcode='V193']/vcode");
- if (chkspclcd.length > 0) {
- isEsscV191 = true;
- //이미 체크된건이 V193인경우 V193으로 처리 한다.
- var chk = model.getValue("/root/hidden/item1/vcode");
- if(chk == "V193"){
- model.setValue("/root/hidden/item1/vcode","V193");
- }else{
- model.setValue("/root/hidden/item1/vcode",chkspclcd);
- }
- }
- if(spclcd == "V193" && suppkind != "32") { // 차상위는 중증등록버튼이 활성화되지 않게한다. 20090227 박창원
- model.setValue("/root/hidden/item1/vcode",spclcd);
- var suppkindcd = model.getValue("/root/main/item1/iteminfo/suppkindcd");
-
- isEsscV193 = true;
- // V193인경우 이미 적용하면 끝이기때문에 일부로 보여지지 않도록 했었지만
- // 사용자 요구사항으로 그냥 버튼 살아 있게 한다. 2007.12.07 박도형
- //if (suppkindcd == "06") {
- // isEsscVisible = false;
- //}
- }
- }
- btn_esscdiag.visible = false;
-
- if (isEsscV191) {
- if (isEsscVisible) {
- if (isEsscdiag) {
- if (isUpdtEsscV191 == "True") {
- isEsscdiagUpdt = false;
- } else {
- isEsscdiagUpdt = true;
- }
- } else {
- isEsscdiagUpdt = true;
- }
- btn_esscdiag.visible = true;
- } else {
- btn_esscdiag.visible = false;
- isEsscdiagUpdt = false;
- }
- btn_esscdiag.attribute("class") = "btn5_letter4";
- btn_esscdiag.attribute("color") = "#ff0066";
-
- } else {
- if (isEsscV193) {
- if (isEsscVisible) {
- if (isEsscdiag) {
- if (isUpdtEsscV193 == "True") {
- isEsscdiagUpdt = false;
- } else {
- isEsscdiagUpdt = true;
- }
- } else {
- isEsscdiagUpdt = true;
- }
- btn_esscdiag.visible = true;
- } else {
- btn_esscdiag.visible = false;
- isEsscdiagUpdt = false;
- }
- btn_esscdiag.attribute("class") = "btn5_letter4";
- btn_esscdiag.attribute("color") = "#ff0066";
- } else {
- isEsscdiagUpdt = false;
- btn_esscdiag.attribute("class") = "btn2_letter4";
- btn_esscdiag.visible = false;
- }
- }
- //if (isEsscdiagUpdt) {
- var trgtManWindow = getChildWindow("SPPIJ01900");
- var vcode = model.getValue("/root/hidden/item1/vcode");
-
- model.setValue("/root/hidden/sppij01900/cond/pid",model.getValue("root/main/item1/iteminfo/pid"));
- model.setValue("/root/hidden/sppij01900/cond/indd",model.getValue("root/main/item1/iteminfo/indd1"));
- model.setValue("/root/hidden/sppij01900/cond/mskind",model.getValue("root/main/item1/iteminfo/mskind"));
- model.setValue("/root/hidden/sppij01900/cond/brateflag",model.getValue("root/main/item1/iteminfo/brateflag"));
- model.setValue("/root/hidden/sppij01900/cond/brthdd",model.getValue("root/main/item1/iteminfo/brthdd"));
- model.setValue("/root/hidden/sppij01900/cond/vcode",vcode);
-
- // 희귀난치 산정특례 로직 추가 - 20100224 박창원
- var fromdd = model.getValue("/root/main/item1/iteminfo/fromdd");
-
- var insukind = model.getValue("/root/main/item1/iteminfo/insukindcd");
- var suppkind = model.getValue("/root/main/item1/iteminfo/suppkindcd");
-
-
- if (insukind == "11" && suppkind != "31" && suppkind != "32" && suppkind != "01" && fromdd >= "20090701" && rareesscyn == "Y") {
- // 20090930 JHP 희귀난치 등록여부 확인위해 추가함. -- 시작
- var anohosprgstflag = model.getValue("/root/main/item13/rooa/anohosprgstflag");
- var rareobstno = model.getValue("/root/main/item13/rooa/rareobstno");
- var rareobstfromdd = model.getValue("/root/main/item13/rooa/rareobstfromdd");
- var rareobsttodd = model.getValue("/root/main/item13/rooa/rareobsttodd");
- var signyn = model.getValue("/root/main/item13/rooa/signyn");
-
- //20091109 JHP 희귀난치 메세지는 상병에 R/O 상병일 경우는 메세지 제외함.
- var ruleoutyn = model.getValue("/root/main/list3/diaglist[1]/ruleoutyn");
- if(ruleoutyn == 'true'){
- // 주상병 R/O일때에는 희귀난치 메세지 처리 안함.
- }else{
- if (fromdd >= "20091001") { // 10월1일 이후에는 등록번호가 반드시 있어야한다. - 추가코딩필요
- // 타병원등록 여부 , Y:타병원,N:우리병원
- if(anohosprgstflag == "Y"){
- // 희귀난치 번호여부
- if(rareobstno == null || rareobstno == '-'){
- messageBox("## 희귀난치정보 ## : 타병원등록이나 희귀난치번호가 ","I004");
- } else {
- btn_esscdiag.visible = true;
- btn_esscdiag.attribute("class") = "btn5_letter4";
- btn_esscdiag.attribute("color") = "#ff0066";
-
- }
- } else if(anohosprgstflag == "N"){
- // 희귀난치 번호여부
- if(rareobstno == null || rareobstno == '-'){
- if(signyn == "Y"){
- btn_esscdiag.visible = true;
- btn_esscdiag.attribute("class") = "btn5_letter4";
- btn_esscdiag.attribute("color") = "#ff0066";
-
- } else {
- messageBox("## 희귀난치정보 ## : 재원병원등록이나 등록번호 및 서명정보가 ","I004");
- }
- } else{
- btn_esscdiag.visible = true;
- btn_esscdiag.attribute("class") = "btn5_letter4";
- btn_esscdiag.attribute("color") = "#ff0066";
-
- }
- } else {
- // 희귀난치 data(mmohrooa)에 정보없음.
- messageBox("## 희귀난치정보 ## : 등록번호 및 서명정보가 ","I004");
- }
- } else {
- btn_esscdiag.visible = true;
- btn_esscdiag.attribute("class") = "btn5_letter4";
- btn_esscdiag.attribute("color") = "#ff0066";
- }
- }
- }
- // 20100224 박창원 희귀난치 산정특례추가
- var anohosprgstflag = model.getValue("/root/main/item13/rooa/anohosprgstflag");
- var rareobstno = model.getValue("/root/main/item13/rooa/rareobstno");
- var rareobstfromdd = model.getValue("/root/main/item13/rooa/rareobstfromdd");
- var rareobsttodd = model.getValue("/root/main/item13/rooa/rareobsttodd");
- var signyn = model.getValue("/root/main/item13/rooa/signyn");
- var fromdd = model.getValue("/root/main/item1/iteminfo/indd1");
-
- if (insukind == "11" && suppkind != "32" && rareesscyn == "Y" && suppkind != "01" && suppkind != "50" && suppkind != "46" && fromdd >= "20090701"
- && ((anohosprgstflag == "N" && signyn == "Y") || (anohosprgstflag == "Y" && rareobstfromdd <= fromdd && rareobsttodd >= fromdd))) {
- fesscdiag();
- }else if(vcode == "V193" && suppkind != "32" && suppkind != "06" && suppkind != "40" && suppkind != "31" && suppkind != "69" && !(insukind == "22" && suppkind == "08") ){ // 차상위 1종일때는 등록암 메세지가 안나오게 20090227 박창원 20100318 정승우 신생아유형/급여2종 6세미만 일때 등록암 메세지 나오지 않도록
- var msg = messageBox("등록암환자입니다. 중증요율 적용","S001");
- if(msg !=6){
- return;
- }else{
- Insuchange("06");
- }
-
- }else if(vcode == "V191" || vcode == "V192"){
- if (flag == "S") {
- var msg = messageBox("중증수술 환자입니다. 중증요율 적용","S001");
- if(msg !=6){
- return;
- }else{
- if (trgtManWindow == null) {
- open("SPPIJ01900" ,"", "10", "10", "SPPIJ01900","/root/hidden/sppij01900/cond", "/root/send/cond");
- } else {
- activateChild("SPPIJ01900");
- model.refresh();
- }
- }
- }
- } else {
- if (flag == "S") {
- //messageBox("저장이","I002");
- }
- //중증처방여부 체크
- fChkEsscEDI();
- }
- }
- }
- // 변경된 퇴원확정여부, 심사상태 flag를 대상자조회화면에 보여준다. (2008.01.28 박지욱 추가)
- function fSetChildStat() {
-
- model.refresh();
-
- // 대상자조회화면에 심사상태를 업데이트 보여주도록 한다. (2008. 01. 28 박지욱 추가, 심사상태와 퇴원확정여부, 최종심사자, 심사일자 변경)
- var trgtManWindow = getChildWindow("SMPIJ00200"); // SMPIJ00600_입원재원심사대상자조회.xrw
- if (trgtManWindow != null) {
- var dschjudgprcsstat = model.getValue("/root/main/item1/iteminfo/dschjudgprcsstat"); // 심사상태
- var dschnotiyn = model.getValue("/root/main/item1/iteminfo/dschnotiyn"); // 퇴원확정여부
- var selectedRow = trgtManWindow.model.getValue("/root/hidden/selectedRow");
- var row = parseInt(selectedRow);
-
- if (row > 0) {
- trgtManWindow.model.setValue( "/root/main/list1/gridinpt[" + row + "]/dschjudgprcsstat", dschjudgprcsstat);
- trgtManWindow.model.setValue( "/root/main/list1/gridinpt[" + row + "]/dschnotiyn", dschnotiyn);
- trgtManWindow.model.setValue( "/root/main/list1/gridinpt[" + row + "]/lastjudgendid", VAL_usernm);
- trgtManWindow.model.setValue( "/root/main/list1/gridinpt[" + row + "]/lastjudgdt", VAL_today);
- }
- }
- // 끝
- }
- // 중증처방체크로직 추가 - 2007.11.27
- // 중증처방만 있고 상병이 없는경우 Alert메세지를 띄운다.
- // 조건 : 중증처방 존재 + 중증버튼 없음 + 중증요율 아님
- function fChkEsscEDI(){
- var chkBtn = btn_esscdiag.visible;
- var chkSuppkind = model.getValue("/root/main/item1/iteminfo/suppkindcd");
- var chkInsukind = model.getValue("/root/main/item1/iteminfo/insukindcd");
-
- if(chkBtn == "True" || chkSuppkind == "05" || chkSuppkind == "39"){ // 20090325 차상위 2종 추가 - 박창원
- return;
- }
- if(chkInsukind != "11" && chkInsukind != "21" && chkInsukind != "22" ){
- return;
- }
-
- var cEssc = instance1.selectSingleNode("/root/hidden/result/chkesscedi");
- if (cEssc == null) { // 특정내역이 없는 경우임
- return;
- }else{
- modal("SPPIJ02100" ,"", "10", "10", "SPPIJ02100", "/root/hidden/result/chkesscedi", "/root/main/list1", "", "");
- }
- }
- // 마감 가능 여부 체크(임시적 사용)
- function fChkClose() {
- var flag = true;
- // 처방내역에 있는 미시행 건이 있는지 체크
- //이경민 속도 개선 for -> xpath
- var chkN = model.getValue("/root/main/list2/iscllist[execprcpstatcd='N']/execprcpstatcd");
- var chkO = model.getValue("/root/main/list2/iscllist[execprcpstatcd='O']/execprcpstatcd");
- if(chkN == "N" || chkO == "O"){
- flag = false;
- }
- return flag;
- }
- // grid 타이틀 컬럼 정보
- function getOrderInfoOfCol(grdid){
-
- var refdata = ""; // ref
- var sizedata = ""; // size
- var grdobj = document.controls.item(grdid);
- var totcol = grdobj.cols;
-
- for(var i = 0; i < totcol; i++){
- var refval = grdobj.colAttribute(i, "ref");
- refdata += refval + "^";
-
- var sizeval = grdobj.colWidth(i);
- sizedata += sizeval + "^";
- }
-
- refdata = refdata.substring(0 , refdata.length-1);
- sizedata = sizedata.substring(0, sizedata.length-1);
-
- var scrnid = model.getValue("/root/hidden/listval/uuee[compsnm='"+grdid+"']/scrnid");
- var compscnts = model.getValue("/root/hidden/listval/uuee[compsnm='"+grdid+"']/compscnts");
- if (scrnid == "") {
- model.setValue("/root/send/listval/uuee/flag","I");
- } else {
- model.setValue("/root/send/listval/uuee/flag","U");
- }
- model.setValue("/root/send/listval/uuee/scrnid","SMPIJ00300");
- model.setValue("/root/send/listval/uuee/compsnm",grdid.toString());
- model.setValue("/root/send/listval/uuee/compscnts",refdata);
- model.setValue("/root/send/listval/uuee/compsrefcnts","-");
- model.setValue("/root/send/listval/uuee/compssizecnts",sizedata);
-
- if ( submit("TXPIJ00402") ) {
- messageBox("사용자 환경 저장이","I002");
- }
- }
- // grid 타이틀 컬럼 정보
- function getOrderInfoOfRdo(rdoid){
-
- var refdata = ""; // ref
- var sizedata = ""; // size
- var scrnid = model.getValue("/root/hidden/listval/uuee[compsnm='"+rdoid+"']/scrnid");
- var compscnts = model.getValue("/root/hidden/listval/uuee[compsnm='"+rdoid+"']/compscnts");
- var calcamtflag = model.getValue("/root/hidden/list1/isclcond/calcamtflag")
- if (scrnid == "") {
- model.setValue("/root/send/listval/uuee/flag","I");
- } else {
- model.setValue("/root/send/listval/uuee/flag","U");
- }
- model.setValue("/root/send/listval/uuee/scrnid","SMPIJ00300");
- model.setValue("/root/send/listval/uuee/compsnm",rdoid);
- model.setValue("/root/send/listval/uuee/compscnts",(calcamtflag.length == 0 ? "-" : calcamtflag));
- model.setValue("/root/send/listval/uuee/compsrefcnts", "-");
- model.setValue("/root/send/listval/uuee/compssizecnts","-");
-
- if ( submit("TXPIJ00402") ) {
- //messageBox("사용자 환경 저장이","I002");
- }
- }
- function getOrderInfoOfChk(chkid){
-
- var scrnid = model.getValue("/root/hidden/listval/uuee[compsnm='"+chkid+"']/scrnid");
- var compscnts = model.getValue("/root/hidden/listval/uuee[compsnm='"+chkid+"']/compscnts");
- var chkval = model.getValue("/root/hidden/list1/isclcond/" + chkid.replace("chk_",""));
-
- if (scrnid == "") {
- model.setValue("/root/send/listval/uuee/flag","I");
- } else {
- model.setValue("/root/send/listval/uuee/flag","U");
- }
-
- model.setValue("/root/send/listval/uuee/scrnid","SMPIJ00300");
- model.setValue("/root/send/listval/uuee/compsnm",chkid);
- model.setValue("/root/send/listval/uuee/compscnts",(chkval.length == 0 ? "N" : chkval));
- model.setValue("/root/send/listval/uuee/compsrefcnts", "-");
- model.setValue("/root/send/listval/uuee/compssizecnts","-");
-
- if ( submit("TXPIJ00402") ) {
- //messageBox("사용자 환경 저장이","I002");
- }
- }
- // 사용자별 grid 타이틀 컬럼 설정
- function setOrderInfoOfCol(grdid, refdata, sizedata){
-
- var grdobj = document.controls.item(grdid);
- var refarr = refdata.split("^");
- var sizearr = sizedata.split("^");
-
- for(var i = 0; i < refarr.length; i++){
- var colcnt = grdobj.colref("" + refarr[i] + "");
- grdobj.colMove(i, colcnt, "before",false);
- var size = sizearr[i];
- grdobj.colWidth(i) = eval(size);
- }
- grdobj.refresh();
- var caption = "";
- for( var i = 1; i < grdobj.cols ; i++ ){
- if (caption == "") {
- caption = grdobj.textMatrix(0,i);
- } else {
- caption += "^" + grdobj.textMatrix(0,i);
- }
- }
- grdobj.caption = caption;
- }
- // 중간청구등록 화면에서 조회된 환자가 중간 청구 등록이 된 경우.
- function fSetMidregist(midcflag) {
-
- btn_midregist.disabled = false;
-
- if(midcflag == "Y"){
- btn_midregist.attribute("class") = "btn2_letter6";
- btn_midregist.attribute("color") = "#ff0066";
- btn_midregistyn.disabled = true;
- btn_midcomplete.disabled = false;
- btn_midcancel.disabled = false;
-
- } else {
- btn_midregist.attribute("class") = "btn2_letter6";
- btn_midregistyn.attribute("class") = "btn2_letter6";
- btn_midregistyn.disabled = false;
- btn_midcomplete.disabled = true;
- btn_midcancel.disabled = true;
- }
- }
- //유형적용 완료후 소급처리 한다. - 20080730 수가계산을 날짜별로 loop. - 박창원
- function fReCalc() {
- // 입원일 부터 현재까지 계산한다(일일단위로 loop)
- var fromdd = model.getValue("/root/main/item1/iteminfo/fromdd");
- var todd = model.getValue("/root/main/item1/iteminfo/todd");
- if (todd == "99991231") {
- todd = VAL_today;
- }
- var period = getDateInterval(fromdd, todd);
- // fromdd부터 currentdate까지 loop
- for (i=1; i<= (period+1); i++) {
- model.setValue("/root/send/calcbasedd" , fromdd);
- var rslt = submit("TXPIJ00205",false);
-
- if (rslt == false ) {
- return false;
- }
-
- // fromdd를 증가시킨다(하루씩)
- fromdd = fromdd.toDate("YYYYMMDD");
- fromdd = fromdd.getAddDate(1);
- fromdd = fromdd.getDateFormat();
- }
- }
- // SPPIZ00700_심사Comment조회.xrw 호출(심사자메모,EDI메모)
- function fGetJudgEdiComment(memoflag, memocls) {
- model.resetInstanceNode("/root/hidden/sppiz00700/rslt");
- model.resetInstanceNode("/root/hidden/sppiz00700/cond");
- model.setValue("/root/hidden/sppiz00700/cond/memoflag", memoflag);
- model.setValue("/root/hidden/sppiz00700/cond/memocls", memocls);
-
-
- modal("SPPIZ00700" ,"", "10", "10", "SPPIZ00700", "/root/hidden/sppiz00700", "/root/send/sppiz00700", "", "");
- }
- // 수정추가 20090813 외래요율환자 일경우 보험, 보조유형 정보가 맞는지 확인하여 alert처리함.
- function fOutRateInsuSuppflag(){
- //속도개선 통합 plet2
- //submit("TRPIJ00316");
- if(model.getValue("/root/main/outrateinsusuppflag/info/yn") == "N"){
- messageBox("6시간 미만으로 외래요율 퇴원건입니다. \n환자에게 해당하는 보조유형을 선택하여 변경하시고 재계산 한후 심사","I008");
- }
- }
- //평가메모 관련 팝업창세팅
- function fSetTstMemoRefresh(){
-
- var memo = model.getValue("/root/hidden/sppiz00700/rslt/memo");
- var tmp = model.getValue("/root/main/item1/iteminfo/edirmk");
-
- if(tmp){
- tmp = tmp + " ";
- }
- model.setValue("/root/main/item1/iteminfo/tstrmk",tmp + memo);
- //model.refresh(); 최적화 문제로 대체 20080731 박창원
- model.refresh();
- }
- function fSetRdoReset(){
- var rdo_name = model.getValue("/root/hidden/listval/uuee[compsnm='rdo_zerofilter']/compsnm");
- var rdo_val = model.getValue("/root/hidden/listval/uuee[compsnm='rdo_zerofilter']/compscnts");
- if (rdo_name.length > 0) {
- if (rdo_val == "calcamt!='0' or matractflag='0'"){
- model.setValue(rdo_zerofilter.attribute("ref"), "0");
- model.setValue("/root/hidden/list1/isclcond/calcamtflag",rdo_val );
- } else if (rdo_val == "calcamt='0'") {
- model.setValue(rdo_zerofilter.attribute("ref"), "1");
- model.setValue("/root/hidden/list1/isclcond/calcamtflag",rdo_val );
- } else {
- model.setValue(rdo_zerofilter.attribute("ref"), "-");
- model.setValue("/root/hidden/list1/isclcond/calcamtflag","");
- }
-
- } else {
- model.setValue(rdo_zerofilter.attribute("ref"), "0");
- model.setValue("/root/hidden/list1/isclcond/calcamtflag","calcamt!='0' or matractflag='0'");
- }
-
- var chk_name = model.getValue("/root/hidden/listval/uuee[compsnm='chk_showsubtotal']/compsnm");
- var chk_val = model.getValue("/root/hidden/listval/uuee[compsnm='chk_showsubtotal']/compscnts");
-
- if (chk_name.length > 0) {
- if (chk_val == "Y"){
- model.setValue("/root/hidden/list1/isclcond/showsubtotal", chk_val);
- } else {
- model.setValue("/root/hidden/list1/isclcond/showsubtotal", "");
- }
- } else {
- model.setValue("/root/hidden/list1/isclcond/showsubtotal", "");
- }
-
- chk_name = model.getValue("/root/hidden/listval/uuee[compsnm='chk_showitemcoloryn']/compsnm");
- chk_val = model.getValue("/root/hidden/listval/uuee[compsnm='chk_showitemcoloryn']/compscnts");
-
- if (chk_name.length > 0) {
- if (chk_val == "Y"){
- model.setValue("/root/hidden/list1/isclcond/showitemcoloryn", chk_val);
- } else {
- model.setValue("/root/hidden/list1/isclcond/showitemcoloryn", "");
- }
- } else {
- model.setValue("/root/hidden/list1/isclcond/showitemcoloryn", "");
- }
-
- model.setValue(rdo_actmatflag.attribute("ref"), "-");
- model.setValue(rdo_actingflag.attribute("ref"), "all");
- model.setValue(rdo_insuflag.attribute("ref"), "-");
- model.setValue(rdo_ordfilflag.attribute("ref"), "-");
- model.setValue(rdo_cpflag.attribute("ref"), "-");
-
- model.setValue("/root/hidden/list1/isclcond/matractflag","");
- model.setValue("/root/hidden/list1/isclcond/calcpayflag","");
- model.setValue("/root/hidden/list1/isclcond/snglcalcscorcls","");
- model.setValue("/root/hidden/list1/isclcond/cpflag","");
- model.setValue("/root/hidden/list1/isclcond/edicd","");
- model.setValue("/root/hidden/list1/isclcond/snglcalcscorcd","");
- model.setValue("/root/hidden/list1/isclcond/actingflag","");
- }
- function openSMMMR06900() {
- var chk = model.getValue("/root/main/item1/iteminfo/patnm");
-
- if(chk){
- var trgtManWindow = getChildWindow("SMMMR06900");
-
- if (trgtManWindow == null) {
- modal("SMMMR06900");
- //modal("SMMMR06901" ,"", "10", "10", "SPPIJ02501", "/root/hidden/sppij02501/cond", "/root/send", "", "");
- }else{
- activateChild("SMMMR06900");
- }
-
-
- }
- }
- function fGetDrgOpenPopup(flag){
- //DRG 설정..시작
- var opchkyn = model.getValue("/root/main/item11/drginfo/opchkyn");
- var drgmchkyn = model.getValue("/root/main/item11/drginfo/drgmchkyn");
- var fromdd = model.getValue("/root/main/item1/iteminfo/fromdd");
- var indaycnt = parseInt(model.getValue("/root/main/list1/insulist[fromdd='"+fromdd+"']/indaycnt"));
- var dschjudgprcsstat = model.getValue("/root/main/item1/iteminfo/dschjudgprcsstat");
- var cnt = getNodesetCount("/root/main/list2/iscllist[drgacptflag='C']/drgacptflag");
- var snglcalcscorcd = model.getValue("/root/main/list2/iscllist[drgacptflag='C']/snglcalcscorcd");
-
- /* DRG 추가인정 수술료의 산정의미를 체크할 필요가 없다!! 추가인정금액 생성 시 제외하고 발생하므로!! (2015.06.24 LEJ)
- if (cnt > 0 && dschjudgprcsstat != "C") {
- var estmcd000 = getNodesetCount("/root/main/list2/iscllist[drgacptflag='C' and estmcd='000']/drgacptflag");
- var estmcd004 = getNodesetCount("/root/main/list2/iscllist[drgacptflag='C' and estmcd='004']/drgacptflag");
- var estmcd = getNodesetCount("/root/main/list2/iscllist[drgacptflag='C' and estmcd='']/drgacptflag");
- if (estmcd000 > 0 || estmcd004 > 0 || estmcd > 0) {
- } else {
- messageBox("["+snglcalcscorcd+"] DRG 추가 인정 수술료입니다. 산정의미를","I007");
- return false;
- }
- }
- */
-
- if (opchkyn=="Y" && indaycnt <= 30) {
-
- // DRG 대상자 중 혈우병 특정기호: V009, HIV 특정기호: V103 존재 시 DRG 제외 대상자 메세지
- var drgexceptyn = model.getValue("/root/main/item11/endcnclstat/drgexceptyn");
- if (drgexceptyn == "Y") {
- if ( messageBox("DRG 제외 상병(혈우병 또는 HIV)이 존재하는 DRG 대상자 입니다. 마감","Q004") != 6 ) {
- return false;
- }
- }
- if (flag == "O") { openSMMMR06900(); }
-
- var vpid = model.getValue("/root/main/item1/iteminfo/pid");
- var indd = model.getValue("/root/main/item1/iteminfo/indd1");
- var ordfromdd = model.getValue("/root/main/item1/iteminfo/fromdd");
- var cretno = model.getValue("/root/main/item1/iteminfo/cretno");
-
- setParameter("pid", vpid);
- setParameter("indd", indd);
- setParameter("ordfromdd", ordfromdd);
- setParameter("cretno", cretno);
- setParameter("drgmstat", flag);
-
- modal("SPPIJ03200" ,"", "10", "10", "SPPIJ03200", "/root/hidden/sppij03200/cond", "/root/send/data/drginfo", "", "");
-
- if (model.getValue("/root/main/item11/drginfo/rslt") != "true") {
- return false;
- }
- }
- //DRG완료
- }
- function fGetKDrgOpenPopup(flag){
- var vpid = model.getValue("/root/main/item1/iteminfo/pid");
- var indd = model.getValue("/root/main/item1/iteminfo/indd1");
- var ordfromdd = model.getValue("/root/main/item1/iteminfo/fromdd");
- var cretno = model.getValue("/root/main/item1/iteminfo/cretno");
- setParameter("pid", vpid);
- setParameter("indd", indd);
- setParameter("ordfromdd", ordfromdd);
- setParameter("cretno", cretno);
- setParameter("drgmstat", flag);
-
- open("SPPIJ04000" ,"", "10", "10", "SPPIJ04000", "/root/hidden/sppij03200/cond", "/root/send/data/drginfo", "", "");
- }
- /*
- 심사완료전상병특정내역체크 2013.07.10 plet2
- 16세미만, 35세 이상 초산 산모 필수 진단 체크
- 특정 분만진단에 필수 부진단 유무 체크
- 임신주수별 체중과 진단 체크
- */
- function fGetDiagSpclcdCheck(){
- var diagnode = "/root/main/list3/diaglist";
- var spclnode = "/root/main/list4/clcjlist";
- var isclnode = "/root/main/list2/iscllist";
- var chk_diagcd = model.getValue(diagnode+"[seqno='1']/diagcd"); //주상병코드
- var chk_O3420 = model.getValue(diagnode+"[diagcd='O3420']/diagcd");
- var chk_prgweekcnt = model.getValue("/root/main/clcjnbwt/clcjnbwtlist/prgweekcnt"); //임신주수
- var chk_weig = model.getValue("/root/main/clcjnbwt/clcjnbwtlist/weig"); //신생아체중
- var chk_O365 =model.getValue(diagnode+"[diagcd='O365' or diagcd='O366' ]/diagcd"); //임신주수상병코드
- var chk_poaflag = getNodesetCount(diagnode+"[diagcd!='' and poaflag='']/diagcd"); //poaflag
- //16세미만, 35세 이상 초산 산모 필수 진단 체크
- var chk_R= model.getValue(isclnode+"[snglcalcscorcd='R4351' " +
- "or snglcalcscorcd='R3131' " +
- "or snglcalcscorcd='R3141' " +
- "or snglcalcscorcd='R4361' " +
- "or snglcalcscorcd='R4519' " +
- "or snglcalcscorcd='R4517' " +
- "]/snglcalcscorcd"); // 초산 상병체크
- var patage = parseInt(model.getValue("/root/main/item1/iteminfo/age"));
- var result = true;
- if (chk_R.length > 0 && (patage >= 35 || patage < 16) ) {
- if(messageBox("어린 초임부 또는 고령초임부 환자입니다.", "Q003") == 6) {
- result = true;
- } else {
- result = false;
- }
- }
-
- //특정 분만진단에 필수 부진단 유무 체크
- //O820이 주상병인 환자가 O3420 상병이 없을 경우 체크
- if (chk_diagcd == 'O820' && chk_O3420.length == 0 ) {
- if(messageBox("반복제왕절개 환자입니다.", "Q003") == 6) {
- result = true;
- } else {
- var ans = messageBox("O3420 상병을 입력" , "S001");
- if (ans==6){
- model.setFocus("grd_diaglist");
- //fDiagGridInsertRow();
- grd_diaglist.bottomRow = grd_diaglist.rows;
- model.refresh();
-
- var maxseq = model.getXPathValue("max("+diagnode+"[*]/seqno)");
- model.setValue(diagnode+"[seqno='"+maxseq+"']/diagcd","O3420");
- model.setValue(diagnode+"[seqno='"+maxseq+"']/diagnm","이전의 제왕절개로 인한 흉터의 산모 관리");
- }
- result = false;
- }
- }
-
- //임신주수별 체중과 진단 체크
- //신생아 체중관련 상병누락입니다 (O365 or O366)
- if (chk_prgweekcnt.length > 0 && chk_weig.length > 0) {
- var nwbabyweight = parseInt(chk_weig);
- var minweight = parseInt(model.getValue("/root/main/nbwt/nbwtlist[prgntweek='"+chk_prgweekcnt+"']/minweight"));
- var maxweight = parseInt(model.getValue("/root/main/nbwt/nbwtlist[prgntweek='"+chk_prgweekcnt+"']/maxweight"));
-
- if (chk_O365.length == 0 && (nwbabyweight <= minweight || nwbabyweight >= maxweight ) ) {
- if(messageBox("신생아 체중관련 상병누락 환자입니다.", "Q003") == 6) {
- result = true;
- } else {
- result = false;
- }
- }
- }
-
- var opchkyn = model.getValue("/root/main/item11/drginfo/opchkyn");
- var fromdd = model.getValue("/root/main/item1/iteminfo/fromdd");
- var indaycnt = parseInt(model.getValue("/root/main/list1/insulist[fromdd='"+fromdd+"']/indaycnt"));
- if (opchkyn=="Y" && indaycnt <= 30) {
- if (chk_poaflag > 0) {
- messageBox("상병의 POA정보는", "I003");
- return false;
-
- /* 사후에 에러발생으로 모든상병 POA정보 없으면 진행되지않도록 수정. 2014.01.17 plet2
- * if(messageBox("상병에 POA정보가 없습니다.", "Q003") == 6) {
- result = true;
- } else {
- result = false;
- }*/
- }
- }
- }
- //2013.07.18 이경민 요율변경 공통호출함수 정리
- function Insuchange(suppkind) {
- var pid = model.getValue("/root/main/item1/iteminfo/pid");
- var indd = model.getValue("/root/main/item1/iteminfo/indd1");
- var cretno = model.getValue("/root/main/item1/iteminfo/cretno");
- var mskind = model.getValue("/root/main/item1/iteminfo/mskind");
- var fromdd = model.getValue("/root/main/item1/iteminfo/fromdd");
- var seqno = model.getValue("/root/main/item1/iteminfo/seqno");
- if (seqno == "") {
- seqno = "1"
- }
- var todd = model.getValue("/root/main/item1/iteminfo/todd");
- var insukind = model.getValue("/root/send/insukind");
- var instcd = model.getValue("/root/main/item1/iteminfo/instcd");
- var indschacptstat = model.getValue("/root/main/item1/iteminfo/indschacptstat");
-
- model.setValue("/root/hidden/item2/insuchange/iphs_status","B");
- model.setValue("/root/hidden/item2/insuchange/iphs_pid",pid);
- model.setValue("/root/hidden/item2/insuchange/iphs_indd",indd);
- model.setValue("/root/hidden/item2/insuchange/iphs_cretno",cretno);
- model.setValue("/root/hidden/item2/insuchange/iphs_mskind",mskind);
- model.setValue("/root/hidden/item2/insuchange/iphs_fromdd",fromdd);
- model.setValue("/root/hidden/item2/insuchange/iphs_seqno",seqno);
- model.setValue("/root/hidden/item2/insuchange/iphs_todd",todd);
- model.setValue("/root/hidden/item2/insuchange/iphs_insukind",insukind);
- model.setValue("/root/hidden/item2/insuchange/iphs_suppkind",suppkind);
- model.setValue("/root/hidden/item2/insuchange/iphs_instcd",instcd);
- model.setValue("/root/hidden/item2/insuchange/iphs_indschacptstat",indschacptstat);
-
- model.removenode("/root/hidden/insuchange/rslt");
- var receiptyn = model.getValue("/root/main/item1/iteminfo/receiptyn");
- if (receiptyn != "") {
- messageBox("퇴원(가퇴원) 수납이 되었으므로 유형변경을","E001");
- return false;
- }
-
- if(submit("TXPIJ00305", false)){
- if(messageBox("유형변경이 완료 되었습니다. 변경된 내역의 소급처리를", "Q004") == 6){
- // 로딩창 열기
- var sWindowMsg = "수가계산중입니다...";
- callLoadingWindow(sWindowMsg);
- fReCalc() ;
- // 로딩창 닫기
- removeLoadingWindow();
- messageBox("소급계산이","I001");
- }
- }
- model.refresh();
- grp_changeownbrate.visible = false;
- fGetItemInfo();
- }
- /**
- * @desc : 퇴원예고일자 이후의 처방 존재 유무 확인(submit)
- * @param :
- * @return : true, false
- * @authur : 이경민 2013. 8. 5
- */
- function fCheckReturnPrcpExist(){
- var bRtn = true;
-
- var pid = model.getValue("/root/main/item1/iteminfo/pid")
- var indd = model.getValue("/root/main/item1/iteminfo/indd1")
- var cretno = model.getValue("/root/main/item1/iteminfo/cretno")
-
- model.makeValue("/root/dschreturnprcp/reqdata/pid", pid);
- model.makeValue("/root/dschreturnprcp/reqdata/indd", indd);
- model.makeValue("/root/dschreturnprcp/reqdata/cretno", cretno);
-
- model.resetInstanceNode("/root/checkreturnprcp/rtndata/cnt");
- if(submit("TRMMO00404")){
- var nCnt = model.getValue("/root/checkreturnprcp/rtndata/cnt");
-
- if(nCnt > 0) {
- setParameter("SPMMO50400_pid", pid);
- setParameter("SPMMO50400_indd", indd);
- setParameter("SPMMO50400_cretno", cretno);
- modal("SPMMO50400");
- bRtn = false;
- }
- }
-
- return bRtn;
- }
- //중간청구등록
- function fmidregist() {
- var chk = model.getValue("/root/main/item1/iteminfo/patnm");
- var indd = model.getValue("/root/main/item1/iteminfo/indd");
-
- if(chk){
- if(ipt_pid.currentText.length >1){
- if(indd.length>1){
- //var trgtManWindow = getChildWindow("SMPIJ01100");
- var trgtManWindow = getChildWindow("SMPIJ02300");
-
- var patunitsrch1 = model.getValue("/root/main/item1/iteminfo/pid").getTrim(); // (stringHelper.js) 문자열 앞뒤에 있는 공백 제거
- // 2008.01.23 박지욱 수정 (중간청구등록화면에 넘겨주는 데이터 추가 - pid, indd)
- model.removenode("/root/hidden/midclam");
- model.makeValue("/root/hidden/midclam/pid", patunitsrch1);
- model.makeValue("/root/hidden/midclam/indd", model.getValue("/root/main/item1/iteminfo/indd"));
-
- if (trgtManWindow == null) {
- open("SMPIJ02300" ,"", "10", "10", "SMPIJ02300", "/root/hidden/midclam", "/root/hidden/midclam");
- } else {
- activateChild("SMPIJ02300");
- trgtManWindow.javascript.fGetMidClamList();
- }
- model.refresh();
- }
- }
- }
- }
- //분할제외등록
- function fmidregistyn() {
- var chk = model.getValue("/root/main/item1/iteminfo/patnm");
-
- if(chk){
- var midregistyn = model.getValue("/root/main/item1/iteminfo/midregistyn");
- if (midregistyn == "Y") {
- if (submit("TXPIJ00307", false)) {
- btn_midregist.attribute("class") = "btn2_letter6";
- btn_midregist.disabled = false;
- btn_midregistyn.attribute("class") = "btn2_letter6";
- //btn_midregistyn.attribute("color") = "#ff0066";
- model.setValue("/root/main/item1/iteminfo/midregistyn", "N");
- messageBox("분할제외 등록 취소가","I002");
- }
- } else {
- if (submit("TXPIJ00307"), false) {
- btn_midregist.attribute("class") = "btn2_letter6";
- btn_midregist.disabled = true;
- btn_midregistyn.attribute("class") = "btn2_letter6";
- btn_midregistyn.attribute("color") = "#ff0066";
- model.setValue("/root/main/item1/iteminfo/midregistyn", "Y");
-
- messageBox("분할제외 등록이","I002");
- }
- }
- }
- }
- //애기/엄마
- function fbabymother() {
- var chk = model.getValue("/root/main/item1/iteminfo/patnm");
- if(chk){
- var readonly = model.getValue("/root/send/readonly");
- // 6시간 미만 환자일 경우 Block - 20081005 박창원
- var sixtimyn = model.getValue("/root/main/item1/iteminfo/sixtimyn");
- // open일관련 적용 - 20090302 - 하드코딩 제거,확산병원 데이터 미등록 때문에 예외처리함
- var opendd = model.getValue("/root/main/item1/iteminfo/opendd");
- // 이력 그리드내에서 보조유형이 09(자연분만) 있는 경우 이미 면제기간이 적용된 경우
- // 분만신생아관리 화면에서 면제기간적용 버튼 비활성화 (2008.01.29 박지욱 추가)
- var fromdd = "";
- var todd = "";
- var seqno = model.getValue("/root/main/item1/iteminfo/seqno");
- var indd = model.getValue("/root/main/item1/iteminfo/indd1");
- var dschnotidt = model.getValue("/root/main/item1/iteminfo/dschnotidt");
- var dschnotiyn = model.getValue("/root/main/item1/iteminfo/dschnotiyn");
- var cfe = model.getValue("/root/main/item1/iteminfo/cfe");
- for (var i = 1; i < grd_insuhistory.rows; i++) {
- var suppkind = model.getValue("/root/main/list1/insulist["+i+"]/suppkind");
- if (suppkind == "09" || suppkind == "42") {
- fromdd = model.getValue("/root/main/list1/insulist["+i+"]/fromdd");
- todd = model.getValue("/root/main/list1/insulist["+i+"]/dschnotidt");
- seqno = model.getValue("/root/main/list1/insulist["+i+"]/seqno");
- }
- }
-
- model.setValue("/root/hidden/sppiz01200/cond/pid",model.getValue("/root/main/item1/iteminfo/pid"));
- model.setValue("/root/hidden/sppiz01200/cond/indd",indd);
- model.setValue("/root/hidden/sppiz01200/cond/cretno",model.getValue("/root/main/item1/iteminfo/cretno"));
- model.setValue("/root/hidden/sppiz01200/cond/mskind",model.getValue("/root/main/item1/iteminfo/mskind"));
- model.setValue("/root/hidden/sppiz01200/cond/brateflag",model.getValue("/root/main/item1/iteminfo/brateflag"));
- model.setValue("/root/hidden/sppiz01200/cond/brthdd",model.getValue("/root/main/item1/iteminfo/brthdd"));
- model.setValue("/root/hidden/sppiz01200/cond/dschnotidt",dschnotidt);
- model.setValue("/root/hidden/sppiz01200/cond/dschnotiyn",dschnotiyn);
- model.setValue("/root/hidden/sppiz01200/cond/calcbasedd", '-');
- model.setValue("/root/hidden/sppiz01200/cond/seqno", seqno);
- model.setValue("/root/hidden/sppiz01200/cond/cfe", cfe);
-
- // 심사마감이나 퇴원한 환자는 면제일자적용이나 해제를 시킬 수 없다. - 20080924 박창원
- // 기존에는 심사마감이나 퇴원여부를 인스턴스에서 가져오던 것을 실시간 체크로 변경 - 20080927 박창원
- if (!submit("TRPIJ00315", false)) {
- messageBox("실시간 환자상태 체크에 실패 했습니다. 시스템 오류입니다.관리자 문의 후", "C003");
- return;
- }
- var indschacptstat = model.getValue("/root/main/item1/iteminfo/indschacptstat");
- var dschjudgprcsstat = model.getValue("/root/main/item1/iteminfo/dschjudgprcsstat");
- // 중간청구 여부를 판단해서 블로킹 - 20081017 박창원
- var lastmdlclamdd = model.getValue("/root/main/item1/iteminfo/lastmdlclamdd");
- var fromdd = model.getValue("/root/main/item1/iteminfo/fromdd");
- if (lastmdlclamdd > fromdd && lastmdlclamdd > opendd && lastmdlclamdd != "" ) {
- model.setValue("/root/hidden/sppiz01200/cond/saveyn","Y");
- }
- if (dschjudgprcsstat == "C" || dschjudgprcsstat == "E" || indschacptstat == "D" || readonly == "Y") {
- model.setValue("/root/hidden/sppiz01200/cond/saveyn","Y");
- } else {
- model.setValue("/root/hidden/sppiz01200/cond/saveyn","N");
- }
-
- // fromdd 와 todd 에 값이 있으면 면제기간 적용된 환자임을 알려주는 flag 세팅
- if (fromdd != "" && todd != "") {
- model.setValue("/root/hidden/sppiz01200/cond/disyn","Y");
- } else {
- model.setValue("/root/hidden/sppiz01200/cond/disyn","N");
- }
-
- if (sixtimyn == "Y") {
- messageBox("6시간 미만 상태 입니다. 자연분만 요율을 설정(저장) ","E001");
- }
-
- model.setValue("/root/hidden/sppiz01200/cond/fromdd",fromdd);
- model.setValue("/root/hidden/sppiz01200/cond/todd",todd);
- var trgtManWindow = getChildWindow("SPPIZ01200");
- if (trgtManWindow == null) {
- open("SPPIZ01200" ,"", "10", "10", "SPPIZ01200","/root/hidden/sppiz01200/cond", "/root/hidden/sppiz01200/cond");
- } else {
- activateChild("SPPIZ01200");
- model.refresh();
- }
- }
- }
- //수술(유)
- function foperdiag() {
- var chk = model.getValue("/root/main/item1/iteminfo/patnm");
- if(chk){
- var trgtManWindow = getChildWindow("SPPIZ01300");
- var indd = model.getValue("/root/main/item1/iteminfo/indd1");
-
- model.setValue("/root/hidden/sppiz01300/cond/pid",model.getValue("root/main/item1/iteminfo/pid"));
- model.setValue("/root/hidden/sppiz01300/cond/indd",indd);
- model.setValue("/root/hidden/sppiz01300/cond/cretno",model.getValue("root/main/item1/iteminfo/cretno"));
- if (trgtManWindow == null) {
- open("SPPIZ01300" ,"", "10", "10", "SPPIZ01300","/root/hidden/sppiz01300/cond", "/root/send/data1");
- } else {
- activateChild("SPPIZ01300");
- model.refresh();
- }
- }
- }
- //중간마감취소
- function fmidcancel() {
- //20091126 JHP 수정추가
- var chk = model.getValue("/root/main/item1/iteminfo/patnm");
- var indd = model.getValue("/root/main/item1/iteminfo/indd");
- var ans = 0;
- if(chk){
- if(ipt_pid.currentText.length >1){
- if(indd.length>1){
-
- var trgtManWindow = getChildWindow("SMPID10100");
-
- var patunitsrch1 = model.getValue("/root/main/item1/iteminfo/pid").getTrim(); // (stringHelper.js) 문자열 앞뒤에 있는 공백 제거
- // 2008.01.23 박지욱 수정 (중간청구등록화면에 넘겨주는 데이터 추가 - pid, indd)
- model.removenode("/root/hidden/midclam");
- model.makeValue("/root/hidden/midclam/pid", patunitsrch1);
- model.makeValue("/root/hidden/midclam/indd", model.getValue("/root/main/item1/iteminfo/indd"));
-
- if (trgtManWindow == null) {
- ans = messageBox("심사 취소 할 경우", "S001");
- if (ans == 6) {
-
- model.makeValue("/root/send/checkyn","Y");
- if (!submit("TRPIJ00315", false)) {
- messageBox("실시간 환자상태 체크에 실패 했습니다. 시스템 오류입니다.관리자 문의 후", "C003");
- return;
- }
-
- if (fGetDrgOpenPopup("O") == false) {
- return false;
- }
-
- model.setValue("/root/main/item1/iteminfo/dschjudgprcsstat","A");
- if (submit("TXPIJ00301", false)) {
- }
- }
- } else {
- ans = messageBox("심사 취소 할 경우", "S001");
- if (ans == 6) {
-
- model.makeValue("/root/send/checkyn","Y");
- if (!submit("TRPIJ00315", false)) {
- messageBox("실시간 환자상태 체크에 실패 했습니다. 시스템 오류입니다.관리자 문의 후", "C003");
- return;
- }
-
- if (fGetDrgOpenPopup("O") == false) {
- return false;
- }
-
- model.setValue("/root/main/item1/iteminfo/dschjudgprcsstat","A");
- submit("TXPIJ00301",false);
- }
- }
- model.refresh();
- }
- }
- }
- }
- //특정내역
- function fspclData() {
- var chk = model.getValue("/root/main/item1/iteminfo/patnm");
- if(chk){
- var rrgstno = model.getValue("/root/main/item1/iteminfo/rrgstno");
- rrgstno = rrgstno.replace("-","");
- model.setValue("/root/send/rrgstno",rrgstno);
- model.setValue("/root/send/dschdd",model.getValue("/root/main/item1/iteminfo/dschdd"));
- var fromdd = model.getValue("/root/send/fromdd");
- // v191, v192, v193 값을 넣기 위한 vcode
- model.setValue("root/send/vcode", model.getValue("/root/hidden/item1/vcode"));
- if (submit("TRPIJ00310")) {
- copyNodeType("/root/main/list4","/root/hidden/list4","after");
- //grd_clcjlist.dispatch("xforms-value-changed");
- //model.refresh(); 최적화 문제로 대체 20080731 박창원
- model.refreshpart("/root/main/list4");
-
- for(var i = 1; i < grd_clcjlist.rows; i++) {
- var spclcd = model.getValue("/root/main/list4/clcjlist["+ i + "]/spclcd");
- model.setValue("/root/main/list4/clcjlist["+ i + "]/fromdd", fromdd);
- if (spclcd == "" ) {
- grd_clcjlist.deleteRow(i, false);
- }
- }
-
- for(var i = 1; i < grd_clcjlist.rows; i++) {
- var status = model.getValue("/root/main/list4/clcjlist["+ i + "]/status");
- if(status == "3"){
- grd_clcjlist.rowstatus(i) = 1;
- }
- }
-
- // 그리드 정렬 + 빈줄 추가
- fSortSpclNo();
- // 행추가
- // fSpclGridInsertRow();
- }
- }
- }
- //중증질환
- function fesscdiag() {
- var chk = model.getValue("/root/main/item1/iteminfo/patnm");
- var readonly = model.getValue("/root/send/readonly");
- // open 일 적용 - 20090302 박창원 - 확산될때마다 수정해야함 - 확산병원은 오픈일 기준자료가 없으므로...
- var opendd = model.getValue("/root/main/item1/iteminfo/opendd");
-
- /* if (opendd != "20081003") {
- opendd = "20081003";
- } */
- if(chk){
- var trgtManWindow = getChildWindow("SPPIJ01900");
- var vcode = model.getValue("/root/hidden/item1/vcode");
- var indd = model.getValue("root/main/item1/iteminfo/indd1");
- // 6시간미만 변경 블로킹을 위해 변수 추가 - 20081105 박창원
- var sixtimyn = model.getValue("/root/main/item1/iteminfo/sixtimyn");
-
- // 심사마감이나 퇴원한 환자는 요율을 변경 시킬 수 없다. - 20080924 박창원
- // 등록암 불가 알럿후 종료, 중증수술은 조회만 되게 - 기간적용,적용, 유형복원 안되게
- // 기존에는 심사마감이나 퇴원여부를 인스턴스에서 가져오던 것을 실시간 체크로 변경 - 20080927 박창원
- if (!submit("TRPIJ00315", false)) {
- messageBox("실시간 환자상태 체크에 실패 했습니다. 시스템 오류입니다.관리자 문의 후", "C003");
- return;
- }
-
- var indschacptstat = model.getValue("/root/main/item11/endcnclstat/indschacptstat");
- var dschjudgprcsstat = model.getValue("/root/main/item11/endcnclstat/dschjudgprcsstat");
-
- model.setValue("/root/hidden/sppij01900/cond/pid",model.getValue("root/main/item1/iteminfo/pid"));
- model.setValue("/root/hidden/sppij01900/cond/indd",indd);
- model.setValue("/root/hidden/sppij01900/cond/cretno",model.getValue("root/main/item1/iteminfo/cretno"));
- model.setValue("/root/hidden/sppij01900/cond/mskind",model.getValue("root/main/item1/iteminfo/mskind"));
- model.setValue("/root/hidden/sppij01900/cond/brateflag",model.getValue("root/main/item1/iteminfo/brateflag"));
- model.setValue("/root/hidden/sppij01900/cond/brthdd",model.getValue("root/main/item1/iteminfo/brthdd"));
- model.setValue("/root/hidden/sppij01900/cond/vcode",vcode);
- model.setValue("/root/hidden/sppij01900/cond/ownbrate",model.getValue("/root/main/item1/iteminfo/normalownbrate"));
- model.setValue("/root/hidden/sppij01900/cond/cfe",model.getValue("root/main/item1/iteminfo/cfe"));
- // 심사마감이나 퇴원한 환자는 중증수술기간산정관리에서 조작을 할 수 없다 - 20080924 박창원
- // 중간청구 여부를 판단해서 블로킹 - 20081017 박창원
- var lastmdlclamdd = model.getValue("/root/main/item1/iteminfo/lastmdlclamdd");
- var fromdd = model.getValue("/root/main/item1/iteminfo/fromdd");
- if (lastmdlclamdd > fromdd && lastmdlclamdd > opendd && lastmdlclamdd != "" ) {
- model.setValue("/root/hidden/sppij01900/cond/saveyn","Y");
- }
-
- if (dschjudgprcsstat == "C" || dschjudgprcsstat == "E" || indschacptstat == "D" || readonly == "Y" ) {
- model.setValue("/root/hidden/sppij01900/cond/saveyn","Y");
- } else {
- model.setValue("/root/hidden/sppij01900/cond/saveyn","N");
- }
-
- // 희귀난치성산정특례 - 20090621 박창원
- var rareessc = model.getValue("/root/main/item12/rareessc/rareesscyn");
- if (rareessc == "Y") {
- var chksuppkind = model.getValue("/root/main/item1/iteminfo/suppkindcd");
-
- if (chksuppkind == "50") {
- if (lastmdlclamdd > fromdd && lastmdlclamdd > opendd && lastmdlclamdd != "" ) {
- messageBox("중간청구 등록이 되어있습니다. 요율을 변경","E001");
- return;
- }else if (readonly == "Y") {
- messageBox("읽기전용 모드입니다. 희귀난치성 산정특례 요율을 적용하거나 취소","E001");
- return;
- }else if (indschacptstat == "D") {
- messageBox("이미 퇴원한 환자입니다. 희귀난치성 산정특례 요율을 적용하거나 취소","E001");
- return;
- }else if (dschjudgprcsstat == "C" || dschjudgprcsstat == "E") {
- messageBox("이미 마감된 환자입니다. 희귀난치성 산정특례 요율을 적용하거나 취소","E001");
- return;
- }
- var msg = messageBox("이미 희귀난치성 산정특례 적용이 된 환자입니다. 기존에 적용된 유형을 취소","S001");
- if(msg != 6) {
- return;
- }else{
- if (fSaveMain("P") == true) {
- var cfe = model.getValue("/root/main/item1/iteminfo/cfe");
- var suppkind = "00";
-
- if (cfe == "E" || cfe == "F") {
- suppkind = "33"; //차상위2종정상으로 셋팅
- }
-
- Insuchange(suppkind);
- }
- }
- } else if (chksuppkind != "50") {
- if (readonly == "Y") {
- messageBox("읽기전용 모드입니다. 희귀난치성 산정특례 요율을 적용하거나 취소","E001");
- return;
- }
- if (indschacptstat == "D") {
- messageBox("이미 퇴원한 환자입니다. 희귀난치성 산정특례 요율을 적용하거나 취소","E001");
- return;
- }
- if (dschjudgprcsstat == "C" || dschjudgprcsstat == "E") {
- messageBox("이미 마감된 환자입니다. 희귀난치성 산정특례 요율을 적용하거나 취소","E001");
- return;
- }
- var msg = messageBox("희귀난치성 산정특례 환자입니다. 중증요율 적용","S001");
- if(msg !=6){
- return;
- }else{
- if (fSaveMain("P") == true) {
- var cfe = model.getValue("/root/main/item1/iteminfo/cfe");
- var suppkind = "50";
-
- if (cfe == "E" || cfe == "F") {
- suppkind = "46"; // 차상위2종희귀난치성 산정특례로 셋팅
- }
-
- Insuchange(suppkind);
- }
- }
- }
- }
-
- if(vcode == "V193"){
- var chksuppkind = model.getValue("/root/main/item1/iteminfo/suppkindcd");
- var chkinsukind = model.getValue("/root/main/item1/iteminfo/insukindcd");
-
- // 중간청구 여부를 판단해서 블로킹 - 20081017 박창원
- // 차상위 2종 로직 추가 - 20090325 박창원
- if(chksuppkind == "06" || chksuppkind == "40"){
- if (lastmdlclamdd > fromdd && lastmdlclamdd > opendd && lastmdlclamdd != "" ) {
- messageBox("중간청구 등록이 되어있습니다. 요율을 변경","E001");
- return;
- }else if (readonly == "Y") {
- messageBox("읽기전용 모드입니다. 등록암 요율을 적용하거나 취소","E001");
- return;
- }else if (indschacptstat == "D") {
- messageBox("이미 퇴원한 환자입니다. 등록암 요율을 적용하거나 취소","E001");
- return;
- }else if (dschjudgprcsstat == "C" || dschjudgprcsstat == "E") {
- messageBox("이미 마감된 환자입니다. 등록암 요율을 적용하거나 취소","E001");
- return;
- }
- var msg = messageBox("이미 등록암 적용이 된 환자입니다. 기존에 적용된 유형을 취소","S001");
- if(msg != 6) {
- return;
- }else{
- if (fSaveMain("P") == true) {
- var cfe = model.getValue("/root/main/item1/iteminfo/cfe");
- var suppkind = "00";
-
- if (cfe == "E" || cfe == "F") {
- suppkind = "33"; //차상위2종정상으로 셋팅
- }
-
- Insuchange(suppkind);
- }
- }
- }
- else if(chksuppkind != "06" && chksuppkind != "40" && chksuppkind != "31" && !(chkinsukind == "22" && chksuppkind == "08") ) { // 20090325 차상위적용 - 박창원 20100318 정승우 신생아유형은 제외추가
- if (readonly == "Y") {
- messageBox("읽기전용 모드입니다. 등록암 요율을 적용하거나 취소","E001");
- return;
- }
- if (indschacptstat == "D") {
- messageBox("이미 퇴원한 환자입니다. 등록암 요율을 적용하거나 취소","E001");
- return;
- }
- if (dschjudgprcsstat == "C" || dschjudgprcsstat == "E") {
- messageBox("이미 마감된 환자입니다. 등록암 요율을 적용하거나 취소","E001");
- return;
- }
- var msg = messageBox("등록암환자입니다. 중증요율 적용","S001");
- if(msg !=6){
- return;
- }else{
- if (fSaveMain("P") == true) {
- var cfe = model.getValue("/root/main/item1/iteminfo/cfe");
- var suppkind = "06";
-
- if (cfe == "E" || cfe == "F") {
- suppkind = "40"; // 차상위2종등록암으로 셋팅
- }
-
- Insuchange(suppkind);
- }
- }
- }
-
- }else if(vcode == "V191" || vcode == "V192"){
- // 6시간 미만 환자는 화면을 보여주지 않는다. - 20081105 박창원
- if (sixtimyn == "Y") {
- messageBox("6시간 미만 상태 입니다. 중증수술 요율을 설정(저장) ","E001");
- model.setValue("/root/hidden/sppij01900/cond/saveyn","Y");
- }
-
- if (trgtManWindow == null) {
- open("SPPIJ01900" ,"", "10", "10", "SPPIJ01900","/root/hidden/sppij01900/cond", "/root/send/cond");
- } else {
- activateChild("SPPIJ01900");
- model.refresh();
- }
- }
- }
- }
- //퇴원마감취소
- function fdschclosecancel() {
- var chk = model.getValue("/root/main/item1/iteminfo/patnm");
- var tmpnotiyn;
-
- var notichngflag = "N";
- // 퇴원 마감 취소시 퇴원수납이 되었는지 실시한 확인 후 진행한다.
- // 마감에서부터 취소사이에 수납에서 퇴원수납이 되었는데 마감취소가 되는 상황이 발생되지 않기 위함
- // 퇴원수납이 된경우에는 대상자 조회 호면을 refresh 하고
- // 메인화면의 심사상태를 'A' 미심상태로 하고 메인화면을 다시 로드- 20080927 박창원
- model.makeValue("/root/send/checkyn","Y");
- if (!submit("TRPIJ00315", false)) {
- messageBox("실시간 환자상태 체크에 실패 했습니다. 시스템 오류입니다.관리자 문의 후", "C003");
- return;
- }
- var indschacptstat = model.getValue("/root/main/item11/endcnclstat/indschacptstat");
-
- if (indschacptstat == 'D') {
- messageBox("이미 퇴원처리가 된 환자입니다. 마감취소 ", "E001");
- // 무조건 대상자 조회 화면을 refresh
- var trgtManWindow = getChildWindow("SMPIJ00200");
- trgtManWindow.javascript.fGetInBfJudgTrgtManList();
- trgtManWindow.javascript.fCountPat();
- trgtManWindow.model.refresh();
-
- fGetItemInfo();
- return;
- }
-
- if(chk){
- var receiptyn = model.getValue("/root/main/item1/iteminfo/receiptyn");
- var dschnotiyn = model.getValue("/root/main/item1/iteminfo/dschnotiyn");
-
- var dschdclrtyn = model.getValue("/root/main/item11/endcnclstat/dschdclrtyn");
- var dschjudgprcsstat = model.getValue("/root/main/item11/endcnclstat/dschjudgprcsstat");
-
- if (receiptyn != "" && dschnotiyn == "Y") {
- messageBox("퇴원(가퇴원) 수납이 되었으므로 마감취소를","E001");
- } else if (receiptyn == "" && (dschnotiyn == "Y" || ( dschjudgprcsstat == 'G' && dschdclrtyn == 'Y' ))) {
-
- //DRG 상세 마감 취소 팝업
- if (fGetDrgOpenPopup("O") == false) {
- return false;
- }
-
- if ( dschnotiyn == "Y" ) {
- // var msg = messageBox("간호의 퇴원확정여부도 함께 취소","S001");
- // if(msg == 6){
- // if (indschacptstat == "T") { // 가퇴원 블로킹 추가 - 20081005 박창원
- // var msg1 = messageBox("가퇴원 상태에서는 간호확정 취소가 불가합니다. 계속진행","S001");
- // if (msg1 != 6) {
- // return;
- // }
- // } else {
- // model.setValue("/root/main/item1/iteminfo/dschnotiyn","Z");
- // }
- // }else if(msg == 2){
- // return;
- // }
- }
-
- if (fJudgEndCancel()) {
- if(fSaveCalcAmt("D")) {
- } else {
- messageBox("마감취소 처리가 되지","E007");
- return 0;
- }
- } else {
- messageBox("마감취소 처리가 되지","E007");
- return 0;
- }
-
- if(model.getValue("/root/main/item1/iteminfo/dschnotiyn") == "Z"){
- model.setValue("/root/main/item1/iteminfo/dschnotiyn","N");
- notichngflag = "Y";
- }
-
- fJudgEndClear();
- }
- }
- }
- //종료
- function fClear() {
- // 심사상태를 미심상태로 바꾸고 대상자 조회를 리프레쉬 - 20081004 박창원
- // 심사상태를 실시간 체크하여 심사상태가 심사중일때만 업데이트 되게 함 - 20081008 박창원
- if (!submit("TRPIJ00315", false)) {
- messageBox("실시간 환자상태 체크에 실패 했습니다.기본데이터 이상이나 시스템 오류입니다.관리자 문의 후", "C003");
- return;
- }
- // 혹시모르는 종료버튼 클릭시 간호퇴원확정 취소를 막기위해 적용 - 20081008 박창원
- var realnotiyn = model.getValue("/root/main/item11/endcnclstat/dschnotiyn");
- var notiyn = model.getValue("/root/main/item1/iteminfo/dschnotiyn");
- var readonly = model.getValue("/root/send/readonly");
-
- if (notiyn == "Z") {
- model.setValue("/root/main/item1/iteminfo/dschnotiyn", realnotiyn);
- }
-
- var dschjudgprcsstat = model.getValue("/root/main/item11/endcnclstat/dschjudgprcsstat");
- if (dschjudgprcsstat == "B" && readonly != "Y") {
- model.setValue("/root/main/item1/iteminfo/dschjudgprcsstat","Z");
- submit("TXPIJ00301");
- }
-
- // 2. 화면 클리어 (공통)
- fJudgEndClear();
- }
- //중간청구마감
- function fMidcomplete() {
- // 20091126 JHP 수정추가
- var chk = model.getValue("/root/main/item1/iteminfo/patnm");
- var indd = model.getValue("/root/main/item1/iteminfo/indd");
- var ans = 0;
- if(chk){
- if(ipt_pid.currentText.length >1){
- if(indd.length>1){
-
- if (!submit("TRPIJ00319", false )) {
- messageBox("실시간 환자상태 체크에 실패 했습니다. 시스템 오류입니다.관리자 문의 후", "C003");
- return;
- }
-
- var noactyn = model.getValue("/root/main/item16/noactyn/noactyn");
- if (noactyn == 'Y') {
- modal("SPPIJ00900" ,"", "10", "10", "SPPIJ00900", "/root/main/item1/iteminfo/pid", "/root/send/send_pid/pid", "", "");
- }
- var trgtManWindow = getChildWindow("SMPID10100");
-
- var patunitsrch1 = model.getValue("/root/main/item1/iteminfo/pid").getTrim(); // (stringHelper.js) 문자열 앞뒤에 있는 공백 제거
- // 2008.01.23 박지욱 수정 (중간청구등록화면에 넘겨주는 데이터 추가 - pid, indd)
- model.removenode("/root/hidden/midclam");
- model.makeValue("/root/hidden/midclam/pid", patunitsrch1);
- model.makeValue("/root/hidden/midclam/indd", model.getValue("/root/main/item1/iteminfo/indd"));
-
- if (trgtManWindow == null) {
- ans = messageBox("심사 마감 할 경우", "S001");
- if (ans == 6) {
-
- model.makeValue("/root/send/checkyn","Y");
- if (!submit("TRPIJ00315", false )) {
- messageBox("실시간 환자상태 체크에 실패 했습니다. 시스템 오류입니다.관리자 문의 후", "C003");
- return;
- }
-
- if (fGetDrgOpenPopup("O") == false) {
- return false;
- }
-
- model.setValue("/root/main/item1/iteminfo/dschjudgprcsstat","C");
- if (submit("TXPIJ00301")) {
- open("SMPID10100" ,"", "10", "10", "SMPID10100", "/root/hidden/midclam", "/root/hidden/midclam");
- }
- } else {
- }
-
-
- } else {
- ans = messageBox("심사 마감 할 경우", "S001");
- if (ans == 6) {
-
- model.makeValue("/root/send/checkyn","Y");
- if (!submit("TRPIJ00315", false)) {
- messageBox("실시간 환자상태 체크에 실패 했습니다. 시스템 오류입니다.관리자 문의 후", "C003");
- return;
- }
-
- if (fGetDrgOpenPopup("O") == false) {
- return false;
- }
-
- model.setValue("/root/main/item1/iteminfo/dschjudgprcsstat","C");
- if (submit("TXPIJ00301")) {
- activateChild("SMPID10100");
- trgtManWindow.javascript.fGetMidClamList();
- }
- } else {
- activateChild("SMPID10100");
- trgtManWindow.javascript.fGetMidClamList();
- }
- }
- model.refresh();
- }
- }
- }
- }
- //중간청구마감
- function fAccept() {
- // 심사마감이나 퇴원한 환자는 요율변경을 할 수 없다. - 20080924 박창원
- // 기존에는 심사마감이나 퇴원여부를 인스턴스에서 가져오던 것을 실시간 체크로 변경 - 20080927 박창원
- if (!submit("TRPIJ00315", false)) {
- messageBox("실시간 환자상태 체크에 실패 했습니다. 시스템 오류입니다.관리자 문의 후", "C003");
- return;
- }
- // 오픈일 적용 - 20090302 박창원 - 하드코딩 제거 - 확산병원은 자료가 구축되어 있지 않기 때문에 오픈전까지 예외처리
- var opendd = model.getValue("/root/main/item1/iteminfo/opendd");
- var indschacptstat = model.getValue("/root/main/item1/iteminfo/indschacptstat");
- var dschjudgprcsstat = model.getValue("/root/main/item1/iteminfo/dschjudgprcsstat");
- // 중간청구, 읽기전옹 여부를 판단해서 블로킹 - 20081017 박창원
- var lastmdlclamdd = model.getValue("/root/main/item1/iteminfo/lastmdlclamdd");
- var fromdd = model.getValue("/root/main/item1/iteminfo/fromdd");
- var readonly = model.getValue("/root/send/readonly");
- if (lastmdlclamdd > fromdd && lastmdlclamdd > "20081003" && lastmdlclamdd != "" ) {
- messageBox("중간청구 등록이 되어있습니다. 요율을 변경","E001");
- grp_changeownbrate.visible = false;
- return;
- } else if (readonly == "Y") {
- messageBox("읽기전용 모드에서는 요율을 변경","E001");
- grp_changeownbrate.visible = false;
- return;
- } else if (indschacptstat == "D") {
- messageBox("이미 퇴원한 환자입니다. 요율을 변경","E001");
- grp_changeownbrate.visible = false;
- return;
- } else if (dschjudgprcsstat == "C" || dschjudgprcsstat == "E") {
- messageBox("이미 마감된 환자입니다. 요율을 변경","E001");
- grp_changeownbrate.visible = false;
- return;
- }
- fChangeRate1();
- }
- //병용금기확인
- function fUseincombinationtaboo() {
- // 20091126 수정추가 JHP 병용금기내역 확인
- var prcsyn = messageBox("병용금기확인시 계산내역에 따라 일부 시간이 지연될수 있습니다.\n\n","Q003");
- if(prcsyn == "6"){
- var pid = model.getValue("/root/main/item1/iteminfo/pid");
- if(pid == "" || pid == null || pid == " "){
- }else{
- submit("TRPIJ00318");
- var nodecnt = getNodesetCount("/root/hidden/useincombinationtaboo/list");
-
- if(nodecnt > 1){
- var seeyn = messageBox("병용금기내역이 존재합니다. 확인","Q005");
- if(seeyn == "6"){
- grp_taboo.attribute("left") = "420px";
- grp_taboo.attribute("top") = "525px";
- grp_taboo.attribute("width") = "508px";
- grp_taboo.attribute("height") = "199px";
- grp_taboo.visible = true;
- }else{
- }
- }else{
- messageBox("병용금기내역이 존재하지 ","I011");
- }
- }
- }
- }
- //심사변경유무 체크 확인
- function fCheckChngStatus() {
- var rslt = true;
- var judgrmk = model.getValue("/root/main/item1/iteminfo/judgrmk");
- var edirmk = model.getValue("/root/main/item1/iteminfo/edirmk");
- var tstrmk = model.getValue("/root/main/item1/iteminfo/tstrmk");
- var judgrmk_orign = model.getValue("/root/main/item1/iteminfo/judgrmk_orign");
- var edirmk_orign = model.getValue("/root/main/item1/iteminfo/edirmk_orign");
- var tstrmk_orign = model.getValue("/root/main/item1/iteminfo/tstrmk_orign");
-
- /* for (var i = 1; i < grd_diaglist.rows; i++) {
- if (grd_diaglist.rowstatus(i) != 0 && grd_diaglist.valueMatrix(i, grd_diaglist.colRef("diagcd")) != "" && grd_diaglist.valueMatrix(i, grd_diaglist.colRef("diagcd")) != "") {
- rslt = false;
- }
- }*/
-
- for (var i = 1; i < grd_clcjlist.rows; i++) {
- if (grd_clcjlist.rowstatus(i) != 0 && grd_clcjlist.valueMatrix(i, grd_clcjlist.colRef("edicd")) != "" && grd_clcjlist.valueMatrix(i, grd_clcjlist.colRef("spclcd")) != "") {
- rslt = false;
- }
- }
-
- if (judgrmk != judgrmk_orign) {
- rslt = false;
- }
-
- if (edirmk != edirmk_orign) {
- rslt = false;
- }
-
- if (tstrmk != tstrmk_orign) {
- rslt = false;
- }
- return rslt;
- }
- function fOpenSPPIJ03800(){
- var cond = "/root/hidden/SPPIJ03800_cond";
- var ref = "/root/main/item1/iteminfo";
- var send = "/root/send";
-
- model.makevalue(cond+"/pid", model.getValue(ref+"/pid"));
- model.makevalue(cond+"/cretno", model.getValue(ref+"/cretno"));
- model.makevalue(cond+"/orddd", model.getValue(ref+"/fromdd"));
- model.makevalue(cond+"/ordtodd", model.getValue(ref+"/todd"));
-
- fLinkPopMenu("SPPIJ03800", cond, send, "modal");
- }
- function responseHandlerTRPIJ00322() {
- if (getNodesetCount("/root/chklist/goso") > 0) {
- messageBox("외출외박 24시간 초과된 완화의료 대상 환자입니다. 해당 일자의 입원료를", "I007")
- }
- }
|