SMPMO00200_전화예약.xrw 284 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
  3. <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2002/01/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
  4. <xhtml:head>
  5. <xhtml:title>전화예약</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <patinfo>
  11. <patinfolist>
  12. <pid/>
  13. <hngnm/>
  14. <engnm/>
  15. <chinm/>
  16. <rrgstno1/>
  17. <rrgstno2/>
  18. <brthdd/>
  19. <sex/>
  20. <age/>
  21. <bindpid/>
  22. <hometel/>
  23. <mpphontel/>
  24. <etctel1/>
  25. <etctel2/>
  26. <smsaprvyn/>
  27. <email/>
  28. <zipcd1/>
  29. <zipcd2/>
  30. <zipcdseq/>
  31. <addr/>
  32. <detladdr/>
  33. <btype/>
  34. <rh/>
  35. <forgeryn/>
  36. <nati/>
  37. <psptno/>
  38. <recmyn/>
  39. <recmerid/>
  40. <recmerrela/>
  41. <vipyn/>
  42. <viprem/>
  43. <religncd/>
  44. <baptnm/>
  45. <chchnm/>
  46. <dethyn/>
  47. <dethdt/>
  48. <chosresn/>
  49. <animyn/>
  50. <exptresncd/>
  51. <inhospyn/>
  52. <remfact/>
  53. <outuncoamt/>
  54. <dschuncoamt/>
  55. <fstrgstrid/>
  56. <fstrgstdt/>
  57. <lastupdtrid/>
  58. <lastupdtdt/>
  59. <flag/>
  60. <pidflag/>
  61. <builno/>
  62. </patinfolist>
  63. </patinfo>
  64. <popupendflag/>
  65. <reservation>
  66. <orddeptcd/>
  67. <orddeptnm/>
  68. <orddrid/>
  69. <specordyn/>
  70. <ordfild/>
  71. <fstexamrem/>
  72. <reexamrem/>
  73. <orddd/>
  74. <ordtm/>
  75. <specorddescyn>N</specorddescyn>
  76. <insuchrgyn>N</insuchrgyn>
  77. <ordreqdescyn>N</ordreqdescyn>
  78. <ordreqhospgrde>1</ordreqhospgrde>
  79. <acptdd/>
  80. <acptno/>
  81. <rsrvflag/>
  82. <fstacptid/>
  83. <fstacptdt/>
  84. <cretno/>
  85. <acptseqno/>
  86. <oldorddd/>
  87. <telrsrvrem/>
  88. <telrsrvremcd/>
  89. <updtcnclresn/>
  90. <rqstflag/>
  91. <rqsthospcd/>
  92. <rqstdrid/>
  93. <onestop/>
  94. <fsexamflag/>
  95. <calcyn/>
  96. <calcflag/>
  97. <medamtestmyn/>
  98. <histstat/>
  99. <dracptyn/>
  100. <prcpgenryn/>
  101. <tablename/>
  102. <remark/>
  103. <centcd/>
  104. <subdeptcd/>
  105. <etcordflag/>
  106. <centcd/>
  107. <coopteamcd/>
  108. <remfact/>
  109. <centcdyn/>
  110. <formrecseq/>
  111. <ordreqformflag/>
  112. <insukind/>
  113. <insucd/>
  114. <insuno/>
  115. <insdnm/>
  116. <searchInsuInfoyn/>
  117. <ptin_fromdd/>
  118. </reservation>
  119. <exculist>
  120. <subordlist2>
  121. <rsrvflagyn/>
  122. <rcptyn/>
  123. <prcpdd/>
  124. <orddepthngnm/>
  125. <orddrnm/>
  126. <execprcpstatcd/>
  127. <calcscorcd/>
  128. <prcpnm/>
  129. <excuroom/>
  130. <prcphopedd/>
  131. <srchrsrvtm/>
  132. <exectm/>
  133. <excutm/>
  134. <endtime/>
  135. <rsrvrem/>
  136. </subordlist2>
  137. </exculist>
  138. <result>
  139. <outhist>
  140. <outhistlist/>
  141. </outhist>
  142. <temp/>
  143. <chart>
  144. <chartlist/>
  145. </chart>
  146. <test>
  147. <testlist/>
  148. </test>
  149. </result>
  150. <outhist>
  151. <outhistlist/>
  152. </outhist>
  153. <outrgst>
  154. <outrgstlist/>
  155. </outrgst>
  156. <outtelrsrv>
  157. <outtelrsrvlist/>
  158. </outtelrsrv>
  159. <rsrvflag>T</rsrvflag>
  160. <h_dcuc>
  161. <dcuc>
  162. <disccd/>
  163. <discunconm/>
  164. </dcuc>
  165. </h_dcuc>
  166. <caloption>1</caloption>
  167. <oneminute/>
  168. <srchtelrsrv>
  169. <hngnm/>
  170. <rrgstno1/>
  171. <rrgstno2/>
  172. <fromdd/>
  173. <todd/>
  174. </srchtelrsrv>
  175. <standbyreservtion>
  176. <pid/>
  177. <hngnm/>
  178. <orddrid/>
  179. <orddeptcd/>
  180. <orddd/>
  181. <centcd/>
  182. <ordtm/>
  183. <rrgstno1/>
  184. <rrgstno2/>
  185. </standbyreservtion>
  186. <test>
  187. <testlist/>
  188. </test>
  189. <inhist>
  190. <inhistlist/>
  191. </inhist>
  192. <inhistdetl>
  193. <inhistdetlist/>
  194. </inhistdetl>
  195. <ioflag>O</ioflag>
  196. <hiepat/>
  197. </main>
  198. <send>
  199. <pid/>
  200. <checkfnexam/>
  201. <acptdd/>
  202. <acptno/>
  203. <orddrid/>
  204. <orddeptcd/>
  205. <subdeptcd/>
  206. <orddd/>
  207. <hngnm/>
  208. <rrgstno1/>
  209. <rrgstno2/>
  210. <date/>
  211. <updatedata>
  212. </updatedata>
  213. <centcd/>
  214. <data1>
  215. </data1>
  216. <data2/>
  217. <data3>
  218. <stat/>
  219. <pid/>
  220. <hngnm/>
  221. <rrgstno1/>
  222. <rrgstno2/>
  223. <choiflag/>
  224. <ordtype/>
  225. <orddd/>
  226. <orddeptcd/>
  227. <orddrid/>
  228. <specordyn/>
  229. <fromdd/>
  230. <rsrvdd/>
  231. <elctappdd/>
  232. <elctappsignkey/>
  233. <elctappsigncnts/>
  234. <elctapprelakey/>
  235. <elctapprelacnts/>
  236. <befpid/>
  237. <befhngnm/>
  238. <befrrgstno1/>
  239. <befrrgstno2/>
  240. <befchoiflag/>
  241. <befordtype/>
  242. <beforddd/>
  243. <beforddeptcd/>
  244. <beforddrid/>
  245. <befspecordyn/>
  246. </data3>
  247. <data4/>
  248. <data5/>
  249. <data6/>
  250. <smsinfo>
  251. <recvrnm/>
  252. <recvrtelno/>
  253. <msgparam/>
  254. <pid/>
  255. <orddeptcd/>
  256. </smsinfo>
  257. </send>
  258. <init>
  259. <orddeptcd>
  260. <orddeptcdlist>
  261. <cd/>
  262. <nm/>
  263. <deptengabbr/>
  264. </orddeptcdlist>
  265. </orddeptcd>
  266. <orddrid>
  267. <orddridlist>
  268. <cd/>
  269. <nm/>
  270. <dp/>
  271. <sp/>
  272. <nmsp/>
  273. </orddridlist>
  274. </orddrid>
  275. <P0021list>
  276. <P0021>
  277. <cdnm/>
  278. <cdid/>
  279. </P0021>
  280. </P0021list>
  281. <P0008list>
  282. <P0008>
  283. <cdnm/>
  284. <cdid/>
  285. </P0008>
  286. </P0008list>
  287. <P0341list>
  288. <P0341>
  289. <cdnm/>
  290. <cdid/>
  291. </P0341>
  292. </P0341list>
  293. <P0313list>
  294. <P0313>
  295. <cdnm/>
  296. <cdid/>
  297. </P0313>
  298. </P0313list>
  299. <P0020list>
  300. </P0020list>
  301. <P0329list>
  302. <P0329>
  303. <cdnm/>
  304. <cdid/>
  305. </P0329>
  306. </P0329list>
  307. <A0420list>
  308. <A0420>
  309. <cdnm/>
  310. <cdid/>
  311. </A0420>
  312. </A0420list>
  313. <P0414list>
  314. <P0414>
  315. <cdnm/>
  316. <cdid/>
  317. </P0414>
  318. </P0414list>
  319. <P0029list>
  320. <P0029>
  321. <cdnm/>
  322. <cdid/>
  323. </P0029>
  324. </P0029list>
  325. <subdeptcd>
  326. <subdeptcdlist>
  327. <dp/>
  328. </subdeptcdlist>
  329. </subdeptcd>
  330. <P0022list>
  331. <P0022>
  332. <cdnm/>
  333. <cdid/>
  334. </P0022>
  335. </P0022list>
  336. <P0380list>
  337. <P0380>
  338. <cdnm/>
  339. <cdid/>
  340. </P0380>
  341. </P0380list>
  342. <M0525list>
  343. <M0525>
  344. <cdnm/>
  345. <cdid/>
  346. </M0525>
  347. </M0525list>
  348. <centcd>
  349. <centcdlist/>
  350. </centcd>
  351. <fsexamdd>
  352. <fsexamddlist>
  353. <cdid/>
  354. <cdnm/>
  355. </fsexamddlist>
  356. </fsexamdd>
  357. <P0487list>
  358. <P0487>
  359. <cdnm/>
  360. <cdid/>
  361. </P0487>
  362. </P0487list>
  363. <M0011list>
  364. <M0011>
  365. <cdnm/>
  366. <cdid/>
  367. </M0011>
  368. </M0011list>
  369. </init>
  370. <hidden>
  371. <source>
  372. <srchcond/>
  373. <autoflag/>
  374. <pid/>
  375. <hngnm/>
  376. <rrgstno1/>
  377. <rrgstno2/>
  378. <acptdd/>
  379. <fromdd/>
  380. <todd/>
  381. <checkfnexam/>
  382. </source>
  383. <calendarinfo>
  384. <calendarinfolist/>
  385. </calendarinfo>
  386. <holdrrgstno>
  387. <rrgstno1/>
  388. <rrgstno2/>
  389. <hngnm/>
  390. </holdrrgstno>
  391. <session/>
  392. <init>
  393. <cntrorddeptdoctorlist>
  394. <user/>
  395. </cntrorddeptdoctorlist>
  396. </init>
  397. <rghtmenu>
  398. <menu>
  399. <label>예약대기</label>
  400. <func>fStandBy</func>
  401. </menu>
  402. </rghtmenu>
  403. <rghtmenu1>
  404. <menu>
  405. <label>예약대기</label>
  406. <func>fStandBy</func>
  407. </menu>
  408. </rghtmenu1>
  409. <con>
  410. <examcnt/>
  411. </con>
  412. <com>
  413. <searchInsuInfoYN/>
  414. </com>
  415. <rcv/>
  416. <flag>
  417. <check_insuinfo_flag/>
  418. </flag>
  419. </hidden>
  420. <tmp>
  421. <patinfolist/>
  422. <reservation/>
  423. <cellColor/>
  424. <userinfo>
  425. <userinfolist>
  426. <deptcd/>
  427. <depthngnm/>
  428. <userid/>
  429. <usernm/>
  430. </userinfolist>
  431. </userinfo>
  432. <centcdyn>
  433. <yn/>
  434. </centcdyn>
  435. <refer_sibum/>
  436. </tmp>
  437. <sd>
  438. <deptcd/>
  439. <deptnm/>
  440. </sd>
  441. <callcenter>
  442. <jumin/>
  443. <status/>
  444. <rrgstno1/>
  445. <rrgstno2/>
  446. <pid/>
  447. <check/>
  448. </callcenter>
  449. <userinfo>
  450. <userinfolist>
  451. <cdnm/>
  452. </userinfolist>
  453. </userinfo>
  454. <resercnt>
  455. <telamcnt/>
  456. <telpmcnt/>
  457. <orddeptamcnt/>
  458. <orddeptpmcnt/>
  459. </resercnt>
  460. <pidcreateuseyn>
  461. <pidcreateuseynlist>
  462. <cdnm/>
  463. </pidcreateuseynlist>
  464. </pidcreateuseyn>
  465. <tempchk>
  466. <specapp>
  467. <rgstyn/>
  468. </specapp>
  469. </tempchk>
  470. <fseamordreqdescuseyn>
  471. <fseamordreqdescuseynlist>
  472. <cdnm/>
  473. </fseamordreqdescuseynlist>
  474. </fseamordreqdescuseyn>
  475. <foreignorder>
  476. <flag/>
  477. </foreignorder>
  478. <paminit>
  479. <P0068list>
  480. <P0068>
  481. <cd/>
  482. <nm/>
  483. </P0068>
  484. </P0068list>
  485. <P0030list>
  486. <P0030>
  487. <cd/>
  488. <nm/>
  489. </P0030>
  490. </P0030list>
  491. <P6568list/>
  492. <P0022list/>
  493. </paminit>
  494. <temp/>
  495. </root>
  496. </instance>
  497. <submission id="TRZBC00101" mediatype="application/x-www-form-urlencoded" method="post" replace="instance"/>
  498. <submission id="TRPAM00101" mediatype="application/x-www-form-urlencoded" method="post" replace="instance" resultref="/root/hidden/tmp"/>
  499. <submission id="TRPMC02500" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/hidden/source" resultref="/root/main/result/patinfo"/>
  500. <submission id="TRPMO00116" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/erpat" resultref="/root/hidden/rcv/temp"/>
  501. <submission id="TRPMO00206" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/hidden/source" resultref="/root/main/result/patinfo"/>
  502. <submission id="TRPMO00201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/result"/>
  503. <submission id="TXPMO00202" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/updatedata" resultref="/root/main/result"/>
  504. <submission id="TRPMO00203" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/result"/>
  505. <submission id="TRPMO00204" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/outrgst"/>
  506. <submission id="TRPMO00205" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/h_dcuc"/>
  507. <submission id="TRPMO00207" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/getfsexamflag" resultref="/root/main/result/fsexam"/>
  508. <submission id="TRPAC00301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/temp/emrcnst/send" resultref="/root/temp"/>
  509. <submission id="TRPMO00112" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/hidden/temp/send" resultref="/root/hidden/temp/result"/>
  510. <submission id="TXPMO00105" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/chart" resultref="/root/result/rcv"/>
  511. <submission id="TRPMO01201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/temp/ordreqform/send" resultref="/root/temp/ordreqform"/>
  512. <submission id="TXPMO00208" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/patinfo/patinfolist" resultref="/root/main/result/temp"/>
  513. <submission id="TRPMO10013" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/rsrvpossyn" resultref="/root/send/rsrvpossyn/result"/>
  514. <submission id="TRZBC00102" mediatype="application/x-www-form-urlencoded" method="post" replace="instance"/>
  515. <submission id="TRPMC02511" mediatype="application/x-www-form-urlencoded" method="post" resultref="/root/tmp/userinfo"/>
  516. <submission id="TRZSD00207" mediatype="application/x-www-form-urlencoded" method="urlencoded-post" replace="instance"/>
  517. <submission id="TRZSD00208" mediatype="application/x-www-form-urlencoded" method="urlencoded-post" replace="instance"/>
  518. <submission id="TRZSU10117" mediatype="application/x-www-form-urlencoded" method="post" replace="instance"/>
  519. <submission id="TRZSU10118" mediatype="application/x-www-form-urlencoded" method="post" replace="instance"/>
  520. <submission id="TRPMO00123" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/hidden/centeryn"/>
  521. <submission id="TRPMO00209" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/init/fsexamdd"/>
  522. <submission id="TRPMO00210" mediatype="application/x-www-form-urlencoded" method="post" resultref="/root/userinfo"/>
  523. <submission id="TXPMO00104" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/hidden/rcv"/>
  524. <submission id="TRPMO00202" mediatype="application/x-www-form-urlencoded" method="post" resultref="/root/pidcreateuseyn"/>
  525. <submission id="TXPMC06507" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data3" resultref="root/rcv"/>
  526. <submission id="TRPMO00125" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data4" replace="instance" resultref="/root/tempchk"/>
  527. <submission id="TRPMO00211" mediatype="application/x-www-form-urlencoded" method="post" resultref="/root/fseamordreqdescuseyn"/>
  528. <submission id="TRPMO00212" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/inhist"/>
  529. <submission id="TRPMO00213" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/inhistdetl"/>
  530. <submission id="TRPAM00105" mediatype="application/x-www-form-urlencoded" method="post"/>
  531. <submission id="TRPAO00004" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/checkdrscheSend" resultref="/root/temp/checkdrscheResult"/>
  532. <submission id="TRPMC06904" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/patprivacy" replace="instance" resultref="/root/temp/patprivacy"/>
  533. <submission id="TXARC00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/savedata" resultref="/root/hie"/>
  534. <submission id="TXPMO01801" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/smsinfo"/>
  535. </model>
  536. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  537. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  538. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  539. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  540. <script type="javascript" src="../../../com/commonweb/js/numericHelper.js"/>
  541. <script type="javascript" src="../../../com/commonweb/js/utilHelper.js"/>
  542. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  543. <script type="javascript" src="../../../com/zipcodeweb/js/ZBP001.js"/>
  544. <script type="javascript" src="../../../com/departmentcodeweb/js/ZSD001.js"/>
  545. <script type="javascript" src="../../../com/userdeptinfoweb/js/ZSU001.js"/>
  546. <script type="javascript" src="../../../pam/pamcomnweb/js/PAM.js"/>
  547. <script type="javascript" src="../../../pam/pamcomnweb/js/PAM001.js"/>
  548. <script type="javascript" src="../../../pam/opatmngtweb/js/PMO001.js"/>
  549. <script type="javascript" src="../../../pam/opatmngtweb/js/PMOCOM.js"/>
  550. <script type="javascript" src="../../../ast/healcarecoopweb/js/SPARC00100.js"/>
  551. <script type="javascript" ev:event="xforms-ready">
  552. <![CDATA[
  553. fGetUserInfosSampling(); //세션/root/hidden/session
  554. zbcfGetCodeList( new Array("M0011", "M0010"), new Array("/root/init/baseinfo/initexecprcpstatcd", "/root/init/baseinfo/initprcpgenrflagcd") );
  555. zbcfGetCodeList(new Array("P0021", "P0008", "P0341", "P0313", "P0020", "P0329", "A0420", "P0414", "P0029", "P0022", "P0380", "M0525", "P0487", "M0011"),
  556. new Array("/root/init/P0021list",
  557. "/root/init/P0008list",
  558. "/root/init/P0341list",
  559. "/root/init/P0313list",
  560. "/root/init/P0020list",
  561. "/root/init/P0329list",
  562. "/root/init/A0420list",
  563. "/root/init/P0414list",
  564. "/root/init/P0029list",
  565. "/root/init/P0022list",
  566. "/root/init/P0380list",
  567. "/root/init/M0525list",
  568. "/root/init/P0487list",
  569. "/root/init/M0011list"
  570. ), false);
  571. pamfGetCodeList(new Array("P0068","P0030", "P6568", "P0022"), new Array("/root/paminit/P0068list","/root/paminit/P0030list", "/root/paminit/P6568list", "/root/paminit/P0022list"));
  572. //신종플루예방접종센터 원무공통 P0068 - 30
  573. if (model.getValue("/root/paminit/P0068list/P0068[cdid = '30']/cdnm") != "" && model.getValue("/root/paminit/P0068list/P0068[cdid = '30']/cdnm") != null) {
  574. FluPrevenCent = model.getValue("/root/paminit/P0068list/P0068[cdid = '30']/cdnm");
  575. }
  576. //신종플루예방접종센터 원무공통 P0068 - 30
  577. if (model.getValue("/root/paminit/P0068list/P0068[cdid = '40']/cdnm") != "" && model.getValue("/root/paminit/P0068list/P0068[cdid = '40']/cdnm") != null) {
  578. FluCent = model.getValue("/root/paminit/P0068list/P0068[cdid = '40']/cdnm");
  579. }
  580. //다른날짜 동일과 동일의사,다른의사 예약가능여부(여의도) 원무공통 P0030 - 30 (2010/02/23 )
  581. if (model.getValue("/root/paminit/P0030list/P0030[cdid = '30']/cdnm") != "" && model.getValue("/root/paminit/P0030list/P0030[cdid = '30']/cdnm") != null) {
  582. SameDept = model.getValue("/root/paminit/P0030list/P0030[cdid = '30']/cdnm");
  583. }
  584. //전화예약 권한설정
  585. //RA = GetFreeRsrvAuthor();
  586. RA = 'N';
  587. //신환채번 사용여부
  588. //RB = GetPidCreate();
  589. RB = "N";
  590. //협력의뢰시 초기 세팅.
  591. RC = getScreenMenuParameter();
  592. cap_privacy.visible = false; // 사생활보호
  593. if(RC == '1'){
  594. //협진 그룹을 표시한다.
  595. //2014/09/25 이정택 추가
  596. var hiebtn_visibleyn = model.getValue("/root/paminit/P6568list/P6568/cdid");
  597. if(hiebtn_visibleyn=="Y"){
  598. btn_hie.visible=true; // HIE 버튼 활성화 여부
  599. btn_hie.refresh();
  600. btn_savePatInfo.visible=true; // 채번버튼 활성화 여부
  601. btn_savePatInfo.refresh();
  602. chk_refersibum.visible=true; // 의뢰회송 시범사업 체크박스 활성화 여부
  603. chk_refersibum.refresh();
  604. }else{
  605. btn_hie.visible=false;
  606. btn_hie.refresh();
  607. btn_savePatInfo.visible=false;
  608. btn_savePatInfo.refresh();
  609. chk_refersibum.visible=false;
  610. chk_refersibum.refresh();
  611. }
  612. //2014/09/25 이정택 추가
  613. cmb_rqstflag.visible = true;
  614. caption33.visible = true;
  615. cmb_onestop.visible = true;
  616. caption5.visible = true;
  617. ipt_rqsthospcd.visible = true;
  618. caption29.visible = true;
  619. ipt_rqstdrid.visible = true;
  620. model.setValue("/root/main/rsrvflag", 'A'); //검사예약(A)
  621. model.setValue("/root/main/reservation/rqstflag", '1'); //협력의뢰(1)
  622. RSRVFLAG = '1'; //협력의뢰(1), 전화예약/검사의뢰(2), 국제진료(U)
  623. btn_softphone.visible=false;
  624. }else if(RC == 'U'){
  625. //국제협력
  626. //2014/09/25 이정택 추가
  627. btn_hie.visible=false;
  628. btn_hie.refresh();
  629. //2014/09/25 이정택 추가
  630. cmb_rqstflag.visible = true;
  631. caption33.visible = true;
  632. cmb_onestop.visible = true;
  633. caption5.visible = true;
  634. ipt_rqsthospcd.visible = true;
  635. caption29.visible = true;
  636. ipt_rqstdrid.visible = true;
  637. model.setValue("/root/main/rsrvflag", 'A'); //검사예약(A)
  638. model.setValue("/root/main/reservation/rqstflag", 'U'); //전화예약/검사의뢰(2)
  639. RSRVFLAG = 'U'; //협력의뢰(1), 전화예약/검사의뢰(2), 국제진료(U)
  640. btn_softphone.visible=false;
  641. }else{
  642. //협진 그룹을 숨긴다.
  643. //2014/09/25 이정택 추가
  644. btn_hie.visible=false;
  645. btn_hie.refresh();
  646. //2014/09/25 이정택 추가
  647. cmb_rqstflag.visible = false;
  648. caption33.visible = false;
  649. cmb_onestop.visible = false;
  650. caption5.visible = false;
  651. ipt_rqsthospcd.visible = false;
  652. caption29.visible = false;
  653. ipt_rqstdrid.visible = false;
  654. model.setValue("/root/main/reservation/rqstflag", '-'); //
  655. RSRVFLAG = '2'; //협력의뢰(1), 전화예약/검사의뢰(2), 국제진료(U)
  656. //body.createChild("xforms:iviewer", "id:ivr_cashpopup; src:../../../pam/pambaseinfomngtweb/xrw/SPPMB02200_소프트폰연동.xrw; left:885px; top:755px; width:15px; height:19px; ");
  657. //2016/04/07 이정택 수정(전화예약일 경우에는 소프트폰 접속이라는 버튼 보여줌)
  658. btn_softphone.visible=true;
  659. }
  660. //진료의뢰서 설명창 사용여부
  661. RD = FseamOrdreqdescUseYn();
  662. //초재진예약일자
  663. FsexamFalg();
  664. //센터 선 적용 여부 체크
  665. //CENTERYN = fCheckCenterYN();
  666. //CENTERYN = 'Y';
  667. /*
  668. if( CENTERYN == 'Y' ){
  669. cmb_centcd.disabled = false;
  670. cnstteamnm.disabled = false;
  671. combo5.visible = false;
  672. combo6.visible = false;
  673. }else{
  674. cmb_centcd.disabled = true;
  675. cnstteamnm.disabled = true;
  676. combo5.visible = false;
  677. combo6.visible = false;
  678. }
  679. */
  680. //진료과코드 진료의ID 조회
  681. pamGetDeptCDDrIDList();
  682. //초기화
  683. model.resetInstanceNode("/root/main/patinfo/patinfolist");
  684. fInitialize();
  685. //접속user 정보
  686. //submit("TRPMC02511");
  687. //외래이력 라디오버튼 초기화
  688. radio13.dispatch("xforms-value-changed");
  689. model.refresh();
  690. model.setFocus("ipt_rrgstno1");
  691. //채번버튼 사용여부
  692. if(RB == 'Y'){
  693. //btn_savePatInfo.visible = true;
  694. checkbox2.visible = true;
  695. //자격조회여부
  696. model.setValue("/root/hidden/com/searchInsuInfoYN", "Y");
  697. }
  698. //2015/10/08 예약현황이 디폴트로 가도록 수정(이정택)
  699. model.makeValue("/root/main/caloption", "2");
  700. radio3.refresh();
  701. //2015/10/08 예약현황이 디폴트로 가도록 수정(이정택)
  702. ]]>
  703. </script>
  704. <script type="javascript">
  705. <![CDATA[
  706. // HIE 환자 초기값 설정 시작
  707. var hieyn = "N";
  708. var hie_rrgstno1 = "";
  709. var hie_rrgstno2 = "";
  710. var hie_sex = "";
  711. var hie_zipcd1 = "";
  712. var hie_zipcd2 = "";
  713. var hie_addrbase = "";
  714. var hie_addrdetl = "";
  715. // HIE 환자 초기값 설정 끝
  716. var CENTERYN = 'N';
  717. var RC = '';
  718. var RSRVFLAG = '2'; //예약구분 : default 전화예약(2) - 협력의뢰(1), 전화예약/검사의뢰(2), 국제진료(U)
  719. var INSUKIND = gsInsu_IlBan; //보험유형 일반
  720. // var ETCORDFLAG = '-'; //기타구분 : default '-'
  721. var FluPrevenCent = "NULL";
  722. var FluCent = "NULL";
  723. var SameDept = "NULL";
  724. //최근 보험정보 조회
  725. function fGetInsuKind(){
  726. //최근 접수한 내역에서 보험유형을 구한다. 접수한건이 없을 경우 일반으로 세팅
  727. var cnt = getNodesetCount("/root/main/outhist/outhistlist/histstat");
  728. var insukindtmp = '';
  729. for( var i = 0; i <= cnt; i++){
  730. if( model.getValue("/root/main/outhist/outhistlist[" + i + "]/histstat") == 'R' ){
  731. insukindtmp = model.getValue("/root/main/outhist/outhistlist[" + i + "]/insukind");
  732. if( insukindtmp != '' && insukindtmp != '-' && insukindtmp != ' ' ){
  733. INSUKIND = insukindtmp;
  734. return true;
  735. }
  736. }
  737. }
  738. INSUKIND = gsInsu_IlBan; //보험유형 일반
  739. return false;
  740. }
  741. //예약내역 체크
  742. function fCheckRsrvHist(){
  743. //해당과에 이미 예약된 내역이 있는지 체크
  744. model.makeNode("/root/send/rsrvpossyn/orddeptcd");
  745. model.makeNode("/root/send/rsrvpossyn/hngnm");
  746. model.makeNode("/root/send/rsrvpossyn/rrgstno1");
  747. model.makeNode("/root/send/rsrvpossyn/rrgstno2");
  748. model.makeNode("/root/send/rsrvpossyn/result");
  749. model.makeNode("/root/send/rsrvpossyn/orddd");
  750. model.makeNode("/root/send/rsrvpossyn/orddrid");
  751. model.setValue("/root/send/rsrvpossyn/orddeptcd", model.getValue("/root/main/reservation/orddeptcd"));
  752. model.setValue("/root/send/rsrvpossyn/hngnm", model.getValue("/root/main/patinfo/patinfolist/hngnm"));
  753. model.setValue("/root/send/rsrvpossyn/rrgstno1", model.getValue("/root/main/patinfo/patinfolist/rrgstno1"));
  754. model.setValue("/root/send/rsrvpossyn/rrgstno2", model.getValue("/root/main/patinfo/patinfolist/rrgstno2"));
  755. //여의도 - 1. 한 환자가 동일의사에게 다른날(2회이상) 예약 가능 2. 한 환자가 같은과에 같은날에 다른의사(2명이상) 예약이 될수 있도록(같은날 같은과 같은의사예약만 블로킹)
  756. if(SameDept == 'Y'){
  757. model.setValue("/root/send/rsrvpossyn/orddd", model.getValue("/root/main/reservation/orddd"));
  758. model.setValue("/root/send/rsrvpossyn/orddrid", model.getValue("/root/main/reservation/orddrid"));
  759. }
  760. var fsexamflag = model.getValue("/root/main/reservation/fsexamflag");
  761. if(submit("TRPMO10013")){
  762. var possyn = model.getValue("/root/send/rsrvpossyn/result/rsrvpossyn/possyn");
  763. if( model.getValue("/root/send/rsrvpossyn/result/rsrvpossyn/possyn") != 'Y' ){
  764. // if(fsexamflag != 'R'){
  765. // if( messageBox("해당 진료과로 이미 예약된 내역이 있습니다.", "E999", "")){
  766. // model.removeNodeset("/root/send/rsrvpossyn");
  767. // return false;
  768. // }
  769. // }else{
  770. if( messageBox("해당 진료과로 이미 예약된 내역이 있습니다. 전화예약을 계속 진행하시겠습니까?", "Q999", "") != 6 ){
  771. model.removeNodeset("/root/send/rsrvpossyn");
  772. return false;
  773. }
  774. // }
  775. }
  776. }else{
  777. if(messageBox("해당 진료과 예약내역 조회에 실패했습니다. 무시하고 계속 진행하시겠습니까?", "Q999", "") != 6 ){
  778. model.removeNodeset("/root/send/rsrvpossyn");
  779. return false;
  780. }
  781. }
  782. model.removeNodeset("/root/send/rsrvpossyn");
  783. return true;
  784. }
  785. //외래이력 조회
  786. function fSearch(){
  787. //감면내역 조회
  788. model.copyNode("/root/tmp/patinfolist", "/root/main/patinfo/patinfolist");
  789. //예약정보 / 외래등록내역(달력) / 외래등록내역 초기화
  790. //btn_clear.dispatch("DOMActivate");
  791. //외래등록내역 초기화
  792. model.resetInstanceNode("/root/main/outhist/outhistlist");
  793. //컨설트 내역 조회
  794. fGetOrdCnstInfo();
  795. //사생활보호 관리여부 확인
  796. fGetPatPrivacyInfo(model.getValue("/root/main/patinfo/patinfolist/pid"));
  797. if( model.getValue("/root/main/popupendflag") == "ok" ){
  798. var pid = model.getValue("/root/main/patinfo/patinfolist/pid");
  799. model.setValue("/root/send/pid", pid );
  800. if( pid.length > 0 ){
  801. //구환
  802. model.setValue("/root/send/checkfnexam", 3);
  803. }else{
  804. //신환
  805. model.setValue("/root/send/checkfnexam", 1);
  806. }
  807. //여의도성모병원에서 전환된 환자
  808. fCheckMigPatMsg(model.getValue("/root/main/patinfo/patinfolist/pidflag") );
  809. //model.setValue("/root/send/acptdd", model.getValue("/root/main/patinfo/patinfolist/acptdd") );
  810. //model.setValue("/root/send/acptno", model.getValue("/root/main/patinfo/patinfolist/acptno") );
  811. model.setValue("/root/send/hngnm", model.getValue("/root/main/patinfo/patinfolist/hngnm").replace("★", ""));
  812. model.setValue("/root/send/rrgstno1", model.getValue("/root/main/patinfo/patinfolist/rrgstno1") );
  813. model.setValue("/root/send/rrgstno2", model.getValue("/root/main/patinfo/patinfolist/rrgstno2") );
  814. model.resetInstanceNode("/root/main/result");
  815. model.makeNode("/root/main/result/outhist");
  816. //model.makeNode("/root/main/result/outrgst");
  817. if(submit("TRPMO00201")){
  818. model.copyNode("/root/main/outhist" , "/root/main/result/outhist");
  819. model.copyNode("/root/main/test" , "/root/main/result/test");
  820. model.copyNode("/root/main/exculist" , "/root/main/result/exculist");
  821. model.makeNode("/root/hidden/con/examcnt");
  822. var examcnt = getNodesetCount("/root/main/test/testlist");
  823. model.setValue("/root/hidden/con/examcnt", examcnt);
  824. //model.copyNode("/root/main/outrgst", "/root/main/result/outrgst");
  825. //grd_outhist.refresh();
  826. fGetInsuKind(); //최근보험유형 검색
  827. if(RD == 'Y'){
  828. //예약구분이 의료협력이 아닐경우 진료의뢰서여부 체크 안함
  829. if(model.getValue("/root/main/reservation/rsrvflag") != 'C'){
  830. FseamOrdreqdescCheck();
  831. }
  832. }
  833. model.refresh();
  834. }
  835. //전화예약내역 색깔표시
  836. grd_outhist.rebuildStyle();
  837. setRowStyle("grd_outhist", "4^6", "2^9", "rsrvflag");
  838. //재원체크
  839. fInhospynCheck();
  840. }
  841. }
  842. //재원환자체크
  843. function fInhospynCheck(){
  844. if (model.getValue("/root/main/patinfo/patinfolist/inhospyn") == "I"){
  845. if(messageBox("확인! " + model.getValue("/root/main/patinfo/patinfolist/hngnm") + " 환자는 현재 재원 중입니다!. 계속 진행 하시겠습니까?","Q999","") != 6){
  846. model.resetInstanceNode("/root/main/patinfo/patinfolist");
  847. fInitialize();
  848. return false;
  849. }
  850. }else if (model.getValue("/root/main/patinfo/patinfolist/inhospyn") == "D"){
  851. if(messageBox("확인! " + model.getValue("/root/main/patinfo/patinfolist/hngnm") + " 환자는 당일 DSC/CHEMO 환자입니다. 계속 진행 하시겠습니까?","Q999","") != 6){
  852. model.resetInstanceNode("/root/main/patinfo/patinfolist");
  853. fInitialize();
  854. return false;
  855. }
  856. /*
  857. messageBox("확인! " + model.getValue("/root/main/patinfo/patinfolist/hngnm") + " 환자는 당일 DSC/CHEMO 환자입니다. 입원수납에서 수납하세요!","E999","");
  858. return false;
  859. */
  860. }else if (model.getValue("/root/main/patinfo/patinfolist/inhospyn") == "E"){
  861. if(messageBox("확인! " + model.getValue("/root/main/patinfo/patinfolist/hngnm") + " 환자는 응급 환자입니다. 계속 진행 하시겠습니까?","Q999","") != 6){
  862. model.resetInstanceNode("/root/main/patinfo/patinfolist");
  863. fInitialize();
  864. return false;
  865. }
  866. /*
  867. messageBox("확인! " + model.getValue("/root/main/patinfo/patinfolist/hngnm") + " 환자는 응급 환자입니다!","E999","");
  868. return false;
  869. */
  870. }else if (model.getValue("/root/main/patinfo/patinfolist/inhospyn") == "T"){
  871. if(messageBox("확인! " + model.getValue("/root/main/patinfo/patinfolist/hngnm") + " 환자는 가퇴원 환자입니다. 계속 진행 하시겠습니까?","Q999","") != 6){
  872. model.resetInstanceNode("/root/main/patinfo/patinfolist");
  873. fInitialize();
  874. return false;
  875. }
  876. /*
  877. messageBox("확인! " + model.getValue("/root/main/patinfo/patinfolist/hngnm") + " 환자는 응급 환자입니다!","E999","");
  878. return false;
  879. */
  880. }
  881. // else if(model.getValue("/root/main/ptbs/ptbs_tdaydsch") == "Y" && model.getValue("/root/main/otpt/otpt_orddd") == getCurrentDate() ){
  882. //
  883. // messageBox("확인! " + model.getValue("/root/main/ptbs/ptbs_hngnm") + " 환자는 당일퇴원환자입니다!","E999","");
  884. // return false;
  885. // }
  886. return true;
  887. }
  888. function fDisableInputBox(){
  889. if( model.getValue("/root/hidden/source/checkfnexam") == "1" ){
  890. ipt_pid.disabled = true;
  891. cmb_sex.disabled = false;
  892. ipt_hometel.disabled = false;
  893. ipt_mpphontel.disabled = false;
  894. ipt_etctel1.disabled = false;
  895. ipt_engnm.disabled = false;
  896. ipt_zipcd1.disabled = false;
  897. ipt_zipcd2.disabled = false;
  898. ipt_zipcdseq.disabled = false;
  899. ipt_detladdr.disabled = false;
  900. //tar_remfact.disabled = false;
  901. //btn_srchzipcd.disabled = false;
  902. model.setFocus("ipt_hngnm");
  903. }else if( model.getValue("/root/hidden/source/checkfnexam") == "3" ){
  904. ipt_pid.disabled = false;
  905. cmb_sex.disabled = true;
  906. ipt_hometel.disabled = true;
  907. ipt_mpphontel.disabled = true;
  908. ipt_etctel1.disabled = true;
  909. ipt_engnm.disabled = true;
  910. ipt_zipcd1.disabled = true;
  911. ipt_zipcd2.disabled = true;
  912. ipt_zipcdseq.disabled = true;
  913. ipt_detladdr.disabled = true;
  914. //tar_remfact.disabled = true;
  915. //btn_srchzipcd.disabled = true;
  916. model.setFocus("ipt_rrgstno1");
  917. }
  918. }
  919. /*
  920. * histstat - 예약(T), 변경(C), 취소(X)
  921. */
  922. function fMakeRsrv(histstat){
  923. //send node reset
  924. model.resetInstanceNode("/root/send/updatedata");
  925. model.refresh();
  926. //make nodes
  927. model.makeNode("/root/send/updatedata/patinfolist");
  928. model.makeNode("/root/send/updatedata/reservation");
  929. model.makeNode("/root/send/updatedata/checkfnexam");
  930. model.makeNode("/root/main/updatedata/insukind");
  931. //model.makeNode("/root/send/updatedata/histstat");
  932. var dd = model.getValue("/root/main/reservation/orddd");
  933. var fsexamflag = model.getValue("/root/main/reservation/fsexamflag");
  934. var etcordflag = model.getValue("/root/main/reservation/etcordflag");
  935. //기타진료에 null값 들어가는 문제 방지
  936. if(etcordflag == '' || etcordflag == ' '){
  937. model.setValue("/root/main/reservation/etcordflag", '-');
  938. }
  939. //예약시 생일 한번더 체크
  940. fGetBirthDD();
  941. var remark = model.getValue("/root/main/reservation/onestop");
  942. if(remark == '-' || remark == ''){
  943. model.setValue("/root/main/reservation/onestop" , '');
  944. }else{
  945. model.setValue("/root/main/reservation/remark", "ONE STOP:" + cmb_onestop.label );
  946. }
  947. model.setValue("/root/main/reservation/remark", model.getValue("/root/main/reservation/remark") + model.getValue("/root/main/reservation/remfact"));
  948. //send node 값 세팅
  949. var rsrvflag;
  950. var rsrvf;
  951. var rsrvr;
  952. var cnt = getNodesetCount("/root/init/fsexamdd/fsexamddlist");
  953. for(var i=1; i<=cnt; i++){
  954. if(model.getValue("/root/init/fsexamdd/fsexamddlist["+ i +"]/cdid") == "F"){
  955. rsrvf = model.getValue("/root/init/fsexamdd/fsexamddlist["+ i +"]/cdnm");
  956. }
  957. if(model.getValue("/root/init/fsexamdd/fsexamddlist["+ i +"]/cdid") == "R"){
  958. rsrvr = model.getValue("/root/init/fsexamdd/fsexamddlist["+ i +"]/cdnm");
  959. }
  960. }
  961. //예약(T) - START
  962. if(histstat == 'T'){
  963. if(fsexamflag == 'R' || fsexamflag == 'S'){
  964. if( getDateInterval( getCurrentDate(), dd) < rsrvr ){
  965. messageBox("재진환자 예약은 금일로 부터 "+ rsrvr +" 일 이후 부터 가능합니다.", "E999", "");
  966. model.removeNodeset("/root/main/outrgst/outrgstlist");
  967. model.resetInstanceNode("/root/resercnt");
  968. grd_outrgst.refresh();
  969. return false;
  970. }
  971. }else if(fsexamflag == 'F' || fsexamflag == 'D' || fsexamflag == '4'){
  972. if( getDateInterval( getCurrentDate(), dd) < rsrvf ){
  973. messageBox("초진환자 예약은 금일로 부터 "+ rsrvf +" 일 이후 부터 가능합니다.", "E999", "");
  974. model.removeNodeset("/root/main/outrgst/outrgstlist");
  975. model.resetInstanceNode("/root/resercnt");
  976. grd_outrgst.refresh();
  977. return false;
  978. }
  979. }
  980. var etcordflag = model.getValue("/root/main/reservation/etcordflag");
  981. if(RSRVFLAG == '1' || RSRVFLAG == 'U'){
  982. rsrvflag = RSRVFLAG; //협력의뢰(1), 검사의뢰(2), 국제진료(U)
  983. }else if(etcordflag == 'H'){
  984. rsrvflag = 'C'; //컨설트
  985. }else{
  986. rsrvflag = '2'; //전화예약
  987. }
  988. //2014/09/25 이정택 추가
  989. if(hieyn=="Y"){
  990. rsrvflag = 'V'; //진료교류
  991. }
  992. //2014/09/25 이정택 추가
  993. //2016/04/29 이정택 추가(되의뢰(회송) 시범사업 관련)
  994. if(RC=='1' && getUserInfo("dutplceinstcd")=="031"){
  995. var refer = model.getValue("/root/tmp/refer_sibum");
  996. if(refer == "W"){
  997. rsrvflag = "W"; // 접수구분을 되의뢰(회송)으로 변경
  998. }
  999. }
  1000. //2016/04/29 이정택 추가(되의뢰(회송) 시범사업 관련)
  1001. //예약(T) - END
  1002. //예약(T) 아니면- START
  1003. }else{
  1004. //변경/취소 작업시 전화예약실에서 발생한 건에 대해서 예약구분자를 '전화예약'값으로 수정한다.
  1005. //전화예약 메뉴로 전화예약화면을 실행 시켰을 경우..
  1006. // if( RC == 'T' ){
  1007. // model.setValue("/root/main/reservation/rsrvflag", '2'); //전화예약
  1008. // model.setValue("/root/send/updatedata/patinfolist/rsrvflag", '2');
  1009. // }
  1010. rsrvflag = model.getValue("/root/main/reservation/rsrvflag");
  1011. //협력의뢰 예약 경우에는 협력의뢰(1), 검사의뢰(2), 국제진료(U) 선택값으로 변경되도록 수정 - 20130820
  1012. if(RSRVFLAG == '1' || RSRVFLAG == 'U'){
  1013. var rqstflag = model.getValue("/root/main/reservation/rqstflag");
  1014. if(rqstflag == '1' || rqstflag == '2' || rqstflag == 'U'){
  1015. rsrvflag = rqstflag;
  1016. }
  1017. }
  1018. //2014/09/25 이정택 추가
  1019. if(hieyn=="Y" && (getUserInfo("dutplceinstcd")=="031" || getUserInfo("dutplceinstcd")=="032")){
  1020. rsrvflag = 'V'; //진료교류
  1021. }
  1022. //2014/09/25 이정택 추가
  1023. //2016/04/29 이정택 추가(되의뢰(회송) 시범사업 관련)
  1024. if(RC=='1' && getUserInfo("dutplceinstcd")=="031"){
  1025. var refer = model.getValue("/root/tmp/refer_sibum");
  1026. if(refer == "W"){
  1027. rsrvflag = "W"; // 접수구분을 되의뢰(회송)으로 변경
  1028. }
  1029. }
  1030. //2016/04/29 이정택 추가(되의뢰(회송) 시범사업 관련)
  1031. //2016/01/21 이정택 추가(접수된 환자에 대해서 진료교류로 수정할 수 있도록 프로그램 수정)
  1032. //2017/03/24 변경이벤트 일때만 타도록 수정(이정택)
  1033. if(RC=='1' && model.getValue("/root/main/reservation/rsrvflag")!="V" && histstat == 'C' && (getUserInfo("dutplceinstcd")=="031" || getUserInfo("dutplceinstcd")=="032")){
  1034. if(messageBox("해당 환자를 진료교류로 수정하시겠습니까?","Q999","") == 6){
  1035. rsrvflag = "V"; // 해당환자를 진료교류로 변경
  1036. hieyn = "Y"; // HIE쪽에 정보를 전송하기 위해서 플래그값 수정
  1037. }
  1038. }
  1039. //2016/01/21 이정택 추가
  1040. //2016/04/29 이정택 추가(되의뢰(회송) 시범사업 관련)
  1041. //2017/03/24 변경이벤트 일때만 타도록 수정(이정택)
  1042. if(RC=='1' && getUserInfo("dutplceinstcd")=="031" && histstat == 'C' && model.getValue("/root/main/reservation/rsrvflag")!="W"){
  1043. var refer = model.getValue("/root/tmp/refer_sibum");
  1044. var title = model.getValue("/root/init/P0341list/P0341[cdsid='P0341W']/cdnm");
  1045. if(refer == "W"){
  1046. if(messageBox("해당 환자를 "+ title + "으로 수정하시겠습니까?","Q999","") == 6){
  1047. rsrvflag = "W"; // 접수구분을 되의뢰(회송)으로 변경
  1048. }
  1049. }
  1050. }
  1051. //2016/04/29 이정택 추가(되의뢰(회송) 시범사업 관련)
  1052. }
  1053. //예약(T) 아니면- END
  1054. //의뢰(H) - P0341
  1055. if(etcordflag == 'H'){
  1056. rsrvflag = 'C'; //의뢰(C) - 컨설트
  1057. }
  1058. model.setValue("/root/send/updatedata/checkfnexam", model.getValue("/root/hidden/source/checkfnexam"));
  1059. //환자정보 값을 send 노드 아래로 복사한다.
  1060. model.copyNode("/root/send/updatedata/patinfolist", "/root/main/patinfo/patinfolist");
  1061. //환자정보에 있는 진료일자, 진료과, 접수일, 접수번호, 예약 구분 플래그를 삭제한다. - PMOHTEMP 테이블에서 초진환자 정보를 가져올때 같이 가져오기 때문에..
  1062. model.removenode("/root/send/updatedata/patinfolist/orddd");
  1063. model.removenode("/root/send/updatedata/patinfolist/orddeptcd");
  1064. model.removenode("/root/send/updatedata/patinfolist/acptdd");
  1065. model.removenode("/root/send/updatedata/patinfolist/acptno");
  1066. model.removenode("/root/send/updatedata/patinfolist/rsrvflag");
  1067. //예약정보를 SEND로 복사한다.
  1068. model.copyNode("/root/send/updatedata/reservation", "/root/main/reservation");
  1069. model.setValue("/root/send/updatedata/reservation/histstat", histstat);
  1070. model.setValue("/root/send/updatedata/reservation/rsrvflag", rsrvflag);
  1071. //변경전 데이터를 가져가기 위해 변경전의 데이터도 함께 SEND로 복사한다.
  1072. if(histstat == 'C'){
  1073. //변경전의 데이터 세팅..
  1074. model.makeNode("/root/send/updatedata/reservation/bforddd");
  1075. model.makeNode("/root/send/updatedata/reservation/bfordtm");
  1076. model.makeNode("/root/send/updatedata/reservation/bforddeptcd");
  1077. model.makeNode("/root/send/updatedata/reservation/bforddrid");
  1078. model.makeNode("/root/send/updatedata/reservation/bfacptseqno");
  1079. model.makeNode("/root/send/updatedata/reservation/bfcretno");
  1080. model.makeNode("/root/send/updatedata/reservation/bfspecorddescyn");
  1081. // model.makeNode("/root/send/updatedata/reservation/updtcnclresn");
  1082. model.makeNode("/root/send/updatedata/reservation/bfhiststat");
  1083. model.setValue("/root/send/updatedata/reservation/bforddd" , model.getValue("/root/tmp/reservation/orddd"));
  1084. model.setValue("/root/send/updatedata/reservation/bfordtm" , model.getValue("/root/tmp/reservation/ordtm"));
  1085. model.setValue("/root/send/updatedata/reservation/bforddeptcd" , model.getValue("/root/tmp/reservation/orddeptcd"));
  1086. model.setValue("/root/send/updatedata/reservation/bforddrid" , model.getValue("/root/tmp/reservation/orddrid"));
  1087. model.setValue("/root/send/updatedata/reservation/bfhiststat" , model.getValue("/root/tmp/reservation/histstat"));
  1088. model.setValue("/root/send/updatedata/reservation/bfacptseqno" , model.getValue("/root/tmp/reservation/acptseqno"));
  1089. model.setValue("/root/send/updatedata/reservation/bfspecorddescyn" , model.getValue("/root/tmp/reservation/specorddescyn"));
  1090. model.setValue("/root/send/updatedata/reservation/bfcretno" , model.getValue("/root/tmp/reservation/cretno"));
  1091. // }else if( histstat == 'X'){
  1092. // model.makeNode("/root/send/updatedata/reservation/updtcnclresn");
  1093. }
  1094. //2007-10-08 이동식 추가
  1095. if(histstat != 'X'){
  1096. if(histstat == 'C'){
  1097. if( model.getValue("/root/main/reservation/orddeptcd") != model.getValue("/root/tmp/reservation/orddeptcd") ||
  1098. model.getValue("/root/main/reservation/orddrid") != model.getValue("/root/tmp/reservation/orddrid") ||
  1099. model.getValue("/root/main/reservation/orddd") != model.getValue("/root/tmp/reservation/orddd") ||
  1100. model.getValue("/root/main/reservation/ordtm") != model.getValue("/root/tmp/reservation/ordtm")){
  1101. var orddrid = model.getValue("/root/main/reservation/orddrid");
  1102. var orddeptcd = model.getValue("/root/main/reservation/orddeptcd");
  1103. var orddd = model.getValue("/root/main/reservation/orddd");
  1104. var ordtm = model.getValue("/root/main/reservation/ordtm");
  1105. var fsexamflag = model.getValue("/root/main/reservation/fsexamflag");
  1106. var subdeptcd = model.getValue("/root/main/reservation/subdeptcd");
  1107. var centcd = model.getValue("/root/main/reservation/centcd");
  1108. if(RA != 'Y'){
  1109. //의사휴진일정 및 진료환자정원 조회 - PAM.js
  1110. var retVal = fGetVerifyHoli2(centcd, orddrid, orddeptcd, subdeptcd, orddd, ordtm, fsexamflag, RSRVFLAG, 'Y');
  1111. if(retVal == false){
  1112. return false;
  1113. }else if( retVal != true){
  1114. if(CENTERYN != 'Y'){
  1115. //센터접수
  1116. model.setValue("/root/send/updatedata/reservation/centcd", retVal);
  1117. model.setValue("/root/main/reservation/centcd", retVal);
  1118. }
  1119. }else{
  1120. if(CENTERYN != 'Y'){
  1121. //센터코드 초기화
  1122. model.setValue("/root/send/updatedata/reservation/centcd", '-');
  1123. model.setValue("/root/main/reservation/centcd", '-');
  1124. }
  1125. }
  1126. }
  1127. }
  1128. }else{
  1129. var orddrid = model.getValue("/root/main/reservation/orddrid");
  1130. var orddeptcd = model.getValue("/root/main/reservation/orddeptcd");
  1131. var orddd = model.getValue("/root/main/reservation/orddd");
  1132. var ordtm = model.getValue("/root/main/reservation/ordtm");
  1133. var fsexamflag = model.getValue("/root/main/reservation/fsexamflag");
  1134. var subdeptcd = model.getValue("/root/main/reservation/subdeptcd");
  1135. var centcd = model.getValue("/root/main/reservation/centcd");
  1136. if(RA != 'Y'){
  1137. //의사휴진일정 및 진료환자정원 조회 - PAM.js
  1138. var retVal = fGetVerifyHoli2(centcd, orddrid, orddeptcd, subdeptcd, orddd, ordtm, fsexamflag, RSRVFLAG, 'Y');
  1139. if( retVal == false ){
  1140. return false;
  1141. }else if( retVal != true ){
  1142. //센터접수
  1143. model.setValue("/root/send/updatedata/reservation/centcd", retVal);
  1144. model.setValue("/root/main/reservation/centcd", retVal);
  1145. }else{
  1146. //센터코드 초기화
  1147. model.setValue("/root/send/updatedata/reservation/centcd", '-');
  1148. model.setValue("/root/main/reservation/centcd", '-');
  1149. }
  1150. }
  1151. }
  1152. }
  1153. //END..
  1154. //reset result node
  1155. //채번로직 사용할 경우(서울성모만 반영중)
  1156. if(RB == 'Y'){
  1157. var rrgstno1 = model.getValue("/root/main/patinfo/patinfolist/rrgstno1").getTrim();
  1158. var rrgstno2 = model.getValue("/root/main/patinfo/patinfolist/rrgstno2").getTrim();
  1159. var rrgstno = rrgstno1.concat(rrgstno2);
  1160. //신체감정 & TA(자보-교통사고)가 아닐 경우
  1161. if(etcordflag != "B" && etcordflag != "T"){
  1162. //자격조회 조회 안하고 자격조회에 체크 되어 있을 경우
  1163. if( model.getValue("/root/hidden/flag/check_insuinfo_flag") != 'Y' && model.getValue("/root/hidden/com/searchInsuInfoYN") == 'Y' ){
  1164. //병초이면서 예약일때 자격조회 체크
  1165. if(fsexamflag == "F" && histstat == 'T'){
  1166. //주민번호가 정화기 입력된 경우만 자동 자격조회기능
  1167. if( rrgstno1.length == 6 && rrgstno2.length == 7 && isResidentNo(rrgstno) == true){
  1168. //if( messageBox("병초 환자인 경우 자격조회를 하지 않으면 등록번호가 생성되지 않습니다. \n등록번호를 생성하지 않고 예약하시겠습니까 ?", "Q999", "") != 6){
  1169. fInsuInfoSearch("P");
  1170. //button7.dispatch("DOMActivate");
  1171. //}
  1172. }
  1173. }
  1174. }
  1175. }
  1176. //병초를 제외한 예약,변경에 대해 자격조회 팝업호출없이 자격조회 되도록하기위해
  1177. if(histstat == 'T' || histstat == 'C'){
  1178. if(fsexamflag != 'F'){
  1179. fInsuInfoSearch("I");
  1180. }
  1181. }
  1182. //채번사용여부(초진인경우 & 예약일경우만&자격조회한경우)
  1183. if(fsexamflag == "F" && histstat == 'T' && model.getValue("/root/hidden/flag/check_insuinfo_flag") == 'Y'){
  1184. //주민번호가 정확히 입력된 경우만 채번
  1185. if( rrgstno1.length == 6 && rrgstno2.length == 7 && isResidentNo(rrgstno) == true){
  1186. btn_savePatInfo.dispatch("DOMActivate");
  1187. }
  1188. }
  1189. //선택진료(환자번호 존재 & 선택의사가 Y일 경우)
  1190. if( model.getValue("/root/main/patinfo/patinfolist/pid").length > 0 && model.getValue("/root/main/reservation/specordyn") == "Y"){
  1191. model.makeValue("/root/send/data4/pid" , model.getValue("/root/main/patinfo/patinfolist/pid"));
  1192. model.makeValue("/root/send/data4/instcd" , model.getValue("/root/hidden/session/sess_dutplceinstcd"));
  1193. model.makeValue("/root/send/data4/orddd" , model.getValue("/root/main/reservation/orddd"));
  1194. model.makeValue("/root/send/data4/orddeptcd" , model.getValue("/root/main/reservation/orddeptcd"));
  1195. model.makeValue("/root/send/data4/orddrid" , model.getValue("/root/main/reservation/orddrid"));
  1196. submit("TRPMO00125");
  1197. //현재 예약 내역으로 선택진료가 없을 경우
  1198. if (model.getValue("/root/tempchk/specapp/rgstyn") == "N"){
  1199. //협력예약일 경우 제외
  1200. if(RC != "1" && histstat == 'T'){
  1201. //선택진료동의여부에 Y일경우만 예약가능
  1202. if(model.getValue("/root/main/reservation/specorddescyn") != "Y"){
  1203. if( messageBox("선택진료녹취 또는 신택진료 신청서가 작성되지 않았습니다.. \n신청서를 작성하시겠습니까?", "Q999", "") == 6){
  1204. return;
  1205. }
  1206. }
  1207. }
  1208. }
  1209. //선택진료
  1210. SpecOrdDescYnCheck();
  1211. }
  1212. }
  1213. model.resetInstanceNode("/root/main/result");
  1214. model.makeNode("/root/main/result/outhist");
  1215. model.setValue("/root/send/updatedata/reservation/searchInsuInfoyn" , model.getValue("/root/main/reservation/searchInsuInfoyn"));
  1216. model.setValue("/root/send/updatedata/reservation/insukind" , model.getValue("/root/main/reservation/insukind"));
  1217. model.setValue("/root/send/updatedata/reservation/insucd" , model.getValue("/root/main/reservation/insucd"));
  1218. model.setValue("/root/send/updatedata/reservation/insuno" , model.getValue("/root/main/reservation/insuno"));
  1219. model.setValue("/root/send/updatedata/reservation/insdnm" , model.getValue("/root/main/reservation/insdnm"));
  1220. model.setValue("/root/send/updatedata/reservation/ptin_fromdd" , model.getValue("/root/main/reservation/ptin_fromdd"));
  1221. //칠곡에 한해서 센터코드 안들어 왔을시 예외처리 하도록 프로그램 수정(2017/03/14 이정택)
  1222. var centcd = model.getValue("/root/send/updatedata/reservation/centcd");
  1223. if(getUserInfo("dutplceinstcd")=='032' && (isNull(centcd) || centcd=='-')){
  1224. messageBox("센터코드가 입력되지 않았습니다. 센터코드 선택 후 저장부탁드립니다.", "E999");
  1225. return;
  1226. }
  1227. //칠곡에 한해서 센터코드 안들어 왔을시 예외처리 하도록 프로그램 수정(2017/03/14 이정택)
  1228. //전화예약 예약접수
  1229. if(submit("TXPMO00202")){
  1230. //model.resetInstanceNode("/root/main/reservation");
  1231. //예약정보 / 외래등록내역(달력) / 외래등록내역 초기화
  1232. //btn_clear.dispatch("DOMActivate");
  1233. // if( model.getValue("/root/hidden/source/checkfnexam") == '1' ){
  1234. // //신환
  1235. // model.copyNode("/root/main/outhist", "/root/main/result/outhist");
  1236. //
  1237. // }else{
  1238. // //구환
  1239. // model.copyNode("/root/main/outhist", "/root/main/result/outhist");
  1240. // }
  1241. model.copyNode("/root/main/outhist", "/root/main/result/outhist");
  1242. //달력 초기화
  1243. //initCalendar();
  1244. //외래등록내역 초기화
  1245. //model.removeNodeset("/root/main/outrgst/outrgstlist");
  1246. model.refresh();
  1247. }else{
  1248. return false;
  1249. }
  1250. //2007-10-22 이동식 추가
  1251. if( model.getValue("/root/main/patinfo/patinfolist/pid").length > 0 ){ //신환일경우 차트대출 안함.
  1252. if( getNodesetCount("/root/main/result/chart/chartlist") < 1 || model.getValue("/root/main/reservation/tablename") == 'temp'){
  1253. return false;
  1254. }
  1255. model.removeNodeset("/root/send/chart");
  1256. if( histstat == 'T' ){ //예약
  1257. model.makeValue("/root/send/chart/high_flag", "I");
  1258. model.makeValue("/root/send/chart/flag", "I");
  1259. model.makeValue("/root/send/chart/pid", model.getValue("/root/main/result/chart/chartlist/pid"));
  1260. model.makeValue("/root/send/chart/orddd", model.getValue("/root/main/result/chart/chartlist/orddd"));
  1261. model.makeValue("/root/send/chart/cretno", model.getValue("/root/main/result/chart/chartlist/cretno"));
  1262. model.makeValue("/root/send/chart/acptseqno", model.getValue("/root/main/result/chart/chartlist/acptseqno"));
  1263. model.makeValue("/root/send/chart/orddeptcd", model.getValue("/root/main/result/chart/chartlist/orddeptcd"));
  1264. model.makeValue("/root/send/chart/orddrid", model.getValue("/root/main/result/chart/chartlist/orddrid"));
  1265. model.makeValue("/root/send/chart/ordtm", model.getValue("/root/main/result/chart/chartlist/ordtm"));
  1266. model.makeValue("/root/send/chart/fsexamflag", model.getValue("/root/main/result/chart/chartlist/fsexamflag"));
  1267. model.makeValue("/root/send/chart/rsrvflag", '2');
  1268. model.makeValue("/root/send/chart/msgcnts", '-');
  1269. model.makeValue("/root/send/chart/subdeptcd", model.getValue("/root/main/reservation/subdeptcd"));
  1270. model.makeValue("/root/send/chart/centcd", model.getValue("/root/main/reservation/centcd"));
  1271. }else if( histstat == 'C' ){ //변경
  1272. model.makeValue("/root/send/chart[1]/high_flag", "U");
  1273. model.makeValue("/root/send/chart[1]/flag", "D");
  1274. model.makeValue("/root/send/chart[1]/pid", model.getValue("/root/main/patinfo/patinfolist/pid"));
  1275. model.makeValue("/root/send/chart[1]/orddd", model.getValue("/root/tmp/reservation/orddd"));
  1276. model.makeValue("/root/send/chart[1]/cretno", model.getValue("/root/tmp/reservation/cretno"));
  1277. model.makeValue("/root/send/chart[1]/acptseqno", model.getValue("/root/tmp/reservation/acptseqno"));
  1278. model.makeValue("/root/send/chart[1]/orddeptcd", model.getValue("/root/tmp/reservation/orddeptcd"));
  1279. model.makeValue("/root/send/chart[1]/orddrid", model.getValue("/root/tmp/reservation/orddrid"));
  1280. model.makeValue("/root/send/chart[1]/ordtm", model.getValue("/root/tmp/reservation/ordtm"));
  1281. model.makeValue("/root/send/chart[1]/fsexamflag", model.getValue("/root/tmp/reservation/fsexamflag"));
  1282. model.makeValue("/root/send/chart[1]/rsrvflag", model.getValue("/root/tmp/reservation/rsrvflag"));
  1283. model.makeValue("/root/send/chart[1]/msgcnts", '-');
  1284. model.makeValue("/root/send/chart[1]/subdeptcd", model.getValue("/root/tmp/reservation/subdeptcd"));
  1285. model.makeValue("/root/send/chart[1]/centcd", model.getValue("/root/tmp/reservation/centcd"));
  1286. model.makeValue("/root/send/chart[2]/high_flag", "U");
  1287. model.makeValue("/root/send/chart[2]/flag", "I");
  1288. model.makeValue("/root/send/chart[2]/pid", model.getValue("/root/main/result/chart/chartlist/pid"));
  1289. model.makeValue("/root/send/chart[2]/orddd", model.getValue("/root/main/result/chart/chartlist/orddd"));
  1290. model.makeValue("/root/send/chart[2]/cretno", model.getValue("/root/main/result/chart/chartlist/cretno"));
  1291. model.makeValue("/root/send/chart[2]/acptseqno", model.getValue("/root/main/result/chart/chartlist/acptseqno"));
  1292. model.makeValue("/root/send/chart[2]/orddeptcd", model.getValue("/root/main/result/chart/chartlist/orddeptcd"));
  1293. model.makeValue("/root/send/chart[2]/orddrid", model.getValue("/root/main/result/chart/chartlist/orddrid"));
  1294. model.makeValue("/root/send/chart[2]/ordtm", model.getValue("/root/main/result/chart/chartlist/ordtm"));
  1295. model.makeValue("/root/send/chart[2]/fsexamflag", model.getValue("/root/main/result/chart/chartlist/fsexamflag"));
  1296. model.makeValue("/root/send/chart[2]/rsrvflag", model.getValue("/root/main/reservation/rsrvflag"));
  1297. model.makeValue("/root/send/chart[2]/msgcnts", '-');
  1298. model.makeValue("/root/send/chart[2]/subdeptcd", model.getValue("/root/main/reservation/subdeptcd"));
  1299. model.makeValue("/root/send/chart[2]/centcd", model.getValue("/root/main/reservation/centcd"));
  1300. }else if( histstat == 'X' ){ //취소
  1301. model.makeValue("/root/send/chart/high_flag", "D");
  1302. model.makeValue("/root/send/chart/flag", "D");
  1303. model.makeValue("/root/send/chart/pid", model.getValue("/root/main/patinfo/patinfolist/pid"));
  1304. model.makeValue("/root/send/chart/orddd", model.getValue("/root/tmp/reservation/orddd"));
  1305. model.makeValue("/root/send/chart/cretno", model.getValue("/root/tmp/reservation/cretno"));
  1306. model.makeValue("/root/send/chart/acptseqno", model.getValue("/root/tmp/reservation/acptseqno"));
  1307. model.makeValue("/root/send/chart/orddeptcd", model.getValue("/root/tmp/reservation/orddeptcd"));
  1308. model.makeValue("/root/send/chart/orddrid", model.getValue("/root/tmp/reservation/orddrid"));
  1309. model.makeValue("/root/send/chart/ordtm", model.getValue("/root/tmp/reservation/ordtm"));
  1310. model.makeValue("/root/send/chart/fsexamflag", model.getValue("/root/tmp/reservation/fsexamflag"));
  1311. model.makeValue("/root/send/chart/rsrvflag", model.getValue("/root/tmp/reservation/rsrvflag"));
  1312. model.makeValue("/root/send/chart/msgcnts", '-');
  1313. model.makeValue("/root/send/chart/subdeptcd", model.getValue("/root/main/reservation/subdeptcd"));
  1314. model.makeValue("/root/send/chart/centcd", model.getValue("/root/main/reservation/centcd"));
  1315. }
  1316. //차트대출 신청/취소
  1317. submit("TXPMO00105");
  1318. model.removeNodeset("/root/send/chart");
  1319. //END..
  1320. }
  1321. //hie 환자관련 처리-이윤주(20140916)
  1322. //HIE 환자 일시에만 타도록 수정(20140925 이정택)
  1323. //HIE이면서 예약구분이 [진료교류]일때만 데이터 전송하도록 수정(2016/01/22)
  1324. if(hieyn=="Y" && model.getValue("/root/send/updatedata/reservation/rsrvflag")=="V"){
  1325. model.makeValue("/root/main/hiepat/orddd",model.getValue("/root/main/reservation/orddd"));
  1326. model.makeValue("/root/main/hiepat/orddeptcd",model.getValue("/root/main/reservation/orddeptcd"));
  1327. model.makeValue("/root/main/hiepat/orddrid",model.getValue("/root/main/reservation/orddrid"));
  1328. model.makeValue("/root/main/hiepat/pid",model.getValue("/root/main/patinfo/patinfolist/pid"));
  1329. model.makeValue("/root/main/hiepat/fsexamflag",model.getValue("/root/main/reservation/fsexamflag"));
  1330. model.makeValue("/root/main/hiepat/histstat",histstat);
  1331. model.makeValue("/root/main/hiepat/name",model.getValue("/root/main/patinfo/patinfolist/hngnm"));
  1332. model.makeValue("/root/main/hiepat/birthdd",model.getValue("/root/main/patinfo/patinfolist/brthdd"));
  1333. model.makeValue("/root/main/hiepat/gendercd",model.getValue("/root/main/patinfo/patinfolist/sex"));
  1334. model.makeValue("/root/main/hiepat/addrbase",model.getValue("/root/main/patinfo/patinfolist/addr"));
  1335. model.makeValue("/root/main/hiepat/addrdetl",model.getValue("/root/main/patinfo/patinfolist/detladdr"));
  1336. model.makeValue("/root/main/hiepat/telno",model.getValue("/root/main/patinfo/patinfolist/mpphontel"));
  1337. model.makeValue("/root/main/hiepat/rrgstno",model.getValue("/root/main/patinfo/patinfolist/rrgstno1")+model.getValue("/root/main/patinfo/patinfolist/rrgstno2"));
  1338. fHIEMakeRsrv("/root/main/hiepat");
  1339. model.removeNodeset("/root/main/hiepat");
  1340. hieyn = "N";
  1341. }
  1342. //
  1343. //예약/수정/취소가 성공하면 화면 클리어한다.
  1344. fClearAfterSave();
  1345. model.resetInstanceNode("/root/main/h_dcuc/dcuc");
  1346. model.refresh();
  1347. return true;
  1348. }
  1349. function fInitialize(){
  1350. //model.resetInstanceNode("/root/main/patinfo/patinfolist");
  1351. model.resetInstanceNode("/root/main/reservation");
  1352. model.resetInstanceNode("/root/main/srchtelrsrv");
  1353. model.resetInstanceNode("/root/hidden/holdrrgstno");
  1354. model.resetInstanceNode("/root/main/h_dcuc/dcuc");
  1355. //2016/01/21 이정택 수정
  1356. model.resetInstanceNode("/root/send");
  1357. // model.resetInstanceNode("/root/send/updatedata/patinfolist");
  1358. // model.resetInstanceNode("/root/send/updatedata/reservation");
  1359. //2016/01/21 이정택 수정
  1360. model.removeNodeset("/root/main/outhist/outhistlist");
  1361. model.removeNodeset("/root/main/test/testlist");
  1362. model.removeNodeset("/root/hidden/con/examcnt");
  1363. model.removeNodeset("/root/main/outrgst/outrgstlist");
  1364. model.removeNodeset("/root/main/outtelrsrv/outtelrsrvlist");
  1365. model.removeNodeset("/root/main/inhist/inhistlist");
  1366. model.removeNodeset("/root/main/inhistdetl/inhistdetlist");
  1367. delPatientInfos(); //상단환자정보 클리어 - com/commonweb/js/common.js
  1368. cap_privacy.visible = false; // 사생활보호
  1369. //보험 자격조회 체크 여부 초기화
  1370. model.setValue("/root/hidden/flag/check_insuinfo_flag", "N");
  1371. //model.resetInstanceNode("/root/send");
  1372. //model.resetInstanceNode("/root/hidden/source");
  1373. model.resetInstanceNode("/root/tmp");
  1374. //model.setFocus("ipt_pid");
  1375. //1분 간격 풀기 초기화
  1376. model.setValue("/root/main/oneminute", "");
  1377. //달력 초기화 데이터 셋팅
  1378. model.setValue("/root/hidden/calendar/year", "");
  1379. model.setValue("/root/hidden/calendar/month", "");
  1380. initCalendar();
  1381. beforeObj = document.controls(beforeId);//선택한 버튼만 체크되게함.
  1382. if(beforeObj != null) beforeObj.disabled = "false";
  1383. fChangeButtonColor();
  1384. /*
  1385. //달력 초기화
  1386. var isMonth = model.getValue("/root/hidden/calendar/month");
  1387. var isYear = model.getValue("/root/hidden/calendar/year");
  1388. var isDate = (isYear+isMonth+1).toDate();
  1389. setCalendar(isDate);
  1390. */
  1391. //환자특이내역 존재여부 표기 초기화
  1392. btn_patspcfyn.attribute("background-color") = "#c0c0c0";
  1393. //설명여부 디폴트값 세팅
  1394. model.setValue("/root/main/reservation/specorddescyn", 'N');
  1395. model.setValue("/root/main/reservation/insuchrgyn", 'N');
  1396. model.setValue("/root/main/reservation/ordreqdescyn", ' ');
  1397. model.setValue("/root/main/reservation/ordreqhospgrde", '1');
  1398. //인적사항 세팅
  1399. // model.setValue("/root/main/patinfo/patinfolist/engnm", '-');;
  1400. // model.setValue("/root/main/patinfo/patinfolist/hometel", '-');
  1401. // model.setValue("/root/main/patinfo/patinfolist/mpphontel", '-');
  1402. // model.setValue("/root/main/patinfo/patinfolist/etctel1", '-');
  1403. model.setValue("/root/main/patinfo/patinfolist/zipcd1", '000');
  1404. model.setValue("/root/main/patinfo/patinfolist/zipcd2", '00');
  1405. model.setValue("/root/main/patinfo/patinfolist/zipcdseq", '0');
  1406. // model.setValue("/root/main/patinfo/patinfolist/detladdr", '-');
  1407. //예약 세팅
  1408. model.setValue("/root/main/reservation/telrsrvrem", '-');
  1409. model.setValue("/root/main/reservation/updtcnclresn", '-');
  1410. //센터 및 과코드 초기화처리(2016/01/21)
  1411. model.makeValue("/root/main/reservation/centcd", "-");
  1412. cmb_centcd.dispatch("xforms-value-changed");
  1413. //센터 및 과코드 초기화처리(2016/01/21)
  1414. //신환 + 구환 조회 플래그 세팅
  1415. model.setValue("/root/hidden/source/checkfnexam", "1");
  1416. //협력의뢰 디폴트 세팅
  1417. if( RC == '1' ){
  1418. model.setValue("/root/main/reservation/rqstflag", '1');
  1419. }else if( RC == 'U' ){
  1420. model.setValue("/root/main/reservation/rqstflag", 'U');
  1421. }
  1422. model.setValue("/root/main/reservation/etcordflag", "-");
  1423. //보험정보 초기화
  1424. INSUKIND = gsInsu_IlBan; //보험유형 일반
  1425. //자격조회여부
  1426. //model.setValue("/root/hidden/com/searchInsuInfoYN", "Y");
  1427. // HIE관련 초기화 추가(2016/10/19)
  1428. var hieyn = "N";
  1429. var hie_rrgstno1 = "";
  1430. var hie_rrgstno2 = "";
  1431. var hie_sex = "";
  1432. var hie_zipcd1 = "";
  1433. var hie_zipcd2 = "";
  1434. var hie_addrbase = "";
  1435. var hie_addrdetl = "";
  1436. // HIE관련 초기화 추가(2016/10/19)
  1437. model.refresh();
  1438. }
  1439. function fGetOutRgst(){
  1440. model.setValue("/root/send/centcd", model.getValue("/root/main/reservation/centcd"));
  1441. model.setValue("/root/send/orddeptcd", model.getValue("/root/main/reservation/orddeptcd"));
  1442. model.setValue("/root/send/subdeptcd", model.getValue("/root/main/reservation/subdeptcd"));
  1443. model.setValue("/root/send/orddrid", model.getValue("/root/main/reservation/orddrid"));
  1444. model.setValue("/root/send/orddd", model.getValue("/root/main/reservation/orddd"));
  1445. if( model.getValue("/root/send/centcd") == '' || model.getValue("/root/send/centcd") == ' ' ){
  1446. model.setValue("/root/send/centcd", '-');
  1447. }
  1448. if( submit("TRPMO00204") ){
  1449. grd_outrgst.rebuildStyle();
  1450. setRowStyle("grd_outrgst", "4^4^4^4", "F^D^4^5", "fsexamflag");
  1451. setRowStyle("grd_outrgst", "1^1^1", "S", "reglscheflag");
  1452. //협력의뢰센터의 예약 캐파일 경우에는 색상 변경(2016/09/05 이정택)
  1453. setRowStyle("grd_outrgst", "12", "A", "etcrsrvflag");
  1454. //협력의뢰센터의 예약 캐파일 경우에는 색상 변경(2016/09/05 이정택)
  1455. //심층진료 예약 Capacity(생산능력)일 경우에는 색상 변경(2017/12/01 이정택)
  1456. setRowStyle("grd_outrgst", "10", "B", "etcrsrvflag");
  1457. //심층진료 예약 Capacity(생산능력)일 경우에는 색상 변경(2017/12/01 이정택)
  1458. //grd_outrgst.rebuild();
  1459. }
  1460. //전화예약 오전/오후 예약자수 count
  1461. var rows = grd_outrgst.rows;
  1462. var telamcnt = 0;
  1463. var telpmcnt = 0;
  1464. var orddeptamcnt = 0;
  1465. var orddeptpmcnt = 0;
  1466. for (i=0; i<rows; i++) {
  1467. if(model.getValue("/root/main/outrgst/outrgstlist["+ i +"]/rsrvflag") == '2'){
  1468. var ordtm = model.getValue("/root/main/outrgst/outrgstlist["+ i +"]/ordtm");
  1469. if( ordtm < "1300"){
  1470. telamcnt++;
  1471. }else if(ordtm > "1300"){
  1472. telpmcnt++;
  1473. }
  1474. }else if(model.getValue("/root/main/outrgst/outrgstlist["+ i +"]/rsrvflag") == '9'){
  1475. var ordtm = model.getValue("/root/main/outrgst/outrgstlist["+ i +"]/ordtm");
  1476. if( ordtm < "1300"){
  1477. orddeptamcnt++;
  1478. }else if(ordtm > "1300"){
  1479. orddeptpmcnt++;
  1480. }
  1481. }
  1482. }
  1483. model.setValue("/root/resercnt/telamcnt", telamcnt);
  1484. model.setValue("/root/resercnt/telpmcnt", telpmcnt);
  1485. model.setValue("/root/resercnt/orddeptamcnt", orddeptamcnt);
  1486. model.setValue("/root/resercnt/orddeptpmcnt", orddeptpmcnt);
  1487. model.refresh();
  1488. /*
  1489. for(var i=1; i <= grd_outrgst.rows ; i++){
  1490. var reglscheflag = model.getValue("/root/main/outrgst/outrgstlist[" + i + "]/pid");
  1491. if (reglscheflag == "1524470") {
  1492. grd_outrgst.cellStyle("color", i, grd_outrgst.colref("pid")) = 'ffff99';
  1493. }
  1494. }
  1495. grd_outrgst.refresh();
  1496. return;
  1497. */
  1498. }
  1499. //검사일정 정원 지우기
  1500. function fRemoveCapa(){
  1501. var rows = grd_calendar.rows;
  1502. var cols = grd_calendar.cols;
  1503. var cellColor = '';
  1504. for( var row = 1; row < rows; row++ ){
  1505. for( var col = 0; col < 7; col++){
  1506. cellColor = grd_calendar.cellStyle("background-color", row, col);
  1507. if( cellColor == "#99ff66" ){
  1508. grd_calendar.valueMatrix(row , col + 7) = '';
  1509. }
  1510. }
  1511. }
  1512. grd_calendar.refresh();
  1513. }
  1514. //달력을 클릭(선택) 했을 때
  1515. function fClickOnCalendar(){
  1516. var calRow = grd_calendar.row;
  1517. var calCol = grd_calendar.col;
  1518. if(calRow > 0 && calCol >= 0 ){
  1519. calCol = calCol % 7;
  1520. }else{
  1521. return false;
  1522. }
  1523. //달력색상을 저장을 위한 노드
  1524. model.makeNode("/root/tmp/cellColor");
  1525. //검사일정 체크위해
  1526. var cellColor = grd_calendar.cellStyle("background-color", calRow, calCol);
  1527. //선택된 셀 표시
  1528. setCellColor(calRow, calCol);
  1529. //fRemoveCapa();
  1530. //calCol = calCol % 7;
  1531. //달력색상을 저장(예약시 마감된 날짜를 처리하기 위해)
  1532. model.setValue("/root/tmp/cellColor", cellColor);
  1533. var isDay = grd_calendar.valueMatrix(calRow, calCol);
  1534. if( isDay != "" ){
  1535. if( isDay.length == 1 ) isDay = "0" + isDay;
  1536. var dd = ( (model.getValue("/root/hidden/calendar/year")).concat(model.getValue("/root/hidden/calendar/month")) ).concat(isDay);
  1537. //오늘 이후의 날자만 선택가능하게 한다.
  1538. // if( getDateInterval( getCurrentDate(), dd) <= 0 ){
  1539. //
  1540. // messageBox("금일 혹은 금일 이전으로 예약 불가능합니다.", "E999", "");
  1541. // model.removeNodeset("/root/main/outrgst/outrgstlist");
  1542. // grd_outrgst.refresh();
  1543. // return false;
  1544. // }else
  1545. if( cellColor == "#99ff66" ){
  1546. messageBox("의사일정이 검사로 잡힌 날은 전화예약 할 수 없습니다.", "E999", "");
  1547. model.removeNodeset("/root/main/outrgst/outrgstlist");
  1548. model.resetInstanceNode("/root/resercnt");
  1549. grd_outrgst.refresh();
  1550. return false;
  1551. }else if( grd_calendar.valueMatrix(calRow, calCol + 7) == '' || grd_calendar.valueMatrix(calRow, calCol + 7) == ' ' || grd_calendar.valueMatrix(calRow, calCol + 7).getTrim() == '\n'){
  1552. //Free 예약 권한
  1553. if( RA != 'Y'){
  1554. messageBox("의사 진료일정이 없는 날입니다.", "E999", "");
  1555. model.removeNodeset("/root/main/outrgst/outrgstlist");
  1556. model.resetInstanceNode("/root/resercnt");
  1557. grd_outrgst.refresh();
  1558. return false;
  1559. }
  1560. }
  1561. //달력날짜 세팅
  1562. model.setValue("/root/main/reservation/orddd", dd);
  1563. //model.setValue("/root/main/reservation/ordtm", "");
  1564. model.refresh();
  1565. ipt_orddd.dispatch("xforms-value-changed");
  1566. if( model.getValue("/root/main/reservation/orddeptcd") != "" && model.getValue("/root/main/reservation/orddrid") != "" && model.getValue("/root/main/reservation/orddd") != ""){
  1567. fGetOutRgst();
  1568. }
  1569. }
  1570. }
  1571. function fGetCalendarData(){
  1572. //1분 간격 풀기 초기화
  1573. model.setValue("/root/main/oneminute", "");
  1574. //외래등록내역 삭제
  1575. model.removeNodeset("/root/main/outrgst/outrgstlist");
  1576. model.resetInstanceNode("/root/resercnt");
  1577. model.resetInstanceNode("/root/send");
  1578. model.setValue("/root/send/centcd", model.getValue("/root/main/reservation/centcd"));
  1579. model.setValue("/root/send/orddeptcd", model.getValue("/root/main/reservation/orddeptcd"));
  1580. model.setValue("/root/send/subdeptcd", model.getValue("/root/main/reservation/subdeptcd"));
  1581. model.setValue("/root/send/orddrid", model.getValue("/root/main/reservation/orddrid"));
  1582. model.setValue("/root/send/date", model.getValue("/root/hidden/calendar/year") + model.getValue("/root/hidden/calendar/month"));
  1583. if( model.getValue("/root/send/centcd") == '' || model.getValue("/root/send/centcd") == ' '){
  1584. model.setValue("/root/send/centcd", '-');
  1585. }
  1586. model.resetInstanceNode("/root/main/result");
  1587. model.makeNode("/root/main/result/orddrfild");
  1588. model.makeNode("/root/main/result/calendarinfo");
  1589. var isMonth = model.getValue("/root/hidden/calendar/month");
  1590. var isYear = model.getValue("/root/hidden/calendar/year");
  1591. var isDate = (isYear+isMonth+1).toDate();
  1592. //진료의 정보가 없을 경우
  1593. if( model.getValue("/root/send/orddrid") == '' ){
  1594. setCalendar(isDate);
  1595. }else{
  1596. if(submit("TRPMO00203")){
  1597. if( getNodesetCount("/root/main/result/calendarinfo/calendarinfolist") > 0 ){
  1598. model.copyNode("/root/hidden/calendarinfo", "/root/main/result/calendarinfo");
  1599. setCalendar2(isDate);
  1600. //fRemoveCapa();
  1601. }else{
  1602. setCalendar(isDate);
  1603. }
  1604. model.setValue("/root/main/reservation/ordfild" , model.getValue("/root/main/result/orddrfild/orddrfildlist/ordfild"));
  1605. model.setValue("/root/main/reservation/fstexamrem" , model.getValue("/root/main/result/orddrfild/orddrfildlist/fstexamrem"));
  1606. model.setValue("/root/main/reservation/reexamrem" , model.getValue("/root/main/result/orddrfild/orddrfildlist/reexamrem"));
  1607. model.setValue("/root/main/reservation/centcdyn" , model.getValue("/root/main/result/centcdcheck/centcdckinfoyn/centcdyn"));
  1608. // model.removenode("/root/init/centcd");
  1609. // model.makeNode("/root/init/centcd");
  1610. // copyNodeType("/root/init/centcd", "/root/main/result/centcd" , "replace" , model , model);
  1611. // cmb_centcd.choices.itemset.attribute("nodeset") = "/root/init/centcd/centcdlist[cd = '"+ cmb_centcd.value +"' ]";
  1612. // cmb_centcd.choices.itemset.attribute("nodeset") = "/root/init/centcd/centcdlist";
  1613. // cmb_centcd.refresh();
  1614. model.refresh();
  1615. }
  1616. }
  1617. }
  1618. function fCheckSearchCond(){
  1619. if( model.getValue("/root/hidden/source/checkfnexam") == '1' ){
  1620. return true;
  1621. }else{
  1622. model.setValue("/root/hidden/source/checkfnexam", '1');
  1623. fDisableInputBox();
  1624. //fInitialize();
  1625. model.refresh();
  1626. return true;
  1627. }
  1628. }
  1629. function fOneMinuteSpread(){
  1630. if( model.getValue("/root/main/oneminute") == 'Y' || model.getValue("/root/main/oneminute") == 'y' ){
  1631. var rowCount = grd_outrgst.rows - grd_outrgst.fixedRows;
  1632. var timeNow;
  1633. var timeNext;
  1634. var orddd;
  1635. var interval;
  1636. for( var outer = 1; outer < rowCount; outer++ ){
  1637. orddd = grd_outrgst.valueMatrix( outer, 4);
  1638. timeNow = grd_outrgst.valueMatrix( outer, 0);
  1639. timeNext = grd_outrgst.valueMatrix( outer + 1, 0);
  1640. interval = getTimeInterval( timeNow, timeNext ) / 60;
  1641. for( inner = 1; inner < interval; inner++ ){
  1642. grd_outrgst.insertRow(outer, 'below', false, false);
  1643. outer = outer + 1;
  1644. rowCount = rowCount + 1;
  1645. timeNow = ((timeNow.toDate("hhmm")).getAddDate(1, 'm')).getDateFormat("hhmm");
  1646. grd_outrgst.valueMatrix(outer, 0) = timeNow;
  1647. grd_outrgst.valueMatrix(outer, 4) = orddd;
  1648. }
  1649. }
  1650. grd_outrgst.rebuild();
  1651. }else{
  1652. //fClickOnCalendar();
  1653. fGetOutRgst();
  1654. grd_outrgst.rebuild();
  1655. }
  1656. }
  1657. function fGetSexAgeBirthDD(){
  1658. //model.resetInstanceNode("/root/main/patinfo/patinfolist/age");
  1659. model.resetInstanceNode("/root/main/patinfo/patinfolist/brthdd");
  1660. var brthdd;
  1661. var rrgstno1 = model.getValue("/root/main/patinfo/patinfolist/rrgstno1");
  1662. var rrgstno2 = model.getValue("/root/main/patinfo/patinfolist/rrgstno2");
  1663. if (rrgstno1.length != 6){
  1664. //messageBox("환자주민번호1은 6자리입니다!","E999","");
  1665. model.setFocus("ipt_rrgstno1");
  1666. return false;
  1667. }
  1668. if (rrgstno2.length != 7){
  1669. //messageBox("환자주민번호2는 7자리입니다!","E999","");
  1670. model.setFocus("ipt_rrgstno2");
  1671. return false;
  1672. }
  1673. /*
  1674. 9: 1800 ~ 1899년에 태어난 남성
  1675. 0: 1800 ~ 1899년에 태어난 여성
  1676. 1: 1900 ~ 1999년에 태어난 남성
  1677. 2: 1900 ~ 1999년에 태어난 여성
  1678. 3: 2000 ~ 2099년에 태어난 남성
  1679. 4: 2000 ~ 2099년에 태어난 여성
  1680. 5: 1900 ~ 1999년에 태어난 외국인 남성
  1681. 6: 1900 ~ 1999년에 태어난 외국인 여성
  1682. 7: 2000 ~ 2099년에 태어난 외국인 남성
  1683. 8: 2000 ~ 2099년에 태어난 외국인 여성
  1684. */
  1685. var gubn = rrgstno2.substr(0,1);
  1686. switch(gubn){
  1687. case '0' :
  1688. brthdd = '18'.concat(rrgstno1);
  1689. break;
  1690. case '9' :
  1691. brthdd = '18'.concat(rrgstno1);
  1692. break;
  1693. case '1' :
  1694. brthdd = '19'.concat(rrgstno1);
  1695. break;
  1696. case '2' :
  1697. brthdd = '19'.concat(rrgstno1);
  1698. break;
  1699. case '3' :
  1700. brthdd = '20'.concat(rrgstno1);
  1701. break;
  1702. case '4' :
  1703. brthdd = '20'.concat(rrgstno1);
  1704. break;
  1705. case '5' :
  1706. brthdd = '19'.concat(rrgstno1);
  1707. break;
  1708. case '6' :
  1709. brthdd = '19'.concat(rrgstno1);
  1710. break;
  1711. case '7' :
  1712. brthdd = '20'.concat(rrgstno1);
  1713. break;
  1714. case '8' :
  1715. brthdd = '20'.concat(rrgstno1);
  1716. break;
  1717. default :
  1718. brthdd = '19'.concat(rrgstno1);
  1719. break;
  1720. }
  1721. if (isValidDateTime(brthdd, "YYYYMMDD") == false){
  1722. messageBox("주민번호 앞6자리 형식오류입니다. 올바른 일자형태로 입력하십시요!","E999","");
  1723. // model.setFocus("ipt_hngnm");
  1724. // model.setValue("/root/main/patinfo/patinfolist/rrgstno1","");
  1725. // model.setValue("/root/main/patinfo/patinfolist/rrgstno2","");
  1726. model.setValue("/root/main/patinfo/patinfolist/brthdd","00000000");
  1727. model.setFocus("ipt_rrgstno1");
  1728. // model.refresh();
  1729. return false;
  1730. }
  1731. //model.setValue("/root/main/patinfo/patinfolist/brthdd",brthdd);
  1732. if( isValidDateTime(model.getValue("/root/main/patinfo/patinfolist/brthdd")) == false){
  1733. model.setValue("/root/main/patinfo/patinfolist/brthdd",brthdd);
  1734. }
  1735. var sex = model.getValue("/root/main/patinfo/patinfolist/rrgstno2");
  1736. if( model.getValue("/root/main/patinfo/patinfolist/sex") != 'M' || model.getValue("/root/main/patinfo/patinfolist/sex") != 'F' ){
  1737. model.setValue("/root/main/patinfo/patinfolist/sex",getGender(sex));
  1738. }
  1739. //model.setValue("/root/main/patinfo/patinfolist/sex",getGender(sex));
  1740. //var rrgstno = 0;
  1741. var rrgstno = rrgstno1.concat(rrgstno2);
  1742. //var age = rrgstno1;
  1743. model.setValue("/root/main/patinfo/patinfolist/age",getFullAge(model.getValue("/root/main/patinfo/patinfolist/brthdd")));
  1744. //model.refresh();
  1745. if (isResidentNo(rrgstno) == false){
  1746. messageBox("유효하지 않은 주민번호입니다!","E999","");
  1747. model.setFocus("ipt_rrgstno1");
  1748. return false;
  1749. }
  1750. //생년월일 세팅 후 휴대전화 입력란으로 이동
  1751. model.setFocus("ipt_hometel");
  1752. return true;
  1753. }
  1754. //예약데이터가 정상적으로 모두 입력되었는지 체크한다.
  1755. function fIsRsrvDataOK(){
  1756. //환자이름 체크
  1757. if( model.getValue("/root/main/patinfo/patinfolist/hngnm").getTrim().length < 1 ){
  1758. messageBox("환자 이름을 정확히 입력하지 않았습니다. 다시 시도해 주십시오.", "E999", "" );
  1759. model.setFocus("ipt_pid");
  1760. return false;
  1761. }
  1762. //환자 휴대전화번호 체크
  1763. if( model.getValue("/root/main/patinfo/patinfolist/mpphontel").getTrim().length < 1 && model.getValue("/root/main/patinfo/patinfolist/hometel").getTrim().length < 1 ){
  1764. messageBox("환자 휴대전화 번호 또는 연락처는 필수 입력입니다. 다시 시도해 주십시오.", "E999", "" );
  1765. if(model.getValue("/root/main/patinfo/patinfolist/mpphontel").getTrim().length < 1){
  1766. model.setFocus("ipt_mpphontel");
  1767. }else{
  1768. model.setFocus("ipt_hometel");
  1769. }
  1770. return false;
  1771. }
  1772. //환자 주민번호 체크
  1773. var rrgstno1 = model.getValue("/root/main/patinfo/patinfolist/rrgstno1").getTrim();
  1774. var rrgstno2 = model.getValue("/root/main/patinfo/patinfolist/rrgstno2").getTrim();
  1775. var rrgstno = rrgstno1.concat(rrgstno2);
  1776. if( rrgstno1.length != 6 || rrgstno2.length != 7){
  1777. if( messageBox("주민등록번호를 정확히 입력하지 않았습니다. 무시하고 계속 진행하시겠습니까?", "Q999", "") != 6){
  1778. model.setFocus("ipt_rrgstno1");
  1779. return false;
  1780. }
  1781. //사용자 요청사항 주민등록번호를 입력하지 않아도 예약이 진행되도록!!
  1782. if(rrgstno1.length != 6){
  1783. model.setValue("/root/main/patinfo/patinfolist/rrgstno1", "000000");
  1784. }
  1785. if(rrgstno2.length != 7){
  1786. model.setValue("/root/main/patinfo/patinfolist/rrgstno2", "0000000");
  1787. }
  1788. }else if (isResidentNo(rrgstno) == false){
  1789. if( messageBox("유효하지 않은 주민등록번호입니다. 무시하고 계속 진행하시겠습니까?", "Q999", "") != 6){
  1790. model.setFocus("ipt_rrgstno1");
  1791. return false;
  1792. }
  1793. }
  1794. //환자 주소 체크 - 우편번호 포함. 2007-10-06 수정 - 조주희 선생님 요구사항 오류체크하지 말것!
  1795. //우편번호 체크 부분 주석처리(2016/03/16 이정택)
  1796. /*
  1797. var zipcd1 = model.getValue("/root/main/patinfo/patinfolist/zipcd1");
  1798. var zipcd2 = model.getValue("/root/main/patinfo/patinfolist/zipcd2");
  1799. if( zipcd1.length != 3 || zipcd2.length != 3 ){
  1800. //messageBox("우편번호 형식이 정확하지 않습니다.", "E999", "");
  1801. model.setValue("/root/main/patinfo/patinfolist/zipcd1", '000');
  1802. model.setValue("/root/main/patinfo/patinfolist/zipcd2", '000');
  1803. model.setValue("/root/main/patinfo/patinfolist/zipcdseq", '0');
  1804. model.refresh();
  1805. //model.setFocus("ipt_zipcd1");
  1806. //return false;
  1807. }
  1808. */
  1809. //의뢰서 설명 여부 체크
  1810. var ordreqdesc = model.getValue("/root/main/reservation/ordreqdescyn");
  1811. if( ordreqdesc == '' || ordreqdesc == null || ordreqdesc == '-' || ordreqdesc == ' '){
  1812. messageBox("의뢰서 설명 여부가 선택되지 않았습니다. 다시 시도해 주십시오", "E999");
  1813. return false;
  1814. }
  1815. var orddeptcd = model.getValue("/root/main/reservation/orddeptcd");
  1816. var orddrid = model.getValue("/root/main/reservation/orddrid");
  1817. var orddd = model.getValue("/root/main/reservation/orddd");
  1818. var ordtm = model.getValue("/root/main/reservation/ordtm");
  1819. var nowDD = getCurrentDate();
  1820. var nowTM = getCurrentTime();
  1821. if( orddeptcd == '' || orddeptcd == null || orddeptcd == '-' || orddeptcd == ' ' ){
  1822. messageBox("진료과가 선택되지 않았습니다. 다시 시도해 주십시오.", "E999", "" );
  1823. model.setFocus("cmb_deptcd");
  1824. return false;
  1825. }else if( orddrid == '' || orddrid == null || orddrid == '-' || orddrid == ' ' ){
  1826. messageBox("진료의가 선택되지 않았습니다. 다시 시도해 주십시오.", "E999", "" );
  1827. model.setFocus("cmb_orddrid");
  1828. return false;
  1829. }else if( ! isValidDateTime( orddd, "YYYYMMDD")){
  1830. messageBox("잘못된 진료일자를 입력하셨습니다. 다시 시도해 주십시오.", "E999", "" );
  1831. model.setFocus("ipt_orddd");
  1832. return false;
  1833. }else if( ! isValidDateTime( ordtm, "hhmm")){
  1834. messageBox("잘못된 진료시간을 입력하셨습니다. 다시 시도해 주십시오.", "E999", "" );
  1835. model.setFocus("ipt_ordtm");
  1836. return false;
  1837. }
  1838. /*
  1839. else if( getDateInterval( nowDD, orddd) <= 0 ){
  1840. messageBox("오늘일자 이후로만 예약가능합니다. 다시 시도해 주십시오.", "E999", "" );
  1841. model.setFocus("ipt_orddd");
  1842. return false;
  1843. }else if( orddd == nowDD && getTimeInterval( nowTM, ordtm) <= 0 ){
  1844. messageBox("진료일자가 오늘일 경우 진료시간을 현재시간 이전으로 선택할 수 없습니다. 다시 시도해 주십시오.", "E999", "" );
  1845. model.setFocus("ipt_orddd");
  1846. return false;
  1847. }
  1848. */
  1849. //진료의사 휴진/당직 스케쥴 체크 - 20131031
  1850. if(!fCheckDrSche(orddrid, orddeptcd, orddd, ordtm, "Y", "-", "-", "-")){
  1851. return false;
  1852. }
  1853. return true;
  1854. }
  1855. //예약/접수 정보 변경시 변경 할 수 있는 정보인지 또는 데이터를 올바르게 변경하였는지 등을 체크한다.
  1856. function fIsRsrvUpdtDataOK(){
  1857. var histstat = model.getValue("/root/main/reservation/histstat");
  1858. var dracptyn = model.getValue("/root/main/reservation/dracptyn");
  1859. var prcpgenryn = model.getValue("/root/main/reservation/prcpgenryn");
  1860. //예약이력
  1861. if( histstat == 'T' ){
  1862. if( dracptyn == 'Y' ){
  1863. messageBox("의사가 접수한 내역은 변경/취소할 수 없습니다.", "E999", "");
  1864. return false;
  1865. }
  1866. return true;
  1867. //접수이력
  1868. }else if( histstat == 'R' ){
  1869. //의사접수여부가 'Y'인 내역은 변경/취소할 수 없습니다.
  1870. if( dracptyn == 'Y' ){
  1871. messageBox("의사가 접수한 내역은 변경/취소할 수 없습니다.", "E999", "");
  1872. return false;
  1873. //처방발생여부가 'Y'인 내역은 변경/취소할 수 없습니다.
  1874. }else if( prcpgenryn != '-' && prcpgenryn != '1A' && prcpgenryn != '1C'){
  1875. messageBox("처방이 발생한 내역은 변경/취소할 수 없습니다.", "E999", "");
  1876. return false;
  1877. }else{
  1878. var specordyn = model.getValue("/root/main/reservation/specorddescyn");
  1879. var specordyn_old = model.getValue("/root/tmp/reservation/specorddescyn");
  1880. var fsexamflag = model.getValue("/root/main/reservation/fsexamflag");
  1881. var fsexamflag_old = model.getValue("/root/tmp/reservation/fsexamflag");
  1882. //선택진료여부가 변경될 경우
  1883. if( specordyn != specordyn_old ){
  1884. model.setValue("/root/main/reservation/calcyn", 'Y');
  1885. model.setValue("/root/main/reservation/calcflag", 'Y');
  1886. messageBox("선택진료여부가 변경되었습니다. 진찰료에 대해 추가금액 또는 환불금액이 발생할 수 있습니다.", "I999", "");
  1887. }
  1888. //초재진구분이 변경될 경우
  1889. if( (fsexamflag != fsexamflag_old) && (fsexamflag == 'R' || fsexamflag_old=='R') ){
  1890. model.setValue("/root/main/reservation/calcyn", 'Y');
  1891. model.setValue("/root/main/reservation/calcflag", 'Y');
  1892. messageBox("초재진구분이 변경되었습니다. 진찰료에 대해 추가금액 또는 환불금액이 발생할 수 있습니다.", "I999", "");
  1893. }
  1894. return true;
  1895. }
  1896. //변경/취소할 수 없는 이력내역
  1897. }else{
  1898. messageBox("수정/삭제 하실 수 없는 외래이력내역입니다.", "E999", "");
  1899. return false;
  1900. }
  1901. }
  1902. //초재진여부 조회
  1903. function fGetFsexamFlag(){
  1904. //신환/구환 체크
  1905. if( model.getValue("/root/main/patinfo/patinfolist/pid") == '' || model.getValue("/root/main/patinfo/patinfolist/pid") == null ){
  1906. model.setValue("/root/hidden/source/checkfnexam", "1");
  1907. }else{
  1908. model.setValue("/root/hidden/source/checkfnexam", "3");
  1909. }
  1910. //구환환자
  1911. if( model.getValue("/root/hidden/source/checkfnexam") == 3 ){
  1912. var orddd = model.getValue("/root/main/reservation/orddd");
  1913. var nowDD = getCurrentDate();
  1914. var orddeptcd = model.getValue("/root/main/reservation/orddeptcd");
  1915. var orddrid = model.getValue("/root/main/reservation/orddrid");
  1916. var pid = model.getValue("/root/main/patinfo/patinfolist/pid");
  1917. var oldcretno = model.getValue("/root/tmp/reservation/cretno");
  1918. var oldacptseqno = model.getValue("/root/tmp/reservation/acptseqno");
  1919. var oldorddd = model.getValue("/root/tmp/reservation/orddd");
  1920. if(orddd == ''){
  1921. orddd = nowDD;
  1922. }
  1923. if( isValidDateTime(orddd, "YYYYMMDD") && getDateInterval( nowDD, orddd) >= 0 ){
  1924. var fsexamflag = model.getValue("/root/main/reservation/fsexamflag");
  1925. model.setValue("/root/main/reservation/fsexamflag", '');
  1926. if( orddeptcd == '' ){ // || orddrid == '' ){
  1927. //messageBox("진료과 또는 진료의가 선택되지 않아 초재진여부를 구할 수 없습니다.", "E999", "");
  1928. return false;
  1929. }else if( pid == '' ){
  1930. //messageBox("환자등록번호가 입력되지 않아 초재진여부를 구할 수 없습니다.", "E999", "");
  1931. return false;
  1932. }else{
  1933. //model.resetInstanceNode("/root/send");
  1934. model.removeNodeset("/root/send/getfsexamflag");
  1935. // model.makeNode("/root/send/getfsexamflag/flag");
  1936. // model.makeNode("/root/send/mskind");
  1937. // model.makeNode("/root/send/ordtype");
  1938. // model.makeNode("/root/send/tmp");
  1939. // model.makeNode("/root/send/oldcretno");
  1940. // model.makeNode("/root/send/oldacptseqno");
  1941. // model.makeNode("/root/send/oldorddd");
  1942. model.makeValue("/root/send/getfsexamflag/flag", 'B');
  1943. model.makeValue("/root/send/getfsexamflag/mskind", 'M');
  1944. model.makeValue("/root/send/getfsexamflag/ordtype", 'O');
  1945. model.makeValue("/root/send/getfsexamflag/tmp", '-');
  1946. model.makeValue("/root/send/getfsexamflag/pid", pid);
  1947. model.makeValue("/root/send/getfsexamflag/orddrid", orddrid);
  1948. model.makeValue("/root/send/getfsexamflag/orddeptcd", orddeptcd);
  1949. model.makeValue("/root/send/getfsexamflag/orddd", orddd);
  1950. model.makeValue("/root/send/getfsexamflag/oldcretno", oldcretno);
  1951. model.makeValue("/root/send/getfsexamflag/oldacptseqno", oldacptseqno);
  1952. model.makeValue("/root/send/getfsexamflag/oldorddd", oldorddd);
  1953. model.makeNode("/root/main/result/fsexam");
  1954. //초진재진 구분 기능 호출
  1955. if(submit("TRPMO00207")){
  1956. var fsexamflag = model.getValue("/root/main/result/fsexam/otpt/fsexamflag");
  1957. model.setValue("/root/main/reservation/fsexamflag", fsexamflag);
  1958. //2016/11/28
  1959. /*
  1960. if( fsexamflag == "R" || fsexamflag == "S"){
  1961. opt_remfact.attribute("ref") = "/root/main/reservation/reexamrem";
  1962. model.refresh();
  1963. }else{
  1964. opt_remfact.attribute("ref") = "/root/main/reservation/fstexamrem";
  1965. model.refresh();
  1966. }
  1967. */
  1968. //2016/11/28
  1969. }
  1970. model.removeNodeset("/root/main/result/fsexam");
  1971. model.removeNodeset("/root/send/getfsexamflag");
  1972. // model.removenode("/root/send/flag");
  1973. // model.removenode("/root/send/mskind");
  1974. // model.removenode("/root/send/ordtype");
  1975. // model.removenode("/root/send/tmp");
  1976. // model.removenode("/root/send/oldcretno");
  1977. // model.removenode("/root/send/oldacptseqno");
  1978. // model.removenode("/root/send/oldorddd");
  1979. }
  1980. }
  1981. //신환환자
  1982. }else{
  1983. model.setValue("/root/main/reservation/fsexamflag", 'F');
  1984. //2016/11/28
  1985. /*
  1986. opt_remfact.attribute("ref") = "/root/main/reservation/fstexamrem";
  1987. model.refresh();
  1988. */
  1989. //2016/11/28
  1990. }
  1991. model.refresh();
  1992. }
  1993. //2007-10-05 이동식 - 예약/변경/취소 후 화면 클리어, 주민등록번호는 하단에 따로 보관한다.
  1994. function fClearAfterSave(){
  1995. //주민등록번호 보관
  1996. var rrgstno1 = model.getValue("/root/main/patinfo/patinfolist/rrgstno1");
  1997. var rrgstno2 = model.getValue("/root/main/patinfo/patinfolist/rrgstno2");
  1998. var hngnm = model.getValue("/root/main/patinfo/patinfolist/hngnm");
  1999. //화면클리어
  2000. model.resetInstanceNode("/root/main/patinfo/patinfolist");
  2001. //fInitialize();
  2002. btn_clear.dispatch("DOMActivate");
  2003. //주민등록번호를 화면 하단에 저장.
  2004. model.setValue("/root/hidden/holdrrgstno/rrgstno1", rrgstno1);
  2005. model.setValue("/root/hidden/holdrrgstno/rrgstno2", rrgstno2);
  2006. model.setValue("/root/hidden/holdrrgstno/hngnm", hngnm);
  2007. model.refresh();
  2008. }
  2009. //END..
  2010. //2008-04-23일 김상민 - 취소시 변경 내역 체크
  2011. function fCnclCheck() {
  2012. if ( (model.getValue("/root/main/reservation/orddeptcd") ) != ( model.getValue("/root/tmp/reservation/orddeptcd")) ) return true; //진료과
  2013. if ( (model.getValue("/root/main/reservation/orddrid") ) != ( model.getValue("/root/tmp/reservation/orddrid")) ) return true; //진료의
  2014. if ( (model.getValue("/root/main/reservation/orddd") ) != ( model.getValue("/root/tmp/reservation/orddd")) ) return true; //진료일자
  2015. if ( (model.getValue("/root/main/reservation/ordtm") ) != ( model.getValue("/root/tmp/reservation/ordtm")) ) return true; //진료시간
  2016. if ( (model.getValue("/root/main/reservation/specorddescyn") ) != ( model.getValue("/root/tmp/reservation/specorddescyn")) ) return true; //선택진료설명여부
  2017. if ( (model.getValue("/root/main/reservation/insuchrgyn") ) != ( model.getValue("/root/tmp/reservation/insuchrgyn")) ) return true; //보험회사직원여부
  2018. if ( (model.getValue("/root/main/reservation/ordreqdescyn") ) != ( model.getValue("/root/tmp/reservation/ordreqdescyn")) ) return true; //의뢰서설명여부
  2019. if ( (model.getValue("/root/main/reservation/ordreqhospgrde") ) != ( model.getValue("/root/tmp/reservation/ordreqhospgrde")) ) return true; //의뢰서병원등급
  2020. if ( (model.getValue("/root/main/reservation/telrsrvrem") ) != ( model.getValue("/root/tmp/reservation/telrsrvrem")) ) return true; //통화내용
  2021. return false;
  2022. }
  2023. //예약시 생일 한번더 체크
  2024. function fGetBirthDD(){
  2025. model.resetInstanceNode("/root/main/patinfo/patinfolist/brthdd");
  2026. var brthdd;
  2027. var rrgstno1 = model.getValue("/root/main/patinfo/patinfolist/rrgstno1");
  2028. var rrgstno2 = model.getValue("/root/main/patinfo/patinfolist/rrgstno2");
  2029. var gubn = rrgstno2.substr(0,1);
  2030. switch(gubn){
  2031. case '1' :
  2032. case '2' :
  2033. case '5' :
  2034. case '6' :
  2035. brthdd = '19'.concat(rrgstno1);
  2036. break;
  2037. case '3' :
  2038. case '4' :
  2039. case '7' :
  2040. case '8' :
  2041. brthdd = '20'.concat(rrgstno1);
  2042. break;
  2043. case '9' :
  2044. case '0' :
  2045. brthdd = '18'.concat(rrgstno1);
  2046. break;
  2047. default :
  2048. brthdd = '19'.concat(rrgstno1);
  2049. break;
  2050. }
  2051. if( isValidDateTime(model.getValue("/root/main/patinfo/patinfolist/brthdd")) == false){
  2052. model.setValue("/root/main/patinfo/patinfolist/brthdd",brthdd);
  2053. }
  2054. var sex = model.getValue("/root/main/patinfo/patinfolist/rrgstno2");
  2055. if( model.getValue("/root/main/patinfo/patinfolist/sex") != 'M' || model.getValue("/root/main/patinfo/patinfolist/sex") != 'F' ){
  2056. model.setValue("/root/main/patinfo/patinfolist/sex",getGender(sex));
  2057. }
  2058. var rrgstno = rrgstno1.concat(rrgstno2);
  2059. model.setValue("/root/main/patinfo/patinfolist/age",getFullAge(model.getValue("/root/main/patinfo/patinfolist/brthdd")));
  2060. return true;
  2061. }
  2062. function outhistColorChange(){
  2063. grd_outhist.allStyle("all","background-color") = "#ffffff"; // 배경색을 초기화 한다.
  2064. setRowStyle("grd_outhist", "2","Y","holiyn","equal"); //row의 색상을 변경한다.
  2065. grd_outhist.rebuild();
  2066. }
  2067. //2009-02-27일 김상민 예약대기 상태(진료일자를 99991231로 변경)
  2068. function fStandBy(){
  2069. if( model.getValue("/root/main/patinfo/patinfolist/pid") == '' && model.getValue("/root/main/patinfo/patinfolist/hngnm") == '' ){
  2070. messageBox("환자조회 후 작업해 주세요.!!","E999", "");
  2071. return false;
  2072. }
  2073. if(messageBox("예약대기 상태로 변경 하시겠습니까?", "Q999") != 6) return;
  2074. var cur_col = grd_outhist.col;
  2075. var cur_row = grd_outhist.row;
  2076. //var curDate = getCurrentDate();
  2077. if(cur_col == grd_outhist.colRef("bfordddyn")){
  2078. return;
  2079. }
  2080. if( cur_row > 0 && cur_col ){ // && grd_outhist.colRef("bfordddyn") != cur_col ){
  2081. //예약내역 노드 초기화
  2082. model.resetInstanceNode("/root/main/reservation");
  2083. //수정 불가능한 내역을 선택했을 경우!!
  2084. if( grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("histstat")) == 'R' ){
  2085. //의사접수여부가 'Y'인 내역은 변경/취소할 수 없습니다.
  2086. if( grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("dracptyn")) == 'Y' ){
  2087. messageBox("진료본 내역은 변경 할 수 없습니다.", "E999", "");
  2088. return false;
  2089. //처방발생여부가 'Y'인 내역은 변경/취소할 수 없습니다.
  2090. }else if( grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("prcpgenryn")) == 'Y' ){
  2091. messageBox("처방이 발생한 내역은 변경할 수 없습니다.", "E999", "");
  2092. return false;
  2093. }else if( grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("rsrvflag")) == 'X' ){
  2094. messageBox("6시간 이내 응급내역은 변경할 수 없습니다.", "E999", "");
  2095. return false;
  2096. }
  2097. }else if( grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("histstat")) == 'X' ){
  2098. messageBox("예약취소한 내역은 변경할 수 없습니다.", "E999", "");
  2099. return false;
  2100. }
  2101. if( grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("etcordflag")) != 'B' || grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("etcordflag")) != '-' ) {
  2102. model.setValue("/root/main/reservation/etcordflag", '-');
  2103. model.setValue("/root/main/reservation/etcordflag", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("etcordflag")) );
  2104. }
  2105. }
  2106. //재원여부체크
  2107. if( ! fInhospynCheck() ){
  2108. return false;
  2109. }
  2110. // 신환/구환을 구분한다.
  2111. if(model.getValue("/root/main/patinfo/patinfolist/pid").length > 0 ){
  2112. model.setValue("/root/hidden/source/checkfnexam", '3');
  2113. }else{
  2114. model.setValue("/root/hidden/source/checkfnexam", '1');
  2115. }
  2116. fStandbyRsrv('C');
  2117. }
  2118. function fStandbyRsrv( histstat ){
  2119. //send node reset
  2120. model.resetInstanceNode("/root/send/updatedata");
  2121. model.refresh();
  2122. //make nodes
  2123. model.makeNode("/root/send/updatedata/patinfolist");
  2124. model.makeNode("/root/send/updatedata/reservation");
  2125. model.makeNode("/root/send/updatedata/checkfnexam");
  2126. //model.makeNode("/root/send/updatedata/histstat");
  2127. var cur_row = grd_outhist.row;
  2128. var dd = '99991231'
  2129. var fsexamflag = grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("fsexamflag"));
  2130. var etcordflag = grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("etcordflag"));
  2131. // var fsexamflag = model.getValue("/root/main/outhist/outhistlist[" + cur_row + "]/fsexamflag");
  2132. // var etcordflag = model.getValue("/root/main/outhist/outhistlist[" + cur_row + "]/etcordflag");
  2133. //기타진료에 null값 들어가는 문제 방지
  2134. if(etcordflag == '' || etcordflag == ' '){
  2135. model.setValue("/root/main/reservation/etcordflag", '-');
  2136. }
  2137. //예약변경시 생일 체크
  2138. fGetBirthDD();
  2139. var rsrvflag;
  2140. model.setValue("/root/send/updatedata/checkfnexam", model.getValue("/root/hidden/source/checkfnexam"));
  2141. //환자정보 값을 send 노드 아래로 복사한다.
  2142. model.copyNode("/root/send/updatedata/patinfolist", "/root/main/patinfo/patinfolist");
  2143. //환자정보에 있는 진료일자, 진료과, 접수일, 접수번호, 예약 구분 플래그를 삭제한다. - PMOHTEMP 테이블에서 초진환자 정보를 가져올때 같이 가져오기 때문에..
  2144. model.setValue("root/send/orddrid", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("orddd")) );
  2145. model.setValue("root/send/orddeptcd", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("orddeptcd")) );
  2146. model.setValue("root/send/subdeptcd", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("subdeptcd")) );
  2147. model.setValue("root/send/orddd", dd);
  2148. model.removenode("/root/send/updatedata/patinfolist/orddd");
  2149. model.removenode("/root/send/updatedata/patinfolist/orddeptcd");
  2150. model.removenode("/root/send/updatedata/patinfolist/acptdd");
  2151. model.removenode("/root/send/updatedata/patinfolist/acptno");
  2152. model.removenode("/root/send/updatedata/patinfolist/rsrvflag");
  2153. model.makeNode("/root/send/updatedata/reservation/acptdd");
  2154. model.makeNode("/root/send/updatedata/reservation/acptno") ;
  2155. model.makeNode("/root/send/updatedata/reservation/specorddescyn");
  2156. model.makeNode("/root/send/updatedata/reservation/insuchrgyn");
  2157. model.makeNode("/root/send/updatedata/reservation/ordreqdescyn");
  2158. model.makeNode("/root/send/updatedata/reservation/ordreqhospgrde");
  2159. model.makeNode("/root/send/updatedata/reservation/fstacptid");
  2160. model.makeNode("/root/send/updatedata/reservation/fstacptdt");
  2161. model.makeNode("/root/send/updatedata/reservation/acptseqno");
  2162. model.makeNode("/root/send/updatedata/reservation/cretno");
  2163. model.makeNode("/root/send/updatedata/reservation/oldorddd");
  2164. model.makeNode("/root/send/updatedata/reservation/telrsrvrem");
  2165. model.makeNode("/root/send/updatedata/reservation/updtcnclresn");
  2166. model.makeNode("/root/send/updatedata/reservation/calcyn");
  2167. model.makeNode("/root/send/updatedata/reservation/calcflag");
  2168. model.makeNode("/root/send/updatedata/reservation/medamtestmyn");
  2169. model.makeNode("/root/send/updatedata/reservation/histstat");
  2170. model.makeNode("/root/send/updatedata/reservation/rsrvflag");
  2171. model.makeNode("/root/send/updatedata/reservation/dracptyn");
  2172. model.makeNode("/root/send/updatedata/reservation/prcpgenryn");
  2173. model.makeNode("/root/send/updatedata/reservation/coopteamcd");
  2174. model.makeNode("/root/send/updatedata/reservation/remfact");
  2175. model.makeNode("/root/send/updatedata/reservation/etcordflag");
  2176. model.makeNode("/root/send/updatedata/reservation/rqstflag");
  2177. model.makeNode("/root/send/updatedata/reservation/rqsthospcd");
  2178. model.makeNode("/root/send/updatedata/reservation/rqstdrid");
  2179. model.makeNode("/root/send/updatedata/reservation/onestop");
  2180. model.makeNode("/root/send/updatedata/reservation/orddd");
  2181. model.makeNode("/root/send/updatedata/reservation/ordtm");
  2182. model.makeNode("/root/send/updatedata/reservation/centcd");
  2183. model.makeNode("/root/send/updatedata/reservation/orddeptcd");
  2184. model.makeNode("/root/send/updatedata/reservation/subdeptcd");
  2185. model.makeNode("/root/send/updatedata/reservation/orddrid");
  2186. model.makeNode("/root/send/updatedata/reservation/fsexamflag");
  2187. model.makeNode("/root/send/updatedata/reservation/tablename");
  2188. model.makeNode("/root/send/updatedata/reservation/specordyn");
  2189. model.makeNode("/root/send/updatedata/reservation/ordreqformflag");
  2190. //선택된 행의 값을 예약 파트로 복사
  2191. model.setValue("/root/send/updatedata/reservation/acptdd", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("acptdd")) );
  2192. model.setValue("/root/send/updatedata/reservation/acptno", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("acptno")) );
  2193. model.setValue("/root/send/updatedata/reservation/specorddescyn", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("specorddescyn")) );
  2194. model.setValue("/root/send/updatedata/reservation/insuchrgyn", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("insuchrgyn")) );
  2195. model.setValue("/root/send/updatedata/reservation/ordreqdescyn", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("ordreqdescyn")) );
  2196. model.setValue("/root/send/updatedata/reservation/ordreqhospgrde", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("ordreqhospgrde")) );
  2197. model.setValue("/root/send/updatedata/reservation/fstacptid", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("fstacptid")) );
  2198. model.setValue("/root/send/updatedata/reservation/fstacptdt", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("fstacptdt")) );
  2199. model.setValue("/root/send/updatedata/reservation/acptseqno", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("acptseqno")) );
  2200. model.setValue("/root/send/updatedata/reservation/cretno", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("cretno")) );
  2201. model.setValue("/root/send/updatedata/reservation/oldorddd", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("orddd")) );
  2202. model.setValue("/root/send/updatedata/reservation/telrsrvrem", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("telrsrvrem")) );
  2203. model.setValue("/root/send/updatedata/reservation/updtcnclresn", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("updtcnclresn")) );
  2204. model.setValue("/root/send/updatedata/reservation/calcyn", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("calcyn")) );
  2205. model.setValue("/root/send/updatedata/reservation/calcflag", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("calcflag")) );
  2206. model.setValue("/root/send/updatedata/reservation/medamtestmyn", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("medamtestmyn")) );
  2207. model.setValue("/root/send/updatedata/reservation/histstat", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("histstat")) );
  2208. model.setValue("/root/send/updatedata/reservation/rsrvflag", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("rsrvflag")) );
  2209. model.setValue("/root/send/updatedata/reservation/dracptyn", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("dracptyn")) );
  2210. model.setValue("/root/send/updatedata/reservation/prcpgenryn", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("prcpgenryn")) );
  2211. model.setValue("/root/send/updatedata/reservation/coopteamcd", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("coopteamcd")) );
  2212. model.setValue("/root/send/updatedata/reservation/remfact", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("remfact")) );
  2213. model.setValue("/root/send/updatedata/reservation/etcordflag", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("etcordflag")) );
  2214. model.setValue("/root/send/updatedata/reservation/specordyn", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("specordyn")) );
  2215. model.setValue("/root/send/updatedata/reservation/ordreqformflag", model.getValue("/root/main/reservation/ordreqformflag"));
  2216. //협진
  2217. model.setValue("/root/send/updatedata/reservation/rqstflag", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("rqstflag")) );
  2218. model.setValue("/root/send/updatedata/reservation/rqsthospcd", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("rqsthospcd")) );
  2219. model.setValue("/root/send/updatedata/reservation/rqstdrid", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("rqstdrid")) );
  2220. model.setValue("/root/send/updatedata/reservation/onestop", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("onestop")) );
  2221. //진료일,시간, 진료과,의사
  2222. model.setValue("/root/send/updatedata/reservation/orddd", dd);
  2223. model.setValue("/root/send/updatedata/reservation/ordtm", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("ordtm")) );
  2224. model.setValue("/root/send/updatedata/reservation/centcd", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("centcd")) );
  2225. model.setValue("/root/send/updatedata/reservation/orddeptcd", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("orddeptcd")) );
  2226. model.setValue("/root/send/updatedata/reservation/subdeptcd", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("subdeptcd")) );
  2227. model.setValue("/root/send/updatedata/reservation/orddrid", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("orddrid")) );
  2228. model.setValue("/root/send/updatedata/reservation/fsexamflag", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("fsexamflag")) );
  2229. model.setValue("/root/send/updatedata/reservation/tablename", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("tablename")) );
  2230. /*
  2231. model.removeNodeset("/root/tmp/reservation");
  2232. model.makeNode("/root/tmp/reservation");
  2233. model.copyNode("/root/tmp/reservation", "/root/main/reservation");
  2234. */
  2235. /*
  2236. if( cur_row > 0 ){
  2237. //예약정보를 SEND로 복사한다. **************수정해야됨
  2238. model.setValue("/root/send/updatedata/reservation" ,getNodeListCSV(instance1.selectNodes("/root/main/outhist/outhistlist[" + cur_row + "]")));
  2239. //model.copyNode("/root/send/updatedata/reservation", "/root/main/reservation[" + cur_row + "]");
  2240. }
  2241. */
  2242. model.makeNode("/root/send/updatedata/reservation/histstat");
  2243. model.setValue("/root/send/updatedata/reservation/histstat", histstat);
  2244. //변경전 데이터를 가져가기 위해 변경전의 데이터도 함께 SEND로 복사한다.
  2245. if( histstat == 'C'){
  2246. //변경전의 데이터 세팅..
  2247. model.makeNode("/root/send/updatedata/reservation/bforddd");
  2248. model.makeNode("/root/send/updatedata/reservation/bfordtm");
  2249. model.makeNode("/root/send/updatedata/reservation/bforddeptcd");
  2250. model.makeNode("/root/send/updatedata/reservation/bforddrid");
  2251. model.makeNode("/root/send/updatedata/reservation/bfacptseqno");
  2252. model.makeNode("/root/send/updatedata/reservation/bfcretno");
  2253. //model.makeNode("/root/send/updatedata/reservation/updtcnclresn");
  2254. model.makeNode("/root/send/updatedata/reservation/bfhiststat");
  2255. model.makeNode("/root/send/updatedata/reservation/subdeptcd");
  2256. model.setValue("/root/send/updatedata/reservation/bforddd", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("orddd")) );
  2257. model.setValue("/root/send/updatedata/reservation/bfordtm", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("ordtm")) );
  2258. model.setValue("/root/send/updatedata/reservation/bforddeptcd", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("orddeptcd")) );
  2259. model.setValue("/root/send/updatedata/reservation/bforddrid", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("orddrid")) );
  2260. model.setValue("/root/send/updatedata/reservation/bfhiststat", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("histstat")) );
  2261. model.setValue("/root/send/updatedata/reservation/bfacptseqno", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("acptseqno")) );
  2262. model.setValue("/root/send/updatedata/reservation/bfcretno", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("cretno")) );
  2263. model.setValue("/root/send/updatedata/reservation/subdeptcd", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("subdeptcd")) );
  2264. // 변경일 경우 예약구분을 전화예약으로 변경
  2265. // model.setValue("/root/send/updatedata/reservation/rsrvflag", RSRVFLAG);
  2266. }
  2267. //2007-10-08 이동식 추가
  2268. model.resetInstanceNode("/root/main/result");
  2269. model.makeNode("/root/main/result/outhist");
  2270. if(submit("TXPMO00202")){
  2271. model.copyNode("/root/main/outhist", "/root/main/result/outhist");
  2272. //달력 초기화
  2273. //initCalendar();
  2274. //외래등록내역 초기화
  2275. //model.removeNodeset("/root/main/outrgst/outrgstlist");
  2276. model.refresh();
  2277. }else{
  2278. return false;
  2279. }
  2280. //2007-10-22 이동식 추가
  2281. if( model.getValue("/root/main/patinfo/patinfolist/pid").length > 0 ){ //신환일경우 차트대출 안함.
  2282. if( getNodesetCount("/root/main/result/chart/chartlist") < 1 || model.getValue("/root/main/reservation/tablename") == 'temp'){
  2283. return false;
  2284. }
  2285. model.removeNodeset("/root/send/chart");
  2286. if( histstat == 'C' ){ //변경
  2287. model.makeValue("/root/send/chart[1]/high_flag", "U");
  2288. model.makeValue("/root/send/chart[1]/flag", "D");
  2289. model.makeValue("/root/send/chart[1]/pid", model.getValue("/root/main/patinfo/patinfolist/pid"));
  2290. model.makeValue("/root/send/chart[1]/orddd", model.getValue("/root/send/updatedata/reservation/bforddd"));
  2291. model.makeValue("/root/send/chart[1]/cretno", model.getValue("/root/send/updatedata/reservation/bfcretno"));
  2292. model.makeValue("/root/send/chart[1]/orddeptcd", model.getValue("/root/send/updatedata/reservation/bforddeptcd"));
  2293. model.makeValue("/root/send/chart[1]/orddrid", model.getValue("/root/send/updatedata/reservation/bforddrid"));
  2294. model.makeValue("/root/send/chart[1]/ordtm", model.getValue("/root/send/updatedata/reservation/bfordtm"));
  2295. model.makeValue("/root/send/chart[1]/msgcnts", '-');
  2296. model.makeValue("/root/send/chart[1]/subdeptcd", model.getValue("/root/send/updatedata/reservation/subdeptcd"));
  2297. model.makeValue("/root/send/chart[1]/centcd", model.getValue("/root/send/updatedata/reservation/bfcretno"));
  2298. /*
  2299. model.makeValue("/root/send/chart[1]/high_flag", "U");
  2300. model.makeValue("/root/send/chart[1]/flag", "D");
  2301. model.makeValue("/root/send/chart[1]/pid", model.getValue("/root/main/patinfo/patinfolist/pid"));
  2302. model.makeValue("/root/send/chart[1]/orddd", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("orddd")) );
  2303. model.makeValue("/root/send/chart[1]/cretno", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("cretno")) );
  2304. model.makeValue("/root/send/chart[1]/acptseqno", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("acptseqno")) );
  2305. model.makeValue("/root/send/chart[1]/orddeptcd", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("orddeptcd")) );
  2306. model.makeValue("/root/send/chart[1]/orddrid", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("orddrid")) );
  2307. model.makeValue("/root/send/chart[1]/ordtm", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("ordtm")) );
  2308. model.makeValue("/root/send/chart[1]/fsexamflag", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("fsexamflag")) );
  2309. model.makeValue("/root/send/chart[1]/rsrvflag", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("rsrvflag")) );
  2310. model.makeValue("/root/send/chart[1]/msgcnts", '-');
  2311. model.makeValue("/root/send/chart[1]/subdeptcd", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("subdeptcd")) );
  2312. model.makeValue("/root/send/chart[1]/centcd", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("cretno")) );
  2313. */
  2314. /*
  2315. model.makeValue("/root/send/chart[2]/high_flag", "U");
  2316. model.makeValue("/root/send/chart[2]/flag", "I");
  2317. model.makeValue("/root/send/chart[2]/pid", model.getValue("/root/main/result/chart/chartlist/pid"));
  2318. model.makeValue("/root/send/chart[2]/orddd", model.getValue("/root/main/result/chart/chartlist/orddd"));
  2319. model.makeValue("/root/send/chart[2]/cretno", model.getValue("/root/main/result/chart/chartlist/cretno"));
  2320. model.makeValue("/root/send/chart[2]/acptseqno", model.getValue("/root/main/result/chart/chartlist/acptseqno"));
  2321. model.makeValue("/root/send/chart[2]/orddeptcd", model.getValue("/root/main/result/chart/chartlist/orddeptcd"));
  2322. model.makeValue("/root/send/chart[2]/orddrid", model.getValue("/root/main/result/chart/chartlist/orddrid"));
  2323. model.makeValue("/root/send/chart[2]/ordtm", model.getValue("/root/main/result/chart/chartlist/ordtm"));
  2324. model.makeValue("/root/send/chart[2]/fsexamflag", model.getValue("/root/main/result/chart/chartlist/fsexamflag"));
  2325. model.makeValue("/root/send/chart[2]/rsrvflag", model.getValue("/root/main/reservation/rsrvflag"));
  2326. model.makeValue("/root/send/chart[2]/msgcnts", '-');
  2327. model.makeValue("/root/send/chart[2]/subdeptcd", model.getValue("/root/main/reservation/subdeptcd"));
  2328. model.makeValue("/root/send/chart[2]/centcd", model.getValue("/root/main/reservation/centcd"));
  2329. */
  2330. }
  2331. submit("TXPMO00105");
  2332. model.removeNodeset("/root/send/chart");
  2333. //END..
  2334. }
  2335. //예약/수정/취소가 성공하면 화면 클리어한다.
  2336. fClearAfterSave();
  2337. model.resetInstanceNode("/root/main/h_dcuc/dcuc");
  2338. initPopupMenu();
  2339. model.refresh();
  2340. return true;
  2341. }
  2342. function fGetCentcdCalendarData(){
  2343. //1분 간격 풀기 초기화
  2344. model.setValue("/root/main/oneminute", "");
  2345. //외래등록내역 삭제
  2346. model.removeNodeset("/root/main/outrgst/outrgstlist");
  2347. model.resetInstanceNode("/root/resercnt");
  2348. model.resetInstanceNode("/root/send");
  2349. model.setValue("/root/send/centcd", model.getValue("/root/main/reservation/centcd"));
  2350. model.setValue("/root/send/orddeptcd", model.getValue("/root/main/reservation/orddeptcd"));
  2351. model.setValue("/root/send/subdeptcd", model.getValue("/root/main/reservation/subdeptcd"));
  2352. model.setValue("/root/send/orddrid", model.getValue("/root/main/reservation/orddrid"));
  2353. model.setValue("/root/send/date", model.getValue("/root/hidden/calendar/year") + model.getValue("/root/hidden/calendar/month"));
  2354. if( model.getValue("/root/send/centcd") == '' || model.getValue("/root/send/centcd") == ' '){
  2355. model.setValue("/root/send/centcd", '-');
  2356. }
  2357. model.resetInstanceNode("/root/main/result");
  2358. model.makeNode("/root/main/result/orddrfild");
  2359. model.makeNode("/root/main/result/calendarinfo");
  2360. var isMonth = model.getValue("/root/hidden/calendar/month");
  2361. var isYear = model.getValue("/root/hidden/calendar/year");
  2362. var isDate = (isYear+isMonth+1).toDate();
  2363. //진료의 정보가 없을 경우
  2364. if( model.getValue("/root/send/orddrid") == '' ){
  2365. setCalendar(isDate);
  2366. }else{
  2367. if(submit("TRPMO00203")){
  2368. if( getNodesetCount("/root/main/result/calendarinfo/calendarinfolist") > 0 ){
  2369. model.copyNode("/root/hidden/calendarinfo", "/root/main/result/calendarinfo");
  2370. setCalendar2(isDate);
  2371. //fRemoveCapa();
  2372. }else{
  2373. setCalendar(isDate);
  2374. }
  2375. model.setValue("/root/main/reservation/ordfild" , model.getValue("/root/main/result/orddrfild/orddrfildlist/ordfild"));
  2376. model.setValue("/root/main/reservation/fstexamrem" , model.getValue("/root/main/result/orddrfild/orddrfildlist/fstexamrem"));
  2377. model.setValue("/root/main/reservation/reexamrem" , model.getValue("/root/main/result/orddrfild/orddrfildlist/reexamrem"));
  2378. model.refresh();
  2379. }
  2380. }
  2381. }
  2382. function fChangeRsrvSpecTab(){
  2383. var rsrvgubn = model.getValue("/root/main/rsrvflag");
  2384. var examcnt = 0;
  2385. if(rsrvgubn == "E"){
  2386. model.toggle("case4");
  2387. examcnt = getNodesetCount("/root/main/exculist/subordlist2");
  2388. }else if(rsrvgubn == "S"){
  2389. model.toggle("case2");
  2390. examcnt = getNodesetCount("/root/main/test/testlist");
  2391. }else{
  2392. model.toggle("case1");
  2393. }
  2394. model.makeNode("/root/hidden/con/examcnt");
  2395. model.setValue("/root/hidden/con/examcnt", examcnt);
  2396. output5.refresh();
  2397. /*
  2398. if(rsrvgubn != "S" || ){
  2399. model.toggle("case1");
  2400. }else if (rsrvgubn == "S"){
  2401. model.toggle("case2");
  2402. //var pid = model.getValue("/root/main/patinfo/patinfolist/pid");
  2403. //var deptcd = model.getValue("/root/tmp/userinfo/userinfolist/deptcd");
  2404. //var parm = pid + "▦" + "T" + "▦" + deptcd ;
  2405. //setParameter("opener_parameter_id", parm);
  2406. //open("SMAEA02000", "1", "200", "200", "SMAEA02000", "", "");
  2407. }
  2408. */
  2409. }
  2410. function fRgstno2EnterEvent(){
  2411. var hngnm = ipt_hngnm.currentText;
  2412. var rrgstno1 = ipt_rrgstno1.currentText;
  2413. var rrgstno2 = ipt_rrgstno2.currentText;
  2414. var rgstno1 = model.getValue("/root/main/patinfo/patinfolist/rrgstno1");
  2415. var rgstno2 = model.getValue("/root/main/patinfo/patinfolist/rrgstno2");
  2416. if( hngnm.length > 1 ){
  2417. model.setValue("/root/hidden/source/srchcond", "4");
  2418. model.setValue("/root/hidden/source/hngnm", hngnm);
  2419. model.setValue("/root/hidden/source/rrgstno1", rrgstno1);
  2420. model.setValue("/root/hidden/source/rrgstno2", rrgstno2);
  2421. }else{
  2422. model.setValue("/root/hidden/source/srchcond", "3");
  2423. model.setValue("/root/hidden/source/rrgstno1", rrgstno1);
  2424. model.setValue("/root/hidden/source/rrgstno2", rrgstno2);
  2425. }
  2426. model.setValue("/root/main/patinfo/patinfolist/rrgstno2", rrgstno2);
  2427. if(rgstno1 == "000000" ){
  2428. messageBox("주민번호 앞6자리 형식오류입니다. 올바른 일자형태로 입력하십시요!","E999","");
  2429. model.setFocus("ipt_rrgstno1");
  2430. return;
  2431. }else if(rgstno2 == "0000000 "){
  2432. messageBox("주민번호 뒤7자리 형식오류입니다. 올바른 일자형태로 입력하십시요!","E999","");
  2433. model.setFocus("ipt_rrgstno2");
  2434. return;
  2435. }
  2436. if( rrgstno1.length == 6 && rrgstno2.length == 7 ){
  2437. if(submit("TRPMC02500")){
  2438. if( getNodesetCount("/root/main/result/patinfo/patinfolist") == 1 ){
  2439. model.copyNode("/root/main/patinfo", "/root/main/result/patinfo");
  2440. //합번등록번호 체크
  2441. var sBindPid = model.getValue("/root/main/patinfo/patinfolist/bindpid");
  2442. if( sBindPid != '-' && sBindPid != '' && sBindPid != ' ' ){
  2443. //합번된 등록번호 메세지 처리
  2444. var sPid = model.getValue("/root/main/patinfo/patinfolist/pid");
  2445. var sHngnm = model.getValue("/root/main/patinfo/patinfolist/hngnm");
  2446. var retValue = messageBox(sPid + "(" + sHngnm + ") 환자의 등록번호가 [ " + sBindPid + " ] 로 합번 되었습니다. 합번된 등록번호로 재조회 하시겠습니까?", "Q999", "");
  2447. if( retValue == '6' ){
  2448. model.setValue("/root/main/patinfo/patinfolist/pid", sBindPid);
  2449. event.keyCode ="13";
  2450. //ipt_cardno.dispatch("onkeypress");
  2451. ipt_pid.dispatch("onkeypress");
  2452. }else{
  2453. //화면 초기화!!
  2454. btn_init.dispatch("DOMActivate");
  2455. return false;
  2456. }
  2457. }
  2458. model.setValue("/root/main/popupendflag", "ok");
  2459. //구환 표시
  2460. if( model.getValue("/root/main/patinfo/patinfolist/pid").length > 0 ){
  2461. model.setValue("/root/hidden/source/checkfnexam", "3");
  2462. }else{
  2463. model.setValue("/root/hidden/source/checkfnexam", "1");
  2464. }
  2465. //환자특이내역 존재여부 표시
  2466. var patspcfyn = model.getValue("/root/main/patinfo/patinfolist/patspcfyn");
  2467. if( patspcfyn == 'Y' || patspcfyn == 'y'){
  2468. btn_patspcfyn.attribute("background-color") = "#ff0000";
  2469. }else{
  2470. btn_patspcfyn.attribute("background-color") = "#c0c0c0";
  2471. }
  2472. //감면 내역 있으면 표시
  2473. var pid = model.getvalue("/root/main/patinfo/patinfolist/pid");
  2474. if( pid != '' && pid != ' ' && pid != '-' ){
  2475. model.setValue( "/root/send/pid", pid);
  2476. submit("TRPMO00205");
  2477. }
  2478. //감면 내역 있으면 표시 끝
  2479. fSearch();
  2480. }else if(getNodesetCount("/root/main/result/patinfo/patinfolist") > 1 ){
  2481. //inputEnterKey("btn_search", "DOMActivate");
  2482. EnterBtnSearch();
  2483. }else{
  2484. // model.resetInstanceNode("/root/main/patinfo/patinfolist");
  2485. // model.resetInstanceNode("/root/main/reservation");
  2486. model.setValue("/root/main/popupendflag", "cancel");
  2487. messageBox("일치하는 환자가 없습니다.", "E999", "");
  2488. // model.resetInstanceNode("");
  2489. }
  2490. }
  2491. }else{
  2492. inputEnterKey("btn_search", "DOMActivate");
  2493. // fSearch();
  2494. }
  2495. fGetSexAgeBirthDD();
  2496. //외래이력 휴진일 구분
  2497. outhistColorChange();
  2498. model.refresh();
  2499. }
  2500. //예약권한설정 조회
  2501. function GetFreeRsrvAuthor(){
  2502. submit("TRPMO00210");
  2503. return model.getValue("/root/userinfo/userinfolist/cdnm");
  2504. }
  2505. //컨설트 내역 조회
  2506. function fGetOrdCnstInfo(){
  2507. //2010-02-27
  2508. //model.makeNode("/root/send/cnstinfo/pid");
  2509. //model.makeNode("/root/send/cnstinfo/flag");
  2510. //model.setValue("/root/send/cnstinfo/pid", model.getValue("/root/main/patinfo/patinfolist/pid"));
  2511. //model.setValue("/root/send/cnstinfo/flag", 'T');
  2512. //model.makeNode("/root/temp/emrcnst/temp");
  2513. model.removeNodeset("/root/temp/emrcnst");
  2514. model.makeNode("/root/temp/emrcnst");
  2515. model.makeNode("/root/temp/emrcnst/send/pid");
  2516. model.makeNode("/root/temp/emrcnst/send/flag");
  2517. model.setValue("/root/temp/emrcnst/send/pid", model.getValue("/root/main/patinfo/patinfolist/pid"));
  2518. model.setValue("/root/temp/emrcnst/send/flag", 'T');
  2519. var retValue = false;
  2520. if( submit("TRPAC00301") ){
  2521. //컨설트 의뢰정보가 1건일때 와 2건 이상일때 구분하여 메세지 처리
  2522. var cnstCnt = getNodesetCount("/root/temp/emrcnst/pid");
  2523. if( cnstCnt > 1 ){
  2524. if( messageBox("Consult 내역이 있습니다. 내역을 확인하시겠습니까?", "Q999", "") == 6 ){
  2525. if( fGetEMRCnstInfo() ){
  2526. retValue = true;
  2527. }
  2528. }
  2529. }else if( cnstCnt == 1 ){
  2530. var reqorddeptnm = model.getValue("/root/temp/emrcnst/reqdeptnm");
  2531. var reqorddrnm = model.getValue("/root/temp/emrcnst/requsernm");
  2532. var recvorddeptnm = model.getValue("/root/temp/emrcnst/recvdeptnm");
  2533. var recvorddrnm = model.getValue("/root/temp/emrcnst/recvusernm");
  2534. if(messageBox(reqorddeptnm + " " + reqorddrnm + " 교수님께서 " +
  2535. recvorddeptnm + " " + recvorddrnm + " 교수님께 Consult 내역이 있습니다. \n지금 접수하시겠습니까?", "Q999", "") == 6 ){
  2536. var orddd = model.getValue("/root/temp/emrcnst/hopedd");
  2537. var orddeptcd = model.getValue("/root/temp/emrcnst/recvdeptcd");
  2538. var orddrid = model.getValue("/root/temp/emrcnst/recvuserid");
  2539. var ordreqformflag = model.getValue("/root/temp/emrcnst/ordreqformflag");
  2540. var formrecseq = model.getValue("/root/temp/emrcnst/formrecseq");
  2541. model.setValue("root/main/reservation/formrecseq", formrecseq);
  2542. //기초정보 세팅
  2543. model.setValue("/root/main/reservation/ordreqformflag", ordreqformflag); //진료의뢰서 수급절차 - 원진료의 수급절차를 따른다
  2544. model.setValue("/root/main/reservation/etcordflag", "H"); //기타구분 - 의뢰
  2545. model.setValue("/root/main/reservation/rsrvflag", "C"); //예약구분 - 협진
  2546. RSRVFLAG = 'C'; //예약구분 - 협진
  2547. model.setValue("/root/main/reservation/orddeptcd", orddeptcd);
  2548. cmb_deptcd.dispatch("xforms-value-changed");
  2549. model.setValue("/root/main/reservation/orddrid", orddrid);
  2550. cmb_orddrid.dispatch("xforms-value-changed");
  2551. model.setValue("/root/main/reservation/orddd", orddd);
  2552. ipt_orddd.dispatch("xforms-value-changed");
  2553. model.refresh();
  2554. }
  2555. }
  2556. }
  2557. model.removeNodeset("/root/send/cnstinfo");
  2558. model.removeNodeset("/root/temp/emrcnst");
  2559. return retValue;
  2560. }
  2561. // 협진조회팝업 호출
  2562. function fGetEMRCnstInfo(){
  2563. var pid = model.getValue("/root/main/patinfo/patinfolist/pid");
  2564. var hngnm = model.getValue("/root/main/patinfo/patinfolist/hngnm");
  2565. setParameter("SPPMO01300_PID", pid);
  2566. setParameter("SPPMO01300_HNGNM", hngnm);
  2567. setParameter("SPPMO01300_FLAG", 'O'); //외래 플래그
  2568. modal("SPPMO01300", "1", "200", "200", "SPPMO01300", "", "");
  2569. var rtnMsg = getParameter("SPPMO01300_RTN");
  2570. if( rtnMsg == 'OK' ){
  2571. var orddd = getParameter("SPPMO01300_ORDDD");
  2572. var orddeptcd = getParameter("SPPMO01300_ORDDEPTCD");
  2573. var orddrid = getParameter("SPPMO01300_ORDDRID");
  2574. var ordreqformflag = getParameter("SPPMO01300_ORDREQFORMFLAG"); //수급절차
  2575. var formrecseq = getParameter("SPPMO01300_FORMRECSEQ"); //서식번호
  2576. model.setValue("/root/main/reservation/orddeptcd", orddeptcd);
  2577. cmb_deptcd.dispatch("xforms-value-changed");
  2578. model.setValue("/root/main/reservation/orddrid", orddrid);
  2579. cmb_orddrid.dispatch("xforms-value-changed");
  2580. model.setValue("/root/main/reservation/orddd", orddd);
  2581. ipt_orddd.dispatch("xforms-value-changed");
  2582. model.makeNode("root/main/reservation/formrecseq");
  2583. model.setValue("root/main/reservation/formrecseq", formrecseq);
  2584. //기초정보 세팅
  2585. model.setValue("/root/main/reservation/ordreqformflag", ordreqformflag); //진료의뢰서 수급절차 - 원진료의 수급절차를 따른다
  2586. model.setValue("/root/main/reservation/etcordflag", "H"); //기타구분 - 의뢰
  2587. model.setValue("/root/main/reservation/rsrvflag", "C"); //예약구분 - 협진
  2588. RSRVFLAG = 'C'; //예약구분 - 협진
  2589. model.refresh();
  2590. //messageBox("선택하신 Consult 내역을 접수정보에 입력했습니다. 보험정보 확인 후 접수하십시요.", "I999", "");
  2591. return true;
  2592. }else{
  2593. return false;
  2594. }
  2595. }
  2596. function fPidEnterEvent(){
  2597. if(ipt_pid.currentText.length > 0 || hieyn=="Y"){
  2598. //조회 조건 세팅.
  2599. if(hieyn=="Y"){
  2600. model.setValue("/root/hidden/source/srchcond", "3");
  2601. model.makeValue("/root/hidden/source/rrgstno1", hie_rrgstno1);
  2602. model.makeValue("/root/hidden/source/rrgstno2", hie_rrgstno2);
  2603. model.makeValue("/root/hidden/source/checkfnexam", "0");
  2604. }else{
  2605. model.setValue("/root/hidden/source/srchcond", "1");
  2606. model.setValue("/root/hidden/source/pid", ipt_pid.currentText);
  2607. }
  2608. model.resetInstanceNode("/root/main/result");
  2609. model.makeNode("/root/main/result/patinfo");
  2610. //보험 자격조회 체크 여부 초기화
  2611. model.setValue("/root/hidden/flag/check_insuinfo_flag", "N");
  2612. //외래이력조회 구분
  2613. model.setValue("/root/main/ioflag", "O");
  2614. radio2.dispatch("xforms-value-changed");
  2615. model.toggle("case3");
  2616. if(submit("TRPMC02500")){
  2617. if( getNodesetCount("/root/main/result/patinfo/patinfolist") > 0 ){
  2618. model.copyNode("/root/main/patinfo", "/root/main/result/patinfo");
  2619. //합번등록번호 체크
  2620. var sBindPid = model.getValue("/root/main/patinfo/patinfolist/bindpid");
  2621. if( sBindPid != '-' && sBindPid != '' && sBindPid != ' ' ){
  2622. //합번된 등록번호 메세지 처리
  2623. var sPid = model.getValue("/root/main/patinfo/patinfolist/pid");
  2624. var sHngnm = model.getValue("/root/main/patinfo/patinfolist/hngnm");
  2625. var retValue = messageBox(sPid + "(" + sHngnm + ") 환자의 등록번호가 [ " + sBindPid + " ] 로 합번 되었습니다. 합번된 등록번호로 재조회 하시겠습니까?", "Q999", "");
  2626. if( retValue == '6' ){
  2627. model.setValue("/root/main/patinfo/patinfolist/pid", sBindPid);
  2628. event.keyCode ="13";
  2629. //ipt_cardno.dispatch("onkeypress");
  2630. ipt_pid.dispatch("onkeypress");
  2631. }else{
  2632. //화면 초기화!!
  2633. btn_init.dispatch("DOMActivate");
  2634. return false;
  2635. }
  2636. }
  2637. model.setValue("/root/main/popupendflag", "ok");
  2638. //구환 표시
  2639. model.setValue("/root/hidden/source/checkfnexam", "3");
  2640. //환자특이내역 존재여부 표시
  2641. var patspcfyn = model.getValue("/root/main/patinfo/patinfolist/patspcfyn");
  2642. if( patspcfyn == 'Y' || patspcfyn == 'y'){
  2643. btn_patspcfyn.attribute("background-color") = "#ff0000";
  2644. }else{
  2645. btn_patspcfyn.attribute("background-color") = "#c0c0c0";
  2646. }
  2647. //감면내역
  2648. var pid = model.getvalue("/root/main/patinfo/patinfolist/pid");
  2649. if(pid != '' && pid != ' ' && pid != '-'){
  2650. model.setValue( "/root/send/pid", pid);
  2651. submit("TRPMO00205");
  2652. }
  2653. //조회
  2654. fSearch();
  2655. }else if(getNodesetCount("/root/main/result/patinfo/patinfolist")==0 && hieyn=="Y"){
  2656. //debugger;
  2657. model.makeValue("/root/send/ptbs_hngnm", model.getValue("/root/main/hiepat/ptname"));
  2658. model.makeValue("/root/send/ptbs_mpphontel", "-");
  2659. model.makeValue("/root/send/ptbs_brthdd", model.getValue("/root/main/hiepat/referralstatus_patientbirthday"));
  2660. model.makeValue("/root/send/ptbs_rrgstno1", hie_rrgstno1);
  2661. model.makeValue("/root/send/ptbs_rrgstno2", hie_rrgstno2);
  2662. model.makeValue("/root/send/sess_userid", getUserInfo("userid"));
  2663. model.makeValue("/root/send/ptbs_sex", hie_sex);
  2664. model.makeValue("/root/send/ptbs_pid", "");
  2665. if(hie_addrbase!=""){
  2666. model.makeValue("/root/send/ptbs_highaddr", hie_addrbase);
  2667. model.makeValue("/root/send/ptbs_detladdr", hie_addrdetl);
  2668. model.makeValue("/root/send/ptbs_zipcd1", hie_zipcd1);
  2669. model.makeValue("/root/send/ptbs_zipcd2", hie_zipcd2);
  2670. }
  2671. submit("TXPMO00104");
  2672. if(getNodesetCount("/root/hidden/rcv/ptbs/ptbs_pid") > 0 ){
  2673. model.setValue("/root/main/patinfo/patinfolist/pid", model.getValue("root/hidden/rcv/ptbs/ptbs_pid"));
  2674. model.makeValue("/root/send/updatedata/patinfolist/pid", model.getValue("/root/hidden/rcv/ptbs/ptbs_pid"));
  2675. model.setValue("/root/main/patinfo/patinfolist/hngnm", model.getValue("root/hidden/rcv/ptbs/ptbs_hngnm"));
  2676. model.setValue("/root/main/patinfo/patinfolist/rrgstno1", model.getValue("root/hidden/rcv/ptbs/ptbs_rrgstno1"));
  2677. model.setValue("/root/main/patinfo/patinfolist/rrgstno2", model.getValue("root/hidden/rcv/ptbs/ptbs_rrgstno2"));
  2678. model.setValue("/root/main/patinfo/patinfolist/mpphontel", model.getValue("root/hidden/rcv/ptbs/ptbs_mpphontel"));
  2679. model.setValue("/root/main/patinfo/patinfolist/hometel", model.getValue("root/hidden/rcv/ptbs/ptbs_hometel"));
  2680. model.setValue("/root/main/patinfo/patinfolist/sex", model.getValue("root/hidden/rcv/ptbs/ptbs_sex"));
  2681. model.setValue("/root/main/patinfo/patinfolist/age", model.getValue("root/hidden/rcv/ptbs/ptbs_age"));
  2682. model.setValue("/root/main/patinfo/patinfolist/brthdd", model.getValue("root/hidden/rcv/ptbs/ptbs_brthdd"));
  2683. model.setValue("/root/main/patinfo/patinfolist/zipcd1", model.getValue("root/hidden/rcv/ptbs/ptbs_zipcd1"));
  2684. model.setValue("/root/main/patinfo/patinfolist/zipcd2", model.getValue("root/hidden/rcv/ptbs/ptbs_zipcd2"));
  2685. model.setValue("/root/main/patinfo/patinfolist/addr", model.getValue("root/hidden/rcv/ptbs/ptbs_highaddr"));
  2686. model.setValue("/root/main/patinfo/patinfolist/detladdr", model.getValue("root/hidden/rcv/ptbs/ptbs_detladdr"));
  2687. model.makeValue("/root/send/updatedata/reservation/telrsrvflag", "T");
  2688. model.makeValue("/root/send/updatedata/checkfnexam", "3");
  2689. model.refresh();
  2690. }else{
  2691. messageBox("환자번호 생성에 실패하였습니다.", "E");
  2692. return;
  2693. }
  2694. }else{
  2695. model.resetInstanceNode("/root/main/patinfo/patinfolist");
  2696. model.resetInstanceNode("/root/main/reservation");
  2697. model.setValue("/root/main/popupendflag", "cancel");
  2698. messageBox("없는 환자 번호 입니다.", "E999", "");
  2699. model.removenode("/root/main/outhist/outhistlist");
  2700. model.removenode("/root/main/test/testlist");
  2701. model.removenode("/root/hidden/con/examcnt");
  2702. //model.resetInstanceNode("");
  2703. }
  2704. }
  2705. }else{
  2706. }
  2707. //팝업으로 넘겨준 데이터 초기화
  2708. var checkfnexam = model.getValue("/root/hidden/source/checkfnexam");
  2709. model.resetInstanceNode("/root/hidden/source");
  2710. model.setValue("/root/hidden/source/checkfnexam", checkfnexam);
  2711. outhistColorChange();
  2712. model.refresh();
  2713. }
  2714. function EnterBtnSearch(){
  2715. model.setValue("/root/hidden/source/checkfnexam", "1");
  2716. model.setValue("/root/hidden/source/autoflag", "N");
  2717. modal("SPPMC02500", "1","150", "150", "SPPMC02500", "/root/hidden/source", "/root/send");
  2718. var popupendflag = model.getValue("/root/main/popupendflag");
  2719. if (popupendflag == "ok"){
  2720. //초재진 구분
  2721. if( model.getValue("/root/main/patinfo/patinfolist/pid").length > 0 ){
  2722. model.setValue("/root/hidden/source/checkfnexam", '3');
  2723. }else{
  2724. model.setValue("/root/main/patinfo/patinfolist/pid", "");
  2725. model.setValue("/root/hidden/source/checkfnexam", '1');
  2726. }
  2727. //합번등록번호 체크
  2728. var sBindPid = model.getValue("/root/main/patinfo/patinfolist/bindpid");
  2729. if( sBindPid != '-' && sBindPid != '' && sBindPid != ' ' ){
  2730. //합번된 등록번호 메세지 처리
  2731. var sPid = model.getValue("/root/main/patinfo/patinfolist/pid");
  2732. var sHngnm = model.getValue("/root/main/patinfo/patinfolist/hngnm");
  2733. var retValue = messageBox(sPid + "(" + sHngnm + ") 환자의 등록번호가 [ " + sBindPid + " ] 로 합번 되었습니다. 합번된 등록번호로 재조회 하시겠습니까?", "Q999", "");
  2734. if( retValue == '6' ){
  2735. model.setValue("/root/main/patinfo/patinfolist/pid", sBindPid);
  2736. model.refresh();
  2737. event.keyCode ="13";
  2738. //ipt_cardno.dispatch("onkeypress");
  2739. ipt_pid.dispatch("onkeypress");
  2740. }else{
  2741. //화면 초기화!!
  2742. btn_init.dispatch("DOMActivate");
  2743. return false;
  2744. }
  2745. }
  2746. //감면 내역 있으면 표시
  2747. var pid = model.getvalue("/root/main/patinfo/patinfolist/pid");
  2748. if( pid != '' && pid != ' ' && pid != '-' ){
  2749. model.setValue( "/root/send/pid", pid);
  2750. submit("TRPMO00205");
  2751. }
  2752. //감면 내역 있으면 표시 끝
  2753. //환자특이내역 존재여부 표시
  2754. if( model.getValue("/root/main/patinfo/patinfolist/patspcfyn") == 'Y'){
  2755. btn_patspcfyn.attribute("background-color") = "#ff0000";
  2756. }else{
  2757. btn_patspcfyn.attribute("background-color") = "#c0c0c0";
  2758. }
  2759. fSearch();
  2760. }else{
  2761. var srchcond = model.getValue("/root/hidden/source/srchcond");
  2762. if( srchcond == '4' || srchcond == '3' ){
  2763. // fGetSexAgeBirthDD();
  2764. }
  2765. }
  2766. //팝업으로 넘겨준 데이터 초기화
  2767. var checkfnexam = model.getValue("/root/hidden/source/checkfnexam");
  2768. model.resetInstanceNode("/root/hidden/source");
  2769. model.setValue("/root/hidden/source/checkfnexam", checkfnexam);
  2770. //외래이력 휴진색상 체크
  2771. outhistColorChange();
  2772. model.refresh();
  2773. }
  2774. function FseamOrdreqdescCheck(){
  2775. //초재진 및 진료의뢰서 체크
  2776. //var deptengabbr = model.getValue("/root/init/orddeptcd/orddeptcdlist[ cd = '" + cmb_deptcd.value + "']/deptengabbr");
  2777. var rsrvflag = model.getValue("/root/main/reservation/rsrvflag");
  2778. //초재진여부 조회
  2779. fGetFsexamFlag();
  2780. model.refresh();
  2781. if(model.getValue("/root/main/patinfo/patinfolist/pid").length < 1 && model.getValue("/root/main/patinfo/patinfolist/hngnm").length < 1 ){
  2782. //환자정보 없을 경우 진료의뢰서 체크 안함!!!
  2783. }else if( model.getValue("/root/main/patinfo/patinfolist/pid").length < 1 && model.getValue("/root/main/patinfo/patinfolist/hngnm").length > 1 ){
  2784. var reqdeptno = model.getValue("/root/init/orddeptcd/orddeptcdlist[ cd = '" + cmb_deptcd.value + "']/reqdeptno");
  2785. //등록번호 없고 환자 이름이 입력된 경우 - 신환! 무조건 메세지 출력!!
  2786. // 치과 진찰료 별도산정 관련 수정(2017/05/10 이정택)
  2787. //if( reqdeptno == "55" || reqdeptno == "23" || reqdeptno == "21" || rsrvflag == "C" ){
  2788. if( reqdeptno.substr(0,1)=="5" || reqdeptno == "23" || reqdeptno == "21" || rsrvflag == "C" ){
  2789. model.setValue("/root/main/reservation/ordreqdescyn", 'Y');
  2790. //진료의뢰서가 필요 없을경우 선택진료설명여부 Yes 세팅
  2791. //model.setValue("/root/main/reservation/specorddescyn", 'Y');
  2792. }else {
  2793. messageBox("진료의뢰서가 필요합니다.", "E999", "");
  2794. model.setValue("/root/main/reservation/ordreqdescyn", '');
  2795. }
  2796. }else{
  2797. //진료의뢰서 확인
  2798. var pid = model.getValue("/root/main/patinfo/patinfolist/pid");
  2799. var fsexamflag = model.getValue("/root/main/reservation/fsexamflag");
  2800. var orddeptcd = cmb_deptcd.value;
  2801. var deptengabbr = model.getValue("/root/init/orddeptcd/orddeptcdlist[ cd = '" + cmb_deptcd.value + "']/deptengabbr");
  2802. var reqdeptno = model.getValue("/root/init/orddeptcd/orddeptcdlist[ cd = '" + cmb_deptcd.value + "']/reqdeptno");
  2803. var outhistpath = "/root/main/outhist/outhistlist"; //외래이력노드
  2804. if( ! fCheckOrdCnst(pid, fsexamflag, orddeptcd, deptengabbr, reqdeptno, outhistpath, INSUKIND) && rsrvflag != "C"){
  2805. if(orddeptcd != "" && orddeptcd != " " && orddeptcd != "-"){
  2806. messageBox("진료의뢰서가 필요합니다.", "E999", "");
  2807. model.setValue("/root/main/reservation/ordreqdescyn", '');
  2808. }
  2809. }else {
  2810. model.setValue("/root/main/reservation/ordreqdescyn", 'Y');
  2811. //진료의뢰서가 필요 없을경우 선택진료설명여부 Yes 세팅
  2812. //model.setValue("/root/main/reservation/specorddescyn", 'Y');
  2813. }
  2814. }
  2815. model.refresh();
  2816. }
  2817. function fPatInfoUpdt(){
  2818. //TXPMO00104 인터페이스에 맞춰 노드 세팅
  2819. model.resetInstanceNode("/root/send/data1");
  2820. model.makeNode("/root/send/data1/pid_flag");
  2821. model.makeNode("/root/send/data1/ptbs_pid");
  2822. model.makeNode("/root/send/data1/ptbs_hngnm");
  2823. model.makeNode("/root/send/data1/engnm");
  2824. model.makeNode("/root/send/data1/ptbs_rrgstno1");
  2825. model.makeNode("/root/send/data1/ptbs_rrgstno2");
  2826. model.makeNode("/root/send/data1/ptbs_brthdd");
  2827. model.makeNode("/root/send/data1/ptbs_sex");
  2828. model.makeNode("/root/send/data1/ptbs_age");
  2829. model.makeNode("/root/send/data1/ptbs_hometel");
  2830. model.makeNode("/root/send/data1/ptbs_mpphontel");
  2831. model.makeNode("/root/send/data1/ptbs_etctel1");
  2832. model.makeNode("/root/send/data1/ptbs_zipcd1");
  2833. model.makeNode("/root/send/data1/ptbs_zipcd2");
  2834. model.makeNode("/root/send/data1/ptbs_zipcdseq");
  2835. model.makeNode("/root/send/data1/ptbs_highaddr");
  2836. model.makeNode("/root/send/data1/ptbs_detladdr");
  2837. //model.setValue("/root/send/data1/pid_flag", model.getValue(""));
  2838. model.setValue("/root/send/data1/ptbs_pid", model.getValue("/root/main/patinfo/patinfolist/pid"));
  2839. model.setValue("/root/send/data1/ptbs_hngnm", model.getValue("/root/main/patinfo/patinfolist/hngnm"));
  2840. model.setValue("/root/send/data1/engnm", model.getValue("/root/main/patinfo/patinfolist/engnm"));
  2841. model.setValue("/root/send/data1/ptbs_rrgstno1", model.getValue("/root/main/patinfo/patinfolist/rrgstno1"));
  2842. model.setValue("/root/send/data1/ptbs_rrgstno2", model.getValue("/root/main/patinfo/patinfolist/rrgstno2"));
  2843. model.setValue("/root/send/data1/ptbs_brthdd", model.getValue("/root/main/patinfo/patinfolist/brthdd"));
  2844. model.setValue("/root/send/data1/ptbs_sex", model.getValue("/root/main/patinfo/patinfolist/sex"));
  2845. model.setValue("/root/send/data1/ptbs_hometel", model.getValue("/root/main/patinfo/patinfolist/hometel"));
  2846. model.setValue("/root/send/data1/ptbs_mpphontel", model.getValue("/root/main/patinfo/patinfolist/mpphontel"));
  2847. model.setValue("/root/send/data1/ptbs_etctel1", model.getValue("/root/main/patinfo/patinfolist/etctel1"));
  2848. model.setValue("/root/send/data1/ptbs_zipcd1", model.getValue("/root/main/patinfo/patinfolist/zipcd1"));
  2849. model.setValue("/root/send/data1/ptbs_zipcd2", model.getValue("/root/main/patinfo/patinfolist/zipcd2"));
  2850. model.setValue("/root/send/data1/ptbs_zipcdseq", model.getValue("/root/main/patinfo/patinfolist/zipcdseq"));
  2851. model.setValue("/root/send/data1/ptbs_highaddr", model.getValue("/root/main/patinfo/patinfolist/addr"));
  2852. model.setValue("/root/send/data1/ptbs_detladdr", model.getValue("/root/main/patinfo/patinfolist/detladdr"));
  2853. //model.copyNode("/root/send/data1","/root/main/patinfo/patinfolist");
  2854. model.copyNode("/root/send/data2","/root/hidden/session");
  2855. var pid = model.getValue("/root/main/patinfo/patinfolist/pid");
  2856. if (pid != null && pid != "" && pid != " " && pid != "-"){
  2857. model.setValue("/root/hidden/source/srchcond", "1");
  2858. model.setValue("/root/hidden/source/pid", ipt_pid.currentText);
  2859. model.makeNode("/root/main/result/patinfo");
  2860. if(submit("TRPMC02500")){
  2861. if( getNodesetCount("/root/main/result/patinfo/patinfolist/pid") < 1 ){
  2862. var msg = messageBox(pid + "로 등록된 환자정보가 존재하지 않습니다. 현재 입력하신 등록번호로 환자정보를 새로 등록하시겠습니까?", "Q999", "");
  2863. if( msg != 6 ){
  2864. model.removeNodeset("/root/main/result/patinfo");
  2865. model.resetInstanceNode("/root/hidden/source");
  2866. return false;
  2867. }else{
  2868. model.makeNode("/root/send/data1/pid_flag");
  2869. model.setValue("/root/send/data1/pid_flag", "F"); //강제채번 플래그
  2870. }
  2871. }
  2872. }
  2873. }
  2874. model.removeNodeset("/root/hidden/rcv/patinfo");
  2875. model.resetInstanceNode("/root/source");
  2876. if (submit("TXPMO00104")){
  2877. if( getNodesetCount("/root/hidden/rcv/ptbs/ptbs_pid") > 0 ){
  2878. model.makeValue("/root/main/patinfo/patinfolist/pid", model.getValue("/root/hidden/rcv/ptbs/ptbs_pid"));
  2879. model.makeValue("/root/send/updatedata/patinfolist/pid", model.getValue("/root/hidden/rcv/ptbs/ptbs_pid"));
  2880. //초재진산정시 전화예약에서 채번한 경우 초재진 여부 세팅 위해 telrsrvflag에 T로 세팅
  2881. //model.makeNode("/root/send/updatedata/telrsrvflag");
  2882. //model.makeNode("/root/send/updatedata/reservation/telrsrvflag");
  2883. model.makeValue("/root/send/updatedata/reservation/telrsrvflag", "T");
  2884. model.makeValue("/root/send/updatedata/checkfnexam", "3");
  2885. model.refresh();
  2886. }else{
  2887. messageBox("인적사항변경 오류입니다. 다시 시도해 주세요.", "E999", "");
  2888. return false;
  2889. }
  2890. }
  2891. }
  2892. function GetPidCreate(){
  2893. submit("TRPMO00202");
  2894. return model.getValue("/root/pidcreateuseyn/pidcreateuseynlist/cdnm");
  2895. }
  2896. function FseamOrdreqdescUseYn(){
  2897. submit("TRPMO00211");
  2898. return model.getValue("/root/fseamordreqdescuseyn/fseamordreqdescuseynlist/cdnm");
  2899. }
  2900. //선택진료여부 확인 체크
  2901. function SpecOrdDescYnCheck(){
  2902. var stat = model.getValue("/root/send/data3/stat");
  2903. var specordyn = model.getValue("/root/main/reservation/specordyn");
  2904. var specorddescyn = model.getValue("/root/main/reservation/specorddescyn");
  2905. var bfspecorddescyn = model.getValue("/root/send/updatedata/reservation/bfspecorddescyn");
  2906. if(stat == "i"){
  2907. if( specordyn == "Y" && specorddescyn == "Y"){
  2908. model.setValue("/root/send/data3/pid", model.getValue("/root/main/patinfo/patinfolist/pid"));
  2909. model.setValue("/root/send/data3/hngnm",model.getValue("/root/main/patinfo/patinfolist/hngnm"));
  2910. model.setValue("/root/send/data3/rrgstno1", model.getValue("/root/main/patinfo/patinfolist/rrgstno1"));
  2911. model.setValue("/root/send/data3/rrgstno2", model.getValue("/root/main/patinfo/patinfolist/rrgstno2"));
  2912. model.setValue("/root/send/data3/choiflag", "B");
  2913. model.setValue("/root/send/data3/ordtype", "O");
  2914. model.setValue("/root/send/data3/orddd", model.getValue("/root/main/reservation/orddd"));
  2915. model.setValue("/root/send/data3/orddeptcd", model.getValue("/root/main/reservation/orddeptcd"));
  2916. model.setValue("/root/send/data3/orddrid", model.getValue("/root/main/reservation/orddrid"));
  2917. model.setValue("/root/send/data3/specordyn",model.getValue("/root/main/reservation/specordyn"));
  2918. model.setValue("/root/send/data3/fromdd", model.getValue("/root/main/reservation/orddd"));
  2919. model.setValue("/root/send/data3/rsrvdd", getCurrentDate().substr(0,8));
  2920. model.setValue("/root/send/data3/elctappdd", getCurrentDate().substr(0,8));
  2921. model.setValue("/root/send/data3/elctappsignkey", "call rsrv");
  2922. model.setValue("/root/send/data3/elctappsigncnts", "call rsrv");
  2923. model.setValue("/root/send/data3/elctapprelakey", "call rsrv");
  2924. model.setValue("/root/send/data3/elctapprelacnts", "call rsrv");
  2925. submit("TXPMC06507");
  2926. }
  2927. }else if(stat == "u"){
  2928. //변경일경우 내부적인 처리사항이 결정되지 않음 사항이므로 이전데이터 변경없이 유지(팀장님 구두사항"20090625")
  2929. if( specordyn == "Y" && specorddescyn == "Y"){
  2930. model.setValue("/root/send/data3/pid", model.getValue("/root/main/patinfo/patinfolist/pid"));
  2931. model.setValue("/root/send/data3/hngnm",model.getValue("/root/main/patinfo/patinfolist/hngnm"));
  2932. model.setValue("/root/send/data3/rrgstno1", model.getValue("/root/main/patinfo/patinfolist/rrgstno1"));
  2933. model.setValue("/root/send/data3/rrgstno2", model.getValue("/root/main/patinfo/patinfolist/rrgstno2"));
  2934. model.setValue("/root/send/data3/choiflag", "B");
  2935. model.setValue("/root/send/data3/ordtype", "O");
  2936. model.setValue("/root/send/data3/orddd", model.getValue("/root/main/reservation/orddd"));
  2937. model.setValue("/root/send/data3/orddeptcd", model.getValue("/root/main/reservation/orddeptcd"));
  2938. model.setValue("/root/send/data3/orddrid", model.getValue("/root/main/reservation/orddrid"));
  2939. model.setValue("/root/send/data3/specordyn",model.getValue("/root/main/reservation/specordyn"));
  2940. model.setValue("/root/send/data3/fromdd", model.getValue("/root/main/reservation/orddd"));
  2941. model.setValue("/root/send/data3/rsrvdd", getCurrentDate().substr(0,8));
  2942. model.setValue("/root/send/data3/elctappdd", getCurrentDate().substr(0,8));
  2943. model.setValue("/root/send/data3/elctappsignkey", "call rsrv");
  2944. model.setValue("/root/send/data3/elctappsigncnts", "call rsrv");
  2945. model.setValue("/root/send/data3/elctapprelakey", "call rsrv");
  2946. model.setValue("/root/send/data3/elctapprelacnts", "call rsrv");
  2947. model.setValue("/root/send/data3/stat", "i");
  2948. }
  2949. /*
  2950. if(bfspecorddescyn == "Y"){
  2951. model.setValue("/root/send/data3/befpid", model.getValue("/root/main/patinfo/patinfolist/pid"));
  2952. model.setValue("/root/send/data3/befhngnm", model.getValue("/root/main/patinfo/patinfolist/hngnm"));
  2953. model.setValue("/root/send/data3/befrrgstno1", model.getValue("/root/main/patinfo/patinfolist/rrgstno1"));
  2954. model.setValue("/root/send/data3/befrrgstno2", model.getValue("/root/main/patinfo/patinfolist/rrgstno2"));
  2955. model.setValue("/root/send/data3/befchoiflag", "B");
  2956. model.setValue("/root/send/data3/befordtype", "O");
  2957. model.setValue("/root/send/data3/beforddd", model.getValue("/root/send/updatedata/reservation/bforddd"));
  2958. model.setValue("/root/send/data3/beforddeptcd", model.getValue("/root/send/updatedata/reservation/bforddeptcd"));
  2959. model.setValue("/root/send/data3/beforddrid", model.getValue("/root/send/updatedata/reservation/bforddrid"));
  2960. model.setValue("/root/send/data3/befspecordyn", model.getValue("/root/send/updatedata/reservation/bfspecorddescyn"));
  2961. }
  2962. */
  2963. submit("TXPMC06507");
  2964. }else if(stat == "d"){
  2965. if( specordyn == "Y" ){
  2966. model.setValue("/root/send/data3/pid", model.getValue("/root/main/patinfo/patinfolist/pid"));
  2967. model.setValue("/root/send/data3/hngnm",model.getValue("/root/main/patinfo/patinfolist/hngnm"));
  2968. model.setValue("/root/send/data3/rrgstno1", model.getValue("/root/main/patinfo/patinfolist/rrgstno1"));
  2969. model.setValue("/root/send/data3/rrgstno2", model.getValue("/root/main/patinfo/patinfolist/rrgstno2"));
  2970. model.setValue("/root/send/data3/choiflag", "B");
  2971. model.setValue("/root/send/data3/ordtype", "O");
  2972. model.setValue("/root/send/data3/orddd", model.getValue("/root/main/reservation/orddd"));
  2973. model.setValue("/root/send/data3/orddeptcd", model.getValue("/root/main/reservation/orddeptcd"));
  2974. model.setValue("/root/send/data3/orddrid", model.getValue("/root/main/reservation/orddrid"));
  2975. model.setValue("/root/send/data3/specordyn",model.getValue("/root/main/reservation/specordyn"));
  2976. model.setValue("/root/send/data3/fromdd", model.getValue("/root/main/reservation/orddd"));
  2977. model.setValue("/root/send/data3/rsrvdd", getCurrentDate().substr(0,8));
  2978. model.setValue("/root/send/data3/elctappdd", getCurrentDate().substr(0,8));
  2979. model.setValue("/root/send/data3/elctappsignkey", "call rsrv");
  2980. model.setValue("/root/send/data3/elctappsigncnts", "call rsrv");
  2981. model.setValue("/root/send/data3/elctapprelakey", "call rsrv");
  2982. model.setValue("/root/send/data3/elctapprelacnts", "call rsrv");
  2983. }
  2984. submit("TXPMC06507");
  2985. }
  2986. }
  2987. //자격조회 팝업 호출
  2988. function fInsuInfoSearch(flag){
  2989. //보험증번호 조회(보험자격조회)
  2990. var rrgstno = model.getValue("/root/main/patinfo/patinfolist/rrgstno1") + model.getValue("/root/main/patinfo/patinfolist/rrgstno2");
  2991. var hngnm = model.getValue("/root/main/patinfo/patinfolist/hngnm");
  2992. var orddd = getCurrentDate();
  2993. //model.getValue("/root/main/reservation/orddd");
  2994. /*
  2995. if( orddd == '' ){
  2996. orddd = getCurrentDate();
  2997. }/root/main/reservation/insukind
  2998. */
  2999. /*
  3000. var parameter = rrgstno + "▦" + hngnm + "▦" + orddd + "▦" ;
  3001. */
  3002. var parm = model.getValue("/root/main/patinfo/patinfolist/rrgstno1") +
  3003. model.getValue("/root/main/patinfo/patinfolist/rrgstno2") + "▦" + //주민번호
  3004. model.getValue("/root/main/patinfo/patinfolist/hngnm") + "▦" + //이름
  3005. model.getValue("/root/main/reservation/orddd") + "▦" + //외래진료일자
  3006. "" + "▦" + //생성번호
  3007. "O" + "▦" + //진료형태
  3008. "" + "▦" + //퇴원일자
  3009. "0" + "▦" + //본인일부부담금
  3010. "" + "▦" + //기관부담금
  3011. model.getValue("/root/main/patinfo/patinfolist/pid") + "▦" + //등록번호
  3012. cmb_deptcd.value + "▦" + //진료과
  3013. "" + "▦" + //본인부담구분
  3014. "0" + "▦" + //비급여총금액
  3015. "0" + "▦" + //산전지원금
  3016. "" + "▦"; //보조유형
  3017. setParameter("SPPMC03900_PARM",parm);
  3018. //팝업타입 - 메시지 처리 피해가는 파라미터
  3019. setParameter("SPPMC03900_MSGYN", "N");
  3020. //model.setValue("/root/hidden/source", model.getValue("/root/hidden/source/checkfnexam"));
  3021. if( flag == "P" ){
  3022. modal("SPPMC03900", "1","50", "50", "SPPMC03900", "", "", "sysmenu:hidden;");
  3023. }else{
  3024. fApproveHeallifeAmt2();
  3025. /*
  3026. if( model.getValue("/root/init/P0022/P0022list[cd = '151']/nm") == 'I' ){
  3027. //setParameter("SPPMC03900_MSGYN", "Y");
  3028. fApproveHeallifeAmt2();
  3029. if( getParameter("SPPMC03900_b005check") == "Y" ){
  3030. // var retVal = messageBox("선택기관에서 의뢰된 수급권자 입니다. 자격조회 팝업을 열어 확인하시겠습니까?", "Q999", "");
  3031. // if( retVal == '6' ){
  3032. // fInsuInfoSearch("P");
  3033. // }
  3034. }
  3035. }else{
  3036. modal("SPPMC03900", "1","50", "50", "SPPMC03900", "", "", "sysmenu:hidden;");
  3037. }
  3038. */
  3039. }
  3040. // 자격조회여부 확인
  3041. //if(model.getValue("/root/hidden/com/searchInsuInfoYN") == 'Y'){
  3042. // 구환일때 보험자격 조회.
  3043. //if( model.getValue("/root/main/patinfo/patinfolist/pid").length > 1 && histstat == 'T'){
  3044. //inputEnterKey("button7", "DOMActivate");
  3045. //button7.dispatch("DOMActivate");
  3046. /*
  3047. var gOrddd = getCurrentDate();
  3048. // 구환일 경우 보험자격 조회
  3049. var parm = model.getValue("/root/main/patinfo/patinfolist/rrgstno1") +
  3050. model.getValue("/root/main/patinfo/patinfolist/rrgstno2") + "▦" + //주민번호
  3051. model.getValue("/root/main/patinfo/patinfolist/hngnm") + "▦" + //이름
  3052. gOrddd + "▦" + //외래진료일자
  3053. "0" + "▦" + //생성번호
  3054. "O" + "▦" + //진료형태
  3055. "" + "▦" + //퇴원일자
  3056. "0" + "▦" + //본인일부부담금
  3057. "" + "▦" + //기관부담금
  3058. model.getValue("/root/main/patinfo/patinfolist/pid") + "▦" + //등록번호
  3059. // model.getValue("/root/init/orddeptcd[ cd = '" + cmb_orddeptcd.value + "']/reqdeptno") + "▦" + //진료과
  3060. cmb_deptcd.value + "▦" + //진료과
  3061. "" + "▦" + //본인부담구분
  3062. "0" + "▦" + //비급여총금액
  3063. "0" + "▦" + //산전지원금
  3064. "" + "▦"; //보조유형
  3065. setParameter("SPPMC03700_RTN",parm);
  3066. //modal("SPPMC03900", "1","50", "50", "SPPMC03900", "", "", "sysmenu:hidden;");
  3067. fApproveHeallifeAmt2();
  3068. //model.resetInstanceNode("/root/send/updatedata/reservation/insukind");
  3069. */
  3070. if (getParameter("SPPMC03900_RTN") == "N" || getParameter("SPPMC03900_RTN") == ""){
  3071. //자격조회 완료여부 세팅
  3072. model.setValue("/root/hidden/flag/check_insuinfo_flag", "N");
  3073. model.setValue("/root/main/reservation/insukind", "51");
  3074. }else if(getParameter("SPPMC03900_RTN") == "F"){
  3075. model.setValue("/root/hidden/flag/check_insuinfo_flag", "F");
  3076. return;
  3077. }
  3078. if (getParameter("SPPMC03900_RTN") == "Y") {
  3079. //model.setValue("root/send/updatedata/reservation/searchInsuInfoyn", "Y");
  3080. model.setValue("/root/main/reservation/searchInsuInfoyn", "Y");
  3081. //return 값이 있으면, 보험유형,증번호,보험자기호,취득일자,피보험자성명
  3082. var insukind = getParameter("SPPMC03900_insukind");
  3083. //자격조회 완료여부 세팅
  3084. model.setValue("/root/hidden/flag/check_insuinfo_flag", "Y");
  3085. model.setValue("/root/main/reservation/insukind" , insukind);
  3086. model.setValue("/root/main/reservation/insucd" , getParameter("SPPMC03900_insucd"));
  3087. model.setValue("/root/main/reservation/insuno" , getParameter("SPPMC03900_insuno"));
  3088. model.setValue("/root/main/reservation/insdnm" , getParameter("SPPMC03900_insdnm"));
  3089. model.setValue("/root/main/reservation/ptin_fromdd" , getParameter("SPPMC03900_insufromdd"));
  3090. /*
  3091. model.setValue("/root/hidden/flag/check_insuinfo_flag", "Y");
  3092. model.setValue("/root/send/updatedata/reservation/insukind" , insukind);
  3093. model.setValue("/root/send/updatedata/reservation/insucd" , getParameter("SPPMC03900_insucd"));
  3094. model.setValue("/root/send/updatedata/reservation/insuno" , getParameter("SPPMC03900_insuno"));
  3095. model.setValue("/root/send/updatedata/reservation/insdnm" , getParameter("SPPMC03900_insdnm"));
  3096. model.setValue("/root/send/updatedata/reservation/ptin_fromdd" , getParameter("SPPMC03900_insufromdd"));
  3097. */
  3098. }
  3099. clearParameter("SPPMC03900_RTN");
  3100. clearParameter("SPPMC03900_insukind");
  3101. clearParameter("SPPMC03900_insucd");
  3102. clearParameter("SPPMC03900_insuno");
  3103. clearParameter("SPPMC03900_insdnm");
  3104. clearParameter("SPPMC03900_insufromdd");
  3105. model.refresh();
  3106. }
  3107. function fHIEList()
  3108. {
  3109. modal("SPARC02800");
  3110. var patientCustomId = model.getvalue("/root/main/hiepat/patientid");
  3111. //2015/08/21 이정택 추가(환자 정보 없을시에 리턴하도록 수정)
  3112. if(isNull(patientCustomId)){
  3113. return;
  3114. }
  3115. //HIE3
  3116. hie_zipcd1 = "";
  3117. hie_zipcd2 = "";
  3118. hie_addrbase = "";
  3119. hie_addrdetl = "";
  3120. hie_sex = model.getvalue("/root/main/hiepat/gender");
  3121. hie_rrgstno1 = model.getvalue("/root/main/hiepat/hie_rrgstno1");
  3122. hie_rrgstno2 = model.getvalue("/root/main/hiepat/hie_rrgstno2");
  3123. if (hie_rrgstno1 == "" || hie_rrgstno2 == "" || hie_rrgstno1.length != 6 || hie_rrgstno2.length != 7) {
  3124. messageBox("주민번호가 없거나 자리수가 맞지 않습니다","I");
  3125. return;
  3126. }
  3127. delPatientInfos(); //상단환자정보 클리어 - com/commonweb/js/common.js
  3128. hieyn="Y";
  3129. ipt_orddd.disabled=false;
  3130. fPidEnterEvent();
  3131. }
  3132. ]]>
  3133. </script>
  3134. </xhtml:head>
  3135. <xhtml:body guideline="2,800;" style="vertical-align:top; margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  3136. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  3137. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:93px; height:14px; ">전화예약</caption>
  3138. </group>
  3139. <group id="group2" style="left:0px; top:15px; width:1195px; height:738px; ">
  3140. <button id="btn_instsms" class="btn2_letter6" style="left:261px; top:153px; width:86px; height:19px; ">
  3141. <caption>예약SMS전송</caption>
  3142. <script type="javascript" ev:event="DOMActivate">
  3143. <![CDATA[
  3144. var orddd = model.getValue("/root/main/reservation/orddd");
  3145. if (orddd == "") {
  3146. messageBox("진료일자가 입력되지 않았습니다.", "E999");
  3147. return;
  3148. }
  3149. var ordtm = model.getValue("/root/main/reservation/ordtm");
  3150. if (ordtm == "") {
  3151. messageBox("진료시간이 입력되지 않았습니다.", "E999");
  3152. return;
  3153. }
  3154. var hngnm = model.getValue("/root/main/patinfo/patinfolist/hngnm");
  3155. if (hngnm == "") {
  3156. messageBox("환자명이 입력되지 않았습니다.", "E999");
  3157. return;
  3158. }
  3159. hngnm = hngnm.replace("★", "");
  3160. if (model.getValue("/root/main/patinfo/patinfolist/mpphontel") == "") {
  3161. messageBox("휴대폰 번호가 입력되지 않았습니다.", "E999");
  3162. return;
  3163. }
  3164. if (model.getValue("/root/main/reservation/orddeptcd") == "") {
  3165. messageBox("진료과가 지정되지 않았습니다.", "E999");
  3166. return;
  3167. }
  3168. //2014/12/08 이정택 추가
  3169. var msg="";
  3170. var dutplceinstcd=getUserInfo("dutplceinstcd");
  3171. //발신번호 검색 여부 추가(2017/03/15 이정택)
  3172. var telnosrchyn = "Y";
  3173. var cntctel = "";
  3174. if(dutplceinstcd=="031"){
  3175. msg = "[경북대학교병원]";
  3176. }else if(dutplceinstcd=="032"){
  3177. msg = "[칠곡경북대학교병원]";
  3178. telnosrchyn = "N";
  3179. cntctel = "0532002114";
  3180. }else if(dutplceinstcd=="033"){
  3181. msg = "[경북대학교치과병원]";
  3182. }else{
  3183. msg = "[경북대학교병원]";
  3184. }
  3185. //2014/12/08 이정택 추가
  3186. //2017/12/05 협력의뢰센터에서 문자 보낼시 문자 내용 수정(이정택)
  3187. var fsexamflag = model.getValue("/root/main/reservation/fsexamflag");
  3188. if(RC=='1' && (fsexamflag == 'D' || fsexamflag == 'F')){
  3189. msg = msg + hngnm + "님 "
  3190. + orddd.substr(4, 2) + "월"
  3191. + orddd.substr(6, 2) + "일 "
  3192. + ordtm.substr(0, 2) + "시"
  3193. + ordtm.substr(2, 2) + "분 "
  3194. + combo5.label
  3195. + " 진료예약입니다.(신분증, 진료의뢰서지참)";
  3196. }else{
  3197. msg = msg + hngnm + "님 "
  3198. + orddd.substr(4, 2) + "월"
  3199. + orddd.substr(6, 2) + "일 "
  3200. + ordtm.substr(0, 2) + "시"
  3201. + ordtm.substr(2, 2) + "분 "
  3202. + combo5.label
  3203. + " 진료예약입니다.(신분증지참)";
  3204. }
  3205. //2017/12/05 협력의뢰센터에서 문자 보낼시 문자 내용 수정(이정택)
  3206. if (messageBox("아래 내용으로 SMS가 전송됩니다. 계속하시겠습니까?\n\n" + msg, "Q999") == 6) {
  3207. model.setValue("/root/send/smsinfo/recvrnm", "hngnm");
  3208. model.setValue("/root/send/smsinfo/recvrtelno", model.getValue("/root/main/patinfo/patinfolist/mpphontel"));
  3209. model.setValue("/root/send/smsinfo/msgparam", msg);
  3210. model.setValue("/root/send/smsinfo/pid", model.getValue("/root/main/patinfo/patinfolist/pid"));
  3211. model.setValue("/root/send/smsinfo/orddeptcd", model.getValue("/root/main/reservation/orddeptcd"));
  3212. model.makeValue("/root/send/smsinfo/telnosrchyn", telnosrchyn);
  3213. model.makeValue("/root/send/smsinfo/cntctel", cntctel);
  3214. submit("TXPMO01801", false);
  3215. messageBox("SMS가 전송되었습니다.", "I999");
  3216. }
  3217. ]]>
  3218. </script>
  3219. </button>
  3220. <select1 id="cmb_orddrid" ref="/root/main/reservation/orddrid" class="combo_default" navindex="12" appearance="minimal" style="left:432px; top:180px; width:105px; height:19px; ">
  3221. <choices>
  3222. <itemset nodeset="/root/init/orddrid/orddridlist">
  3223. <label ref="nmsp"/>
  3224. <value ref="cd"/>
  3225. </itemset>
  3226. </choices>
  3227. <script type="javascript" ev:event="xforms-value-changed">
  3228. <![CDATA[
  3229. model.setValue("/root/main/reservation/orddd", "");
  3230. model.setValue("/root/main/reservation/ordtm", "");
  3231. //model.setValue("/root/main/reservation/centcd", "");
  3232. model.setValue("/root/main/reservation/centcdyn", "");
  3233. var orddeptcd1 = model.getValue("/root/main/outhist/outhistlist/orddeptcd");
  3234. var orddeptcd2 = model.getValue("/root/main/reservation/orddeptcd");
  3235. var orddrid1 = model.getValue("/root/main/outhist/outhistlist/orddrid");
  3236. var orddrid2 = model.getValue("/root/main/reservation/orddrid");
  3237. fGetCalendarData();
  3238. cmb_orddrid.refresh();
  3239. var orddrabbr = model.getValue("/root/init/orddrid/orddridlist[ cd = '" + cmb_orddrid.value + "']/drengabbr");
  3240. model.setValue("/root/main/reservation/orddeptnm", orddrabbr);
  3241. var sp = model.getValue("/root/init/orddrid/orddridlist[cd = '" + cmb_orddrid.value + "' and dp = '" + cmb_deptcd.value + "']/sp");
  3242. if( sp == 'Y' || sp == 'y' ){
  3243. model.setValue("/root/main/reservation/specordyn", sp);
  3244. }else{
  3245. model.setValue("/root/main/reservation/specordyn", 'N');
  3246. }
  3247. //초재진여부 조회
  3248. //2016/11/28
  3249. //fGetFsexamFlag();
  3250. //2016/11/28
  3251. model.refresh();
  3252. ]]>
  3253. </script>
  3254. </select1>
  3255. <select1 id="combo2" ref="/root/main/reservation/updtcnclresn" class="combo_default" navindex="20" appearance="minimal" style="left:308px; top:461px; width:269px; height:19px; ">
  3256. <choices>
  3257. <itemset nodeset="/root/init/P0020list/P0020">
  3258. <label ref="cdnm"/>
  3259. <value ref="cdnm"/>
  3260. </itemset>
  3261. </choices>
  3262. </select1>
  3263. <input id="input2" ref="/root/main/reservation/updtcnclresn" class="input_default" style="left:308px; top:461px; width:249px; height:19px; "/>
  3264. <line id="line13" class="line_2" style="x1:0px; y1:433px; x2:577px; y2:433px; "/>
  3265. <line id="line5" class="line_2" style="x1:0px; y1:124px; x2:577px; y2:124px; "/>
  3266. <line id="line4" class="line_2" style="x1:0px; y1:100px; x2:577px; y2:100px; "/>
  3267. <line id="line3" class="line_2" style="x1:0px; y1:76px; x2:577px; y2:76px; "/>
  3268. <line id="line2" class="line_2" style="x1:0px; y1:52px; x2:577px; y2:52px; "/>
  3269. <line id="line11" class="line_2" style="x1:0px; y1:409px; x2:215px; y2:409px; "/>
  3270. <line id="line32" class="line_2" style="x1:0px; y1:383px; x2:577px; y2:383px; "/>
  3271. <line id="line31" class="line_2" style="x1:0px; y1:305px; x2:577px; y2:306px; "/>
  3272. <line id="line30" class="line_2" style="x1:0px; y1:457px; x2:577px; y2:457px; "/>
  3273. <input id="ipt_hometel" ref="/root/main/patinfo/patinfolist/mpphontel" class="input_default" navindex="6" maxlength="13" appearance="input" style="left:479px; top:55px; width:98px; height:19px; ">
  3274. <script type="javascript" ev:event="xforms-value-changed">
  3275. <![CDATA[
  3276. model.setValue("/root/main/patinfo/patinfolist/mpphontel", fMakeTelNumFormat(model.getValue("/root/main/patinfo/patinfolist/mpphontel")));
  3277. ipt_hometel.refresh();
  3278. ]]>
  3279. </script>
  3280. <script type="javascript" ev:event="onkeypress">
  3281. <![CDATA[
  3282. if (event.keyCode == "13"){
  3283. model.setFocus("ipt_etctel1");
  3284. }
  3285. ]]>
  3286. </script>
  3287. </input>
  3288. <line id="line12" class="line_1" style="x1:0px; y1:560px; x2:970px; y2:560px; "/>
  3289. <caption id="caption1" class="tit_2" style="left:5px; top:10px; width:74px; height:13px; ">인적사항</caption>
  3290. <input id="ipt_hngnm" ref="/root/main/patinfo/patinfolist/hngnm" class="input_s_essential" navindex="3" imemode="hangul" style="left:93px; top:55px; width:103px; height:19px; ">
  3291. <script type="javascript" ev:event="onkeypress">
  3292. <![CDATA[
  3293. /*
  3294. model.setValue("/root/hidden/source/srchcond", "2");
  3295. model.setValue("/root/hidden/source/hngnm", ipt_hngnm.currentText);
  3296. inputEnterKey("btn_search", "DOMActivate");
  3297. */
  3298. if (event.keyCode == "13"){
  3299. model.setValue("/root/main/patinfo/patinfolist/hngnm", ipt_hngnm.currentText);
  3300. model.setFocus("ipt_rrgstno1");
  3301. }
  3302. ]]>
  3303. </script>
  3304. </input>
  3305. <input id="ipt_engnm" ref="/root/main/patinfo/patinfolist/engnm" class="input_default" navindex="4" appearance="input" style="left:224px; top:55px; width:182; height:19px; "/>
  3306. <caption id="caption22" class="tit_2" style="left:5px; top:159px; width:43px; height:13px; ">예약</caption>
  3307. <input id="ipt_mpphontel" ref="/root/main/patinfo/patinfolist/brthdd" class="input_default" navindex="5" maxlength="13" format="yyyy-mm-dd" appearance="input" style="left:479px; top:31px; width:98px; height:19px; "/>
  3308. <input id="ipt_detladdr" ref="/root/main/patinfo/patinfolist/detladdr" class="input_default" navindex="9" appearance="input" style="left:92px; top:127px; width:314px; height:19px; "/>
  3309. <line id="line1" class="line_1" style="x1:0px; y1:25px; x2:577px; y2:25px; "/>
  3310. <input id="ipt_rrgstno1" ref="/root/main/patinfo/patinfolist/rrgstno1" class="input_s_essential" navindex="1" format="999999" style="left:93px; top:79px; width:60px; height:19px; ">
  3311. <script type="javascript" ev:event="onkeypress">
  3312. <![CDATA[
  3313. var hngnm = ipt_hngnm.currentText;
  3314. var rrgstno1 = ipt_rrgstno1.currentText;
  3315. var rrgstno2 = ipt_rrgstno2.currentText;
  3316. if( hngnm.length > 1 ){
  3317. model.setValue("/root/hidden/source/srchcond", "4");
  3318. model.setValue("/root/hidden/source/hngnm", hngnm);
  3319. model.setValue("/root/hidden/source/rrgstno1", rrgstno1);
  3320. model.setValue("/root/hidden/source/rrgstno2", rrgstno2);
  3321. }else{
  3322. model.setValue("/root/hidden/source/srchcond", "3");
  3323. model.setValue("/root/hidden/source/rrgstno1", rrgstno1);
  3324. model.setValue("/root/hidden/source/rrgstno2", rrgstno2);
  3325. }
  3326. // model.setValue("/root/hidden/source/srchcond", "3");
  3327. // model.setValue("/root/hidden/source/rrgstno1", ipt_rrgstno1.currentText);
  3328. // model.setValue("/root/hidden/source/rrgstno2", ipt_rrgstno2.currentText);
  3329. inputEnterKey("btn_search", "DOMActivate");
  3330. ]]>
  3331. </script>
  3332. </input>
  3333. <input id="ipt_pid" ref="/root/main/patinfo/patinfolist/pid" class="input_default" imemode="alpha" appearance="input" style="left:93px; top:31px; width:126px; height:19px; ">
  3334. <script type="javascript" ev:event="onkeypress">
  3335. <![CDATA[
  3336. if(event.keyCode == "13") {
  3337. // 2014/12/28 HIE flag 초기화
  3338. hieyn="N";
  3339. // 2014/12/28 HIE flag 초기화
  3340. //fInitialize(); //초기화
  3341. delPatientInfos(); //상단환자정보 클리어 - com/commonweb/js/common.js
  3342. fPidEnterEvent();
  3343. // 메르스 접촉여부 확인
  3344. if(model.getValue("/root/main/patinfo/patinfolist/pid")!=""){
  3345. fMersPatChk("PAM", model.getValue("/root/main/patinfo/patinfolist/pid"));
  3346. }
  3347. // 2015/07/28 신우편번호 확인
  3348. // 2015/08/21 전화예약은 팝업 안뜨도록 수정
  3349. /*
  3350. if(model.getValue("/root/paminit/P0022list/P0022[cdid='94']/cdnm")=="Y"){
  3351. if(fNewZipCode(model.getValue("/root/main/patinfo/patinfolist/zipcd1"), model.getValue("/root/main/patinfo/patinfolist/zipcd2"))){
  3352. btn_srchzipcd.dispatch("DOMActivate");
  3353. }
  3354. }
  3355. */
  3356. // 2015/07/28 신우편번호 확인
  3357. }
  3358. ]]>
  3359. </script>
  3360. <script type="javascript" ev:event="xforms-value-changed">
  3361. <![CDATA[
  3362. var pid = model.getValue("/root/main/patinfo/patinfolist/pid");
  3363. model.resetInstanceNode("/root/main/patinfo/patinfolist");
  3364. fInitialize();
  3365. model.setValue("/root/main/patinfo/patinfolist/pid", pid);
  3366. fPidEnterEvent();
  3367. ]]>
  3368. </script>
  3369. </input>
  3370. <input id="ipt_etctel1" ref="/root/main/patinfo/patinfolist/hometel" class="input_default" navindex="7" maxlength="13" appearance="input" style="left:479px; top:79px; width:98px; height:19px; ">
  3371. <script type="javascript" ev:event="xforms-value-changed">
  3372. <![CDATA[
  3373. model.setValue("/root/main/patinfo/patinfolist/hometel", fMakeTelNumFormat(model.getValue("/root/main/patinfo/patinfolist/hometel")));
  3374. ipt_etctel1.refresh();
  3375. ]]>
  3376. </script>
  3377. <script type="javascript" ev:event="onkeypress">
  3378. <![CDATA[
  3379. if (event.keyCode == "13"){
  3380. model.setFocus("input5");
  3381. }
  3382. ]]>
  3383. </script>
  3384. </input>
  3385. <input id="opt_age" ref="/root/main/patinfo/patinfolist/age" class="input_default" appearance="input" style="left:351px; top:31px; width:55px; height:19px; "/>
  3386. <caption id="caption10" class="cell_1" style="left:0px; top:102px; width:90px; height:23px; vertical-align:middle; ">우편번호</caption>
  3387. <caption id="caption11" class="cell_1" style="left:0px; top:54px; width:90px; height:23px; vertical-align:middle; ">성명[한/영]</caption>
  3388. <caption id="caption12" class="cell_1" style="left:409px; top:30px; width:67px; height:23px; vertical-align:middle; ">생년월일</caption>
  3389. <caption id="caption13" class="cell_1" style="left:0px; top:126px; width:90px; height:23px; vertical-align:middle; ">하위주소</caption>
  3390. <caption id="caption14" class="cell_1" style="left:0px; top:78px; width:90px; height:23px; vertical-align:middle; ">주민번호</caption>
  3391. <caption id="caption15" class="cell_1" style="left:409px; top:78px; width:67px; height:23px; vertical-align:middle; ">집전화</caption>
  3392. <caption id="caption7" class="cell_1" style="left:0px; top:30px; width:90px; height:23px; vertical-align:middle; ">등록번호</caption>
  3393. <caption id="caption8" class="cell_1" style="left:224px; top:30px; width:67px; height:23px; vertical-align:middle; ">성별/나이</caption>
  3394. <caption id="caption17" class="cell_1" style="left:224px; top:78px; width:67px; height:23px; vertical-align:middle; ">감면내역</caption>
  3395. <caption id="caption9" class="cell_1" style="left:409px; top:54px; width:67px; height:23px; vertical-align:middle; ">휴대폰</caption>
  3396. <button id="btn_search" accesskey="f2" class="icon_search" style="left:202px; top:57px; width:16px; height:16px; ">
  3397. <caption/>
  3398. <script type="javascript" ev:event="DOMActivate">
  3399. <![CDATA[
  3400. //초기화
  3401. //fInitialize();
  3402. model.setValue("/root/hidden/source/checkfnexam", "1");
  3403. model.setValue("/root/hidden/source/autoflag", "N");
  3404. //보험 자격조회 체크 여부 초기화
  3405. model.setValue("/root/hidden/flag/check_insuinfo_flag", "N");
  3406. modal("SPPMC02500", "1","150", "150", "SPPMC02500", "/root/hidden/source", "/root/send");
  3407. var popupendflag = model.getValue("/root/main/popupendflag");
  3408. if (popupendflag == "ok"){
  3409. //초재진 구분
  3410. if( model.getValue("/root/main/patinfo/patinfolist/pid").length > 0 ){
  3411. model.setValue("/root/hidden/source/checkfnexam", '3');
  3412. }else{
  3413. model.setValue("/root/main/patinfo/patinfolist/pid", "");
  3414. model.setValue("/root/hidden/source/checkfnexam", '1');
  3415. }
  3416. //합번등록번호 체크
  3417. var sBindPid = model.getValue("/root/main/patinfo/patinfolist/bindpid");
  3418. if( sBindPid != '-' && sBindPid != '' && sBindPid != ' ' ){
  3419. //합번된 등록번호 메세지 처리
  3420. var sPid = model.getValue("/root/main/patinfo/patinfolist/pid");
  3421. var sHngnm = model.getValue("/root/main/patinfo/patinfolist/hngnm");
  3422. var retValue = messageBox(sPid + "(" + sHngnm + ") 환자의 등록번호가 [ " + sBindPid + " ] 로 합번 되었습니다. 합번된 등록번호로 재조회 하시겠습니까?", "Q999", "");
  3423. if( retValue == '6' ){
  3424. model.setValue("/root/main/patinfo/patinfolist/pid", sBindPid);
  3425. model.refresh();
  3426. event.keyCode ="13";
  3427. //ipt_cardno.dispatch("onkeypress");
  3428. ipt_pid.dispatch("onkeypress");
  3429. }else{
  3430. //화면 초기화!!
  3431. btn_init.dispatch("DOMActivate");
  3432. return false;
  3433. }
  3434. }
  3435. //감면 내역 있으면 표시
  3436. var pid = model.getvalue("/root/main/patinfo/patinfolist/pid");
  3437. if( pid != '' && pid != ' ' && pid != '-' ){
  3438. model.setValue( "/root/send/pid", pid);
  3439. submit("TRPMO00205");
  3440. }
  3441. //감면 내역 있으면 표시 끝
  3442. //환자특이내역 존재여부 표시
  3443. if( model.getValue("/root/main/patinfo/patinfolist/patspcfyn") == 'Y'){
  3444. btn_patspcfyn.attribute("background-color") = "#ff0000";
  3445. }else{
  3446. btn_patspcfyn.attribute("background-color") = "#c0c0c0";
  3447. }
  3448. fSearch();
  3449. }else{
  3450. var srchcond = model.getValue("/root/hidden/source/srchcond");
  3451. if( srchcond == '4' || srchcond == '3' ){
  3452. // fGetSexAgeBirthDD();
  3453. }
  3454. }
  3455. //팝업으로 넘겨준 데이터 초기화
  3456. var checkfnexam = model.getValue("/root/hidden/source/checkfnexam");
  3457. model.resetInstanceNode("/root/hidden/source");
  3458. model.setValue("/root/hidden/source/checkfnexam", checkfnexam);
  3459. //외래이력 휴진색상 체크
  3460. outhistColorChange();
  3461. // 메르스 접촉여부 확인
  3462. if(model.getValue("/root/main/patinfo/patinfolist/pid")!=""){
  3463. fMersPatChk("PAM", model.getValue("/root/main/patinfo/patinfolist/pid"));
  3464. }
  3465. model.refresh();
  3466. ]]>
  3467. </script>
  3468. </button>
  3469. <caption id="caption28" class="tit_2" style="left:5px; top:543px; width:108px; height:13px; ">외래이력</caption>
  3470. <caption id="caption38" class="tit_2" style="left:587px; top:10px; width:154px; height:13px; ">외래등록내역</caption>
  3471. <caption id="caption42" class="cell_1" style="left:0px; top:203px; width:105px; height:23px; vertical-align:middle; ">진료일자/시간</caption>
  3472. <caption id="caption44" class="cell_1" style="left:0px; top:387px; width:105px; height:23px; vertical-align:middle; ">선택진료설명여부</caption>
  3473. <input id="ipt_ordtm" ref="/root/main/reservation/ordtm" class="input_default" navindex="14" format="hh:nn" style="left:218px; top:204px; width:50px; height:19px; "/>
  3474. <select1 id="cmb_deptcd" ref="/root/main/reservation/orddeptcd" class="combo_default" navindex="11" appearance="minimal" style="left:196px; top:180px; width:107px; height:19px; ">
  3475. <choices>
  3476. <itemset nodeset="/root/init/orddeptcd/orddeptcdlist">
  3477. <label ref="nm"/>
  3478. <value ref="cd"/>
  3479. </itemset>
  3480. </choices>
  3481. <script type="javascript" ev:event="xforms-value-changed">
  3482. <![CDATA[
  3483. model.setValue("/root/main/reservation/orddd", "");
  3484. model.setValue("/root/main/reservation/ordtm", "");
  3485. //노드와 컨트롤의 값 동기화를 위해 리풀레쉬 해준다.
  3486. cmb_deptcd.refresh();
  3487. var rsrvflag = model.getValue("/root/main/reservation/rsrvflag");
  3488. //센터여부, 센터코드, 하위부서, 선택진료여부 초기화
  3489. model.setValue("/root/main/reservation/subdeptcd", "-");
  3490. model.setValue("/root/main/reservation/centcd", "");
  3491. model.setValue("/root/main/reservation/centcdyn", "");
  3492. model.setValue("/root/main/reservation/specordyn", "");
  3493. //응급의학과 블럭킹
  3494. if( cmb_deptcd.value == '2280000000' ){
  3495. messageBox("응급의학과는 전화예약에서 접수할 수 없습니다.", "E999", "");
  3496. model.setValue("/root/main/reservation/orddrid", "");
  3497. model.setValue("/root/main/reservation/orddeptcd", "");
  3498. model.setValue("/root/main/reservation/subdeptcd", "-");
  3499. model.setValue("/root/main/reservation/orddeptnm", "");
  3500. // model.setValue("/root/main/reservation/centcd", "-");
  3501. model.refresh();
  3502. model.setFocus("cmb_deptcd");
  3503. return false;
  3504. }
  3505. /*
  3506. combo6.visible = false;
  3507. cmb_orddrid.visible = true;
  3508. */
  3509. //sub진료과 세팅 2008-09-12 추가
  3510. cmb_subdeptcd.choices.itemset.attribute("nodeset") = "/root/init/subdeptcd/subdeptcdlist[dp = '"+ cmb_deptcd.value +"' or dp = '-']";
  3511. cmb_subdeptcd.refresh();
  3512. //2007-08-17 이동식 추가 - 진료과 선택시 영문약어표시
  3513. var deptengabbr = model.getValue("/root/init/orddeptcd/orddeptcdlist[ cd = '" + cmb_deptcd.value + "']/deptengabbr");
  3514. model.setValue("/root/main/reservation/orddeptnm", deptengabbr);
  3515. //END..
  3516. cmb_orddrid.choices.itemset.attribute("nodeset") = "/root/init/orddrid/orddridlist[dp = '" + cmb_deptcd.value + "']";
  3517. model.setValue("/root/main/reservation/orddrid", "");
  3518. //초재진여부 조회
  3519. fGetFsexamFlag();
  3520. model.refresh();
  3521. if(RD == 'Y'){
  3522. if( model.getValue("/root/main/patinfo/patinfolist/pid").length < 1 && model.getValue("/root/main/patinfo/patinfolist/hngnm").length < 1 ){
  3523. //환자정보 없을 경우 진료의뢰서 체크 안함!!!
  3524. }else if( model.getValue("/root/main/patinfo/patinfolist/pid").length < 1 && model.getValue("/root/main/patinfo/patinfolist/hngnm").length > 1 ){
  3525. var reqdeptno = model.getValue("/root/init/orddeptcd/orddeptcdlist[ cd = '" + cmb_deptcd.value + "']/reqdeptno");
  3526. //등록번호 없고 환자 이름이 입력된 경우 - 신환! 무조건 메세지 출력!!
  3527. // 치과 진찰료 별도산정 관련 수정(2017/05/10 이정택)
  3528. //if( reqdeptno == "55" || reqdeptno == "23" || reqdeptno == "21" || rsrvflag == "C" ){
  3529. if( reqdeptno.substr(0,1)=="5" || reqdeptno == "23" || reqdeptno == "21" || rsrvflag == "C" ){
  3530. model.setValue("/root/main/reservation/ordreqdescyn", 'Y');
  3531. //진료의뢰서가 필요 없을경우 선택진료설명여부 Yes 세팅
  3532. //model.setValue("/root/main/reservation/specorddescyn", 'Y');
  3533. }else {
  3534. messageBox("진료의뢰서가 필요합니다.", "E999", "");
  3535. model.setValue("/root/main/reservation/ordreqdescyn", '');
  3536. }
  3537. }else{
  3538. //진료의뢰서 확인
  3539. var pid = model.getValue("/root/main/patinfo/patinfolist/pid");
  3540. var fsexamflag = model.getValue("/root/main/reservation/fsexamflag");
  3541. var orddeptcd = cmb_deptcd.value;
  3542. // var deptengabbr = model.getValue("/root/init/orddeptcd/orddeptcdlist[ cd = '" + cmb_deptcd.value + "']/deptengabbr");
  3543. var reqdeptno = model.getValue("/root/init/orddeptcd/orddeptcdlist[ cd = '" + cmb_deptcd.value + "']/reqdeptno");
  3544. var outhistpath = "/root/main/outhist/outhistlist"; //외래이력노드
  3545. if( ! fCheckOrdCnst(pid, fsexamflag, orddeptcd, deptengabbr, reqdeptno, outhistpath, INSUKIND) && rsrvflag != "C"){
  3546. messageBox("진료의뢰서가 필요합니다.", "E999", "");
  3547. model.setValue("/root/main/reservation/ordreqdescyn", '');
  3548. }else {
  3549. model.setValue("/root/main/reservation/ordreqdescyn", 'Y');
  3550. //진료의뢰서가 필요 없을경우 선택진료설명여부 Yes 세팅
  3551. //model.setValue("/root/main/reservation/specorddescyn", 'Y');
  3552. }
  3553. }
  3554. }
  3555. model.refresh();
  3556. ]]>
  3557. </script>
  3558. </select1>
  3559. <input id="ipt_orddd" ref="/root/main/reservation/orddd" class="input_default" disabled="true" navindex="13" inputtype="date" style="left:108px; top:204px; width:107px; height:19px; ">
  3560. <script type="javascript" ev:event="xforms-value-changed">
  3561. <![CDATA[
  3562. if( model.getValue("/root/main/reservation/rsrvflag") != '9' ){
  3563. //초재진여부 조회
  3564. fGetFsexamFlag();
  3565. }
  3566. model.setFocus("ipt_ordtm");
  3567. model.refresh();
  3568. ]]>
  3569. </script>
  3570. </input>
  3571. <select1 id="radio5" ref="/root/main/reservation/specorddescyn" navindex="15" appearance="full" cellspacing="8" cols="2" rows="1" overflow="visible" style="left:109px; top:389px; width:106px; height:20px; background-color:transparent; border-style:none; ">
  3572. <choices>
  3573. <item>
  3574. <label>Yes</label>
  3575. <value>Y</value>
  3576. </item>
  3577. <item>
  3578. <label>No</label>
  3579. <value>N</value>
  3580. </item>
  3581. </choices>
  3582. </select1>
  3583. <line id="line51" class="line_1" style="x1:582px; y1:25px; x2:969px; y2:25px; "/>
  3584. <caption id="caption3" class="cell_1" style="left:0px; top:411px; width:105px; height:23px; vertical-align:middle; ">보험회사직원여부</caption>
  3585. <select1 id="radio15" ref="/root/main/reservation/insuchrgyn" navindex="16" appearance="full" cellspacing="8" cols="2" rows="1" overflow="visible" style="left:109px; top:413px; width:106px; height:20px; background-color:transparent; border-style:none; ">
  3586. <choices>
  3587. <item>
  3588. <label>Yes</label>
  3589. <value>Y</value>
  3590. </item>
  3591. <item>
  3592. <label>No</label>
  3593. <value>N</value>
  3594. </item>
  3595. </choices>
  3596. </select1>
  3597. <caption id="caption4" class="cell_1" style="left:0px; top:435px; width:105px; height:23px; vertical-align:middle; ">의뢰서설명여부</caption>
  3598. <select1 id="radio6" ref="/root/main/reservation/ordreqdescyn" navindex="17" appearance="full" cellspacing="8" cols="2" rows="1" overflow="visible" style="left:109px; top:438px; width:106px; height:15px; background-color:transparent; border-style:none; ">
  3599. <choices>
  3600. <item>
  3601. <label>Yes</label>
  3602. <value>Y</value>
  3603. </item>
  3604. <item>
  3605. <label>No</label>
  3606. <value>N</value>
  3607. </item>
  3608. </choices>
  3609. </select1>
  3610. <caption id="caption16" class="cell_1" style="left:0px; top:351px; width:105px; height:35px; vertical-align:middle; ">
  3611. <![CDATA[통화내용
  3612. ]]>
  3613. </caption>
  3614. <textarea id="textarea3" ref="/root/main/reservation/telrsrvrem" navindex="19" scroll="vertical" imemode="hangul" style="left:108px; top:351px; width:469px; height:35px; "/>
  3615. <datagrid id="grd_outrgst" nodeset="/root/main/outrgst/outrgstlist" class="datagrid2" backcoloralternate="transparent" caption="시간^등록번호^환자명^초/재^예약&#xA;구분^진료구분^최초접수시간^통화내용^수납여부^rrgstno1^rrgstno2^진료구분" colsep="^" colwidth="39, 71, 57, 60, 50, 55, 130, 100, 35, 100, 100, 100, 100" dataheight="23" defaultrows="2" extendlastcol="scroll" rowheight="23" rowsep="|" style="left:974px; top:30px; width:219px; height:615px; ">
  3616. <col ref="ordtm" format="hh:nn"/>
  3617. <col ref="pid"/>
  3618. <col ref="hngnm"/>
  3619. <col ref="fsexamflag" type="combo">
  3620. <choices>
  3621. <itemset nodeset="/root/init/P0021list/P0021">
  3622. <label ref="cdnm"/>
  3623. <value ref="cdid"/>
  3624. </itemset>
  3625. </choices>
  3626. </col>
  3627. <col disabled="true" ref="rsrvflag" type="combo">
  3628. <choices>
  3629. <itemset nodeset="/root/init/P0341list/P0341">
  3630. <label ref="cdnm"/>
  3631. <value ref="cdid"/>
  3632. </itemset>
  3633. </choices>
  3634. </col>
  3635. <col disabled="true" ref="etcordflag" type="combo">
  3636. <choices>
  3637. <itemset nodeset="/root/init/P0022list/P0022">
  3638. <label ref="cdnm"/>
  3639. <value ref="cdid"/>
  3640. </itemset>
  3641. </choices>
  3642. </col>
  3643. <col ref="fstacptdt" visibility="hidden" format="yyyy-mm-dd hh:nn:ss"/>
  3644. <col ref="telrsrvrem"/>
  3645. <col ref="rcptyn"/>
  3646. <col ref="rrgstno1" visibility="hidden"/>
  3647. <col ref="rrgstno2" visibility="hidden"/>
  3648. <col ref="reglscheflag" visibility="hidden"/>
  3649. <col ref="etcrsrvflag" visibility="hidden"/>
  3650. <script type="javascript" ev:event="onclick">
  3651. <![CDATA[
  3652. var cur_row = grd_outrgst.row;
  3653. var cur_col = grd_outrgst.col;
  3654. var checkflag = model.getValue("/root/main/outrgst/outrgstlist[" + cur_row + "]/fsexamflag");
  3655. var fsexamflag = model.getValue("/root/main/reservation/fsexamflag");
  3656. var hngnm = model.getValue("/root/main/outrgst/outrgstlist[" + cur_row + "]/hngnm");
  3657. if(cur_row > 0 && cur_col >= 0){
  3658. if(fsexamflag == 'R' || fsexamflag == 'S'){
  3659. if(checkflag == 'F' || checkflag == 'D'){
  3660. messageBox("재진환자는 재진시간만 예약이 가능합니다.", "E999", "");
  3661. return;
  3662. }
  3663. if( hngnm.length != 0){
  3664. messageBox("이미 예약이 되어 있는 시간입니다.", "E999", "");
  3665. return;
  3666. }
  3667. }else if(fsexamflag == 'F' || fsexamflag == 'D' || fsexamflag == '4'){
  3668. if(checkflag == 'R' || checkflag == 'S'){
  3669. messageBox("초진환자는 초진시간만 예약이 가능합니다.", "E999", "");
  3670. return;
  3671. }
  3672. if(hngnm.length != 0){
  3673. messageBox("이미 예약이 되어 있는 시간입니다.", "E999", "");
  3674. return;
  3675. }
  3676. }
  3677. /*
  3678. if(hngnm != '' || hngnm != null || hngnm != '-' || hngnm != ' ' ){
  3679. messageBox("이미 예약이 되어 있는 시간입니다.", "E999", "");
  3680. return;
  3681. }
  3682. */
  3683. model.setValue("/root/main/reservation/ordtm", model.getValue("/root/main/outrgst/outrgstlist[" + cur_row + "]/ordtm"));
  3684. //model.setValue("/root/main/reservation/orddd", model.getValue("/root/main/outrgst/outrgstlist[" + cur_row + "]/orddd"));
  3685. //심층진찰 관련 프로그램 수정(2018/02/02)
  3686. var etcrsrvflag = model.getValue("/root/main/outrgst/outrgstlist[" + cur_row + "]/etcrsrvflag");
  3687. if(etcrsrvflag=='B'){
  3688. messageBox("선택하신 세션은 심층진찰 세션입니다.", "I999", "");
  3689. model.makeValue("/root/main/reservation/etcordflag", 'U');
  3690. }else{
  3691. model.makeValue("/root/main/reservation/etcordflag", '-');
  3692. }
  3693. //심층진찰 관련 프로그램 수정(2018/02/02)
  3694. model.refresh();
  3695. }
  3696. ]]>
  3697. </script>
  3698. </datagrid>
  3699. <select1 id="radio13" ref="/root/main/rsrvflag" appearance="full" cellspacing="8" cols="7" rows="1" overflow="visible" style="left:76px; top:542px; width:599px; height:16px; background-color:transparent; border-style:none; ">
  3700. <choices>
  3701. <item>
  3702. <label>전화/인터넷예약</label>
  3703. <value>T</value>
  3704. </item>
  3705. <item>
  3706. <label>접수이력</label>
  3707. <value>R</value>
  3708. </item>
  3709. <item>
  3710. <label>미진료이력</label>
  3711. <value>N</value>
  3712. </item>
  3713. <item>
  3714. <label>취소이력</label>
  3715. <value>X</value>
  3716. </item>
  3717. <item>
  3718. <label>전체</label>
  3719. <value>A</value>
  3720. </item>
  3721. <item>
  3722. <label>검사예약</label>
  3723. <value>S</value>
  3724. </item>
  3725. <!--
  3726. <item>
  3727. <label>타검사현황</label>
  3728. <value>E</value>
  3729. </item>
  3730. -->
  3731. </choices>
  3732. <script type="javascript" ev:event="xforms-value-changed">
  3733. <![CDATA[
  3734. //탭이동
  3735. fChangeRsrvSpecTab();
  3736. var rsrvFlag = radio13.value;
  3737. var curDate = getCurrentDate();
  3738. //접수이력
  3739. if( rsrvFlag == "R" ){
  3740. grd_outhist.attribute("nodeset") = "/root/main/outhist/outhistlist[ histstat ='R' ]";
  3741. grd_outhist.rebuild();
  3742. //전화/인터넷예약
  3743. }else if( rsrvFlag == "T"){
  3744. grd_outhist.attribute("nodeset") = "/root/main/outhist/outhistlist[ (histstat ='T' or histstat = 'R') and ( rsrvflag = '2' or rsrvflag = '5' or rsrvflag = '1') and orddd>="+curDate+"]";
  3745. //grd_outhist.attribute("nodeset") = "/root/main/outhist/outhistlist[ orddd > "+ curDate+"]";
  3746. grd_outhist.rebuild();
  3747. //취소이력
  3748. }else if( rsrvFlag == "X"){
  3749. grd_outhist.attribute("nodeset") = "/root/main/outhist/outhistlist[ histstat ='X' ]";
  3750. grd_outhist.rebuild();
  3751. //미진료이력
  3752. }else if( rsrvFlag == "N"){
  3753. //grd_outhist.attribute("nodeset") = "/root/main/outhist/outhistlist[ histstat ='R' and dracptyn != 'Y']";
  3754. //grd_outhist.attribute("nodeset") = "/root/main/outhist/outhistlist[ orddd < "+ curDate+"]";
  3755. grd_outhist.attribute("nodeset") = "/root/main/outhist/outhistlist[ dracptyn != 'Y' and (histstat = 'T' or histstat = 'R') and orddd>="+curDate+"]";
  3756. grd_outhist.rebuild();
  3757. //검사예약
  3758. }else if( rsrvFlag == "S"){
  3759. grd_outhist.attribute("nodeset") = "/root/main/outhist/outhistlist";
  3760. grd_outhist.rebuild();
  3761. //타검사현황
  3762. }else{
  3763. grd_outhist.attribute("nodeset") = "/root/main/outhist/outhistlist";
  3764. grd_outhist.rebuild();
  3765. grd_anoprcplist.rebuild();
  3766. }
  3767. grd_outhist.allStyle("all","background-color") = "#ffffff"; //배경색을 초기화 한다.
  3768. setRowStyle("grd_outhist", "2","Y","holiyn","equal"); //row의 색상을 변경한다.
  3769. grd_outhist.rebuild();
  3770. ]]>
  3771. </script>
  3772. </select1>
  3773. <caption id="caption30" class="cell_1" style="left:0px; top:308px; width:105px; height:40px; vertical-align:middle; ">의사 전문분야</caption>
  3774. <textarea id="output132" ref="/root/main/reservation/ordfild" disabled="false" appearance="textarea" style="left:108px; top:308px; width:469px; height:40px; "/>
  3775. <line id="line24" class="line_2" style="x1:0px; y1:225px; x2:577px; y2:225px; "/>
  3776. <caption id="caption31" class="cell_1" style="left:0px; top:227px; width:105px; height:38px; text-align:center; vertical-align:middle; ">
  3777. <![CDATA[초진
  3778. 특이사항]]>
  3779. </caption>
  3780. <textarea id="opt_fstexamrem" ref="/root/main/reservation/fstexamrem" disabled="false" editable="false" appearance="textarea" style="left:108px; top:227px; width:469px; height:38px; "/>
  3781. <line id="line28" class="line_1" style="x1:973px; y1:25px; x2:1193px; y2:25px; "/>
  3782. <caption id="caption32" class="tit_2" style="left:976px; top:10px; width:99px; height:13px; ">외래등록내역</caption>
  3783. <select1 id="radio1" ref="/root/main/reservation/ordreqhospgrde" navindex="18" appearance="full" cellspacing="11" cols="2" rows="1" overflow="visible" style="left:109px; top:462px; width:105px; height:15px; background-color:transparent; border-style:none; ">
  3784. <choices>
  3785. <item>
  3786. <label>1차</label>
  3787. <value>1</value>
  3788. </item>
  3789. <item>
  3790. <label>2차</label>
  3791. <value>2</value>
  3792. </item>
  3793. </choices>
  3794. </select1>
  3795. <input id="ipt_rrgstno2" ref="/root/main/patinfo/patinfolist/rrgstno2" class="input_s_essential" navindex="2" autonext="false" format="9999999" style="left:156px; top:79px; width:63px; height:19px; ">
  3796. <script type="javascript" ev:event="onkeypress">
  3797. <![CDATA[
  3798. if (event.keyCode == "13"){
  3799. fRgstno2EnterEvent();
  3800. // fSearch();
  3801. }
  3802. ]]>
  3803. </script>
  3804. <script type="javascript" ev:event="DOMFocusOut">
  3805. <![CDATA[
  3806. if( model.getValue("/root/main/patinfo/patinfolist/brthdd") == "" || model.getValue("/root/main/patinfo/patinfolist/sex") == "" || model.getValue("/root/main/patinfo/patinfolist/age") ==""){
  3807. fGetSexAgeBirthDD();
  3808. model.refresh();
  3809. }
  3810. ]]>
  3811. </script>
  3812. </input>
  3813. <input id="ipt_zipcd1" ref="/root/main/patinfo/patinfolist/zipcd1" class="input_default" appearance="input" style="left:93px; top:103px; width:30px; height:19px; "/>
  3814. <output id="opt_addr" ref="/root/main/patinfo/patinfolist/addr" class="output_fix" appearance="output" style="left:199px; top:103px; width:207px; height:19px; "/>
  3815. <input id="ipt_zipcd2" ref="/root/main/patinfo/patinfolist/zipcd2" class="input_default" appearance="input" style="left:126px; top:103px; width:30px; height:19px; "/>
  3816. <input id="ipt_zipcdseq" ref="/root/main/patinfo/patinfolist/zipcdseq" class="input_default" appearance="input" style="left:159px; top:103px; width:15px; height:19px; "/>
  3817. <import id="import1" src="../../../pam/pambaseinfomngtweb/xrw/SPPMB01001_병원달력.xrw" style="left:582px; top:30px; width:388px; height:505px; "/>
  3818. <button id="btn_srchzipcd" accesskey="f2" class="icon_search" navindex="8" style="left:177px; top:105px; width:16px; height:16px; ">
  3819. <caption/>
  3820. <script type="javascript" ev:event="DOMActivate">
  3821. <![CDATA[
  3822. zbcfOpenZipCodeList("combination"
  3823. , ""
  3824. , "/root/main/patinfo/patinfolist/zipcd1"
  3825. , "/root/main/patinfo/patinfolist/zipcd2"
  3826. , "/root/main/patinfo/patinfolist/zipcdseq"
  3827. , "/root/main/patinfo/patinfolist/addr"
  3828. , ""
  3829. , "/root/main/patinfo/patinfolist/detladdr"
  3830. , "/root/main/patinfo/patinfolist/builno"
  3831. );
  3832. ]]>
  3833. </script>
  3834. </button>
  3835. <input id="ipt_orddeptnm" ref="/root/main/reservation/orddeptnm" class="input_default" navindex="10" visibility="hidden" imemode="disabled" maxlength="6" _chartype="upper" appearance="input" style="left:287px; top:153px; width:60px; height:19px; ">
  3836. <script type="javascript" ev:event="DOMFocusOut">
  3837. <![CDATA[
  3838. // var abbr = ipt_orddeptnm.value;
  3839. // var orddeptcd = model.getValue("/root/init/orddeptcd/orddeptcdlist[ deptengabbr = '" + abbr.toUpperCase() + "']/cd");
  3840. // model.setValue("/root/main/reservation/orddeptcd", orddeptcd );
  3841. // cmb_deptcd.refresh();
  3842. // cmb_deptcd.dispatch("xforms-value-changed");
  3843. // model.setFocus("cmb_orddrid")
  3844. //var abbr = ipt_orddeptabbr.value;
  3845. var abbr = ipt_orddeptnm.value;
  3846. var orddrabbr = '';
  3847. var orddeptabbr = '';
  3848. if( abbr.length >= 4 ){
  3849. orddrabbr = abbr;
  3850. // orddeptabbr = abbr.substr(0,2);
  3851. }else if( abbr.length == 0 ){
  3852. return false;
  3853. }else{
  3854. orddeptabbr = abbr.substr(0,2);
  3855. }
  3856. var orddeptcd = '';
  3857. var orddrid = '';
  3858. var ordid = model.getValue("/root/main/reservation/orddrid");
  3859. var ordept = model.getValue("/root/main/reservation/orddeptcd");
  3860. //진료의 세팅
  3861. if( orddrabbr != '' ){
  3862. orddrid = model.getValue("/root/init/orddrid/orddridlist[ drengabbr = '" + orddrabbr.toUpperCase() + "']/cd");
  3863. orddeptcd = model.getValue("/root/init/orddrid/orddridlist[ drengabbr = '" + orddrabbr.toUpperCase() + "']/dp");
  3864. //진료과세팅
  3865. model.setValue("/root/main/reservation/orddeptcd", orddeptcd );
  3866. cmb_deptcd.refresh();
  3867. cmb_deptcd.dispatch("xforms-value-changed");
  3868. //진료의 세팅
  3869. model.setValue("/root/main/reservation/orddrid", orddrid );
  3870. cmb_orddrid.refresh();
  3871. cmb_orddrid.dispatch("xforms-value-changed");
  3872. model.setFocus("ipt_orddd");
  3873. }else if( orddeptabbr != '' ){
  3874. //진료과 세팅
  3875. var orddeptcd = model.getValue("/root/init/orddeptcd/orddeptcdlist[ deptengabbr = '" + orddeptabbr.toUpperCase() + "']/cd");
  3876. model.setValue("/root/main/reservation/orddeptcd", orddeptcd );
  3877. cmb_deptcd.refresh();
  3878. cmb_deptcd.dispatch("xforms-value-changed");
  3879. }else{
  3880. model.setFocus("cmb_deptcd") ;
  3881. }
  3882. //model.setFocus("ipt_orddeptdrabbr")
  3883. ]]>
  3884. </script>
  3885. <script type="javascript" ev:event="onkeypress">
  3886. <![CDATA[
  3887. if (event.keyCode == "13"){
  3888. model.setFocus("cmb_orddrid")
  3889. }
  3890. ]]>
  3891. </script>
  3892. </input>
  3893. <line id="line6" class="line_3" style="x1:0px; y1:148px; x2:577px; y2:148px; "/>
  3894. <output id="output1" ref="/root/main/h_dcuc/dcuc/disccd" class="output_fix" style="left:293px; top:79px; width:30px; height:19px; text-align:center; "/>
  3895. <select id="checkbox1" ref="/root/main/oneminute" visibility="hidden" overflow="visible" appearance="full" style="left:970px; top:5px; width:100px; height:20px; border-style:none; ">
  3896. <choices>
  3897. <item>
  3898. <label>1분간격 풀기</label>
  3899. <value>Y</value>
  3900. </item>
  3901. </choices>
  3902. <script type="javascript" ev:event="xforms-value-changed">
  3903. <![CDATA[
  3904. if( getNodesetCount("/root/main/outrgst/outrgstlist") > 1 ){
  3905. fOneMinuteSpread();
  3906. }
  3907. ]]>
  3908. </script>
  3909. </select>
  3910. <input id="input1" ref="/root/main/reservation/ordtm" format="hh:nn" style="left:1038px; top:650px; width:55px; height:19px; "/>
  3911. <caption id="caption2" class="cell_1" style="left:220px; top:460px; width:85px; height:23px; vertical-align:middle; ">변경/취소사유</caption>
  3912. <button id="btn_clear" class="btn2_letter3" style="left:524px; top:153px; width:53px; height:19px; ">
  3913. <caption>Clear</caption>
  3914. <script type="javascript" ev:event="DOMActivate">
  3915. <![CDATA[
  3916. model.resetInstanceNode("/root/main/reservation");
  3917. model.removeNodeset("/root/main/outrgst/outrgstlist");
  3918. model.resetInstanceNode("/root/tmp/reservation");
  3919. model.resetInstanceNode("/root/main/outhist/outhistlist");
  3920. model.resetInstanceNode("/root/main/test/testlist");
  3921. model.resetInstanceNode("/root/hidden/con/examcnt");
  3922. model.resetInstanceNode("/root/resercnt");
  3923. //2016/04/29 이정택 수정(회송(되회송) 시범사업 관련 프로그램 수정)
  3924. model.resetInstanceNode("/root/tmp/refer_sibum");
  3925. //2016/04/29 이정택 수정(회송(되회송) 시범사업 관련 프로그램 수정)
  3926. delPatientInfos(); //상단환자정보 클리어 - com/commonweb/js/common.js
  3927. //1분 간격 풀기 초기화
  3928. model.setValue("/root/main/oneminute", "");
  3929. model.setValue("/root/send/data3/stat", "");
  3930. var isMonth = model.getValue("/root/hidden/calendar/month");
  3931. var isYear = model.getValue("/root/hidden/calendar/year");
  3932. var isDate = (isYear+isMonth+1).toDate();
  3933. setCalendar(isDate);
  3934. //설명여부 디폴트값 세팅
  3935. model.setValue("/root/main/reservation/specorddescyn", 'N');
  3936. model.setValue("/root/main/reservation/insuchrgyn", 'N');
  3937. model.setValue("/root/main/reservation/ordreqdescyn", ' ');
  3938. model.setValue("/root/main/reservation/ordreqhospgrde", '1');
  3939. model.setValue("/root/main/reservation/etcordflag", "-");
  3940. //협력의뢰 디폴트 세팅
  3941. if( RC == '1' ){
  3942. model.setValue("/root/main/reservation/rqstflag", '1');
  3943. }else if(RC == 'U' ){ //국제협력
  3944. model.setValue("/root/main/reservation/rqstflag", 'U');
  3945. }
  3946. pamGetDeptCDDrIDList();
  3947. model.refresh();
  3948. ]]>
  3949. </script>
  3950. </button>
  3951. <output id="output3" ref="/root/main/h_dcuc/dcuc/discunconm" class="output_fix" style="left:326px; top:79px; width:80px; height:19px; text-align:left; "/>
  3952. <caption id="caption25" class="cell_1" style="left:0px; top:459px; width:105px; height:23px; vertical-align:middle; ">의뢰서병원등급</caption>
  3953. <output id="output2" ref="/root/main/reservation/specordyn" class="output_fix" appearance="output" style="left:542px; top:180px; width:35px; height:19px; text-align:center; "/>
  3954. <caption id="caption35" class="cell_1" style="left:366px; top:178px; width:63px; height:23px; vertical-align:middle; ">진료의</caption>
  3955. <select1 id="combo1" ref="/root/main/reservation/fsexamflag" class="combo_default" disabled="true" appearance="minimal" style="left:271px; top:204px; width:92px; height:19px; ">
  3956. <choices>
  3957. <itemset nodeset="/root/init/P0021list/P0021">
  3958. <label ref="cdnm"/>
  3959. <value ref="cdid"/>
  3960. </itemset>
  3961. </choices>
  3962. </select1>
  3963. <button id="btn_patspcfyn" style="left:75px; top:3px; width:20px; height:20px; background-color:#c0c0c0; ">
  3964. <caption/>
  3965. <script type="javascript" ev:event="DOMActivate">
  3966. <![CDATA[
  3967. model.setValue("/root/hidden/source/srchcond", 1);
  3968. model.setValue("/root/hidden/source/pid", model.getValue("/root/main/patinfo/patinfolist/pid"));
  3969. //model.setValue("/root/hidden/source", model.getValue("/root/hidden/source/checkfnexam"));
  3970. modal("SMPMC01300", "1", "", "", "SMPMC01300", "/root/hidden/source", "/root/source");
  3971. ]]>
  3972. </script>
  3973. </button>
  3974. <caption id="cap_privacy" visibility="hidden" style="left:97px; top:3px; width:74px; height:20px; font-size:8pt; font-weight:bold; color:#000000; text-align:center; background-color:#ff0000; border-color:#000000; border-style:solid; ">사생활보호</caption>
  3975. <caption id="caption26" class="cell_1" style="left:975px; top:649px; width:60px; height:23px; vertical-align:middle; ">진료시간</caption>
  3976. <select1 id="cmb_sex" ref="/root/main/patinfo/patinfolist/sex" class="combo_default" appearance="minimal" style="left:294px; top:31px; width:54px; height:19px; ">
  3977. <choices>
  3978. <itemset nodeset="/root/init/P0313list/P0313">
  3979. <label ref="cdnm"/>
  3980. <value ref="cdid"/>
  3981. </itemset>
  3982. </choices>
  3983. </select1>
  3984. <caption id="caption5" class="cell_1" visibility="hidden" style="left:220px; top:484px; width:85px; height:23px; vertical-align:middle; ">협력의뢰병원</caption>
  3985. <input id="ipt_rqsthospcd" ref="/root/main/reservation/rqsthospcd" class="input_default" visibility="hidden" style="left:308px; top:485px; width:130px; height:19px; "/>
  3986. <caption id="caption29" class="cell_1" visibility="hidden" style="left:441px; top:484px; width:55px; height:23px; vertical-align:middle; ">통화자</caption>
  3987. <input id="ipt_rqstdrid" ref="/root/main/reservation/rqstdrid" class="input_default" visibility="hidden" style="left:499px; top:485px; width:78px; height:19px; "/>
  3988. <caption id="caption33" class="cell_1" visibility="hidden" style="left:0px; top:483px; width:105px; height:23px; vertical-align:middle; ">원스탑</caption>
  3989. <select1 id="cmb_onestop" ref="/root/main/reservation/onestop" class="combo_default" visibility="hidden" appearance="minimal" style="left:109px; top:485px; width:105px; height:19px; ">
  3990. <choices>
  3991. <itemset nodeset="/root/init/A0420list/A0420">
  3992. <label ref="cdnm"/>
  3993. <value ref="cdid"/>
  3994. </itemset>
  3995. </choices>
  3996. </select1>
  3997. <line id="line7" class="line_1" style="x1:0px; y1:174px; x2:577px; y2:174px; "/>
  3998. <select1 id="cmb_rqstflag" ref="/root/main/reservation/rqstflag" class="combo_default" visibility="hidden" appearance="minimal" style="left:53px; top:154px; width:75px; height:19px; ">
  3999. <choices>
  4000. <itemset nodeset="/root/init/P0329list/P0329">
  4001. <label ref="cdnm"/>
  4002. <value ref="cdid"/>
  4003. </itemset>
  4004. </choices>
  4005. </select1>
  4006. <group id="group4" style="left:330px; top:507px; width:247px; height:31px; ">
  4007. <button id="button10" class="btn4_letter2" navindex="23" style="left:120px; top:5px; width:56px; height:22px; ">
  4008. <caption>취소</caption>
  4009. <script type="javascript" ev:event="DOMActivate">
  4010. <![CDATA[
  4011. //변경/취소 모드인지 체크
  4012. var rsrvflag = model.getValue("/root/main/reservation/rsrvflag");
  4013. var histstat = model.getValue("/root/main/reservation/histstat");
  4014. if( grd_outhist.row < 1 || rsrvflag == '' || histstat == ''){
  4015. messageBox("취소할 내역이 선택되지 않았습니다.", "E999", "");
  4016. return false;
  4017. }
  4018. var row = grd_outhist.row;
  4019. var etcordflag = model.getValue("/root/main/outhist/outhistlist["+row+"]/etcordflag");
  4020. if(etcordflag=='4' || etcordflag=='5'){
  4021. messageBox("해당 환자는 다학제 환자로 취소 불가능합니다.", "E999", "");
  4022. return false;
  4023. }
  4024. //의사접수여부가 'Y'인 내역은 변경/취소할 수 없습니다.
  4025. //var rcptyn = grd_outhist.valueMatrix( grd_outhist.row, grd_outhist.colRef("rcptyn"));
  4026. //var histstat = grd_outhist.valueMatrix( grd_outhist.row, grd_outhist.colRef("histstat"));
  4027. if(histstat == 'R'){
  4028. messageBox("수납내역이 있는 외래내역은 취소할 수 없습니다.", "E999", "");
  4029. return false;
  4030. //처방발생여부가 'Y'인 내역은 변경/취소할 수 없습니다.
  4031. }
  4032. // 신환/구환을 구분한다.
  4033. if( model.getValue("/root/main/reservation/cretno") != '' &&
  4034. model.getValue("/root/main/reservation/acptseqno") != '' &&
  4035. model.getValue("/root/main/patinfo/patinfolist/pid").length > 0 &&
  4036. model.getValue("/root/main/reservation/acptno") == '0' ){
  4037. model.setValue("/root/hidden/source/checkfnexam", '3');
  4038. }else{
  4039. model.setValue("/root/hidden/source/checkfnexam", '1');
  4040. }
  4041. // if( pamCompareNodes("/root/main/patinfo/patinfolist", "/root/tmp/patinfolist") && (!fCnclCheck())){
  4042. if( (!fCnclCheck())){
  4043. if( messageBox("예약정보를 정말 취소하시겠습니까?", "Q003") == 6){
  4044. model.setValue("/root/send/data3/stat", "d");
  4045. fMakeRsrv('X');
  4046. }
  4047. }else{
  4048. messageBox("예약정보가 수정되었습니다. 수정된 정보는 취소할 수 없습니다.", "E999", "");
  4049. }
  4050. model.refresh();
  4051. ]]>
  4052. </script>
  4053. </button>
  4054. <button id="button11" class="btn4_letter2" navindex="21" style="left:0px; top:5px; width:56px; height:22px; ">
  4055. <caption>예약</caption>
  4056. <script type="javascript" ev:event="DOMActivate">
  4057. <![CDATA[
  4058. if(fBrthddVeri(model.getValue("/root/main/patinfo/patinfolist/brthdd"),"") == false) return; //2010-01-19 김주희 DUR관련 생년월일체크
  4059. //치과는 재진 예약시 예약 불가(초진만 가능)
  4060. var reqdeptno = model.getValue("/root/init/orddeptcd/orddeptcdlist[ cd = '" + cmb_deptcd.value + "']/reqdeptno");
  4061. var check = model.getValue("/root/main/reservation/fsexamflag");
  4062. var cellColor = model.getValue("/root/tmp/cellColor");
  4063. var orddd = model.getValue("/root/main/reservation/orddd");
  4064. var curDate = getCurrentDate();
  4065. // var userid = model.getValue("/root/tmp/userinfo/userinfolist/userid");
  4066. var userid = model.getValue("/root/hidden/session/sess_userid");
  4067. if(orddd < curDate){
  4068. messageBox("오늘 이전 날짜로는 예약 할 수 없습니다.", "E999");
  4069. return;
  4070. }
  4071. // if(cellColor == '#cc99ff' || cellColor == '#33cc00' || cellColor == '#87cefa'){
  4072. //Free 예약 권한
  4073. if( RA != 'Y'){
  4074. if(cellColor == '#ffffff'){
  4075. messageBox("휴진일자에는 예약할 수 없습니다.", "E999");
  4076. return false;
  4077. }
  4078. }
  4079. // 치과 진찰료 별도산정 관련 수정(2017/05/10 이정택)
  4080. //if(reqdeptno == '55' && (check == 'R' || check == 'S')){
  4081. if(reqdeptno.substr(0,1)=='5' && (check == 'R' || check == 'S')){
  4082. messageBox("치과는 전화예약에서 초진만 가능합니다.", "E999");
  4083. return false;
  4084. }
  4085. //재원여부체크
  4086. if(!fInhospynCheck()){
  4087. return false;
  4088. }
  4089. //변경/취소 모드인지 체크
  4090. var acptdd = model.getValue("/root/main/reservation/acptdd");
  4091. var acptno = model.getValue("/root/main/reservation/acptno");
  4092. var cretno = model.getValue("/root/main/reservation/cretno");
  4093. var acptseqno = model.getValue("/root/main/reservation/acptseqno");
  4094. if( acptdd != '' && acptno != '' && cretno != '' && acptseqno != ''){
  4095. messageBox("변경/취소할 내역이 선택되었습니다. Clear버튼을 눌러 예약내역을 지운 후 예약해주세요", "E999", "");
  4096. return false;
  4097. }
  4098. //예약내역체크
  4099. if(!fCheckRsrvHist()){
  4100. return false;
  4101. }
  4102. //신환/구환을 구분한다.
  4103. if(model.getValue("/root/main/patinfo/patinfolist/pid").length > 0){
  4104. model.setValue("/root/hidden/source/checkfnexam", '3');
  4105. }else{
  4106. model.setValue("/root/hidden/source/checkfnexam", '1');
  4107. }
  4108. if(fIsRsrvDataOK()){
  4109. model.setValue("/root/send/data3/stat", "i");
  4110. fMakeRsrv('T');
  4111. // model.resetInstanceNode("/root/main/outhist/outhistlist");
  4112. model.removenode("/root/main/outhist/outhistlist");
  4113. model.removenode("/root/main/test/testlist");
  4114. model.removenode("/root/hidden/con/examcnt");
  4115. }
  4116. ]]>
  4117. </script>
  4118. </button>
  4119. <button id="button12" class="btn4_letter2" navindex="22" style="left:59px; top:5px; width:56px; height:22px; ">
  4120. <caption>변경</caption>
  4121. <script type="javascript" ev:event="DOMActivate">
  4122. <![CDATA[
  4123. if(fBrthddVeri(model.getValue("/root/main/patinfo/patinfolist/brthdd"),"") == false) return; //2010-01-19 김주희 DUR관련 생년월일체크
  4124. var orddd = model.getValue("/root/main/reservation/orddd");
  4125. var curDate = getCurrentDate();
  4126. if(orddd < curDate){
  4127. messageBox("오늘날짜 이전으로는 변경 할 수 없습니다.", "E999");
  4128. return;
  4129. }
  4130. //재원여부체크
  4131. if( ! fInhospynCheck() ){
  4132. return false;
  4133. }
  4134. //변경/취소 모드인지 체크
  4135. var rsrvflag = model.getValue("/root/main/reservation/rsrvflag");
  4136. var histstat = model.getValue("/root/main/reservation/histstat");
  4137. if( grd_outhist.row < 1 || rsrvflag == '' || histstat == ''){
  4138. messageBox("변경할 내역이 선택되지 않았습니다.", "E999", "");
  4139. return false;
  4140. }
  4141. var row = grd_outhist.row;
  4142. var etcordflag = model.getValue("/root/main/outhist/outhistlist["+row+"]/etcordflag");
  4143. if(etcordflag=='4' || etcordflag=='5'){
  4144. messageBox("해당 환자는 다학제 환자로 변경 불가능합니다.", "E999", "");
  4145. return false;
  4146. }
  4147. //예약내역 체크!!!
  4148. if( model.getValue("/root/main/reservation/orddeptcd") != model.getValue("/root/tmp/reservation/orddeptcd") ){
  4149. if( ! fCheckRsrvHist() ){
  4150. return false;
  4151. }
  4152. }
  4153. // 신환/구환을 구분한다.
  4154. if( model.getValue("/root/main/reservation/cretno") != '' &&
  4155. model.getValue("/root/main/reservation/acptseqno") != '' &&
  4156. model.getValue("/root/main/patinfo/patinfolist/pid").length > 0 &&
  4157. model.getValue("/root/main/reservation/acptno") == '0' ){
  4158. model.setValue("/root/hidden/source/checkfnexam", '3');
  4159. }else{
  4160. model.setValue("/root/hidden/source/checkfnexam", '1');
  4161. }
  4162. if(pamCompareNodes("/root/main/patinfo/patinfolist", "/root/tmp/patinfolist") && pamCompareNodes("/root/main/reservation", "/root/tmp/reservation")){
  4163. if( messageBox("변경된 데이터가 없습니다.", "Q003") == 6){
  4164. if( fIsRsrvDataOK()){
  4165. //진찰료가 수납된 내역(HISTSTAT=R) 변경 시(OTPT),
  4166. //초재진구분,선택진료여부가 변경될 경우 기존내역 C, 신규내역 R 로 생성하면서,
  4167. //CALCYN = Y 로 세팅,CALCFLAG=Y
  4168. if( fIsRsrvUpdtDataOK() ){
  4169. model.setValue("/root/send/data3/stat", "u");
  4170. fMakeRsrv('C');
  4171. // model.resetInstanceNode("/root/main/patinfo/patinfolist");
  4172. // fInitialize();
  4173. // model.removenode("/root/main/outhist/outhistlist");
  4174. // fClearAfterSave();
  4175. }
  4176. }
  4177. }
  4178. }else{
  4179. if( fIsRsrvDataOK()){
  4180. if( fIsRsrvUpdtDataOK()){
  4181. model.setValue("/root/send/data3/stat", "u");
  4182. fMakeRsrv('C');
  4183. // model.resetInstanceNode("/root/main/patinfo/patinfolist");
  4184. // fInitialize();
  4185. // model.removenode("/root/main/outhist/outhistlist");
  4186. // fClearAfterSave();
  4187. }
  4188. }
  4189. }
  4190. ]]>
  4191. </script>
  4192. </button>
  4193. <button id="btn_init" class="btn4_letter3" navindex="24" style="left:179px; top:5px; width:68px; height:22px; ">
  4194. <caption>초기화</caption>
  4195. <script type="javascript" ev:event="DOMActivate">
  4196. <![CDATA[
  4197. model.resetInstanceNode("/root/main/patinfo/patinfolist");
  4198. model.resetInstanceNode("/root/resercnt");
  4199. model.setValue("/root/send/data3/stat", "");
  4200. fInitialize();
  4201. ]]>
  4202. </script>
  4203. </button>
  4204. <line id="line9" class="line_6" style="x1:0px; y1:0px; x2:247px; y2:0px; "/>
  4205. </group>
  4206. <output id="opt_rrgstno1" ref="/root/hidden/holdrrgstno/rrgstno1" class="output_fix" format="999999" appearance="output" style="left:350px; top:153px; width:60px; height:19px; "/>
  4207. <output id="opt_rrgstno2" ref="/root/hidden/holdrrgstno/rrgstno2" class="output_fix" format="9999999" appearance="output" style="left:413px; top:153px; width:63px; height:19px; "/>
  4208. <button id="button3" class="btn2_letter2" style="left:479px; top:153px; width:42px; height:19px; ">
  4209. <caption>선택</caption>
  4210. <script type="javascript" ev:event="DOMActivate">
  4211. <![CDATA[
  4212. var rrgstno1 = model.getValue("/root/hidden/holdrrgstno/rrgstno1");
  4213. var rrgstno2 = model.getValue("/root/hidden/holdrrgstno/rrgstno2");
  4214. var hngnm = model.getValue("/root/hidden/holdrrgstno/hngnm");
  4215. if( rrgstno1 == '' || rrgstno2 == '' ){
  4216. return false;
  4217. }else{
  4218. model.setValue("/root/main/patinfo/patinfolist/rrgstno1", rrgstno1);
  4219. model.setValue("/root/main/patinfo/patinfolist/rrgstno2", rrgstno2);
  4220. model.setValue("/root/main/patinfo/patinfolist/hngnm", hngnm);
  4221. model.setValue("/root/hidden/source/srchcond", "4");
  4222. model.setValue("/root/hidden/source/rrgstno1", rrgstno1);
  4223. model.setValue("/root/hidden/source/rrgstno2", rrgstno2);
  4224. model.setValue("/root/hidden/source/hngnm", hngnm);
  4225. //btn_search.dispatch("DOMActivate");
  4226. if(submit("TRPMC02500")){
  4227. if( getNodesetCount("/root/main/result/patinfo/patinfolist") == 1 ){
  4228. model.copyNode("/root/main/patinfo", "/root/main/result/patinfo");
  4229. model.setValue("/root/main/popupendflag", "ok");
  4230. //구환 표시
  4231. if( model.getValue("/root/main/patinfo/patinfolist/pid").length > 0 ){
  4232. model.setValue("/root/hidden/source/checkfnexam", "3");
  4233. }else{
  4234. model.setValue("/root/hidden/source/checkfnexam", "1");
  4235. }
  4236. //환자특이내역 존재여부 표시
  4237. var patspcfyn = model.getValue("/root/main/patinfo/patinfolist/patspcfyn");
  4238. if( patspcfyn == 'Y' || patspcfyn == 'y'){
  4239. btn_patspcfyn.attribute("background-color") = "#ff0000";
  4240. }else{
  4241. btn_patspcfyn.attribute("background-color") = "#c0c0c0";
  4242. }
  4243. //감면 내역 있으면 표시
  4244. var pid = model.getvalue("/root/main/patinfo/patinfolist/pid");
  4245. if( pid != '' && pid != ' ' && pid != '-' ){
  4246. model.setValue( "/root/send/pid", pid);
  4247. submit("TRPMO00205");
  4248. }
  4249. //감면 내역 있으면 표시 끝
  4250. fSearch();
  4251. }else if(getNodesetCount("/root/main/result/patinfo/patinfolist") > 1 ){
  4252. inputEnterKey("btn_search", "DOMActivate");
  4253. }else{
  4254. model.resetInstanceNode("/root/main/patinfo/patinfolist");
  4255. model.resetInstanceNode("/root/main/reservation");
  4256. model.setValue("/root/main/popupendflag", "cancel");
  4257. messageBox("일치하는 환자가 없습니다.", "E999", "");
  4258. //model.resetInstanceNode("");
  4259. }
  4260. }
  4261. // fSearch();
  4262. }
  4263. ]]>
  4264. </script>
  4265. </button>
  4266. <caption id="caption18" style="left:1167px; top:673px; width:27px; height:15px; ">초진</caption>
  4267. <caption id="caption19" style="left:1149px; top:672px; width:15px; height:15px; background-color:#b9e5fb; "/>
  4268. <caption id="caption20" class="cell_2" style="left:1149px; top:650px; width:42px; height:20px; ">구 분</caption>
  4269. <shape id="roundrect1" class="roundrect_example" appearance="roundrect" style="left:1145px; top:648px; width:50px; height:73px; "/>
  4270. <select1 id="combo3" ref="/root/main/reservation/telrsrvremcd" class="combo_default" appearance="minimal" style="left:0px; top:370px; width:105px; height:19px; ">
  4271. <choices>
  4272. <itemset nodeset="/root/init/P0414list/P0414">
  4273. <label ref="cdnm"/>
  4274. <value ref="cdnm"/>
  4275. </itemset>
  4276. </choices>
  4277. <script type="javascript" ev:event="xforms-select">
  4278. <![CDATA[
  4279. var telrsrvrem = combo3.value;
  4280. var bfTelRsrvRem = model.getValue("/root/main/reservation/telrsrvrem");
  4281. if( bfTelRsrvRem == '-' || bfTelRsrvRem == '' || bfTelRsrvRem == ' '){
  4282. //bfTelRsrvRem = telrsrvrem;
  4283. }else{
  4284. telrsrvrem = bfTelRsrvRem + " " + telrsrvrem;
  4285. }
  4286. model.setValue("/root/main/reservation/telrsrvrem", telrsrvrem);
  4287. model.refresh();
  4288. ]]>
  4289. </script>
  4290. </select1>
  4291. <button id="button4" class="btn5_letter4" style="left:511px; top:4px; width:64px; height:19px; ">
  4292. <caption>정보수정</caption>
  4293. <script type="javascript" ev:event="DOMActivate">
  4294. <![CDATA[
  4295. var pid = model.getValue("/root/main/patinfo/patinfolist/pid");
  4296. var acptdd = model.getValue("/root/main/patinfo/patinfolist/acptdd");
  4297. var acptno = model.getValue("/root/main/patinfo/patinfolist/acptno");
  4298. if( pid.length > 0 ){
  4299. model.makeNode("/root/main/patinfo/patinfolist/flag");
  4300. model.setValue("/root/main/patinfo/patinfolist/flag", 's')
  4301. if( ! pamCompareNodes( "/root/main/patinfo/patinfolist", "/root/tmp/patinfolist" ) ){
  4302. if( model.getValue("/root/tmp/patinfolist/pid") != ''){
  4303. model.makeNode("/root/main/patinfo/patinfolist/oldpid");
  4304. model.setValue("/root/main/patinfo/patinfolist/oldpid", model.getValue("/root/tmp/patinfolist/pid"));
  4305. if( submit("TXPMO00208") ){
  4306. model.setValue("/root/main/popupendflag", "ok");
  4307. fSearch();
  4308. messageBox("환자정보가 정상적으로 수정되었습니다.", "I999", "");
  4309. //fClearAfterSave();
  4310. }
  4311. }
  4312. }else{
  4313. messageBox("변경된 사항이 없거나 환자정보가 잘못 수정되었습니다. 환자인적사항을 재조회 후 다시 수정하세요.", "E999", "");
  4314. return false;
  4315. }
  4316. // messageBox("구환환자의 인적정보는 변경하실 수 없습니다.", "E999", "");
  4317. // return false;
  4318. // }else if( acptdd == '' || acptdd == ' ' || acptdd == '-' || acptno == '' || acptno == '0' || acptno == ' '){
  4319. // messageBox("환자 조회 후 작업하세요!", "E999", "");
  4320. // return false;
  4321. }else{
  4322. model.makeNode("/root/main/patinfo/patinfolist/flag");
  4323. model.setValue("/root/main/patinfo/patinfolist/flag", 'f')
  4324. if( ! pamCompareNodes( "/root/main/patinfo/patinfolist", "/root/tmp/patinfolist" ) ){
  4325. if( model.getValue("/root/tmp/patinfolist/rrgstno1") != ''
  4326. && model.getValue("/root/tmp/patinfolist/rrgstno2") != ''
  4327. && model.getValue("/root/tmp/patinfolist/hngnm") != ''){
  4328. model.makeNode("/root/main/patinfo/patinfolist/oldhngnm");
  4329. model.makeNode("/root/main/patinfo/patinfolist/oldrrgstno1");
  4330. model.makeNode("/root/main/patinfo/patinfolist/oldrrgstno2");
  4331. model.setValue("/root/main/patinfo/patinfolist/oldhngnm", model.getValue("/root/tmp/patinfolist/hngnm"));
  4332. model.setValue("/root/main/patinfo/patinfolist/oldrrgstno1", model.getValue("/root/tmp/patinfolist/rrgstno1"));
  4333. model.setValue("/root/main/patinfo/patinfolist/oldrrgstno2", model.getValue("/root/tmp/patinfolist/rrgstno2"));
  4334. if( submit("TXPMO00208") ){
  4335. model.setValue("/root/main/popupendflag", "ok");
  4336. fSearch();
  4337. messageBox("환자정보가 정상적으로 수정되었습니다.", "I999", "");
  4338. //fClearAfterSave();
  4339. }
  4340. }
  4341. }else{
  4342. messageBox("변경된 사항이 없거나 환자정보가 잘못 수정되었습니다. 환자인적사항을 재조회 후 다시 수정하세요.", "E999", "");
  4343. return false;
  4344. }
  4345. }
  4346. ]]>
  4347. </script>
  4348. </button>
  4349. <button id="button9" class="btn2_letter5" style="left:184px; top:153px; width:75px; height:19px; ">
  4350. <caption>예약자조회</caption>
  4351. <script type="javascript" ev:event="DOMActivate">
  4352. <![CDATA[
  4353. //setParameter("openflag", 'T');
  4354. setParameter("SPPMO00800_NODEPATH", "/root/main/patinfo/patinfolist/");
  4355. modal("SPPMO00800", "1","150", "150", "SPPMO00800", "", "");
  4356. var hngnm = ipt_hngnm.currentText;
  4357. var rrgstno1 = ipt_rrgstno1.currentText;
  4358. var rrgstno2 = ipt_rrgstno2.currentText;
  4359. var rgstno1 = model.getValue("/root/main/patinfo/patinfolist/rrgstno1");
  4360. var rgstno2 = model.getValue("/root/main/patinfo/patinfolist/rrgstno2");
  4361. if( hngnm.length > 1 ){
  4362. model.setValue("/root/hidden/source/srchcond", "4");
  4363. model.setValue("/root/hidden/source/hngnm", hngnm);
  4364. model.setValue("/root/hidden/source/rrgstno1", rrgstno1);
  4365. model.setValue("/root/hidden/source/rrgstno2", rrgstno2);
  4366. }else{
  4367. model.setValue("/root/hidden/source/srchcond", "3");
  4368. model.setValue("/root/hidden/source/rrgstno1", rrgstno1);
  4369. model.setValue("/root/hidden/source/rrgstno2", rrgstno2);
  4370. }
  4371. model.setValue("/root/main/patinfo/patinfolist/rrgstno2", rrgstno2);
  4372. if(rgstno1 == "000000" ){
  4373. messageBox("주민번호 앞6자리 형식오류입니다. 올바른 일자형태로 입력하십시요!","E999","");
  4374. model.setFocus("ipt_rrgstno1");
  4375. return;
  4376. }else if(rgstno2 == "0000000 "){
  4377. messageBox("주민번호 뒤7자리 형식오류입니다. 올바른 일자형태로 입력하십시요!","E999","");
  4378. model.setFocus("ipt_rrgstno2");
  4379. return;
  4380. }
  4381. if( rrgstno1.length == 6 && rrgstno2.length == 7 ){
  4382. if(submit("TRPMC02500")){
  4383. if( getNodesetCount("/root/main/result/patinfo/patinfolist") == 1 ){
  4384. model.copyNode("/root/main/patinfo", "/root/main/result/patinfo");
  4385. model.setValue("/root/main/popupendflag", "ok");
  4386. //구환 표시
  4387. if( model.getValue("/root/main/patinfo/patinfolist/pid").length > 0 ){
  4388. model.setValue("/root/hidden/source/checkfnexam", "3");
  4389. }else{
  4390. model.setValue("/root/hidden/source/checkfnexam", "3");
  4391. }
  4392. //환자특이내역 존재여부 표시
  4393. var patspcfyn = model.getValue("/root/main/patinfo/patinfolist/patspcfyn");
  4394. if( patspcfyn == 'Y' || patspcfyn == 'y'){
  4395. btn_patspcfyn.attribute("background-color") = "#ff0000";
  4396. }else{
  4397. btn_patspcfyn.attribute("background-color") = "#c0c0c0";
  4398. }
  4399. //감면 내역 있으면 표시
  4400. var pid = model.getvalue("/root/main/patinfo/patinfolist/pid");
  4401. if( pid != '' && pid != ' ' && pid != '-' ){
  4402. model.setValue( "/root/send/pid", pid);
  4403. submit("TRPMO00205");
  4404. }
  4405. //감면 내역 있으면 표시 끝
  4406. fSearch();
  4407. }else if(getNodesetCount("/root/main/result/patinfo/patinfolist") > 1 ){
  4408. inputEnterKey("btn_search", "DOMActivate");
  4409. }else{
  4410. model.setValue("/root/main/popupendflag", "cancel");
  4411. messageBox("일치하는 환자가 없습니다.", "E999", "");
  4412. btn_init.dispatch("DOMActivate");
  4413. return false;
  4414. }
  4415. }
  4416. }else{
  4417. inputEnterKey("btn_search", "DOMActivate");
  4418. }
  4419. fGetSexAgeBirthDD();
  4420. //외래이력 휴진 체크
  4421. outhistColorChange();
  4422. model.refresh();
  4423. ]]>
  4424. </script>
  4425. </button>
  4426. <select1 id="cmb_subdeptcd" ref="/root/main/reservation/subdeptcd" class="combo_default" disabled="true" appearance="minimal" style="left:305px; top:180px; width:58px; height:19px; ">
  4427. <choices>
  4428. <itemset nodeset="/root/init/subdeptcd/subdeptcdlist">
  4429. <label ref="nm"/>
  4430. <value ref="cd"/>
  4431. </itemset>
  4432. </choices>
  4433. <script type="javascript" ev:event="xforms-value-changed">
  4434. <![CDATA[
  4435. fGetCentcdCalendarData();
  4436. /*
  4437. var orddeptcd = model.getValue("/root/main/reservation/orddeptcd");
  4438. var subdeptcd = model.getValue("/root/main/reservation/subdeptcd");
  4439. if( subdeptcd != '' && subdeptcd != '-' ){
  4440. cmb_orddrid.choices.itemset.attribute("nodeset") = "/root/init/orddrid/orddridlist[dp = '" + subdeptcd + "']";
  4441. }else{
  4442. cmb_orddrid.choices.itemset.attribute("nodeset") = "/root/init/orddrid/orddridlist[dp = '" + orddeptcd + "']";
  4443. }
  4444. cmb_orddrid.refresh();
  4445. model.setValue("/root/main/reservation/orddrid", "");
  4446. //2007-08-17 이동식 추가 - 진료과 선택시 영문약어표시
  4447. var deptengabbr = model.getValue("/root/init/orddeptcd/orddeptcdlist[ cd = '" + cmb_deptcd.value + "']/deptengabbr");
  4448. model.setValue("/root/main/reservation/orddeptnm", deptengabbr);
  4449. //END..
  4450. */
  4451. ]]>
  4452. </script>
  4453. </select1>
  4454. <caption id="caption21" class="cell_1" style="left:366px; top:202px; width:63px; height:23px; vertical-align:middle; ">기타진료</caption>
  4455. <select1 id="combo4" ref="/root/main/reservation/etcordflag" class="combo_default" navindex="12" appearance="minimal" style="left:432px; top:203px; width:145px; height:19px; ">
  4456. <choices>
  4457. <itemset nodeset="/root/init/P0487list/P0487">
  4458. <label ref="cdnm"/>
  4459. <value ref="cdid"/>
  4460. </itemset>
  4461. </choices>
  4462. <script type="javascript" ev:event="xforms-select">
  4463. <![CDATA[
  4464. var etcordflag = combo4.label;
  4465. var bfTelRsrvRem = model.getValue("/root/main/reservation/telrsrvrem");
  4466. if( bfTelRsrvRem == '-' || bfTelRsrvRem == '' || bfTelRsrvRem == ' '){
  4467. }else{
  4468. etcordflag = bfTelRsrvRem + " " + etcordflag;
  4469. }
  4470. model.setValue("/root/main/reservation/telrsrvrem", etcordflag);
  4471. model.refresh();
  4472. ]]>
  4473. </script>
  4474. </select1>
  4475. <select1 id="cmb_centcd" ref="/root/main/reservation/centcd" class="combo_default" appearance="minimal" style="left:108px; top:180px; width:85px; height:19px; ">
  4476. <choices>
  4477. <itemset nodeset="/root/init/centcd/centcdlist">
  4478. <label ref="nm"/>
  4479. <value ref="cd"/>
  4480. </itemset>
  4481. </choices>
  4482. <script type="javascript" ev:event="xforms-value-changed">
  4483. <![CDATA[
  4484. model.setValue("/root/main/reservation/orddd", "");
  4485. model.setValue("/root/main/reservation/ordtm", "");
  4486. //fGetCentcdCalendarData();
  4487. //서울성모 신종플루 센터 적용으로 임시 적용
  4488. var centcd = model.getValue("/root/main/reservation/centcd");
  4489. if( centcd == "" || centcd == "-" ){
  4490. var setcordflag = model.getValue("/root/main/reservation/etcordflag");
  4491. if(setcordflag == "" || setcordflag == "-" || setcordflag == "W" || setcordflag == "Y"){
  4492. model.setValue("/root/main/reservation/etcordflag", "-");
  4493. } else {
  4494. model.setValue("/root/main/reservation/etcordflag", setcordflag);
  4495. }
  4496. combo4.refresh();
  4497. } else {
  4498. if (centcd == FluCent) {
  4499. model.setValue("/root/main/reservation/etcordflag", "W");
  4500. combo4.refresh();
  4501. var etcordflag = combo4.label;
  4502. var bfTelRsrvRem = model.getValue("/root/main/reservation/telrsrvrem");
  4503. if( bfTelRsrvRem == '-' || bfTelRsrvRem == '' || bfTelRsrvRem == ' '){
  4504. }else{
  4505. etcordflag = bfTelRsrvRem + " " + etcordflag;
  4506. }
  4507. model.setValue("/root/main/reservation/telrsrvrem", etcordflag);
  4508. } else if (centcd == FluPrevenCent) { //신종플루예방접종센터
  4509. model.setValue("/root/main/reservation/etcordflag", "Y");
  4510. combo4.refresh();
  4511. var etcordflag = combo4.label;
  4512. var bfTelRsrvRem = model.getValue("/root/main/reservation/telrsrvrem");
  4513. if( bfTelRsrvRem == '-' || bfTelRsrvRem == '' || bfTelRsrvRem == ' '){
  4514. }else{
  4515. etcordflag = bfTelRsrvRem + " " + etcordflag;
  4516. }
  4517. model.setValue("/root/main/reservation/telrsrvrem", etcordflag);
  4518. } else {
  4519. var setcordflag = model.getValue("/root/main/reservation/etcordflag");
  4520. if(setcordflag == "" || setcordflag == "-" || setcordflag == "W" || setcordflag == "Y"){
  4521. model.setValue("/root/main/reservation/etcordflag", "-");
  4522. } else {
  4523. model.setValue("/root/main/reservation/etcordflag", setcordflag);
  4524. }
  4525. }
  4526. model.refresh();
  4527. }
  4528. // cmb_centcd.choices.itemset.attribute("nodeset") = "/root/init/centcd/centcdlist[cd = '"+ cmb_centcd.value +"' ]";
  4529. // cmb_centcd.choices.itemset.attribute("nodeset") = "/root/init/centcd";
  4530. // cmb_centcd.refresh();
  4531. var centcd = model.getValue("/root/main/reservation/centcd");
  4532. if( centcd == '' || centcd == '-' ){
  4533. cmb_centdeptcd.visible = false;
  4534. //combo6.visible = false;
  4535. cmb_deptcd.visible = true;
  4536. //cmb_orddrid.visible = true;
  4537. model.setValue("/root/main/reservation/orddeptcd", '');
  4538. model.setValue("/root/main/reservation/orddrid", '');
  4539. model.setValue("/root/main/reservation/orddeptnm", '');
  4540. cmb_deptcd.refresh();
  4541. cmb_orddrid.refresh();
  4542. ipt_orddeptnm.refresh();
  4543. }else{
  4544. var instcd = model.getValue("/root/hidden/session/sess_dutplceinstcd");
  4545. var deptcd = centcd;
  4546. var base_dd = new Date().getDateFormat("YYYYMMDD");
  4547. var sort_field = "dispseq";//정렬필드(출력순서:'dispseq')
  4548. var sort_method = "asc"; //정렬방법(오름차순:'asc')
  4549. zsufGetCntrSubOrdDepartmentList(instcd, deptcd, 'O', "/root/hidden/init/cntrsuborddeptlist", base_dd);
  4550. // zsufGetCntrOrdDeptDoctorList(instcd, deptcd, 'O', "/root/hidden/init/cntrorddeptdoctorlist",sort_field, sort_method, base_dd);
  4551. cmb_centdeptcd.visible = true;
  4552. cmb_centdeptcd.refresh();
  4553. // combo6.visible = true;
  4554. cmb_deptcd.visible = false;
  4555. // cmb_orddrid.visible = false;
  4556. model.setValue("/root/main/reservation/orddeptcd", '');
  4557. model.setValue("/root/main/reservation/orddrid", '');
  4558. model.setValue("/root/main/reservation/orddeptnm", '');
  4559. model.setValue("/root/main/reservation/subdeptcd", '');
  4560. model.setValue("/root/main/reservation/specordyn", '');
  4561. cmb_deptcd.refresh();
  4562. cmb_orddrid.refresh();
  4563. ipt_orddeptnm.refresh();
  4564. }
  4565. model.refresh();
  4566. ]]>
  4567. </script>
  4568. </select1>
  4569. <caption id="caption23" class="cell_1" style="left:0px; top:179px; width:105px; height:23px; vertical-align:middle; ">센터/진료과</caption>
  4570. <caption id="caption24" class="cell_1" style="left:220px; top:435px; width:85px; height:24px; vertical-align:middle; ">협진팀명</caption>
  4571. <select1 id="cnstteamnm" ref="/root/main/reservation/coopteamcd" class="combo_default" appearance="minimal" style="left:308px; top:436px; width:269px; height:19px; ">
  4572. <choices>
  4573. <itemset nodeset="/root/init/M0525list/M0525">
  4574. <label ref="cdnm"/>
  4575. <value ref="cdid"/>
  4576. </itemset>
  4577. </choices>
  4578. </select1>
  4579. <caption id="caption34" class="cell_1" style="left:220px; top:387px; width:85px; height:46px; vertical-align:middle; ">remark</caption>
  4580. <textarea id="input3" ref="/root/main/reservation/remfact" disabled="true" navindex="19" scroll="vertical" style="left:308px; top:388px; width:269px; height:44px; "/>
  4581. <caption id="caption36" style="left:954px; top:540px; width:15px; height:20px; text-align:right; ">건</caption>
  4582. <output id="output5" ref="/root/hidden/con/examcnt" style="left:925px; top:540px; width:30px; height:19px; text-align:right; "/>
  4583. <caption id="caption39" style="left:975px; top:675px; width:66px; height:20px; background-color:transparent; ">전화예약</caption>
  4584. <input id="input7" ref="/root/resercnt/telpmcnt" disabled="true" format="#,###" style="left:1113px; top:675px; width:25px; height:19px; text-align:right; "/>
  4585. <input id="input8" ref="/root/resercnt/telamcnt" disabled="true" format="#,###" style="left:1057px; top:675px; width:25px; height:19px; text-align:right; "/>
  4586. <caption id="caption41" style="left:975px; top:695px; width:60px; height:20px; background-color:transparent; ">과예약</caption>
  4587. <caption id="caption43" style="left:1030px; top:675px; width:35px; height:20px; background-color:transparent; ">오전</caption>
  4588. <caption id="caption45" style="left:1030px; top:695px; width:35px; height:20px; background-color:transparent; ">오전</caption>
  4589. <caption id="caption46" style="left:1085px; top:675px; width:35px; height:20px; background-color:transparent; ">오후</caption>
  4590. <caption id="caption47" style="left:1085px; top:695px; width:35px; height:20px; background-color:transparent; ">오후</caption>
  4591. <input id="input9" ref="/root/resercnt/orddeptamcnt" disabled="true" format="#,###" style="left:1057px; top:695px; width:25px; height:19px; text-align:right; "/>
  4592. <input id="input10" ref="/root/resercnt/orddeptpmcnt" disabled="true" format="#,###" style="left:1113px; top:695px; width:25px; height:19px; text-align:right; "/>
  4593. <button id="btn_savePatInfo" class="btn5_letter2" visibility="hidden" style="left:750px; top:4px; width:42px; height:19px; ">
  4594. <caption>채번</caption>
  4595. <script type="javascript" ev:event="DOMActivate">
  4596. <![CDATA[
  4597. var rrgstno1 = model.getValue("/root/main/patinfo/patinfolist/rrgstno1").getTrim();
  4598. var rrgstno2 = model.getValue("/root/main/patinfo/patinfolist/rrgstno2").getTrim();
  4599. var hngnm = model.getValue("/root/main/patinfo/patinfolist/hngnm");
  4600. var rrgstno = rrgstno1.concat(rrgstno2);
  4601. if( rrgstno1.length != 6 || rrgstno2.length != 7){
  4602. if( messageBox("주민등록번호를 정확히 입력하지 않았습니다.", "E999", "")){
  4603. model.setFocus("ipt_rrgstno1");
  4604. return false;
  4605. }
  4606. }
  4607. /*
  4608. else if (isResidentNo(rrgstno) == false){
  4609. if( messageBox("유효하지 않은 주민등록번호입니다. ", "E999", "")){
  4610. model.setFocus("ipt_rrgstno1");
  4611. return false;
  4612. }
  4613. }
  4614. */
  4615. else if(model.getValue("/root/main/patinfo/patinfolist/hngnm").length < 1){
  4616. if( messageBox("환자 성명이 입력되지 않았습니다. ", "E999", "")){
  4617. model.setFocus("ipt_hngnm");
  4618. return false;
  4619. }
  4620. }
  4621. fPatInfoUpdt();
  4622. ]]>
  4623. </script>
  4624. </button>
  4625. <switch id="switch2" style="left:0px; top:565px; width:970px; height:170px; ">
  4626. <case id="case3" selected="true" style="left:0px; top:0px; width:970px; height:170px; ">
  4627. <switch id="switch1" style="left:0px; top:0px; width:970px; height:170px; ">
  4628. <case id="case1" selected="true" style="left:0px; top:0px; width:970px; height:170px; ">
  4629. <datagrid id="grd_outhist" nodeset="/root/main/outhist/outhistlist" class="datagrid2" caption="진료일자^시간^진료과ID^진료과^진료의ID^진료의^선택진료^진료여부^변경&#xA;여부^예약&#xA;구분^rqstflag^접수상태^초/재^보험유형^의뢰서구분^선후불^수납여부^최초입력자ID^최초입력시간^가예약&#xA;접수일자^가예약&#xA;접수일련번호^선택진료&#xA;설명여부^보험회사&#xA;직원여부^진료의뢰서&#xA;설명여부^의뢰서&#xA;병원등급^최초접수자&#xA;ID^최초접수&#xA;일시^외래등록&#xA;생성번호^외래등록&#xA;생성일련번호^전화예약&#xA;통화내용^변경취소사유^정산여부^계산구분^진찰료산정여부^처방발생여부^협력의뢰구분^협력의뢰&#xA;병원코드^협력의뢰의ID^원스탑^테이블명^센터코드^센터^sub진료과^하위부서^기타진료구분^최종수정자^최종수정일시^휴진여부^협진팀명^remark^acptdd^acptno^cretno" colsep="^" colwidth="70, 40, 90, 110, 64, 60, 35, 35, 35, 65, 54, 60, 80, 80, 42, 35, 78, 107, 60, 87, 60, 60, 82, 67, 81, 63, 75, 90, 67, 100, 100, 100, 100, 100, 84, 70, 100, 100, 100, 100, 100, 100, 100, 50, 100, 100, 100, 100, 100, 400, 100, 100" dataheight="23" defaultrows="2" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="23" rowsep="|" style="left:2px; top:2px; width:960px; height:162px; ">
  4630. <col ref="orddd" format="yyyy-mm-dd"/>
  4631. <col ref="ordtm" format="hh:nn"/>
  4632. <col disabled="true" ref="orddeptcd" type="combo" visibility="hidden">
  4633. <choices>
  4634. <itemset nodeset="/root/init/orddeptcd/orddeptcdlist">
  4635. <label ref="nm"/>
  4636. <value ref="cd"/>
  4637. </itemset>
  4638. </choices>
  4639. </col>
  4640. <col ref="orddeptnm"/>
  4641. <col ref="orddrid" visibility="hidden"/>
  4642. <col ref="orddrnm"/>
  4643. <col ref="specordyn"/>
  4644. <col ref="dracptyn"/>
  4645. <col ref="bfordddyn"/>
  4646. <col disabled="true" ref="rsrvflag" type="combo">
  4647. <choices>
  4648. <itemset nodeset="/root/init/P0341list/P0341">
  4649. <label ref="cdnm"/>
  4650. <value ref="cdid"/>
  4651. </itemset>
  4652. </choices>
  4653. </col>
  4654. <col ref="rqstflag" visibility="hidden"/>
  4655. <col disabled="true" ref="histstat" type="combo">
  4656. <choices>
  4657. <itemset nodeset="/root/init/P0029list/P0029">
  4658. <label ref="cdnm"/>
  4659. <value ref="cdid"/>
  4660. </itemset>
  4661. </choices>
  4662. </col>
  4663. <col disabled="true" ref="fsexamflag" type="combo">
  4664. <choices>
  4665. <itemset nodeset="/root/init/P0021list/P0021">
  4666. <label ref="cdnm"/>
  4667. <value ref="cdid"/>
  4668. </itemset>
  4669. </choices>
  4670. </col>
  4671. <col disabled="true" ref="insukind" type="combo">
  4672. <choices>
  4673. <itemset nodeset="/root/init/P0008list/P0008">
  4674. <label ref="cdnm"/>
  4675. <value ref="cdid"/>
  4676. </itemset>
  4677. </choices>
  4678. </col>
  4679. <col disabled="true" ref="ordreqformflag" type="combo">
  4680. <choices>
  4681. <itemset nodeset="/root/init/P0380list/P0380">
  4682. <label ref="cdnm"/>
  4683. <value ref="cdid"/>
  4684. </itemset>
  4685. </choices>
  4686. </col>
  4687. <col ref="medamtpostyn"/>
  4688. <col ref="rcptyn"/>
  4689. <col ref="fstrgstrid" visibility="hidden"/>
  4690. <col ref="fstrgstdt" visibility="hidden"/>
  4691. <col ref="acptdd" visibility="hidden"/>
  4692. <col ref="acptno" visibility="hidden"/>
  4693. <col ref="specorddescyn" visibility="hidden"/>
  4694. <col ref="insuchrgyn" visibility="hidden"/>
  4695. <col ref="ordreqdescyn" visibility="hidden"/>
  4696. <col ref="ordreqhospgrde" visibility="hidden"/>
  4697. <col ref="fstacptid" visibility="hidden"/>
  4698. <col ref="fstacptdt" visibility="hidden"/>
  4699. <col ref="acptseqno" visibility="hidden"/>
  4700. <col ref="cretno" visibility="hidden"/>
  4701. <col ref="telrsrvrem" visibility="hidden"/>
  4702. <col ref="updtcnclresn" visibility="hidden"/>
  4703. <col ref="calcyn" visibility="hidden"/>
  4704. <col ref="calcflag" visibility="hidden"/>
  4705. <col ref="medamtestmyn" visibility="hidden"/>
  4706. <col ref="prcpgenryn" visibility="hidden"/>
  4707. <col ref="rqspflag" visibility="hidden" style="left:1679px; top:32px; width:84px; height:23px; "/>
  4708. <col ref="rqsthospcd" visibility="hidden"/>
  4709. <col ref="rqstdrid" visibility="hidden"/>
  4710. <col ref="onestop" visibility="hidden"/>
  4711. <col ref="tablename" visibility="hidden"/>
  4712. <col ref="centcd" visibility="hidden"/>
  4713. <col ref="centnm"/>
  4714. <col ref="subdeptcd" visibility="hidden"/>
  4715. <col ref="subdeptnm"/>
  4716. <col ref="etcordflag" type="combo">
  4717. <choices>
  4718. <itemset nodeset="/root/init/P0022list/P0022">
  4719. <label ref="cdnm"/>
  4720. <value ref="cdid"/>
  4721. </itemset>
  4722. </choices>
  4723. </col>
  4724. <col ref="lastupdtrid"/>
  4725. <col ref="lastupdtdt" format="yyyy-mm-dd hh:nn:ss"/>
  4726. <col ref="holiyn" visibility="hidden"/>
  4727. <col disabled="true" ref="coopteamcd" type="combo">
  4728. <choices>
  4729. <itemset nodeset="/root/init/M0525list/M0525">
  4730. <label ref="cdnm"/>
  4731. <value ref="cdid"/>
  4732. </itemset>
  4733. </choices>
  4734. </col>
  4735. <col ref="remfact"/>
  4736. <col ref="acptdd" visibility="hidden"/>
  4737. <col ref="acptno" visibility="hidden"/>
  4738. <col ref="cretno" visibility="hidden"/>
  4739. <script type="javascript" ev:event="ondblclick">
  4740. <![CDATA[
  4741. var cur_col = grd_outhist.col;
  4742. var cur_row = grd_outhist.row;
  4743. if( cur_col == grd_outhist.colRef("bfordddyn") && cur_row > 0 && isDataCell()){
  4744. if(grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("bfordddyn")) == "Y" ) {
  4745. if(grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("histstat")) == "X"){
  4746. messageBox("취소 내역은 변경이력을 조회할 수 없습니다.", "E999", "");
  4747. return false;
  4748. }
  4749. setParameter("openflag", 'T');
  4750. setParameter("pid", model.getvalue("/root/main/patinfo/patinfolist/pid"));
  4751. setParameter("hngnm", model.getvalue("/root/main/patinfo/patinfolist/hngnm"));
  4752. setParameter("rrgstno1", model.getvalue("/root/main/patinfo/patinfolist/rrgstno1"));
  4753. setParameter("rrgstno2", model.getvalue("/root/main/patinfo/patinfolist/rrgstno2"));
  4754. setParameter("fromdd", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("orddd")));
  4755. setParameter("todd", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("orddd")));
  4756. setParameter("orddeptcd", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("orddeptcd")));
  4757. setParameter("orddrid", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("orddrid")));
  4758. setParameter("specordyn", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("specordyn")));
  4759. setParameter("rsrvflag", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("rsrvflag")));
  4760. setParameter("insukind", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("insukind")));
  4761. setParameter("acptdd", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("acptdd")));
  4762. setParameter("acptno", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("acptno")));
  4763. setParameter("tablename", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("tablename")));
  4764. setParameter("fstrgstdt", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("fstrgstdt")));
  4765. setParameter("fstacptdt", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("fstacptdt")));
  4766. modal("SMPMO00600", "1", "50", "50" ,"SMPMO00600", "", "");
  4767. }
  4768. }
  4769. if( cur_col == grd_outhist.colRef("histstat") && cur_row > 0 && isDataCell()){
  4770. if(grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("histstat")) == "X"){
  4771. setParameter("openflag", 'T');
  4772. setParameter("pid", model.getvalue("/root/main/patinfo/patinfolist/pid"));
  4773. setParameter("hngnm", model.getvalue("/root/main/patinfo/patinfolist/hngnm"));
  4774. setParameter("rrgstno1", model.getvalue("/root/main/patinfo/patinfolist/rrgstno1"));
  4775. setParameter("rrgstno2", model.getvalue("/root/main/patinfo/patinfolist/rrgstno2"));
  4776. setParameter("fromdd", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("orddd")));
  4777. setParameter("todd", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("orddd")));
  4778. setParameter("orddeptcd", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("orddeptcd")));
  4779. setParameter("orddrid", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("orddrid")));
  4780. setParameter("specordyn", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("specordyn")));
  4781. setParameter("rsrvflag", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("rsrvflag")));
  4782. setParameter("insukind", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("insukind")));
  4783. setParameter("acptdd", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("acptdd")));
  4784. setParameter("acptno", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("acptno")));
  4785. setParameter("tablename", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("tablename")));
  4786. setParameter("fstrgstdt", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("fstrgstdt")));
  4787. setParameter("fstacptdt", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("fstacptdt")));
  4788. modal("SMPMO00600", "1", "50", "50" ,"SMPMO00600", "", "");
  4789. }
  4790. }
  4791. ]]>
  4792. </script>
  4793. <script type="javascript" ev:event="onclick">
  4794. <![CDATA[
  4795. if( model.getValue("/root/main/patinfo/patinfolist/pid") == '' && model.getValue("/root/main/patinfo/patinfolist/hngnm") == '' ){
  4796. messageBox("환자조회 후 작업해 주세요.!!","E999", "");
  4797. return false;
  4798. }
  4799. var cur_col = grd_outhist.col;
  4800. var cur_row = grd_outhist.row;
  4801. var curDate = getCurrentDate();
  4802. if(cur_col == grd_outhist.colRef("bfordddyn")){
  4803. return;
  4804. }
  4805. if( cur_row > 0 && cur_col > 0 && isDataCell() ){ // && grd_outhist.colRef("bfordddyn") != cur_col ){
  4806. var histstat = model.getValue("/root/main/rsrvflag");
  4807. if( histstat == 'X' ){
  4808. return false;
  4809. }
  4810. //예약내역 노드 초기화
  4811. model.resetInstanceNode("/root/main/reservation");
  4812. //수정 불가능한 내역을 선택했을 경우!!
  4813. if( grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("histstat")) == 'R' ){
  4814. //의사접수여부가 'Y'인 내역은 변경/취소할 수 없습니다.
  4815. if( grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("dracptyn")) == 'Y' ){
  4816. messageBox("진료본 내역은 변경/취소할 수 없습니다.", "E999", "");
  4817. return false;
  4818. //처방발생여부가 'Y'인 내역은 변경/취소할 수 없습니다.
  4819. }else if( grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("prcpgenryn")) == 'Y' ){
  4820. messageBox("처방이 발생한 내역은 변경/취소할 수 없습니다.", "E999", "");
  4821. return false;
  4822. }else if( grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("rsrvflag")) == 'X' ){
  4823. messageBox("6시간 이내 응급내역은 변경/취소할 수 없습니다.", "E999", "");
  4824. return false;
  4825. }
  4826. }else if( grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("histstat")) == 'X' ){
  4827. messageBox("예약취소한 내역은 변경할 수 없습니다.", "E999", "");
  4828. return false;
  4829. }else if(grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("orddd")) < curDate ){
  4830. messageBox("미진료 이력은 변경/취소할 수 없습니다.", "E999", "");
  4831. return false;
  4832. }
  4833. if( grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("etcordflag")) != 'B' || grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("etcordflag")) != '-' ) {
  4834. model.setValue("/root/main/reservation/etcordflag", '-');
  4835. model.setValue("/root/main/reservation/etcordflag", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("etcordflag")) );
  4836. }
  4837. //model.resetInstanceNode("/root/main/reservation/orddeptcd");
  4838. //model.resetInstanceNode("/root/main/reservation/centcd");
  4839. //선택된 행의 값을 예약 파트로 복사
  4840. model.setValue("/root/main/reservation/acptdd" , grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("acptdd")) );
  4841. model.setValue("/root/main/reservation/acptno" , grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("acptno")) );
  4842. model.setValue("/root/main/reservation/specorddescyn" , grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("specorddescyn")) );
  4843. model.setValue("/root/main/reservation/insuchrgyn" , grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("insuchrgyn")) );
  4844. model.setValue("/root/main/reservation/ordreqdescyn" , grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("ordreqdescyn")) );
  4845. model.setValue("/root/main/reservation/ordreqhospgrde" , grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("ordreqhospgrde")) );
  4846. model.setValue("/root/main/reservation/fstacptid" , grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("fstacptid")) );
  4847. model.setValue("/root/main/reservation/fstacptdt" , grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("fstacptdt")) );
  4848. model.setValue("/root/main/reservation/acptseqno" , grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("acptseqno")) );
  4849. model.setValue("/root/main/reservation/cretno" , grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("cretno")) );
  4850. model.setValue("/root/main/reservation/oldorddd" , grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("orddd")) );
  4851. model.setValue("/root/main/reservation/telrsrvrem" , grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("telrsrvrem")) );
  4852. model.setValue("/root/main/reservation/updtcnclresn" , grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("updtcnclresn")) );
  4853. model.setValue("/root/main/reservation/calcyn" , grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("calcyn")) );
  4854. model.setValue("/root/main/reservation/calcflag" , grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("calcflag")) );
  4855. model.setValue("/root/main/reservation/medamtestmyn" , grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("medamtestmyn")) );
  4856. model.setValue("/root/main/reservation/histstat" , grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("histstat")) );
  4857. model.setValue("/root/main/reservation/rsrvflag" , grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("rsrvflag")) );
  4858. // 2016/04/29 이정택(진료 회송(되회송) 시범사업 관련 프로그램수정)
  4859. if(grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("rsrvflag"))=="W"){
  4860. model.makeValue("/root/tmp/refer_sibum", "W");
  4861. }
  4862. // 2016/04/29 이정택(진료 회송(되회송) 시범사업 관련 프로그램수정)
  4863. //진료교류이면 HIE(20171202 이윤주)
  4864. if ( model.getValue("/root/main/reservation/rsrvflag") == "V" ) {
  4865. hieyn = "Y";
  4866. }
  4867. model.setValue("/root/main/reservation/dracptyn" , grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("dracptyn")) );
  4868. model.setValue("/root/main/reservation/prcpgenryn" , grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("prcpgenryn")) );
  4869. model.setValue("/root/main/reservation/coopteamcd" , grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("coopteamcd")) );
  4870. model.setValue("/root/main/reservation/remfact" , grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("remfact")) );
  4871. if( grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("etcordflag")) != 'B') {
  4872. model.setValue("/root/main/reservation/etcordflag" , '-');
  4873. }else{
  4874. model.setValue("/root/main/reservation/etcordflag" , grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("etcordflag")) );
  4875. }
  4876. //협진
  4877. model.setValue("/root/main/reservation/rqstflag" , grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("rqstflag")));
  4878. model.setValue("/root/main/reservation/rqsthospcd" , grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("rqsthospcd")) );
  4879. model.setValue("/root/main/reservation/rqstdrid" , grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("rqstdrid")) );
  4880. model.setValue("/root/main/reservation/onestop" , grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("onestop")) );
  4881. model.setValue("/root/main/reservation/centcd" , grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("centcd")) );
  4882. cmb_centcd.dispatch("xforms-value-changed");
  4883. model.setValue("/root/main/reservation/orddeptcd", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("orddeptcd")) );
  4884. var deptengabbr = model.getValue("/root/init/orddeptcd/orddeptcdlist[ cd = '" + cmb_deptcd.value + "']/deptengabbr");
  4885. model.setValue("/root/main/reservation/orddeptnm", deptengabbr);
  4886. cmb_orddrid.choices.itemset.attribute("nodeset") = "/root/init/orddrid/orddridlist[dp = '" + cmb_deptcd.value + "']";
  4887. model.setValue("/root/main/reservation/subdeptcd", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("subdeptcd")) );
  4888. //cmb_deptcd.dispatch("xforms-value-changed");
  4889. model.setValue("/root/main/reservation/orddrid", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("orddrid")) );
  4890. model.setValue("/root/main/reservation/fsexamflag", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("fsexamflag")) );
  4891. cmb_orddrid.dispatch("xforms-value-changed");
  4892. model.setValue("/root/main/reservation/tablename", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("tablename")) );
  4893. model.setValue("/root/main/reservation/etcordflag", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("etcordflag")) );
  4894. //진료일,시간, 진료과,의사
  4895. model.setValue("/root/main/reservation/orddd", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("orddd")) );
  4896. model.setValue("/root/main/reservation/ordtm", grd_outhist.valueMatrix( cur_row, grd_outhist.colRef("ordtm")) );
  4897. model.refresh();
  4898. model.removeNodeset("/root/tmp/reservation");
  4899. model.makeNode("/root/tmp/reservation");
  4900. model.copyNode("/root/tmp/reservation", "/root/main/reservation");
  4901. }
  4902. ]]>
  4903. </script>
  4904. <script type="javascript" ev:event="onmousedown">
  4905. <![CDATA[
  4906. if (isDataCell() == true) {
  4907. if (event.button == 3){
  4908. if(grd_outhist.isCell(event.target) && grd_outhist.mouseRow >= grd_outhist.fixedRows){
  4909. //grd_outhist.endEditCell();
  4910. var currow = grd_outhist.mouseRow;
  4911. var rowcnt = parseInt(getNodesetCount("/root/hidden/rghtmenu/menu")) + 1;
  4912. model.copyNode("/root/hidden/rightmenu1", "/root/hidden/rightmenu");
  4913. window.setPopupMenu(true, "/root/hidden/rghtmenu1/menu", "label", "func", false);
  4914. }else{
  4915. window.setPopupMenu(false);
  4916. }
  4917. }
  4918. }
  4919. ]]>
  4920. </script>
  4921. <script type="javascript" ev:event="DOMFocusOut">
  4922. <![CDATA[
  4923. initPopupMenu();
  4924. ]]>
  4925. </script>
  4926. </datagrid>
  4927. </case>
  4928. <case id="case2" style="left:0px; top:0px; width:970px; height:170px; ">
  4929. <datagrid id="datagrid5" nodeset="/root/main/test/testlist" autoresize="true" caption="수납^실시^예약일자^시간^진료과^처방의^처방코드^처방명^수행부서^검사실^remark" colsep="^" colwidth="30, 30, 70, 35, 100, 80, 80, 330, 120, 120, 120, 200" extendlastcol="noscroll" mergecellsfixedrows="bycolrec" rowsep="|" style="left:2px; top:2px; width:960px; height:162px; ">
  4930. <col ref="rcptflag" style="text-align:center; "/>
  4931. <col ref="execflag" style="text-align:center; "/>
  4932. <col ref="rsrvdd" format="yyyy-mm-dd" style="text-align:center; "/>
  4933. <col ref="rsrvtm" format="hh:nn" style="text-align:center; "/>
  4934. <col ref="execdept"/>
  4935. <col ref="orddrnm"/>
  4936. <col ref="prcpcd"/>
  4937. <col ref="prcpnm"/>
  4938. <col ref="prcpdept"/>
  4939. <col ref="examroomnm"/>
  4940. <col ref="rem"/>
  4941. </datagrid>
  4942. </case>
  4943. <case id="case4" style="left:0px; top:0px; width:970px; height:170px; ">
  4944. <datagrid id="grd_anoprcplist" nodeset="/root/main/exculist/subordlist2" caption="구분^수납^처방일자^진료과^처방의^처방상태^검사코드^검사명^수행부서^희망일자^예약시간^실시시간^소요시간^종료시간^Remark^prcpgenflag^prcpdd^execprcpuniqno^execprcpstatcd^prcpkindcd^excupartcd^indd^actorddd^orddrid^execrid^suppdeptcd^cnclresncd^pid^prcpdelivefact^rsrvplceflag^rsrvexcupossyn^rsrvexmptmplcd^tmpldata^rsrvflag^cretno^orddd" colsep="^" colwidth="49, 53, 77, 89, 54, 100, 73, 280, 100, 77, 109, 100, 60, 58, 720" explorerbar="sortshow" frozencols="7" mergecellsfixedrows="bycolrec" rowsep="|" style="left:2px; top:2px; width:960px; height:162px; ">
  4945. <col ref="rsrvflagyn" visibility="hidden"/>
  4946. <col ref="rcptyn"/>
  4947. <col ref="prcpdd" format="yyyy-mm-dd"/>
  4948. <col ref="orddepthngnm"/>
  4949. <col ref="orddrnm"/>
  4950. <col disabled="true" ref="execprcpstatcd" type="combo">
  4951. <choices>
  4952. <itemset nodeset="/root/init/M0011list/M0011">
  4953. <label ref="cdnm"/>
  4954. <value ref="cdid"/>
  4955. </itemset>
  4956. </choices>
  4957. </col>
  4958. <col ref="calcscorcd"/>
  4959. <col disabled="true" ref="prcpnm"/>
  4960. <col disabled="true" ref="excuroom"/>
  4961. <col ref="prcphopedd" format="yyyy-mm-dd hh:nn"/>
  4962. <col ref="srchrsrvtm" format="yyyy-mm-dd hh:nn"/>
  4963. <col ref="exectm" format="yyyy-mm-dd hh:nn"/>
  4964. <col ref="excutm" style="text-align:center; "/>
  4965. <col ref="endtime" format="hh:nn" style="text-align:center; "/>
  4966. <col ref="rsrvrem"/>
  4967. <script type="javascript" ev:event="onaftersort">
  4968. <![CDATA[
  4969. grd_anoprcplist.gridToInstance();
  4970. ]]>
  4971. </script>
  4972. </datagrid>
  4973. </case>
  4974. </switch>
  4975. </case>
  4976. <case id="case5" style="left:0px; top:0px; width:970px; height:170px; ">
  4977. <datagrid id="grd_inhist" nodeset="/root/main/inhist/inhistlist" caption="입원일자^진료과^진료의^유형^cretno" colsep="^" colwidth="83, 104, 73, 42, 40" mergecellsfixedrows="bycolrec" rowsep="|" selectionmode="byrow" style="left:2px; top:2px; width:315px; height:140px; ">
  4978. <col ref="orddd" format="yyyy-mm-dd"/>
  4979. <col ref="orddeptnm"/>
  4980. <col ref="orddrnm"/>
  4981. <col ref="mskind"/>
  4982. <col ref="cretno" visibility="hidden"/>
  4983. <script type="javascript" ev:event="ondblclick">
  4984. <![CDATA[
  4985. var cur_row = grd_inhist.row;
  4986. if(grd_inhist.valueMatrix( cur_row, grd_inhist.colRef("orddd")) != null ){
  4987. var pid =model.getValue( "/root/main/patinfo/patinfolist/pid");
  4988. var orddd=grd_inhist.valueMatrix(cur_row, grd_inhist.colRef("orddd"));
  4989. var cretno=grd_inhist.valueMatrix( cur_row, grd_inhist.colRef("cretno"));
  4990. model.setValue( "/root/send/pid",pid);
  4991. model.setValue( "/root/send/data5",orddd);
  4992. model.setValue( "/root/send/data6",cretno);
  4993. submit("TRPMO00213");
  4994. model.refresh();
  4995. }
  4996. ]]>
  4997. </script>
  4998. </datagrid>
  4999. <datagrid id="grd_inhistdetl" nodeset="/root/main/inhistdetl/inhistdetlist" class="datagrid2" caption="진료일자^시작일자^종료일자^진료과ID^진료과^진료의ID^진료의^선택진료^보험유형" colsep="^" colwidth="100, 100, 100, 29, 120, 25, 100, 50" dataheight="23" defaultrows="2" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="23" rowsep="|" style="left:321px; top:2px; width:640px; height:140px; ">
  5000. <col ref="orddd" format="yyyy-mm-dd"/>
  5001. <col ref="fromdd" format="yyyy-mm-dd"/>
  5002. <co ref=" todd" format="yyyy-mm-dd"/>
  5003. <col ref="todd" format="yyyy-mm-dd"/>
  5004. <col ref="orddeptcd" visibility="hidden"/>
  5005. <col ref="orddeptnm"/>
  5006. <col ref="orddrid" visibility="hidden"/>
  5007. <col ref="orddridnm"/>
  5008. <col ref="specordyn"/>
  5009. <script type="javascript" ev:event="onclick">
  5010. <![CDATA[
  5011. var cur_row = grd_inhistdetl.row;
  5012. if (grd_inhistdetl.valueMatrix( cur_row, grd_inhistdetl.colRef("orddd")) != null ){
  5013. model.setValue("/root/main/reservation/orddeptcd", grd_inhistdetl.valueMatrix( cur_row, grd_inhistdetl.colRef("orddeptcd")));
  5014. var deptengabbr = model.getValue("/root/init/orddeptcd/orddeptcdlist[ cd = '" + cmb_deptcd.value + "']/deptengabbr");
  5015. model.setValue("/root/main/reservation/orddeptnm", deptengabbr);
  5016. cmb_orddrid.choices.itemset.attribute("nodeset") = "/root/init/orddrid/orddridlist[dp = '" + cmb_deptcd.value + "']";
  5017. model.setValue("/root/main/reservation/subdeptcd", grd_inhistdetl.valueMatrix( cur_row, grd_inhistdetl.colRef("subdeptcd")) );
  5018. model.setValue("/root/main/reservation/orddrid", grd_inhistdetl.valueMatrix( cur_row, grd_inhistdetl.colRef("orddrid")) );
  5019. model.refresh();
  5020. }
  5021. ]]>
  5022. </script>
  5023. </datagrid>
  5024. </case>
  5025. </switch>
  5026. <select1 id="radio2" ref="/root/main/ioflag" appearance="full" cols="2" overflow="visible" style="left:1px; top:522px; width:100px; height:15px; border-style:none; ">
  5027. <choices>
  5028. <item>
  5029. <label>외래</label>
  5030. <value>O</value>
  5031. </item>
  5032. <item>
  5033. <label>입원</label>
  5034. <value>I</value>
  5035. </item>
  5036. </choices>
  5037. <script type="javascript" ev:event="xforms-value-changed">
  5038. <![CDATA[
  5039. if (radio2.value == "O"){
  5040. caption28.attribute("text")="외래이력";
  5041. radio13.visible = true;
  5042. output5.visible = true;
  5043. caption36.visible = true;
  5044. model.toggle("case3");
  5045. }else if(radio2.value =="I"){
  5046. caption28.attribute("text")="입원이력";
  5047. radio13.visible = false;
  5048. output5.visible = false;
  5049. caption36.visible = false;
  5050. model.removeNodeset("/root/main/inhistdetl/inhistdetlist");
  5051. model.refresh();
  5052. var pid =model.getValue( "/root/main/patinfo/patinfolist/pid");
  5053. model.toggle("case5");
  5054. if (pid != '' ) {
  5055. model.setValue( "/root/send/pid",pid);
  5056. submit("TRPMO00212");
  5057. model.refresh();
  5058. }
  5059. }
  5060. ]]>
  5061. </script>
  5062. </select1>
  5063. <button id="button7" class="btn2_letter4" style="left:270px; top:4px; width:64px; height:19px; ">
  5064. <caption>자격조회</caption>
  5065. <script type="javascript" ev:event="DOMActivate">
  5066. <![CDATA[
  5067. var rrgstno1 = model.getValue("/root/main/patinfo/patinfolist/rrgstno1").getTrim();
  5068. var rrgstno2 = model.getValue("/root/main/patinfo/patinfolist/rrgstno2").getTrim();
  5069. var rrgstno = rrgstno1.concat(rrgstno2);
  5070. fInsuInfoSearch("P");
  5071. /*
  5072. var rrgstno = model.getValue("/root/main/patinfo/patinfolist/rrgstno1") + model.getValue("/root/main/patinfo/patinfolist/rrgstno2");
  5073. var hngnm = model.getValue("/root/main/patinfo/patinfolist/hngnm");
  5074. var orddd = getCurrentDate();
  5075. var parm = model.getValue("/root/main/patinfo/patinfolist/rrgstno1") +
  5076. model.getValue("/root/main/patinfo/patinfolist/rrgstno2") + "▦" + //주민번호
  5077. model.getValue("/root/main/patinfo/patinfolist/hngnm") + "▦" + //이름
  5078. model.getValue("/root/main/reservation/orddd") + "▦" + //외래진료일자
  5079. "" + "▦" + //생성번호
  5080. "O" + "▦" + //진료형태
  5081. "" + "▦" + //퇴원일자
  5082. "0" + "▦" + //본인일부부담금
  5083. "" + "▦" + //기관부담금
  5084. model.getValue("/root/main/patinfo/patinfolist/pid") + "▦" + //등록번호
  5085. cmb_deptcd.value + "▦" + //진료과
  5086. "" + "▦" + //본인부담구분
  5087. "0" + "▦" + //비급여총금액
  5088. "0" + "▦" + //산전지원금
  5089. "" + "▦"; //보조유형
  5090. setParameter("SPPMC03900_PARM",parm);
  5091. //팝업타입 - 메시지 처리 피해가는 파라미터
  5092. setParameter("SPPMC03900_MSGYN", "N");
  5093. //model.setValue("/root/hidden/source", model.getValue("/root/hidden/source/checkfnexam"));
  5094. modal("SPPMC03900", "1","50", "50", "SPPMC03900", "", "", "sysmenu:hidden;");
  5095. if (getParameter("SPPMC03900_RTN") == "N" || getParameter("SPPMC03900_RTN") == ""){
  5096. //자격조회 완료여부 세팅
  5097. model.setValue("/root/hidden/flag/check_insuinfo_flag", "N");
  5098. model.setValue("/root/main/reservation/insukind", "51");
  5099. }else if(getParameter("SPPMC03900_RTN") == "F"){
  5100. model.setValue("/root/hidden/flag/check_insuinfo_flag", "F");
  5101. return;
  5102. }
  5103. if (getParameter("SPPMC03900_RTN") == "Y") {
  5104. //model.setValue("root/send/updatedata/reservation/searchInsuInfoyn", "Y");
  5105. model.setValue("/root/main/reservation/searchInsuInfoyn", "Y");
  5106. //return 값이 있으면, 보험유형,증번호,보험자기호,취득일자,피보험자성명
  5107. var insukind = getParameter("SPPMC03900_insukind");
  5108. //자격조회 완료여부 세팅
  5109. model.setValue("/root/hidden/flag/check_insuinfo_flag", "Y");
  5110. model.setValue("/root/main/reservation/insukind" , insukind);
  5111. model.setValue("/root/main/reservation/insucd" , getParameter("SPPMC03900_insucd"));
  5112. model.setValue("/root/main/reservation/insuno" , getParameter("SPPMC03900_insuno"));
  5113. model.setValue("/root/main/reservation/insdnm" , getParameter("SPPMC03900_insdnm"));
  5114. model.setValue("/root/main/reservation/ptin_fromdd" , getParameter("SPPMC03900_insufromdd"));
  5115. }
  5116. clearParameter("SPPMC03900_RTN");
  5117. clearParameter("SPPMC03900_insukind");
  5118. clearParameter("SPPMC03900_insucd");
  5119. clearParameter("SPPMC03900_insuno");
  5120. clearParameter("SPPMC03900_insdnm");
  5121. clearParameter("SPPMC03900_insufromdd");
  5122. model.refresh();
  5123. */
  5124. ]]>
  5125. </script>
  5126. </button>
  5127. <button id="btn_sms" class="btn2_letter2" style="left:336px; top:4px; width:42px; height:19px; ">
  5128. <caption>SMS</caption>
  5129. <script type="javascript" ev:event="DOMActivate">
  5130. <![CDATA[
  5131. clearParameter("SMPMO00200_SMS_orddd");
  5132. clearParameter("SMPMO00200_SMS_orddeptcd");
  5133. clearParameter("SMPMO00200_SMS_orddrid");
  5134. clearParameter("SMPMO00200_SMS_pid");
  5135. clearParameter("SMPMO00200_SMS_msg");
  5136. var orddd = model.getValue("/root/main/reservation/orddd");
  5137. var ordtm = model.getValue("/root/main/reservation/ordtm");
  5138. var hngnm = model.getValue("/root/main/patinfo/patinfolist/hngnm");
  5139. hngnm = hngnm.replace("★", "");
  5140. var msg = "[경북대학교병원] "
  5141. + hngnm + "님 "
  5142. + orddd.substr(4, 2) + "월"
  5143. + orddd.substr(6, 2) + "일 "
  5144. + ordtm.substr(0, 2) + "시"
  5145. + ordtm.substr(2, 2) + "분 "
  5146. + combo5.label
  5147. + " 진료예약입니다.";
  5148. setParameter("SMPMO00200_SMS_orddd", orddd);
  5149. setParameter("SMPMO00200_SMS_orddeptcd", model.getValue("/root/main/reservation/orddeptcd"));
  5150. setParameter("SMPMO00200_SMS_orddrid", model.getValue("/root/main/reservation/orddrid"));
  5151. setParameter("SMPMO00200_SMS_pid", model.getValue("/root/main/patinfo/patinfolist/pid"));
  5152. setParameter("SMPMO00200_SMS_msg", msg);
  5153. open("SMMNO01100");
  5154. ]]>
  5155. </script>
  5156. </button>
  5157. <button id="btn_smsresult" class="btn2_letter4" style="left:380px; top:4px; width:64px; height:19px; ">
  5158. <caption>SMS결과</caption>
  5159. <script type="javascript" ev:event="DOMActivate">
  5160. <![CDATA[
  5161. open("SPCNS00500");
  5162. ]]>
  5163. </script>
  5164. </button>
  5165. <line id="line10" class="line_2" style="x1:0px; y1:349px; x2:577px; y2:349px; "/>
  5166. <line id="line8" class="line_3" style="x1:0px; y1:506px; x2:577px; y2:506px; "/>
  5167. <select1 id="combo6" ref="/root/main/reservation/orddrid" class="combo_default" navindex="12" visibility="hidden" appearance="minimal" style="left:432px; top:180px; width:105px; height:19px; ">
  5168. <choices>
  5169. <itemset nodeset="/root/init/orddrid/orddridlist">
  5170. <label ref="nmsp"/>
  5171. <value ref="cd"/>
  5172. </itemset>
  5173. </choices>
  5174. <script type="javascript" ev:event="xforms-value-changed">
  5175. <![CDATA[
  5176. model.setValue("/root/main/reservation/orddd", "");
  5177. model.setValue("/root/main/reservation/ordtm", "");
  5178. var orddeptcd1 = model.getValue("/root/main/outhist/outhistlist/orddeptcd");
  5179. var orddeptcd2 = model.getValue("/root/main/reservation/orddeptcd");
  5180. var orddrid1 = model.getValue("/root/main/outhist/outhistlist/orddrid");
  5181. var orddrid2 = model.getValue("/root/main/reservation/orddrid");
  5182. if( orddeptcd2 == '' || orddeptcd2 == '-' || orddeptcd2 == null ){
  5183. messageBox("진료과를 먼저 선택하세요!!" , 'E999', "");
  5184. model.setValue("/root/main/reservation/orddrid", "");
  5185. cmb_orddrid.refresh();
  5186. return false;
  5187. }
  5188. fGetCalendarData();
  5189. cmb_orddrid.refresh();
  5190. var orddrabbr = model.getValue("/root/init/orddrid/orddridlist[ cd = '" + cmb_orddrid.value + "']/drengabbr");
  5191. model.setValue("/root/main/reservation/orddeptnm", orddrabbr);
  5192. var sp = model.getValue("/root/init/orddrid/orddridlist[cd = '" + cmb_orddrid.value + "' and dp = '" + cmb_deptcd.value + "']/sp");
  5193. if( sp == 'Y' || sp == 'y' ){
  5194. model.setValue("/root/main/reservation/specordyn", sp);
  5195. }else{
  5196. model.setValue("/root/main/reservation/specordyn", 'N');
  5197. }
  5198. //초재진여부 조회
  5199. //2016/11/28
  5200. //fGetFsexamFlag();
  5201. //2016/11/28
  5202. model.refresh();
  5203. ]]>
  5204. </script>
  5205. </select1>
  5206. <select1 id="combo5" ref="/root/main/reservation/orddeptcd" class="combo_default" navindex="11" visibility="hidden" appearance="minimal" style="left:196px; top:180px; width:107px; height:19px; ">
  5207. <choices>
  5208. <itemset nodeset="/root/init/orddeptcd/orddeptcdlist">
  5209. <label ref="nm"/>
  5210. <value ref="cd"/>
  5211. </itemset>
  5212. </choices>
  5213. <script type="javascript" ev:event="xforms-value-changed">
  5214. <![CDATA[
  5215. model.setValue("/root/main/reservation/orddd", "");
  5216. model.setValue("/root/main/reservation/ordtm", "");
  5217. //노드와 컨트롤의 값 동기화를 위해 리풀레쉬 해준다.
  5218. cmb_deptcd.refresh();
  5219. var rsrvflag = model.getValue("/root/main/reservation/rsrvflag");
  5220. //센터여부, 센터코드, 하위부서, 선택진료여부 초기화
  5221. model.setValue("/root/main/reservation/subdeptcd", "-");
  5222. model.setValue("/root/main/reservation/centcd", "");
  5223. model.setValue("/root/main/reservation/centcdyn", "");
  5224. model.setValue("/root/main/reservation/specordyn", "");
  5225. //응급의학과 블럭킹
  5226. if( cmb_deptcd.value == '2280000000' ){
  5227. messageBox("응급의학과는 전화예약에서 접수할 수 없습니다.", "E999", "");
  5228. model.setValue("/root/main/reservation/orddrid", "");
  5229. model.setValue("/root/main/reservation/orddeptcd", "");
  5230. model.setValue("/root/main/reservation/subdeptcd", "-");
  5231. model.setValue("/root/main/reservation/orddeptnm", "");
  5232. // model.setValue("/root/main/reservation/centcd", "-");
  5233. model.refresh();
  5234. model.setFocus("cmb_deptcd");
  5235. return false;
  5236. }
  5237. /*
  5238. combo6.visible = false;
  5239. cmb_orddrid.visible = true;
  5240. */
  5241. //sub진료과 세팅 2008-09-12 추가
  5242. cmb_subdeptcd.choices.itemset.attribute("nodeset") = "/root/init/subdeptcd/subdeptcdlist[dp = '"+ cmb_deptcd.value +"' or dp = '-']";
  5243. cmb_subdeptcd.refresh();
  5244. //2007-08-17 이동식 추가 - 진료과 선택시 영문약어표시
  5245. var deptengabbr = model.getValue("/root/init/orddeptcd/orddeptcdlist[ cd = '" + cmb_deptcd.value + "']/deptengabbr");
  5246. model.setValue("/root/main/reservation/orddeptnm", deptengabbr);
  5247. //END..
  5248. cmb_orddrid.choices.itemset.attribute("nodeset") = "/root/init/orddrid/orddridlist[dp = '" + cmb_deptcd.value + "']";
  5249. model.setValue("/root/main/reservation/orddrid", "");
  5250. //초재진여부 조회
  5251. fGetFsexamFlag();
  5252. model.refresh();
  5253. if(RD == 'Y'){
  5254. if( model.getValue("/root/main/patinfo/patinfolist/pid").length < 1 && model.getValue("/root/main/patinfo/patinfolist/hngnm").length < 1 ){
  5255. //환자정보 없을 경우 진료의뢰서 체크 안함!!!
  5256. }else if( model.getValue("/root/main/patinfo/patinfolist/pid").length < 1 && model.getValue("/root/main/patinfo/patinfolist/hngnm").length > 1 ){
  5257. var reqdeptno = model.getValue("/root/init/orddeptcd/orddeptcdlist[ cd = '" + cmb_deptcd.value + "']/reqdeptno");
  5258. //등록번호 없고 환자 이름이 입력된 경우 - 신환! 무조건 메세지 출력!!
  5259. // 치과 진찰료 별도산정 관련 수정(2017/05/10 이정택)
  5260. //if( reqdeptno == "55" || reqdeptno == "23" || reqdeptno == "21" || rsrvflag == "C" ){
  5261. if( reqdeptno.substr(0,1)=="5" || reqdeptno == "23" || reqdeptno == "21" || rsrvflag == "C" ){
  5262. model.setValue("/root/main/reservation/ordreqdescyn", 'Y');
  5263. //진료의뢰서가 필요 없을경우 선택진료설명여부 Yes 세팅
  5264. //model.setValue("/root/main/reservation/specorddescyn", 'Y');
  5265. }else {
  5266. messageBox("진료의뢰서가 필요합니다.", "E999", "");
  5267. model.setValue("/root/main/reservation/ordreqdescyn", '');
  5268. }
  5269. }else{
  5270. //진료의뢰서 확인
  5271. var pid = model.getValue("/root/main/patinfo/patinfolist/pid");
  5272. var fsexamflag = model.getValue("/root/main/reservation/fsexamflag");
  5273. var orddeptcd = cmb_deptcd.value;
  5274. // var deptengabbr = model.getValue("/root/init/orddeptcd/orddeptcdlist[ cd = '" + cmb_deptcd.value + "']/deptengabbr");
  5275. var reqdeptno = model.getValue("/root/init/orddeptcd/orddeptcdlist[ cd = '" + cmb_deptcd.value + "']/reqdeptno");
  5276. var outhistpath = "/root/main/outhist/outhistlist"; //외래이력노드
  5277. if( ! fCheckOrdCnst(pid, fsexamflag, orddeptcd, deptengabbr, reqdeptno, outhistpath, INSUKIND) && rsrvflag != "C"){
  5278. messageBox("진료의뢰서가 필요합니다.", "E999", "");
  5279. model.setValue("/root/main/reservation/ordreqdescyn", '');
  5280. }else {
  5281. model.setValue("/root/main/reservation/ordreqdescyn", 'Y');
  5282. //진료의뢰서가 필요 없을경우 선택진료설명여부 Yes 세팅
  5283. //model.setValue("/root/main/reservation/specorddescyn", 'Y');
  5284. }
  5285. }
  5286. }
  5287. model.refresh();
  5288. ]]>
  5289. </script>
  5290. </select1>
  5291. <select1 id="cmb_centdeptcd" ref="/root/main/reservation/orddeptcd" class="combo_default" navindex="11" visibility="hidden" appearance="minimal" style="left:196px; top:180px; width:107px; height:19px; ">
  5292. <choices>
  5293. <itemset nodeset="/root/hidden/init/cntrsuborddeptlist/dept">
  5294. <label ref="depthngnm"/>
  5295. <value ref="deptcd"/>
  5296. </itemset>
  5297. </choices>
  5298. <script type="javascript" ev:event="xforms-value-changed">
  5299. <![CDATA[
  5300. model.setValue("/root/main/reservation/orddd", "");
  5301. model.setValue("/root/main/reservation/ordtm", "");
  5302. //노드와 컨트롤의 값 동기화를 위해 리풀레쉬 해준다.
  5303. cmb_deptcd.refresh();
  5304. var rsrvflag = model.getValue("/root/main/reservation/rsrvflag");
  5305. //센터여부, 센터코드, 하위부서, 선택진료여부 초기화
  5306. model.setValue("/root/main/reservation/subdeptcd", "-");
  5307. // model.setValue("/root/main/reservation/centcd", "");
  5308. // model.setValue("/root/main/reservation/centcdyn", "");
  5309. model.setValue("/root/main/reservation/specordyn", "");
  5310. //응급의학과 블럭킹
  5311. if( cmb_deptcd.value == '2280000000' ){
  5312. messageBox("응급의학과는 전화예약에서 접수할 수 없습니다.", "E999", "");
  5313. model.setValue("/root/main/reservation/orddrid", "");
  5314. model.setValue("/root/main/reservation/orddeptcd", "");
  5315. model.setValue("/root/main/reservation/subdeptcd", "-");
  5316. model.setValue("/root/main/reservation/orddeptnm", "");
  5317. // model.setValue("/root/main/reservation/centcd", "-");
  5318. model.refresh();
  5319. model.setFocus("cmb_deptcd");
  5320. return false;
  5321. }
  5322. /*
  5323. combo6.visible = false;
  5324. cmb_orddrid.visible = true;
  5325. */
  5326. //sub진료과 세팅 2008-09-12 추가
  5327. cmb_subdeptcd.choices.itemset.attribute("nodeset") = "/root/init/subdeptcd/subdeptcdlist[dp = '"+ cmb_deptcd.value +"' or dp = '-']";
  5328. cmb_subdeptcd.refresh();
  5329. //2007-08-17 이동식 추가 - 진료과 선택시 영문약어표시
  5330. var deptengabbr = model.getValue("/root/init/orddeptcd/orddeptcdlist[ cd = '" + cmb_deptcd.value + "']/deptengabbr");
  5331. model.setValue("/root/main/reservation/orddeptnm", deptengabbr);
  5332. //END..
  5333. cmb_orddrid.choices.itemset.attribute("nodeset") = "/root/init/orddrid/orddridlist[dp = '" + cmb_deptcd.value + "']";
  5334. model.setValue("/root/main/reservation/orddrid", "");
  5335. //초재진여부 조회
  5336. fGetFsexamFlag();
  5337. model.refresh();
  5338. if(RD == 'Y'){
  5339. if( model.getValue("/root/main/patinfo/patinfolist/pid").length < 1 && model.getValue("/root/main/patinfo/patinfolist/hngnm").length < 1 ){
  5340. //환자정보 없을 경우 진료의뢰서 체크 안함!!!
  5341. }else if( model.getValue("/root/main/patinfo/patinfolist/pid").length < 1 && model.getValue("/root/main/patinfo/patinfolist/hngnm").length > 1 ){
  5342. var reqdeptno = model.getValue("/root/init/orddeptcd/orddeptcdlist[ cd = '" + cmb_deptcd.value + "']/reqdeptno");
  5343. //등록번호 없고 환자 이름이 입력된 경우 - 신환! 무조건 메세지 출력!!
  5344. // 치과 진찰료 별도산정 관련 수정(2017/05/10 이정택)
  5345. //if( reqdeptno == "55" || reqdeptno == "23" || reqdeptno == "21" || rsrvflag == "C" ){
  5346. if( reqdeptno.substr(0,1)=="5" || reqdeptno == "23" || reqdeptno == "21" || rsrvflag == "C" ){
  5347. model.setValue("/root/main/reservation/ordreqdescyn", 'Y');
  5348. //진료의뢰서가 필요 없을경우 선택진료설명여부 Yes 세팅
  5349. //model.setValue("/root/main/reservation/specorddescyn", 'Y');
  5350. }else {
  5351. messageBox("진료의뢰서가 필요합니다.", "E999", "");
  5352. model.setValue("/root/main/reservation/ordreqdescyn", '');
  5353. }
  5354. }else{
  5355. //진료의뢰서 확인
  5356. var pid = model.getValue("/root/main/patinfo/patinfolist/pid");
  5357. var fsexamflag = model.getValue("/root/main/reservation/fsexamflag");
  5358. var orddeptcd = cmb_deptcd.value;
  5359. // var deptengabbr = model.getValue("/root/init/orddeptcd/orddeptcdlist[ cd = '" + cmb_deptcd.value + "']/deptengabbr");
  5360. var reqdeptno = model.getValue("/root/init/orddeptcd/orddeptcdlist[ cd = '" + cmb_deptcd.value + "']/reqdeptno");
  5361. var outhistpath = "/root/main/outhist/outhistlist"; //외래이력노드
  5362. if( ! fCheckOrdCnst(pid, fsexamflag, orddeptcd, deptengabbr, reqdeptno, outhistpath, INSUKIND) && rsrvflag != "C"){
  5363. messageBox("진료의뢰서가 필요합니다.", "E999", "");
  5364. model.setValue("/root/main/reservation/ordreqdescyn", '');
  5365. }else {
  5366. model.setValue("/root/main/reservation/ordreqdescyn", 'Y');
  5367. //진료의뢰서가 필요 없을경우 선택진료설명여부 Yes 세팅
  5368. // model.setValue("/root/main/reservation/specorddescyn", 'Y');
  5369. }
  5370. }
  5371. }
  5372. model.refresh();
  5373. ]]>
  5374. </script>
  5375. </select1>
  5376. <caption id="caption27" class="cell_1" style="left:409px; top:102px; width:67px; height:23px; vertical-align:middle; ">연락처1</caption>
  5377. <input id="input5" ref="/root/main/patinfo/patinfolist/etctel1" class="input_default" navindex="7" maxlength="13" appearance="input" style="left:479px; top:103px; width:98px; height:19px; ">
  5378. <script type="javascript" ev:event="xforms-value-changed">
  5379. <![CDATA[
  5380. model.setValue("/root/main/patinfo/patinfolist/etctel1", fMakeTelNumFormat(model.getValue("/root/main/patinfo/patinfolist/etctel1")));
  5381. input5.refresh();
  5382. ]]>
  5383. </script>
  5384. <script type="javascript" ev:event="onkeypress">
  5385. <![CDATA[
  5386. if (event.keyCode == "13"){
  5387. model.setFocus("input6");
  5388. }
  5389. ]]>
  5390. </script>
  5391. </input>
  5392. <caption id="caption37" class="cell_1" style="left:409px; top:126px; width:67px; height:23px; vertical-align:middle; ">연락처2</caption>
  5393. <input id="input6" ref="/root/main/patinfo/patinfolist/etctel2" class="input_default" navindex="7" maxlength="13" appearance="input" style="left:479px; top:127px; width:98px; height:19px; ">
  5394. <script type="javascript" ev:event="xforms-value-changed">
  5395. <![CDATA[
  5396. model.setValue("/root/main/patinfo/patinfolist/etctel2", fMakeTelNumFormat(model.getValue("/root/main/patinfo/patinfolist/etctel2")));
  5397. input6.refresh();
  5398. ]]>
  5399. </script>
  5400. <script type="javascript" ev:event="onkeypress">
  5401. <![CDATA[
  5402. if (event.keyCode == "13"){
  5403. model.setFocus("btn_srchzipcd");
  5404. }
  5405. ]]>
  5406. </script>
  5407. </input>
  5408. <button id="button5" class="btn2_letter4" style="left:445px; top:4px; width:64px; height:19px; ">
  5409. <caption>SMS동의</caption>
  5410. <script type="javascript" ev:event="DOMActivate">
  5411. <![CDATA[
  5412. // open("SPCNS00500");
  5413. model.setValue("/root/hidden/source/srchcond", 1);
  5414. model.setValue("/root/hidden/source/pid", model.getValue("/root/main/patinfo/patinfolist/pid"));
  5415. // model.setValue("/root/hidden/source", model.getValue("/root/hidden/source/checkfnexam"));
  5416. modal("SMPMC01400", "1", "200", "200", "SMPMC01400", "/root/hidden/source", "/root/hidden/source");
  5417. ]]>
  5418. </script>
  5419. </button>
  5420. <!-- 나루시스템 관련 프로그램 수정-->
  5421. <button id="btn_softphone" class="btn2_letter6" visibility="hidden" style="left:182px; top:4px; width:86px; height:19px; ">
  5422. <caption>소프트폰접속</caption>
  5423. <script type="javascript" ev:event="DOMActivate">
  5424. <![CDATA[
  5425. var rtn = NARU.NaruIFStart();
  5426. if(rtn!="1"){
  5427. messageBox("소프트폰 접속에 실패하였습니다.", "E");
  5428. }else{
  5429. messageBox("소프트폰 접속에 성공하였습니다.", "I");
  5430. }
  5431. ]]>
  5432. </script>
  5433. </button>
  5434. <select id="chk_refersibum" ref="/root/tmp/refer_sibum" visibility="hidden" overflow="visible" appearance="full" style="left:225px; top:514px; width:100px; height:20px; border-style:none; ">
  5435. <choices>
  5436. <itemset nodeset="/root/init/P0341list/P0341[cdsid='P0341W']">
  5437. <label ref="cdnm"/>
  5438. <value ref="cdid"/>
  5439. </itemset>
  5440. </choices>
  5441. </select>
  5442. <caption id="caption40" class="cell_1" style="left:0px; top:266px; width:105px; height:38px; text-align:center; vertical-align:middle; ">
  5443. <![CDATA[재진
  5444. 특이사항]]>
  5445. </caption>
  5446. <textarea id="opt_reexamrem" ref="/root/main/reservation/reexamrem" disabled="false" editable="false" appearance="textarea" style="left:108px; top:266px; width:469px; height:38px; "/>
  5447. <caption id="caption48" style="left:1167px; top:689px; width:27px; height:15px; ">협력</caption>
  5448. <caption id="caption49" style="left:1149px; top:688px; width:15px; height:15px; background-color:#fd97b7ff; "/>
  5449. <caption id="caption50" style="left:1167px; top:705px; width:27px; height:15px; ">심층</caption>
  5450. <caption id="caption51" style="left:1149px; top:704px; width:15px; height:15px; background-color:#9fc93cff; "/>
  5451. </group>
  5452. <!-- 나루시스템 관련 프로그램 수정-->
  5453. <group id="grp_naru" visibility="hidden" style="left:0px; top:15px; width:20px; height:20px; ">
  5454. <object id="NARU" clsid="{50a12a9d-83f0-4d47-9e1c-8826c891a94f}" style="left:0px; top:0px; width:15px; height:15px; ">
  5455. <script for="NARU" type="javascript" ev:event="EvtInbound(szAni)">
  5456. <![CDATA[
  5457. if(!isNull(szAni)){
  5458. var rtn_pid = szAni.split("|");
  5459. if(!isNull(rtn_pid)){
  5460. ipt_pid.value=rtn_pid[1];
  5461. ipt_pid.refresh();
  5462. delPatientInfos();
  5463. fPidEnterEvent();
  5464. }
  5465. }
  5466. ]]>
  5467. </script>
  5468. </object>
  5469. </group>
  5470. <group id="group3" style="left:0px; top:749px; width:1195px; height:31px; ">
  5471. <button id="button8" class="btn3_letter5" style="left:1px; top:5px; width:92px; height:22px; ">
  5472. <caption>진료의뢰서</caption>
  5473. <script type="javascript" ev:event="DOMActivate">
  5474. <![CDATA[
  5475. var pid = model.getValue("/root/main/patinfo/patinfolist/pid");
  5476. // var orddeptcd = model.getValue("/root/main/reservation/orddeptcd");
  5477. var hngnm = model.getValue("/root/main/patinfo/patinfolist/hngnm");
  5478. var parameter = pid + "▦" + hngnm;
  5479. setParameter("SMPMO01200_PARM", parameter);
  5480. modal("SPPMO01200", "1", "200", "200", "SPPMO01200", "", "");
  5481. // model.setValue("/root/hidden/source/srchcond", 1);
  5482. // model.setValue("/root/hidden/source/pid", model.getValue("/root/main/patinfo/patinfolist/pid"));
  5483. // model.setValue("/root/hidden/source", model.getValue("/root/hidden/source/checkfnexam"));
  5484. // modal("SMPMC01800", "1", "200", "200", "SMPMC01800", "/root/hidden/source", "/root/source");
  5485. ]]>
  5486. </script>
  5487. </button>
  5488. <button id="btn_srchzipcd6" class="btn3_letter4" style="left:96px; top:5px; width:80px; height:22px; ">
  5489. <caption>변경조회</caption>
  5490. <script type="javascript" ev:event="DOMActivate">
  5491. <![CDATA[
  5492. var curDate = getCurrentDate();
  5493. var setDate = '';
  5494. setParameter("openflag", 'T');
  5495. setParameter("pid", model.getvalue("/root/main/patinfo/patinfolist/pid"));
  5496. setParameter("hngnm", model.getvalue("/root/main/patinfo/patinfolist/hngnm"));
  5497. setParameter("rrgstno1", model.getvalue("/root/main/patinfo/patinfolist/rrgstno1"));
  5498. setParameter("rrgstno2", model.getvalue("/root/main/patinfo/patinfolist/rrgstno2"));
  5499. setParameter("todd", curDate);
  5500. setParameter("orddeptcd", setDate);
  5501. setParameter("orddrid", setDate);
  5502. setParameter("specordyn", setDate);
  5503. setParameter("rsrvflag", setDate);
  5504. setParameter("insukind", setDate);
  5505. setParameter("acptdd", setDate);
  5506. setParameter("acptno", setDate);
  5507. setParameter("tablename", setDate);
  5508. curDate = curDate.toDate().getAddDate(-1,"Y");
  5509. var bfDate = curDate.getFullYear();
  5510. bfDate = bfDate.toString() + (( curDate.getMonth()+ 1 > 9 ) ? curDate.getMonth() + 1 : "0" + (curDate.getMonth() + 1));
  5511. bfDate = bfDate.toString() + (( curDate.getDate() > 9 ) ? curDate.getDate() : "0" + curDate.getDate()) ;
  5512. setParameter("fromdd", bfDate);
  5513. modal("SMPMO00600", "", "50", "50" ,"SMPMO00600", "", "");
  5514. ]]>
  5515. </script>
  5516. </button>
  5517. <button id="btn_srchzipcd7" class="btn3_letter6" visibility="hidden" style="left:690px; top:5px; width:104px; height:22px; ">
  5518. <caption>인적사항변경</caption>
  5519. <script type="javascript" ev:event="DOMActivate">
  5520. <![CDATA[
  5521. model.setValue("/root/hidden/source/srchcond", 1);
  5522. model.setValue("/root/hidden/source/pid", model.getValue("/root/main/patinfo/patinfolist/pid"));
  5523. // model.setValue("/root/hidden/source", model.getValue("/root/hidden/source/checkfnexam"));
  5524. modal("SMPMC01400", "1", "200", "200", "SMPMC01400", "/root/hidden/source", "/root/hidden/source");
  5525. ]]>
  5526. </script>
  5527. </button>
  5528. <button id="button32" class="btn4_letter2" visibility="hidden" style="left:985px; top:5px; width:56px; height:22px; ">
  5529. <caption>취소</caption>
  5530. <script type="javascript" ev:event="DOMActivate">
  5531. <![CDATA[
  5532. // 신환/구환을 구분한다.
  5533. if( model.getValue("/root/main/reservation/cretno") != '' &&
  5534. model.getValue("/root/main/reservation/acptseqno") != '' &&
  5535. model.getValue("/root/main/patinfo/patinfolist/pid").length > 0 &&
  5536. model.getValue("/root/main/reservation/acptno") == '0' ){
  5537. model.setValue("/root/hidden/source/checkfnexam", '3');
  5538. }else{
  5539. model.setValue("/root/hidden/source/checkfnexam", '1');
  5540. }
  5541. if( pamCompareNodes("/root/main/patinfo/patinfolist", "/root/tmp/patinfolist") && pamCompareNodes("/root/main/reservation", "/root/tmp/reservation")){
  5542. if( messageBox("예약정보를 정말 취소하시겠습니까?", "Q003") == 6){
  5543. fMakeRsrv('X');
  5544. }
  5545. }else{
  5546. messageBox("예약정보가 수정되었습니다. 수정된 정보는 취소할 수 없습니다.", "E999", "");
  5547. }
  5548. ]]>
  5549. </script>
  5550. </button>
  5551. <button id="button33" class="btn4_letter2" visibility="hidden" style="left:865px; top:5px; width:56px; height:22px; ">
  5552. <caption>예약</caption>
  5553. <script type="javascript" ev:event="DOMActivate">
  5554. <![CDATA[
  5555. // 신환/구환을 구분한다.
  5556. if( model.getValue("/root/main/patinfo/patinfolist/pid").length > 0 ){
  5557. model.setValue("/root/hidden/source/checkfnexam", '3');
  5558. }else{
  5559. model.setValue("/root/hidden/source/checkfnexam", '1');
  5560. }
  5561. if( fIsRsrvDataOK()){
  5562. fMakeRsrv('T');
  5563. }
  5564. ]]>
  5565. </script>
  5566. </button>
  5567. <button id="button34" class="btn4_letter2" visibility="hidden" style="left:925px; top:5px; width:56px; height:22px; ">
  5568. <caption>변경</caption>
  5569. <script type="javascript" ev:event="DOMActivate">
  5570. <![CDATA[
  5571. //초재진구분 조회
  5572. if( grd_outhist.row < 1 ){
  5573. messageBox("변경할 내역이 선택되지 않았습니다.", "E999", "");
  5574. return false;
  5575. }
  5576. //신환/구환을 구분한다.
  5577. if( model.getValue("/root/main/reservation/cretno") != '' &&
  5578. model.getValue("/root/main/reservation/acptseqno") != '' &&
  5579. model.getValue("/root/main/patinfo/patinfolist/pid").length > 0 &&
  5580. model.getValue("/root/main/reservation/acptno") == '0' ){
  5581. model.setValue("/root/hidden/source/checkfnexam", '3');
  5582. }else{
  5583. model.setValue("/root/hidden/source/checkfnexam", '1');
  5584. }
  5585. if( pamCompareNodes("/root/main/patinfo/patinfolist", "/root/tmp/patinfolist") && pamCompareNodes("/root/main/reservation", "/root/tmp/reservation")){
  5586. if( messageBox("변경된 데이터가 없습니다.", "Q003") == 6){
  5587. if( fIsRsrvDataOK()){
  5588. //진찰료가 수납된 내역(HISTSTAT=R) 변경 시(OTPT),
  5589. //초재진구분,선택진료여부가 변경될 경우 기존내역 C, 신규내역 R 로 생성하면서,
  5590. //CALCYN = Y 로 세팅,CALCFLAG=Y
  5591. if( fIsRsrvUpdtDataOK() ){
  5592. fMakeRsrv('C');
  5593. }
  5594. }
  5595. }
  5596. }else{
  5597. if( fIsRsrvDataOK()){
  5598. if( fIsRsrvUpdtDataOK() ){
  5599. fMakeRsrv('C');
  5600. }
  5601. }
  5602. }
  5603. ]]>
  5604. </script>
  5605. </button>
  5606. <button id="button35" class="btn4_letter3" visibility="hidden" style="left:1045px; top:5px; width:68px; height:22px; ">
  5607. <caption>초기화</caption>
  5608. <script type="javascript" ev:event="DOMActivate">
  5609. <![CDATA[
  5610. model.resetInstanceNode("/root/main/patinfo/patinfolist");
  5611. fInitialize();
  5612. ]]>
  5613. </script>
  5614. </button>
  5615. <line id="line88" class="line_6" style="x1:0px; y1:0px; x2:1195px; y2:0px; "/>
  5616. <button id="button1" class="btn3_letter2" style="left:179px; top:5px; width:56px; height:22px; ">
  5617. <caption>협진</caption>
  5618. <script type="javascript" ev:event="DOMActivate">
  5619. <![CDATA[
  5620. var pid = model.getValue("/root/main/patinfo/patinfolist/pid");
  5621. var hngnm = model.getValue("/root/main/patinfo/patinfolist/hngnm");
  5622. // if( pid == '' || pid == '' || pid == '-' ){
  5623. // messageBox("등록번호가 없습니다. 환자조회 후 다시 시도해 주세요.", "E999", "");
  5624. // return false;
  5625. // }
  5626. setParameter("SPPMO01300_PID", pid);
  5627. setParameter("SPPMO01300_HNGNM", hngnm);
  5628. setParameter("SPPMO01300_FLAG", 'O');
  5629. modal("SPPMO01300", "1", "200", "200", "SPPMO01300", "", "");
  5630. // if(submit("TRPAC00301")){
  5631. //
  5632. // }
  5633. ]]>
  5634. </script>
  5635. </button>
  5636. <button id="button6" class="btn3_letter6" style="left:238px; top:5px; width:104px; height:22px; ">
  5637. <caption>휴진내역조회</caption>
  5638. <script type="javascript" ev:event="DOMActivate">
  5639. <![CDATA[
  5640. // model.setValue("/root/hidden/source/srchcond", 1);
  5641. // model.setValue("/root/hidden/source/pid", model.getValue("/root/main/patinfo/patinfolist/pid"));
  5642. // model.setValue("/root/hidden/source", model.getValue("/root/hidden/source/checkfnexam"));
  5643. setParameter("SMPMB00900_orddeptcd", model.getValue("/root/main/reservation/orddeptcd"));
  5644. setParameter("SMPMB00900_orddrid", model.getValue("/root/main/reservation/orddrid"));
  5645. modal("SMPMB00900", "1", "50", "50", "SMPMB00900", "", "");
  5646. ]]>
  5647. </script>
  5648. </button>
  5649. <button id="btn_privacy" class="btn3_letter3" style="left:344px; top:5px; width:68px; height:22px; ">
  5650. <caption>사생활</caption>
  5651. <script type="javascript" ev:event="DOMActivate">
  5652. <![CDATA[
  5653. //사생활보호 정보관리창 호출
  5654. fCallPatPrivacy(model.getValue("/root/main/patinfo/patinfolist/pid"));
  5655. ]]>
  5656. </script>
  5657. </button>
  5658. <button id="button2" class="btn3_letter6" visibility="hidden" style="left:414px; top:5px; width:104px; height:22px; ">
  5659. <caption>분배내역조회</caption>
  5660. <script type="javascript" ev:event="DOMActivate">
  5661. <![CDATA[
  5662. open("SPPMP01700", "1", "200", "200", "SPPMP01700", "", "");
  5663. ]]>
  5664. </script>
  5665. </button>
  5666. <input id="input4" ref="/root/callcenter/status" visibility="hidden" style="left:800px; top:6px; width:65px; height:19px; "/>
  5667. <select id="checkbox2" ref="/root/hidden/com/searchInsuInfoYN" visibility="hidden" overflow="visible" appearance="full" style="left:1125px; top:5px; width:67px; height:20px; border-style:none; ">
  5668. <choices>
  5669. <item>
  5670. <label>자격조회</label>
  5671. <value>Y</value>
  5672. </item>
  5673. </choices>
  5674. </select>
  5675. <button id="button13" class="btn3_letter4" visibility="hidden" style="left:521px; top:5px; width:80px; height:22px; ">
  5676. <caption>선택진료</caption>
  5677. <script type="javascript" ev:event="DOMActivate">
  5678. <![CDATA[
  5679. model.makeValue("/root/tempchk/specchk/stat", "");
  5680. model.makeValue("/root/tempchk/specchk/pid", model.getValue("/root/main/patinfo/patinfolist/pid"));
  5681. model.makeValue("/root/tempchk/specchk/hngnm", model.getValue("/root/main/patinfo/patinfolist/hngnm"));
  5682. model.makeValue("/root/tempchk/specchk/rrgstno1", model.getValue("/root/main/patinfo/patinfolist/rrgstno1"));
  5683. model.makeValue("/root/tempchk/specchk/rrgstno2", model.getValue("/root/main/patinfo/patinfolist/rrgstno2"));
  5684. model.makeValue("/root/tempchk/specchk/choiflag", "");
  5685. model.makeValue("/root/tempchk/specchk/ordtype", "O");
  5686. model.makeValue("/root/tempchk/specchk/orddd", model.getValue("/root/main/reservation/orddd"));
  5687. model.makeValue("/root/tempchk/specchk/orddeptcd", model.getValue("/root/main/reservation/orddeptcd"));
  5688. model.makeValue("/root/tempchk/specchk/orddrid", model.getValue("/root/main/reservation/orddrid"));
  5689. if (model.getValue("/root/main/reservation/specordyn") != "N") {
  5690. model.makeValue("/root/tempchk/specchk/specordyn", "Y");
  5691. } else {
  5692. model.makeValue("/root/tempchk/specchk/specordyn", "N");
  5693. }
  5694. model.makeValue("/root/tempchk/specchk/fromdd", model.getValue("/root/main/reservation/orddd"));
  5695. model.makeValue("/root/tempchk/specchk/rsrvdd", "");
  5696. modal("SMPMC06500", "1", "0", "0" ,"SMPMC06500", "/root/tempchk/specchk", "/root/main/patappinfo/patappinfo1");
  5697. ]]>
  5698. </script>
  5699. </button>
  5700. </group>
  5701. <select1 id="radio3" ref="/root/main/caloption" appearance="full" cellspacing="8" cols="2" rows="1" overflow="visible" style="left:800px; top:22px; width:168px; height:20px; background-color:transparent; border-style:none; ">
  5702. <choices>
  5703. <item>
  5704. <label>예약가능인원</label>
  5705. <value>1</value>
  5706. </item>
  5707. <item>
  5708. <label>예약현황</label>
  5709. <value>2</value>
  5710. </item>
  5711. </choices>
  5712. <script type="javascript" ev:event="xforms-value-changed">
  5713. <![CDATA[
  5714. var isMonth = model.getValue("/root/hidden/calendar/month");
  5715. var isYear = model.getValue("/root/hidden/calendar/year");
  5716. var isDate = (isYear+isMonth+1).toDate();
  5717. setCalendar2(isDate);
  5718. //fRemoveCapa();
  5719. model.removeNodeset("/root/main/outrgst/outrgstlist");
  5720. model.resetInstanceNode("/root/resercnt");
  5721. ]]>
  5722. </script>
  5723. </select1>
  5724. <button id="btn_hie" class="btn2_letter4" visibility="hidden" style="left:683px; top:19px; width:64px; height:19px; ">
  5725. <caption>HIE환자</caption>
  5726. <script type="javascript" ev:event="DOMActivate">
  5727. <![CDATA[
  5728. fHIEList();
  5729. ]]>
  5730. </script>
  5731. </button>
  5732. </xhtml:body>
  5733. </xhtml:html>