SMANC00350_환자별영양관리.xrw 295 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.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. <maindata>
  11. <nutrstatjudg>
  12. <execprcpuniqno/>
  13. <pid/>
  14. <formrecseq/>
  15. <cnststat/>
  16. <reqpsn/>
  17. <reqdd/>
  18. <reqresn/>
  19. <reccnts/>
  20. <execdd/>
  21. <nutrmngtkind/>
  22. <ordcd/>
  23. <ioflag/>
  24. <indd/>
  25. <prcpdd/>
  26. <sickcd/>
  27. <bodysympchoi/>
  28. <bodysymprem/>
  29. <dietprobchoi/>
  30. <dietprobrem/>
  31. <diethistchoi/>
  32. <healsuppfood/>
  33. <cofftims/>
  34. <smoktims/>
  35. <eatouttims/>
  36. <eatoutrem/>
  37. <drunktims/>
  38. <drunkvol/>
  39. <drunkrem/>
  40. <diethistetc/>
  41. <intkstatmainmeal/>
  42. <intkstatsubmeal/>
  43. <intkstatetc/>
  44. <actgrdechoi/>
  45. <actgrdeexer/>
  46. <actgrdeetc/>
  47. <physmeasbdht/>
  48. <physmeasbdwt/>
  49. <physmeasubw/>
  50. <physmeasibw/>
  51. <physmeasibwperc/>
  52. <physmeasabw/>
  53. <bdwtupdtqty/>
  54. <bdwtupdtrate/>
  55. <bdwtupdtterm/>
  56. <testrsltalb/>
  57. <testrslttlc/>
  58. <testrslthbhct/>
  59. <testrslthbhct2/>
  60. <testrslttrf/>
  61. <testrsltrem/>
  62. <chrgdieter/>
  63. <intndieter/>
  64. <chrgdr/>
  65. <chrgnurs/>
  66. <repldd/>
  67. <druginfo/>
  68. <replcnts/>
  69. <nutrstatjudgcd/>
  70. <nutrstatjudgrem/>
  71. <nutrtplan/>
  72. <cnstpurs/>
  73. <nutrstatvalucd/>
  74. <nutrstatvalucnts/>
  75. <srchdd/>
  76. </nutrstatjudg>
  77. <cnstreq>
  78. <execprcpuniqno/>
  79. <pid/>
  80. <execdd/>
  81. <nutrmngtkind/>
  82. <cnstflag1/>
  83. <stndbdwtflag1/>
  84. <stndbdwt1/>
  85. <calrflag1/>
  86. <adoptlawcalr1/>
  87. <hbcalr11/>
  88. <hbcalr21/>
  89. <dialqty1/>
  90. <protqty1/>
  91. <nutrreqqty1/>
  92. <cnstpsn1/>
  93. <unstdgrde1/>
  94. <calrintk1/>
  95. <calrintkqty1/>
  96. <protintk1/>
  97. <protintkqty1/>
  98. <intkqtyetc1/>
  99. <dietercmt1/>
  100. <optcalr1/>
  101. <optcalradopt1/>
  102. <optcalrhb1/>
  103. <optprotqty1/>
  104. <optprotadopt1/>
  105. <nutrstatvalucd1/>
  106. <nutrstatvalucnts1/>
  107. <cnstcd/>
  108. <cnstcnts/>
  109. <review/>
  110. </cnstreq>
  111. <pursmngt>
  112. <execprcpuniqno/>
  113. <pid/>
  114. <execdd/>
  115. <nutrmngtkind/>
  116. <cnstflag2/>
  117. <stndbdwtflag2/>
  118. <stndbdwt2/>
  119. <calrflag2/>
  120. <adoptlawcalr2/>
  121. <hbcalr12/>
  122. <hbcalr22/>
  123. <dialqty2/>
  124. <protqty2/>
  125. <nutrreqqty2/>
  126. <calrintk2/>
  127. <calrintkqty2/>
  128. <protintk2/>
  129. <protintkqty2/>
  130. <intkqtyetc2/>
  131. <dietercmt2/>
  132. <optcalr2/>
  133. <optcalradopt2/>
  134. <optcalrhb2/>
  135. <optprotqty2/>
  136. <optprotadopt2/>
  137. <nutrstatvalucd2/>
  138. <nutrstatvalucnts2/>
  139. <review/>
  140. </pursmngt>
  141. <repl>
  142. <pastreplcnts/>
  143. </repl>
  144. <patbaseinfo>
  145. <pid/>
  146. <hngnm/>
  147. <cretno/>
  148. <brthdd/>
  149. <sex/>
  150. <age/>
  151. <hometel/>
  152. <mpphontel/>
  153. <zipcd1/>
  154. <zipcd2/>
  155. <zipcdseq/>
  156. <detladdr/>
  157. <ioflag/>
  158. <inout/>
  159. <indd/>
  160. <orddeptcd/>
  161. <orddeptnm/>
  162. <atdoctid/>
  163. <atdoctnm/>
  164. <wt/>
  165. <ht/>
  166. <flag/>
  167. </patbaseinfo>
  168. <diag>
  169. <diagnm/>
  170. </diag>
  171. <inmotv>
  172. <inmotvcnts/>
  173. </inmotv>
  174. <dietprcp>
  175. <prcpdd/>
  176. <dietmeal/>
  177. <dietnm/>
  178. <orddd/>
  179. <cretno/>
  180. <orddeptcd/>
  181. <prcpgenrflag/>
  182. </dietprcp>
  183. <nutrmngt>
  184. <instcd/>
  185. <pid/>
  186. <execdd/>
  187. <nutrmngtkind/>
  188. <dieter/>
  189. <ioflag/>
  190. <indd/>
  191. <formrecseq/>
  192. <cnststatnm/>
  193. <chrgdieternm/>
  194. <intndieternm/>
  195. <delyn/>
  196. <educd/>
  197. <educnts/>
  198. <eduprepyn/>
  199. <eduwho/>
  200. <eduway/>
  201. <edurslt/>
  202. <edudd/>
  203. <edutm/>
  204. <replyn/>
  205. <cretno/>
  206. <workflag/>
  207. <problemcareplan/>
  208. <rgstdd/>
  209. <rgsttm/>
  210. </nutrmngt>
  211. <nutrsrchrslt>
  212. <instcd/>
  213. <pid/>
  214. <fnexamflag/>
  215. <execdd/>
  216. <nutrmngtkind/>
  217. <srchrslt/>
  218. <insrslt/>
  219. <indd/>
  220. <formrecseq/>
  221. <dieter/>
  222. <cnststatnm/>
  223. <chrgdieternm/>
  224. <intndieternm/>
  225. <delyn/>
  226. <educd/>
  227. <educnts/>
  228. <eduprepyn/>
  229. <eduwho/>
  230. <eduway/>
  231. <edurslt/>
  232. <edudd/>
  233. <edutm/>
  234. <replyn/>
  235. <cretno/>
  236. <workflag/>
  237. <problemcareplan/>
  238. <rgstdd/>
  239. <rgsttm/>
  240. </nutrsrchrslt>
  241. <cureplan>
  242. <nutrstatjudg>
  243. <pid/>
  244. <execdd/>
  245. <nutrmngtkind/>
  246. <cnstpurs/>
  247. <cureplancd/>
  248. <cureplancnts/>
  249. </nutrstatjudg>
  250. <cnstreq>
  251. <pid/>
  252. <execdd/>
  253. <nutrmngtkind/>
  254. <cnstpurs/>
  255. <cureplancd/>
  256. <cureplancnts/>
  257. </cnstreq>
  258. <pursmngt>
  259. <pid/>
  260. <execdd/>
  261. <nutrmngtkind/>
  262. <cnstpurs/>
  263. <cureplancd/>
  264. <cureplancnts/>
  265. </pursmngt>
  266. </cureplan>
  267. </maindata>
  268. <testrslt>
  269. <lis>
  270. <alb/>
  271. <wbc/>
  272. <lymphocytes/>
  273. <tlc/>
  274. <hb/>
  275. <hct/>
  276. <trf/>
  277. </lis>
  278. </testrslt>
  279. <patinfo>
  280. <patinfolist/>
  281. </patinfo>
  282. <receivedata>
  283. <flag/>
  284. <flag2/>
  285. <pid/>
  286. <hngnm/>
  287. <reqdd/>
  288. <reqpsn/>
  289. <orddrid/>
  290. <educreqcnts/>
  291. <reccnts/>
  292. <h_cretno/>
  293. <h_orddeptcd/>
  294. <h_prcpgenrflag/>
  295. <h_orddd/>
  296. <h_formrecseq/>
  297. <execprcpuniqno/>
  298. <nutrmngtkind/>
  299. <execdd/>
  300. <srchdd/>
  301. <h_ordtypenm/>
  302. <h_orddrid/>
  303. </receivedata>
  304. <receivedatacopy/>
  305. <careplandata>
  306. <list/>
  307. </careplandata>
  308. <educcntsdata>
  309. <list/>
  310. </educcntsdata>
  311. </main>
  312. <send>
  313. <searchitem>
  314. <flag/>
  315. <pid/>
  316. <nutrmngtkind/>
  317. <execdd/>
  318. <pastexecdd/>
  319. <hngnm/>
  320. <sex/>
  321. <age/>
  322. <wt/>
  323. <ht/>
  324. <ibw/>
  325. <calrrecmqty/>
  326. <protrecmqty/>
  327. <cnstflag/>
  328. <calrintk/>
  329. <calrintkqty/>
  330. <protintk/>
  331. <protintkqty/>
  332. <intkqtyetc/>
  333. <dietercmt/>
  334. <execprcpuniqno/>
  335. <reqdd/>
  336. <reqpsn/>
  337. <reqresn/>
  338. <reccnts/>
  339. <formrecseq/>
  340. <cretno/>
  341. <orddeptcd/>
  342. <prcpgenrflag/>
  343. <orddd/>
  344. <dieter/>
  345. <intndieter/>
  346. <chrgdieternm/>
  347. <intndieternm/>
  348. </searchitem>
  349. <data>
  350. <maindata>
  351. <nutrstatjudg/>
  352. <cnstreq/>
  353. <pursmngt/>
  354. <cureplan/>
  355. </maindata>
  356. <mrjhedu>
  357. <listdata/>
  358. </mrjhedu>
  359. <careplan>
  360. <listdata/>
  361. </careplan>
  362. </data>
  363. </send>
  364. <hidden>
  365. <ret>
  366. <count/>
  367. </ret>
  368. <temp>
  369. <msglist/>
  370. </temp>
  371. </hidden>
  372. <init>
  373. <basecode>
  374. <nutrmngtkind>
  375. <A0060>
  376. <cdid/>
  377. <cdnm/>
  378. </A0060>
  379. </nutrmngtkind>
  380. <sickcd>
  381. <A0059>
  382. <cdid/>
  383. <cdnm/>
  384. </A0059>
  385. </sickcd>
  386. <dieter>
  387. <dieter>
  388. <cdid/>
  389. <cdnm/>
  390. </dieter>
  391. <intndieter>
  392. <cdid/>
  393. <cdnm/>
  394. </intndieter>
  395. </dieter>
  396. </basecode>
  397. <nutrjudgbase>
  398. <data>
  399. <cd/>
  400. <dngrcd/>
  401. <min/>
  402. <max/>
  403. </data>
  404. </nutrjudgbase>
  405. </init>
  406. <temp>
  407. <save>
  408. <msg/>
  409. </save>
  410. <cnst>
  411. <cnst>
  412. <cnststat/>
  413. <formrecseq/>
  414. </cnst>
  415. </cnst>
  416. <senddata>
  417. <instcd/>
  418. <delyn/>
  419. <educd/>
  420. <educnts/>
  421. <eduprepyn/>
  422. <eduwho/>
  423. <eduway/>
  424. <edurslt/>
  425. <edudd/>
  426. <edutm/>
  427. <replyn/>
  428. <cretno/>
  429. <workflag/>
  430. <problemcareplan/>
  431. <rgstdd/>
  432. <rgsttm/>
  433. <indd/>
  434. </senddata>
  435. <griddata>
  436. <gridid/>
  437. <gridrow/>
  438. </griddata>
  439. </temp>
  440. </root>
  441. </instance>
  442. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  443. <script type="javascript" src="../../../com/commonweb/js/numericHelper.js"/>
  444. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  445. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  446. <script type="javascript" src="../../../com/commonweb/js/utilHelper.js"/>
  447. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  448. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  449. <script type="javascript" ev:event="xforms-ready">
  450. <![CDATA[
  451. finit();
  452. fPrcpDataSrch();
  453. fTestRsltSrch(); //가장 최근 검사결과 조회
  454. model.removeNodeset("/root/main/maindata/cureplan/nutrstatjudg");
  455. model.removeNodeset("/root/main/maindata/cureplan/cnstreq");
  456. model.removeNodeset("/root/main/maindata/cureplan/pursmngt");
  457. model.setValue("/root/temp/griddata/gridid", "");
  458. model.setValue("/root/temp/griddata/gridrow", "");
  459. submit("TRANC00102"); //영양판정기준표 조회
  460. submit("TRANC00202"); //영양사 조회
  461. model.setFocus("ipt_pid");
  462. btn_search.disabled = !checkAuth("R");
  463. btn_save.disabled = !checkAuth("X");
  464. btn_cnstrepl.disabled = !checkAuth("X"); //회신
  465. btn_del.disabled = !checkAuth("X");
  466. btn_cnstreplcncl.disabled = !checkAuth("X");
  467. btn_cnstrepl.disabled = true; //회신버튼 비활성화
  468. // btn_cnstreplcncl.disabled = true; //회신취소버튼 비활성화
  469. ]]>
  470. </script>
  471. <script type="javascript">
  472. <![CDATA[
  473. // 화면 초기화
  474. function finit() {
  475. //화면open시 영양관리유형, 질환명에 코드를 setting해준다.
  476. zbcfGetCodeList( new Array( "A0060", "A0059" ), new Array("/root/init/basecode/nutrmngtkind", "/root/init/basecode/sickcd" ) );
  477. model.removeNodeset("/root/main/maindata/diag");
  478. model.removeNodeset("/root/main/maindata/inmotv");
  479. model.removeNodeset("/root/main/maindata/dietprcp");
  480. model.removeNodeset("/root/main/maindata/nutrmngt");
  481. model.removeNodeset("/root/main/maindata/nutrsrchrslt");
  482. model.removeNodeset("/root/main/maindata/cureplan/nutrstatjudg");
  483. model.removeNodeset("/root/main/maindata/cureplan/cnstreq");
  484. model.removeNodeset("/root/main/maindata/cureplan/pursmngt");
  485. model.resetInstanceNode("/root/main/maindata");
  486. model.resetInstanceNode("/root/send/data/maindata");
  487. model.setValue("/root/send/searchitem/execdd", getCurrentDate());
  488. model.setValue("/root/send/searchitem/dieter", getUserInfo("userid"));
  489. //화면open시 환자기본정보 숨김.
  490. grp_patinfo.attribute("visibility")="visible";
  491. btn_patinfo.dispatch("onclick"); //환자기본정보
  492. model.refresh();
  493. }
  494. // 영양교육관리 or 영양검색결과조회 or 환자관리(전화영양상담탭) 화면에서 호출된 경우 자동 조회
  495. function fPrcpDataSrch() {
  496. if (model.getValue("/root/main/receivedata/pid") != "") {
  497. //flag=B는 화면 왼쪽의 공통정보(환자기본정보,진단명,입원동기,식사처방정보,영양관리이력,영양검색결과이력)만 조회한다는 뜻임.
  498. model.setValue("/root/send/searchitem/flag", 'B');
  499. model.setValue("/root/send/searchitem/pid", model.getValue("/root/main/receivedata/pid"));
  500. model.setValue("/root/send/searchitem/hngnm", model.getValue("/root/main/receivedata/hngnm"));
  501. // model.setValue("/root/send/searchitem/reqdd", model.getValue("/root/main/receivedata/reqdd"));
  502. // model.setValue("/root/send/searchitem/reqpsn", model.getValue("/root/main/receivedata/reqpsn"));
  503. // model.setValue("/root/send/searchitem/reqresn", model.getValue("/root/main/receivedata/educreqcnts"));
  504. // model.setValue("/root/send/searchitem/reccnts", model.getValue("/root/main/receivedata/reccnts"));
  505. // model.setValue("/root/send/searchitem/formrecseq", model.getValue("/root/main/receivedata/h_formrecseq"));
  506. model.setValue("/root/send/searchitem/execprcpuniqno", model.getValue("/root/main/receivedata/execprcpuniqno"));
  507. model.setValue("/root/send/searchitem/cretno", model.getValue("/root/main/receivedata/h_cretno"));
  508. model.setValue("/root/send/searchitem/orddeptcd", model.getValue("/root/main/receivedata/h_orddeptcd"));
  509. model.setValue("/root/send/searchitem/prcpgenrflag", model.getValue("/root/main/receivedata/h_prcpgenrflag"));
  510. model.setValue("/root/send/searchitem/orddd", model.getValue("/root/main/receivedata/h_orddd"));
  511. model.setValue("/root/send/searchitem/nutrmngtkind", model.getValue("/root/main/receivedata/nutrmngtkind"));
  512. model.setValue("/root/send/searchitem/pastexecdd", model.getValue("/root/main/receivedata/execdd"));
  513. //model.setValue("/root/send/searchitem/orddrid", model.getValue("/root/main/receivedata/orddrid"));
  514. }
  515. //영양검색결과조회 화면에서 호출된 경우 영양관리유형,수행일자가 null값임.
  516. if (model.getValue("/root/main/receivedata/flag") == "R") {
  517. //신환검색일 경우 영양관리유형을 '초기영양검색(01)'으로 자동setting
  518. if (model.getValue("/root/main/receivedata/flag2") == "F") {
  519. model.setValue("/root/send/searchitem/nutrmngtkind", "01");
  520. }
  521. //재검색일 경우 영양관리유형을 '일반추구관리(05)'로 자동setting
  522. else if (model.getValue("/root/main/receivedata/flag2") == "I") {
  523. //model.setValue("/root/send/searchitem/nutrmngtkind", "05");
  524. model.setValue("/root/send/searchitem/nutrmngtkind", "01");
  525. }
  526. }
  527. model.copyNode("root/main/receivedatacopy", "root/main/receivedata");
  528. model.refresh();
  529. btn_search.dispatch("DOMActivate"); //조회
  530. }
  531. //가장 최근 검사결과 조회
  532. function fTestRsltSrch() {
  533. model.setValue("/root/send/searchitem/orddd", model.getValue("/root/main/maindata/patbaseinfo/indd"));
  534. model.setValue("/root/send/searchitem/prcpgenrflag", model.getValue("/root/main/maindata/patbaseinfo/ioflag"));
  535. submit("TRANC00303");
  536. var tlc = model.getValue("/root/main/testrslt/lis/tlc");
  537. if ( tlc != "" ) {
  538. tlc = tlc.toString().getRound(-2, "HALF_UP");
  539. model.setValue("/root/main/testrslt/lis/tlc", tlc);
  540. }
  541. ipt_testrslttlc.refresh();
  542. }
  543. // 협진의뢰나 추구관리 탭화면 클릭시 영양상태판정Review 표시
  544. function fNutrStatJudgReview() {
  545. var bodysymp = "";
  546. var dietprob = "";
  547. var cureplan = "";
  548. var temp = "";
  549. var review = "";
  550. //신체증후의 체크된 항목들을 콤마로 연결
  551. for ( i = 0; i < chk_bodysymp.label.length; i++ ) {
  552. if ( chk_bodysymp.label.substr(i,2) == "기타" || chk_bodysymp.label.substr(i,3) == "▦기타" ) {
  553. break;
  554. } else {
  555. temp = temp + chk_bodysymp.label.substr(i,1);
  556. }
  557. }
  558. for ( i = 0; i < temp.length; i++ ) {
  559. if ( temp.substr(i,1) == "▦" ) {
  560. bodysymp = bodysymp + ", ";
  561. } else {
  562. bodysymp = bodysymp + temp.substr(i,1);
  563. }
  564. }
  565. //식사시 문제점의 체크된 항목들을 콤마로 연결
  566. temp = "";
  567. for ( i = 0; i < chk_dietprob.label.length; i++ ) {
  568. if ( chk_dietprob.label.substr(i,2) == "기타" || chk_dietprob.label.substr(i,3) == "▦기타" ) {
  569. break;
  570. } else {
  571. temp = temp + chk_dietprob.label.substr(i,1);
  572. }
  573. }
  574. for ( i = 0; i < temp.length; i++ ) {
  575. if ( temp.substr(i,1) == "▦" ) {
  576. dietprob = dietprob + ", ";
  577. } else {
  578. dietprob = dietprob + temp.substr(i,1);
  579. }
  580. }
  581. temp = "";
  582. //영양치료계획/권장 그리드의 항목들을 콤마로 연결
  583. if ( grd_nutrstatjudg.rows-1 > 0 ) {
  584. for ( i = 1; i <= grd_nutrstatjudg.rows-1; i++ ) {
  585. if (model.getValue("/root/main/maindata/cureplan/nutrstatjudg["+ i +"]/cureplancd") != "") {
  586. if (model.getValue("/root/main/maindata/cureplan/nutrstatjudg["+ i +"]/cureplancd") == "1") {
  587. temp = " ο 현재 식사 유지해 주십시오." +"\n";
  588. } else if (model.getValue("/root/main/maindata/cureplan/nutrstatjudg["+ i +"]/cureplancd") == "2") {
  589. temp = " ο 식사처방 변경 필요합니다." +"\n";
  590. } else if (model.getValue("/root/main/maindata/cureplan/nutrstatjudg["+ i +"]/cureplancd") == "3") {
  591. temp = " ο 영양교육 의뢰서 작성해 주십시오." +"\n";
  592. } else if (model.getValue("/root/main/maindata/cureplan/nutrstatjudg["+ i +"]/cureplancd") == "4") {
  593. temp = " ο 경장영양의뢰(EN)로 협진의뢰서 작성해 주십시오." +"\n";
  594. } else if (model.getValue("/root/main/maindata/cureplan/nutrstatjudg["+ i +"]/cureplancd") == "5") {
  595. temp = " ο F/U 예정입니다." +"\n";
  596. } else if (model.getValue("/root/main/maindata/cureplan/nutrstatjudg["+ i +"]/cureplancd") == "9") {
  597. temp = " ο 기타" +"\n";
  598. }
  599. cureplan = cureplan + temp + " " + model.getValue("/root/main/maindata/cureplan/nutrstatjudg["+ i +"]/cureplancnts") +"\n";
  600. temp = "";
  601. }
  602. //cureplan = cureplan + temp + ", ";
  603. //cureplan = cureplan + temp;
  604. }
  605. //cureplan = cureplan.substr(0,cureplan.length-2);
  606. }
  607. var item1 = "[영양상태판정]" +"\n";
  608. var item2 = "1. 기본정보" +"\n";
  609. if ( bodysymp != "" ) {
  610. var item3 = " ο 신체증후 : " + bodysymp;
  611. if ( ipt_bodysymprem.value != "" ) {
  612. item3 = item3 + ", " + ipt_bodysymprem.value +"\n";
  613. } else {
  614. item3 = item3 + "\n";
  615. }
  616. } else {
  617. if ( ipt_bodysymprem.value != "" ) {
  618. var item3 = " ο 신체증후 : " + ipt_bodysymprem.value +"\n";
  619. } else {
  620. var item3 = "";
  621. }
  622. }
  623. if ( dietprob != "" ) {
  624. var item4 = " ο 식사시 문제점 : " + dietprob;
  625. if ( ipt_dietprobrem.value != "" ) {
  626. item4 = item4 + ", " + ipt_dietprobrem.value +"\n";
  627. } else {
  628. item4 = item4 + "\n";
  629. }
  630. } else {
  631. if ( ipt_dietprobrem.value != "" ) {
  632. var item4 = " ο 식사시 문제점 : " + ipt_dietprobrem.value +"\n";
  633. } else {
  634. var item4 = "";
  635. }
  636. }
  637. if ( ipt_intkstatmainmeal.value != "" || ipt_intkstatsubmeal.value != "" ) {
  638. var item5 = " ο 식사섭취상태 : 병원식(주식 " + ipt_intkstatmainmeal.value + "%, 부식 " + ipt_intkstatsubmeal.value + "%)";
  639. if ( ipt_intkstatetc.value != "" ) {
  640. item5 = item5 + " 기타 : " + ipt_intkstatetc.value;
  641. }
  642. item5 = item5 +"\n";
  643. } else {
  644. var item5 = "";
  645. }
  646. if ( item5 == "" && ipt_intkstatetc.value != "" ) {
  647. var item6 = " ο 식사섭취상태 : 기타 : " + ipt_intkstatetc.value +"\n";
  648. } else {
  649. var item6 = "";
  650. }
  651. var item19 = "";
  652. var tempData = chk_actgrde.value;
  653. var index19 = -1;
  654. if(tempData != "") {
  655. tempData = tempData.split("▦");
  656. }
  657. for(var n = 0; n < tempData.length; ++n) {
  658. if(tempData[n] != "5") {
  659. index19 = tempData[n] - 1;
  660. }
  661. }
  662. if(chk_actgrde.value != "" && index19 != -1) {
  663. item19 = " ο 활동정도 : " + chk_actgrde.item(index19).label + "\n";
  664. }
  665. var item7 = "\n" + "2. 신체계측 결과" +"\n";
  666. if ( ipt_physmeasbdht.value != "" || ipt_physmeasbdwt.value != "" || ipt_physmeasibw.value != "" || ipt_physmeasibwperc.value != "" ) {
  667. var item8 = " ο Ht : " + ipt_physmeasbdht.value + "cm, Wt : " + ipt_physmeasbdwt.value + "kg, IBW : " + ipt_physmeasibw.value + "kg, PIBW : " + ipt_physmeasibwperc.value + "%" + "\n";
  668. } else {
  669. var item8 = "";
  670. }
  671. if ( ipt_bdwtupdtqty.value != "" ) {
  672. var item9 = " ο Wt.change : " + ipt_bdwtupdtqty.value + "kg( " + ipt_bdwtupdtrate.value + " )% / " + ipt_bdwtupdtterm.value + "개월" + "\n";
  673. } else {
  674. var item9 = "";
  675. }
  676. var item10 = "\n" + "3. 검사 결과" +"\n";
  677. // if ( ipt_testrsltalb.value != "" || ipt_testrslttlc.value != "" || ipt_testrslthbhct.value != "" || ipt_testrslthbhct2.value != "" || ipt_testrslttrf.value != "" || tar_testrsltrem.value != "" ) {
  678. // var item10 = "\n" + "3. 검사 결과" +"\n";
  679. // } else {
  680. // var item10 = "\n";
  681. // }
  682. var item11 = "";
  683. if ( ipt_testrsltalb.value != "" || ipt_testrslttlc.value != "" || ipt_testrslthbhct.value != "" || ipt_testrslthbhct2.value != "" || ipt_testrslttrf.value != "" ) {
  684. if ( ipt_testrsltalb.value != "" ) {
  685. item11 = " ο Alb : " + ipt_testrsltalb.value;
  686. }
  687. if ( ipt_testrslttlc.value != "" && item11 == "" ) {
  688. item11 = " ο TLC : " + ipt_testrslttlc.value;
  689. } else if ( ipt_testrslttlc.value != "" && item11 != "" ) {
  690. item11 = item11 + ", TLC : " + ipt_testrslttlc.value;
  691. }
  692. if ( ipt_testrslthbhct.value != "" && ipt_testrslthbhct2.value != "" && item11 == "" ) {
  693. item11 = " ο Hb/Hct : " + ipt_testrslthbhct.value + " / " + ipt_testrslthbhct2.value;
  694. } else if ( ipt_testrslthbhct.value != "" && ipt_testrslthbhct2.value == "" && item11 == "" ) {
  695. item11 = " ο Hb : " + ipt_testrslthbhct.value;
  696. } else if ( ipt_testrslthbhct.value == "" && ipt_testrslthbhct2.value != "" && item11 == "" ) {
  697. item11 = " ο Hct : " + ipt_testrslthbhct2.value;
  698. } else if ( ipt_testrslthbhct.value != "" && ipt_testrslthbhct2.value != "" && item11 != "" ) {
  699. item11 = item11 + ", Hb/Hct : " + ipt_testrslthbhct.value + " / " + ipt_testrslthbhct2.value;
  700. } else if ( ipt_testrslthbhct.value != "" && ipt_testrslthbhct2.value == "" && item11 != "" ) {
  701. item11 = item11 + ", Hb : " + ipt_testrslthbhct.value;
  702. } else if ( ipt_testrslthbhct.value == "" && ipt_testrslthbhct2.value != "" && item11 != "" ) {
  703. item11 = item11 + ", Hct : " + ipt_testrslthbhct2.value;
  704. }
  705. if ( ipt_testrslttrf.value != "" && item11 == "" ) {
  706. item11 = " ο TRF : " + ipt_testrslttrf.value;
  707. } else if ( ipt_testrslttrf.value != "" && item11 != "" ) {
  708. item11 = item11 + ", TRF : " + ipt_testrslttrf.value;
  709. }
  710. item11 = item11 + "\n";
  711. }
  712. if ( item11 != "" && tar_testrsltrem.value != "" ) {
  713. var item12 = " 기타 : " + tar_testrsltrem.value +"\n";
  714. } else if ( item11 == "" && tar_testrsltrem.value != "" ) {
  715. var item12 = " ο 기타 : " + tar_testrsltrem.value +"\n";
  716. } else {
  717. var item12 = "";
  718. }
  719. var item13 = "\n" + "4. 영양상태" +"\n";
  720. if ( cmb_nutrstatvalu.label != "" ) {
  721. var item14 = " ο " + cmb_nutrstatvalu.label + "\n";
  722. } else {
  723. var item14 = "";
  724. }
  725. if ( item14 != "" && tar_nutrstatvalu.value != "" ) {
  726. var item15 = " 기타 : " + tar_nutrstatvalu.value +"\n";
  727. } else if ( item14 == "" && tar_nutrstatvalu.value != "" ) {
  728. var item15 = " ο 기타 : " + tar_nutrstatvalu.value +"\n";
  729. } else {
  730. var item15 = "";
  731. }
  732. //var item16 = "\n" + "5. 영양치료 계획/권장" +"\n";
  733. if ( cureplan != "" ) {
  734. var item16 = "\n" + "5. 영양치료 계획/권장" +"\n";
  735. //var item17 = " ο " + cureplan + "\n";
  736. var item17 = cureplan + "\n";
  737. } else {
  738. var item16 = "";
  739. var item17 = "";
  740. }
  741. if ( cmb_intndieter.label != "" ) {
  742. var item18 = "\n감사합니다. " + ipt_execdd.value.substr(0,4) + "/" + ipt_execdd.value.substr(4,2) + "/" +
  743. ipt_execdd.value.substr(6,2) + " 영양사 " + cmb_chrgdieter.label + "/ " + cmb_intndieter.label + "\n";
  744. } else {
  745. var item18 = "\n 감사합니다. " + ipt_execdd.value.substr(0,4) + "/" + ipt_execdd.value.substr(4,2) + "/" +
  746. ipt_execdd.value.substr(6,2) + " 영양사 " + cmb_chrgdieter.label + "\n";
  747. }
  748. review = item1 + item2 + item3 + item4 + item5 + item6 + item19 + item7 + item8 + item9 + item10 +
  749. item11 + item12 + item13 + item14 + item15 + item16 + item17 + item18;
  750. model.setValue("/root/main/maindata/cnstreq/review", review);
  751. model.setValue("/root/main/maindata/pursmngt/review", review);
  752. model.refresh();
  753. }
  754. //회신 탭버튼 클릭시 (1)
  755. //영양관리유형이 초기영양검색 or 협진입원(영양평가) or 협진입원(영양교육) or 협진외래(영양교육) 일 경우
  756. //영양상태판정 + 협진의뢰 탭의 내용을 조합하여 회신내용 생성
  757. function fReplCntsCnstreq() {
  758. var bodysymp = "";
  759. var dietprob = "";
  760. var cureplan = "";
  761. var temp = "";
  762. var replcnts = "";
  763. //신체증후의 체크된 항목들을 콤마로 연결
  764. for ( i = 0; i < chk_bodysymp.label.length; i++ ) {
  765. if ( chk_bodysymp.label.substr(i,2) == "기타" || chk_bodysymp.label.substr(i,3) == "▦기타" ) {
  766. break;
  767. } else {
  768. temp = temp + chk_bodysymp.label.substr(i,1);
  769. }
  770. }
  771. for ( i = 0; i < temp.length; i++ ) {
  772. if ( temp.substr(i,1) == "▦" ) {
  773. bodysymp = bodysymp + ", ";
  774. } else {
  775. bodysymp = bodysymp + temp.substr(i,1);
  776. }
  777. }
  778. //식사시 문제점의 체크된 항목들을 콤마로 연결
  779. temp = "";
  780. for ( i = 0; i < chk_dietprob.label.length; i++ ) {
  781. if ( chk_dietprob.label.substr(i,2) == "기타" || chk_dietprob.label.substr(i,3) == "▦기타" ) {
  782. break;
  783. } else {
  784. temp = temp + chk_dietprob.label.substr(i,1);
  785. }
  786. }
  787. for ( i = 0; i < temp.length; i++ ) {
  788. if ( temp.substr(i,1) == "▦" ) {
  789. dietprob = dietprob + ", ";
  790. } else {
  791. dietprob = dietprob + temp.substr(i,1);
  792. }
  793. }
  794. temp = "";
  795. //영양치료계획/권장 그리드의 항목들을 콤마로 연결
  796. if ( grd_nutrstatjudg.rows-1 > 0 ) {
  797. for ( i = 1; i <= grd_nutrstatjudg.rows-1; i++ ) {
  798. if (model.getValue("/root/main/maindata/cureplan/nutrstatjudg["+ i +"]/cureplancd") != "") {
  799. if (model.getValue("/root/main/maindata/cureplan/nutrstatjudg["+ i +"]/cureplancd") == "1") {
  800. temp = " ο 현재 식사 유지해 주십시오." +"\n";
  801. } else if (model.getValue("/root/main/maindata/cureplan/nutrstatjudg["+ i +"]/cureplancd") == "2") {
  802. temp = " ο 식사처방 변경 필요합니다." +"\n";
  803. } else if (model.getValue("/root/main/maindata/cureplan/nutrstatjudg["+ i +"]/cureplancd") == "3") {
  804. temp = " ο 영양교육 의뢰서 작성해 주십시오." +"\n";
  805. } else if (model.getValue("/root/main/maindata/cureplan/nutrstatjudg["+ i +"]/cureplancd") == "4") {
  806. temp = " ο 경장영양의뢰(EN)로 협진의뢰서 작성해 주십시오." +"\n";
  807. } else if (model.getValue("/root/main/maindata/cureplan/nutrstatjudg["+ i +"]/cureplancd") == "5") {
  808. temp = " ο F/U 예정입니다." +"\n";
  809. } else if (model.getValue("/root/main/maindata/cureplan/nutrstatjudg["+ i +"]/cureplancd") == "9") {
  810. temp = " ο 기타" +"\n";
  811. }
  812. cureplan = cureplan + temp + " " + model.getValue("/root/main/maindata/cureplan/nutrstatjudg["+ i +"]/cureplancnts") +"\n";
  813. temp = "";
  814. }
  815. //cureplan = cureplan + temp + ", ";
  816. //cureplan = cureplan + temp;
  817. }
  818. //cureplan = cureplan.substr(0,cureplan.length-2);
  819. }
  820. var item1 = "[영양상태판정]" +"\n";
  821. var item2 = "1. 기본정보" +"\n";
  822. if ( bodysymp != "" ) {
  823. var item3 = " ο 신체증후 : " + bodysymp;
  824. if ( ipt_bodysymprem.value != "" ) {
  825. item3 = item3 + ", " + ipt_bodysymprem.value +"\n";
  826. } else {
  827. item3 = item3 + "\n";
  828. }
  829. } else {
  830. if ( ipt_bodysymprem.value != "" ) {
  831. var item3 = " ο 신체증후 : " + ipt_bodysymprem.value +"\n";
  832. } else {
  833. var item3 = "";
  834. }
  835. }
  836. if ( dietprob != "" ) {
  837. var item4 = " ο 식사시 문제점 : " + dietprob;
  838. if ( ipt_dietprobrem.value != "" ) {
  839. item4 = item4 + ", " + ipt_dietprobrem.value +"\n";
  840. } else {
  841. item4 = item4 + "\n";
  842. }
  843. } else {
  844. if ( ipt_dietprobrem.value != "" ) {
  845. var item4 = " ο 식사시 문제점 : " + ipt_dietprobrem.value +"\n";
  846. } else {
  847. var item4 = "";
  848. }
  849. }
  850. if ( ipt_intkstatmainmeal.value != "" || ipt_intkstatsubmeal.value != "" ) {
  851. var item5 = " ο 식사섭취상태 : 병원식(주식 " + ipt_intkstatmainmeal.value + "%, 부식 " + ipt_intkstatsubmeal.value + "%)";
  852. if ( ipt_intkstatetc.value != "" ) {
  853. item5 = item5 + " 기타 : " + ipt_intkstatetc.value;
  854. }
  855. item5 = item5 +"\n";
  856. } else {
  857. var item5 = "";
  858. }
  859. if ( item5 == "" && ipt_intkstatetc.value != "" ) {
  860. var item6 = " ο 식사섭취상태 : 기타 : " + ipt_intkstatetc.value +"\n";
  861. } else {
  862. var item6 = "";
  863. }
  864. var item7 = "\n" + "2. 신체계측 결과" +"\n";
  865. if ( ipt_physmeasbdht.value != "" || ipt_physmeasbdwt.value != "" || ipt_physmeasibw.value != "" || ipt_physmeasibwperc.value != "" ) {
  866. var item8 = " ο Ht : " + ipt_physmeasbdht.value + "cm, Wt : " + ipt_physmeasbdwt.value + "kg, IBW : " + ipt_physmeasibw.value + "kg, PIBW : " + ipt_physmeasibwperc.value + "%" + "\n";
  867. } else {
  868. var item8 = "";
  869. }
  870. if ( ipt_bdwtupdtqty.value != "" ) {
  871. var item9 = " ο Wt.change : " + ipt_bdwtupdtqty.value + "kg( " + ipt_bdwtupdtrate.value + " )% / " + ipt_bdwtupdtterm.value + "개월" + "\n";
  872. } else {
  873. var item9 = "";
  874. }
  875. var item10 = "\n" + "3. 검사 결과" +"\n";
  876. var item11 = "";
  877. if ( ipt_testrsltalb.value != "" || ipt_testrslttlc.value != "" || ipt_testrslthbhct.value != "" || ipt_testrslthbhct2.value != "" || ipt_testrslttrf.value != "" ) {
  878. if ( ipt_testrsltalb.value != "" ) {
  879. item11 = " ο Alb : " + ipt_testrsltalb.value;
  880. }
  881. if ( ipt_testrslttlc.value != "" && item11 == "" ) {
  882. item11 = " ο TLC : " + ipt_testrslttlc.value;
  883. } else if ( ipt_testrslttlc.value != "" && item11 != "" ) {
  884. item11 = item11 + ", TLC : " + ipt_testrslttlc.value;
  885. }
  886. if ( ipt_testrslthbhct.value != "" && ipt_testrslthbhct2.value != "" && item11 == "" ) {
  887. item11 = " ο Hb/Hct : " + ipt_testrslthbhct.value + " / " + ipt_testrslthbhct2.value;
  888. } else if ( ipt_testrslthbhct.value != "" && ipt_testrslthbhct2.value == "" && item11 == "" ) {
  889. item11 = " ο Hb : " + ipt_testrslthbhct.value;
  890. } else if ( ipt_testrslthbhct.value == "" && ipt_testrslthbhct2.value != "" && item11 == "" ) {
  891. item11 = " ο Hct : " + ipt_testrslthbhct2.value;
  892. } else if ( ipt_testrslthbhct.value != "" && ipt_testrslthbhct2.value != "" && item11 != "" ) {
  893. item11 = item11 + ", Hb/Hct : " + ipt_testrslthbhct.value + " / " + ipt_testrslthbhct2.value;
  894. } else if ( ipt_testrslthbhct.value != "" && ipt_testrslthbhct2.value == "" && item11 != "" ) {
  895. item11 = item11 + ", Hb : " + ipt_testrslthbhct.value;
  896. } else if ( ipt_testrslthbhct.value == "" && ipt_testrslthbhct2.value != "" && item11 != "" ) {
  897. item11 = item11 + ", Hct : " + ipt_testrslthbhct2.value;
  898. }
  899. if ( ipt_testrslttrf.value != "" && item11 == "" ) {
  900. item11 = " ο TRF : " + ipt_testrslttrf.value;
  901. } else if ( ipt_testrslttrf.value != "" && item11 != "" ) {
  902. item11 = item11 + ", TRF : " + ipt_testrslttrf.value;
  903. }
  904. item11 = item11 + "\n";
  905. }
  906. if ( item11 != "" && tar_testrsltrem.value != "" ) {
  907. var item12 = " 기타 : " + tar_testrsltrem.value +"\n";
  908. } else if ( item11 == "" && tar_testrsltrem.value != "" ) {
  909. var item12 = " ο 기타 : " + tar_testrsltrem.value +"\n";
  910. } else {
  911. var item12 = "";
  912. }
  913. var item13 = "\n" + "4. 영양상태" +"\n";
  914. if ( cmb_nutrstatvalu.label != "" ) {
  915. var item14 = " ο " + cmb_nutrstatvalu.label + "\n";
  916. } else {
  917. var item14 = "";
  918. }
  919. if ( item14 != "" && tar_nutrstatvalu.value != "" ) {
  920. var item15 = " 기타 : " + tar_nutrstatvalu.value +"\n";
  921. } else if ( item14 == "" && tar_nutrstatvalu.value != "" ) {
  922. var item15 = " ο 기타 : " + tar_nutrstatvalu.value +"\n";
  923. } else {
  924. var item15 = "";
  925. }
  926. var calrintk = model.getValue("/root/main/maindata/cnstreq/calrintk1");
  927. var calrintkqty = model.getValue("/root/main/maindata/cnstreq/calrintkqty1");
  928. var protintk = model.getValue("/root/main/maindata/cnstreq/protintk1");
  929. var protintkqty = model.getValue("/root/main/maindata/cnstreq/protintkqty1");
  930. var intkqtyetc = model.getValue("/root/main/maindata/cnstreq/intkqtyetc1");
  931. if ( calrintkqty != "" || protintkqty != "" || intkqtyetc != "" ) {
  932. var item16 = "\n" + " ο 섭취량 분석 및 평가";
  933. if ( calrintkqty != "" ) {
  934. item16 = item16 + "\n" + " 열량 : " + calrintkqty + " kcal/day";
  935. if ( calrintk != "" ) {
  936. if (calrintk == '1') { calrintk = '상당히 부족';
  937. } else if (calrintk == '2') { calrintk = '약간 부족';
  938. } else if (calrintk == '3') { calrintk = '양호';
  939. } else if (calrintk == '4') { calrintk = '과다';
  940. }
  941. item16 = item16 + " (" + calrintk + ")";
  942. }
  943. }
  944. if ( protintkqty != "" ) {
  945. item16 = item16 + "\n" + " 단백질 : " + protintkqty + " g/day";
  946. if ( protintk != "" ) {
  947. if (protintk == '1') { protintk = '상당히 부족';
  948. } else if (protintk == '2') { protintk = '약간 부족';
  949. } else if (protintk == '3') { protintk = '양호';
  950. } else if (protintk == '4') { protintk = '과다';
  951. }
  952. item16 = item16 + " (" + protintk + ")";
  953. }
  954. }
  955. if ( intkqtyetc != "" ) {
  956. item16 = item16 + "\n" + " " + intkqtyetc;
  957. }
  958. } else {
  959. var item16 = "";
  960. }
  961. if ( item16 != "" ) {
  962. var item17 = "\n" + "\n" + "5. 영양요구량" +"\n";
  963. } else {
  964. var item17 = "\n" + "5. 영양요구량" +"\n";
  965. }
  966. if ( opt_calr.value != "" ) {
  967. if ( rdo_calrflag.label == "계수법" ) {
  968. var item18 = " * 열량 : " + opt_calr.value + " kcal/day ( " + rdo_stndbdwtflag.label + " * " + ipt_adoptlawcalr.value + " kcal/kg )" + "\n";
  969. } else if ( rdo_calrflag.label == "HB" ) {
  970. var item18 = " * 열량 : " + opt_calr.value + " kcal/day ( BEE : " + opt_calrhb.value + ", AF : " + ipt_hbcalr1.value + ", SF : " + ipt_hbcalr2.value + " )" + "\n";
  971. }
  972. } else {
  973. var item18 = "";
  974. }
  975. if ( opt_protqty.value != "" ) {
  976. var item19 = " * 단백질 : " + opt_protqty.value + " g/day ( " + rdo_stndbdwtflag.label + " * " + ipt_protqty.value + " g/kg )" + "\n";
  977. } else {
  978. var item19 = "";
  979. }
  980. if ( tar_nutrreqqty.value != "" ) {
  981. var item20 = " * 기타 : " + tar_nutrreqqty.value +"\n";
  982. } else {
  983. var item20 = "";
  984. }
  985. var globalData = getGlobalVariable("ANC00350eventtarget", "A");
  986. var target = model.getValue("/root/temp/griddata/gridid"); // 이벤트가 발생한 그리드
  987. var targetRow = model.getValue("/root/temp/griddata/gridrow"); // 이벤트가 발생한 그리드 row 값
  988. var item21 = "\n" + "6. 영양치료 계획/권장" +"\n";
  989. var item22 = "";
  990. var carePlanData = "";
  991. if ( cureplan != "" ) {
  992. // 영양관리이력 데이터 세팅
  993. if(target == "grd_nutrmngthist") {
  994. carePlanData = model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/problemcareplan");
  995. }
  996. // 영양검색결과이력 데이터 세팅
  997. else if(target == "grd_nutrsrchrslthist") {
  998. carePlanData = model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/problemcareplan");
  999. }
  1000. // 초기 입력 데이터 세팅
  1001. else {
  1002. carePlanData = model.getValue("/root/temp/senddata/problemcareplan");
  1003. }
  1004. if(carePlanData != "") {
  1005. item22 = " ο Problem : Plan" + "\n";
  1006. // 로우 데이터 별로 나누기
  1007. carePlanData = carePlanData.split("§");
  1008. for(var i = 1; i <= carePlanData.length; ++i) {
  1009. var problemPlanData = carePlanData[i-1].split("▦");
  1010. item22 = item22 + " " + problemPlanData[0] + " : " + problemPlanData[1] + "\n";
  1011. }
  1012. item22 = item22 + cureplan;
  1013. } else {
  1014. item22 = cureplan;
  1015. }
  1016. } else {
  1017. item21 = "";
  1018. item22 = "";
  1019. carePlanData = "";
  1020. // 영양관리이력 데이터 세팅
  1021. if(target == "grd_nutrmngthist") {
  1022. carePlanData = model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/problemcareplan");
  1023. }
  1024. // 영양검색결과이력 데이터 세팅
  1025. else if(target == "grd_nutrsrchrslthist") {
  1026. carePlanData = model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/problemcareplan");
  1027. }
  1028. // 초기 입력 데이터 세팅
  1029. else {
  1030. carePlanData = model.getValue("/root/temp/senddata/problemcareplan");
  1031. }
  1032. if(carePlanData != "") {
  1033. item21 = "\n" + "6. 영양치료 계획/권장" +"\n";
  1034. item22 = item22 + " ο Problem : Plan" + "\n";
  1035. // 로우 데이터 별로 나누기
  1036. carePlanData = carePlanData.split("§");
  1037. for(var i = 1; i <= carePlanData.length; ++i) {
  1038. var problemPlanData = carePlanData[i-1].split("▦");
  1039. item22 = item22 + " " + problemPlanData[0] + " : " + problemPlanData[1] + "\n";
  1040. }
  1041. }
  1042. }
  1043. /* if ( model.getValue("/root/send/searchitem/intndieternm") != "" ) {
  1044. var item23 = "\n " + ipt_execdd.value.substr(0,4) + "/" + ipt_execdd.value.substr(4,2) + "/" +
  1045. ipt_execdd.value.substr(6,2) + " 영양사 " + model.getValue("/root/send/searchitem/chrgdieternm") + "/ " + model.getValue("/root/send/searchitem/intndieternm") + "\n";
  1046. } else {
  1047. var item23 = "\n " + ipt_execdd.value.substr(0,4) + "/" + ipt_execdd.value.substr(4,2) + "/" +
  1048. ipt_execdd.value.substr(6,2) + " 영양사 " + model.getValue("/root/send/searchitem/chrgdieternm")+ "\n";
  1049. }*/
  1050. if ( cmb_intndieter.label != "" ) {
  1051. var item23 = "\n 감사합니다. " + ipt_execdd.value.substr(0,4) + "/" + ipt_execdd.value.substr(4,2) + "/" +
  1052. ipt_execdd.value.substr(6,2) + " 영양사 " + cmb_chrgdieter.label + "/ " + cmb_intndieter.label + "\n";
  1053. } else {
  1054. var item23 = "\n 감사합니다. " + ipt_execdd.value.substr(0,4) + "/" + ipt_execdd.value.substr(4,2) + "/" +
  1055. ipt_execdd.value.substr(6,2) + " 영양사 " + cmb_chrgdieter.label + "\n";
  1056. }
  1057. replcnts = item1 + item2 + item3 + item4 + item5 + item6 + item7 + item8 + item9 + item10 + item11 + item12 +
  1058. item13 + item14 + item15 + item16 + item17 + item18 + item19 + item20 + item21 + item22 + item23;
  1059. model.setValue("/root/main/maindata/nutrstatjudg/replcnts", replcnts);
  1060. model.refresh();
  1061. }
  1062. //회신 탭버튼 클릭시 (2)
  1063. //영양관리유형이 일반추구관리 or 협진추구관리 일 경우
  1064. //영양상태판정 + 추구관리 탭의 내용을 조합하여 회신내용 생성
  1065. function fReplCntsPursmngt() {
  1066. var bodysymp = "";
  1067. var dietprob = "";
  1068. var cureplan = "";
  1069. var temp = "";
  1070. var replcnts = "";
  1071. //신체증후의 체크된 항목들을 콤마로 연결
  1072. for ( i = 0; i < chk_bodysymp.label.length; i++ ) {
  1073. if ( chk_bodysymp.label.substr(i,2) == "기타" || chk_bodysymp.label.substr(i,3) == "▦기타" ) {
  1074. break;
  1075. } else {
  1076. temp = temp + chk_bodysymp.label.substr(i,1);
  1077. }
  1078. }
  1079. for ( i = 0; i < temp.length; i++ ) {
  1080. if ( temp.substr(i,1) == "▦" ) {
  1081. bodysymp = bodysymp + ", ";
  1082. } else {
  1083. bodysymp = bodysymp + temp.substr(i,1);
  1084. }
  1085. }
  1086. //식사시 문제점의 체크된 항목들을 콤마로 연결
  1087. temp = "";
  1088. for ( i = 0; i < chk_dietprob.label.length; i++ ) {
  1089. if ( chk_dietprob.label.substr(i,2) == "기타" || chk_dietprob.label.substr(i,3) == "▦기타" ) {
  1090. break;
  1091. } else {
  1092. temp = temp + chk_dietprob.label.substr(i,1);
  1093. }
  1094. }
  1095. for ( i = 0; i < temp.length; i++ ) {
  1096. if ( temp.substr(i,1) == "▦" ) {
  1097. dietprob = dietprob + ", ";
  1098. } else {
  1099. dietprob = dietprob + temp.substr(i,1);
  1100. }
  1101. }
  1102. temp = "";
  1103. //영양치료계획/권장 그리드의 항목들을 콤마로 연결
  1104. if ( grd_nutrstatjudg.rows-1 > 0 ) {
  1105. for ( i = 1; i <= grd_nutrstatjudg.rows-1; i++ ) {
  1106. if (model.getValue("/root/main/maindata/cureplan/nutrstatjudg["+ i +"]/cureplancd") != "") {
  1107. if (model.getValue("/root/main/maindata/cureplan/nutrstatjudg["+ i +"]/cureplancd") == "1") {
  1108. temp = " ο 현재 식사 유지해 주십시오." +"\n";
  1109. } else if (model.getValue("/root/main/maindata/cureplan/nutrstatjudg["+ i +"]/cureplancd") == "2") {
  1110. temp = " ο 식사처방 변경 필요합니다." +"\n";
  1111. } else if (model.getValue("/root/main/maindata/cureplan/nutrstatjudg["+ i +"]/cureplancd") == "3") {
  1112. temp = " ο 영양교육 의뢰서 작성해 주십시오." +"\n";
  1113. } else if (model.getValue("/root/main/maindata/cureplan/nutrstatjudg["+ i +"]/cureplancd") == "4") {
  1114. temp = " ο 경장영양의뢰(EN)로 협진의뢰서 작성해 주십시오." +"\n";
  1115. } else if (model.getValue("/root/main/maindata/cureplan/nutrstatjudg["+ i +"]/cureplancd") == "5") {
  1116. temp = " ο F/U 예정입니다." +"\n";
  1117. } else if (model.getValue("/root/main/maindata/cureplan/nutrstatjudg["+ i +"]/cureplancd") == "9") {
  1118. temp = " ο 기타" +"\n";
  1119. }
  1120. cureplan = cureplan + temp + " " + model.getValue("/root/main/maindata/cureplan/nutrstatjudg["+ i +"]/cureplancnts") +"\n";
  1121. temp = "";
  1122. }
  1123. }
  1124. }
  1125. var item1 = "[영양상태판정]" +"\n";
  1126. var item2 = "1. 기본정보" +"\n";
  1127. if ( bodysymp != "" ) {
  1128. var item3 = " ο 신체증후 : " + bodysymp;
  1129. if ( ipt_bodysymprem.value != "" ) {
  1130. item3 = item3 + ", " + ipt_bodysymprem.value +"\n";
  1131. } else {
  1132. item3 = item3 + "\n";
  1133. }
  1134. } else {
  1135. if ( ipt_bodysymprem.value != "" ) {
  1136. var item3 = " ο 신체증후 : " + ipt_bodysymprem.value +"\n";
  1137. } else {
  1138. var item3 = "";
  1139. }
  1140. }
  1141. if ( dietprob != "" ) {
  1142. var item4 = " ο 식사시 문제점 : " + dietprob;
  1143. if ( ipt_dietprobrem.value != "" ) {
  1144. item4 = item4 + ", " + ipt_dietprobrem.value +"\n";
  1145. } else {
  1146. item4 = item4 + "\n";
  1147. }
  1148. } else {
  1149. if ( ipt_dietprobrem.value != "" ) {
  1150. var item4 = " ο 식사시 문제점 : " + ipt_dietprobrem.value +"\n";
  1151. } else {
  1152. var item4 = "";
  1153. }
  1154. }
  1155. if ( ipt_intkstatmainmeal.value != "" || ipt_intkstatsubmeal.value != "" ) {
  1156. var item5 = " ο 식사섭취상태 : 병원식(주식 " + ipt_intkstatmainmeal.value + "%, 부식 " + ipt_intkstatsubmeal.value + "%)";
  1157. if ( ipt_intkstatetc.value != "" ) {
  1158. item5 = item5 + " 기타 : " + ipt_intkstatetc.value;
  1159. }
  1160. item5 = item5 +"\n";
  1161. } else {
  1162. var item5 = "";
  1163. }
  1164. if ( item5 == "" && ipt_intkstatetc.value != "" ) {
  1165. var item6 = " ο 식사섭취상태 : 기타 : " + ipt_intkstatetc.value +"\n";
  1166. } else {
  1167. var item6 = "";
  1168. }
  1169. var item7 = "\n" + "2. 신체계측 결과" +"\n";
  1170. if ( ipt_physmeasbdht.value != "" || ipt_physmeasbdwt.value != "" || ipt_physmeasibw.value != "" || ipt_physmeasibwperc.value != "" ) {
  1171. var item8 = " ο Ht : " + ipt_physmeasbdht.value + "cm, Wt : " + ipt_physmeasbdwt.value + "kg, IBW : " + ipt_physmeasibw.value + "kg, PIBW : " + ipt_physmeasibwperc.value + "%" + "\n";
  1172. } else {
  1173. var item8 = "";
  1174. }
  1175. if ( ipt_bdwtupdtqty.value != "" ) {
  1176. var item9 = " ο Wt.change : " + ipt_bdwtupdtqty.value + "kg( " + ipt_bdwtupdtrate.value + " )% / " + ipt_bdwtupdtterm.value + "개월" + "\n";
  1177. } else {
  1178. var item9 = "";
  1179. }
  1180. var item10 = "\n" + "3. 검사 결과" +"\n";
  1181. var item11 = "";
  1182. if ( ipt_testrsltalb.value != "" || ipt_testrslttlc.value != "" || ipt_testrslthbhct.value != "" || ipt_testrslthbhct2.value != "" || ipt_testrslttrf.value != "" ) {
  1183. if ( ipt_testrsltalb.value != "" ) {
  1184. item11 = " ο Alb : " + ipt_testrsltalb.value;
  1185. }
  1186. if ( ipt_testrslttlc.value != "" && item11 == "" ) {
  1187. item11 = " ο TLC : " + ipt_testrslttlc.value;
  1188. } else if ( ipt_testrslttlc.value != "" && item11 != "" ) {
  1189. item11 = item11 + ", TLC : " + ipt_testrslttlc.value;
  1190. }
  1191. if ( ipt_testrslthbhct.value != "" && ipt_testrslthbhct2.value != "" && item11 == "" ) {
  1192. item11 = " ο Hb/Hct : " + ipt_testrslthbhct.value + " / " + ipt_testrslthbhct2.value;
  1193. } else if ( ipt_testrslthbhct.value != "" && ipt_testrslthbhct2.value == "" && item11 == "" ) {
  1194. item11 = " ο Hb : " + ipt_testrslthbhct.value;
  1195. } else if ( ipt_testrslthbhct.value == "" && ipt_testrslthbhct2.value != "" && item11 == "" ) {
  1196. item11 = " ο Hct : " + ipt_testrslthbhct2.value;
  1197. } else if ( ipt_testrslthbhct.value != "" && ipt_testrslthbhct2.value != "" && item11 != "" ) {
  1198. item11 = item11 + ", Hb/Hct : " + ipt_testrslthbhct.value + " / " + ipt_testrslthbhct2.value;
  1199. } else if ( ipt_testrslthbhct.value != "" && ipt_testrslthbhct2.value == "" && item11 != "" ) {
  1200. item11 = item11 + ", Hb : " + ipt_testrslthbhct.value;
  1201. } else if ( ipt_testrslthbhct.value == "" && ipt_testrslthbhct2.value != "" && item11 != "" ) {
  1202. item11 = item11 + ", Hct : " + ipt_testrslthbhct2.value;
  1203. }
  1204. if ( ipt_testrslttrf.value != "" && item11 == "" ) {
  1205. item11 = " ο TRF : " + ipt_testrslttrf.value;
  1206. } else if ( ipt_testrslttrf.value != "" && item11 != "" ) {
  1207. item11 = item11 + ", TRF : " + ipt_testrslttrf.value;
  1208. }
  1209. item11 = item11 + "\n";
  1210. }
  1211. if ( item11 != "" && tar_testrsltrem.value != "" ) {
  1212. var item12 = " 기타 : " + tar_testrsltrem.value +"\n";
  1213. } else if ( item11 == "" && tar_testrsltrem.value != "" ) {
  1214. var item12 = " ο 기타 : " + tar_testrsltrem.value +"\n";
  1215. } else {
  1216. var item12 = "";
  1217. }
  1218. var item13 = "\n" + "4. 영양상태" +"\n";
  1219. if ( cmb_nutrstatvalu.label != "" ) {
  1220. var item14 = " ο " + cmb_nutrstatvalu.label + "\n";
  1221. } else {
  1222. var item14 = "";
  1223. }
  1224. if ( item14 != "" && tar_nutrstatvalu.value != "" ) {
  1225. var item15 = " 기타 : " + tar_nutrstatvalu.value +"\n";
  1226. } else if ( item14 == "" && tar_nutrstatvalu.value != "" ) {
  1227. var item15 = " ο 기타 : " + tar_nutrstatvalu.value +"\n";
  1228. } else {
  1229. var item15 = "";
  1230. }
  1231. var calrintk = model.getValue("/root/main/maindata/pursmngt/calrintk2");
  1232. var calrintkqty = model.getValue("/root/main/maindata/pursmngt/calrintkqty2");
  1233. var protintk = model.getValue("/root/main/maindata/pursmngt/protintk2");
  1234. var protintkqty = model.getValue("/root/main/maindata/pursmngt/protintkqty2");
  1235. var intkqtyetc = model.getValue("/root/main/maindata/pursmngt/intkqtyetc2");
  1236. if ( calrintkqty != "" || protintkqty != "" || intkqtyetc != "" ) {
  1237. var item16 = "\n" + " ο 섭취량 분석 및 평가";
  1238. if ( calrintkqty != "" ) {
  1239. item16 = item16 + "\n" + " 열량 : " + calrintkqty + " kcal/day";
  1240. if ( calrintk != "" ) {
  1241. if (calrintk == '1') { calrintk = '상당히 부족';
  1242. } else if (calrintk == '2') { calrintk = '약간 부족';
  1243. } else if (calrintk == '3') { calrintk = '양호';
  1244. } else if (calrintk == '4') { calrintk = '과다';
  1245. }
  1246. item16 = item16 + " (" + calrintk + ")";
  1247. }
  1248. }
  1249. if ( protintkqty != "" ) {
  1250. item16 = item16 + "\n" + " 단백질 : " + protintkqty + " g/day";
  1251. if ( protintk != "" ) {
  1252. if (protintk == '1') { protintk = '상당히 부족';
  1253. } else if (protintk == '2') { protintk = '약간 부족';
  1254. } else if (protintk == '3') { protintk = '양호';
  1255. } else if (protintk == '4') { protintk = '과다';
  1256. }
  1257. item16 = item16 + " (" + protintk + ")";
  1258. }
  1259. }
  1260. if ( intkqtyetc != "" ) {
  1261. item16 = item16 + "\n" + " " + intkqtyetc;
  1262. }
  1263. } else {
  1264. var item16 = "";
  1265. }
  1266. if ( item16 != "" ) {
  1267. var item17 = "\n" + "\n" + "5. 영양요구량" +"\n";
  1268. } else {
  1269. var item17 = "\n" + "5. 영양요구량" +"\n";
  1270. }
  1271. if ( opt_calr2.value != "" ) {
  1272. if ( rdo_calrflag2.label == "계수법" ) {
  1273. var item18 = " * 열량 : " + opt_calr2.value + " kcal/day ( " + rdo_stndbdwtflag2.label + " * " + ipt_adoptlawcalr2.value + " kcal/kg )" + "\n";
  1274. } else if ( rdo_calrflag2.label == "HB" ) {
  1275. var item18 = " * 열량 : " + opt_calr2.value + " kcal/day ( BEE : " + opt_calrhb2.value + ", AF : " + ipt_hbcalr12.value + ", SF : " + ipt_hbcalr22.value + " )" + "\n";
  1276. }
  1277. } else {
  1278. var item18 = "";
  1279. }
  1280. if ( opt_protqty2.value != "" ) {
  1281. var item19 = " * 단백질 : " + opt_protqty2.value + " g/day ( " + rdo_stndbdwtflag2.label + " * " + ipt_protqty2.value + " g/kg )" + "\n";
  1282. } else {
  1283. var item19 = "";
  1284. }
  1285. if ( tar_nutrreqqty2.value != "" ) {
  1286. var item20 = " * 기타 : " + tar_nutrreqqty2.value +"\n";
  1287. } else {
  1288. var item20 = "";
  1289. }
  1290. var globalData = getGlobalVariable("ANC00350eventtarget", "A"); // 이벤트가 발생한 그리드
  1291. var target = model.getValue("/root/temp/griddata/gridid"); // 이벤트가 발생한 그리드
  1292. var targetRow = model.getValue("/root/temp/griddata/gridrow"); // 이벤트가 발생한 그리드 row 값
  1293. var item21 = "\n" + "6. 영양치료 계획/권장" +"\n";
  1294. var item22 = "";
  1295. var carePlanData = "";
  1296. if ( cureplan != "" ) {
  1297. // 영양관리이력 데이터 세팅
  1298. if(target == "grd_nutrmngthist") {
  1299. carePlanData = model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/problemcareplan");
  1300. }
  1301. // 영양검색결과이력 데이터 세팅
  1302. else if(target == "grd_nutrsrchrslthist") {
  1303. carePlanData = model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/problemcareplan");
  1304. }
  1305. // 초기 입력 데이터 세팅
  1306. else {
  1307. carePlanData = model.getValue("/root/temp/senddata/problemcareplan");
  1308. }
  1309. if(carePlanData != "") {
  1310. item22 = item22 + " ο Problem : Plan" + "\n";
  1311. // 로우 데이터 별로 나누기
  1312. carePlanData = carePlanData.split("§");
  1313. for(var i = 1; i <= carePlanData.length; ++i) {
  1314. var problemPlanData = carePlanData[i-1].split("▦");
  1315. item22 = item22 + " " + problemPlanData[0] + " : " + problemPlanData[1] + "\n";
  1316. }
  1317. item22 = item22 + cureplan;
  1318. } else {
  1319. item22 = cureplan;
  1320. }
  1321. } else {
  1322. item21 = "";
  1323. item22 = "";
  1324. carePlanData = "";
  1325. // 영양관리이력 데이터 세팅
  1326. if(target == "grd_nutrmngthist") {
  1327. carePlanData = model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/problemcareplan");
  1328. }
  1329. // 영양검색결과이력 데이터 세팅
  1330. else if(target == "grd_nutrsrchrslthist") {
  1331. carePlanData = model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/problemcareplan");
  1332. }
  1333. // 초기 입력 데이터 세팅
  1334. else {
  1335. carePlanData = model.getValue("/root/temp/senddata/problemcareplan");
  1336. }
  1337. if(carePlanData != "") {
  1338. item21 = "\n" + "6. 영양치료 계획/권장" +"\n";
  1339. item22 = item22 + " ο Problem : Plan" + "\n";
  1340. // 로우 데이터 별로 나누기
  1341. carePlanData = carePlanData.split("§");
  1342. for(var i = 1; i <= carePlanData.length; ++i) {
  1343. var problemPlanData = carePlanData[i-1].split("▦");
  1344. item22 = item22 + " " + problemPlanData[0] + " : " + problemPlanData[1] + "\n";
  1345. }
  1346. }
  1347. }
  1348. /* if ( model.getValue("/root/send/searchitem/intndieternm") != "" ) {
  1349. var item23 = "\n " + ipt_execdd.value.substr(0,4) + "/" + ipt_execdd.value.substr(4,2) + "/" +
  1350. ipt_execdd.value.substr(6,2) + " 영양사 " + model.getValue("/root/send/searchitem/chrgdieternm") + "/ " + model.getValue("/root/send/searchitem/intndieternm") + "\n";
  1351. } else {
  1352. var item23 = "\n " + ipt_execdd.value.substr(0,4) + "/" + ipt_execdd.value.substr(4,2) + "/" +
  1353. ipt_execdd.value.substr(6,2) + " 영양사 " + model.getValue("/root/send/searchitem/chrgdieternm") + "\n";
  1354. }*/
  1355. if ( cmb_intndieter.label != "" ) {
  1356. var item23= "\n 감사합니다. " + ipt_execdd.value.substr(0,4) + "/" + ipt_execdd.value.substr(4,2) + "/" +
  1357. ipt_execdd.value.substr(6,2) + " 영양사 " + cmb_chrgdieter.label + "/ " + cmb_intndieter.label + "\n";
  1358. } else {
  1359. var item23 = "\n 감사합니다. " + ipt_execdd.value.substr(0,4) + "/" + ipt_execdd.value.substr(4,2) + "/" +
  1360. ipt_execdd.value.substr(6,2) + " 영양사 " + cmb_chrgdieter.label + "\n";
  1361. }
  1362. replcnts = item1 + item2 + item3 + item4 + item5 + item6 + item7 + item8 + item9 + item10 + item11 + item12 +
  1363. item13 + item14 + item15 + item16 + item17 + item18 + item19 + item20 + item21 + item22 + item23;
  1364. model.setValue("/root/main/maindata/nutrstatjudg/replcnts", replcnts);
  1365. model.refresh();
  1366. }
  1367. // SOAP 버튼 클릭시 (1)
  1368. //영양관리유형이 초기영양검색 or 협진입원(영양평가) or 협진입원(영양교육) or 협진외래(영양교육) 일 경우
  1369. //영양상태판정 + 협진의뢰 탭의 내용을 조합하여 회신내용 생성
  1370. function fSoapReplCntsCnstreq() {
  1371. var bodysymp = "";
  1372. var dietprob = "";
  1373. var diethist = "";
  1374. var actgrde = "";
  1375. var cnstpsn = "";
  1376. var cureplan = "";
  1377. var temp = "";
  1378. var replcnts = "";
  1379. //신체증후의 체크된 항목들을 콤마로 연결
  1380. for ( i = 0; i < chk_bodysymp.label.length; i++ ) {
  1381. if ( chk_bodysymp.label.substr(i,2) == "기타" || chk_bodysymp.label.substr(i,3) == "▦기타" ) {
  1382. break;
  1383. } else {
  1384. temp = temp + chk_bodysymp.label.substr(i,1);
  1385. }
  1386. }
  1387. for ( i = 0; i < temp.length; i++ ) {
  1388. if ( temp.substr(i,1) == "▦" ) {
  1389. bodysymp = bodysymp + ", ";
  1390. } else {
  1391. bodysymp = bodysymp + temp.substr(i,1);
  1392. }
  1393. }
  1394. //식사시 문제점의 체크된 항목들을 콤마로 연결
  1395. temp = "";
  1396. for ( i = 0; i < chk_dietprob.label.length; i++ ) {
  1397. if ( chk_dietprob.label.substr(i,2) == "기타" || chk_dietprob.label.substr(i,3) == "▦기타" ) {
  1398. break;
  1399. } else {
  1400. temp = temp + chk_dietprob.label.substr(i,1);
  1401. }
  1402. }
  1403. for ( i = 0; i < temp.length; i++ ) {
  1404. if ( temp.substr(i,1) == "▦" ) {
  1405. dietprob = dietprob + ", ";
  1406. } else {
  1407. dietprob = dietprob + temp.substr(i,1);
  1408. }
  1409. }
  1410. //식사력의 체크된 항목들을 콤마로 연결
  1411. temp = chk_diethist.value;
  1412. for ( i = 0; i < temp.length; i++ ) {
  1413. if ( temp.substr(i,2) == "11" ) {
  1414. diethist = diethist + "균형된 식사";
  1415. } else if ( temp.substr(i,2) == "12" ) {
  1416. diethist = diethist + "규칙적인 식사";
  1417. } else if ( temp.substr(i,2) == "13" ) {
  1418. diethist = diethist + "불규칙적인 식사";
  1419. } else if ( temp.substr(i,2) == "14" ) {
  1420. diethist = diethist + "빠른식사속도";
  1421. } else if ( temp.substr(i,2) == "15" ) {
  1422. diethist = diethist + "과식";
  1423. } else if ( temp.substr(i,2) == "16" ) {
  1424. diethist = diethist + "당질과다섭취";
  1425. } else if ( temp.substr(i,2) == "17" ) {
  1426. diethist = diethist + "지방과다섭취";
  1427. } else if ( temp.substr(i,2) == "18" ) {
  1428. diethist = diethist + "염분과다섭취";
  1429. } else if ( (temp.substr(i,2) == "19") && (ipt_healsuppfood.value != "") ) {
  1430. diethist = diethist + "건강보조식품 " + ipt_healsuppfood.value;
  1431. } else if ( (temp.substr(i,2) == "20") && (ipt_cofftims.value != "") ) {
  1432. diethist = diethist + "커피 " + ipt_cofftims.value + "잔/day";
  1433. } else if ( (temp.substr(i,2) == "21") && (ipt_smoktims.value != "") ) {
  1434. diethist = diethist + "흡연 " + ipt_smoktims.value + "pack/day";
  1435. } else if ( (temp.substr(i,2) == "22") && (ipt_eatouttims.value != "") ) {
  1436. diethist = diethist + "외식 " + ipt_eatouttims.value + "회/week";
  1437. if (ipt_eatoutrem.value != "") {
  1438. diethist = diethist + ipt_eatoutrem.value;
  1439. }
  1440. } else if ( (temp.substr(i,2) == "23") && (ipt_drunktims.value != "") ) {
  1441. diethist = diethist + "음주 " + ipt_drunktims.value + "회/week";
  1442. if (ipt_drunkvol.value != "") {
  1443. diethist = diethist + "(1회 섭취량 " + ipt_drunkvol.value + ")";
  1444. }
  1445. if (ipt_drunkrem.value != "") {
  1446. diethist = diethist + ipt_drunkrem.value;
  1447. }
  1448. } else if ( temp.substr(i,1) == "▦" ) {
  1449. diethist = diethist + ", ";
  1450. }
  1451. }
  1452. if ( diethist.substr(0,2) == ", " ) {
  1453. diethist = diethist.substr(2,diethist.length-2);
  1454. }
  1455. if ( diethist.substr(diethist.length-2,2) == ", " ) {
  1456. diethist = diethist.substr(0,diethist.length-2);
  1457. }
  1458. //활동정도의 체크된 항목들을 콤마로 연결
  1459. temp = "";
  1460. for ( i = 0; i < chk_actgrde.label.length; i++ ) {
  1461. if ( chk_actgrde.label.substr(i,2) == "운동" || chk_actgrde.label.substr(i,3) == "▦운동" ) {
  1462. break;
  1463. } else {
  1464. temp = temp + chk_actgrde.label.substr(i,1);
  1465. }
  1466. }
  1467. for ( i = 0; i < temp.length; i++ ) {
  1468. if ( temp.substr(i,1) == "▦" ) {
  1469. actgrde = actgrde + ", ";
  1470. } else {
  1471. actgrde = actgrde + temp.substr(i,1);
  1472. }
  1473. }
  1474. //피상담자의 체크된 항목들을 콤마로 연결
  1475. temp = chk_cnstpsn.label;
  1476. for ( i = 0; i < temp.length; i++ ) {
  1477. if ( temp.substr(i,1) == "▦" ) {
  1478. cnstpsn = cnstpsn + ", ";
  1479. } else {
  1480. cnstpsn = cnstpsn + temp.substr(i,1);
  1481. }
  1482. }
  1483. //영양치료계획/권장 그리드의 항목들을 콤마로 연결
  1484. if ( grd_cnstreq.rows-1 > 0 ) {
  1485. for ( i = 1; i <= grd_cnstreq.rows-1; i++ ) {
  1486. if (model.getValue("/root/main/maindata/cureplan/cnstreq["+ i +"]/cureplancd") != "") {
  1487. if (model.getValue("/root/main/maindata/cureplan/cnstreq["+ i +"]/cureplancd") == "1") {
  1488. temp = "전화영양상담 예정입니다.";
  1489. // if (model.getValue("/root/main/maindata/cureplan/cnstreq["+ i +"]/cureplancnts") != "") {
  1490. // temp = temp + model.getValue("/root/main/maindata/cureplan/cnstreq["+ i +"]/cureplancnts");
  1491. // }
  1492. } else if (model.getValue("/root/main/maindata/cureplan/cnstreq["+ i +"]/cureplancd") == "2") {
  1493. temp = "식사처방 변경해 주십시오.";
  1494. } else if (model.getValue("/root/main/maindata/cureplan/cnstreq["+ i +"]/cureplancd") == "9") {
  1495. temp = "기타";
  1496. }
  1497. cureplan = cureplan + temp + model.getValue("/root/main/maindata/cureplan/cnstreq["+ i +"]/cureplancnts") + ", ";
  1498. temp = "";
  1499. }
  1500. }
  1501. cureplan = cureplan.substr(0,cureplan.length-2);
  1502. }
  1503. var item1 = "의뢰항목: " + opt_reqresn.value + " 의뢰일자: " + opt_reqdd.value.substr(0,4) + "/" + opt_reqdd.value.substr(4,2) +
  1504. "/" + opt_reqdd.value.substr(6,2) + " 처방의: " + opt_reqpsn.value +"\n" +"\n";
  1505. var item2 = "S :" +"\n";
  1506. if ( bodysymp != "" ) {
  1507. var item3 = " ο 신체증후 : " + bodysymp;
  1508. if ( ipt_bodysymprem.value != "" ) {
  1509. item3 = item3 + ", " + ipt_bodysymprem.value +"\n";
  1510. } else {
  1511. item3 = item3 + "\n";
  1512. }
  1513. } else {
  1514. if ( ipt_bodysymprem.value != "" ) {
  1515. var item3 = " ο 신체증후 : " + ipt_bodysymprem.value +"\n";
  1516. } else {
  1517. var item3 = "";
  1518. }
  1519. }
  1520. if ( dietprob != "" ) {
  1521. var item4 = " ο 식사시 문제점 : " + dietprob;
  1522. if ( ipt_dietprobrem.value != "" ) {
  1523. item4 = item4 + ", " + ipt_dietprobrem.value +"\n";
  1524. } else {
  1525. item4 = item4 + "\n";
  1526. }
  1527. } else {
  1528. if ( ipt_dietprobrem.value != "" ) {
  1529. var item4 = " ο 식사시 문제점 : " + ipt_dietprobrem.value +"\n";
  1530. } else {
  1531. var item4 = "";
  1532. }
  1533. }
  1534. if ( diethist != "" ) {
  1535. var item5 = " ο 식사력 : " + diethist;
  1536. if ( ipt_diethistetc.value != "" ) {
  1537. item5 = item5 + ", " + ipt_diethistetc.value +"\n";
  1538. } else {
  1539. item5 = item5 + "\n";
  1540. }
  1541. } else {
  1542. if ( ipt_diethistetc.value != "" ) {
  1543. var item5 = " ο 식사력 : " + ipt_diethistetc.value +"\n";
  1544. } else {
  1545. var item5 = "";
  1546. }
  1547. }
  1548. if ( ipt_intkstatmainmeal.value != "" || ipt_intkstatsubmeal.value != "" ) {
  1549. var item6 = " ο 식사섭취상태 : 병원식(주식 " + ipt_intkstatmainmeal.value + "%, 부식 " + ipt_intkstatsubmeal.value + "%)";
  1550. if ( ipt_intkstatetc.value != "" ) {
  1551. item6 = item6 + " 기타 : " + ipt_intkstatetc.value;
  1552. }
  1553. item6 = item6 +"\n";
  1554. } else {
  1555. var item6 = "";
  1556. }
  1557. if ( item6 == "" && ipt_intkstatetc.value != "" ) {
  1558. var item7 = " ο 식사섭취상태 : 기타 : " + ipt_intkstatetc.value +"\n";
  1559. } else {
  1560. var item7 = "";
  1561. }
  1562. if ( (chk_actgrde.value != "") || (tar_actgrdeetc.value != "") ) {
  1563. var item8 = " ο 활동정도 : " + actgrde;
  1564. if ( actgrde != "" && ipt_actgrdeexer.value != "" ) {
  1565. item8 = item8 + ", " + ipt_actgrdeexer.value;
  1566. } else if ( actgrde == "" && ipt_actgrdeexer.value != "" ) {
  1567. item8 = item8 + ipt_actgrdeexer.value;
  1568. }
  1569. if ( (chk_actgrde.value != "") && (tar_actgrdeetc.value != "") ) {
  1570. item8 = item8 + ", 기타 : " + tar_actgrdeetc.value +"\n";
  1571. } else if ( (chk_actgrde.value == "") && (tar_actgrdeetc.value != "") ) {
  1572. item8 = item8 + "기타 : " + tar_actgrdeetc.value +"\n";
  1573. } else {
  1574. item8 = item8 +"\n";
  1575. }
  1576. } else {
  1577. var item8 = "";
  1578. }
  1579. var item10 = "\n" + "O :" +"\n";
  1580. if ( ipt_physmeasbdht.value != "" || ipt_physmeasbdwt.value != "" || ipt_physmeasibw.value != "" || ipt_physmeasibwperc.value != "" ) {
  1581. var item11 = " ο Ht : " + ipt_physmeasbdht.value + "cm, Wt : " + ipt_physmeasbdwt.value + "kg, IBW : " + ipt_physmeasibw.value + "kg, PIBW : " + ipt_physmeasibwperc.value + "%" + "\n";
  1582. } else {
  1583. var item11 = "";
  1584. }
  1585. if ( ipt_bdwtupdtqty.value != "" ) {
  1586. var item12 = " ο Wt.change : " + ipt_bdwtupdtqty.value + "kg( " + ipt_bdwtupdtrate.value + " )% / " + ipt_bdwtupdtterm.value + "개월" + "\n";
  1587. } else {
  1588. var item12 = "";
  1589. }
  1590. var item13 = "";
  1591. if ( ipt_testrsltalb.value != "" || ipt_testrslttlc.value != "" || ipt_testrslthbhct.value != "" || ipt_testrslthbhct2.value != "" || ipt_testrslttrf.value != "" ) {
  1592. if ( ipt_testrsltalb.value != "" ) {
  1593. item13 = " ο Alb : " + ipt_testrsltalb.value;
  1594. }
  1595. if ( ipt_testrslttlc.value != "" && item13 == "" ) {
  1596. item13 = " ο TLC : " + ipt_testrslttlc.value;
  1597. } else if ( ipt_testrslttlc.value != "" && item13 != "" ) {
  1598. item13 = item13 + ", TLC : " + ipt_testrslttlc.value;
  1599. }
  1600. if ( ipt_testrslthbhct.value != "" && ipt_testrslthbhct2.value != "" && item13 == "" ) {
  1601. item13 = " ο Hb/Hct : " + ipt_testrslthbhct.value + " / " + ipt_testrslthbhct2.value;
  1602. } else if ( ipt_testrslthbhct.value != "" && ipt_testrslthbhct2.value == "" && item13 == "" ) {
  1603. item13 = " ο Hb : " + ipt_testrslthbhct.value;
  1604. } else if ( ipt_testrslthbhct.value == "" && ipt_testrslthbhct2.value != "" && item13 == "" ) {
  1605. item13 = " ο Hct : " + ipt_testrslthbhct2.value;
  1606. } else if ( ipt_testrslthbhct.value != "" && ipt_testrslthbhct2.value != "" && item13 != "" ) {
  1607. item13 = item13 + ", Hb/Hct : " + ipt_testrslthbhct.value + " / " + ipt_testrslthbhct2.value;
  1608. } else if ( ipt_testrslthbhct.value != "" && ipt_testrslthbhct2.value == "" && item13 != "" ) {
  1609. item13 = item13 + ", Hb : " + ipt_testrslthbhct.value;
  1610. } else if ( ipt_testrslthbhct.value == "" && ipt_testrslthbhct2.value != "" && item13 != "" ) {
  1611. item13 = item13 + ", Hct : " + ipt_testrslthbhct2.value;
  1612. }
  1613. if ( ipt_testrslttrf.value != "" && item13 == "" ) {
  1614. item13 = " ο TRF : " + ipt_testrslttrf.value;
  1615. } else if ( ipt_testrslttrf.value != "" && item13 != "" ) {
  1616. item13 = item13 + ", TRF : " + ipt_testrslttrf.value;
  1617. }
  1618. item13 = item13 + "\n";
  1619. }
  1620. if ( item13 != "" && tar_testrsltrem.value != "" ) {
  1621. var item14 = " 기타 : " + tar_testrsltrem.value +"\n";
  1622. } else if ( item13 == "" && tar_testrsltrem.value != "" ) {
  1623. var item14 = " ο 기타 : " + tar_testrsltrem.value +"\n";
  1624. } else {
  1625. var item14 = "";
  1626. }
  1627. var item15 = "\n" + "A :" +"\n";
  1628. if ( cmb_nutrstatvalu1.label != "" ) {
  1629. var item16 = " ο 영양상태 : " + cmb_nutrstatvalu1.label + "\n";
  1630. } else {
  1631. var item16 = "";
  1632. }
  1633. if ( item16 != "" && tar_nutrstatvalu1.value != "" ) {
  1634. var item17 = " 기타 : " + tar_nutrstatvalu1.value +"\n";
  1635. } else if ( item16 == "" && tar_nutrstatvalu1.value != "" ) {
  1636. var item17 = " ο 영양상태 : 기타 : " + tar_nutrstatvalu1.value +"\n";
  1637. } else {
  1638. var item17 = "";
  1639. }
  1640. var calrintk = model.getValue("/root/main/maindata/cnstreq/calrintk1");
  1641. var calrintkqty = model.getValue("/root/main/maindata/cnstreq/calrintkqty1");
  1642. var protintk = model.getValue("/root/main/maindata/cnstreq/protintk1");
  1643. var protintkqty = model.getValue("/root/main/maindata/cnstreq/protintkqty1");
  1644. var intkqtyetc = model.getValue("/root/main/maindata/cnstreq/intkqtyetc1");
  1645. if ( calrintkqty != "" || protintkqty != "" || intkqtyetc != "" ) {
  1646. var item18 = "\n" + " 섭취량 분석 및 평가";
  1647. if ( calrintkqty != "" ) {
  1648. item18 = item18 + "\n" + " 열량 : " + calrintkqty + " kcal/day";
  1649. if ( calrintk != "" ) {
  1650. if (calrintk == '1') { calrintk = '상당히 부족';
  1651. } else if (calrintk == '2') { calrintk = '약간 부족';
  1652. } else if (calrintk == '3') { calrintk = '양호';
  1653. } else if (calrintk == '4') { calrintk = '과다';
  1654. }
  1655. item18 = item18 + " (" + calrintk + ")";
  1656. }
  1657. }
  1658. if ( protintkqty != "" ) {
  1659. item18 = item18 + "\n" + " 단백질 : " + protintkqty + " g/day";
  1660. if ( protintk != "" ) {
  1661. if (protintk == '1') { protintk = '상당히 부족';
  1662. } else if (protintk == '2') { protintk = '약간 부족';
  1663. } else if (protintk == '3') { protintk = '양호';
  1664. } else if (protintk == '4') { protintk = '과다';
  1665. }
  1666. item18 = item18 + " (" + protintk + ")";
  1667. }
  1668. }
  1669. if ( intkqtyetc != "" ) {
  1670. item18 = item18 + "\n" + " " + intkqtyetc;
  1671. }
  1672. } else {
  1673. var item18 = "";
  1674. }
  1675. if ( item18 != "" ) {
  1676. var item19 = "\n" + "\n" + " ο 영양요구량" +"\n";
  1677. } else {
  1678. var item19 = "\n" + " ο 영양요구량" +"\n";
  1679. }
  1680. if ( opt_calr.value != "" ) {
  1681. if ( rdo_calrflag.label == "계수법" ) {
  1682. var item20 = " * 열량 : " + opt_calr.value + " kcal/day ( " + rdo_stndbdwtflag.label + " * " + ipt_adoptlawcalr.value + " kcal/kg )" + "\n";
  1683. } else if ( rdo_calrflag.label == "HB" ) {
  1684. var item20 = " * 열량 : " + opt_calr.value + " kcal/day ( BEE : " + opt_calrhb.value + ", AF : " + ipt_hbcalr1.value + ", SF : " + ipt_hbcalr2.value + " )" + "\n";
  1685. }
  1686. } else {
  1687. var item20 = "";
  1688. }
  1689. if ( opt_protqty.value != "" ) {
  1690. var item21 = " * 단백질 : " + opt_protqty.value + " g/day ( " + rdo_stndbdwtflag.label + " * " + ipt_protqty.value + " g/kg )" + "\n";
  1691. } else {
  1692. var item21 = "";
  1693. }
  1694. if ( tar_nutrreqqty.value != "" ) {
  1695. var item22 = " * 기타 : " + tar_nutrreqqty.value +"\n";
  1696. } else {
  1697. var item22 = "";
  1698. }
  1699. var item23 = "\n" + "P :" +"\n";
  1700. if ( cnstpsn != "" && rdo_unstdgrde.label != "" ) {
  1701. var item24 = " ο 피상담자 : " + cnstpsn + " 교육이해도 : " + rdo_unstdgrde.label +"\n";
  1702. } else if ( cnstpsn != "" && rdo_unstdgrde.label == "" ) {
  1703. var item24 = " ο 피상담자 : " + cnstpsn + "\n";
  1704. } else if ( cnstpsn == "" && rdo_unstdgrde.label != "" ) {
  1705. var item24 = " ο 교육이해도 : " + rdo_unstdgrde.label +"\n";
  1706. } else {
  1707. var item24 = "";
  1708. }
  1709. if ( cmb_cnstcd.label != "" && tar_cnstcnts.value == "" ) {
  1710. var item25 = " ο 영양상담내용 : " + cmb_cnstcd.label + "\n";
  1711. } else if ( cmb_cnstcd.label != "" && tar_cnstcnts.value != "" ) {
  1712. var item25 = " ο 영양상담내용 : " + cmb_cnstcd.label + ", " + tar_cnstcnts.value + "\n";
  1713. } else if ( cmb_cnstcd.label == "" && tar_cnstcnts.value != "" ) {
  1714. var item25 = " ο 영양상담내용 : " + tar_cnstcnts.value + "\n";
  1715. } else {
  1716. var item25 = "";
  1717. }
  1718. // if ( cureplan != "" ) {
  1719. // var item26 = " ο 영양치료 계획/권장 : " + cureplan + "\n";
  1720. // } else {
  1721. // var item26 = "";
  1722. // }
  1723. var globalData = getGlobalVariable("ANC00350eventtarget", "A"); // 이벤트가 발생한 그리드
  1724. var target = model.getValue("/root/temp/griddata/gridid"); // 이벤트가 발생한 그리드
  1725. var targetRow = model.getValue("/root/temp/griddata/gridrow"); // 이벤트가 발생한 그리드 row 값
  1726. var item26 = "";
  1727. var carePlanData = "";
  1728. if ( cureplan != "" ) {
  1729. // 영양관리이력 데이터 세팅
  1730. if(target == "grd_nutrmngthist") {
  1731. carePlanData = model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/problemcareplan");
  1732. }
  1733. // 영양검색결과이력 데이터 세팅
  1734. else if(target == "grd_nutrsrchrslthist") {
  1735. carePlanData = model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/problemcareplan");
  1736. }
  1737. // 초기 입력 데이터 세팅
  1738. else {
  1739. carePlanData = model.getValue("/root/temp/senddata/problemcareplan");
  1740. }
  1741. if(carePlanData != "") {
  1742. item26 = item26 + " ο Problem : Plan" + "\n";
  1743. // 로우 데이터 별로 나누기
  1744. carePlanData = carePlanData.split("§");
  1745. for(var i = 1; i <= carePlanData.length; ++i) {
  1746. var problemPlanData = carePlanData[i-1].split("▦");
  1747. item26 = item26 + " " + problemPlanData[0] + " : " + problemPlanData[1] + "\n";
  1748. }
  1749. }
  1750. item26 = item26 + " ο 영양치료 계획/권장 : " + cureplan + "\n";
  1751. } else {
  1752. // 영양관리이력 데이터 세팅
  1753. if(target == "grd_nutrmngthist") {
  1754. carePlanData = model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/problemcareplan");
  1755. }
  1756. // 영양검색결과이력 데이터 세팅
  1757. else if(target == "grd_nutrsrchrslthist") {
  1758. carePlanData = model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/problemcareplan");
  1759. }
  1760. // 초기 입력 데이터 세팅
  1761. else {
  1762. carePlanData = model.getValue("/root/temp/senddata/problemcareplan");
  1763. }
  1764. if(carePlanData != "") {
  1765. item26 = item26 + " ο Problem : Plan" + "\n";
  1766. // 로우 데이터 별로 나누기
  1767. carePlanData = carePlanData.split("§");
  1768. for(var i = 1; i <= carePlanData.length; ++i) {
  1769. var problemPlanData = carePlanData[i-1].split("▦");
  1770. item26 = item26 + " " + problemPlanData[0] + " : " + problemPlanData[1] + "\n";
  1771. }
  1772. }
  1773. }
  1774. if ( cmb_intndieter.label != "" ) {
  1775. var item27 = "\n 감사합니다. " + ipt_execdd.value.substr(0,4) + "/" + ipt_execdd.value.substr(4,2) + "/" +
  1776. ipt_execdd.value.substr(6,2) + " 영양사 " + cmb_chrgdieter.label + "/ " + cmb_intndieter.label + "\n";
  1777. } else {
  1778. var item27 = "\n 감사합니다. " + ipt_execdd.value.substr(0,4) + "/" + ipt_execdd.value.substr(4,2) + "/" +
  1779. ipt_execdd.value.substr(6,2) + " 영양사 " + cmb_chrgdieter.label + "\n";
  1780. }
  1781. replcnts = item1 + item2 + item3 + item4 + item5 + item6 + item7 + item8 +
  1782. item10 + item11 + item12 + item13 +
  1783. item14 + item15 + item16 + item17 + item18 + item19 + item20 +
  1784. item21 + item22 + item23 + item24 + item25 + item26 + item27;
  1785. model.setValue("/root/main/maindata/nutrstatjudg/replcnts", replcnts);
  1786. model.refresh();
  1787. //btn_repl.dispatch("DOMActivate"); //회신 탭화면으로 이동
  1788. //btn_repl.selected = true;
  1789. }
  1790. // SOAP 버튼 클릭시 (2)
  1791. //영양관리유형이 일반추구관리 or 협진추구관리 일 경우
  1792. //영양상태판정 + 추구관리 탭의 내용을 조합하여 회신내용 생성
  1793. function fSoapReplCntsPursmngt() {
  1794. var bodysymp = "";
  1795. var dietprob = "";
  1796. var diethist = "";
  1797. var actgrde = "";
  1798. var cnstpsn = "";
  1799. var cureplan = "";
  1800. var temp = "";
  1801. var replcnts = "";
  1802. //신체증후의 체크된 항목들을 콤마로 연결
  1803. for ( i = 0; i < chk_bodysymp.label.length; i++ ) {
  1804. if ( chk_bodysymp.label.substr(i,2) == "기타" || chk_bodysymp.label.substr(i,3) == "▦기타" ) {
  1805. break;
  1806. } else {
  1807. temp = temp + chk_bodysymp.label.substr(i,1);
  1808. }
  1809. }
  1810. for ( i = 0; i < temp.length; i++ ) {
  1811. if ( temp.substr(i,1) == "▦" ) {
  1812. bodysymp = bodysymp + ", ";
  1813. } else {
  1814. bodysymp = bodysymp + temp.substr(i,1);
  1815. }
  1816. }
  1817. //식사시 문제점의 체크된 항목들을 콤마로 연결
  1818. temp = "";
  1819. for ( i = 0; i < chk_dietprob.label.length; i++ ) {
  1820. if ( chk_dietprob.label.substr(i,2) == "기타" || chk_dietprob.label.substr(i,3) == "▦기타" ) {
  1821. break;
  1822. } else {
  1823. temp = temp + chk_dietprob.label.substr(i,1);
  1824. }
  1825. }
  1826. for ( i = 0; i < temp.length; i++ ) {
  1827. if ( temp.substr(i,1) == "▦" ) {
  1828. dietprob = dietprob + ", ";
  1829. } else {
  1830. dietprob = dietprob + temp.substr(i,1);
  1831. }
  1832. }
  1833. //식사력의 체크된 항목들을 콤마로 연결
  1834. temp = chk_diethist.value;
  1835. for ( i = 0; i < temp.length; i++ ) {
  1836. if ( temp.substr(i,2) == "11" ) {
  1837. diethist = diethist + "균형된 식사";
  1838. } else if ( temp.substr(i,2) == "12" ) {
  1839. diethist = diethist + "규칙적인 식사";
  1840. } else if ( temp.substr(i,2) == "13" ) {
  1841. diethist = diethist + "불규칙적인 식사";
  1842. } else if ( temp.substr(i,2) == "14" ) {
  1843. diethist = diethist + "빠른식사속도";
  1844. } else if ( temp.substr(i,2) == "15" ) {
  1845. diethist = diethist + "과식";
  1846. } else if ( temp.substr(i,2) == "16" ) {
  1847. diethist = diethist + "당질과다섭취";
  1848. } else if ( temp.substr(i,2) == "17" ) {
  1849. diethist = diethist + "지방과다섭취";
  1850. } else if ( temp.substr(i,2) == "18" ) {
  1851. diethist = diethist + "염분과다섭취";
  1852. } else if ( (temp.substr(i,2) == "19") && (ipt_healsuppfood.value != "") ) {
  1853. diethist = diethist + "건강보조식품 " + ipt_healsuppfood.value;
  1854. } else if ( (temp.substr(i,2) == "20") && (ipt_cofftims.value != "") ) {
  1855. diethist = diethist + "커피 " + ipt_cofftims.value + "잔/day";
  1856. } else if ( (temp.substr(i,2) == "21") && (ipt_smoktims.value != "") ) {
  1857. diethist = diethist + "흡연 " + ipt_smoktims.value + "pack/day";
  1858. } else if ( (temp.substr(i,2) == "22") && (ipt_eatouttims.value != "") ) {
  1859. diethist = diethist + "외식 " + ipt_eatouttims.value + "회/week";
  1860. if (ipt_eatoutrem.value != "") {
  1861. diethist = diethist + ipt_eatoutrem.value;
  1862. }
  1863. } else if ( (temp.substr(i,2) == "23") && (ipt_drunktims.value != "") ) {
  1864. diethist = diethist + "음주 " + ipt_drunktims.value + "회/week";
  1865. if (ipt_drunkvol.value != "") {
  1866. diethist = diethist + "(1회 섭취량 " + ipt_drunkvol.value + ")";
  1867. }
  1868. if (ipt_drunkrem.value != "") {
  1869. diethist = diethist + ipt_drunkrem.value;
  1870. }
  1871. } else if ( temp.substr(i,1) == "▦" ) {
  1872. diethist = diethist + ", ";
  1873. }
  1874. }
  1875. if ( diethist.substr(0,2) == ", " ) {
  1876. diethist = diethist.substr(2,diethist.length-2);
  1877. }
  1878. if ( diethist.substr(diethist.length-2,2) == ", " ) {
  1879. diethist = diethist.substr(0,diethist.length-2);
  1880. }
  1881. //활동정도의 체크된 항목들을 콤마로 연결
  1882. temp = "";
  1883. for ( i = 0; i < chk_actgrde.label.length; i++ ) {
  1884. if ( chk_actgrde.label.substr(i,2) == "운동" || chk_actgrde.label.substr(i,3) == "▦운동" ) {
  1885. break;
  1886. } else {
  1887. temp = temp + chk_actgrde.label.substr(i,1);
  1888. }
  1889. }
  1890. for ( i = 0; i < temp.length; i++ ) {
  1891. if ( temp.substr(i,1) == "▦" ) {
  1892. actgrde = actgrde + ", ";
  1893. } else {
  1894. actgrde = actgrde + temp.substr(i,1);
  1895. }
  1896. }
  1897. //피상담자의 체크된 항목들을 콤마로 연결
  1898. // temp = chk_cnstpsn.label;
  1899. // for ( i = 0; i < temp.length; i++ ) {
  1900. // if ( temp.substr(i,1) == "▦" ) {
  1901. // cnstpsn = cnstpsn + ",";
  1902. // } else {
  1903. // cnstpsn = cnstpsn + temp.substr(i,1);
  1904. // }
  1905. // }
  1906. //영양치료계획/권장 그리드의 항목들을 콤마로 연결
  1907. if ( grd_pursmngt.rows-1 > 0 ) {
  1908. for ( i = 1; i <= grd_pursmngt.rows-1; i++ ) {
  1909. if (model.getValue("/root/main/maindata/cureplan/pursmngt["+ i +"]/cureplancd") != "") {
  1910. if (model.getValue("/root/main/maindata/cureplan/pursmngt["+ i +"]/cureplancd") == "1") {
  1911. temp = "전화영양상담 예정입니다.";
  1912. } else if (model.getValue("/root/main/maindata/cureplan/pursmngt["+ i +"]/cureplancd") == "2") {
  1913. temp = "식사처방 변경해 주십시오.";
  1914. } else if (model.getValue("/root/main/maindata/cureplan/pursmngt["+ i +"]/cureplancd") == "9") {
  1915. temp = "기타";
  1916. }
  1917. cureplan = cureplan + temp + model.getValue("/root/main/maindata/cureplan/pursmngt["+ i +"]/cureplancnts") + ", ";
  1918. temp = "";
  1919. }
  1920. }
  1921. cureplan = cureplan.substr(0,cureplan.length-2);
  1922. }
  1923. var item1 = "의뢰항목: " + opt_reqresn.value + " 의뢰일자: " + opt_reqdd.value.substr(0,4) + "/" + opt_reqdd.value.substr(4,2) +
  1924. "/" + opt_reqdd.value.substr(6,2) + " 처방의: " + opt_reqpsn.value +"\n" +"\n";
  1925. var item2 = "S :" +"\n";
  1926. if ( bodysymp != "" ) {
  1927. var item3 = " ο 신체증후 : " + bodysymp;
  1928. if ( ipt_bodysymprem.value != "" ) {
  1929. item3 = item3 + ", " + ipt_bodysymprem.value +"\n";
  1930. } else {
  1931. item3 = item3 + "\n";
  1932. }
  1933. } else {
  1934. if ( ipt_bodysymprem.value != "" ) {
  1935. var item3 = " ο 신체증후 : " + ipt_bodysymprem.value +"\n";
  1936. } else {
  1937. var item3 = "";
  1938. }
  1939. }
  1940. if ( dietprob != "" ) {
  1941. var item4 = " ο 식사시 문제점 : " + dietprob;
  1942. if ( ipt_dietprobrem.value != "" ) {
  1943. item4 = item4 + ", " + ipt_dietprobrem.value +"\n";
  1944. } else {
  1945. item4 = item4 + "\n";
  1946. }
  1947. } else {
  1948. if ( ipt_dietprobrem.value != "" ) {
  1949. var item4 = " ο 식사시 문제점 : " + ipt_dietprobrem.value +"\n";
  1950. } else {
  1951. var item4 = "";
  1952. }
  1953. }
  1954. if ( diethist != "" ) {
  1955. var item5 = " ο 식사력 : " + diethist;
  1956. if ( ipt_diethistetc.value != "" ) {
  1957. item5 = item5 + ", " + ipt_diethistetc.value +"\n";
  1958. } else {
  1959. item5 = item5 + "\n";
  1960. }
  1961. } else {
  1962. if ( ipt_diethistetc.value != "" ) {
  1963. var item5 = " ο 식사력 : " + ipt_diethistetc.value +"\n";
  1964. } else {
  1965. var item5 = "";
  1966. }
  1967. }
  1968. if ( ipt_intkstatmainmeal.value != "" || ipt_intkstatsubmeal.value != "" ) {
  1969. var item6 = " ο 식사섭취상태 : 병원식(주식 " + ipt_intkstatmainmeal.value + "%, 부식 " + ipt_intkstatsubmeal.value + "%)";
  1970. if ( ipt_intkstatetc.value != "" ) {
  1971. item6 = item6 + " 기타 : " + ipt_intkstatetc.value;
  1972. }
  1973. item6 = item6 +"\n";
  1974. } else {
  1975. var item6 = "";
  1976. }
  1977. if ( item6 == "" && ipt_intkstatetc.value != "" ) {
  1978. var item7 = " ο 식사섭취상태 : 기타 : " + ipt_intkstatetc.value +"\n";
  1979. } else {
  1980. var item7 = "";
  1981. }
  1982. if ( (chk_actgrde.value != "") || (tar_actgrdeetc.value != "") ) {
  1983. var item8 = " ο 활동정도 : " + actgrde;
  1984. if ( actgrde != "" && ipt_actgrdeexer.value != "" ) {
  1985. item8 = item8 + ", " + ipt_actgrdeexer.value;
  1986. } else if ( actgrde == "" && ipt_actgrdeexer.value != "" ) {
  1987. item8 = item8 + ipt_actgrdeexer.value;
  1988. }
  1989. if ( (chk_actgrde.value != "") && (tar_actgrdeetc.value != "") ) {
  1990. item8 = item8 + ", 기타 : " + tar_actgrdeetc.value +"\n";
  1991. } else if ( (chk_actgrde.value == "") && (tar_actgrdeetc.value != "") ) {
  1992. item8 = item8 + "기타 : " + tar_actgrdeetc.value +"\n";
  1993. } else {
  1994. item8 = item8 +"\n";
  1995. }
  1996. } else {
  1997. var item8 = "";
  1998. }
  1999. var item10 = "\n" + "O :" +"\n";
  2000. if ( ipt_physmeasbdht.value != "" || ipt_physmeasbdwt.value != "" || ipt_physmeasibw.value != "" || ipt_physmeasibwperc.value != "" ) {
  2001. var item11 = " ο Ht : " + ipt_physmeasbdht.value + "cm, Wt : " + ipt_physmeasbdwt.value + "kg, IBW : " + ipt_physmeasibw.value + "kg, PIBW : " + ipt_physmeasibwperc.value + "%" + "\n";
  2002. } else {
  2003. var item11 = "";
  2004. }
  2005. if ( ipt_bdwtupdtqty.value != "" ) {
  2006. var item12 = " ο Wt.change : " + ipt_bdwtupdtqty.value + "kg( " + ipt_bdwtupdtrate.value + " )% / " + ipt_bdwtupdtterm.value + "개월" + "\n";
  2007. } else {
  2008. var item12 = "";
  2009. }
  2010. var item13 = "";
  2011. if ( ipt_testrsltalb.value != "" || ipt_testrslttlc.value != "" || ipt_testrslthbhct.value != "" || ipt_testrslthbhct2.value != "" || ipt_testrslttrf.value != "" ) {
  2012. if ( ipt_testrsltalb.value != "" ) {
  2013. item13 = " ο Alb : " + ipt_testrsltalb.value;
  2014. }
  2015. if ( ipt_testrslttlc.value != "" && item13 == "" ) {
  2016. item13 = " ο TLC : " + ipt_testrslttlc.value;
  2017. } else if ( ipt_testrslttlc.value != "" && item13 != "" ) {
  2018. item13 = item13 + ", TLC : " + ipt_testrslttlc.value;
  2019. }
  2020. if ( ipt_testrslthbhct.value != "" && ipt_testrslthbhct2.value != "" && item13 == "" ) {
  2021. item13 = " ο Hb/Hct : " + ipt_testrslthbhct.value + " / " + ipt_testrslthbhct2.value;
  2022. } else if ( ipt_testrslthbhct.value != "" && ipt_testrslthbhct2.value == "" && item13 == "" ) {
  2023. item13 = " ο Hb : " + ipt_testrslthbhct.value;
  2024. } else if ( ipt_testrslthbhct.value == "" && ipt_testrslthbhct2.value != "" && item13 == "" ) {
  2025. item13 = " ο Hct : " + ipt_testrslthbhct2.value;
  2026. } else if ( ipt_testrslthbhct.value != "" && ipt_testrslthbhct2.value != "" && item13 != "" ) {
  2027. item13 = item13 + ", Hb/Hct : " + ipt_testrslthbhct.value + " / " + ipt_testrslthbhct2.value;
  2028. } else if ( ipt_testrslthbhct.value != "" && ipt_testrslthbhct2.value == "" && item13 != "" ) {
  2029. item13 = item13 + ", Hb : " + ipt_testrslthbhct.value;
  2030. } else if ( ipt_testrslthbhct.value == "" && ipt_testrslthbhct2.value != "" && item13 != "" ) {
  2031. item13 = item13 + ", Hct : " + ipt_testrslthbhct2.value;
  2032. }
  2033. if ( ipt_testrslttrf.value != "" && item13 == "" ) {
  2034. item13 = " ο TRF : " + ipt_testrslttrf.value;
  2035. } else if ( ipt_testrslttrf.value != "" && item13 != "" ) {
  2036. item13 = item13 + ", TRF : " + ipt_testrslttrf.value;
  2037. }
  2038. item13 = item13 + "\n";
  2039. }
  2040. if ( item13 != "" && tar_testrsltrem.value != "" ) {
  2041. var item14 = " 기타 : " + tar_testrsltrem.value +"\n";
  2042. } else if ( item13 == "" && tar_testrsltrem.value != "" ) {
  2043. var item14 = " ο 기타 : " + tar_testrsltrem.value +"\n";
  2044. } else {
  2045. var item14 = "";
  2046. }
  2047. var item15 = "\n" + "A :" +"\n";
  2048. if ( cmb_nutrstatvalu2.label != "" ) {
  2049. var item16 = " ο 영양상태 : " + cmb_nutrstatvalu2.label + "\n";
  2050. } else {
  2051. var item16 = "";
  2052. }
  2053. if ( item16 != "" && tar_nutrstatvalu2.value != "" ) {
  2054. var item17 = " 기타 : " + tar_nutrstatvalu2.value +"\n";
  2055. } else if ( item16 == "" && tar_nutrstatvalu2.value != "" ) {
  2056. var item17 = " ο 영양상태 : 기타 : " + tar_nutrstatvalu2.value +"\n";
  2057. } else {
  2058. var item17 = "";
  2059. }
  2060. var calrintk = model.getValue("/root/main/maindata/pursmngt/calrintk2");
  2061. var calrintkqty = model.getValue("/root/main/maindata/pursmngt/calrintkqty2");
  2062. var protintk = model.getValue("/root/main/maindata/pursmngt/protintk2");
  2063. var protintkqty = model.getValue("/root/main/maindata/pursmngt/protintkqty2");
  2064. var intkqtyetc = model.getValue("/root/main/maindata/pursmngt/intkqtyetc2");
  2065. if ( calrintkqty != "" || protintkqty != "" || intkqtyetc != "" ) {
  2066. var item18 = "\n" + " 섭취량 분석 및 평가";
  2067. if ( calrintkqty != "" ) {
  2068. item18 = item18 + "\n" + " 열량 : " + calrintkqty + " kcal/day";
  2069. if ( calrintk != "" ) {
  2070. if (calrintk == '1') { calrintk = '상당히 부족';
  2071. } else if (calrintk == '2') { calrintk = '약간 부족';
  2072. } else if (calrintk == '3') { calrintk = '양호';
  2073. } else if (calrintk == '4') { calrintk = '과다';
  2074. }
  2075. item18 = item18 + " (" + calrintk + ")";
  2076. }
  2077. }
  2078. if ( protintkqty != "" ) {
  2079. item18 = item18 + "\n" + " 단백질 : " + protintkqty + " g/day";
  2080. if ( protintk != "" ) {
  2081. if (protintk == '1') { protintk = '상당히 부족';
  2082. } else if (protintk == '2') { protintk = '약간 부족';
  2083. } else if (protintk == '3') { protintk = '양호';
  2084. } else if (protintk == '4') { protintk = '과다';
  2085. }
  2086. item18 = item18 + " (" + protintk + ")";
  2087. }
  2088. }
  2089. if ( intkqtyetc != "" ) {
  2090. item18 = item18 + "\n" + " " + intkqtyetc;
  2091. }
  2092. } else {
  2093. var item18 = "";
  2094. }
  2095. if ( item18 != "" ) {
  2096. var item19 = "\n" + "\n" + " ο 영양요구량" +"\n";
  2097. } else {
  2098. var item19 = "\n" + " ο 영양요구량" +"\n";
  2099. }
  2100. if ( opt_calr2.value != "" ) {
  2101. if ( rdo_calrflag2.label == "계수법" ) {
  2102. var item20 = " * 열량 : " + opt_calr2.value + " kcal/day ( " + rdo_stndbdwtflag2.label + " * " + ipt_adoptlawcalr2.value + " kcal/kg )" + "\n";
  2103. } else if ( rdo_calrflag2.label == "HB" ) {
  2104. var item20 = " * 열량 : " + opt_calr2.value + " kcal/day ( BEE : " + opt_calrhb2.value + ", AF : " + ipt_hbcalr12.value + ", SF : " + ipt_hbcalr22.value + " )" + "\n";
  2105. }
  2106. } else {
  2107. var item20 = "";
  2108. }
  2109. if ( opt_protqty2.value != "" ) {
  2110. var item21 = " * 단백질 : " + opt_protqty2.value + " g/day ( " + rdo_stndbdwtflag2.label + " * " + ipt_protqty2.value + " g/kg )" + "\n";
  2111. } else {
  2112. var item21 = "";
  2113. }
  2114. if ( tar_nutrreqqty2.value != "" ) {
  2115. var item22 = " * 기타 : " + tar_nutrreqqty2.value +"\n";
  2116. } else {
  2117. var item22 = "";
  2118. }
  2119. var item23 = "\n" + "P :" +"\n";
  2120. // if ( cnstpsn != "" && rdo_unstdgrde.label != "" ) {
  2121. // var item24 = " ◈ 피상담자: " + cnstpsn + " 교육이해도: " + rdo_unstdgrde.label +"\n";
  2122. // } else if ( cnstpsn != "" && rdo_unstdgrde.label == "" ) {
  2123. // var item24 = " ◈ 피상담자: " + cnstpsn + "\n";
  2124. // } else if ( cnstpsn == "" && rdo_unstdgrde.label != "" ) {
  2125. // var item24 = " ◈ 교육이해도: " + rdo_unstdgrde.label +"\n";
  2126. // } else {
  2127. // var item24 = "";
  2128. // }
  2129. // if ( cmb_cnstcd.label != "" ) {
  2130. // var item25 = " ◈ 영양상담내용: " + cmb_cnstcd.label + "\n";
  2131. // } else {
  2132. // var item25 = "";
  2133. // }
  2134. // if ( cureplan != "" ) {
  2135. // var item26 = " ο 영양치료 계획/권장 : " + cureplan + "\n";
  2136. // } else {
  2137. // var item26 = "";
  2138. // }
  2139. var globalData = getGlobalVariable("ANC00350eventtarget", "A"); // 이벤트가 발생한 그리드
  2140. var target = model.getValue("/root/temp/griddata/gridid"); // 이벤트가 발생한 그리드
  2141. var targetRow = model.getValue("/root/temp/griddata/gridrow"); // 이벤트가 발생한 그리드 row 값
  2142. var item26 = "";
  2143. var carePlanData = "";
  2144. if ( cureplan != "" ) {
  2145. // 영양관리이력 데이터 세팅
  2146. if(target == "grd_nutrmngthist") {
  2147. carePlanData = model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/problemcareplan");
  2148. }
  2149. // 영양검색결과이력 데이터 세팅
  2150. else if(target == "grd_nutrsrchrslthist") {
  2151. carePlanData = model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/problemcareplan");
  2152. }
  2153. // 초기 입력 데이터 세팅
  2154. else {
  2155. carePlanData = model.getValue("/root/temp/senddata/problemcareplan");
  2156. }
  2157. if(carePlanData != "") {
  2158. item26 = item26 + " ο Problem : Plan" + "\n";
  2159. // 로우 데이터 별로 나누기
  2160. carePlanData = carePlanData.split("§");
  2161. for(var i = 1; i <= carePlanData.length; ++i) {
  2162. var problemPlanData = carePlanData[i-1].split("▦");
  2163. item26 = item26 + " " + problemPlanData[0] + ":" + problemPlanData[1] + "\n";
  2164. }
  2165. }
  2166. item26 = item26 + " ο 영양치료 계획/권장 : " + cureplan + "\n";
  2167. } else {
  2168. // 영양관리이력 데이터 세팅
  2169. if(target == "grd_nutrmngthist") {
  2170. carePlanData = model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/problemcareplan");
  2171. }
  2172. // 영양검색결과이력 데이터 세팅
  2173. else if(target == "grd_nutrsrchrslthist") {
  2174. carePlanData = model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/problemcareplan");
  2175. }
  2176. // 초기 입력 데이터 세팅
  2177. else {
  2178. carePlanData = model.getValue("/root/temp/senddata/problemcareplan");
  2179. }
  2180. if(carePlanData != "") {
  2181. item26 = item26 + " ο Problem : Plan" + "\n";
  2182. // 로우 데이터 별로 나누기
  2183. carePlanData = carePlanData.split("§");
  2184. for(var i = 1; i <= carePlanData.length; ++i) {
  2185. var problemPlanData = carePlanData[i-1].split("▦");
  2186. item26 = item26 + " " + problemPlanData[0] + " : " + problemPlanData[1] + "\n";
  2187. }
  2188. }
  2189. }
  2190. if ( cmb_intndieter.label != "" ) {
  2191. var item27 = "\n 감사합니다. " + ipt_execdd.value.substr(0,4) + "/" + ipt_execdd.value.substr(4,2) + "/" +
  2192. ipt_execdd.value.substr(6,2) + " 영양사 " + cmb_chrgdieter.label + "/ " + cmb_intndieter.label + "\n";
  2193. } else {
  2194. var item27 = "\n 감사합니다. " + ipt_execdd.value.substr(0,4) + "/" + ipt_execdd.value.substr(4,2) + "/" +
  2195. ipt_execdd.value.substr(6,2) + " 영양사 " + cmb_chrgdieter.label + "\n";
  2196. }
  2197. replcnts = item1 + item2 + item3 + item4 + item5 + item6 + item7 + item8 +
  2198. item10 + item11 + item12 + item13 +
  2199. item14 + item15 + item16 + item17 + item18 + item19 + item20 +
  2200. item21 + item22 + item23 + item26 + item27;
  2201. model.setValue("/root/main/maindata/nutrstatjudg/replcnts", replcnts);
  2202. model.refresh();
  2203. }
  2204. function fSoapReplCntsRtn() {
  2205. // var bodysymp = "";
  2206. // var dietprob = "";
  2207. // var diethist = "";
  2208. // var actgrde = "";
  2209. // var cnstpsn = "";
  2210. var cureplan = "";
  2211. var temp = "";
  2212. var replcnts = "";
  2213. // //신체증후의 체크된 항목들을 콤마로 연결
  2214. // for ( i = 0; i < chk_bodysymp.label.length; i++ ) {
  2215. // if ( chk_bodysymp.label.substr(i,2) == "기타" || chk_bodysymp.label.substr(i,3) == "▦기타" ) {
  2216. // break;
  2217. // } else {
  2218. // temp = temp + chk_bodysymp.label.substr(i,1);
  2219. // }
  2220. // }
  2221. // for ( i = 0; i < temp.length; i++ ) {
  2222. // if ( temp.substr(i,1) == "▦" ) {
  2223. // bodysymp = bodysymp + ", ";
  2224. // } else {
  2225. // bodysymp = bodysymp + temp.substr(i,1);
  2226. // }
  2227. // }
  2228. // //식사시 문제점의 체크된 항목들을 콤마로 연결
  2229. // temp = "";
  2230. // for ( i = 0; i < chk_dietprob.label.length; i++ ) {
  2231. // if ( chk_dietprob.label.substr(i,2) == "기타" || chk_dietprob.label.substr(i,3) == "▦기타" ) {
  2232. // break;
  2233. // } else {
  2234. // temp = temp + chk_dietprob.label.substr(i,1);
  2235. // }
  2236. // }
  2237. // for ( i = 0; i < temp.length; i++ ) {
  2238. // if ( temp.substr(i,1) == "▦" ) {
  2239. // dietprob = dietprob + ", ";
  2240. // } else {
  2241. // dietprob = dietprob + temp.substr(i,1);
  2242. // }
  2243. // }
  2244. // //식사력의 체크된 항목들을 콤마로 연결
  2245. // temp = chk_diethist.value;
  2246. // for ( i = 0; i < temp.length; i++ ) {
  2247. // if ( temp.substr(i,2) == "11" ) {
  2248. // diethist = diethist + "균형된 식사";
  2249. // } else if ( temp.substr(i,2) == "12" ) {
  2250. // diethist = diethist + "규칙적인 식사";
  2251. // } else if ( temp.substr(i,2) == "13" ) {
  2252. // diethist = diethist + "불규칙적인 식사";
  2253. // } else if ( temp.substr(i,2) == "14" ) {
  2254. // diethist = diethist + "빠른식사속도";
  2255. // } else if ( temp.substr(i,2) == "15" ) {
  2256. // diethist = diethist + "과식";
  2257. // } else if ( temp.substr(i,2) == "16" ) {
  2258. // diethist = diethist + "당질과다섭취";
  2259. // } else if ( temp.substr(i,2) == "17" ) {
  2260. // diethist = diethist + "지방과다섭취";
  2261. // } else if ( temp.substr(i,2) == "18" ) {
  2262. // diethist = diethist + "염분과다섭취";
  2263. // } else if ( (temp.substr(i,2) == "19") && (ipt_healsuppfood.value != "") ) {
  2264. // diethist = diethist + "건강보조식품 " + ipt_healsuppfood.value;
  2265. // } else if ( (temp.substr(i,2) == "20") && (ipt_cofftims.value != "") ) {
  2266. // diethist = diethist + "커피 " + ipt_cofftims.value + "잔/day";
  2267. // } else if ( (temp.substr(i,2) == "21") && (ipt_smoktims.value != "") ) {
  2268. // diethist = diethist + "흡연 " + ipt_smoktims.value + "pack/day";
  2269. // } else if ( (temp.substr(i,2) == "22") && (ipt_eatouttims.value != "") ) {
  2270. // diethist = diethist + "외식 " + ipt_eatouttims.value + "회/week";
  2271. // if (ipt_eatoutrem.value != "") {
  2272. // diethist = diethist + ipt_eatoutrem.value;
  2273. // }
  2274. // } else if ( (temp.substr(i,2) == "23") && (ipt_drunktims.value != "") ) {
  2275. // diethist = diethist + "음주 " + ipt_drunktims.value + "회/week";
  2276. // if (ipt_drunkvol.value != "") {
  2277. // diethist = diethist + "(1회 섭취량 " + ipt_drunkvol.value + ")";
  2278. // }
  2279. // if (ipt_drunkrem.value != "") {
  2280. // diethist = diethist + ipt_drunkrem.value;
  2281. // }
  2282. // } else if ( temp.substr(i,1) == "▦" ) {
  2283. // diethist = diethist + ", ";
  2284. // }
  2285. // }
  2286. // if ( diethist.substr(0,2) == ", " ) {
  2287. // diethist = diethist.substr(2,diethist.length-2);
  2288. // }
  2289. // if ( diethist.substr(diethist.length-2,2) == ", " ) {
  2290. // diethist = diethist.substr(0,diethist.length-2);
  2291. // }
  2292. // //활동정도의 체크된 항목들을 콤마로 연결
  2293. // temp = "";
  2294. // for ( i = 0; i < chk_actgrde.label.length; i++ ) {
  2295. // if ( chk_actgrde.label.substr(i,2) == "운동" || chk_actgrde.label.substr(i,3) == "▦운동" ) {
  2296. // break;
  2297. // } else {
  2298. // temp = temp + chk_actgrde.label.substr(i,1);
  2299. // }
  2300. // }
  2301. // for ( i = 0; i < temp.length; i++ ) {
  2302. // if ( temp.substr(i,1) == "▦" ) {
  2303. // actgrde = actgrde + ", ";
  2304. // } else {
  2305. // actgrde = actgrde + temp.substr(i,1);
  2306. // }
  2307. // }
  2308. //피상담자의 체크된 항목들을 콤마로 연결
  2309. // temp = chk_cnstpsn.label;
  2310. // for ( i = 0; i < temp.length; i++ ) {
  2311. // if ( temp.substr(i,1) == "▦" ) {
  2312. // cnstpsn = cnstpsn + ", ";
  2313. // } else {
  2314. // cnstpsn = cnstpsn + temp.substr(i,1);
  2315. // }
  2316. // }
  2317. //영양치료계획/권장 그리드의 항목들을 콤마로 연결
  2318. if ( grd_cnstreq.rows-1 > 0 ) {
  2319. for ( i = 1; i <= grd_cnstreq.rows-1; i++ ) {
  2320. if (model.getValue("/root/main/maindata/cureplan/cnstreq["+ i +"]/cureplancd") != "") {
  2321. if (model.getValue("/root/main/maindata/cureplan/cnstreq["+ i +"]/cureplancd") == "1") {
  2322. temp = "전화영양상담 예정입니다.";
  2323. } else if (model.getValue("/root/main/maindata/cureplan/cnstreq["+ i +"]/cureplancd") == "2") {
  2324. temp = "식사처방 변경해 주십시오.";
  2325. } else if (model.getValue("/root/main/maindata/cureplan/cnstreq["+ i +"]/cureplancd") == "9") {
  2326. temp = "기타";
  2327. }
  2328. cureplan = cureplan + temp + model.getValue("/root/main/maindata/cureplan/cnstreq["+ i +"]/cureplancnts") + ", ";
  2329. temp = "";
  2330. }
  2331. }
  2332. cureplan = cureplan.substr(0,cureplan.length-2);
  2333. }
  2334. var item1 = "의뢰항목: " + opt_reqresn.value + " 의뢰일자: " + opt_reqdd.value.substr(0,4) + "/" + opt_reqdd.value.substr(4,2) +
  2335. "/" + opt_reqdd.value.substr(6,2) + " 처방의: " + opt_reqpsn.value +"\n" +"\n";
  2336. // var item2 = "S :" +"\n";
  2337. // if ( bodysymp != "" ) {
  2338. // var item3 = " ο 신체증후 : " + bodysymp;
  2339. // if ( ipt_bodysymprem.value != "" ) {
  2340. // item3 = item3 + ", " + ipt_bodysymprem.value +"\n";
  2341. // } else {
  2342. // item3 = item3 + "\n";
  2343. // }
  2344. // } else {
  2345. // if ( ipt_bodysymprem.value != "" ) {
  2346. // var item3 = " ο 신체증후 : " + ipt_bodysymprem.value +"\n";
  2347. // } else {
  2348. // var item3 = "";
  2349. // }
  2350. // }
  2351. // if ( dietprob != "" ) {
  2352. // var item4 = " ο 식사시 문제점 : " + dietprob;
  2353. // if ( ipt_dietprobrem.value != "" ) {
  2354. // item4 = item4 + ", " + ipt_dietprobrem.value +"\n";
  2355. // } else {
  2356. // item4 = item4 + "\n";
  2357. // }
  2358. // } else {
  2359. // if ( ipt_dietprobrem.value != "" ) {
  2360. // var item4 = " ο 식사시 문제점 : " + ipt_dietprobrem.value +"\n";
  2361. // } else {
  2362. // var item4 = "";
  2363. // }
  2364. // }
  2365. // if ( diethist != "" ) {
  2366. // var item5 = " ο 식사력 : " + diethist;
  2367. // if ( ipt_diethistetc.value != "" ) {
  2368. // item5 = item5 + ", " + ipt_diethistetc.value +"\n";
  2369. // } else {
  2370. // item5 = item5 + "\n";
  2371. // }
  2372. // } else {
  2373. // if ( ipt_diethistetc.value != "" ) {
  2374. // var item5 = " ο 식사력 : " + ipt_diethistetc.value +"\n";
  2375. // } else {
  2376. // var item5 = "";
  2377. // }
  2378. // }
  2379. // if ( ipt_intkstatmainmeal.value != "" || ipt_intkstatsubmeal.value != "" ) {
  2380. // var item6 = " ο 식사섭취상태 : 병원식(주식 " + ipt_intkstatmainmeal.value + "%, 부식 " + ipt_intkstatsubmeal.value + "%)";
  2381. // if ( ipt_intkstatetc.value != "" ) {
  2382. // item6 = item6 + " 기타 : " + ipt_intkstatetc.value;
  2383. // }
  2384. // item6 = item6 +"\n";
  2385. // } else {
  2386. // var item6 = "";
  2387. // }
  2388. // if ( item6 == "" && ipt_intkstatetc.value != "" ) {
  2389. // var item7 = " ο 식사섭취상태 : 기타 : " + ipt_intkstatetc.value +"\n";
  2390. // } else {
  2391. // var item7 = "";
  2392. // }
  2393. // if ( (chk_actgrde.value != "") || (tar_actgrdeetc.value != "") ) {
  2394. // var item8 = " ο 활동정도 : " + actgrde;
  2395. // if ( actgrde != "" && ipt_actgrdeexer.value != "" ) {
  2396. // item8 = item8 + ", " + ipt_actgrdeexer.value;
  2397. // } else if ( actgrde == "" && ipt_actgrdeexer.value != "" ) {
  2398. // item8 = item8 + ipt_actgrdeexer.value;
  2399. // }
  2400. // if ( (chk_actgrde.value != "") && (tar_actgrdeetc.value != "") ) {
  2401. // item8 = item8 + ", 기타 : " + tar_actgrdeetc.value +"\n";
  2402. // } else if ( (chk_actgrde.value == "") && (tar_actgrdeetc.value != "") ) {
  2403. // item8 = item8 + "기타 : " + tar_actgrdeetc.value +"\n";
  2404. // } else {
  2405. // item8 = item8 +"\n";
  2406. // }
  2407. // } else {
  2408. // var item8 = "";
  2409. // }
  2410. // var item10 = "\n" + "O :" +"\n";
  2411. // if ( ipt_physmeasbdht.value != "" || ipt_physmeasbdwt.value != "" || ipt_physmeasibw.value != "" || ipt_physmeasibwperc.value != "" ) {
  2412. // var item11 = " ο Ht : " + ipt_physmeasbdht.value + "cm, Wt : " + ipt_physmeasbdwt.value + "kg, IBW : " + ipt_physmeasibw.value + "kg, PIBW : " + ipt_physmeasibwperc.value + "%" + "\n";
  2413. // } else {
  2414. // var item11 = "";
  2415. // }
  2416. // if ( ipt_bdwtupdtqty.value != "" ) {
  2417. // var item12 = " ο Wt.change : " + ipt_bdwtupdtqty.value + "kg( " + ipt_bdwtupdtrate.value + " )% / " + ipt_bdwtupdtterm.value + "개월" + "\n";
  2418. // } else {
  2419. // var item12 = "";
  2420. // }
  2421. // var item13 = "";
  2422. // if ( ipt_testrsltalb.value != "" || ipt_testrslttlc.value != "" || ipt_testrslthbhct.value != "" || ipt_testrslthbhct2.value != "" || ipt_testrslttrf.value != "" ) {
  2423. // if ( ipt_testrsltalb.value != "" ) {
  2424. // item13 = " ο Alb : " + ipt_testrsltalb.value;
  2425. // }
  2426. // if ( ipt_testrslttlc.value != "" && item13 == "" ) {
  2427. // item13 = " ο TLC : " + ipt_testrslttlc.value;
  2428. // } else if ( ipt_testrslttlc.value != "" && item13 != "" ) {
  2429. // item13 = item13 + ", TLC : " + ipt_testrslttlc.value;
  2430. // }
  2431. // if ( ipt_testrslthbhct.value != "" && ipt_testrslthbhct2.value != "" && item13 == "" ) {
  2432. // item13 = " ο Hb/Hct : " + ipt_testrslthbhct.value + " / " + ipt_testrslthbhct2.value;
  2433. // } else if ( ipt_testrslthbhct.value != "" && ipt_testrslthbhct2.value == "" && item13 == "" ) {
  2434. // item13 = " ο Hb : " + ipt_testrslthbhct.value;
  2435. // } else if ( ipt_testrslthbhct.value == "" && ipt_testrslthbhct2.value != "" && item13 == "" ) {
  2436. // item13 = " ο Hct : " + ipt_testrslthbhct2.value;
  2437. // } else if ( ipt_testrslthbhct.value != "" && ipt_testrslthbhct2.value != "" && item13 != "" ) {
  2438. // item13 = item13 + ", Hb/Hct : " + ipt_testrslthbhct.value + " / " + ipt_testrslthbhct2.value;
  2439. // } else if ( ipt_testrslthbhct.value != "" && ipt_testrslthbhct2.value == "" && item13 != "" ) {
  2440. // item13 = item13 + ", Hb : " + ipt_testrslthbhct.value;
  2441. // } else if ( ipt_testrslthbhct.value == "" && ipt_testrslthbhct2.value != "" && item13 != "" ) {
  2442. // item13 = item13 + ", Hct : " + ipt_testrslthbhct2.value;
  2443. // }
  2444. // if ( ipt_testrslttrf.value != "" && item13 == "" ) {
  2445. // item13 = " ο TRF : " + ipt_testrslttrf.value;
  2446. // } else if ( ipt_testrslttrf.value != "" && item13 != "" ) {
  2447. // item13 = item13 + ", TRF : " + ipt_testrslttrf.value;
  2448. // }
  2449. // item13 = item13 + "\n";
  2450. // }
  2451. // if ( item13 != "" && tar_testrsltrem.value != "" ) {
  2452. // var item14 = " 기타 : " + tar_testrsltrem.value +"\n";
  2453. // } else if ( item13 == "" && tar_testrsltrem.value != "" ) {
  2454. // var item14 = " ο 기타 : " + tar_testrsltrem.value +"\n";
  2455. // } else {
  2456. // var item14 = "";
  2457. // }
  2458. // var item15 = "\n" + "A :" +"\n";
  2459. // if ( cmb_nutrstatvalu1.label != "" ) {
  2460. // var item16 = " ο 영양상태 : " + cmb_nutrstatvalu1.label + "\n";
  2461. // } else {
  2462. // var item16 = "";
  2463. // }
  2464. // if ( item16 != "" && tar_nutrstatvalu1.value != "" ) {
  2465. // var item17 = " 기타 : " + tar_nutrstatvalu1.value +"\n";
  2466. // } else if ( item16 == "" && tar_nutrstatvalu1.value != "" ) {
  2467. // var item17 = " ο 영양상태 : 기타 : " + tar_nutrstatvalu1.value +"\n";
  2468. // } else {
  2469. // var item17 = "";
  2470. // }
  2471. // var calrintk = model.getValue("/root/main/maindata/cnstreq/calrintk1");
  2472. // var calrintkqty = model.getValue("/root/main/maindata/cnstreq/calrintkqty1");
  2473. // var protintk = model.getValue("/root/main/maindata/cnstreq/protintk1");
  2474. // var protintkqty = model.getValue("/root/main/maindata/cnstreq/protintkqty1");
  2475. // var intkqtyetc = model.getValue("/root/main/maindata/cnstreq/intkqtyetc1");
  2476. // if ( calrintkqty != "" || protintkqty != "" || intkqtyetc != "" ) {
  2477. // var item18 = "\n" + " 섭취량 분석 및 평가";
  2478. // if ( calrintkqty != "" ) {
  2479. // item18 = item18 + "\n" + " 열량 : " + calrintkqty + " kcal/day";
  2480. // if ( calrintk != "" ) {
  2481. // if (calrintk == '1') { calrintk = '상당히 부족';
  2482. // } else if (calrintk == '2') { calrintk = '약간 부족';
  2483. // } else if (calrintk == '3') { calrintk = '양호';
  2484. // } else if (calrintk == '4') { calrintk = '과다';
  2485. // }
  2486. // item18 = item18 + " (" + calrintk + ")";
  2487. // }
  2488. // }
  2489. // if ( protintkqty != "" ) {
  2490. // item18 = item18 + "\n" + " 단백질 : " + protintkqty + " g/day";
  2491. // if ( protintk != "" ) {
  2492. // if (protintk == '1') { protintk = '상당히 부족';
  2493. // } else if (protintk == '2') { protintk = '약간 부족';
  2494. // } else if (protintk == '3') { protintk = '양호';
  2495. // } else if (protintk == '4') { protintk = '과다';
  2496. // }
  2497. // item18 = item18 + " (" + protintk + ")";
  2498. // }
  2499. // }
  2500. // if ( intkqtyetc != "" ) {
  2501. // item18 = item18 + "\n" + " " + intkqtyetc;
  2502. // }
  2503. // } else {
  2504. // var item18 = "";
  2505. // }
  2506. // if ( item18 != "" ) {
  2507. // var item19 = "\n" + "\n" + " ο 영양요구량" +"\n";
  2508. // } else {
  2509. // var item19 = "\n" + " ο 영양요구량" +"\n";
  2510. // }
  2511. // if ( opt_calr.value != "" ) {
  2512. // if ( rdo_calrflag.label == "계수법" ) {
  2513. // var item20 = " * 열량 : " + opt_calr.value + " kcal/day ( " + rdo_stndbdwtflag.label + " * " + ipt_adoptlawcalr.value + " kcal/kg )" + "\n";
  2514. // } else if ( rdo_calrflag.label == "HB" ) {
  2515. // var item20 = " * 열량 : " + opt_calr.value + " kcal/day ( BEE : " + opt_calrhb.value + ", AF : " + ipt_hbcalr1.value + ", SF : " + ipt_hbcalr2.value + " )" + "\n";
  2516. // }
  2517. // } else {
  2518. // var item20 = "";
  2519. // }
  2520. // if ( opt_protqty.value != "" ) {
  2521. // var item21 = " * 단백질 : " + opt_protqty.value + " g/day ( " + rdo_stndbdwtflag.label + " * " + ipt_protqty.value + " g/kg )" + "\n";
  2522. // } else {
  2523. // var item21 = "";
  2524. // }
  2525. // if ( tar_nutrreqqty.value != "" ) {
  2526. // var item22 = " * 기타 : " + tar_nutrreqqty.value +"\n";
  2527. // } else {
  2528. // var item22 = "";
  2529. // }
  2530. // var item23 = "\n" + "P :" +"\n";
  2531. // if ( cnstpsn != "" && rdo_unstdgrde.label != "" ) {
  2532. // var item24 = " ο 피상담자 : " + cnstpsn + " 교육이해도 : " + rdo_unstdgrde.label +"\n";
  2533. // } else if ( cnstpsn != "" && rdo_unstdgrde.label == "" ) {
  2534. // var item24 = " ο 피상담자 : " + cnstpsn + "\n";
  2535. // } else if ( cnstpsn == "" && rdo_unstdgrde.label != "" ) {
  2536. // var item24 = " ο 교육이해도 : " + rdo_unstdgrde.label +"\n";
  2537. // } else {
  2538. // var item24 = "";
  2539. // }
  2540. // if ( cmb_cnstcd.label != "" && tar_cnstcnts.value == "" ) {
  2541. // var item25 = " ο 영양상담내용 : " + cmb_cnstcd.label + "\n";
  2542. // } else if ( cmb_cnstcd.label != "" && tar_cnstcnts.value != "" ) {
  2543. // var item25 = " ο 영양상담내용 : " + cmb_cnstcd.label + ", " + tar_cnstcnts.value + "\n";
  2544. // } else if ( cmb_cnstcd.label == "" && tar_cnstcnts.value != "" ) {
  2545. // var item25 = " ο 영양상담내용 : " + tar_cnstcnts.value + "\n";
  2546. // } else {
  2547. // var item25 = "";
  2548. // }
  2549. // if ( cureplan != "" ) {
  2550. // var item26 = " ο 영양치료 계획/권장 : " + cureplan + "\n";
  2551. // } else {
  2552. // var item26 = "";
  2553. // }
  2554. var globalData = getGlobalVariable("ANC00350eventtarget", "A"); // 이벤트가 발생한 그리드
  2555. var target = model.getValue("/root/temp/griddata/gridid"); // 이벤트가 발생한 그리드
  2556. var targetRow = model.getValue("/root/temp/griddata/gridrow"); // 이벤트가 발생한 그리드 row 값
  2557. var item26 = "";
  2558. var carePlanData = "";
  2559. if ( cureplan != "" ) {
  2560. // 영양관리이력 데이터 세팅
  2561. if(target == "grd_nutrmngthist") {
  2562. carePlanData = model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/problemcareplan");
  2563. }
  2564. // 영양검색결과이력 데이터 세팅
  2565. else if(target == "grd_nutrsrchrslthist") {
  2566. carePlanData = model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/problemcareplan");
  2567. }
  2568. // 초기 입력 데이터 세팅
  2569. else {
  2570. carePlanData = model.getValue("/root/temp/senddata/problemcareplan");
  2571. }
  2572. if(carePlanData != "") {
  2573. item26 = item26 + " ο Problem : Plan" + "\n";
  2574. // 로우 데이터 별로 나누기
  2575. carePlanData = carePlanData.split("§");
  2576. for(var i = 1; i <= carePlanData.length; ++i) {
  2577. var problemPlanData = carePlanData[i-1].split("▦");
  2578. item26 = item26 + " " + problemPlanData[0] + " : " + problemPlanData[1] + "\n";
  2579. }
  2580. }
  2581. item26 = item26 + " ο 영양치료 계획/권장 : " + cureplan + "\n";
  2582. } else {
  2583. // 영양관리이력 데이터 세팅
  2584. if(target == "grd_nutrmngthist") {
  2585. carePlanData = model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/problemcareplan");
  2586. }
  2587. // 영양검색결과이력 데이터 세팅
  2588. else if(target == "grd_nutrsrchrslthist") {
  2589. carePlanData = model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/problemcareplan");
  2590. }
  2591. // 초기 입력 데이터 세팅
  2592. else {
  2593. carePlanData = model.getValue("/root/temp/senddata/problemcareplan");
  2594. }
  2595. if(carePlanData != "") {
  2596. item26 = item26 + " ο Problem : Plan" + "\n";
  2597. // 로우 데이터 별로 나누기
  2598. carePlanData = carePlanData.split("§");
  2599. for(var i = 1; i <= carePlanData.length; ++i) {
  2600. var problemPlanData = carePlanData[i-1].split("▦");
  2601. item26 = item26 + " " + problemPlanData[0] + " : " + problemPlanData[1] + "\n";
  2602. }
  2603. }
  2604. }
  2605. if ( cmb_intndieter.label != "" ) {
  2606. var item27 = "\n 감사합니다. " + ipt_execdd.value.substr(0,4) + "/" + ipt_execdd.value.substr(4,2) + "/" +
  2607. ipt_execdd.value.substr(6,2) + " 영양사 " + cmb_chrgdieter.label + "/ " + cmb_intndieter.label + "\n";
  2608. } else {
  2609. var item27 = "\n 감사합니다. " + ipt_execdd.value.substr(0,4) + "/" + ipt_execdd.value.substr(4,2) + "/" +
  2610. ipt_execdd.value.substr(6,2) + " 영양사 " + cmb_chrgdieter.label + "\n";
  2611. }
  2612. replcnts = item1 + item26 + item27;
  2613. model.setValue("/root/main/maindata/nutrstatjudg/replcnts", replcnts);
  2614. model.refresh();
  2615. //btn_repl.dispatch("DOMActivate"); //회신 탭화면으로 이동
  2616. //btn_repl.selected = true;
  2617. }
  2618. // 신체계측결과 계산
  2619. function fPhysMeasRsltCalc() {
  2620. if (model.getValue("/root/main/maindata/nutrstatjudg/physmeasbdht") <= 0 ||
  2621. model.getValue("/root/main/maindata/nutrstatjudg/physmeasbdht") == "" ||
  2622. model.getValue("/root/main/maindata/nutrstatjudg/physmeasbdwt") <= 0 ||
  2623. model.getValue("/root/main/maindata/nutrstatjudg/physmeasbdwt") == "" ) {
  2624. messageBox("키(Ht), 현재체중(Wt)을", "C001");
  2625. return;
  2626. }
  2627. var sex = model.getValue("/root/main/maindata/patbaseinfo/sex"); // 성별
  2628. var age = model.getValue("/root/main/maindata/patbaseinfo/age"); // 나이
  2629. var ht = model.getValue("/root/main/maindata/nutrstatjudg/physmeasbdht"); // 키
  2630. var wt = model.getValue("/root/main/maindata/nutrstatjudg/physmeasbdwt"); // 현재체중
  2631. var ubw = model.getValue("/root/main/maindata/nutrstatjudg/physmeasubw"); // 평소체중
  2632. var ibw = model.getValue("/root/main/maindata/nutrstatjudg/physmeasibw"); // 표준체중
  2633. var pibw = 0; // 표준체중 백분율
  2634. var abw = 0; // 조정체중
  2635. var changewt = 0; // 변경체중
  2636. var changewtrate = 0; // 변경체중율
  2637. // IBW, PIBW 계산
  2638. if (ibw == "") {
  2639. if (sex == "M") {
  2640. ibw = ((ht/100)*(ht/100)*22);
  2641. } else {
  2642. ibw = ((ht/100)*(ht/100)*21);
  2643. }
  2644. }
  2645. pibw = wt / ibw * 100;
  2646. pibw = pibw.toString().getRound(-2, "HALF_UP");
  2647. // ABW 계산
  2648. if ( pibw >= 120 ) {
  2649. //abw = ibw + (wt - ibw) * 0.25;
  2650. abw = parseFloat(ibw) + parseFloat((wt - ibw) * 0.25);
  2651. abw = abw.toString().getRound(-2, "HALF_UP");
  2652. model.setValue("/root/main/maindata/nutrstatjudg/physmeasabw", abw);
  2653. } else {
  2654. // abw = "";
  2655. // model.setValue("/root/main/maindata/nutrstatjudg/physmeasabw", abw);
  2656. model.resetInstanceNode("/root/main/maindata/nutrstatjudg/physmeasabw");
  2657. }
  2658. // 협진의뢰,추구관리의 영양요구량의 기준체중을 '표준체중'으로 셋팅
  2659. model.setValue("/root/main/maindata/cnstreq/stndbdwtflag1", "1");
  2660. model.setValue("/root/main/maindata/cnstreq/stndbdwt1", ibw);
  2661. model.setValue("/root/main/maindata/pursmngt/stndbdwtflag2", "1");
  2662. model.setValue("/root/main/maindata/pursmngt/stndbdwt2", ibw);
  2663. // 변경체중, 변경체중율 계산
  2664. if ( ubw > 0 && ubw != "" ) {
  2665. changewt = wt - ubw;
  2666. changewtrate = ((wt - ubw)/ubw) * 100;
  2667. changewtrate = changewtrate.toString().getRound(-2, "HALF_UP");
  2668. } else {
  2669. changewt = "";
  2670. changewtrate = "";
  2671. }
  2672. ibw = ibw.toString().getRound(-2, "HALF_UP");
  2673. model.setValue("/root/main/maindata/nutrstatjudg/physmeasibw", ibw);
  2674. model.setValue("/root/main/maindata/nutrstatjudg/physmeasibwperc", pibw);
  2675. if (pibw != "") {
  2676. var ilen = pibw.length;
  2677. if (ilen > 0){
  2678. if (pibw.substr(ilen - 2, ilen - 1) == ".0"){
  2679. ipt_physmeasibwperc.attribute("format") = "###";
  2680. }else{
  2681. ipt_physmeasibwperc.attribute("format") = "###.9";
  2682. }
  2683. }
  2684. }
  2685. // model.setValue("/root/main/maindata/nutrstatjudg/physmeasabw", abw);
  2686. model.setValue("/root/main/maindata/nutrstatjudg/bdwtupdtqty", changewt);
  2687. model.setValue("/root/main/maindata/nutrstatjudg/bdwtupdtrate", changewtrate);
  2688. model.refresh();
  2689. }
  2690. /*
  2691. * 다학제간 전송 필수 데이터 체크
  2692. */
  2693. function checkENREDUData() {
  2694. var m = "";
  2695. var instcd = "";
  2696. var pid = "";
  2697. var orddd = "";
  2698. var cretno = "";
  2699. var histno = "";
  2700. var delyn = "";
  2701. var educd = "";
  2702. var educnts = "";
  2703. var eduprepyn = "";
  2704. var eduwho = "";
  2705. var eduway = "";
  2706. var edurslt = "";
  2707. var edudd = "";
  2708. var edutm = "";
  2709. var eduid = "";
  2710. var fstrgstrid = "";
  2711. var fstrgstdt = "";
  2712. var lastupdtrid = "";
  2713. var lastupdtdt = "";
  2714. var cnts = cmb_cnstcd.label; // 상용구선택
  2715. var cnstcnts = model.getValue("/root/main/maindata/cnstreq/cnstcnts"); // 상용구 아래 텍스트 박스 내용
  2716. var cnstpsn1 = chk_cnstpsn.label; // 피상담자
  2717. // 피상담자
  2718. cnstpsn1 = cnstpsn1.replace("▦", ", ");
  2719. // 교육내용
  2720. if(cnts == "" && cnstcnts == "") {
  2721. cnts = "";
  2722. }
  2723. var globalData = getGlobalVariable("ANC00350eventtarget", "A"); // 이벤트가 발생한 그리드
  2724. var target = model.getValue("/root/temp/griddata/gridid"); // 이벤트가 발생한 그리드
  2725. var targetRow = model.getValue("/root/temp/griddata/gridrow"); // 이벤트가 발생한 그리드 row 값
  2726. // 팝업으로 "환자별영양관리" 화면이 뜰때 부모 창에서 '/root/main/receivedata' 쪽으로 데이터를 세팅해서 넘겨준다.
  2727. var h_orddd = model.getValue("/root/main/receivedata/h_orddd");
  2728. if(h_orddd == "" || h_orddd == null) {
  2729. h_orddd = model.getValue("/root/main/maindata/patbaseinfo/indd"); // 환자의 최근 이력의 입원/외래 일자로 세팅
  2730. }
  2731. // 팝업으로 "환자별영양관리" 화면이 뜰때 부모 창에서 '/root/main/receivedata' 쪽으로 데이터를 세팅해서 넘겨준다.
  2732. var h_cretno = model.getValue("/root/main/receivedata/h_cretno");
  2733. if(h_cretno == "" || h_cretno == null) {
  2734. h_cretno = model.getValue("/root/main/maindata/patbaseinfo/cretno"); // 환자의 최근 이력의 입원/외래 등록번호로 세팅
  2735. }
  2736. // 영양관리이력 데이터 세팅
  2737. if(target == "grd_nutrmngthist") {
  2738. instcd = model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/instcd");
  2739. pid = model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/pid");
  2740. // 입원/외래 일자 세팅
  2741. if(model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/indd") == "") {
  2742. orddd = h_orddd;
  2743. } else {
  2744. orddd = model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/indd");
  2745. }
  2746. // 입원/외래 등록번호
  2747. if(model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/cretno") == "") {
  2748. cretno = h_cretno;
  2749. } else {
  2750. cretno = model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/cretno");
  2751. }
  2752. histno = "";
  2753. delyn = model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/delyn");
  2754. educd = model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/educd");
  2755. educnts = cnts;
  2756. eduprepyn = model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/eduprepyn");
  2757. eduwho = cnstpsn1;
  2758. eduway = model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/eduway");
  2759. edurslt = model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/edurslt");
  2760. edudd = model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/edudd");
  2761. edutm = model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/edutm");
  2762. eduid = "";
  2763. fstrgstrid = "";
  2764. fstrgstdt = "";
  2765. lastupdtrid = "";
  2766. lastupdtdt = "";
  2767. }
  2768. // 영양검색결과이력 데이터 세팅
  2769. else if(target == "grd_nutrsrchrslthist") {
  2770. instcd = model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/instcd");
  2771. pid = model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/pid");
  2772. // 입원/외래 일자 세팅
  2773. if(model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/indd") == "") {
  2774. orddd = h_orddd;
  2775. } else {
  2776. orddd = model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/indd");
  2777. }
  2778. // 입원/외래 등록번호
  2779. if(model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/cretno") == "") {
  2780. cretno = h_cretno;
  2781. } else {
  2782. cretno = model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/cretno");
  2783. }
  2784. histno = "";
  2785. delyn = model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/delyn");
  2786. educd = model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/educd");
  2787. educnts = cnts;
  2788. eduprepyn = model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/eduprepyn");
  2789. eduwho = cnstpsn1;
  2790. eduway = model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/eduway");
  2791. edurslt = model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/edurslt");
  2792. edudd = model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/edudd");
  2793. edutm = model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/edutm");
  2794. eduid = "";
  2795. fstrgstrid = "";
  2796. fstrgstdt = "";
  2797. lastupdtrid = "";
  2798. lastupdtdt = "";
  2799. } else {
  2800. instcd = model.getValue("/root/main/maindata/patbaseinfo/instcd");
  2801. pid = model.getValue("/root/main/maindata/patbaseinfo/pid");
  2802. // 입원/외래 일자 세팅
  2803. orddd = h_orddd;
  2804. // 입원/외래 등록번호
  2805. cretno = h_cretno;
  2806. histno = "";
  2807. delyn = model.getValue("/root/temp/senddata/delyn");
  2808. educd = model.getValue("/root/temp/senddata/educd");
  2809. educnts = cnts;
  2810. eduprepyn = model.getValue("/root/temp/senddata/eduprepyn");
  2811. eduwho = cnstpsn1;
  2812. eduway = model.getValue("/root/temp/senddata/eduway");
  2813. edurslt = model.getValue("/root/temp/senddata/edurslt");
  2814. edudd = model.getValue("/root/temp/senddata/edudd");
  2815. edutm = model.getValue("/root/temp/senddata/edutm");
  2816. eduid = "";
  2817. fstrgstrid = "";
  2818. fstrgstdt = "";
  2819. lastupdtrid = "";
  2820. lastupdtdt = "";
  2821. }
  2822. // 다학제간 전송 필수 데이터 체크
  2823. if(instcd == "" || pid == "" || orddd == "" || cretno == "" ||
  2824. delyn == "" || educd == "" || educnts == "" || eduprepyn == "" ||
  2825. eduwho == "" || eduway == "" || edurslt == "" || edudd == "" ||
  2826. edutm == "") {
  2827. messageBox(" 다학제 전송 항목인 '영양상담내용', '학습준비도', '교육대상자', '교육방법', '교육결과' 는", "I003");
  2828. return false;
  2829. }
  2830. // 다학제간 전송 필수 데이터 체크
  2831. if(edudd == "" || edutm == "") {
  2832. messageBox("다학제간 전송 필수 항목인 '교육일자', '교육시간' 은", "I003");
  2833. return false;
  2834. }
  2835. return true;
  2836. }
  2837. /*
  2838. * 다학제간 관련 ENR 데이터 전송
  2839. */
  2840. function sendENREDUData() {
  2841. // 다학제간 전송 필수 데이터 체크
  2842. if(!checkENREDUData()) {
  2843. return false;
  2844. }
  2845. var sColSep = "▦";
  2846. var sRowSep = "▩";
  2847. // 그리드 헤더값 생성
  2848. var rCSV = "m▦instcd▦pid▦orddd▦cretno▦histno▦delyn▦educd▦educnts▦eduprepyn▦eduwho▦eduway▦edurslt▦edudd▦edutm▦eduid▦fstrgstrid▦fstrgstdt▦lastupdtrid▦lastupdtdt";
  2849. var m = "";
  2850. var instcd = "";
  2851. var pid = "";
  2852. var orddd = "";
  2853. var cretno = "";
  2854. var histno = "";
  2855. var delyn = "";
  2856. var educd = "";
  2857. var educnts = "";
  2858. var eduprepyn = "";
  2859. var eduwho = "";
  2860. var eduway = "";
  2861. var edurslt = "";
  2862. var edudd = "";
  2863. var edutm = "";
  2864. var eduid = "";
  2865. var fstrgstrid = "";
  2866. var fstrgstdt = "";
  2867. var lastupdtrid = "";
  2868. var lastupdtdt = "";
  2869. var globalData = getGlobalVariable("ANC00350eventtarget", "A"); // 이벤트가 발생한 그리드
  2870. var target = model.getValue("/root/temp/griddata/gridid"); // 이벤트가 발생한 그리드
  2871. var targetRow = model.getValue("/root/temp/griddata/gridrow"); // 이벤트가 발생한 그리드 row 값
  2872. // 팝업으로 "환자별영양관리" 화면이 뜰때 부모 창에서 '/root/main/receivedata' 쪽으로 데이터를 세팅해서 넘겨준다.
  2873. var h_orddd = model.getValue("/root/main/receivedata/h_orddd");
  2874. if(h_orddd == "" || h_orddd == null) {
  2875. h_orddd = model.getValue("/root/main/maindata/patbaseinfo/indd"); // 환자의 최근 이력의 입원/외래 일자로 세팅
  2876. }
  2877. // 팝업으로 "환자별영양관리" 화면이 뜰때 부모 창에서 '/root/main/receivedata' 쪽으로 데이터를 세팅해서 넘겨준다.
  2878. var h_cretno = model.getValue("/root/main/receivedata/h_cretno");
  2879. if(h_cretno == "" || h_cretno == null) {
  2880. h_cretno = model.getValue("/root/main/maindata/patbaseinfo/cretno"); // 환자의 최근 이력의 입원/외래 등록번호로 세팅
  2881. }
  2882. // 영양관리이력 데이터 세팅
  2883. if(target == "grd_nutrmngthist") {
  2884. m = "i";
  2885. instcd = model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/instcd");
  2886. pid = model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/pid");
  2887. // 입원/외래 일자
  2888. if(model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/indd") == "") {
  2889. orddd = h_orddd;
  2890. } else {
  2891. orddd = model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/indd");
  2892. }
  2893. // 입원/외래 등록번호
  2894. if(model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/cretno") == "") {
  2895. cretno = h_cretno;
  2896. } else {
  2897. cretno = model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/cretno");
  2898. }
  2899. histno = "";
  2900. delyn = model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/delyn");
  2901. educd = model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/educd");
  2902. educnts = model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/educnts");
  2903. eduprepyn = model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/eduprepyn");
  2904. eduwho = model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/eduwho");
  2905. eduway = model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/eduway");
  2906. edurslt = model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/edurslt");
  2907. edudd = model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/edudd");
  2908. edutm = model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/edutm");
  2909. eduid = "";
  2910. fstrgstrid = "";
  2911. fstrgstdt = "";
  2912. lastupdtrid = "";
  2913. lastupdtdt = "";
  2914. }
  2915. // 영양검색결과이력 데이터 세팅
  2916. else if(target == "grd_nutrsrchrslthist") {
  2917. m = "i";
  2918. instcd = model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/instcd");
  2919. pid = model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/pid");
  2920. // 입원/외래 일자
  2921. if(model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/indd") == "") {
  2922. orddd = h_orddd;
  2923. } else {
  2924. orddd = model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/indd");
  2925. }
  2926. // 입원/외래 등록번호
  2927. if(model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/cretno") == "") {
  2928. cretno = h_cretno;
  2929. } else {
  2930. cretno = model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/cretno");
  2931. }
  2932. histno = "";
  2933. delyn = model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/delyn");
  2934. educd = model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/educd");
  2935. educnts = model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/educnts");
  2936. eduprepyn = model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/eduprepyn");
  2937. eduwho = model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/eduwho");
  2938. eduway = model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/eduway");
  2939. edurslt = model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/edurslt");
  2940. edudd = model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/edudd");
  2941. edutm = model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/edutm");
  2942. eduid = "";
  2943. fstrgstrid = "";
  2944. fstrgstdt = "";
  2945. lastupdtrid = "";
  2946. lastupdtdt = "";
  2947. } else {
  2948. m = "i";
  2949. instcd = model.getValue("/root/main/maindata/patbaseinfo/instcd");
  2950. pid = model.getValue("/root/main/maindata/patbaseinfo/pid");
  2951. // 입원/외래 일자
  2952. orddd = h_orddd;
  2953. // 입원/외래 등록번호
  2954. cretno = h_cretno;
  2955. histno = "";
  2956. delyn = model.getValue("/root/temp/senddata/delyn");
  2957. educd = model.getValue("/root/temp/senddata/educd");
  2958. educnts = model.getValue("/root/temp/senddata/educnts");
  2959. eduprepyn = model.getValue("/root/temp/senddata/eduprepyn");
  2960. eduwho = model.getValue("/root/temp/senddata/eduwho");
  2961. eduway = model.getValue("/root/temp/senddata/eduway");
  2962. edurslt = model.getValue("/root/temp/senddata/edurslt");
  2963. edudd = model.getValue("/root/temp/senddata/edudd");
  2964. edutm = model.getValue("/root/temp/senddata/edutm");
  2965. eduid = "";
  2966. fstrgstrid = "";
  2967. fstrgstdt = "";
  2968. lastupdtrid = "";
  2969. lastupdtdt = "";
  2970. }
  2971. // ENR 전송 데이터 생성
  2972. rCSV +=
  2973. sRowSep +
  2974. m + sColSep +
  2975. instcd + sColSep +
  2976. pid + sColSep +
  2977. orddd + sColSep +
  2978. cretno + sColSep +
  2979. histno + sColSep +
  2980. delyn + sColSep +
  2981. educd + sColSep +
  2982. educnts + sColSep +
  2983. eduprepyn + sColSep +
  2984. eduwho + sColSep +
  2985. eduway + sColSep +
  2986. edurslt + sColSep +
  2987. edudd + sColSep +
  2988. edutm + sColSep +
  2989. eduid + sColSep +
  2990. fstrgstrid + sColSep +
  2991. fstrgstdt + sColSep +
  2992. lastupdtrid + sColSep +
  2993. lastupdtdt;
  2994. // 다학제간 관련 전송 데이터 세팅
  2995. model.makeValue("/root/send/data/mrjhedu/listdata", rCSV);
  2996. if(submit("TXANC00356")) {
  2997. return true;
  2998. } else {
  2999. messageBox("다학제간 전송 처리 오류!! 시스템 담당자에게 문의", "I008");
  3000. return false;
  3001. }
  3002. }
  3003. /*
  3004. * Care Plan 전송 필수 데이터 체크
  3005. */
  3006. function checkENRCAREPLANData() {
  3007. var instcd = "";
  3008. var careplanseq = "";
  3009. var pid = "";
  3010. var orddd = "";
  3011. var cretno = "";
  3012. var workflag = "";
  3013. var problem = "";
  3014. var careplan = "";
  3015. var rgstdd = "";
  3016. var rgsttm = "";
  3017. var problemcareplan = "";
  3018. var globalData = getGlobalVariable("ANC00350eventtarget", "A"); // 이벤트가 발생한 그리드
  3019. var target = model.getValue("/root/temp/griddata/gridid"); // 이벤트가 발생한 그리드
  3020. var targetRow = model.getValue("/root/temp/griddata/gridrow"); // 이벤트가 발생한 그리드 row 값
  3021. // 팝업으로 "환자별영양관리" 화면이 뜰때 부모 창에서 '/root/main/receivedata' 쪽으로 데이터를 세팅해서 넘겨준다.
  3022. var h_orddd = model.getValue("/root/main/receivedata/h_orddd");
  3023. if(h_orddd == "" || h_orddd == null) {
  3024. h_orddd = model.getValue("/root/main/maindata/patbaseinfo/indd"); // 환자의 최근 이력의 입원/외래 일자로 세팅
  3025. }
  3026. // 팝업으로 "환자별영양관리" 화면이 뜰때 부모 창에서 '/root/main/receivedata' 쪽으로 데이터를 세팅해서 넘겨준다.
  3027. var h_cretno = model.getValue("/root/main/receivedata/h_cretno");
  3028. if(h_cretno == "" || h_cretno == null) {
  3029. h_cretno = model.getValue("/root/main/maindata/patbaseinfo/cretno"); // 환자의 최근 이력의 입원/외래 등록번호로 세팅
  3030. }
  3031. // 영양관리이력 데이터 세팅
  3032. if(target == "grd_nutrmngthist") {
  3033. instcd = model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/instcd");
  3034. pid = model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/pid");
  3035. // 입원/외래 일자
  3036. if(model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/indd") == "") {
  3037. orddd = h_orddd;
  3038. } else {
  3039. orddd = model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/indd");
  3040. }
  3041. // 입원/외래 등록번호
  3042. if(model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/cretno") == "") {
  3043. cretno = h_cretno;
  3044. } else {
  3045. cretno = model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/cretno");
  3046. }
  3047. workflag = model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/workflag");
  3048. problemcareplan = model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/problemcareplan");
  3049. rgstdd = model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/rgstdd");
  3050. rgsttm = model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/rgsttm");
  3051. }
  3052. // 영양검색결과이력 데이터 세팅
  3053. else if(target == "grd_nutrsrchrslthist") {
  3054. instcd = model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/instcd");
  3055. pid = model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/pid");
  3056. // 입원/외래 일자
  3057. if(model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/indd") == "") {
  3058. orddd = h_orddd;
  3059. } else {
  3060. orddd = model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/indd");
  3061. }
  3062. // 입원/외래 등록일자
  3063. if(model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/cretno") == "") {
  3064. cretno = h_cretno;
  3065. } else {
  3066. cretno = model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/cretno");
  3067. }
  3068. workflag = model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/workflag");
  3069. problemcareplan = model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/problemcareplan");
  3070. rgstdd = model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/rgstdd");
  3071. rgsttm = model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/rgsttm");
  3072. }
  3073. // 초기 입력 데이터 세팅
  3074. else {
  3075. instcd = model.getValue("/root/main/maindata/patbaseinfo/instcd");
  3076. pid = model.getValue("/root/main/maindata/patbaseinfo/pid");
  3077. // 입원/외래 일자
  3078. orddd = h_orddd;
  3079. // 입원/외래 등록번호
  3080. cretno = h_cretno;
  3081. workflag = model.getValue("/root/temp/senddata/workflag");
  3082. problemcareplan = model.getValue("/root/temp/senddata/problemcareplan");
  3083. rgstdd = model.getValue("/root/temp/senddata/rgstdd");
  3084. rgsttm = model.getValue("/root/temp/senddata/rgsttm");
  3085. }
  3086. // Care Plan 전송 필수 데이터 체크
  3087. if(instcd == "" || pid == "" || orddd == "" || cretno == "" ||
  3088. workflag == "" || problemcareplan == "" || rgstdd == "" ||
  3089. rgsttm == "") {
  3090. messageBox("Care Plan 전송 항목인 'problem', 'plan', '등록일자', '등록시간' 은", "I003");
  3091. return false;
  3092. }
  3093. return true;
  3094. }
  3095. /*
  3096. * Care Plan 관련 ENR 데이터 전송
  3097. */
  3098. function sendENRCAREPLANData() {
  3099. // Care Plan 전송 필수 데이터 체크
  3100. if(!checkENRCAREPLANData()) {
  3101. return false;
  3102. }
  3103. var sendCheck = "N";
  3104. var sColSep = "▦";
  3105. var sRowSep = "▩";
  3106. // 그리드 헤더값 생성
  3107. var rCSV = "m▦instcd▦careplanseq▦pid▦orddd▦cretno▦workflag▦problem▦careplan▦rgstdd▦rgsttm";
  3108. var m = "";
  3109. var instcd = "";
  3110. var careplanseq = "";
  3111. var pid = "";
  3112. var orddd = "";
  3113. var cretno = "";
  3114. var workflag = "";
  3115. var problem = "";
  3116. var careplan = "";
  3117. var rgstdd = "";
  3118. var rgsttm = "";
  3119. var problemcareplan = "";
  3120. var globalData = getGlobalVariable("ANC00350eventtarget", "A"); // 이벤트가 발생한 그리드
  3121. var target = model.getValue("/root/temp/griddata/gridid"); // 이벤트가 발생한 그리드
  3122. var targetRow = model.getValue("/root/temp/griddata/gridrow"); // 이벤트가 발생한 그리드 row 값
  3123. // 팝업으로 "환자별영양관리" 화면이 뜰때 부모 창에서 '/root/main/receivedata' 쪽으로 데이터를 세팅해서 넘겨준다.
  3124. var h_orddd = model.getValue("/root/main/receivedata/h_orddd");
  3125. if(h_orddd == "" || h_orddd == null) {
  3126. h_orddd = model.getValue("/root/main/maindata/patbaseinfo/indd"); // 환자의 최근 이력의 입원/외래 일자로 세팅
  3127. }
  3128. // 팝업으로 "환자별영양관리" 화면이 뜰때 부모 창에서 '/root/main/receivedata' 쪽으로 데이터를 세팅해서 넘겨준다.
  3129. var h_cretno = model.getValue("/root/main/receivedata/h_cretno");
  3130. if(h_cretno == "" || h_cretno == null) {
  3131. h_cretno = model.getValue("/root/main/maindata/patbaseinfo/cretno"); // 환자의 최근 이력의 입원/외래 등록번호로 세팅
  3132. }
  3133. // 영양관리이력 데이터 세팅
  3134. if(target == "grd_nutrmngthist") {
  3135. m = "i";
  3136. instcd = model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/instcd");
  3137. careplanseq = "";
  3138. pid = model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/pid");
  3139. // 입원/외래 일자
  3140. if(model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/indd") == "") {
  3141. orddd = h_orddd;
  3142. } else {
  3143. orddd = model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/indd");
  3144. }
  3145. // 입원/외래 등록번호
  3146. if(model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/cretno") == "") {
  3147. cretno = h_cretno;
  3148. } else {
  3149. cretno = model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/cretno");
  3150. }
  3151. workflag = model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/workflag");
  3152. problemcareplan = model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/problemcareplan");
  3153. rgstdd = model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/rgstdd");
  3154. rgsttm = model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/rgsttm");
  3155. }
  3156. // 영양검색결과이력 데이터 세팅
  3157. else if(target == "grd_nutrsrchrslthist") {
  3158. m = "i";
  3159. instcd = model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/instcd");
  3160. careplanseq = "";
  3161. pid = model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/pid");
  3162. // 입원/외래 일자
  3163. if(model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/indd") == "") {
  3164. orddd = h_orddd;
  3165. } else {
  3166. orddd = model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/indd");
  3167. }
  3168. // 입원/외래 등록번호
  3169. if(model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/cretno") == "") {
  3170. cretno = h_cretno;
  3171. } else {
  3172. cretno = model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/cretno");
  3173. }
  3174. workflag = model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/workflag");
  3175. problemcareplan = model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/problemcareplan");
  3176. rgstdd = model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/rgstdd");
  3177. rgsttm = model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/rgsttm");
  3178. }
  3179. // 초기 입력 데이터 세팅
  3180. else {
  3181. m = "i";
  3182. instcd = model.getValue("/root/main/maindata/patbaseinfo/instcd");
  3183. careplanseq = "";
  3184. pid = model.getValue("/root/main/maindata/patbaseinfo/pid");
  3185. // 입원/외래 일자
  3186. orddd = h_orddd;
  3187. // 입원/외래 등록번호
  3188. cretno = h_cretno;
  3189. workflag = model.getValue("/root/temp/senddata/workflag");
  3190. problemcareplan = model.getValue("/root/temp/senddata/problemcareplan");
  3191. rgstdd = model.getValue("/root/temp/senddata/rgstdd");
  3192. rgsttm = model.getValue("/root/temp/senddata/rgsttm");
  3193. }
  3194. // problem, careplan 데이터 나누기
  3195. var splitData = problemcareplan.split("§");
  3196. for(var i = 0; i < splitData.length; ++i) {
  3197. rCSV +=
  3198. sRowSep +
  3199. m + sColSep +
  3200. instcd + sColSep +
  3201. careplanseq + sColSep +
  3202. pid + sColSep +
  3203. orddd + sColSep +
  3204. cretno + sColSep +
  3205. workflag + sColSep +
  3206. splitData[i] + sColSep +
  3207. rgstdd + sColSep +
  3208. rgsttm;
  3209. }
  3210. // Care Plan 관련 전송 데이터 세팅
  3211. model.makeValue("/root/send/data/careplan/listdata", rCSV);
  3212. if(submit("TXANC00357")) {
  3213. return true;
  3214. } else {
  3215. messageBox("Care Plan 전송 처리 오류!! 시스템 담당자에게 문의", "I008");
  3216. return false;
  3217. }
  3218. }
  3219. ]]>
  3220. </script>
  3221. <submission id="TRZBC00101"/>
  3222. <submission id="TRANC00302" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/searchitem" resultref="/root/main/maindata/cureplan"/>
  3223. <submission id="TRANC00303" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/searchitem" resultref="/root/main/testrslt"/>
  3224. <submission id="TRANC00304" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data/maindata/nutrstatjudg" resultref="/root/temp/cnst"/>
  3225. <submission id="TRANC00102" mediatype="application/x-www-form-urlencoded" method="post" resultref="/root/init/nutrjudgbase"/>
  3226. <submission id="TRANC00202" mediatype="application/x-www-form-urlencoded" method="post" resultref="/root/init/basecode/dieter"/>
  3227. <submission id="TXANC00302" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data/maindata/cnstreq" replace="instance" resultref="/root/hidden/ret"/>
  3228. <submission id="TXANC00303" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data/maindata/pursmngt" replace="instance" resultref="/root/hidden/ret"/>
  3229. <submission id="TXANC00304" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data/maindata" resultref="/root/hidden"/>
  3230. <submission id="TXANC00305" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data/maindata/nutrstatjudg"/>
  3231. <submission id="TRANC00351" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/searchitem" replace="instance" resultref="/root/main/maindata"/>
  3232. <submission id="TXANC00351" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data/maindata/nutrstatjudg" replace="instance" resultref="/root/hidden/ret"/>
  3233. <submission id="TXANC00356" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data/mrjhedu" resultref="/root/hidden/msglist"/>
  3234. <submission id="TXANC00357" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data/careplan" resultref="/root/hidden/msglist"/>
  3235. </model>
  3236. </xhtml:head>
  3237. <xhtml:body guideline="1,1197;2,0;2,14;2,758;2,783;">
  3238. <group id="grp_tle" style="left:0px; top:0px; width:1195px; height:13px; ">
  3239. <caption id="caption19" class="tit_1" style="left:0px; top:0px; width:111px; height:14px; ">환자별 영양관리</caption>
  3240. </group>
  3241. <group id="grp_biz" scroll="auto" style="left:0px; top:13px; width:1195px; height:744px; ">
  3242. <button id="btn_patinfo" class="btn3_letter6" style="left:5px; top:46px; width:104px; height:22px; ">
  3243. <caption>환자기본정보</caption>
  3244. <script type="javascript" ev:event="onclick">
  3245. <![CDATA[
  3246. if (grp_patinfo.attribute("visibility")=="visible") {
  3247. grp_patinfo.attribute("visibility")="hidden";
  3248. grd_diag.attribute("visibility")="visible";
  3249. caption42.attribute("visibility")="visible";
  3250. line25.attribute("visibility")="visible";
  3251. line24.attribute("visibility")="visible";
  3252. caption43.attribute("visibility")="visible";
  3253. line26.attribute("visibility")="visible";
  3254. line27.attribute("visibility")="visible";
  3255. grd_inmotv.attribute("visibility")="visible";
  3256. } else if (grp_patinfo.attribute("visibility")=="hidden") {
  3257. grp_patinfo.attribute("visibility")="visible";
  3258. grd_diag.attribute("visibility")="hidden";
  3259. caption42.attribute("visibility")="hidden";
  3260. line25.attribute("visibility")="hidden";
  3261. line24.attribute("visibility")="hidden";
  3262. caption43.attribute("visibility")="hidden";
  3263. line26.attribute("visibility")="hidden";
  3264. line27.attribute("visibility")="hidden";
  3265. grd_inmotv.attribute("visibility")="hidden";
  3266. }
  3267. ]]>
  3268. </script>
  3269. </button>
  3270. <group id="grp_patinfo" style="left:0px; top:75px; width:315px; height:220px; ">
  3271. <line id="line21" class="line_1" style="x1:0px; y1:0px; x2:315px; y2:0px; "/>
  3272. <caption id="caption21" class="cell_1" style="left:159px; top:54px; width:65px; height:23px; vertical-align:middle; ">휴대전화</caption>
  3273. <caption id="caption22" class="cell_1" style="left:0px; top:79px; width:65px; height:49px; vertical-align:middle; ">주소</caption>
  3274. <caption id="caption23" class="cell_1" style="left:0px; top:4px; width:65px; height:23px; vertical-align:middle; ">환자명</caption>
  3275. <caption id="caption24" class="cell_1" style="left:0px; top:130px; width:65px; height:23px; vertical-align:middle; ">입원/외래</caption>
  3276. <caption id="caption33" class="cell_1" style="left:159px; top:4px; width:65px; height:23px; vertical-align:middle; ">생년월일</caption>
  3277. <caption id="caption34" class="cell_1" style="left:0px; top:29px; width:65px; height:23px; vertical-align:middle; ">성별</caption>
  3278. <caption id="caption35" class="cell_1" style="left:159px; top:29px; width:65px; height:23px; vertical-align:middle; ">나이</caption>
  3279. <caption id="caption37" class="cell_1" style="left:0px; top:54px; width:65px; height:23px; vertical-align:middle; ">집전화</caption>
  3280. <caption id="caption38" class="cell_1" style="left:0px; top:154px; width:65px; height:23px; vertical-align:middle; ">진료과</caption>
  3281. <caption id="caption39" class="cell_1" style="left:159px; top:154px; width:65px; height:23px; vertical-align:middle; ">전문의</caption>
  3282. <caption id="caption40" class="cell_1" style="left:159px; top:130px; width:65px; height:23px; vertical-align:middle; ">입원일자</caption>
  3283. <caption id="caption41" style="left:108px; top:81px; width:15px; height:20px; vertical-align:middle; ">-</caption>
  3284. <output id="opt_hngnm" ref="/root/main/maindata/patbaseinfo/hngnm" class="output_fix" style="left:68px; top:6px; width:88px; height:19px; text-align:center; "/>
  3285. <output id="opt_brthdd" ref="/root/main/maindata/patbaseinfo/brthdd" class="output_fix" format="yyyy-mm-dd" style="left:227px; top:6px; width:88px; height:19px; text-align:center; "/>
  3286. <output id="opt_sex" ref="/root/main/maindata/patbaseinfo/sex" class="output_fix" style="left:68px; top:31px; width:88px; height:19px; text-align:center; "/>
  3287. <output id="opt_age" ref="/root/main/maindata/patbaseinfo/age" class="output_fix" style="left:227px; top:31px; width:88px; height:19px; text-align:center; "/>
  3288. <output id="opt_hometel" ref="/root/main/maindata/patbaseinfo/hometel" class="output_fix" style="left:68px; top:56px; width:88px; height:19px; text-align:center; "/>
  3289. <output id="opt_mpphontel" ref="/root/main/maindata/patbaseinfo/mpphontel" class="output_fix" style="left:227px; top:56px; width:88px; height:19px; text-align:center; "/>
  3290. <output id="opt_zipcd1" ref="/root/main/maindata/patbaseinfo/zipcd1" class="output_fix" style="left:68px; top:81px; width:37px; height:19px; text-align:center; "/>
  3291. <output id="opt_zipcd2" ref="/root/main/maindata/patbaseinfo/zipcd2" class="output_fix" style="left:119px; top:81px; width:37px; height:19px; text-align:center; "/>
  3292. <output id="opt_addr1" ref="/root/main/maindata/patbaseinfo/zipcdseq" class="output_fix" style="left:159px; top:81px; width:156px; height:19px; "/>
  3293. <output id="opt_addr2" ref="/root/main/maindata/patbaseinfo/detladdr" class="output_fix" style="left:68px; top:106px; width:247px; height:19px; "/>
  3294. <output id="opt_inout" ref="/root/main/maindata/patbaseinfo/inout" class="output_fix" style="left:68px; top:132px; width:88px; height:19px; text-align:center; "/>
  3295. <output id="opt_indd" ref="/root/main/maindata/patbaseinfo/indd" class="output_fix" format="yyyy-mm-dd" style="left:227px; top:132px; width:88px; height:19px; text-align:center; "/>
  3296. <output id="opt_orddept" ref="/root/main/maindata/patbaseinfo/orddeptnm" class="output_fix" style="left:68px; top:156px; width:88px; height:19px; text-align:center; "/>
  3297. <output id="opt_atdoct" ref="/root/main/maindata/patbaseinfo/atdoctnm" class="output_fix" style="left:227px; top:156px; width:88px; height:19px; text-align:center; "/>
  3298. <line id="line138" class="line_3" style="x1:0px; y1:180px; x2:315px; y2:180px; "/>
  3299. </group>
  3300. <group id="group5" style="left:0px; top:9px; width:1194px; height:35px; vertical-align:top; ">
  3301. <shape id="roundrect2" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1194px; height:34px; background-color:#fffbf2; "/>
  3302. <caption id="caption6" class="search_name" style="left:16px; top:8px; width:137px; height:17px; ">등록번호/환자명 :</caption>
  3303. <caption id="caption20" class="search_name" style="left:387px; top:8px; width:89px; height:17px; ">의뢰일자 :</caption>
  3304. <button id="btn_search" class="btn1_letter2" style="left:1122px; top:6px; width:56px; height:22px; ">
  3305. <caption>조회</caption>
  3306. <script type="javascript" ev:event="DOMActivate">
  3307. <![CDATA[
  3308. submit("TRANC00351");
  3309. if (model.getValue("/root/send/searchitem/flag") == 'A') {
  3310. submit("TRANC00302"); //컨설팅별 영양치료계획 조회
  3311. }
  3312. // if ( model.getValue("/root/main/maindata/nutrstatjudg/pid") != "" ) {
  3313. // cmb_nutrmngtkind.value = "";
  3314. // cmb_sickcd.value = "";
  3315. // }
  3316. btn_nutrstatjudg.dispatch("DOMActivate"); //영양상태판정 탭화면으로 이동
  3317. btn_nutrstatjudg.selected = true;
  3318. //의뢰건인 경우 의뢰일자,의뢰자,서식기록번호,의뢰사유 보여주기
  3319. // if ( model.getValue("/root/send/searchitem/flag") == 'B' ) {
  3320. // model.setValue("/root/send/searchitem/reqdd", model.getValue("/root/main/receivedata/reqdd"));
  3321. // model.setValue("/root/send/searchitem/reqpsn", model.getValue("/root/main/receivedata/reqpsn"));
  3322. // model.setValue("/root/send/searchitem/reqresn", model.getValue("/root/main/receivedata/educreqcnts"));
  3323. // model.setValue("/root/send/searchitem/formrecseq", model.getValue("/root/main/receivedata/h_formrecseq"));
  3324. // } else {
  3325. // model.setValue("/root/send/searchitem/reqdd", model.getValue("/root/main/maindata/nutrstatjudg/reqdd"));
  3326. // model.setValue("/root/send/searchitem/reqpsn", model.getValue("/root/main/maindata/nutrstatjudg/reqpsn"));
  3327. // model.setValue("/root/send/searchitem/reqresn", model.getValue("/root/main/maindata/nutrstatjudg/reqresn"));
  3328. // model.setValue("/root/send/searchitem/formrecseq", model.getValue("/root/main/maindata/nutrstatjudg/formrecseq"));
  3329. // }
  3330. opt_reccnts.hint = model.getValue("/root/main/receivedata/reccnts");
  3331. //검사결과 셋팅
  3332. model.setValue("/root/main/testrslt/lis/alb", model.getValue("/root/main/maindata/nutrstatjudg/testrsltalb"));
  3333. model.setValue("/root/main/testrslt/lis/tlc", model.getValue("/root/main/maindata/nutrstatjudg/testrslttlc"));
  3334. model.setValue("/root/main/testrslt/lis/hb", model.getValue("/root/main/maindata/nutrstatjudg/testrslthbhct"));
  3335. model.setValue("/root/main/testrslt/lis/hct", model.getValue("/root/main/maindata/nutrstatjudg/testrslthbhct2"));
  3336. model.setValue("/root/main/testrslt/lis/trf", model.getValue("/root/main/maindata/nutrstatjudg/testrslttrf"));
  3337. // 조회 후 저장된 키, 몸무게가 없으면 환자기본정보의 키, 몸무게를 신체계측결과의 Ht, Wt에 setting
  3338. if ( model.getValue("/root/main/maindata/nutrstatjudg/physmeasbdht")=="" ) {
  3339. model.setValue("/root/main/maindata/nutrstatjudg/physmeasbdht", model.getValue("/root/main/maindata/patbaseinfo/ht"));
  3340. }
  3341. if ( model.getValue("/root/main/maindata/nutrstatjudg/physmeasbdwt")=="" ) {
  3342. model.setValue("/root/main/maindata/nutrstatjudg/physmeasbdwt", model.getValue("/root/main/maindata/patbaseinfo/wt"));
  3343. }
  3344. //컨설트 수행후 화면을 닫지 않은 상태에서 바로 다른 환자의 등록번호를 입력후 조회할 경우
  3345. if ( model.getValue("/root/send/searchitem/pid") != model.getValue("/root/main/receivedatacopy/pid") ) {
  3346. model.resetInstanceNode("/root/main/receivedata");
  3347. model.resetInstanceNode("/root/main/receivedatacopy");
  3348. }
  3349. //다른 화면에서 링크하지 않고 직접 환자의 등록번호를 입력후 조회할 경우 검사결과만 별도로 조회해온다.
  3350. if (model.getValue("/root/send/searchitem/trflag") == 'T') {
  3351. fTestRsltSrch(); //가장 최근 검사결과 조회
  3352. }
  3353. //저장, 삭제, 회신, 회신취소 버튼 활성화 여부
  3354. //회신확정 상태일 경우
  3355. // if ( model.getValue("/root/main/maindata/nutrstatjudg/cnststat") == "30" ) {
  3356. // btn_save.disabled = true; //저장버튼 비활성화
  3357. // btn_del.disabled = true; //삭제버튼 비활성화
  3358. // btn_cnstrepl.disabled = true; //회신버튼 비활성화
  3359. // btn_cnstreplcncl.disabled = true; //회신취소버튼 비활성화
  3360. // }
  3361. //회신을 안한 상태일 경우
  3362. // else if ( model.getValue("/root/main/maindata/nutrstatjudg/cnststat") == "" ||
  3363. // model.getValue("/root/main/maindata/nutrstatjudg/cnststat") < 21 ) {
  3364. // btn_save.disabled = false; //저장버튼 활성화
  3365. // btn_del.disabled = false; //삭제버튼 활성화
  3366. // btn_cnstrepl.disabled = true; //회신버튼 비활성화
  3367. // btn_cnstreplcncl.disabled = true; //회신취소버튼 비활성화
  3368. // }
  3369. //회신은 했지만 회신확정 상태가 아닐 경우
  3370. // else if ( model.getValue("/root/main/maindata/nutrstatjudg/cnststat") != "" &&
  3371. // model.getValue("/root/main/maindata/nutrstatjudg/cnststat") < 30 ) {
  3372. // btn_save.disabled = false; //저장버튼 활성화
  3373. // btn_del.disabled = false; //삭제버튼 활성화
  3374. // btn_cnstrepl.disabled = true; //회신버튼 비활성화
  3375. // btn_cnstreplcncl.disabled = false; //회신취소버튼 활성화
  3376. // }
  3377. // 데이터 초기화
  3378. model.resetInstanceNode("/root/temp/senddata");
  3379. model.refresh();
  3380. ]]>
  3381. </script>
  3382. </button>
  3383. <line id="line14" style="x1:1106px; y1:7px; x2:1106px; y2:29px; "/>
  3384. <input id="ipt_pid" ref="/root/send/searchitem/pid" class="input_s_essential" autonext="false" maxlength="10" style="left:149px; top:7px; width:81px; height:19px; ">
  3385. <script type="javascript" ev:event="onkeydown">
  3386. <![CDATA[
  3387. model.setValue("/root/send/searchitem/hngnm", "");
  3388. model.setValue("/root/send/searchitem/pastexecdd", "");
  3389. model.setValue("/root/send/searchitem/cretno", "");
  3390. model.setValue("/root/send/searchitem/orddeptcd", "");
  3391. model.setValue("/root/send/searchitem/prcpgenrflag", "");
  3392. model.setValue("/root/send/searchitem/orddd", "");
  3393. //flag=B는 화면 왼쪽의 공통정보(환자기본정보,진단명,입원동기,식사처방정보,영양관리이력,영양검색결과이력)만 조회한다는 뜻임.
  3394. model.setValue("/root/send/searchitem/flag", 'B');
  3395. //flag=B는 화면 왼쪽의 공통정보만 조회하므로 trflag를 T로 셋팅하여 최근 검사결과를 추가로 조회한다.
  3396. model.makeValue("/root/send/searchitem/trflag", 'T');
  3397. model.setValue("/root/temp/griddata/gridid", ""); // 그리드 ID 초기화
  3398. model.setValue("/root/temp/griddata/gridrow", ""); // 선택된 그리드 번호 초기화
  3399. inputEnterKey("btn_search", "DOMActivate"); //조회 이벤트 수행
  3400. model.setValue("/root/send/searchitem/hngnm", model.getValue("/root/main/maindata/patbaseinfo/hngnm"));
  3401. opt_patnm.refresh();
  3402. model.removenode("/root/send/searchitem/trflag");
  3403. ]]>
  3404. </script>
  3405. </input>
  3406. <output id="opt_reqdd" ref="/root/main/receivedata/reqdd" class="output_search" format="yyyy-mm-dd" style="left:475px; top:7px; width:85px; height:19px; text-align:center; "/>
  3407. <button id="button11" class="icon_search" style="left:233px; top:8px; width:16px; height:16px; ">
  3408. <caption/>
  3409. <script type="javascript" ev:event="DOMActivate">
  3410. <![CDATA[
  3411. /*상준추가 - 환자 최근정보 가져오기
  3412. model.makeValue("/root/hidden/tmp/pidpopupinfo/checkfnexam", "1");
  3413. model.makeValue("/root/hidden/tmp/pidpopupinfo/autoflag", "Y");
  3414. model.makeValue("/root/hidden/tmp/pidpopupinfo/pid", model.getValue("/root/send/searchitem/pid"));
  3415. model.makeValue("/root/hidden/tmp/pidpopupinfo/srchcond", '1');
  3416. modal("SPPMC02500", "1","150", "150", "SPPMC02500", "/root/hidden/tmp/pidpopupinfo", "/root/send");
  3417. */
  3418. modal("SPPMC02500", "", "200", "200", "SPPMC02500", "/root/hidden", "/root/main/patinfo/patinfolist");
  3419. model.setValue("/root/send/searchitem/pid", model.getValue("/root/main/patinfo/patinfolist/pid"));
  3420. model.setValue("/root/send/searchitem/hngnm", model.getValue("/root/main/patinfo/patinfolist/hngnm"));
  3421. model.refresh();
  3422. btn_search.dispatch("DOMActivate"); //조회 이벤트 수행
  3423. ]]>
  3424. </script>
  3425. </button>
  3426. <output id="opt_patnm" ref="/root/send/searchitem/hngnm" class="output_search" style="left:254px; top:7px; width:70px; height:19px; "/>
  3427. <output id="opt_reccnts" ref="/root/main/receivedata/reccnts" class="output_search" style="left:823px; top:7px; width:273px; height:19px; "/>
  3428. <caption id="caption3" class="search_name" style="left:737px; top:8px; width:88px; height:17px; ">의뢰내용 :</caption>
  3429. <caption id="caption9" class="search_name" style="left:577px; top:8px; width:78px; height:17px; ">의뢰자 :</caption>
  3430. <output id="opt_reqpsn" ref="/root/main/receivedata/reqpsn" class="output_search" style="left:650px; top:7px; width:70px; height:19px; text-align:center; "/>
  3431. <button id="btn_sujin" class="btn3_letter4" visibility="hidden" style="left:335px; top:10px; width:72px; height:22px; ">
  3432. <caption>수진이력</caption>
  3433. <script type="javascript" ev:event="DOMActivate">
  3434. <![CDATA[
  3435. setParameter("SPAER02600_pid" , model.getValue("/root/main/maindata/patbaseinfo/pid"));
  3436. setParameter("SPAER02600_orddeptcd", model.getValue("/root/main/maindata/patbaseinfo/orddeptcd"));
  3437. //setParameter("SPAER02600_savepath" , "/root/hidden/patinfo");
  3438. //setParameter("SPAER02600_nopay" , "Y");
  3439. modal("SPAER02600", 1, 10, 10, "SPAER02600");
  3440. var pid = getParameter("SPAER02600_pid");
  3441. var cretno = getParameter("SPAER02600_cretno");
  3442. var ordtype = getParameter("SPAER02600_ordtype");
  3443. var ordtypenm = getParameter("SPAER02600_ordtypenm");
  3444. var indd = getParameter("SPAER02600_indd");
  3445. var orddrid = getParameter("SPAER02600_orddrid");
  3446. var orddrnm = getParameter("SPAER02600_orddrnm");
  3447. var orddeptcd = getParameter("SPAER02600_orddeptcd");
  3448. var orddeptnm = getParameter("SPAER02600_orddeptnm");
  3449. var useyn = getParameter("SPAER02600_useyn"); // 팝업창 정보 사용여부(확인:Y, 취소:N)
  3450. //alert("pid"+pid+ "cretno"+cretno+ "ordtype"+ ordtype + "ordtypenm"+ordtypenm + "indd" + indd+ "orddrid"+orddrid + "orddrnm"+orddrnm + "orddeptcd"+ orddeptcd + "orddeptnm"+ orddeptnm + "useyn"+ useyn);
  3451. if (useyn == "Y"){ // Y : 수진이력 선택 창에서 확인을 눌렀을 경우
  3452. // 다른 화면으로 부터 기본 데이터를 가지고 팝업을 띄운 경우와 아닌경우
  3453. if (model.getValue("/root/main/receivedata/pid") != "") {
  3454. model.setValue("/root/main/receivedata/h_cretno", cretno);
  3455. model.setValue("/root/main/receivedata/h_prcpgenrflag", ordtype);
  3456. //model.setValue("/root/main/receivedata/h_ordtypenm", ordtypenm);
  3457. model.setValue("/root/main/receivedata/h_orddd", indd);
  3458. //model.setValue("/root/main/receivedata/h_orddrid", orddrid);
  3459. //model.setValue("/root/main/receivedata/h_orddrnm", orddrnm);
  3460. model.setValue("/root/main/receivedata/h_orddeptcd", orddeptcd);
  3461. //model.setValue("/root/main/receivedata/h_orddeptnm", orddeptnm);
  3462. if (ordtype == 'O' || ordtype == 'S'){
  3463. model.setValue("/root/main/maindata/patbaseinfo/inout", "외래"); // 환자기본정보 입원/외래
  3464. }else{
  3465. model.setValue("/root/main/maindata/patbaseinfo/inout", "입원"); // 환자기본정보 입원/외래
  3466. }
  3467. model.setValue("/root/main/maindata/patbaseinfo/ioflag", ordtype); // 입원/외래(I,O,D,E,S)
  3468. model.setValue("/root/main/maindata/patbaseinfo/indd", indd); // 진료일 또는 입원일
  3469. model.setValue("/root/main/maindata/patbaseinfo/cretno", cretno);
  3470. model.setValue("/root/main/maindata/patbaseinfo/orddeptnm", orddeptcd); // 진료과
  3471. model.setValue("/root/main/maindata/patbaseinfo/orddeptnm", orddeptnm); // 진료과명
  3472. model.setValue("/root/main/maindata/patbaseinfo/atdoctnm", orddrid); // 주치의
  3473. model.setValue("/root/main/maindata/patbaseinfo/atdoctnm", orddrnm); // 주치의 이름
  3474. }else{
  3475. // 환자별 영양관리 화면에서 바로 등록번호 입력 했을때
  3476. if (ordtype == 'O' || ordtype == 'S'){
  3477. model.setValue("/root/main/maindata/patbaseinfo/inout", "외래"); // 환자기본정보 입원/외래
  3478. }else{
  3479. model.setValue("/root/main/maindata/patbaseinfo/inout", "입원"); // 환자기본정보 입원/외래
  3480. }
  3481. model.setValue("/root/main/maindata/patbaseinfo/ioflag", ordtype); // 입원/외래(I,O,D,E,S)
  3482. model.setValue("/root/main/maindata/patbaseinfo/indd", indd); // 진료일 또는 입원일
  3483. model.setValue("/root/main/maindata/patbaseinfo/cretno", cretno);
  3484. model.setValue("/root/main/maindata/patbaseinfo/orddeptnm", orddeptcd); // 진료과
  3485. model.setValue("/root/main/maindata/patbaseinfo/orddeptnm", orddeptnm); // 진료과명
  3486. model.setValue("/root/main/maindata/patbaseinfo/atdoctnm", orddrid); // 주치의
  3487. model.setValue("/root/main/maindata/patbaseinfo/atdoctnm", orddrnm); // 주치의 이름
  3488. }
  3489. model.refresh();
  3490. }
  3491. ]]>
  3492. </script>
  3493. </button>
  3494. </group>
  3495. <line id="line24" class="line_3" style="x1:0px; y1:198px; x2:315px; y2:198px; "/>
  3496. <line id="line25" class="line_1" style="x1:0px; y1:91px; x2:315px; y2:91px; "/>
  3497. <caption id="caption42" class="tit_2" style="left:5px; top:77px; width:95px; height:13px; ">진단명</caption>
  3498. <line id="line26" class="line_3" style="x1:0px; y1:331px; x2:315px; y2:331px; "/>
  3499. <line id="line27" class="line_1" style="x1:0px; y1:226px; x2:315px; y2:226px; "/>
  3500. <caption id="caption43" class="tit_2" style="left:5px; top:210px; width:95px; height:13px; ">입원동기</caption>
  3501. <datagrid id="grd_diag" nodeset="/root/main/maindata/diag" autoresize="true" caption="진단명" colsep="^" colwidth="310" mergecellsfixedrows="bycolrec" rowsep="|" style="left:0px; top:96px; width:315px; height:99px; ">
  3502. <col ref="diagnm"/>
  3503. </datagrid>
  3504. <line id="line34" class="line_1" style="x1:0px; y1:358px; x2:315px; y2:358px; "/>
  3505. <caption id="caption44" class="tit_2" style="left:5px; top:342px; width:95px; height:13px; ">식사처방정보</caption>
  3506. <datagrid id="grd_inmotv" nodeset="/root/main/maindata/inmotv" autoresize="true" caption="입원동기" colsep="^" colwidth="310" mergecellsfixedrows="bycolrec" rowsep="|" style="left:0px; top:231px; width:315px; height:99px; ">
  3507. <col ref="inmotvcnts"/>
  3508. </datagrid>
  3509. <line id="line35" class="line_3" style="x1:0px; y1:466px; x2:315px; y2:466px; "/>
  3510. <datagrid id="grd_nutrmngthist" nodeset="/root/main/maindata/nutrmngt" autoresize="true" caption="등록번호^일자^영양관리유형^영양사^ioflag^indd^formrecseq^회신상태^chrgdieternm^intndieternm" colsep="^" colwidth="0, 70, 128, 52, 100, 100, 100, 60, 100, 100" mergecellsfixedrows="bycolrec" rowsep="|" style="left:0px; top:498px; width:315px; height:97px; ">
  3511. <col ref="pid"/>
  3512. <col ref="execdd" format="yyyy-mm-dd" style="text-align:center; "/>
  3513. <col disabled="true" ref="nutrmngtkind" type="combo">
  3514. <choices>
  3515. <itemset nodeset="/root/init/basecode/nutrmngtkind/A0060">
  3516. <label ref="cdnm"/>
  3517. <value ref="cdid"/>
  3518. </itemset>
  3519. </choices>
  3520. </col>
  3521. <col ref="dieter"/>
  3522. <col ref="ioflag" visibility="hidden"/>
  3523. <col ref="indd" visibility="hidden"/>
  3524. <col ref="formrecseq" visibility="hidden"/>
  3525. <col ref="cnststatnm"/>
  3526. <col ref="chrgdieternm" visibility="hidden"/>
  3527. <col ref="intndieternm" visibility="hidden"/>
  3528. <col ref="delyn" visibility="hidden"/>
  3529. <col ref="educd" visibility="hidden"/>
  3530. <col ref="educnts" visibility="hidden"/>
  3531. <col ref="eduprepyn" visibility="hidden"/>
  3532. <col ref="eduwho" visibility="hidden"/>
  3533. <col ref="eduway" visibility="hidden"/>
  3534. <col ref="edurslt" visibility="hidden"/>
  3535. <col ref="edudd" visibility="hidden"/>
  3536. <col ref="edutm" visibility="hidden"/>
  3537. <col ref="replyn" visibility="hidden"/>
  3538. <col ref="cretno" visibility="hidden"/>
  3539. <col ref="workflag" visibility="hidden"/>
  3540. <col ref="problemcareplan" visibility="hidden"/>
  3541. <col ref="rgstdd" visibility="hidden"/>
  3542. <col ref="rgsttm" visibility="hidden"/>
  3543. <script type="javascript" ev:event="ondblclick">
  3544. <![CDATA[
  3545. if ( grd_nutrmngthist.isCell(event.target) && grd_nutrmngthist.row >= grd_nutrmngthist.fixedRows ) {
  3546. var rowno = grd_nutrmngthist.row;
  3547. // 이벤트가 발생한 그리드 id와 row 값을 저장
  3548. setGlobalVariable("ANC00350eventtarget", event.currentTarget+"▦"+rowno, "A");
  3549. model.setValue("/root/temp/griddata/gridid", event.currentTarget);
  3550. model.setValue("/root/temp/griddata/gridrow", rowno);
  3551. model.setValue("/root/send/searchitem/dieter", model.getValue("/root/main/maindata/nutrmngt["+grd_nutrmngthist.row+"]/chrgdieternm"));
  3552. model.setValue("/root/send/searchitem/intndieter", model.getValue("/root/main/maindata/nutrmngt["+grd_nutrmngthist.row+"]/intndieternm"));
  3553. model.setValue("/root/send/searchitem/pid", model.getValue("/root/main/maindata/nutrmngt["+grd_nutrmngthist.row+"]/pid"));
  3554. model.setValue("/root/send/searchitem/pastexecdd", model.getValue("/root/main/maindata/nutrmngt["+grd_nutrmngthist.row+"]/execdd"));
  3555. model.setValue("/root/send/searchitem/nutrmngtkind", model.getValue("/root/main/maindata/nutrmngt["+grd_nutrmngthist.row+"]/nutrmngtkind"));
  3556. model.setValue("/root/send/searchitem/prcpgenrflag", model.getValue("/root/main/maindata/nutrmngt["+grd_nutrmngthist.row+"]/ioflag"));
  3557. model.setValue("/root/send/searchitem/orddd", model.getValue("/root/main/maindata/nutrmngt["+grd_nutrmngthist.row+"]/indd"));
  3558. //flag=A는 화면 왼쪽의 공통정보(환자기본정보,진단명,입원동기,식사처방정보,영양관리이력,영양검색결과이력)와 해당 컨설팅 정보를 조회한다는 뜻임.
  3559. model.setValue("/root/send/searchitem/flag", 'A');
  3560. btn_search.dispatch("DOMActivate");
  3561. // model.setValue("/root/main/receivedata/pid", model.getValue("/root/main/maindata/nutrstatjudg/pid"));
  3562. // model.setValue("/root/main/receivedata/reqdd", model.getValue("/root/main/maindata/nutrstatjudg/reqdd"));
  3563. // model.setValue("/root/main/receivedata/reqpsn", model.getValue("/root/main/maindata/nutrstatjudg/reqpsn"));
  3564. // model.setValue("/root/main/receivedata/educreqcnts", model.getValue("/root/main/maindata/nutrstatjudg/reqresn"));
  3565. // model.setValue("/root/main/receivedata/reccnts", model.getValue("/root/main/maindata/nutrstatjudg/reccnts"));
  3566. // model.setValue("/root/main/receivedata/h_formrecseq", model.getValue("/root/main/maindata/nutrstatjudg/formrecseq"));
  3567. // model.refresh();
  3568. //선택한 행 색깔 표시
  3569. grd_nutrmngthist.isSelected(rowno) = true;
  3570. grd_nutrmngthist.focusColor = "#ffccff";
  3571. }
  3572. ]]>
  3573. </script>
  3574. </datagrid>
  3575. <caption id="caption45" class="tit_2" style="left:5px; top:476px; width:126px; height:13px; ">영양관리이력</caption>
  3576. <line id="line36" class="line_1" style="x1:0px; y1:492px; x2:315px; y2:492px; "/>
  3577. <line id="line37" class="line_3" style="x1:0px; y1:739px; x2:315px; y2:739px; "/>
  3578. <switch id="switch2" style="left:320px; top:79px; width:875px; height:630px; ">
  3579. <case id="case1">
  3580. <datagrid id="grd_nutrstatjudg" nodeset="/root/main/maindata/cureplan/nutrstatjudg" autoresize="true" caption="등록번호^수행일자^영양관리유형^상담구분^코드^내용" colsep="^" colwidth="10, 10, 10, 10, 180, 197" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:468px; top:526px; width:399px; height:89px; ">
  3581. <col ref="pid" visibility="hidden"/>
  3582. <col ref="execdd" visibility="hidden"/>
  3583. <col ref="nutrmngtkind" visibility="hidden"/>
  3584. <col ref="cnstpurs" visibility="hidden"/>
  3585. <col ref="cureplancd" type="combo">
  3586. <choices>
  3587. <item>
  3588. <label/>
  3589. <value/>
  3590. </item>
  3591. <item>
  3592. <label>현재 식사 유지해 주십시오.</label>
  3593. <value>1</value>
  3594. </item>
  3595. <item>
  3596. <label>식사처방 변경 필요합니다.</label>
  3597. <value>2</value>
  3598. </item>
  3599. <item>
  3600. <label>영양교육 의뢰서 작성해 주십시오.</label>
  3601. <value>3</value>
  3602. </item>
  3603. <item>
  3604. <label>경장영양의뢰(EN)로 협진의뢰서 작성해 주십시오.</label>
  3605. <value>4</value>
  3606. </item>
  3607. <item>
  3608. <label>F/U 예정입니다.</label>
  3609. <value>5</value>
  3610. </item>
  3611. <item>
  3612. <label>기타</label>
  3613. <value>9</value>
  3614. </item>
  3615. </choices>
  3616. </col>
  3617. <col ref="cureplancnts" type="input"/>
  3618. </datagrid>
  3619. <button id="btn_rowadd1" class="btn2_letter3" style="left:750px; top:500px; width:53px; height:19px; ">
  3620. <caption>행추가</caption>
  3621. <script type="javascript" ev:event="DOMActivate">
  3622. <![CDATA[
  3623. grd_nutrstatjudg.addRow();
  3624. //model.setValue("/root/main/maindata/cureplan/nutrstatjudg["+ grd_nutrstatjudg.row +"]/pid", model.getValue("/root/main/tab/pridmenuwrite/list["+ prerow +"]/pridseq"));
  3625. ]]>
  3626. </script>
  3627. </button>
  3628. <button id="btn_rowdel1" class="btn2_letter3" style="left:805px; top:500px; width:53px; height:19px; ">
  3629. <caption>행삭제</caption>
  3630. <script type="javascript" ev:event="DOMActivate">
  3631. <![CDATA[
  3632. //grd_nutrstatjudg.deleteRow(grd_nutrstatjudg.row);
  3633. grd_nutrstatjudg.addStatus(grd_nutrstatjudg.row, "delete");
  3634. ]]>
  3635. </script>
  3636. </button>
  3637. <caption id="caption46" class="tit_2" style="left:13px; top:118px; width:100px; height:13px; ">식사시 문제점</caption>
  3638. <output id="ipt_testrsltalb" ref="/root/main/testrslt/lis/alb" class="output_fix" navindex="10" style="left:506px; top:137px; width:52px; height:19px; "/>
  3639. <line id="line38" class="line_1" style="x1:468px; y1:386px; x2:867px; y2:386px; "/>
  3640. <output id="ipt_testrslthbhct" ref="/root/main/testrslt/lis/hb" class="output_fix" navindex="12" style="left:706px; top:137px; width:30px; height:19px; "/>
  3641. <caption id="caption47" class="tit_2" style="left:472px; top:505px; width:128px; height:13px; ">영양치료계획/권장</caption>
  3642. <caption id="caption48" class="cell_1" style="left:468px; top:78px; width:74px; height:23px; vertical-align:middle; ">Wt.Change</caption>
  3643. <button id="btn_childbasetable" class="btn2_letter5" style="left:791px; top:2px; width:75px; height:19px; ">
  3644. <caption>소아기준표</caption>
  3645. <script type="javascript" ev:event="DOMActivate">
  3646. <![CDATA[
  3647. //modal("SPANC00305", 0,100,100,"SPANC00305","","","left:30; top:50; width:1400; height:1000;");
  3648. modal("SPANC00305");
  3649. ipt_physmeasibw.refresh();
  3650. ]]>
  3651. </script>
  3652. </button>
  3653. <line id="line39" class="line_2" style="x1:468px; y1:51px; x2:865px; y2:51px; "/>
  3654. <line id="line40" class="line_2" style="x1:468px; y1:76px; x2:865px; y2:76px; "/>
  3655. <select id="chk_dietprob" ref="/root/main/maindata/nutrstatjudg/dietprobchoi" overflow="visible" appearance="full" cellspacing="25" cols="4" sep="▦" vcellspacing="10" style="left:5px; top:137px; width:453px; height:83px; ">
  3656. <choices>
  3657. <item>
  3658. <label>소화불량</label>
  3659. <value>1</value>
  3660. </item>
  3661. <item>
  3662. <label>구토</label>
  3663. <value>2</value>
  3664. </item>
  3665. <item>
  3666. <label>저작곤란</label>
  3667. <value>3</value>
  3668. </item>
  3669. <item>
  3670. <label>변비</label>
  3671. <value>4</value>
  3672. </item>
  3673. <item>
  3674. <label>식욕부진</label>
  3675. <value>5</value>
  3676. </item>
  3677. <item>
  3678. <label>메스꺼움</label>
  3679. <value>6</value>
  3680. </item>
  3681. <item>
  3682. <label>연하곤란</label>
  3683. <value>7</value>
  3684. </item>
  3685. <item>
  3686. <label>설사</label>
  3687. <value>8</value>
  3688. </item>
  3689. <item>
  3690. <label>기타</label>
  3691. <value>9</value>
  3692. </item>
  3693. </choices>
  3694. </select>
  3695. <input id="ipt_physmeasubw" ref="/root/main/maindata/nutrstatjudg/physmeasubw" class="input_search" navindex="3" autonext="false" maxlength="3" format="###.9" style="left:804px; top:29px; width:40px; height:19px; "/>
  3696. <caption id="caption50" style="left:591px; top:28px; width:20px; height:20px; vertical-align:middle; ">cm</caption>
  3697. <output id="ipt_testrslttlc" ref="/root/main/testrslt/lis/tlc" class="output_fix" navindex="11" style="left:598px; top:137px; width:52px; height:19px; "/>
  3698. <line id="line41" class="line_1" style="x1:468px; y1:521px; x2:867px; y2:521px; "/>
  3699. <line id="line42" class="line_3" style="x1:468px; y1:100px; x2:865px; y2:100px; "/>
  3700. <caption id="caption51" class="cell_1" style="left:561px; top:135px; width:35px; height:23px; vertical-align:middle; ">TLC</caption>
  3701. <output id="ipt_testrslttrf" ref="/root/main/testrslt/lis/trf" class="output_fix" navindex="14" style="left:820px; top:137px; width:47px; height:19px; "/>
  3702. <caption id="caption52" class="cell_1" style="left:468px; top:53px; width:74px; height:23px; vertical-align:middle; ">IBW</caption>
  3703. <caption id="caption53" style="left:718px; top:29px; width:20px; height:20px; vertical-align:middle; ">kg</caption>
  3704. <input id="ipt_physmeasbdht" ref="/root/main/maindata/nutrstatjudg/physmeasbdht" class="input_search" navindex="1" autonext="false" maxlength="3" format="###.9" style="left:545px; top:30px; width:45px; height:19px; "/>
  3705. <caption id="caption54" class="cell_1" style="left:468px; top:28px; width:74px; height:23px; vertical-align:middle; ">Ht</caption>
  3706. <caption id="caption55" style="left:847px; top:53px; width:20px; height:20px; vertical-align:middle; ">kg</caption>
  3707. <input id="ipt_bdwtupdtqty" ref="/root/main/maindata/nutrstatjudg/bdwtupdtqty" class="input_search" navindex="7" autonext="false" maxlength="4" format="(-)###.9" style="left:545px; top:80px; width:45px; height:19px; "/>
  3708. <caption id="caption56" style="left:847px; top:28px; width:20px; height:20px; vertical-align:middle; ">kg</caption>
  3709. <caption id="caption62" class="tit_2" style="left:472px; top:370px; width:95px; height:13px; ">영양상태평가</caption>
  3710. <line id="line44" class="line_3" style="x1:468px; y1:217px; x2:868px; y2:217px; "/>
  3711. <line id="line45" class="line_3" style="x1:468px; y1:622px; x2:867px; y2:622px; "/>
  3712. <line id="line46" class="line_1" style="x1:5px; y1:131px; x2:458px; y2:131px; "/>
  3713. <caption id="caption72" class="cell_1" style="left:740px; top:53px; width:61px; height:23px; vertical-align:middle; ">ABW</caption>
  3714. <input id="ipt_bdwtupdtrate" ref="/root/main/maindata/nutrstatjudg/bdwtupdtrate" class="input_search" navindex="8" autonext="false" maxlength="3" format="(-)##.9" style="left:627px; top:80px; width:40px; height:19px; "/>
  3715. <caption id="caption73" class="cell_1" style="left:740px; top:28px; width:61px; height:23px; vertical-align:middle; ">UBW</caption>
  3716. <caption id="caption74" class="cell_1" style="left:616px; top:28px; width:56px; height:23px; vertical-align:middle; ">Wt</caption>
  3717. <input id="ipt_physmeasabw" ref="/root/main/maindata/nutrstatjudg/physmeasabw" class="input_search" navindex="6" autonext="false" maxlength="3" format="###.9" style="left:804px; top:54px; width:40px; height:19px; "/>
  3718. <caption id="caption76" class="cell_1" style="left:616px; top:53px; width:56px; height:23px; vertical-align:middle; ">PIBW</caption>
  3719. <line id="line76" class="line_1" style="x1:468px; y1:245px; x2:867px; y2:245px; "/>
  3720. <caption id="caption77" style="left:591px; top:57px; width:20px; height:20px; vertical-align:middle; ">kg</caption>
  3721. <input id="ipt_physmeasibw" ref="/root/main/maindata/nutrstatjudg/physmeasibw" class="input_search" navindex="4" autonext="false" maxlength="3" format="###.9" style="left:545px; top:54px; width:45px; height:19px; "/>
  3722. <caption id="caption79" class="cell_1" style="left:653px; top:135px; width:50px; height:23px; vertical-align:middle; ">Hb/Hct</caption>
  3723. <caption id="caption80" style="left:718px; top:54px; width:20px; height:20px; vertical-align:middle; ">%</caption>
  3724. <input id="ipt_physmeasibwperc" ref="/root/main/maindata/nutrstatjudg/physmeasibwperc" class="input_search" navindex="5" autonext="false" maxlength="3" format="###.9" style="left:675px; top:55px; width:40px; height:19px; "/>
  3725. <caption id="caption83" style="left:591px; top:82px; width:20px; height:20px; vertical-align:middle; ">kg</caption>
  3726. <line id="line82" class="line_2" style="x1:467px; y1:158px; x2:872px; y2:158px; "/>
  3727. <caption id="caption86" class="tit_2" style="left:472px; top:230px; width:95px; height:13px; ">약물정보</caption>
  3728. <caption id="caption90" class="cell_1" style="left:782px; top:135px; width:35px; height:23px; vertical-align:middle; ">TRF</caption>
  3729. <input id="ipt_physmeasbdwt" ref="/root/main/maindata/nutrstatjudg/physmeasbdwt" class="input_search" navindex="2" autonext="false" maxlength="3" format="###.9" style="left:675px; top:30px; width:40px; height:19px; "/>
  3730. <caption id="caption91" class="cell_1" style="left:468px; top:135px; width:35px; height:23px; vertical-align:middle; ">Alb</caption>
  3731. <textarea id="tar_testrsltrem" ref="/root/main/maindata/nutrstatjudg/testrsltrem" navindex="15" style="left:468px; top:160px; width:399px; height:56px; "/>
  3732. <button id="btn_testrsltref" class="btn2_letter6" style="left:780px; top:111px; width:86px; height:19px; ">
  3733. <caption>검사결과조회</caption>
  3734. <script type="javascript" ev:event="onclick">
  3735. <![CDATA[
  3736. //setParameter("opener_parameter_id", model.getValue("/root/send/searchitem/pid"));
  3737. modal("SMAER00800", 0,100,100,"SMAER00800","","","left:30; top:50; width:1230; height:840;");
  3738. ]]>
  3739. </script>
  3740. </button>
  3741. <caption id="caption94" class="tit_2" style="left:470px; top:117px; width:95px; height:13px; ">검사결과</caption>
  3742. <caption id="caption96" class="tit_2" style="left:470px; top:7px; width:95px; height:13px; ">신체계측결과</caption>
  3743. <line id="line85" class="line_1" style="x1:468px; y1:23px; x2:865px; y2:23px; "/>
  3744. <line id="line86" class="line_1" style="x1:468px; y1:131px; x2:868px; y2:131px; "/>
  3745. <line id="line90" class="line_3" style="x1:5px; y1:106px; x2:458px; y2:106px; "/>
  3746. <line id="line93" class="line_1" style="x1:5px; y1:23px; x2:458px; y2:23px; "/>
  3747. <select id="chk_bodysymp" ref="/root/main/maindata/nutrstatjudg/bodysympchoi" overflow="visible" appearance="full" cellspacing="25" cols="4" sep="▦" vcellspacing="10" style="left:5px; top:28px; width:453px; height:82px; ">
  3748. <choices>
  3749. <item>
  3750. <label>몹시여윔</label>
  3751. <value>1</value>
  3752. </item>
  3753. <item>
  3754. <label>근육소모</label>
  3755. <value>2</value>
  3756. </item>
  3757. <item>
  3758. <label>부종</label>
  3759. <value>3</value>
  3760. </item>
  3761. <item>
  3762. <label>복수</label>
  3763. <value>4</value>
  3764. </item>
  3765. <item>
  3766. <label>욕창</label>
  3767. <value>5</value>
  3768. </item>
  3769. <item>
  3770. <label>비만</label>
  3771. <value>6</value>
  3772. </item>
  3773. <item>
  3774. <label>고열</label>
  3775. <value>7</value>
  3776. </item>
  3777. <item>
  3778. <label>인공호흡기</label>
  3779. <value>8</value>
  3780. </item>
  3781. <item>
  3782. <label>기타</label>
  3783. <value>9</value>
  3784. </item>
  3785. </choices>
  3786. </select>
  3787. <caption id="caption98" class="tit_2" style="left:13px; top:8px; width:95px; height:13px; ">신체증후</caption>
  3788. <line id="line94" class="line_3" style="x1:5px; y1:217px; x2:458px; y2:217px; "/>
  3789. <textarea id="tar_actgrdeetc" ref="/root/main/maindata/nutrstatjudg/actgrdeetc" style="left:67px; top:550px; width:391px; height:71px; "/>
  3790. <caption id="caption103" class="tit_2" style="left:13px; top:231px; width:95px; height:13px; ">식사력</caption>
  3791. <line id="line105" class="line_3" style="x1:5px; y1:622px; x2:458px; y2:622px; "/>
  3792. <line id="line106" class="line_1" style="x1:5px; y1:245px; x2:458px; y2:245px; "/>
  3793. <caption id="caption108" class="cell_1" style="left:5px; top:550px; width:60px; height:72px; text-align:left; vertical-align:middle; ">기타</caption>
  3794. <select id="chk_diethist" ref="/root/main/maindata/nutrstatjudg/diethistchoi" overflow="visible" appearance="full" cellspacing="20" cols="3" sep="▦" vcellspacing="5" style="left:5px; top:250px; width:453px; height:160px; ">
  3795. <choices>
  3796. <item>
  3797. <label>균형된 식사</label>
  3798. <value>11</value>
  3799. </item>
  3800. <item>
  3801. <label>규칙적인 식사</label>
  3802. <value>12</value>
  3803. </item>
  3804. <item>
  3805. <label>불규칙적인 식사</label>
  3806. <value>13</value>
  3807. </item>
  3808. <item>
  3809. <label>빠른식사속도</label>
  3810. <value>14</value>
  3811. </item>
  3812. <item>
  3813. <label>과식</label>
  3814. <value>15</value>
  3815. </item>
  3816. <item>
  3817. <label>당질과다섭취</label>
  3818. <value>16</value>
  3819. </item>
  3820. <item>
  3821. <label>지방과다섭취</label>
  3822. <value>17</value>
  3823. </item>
  3824. <item>
  3825. <label>염분과다섭취</label>
  3826. <value>18</value>
  3827. </item>
  3828. <item>
  3829. <label>건강보조식품</label>
  3830. <value>19</value>
  3831. </item>
  3832. <item>
  3833. <label>커피</label>
  3834. <value>20</value>
  3835. </item>
  3836. <item>
  3837. <label/>
  3838. <value/>
  3839. </item>
  3840. <item>
  3841. <label>흡연</label>
  3842. <value>21</value>
  3843. </item>
  3844. <item>
  3845. <label>외식</label>
  3846. <value>22</value>
  3847. </item>
  3848. <item>
  3849. <label/>
  3850. <value/>
  3851. </item>
  3852. <item>
  3853. <label/>
  3854. <value/>
  3855. </item>
  3856. <item>
  3857. <label>음주</label>
  3858. <value>23</value>
  3859. </item>
  3860. <item>
  3861. <label/>
  3862. <value/>
  3863. </item>
  3864. <item>
  3865. <label/>
  3866. <value/>
  3867. </item>
  3868. <item>
  3869. <label>기타</label>
  3870. <value>24</value>
  3871. </item>
  3872. </choices>
  3873. </select>
  3874. <caption id="caption109" style="left:358px; top:316px; width:55px; height:20px; vertical-align:middle; ">pack/day</caption>
  3875. <caption id="caption115" style="left:136px; top:315px; width:54px; height:20px; vertical-align:middle; ">잔/day</caption>
  3876. <caption id="caption119" style="left:136px; top:337px; width:50px; height:20px; vertical-align:middle; ">회/week</caption>
  3877. <caption id="caption121" style="left:306px; top:360px; width:20px; height:20px; vertical-align:middle; ">)</caption>
  3878. <caption id="caption128" style="left:136px; top:359px; width:121px; height:20px; vertical-align:middle; background-color:#ffffff; ">회/week (1회 섭취량</caption>
  3879. <input id="ipt_drunkvol" ref="/root/main/maindata/nutrstatjudg/drunkvol" class="input_search" style="left:262px; top:360px; width:40px; height:19px; "/>
  3880. <output id="ipt_testrslthbhct2" ref="/root/main/testrslt/lis/hct" class="output_fix" navindex="13" style="left:749px; top:137px; width:30px; height:19px; "/>
  3881. <caption id="caption144" style="left:618px; top:82px; width:15px; height:20px; vertical-align:middle; ">(</caption>
  3882. <caption id="caption145" style="left:670px; top:82px; width:30px; height:20px; vertical-align:middle; ">)% /</caption>
  3883. <line id="line110" class="line_2" style="x1:5px; y1:82px; x2:458px; y2:82px; "/>
  3884. <line id="line111" class="line_2" style="x1:5px; y1:193px; x2:463px; y2:193px; "/>
  3885. <caption id="caption146" style="left:738px; top:137px; width:10px; height:20px; vertical-align:middle; ">/</caption>
  3886. <input id="ipt_cofftims" ref="/root/main/maindata/nutrstatjudg/cofftims" class="input_search" autonext="false" maxlength="4" style="left:60px; top:315px; width:73px; height:19px; ">
  3887. <script type="javascript" ev:event="xforms-value-changed">
  3888. <![CDATA[
  3889. //체크박스를 체크하지 않고 텍스트 입력시 체크박스 자동체크
  3890. if (model.getValue("/root/main/maindata/nutrstatjudg/cofftims") == "") {
  3891. var str = chk_diethist.value;
  3892. var str1 = "";
  3893. var chk = "";
  3894. for (var i=0; i < str.length; i++) {
  3895. var ch = str.substr(i,2);
  3896. if (ch == "20") {
  3897. chk = "Y";
  3898. }
  3899. if (chk == "Y" && str.charAt(i) == "▦") {
  3900. chk = "";
  3901. } else if (chk == "Y") {
  3902. } else {
  3903. str1 = str1 + str.charAt(i);
  3904. }
  3905. }
  3906. chk_diethist.value = str1;
  3907. } else {
  3908. var str = chk_diethist.value;
  3909. var yn = "N";
  3910. for (var i=0; i < str.length; i++) {
  3911. if ( str.substr(i,2) == "20" ) {
  3912. yn = "Y";
  3913. break;
  3914. }
  3915. }
  3916. if ( yn == "N" ) {
  3917. str = str + "▦20"
  3918. chk_diethist.value = str;
  3919. }
  3920. }
  3921. ]]>
  3922. </script>
  3923. </input>
  3924. <input id="ipt_eatouttims" ref="/root/main/maindata/nutrstatjudg/eatouttims" class="input_search" autonext="false" maxlength="5" style="left:60px; top:337px; width:72px; height:19px; ">
  3925. <script type="javascript" ev:event="xforms-value-changed">
  3926. <![CDATA[
  3927. //체크박스를 체크하지 않고 텍스트 입력시 체크박스 자동체크
  3928. if (model.getValue("/root/main/maindata/nutrstatjudg/eatouttims") == "") {
  3929. var str = chk_diethist.value;
  3930. var str1 = "";
  3931. var chk = "";
  3932. for (var i=0; i < str.length; i++) {
  3933. var ch = str.substr(i,2);
  3934. if (ch == "22") {
  3935. chk = "Y";
  3936. }
  3937. if (chk == "Y" && str.charAt(i) == "▦") {
  3938. chk = "";
  3939. } else if (chk == "Y") {
  3940. } else {
  3941. str1 = str1 + str.charAt(i);
  3942. }
  3943. }
  3944. chk_diethist.value = str1;
  3945. } else {
  3946. var str = chk_diethist.value;
  3947. var yn = "N";
  3948. for (var i=0; i < str.length; i++) {
  3949. if ( str.substr(i,2) == "22" ) {
  3950. yn = "Y";
  3951. break;
  3952. }
  3953. }
  3954. if ( yn == "N" ) {
  3955. str = str + "▦22"
  3956. chk_diethist.value = str;
  3957. }
  3958. // var str = chk_diethist.value;
  3959. // str = str + "▦22"
  3960. // chk_diethist.value = str;
  3961. }
  3962. ]]>
  3963. </script>
  3964. </input>
  3965. <input id="ipt_drunktims" ref="/root/main/maindata/nutrstatjudg/drunktims" class="input_search" autonext="false" maxlength="5" style="left:60px; top:359px; width:72px; height:19px; ">
  3966. <script type="javascript" ev:event="xforms-value-changed">
  3967. <![CDATA[
  3968. //체크박스를 체크하지 않고 텍스트 입력시 체크박스 자동체크
  3969. if (model.getValue("/root/main/maindata/nutrstatjudg/drunktims") == "") {
  3970. var str = chk_diethist.value;
  3971. var str1 = "";
  3972. var chk = "";
  3973. for (var i=0; i < str.length; i++) {
  3974. var ch = str.substr(i,2);
  3975. if (ch == "23") {
  3976. chk = "Y";
  3977. }
  3978. if (chk == "Y" && str.charAt(i) == "▦") {
  3979. chk = "";
  3980. } else if (chk == "Y") {
  3981. } else {
  3982. str1 = str1 + str.charAt(i);
  3983. }
  3984. }
  3985. chk_diethist.value = str1;
  3986. } else {
  3987. var str = chk_diethist.value;
  3988. var yn = "N";
  3989. for (var i=0; i < str.length; i++) {
  3990. if ( str.substr(i,2) == "23" ) {
  3991. yn = "Y";
  3992. break;
  3993. }
  3994. }
  3995. if ( yn == "N" ) {
  3996. str = str + "▦23"
  3997. chk_diethist.value = str;
  3998. }
  3999. // var str = chk_diethist.value;
  4000. // str = str + "▦23"
  4001. // chk_diethist.value = str;
  4002. }
  4003. ]]>
  4004. </script>
  4005. </input>
  4006. <input id="ipt_dietprobrem" ref="/root/main/maindata/nutrstatjudg/dietprobrem" class="input_search" style="left:55px; top:194px; width:363px; height:19px; ">
  4007. <script type="javascript" ev:event="xforms-value-changed">
  4008. <![CDATA[
  4009. //체크박스를 체크하지 않고 텍스트 입력시 체크박스 자동체크
  4010. if (model.getValue("/root/main/maindata/nutrstatjudg/dietprobrem") == "") {
  4011. var str = chk_dietprob.value;
  4012. var str1 = "";
  4013. var chk = "";
  4014. for (var i=0; i < str.length; i++) {
  4015. var ch = str.charAt(i);
  4016. if (ch == "9") {
  4017. chk = "Y";
  4018. }
  4019. if (chk == "Y" && ch == "▦") {
  4020. chk = "";
  4021. } else if (chk == "Y") {
  4022. } else {
  4023. str1 = str1 + ch;
  4024. }
  4025. }
  4026. chk_dietprob.value = str1;
  4027. } else {
  4028. var str = chk_dietprob.value;
  4029. str = str + "▦9"
  4030. chk_dietprob.value = str;
  4031. }
  4032. ]]>
  4033. </script>
  4034. </input>
  4035. <input id="ipt_bodysymprem" ref="/root/main/maindata/nutrstatjudg/bodysymprem" class="input_search" style="left:55px; top:85px; width:368px; height:19px; ">
  4036. <script type="javascript" ev:event="xforms-value-changed">
  4037. <![CDATA[
  4038. //체크박스를 체크하지 않고 텍스트 입력시 체크박스 자동체크
  4039. if (model.getValue("/root/main/maindata/nutrstatjudg/bodysymprem") == "") {
  4040. var str = chk_bodysymp.value;
  4041. var str1 = "";
  4042. var chk = "";
  4043. for (var i=0; i < str.length; i++) {
  4044. var ch = str.charAt(i);
  4045. if (ch == "9") {
  4046. chk = "Y";
  4047. }
  4048. if (chk == "Y" && ch == "▦") {
  4049. chk = "";
  4050. } else if (chk == "Y") {
  4051. } else {
  4052. str1 = str1 + ch;
  4053. }
  4054. }
  4055. chk_bodysymp.value = str1;
  4056. } else {
  4057. var str = chk_bodysymp.value;
  4058. str = str + "▦9"
  4059. chk_bodysymp.value = str;
  4060. }
  4061. ]]>
  4062. </script>
  4063. </input>
  4064. <line id="line112" class="line_3" style="x1:468px; y1:491px; x2:867px; y2:491px; "/>
  4065. <textarea id="tar_nutrstatvalu" ref="/root/main/maindata/nutrstatjudg/nutrstatvalucnts" navindex="17" style="left:468px; top:416px; width:399px; height:74px; "/>
  4066. <button id="btn_drughbook" class="btn2_letter4" style="left:802px; top:225px; width:64px; height:19px; ">
  4067. <caption>약품편람</caption>
  4068. <script type="javascript" ev:event="onclick">
  4069. <![CDATA[
  4070. modal("SMADB01900", 0,100,100,"SMADB01900","","","left:30; top:50; width:1230; height:840;");
  4071. //modal("SMADB01900", "", "", "", "popup", "", "");
  4072. ]]>
  4073. </script>
  4074. </button>
  4075. <line id="line113" class="line_3" style="x1:468px; y1:359px; x2:867px; y2:359px; "/>
  4076. <textarea id="tar_druginfo" ref="/root/main/maindata/nutrstatjudg/druginfo" navindex="16" style="left:468px; top:250px; width:399px; height:108px; "/>
  4077. <caption id="caption71" class="cell_1" style="left:469px; top:391px; width:109px; height:23px; vertical-align:middle; ">영양상태판정</caption>
  4078. <line id="line43" class="line_2" style="x1:468px; y1:414px; x2:867px; y2:414px; "/>
  4079. <select1 id="cmb_nutrstatvalu" ref="/root/main/maindata/nutrstatjudg/nutrstatvalucd" class="combo_search" appearance="minimal" style="left:581px; top:392px; width:285px; height:19px; ">
  4080. <choices>
  4081. <item>
  4082. <label/>
  4083. <value/>
  4084. </item>
  4085. <item>
  4086. <label>No malnutrition present</label>
  4087. <value>1</value>
  4088. </item>
  4089. <item>
  4090. <label>Mild malnutrition</label>
  4091. <value>2</value>
  4092. </item>
  4093. <item>
  4094. <label>Moderate malnutrition</label>
  4095. <value>3</value>
  4096. </item>
  4097. <item>
  4098. <label>Energy malnutrition</label>
  4099. <value>4</value>
  4100. </item>
  4101. <item>
  4102. <label>Protein malnutrition</label>
  4103. <value>5</value>
  4104. </item>
  4105. <item>
  4106. <label>Severe Protein Energy malnutrition</label>
  4107. <value>6</value>
  4108. </item>
  4109. </choices>
  4110. </select1>
  4111. <input id="ipt_eatoutrem" ref="/root/main/maindata/nutrstatjudg/eatoutrem" class="input_search" style="left:195px; top:338px; width:263px; height:19px; "/>
  4112. <input id="ipt_diethistetc" ref="/root/main/maindata/nutrstatjudg/diethistetc" class="input_search" style="left:60px; top:382px; width:398px; height:19px; ">
  4113. <script type="javascript" ev:event="xforms-value-changed">
  4114. <![CDATA[
  4115. //체크박스를 체크하지 않고 텍스트 입력시 체크박스 자동체크
  4116. if (model.getValue("/root/main/maindata/nutrstatjudg/diethistetc") == "") {
  4117. var str = chk_diethist.value;
  4118. var str1 = "";
  4119. var chk = "";
  4120. for (var i=0; i < str.length; i++) {
  4121. var ch = str.substr(i,2);
  4122. if (ch == "24") {
  4123. chk = "Y";
  4124. }
  4125. if (chk == "Y" && str.charAt(i) == "▦") {
  4126. chk = "";
  4127. } else if (chk == "Y") {
  4128. } else {
  4129. str1 = str1 + str.charAt(i);
  4130. }
  4131. }
  4132. chk_diethist.value = str1;
  4133. } else {
  4134. var str = chk_diethist.value;
  4135. var yn = "N";
  4136. for (var i=0; i < str.length; i++) {
  4137. if ( str.substr(i,2) == "24" ) {
  4138. yn = "Y";
  4139. break;
  4140. }
  4141. }
  4142. if ( yn == "N" ) {
  4143. str = str + "▦24"
  4144. chk_diethist.value = str;
  4145. }
  4146. // var str = chk_diethist.value;
  4147. // str = str + "▦24"
  4148. // chk_diethist.value = str;
  4149. }
  4150. ]]>
  4151. </script>
  4152. </input>
  4153. <input id="ipt_drunkrem" ref="/root/main/maindata/nutrstatjudg/drunkrem" class="input_search" style="left:315px; top:360px; width:143px; height:19px; "/>
  4154. <input id="ipt_healsuppfood" ref="/root/main/maindata/nutrstatjudg/healsuppfood" class="input_search" style="left:324px; top:293px; width:134px; height:19px; ">
  4155. <script type="javascript" ev:event="xforms-value-changed">
  4156. <![CDATA[
  4157. //체크박스를 체크하지 않고 텍스트 입력시 체크박스 자동체크
  4158. if (model.getValue("/root/main/maindata/nutrstatjudg/healsuppfood") == "") {
  4159. var str = chk_diethist.value;
  4160. var str1 = "";
  4161. var chk = "";
  4162. for (var i=0; i < str.length; i++) {
  4163. var ch = str.substr(i,2);
  4164. if (ch == "19") {
  4165. chk = "Y";
  4166. }
  4167. if (chk == "Y" && str.charAt(i) == "▦") {
  4168. chk = "";
  4169. } else if (chk == "Y") {
  4170. } else {
  4171. str1 = str1 + str.charAt(i);
  4172. }
  4173. }
  4174. chk_diethist.value = str1;
  4175. } else {
  4176. var str = chk_diethist.value;
  4177. var yn = "N";
  4178. for (var i=0; i < str.length; i++) {
  4179. if ( str.substr(i,2) == "19" ) {
  4180. yn = "Y";
  4181. break;
  4182. }
  4183. }
  4184. if ( yn == "N" ) {
  4185. str = str + "▦19"
  4186. chk_diethist.value = str;
  4187. }
  4188. // var str = chk_diethist.value;
  4189. // str = str + "▦19"
  4190. // chk_diethist.value = str;
  4191. }
  4192. ]]>
  4193. </script>
  4194. </input>
  4195. <line id="line149" class="line_1" style="x1:5px; y1:490px; x2:458px; y2:490px; "/>
  4196. <caption id="caption156" class="tit_2" style="left:13px; top:476px; width:95px; height:13px; ">활동정도</caption>
  4197. <select id="chk_actgrde" ref="/root/main/maindata/nutrstatjudg/actgrdechoi" overflow="visible" appearance="full" cellspacing="25" cols="4" sep="▦" vcellspacing="10" style="left:5px; top:496px; width:453px; height:50px; ">
  4198. <choices>
  4199. <item>
  4200. <label>거동불가</label>
  4201. <value>1</value>
  4202. </item>
  4203. <item>
  4204. <label>가벼운활동</label>
  4205. <value>2</value>
  4206. </item>
  4207. <item>
  4208. <label>중등도활동</label>
  4209. <value>3</value>
  4210. </item>
  4211. <item>
  4212. <label>심한활동</label>
  4213. <value>4</value>
  4214. </item>
  4215. <item>
  4216. <label>운동</label>
  4217. <value>5</value>
  4218. </item>
  4219. </choices>
  4220. <script type="javascript" ev:event="xforms-select">
  4221. <![CDATA[
  4222. /*
  4223. * 2010-01-26 "거동불가", "가벼운활동", "중등도활동", "심한활동" 4가지만 중복 체크가 안되게 해달라고 수정 요청이 들어왔음.
  4224. */
  4225. var selectedIndex = chk_actgrde.selectedIndex + 1; // '1' 부터 인덱스를 잡기 위해서 '1' 을 더해줌
  4226. if(selectedIndex < chk_actgrde.length) {
  4227. var actgrdechoi = model.getValue("/root/main/maindata/nutrstatjudg/actgrdechoi");
  4228. var tempData = "";
  4229. if(actgrdechoi != "") {
  4230. actgrdechoi = actgrdechoi.split("▦");
  4231. }
  4232. // "운동" 항목이 체크 되있는지 확인
  4233. for(var i = 0; i < actgrdechoi.length; ++i) {
  4234. if(actgrdechoi[i] == "5") {
  4235. tempData = actgrdechoi[i];
  4236. }
  4237. }
  4238. // "운동" 항목이 체크 되어 있으면 ( 선택된항목 + "▦" +운동항목 ) 을 세팅한다.
  4239. if(tempData == "5") {
  4240. model.setValue("/root/main/maindata/nutrstatjudg/actgrdechoi", selectedIndex + "▦" + tempData);
  4241. } else {
  4242. model.setValue("/root/main/maindata/nutrstatjudg/actgrdechoi", selectedIndex);
  4243. }
  4244. chk_actgrde.refresh();
  4245. }
  4246. ]]>
  4247. </script>
  4248. </select>
  4249. <line id="line119" class="line_3" style="x1:5px; y1:411px; x2:458px; y2:411px; "/>
  4250. <input id="ipt_actgrdeexer" ref="/root/main/maindata/nutrstatjudg/actgrdeexer" class="input_search" style="left:67px; top:526px; width:391px; height:19px; ">
  4251. <script type="javascript" ev:event="xforms-value-changed">
  4252. <![CDATA[
  4253. //체크박스를 체크하지 않고 텍스트 입력시 체크박스 자동체크
  4254. if (model.getValue("/root/main/maindata/nutrstatjudg/actgrdeexer") == "") {
  4255. var str = chk_actgrde.value;
  4256. var str1 = "";
  4257. var chk = "";
  4258. for (var i=0; i < str.length; i++) {
  4259. var ch = str.charAt(i);
  4260. if (ch == "5") {
  4261. chk = "Y";
  4262. }
  4263. if (chk == "Y" && str.charAt(i) == "▦") {
  4264. chk = "";
  4265. } else if (chk == "Y") {
  4266. } else {
  4267. str1 = str1 + str.charAt(i);
  4268. }
  4269. }
  4270. chk_actgrde.value = str1;
  4271. } else {
  4272. var str = chk_actgrde.value;
  4273. str = str + "▦5"
  4274. chk_actgrde.value = str;
  4275. }
  4276. ]]>
  4277. </script>
  4278. </input>
  4279. <caption id="caption167" style="left:745px; top:82px; width:30px; height:20px; vertical-align:middle; ">개월</caption>
  4280. <input id="ipt_bdwtupdtterm" ref="/root/main/maindata/nutrstatjudg/bdwtupdtterm" class="input_search" navindex="9" autonext="false" maxlength="5" style="left:700px; top:80px; width:40px; height:19px; "/>
  4281. <button id="btn_nutrstatjudgbase" class="btn2_letter8" style="left:758px; top:366px; width:108px; height:19px; ">
  4282. <caption>영양상태판정기준</caption>
  4283. <script type="javascript" ev:event="onclick">
  4284. <![CDATA[
  4285. //modal("SPANC00200", 0,100,150,"SPANC00200", "/root/init/nutrjudgbase", "/root/main/receivedata");
  4286. modal("SPANC00303", 0,100,150,"SPANC00303");
  4287. ]]>
  4288. </script>
  4289. </button>
  4290. <input id="ipt_smoktims" ref="/root/main/maindata/nutrstatjudg/smoktims" class="input_search" autonext="false" maxlength="4" style="left:279px; top:316px; width:75px; height:19px; ">
  4291. <script type="javascript" ev:event="xforms-value-changed">
  4292. <![CDATA[
  4293. //체크박스를 체크하지 않고 텍스트 입력시 체크박스 자동체크
  4294. if (model.getValue("/root/main/maindata/nutrstatjudg/smoktims") == "") {
  4295. var str = chk_diethist.value;
  4296. var str1 = "";
  4297. var chk = "";
  4298. for (var i=0; i < str.length; i++) {
  4299. var ch = str.substr(i,2);
  4300. if (ch == "21") {
  4301. chk = "Y";
  4302. }
  4303. if (chk == "Y" && str.charAt(i) == "▦") {
  4304. chk = "";
  4305. } else if (chk == "Y") {
  4306. } else {
  4307. str1 = str1 + str.charAt(i);
  4308. }
  4309. }
  4310. chk_diethist.value = str1;
  4311. } else {
  4312. var str = chk_diethist.value;
  4313. var yn = "N";
  4314. for (var i=0; i < str.length; i++) {
  4315. if ( str.substr(i,2) == "21" ) {
  4316. yn = "Y";
  4317. break;
  4318. }
  4319. }
  4320. if ( yn == "N" ) {
  4321. str = str + "▦21"
  4322. chk_diethist.value = str;
  4323. }
  4324. // var str = chk_diethist.value;
  4325. // str = str + "▦21"
  4326. // chk_diethist.value = str;
  4327. }
  4328. ]]>
  4329. </script>
  4330. </input>
  4331. <line id="line153" class="line_1" style="x1:5px; y1:436px; x2:458px; y2:436px; "/>
  4332. <caption id="caption176" class="cell_1" style="left:5px; top:441px; width:60px; height:23px; vertical-align:middle; ">주식</caption>
  4333. <caption id="caption177" class="cell_1" style="left:147px; top:441px; width:60px; height:23px; vertical-align:middle; ">부식</caption>
  4334. <line id="line154" class="line_3" style="x1:5px; y1:464px; x2:458px; y2:464px; "/>
  4335. <caption id="caption202" class="cell_1" style="left:290px; top:441px; width:60px; height:23px; vertical-align:middle; ">기타</caption>
  4336. <input id="ipt_intkstatmainmeal" ref="/root/main/maindata/nutrstatjudg/intkstatmainmeal" class="input_search" autonext="false" maxlength="3" format="999" style="left:68px; top:442px; width:52px; height:19px; "/>
  4337. <caption id="caption203" style="left:126px; top:442px; width:20px; height:20px; vertical-align:middle; ">%</caption>
  4338. <caption id="caption207" style="left:268px; top:442px; width:20px; height:20px; vertical-align:middle; ">%</caption>
  4339. <input id="ipt_intkstatsubmeal" ref="/root/main/maindata/nutrstatjudg/intkstatsubmeal" class="input_search" autonext="false" maxlength="3" format="999" style="left:210px; top:442px; width:52px; height:19px; "/>
  4340. <line id="line151" class="line_2" style="x1:5px; y1:548px; x2:458px; y2:548px; "/>
  4341. <input id="ipt_intkstatetc" ref="/root/main/maindata/nutrstatjudg/intkstatetc" class="input_search" style="left:353px; top:442px; width:105px; height:19px; "/>
  4342. <caption id="caption209" class="tit_2" style="left:13px; top:422px; width:95px; height:14px; ">식사섭취상태</caption>
  4343. <button id="btn_calculation" class="btn2_letter2" style="left:805px; top:80px; width:42px; height:19px; ">
  4344. <caption>계산</caption>
  4345. <script type="javascript" ev:event="DOMActivate">
  4346. <![CDATA[
  4347. fPhysMeasRsltCalc();
  4348. ]]>
  4349. </script>
  4350. </button>
  4351. <button id="button1" class="btn4_letter2" style="left:675px; top:498px; width:56px; height:22px; ">
  4352. <caption>COP</caption>
  4353. <script type="javascript" ev:event="onclick">
  4354. <![CDATA[
  4355. modal("SPANC00307", "", "700", "410", "SPANC00307", "", "");
  4356. ]]>
  4357. </script>
  4358. </button>
  4359. </case>
  4360. <case id="case2">
  4361. <datagrid id="grd_cnstreq" nodeset="/root/main/maindata/cureplan/cnstreq" autoresize="true" caption="등록번호^수행일자^영양관리유형^상담구분^코드^내용" colsep="^" colwidth="10, 10, 10, 10, 350, 486" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:7px; top:515px; width:858px; height:105px; ">
  4362. <col ref="pid" visibility="hidden"/>
  4363. <col ref="execdd" visibility="hidden"/>
  4364. <col ref="nutrmngtkind" visibility="hidden"/>
  4365. <col ref="cnstpurs" visibility="hidden"/>
  4366. <col ref="cureplancd" type="combo">
  4367. <choices>
  4368. <item>
  4369. <label/>
  4370. <value/>
  4371. </item>
  4372. <item>
  4373. <label>전화영양상담 예정입니다.</label>
  4374. <value>1</value>
  4375. </item>
  4376. <item>
  4377. <label>식사처방 변경해 주십시오.</label>
  4378. <value>2</value>
  4379. </item>
  4380. <item>
  4381. <label>기타</label>
  4382. <value>9</value>
  4383. </item>
  4384. </choices>
  4385. </col>
  4386. <col ref="cureplancnts" type="input"/>
  4387. </datagrid>
  4388. <button id="btn_rowadd2" class="btn2_letter3" style="left:750px; top:490px; width:53px; height:19px; ">
  4389. <caption>행추가</caption>
  4390. <script type="javascript" ev:event="DOMActivate">
  4391. <![CDATA[
  4392. grd_cnstreq.addRow();
  4393. ]]>
  4394. </script>
  4395. </button>
  4396. <button id="btn_rowdel2" class="btn2_letter3" style="left:805px; top:490px; width:53px; height:19px; ">
  4397. <caption>행삭제</caption>
  4398. <script type="javascript" ev:event="DOMActivate">
  4399. <![CDATA[
  4400. //grd_cnstreq.deleteRow(grd_cnstreq.row);
  4401. grd_cnstreq.addStatus(grd_cnstreq.row, "delete");
  4402. ]]>
  4403. </script>
  4404. </button>
  4405. <line id="line114" class="line_3" style="x1:5px; y1:428px; x2:338px; y2:428px; "/>
  4406. <textarea id="tar_review1" ref="/root/main/maindata/cnstreq/review" disabled="false" style="left:5px; top:30px; width:333px; height:397px; line-spacing:6; "/>
  4407. <line id="line115" class="line_1" style="x1:5px; y1:25px; x2:338px; y2:25px; "/>
  4408. <caption id="caption150" class="tit_2" style="left:11px; top:10px; width:142px; height:13px; ">영양상태판정Review</caption>
  4409. <caption id="caption152" class="tit_2" style="left:350px; top:10px; width:100px; height:13px; ">영양요구량</caption>
  4410. <line id="line116" class="line_1" style="x1:345px; y1:25px; x2:865px; y2:25px; "/>
  4411. <line id="line117" class="line_2" style="x1:345px; y1:52px; x2:865px; y2:52px; "/>
  4412. <line id="line118" class="line_2" style="x1:345px; y1:152px; x2:865px; y2:152px; "/>
  4413. <caption id="caption157" class="cell_1" style="left:345px; top:178px; width:83px; height:40px; vertical-align:middle; ">기타</caption>
  4414. <input id="opt_calr" ref="/root/main/maindata/cnstreq/optcalr1" class="output_fix" autonext="false" editable="true" maxlength="4" format="9999" appearance="input" style="left:431px; top:55px; width:85px; height:19px; "/>
  4415. <caption id="caption158" style="left:523px; top:55px; width:55px; height:20px; vertical-align:middle; ">kcal/day</caption>
  4416. <select1 id="rdo_calrflag" ref="/root/main/maindata/cnstreq/calrflag1" appearance="full" cols="1" rows="2" vcellspacing="9" overflow="visible" style="left:433px; top:77px; width:58px; height:50px; ">
  4417. <choices>
  4418. <item>
  4419. <label>계수법</label>
  4420. <value>1</value>
  4421. </item>
  4422. <item>
  4423. <label>HB</label>
  4424. <value>2</value>
  4425. </item>
  4426. </choices>
  4427. </select1>
  4428. <caption id="caption159" style="left:618px; top:105px; width:10px; height:20px; vertical-align:middle; ">*</caption>
  4429. <caption id="caption160" style="left:553px; top:80px; width:10px; height:20px; vertical-align:middle; ">*</caption>
  4430. <caption id="caption161" style="left:618px; top:80px; width:55px; height:20px; vertical-align:middle; ">kcal/kg</caption>
  4431. <caption id="caption162" style="left:553px; top:105px; width:10px; height:20px; vertical-align:middle; ">*</caption>
  4432. <caption id="caption163" style="left:498px; top:130px; width:67px; height:20px; vertical-align:middle; ">복막투석액</caption>
  4433. <caption id="caption164" style="left:618px; top:132px; width:30px; height:20px; vertical-align:middle; ">kcal</caption>
  4434. <input id="ipt_dialqty" ref="/root/main/maindata/cnstreq/dialqty1" class="input_search" autonext="false" maxlength="4" format="9999" style="left:568px; top:130px; width:45px; height:19px; "/>
  4435. <caption id="caption166" style="left:693px; top:155px; width:10px; height:20px; vertical-align:middle; ">*</caption>
  4436. <caption id="caption168" style="left:523px; top:155px; width:38px; height:20px; vertical-align:middle; ">g/day</caption>
  4437. <caption id="caption169" style="left:755px; top:155px; width:37px; height:25px; vertical-align:middle; ">g/kg</caption>
  4438. <input id="opt_protadopt" ref="/root/main/maindata/cnstreq/optprotadopt1" class="output_fix" autonext="false" editable="true" maxlength="3" format="###.9" appearance="input" style="left:638px; top:155px; width:50px; height:19px; "/>
  4439. <input id="opt_protqty" ref="/root/main/maindata/cnstreq/optprotqty1" class="output_fix" autonext="false" editable="true" maxlength="3" format="999" appearance="input" style="left:431px; top:155px; width:85px; height:19px; "/>
  4440. <caption id="caption172" class="cell_1" style="left:345px; top:154px; width:83px; height:23px; vertical-align:middle; ">단백질</caption>
  4441. <line id="line120" class="line_3" style="x1:345px; y1:219px; x2:865px; y2:219px; "/>
  4442. <line id="line121" class="line_1" style="x1:345px; y1:244px; x2:865px; y2:244px; "/>
  4443. <caption id="caption178" class="tit_2" style="left:350px; top:228px; width:95px; height:13px; ">영양상태평가</caption>
  4444. <textarea id="tar_nutrstatvalu1" ref="/root/main/maindata/cnstreq/nutrstatvalucnts1" style="left:345px; top:274px; width:520px; height:54px; "/>
  4445. <caption id="caption179" class="cell_1" style="left:6px; top:460px; width:65px; height:23px; vertical-align:middle; ">피상담자</caption>
  4446. <caption id="caption180" class="tit_2" style="left:11px; top:439px; width:128px; height:13px; ">영양상담이해도</caption>
  4447. <select1 id="rdo_unstdgrde" ref="/root/main/maindata/cnstreq/unstdgrde1" appearance="full" cellspacing="30" cols="3" rows="1" overflow="visible" style="left:432px; top:462px; width:158px; height:20px; ">
  4448. <choices>
  4449. <item>
  4450. <label>상</label>
  4451. <value>1</value>
  4452. </item>
  4453. <item>
  4454. <label>중</label>
  4455. <value>2</value>
  4456. </item>
  4457. <item>
  4458. <label>하</label>
  4459. <value>3</value>
  4460. </item>
  4461. </choices>
  4462. </select1>
  4463. <line id="line122" class="line_3" style="x1:6px; y1:483px; x2:865px; y2:483px; "/>
  4464. <line id="line123" class="line_1" style="x1:6px; y1:455px; x2:865px; y2:455px; "/>
  4465. <caption id="caption181" class="cell_1" style="left:345px; top:460px; width:83px; height:23px; vertical-align:middle; ">이해도</caption>
  4466. <select id="chk_cnstpsn" ref="/root/main/maindata/cnstreq/cnstpsn1" overflow="visible" appearance="full" cellspacing="28" cols="4" rows="1" sep="▦" style="left:80px; top:462px; width:255px; height:20px; ">
  4467. <choices>
  4468. <item>
  4469. <label>환자</label>
  4470. <value>1</value>
  4471. </item>
  4472. <item>
  4473. <label>보호자</label>
  4474. <value>2</value>
  4475. </item>
  4476. <item>
  4477. <label>기타</label>
  4478. <value>3</value>
  4479. </item>
  4480. </choices>
  4481. <script type="javascript" ev:event="xforms-value-changed">
  4482. <![CDATA[
  4483. var eduwho = chk_cnstpsn.label;
  4484. var globalData = getGlobalVariable("ANC00350eventtarget", "A"); // 이벤트가 발생한 그리드
  4485. var target = model.getValue("/root/temp/griddata/gridid"); // 이벤트가 발생한 그리드
  4486. var targetRow = model.getValue("/root/temp/griddata/gridrow"); // 이벤트가 발생한 그리드 row 값
  4487. // 피상담자 구분값 치환
  4488. eduwho = eduwho.replace("▦", ", ");
  4489. // 영양관리이력 데이터 세팅
  4490. if(target == "grd_nutrmngthist") {
  4491. model.setValue("/root/main/maindata/nutrmngt["+targetRow+"]/eduwho", eduwho); // 교육대상자
  4492. }
  4493. // 영양검색결과이력 데이터 세팅
  4494. else if(target == "grd_nutrsrchrslthist") {
  4495. model.setValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/eduwho", eduwho); // 교육대상자
  4496. }
  4497. // 초기 입력 데이터 세팅
  4498. else {
  4499. model.setValue("/root/temp/senddata/eduwho", eduwho); // 교육대상자
  4500. }
  4501. ]]>
  4502. </script>
  4503. </select>
  4504. <line id="line124" class="line_3" style="x1:6px; y1:625px; x2:865px; y2:625px; "/>
  4505. <caption id="caption182" class="tit_2" style="left:10px; top:494px; width:128px; height:13px; ">영양치료계획/권장</caption>
  4506. <input id="opt_calrhb" ref="/root/main/maindata/cnstreq/optcalrhb1" class="output_fix" autonext="false" editable="true" maxlength="3" format="###.9" appearance="input" style="left:498px; top:105px; width:50px; height:19px; "/>
  4507. <input id="opt_calradopt" ref="/root/main/maindata/cnstreq/optcalradopt1" class="output_fix" autonext="false" editable="true" maxlength="3" format="###.9" appearance="input" style="left:498px; top:80px; width:50px; height:19px; "/>
  4508. <textarea id="tar_nutrreqqty" ref="/root/main/maindata/cnstreq/nutrreqqty1" style="left:431px; top:180px; width:434px; height:38px; "/>
  4509. <line id="line126" class="line_1" style="x1:6px; y1:510px; x2:865px; y2:510px; "/>
  4510. <button id="btn_intkqtyvalu" class="btn2_letter5" style="left:690px; top:5px; width:75px; height:19px; ">
  4511. <caption>섭취량평가</caption>
  4512. <script type="javascript" ev:event="DOMActivate">
  4513. <![CDATA[
  4514. model.setValue("/root/send/searchitem/cnstflag", "C"); // 'C'는 협진의뢰를 뜻함.
  4515. model.setValue("/root/send/searchitem/calrintk", model.getValue("/root/main/maindata/cnstreq/calrintk1"));
  4516. model.setValue("/root/send/searchitem/calrintkqty", model.getValue("/root/main/maindata/cnstreq/calrintkqty1"));
  4517. model.setValue("/root/send/searchitem/protintk", model.getValue("/root/main/maindata/cnstreq/protintk1"));
  4518. model.setValue("/root/send/searchitem/protintkqty", model.getValue("/root/main/maindata/cnstreq/protintkqty1"));
  4519. model.setValue("/root/send/searchitem/intkqtyetc", model.getValue("/root/main/maindata/cnstreq/intkqtyetc1"));
  4520. model.setValue("/root/send/searchitem/dietercmt", model.getValue("/root/main/maindata/cnstreq/dietercmt1"));
  4521. model.setValue("/root/send/searchitem/hngnm", model.getValue("/root/main/maindata/patbaseinfo/hngnm"));
  4522. model.setValue("/root/send/searchitem/sex", model.getValue("/root/main/maindata/patbaseinfo/sex"));
  4523. model.setValue("/root/send/searchitem/age", model.getValue("/root/main/maindata/patbaseinfo/age"));
  4524. model.setValue("/root/send/searchitem/ht", model.getValue("/root/main/maindata/nutrstatjudg/physmeasbdht"));
  4525. model.setValue("/root/send/searchitem/wt", model.getValue("/root/main/maindata/nutrstatjudg/physmeasbdwt"));
  4526. model.setValue("/root/send/searchitem/ibw", model.getValue("/root/main/maindata/nutrstatjudg/physmeasibw"));
  4527. model.setValue("/root/send/searchitem/calrrecmqty", model.getValue("/root/main/maindata/cnstreq/optcalr1"));
  4528. model.setValue("/root/send/searchitem/protrecmqty", model.getValue("/root/main/maindata/cnstreq/optprotqty1"));
  4529. modal("SPANC00100", 0,100,150,"SPANC00100", "/root/send/searchitem", "/root/main/receivedata");
  4530. ]]>
  4531. </script>
  4532. </button>
  4533. <select1 id="cmb_nutrstatvalu1" ref="/root/main/maindata/cnstreq/nutrstatvalucd1" class="combo_default" appearance="minimal" style="left:431px; top:251px; width:434px; height:19px; ">
  4534. <choices>
  4535. <item>
  4536. <label/>
  4537. <value/>
  4538. </item>
  4539. <item>
  4540. <label>No malnutrition present</label>
  4541. <value>1</value>
  4542. </item>
  4543. <item>
  4544. <label>Mild malnutrition</label>
  4545. <value>2</value>
  4546. </item>
  4547. <item>
  4548. <label>Moderate malnutrition</label>
  4549. <value>3</value>
  4550. </item>
  4551. <item>
  4552. <label>Energy malnutrition</label>
  4553. <value>4</value>
  4554. </item>
  4555. <item>
  4556. <label>Protein malnutrition</label>
  4557. <value>5</value>
  4558. </item>
  4559. <item>
  4560. <label>Severe Protein Energy malnutrition</label>
  4561. <value>6</value>
  4562. </item>
  4563. </choices>
  4564. </select1>
  4565. <caption id="caption184" class="cell_1" style="left:345px; top:249px; width:83px; height:23px; vertical-align:middle; ">영양상태판정</caption>
  4566. <line id="line127" class="line_2" style="x1:345px; y1:272px; x2:865px; y2:272px; "/>
  4567. <line id="line128" class="line_3" style="x1:345px; y1:329px; x2:865px; y2:329px; "/>
  4568. <line id="line129" class="line_3" style="x1:345px; y1:427px; x2:865px; y2:427px; "/>
  4569. <caption id="caption185" class="tit_2" style="left:350px; top:340px; width:95px; height:13px; ">영양상담내용</caption>
  4570. <line id="line130" class="line_1" style="x1:345px; y1:356px; x2:865px; y2:356px; "/>
  4571. <caption id="caption186" class="cell_1" style="left:345px; top:361px; width:83px; height:23px; vertical-align:middle; ">상용구선택</caption>
  4572. <select1 id="cmb_cnstcd" ref="/root/main/maindata/cnstreq/cnstcd" class="combo_default" appearance="minimal" style="left:431px; top:363px; width:434px; height:19px; ">
  4573. <choices>
  4574. <item>
  4575. <label/>
  4576. <value/>
  4577. </item>
  4578. <!-- 기존 코드 항목은 주석처리 - 시작
  4579. <item>
  4580. <label>상기 질환에 대하여 교육</label>
  4581. <value>1</value>
  4582. </item>
  4583. <item>
  4584. <label>체중 조절</label>
  4585. <value>2</value>
  4586. </item>
  4587. <item>
  4588. <label>식습관 개선</label>
  4589. <value>3</value>
  4590. </item>
  4591. <item>
  4592. <label>처방 열량에 대한 식사 적용</label>
  4593. <value>4</value>
  4594. </item>
  4595. <item>
  4596. <label>염분제한에 대한 이해</label>
  4597. <value>5</value>
  4598. </item>
  4599. <item>
  4600. <label>혈중 지질 농도 개선</label>
  4601. <value>6</value>
  4602. </item>
  4603. 기존 코드 항목은 주석처리 - 끝 -->
  4604. <item>
  4605. <label>당뇨일반 교육</label>
  4606. <value>7</value>
  4607. </item>
  4608. <item>
  4609. <label>당뇨부페 교육</label>
  4610. <value>8</value>
  4611. </item>
  4612. <item>
  4613. <label>고혈압 교육</label>
  4614. <value>9</value>
  4615. </item>
  4616. <item>
  4617. <label>심장질환 교육</label>
  4618. <value>10</value>
  4619. </item>
  4620. <item>
  4621. <label>복막투석 교육</label>
  4622. <value>11</value>
  4623. </item>
  4624. <item>
  4625. <label>혈액투석 교육</label>
  4626. <value>12</value>
  4627. </item>
  4628. <item>
  4629. <label>항암 교육</label>
  4630. <value>13</value>
  4631. </item>
  4632. <item>
  4633. <label>혈액암 교육</label>
  4634. <value>14</value>
  4635. </item>
  4636. <item>
  4637. <label>비만 교육</label>
  4638. <value>15</value>
  4639. </item>
  4640. <item>
  4641. <label>기타 영양교육</label>
  4642. <value>16</value>
  4643. </item>
  4644. </choices>
  4645. </select1>
  4646. <textarea id="tar_cnstcnts" ref="/root/main/maindata/cnstreq/cnstcnts" style="left:345px; top:386px; width:520px; height:40px; "/>
  4647. <line id="line131" class="line_2" style="x1:345px; y1:384px; x2:865px; y2:384px; "/>
  4648. <button id="btn_nutrstatjudgbase2" class="btn2_letter8" style="left:757px; top:224px; width:108px; height:19px; ">
  4649. <caption>영양상태판정기준</caption>
  4650. <script type="javascript" ev:event="onclick">
  4651. <![CDATA[
  4652. //modal("SPANC00200", 0,100,150,"SPANC00200", "/root/init/nutrjudgbase", "/root/main/receivedata");
  4653. modal("SPANC00303", 0,100,150,"SPANC00303");
  4654. ]]>
  4655. </script>
  4656. </button>
  4657. <button id="btn_nutrreqqtycalc" class="btn2_letter7" style="left:768px; top:5px; width:97px; height:19px; ">
  4658. <caption>영양요구량계산</caption>
  4659. <script type="javascript" ev:event="DOMActivate">
  4660. <![CDATA[
  4661. // btn_calculation2.dispatch("DOMActivate");
  4662. // btn_calculation3.dispatch("DOMActivate");
  4663. var stndbdwt = model.getValue("/root/main/maindata/cnstreq/stndbdwt1"); // 기준체중
  4664. var calrflag = model.getValue("/root/main/maindata/cnstreq/calrflag1"); // 계수법 or HB 구분
  4665. var dialqty = model.getValue("/root/main/maindata/cnstreq/dialqty1"); // 복막투석액
  4666. var calr = 0; // 최종 열량값
  4667. model.setValue("/root/main/maindata/patbaseinfo/flag", "1"); // "1"은 협진의뢰 tab화면임을 뜻함.
  4668. if ( calrflag == 1 ) { // 계수법일 경우
  4669. model.setValue("/root/main/maindata/cnstreq/optcalradopt1", stndbdwt);
  4670. var adoptlawcalr = model.getValue("/root/main/maindata/cnstreq/adoptlawcalr1");
  4671. calr = stndbdwt * adoptlawcalr;
  4672. //계수법을 선택했으므로 HB 관련 항목은 clear 시킨다.
  4673. model.setValue("/root/main/maindata/cnstreq/optcalrhb1", "");
  4674. model.setValue("/root/main/maindata/cnstreq/hbcalr11", "");
  4675. model.setValue("/root/main/maindata/cnstreq/hbcalr21", "");
  4676. } else if ( calrflag == 2 ) { // HB일 경우
  4677. var sex = model.getValue("/root/main/maindata/patbaseinfo/sex");
  4678. var age = model.getValue("/root/main/maindata/patbaseinfo/age");
  4679. var wt = model.getValue("/root/main/maindata/nutrstatjudg/physmeasbdwt");
  4680. var ht = model.getValue("/root/main/maindata/nutrstatjudg/physmeasbdht");
  4681. // var abw = model.getValue("/root/main/maindata/nutrstatjudg/physmeasbdabw");
  4682. var abw = ipt_physmeasabw.value;
  4683. var pibw = opt_pibw1.value;
  4684. var calrhb = 0;
  4685. if (sex == "M") { //남자일 경우
  4686. if (pibw < 120) { //PIBW가 120 이상인 경우는 WT 대신 ABW로 계산
  4687. calrhb = 66+13.7*wt+5*ht-6.8*age;
  4688. } else {
  4689. calrhb = 66+13.7*abw+5*ht-6.8*age;
  4690. }
  4691. } else if (sex == "F") { //여자일 경우
  4692. if (pibw < 120) { //PIBW가 120 이상인 경우는 WT 대신 ABW로 계산
  4693. calrhb = 655+9.6*wt+1.8*ht-4.7*age;
  4694. } else {
  4695. calrhb = 655+9.6*abw+1.8*ht-4.7*age;
  4696. }
  4697. }
  4698. model.setValue("/root/main/maindata/cnstreq/optcalrhb1", calrhb);
  4699. var hbcalr1 = model.getValue("/root/main/maindata/cnstreq/hbcalr11");
  4700. var hbcalr2 = model.getValue("/root/main/maindata/cnstreq/hbcalr21");
  4701. calr = calrhb * hbcalr1 * hbcalr2;
  4702. //HB를 선택했으므로 계수법 관련 항목은 clear 시킨다.
  4703. model.setValue("/root/main/maindata/cnstreq/optcalradopt1", "");
  4704. model.setValue("/root/main/maindata/cnstreq/adoptlawcalr1", "");
  4705. }
  4706. if ( dialqty == "" ) { // 복막투석액에 값이 없을 경우는 0으로 처리하고 계산한다.
  4707. dialqty = 0;
  4708. }
  4709. calr = calr - dialqty;
  4710. calr = calr.toString().getRound(-1, "HALF_UP");
  4711. model.setValue("/root/main/maindata/cnstreq/optcalr1", calr);
  4712. btn_calculation4.dispatch("DOMActivate"); //단백질 계산
  4713. model.refresh();
  4714. ]]>
  4715. </script>
  4716. </button>
  4717. <caption id="caption171" style="left:494px; top:33px; width:16px; height:20px; vertical-align:middle; ">kg</caption>
  4718. <input id="ipt_stndbdwt" ref="/root/main/maindata/cnstreq/stndbdwt1" class="input_search" autonext="false" maxlength="3" format="###.9" style="left:431px; top:31px; width:59px; height:19px; "/>
  4719. <line id="line104" class="line_2" style="x1:345px; y1:176px; x2:865px; y2:176px; "/>
  4720. <button id="btn_calculation2" class="btn2_letter2" style="left:690px; top:105px; width:42px; height:19px; ">
  4721. <caption>BEE</caption>
  4722. <script type="javascript" ev:event="DOMActivate">
  4723. <![CDATA[
  4724. var stndbdwt = model.getValue("/root/main/maindata/cnstreq/stndbdwt1"); // 기준체중
  4725. var calrflag = model.getValue("/root/main/maindata/cnstreq/calrflag1"); // 계수법 or HB 구분
  4726. var dialqty = model.getValue("/root/main/maindata/cnstreq/dialqty1"); // 복막투석액
  4727. var calr = 0; // 최종 열량값
  4728. model.setValue("/root/main/maindata/patbaseinfo/flag", "1"); // "1"은 협진의뢰 tab화면임을 뜻함.
  4729. if ( calrflag == 1 ) { // 계수법일 경우
  4730. model.setValue("/root/main/maindata/cnstreq/optcalradopt1", stndbdwt);
  4731. var adoptlawcalr = model.getValue("/root/main/maindata/cnstreq/adoptlawcalr1");
  4732. calr = stndbdwt * adoptlawcalr;
  4733. //계수법을 선택했으므로 HB 관련 항목은 clear 시킨다.
  4734. model.setValue("/root/main/maindata/cnstreq/optcalrhb1", "");
  4735. model.setValue("/root/main/maindata/cnstreq/hbcalr11", "");
  4736. model.setValue("/root/main/maindata/cnstreq/hbcalr21", "");
  4737. } else if ( calrflag == 2 ) { // HB일 경우
  4738. model.setValue("/root/main/maindata/patbaseinfo/wt", model.getValue("/root/main/maindata/nutrstatjudg/physmeasbdwt"));
  4739. model.setValue("/root/main/maindata/patbaseinfo/ht", model.getValue("/root/main/maindata/nutrstatjudg/physmeasbdht"));
  4740. model.makeValue("/root/main/maindata/patbaseinfo/abw", model.getValue("/root/main/maindata/nutrstatjudg/physmeasabw"));
  4741. model.makeValue("/root/main/maindata/patbaseinfo/pibw", opt_pibw1.value);
  4742. modal("SPANC00301", 0,100,150,"SPANC00301", "/root/main/maindata/patbaseinfo", "/root/main/receivedata");
  4743. var optcalrhb = model.getValue("/root/main/maindata/cnstreq/optcalrhb1");
  4744. var hbcalr1 = model.getValue("/root/main/maindata/cnstreq/hbcalr11");
  4745. var hbcalr2 = model.getValue("/root/main/maindata/cnstreq/hbcalr21");
  4746. calr = optcalrhb * hbcalr1 * hbcalr2;
  4747. //HB를 선택했으므로 계수법 관련 항목은 clear 시킨다.
  4748. model.setValue("/root/main/maindata/cnstreq/optcalradopt1", "");
  4749. model.setValue("/root/main/maindata/cnstreq/adoptlawcalr1", "");
  4750. }
  4751. if ( dialqty == "" ) { // 복막투석액에 값이 없을 경우는 0으로 처리하고 계산한다.
  4752. dialqty = 0;
  4753. }
  4754. calr = calr - dialqty;
  4755. calr = calr.toString().getRound(-1, "HALF_UP");
  4756. model.setValue("/root/main/maindata/cnstreq/optcalr1", calr);
  4757. model.refresh();
  4758. ]]>
  4759. </script>
  4760. </button>
  4761. <select1 id="rdo_stndbdwtflag" ref="/root/main/maindata/cnstreq/stndbdwtflag1" appearance="full" cellspacing="5" cols="3" rows="1" overflow="visible" sep="▦" style="left:526px; top:33px; width:150px; height:17px; ">
  4762. <choices>
  4763. <item>
  4764. <label>IBW</label>
  4765. <value>1</value>
  4766. </item>
  4767. <item>
  4768. <label>ABW</label>
  4769. <value>2</value>
  4770. </item>
  4771. <item>
  4772. <label>Wt</label>
  4773. <value>3</value>
  4774. </item>
  4775. </choices>
  4776. <script type="javascript" ev:event="xforms-select">
  4777. <![CDATA[
  4778. if (model.getValue("/root/main/maindata/cnstreq/stndbdwtflag1") == 1) {
  4779. model.setValue("/root/main/maindata/cnstreq/stndbdwt1", model.getValue("/root/main/maindata/nutrstatjudg/physmeasibw"));
  4780. } else if (model.getValue("/root/main/maindata/cnstreq/stndbdwtflag1") == 2) {
  4781. model.setValue("/root/main/maindata/cnstreq/stndbdwt1", model.getValue("/root/main/maindata/nutrstatjudg/physmeasabw"));
  4782. } else if (model.getValue("/root/main/maindata/cnstreq/stndbdwtflag1") == 3) {
  4783. model.setValue("/root/main/maindata/cnstreq/stndbdwt1", model.getValue("/root/main/maindata/nutrstatjudg/physmeasbdwt"));
  4784. }
  4785. model.refresh();
  4786. ]]>
  4787. </script>
  4788. </select1>
  4789. <caption id="caption165" class="cell_1" style="left:345px; top:54px; width:83px; height:99px; vertical-align:middle; ">열량</caption>
  4790. <caption id="caption170" class="cell_1" style="left:345px; top:30px; width:83px; height:23px; vertical-align:middle; ">기준체중</caption>
  4791. <button id="btn_calculation3" class="btn2_letter2" style="left:655px; top:130px; width:42px; height:19px; ">
  4792. <caption>계산</caption>
  4793. <script type="javascript" ev:event="DOMActivate">
  4794. <![CDATA[
  4795. modal("SPANC00302");
  4796. if ( model.getAttribute("iParam_kcal") != "" ) {
  4797. ipt_dialqty.value = model.getAttribute("iParam_kcal");
  4798. model.refresh();
  4799. }
  4800. ]]>
  4801. </script>
  4802. </button>
  4803. <button id="btn_calculation4" class="btn2_letter2" visibility="hidden" style="left:795px; top:155px; width:42px; height:19px; ">
  4804. <caption>계산</caption>
  4805. <script type="javascript" ev:event="DOMActivate">
  4806. <![CDATA[
  4807. var stndbdwt = model.getValue("/root/main/maindata/cnstreq/stndbdwt1"); // 기준체중
  4808. model.setValue("/root/main/maindata/cnstreq/optprotadopt1", stndbdwt);
  4809. var protqty = model.getValue("/root/main/maindata/cnstreq/protqty1"); // 단백질(g/kg)
  4810. var optprotqty = stndbdwt * protqty;
  4811. optprotqty = optprotqty.toString().getRound(-1, "HALF_UP");
  4812. model.setValue("/root/main/maindata/cnstreq/optprotqty1", optprotqty); // 단백질(g/day)
  4813. model.refresh();
  4814. ]]>
  4815. </script>
  4816. </button>
  4817. <input id="ipt_adoptlawcalr" ref="/root/main/maindata/cnstreq/adoptlawcalr1" class="input_search" autonext="false" maxlength="2" format="99" style="left:568px; top:80px; width:45px; height:19px; "/>
  4818. <input id="ipt_hbcalr1" ref="/root/main/maindata/cnstreq/hbcalr11" class="input_search" autonext="false" maxlength="1" format="#.9" style="left:568px; top:105px; width:45px; height:19px; "/>
  4819. <input id="ipt_hbcalr2" ref="/root/main/maindata/cnstreq/hbcalr21" class="input_search" autonext="false" maxlength="1" format="#.9" style="left:632px; top:105px; width:45px; height:19px; "/>
  4820. <input id="ipt_protqty" ref="/root/main/maindata/cnstreq/protqty1" class="input_search" autonext="false" maxlength="1" format="#.9" style="left:705px; top:155px; width:45px; height:19px; "/>
  4821. <caption id="caption1" style="left:590px; top:155px; width:40px; height:20px; vertical-align:middle; ">계수법</caption>
  4822. <caption id="caption4" class="cell_1" style="left:730px; top:30px; width:55px; height:23px; vertical-align:middle; ">PIBW</caption>
  4823. <output id="opt_pibw1" ref="/root/main/maindata/nutrstatjudg/physmeasibwperc" class="output_fix" format="###.9" appearance="output" style="left:788px; top:31px; width:50px; height:19px; "/>
  4824. <caption id="caption5" style="left:840px; top:31px; width:20px; height:20px; vertical-align:middle; ">%</caption>
  4825. <button id="btn_careplan1" class="btn4_letter2" style="left:750px; top:460px; width:92px; height:22px; ">
  4826. <caption>COP</caption>
  4827. <script type="javascript" ev:event="onclick">
  4828. <![CDATA[
  4829. modal("SPANC00307", "", "700", "410", "SPANC00307", "", "");
  4830. ]]>
  4831. </script>
  4832. </button>
  4833. <button id="btn_edu1" class="btn4_letter2" style="left:692px; top:460px; width:56px; height:22px; ">
  4834. <caption>PFE</caption>
  4835. <script type="javascript" ev:event="onclick">
  4836. <![CDATA[
  4837. var nutrmngtkind = model.getValue("/root/send/searchitem/nutrmngtkind");
  4838. if(nutrmngtkind == "07" || nutrmngtkind == "08" || nutrmngtkind == "09") {
  4839. modal("SPANC00306", "", "720", "250", "SPANC00306", "/root/main/maindata/cnstreq/cnstpsn1", "/root/main/recData/cnstpsn1");
  4840. } else {
  4841. messageBox("영향관리유형이 '협진입원(영양교육)', '협진외래(영양교육)', '협진추구관리' 일 경우만 입력", "I006");
  4842. }
  4843. ]]>
  4844. </script>
  4845. </button>
  4846. </case>
  4847. <case id="case3">
  4848. <datagrid id="grd_pursmngt" nodeset="/root/main/maindata/cureplan/pursmngt" autoresize="true" caption="등록번호^수행일자^영양관리유형^상담구분^코드^내용" colsep="^" colwidth="10, 10, 10, 10, 240, 258" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:345px; top:425px; width:520px; height:195px; ">
  4849. <col ref="pid" visibility="hidden"/>
  4850. <col ref="execdd" visibility="hidden"/>
  4851. <col ref="nutrmngtkind" visibility="hidden"/>
  4852. <col ref="cnstpurs" visibility="hidden"/>
  4853. <col ref="cureplancd" type="combo">
  4854. <choices>
  4855. <item>
  4856. <label/>
  4857. <value/>
  4858. </item>
  4859. <item>
  4860. <label>전화영양상담 예정입니다.</label>
  4861. <value>1</value>
  4862. </item>
  4863. <item>
  4864. <label>식사처방 변경해 주십시오.</label>
  4865. <value>2</value>
  4866. </item>
  4867. <item>
  4868. <label>기타</label>
  4869. <value>9</value>
  4870. </item>
  4871. </choices>
  4872. </col>
  4873. <col ref="cureplancnts" type="input"/>
  4874. </datagrid>
  4875. <button id="btn_rowadd3" class="btn2_letter3" style="left:750px; top:400px; width:53px; height:19px; ">
  4876. <caption>행추가</caption>
  4877. <script type="javascript" ev:event="DOMActivate">
  4878. <![CDATA[
  4879. grd_pursmngt.addRow();
  4880. ]]>
  4881. </script>
  4882. </button>
  4883. <button id="btn_rowdel3" class="btn2_letter3" style="left:805px; top:400px; width:53px; height:19px; ">
  4884. <caption>행삭제</caption>
  4885. <script type="javascript" ev:event="DOMActivate">
  4886. <![CDATA[
  4887. //grd_pursmngt.deleteRow(grd_pursmngt.row);
  4888. grd_pursmngt.addStatus(grd_pursmngt.row, "delete");
  4889. ]]>
  4890. </script>
  4891. </button>
  4892. <caption id="caption99" class="tit_2" style="left:350px; top:10px; width:100px; height:13px; ">영양요구량</caption>
  4893. <line id="line141" class="line_1" style="x1:345px; y1:25px; x2:865px; y2:25px; "/>
  4894. <textarea id="tar_nutrstatvalu2" ref="/root/main/maindata/pursmngt/nutrstatvalucnts2" style="left:345px; top:275px; width:520px; height:114px; "/>
  4895. <line id="line142" class="line_2" style="x1:345px; y1:273px; x2:865px; y2:273px; "/>
  4896. <caption id="caption194" class="tit_2" style="left:350px; top:229px; width:128px; height:13px; ">영양상태평가</caption>
  4897. <line id="line143" class="line_1" style="x1:345px; y1:245px; x2:865px; y2:245px; "/>
  4898. <caption id="caption195" class="cell_1" style="left:345px; top:250px; width:87px; height:23px; vertical-align:middle; ">영양상태판정</caption>
  4899. <select1 id="cmb_nutrstatvalu2" ref="/root/main/maindata/pursmngt/nutrstatvalucd2" class="combo_default" appearance="minimal" style="left:435px; top:252px; width:430px; height:19px; ">
  4900. <choices>
  4901. <item>
  4902. <label/>
  4903. <value/>
  4904. </item>
  4905. <item>
  4906. <label>No malnutrition present</label>
  4907. <value>1</value>
  4908. </item>
  4909. <item>
  4910. <label>Mild malnutrition</label>
  4911. <value>2</value>
  4912. </item>
  4913. <item>
  4914. <label>Moderate malnutrition</label>
  4915. <value>3</value>
  4916. </item>
  4917. <item>
  4918. <label>Energy malnutrition</label>
  4919. <value>4</value>
  4920. </item>
  4921. <item>
  4922. <label>Protein malnutrition</label>
  4923. <value>5</value>
  4924. </item>
  4925. <item>
  4926. <label>Severe Protein Energy malnutrition</label>
  4927. <value>6</value>
  4928. </item>
  4929. </choices>
  4930. </select1>
  4931. <line id="line144" class="line_3" style="x1:345px; y1:391px; x2:865px; y2:391px; "/>
  4932. <line id="line146" class="line_1" style="x1:345px; y1:420px; x2:865px; y2:420px; "/>
  4933. <caption id="caption196" class="tit_2" style="left:350px; top:404px; width:128px; height:13px; ">영양치료계획/권장</caption>
  4934. <line id="line147" class="line_3" style="x1:345px; y1:624px; x2:865px; y2:624px; "/>
  4935. <input id="opt_protqty2" ref="/root/main/maindata/pursmngt/optprotqty2" class="output_fix" autonext="false" maxlength="3" format="999" appearance="input" style="left:435px; top:156px; width:85px; height:19px; "/>
  4936. <caption id="caption193" style="left:522px; top:156px; width:38px; height:20px; vertical-align:middle; ">g/day</caption>
  4937. <caption id="caption199" style="left:754px; top:156px; width:55px; height:20px; vertical-align:middle; ">g/kg</caption>
  4938. <caption id="caption200" style="left:522px; top:56px; width:55px; height:20px; vertical-align:middle; ">kcal/day</caption>
  4939. <caption id="caption201" style="left:623px; top:106px; width:10px; height:20px; vertical-align:middle; ">*</caption>
  4940. <input id="opt_calr2" ref="/root/main/maindata/pursmngt/optcalr2" class="output_fix" autonext="false" maxlength="4" format="9999" appearance="input" style="left:435px; top:56px; width:85px; height:19px; "/>
  4941. <caption id="caption204" style="left:557px; top:82px; width:10px; height:20px; vertical-align:middle; ">*</caption>
  4942. <caption id="caption206" style="left:622px; top:81px; width:55px; height:20px; vertical-align:middle; ">kcal/kg</caption>
  4943. <caption id="caption208" style="left:557px; top:107px; width:10px; height:20px; vertical-align:middle; ">*</caption>
  4944. <input id="ipt_dialqty2" ref="/root/main/maindata/pursmngt/dialqty2" class="input_search" autonext="false" maxlength="4" format="9999" style="left:572px; top:131px; width:45px; height:19px; "/>
  4945. <caption id="caption210" style="left:497px; top:131px; width:63px; height:20px; vertical-align:middle; ">복막투석액</caption>
  4946. <caption id="caption212" style="left:617px; top:133px; width:30px; height:20px; vertical-align:middle; ">kcal</caption>
  4947. <caption id="caption216" style="left:694px; top:156px; width:10px; height:20px; vertical-align:middle; ">*</caption>
  4948. <textarea id="tar_nutrreqqty2" ref="/root/main/maindata/pursmngt/nutrreqqty2" style="left:435px; top:180px; width:430px; height:35px; "/>
  4949. <line id="line150" class="line_3" style="x1:345px; y1:216px; x2:865px; y2:216px; "/>
  4950. <caption id="caption198" class="cell_1" style="left:345px; top:179px; width:87px; height:36px; vertical-align:middle; ">기타</caption>
  4951. <line id="line148" class="line_2" style="x1:345px; y1:178px; x2:865px; y2:178px; "/>
  4952. <button id="btn_nutrstatjudgbase3" class="btn2_letter8" style="left:757px; top:225px; width:108px; height:19px; ">
  4953. <caption>영양상태판정기준</caption>
  4954. <script type="javascript" ev:event="onclick">
  4955. <![CDATA[
  4956. //modal("SPANC00200", 0,100,150,"SPANC00200", "/root/init/nutrjudgbase", "/root/main/receivedata");
  4957. modal("SPANC00303", 0,100,150,"SPANC00303");
  4958. ]]>
  4959. </script>
  4960. </button>
  4961. <select1 id="rdo_calrflag2" ref="/root/main/maindata/pursmngt/calrflag2" appearance="full" cols="1" rows="2" vcellspacing="9" overflow="visible" style="left:435px; top:78px; width:58px; height:50px; ">
  4962. <choices>
  4963. <item>
  4964. <label>계수법</label>
  4965. <value>1</value>
  4966. </item>
  4967. <item>
  4968. <label>HB</label>
  4969. <value>2</value>
  4970. </item>
  4971. </choices>
  4972. </select1>
  4973. <button id="btn_nutrreqqtycalc2" class="btn2_letter7" style="left:768px; top:5px; width:97px; height:19px; ">
  4974. <caption>영양요구량계산</caption>
  4975. <script type="javascript" ev:event="DOMActivate">
  4976. <![CDATA[
  4977. // btn_calculation5.dispatch("DOMActivate");
  4978. // btn_calculation6.dispatch("DOMActivate");
  4979. var stndbdwt = model.getValue("/root/main/maindata/pursmngt/stndbdwt2"); // 기준체중
  4980. var calrflag = model.getValue("/root/main/maindata/pursmngt/calrflag2"); // 계수법 or HB 구분
  4981. var dialqty = model.getValue("/root/main/maindata/pursmngt/dialqty2"); // 복막투석액
  4982. var calr = 0; // 최종 열량값
  4983. model.setValue("/root/main/maindata/patbaseinfo/flag", "2"); // "2"는 추구관리 tab화면임을 뜻함.
  4984. if ( calrflag == 1 ) { // 계수법일 경우
  4985. model.setValue("/root/main/maindata/pursmngt/optcalradopt2", stndbdwt);
  4986. var adoptlawcalr = model.getValue("/root/main/maindata/pursmngt/adoptlawcalr2");
  4987. calr = stndbdwt * adoptlawcalr;
  4988. //계수법을 선택했으므로 HB 관련 항목은 clear 시킨다.
  4989. model.setValue("/root/main/maindata/pursmngt/optcalrhb2", "");
  4990. model.setValue("/root/main/maindata/pursmngt/hbcalr12", "");
  4991. model.setValue("/root/main/maindata/pursmngt/hbcalr22", "");
  4992. } else if ( calrflag == 2 ) { // HB일 경우
  4993. var sex = model.getValue("/root/main/maindata/patbaseinfo/sex");
  4994. var age = model.getValue("/root/main/maindata/patbaseinfo/age");
  4995. var wt = model.getValue("/root/main/maindata/nutrstatjudg/physmeasbdwt");
  4996. var ht = model.getValue("/root/main/maindata/nutrstatjudg/physmeasbdht");
  4997. var abw = model.getValue("/root/main/maindata/nutrstatjudg/physmeasbdabw");
  4998. var pibw = opt_pibw2.value;
  4999. var calrhb = 0;
  5000. if (sex == "M") { //남자일 경우
  5001. if (pibw < 120) { //PIBW가 120 이상인 경우는 WT 대신 ABW로 계산
  5002. calrhb = 66+13.7*wt+5*ht-6.8*age;
  5003. } else {
  5004. calrhb = 66+13.7*abw+5*ht-6.8*age;
  5005. }
  5006. } else if (sex == "F") { //여자일 경우
  5007. if (pibw < 120) { //PIBW가 120 이상인 경우는 WT 대신 ABW로 계산
  5008. calrhb = 655+9.6*wt+1.8*ht-4.7*age;
  5009. } else {
  5010. calrhb = 655+9.6*abw+1.8*ht-4.7*age;
  5011. }
  5012. }
  5013. model.setValue("/root/main/maindata/pursmngt/optcalrhb2", calrhb);
  5014. var hbcalr1 = model.getValue("/root/main/maindata/pursmngt/hbcalr12");
  5015. var hbcalr2 = model.getValue("/root/main/maindata/pursmngt/hbcalr22");
  5016. calr = calrhb * hbcalr1 * hbcalr2;
  5017. //HB를 선택했으므로 계수법 관련 항목은 clear 시킨다.
  5018. model.setValue("/root/main/maindata/pursmngt/optcalradopt2", "");
  5019. model.setValue("/root/main/maindata/pursmngt/adoptlawcalr2", "");
  5020. }
  5021. if ( dialqty == "" ) { // 복막투석액에 값이 없을 경우는 0으로 처리하고 계산한다.
  5022. dialqty = 0;
  5023. }
  5024. calr = calr - dialqty;
  5025. calr = calr.toString().getRound(-1, "HALF_UP");
  5026. model.setValue("/root/main/maindata/pursmngt/optcalr2", calr);
  5027. btn_calculation7.dispatch("DOMActivate");
  5028. model.refresh();
  5029. ]]>
  5030. </script>
  5031. </button>
  5032. <button id="btn_intkqtyvalu2" class="btn2_letter5" style="left:690px; top:5px; width:75px; height:19px; ">
  5033. <caption>섭취량평가</caption>
  5034. <script type="javascript" ev:event="DOMActivate">
  5035. <![CDATA[
  5036. model.setValue("/root/send/searchitem/cnstflag", "P"); // 'P'는 추구관리를 뜻함.
  5037. model.setValue("/root/send/searchitem/calrintk", model.getValue("/root/main/maindata/pursmngt/calrintk2"));
  5038. model.setValue("/root/send/searchitem/calrintkqty", model.getValue("/root/main/maindata/pursmngt/calrintkqty2"));
  5039. model.setValue("/root/send/searchitem/protintk", model.getValue("/root/main/maindata/pursmngt/protintk2"));
  5040. model.setValue("/root/send/searchitem/protintkqty", model.getValue("/root/main/maindata/pursmngt/protintkqty2"));
  5041. model.setValue("/root/send/searchitem/intkqtyetc", model.getValue("/root/main/maindata/pursmngt/intkqtyetc2"));
  5042. model.setValue("/root/send/searchitem/dietercmt", model.getValue("/root/main/maindata/pursmngt/dietercmt2"));
  5043. model.setValue("/root/send/searchitem/hngnm", model.getValue("/root/main/maindata/patbaseinfo/hngnm"));
  5044. model.setValue("/root/send/searchitem/sex", model.getValue("/root/main/maindata/patbaseinfo/sex"));
  5045. model.setValue("/root/send/searchitem/age", model.getValue("/root/main/maindata/patbaseinfo/age"));
  5046. model.setValue("/root/send/searchitem/ht", model.getValue("/root/main/maindata/nutrstatjudg/physmeasbdht"));
  5047. model.setValue("/root/send/searchitem/wt", model.getValue("/root/main/maindata/nutrstatjudg/physmeasbdwt"));
  5048. model.setValue("/root/send/searchitem/ibw", model.getValue("/root/main/maindata/nutrstatjudg/physmeasibw"));
  5049. model.setValue("/root/send/searchitem/calrrecmqty", model.getValue("/root/main/maindata/pursmngt/optcalr2"));
  5050. model.setValue("/root/send/searchitem/protrecmqty", model.getValue("/root/main/maindata/pursmngt/optprotqty2"));
  5051. modal("SPANC00100", 0,100,150,"SPANC00100", "/root/send/searchitem", "/root/main/receivedata");
  5052. ]]>
  5053. </script>
  5054. </button>
  5055. <input id="opt_calrhb2" ref="/root/main/maindata/pursmngt/optcalrhb2" class="output_fix" autonext="false" maxlength="3" format="###.9" appearance="input" style="left:502px; top:106px; width:50px; height:19px; "/>
  5056. <input id="opt_calradopt2" ref="/root/main/maindata/pursmngt/optcalradopt2" class="output_fix" autonext="false" maxlength="3" format="###.9" appearance="input" style="left:502px; top:81px; width:50px; height:19px; "/>
  5057. <input id="opt_protadopt2" ref="/root/main/maindata/pursmngt/optprotadopt2" class="output_fix" autonext="false" maxlength="3" format="###.9" appearance="input" style="left:638px; top:156px; width:50px; height:19px; "/>
  5058. <button id="btn_calculation6" class="btn2_letter2" style="left:662px; top:131px; width:42px; height:19px; ">
  5059. <caption>계산</caption>
  5060. <script type="javascript" ev:event="DOMActivate">
  5061. <![CDATA[
  5062. modal("SPANC00302");
  5063. if ( model.getAttribute("iParam_kcal") != "" ) {
  5064. ipt_dialqty2.value = model.getAttribute("iParam_kcal");
  5065. model.refresh();
  5066. }
  5067. ]]>
  5068. </script>
  5069. </button>
  5070. <caption id="caption174" style="left:507px; top:33px; width:16px; height:20px; vertical-align:middle; ">kg</caption>
  5071. <input id="ipt_stndbdwt2" ref="/root/main/maindata/pursmngt/stndbdwt2" class="input_search" autonext="false" maxlength="3" format="###.9" style="left:435px; top:32px; width:70px; height:19px; "/>
  5072. <line id="line152" class="line_2" style="x1:345px; y1:152px; x2:865px; y2:152px; "/>
  5073. <textarea id="tar_review2" ref="/root/main/maindata/pursmngt/review" disabled="false" style="left:5px; top:30px; width:333px; height:593px; line-spacing:6; "/>
  5074. <caption id="caption211" class="tit_2" style="left:11px; top:10px; width:142px; height:13px; ">영양상태판정Review</caption>
  5075. <line id="line155" class="line_3" style="x1:5px; y1:624px; x2:338px; y2:624px; "/>
  5076. <line id="line156" class="line_1" style="x1:5px; y1:25px; x2:338px; y2:25px; "/>
  5077. <line id="line140" class="line_2" style="x1:345px; y1:52px; x2:865px; y2:52px; "/>
  5078. <caption id="caption173" class="cell_1" style="left:345px; top:30px; width:87px; height:23px; vertical-align:middle; ">기준체중</caption>
  5079. <caption id="caption214" class="cell_1" style="left:345px; top:54px; width:87px; height:99px; vertical-align:middle; ">열량</caption>
  5080. <caption id="caption205" class="cell_1" style="left:345px; top:154px; width:87px; height:23px; vertical-align:middle; ">단백질</caption>
  5081. <caption id="caption2" class="cell_1" style="left:730px; top:30px; width:55px; height:23px; vertical-align:middle; ">PIBW</caption>
  5082. <output id="opt_pibw2" ref="/root/main/maindata/nutrstatjudg/physmeasibwperc" class="output_fix" format="###.9" appearance="output" style="left:788px; top:31px; width:50px; height:19px; "/>
  5083. <caption id="caption7" style="left:840px; top:31px; width:20px; height:20px; vertical-align:middle; ">%</caption>
  5084. <select1 id="rdo_stndbdwtflag2" ref="/root/main/maindata/pursmngt/stndbdwtflag2" appearance="full" cellspacing="5" cols="3" rows="1" overflow="visible" sep="▦" style="left:550px; top:33px; width:150px; height:17px; ">
  5085. <choices>
  5086. <item>
  5087. <label>IBW</label>
  5088. <value>1</value>
  5089. </item>
  5090. <item>
  5091. <label>ABW</label>
  5092. <value>2</value>
  5093. </item>
  5094. <item>
  5095. <label>Wt</label>
  5096. <value>3</value>
  5097. </item>
  5098. </choices>
  5099. <script type="javascript" ev:event="xforms-select">
  5100. <![CDATA[
  5101. if (model.getValue("/root/main/maindata/pursmngt/stndbdwtflag2") == 1) {
  5102. model.setValue("/root/main/maindata/pursmngt/stndbdwt2", model.getValue("/root/main/maindata/nutrstatjudg/physmeasibw"));
  5103. } else if (model.getValue("/root/main/maindata/pursmngt/stndbdwtflag2") == 2) {
  5104. model.setValue("/root/main/maindata/pursmngt/stndbdwt2", model.getValue("/root/main/maindata/nutrstatjudg/physmeasabw"));
  5105. } else if (model.getValue("/root/main/maindata/pursmngt/stndbdwtflag2") == 3) {
  5106. model.setValue("/root/main/maindata/pursmngt/stndbdwt2", model.getValue("/root/main/maindata/nutrstatjudg/physmeasbdwt"));
  5107. }
  5108. model.refresh();
  5109. ]]>
  5110. </script>
  5111. </select1>
  5112. <caption id="caption8" style="left:590px; top:156px; width:40px; height:20px; vertical-align:middle; ">계수법</caption>
  5113. <input id="ipt_adoptlawcalr2" ref="/root/main/maindata/pursmngt/adoptlawcalr2" class="input_search" autonext="false" maxlength="2" format="99" style="left:572px; top:81px; width:45px; height:19px; "/>
  5114. <input id="ipt_hbcalr12" ref="/root/main/maindata/pursmngt/hbcalr12" class="input_search" autonext="false" maxlength="1" format="#.9" style="left:572px; top:106px; width:45px; height:19px; "/>
  5115. <input id="ipt_hbcalr22" ref="/root/main/maindata/pursmngt/hbcalr22" class="input_search" autonext="false" maxlength="1" format="#.9" style="left:637px; top:106px; width:45px; height:19px; "/>
  5116. <input id="ipt_protqty2" ref="/root/main/maindata/pursmngt/protqty2" class="input_search" autonext="false" maxlength="1" format="#.9" style="left:707px; top:156px; width:45px; height:19px; "/>
  5117. <button id="btn_calculation5" class="btn2_letter2" style="left:695px; top:105px; width:42px; height:19px; ">
  5118. <caption>BEE</caption>
  5119. <script type="javascript" ev:event="DOMActivate">
  5120. <![CDATA[
  5121. var stndbdwt = model.getValue("/root/main/maindata/pursmngt/stndbdwt2"); // 기준체중
  5122. var calrflag = model.getValue("/root/main/maindata/pursmngt/calrflag2"); // 계수법 or HB 구분
  5123. var dialqty = model.getValue("/root/main/maindata/pursmngt/dialqty2"); // 복막투석액
  5124. var calr = 0; // 최종 열량값
  5125. model.setValue("/root/main/maindata/patbaseinfo/flag", "2"); // "2"는 추구관리 tab화면임을 뜻함.
  5126. if ( calrflag == 1 ) { // 계수법일 경우
  5127. model.setValue("/root/main/maindata/pursmngt/optcalradopt2", stndbdwt);
  5128. var adoptlawcalr = model.getValue("/root/main/maindata/pursmngt/adoptlawcalr2");
  5129. calr = stndbdwt * adoptlawcalr;
  5130. //계수법을 선택했으므로 HB 관련 항목은 clear 시킨다.
  5131. model.setValue("/root/main/maindata/pursmngt/optcalrhb2", "");
  5132. model.setValue("/root/main/maindata/pursmngt/hbcalr12", "");
  5133. model.setValue("/root/main/maindata/pursmngt/hbcalr22", "");
  5134. } else if ( calrflag == 2 ) { // HB일 경우
  5135. model.setValue("/root/main/maindata/patbaseinfo/wt", model.getValue("/root/main/maindata/nutrstatjudg/physmeasbdwt"));
  5136. model.setValue("/root/main/maindata/patbaseinfo/ht", model.getValue("/root/main/maindata/nutrstatjudg/physmeasbdht"));
  5137. model.makeValue("/root/main/maindata/patbaseinfo/abw", model.getValue("/root/main/maindata/nutrstatjudg/physmeasabw"));
  5138. model.makeValue("/root/main/maindata/patbaseinfo/pibw", opt_pibw2.value);
  5139. modal("SPANC00301", 0,100,150,"SPANC00301", "/root/main/maindata/patbaseinfo", "/root/main/receivedata");
  5140. var optcalrhb = model.getValue("/root/main/maindata/pursmngt/optcalrhb2");
  5141. var hbcalr1 = model.getValue("/root/main/maindata/pursmngt/hbcalr12");
  5142. var hbcalr2 = model.getValue("/root/main/maindata/pursmngt/hbcalr22");
  5143. calr = optcalrhb * hbcalr1 * hbcalr2;
  5144. //HB를 선택했으므로 계수법 관련 항목은 clear 시킨다.
  5145. model.setValue("/root/main/maindata/pursmngt/optcalradopt2", "");
  5146. model.setValue("/root/main/maindata/pursmngt/adoptlawcalr2", "");
  5147. }
  5148. if ( dialqty == "" ) { // 복막투석액에 값이 없을 경우는 0으로 처리하고 계산한다.
  5149. dialqty = 0;
  5150. }
  5151. calr = calr - dialqty;
  5152. calr = calr.toString().getRound(-1, "HALF_UP");
  5153. model.setValue("/root/main/maindata/pursmngt/optcalr2", calr);
  5154. model.refresh();
  5155. ]]>
  5156. </script>
  5157. </button>
  5158. <button id="btn_calculation7" class="btn2_letter2" visibility="hidden" style="left:790px; top:155px; width:42px; height:19px; ">
  5159. <caption>계산</caption>
  5160. <script type="javascript" ev:event="DOMActivate">
  5161. <![CDATA[
  5162. var stndbdwt = model.getValue("/root/main/maindata/pursmngt/stndbdwt2"); // 기준체중
  5163. model.setValue("/root/main/maindata/pursmngt/optprotadopt2", stndbdwt);
  5164. var protqty = model.getValue("/root/main/maindata/pursmngt/protqty2"); // 단백질(g/kg)
  5165. var optprotqty = stndbdwt * protqty;
  5166. optprotqty = optprotqty.toString().getRound(-1, "HALF_UP");
  5167. model.setValue("/root/main/maindata/pursmngt/optprotqty2", optprotqty); // 단백질(g/day)
  5168. model.refresh();
  5169. ]]>
  5170. </script>
  5171. </button>
  5172. <button id="btn_edu2" class="btn4_letter2" style="left:589px; top:398px; width:56px; height:22px; ">
  5173. <caption>PFE</caption>
  5174. <script type="javascript" ev:event="onclick">
  5175. <![CDATA[
  5176. var nutrmngtkind = model.getValue("/root/send/searchitem/nutrmngtkind");
  5177. if(nutrmngtkind == "07" || nutrmngtkind == "08" || nutrmngtkind == "09") {
  5178. modal("SPANC00306", "", "720", "250", "SPANC00306", "/root/main/maindata/cnstreq/cnstpsn1", "/root/main/recData/cnstpsn1");
  5179. } else {
  5180. messageBox("영향관리유형이 '협진입원(영양교육)', '협진외래(영양교육)', '협진추구관리' 일 경우만 입력", "I006");
  5181. }
  5182. ]]>
  5183. </script>
  5184. </button>
  5185. <button id="btn_careplan2" class="btn4_letter2" style="left:649px; top:398px; width:92px; height:22px; ">
  5186. <caption>COP</caption>
  5187. <script type="javascript" ev:event="onclick">
  5188. <![CDATA[
  5189. modal("SPANC00307", "", "700", "410", "SPANC00307", "", "");
  5190. ]]>
  5191. </script>
  5192. </button>
  5193. </case>
  5194. <case id="case4" selected="true">
  5195. <textarea id="tar_replcnts" ref="/root/main/maindata/nutrstatjudg/replcnts" style="left:5px; top:29px; width:862px; height:595px; line-spacing:6; "/>
  5196. <button id="btn_soap" class="btn2_letter6" style="left:779px; top:4px; width:86px; height:19px; ">
  5197. <caption>회신형태전환</caption>
  5198. <script type="javascript" ev:event="DOMActivate">
  5199. <![CDATA[
  5200. /*
  5201. * 2010-02-05 유창민 수정( 영양관리유형에 '반환' 추가 하면서 기존 내용 주석 처리 ) - 시작
  5202. */
  5203. // //영양관리유형이 초기영양검색 or 협진입원(영양평가) or 협진입원(영양교육) or 협진외래(영양교육) 일 경우
  5204. // if (cmb_nutrmngtkind.value == '01' || cmb_nutrmngtkind.value == '06' ||
  5205. // cmb_nutrmngtkind.value == '07' || cmb_nutrmngtkind.value == '08') {
  5206. // fSoapReplCntsCnstreq();
  5207. // }
  5208. // //영양관리유형이 일반추구관리 or 협진추구관리 일 경우
  5209. // else if (cmb_nutrmngtkind.value == '05' || cmb_nutrmngtkind.value == '09') {
  5210. // fSoapReplCntsPursmngt();
  5211. // }
  5212. // //영양관리유형이 '반환' 일 경우
  5213. // else if (cmb_nutrmngtkind.value == '10') {
  5214. // fSoapReplCntsRtn();
  5215. // }
  5216. // else {
  5217. // model.setValue("/root/main/maindata/nutrstatjudg/replcnts", "");
  5218. // model.refresh();
  5219. // }
  5220. /*
  5221. * 2010-02-05 유창민 수정( 영양관리유형에 '반환' 추가 하면서 기존 내용 주석 처리 ) - 시작
  5222. */
  5223. //회신탭 세팅
  5224. //영양관리유형이 초기영양검색 일 경우
  5225. if(cmb_nutrmngtkind.value == '01') {
  5226. fSoapReplCntsCnstreq();
  5227. }
  5228. // 협진입원(영양평가) or 협진입원(영양교육) or 협진외래(영양교육) 일 경우
  5229. else if (cmb_nutrmngtkind.value == '06' || cmb_nutrmngtkind.value == '07' || cmb_nutrmngtkind.value == '08') {
  5230. fReplCntsCnstreq();
  5231. }
  5232. //영양관리유형이 일반추구관리 or 협진추구관리 일 경우
  5233. else if (cmb_nutrmngtkind.value == '05' || cmb_nutrmngtkind.value == '09') {
  5234. fReplCntsPursmngt();
  5235. }
  5236. //영양관리유형이 '반환' 일 경우
  5237. else if (cmb_nutrmngtkind.value == '10') {
  5238. fSoapReplCntsRtn();
  5239. }
  5240. // 위 조건에 해당사항 없을 경우
  5241. else {
  5242. model.setValue("/root/main/maindata/nutrstatjudg/replcnts", "");
  5243. model.refresh();
  5244. }
  5245. ]]>
  5246. </script>
  5247. </button>
  5248. <line id="line132" class="line_1" style="x1:5px; y1:24px; x2:867px; y2:24px; "/>
  5249. <line id="line133" class="line_3" style="x1:5px; y1:625px; x2:867px; y2:625px; "/>
  5250. </case>
  5251. </switch>
  5252. <line id="line134" class="line_1" style="x1:320px; y1:710px; x2:1195px; y2:710px; "/>
  5253. <line id="line135" class="line_3" style="x1:320px; y1:738px; x2:1195px; y2:738px; "/>
  5254. <output id="opt_reqresn" ref="/root/main/receivedata/educreqcnts" class="output_search" style="left:321px; top:715px; width:180px; height:19px; "/>
  5255. <output id="opt_formrecseq" ref="/root/main/receivedata/h_formrecseq" class="output_search" style="left:510px; top:715px; width:115px; height:19px; text-align:center; "/>
  5256. <caption id="caption188" class="cell_1" style="left:684px; top:715px; width:76px; height:23px; vertical-align:middle; ">영양사</caption>
  5257. <caption id="caption189" class="cell_1" style="left:1025px; top:715px; width:62px; height:23px; vertical-align:middle; ">수행일자</caption>
  5258. <input id="ipt_execdd" ref="/root/send/searchitem/execdd" class="input_default" inputtype="date" style="left:1090px; top:717px; width:104px; height:19px; background-color:#ffccff; "/>
  5259. <select1 id="cmb_chrgdieter" ref="/root/send/searchitem/dieter" class="combo_default" appearance="minimal" style="left:763px; top:717px; width:87px; height:19px; background-color:#ffccff; ">
  5260. <choices>
  5261. <itemset nodeset="/root/init/basecode/dieter/dieter">
  5262. <label ref="cdnm"/>
  5263. <value ref="cdid"/>
  5264. </itemset>
  5265. </choices>
  5266. </select1>
  5267. <line id="line136" class="line_1" style="x1:650px; y1:48px; x2:1195px; y2:48px; "/>
  5268. <line id="line137" class="line_3" style="x1:650px; y1:76px; x2:1195px; y2:76px; "/>
  5269. <select1 id="cmb_nutrmngtkind" ref="/root/send/searchitem/nutrmngtkind" class="combo_default" appearance="minimal" style="left:738px; top:54px; width:172px; height:19px; background-color:#ffccff; ">
  5270. <choices>
  5271. <itemset nodeset="/root/init/basecode/nutrmngtkind/A0060">
  5272. <label ref="cdnm"/>
  5273. <value ref="cdid"/>
  5274. </itemset>
  5275. </choices>
  5276. </select1>
  5277. <select1 id="cmb_sickcd" ref="/root/main/maindata/nutrstatjudg/sickcd" class="combo_default" appearance="minimal" style="left:990px; top:54px; width:202px; height:19px; background-color:#ffccff; ">
  5278. <choices>
  5279. <itemset nodeset="/root/init/basecode/sickcd/A0059">
  5280. <label ref="cdnm"/>
  5281. <value ref="cdid"/>
  5282. </itemset>
  5283. </choices>
  5284. </select1>
  5285. <caption id="caption190" class="cell_1" style="left:650px; top:53px; width:85px; height:23px; vertical-align:middle; ">영양관리유형</caption>
  5286. <caption id="caption191" class="cell_1" style="left:917px; top:53px; width:70px; height:23px; vertical-align:middle; ">질환구분</caption>
  5287. <datagrid id="grd_mealprcpinfo" nodeset="/root/main/maindata/dietprcp" caption="일자^끼니^식사명" colsep="^" colwidth="70, 40, 190" mergecellsfixedrows="bycolrec" rowsep="|" style="left:0px; top:363px; width:315px; height:102px; ">
  5288. <col ref="prcpdd" format="yyyy-mm-dd" style="text-align:center; "/>
  5289. <col ref="dietmeal" style="text-align:center; "/>
  5290. <col ref="dietnm"/>
  5291. <script type="javascript" ev:event="ondblclick">
  5292. <![CDATA[
  5293. if ( grd_mealprcpinfo.isCell(event.target) && grd_mealprcpinfo.row >= grd_mealprcpinfo.fixedRows ) {
  5294. model.setValue("/root/send/searchitem/orddd", model.getValue("/root/main/maindata/dietprcp["+grd_mealprcpinfo.row+"]/orddd"));
  5295. model.setValue("/root/send/searchitem/cretno", model.getValue("/root/main/maindata/dietprcp["+grd_mealprcpinfo.row+"]/cretno"));
  5296. model.setValue("/root/send/searchitem/orddeptcd", model.getValue("/root/main/maindata/dietprcp["+grd_mealprcpinfo.row+"]/orddeptcd"));
  5297. model.setValue("/root/send/searchitem/prcpgenrflag", model.getValue("/root/main/maindata/dietprcp["+grd_mealprcpinfo.row+"]/prcpgenrflag"));
  5298. //flag=B는 화면 왼쪽의 공통정보(환자기본정보,진단명,입원동기,식사처방정보,영양관리이력,영양검색결과이력)만 조회한다는 뜻임.
  5299. model.setValue("/root/send/searchitem/flag", 'B');
  5300. btn_search.dispatch("DOMActivate");
  5301. }
  5302. ]]>
  5303. </script>
  5304. </datagrid>
  5305. <button id="btn_nutrstatjudg" class="btn_sw" group="tab" selected="true" style="left:320px; top:58px; width:94px; height:22px; ">
  5306. <caption>영양상태판정</caption>
  5307. <script type="javascript" ev:event="DOMActivate">
  5308. <![CDATA[
  5309. model.toggle("case1");
  5310. btn_cnstrepl.disabled = true; //회신버튼 비활성화
  5311. ]]>
  5312. </script>
  5313. </button>
  5314. <button id="btn_cnstreq" class="btn_sw" group="tab" style="left:414px; top:58px; width:74px; height:22px; ">
  5315. <caption>협진의뢰</caption>
  5316. <script type="javascript" ev:event="DOMActivate">
  5317. <![CDATA[
  5318. fNutrStatJudgReview(); //영양상태판정Review 표시
  5319. model.toggle("case2");
  5320. btn_cnstrepl.disabled = true; //회신버튼 비활성화
  5321. ]]>
  5322. </script>
  5323. </button>
  5324. <button id="btn_pursmngt" class="btn_sw" group="tab" style="left:488px; top:58px; width:74px; height:22px; ">
  5325. <caption>추구관리</caption>
  5326. <script type="javascript" ev:event="DOMActivate">
  5327. <![CDATA[
  5328. fNutrStatJudgReview(); //영양상태판정Review 표시
  5329. model.toggle("case3");
  5330. btn_cnstrepl.disabled = true; //회신버튼 비활성화
  5331. ]]>
  5332. </script>
  5333. </button>
  5334. <button id="btn_repl" class="btn_sw" group="tab" style="left:562px; top:58px; width:50px; height:22px; ">
  5335. <caption>회신</caption>
  5336. <script type="javascript" ev:event="DOMActivate">
  5337. <![CDATA[
  5338. model.toggle("case4");
  5339. btn_cnstrepl.disabled = false; //회신버튼 활성화
  5340. /*
  5341. * 2010-02-05 유창민 수정( 영양관리유형에 '반환' 추가 하면서 기존 내용 주석 처리 ) - 시작
  5342. */
  5343. // //회신탭 세팅
  5344. // //영양관리유형이 초기영양검색 or 협진입원(영양평가) or 협진입원(영양교육) or 협진외래(영양교육) 일 경우
  5345. // if (cmb_nutrmngtkind.value == '01' || cmb_nutrmngtkind.value == '06' ||
  5346. // cmb_nutrmngtkind.value == '07' || cmb_nutrmngtkind.value == '08') {
  5347. // fReplCntsCnstreq();
  5348. // }
  5349. // //영양관리유형이 일반추구관리 or 협진추구관리 일 경우
  5350. // else if (cmb_nutrmngtkind.value == '05' || cmb_nutrmngtkind.value == '09') {
  5351. // fReplCntsPursmngt();
  5352. // }
  5353. // // 영양관리 유형이 '반환' 일 경우
  5354. // else if(cmb_nutrmngtkind.value == '10') {
  5355. // // ★ 회신텝 눌렀을때 반환 내용 만들어 넣어야됨.
  5356. // }
  5357. // else {
  5358. // model.setValue("/root/main/maindata/nutrstatjudg/replcnts", "");
  5359. // model.refresh();
  5360. // }
  5361. /*
  5362. * 2010-02-05 유창민 수정( 영양관리유형에 '반환' 추가 하면서 기존 내용 주석 처리 ) - 끝
  5363. */
  5364. //영양관리유형이 협진입원(영양평가) or 협진입원(영양교육) or 협진외래(영양교육) 일 경우
  5365. if(cmb_nutrmngtkind.value == '01') {
  5366. fReplCntsCnstreq();
  5367. }
  5368. else if (cmb_nutrmngtkind.value == '06' || cmb_nutrmngtkind.value == '07' ||
  5369. cmb_nutrmngtkind.value == '08') {
  5370. fSoapReplCntsCnstreq();
  5371. }
  5372. //영양관리유형이 일반추구관리 or 협진추구관리 일 경우
  5373. else if (cmb_nutrmngtkind.value == '05' || cmb_nutrmngtkind.value == '09') {
  5374. fSoapReplCntsPursmngt();
  5375. }
  5376. //영양관리유형이 '반환' 일 경우
  5377. else if (cmb_nutrmngtkind.value == '10') {
  5378. fSoapReplCntsRtn();
  5379. }
  5380. else {
  5381. model.setValue("/root/main/maindata/nutrstatjudg/replcnts", "");
  5382. model.refresh();
  5383. }
  5384. ]]>
  5385. </script>
  5386. </button>
  5387. <datagrid id="grd_nutrsrchrslthist" nodeset="/root/main/maindata/nutrsrchrslt" autoresize="true" caption="등록번호^구분^일자^영양관리유형^검색결과^INS결과^indd^formrecseq^영양사^회신상태^dddd^caption1" colsep="^" colwidth="100, 40, 67, 100, 55, 49, 100, 100, 50, 54, 100, 100" mergecellsfixedrows="bycolrec" rowsep="|" style="left:0px; top:629px; width:315px; height:106px; text-align:center; ">
  5388. <col ref="pid" visibility="hidden"/>
  5389. <col disabled="true" ref="fnexamflag" type="combo">
  5390. <choices>
  5391. <item>
  5392. <label>재검색</label>
  5393. <value>I</value>
  5394. </item>
  5395. <item>
  5396. <label>신환</label>
  5397. <value>F</value>
  5398. </item>
  5399. </choices>
  5400. </col>
  5401. <col ref="execdd" format="yyyy-mm-dd"/>
  5402. <col ref="nutrmngtkind" visibility="hidden"/>
  5403. <col ref="srchrslt"/>
  5404. <col ref="insrslt"/>
  5405. <col ref="indd" visibility="hidden"/>
  5406. <col ref="formrecseq" visibility="hidden"/>
  5407. <col ref="dieter"/>
  5408. <col ref="cnststatnm" style="text-align:left; "/>
  5409. <col ref="chrgdieternm" visibility="hidden"/>
  5410. <col ref="intndieternm" visibility="hidden"/>
  5411. <col ref="delyn" visibility="hidden"/>
  5412. <col ref="educd" visibility="hidden"/>
  5413. <col ref="educnts" visibility="hidden"/>
  5414. <col ref="eduprepyn" visibility="hidden"/>
  5415. <col ref="eduwho" visibility="hidden"/>
  5416. <col ref="eduway" visibility="hidden"/>
  5417. <col ref="edurslt" visibility="hidden"/>
  5418. <col ref="edudd" visibility="hidden"/>
  5419. <col ref="edutm" visibility="hidden"/>
  5420. <col ref="replyn" visibility="hidden"/>
  5421. <col ref="cretno" visibility="hidden"/>
  5422. <col ref="workflag" visibility="hidden"/>
  5423. <col ref="problemcareplan" visibility="hidden"/>
  5424. <col ref="rgstdd" visibility="hidden"/>
  5425. <col ref="rgsttm" visibility="hidden"/>
  5426. <script type="javascript" ev:event="ondblclick">
  5427. <![CDATA[
  5428. if ( grd_nutrsrchrslthist.isCell(event.target) && grd_nutrsrchrslthist.row >= grd_nutrsrchrslthist.fixedRows ) {
  5429. var rowno = grd_nutrsrchrslthist.row;
  5430. // 이벤트가 발생한 그리드 id와 row 값을 저장
  5431. setGlobalVariable("ANC00350eventtarget", event.currentTarget+"▦"+rowno, "A");
  5432. model.setValue("/root/temp/griddata/gridid", event.currentTarget);
  5433. model.setValue("/root/temp/griddata/gridrow", rowno);
  5434. model.setValue("/root/send/searchitem/dieter", model.getValue("/root/main/maindata/nutrsrchrslt["+grd_nutrsrchrslthist.row+"]/chrgdieternm"));
  5435. model.setValue("/root/send/searchitem/intndieter", model.getValue("/root/main/maindata/nutrsrchrslt["+grd_nutrsrchrslthist.row+"]/intndieternm"));
  5436. model.setValue("/root/send/searchitem/pid", model.getValue("/root/main/maindata/nutrsrchrslt["+grd_nutrsrchrslthist.row+"]/pid"));
  5437. model.setValue("/root/send/searchitem/pastexecdd", model.getValue("/root/main/maindata/nutrsrchrslt["+grd_nutrsrchrslthist.row+"]/execdd"));
  5438. model.setValue("/root/send/searchitem/nutrmngtkind", model.getValue("/root/main/maindata/nutrsrchrslt["+grd_nutrsrchrslthist.row+"]/nutrmngtkind"));
  5439. //구분이 신환일 경우 영양관리유형을 '초기영양검색'으로 자동setting
  5440. // if (model.getValue("/root/main/maindata/nutrsrchrslt["+grd_nutrsrchrslthist.row+"]/fnexamflag") == "F") {
  5441. // model.setValue("/root/send/searchitem/nutrmngtkind", "01");
  5442. // }
  5443. //구분이 재검색일 경우 영양관리유형을 '일반추구관리'로 자동setting
  5444. // else if (model.getValue("/root/main/maindata/nutrsrchrslt["+grd_nutrsrchrslthist.row+"]/fnexamflag") == "I") {
  5445. // model.setValue("/root/send/searchitem/nutrmngtkind", "05");
  5446. // }
  5447. model.setValue("/root/send/searchitem/prcpgenrflag", "I"); //영양검색은 입원환자만 해당되므로 'I'로 셋팅
  5448. model.setValue("/root/send/searchitem/orddd", model.getValue("/root/main/maindata/nutrsrchrslt["+grd_nutrsrchrslthist.row+"]/indd"));
  5449. //flag=A는 화면 왼쪽의 공통정보(환자기본정보,진단명,입원동기,식사처방정보,영양관리이력,영양검색결과이력)와 해당 컨설팅 정보를 조회한다는 뜻임.
  5450. model.setValue("/root/send/searchitem/flag", 'A');
  5451. btn_search.dispatch("DOMActivate");
  5452. //선택한 행 색깔 표시
  5453. grd_nutrsrchrslthist.isSelected(rowno) = true;
  5454. grd_nutrsrchrslthist.focusColor = "#ffccff";
  5455. }
  5456. ]]>
  5457. </script>
  5458. </datagrid>
  5459. <line id="line139" class="line_1" style="x1:0px; y1:623px; x2:315px; y2:623px; "/>
  5460. <caption id="caption192" class="tit_2" style="left:5px; top:607px; width:126px; height:13px; ">영양검색결과이력</caption>
  5461. <select1 id="cmb_intndieter" ref="/root/send/searchitem/intndieter" class="combo_default" appearance="minimal" style="left:933px; top:717px; width:87px; height:19px; background-color:#ffccff; ">
  5462. <choices>
  5463. <itemset nodeset="/root/init/basecode/dieter/intndieter">
  5464. <label ref="cdnm"/>
  5465. <value ref="cdid"/>
  5466. </itemset>
  5467. </choices>
  5468. </select1>
  5469. <caption id="caption10" class="cell_1" style="left:854px; top:715px; width:76px; height:23px; vertical-align:middle; ">인턴영양사</caption>
  5470. </group>
  5471. <group id="group4" scroll="auto" style="left:0px; top:757px; width:1195px; height:26px; ">
  5472. <button id="btn_save" class="btn4_letter2" style="left:939px; top:4px; width:56px; height:22px; ">
  5473. <caption>저장</caption>
  5474. <script type="javascript" ev:event="DOMActivate">
  5475. <![CDATA[
  5476. //필수입력항목 체크
  5477. if ( (model.getValue("/root/send/searchitem/pid") == "") ||
  5478. (model.getValue("/root/send/searchitem/nutrmngtkind") == "") ||
  5479. (model.getValue("/root/main/maindata/nutrstatjudg/sickcd") == "") ||
  5480. (model.getValue("/root/send/searchitem/dieter") == "") ||
  5481. (model.getValue("/root/send/searchitem/execdd") == "") ) {
  5482. messageBox("등록번호,영양관리유형,질환구분,수행일자,영양사는", "I003");
  5483. model.setValue("/root/temp/save/msg", "N"); //'N'은 저장실패를 뜻함.
  5484. return;
  5485. }
  5486. // 2010.06.04 수진이력 팝업창 항상 호출되도록 조회시점 에서 저장(회신) 시점으로 변경
  5487. if ( model.getValue("/root/send/searchitem/pid") != "" ){
  5488. //btn_patinfo.dispatch("onclick"); // 환자 기본정보 선택효과 적용
  5489. btn_sujin.dispatch("DOMActivate"); // 수진이력 선택창 항상 뜨도록
  5490. }
  5491. var globalData = getGlobalVariable("ANC00350eventtarget", "A"); // 이벤트가 발생한 그리드
  5492. var target = model.getValue("/root/temp/griddata/gridid"); // 이벤트가 발생한 그리드
  5493. var targetRow = model.getValue("/root/temp/griddata/gridrow"); // 이벤트가 발생한 그리드 row 값
  5494. //if ( messageBox("", "Q002") == 6 ) {
  5495. // 영양상태판정 탭화면 저장
  5496. model.setValue("/root/main/maindata/nutrstatjudg/cnstpurs", "S"); //'S'는 영양상태판정을 뜻함.
  5497. model.copyNode("/root/send/data/maindata/nutrstatjudg", "/root/main/maindata/nutrstatjudg");
  5498. model.setValue("/root/send/data/maindata/nutrstatjudg/pid", model.getValue("/root/send/searchitem/pid"));
  5499. model.setValue("/root/send/data/maindata/nutrstatjudg/nutrmngtkind", model.getValue("/root/send/searchitem/nutrmngtkind"));
  5500. model.setValue("/root/send/data/maindata/nutrstatjudg/execdd", model.getValue("/root/send/searchitem/execdd"));
  5501. model.setValue("/root/send/data/maindata/nutrstatjudg/chrgdieter", model.getValue("/root/send/searchitem/dieter"));
  5502. model.setValue("/root/send/data/maindata/nutrstatjudg/intndieter", model.getValue("/root/send/searchitem/intndieter"));
  5503. //영양교육관리 화면에서 링크된 의뢰건이면서 최초저장이면서 다른 회신건을 조회하여 수정하지 않고 새로 작성한 경우
  5504. //영양교육관리 화면에서 링크된 의뢰건이면서 최초저장이면서 다른 회신건을 조회하여 일부 내용만 수정한 경우
  5505. if ( (model.getValue("/root/main/receivedata/h_formrecseq") != "" && model.getValue("/root/main/maindata/nutrstatjudg/pid") == "") ||
  5506. (model.getValue("/root/main/receivedata/h_formrecseq") != "" &&
  5507. (model.getValue("/root/main/receivedata/h_formrecseq") != model.getValue("/root/main/maindata/nutrstatjudg/formrecseq"))) ) {
  5508. // if ( (model.getValue("/root/main/receivedata/h_formrecseq") != "" && model.getValue("/root/main/maindata/nutrstatjudg/formrecseq") == "") ||
  5509. // (model.getValue("/root/main/receivedata/h_formrecseq") != "" &&
  5510. // (model.getValue("/root/main/receivedata/h_formrecseq") != model.getValue("/root/main/maindata/nutrstatjudg/formrecseq"))) ) {
  5511. model.setValue("/root/send/data/maindata/nutrstatjudg/formrecseq", model.getValue("/root/main/receivedata/h_formrecseq"));
  5512. model.setValue("/root/send/data/maindata/nutrstatjudg/prcpdd", model.getValue("/root/main/receivedata/reqdd"));
  5513. model.setValue("/root/send/data/maindata/nutrstatjudg/execprcpuniqno", model.getValue("/root/main/receivedata/execprcpuniqno"));
  5514. model.setValue("/root/send/data/maindata/nutrstatjudg/indd", model.getValue("/root/main/receivedata/h_orddd"));
  5515. model.setValue("/root/send/data/maindata/nutrstatjudg/ordcd", model.getValue("/root/main/receivedata/h_prcpcd"));
  5516. model.setValue("/root/send/data/maindata/nutrstatjudg/ioflag", model.getValue("/root/main/receivedata/h_prcpgenrflag"));
  5517. model.setValue("/root/send/data/maindata/nutrstatjudg/chrgdr", model.getValue("/root/main/receivedata/atdoct"));
  5518. model.setValue("/root/send/data/maindata/nutrstatjudg/chrgnurs", model.getValue("/root/main/receivedata/h_nurse"));
  5519. }
  5520. //영양검색 또는 환자관리 화면에서 링크된 비의뢰건이면서 최초저장이면서 다른 회신건을 조회하여 수정하지 않고 새로 작성한 경우
  5521. //영양검색 또는 환자관리 화면에서 링크된 비의뢰건이면서 최초저장이면서 다른 회신건을 조회하여 일부 내용만 수정한 경우
  5522. else if ( model.getValue("/root/main/receivedata/h_formrecseq") == "" &&
  5523. model.getValue("/root/main/receivedata/pid") != "" &&
  5524. ( model.getValue("/root/main/maindata/nutrstatjudg/nutrmngtkind") != model.getValue("/root/send/searchitem/nutrmngtkind") ||
  5525. model.getValue("/root/main/maindata/nutrstatjudg/execdd") != model.getValue("/root/send/searchitem/execdd") )
  5526. ) {
  5527. model.setValue("/root/send/data/maindata/nutrstatjudg/formrecseq", "");
  5528. model.setValue("/root/send/data/maindata/nutrstatjudg/prcpdd", "");
  5529. model.setValue("/root/send/data/maindata/nutrstatjudg/execprcpuniqno", "");
  5530. model.setValue("/root/send/data/maindata/nutrstatjudg/indd", model.getValue("/root/main/receivedata/h_orddd"));
  5531. model.setValue("/root/send/data/maindata/nutrstatjudg/ordcd", "");
  5532. model.setValue("/root/send/data/maindata/nutrstatjudg/ioflag", model.getValue("/root/main/receivedata/h_prcpgenrflag"));
  5533. model.setValue("/root/send/data/maindata/nutrstatjudg/chrgdr", "");
  5534. model.setValue("/root/send/data/maindata/nutrstatjudg/chrgnurs", "");
  5535. model.setValue("/root/send/data/maindata/nutrstatjudg/srchdd", model.getValue("/root/main/receivedata/srchdd"));
  5536. }
  5537. //다른 화면에서 링크되지 않고 직접 환자번호 등으로 조회 : 비의뢰건이면서 최초저장이면서 다른 회신건을 조회하여 수정하지 않고 새로 작성한 경우
  5538. //다른 화면에서 링크되지 않고 직접 환자번호 등으로 조회 : 비의뢰건이면서 최초저장이면서 다른 회신건을 조회하여 일부 내용만 수정한 경우
  5539. else if ( model.getValue("/root/main/receivedata/pid") == "" && model.getValue("/root/main/receivedatacopy/pid") == "" &&
  5540. ( model.getValue("/root/main/maindata/nutrstatjudg/nutrmngtkind") != model.getValue("/root/send/searchitem/nutrmngtkind") ||
  5541. model.getValue("/root/main/maindata/nutrstatjudg/execdd") != model.getValue("/root/send/searchitem/execdd") )
  5542. ) {
  5543. model.setValue("/root/send/data/maindata/nutrstatjudg/formrecseq", "");
  5544. model.setValue("/root/send/data/maindata/nutrstatjudg/prcpdd", "");
  5545. model.setValue("/root/send/data/maindata/nutrstatjudg/execprcpuniqno", "");
  5546. model.setValue("/root/send/data/maindata/nutrstatjudg/indd", model.getValue("/root/main/maindata/patbaseinfo/indd"));
  5547. model.setValue("/root/send/data/maindata/nutrstatjudg/ordcd", "");
  5548. model.setValue("/root/send/data/maindata/nutrstatjudg/ioflag", model.getValue("/root/main/maindata/patbaseinfo/ioflag"));
  5549. model.setValue("/root/send/data/maindata/nutrstatjudg/chrgdr", "");
  5550. model.setValue("/root/send/data/maindata/nutrstatjudg/chrgnurs", "");
  5551. }
  5552. else {
  5553. /*
  5554. * ▣▣▣ 이력을 더블클릭 하고 데이터 저장시 이조건에 해당됨 ▣▣▣
  5555. *
  5556. * 2010-02-05 확인( 위의 if 조건에 해당하지 않으면 저장시 [ ast.ancmnutr - 환자별 영양관리-영양상태판정 ] 테이블에 indd, ioflag 가 저장되지 않는다. 테이블에 값을 넣고 싶으면 아래 로직 주석을 풀면 됨. )
  5557. *
  5558. * 아래 주석 처리 내용을 풀게 되면 [ ast.ancmnutr - 환자별 영양관리-영양상태판정 ] 테이블에 indd, ioflag 데이터가 저장됨.
  5559. */
  5560. // var tempindd = ""; // 입원일자 임시변수
  5561. //
  5562. // // 영양관리 이력 데이터 세팅
  5563. // if(target == "grd_nutrmngthist") {
  5564. // tempindd = model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/indd");
  5565. // }
  5566. //
  5567. // // 영양검색결과 이력 데이터 세팅
  5568. // else if(target == "grd_nutrsrchrslthist") {
  5569. // tempindd = model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/indd");
  5570. // }
  5571. //
  5572. // // 이력에서 입원일자가 비어 있으면 해당 환자의 최근 데이터로 세팅
  5573. // if(tempindd == "" || tempindd == null) {
  5574. // model.setValue("/root/send/data/maindata/nutrstatjudg/indd", model.getValue("/root/main/maindata/patbaseinfo/indd")); // 입원일자
  5575. // model.setValue("/root/send/data/maindata/nutrstatjudg/ioflag", model.getValue("/root/main/maindata/patbaseinfo/ioflag")); // 입원/외래 구분
  5576. // }
  5577. }
  5578. //검사결과 셋팅
  5579. model.setValue("/root/send/data/maindata/nutrstatjudg/testrsltalb", model.getValue("/root/main/testrslt/lis/alb"));
  5580. model.setValue("/root/send/data/maindata/nutrstatjudg/testrslttlc", model.getValue("/root/main/testrslt/lis/tlc"));
  5581. model.setValue("/root/send/data/maindata/nutrstatjudg/testrslthbhct", model.getValue("/root/main/testrslt/lis/hb"));
  5582. model.setValue("/root/send/data/maindata/nutrstatjudg/testrslthbhct2", model.getValue("/root/main/testrslt/lis/hct"));
  5583. model.setValue("/root/send/data/maindata/nutrstatjudg/testrslttrf", model.getValue("/root/main/testrslt/lis/trf"));
  5584. /*
  5585. * 다학제간, Care Plan 관련 항목 추가 - 시작
  5586. */
  5587. var cnts = cmb_cnstcd.label; // 상용구선택
  5588. var cnstcnts = model.getValue("/root/main/maindata/cnstreq/cnstcnts"); // 상용구 아래 텍스트 박스 내용
  5589. var cnstpsn1 = chk_cnstpsn.label; // 피상담자
  5590. // 피상담자
  5591. cnstpsn1 = cnstpsn1.replace("▦", ", ");
  5592. // 교육내용 = 상용구선택 + 상용구 아래 텍스트 박스 내용
  5593. if(cnts != "" && cnstcnts != "") {
  5594. cnts = cnts + ", " + cnstcnts;
  5595. } else if(cnts != "") {
  5596. cnts = cnts;
  5597. } else if(cnstcnts != "") {
  5598. cnts = cnstcnts;
  5599. } else {
  5600. cnts = "";
  5601. }
  5602. // 팝업으로 "환자별영양관리" 화면이 뜰때 부모 창에서 '/root/main/receivedata' 쪽으로 데이터를 세팅해서 넘겨준다.
  5603. var h_cretno = model.getValue("/root/main/receivedata/h_cretno");
  5604. if(h_cretno == "" || h_cretno == null) {
  5605. h_cretno = model.getValue("/root/main/maindata/patbaseinfo/cretno"); // 환자의 최근 이력의 입원/외래 등록번호로 세팅
  5606. }
  5607. // 영양관리이력 데이터 세팅
  5608. if(target == "grd_nutrmngthist") {
  5609. model.setValue("/root/main/maindata/nutrmngt["+targetRow+"]/educnts", cnts); // 교육내용
  5610. model.setValue("/root/main/maindata/nutrmngt["+targetRow+"]/eduwho", cnstpsn1); // 피상담자
  5611. model.makeValue("/root/send/data/maindata/nutrstatjudg/delyn", model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/delyn"));
  5612. model.makeValue("/root/send/data/maindata/nutrstatjudg/educd", model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/educd"));
  5613. model.makeValue("/root/send/data/maindata/nutrstatjudg/educnts", model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/educnts"));
  5614. model.makeValue("/root/send/data/maindata/nutrstatjudg/eduprepyn", model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/eduprepyn"));
  5615. model.makeValue("/root/send/data/maindata/nutrstatjudg/eduwho", model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/eduwho"));
  5616. model.makeValue("/root/send/data/maindata/nutrstatjudg/eduway", model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/eduway"));
  5617. model.makeValue("/root/send/data/maindata/nutrstatjudg/edurslt", model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/edurslt"));
  5618. model.makeValue("/root/send/data/maindata/nutrstatjudg/edudd", model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/edudd"));
  5619. model.makeValue("/root/send/data/maindata/nutrstatjudg/edutm", model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/edutm"));
  5620. model.makeValue("/root/send/data/maindata/nutrstatjudg/replyn", model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/replyn"));
  5621. // 입원/외래 등록번호
  5622. if(model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/cretno") == "") {
  5623. model.makeValue("/root/send/data/maindata/nutrstatjudg/cretno", h_cretno);
  5624. }
  5625. model.makeValue("/root/send/data/maindata/nutrstatjudg/workflag", model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/workflag"));
  5626. model.makeValue("/root/send/data/maindata/nutrstatjudg/problemcareplan", model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/problemcareplan"));
  5627. model.makeValue("/root/send/data/maindata/nutrstatjudg/rgstdd", model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/rgstdd"));
  5628. model.makeValue("/root/send/data/maindata/nutrstatjudg/rgsttm", model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/rgsttm"));
  5629. }
  5630. // 영양검색결과이력 데이터 세팅
  5631. else if(target == "grd_nutrsrchrslthist") {
  5632. model.setValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/educnts", cnts); // 교육내용
  5633. model.setValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/eduwho", cnstpsn1); // 피상담자
  5634. model.makeValue("/root/send/data/maindata/nutrstatjudg/delyn", model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/delyn"));
  5635. model.makeValue("/root/send/data/maindata/nutrstatjudg/educd", model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/educd"));
  5636. model.makeValue("/root/send/data/maindata/nutrstatjudg/educnts", model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/educnts"));
  5637. model.makeValue("/root/send/data/maindata/nutrstatjudg/eduprepyn", model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/eduprepyn"));
  5638. model.makeValue("/root/send/data/maindata/nutrstatjudg/eduwho", model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/eduwho"));
  5639. model.makeValue("/root/send/data/maindata/nutrstatjudg/eduway", model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/eduway"));
  5640. model.makeValue("/root/send/data/maindata/nutrstatjudg/edurslt", model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/edurslt"));
  5641. model.makeValue("/root/send/data/maindata/nutrstatjudg/edudd", model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/edudd"));
  5642. model.makeValue("/root/send/data/maindata/nutrstatjudg/edutm", model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/edutm"));
  5643. model.makeValue("/root/send/data/maindata/nutrstatjudg/replyn", model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/replyn"));
  5644. // 입원/외래 등록번호
  5645. if(model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/cretno") == "") {
  5646. model.makeValue("/root/send/data/maindata/nutrstatjudg/cretno", h_cretno);
  5647. }
  5648. model.makeValue("/root/send/data/maindata/nutrstatjudg/workflag", model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/workflag"));
  5649. model.makeValue("/root/send/data/maindata/nutrstatjudg/problemcareplan", model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/problemcareplan"));
  5650. model.makeValue("/root/send/data/maindata/nutrstatjudg/rgstdd", model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/rgstdd"));
  5651. model.makeValue("/root/send/data/maindata/nutrstatjudg/rgsttm", model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/rgsttm"));
  5652. } else {
  5653. model.setValue("/root/temp/senddata/educnts", cnts); // 교육내용
  5654. model.setValue("/root/temp/senddata/eduwho", cnstpsn1); // 피상담자
  5655. model.makeValue("/root/send/data/maindata/nutrstatjudg/delyn", model.getValue("/root/temp/senddata/delyn"));
  5656. model.makeValue("/root/send/data/maindata/nutrstatjudg/educd", model.getValue("/root/temp/senddata/educd"));
  5657. model.makeValue("/root/send/data/maindata/nutrstatjudg/educnts", model.getValue("/root/temp/senddata/educnts"));
  5658. model.makeValue("/root/send/data/maindata/nutrstatjudg/eduprepyn", model.getValue("/root/temp/senddata/eduprepyn"));
  5659. model.makeValue("/root/send/data/maindata/nutrstatjudg/eduwho", model.getValue("/root/temp/senddata/eduwho"));
  5660. model.makeValue("/root/send/data/maindata/nutrstatjudg/eduway", model.getValue("/root/temp/senddata/eduway"));
  5661. model.makeValue("/root/send/data/maindata/nutrstatjudg/edurslt", model.getValue("/root/temp/senddata/edurslt"));
  5662. model.makeValue("/root/send/data/maindata/nutrstatjudg/edudd", model.getValue("/root/temp/senddata/edudd"));
  5663. model.makeValue("/root/send/data/maindata/nutrstatjudg/edutm", model.getValue("/root/temp/senddata/edutm"));
  5664. model.makeValue("/root/send/data/maindata/nutrstatjudg/replyn", model.getValue("/root/temp/senddata/replyn"));
  5665. // 입원/외래 등록번호
  5666. model.makeValue("/root/send/data/maindata/nutrstatjudg/cretno", h_cretno);
  5667. model.makeValue("/root/send/data/maindata/nutrstatjudg/workflag", model.getValue("/root/temp/senddata/workflag"));
  5668. model.makeValue("/root/send/data/maindata/nutrstatjudg/problemcareplan", model.getValue("/root/temp/senddata/problemcareplan"));
  5669. model.makeValue("/root/send/data/maindata/nutrstatjudg/rgstdd", model.getValue("/root/temp/senddata/rgstdd"));
  5670. model.makeValue("/root/send/data/maindata/nutrstatjudg/rgsttm", model.getValue("/root/temp/senddata/rgsttm"));
  5671. }
  5672. /*
  5673. * 다학제간, Care Plan 관련 항목 추가 - 끝
  5674. */
  5675. //영양상태판정 탭화면 저장
  5676. if (submit("TXANC00351")) {
  5677. model.setValue("/root/temp/save/msg", "Y"); //'Y'는 영양상태판정 저장성공을 뜻함.
  5678. model.resetInstanceNode("/root/main/receivedata");
  5679. //영양상태판정의 영양치료계획/권장 그리드에 필수데이터 셋팅
  5680. var rowcnt = grd_nutrstatjudg.rows-1;
  5681. if ( rowcnt > 0 ) {
  5682. for ( i = 1; i <= rowcnt; i++ ) {
  5683. model.setValue("/root/main/maindata/cureplan/nutrstatjudg["+ i +"]/pid", model.getValue("/root/send/searchitem/pid"));
  5684. model.setValue("/root/main/maindata/cureplan/nutrstatjudg["+ i +"]/execdd", model.getValue("/root/send/searchitem/execdd"));
  5685. model.setValue("/root/main/maindata/cureplan/nutrstatjudg["+ i +"]/nutrmngtkind", model.getValue("/root/send/searchitem/nutrmngtkind"));
  5686. model.setValue("/root/main/maindata/cureplan/nutrstatjudg["+ i +"]/cnstpurs", "S");
  5687. }
  5688. model.setValue("/root/send/data/maindata/cureplan", grd_nutrstatjudg.getUpdateData());
  5689. submit("TXANC00304");
  5690. }
  5691. //영양관리유형이 초기영양검색 or 협진입원(영양평가) or 협진입원(영양교육) or 협진외래(영양교육) or 반환 일 경우
  5692. //협진의뢰 탭화면 저장
  5693. if (cmb_nutrmngtkind.value == '01' || cmb_nutrmngtkind.value == '06' ||
  5694. cmb_nutrmngtkind.value == '07' || cmb_nutrmngtkind.value == '08' ||
  5695. cmb_nutrmngtkind.value == '10') {
  5696. model.copyNode("/root/send/data/maindata/cnstreq", "/root/main/maindata/cnstreq");
  5697. model.setValue("/root/send/data/maindata/cnstreq/pid", model.getValue("/root/send/searchitem/pid"));
  5698. model.setValue("/root/send/data/maindata/cnstreq/nutrmngtkind", model.getValue("/root/send/searchitem/nutrmngtkind"));
  5699. model.setValue("/root/send/data/maindata/cnstreq/execdd", model.getValue("/root/send/searchitem/execdd"));
  5700. model.setValue("/root/send/data/maindata/cnstreq/cnstflag1", "C"); // 'C'는 협진의뢰를 뜻함.
  5701. //model.setValue("/root/send/data/maindata/cnstreq/execprcpuniqno", model.getValue("/root/send/searchitem/execprcpuniqno"));
  5702. // 협진의뢰의 영양치료계획/권장 그리드에 필수데이터 셋팅
  5703. var rowcnt = grd_cnstreq.rows-1;
  5704. if ( rowcnt > 0 ) {
  5705. for ( i = 1; i <= rowcnt; i++ ) {
  5706. model.setValue("/root/main/maindata/cureplan/cnstreq["+ i +"]/pid", model.getValue("/root/send/searchitem/pid"));
  5707. model.setValue("/root/main/maindata/cureplan/cnstreq["+ i +"]/execdd", model.getValue("/root/send/searchitem/execdd"));
  5708. model.setValue("/root/main/maindata/cureplan/cnstreq["+ i +"]/nutrmngtkind", model.getValue("/root/send/searchitem/nutrmngtkind"));
  5709. model.setValue("/root/main/maindata/cureplan/cnstreq["+ i +"]/cnstpurs", "C");
  5710. }
  5711. model.setValue("/root/send/data/maindata/cureplan", grd_cnstreq.getUpdateData());
  5712. submit("TXANC00304");
  5713. }
  5714. //model.setValue("/root/send/data/maindata/cureplan", grd_cnstreq.getUpdateData());
  5715. if (submit("TXANC00302")) { //협진의뢰 탭화면 저장
  5716. //flag=R은 저장후 자동으로 재조회 하지 않고 회신까지 완료된 후 재조회 한다는 뜻임.
  5717. if ( model.getValue("/root/send/searchitem/flag") != "R" ) {
  5718. btn_search.dispatch("DOMActivate");
  5719. }
  5720. }
  5721. }
  5722. //영양관리유형이 일반추구관리 or 협진추구관리 or 반환 일 경우
  5723. //추구관리 탭화면 저장
  5724. else if (cmb_nutrmngtkind.value == '05' || cmb_nutrmngtkind.value == '09') {
  5725. model.copyNode("/root/send/data/maindata/pursmngt", "/root/main/maindata/pursmngt");
  5726. model.setValue("/root/send/data/maindata/pursmngt/pid", model.getValue("/root/send/searchitem/pid"));
  5727. model.setValue("/root/send/data/maindata/pursmngt/nutrmngtkind", model.getValue("/root/send/searchitem/nutrmngtkind"));
  5728. model.setValue("/root/send/data/maindata/pursmngt/execdd", model.getValue("/root/send/searchitem/execdd"));
  5729. model.setValue("/root/send/data/maindata/pursmngt/cnstflag2", "P"); // 'P'는 추구관리를 뜻함.
  5730. //model.setValue("/root/send/data/maindata/pursmngt/execprcpuniqno", model.getValue("/root/send/searchitem/execprcpuniqno"));
  5731. // 추구관리의 영양치료계획/권장 그리드에 필수데이터 셋팅
  5732. var rowcnt = grd_pursmngt.rows-1;
  5733. if ( rowcnt > 0 ) {
  5734. for ( i = 1; i <= rowcnt; i++ ) {
  5735. model.setValue("/root/main/maindata/cureplan/pursmngt["+ i +"]/pid", model.getValue("/root/send/searchitem/pid"));
  5736. model.setValue("/root/main/maindata/cureplan/pursmngt["+ i +"]/execdd", model.getValue("/root/send/searchitem/execdd"));
  5737. model.setValue("/root/main/maindata/cureplan/pursmngt["+ i +"]/nutrmngtkind", model.getValue("/root/send/searchitem/nutrmngtkind"));
  5738. model.setValue("/root/main/maindata/cureplan/pursmngt["+ i +"]/cnstpurs", "P");
  5739. }
  5740. model.setValue("/root/send/data/maindata/cureplan", grd_pursmngt.getUpdateData());
  5741. submit("TXANC00304");
  5742. }
  5743. if (submit("TXANC00303")) { //추구관리 탭화면 저장
  5744. //flag=R은 저장후 자동으로 재조회 하지 않고 회신까지 완료된 후 재조회 한다는 뜻임.
  5745. if ( model.getValue("/root/send/searchitem/flag") != "R" ) {
  5746. btn_search.dispatch("DOMActivate");
  5747. }
  5748. }
  5749. }
  5750. //저장이 정상처리된 경우만 해당 노드를 clear 해준다.
  5751. // model.resetInstanceNode("/root/main/maindata/nutrstatjudg");
  5752. // model.resetInstanceNode("/root/main/maindata/cnstreq");
  5753. // model.resetInstanceNode("/root/main/maindata/pursmngt");
  5754. // model.resetInstanceNode("/root/main/maindata/cureplan");
  5755. // model.refresh();
  5756. } else {
  5757. model.setValue("/root/temp/save/msg", "N"); //'N'은 영양상태판정 저장실패를 뜻함.
  5758. return;
  5759. }
  5760. //} else { return; }
  5761. ]]>
  5762. </script>
  5763. </button>
  5764. <button id="btn_reset" class="btn4_letter3" style="left:869px; top:4px; width:68px; height:22px; ">
  5765. <caption>초기화</caption>
  5766. <script type="javascript" ev:event="DOMActivate">
  5767. <![CDATA[
  5768. finit();
  5769. ]]>
  5770. </script>
  5771. </button>
  5772. <button id="button27" class="btn3_letter6" disabled="true" style="left:1px; top:4px; width:104px; height:22px; ">
  5773. <caption>의무기록조회</caption>
  5774. </button>
  5775. <button id="button3" class="btn3_letter4" disabled="true" style="left:107px; top:4px; width:80px; height:22px; ">
  5776. <caption>처방조회</caption>
  5777. </button>
  5778. <button id="btn_recsrch" class="btn3_letter6" disabled="false" style="left:190px; top:4px; width:104px; height:22px; ">
  5779. <caption>통합기록조회</caption>
  5780. <script type="javascript" ev:event="DOMActivate">
  5781. <![CDATA[
  5782. setParameter("SMMRI00400_param_pid", model.getValue("/root/send/searchitem/pid"));
  5783. //modal("SMMRI00400", 0,100,100,"SMMRI00400","","","left:30; top:50; width:1230; height:840;");
  5784. modal("SMMRI00400", 0,100,100,"SMMRI00400","","");
  5785. ]]>
  5786. </script>
  5787. </button>
  5788. <button id="btn_bsugarrec" class="btn3_letter6" disabled="false" style="left:297px; top:4px; width:104px; height:22px; ">
  5789. <caption>혈당간호기록</caption>
  5790. <script type="javascript" ev:event="DOMActivate">
  5791. <![CDATA[
  5792. //setParameter("SMMRI00400_param_pid", model.getValue("/root/send/searchitem/pid"));
  5793. modal("SMMNR02500", 0,100,100,"SMMNR02500","","");
  5794. ]]>
  5795. </script>
  5796. </button>
  5797. <button id="btn_capdrec" class="btn3_letter5" disabled="false" style="left:404px; top:4px; width:104px; height:22px; ">
  5798. <caption>CAPD기록</caption>
  5799. <script type="javascript" ev:event="DOMActivate">
  5800. <![CDATA[
  5801. //setParameter("SMMRI00400_param_pid", model.getValue("/root/send/searchitem/pid"));
  5802. modal("SMMNW09000", 0,100,100,"SMMNW09000","","","left:30; top:50; width:1230; height:840;");
  5803. ]]>
  5804. </script>
  5805. </button>
  5806. <button id="btn_crrtrec" class="btn3_letter5" disabled="false" style="left:500px; top:4px; width:104px; height:22px; ">
  5807. <caption>CRRT기록</caption>
  5808. <script type="javascript" ev:event="DOMActivate">
  5809. <![CDATA[
  5810. //setParameter("SMMRI00400_param_pid", model.getValue("/root/send/searchitem/pid"));
  5811. modal("SMMNW09100", 0,100,100,"SMMNW09100","","","left:30; top:50; width:1230; height:840;");
  5812. ]]>
  5813. </script>
  5814. </button>
  5815. <button id="btn_cnstrepl" class="btn4_letter2" style="left:997px; top:4px; width:56px; height:22px; ">
  5816. <caption>회신</caption>
  5817. <script type="javascript" ev:event="DOMActivate">
  5818. <![CDATA[
  5819. // btn_repl.dispatch("DOMActivate"); //회신 탭화면으로 이동
  5820. // btn_repl.selected = true;
  5821. if ( messageBox("회신을", "Q004") == 6 ) {
  5822. /*
  5823. * 다학제간, Care Plan 관련 항목 추가 - 시작
  5824. * ( 다학제간 및 Care Plan 의 회신여부 세팅 )
  5825. */
  5826. var nutrmngtkind = model.getValue("/root/send/searchitem/nutrmngtkind"); // 영양관리유형
  5827. // 다학제간 데이터 ENR 전송[ 09:협진추구관리, 07:협진입원(영양교육), 08:협진외래(영양교육) ]
  5828. if(nutrmngtkind == "07" || nutrmngtkind == "08" || nutrmngtkind == "09") {
  5829. if(!checkENREDUData()) {
  5830. return;
  5831. }
  5832. }
  5833. // Care Plan 전송 필수 데이터 체크
  5834. if(!checkENRCAREPLANData()) {
  5835. return;
  5836. }
  5837. var globalData = getGlobalVariable("ANC00350eventtarget", "A"); // 이벤트가 발생한 그리드
  5838. var target = model.getValue("/root/temp/griddata/gridid"); // 이벤트가 발생한 그리드
  5839. var targetRow = model.getValue("/root/temp/griddata/gridrow"); // 이벤트가 발생한 그리드 row 값
  5840. // 영양관리이력 데이터 세팅
  5841. if(target == "grd_nutrmngthist") {
  5842. model.setValue("/root/main/maindata/nutrmngt["+targetRow+"]/replyn", "Y"); // 회신여부
  5843. model.makeValue("/root/send/data/maindata/nutrstatjudg/replyn", model.getValue("/root/main/maindata/nutrmngt["+targetRow+"]/replyn"));
  5844. }
  5845. // 영양검색결과이력 데이터 세팅
  5846. else if(target == "grd_nutrsrchrslthist") {
  5847. model.makeValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/replyn", "Y"); // 회신여부
  5848. model.makeValue("/root/send/data/maindata/nutrstatjudg/replyn", model.getValue("/root/main/maindata/nutrsrchrslt["+targetRow+"]/replyn"));
  5849. }
  5850. // 초기 입력 데이터 세팅
  5851. else {
  5852. model.makeValue("/root/temp/senddata/replyn", "Y"); // 회신여부
  5853. model.makeValue("/root/send/data/maindata/nutrstatjudg/replyn", model.getValue("/root/temp/senddata/replyn"));
  5854. }
  5855. /*
  5856. * 다학제간, Care Plan 관련 항목 추가 - 끝
  5857. * ( 다학제간 및 Care Plan 의 회신여부 세팅 )
  5858. */
  5859. //flag=R은 저장후 자동으로 재조회 하지 않고 회신까지 완료된 후 재조회하기 위한 것임.
  5860. model.setValue("/root/send/searchitem/flag", "R");
  5861. //저장후 회신
  5862. btn_save.dispatch("DOMActivate");
  5863. /*
  5864. * 2010-02-09 formcd 추가 - 시작
  5865. */
  5866. var tempFormcd = "0800000722"; // 기존에 사용하던 formcd
  5867. // 초기영양검색 일 경우
  5868. //if(nutrmngtkind == "01") {
  5869. // tempFormcd = "0000003018";
  5870. //}
  5871. /*
  5872. * 2010-02-09 formcd 추가 - 끝
  5873. */
  5874. //저장이 정상처리된 경우 회신서관리 화면 호출
  5875. if ( model.getValue("/root/temp/save/msg") == "Y" ) {
  5876. //의뢰건이거나 비의뢰건이면서 재저장인 경우
  5877. if ( model.getValue("/root/send/data/maindata/nutrstatjudg/formrecseq") != "" ) {
  5878. var formrecseq = model.getValue("/root/send/data/maindata/nutrstatjudg/formrecseq");
  5879. var replcnts = model.getValue("/root/send/data/maindata/nutrstatjudg/replcnts"); //회신탭화면의 내용
  5880. setParameter("openmode", "reccnstform");
  5881. setParameter("userdeptcd", "3250100000");
  5882. setParameter("formrecseq", formrecseq);
  5883. setParameter("overwrite", "true");
  5884. setParameter("replcnts", replcnts);
  5885. modal("SSMMR01100", 1, 0, 0, "", "", "");
  5886. model.makeValue("/root/send/data/maindata/nutrstatjudg/reqyn", "Y");
  5887. }
  5888. //비의뢰건이면서 최초저장인 경우
  5889. else {
  5890. if ( model.getValue("/root/main/receivedatacopy/pid") != "" ) {
  5891. setParameter("pid", model.getValue("/root/main/receivedatacopy/pid"));
  5892. setParameter("orddd", model.getValue("/root/main/receivedatacopy/h_orddd"));
  5893. setParameter("cretno", model.getValue("/root/main/receivedatacopy/h_cretno"));
  5894. setParameter("ioflag", model.getValue("/root/main/receivedatacopy/h_prcpgenrflag"));
  5895. setParameter("orddeptcd", model.getValue("/root/main/receivedatacopy/h_orddeptcd"));
  5896. setParameter("orddrid", model.getValue("/root/main/receivedatacopy/orddrid"));
  5897. setParameter("SMMMR04900_reqdpcd", model.getValue("/root/main/receivedatacopy/h_orddeptcd")); //의뢰과코드
  5898. setParameter("SMMMR04900_reqdrid", model.getValue("/root/main/receivedatacopy/orddrid")); //주치의아이디
  5899. setParameter("SMMMR04900_reqdrnm", model.getValue("/root/main/receivedatacopy/reqpsn")); //주치의명
  5900. } else {
  5901. setParameter("pid", model.getValue("/root/main/maindata/patbaseinfo/pid"));
  5902. setParameter("orddd", model.getValue("/root/main/maindata/patbaseinfo/indd"));
  5903. setParameter("cretno", model.getValue("/root/main/maindata/patbaseinfo/cretno"));
  5904. setParameter("ioflag", model.getValue("/root/main/maindata/patbaseinfo/ioflag"));
  5905. setParameter("orddeptcd", model.getValue("/root/main/maindata/patbaseinfo/orddeptcd"));
  5906. setParameter("orddrid", model.getValue("/root/main/maindata/patbaseinfo/atdoctid"));
  5907. setParameter("SMMMR04900_reqdpcd", model.getValue("/root/main/maindata/patbaseinfo/orddeptcd")); //의뢰과코드
  5908. setParameter("SMMMR04900_reqdrid", model.getValue("/root/main/maindata/patbaseinfo/atdoctid")); //주치의아이디
  5909. setParameter("SMMMR04900_reqdrnm", model.getValue("/root/main/maindata/patbaseinfo/atdoctnm")); //주치의명
  5910. }
  5911. setParameter("SMMMR04900_reqdpnm", model.getValue("/root/main/maindata/patbaseinfo/orddeptnm")); //의뢰과명
  5912. setParameter("formcd", tempFormcd); //서식코드
  5913. setParameter("SMMMR04900_cnstflag", "3"); //의뢰구분(1:진료의뢰, 3:타과의뢰)
  5914. setParameter("SMMMR04900_replflag", "R"); //의뢰없는회신일경우 R로 셋팅
  5915. setParameter("SMMMR04900_cnstdeptcd", "3250100000"); //수신과코드
  5916. setParameter("SMMMR04900_cnstdeptnm", "영양팀"); //수신과명
  5917. setParameter("SMMMR04900_formnm", "영양검색"); //서식명
  5918. var replcnts = model.getValue("/root/send/data/maindata/nutrstatjudg/replcnts"); //회신탭화면의 내용
  5919. setParameter("replcnts", replcnts);
  5920. setParameter("overwrite", "true");
  5921. setParameter("openmode", "newcnstform");
  5922. modal("SSMMR01100", 1, 0, 0, "", "", "");
  5923. model.makeValue("/root/send/data/maindata/nutrstatjudg/reqyn", "N");
  5924. model.makeValue("/root/send/data/maindata/nutrstatjudg/formcd", tempFormcd);
  5925. }
  5926. //인증저장까지 모두 성공하였는지 조회하여 성공시에만 영양팀 테이블에 회신일자를 setting해준다.
  5927. submit("TRANC00304");
  5928. //의뢰임시(11), 의뢰(12), 의뢰확정(20), 회신임시(21), 회신(22), 회신확정(30)
  5929. if ( model.getValue("/root/temp/cnst/cnst/cnststat") >= 21 ) {
  5930. if ( model.getValue("/root/send/data/maindata/nutrstatjudg/formcd") == tempFormcd &&
  5931. model.getValue("/root/send/data/maindata/nutrstatjudg/formrecseq") == "" ) {
  5932. model.setValue("/root/send/data/maindata/nutrstatjudg/formrecseq", model.getValue("/root/temp/cnst/cnst/formrecseq"));
  5933. }
  5934. submit("TXANC00305");
  5935. /*
  5936. * 다학제간, Care Plan 관련 항목 추가 - 시작
  5937. * ( 다학제간 및 Care Plan 의 회신여부 세팅 )
  5938. */
  5939. var nutrmngtkinds = model.getValue("/root/send/searchitem/nutrmngtkind"); // 영양관리유형
  5940. // 다학제간 데이터 ENR 전송[ 09:협진추구관리, 07:협진입원(영양교육), 08:협진외래(영양교육) ]
  5941. if(nutrmngtkinds == "07" || nutrmngtkinds == "08" || nutrmngtkinds == "09") {
  5942. sendENREDUData();
  5943. }
  5944. // Care Plan 데이터 ENR 전송
  5945. sendENRCAREPLANData();
  5946. /*
  5947. * 다학제간, Care Plan 관련 항목 추가 - 끝
  5948. * ( 다학제간 및 Care Plan 의 회신여부 세팅 )
  5949. */
  5950. }
  5951. //flag=A는 화면 왼쪽의 공통정보(환자기본정보,진단명,입원동기,식사처방정보,영양관리이력,영양검색결과이력)와 해당 컨설팅 정보를 조회한다는 뜻임.
  5952. model.setValue("/root/send/searchitem/flag", 'A');
  5953. btn_search.dispatch("DOMActivate");
  5954. }
  5955. model.resetInstanceNode("/root/temp/save/msg");
  5956. } else {
  5957. return;
  5958. }
  5959. // } else {
  5960. // messageBox("컨설트 의뢰건이 아니라서 회신", "E001");
  5961. // return;
  5962. // }
  5963. ]]>
  5964. </script>
  5965. </button>
  5966. <button id="btn_pastrepl" class="btn4_letter6" style="left:765px; top:4px; width:104px; height:22px; ">
  5967. <caption>과거회신보기</caption>
  5968. <script type="javascript" ev:event="DOMActivate">
  5969. <![CDATA[
  5970. modal("SPANC00304", 0,50,50,"SPANC00304", "/root/main/maindata/repl", "/root/main/receivedata");
  5971. ]]>
  5972. </script>
  5973. </button>
  5974. <button id="btn_del" class="btn4_letter2" style="left:1058px; top:4px; width:56px; height:22px; ">
  5975. <caption>삭제</caption>
  5976. <script type="javascript" ev:event="DOMActivate">
  5977. <![CDATA[
  5978. var hngnm = opt_patnm.value;
  5979. var execdd = model.getValue("/root/main/maindata/nutrstatjudg/execdd");
  5980. var nutrmngtkind = cmb_nutrmngtkind.label;
  5981. if ( messageBox(hngnm + " 환자의 " + execdd.substr(0,4) + "년 " + execdd.substr(4,2) + "월 " + execdd.substr(6,2) + "일 " + nutrmngtkind + " 관련 모든 정보를", "Q001") == 6 ) {
  5982. model.copyNode("/root/send/data/maindata/nutrstatjudg", "/root/main/maindata/nutrstatjudg");
  5983. //컨설트상태가 회신임시(21) 이상이면 회신취소 우선 수행 후 삭제함.
  5984. if ( model.getValue("/root/main/maindata/nutrstatjudg/cnststat") != "" &&
  5985. model.getValue("/root/main/maindata/nutrstatjudg/cnststat") >= 21 ) {
  5986. model.makeValue("/root/send/data/maindata/nutrstatjudg/delcnclflag", "C"); //C는 회신취소를 뜻함.
  5987. if (submit("TXANC00351")) {
  5988. model.setValue("/root/send/data/maindata/nutrstatjudg/delcnclflag", "D"); //D는 삭제를 뜻함.
  5989. if (submit("TXANC00351")) {
  5990. model.setValue("/root/send/searchitem/flag", 'A');
  5991. model.setValue("/root/temp/griddata/gridid", "");
  5992. model.setValue("/root/temp/griddata/gridrow", "");
  5993. btn_search.dispatch("DOMActivate");
  5994. }
  5995. }
  5996. } else {
  5997. model.makeValue("/root/send/data/maindata/nutrstatjudg/delcnclflag", "D"); //D는 삭제를 뜻함.
  5998. if (submit("TXANC00351")) {
  5999. model.setValue("/root/send/searchitem/flag", 'A');
  6000. model.setValue("/root/temp/griddata/gridid", "");
  6001. model.setValue("/root/temp/griddata/gridrow", "");
  6002. btn_search.dispatch("DOMActivate");
  6003. }
  6004. }
  6005. } else {
  6006. return;
  6007. }
  6008. ]]>
  6009. </script>
  6010. </button>
  6011. <button id="btn_cnstreplcncl" class="btn4_letter4" style="left:1115px; top:4px; width:80px; height:22px; ">
  6012. <caption>회신취소</caption>
  6013. <script type="javascript" ev:event="DOMActivate">
  6014. <![CDATA[
  6015. var hngnm = opt_patnm.value;
  6016. var execdd = model.getValue("/root/main/maindata/nutrstatjudg/execdd");
  6017. var nutrmngtkind = cmb_nutrmngtkind.label;
  6018. if ( messageBox(hngnm + " 환자의 " + execdd.substr(0,4) + "년 " + execdd.substr(4,2) + "월 " + execdd.substr(6,2) + "일 " + nutrmngtkind + " 회신을", "Q007") == 6 ) {
  6019. model.copyNode("/root/send/data/maindata/nutrstatjudg", "/root/main/maindata/nutrstatjudg");
  6020. model.makeValue("/root/send/data/maindata/nutrstatjudg/delcnclflag", "C"); //C는 회신취소를 뜻함.
  6021. if (submit("TXANC00351")) {
  6022. model.setValue("/root/send/searchitem/flag", 'A');
  6023. btn_search.dispatch("DOMActivate");
  6024. }
  6025. } else {
  6026. return;
  6027. }
  6028. ]]>
  6029. </script>
  6030. </button>
  6031. <button id="btn_careplan" class="btn3_letter2" disabled="false" style="left:595px; top:4px; width:164px; height:22px; ">
  6032. <caption>COP</caption>
  6033. <script type="javascript" ev:event="DOMActivate">
  6034. <![CDATA[
  6035. setParameter("SMMRJ00100_pid", model.getValue("/root/main/maindata/patbaseinfo/pid"));
  6036. modal("SMMRJ00100", "", "", "", "SMMRJ00100", "", "");
  6037. ]]>
  6038. </script>
  6039. </button>
  6040. <button id="btn_enredu" class="btn3_letter2" disabled="false" style="left:655px; top:4px; width:56px; height:22px; ">
  6041. <caption>PFE</caption>
  6042. <script type="javascript" ev:event="DOMActivate">
  6043. <![CDATA[
  6044. setParameter("SMMRJ00200_pid", model.getValue("/root/main/maindata/patbaseinfo/pid"));
  6045. modal("SMMRJ00200", "", "", "", "SMMRJ00200", "", "");
  6046. ]]>
  6047. </script>
  6048. </button>
  6049. </group>
  6050. </xhtml:body>
  6051. </xhtml:html>