SMMQP00600_CP생성기.xrw 209 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
  3. <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2002/01/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
  4. <xhtml:head>
  5. <xhtml:title>CP Generator</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <masterinfo>
  11. <info>
  12. <cpgnm/>
  13. <cpgorddeptcd/>
  14. <cpaprvno/>
  15. <swimlineno/>
  16. <fcstinhospdayno/>
  17. <appdd/>
  18. <todd/>
  19. <lastupdtdt/>
  20. <cpgmemo/>
  21. <cpgno/>
  22. <cpghistseq/>
  23. <cpgflagcd>01</cpgflagcd>
  24. <reqrid/>
  25. <rgstrid/>
  26. <cpglasthistyn/>
  27. <tmpyn/>
  28. <fstrgstrid/>
  29. <fstrgstdt/>
  30. <lastupdtrid/>
  31. <instcd/>
  32. <cpgflagcd/>
  33. <cpkind/>
  34. <reqrnm/>
  35. <rgstrnm/>
  36. <cretdd/>
  37. <orgcpgnm/>
  38. <ioflagcd>I</ioflagcd>
  39. <cpgtypecd>D</cpgtypecd>
  40. <valusgeyn>N</valusgeyn>
  41. <valunm/>
  42. </info>
  43. </masterinfo>
  44. <diaginfo/>
  45. <opinfo/>
  46. <ccinfo/>
  47. <attfileinfo/>
  48. <indexinfo>
  49. <item/>
  50. </indexinfo>
  51. <steplist/>
  52. <decisionlist/>
  53. <stepinfo>
  54. <info>
  55. <stepno/>
  56. <times/>
  57. <stepmemo/>
  58. <stepnm/>
  59. <stepflagcd/>
  60. <setno/>
  61. <daynm/>
  62. </info>
  63. </stepinfo>
  64. <tempuserinfo/>
  65. <reqrlist>
  66. <list/>
  67. <reqrid/>
  68. <inputreqrnm/>
  69. </reqrlist>
  70. <sortedsteplist/>
  71. <exclusion/>
  72. <delmasterinfo/>
  73. <dropinfo/>
  74. <scrninfo/>
  75. <mntrinfo/>
  76. <inqrinfo/>
  77. <limtminfo/>
  78. </main>
  79. <send>
  80. <attfileinfo/>
  81. </send>
  82. <init>
  83. <P0322list>
  84. <P0322>
  85. <cdnm/>
  86. <cdid/>
  87. </P0322>
  88. </P0322list>
  89. <orddeptlist>
  90. <dept>
  91. <depthngnm/>
  92. <deptcd/>
  93. </dept>
  94. </orddeptlist>
  95. <cpmasterlist/>
  96. <cpgmasterlist/>
  97. </init>
  98. <temp>
  99. <lastrowcnt/>
  100. <getdata/>
  101. <trmqp_rslt/>
  102. <mstatus/>
  103. <copynodeset>
  104. <masterinfo>
  105. <info/>
  106. </masterinfo>
  107. </copynodeset>
  108. <userpopupinfo>
  109. <param/>
  110. <flag/>
  111. <searchitem/>
  112. </userpopupinfo>
  113. <daylist>
  114. <day>
  115. <id/>
  116. <nm/>
  117. </day>
  118. </daylist>
  119. <oldcpgno/>
  120. <oldcpghistseq/>
  121. <oldtmpyn/>
  122. <oldcpgorddeptcd/>
  123. <deptchngyn/>
  124. <saveflag/>
  125. <tempnode/>
  126. <stepinfo>
  127. <info>
  128. <stepno/>
  129. <stepflagcd>A</stepflagcd>
  130. <stepmemo/>
  131. <lnkstepno/>
  132. <times/>
  133. <startendflag/>
  134. <swimlineno/>
  135. <refseq>1</refseq>
  136. <decirflag/>
  137. <setno/>
  138. <settypecd/>
  139. <m>i</m>
  140. <stepnm/>
  141. <formexistyn/>
  142. <dcsnstep/>
  143. <orgstepno/>
  144. <stepattrflag/>
  145. </info>
  146. </stepinfo>
  147. <planertimesarray/>
  148. <usgecd/>
  149. <multideptcdlist/>
  150. <multideptnmlist/>
  151. <popupmenu1>
  152. <item>
  153. <name>코드 삭제</name>
  154. <func>fDiagCodeDelete</func>
  155. </item>
  156. </popupmenu1>
  157. <popupmenu2>
  158. <item>
  159. <name>코드 삭제</name>
  160. <func>fOpCodeDelete</func>
  161. </item>
  162. </popupmenu2>
  163. <popupmenu3>
  164. <item>
  165. <name>코드 삭제</name>
  166. <func>fCcCodeDelete</func>
  167. </item>
  168. </popupmenu3>
  169. <popupmenu4>
  170. <item>
  171. <name>코드 삭제</name>
  172. <func>fExcCodeDelete</func>
  173. </item>
  174. </popupmenu4>
  175. <popupmenu5>
  176. <item>
  177. <name>코드 삭제</name>
  178. <func>fDropCodeDelete</func>
  179. </item>
  180. </popupmenu5>
  181. </temp>
  182. <hidden/>
  183. </root>
  184. </instance>
  185. <script type="javascript" ev:event="xforms-model-construct-done">
  186. <![CDATA[
  187. fGetCodeList();
  188. fInitialize();
  189. fInitializeCtrl();
  190. //OCS, 환자계획표 화면의 초기화
  191. if( !isNull(model.getValue("/root/main/masterinfo/info/cpgno")) ){
  192. fSendDetailValue();
  193. ivw_detail.window.javascript.fInitialize();
  194. ivw_detail.window.javascript.fInitGrigInfo();
  195. //ivw_prcp.window.javascript.fInitData();
  196. }
  197. grd_diag_attribute_top = grd_diag.attribute("top");
  198. grd_op_attribute_top = grd_op.attribute("top");
  199. grd_drop_attribute_top = grd_drop.attribute("top");
  200. grd_exclusion_attribute_top = grd_exclusion.attribute("top");
  201. grd_diag.rowhidden(0) = true;
  202. grd_op.rowhidden(0) = true;
  203. grd_cc.rowhidden(0) = true;
  204. grd_exclusion.rowhidden(0) = true;
  205. grd_drop.rowHidden(0) = true;
  206. if(ipt_cpaprvno.value == "") {
  207. ipt_cpaprvno.value = "승인번호";
  208. }
  209. ]]>
  210. </script>
  211. <submission id="TRMQP00601" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/temp/rslt"/>
  212. <submission id="TRMQP00602" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/temp/getdata" resultref="/root/temp/trmqp_rslt"/>
  213. <submission id="TRMQP00603" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/masterinfo" resultref="/root/temp/rslt"/>
  214. <submission id="TRMQP00605" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp/attachfile"/>
  215. <submission id="TRMQP00606" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/temp/temp_attlist"/>
  216. <submission id="TXMQP00601" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp/masterinfo"/>
  217. <submission id="TXMQP00602" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/main/attfileinfo"/>
  218. <submission id="TXMQP00603" mediatype="multipart/form-data" method="form-data-post" ref="/root/main/attfileinfo" resultref="/root/main/attfileinfo"/>
  219. <submission id="TXMQP00604" mediatype="application/x-www-form-urlencoded" method="post"/>
  220. <submission id="TXMQP00605" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/step" resultref="/root/temp/tempnode"/>
  221. <submission id="TXMMP01501" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/temp/savedfolder"/>
  222. <submission id="TRMMB04101" mediatype="application/x-www-form-urlencoded" method="post"/>
  223. <submission id="TRMMB04105" mediatype="application/x-www-form-urlencoded" method="post"/>
  224. </model>
  225. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  226. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  227. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  228. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  229. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  230. <script type="javascript" src="../../../emr/commonweb/js/EMRCommon.js"/>
  231. <script type="javascript" src="../../../emr/prcpmngtweb/js/MMO001.js"/>
  232. <script type="javascript">
  233. <![CDATA[
  234. var saveIndxlist = "";
  235. var saveIndxHeader = "";
  236. var preSelectedTab = "btn_outline_tab";
  237. var saveMode = "";
  238. var changedYN = "N"; //데이터 저장 후, 환자계획표를 refresh 하기 위해서, 저장 후 Y로 바꾸고, 환자계획표를 열면 다시 N
  239. var OcsSaveYN = "N";
  240. var savedeptnm = "";
  241. var savedeptcd = "";
  242. var savesupindxno = "";
  243. var savesuprefseq = "";
  244. var oldFlag = "-"; //현재의 진단,수술,Drop,Exclusion 그리드 확대/축소 정보(2008.07.25 JJE)
  245. var cpgOldFlag = "-"; //CPG 그리드 정보
  246. var OpenerKind = "GEN";
  247. var cpgFlagCd = ""; //01, 02
  248. var cpgFlagNM = ""; //CP, CPG
  249. var setTypeCd = ""; //W, G
  250. var jobKindCd = ""; //직종코드(0330:의사, 0332:치과의사)
  251. var dutPlceCd = ""; //근무부서
  252. var grd_diag_attribute_top = 0;
  253. var grd_op_attribute_top = 0;
  254. var grd_drop_attribute_top = 0;
  255. var grd_exclusion_attribute_top = 0;
  256. var loading_detail_YN="N";
  257. /**
  258. * @group :
  259. * @ver : 2007.07
  260. * @by : 전지은
  261. * @---------------------------------------------------
  262. * @type : function
  263. * @access : public
  264. * @desc : 공통코드를 조회한다.
  265. * @param :
  266. * @return :
  267. * @---------------------------------------------------
  268. */
  269. function fGetCodeList() {
  270. var instcd = getUserInfo("dutplceinstcd");
  271. var standard_yn = "orduseyn";
  272. var ord_deptflag = 'D';
  273. var rslt_ref = "/root/init/orddeptlist";
  274. //zbcfGetDeptCodeList(instcd, standard_yn, ord_deptflag, rslt_ref, "depthngnm", "asc");
  275. mmbfGetDeptCodeComboList("/root/send/reqdata", "/root/init/orddeptlist" , "A"); //부서코드 콤보(외래+입원)
  276. //start: [요청번호:1580] 공용CP 생성 요청에 따른 병원 코드 추가 (2010.02. JJE)
  277. var lngth = instance1.selectNodes("/root/init/orddeptlist/dept").length;
  278. model.makeNode("/root/main/orddeptlist");
  279. model.copyNode("/root/main/orddeptlist", "/root/init/orddeptlist");
  280. //for(var i=1; i<=lngth; i++){
  281. // model.makeValue("/root/main/orddeptlist/dept[" + i + "]/checkyn", "N");
  282. //}
  283. model.makeValue("/root/init/orddeptlist/dept[" + lngth + "]/deptcd", "1000000000");
  284. model.makeValue("/root/init/orddeptlist/dept[" + lngth + "]/depthngnm", "병원");
  285. model.makeValue("/root/init/orddeptlist/dept[" + lngth + "]/deptengabbr", "");
  286. //end
  287. //[요청번호: 11937] 마스터 권한 정보 조회 (2010.03.26 JJE)
  288. mmbfGetHardCodeInfoNm("/root/send/reqdata", "/root/init/cpmasterlist", 203); //CP
  289. mmbfGetHardCodeInfoNm("/root/send/reqdata", "/root/init/cpgmasterlist", 204); //CPG
  290. jobKindCd = getUserInfo("jobkindcd"); //직종코드(0330:의사, 0332:치과의사)
  291. dutPlceCd = getUserInfo("dutplcecd"); //근무부서
  292. }
  293. /**
  294. * @group :
  295. * @ver : 2007.07
  296. * @by : 전지은
  297. * @---------------------------------------------------
  298. * @type : function
  299. * @access : public
  300. * @desc : 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
  301. * @param :
  302. * @return :
  303. * @---------------------------------------------------
  304. */
  305. function fInitialize() {
  306. model.removeNodeset("/root/main/attfileinfo/attach");
  307. model.resetInstanceNode("/root/send");
  308. model.refresh();
  309. //검색창에 의해 화면이 로딩되었다면, CPG 정보를 조회한다.
  310. var saveflag = model.getValue("/root/temp/getdata/saveasflag");
  311. savedeptnm = model.getValue("/root/temp/getdata/savedeptnm");
  312. savedeptcd = model.getValue("/root/temp/getdata/savedeptcd");
  313. var node = instance1.selectSingleNode("/root/temp/getdata");
  314. var nodeList = node.childNodes;
  315. if( saveflag == "OP" || saveflag == "" ){ //saveflag==""인 경우는 메뉴를 통해 open 한 경우..
  316. setSpclScrnAuth("X", false);
  317. }
  318. //권한에 따른, 버튼 설정
  319. if( checkAuth("X") && saveflag != "VW" ){
  320. model.makeValue("/root/temp/getdata/authflag", "M"); //생성기를 메뉴에서 바로 열었을 때, QI에게만 메뉴 open 권한을 주어준 후, 수정할 것
  321. }else{
  322. if( saveflag != "OP" ){
  323. ipt_cpgnm.disabled = true;
  324. rdo_cpgflagcd.disabled = true;
  325. btn_initialize.visible = false; // 초기화
  326. button18.visible = false; // Drop/평가/Exculusion
  327. button12.visible = false; // 모니터링
  328. button2.visible = false; // 첨부파일 찾기
  329. button3.visible = false // 첨부파일 삭제
  330. btn_newnm.disabled = true; // 새이름으로
  331. btn_newver.disabled = true; // 저장
  332. btn_allInfoSave.disabled = true; //등록
  333. ivw_outline.grp_button.visible = false;
  334. button16.visible = false; //검색버튼 (검색->Generator->검색... => X)
  335. ipt_stepnm.disabled = true;
  336. tar_stepmemo.disabled = true;
  337. ipt_times.disabled = true;
  338. cmb_stepnm.disabled = true;
  339. }
  340. if( jobKindCd == "0330" || jobKindCd == "0332" || jobKindCd == "9930" ){
  341. model.makeValue("/root/temp/getdata/authflag", "U");
  342. }else{
  343. model.makeValue("/root/temp/getdata/authflag", "S");
  344. }
  345. }
  346. ivw_outline.model.setValue("/root/temp/getdata/authflag", model.getValue("/root/temp/getdata/authflag") );
  347. if(nodeList.length > 0){
  348. // 1. saveflag != "OP" 이면, 조회부(화면 clear 후 조회)
  349. if( saveflag != "OP" ){
  350. submit("TRMQP00602"); //master 조회
  351. model.copyNode("/root/main/masterinfo/info", "/root/temp/trmqp_rslt/masterinfo");
  352. if( saveflag == "SR" || saveflag == "VW" ){ //조회 (2007변경됨, 조회모드만 존재함)
  353. model.copyNode("/root/temp/copynodeset/masterinfo/info", "/root/main/masterinfo/info");
  354. //초기화 (새이름으로 저장 할 경우, 진료과 변경 가능함... 진료과 변경 여부에 따라, 동일CP 조회기준이 달라짐)
  355. model.setValue("/root/temp/oldcpgorddeptcd", model.getValue("/root/temp/copynodeset/masterinfo/info/cpgorddeptcd"));
  356. model.setValue("/root/temp/deptchngyn" , "N");
  357. }
  358. var cpgflagcd = model.getValue("/root/temp/trmqp_rslt/masterinfo/cpgflagcd");
  359. var diagRef = "/root/temp/trmqp_rslt/diaglist";
  360. var opRef = "/root/temp/trmqp_rslt/oplist";
  361. var ccRef = "/root/temp/trmqp_rslt/cclist";
  362. var exclusionRef = "/root/temp/trmqp_rslt/exclist";
  363. var dropRef = "/root/temp/trmqp_rslt/droplist";
  364. var mntrRef = "/root/temp/trmqp_rslt/mntrlist";
  365. var limRef = "/root/temp/trmqp_rslt/limheaderinfo";
  366. var inqrRef = "/root/temp/trmqp_rslt/inqrheader";
  367. var deptRef = "/root/temp/trmqp_rslt/deptlist";
  368. if (cpgflagcd =="01") {
  369. copyNodeListType("/root/main/diaginfo", diagRef + "[termflag = 'T00' or termflag = 'T01']", "after", model, model);
  370. copyNodeListType("/root/main/opinfo", opRef + "[termflag = 'T90' or termflag = 'T91']", "after", model, model);
  371. copyNodeListType("/root/main/ccinfo", ccRef + "[termflag = 'T20']", "after", model, model);
  372. copyNodeListType("/root/main/exclusion", exclusionRef, "after", model, model);
  373. copyNodeListType("/root/main/dropinfo", dropRef, "after", model, model);
  374. copyNodeListType("/root/main/reqrlist", "/root/temp/trmqp_rslt/list", "replace", model, model);
  375. copyNodeListType("/root/main/attfileinfo", "/root/temp/trmqp_rslt/attach", "replace", model, model);
  376. } else {
  377. copyNodeListType("/root/main/scrninfo" , mntrRef + "[cpgmntrflag = 'S']", "after", model, model);
  378. copyNodeListType("/root/main/mntrinfo" , mntrRef + "[cpgmntrflag = 'M']", "after", model, model);
  379. copyNodeListType("/root/main/inqrinfo" , inqrRef, "after", model, model);
  380. copyNodeListType("/root/main/limtminfo" , limRef, "after", model, model);
  381. copyNodeListType("/root/main/reqrlist", "/root/temp/trmqp_rslt/list", "replace", model, model);
  382. }
  383. //start: multi진료과인 경우 설정된 진료과 check 설정
  384. var deptListNodes = instance1.selectNodes("/root/temp/trmqp_rslt/deptlist");
  385. if( deptListNodes.length > 0 ){
  386. var multideptcdlist = "";
  387. var multideptnmlist = "";
  388. for(var i=0; i<deptListNodes.length; i++){
  389. var node = deptListNodes.item(i);
  390. var deptcd = node.selectSingleNode("deptcd");
  391. var deptnm = node.selectSingleNode("deptnm");
  392. //model.setValue("/root/main/orddeptlist/dept[deptcd='" + deptcd.text + "']/checkyn", "Y");
  393. multideptcdlist = multideptcdlist + deptcd.text + ",";
  394. multideptnmlist = multideptnmlist + deptnm.text + ",";
  395. }
  396. multideptcdlist = multideptcdlist.substr(0, multideptcdlist.length-1);
  397. multideptnmlist = multideptnmlist.substr(0, multideptnmlist.length-1);
  398. model.setValue("/root/temp/multideptcdlist", multideptcdlist);
  399. model.setValue("/root/temp/multideptnmlist", multideptnmlist);
  400. ipt_cpgorddeptnm.refresh();
  401. }
  402. //end
  403. //정렬된 스텝을 셋팅한다 (2007.11.01 outlineview 에 노드 추가(스텝처방에서 탭 정렬을 위해))
  404. model.resetInstanceNode("/root/main/steplist");
  405. ivw_outline.model.resetInstanceNode("/root/main/sortedsteplist");
  406. var stepNodeList = instance1.selectNodes("/root/temp/trmqp_rslt/sortedsteplist");
  407. if( stepNodeList.length > 0 ){
  408. for(var i=0; i<stepNodeList.length; i++){
  409. var node = stepNodeList.item(i);
  410. var statusNode = node.selectSingleNode("orgstepno");
  411. model.setValue(statusNode, i+1);
  412. }
  413. var stepCSV = getNodeListCSV(stepNodeList);
  414. setCSVToNode("/root/main/steplist", stepCSV, "info");
  415. copyNodeListType("/root/main/sortedsteplist", "/root/main/steplist/info", "replace", ivw_outline.model, model);
  416. copyNodeListType("/root/main/sortedsteplist", "/root/main/steplist/info", "replace", model, model);
  417. model.makeNode("/root/main/reqrlist/reqrid");
  418. model.makeNode("/root/main/reqrlist/inputreqrnm");
  419. }
  420. //step 정보를 셋팅한다.
  421. nodeList = instance1.selectNodes("/root/temp/trmqp_rslt/steplist");
  422. var stepCnt = nodeList.length;
  423. if(nodeList.length > 0){
  424. model.removeNodeset("/root/main/steplist");
  425. model.removeNodeset("/root/main/decisionlist");
  426. model.makeNode("/root/main/steplist");
  427. model.makeNode("/root/main/decisionlist");
  428. var stepCSV = getNodeListCSV(nodeList);
  429. setCSVToNode("/root/main/steplist", stepCSV, "info");
  430. //decision step
  431. nodeList = instance1.selectNodes("/root/temp/trmqp_rslt/decisionlist");
  432. if(nodeList.length > 0){
  433. var dcsCSV = getNodeListCSV(nodeList);
  434. setCSVToNode("/root/main/decisionlist", dcsCSV, "info");
  435. }
  436. fCreateOutLineView();
  437. //var stepCnt = nodeList.length;
  438. ivw_outline.model.makeNode("/root/main/steplist");
  439. copyNodesetType("/root/main/steplist", "/root/main/steplist", "after", ivw_outline.model, model);
  440. copyNodesetType("/root/main/decisionlist", "/root/main/decisionlist", "after", ivw_outline.model, model);
  441. ivw_outline.model.removenode("/root/main/steplist[1]"); //빈 노드를 삭제한다.
  442. ivw_outline.model.removenode("/root/main/decisionlist[1]"); //빈 노드를 삭제한다.
  443. var agr1 = stepCnt; //그려야 할 컨트롤 갯수
  444. var agr2 = (parseInt(model.getValue("/root/main/masterinfo/info/swimlineno")) * 3) + 1; //아웃라인을 구성하는 라인 컨트롤 갯수
  445. ivw_outline.window.javascript.initGlobalVariant(agr1, agr2);
  446. ivw_outline.window.javascript.fCreateControl();
  447. }
  448. fSettingDayComboList(); //우측 상단의 day콤보 리스트 값 설정
  449. fCopyOrgCpgNM(); //CP/CPG명을 CP검색화면에서의 이름과 동일하게
  450. if( model.getValue("/root/temp/getdata/authflag") != "M" ){
  451. //조회모드(의사,간호사)
  452. ipt_cpgnm.disabled = true;
  453. //2008.06.16 pymi(시작)
  454. //CP 검색에서 조회시 ivw_detail viewer size 조정은 한번만 발생하도록
  455. if(model.getValue("/root/temp/getdata/srcMode") == 1) {
  456. btn_sizecntl.dispatch("DOMActivate");
  457. } else {
  458. //OCS, 환자계획표 화면의 초기화
  459. if( !isNull(model.getValue("/root/main/masterinfo/info/cpgno")) ){
  460. ivw_detail.window.javascript.fInitialize();
  461. fSendDetailValue();
  462. ivw_detail.window.javascript.fInitGrigInfo();
  463. }
  464. //ivw_outline size redraw
  465. ivw_outline.grp_swimline.attribute("width") = "1189px";
  466. ivw_outline.grp_button.attribute("left") = "917px";
  467. ivw_outline.window.javascript.fAdjustLine("allEx", "392");
  468. ivw_outline.ivw_detail.attribute("left") = "0px";
  469. ivw_outline.ivw_detail.attribute("width") = "1192px";
  470. ivw_outline.ivw_detail.attribute("height") = "655px";
  471. var currentStep = ivw_outline.window.javascript.currentStepCntl;
  472. ivw_outline.window.javascript.fCreateControl();
  473. ivw_outline.window.javascript.currentStepCntl = currentStep;
  474. ivw_outline.window.javascript.fChangeSelectCntl("#A683B1", ivw_outline.window.javascript.currentStepCntl);
  475. }
  476. //2008.06.16 pymi(완료)
  477. btn_detail_tab.dispatch("DOMActivate");
  478. btn_detail_tab.selected = true;
  479. }else{
  480. //관리자모드(QI)
  481. ipt_cpgnm.refresh(); //2008.06.24(전지은) 추가 (diabled 전에 setValue로 값만 가지고 있을 때, 화면에 보이지 않는 문제 발생... refresh 했더니 보임)
  482. ipt_cpgnm.disabled = true;
  483. rdo_cpgflagcd.disabled = true;
  484. //마지막 버전이 아닌 CP는 조회만 가능 -> 새이름저장만 가능 (2008.11.)
  485. if( model.getValue("/root/main/masterinfo/info/cpglasthistyn") == "N" || model.getValue("/root/main/masterinfo/info/todd") <= getCurrentDate() ){
  486. btn_newver.disabled = true;
  487. btn_allInfoSave.disabled = true;
  488. //btn_newnm.disabled = true; //최종이력이 아니어도 수정 후 새이름으로 저장 가능 (2008.11.15)
  489. }
  490. //등록CP인경우 진료과 재원일수 비활성화(2008.06.20 LWS)
  491. if( model.getValue("/root/main/masterinfo/info/tmpyn") == "N"){
  492. cmb_cpgorddeptcd.disabled = true;
  493. rdo_ioflagcd.disabled = true;
  494. //ipt_fcstinhospdayno.disabled = true;
  495. }else{
  496. cmb_cpgorddeptcd.disabled = false;
  497. rdo_ioflagcd.disabled = false;
  498. //if( cpgflagcd == "01" ) ipt_fcstinhospdayno.disabled = false;
  499. }
  500. }
  501. }else{
  502. if( !isNull(savedeptcd) ){
  503. var comboNodeList = instance1.selectNodes("/root/init/orddeptlist/dept");
  504. for( var i=1; i<=comboNodeList.length; i++){
  505. if( model.getValue("/root/init/orddeptlist/dept[" + i + "]/deptcd") == savedeptcd){
  506. cmb_cpgorddeptcd.select((i-1));
  507. }
  508. }
  509. }
  510. if( isNull(model.getValue("/root/main/masterinfo/info/cpgno")) ){
  511. btn_newnm.disabled = true;
  512. }
  513. savesupindxno = model.getValue("/root/temp/getdata/savesupindxno"); //선택한 폴더 no**
  514. savesuprefseq = model.getValue("/root/temp/getdata/savesuprefseq"); //선택한 폴더 seq
  515. }
  516. }
  517. fInitializeValue( saveflag ); //2008.06.24(전지은) 위치 바꿈. (CPG 조회 시, 승인번호 inputbox disable 시키기 위해)
  518. // 2014/04/24 이정택 추가
  519. model.setValue("/root/main/masterinfo/info/appdd", getCurrentDate());
  520. model.setValue("/root/main/masterinfo/info/lastupdtdt", getCurrentDate());
  521. // 2014/04/24 이정택 추가
  522. model.refresh();
  523. }
  524. /**
  525. * @group :
  526. * @ver : 2007.07
  527. * @by : 전지은
  528. * @---------------------------------------------------
  529. * @type : function
  530. * @access : public
  531. * @desc : 새버전으로/새이름으로 저장 시, 인스턴스의 save flag(m)를 바꿔준다
  532. * @param : settingYN : OP(CP검색화면에서 신규로 열거나, 메뉴에서 생성기 처음 여는 경우), 그외:조회모드
  533. * @return :
  534. * @---------------------------------------------------
  535. */
  536. function fInitializeValue( settingYN ){
  537. if( isNull(settingYN) ){
  538. settingYN = "OP"; //메뉴에서 화면을 열거나, 초기화 버튼을 누를 경우, settingYN = null (CP검색에서 신규버튼 눌렀을때와 동일)
  539. }
  540. //var chngYN = "N";
  541. //if( cpgFlagCd != model.getValue("/root/main/masterinfo/info/cpgflagcd") ) chngYN = "Y";
  542. cpgFlagCd = model.getValue("/root/main/masterinfo/info/cpgflagcd");
  543. var addTop = parseInt(swt_cpgmain.attribute("top")) + 2;
  544. if(cpgFlagCd == "01") { //CP
  545. cpgFlagNM = "CP";
  546. setTypeCd = "W";
  547. //스위치 위에 입력컨트롤을 올림
  548. cmb_cpgorddeptcd.attribute("top") = parseInt(cap_cpgorddeptcd.attribute("top")) + addTop;
  549. btn_getdept.attribute("top") = parseInt(cap_cpgorddeptcd.attribute("top")) + addTop;
  550. ipt_cpgorddeptcd.attribute("top") = parseInt(cap_cpgorddeptcd.attribute("top")) + addTop;
  551. ipt_cpgorddeptnm.attribute("top") = parseInt(cap_cpgorddeptcd.attribute("top")) + addTop;
  552. grp_cpgorddeptinfo.attribute("top") = 220; //진료과 멀티 선택 팝업
  553. ipt_fcstinhospdayno.attribute("top") = parseInt(cap_fcstinhospdayno.attribute("top")) + addTop;
  554. ipt_fcstinhospdayno.attribute("left") = parseInt(cap_fcstinhospdayno.attribute("left")) + parseInt(cap_fcstinhospdayno.attribute("width")) + 2;
  555. ipt_swimlineno.attribute("top") = parseInt(cap_swimlineno.attribute("top")) + addTop;
  556. ipt_swimlineno.attribute("left") = parseInt(cap_swimlineno.attribute("left")) + parseInt(cap_swimlineno.attribute("width")) + 2;
  557. ipt_cretdd.attribute("top") = parseInt(cap_cretdd.attribute("top")) + addTop;
  558. ipt_appdd.attribute("top") = parseInt(cap_appdd.attribute("top")) + addTop;
  559. ipt_todd.attribute("top") = parseInt(cap_todd.attribute("top")) + addTop;
  560. ipt_lastupdtdt.attribute("top") = parseInt(cap_lastupdtdt.attribute("top")) + addTop;
  561. cmb_reqrlist.attribute("top") = parseInt(cap_reqrlist.attribute("top")) + addTop;
  562. btn_srchreqr.attribute("top") = parseInt(cap_reqrlist.attribute("top")) + addTop + 3;
  563. btn_delreqr.attribute("top") = parseInt(cap_reqrlist.attribute("top")) + addTop + 3;
  564. ipt_lastupdtdt.attribute("top") = parseInt(cap_lastupdtdt.attribute("top")) + 3 + addTop;
  565. ipt_lastupdtdt.attribute("top") = parseInt(cap_lastupdtdt.attribute("top")) + 3 + addTop;
  566. txt_memo.attribute("top") = parseInt(cap_memo.attribute("top")) + addTop;
  567. txt_memo.attribute("height") = parseInt(cap_memo.attribute("height")) -1;
  568. model.toggle("cpmaster");
  569. ipt_cpaprvno.disabled = false;
  570. //ipt_fcstinhospdayno.disabled = false;
  571. ipt_stepnm.attribute("width") = 83;
  572. cap_stepmemo.attribute("left") = 524;
  573. tar_stepmemo.attribute("left") = 607;
  574. cap_day.attribute("left") = "988px";
  575. ipt_times.visible = true;
  576. ipt_times.disabled = false;
  577. cmb_stepnm.visible = true;
  578. ipt_times_old.visible = false;
  579. ipt_swimlineno.disabled = true;
  580. btn_attr.visible = false;
  581. btn_mntrorder.visible = false;
  582. btn_essprcpinfo.visible = false;
  583. ivw_outline.model.setValue("/root/main/outlineinfo/info/cpgflagcd", "W");
  584. } else { //CPG
  585. cpgFlagNM = "CPG";
  586. setTypeCd = "G";
  587. //스위치 위에 입력컨트롤을 올림
  588. cmb_cpgorddeptcd.attribute("top") = addTop + 25;
  589. ipt_cpgorddeptcd.attribute("top") = addTop + 25;
  590. ipt_cpgorddeptnm.attribute("top") = addTop + 25;
  591. btn_getdept.attribute("top") = addTop + 25;
  592. grp_cpgorddeptinfo.attribute("top") = addTop + 48; //진료과 멀티 선택 팝업
  593. ipt_fcstinhospdayno.attribute("top") = addTop + 50;
  594. ipt_fcstinhospdayno.attribute("left") = parseInt(cap_fcstinhospdayno2.attribute("left")) + parseInt(cap_fcstinhospdayno2.attribute("width")) + 2;
  595. ipt_swimlineno.attribute("top") = addTop + 50;
  596. ipt_swimlineno.attribute("left") = parseInt(cap_swimlineno2.attribute("left")) + parseInt(cap_swimlineno2.attribute("width")) + 2;
  597. ipt_cretdd.attribute("top") = parseInt(cap_cretdd2.attribute("top")) + addTop;
  598. ipt_appdd.attribute("top") = parseInt(cap_appdd2.attribute("top")) + addTop;
  599. ipt_todd.attribute("top") = parseInt(cap_todd2.attribute("top")) + addTop;
  600. ipt_lastupdtdt.attribute("top") = parseInt(cap_lastupdtdt2.attribute("top")) + addTop;
  601. cmb_reqrlist.attribute("top") = parseInt(cap_reqrlist2.attribute("top")) + addTop;
  602. btn_srchreqr.attribute("top") = parseInt(cap_reqrlist2.attribute("top")) + addTop + 3;
  603. btn_delreqr.attribute("top") = parseInt(cap_reqrlist2.attribute("top")) + addTop + 3;
  604. ipt_lastupdtdt.attribute("top") = parseInt(cap_lastupdtdt2.attribute("top")) + 3 + addTop;
  605. ipt_lastupdtdt.attribute("top") = parseInt(cap_lastupdtdt2.attribute("top")) + 3 + addTop;
  606. txt_memo.attribute("top") = parseInt(cap_memo2.attribute("top")) + addTop;
  607. txt_memo.attribute("height") = parseInt(cap_memo2.attribute("height")) -1;
  608. model.toggle("cpgmaster");
  609. ipt_cpaprvno.disabled = true;
  610. //ipt_fcstinhospdayno.disabled = true;
  611. /*
  612. ipt_stepnm.attribute("width") = 83 + 93;
  613. cap_stepmemo.attribute("left") = 524 + 93;
  614. tar_stepmemo.attribute("left") = 607 + 93;
  615. cap_day.attribute("left") = "1082px";
  616. ipt_times.visible = false;
  617. ipt_times.disabled = true;
  618. cmb_stepnm.visible = false;
  619. ipt_times_old.visible = true;
  620. ipt_times_old.disabled = true;
  621. */
  622. ipt_swimlineno.disabled = false;
  623. btn_attr.visible = true;
  624. //CP와 동일하게 변경 (2010.06.25)
  625. ipt_times.visible = true;
  626. ipt_times.disabled = false;
  627. cmb_stepnm.visible = true;
  628. ipt_times_old.visible = false;
  629. btn_essprcpinfo.visible = true;
  630. ivw_outline.model.setValue("/root/main/outlineinfo/info/cpgflagcd", "G");
  631. //입력된 평가명이 있으면 버튼명에서 *을 제외시킴
  632. if( !isNull(model.getValue("/root/main/masterinfo/info/valunm")) ){
  633. btn_valunm.attribute("text") = "평가명";
  634. btn_valunm.refresh();
  635. }
  636. }
  637. if( settingYN == "OP" ){ //2008.06.24(전지은) 신규로 open(saveflag=OP일 경우) or 메뉴를 통한 화면 open 시 초기값을 설정, 조회한 경우는 초기값 셋팅 필요 없음
  638. var today = getCurrentDate();
  639. model.setValue("/root/main/masterinfo/info/lastupdtdt", today); //최종수정일
  640. model.setValue("/root/main/masterinfo/info/cretdd", today); //생성일
  641. model.setValue("/root/main/masterinfo/info/todd", "99991231"); //종료일
  642. model.setValue("/root/main/masterinfo/info/rgstrid", getUserId());
  643. model.setValue("/root/main/masterinfo/info/rgstrnm", getUserName());
  644. ipt_lastupdtdt.refresh();
  645. ipt_todd.refresh();
  646. ipt_cretdd.refresh();
  647. ipt_appdd.refresh();
  648. ipt_rgstrnm.refresh();
  649. }
  650. //요청번호:1580 진료과 grid 추가
  651. fCngCpgType("D");
  652. //start: [요청번호: 11937] 마스터 권한 정보에 따라 컨트롤 활성화 여부 설정 (2010.03.26 JJE)
  653. if( model.getValue("/root/temp/getdata/authflag") == "M" ){
  654. var jobKindCd = getUserInfo("jobkindcd"); //직종코드(0330:의사, 0332:치과의사)
  655. var dutPlceCd = getUserInfo("dutplcecd"); //근무부서
  656. var authCnt = 0;
  657. var tmp_cpgFlagCd = model.getValue("/root/main/masterinfo/info/cpgflagcd");
  658. if( !isNull(model.getValue("/root/init/cpgmasterlist/hardcd[hardcd='" + dutPlceCd + "' or hardcd='" + jobKindCd + "']/hardcd")) ){
  659. authCnt++;
  660. tmp_cpgFlagCd = "02";
  661. }
  662. if( !isNull(model.getValue("/root/init/cpmasterlist/hardcd[hardcd='" + dutPlceCd + "' or hardcd='" + jobKindCd + "']/hardcd")) ){
  663. authCnt++;
  664. tmp_cpgFlagCd = "01";
  665. }
  666. //CP/CPG 둘 중 하나의 권한만 존재할 경우 blocking (2010.03.29 JJE)
  667. if( authCnt < 2 ){
  668. model.setValue("/root/main/masterinfo/info/cpgflagcd", tmp_cpgFlagCd);
  669. rdo_cpgflagcd.refresh();
  670. rdo_cpgflagcd.disabled = true;
  671. }
  672. //의사가 마스터 권한 있을 경우, 근무지부서로만 등록 가능하도록 blocking
  673. if( jobKindCd == "0330" || jobKindCd == "0332" || jobKindCd == "9930" ){
  674. model.setValue("/root/main/masterinfo/info/cpgorddeptcd", dutPlceCd);
  675. cmb_cpgorddeptcd.refresh();
  676. cmb_cpgorddeptcd.disabled = true;
  677. //btn_getdept.disabled = true;
  678. }
  679. }
  680. //end
  681. }
  682. /**
  683. * @group :
  684. * @ver : 2007.07
  685. * @by : 전지은
  686. * @---------------------------------------------------
  687. * @type : function
  688. * @access : public
  689. * @desc : 화면 open시와 공통적인 컨트롤 초기화 (셋팅)
  690. * @param :
  691. * @return :
  692. * @---------------------------------------------------
  693. */
  694. function fInitializeCtrl() {
  695. //새이름 입력받는 작은 인풋 팝업 위치 및 visible 상태 초기화
  696. grp_inputcpname.attribute("left") = 86;
  697. grp_inputcpname.attribute("width") = 265;
  698. grp_inputcpname.attribute("top") = 70;
  699. grp_inputcpname.attribute("height") = 0; //visible 대신 사이즈 조정으로 컨트롤하므로 초기에는 0
  700. grp_inputcpname.refresh();
  701. //평가명 입력받는 작은 인풋 팝업 위치 및 visible 상태 초기화
  702. grp_inputvalunm.attribute("left") = 86;
  703. grp_inputvalunm.attribute("width") = 265;
  704. grp_inputvalunm.attribute("top") = 127;
  705. grp_inputvalunm.attribute("height") = 0; //visible 대신 사이즈 조정으로 컨트롤하므로 초기에는 0
  706. grp_inputvalunm.refresh();
  707. }
  708. /**
  709. * @group :
  710. * @ver : 2007.07
  711. * @by : 전지은
  712. * @---------------------------------------------------
  713. * @type : function
  714. * @access : public
  715. * @desc : 새이름으로 저장 - 이름입력후 확인 버튼 클릭 시 처리
  716. * @param :
  717. * @return :
  718. * @---------------------------------------------------
  719. */
  720. function fSettingNewNameCp(){
  721. var cpgno = model.getValue("/root/main/masterinfo/info/cpgno");
  722. var ver = parseInt(model.getValue("/root/main/masterinfo/info/cpghistseq"));
  723. var tmpyn = model.getValue("/root/main/masterinfo/info/tmpyn"); //임시(미등록) 여부
  724. var indxno = model.getValue("/root/temp/getdata/indxno");
  725. var supindxno = "";
  726. var indxrefseq = model.getValue("/root/temp/getdata/indxrefseq");
  727. var indxseq = model.getValue("/root/temp/getdata/indxseq");
  728. var no = model.getValue("/root/temp/getdata/cpgno");
  729. var nm = model.getValue("/root/temp/getdata/cpgnm");
  730. model.setValue("/root/temp/oldcpgno", cpgno);
  731. model.setValue("/root/temp/oldcpghistseq", ver);
  732. model.setValue("/root/temp/oldtmpyn", tmpyn);
  733. model.setValue("/root/temp/saveflag", "N");
  734. model.setValue("/root/main/masterinfo/info/tmpyn", "Y");
  735. var selectedDeptNm = cmb_cpgorddeptcd.label;
  736. var selectedDeptCd = cmb_cpgorddeptcd.value;
  737. model.makeValue("/root/send/reqdata/deptnm", selectedDeptNm);
  738. model.makeValue("/root/send/reqdata/deptcd", selectedDeptCd);
  739. model.makeNode("/root/temp/rslt/rstdata");
  740. submit("TRMQP00601", false);
  741. var selectIndxCd = model.getValue("/root/temp/rslt/rstdata/indxno");
  742. var supindxno = selectIndxCd;
  743. model.makeValue("/root/temp/getdata/supindxno", supindxno);
  744. if( (!isNull(selectedDeptNm)) && isNull(selectIndxCd) ) {
  745. model.makeValue("/root/send/reqdata/indxnm", selectedDeptNm );
  746. model.makeValue("/root/send/reqdata/supindxno", "0" ); //상위색인
  747. model.makeValue("/root/send/reqdata/indxrefseq", "0" ); //조회순번
  748. model.makeValue("/root/send/reqdata/status", "i" ); //구분:등록
  749. model.makeValue("/root/send/reqdata/cpgflagcd", cpgFlagCd ); //구분:등록 ("" -> cpgFlagCd 2008.12.05)
  750. model.makeNode("/root/temp/savedfolder");
  751. supindxno = selectIndxCd;
  752. if( submit("TXMMP01501", false) ){ //과 폴더 저장
  753. supindxno = model.getValue("/root/temp/savedfolder/item/indxno");
  754. model.makeValue("/root/temp/getdata/supindxno", supindxno);
  755. }
  756. }
  757. //"m▦indxno▦indxnm▦supindxno▦indxrefseq▦depth▦indxseq▦cpgno▦cpghistseq▦image";
  758. //saveIndxlist = "▩i▦"+indxno+"▦"+nm+"▦"+supindxno+"▦"+indxrefseq+"▦▦"+indxseq+"▦"+no+"▦"+ver+"▦▦"+flag;
  759. model.makeNode("/root/main/indexinfo/item"); //필요 없는 노드(저장 이벤트 시, 그리드의 row 수가 0보다 클때 인덱스를 저장하기때문에 만들어줌)
  760. model.setValue("/root/temp/mstatus", "i");
  761. model.setValue("/root/main/masterinfo/info/cpgno", "");
  762. fSettingStatus();
  763. if ( fSaveCPGInfo() == false ){
  764. //원래 cpgno, cpghistseq를 복원 (2010.05.20 JJE)
  765. model.setValue("/root/main/masterinfo/info/cpgno", cpgno);
  766. model.setValue("/root/main/masterinfo/info/cpghistseq", ver);
  767. model.setValue("/root/main/masterinfo/info/tmpyn", tmpyn);
  768. return false;
  769. }
  770. if(instance1.selectSingleNode("/root/temp/tempnode/prms/newsetno")){
  771. ivw_outline.window.javascript.fSetStepSetNo();
  772. model.resetInstanceNode("/root/temp/tempnode");
  773. }
  774. //if(btn_action_tab.selected == true){
  775. if( ivw_outline.ivw_detail.visible == true && !isNull(cpgno) ){
  776. ivw_outline.ivw_detail.window.javascript.fExePrmsSetInfo("T");
  777. changedYN = "Y";
  778. }
  779. grp_inputcpname.attribute("height") = 0; //grp_inputcpname.visible = false;
  780. grp_biz.disabled = false;
  781. grp_btn.disabled = false;
  782. ivw_outline.disabled = false;
  783. //btn_newnm.disabled = true; //새이름으로 저장 한 후는 미등록상태이므로 새이름으로 버튼 비활성(2008.06.20 LWS)
  784. //closeLoadingBar(); //loading 메세지 닫기
  785. }
  786. /**
  787. * @group :
  788. * @ver : 2007.07
  789. * @by : 전지은
  790. * @---------------------------------------------------
  791. * @type : function
  792. * @access : public
  793. * @desc : 새버전으로/새이름으로 저장 시, 인스턴스의 save flag(m)를 바꿔준다
  794. * @param :
  795. * @return :
  796. * @---------------------------------------------------
  797. */
  798. function fSettingStatus(){
  799. for(var i=1; i<=grd_diag.rows; i++){
  800. if(grd_diag.rowstatus(i) != 4){
  801. grd_diag.rowstatus(i) = 1;
  802. }
  803. }
  804. for(var i=1; i<=grd_op.rows; i++){
  805. if(grd_op.rowstatus(i) != 4){
  806. grd_op.rowstatus(i) = 1;
  807. }
  808. }
  809. for(var i=1; i<=grd_cc.rows; i++){
  810. if(grd_cc.rowstatus(i) != 4){
  811. grd_cc.rowstatus(i) = 1;
  812. }
  813. }
  814. for(var i=1; i<=grd_exclusion.rows; i++){
  815. if(grd_exclusion.rowstatus(i) != 4){
  816. grd_exclusion.rowstatus(i) = 1;
  817. }
  818. }
  819. for(var i=1; i<=grd_drop.rows; i++){
  820. if(grd_drop.rowstatus(i) != 4){
  821. grd_drop.rowstatus(i) = 1;
  822. }
  823. }
  824. var sngNode = instance1.selectSingleNode("/root/main/reqrlist/list/userid");
  825. if(sngNode){
  826. var nodeList = instance1.selectNodes("/root/main/reqrlist/list");
  827. for(var i=0; i<nodeList.length; i++){
  828. var node = nodeList.item(i);
  829. var m = node.selectSingleNode("m");
  830. if( m.text != "d"){
  831. model.setValue(m, "i");
  832. }
  833. }
  834. }
  835. for(var i=1; i<=grd_attfile.rows; i++){ //삭제 컬럼을 제외한 기존파일+추가 파일을 새 버전으로 저장
  836. if(grd_attfile.rowstatus(i) != 4){
  837. grd_attfile.rowstatus(i) = 1;
  838. grd_attfile.valueMatrix(i, 4) = "false"; //삭제를 제외한 기존 파일은 DB에만 copy
  839. }
  840. }
  841. //all step
  842. nodeList = ivw_outline.instance1.selectNodes("/root/main/decisionlist/info");
  843. if(nodeList.length > 0){
  844. //decision step's link info
  845. if(nodeList.length > 0){
  846. for(var i=0; i<nodeList.length; i++){
  847. var node = nodeList.item(i);
  848. var m = node.selectSingleNode("m");
  849. if( m.text != "d"){
  850. model.setValue(m, "i");
  851. }
  852. }
  853. }
  854. }
  855. //마스터 저장 로직 변경 : (기존)모든 프로토콜(setno/settypecd)가 새로 저장 -> 수정된 프로토콜만 새로 저장, 나머지는 동일 프로토콜 번호로 copy (2009.02.19 JJE)
  856. nodeList = ivw_outline.instance1.selectNodes("/root/main/steplist/info");
  857. if(nodeList.length > 0){
  858. //프로토콜 창이 열려있을 때, 변경된 처방(추가/수정/삭제)가 있는 스텝만 set번호를 새로 따기 위해, 해당 스텝만 저장상태(m)을 i로 한다
  859. if( ivw_outline.ivw_detail.visible == true ){
  860. var chgPrcpNode = ivw_outline.ivw_detail.instance1.selectSingleNode("/root/main/prcp/prcplist[status != 'S' and status != '-' and status != '']");
  861. var chgFormNode = ivw_outline.ivw_detail.instance1.selectSingleNode("/root/main/form/forminfo/formlist[status != 'S' and status != '-' and status != '']");
  862. var curNo = model.getValue("/root/main/stepinfo/info/stepno");
  863. if( chgPrcpNode != null || chgFormNode != null ){
  864. m = ivw_outline.instance1.selectSingleNode("/root/main/steplist/info[stepno='"+curNo+"']/m]");
  865. model.setValue(m, "i");
  866. return;
  867. }
  868. }
  869. //프로토콜 수정 없이, 메인뷰어에서 저장이 일어나는 경우도 셋번호를 새로 딸 필요 없이 카피만 하면 되므로 status를 i가 아닌 -로 변경해준다
  870. for(var i=0; i<nodeList.length; i++){
  871. var node = nodeList.item(i);
  872. var m = node.selectSingleNode("m");
  873. if( m.text != "d" && m.text != "i" ){
  874. model.setValue(m, "-");
  875. }
  876. }
  877. }
  878. }
  879. /**
  880. * @group :
  881. * @ver : 2007.07
  882. * @by : 전지은
  883. * @---------------------------------------------------
  884. * @type : function
  885. * @access : public
  886. * @desc : 새버전으로/새이름으로 저장 시, 인스턴스의 save flag(m)를 바꿔준다
  887. * @param :
  888. * @return :
  889. * @---------------------------------------------------
  890. */
  891. function fReturnStatus(){
  892. for(var i=1; i<=grd_diag.rows; i++){
  893. if(grd_diag.rowstatus(i) == 1 && !isNull(model.getValue("/root/main/diaginfo/diaglist[" + i + "]/detlinfoseq")) ){
  894. grd_diag.rowstatus(i) = 0;
  895. }
  896. }
  897. for(var i=1; i<=grd_op.rows; i++){
  898. if(grd_op.rowstatus(i) == 1 && !isNull(model.getValue("/root/main/opinfo/oplist[" + i + "]/detlinfoseq")) ){
  899. grd_op.rowstatus(i) = 0;
  900. }
  901. }
  902. for(var i=1; i<=grd_cc.rows; i++){
  903. if(grd_cc.rowstatus(i) == 1 && !isNull(model.getValue("/root/main/ccinfo/cclist[" + i + "]/detlinfoseq")) ){
  904. grd_cc.rowstatus(i) = 0;
  905. }
  906. }
  907. for(var i=1; i<=grd_exclusion.rows; i++){
  908. if(grd_exclusion.rowstatus(i) == 1 && !isNull(model.getValue("/root/main/exclusion/exclist[" + i + "]/detlinfoseq")) ){
  909. grd_exclusion.rowstatus(i) = 0;
  910. }
  911. }
  912. for(var i=1; i<=grd_drop.rows; i++){
  913. if(grd_drop.rowstatus(i) == 1 && !isNull(model.getValue("/root/main/dropinfo/droplist[" + i + "]/detlinfoseq")) ){
  914. grd_drop.rowstatus(i) = 0;
  915. }
  916. }
  917. var sngNode = instance1.selectSingleNode("/root/main/reqrlist/list/userid");
  918. if(sngNode){
  919. var nodeList = instance1.selectNodes("/root/main/reqrlist/list");
  920. for(var i=0; i<nodeList.length; i++){
  921. var node = nodeList.item(i);
  922. var m = node.selectSingleNode("m");
  923. var seq = node.selectSingleNode("detlinfoseq");
  924. if( m.text != "i" && !isNull(seq.text) ){
  925. model.setValue(m, "");
  926. }
  927. }
  928. }
  929. for(var i=1; i<=grd_attfile.rows; i++){
  930. if(grd_attfile.rowstatus(i) == 1 && model.getValue("/root/main/attfileinfo/attach[" + i + "]/detlinfoseq") != "0" ){
  931. grd_attfile.rowstatus(i) = 0;
  932. grd_attfile.valueMatrix(i, 4) = "true"; //삭제를 제외한 기존 파일은 DB에만 copy
  933. }
  934. }
  935. /*
  936. nodeList = ivw_outline.instance1.selectNodes("/root/main/steplist/info");
  937. if(nodeList.length > 0){
  938. for(var i=0; i<nodeList.length; i++){
  939. var node = nodeList.item(i);
  940. var m = node.selectSingleNode("m");
  941. if( m.text != "d"){
  942. model.setValue(m, "i");
  943. }
  944. }
  945. //decision step's link info
  946. nodeList = ivw_outline.instance1.selectNodes("/root/main/decisionlist/info");
  947. if(nodeList.length > 0){
  948. for(var i=0; i<nodeList.length; i++){
  949. var node = nodeList.item(i);
  950. var m = node.selectSingleNode("m");
  951. if( m.text != "d"){
  952. model.setValue(m, "i");
  953. }
  954. }
  955. }
  956. }*/
  957. }
  958. /**
  959. * @group :
  960. * @ver : 2007.07
  961. * @by : 전지은
  962. * @---------------------------------------------------
  963. * @type : function
  964. * @access : public
  965. * @desc : 새버전 저장 완료 후, 첨부파일, 스텝 서식, 스텝의 약속set 을 새로 insert 한다
  966. * @param :
  967. * @return :
  968. * @---------------------------------------------------
  969. */
  970. function fSaveEtcInfo(){
  971. //ivw_outline.ivw_detail.attribute("src") = "../../../emr/cpgweb/xrw/SPMP01400_STEP처방관리.xrw";
  972. //중간단계 아이뷰어를 통해 모든 스텝의 처방을 저장하도록 한다.
  973. if( ivw_outline.ivw_detail.visible == true){
  974. //선택된 탭의 약속set이나 서식이 바뀐 내용이 있는지 체크 (cpgno와 구cpghistseq 와 함께, 바뀐 내용을 담아서 서브밋을 실행)
  975. ivw_outline.window.javascript.fSaveEtcInfo();
  976. }else{
  977. //모든 스텝의 약속set이나 서식을 저장 (cpgno와 구cpghistseq 를 담아서 서브밋을 실행)
  978. ivw_outline.window.javascript.fSaveEtcInfo();
  979. }
  980. }
  981. /**
  982. * @group :
  983. * @ver : 2007.10
  984. * @by : 전지은
  985. * @---------------------------------------------------
  986. * @type : function
  987. * @access : public
  988. * @desc : 새버전으로/새이름으로 저장 시, 인스턴스의 save flag(m)를 바꿔준다
  989. * @param :
  990. * @return :
  991. * @---------------------------------------------------
  992. */
  993. function fDelCPG(){
  994. /*
  995. if( model.getValue("/root/main/masterinfo/info/cpgno") != "" && model.getValue("/root/main/masterinfo/info/cpghistseq") != "" ) {
  996. model.removeNodeset("/root/send");
  997. model.makeNode("/root/send/masterinfo"); // : MMPGCINF
  998. model.copyNode("/root/send/masterinfo", "/root/main/masterinfo/info");
  999. model.makeValue("/root/send/masterinfo/status", "d");
  1000. model.makeNode("/root/temp/masterinfo/info/cpgno"); //저장 후 새로딴 키값을 얻어올 인스턴스
  1001. model.makeNode("/root/temp/masterinfo/info/cpghistseq"); //저장 후 새로딴 키값을 얻어올
  1002. submit("TXMQP00601");
  1003. }else{
  1004. messageBox("CP/CPG 정보를 찾을수 없어, 삭제할 수", "I004");
  1005. return false;
  1006. }
  1007. */
  1008. //삭제데이터를 만든다.
  1009. model.makeValue("/root/main/delmasterinfo/delcpgno" , model.getValue("/root/main/masterinfo/info/cpgno"));
  1010. model.makeValue("/root/main/delmasterinfo/delcpghistseq" , model.getValue("/root/main/masterinfo/info/cpghistseq"));
  1011. model.makeValue("/root/main/delmasterinfo/delcpgflagcd" , cpgFlagCd);
  1012. }
  1013. /**
  1014. * @group :
  1015. * @ver : 2007.07
  1016. * @by : 전지은
  1017. * @---------------------------------------------------
  1018. * @type : function
  1019. * @access : public
  1020. * @desc : 색인관리 화면을 펼쳤다가 닫는다.
  1021. * @param :
  1022. * @return :
  1023. * @---------------------------------------------------
  1024. */
  1025. function fIndxMngt(){
  1026. var cpgno = model.getValue("/root/main/masterinfo/info/cpgno");
  1027. var cpghistseq = model.getValue("/root/main/masterinfo/info/cpghistseq");
  1028. var cpgnm = model.getValue("/root/main/masterinfo/info/cpgnm");
  1029. //model.removeNodeset("/root/temp/getdata");
  1030. //새로 등록하는 상황이라면, 선택한 CP 진료과가 색인에 존재하는지를 파악한 후, 없다면 MMPHCIDX 에 insert
  1031. var selectedDeptNm = cmb_cpgorddeptcd.label;
  1032. var selectedDeptCd = cmb_cpgorddeptcd.value;
  1033. if( !isNull(selectedDeptCd) ){
  1034. model.makeValue("/root/send/reqdata/deptnm", selectedDeptNm);
  1035. model.makeValue("/root/send/reqdata/deptcd", selectedDeptCd);
  1036. model.makeNode("/root/temp/rslt/rstdata");
  1037. submit("TRMQP00601", false); //조회결과 : 동일한 색인이 존재하면 존재하는 "색인명", "색인번호", 존재하지 않으면 ""
  1038. var selectIndxCd = model.getValue("/root/temp/rslt/rstdata/indxno");
  1039. if( (!isNull(selectedDeptNm)) && isNull(selectIndxCd) ) {
  1040. model.removeNodeset("/root/send/reqdata");
  1041. model.makeValue("/root/send/reqdata/indxnm", selectedDeptNm );
  1042. model.makeValue("/root/send/reqdata/supindxno", "0" ); //상위색인
  1043. model.makeValue("/root/send/reqdata/indxrefseq", "0" ); //조회순번
  1044. model.makeValue("/root/send/reqdata/status", "i" ); //구분:등록
  1045. model.makeValue("/root/send/reqdata/cpgflagcd", "" ); //구분:등록
  1046. model.makeNode("/root/temp/getdata/savedfolder");
  1047. //ivw_indxmngt.window.javascript.submit("TXMMP01501");
  1048. }
  1049. model.makeValue("/root/temp/getdata/cpgflagcd", cpgFlagCd);
  1050. model.makeValue("/root/temp/getdata/cpgnm", cpgnm);
  1051. model.makeValue("/root/temp/getdata/selectIndxNm", selectedDeptNm);
  1052. model.makeValue("/root/temp/getdata/selectIndxCd", selectIndxCd);
  1053. model.makeValue("/root/temp/getdata/cpgno", cpgno);
  1054. model.makeValue("/root/temp/getdata/cpghistseq", cpghistseq);
  1055. }else{
  1056. model.makeValue("/root/temp/getdata/cpgflagcd", "ALL");
  1057. }
  1058. var mon = getCurrentMonitorNumber();
  1059. var mainObj = getMainViewer();
  1060. //mainObj.window.javascript.modal("SPMMP01200", mon, "0", "0", "SPMMP01200", "/root/temp/getdata", "/root/temp/reqdata");
  1061. mainObj.window.javascript.open("SPMMP01200", mon, "0", "0", "SPMMP01200", "/root/temp/getdata", "/root/temp/reqdata");
  1062. button16.selected = false;
  1063. }
  1064. /**
  1065. * @group :
  1066. * @ver : 2007.07
  1067. * @by : 전지은
  1068. * @---------------------------------------------------
  1069. * @type : function
  1070. * @access : public
  1071. * @desc : 저장 시점에서 데이터가 올바르게 입력되었는지 체크한다.
  1072. * @param :
  1073. * @return : ipt_appdd
  1074. * @---------------------------------------------------
  1075. */
  1076. function fSaveDataCheck( kind ){
  1077. if( kind == "master" ){
  1078. // 2008.06.18 pymi (수정) 'ipt_swimlineno' 필수입력제외
  1079. if( cpgFlagCd == "01" ){
  1080. if ( ! isRequiredControls("rdo_cpgflagcd", "ipt_cpgnm", "cmb_cpgorddeptcd", "rdo_ioflagcd", "ipt_fcstinhospdayno", "ipt_todd", "ipt_lastupdtdt", "ipt_cretdd") ) {
  1081. return false;
  1082. }
  1083. if( isNull(model.getValue("/root/main/masterinfo/info/swimlineno")) ){
  1084. model.setValue("/root/main/masterinfo/info/swimlineno", "0");
  1085. }
  1086. }else{
  1087. if ( ! isRequiredControls("rdo_cpgflagcd", "ipt_cpgnm", "cmb_cpgorddeptcd", "rdo_ioflagcd", "cmb_cpgtypecd", "ipt_swimlineno", "ipt_todd", "ipt_lastupdtdt", "ipt_cretdd") ) {
  1088. return false;
  1089. }
  1090. }
  1091. }
  1092. }
  1093. /**
  1094. * @group :
  1095. * @ver : 2007.07
  1096. * @by : 전지은
  1097. * @---------------------------------------------------
  1098. * @type : function
  1099. * @access : public
  1100. * @desc : 조회해 온 그리드의 CODE를 삭제한다.
  1101. * @param :
  1102. * @return :
  1103. * @---------------------------------------------------
  1104. */
  1105. function fDiagCodeDelete() {
  1106. fRowDelete( grd_diag );
  1107. //model.makeValue("/root/main/diaginfo/diaglist[" + grd_diag.row + "]/m", "d");
  1108. }
  1109. /**
  1110. * @group :
  1111. * @ver : 2007.07
  1112. * @by : 전지은
  1113. * @---------------------------------------------------
  1114. * @type : function
  1115. * @access : public
  1116. * @desc : 조회해 온 그리드의 CODE를 삭제한다.
  1117. * @param :
  1118. * @return :
  1119. * @---------------------------------------------------
  1120. */
  1121. function fOpCodeDelete() {
  1122. fRowDelete( grd_op );
  1123. //model.makeValue("/root/main/opinfo/oplist[" + grd_op.row + "]/m", "d");
  1124. }
  1125. /**
  1126. * @group :
  1127. * @ver : 2007.07
  1128. * @by : 전지은
  1129. * @---------------------------------------------------
  1130. * @type : function
  1131. * @access : public
  1132. * @desc : 조회해 온 그리드의 CODE를 삭제한다.
  1133. * @param :
  1134. * @return :
  1135. * @---------------------------------------------------
  1136. */
  1137. function fCcCodeDelete() {
  1138. fRowDelete( grd_cc );
  1139. //model.makeValue("/root/main/ccinfo/cclist[" + grd_cc.row + "]/m", "d");
  1140. }
  1141. /**
  1142. * @group :
  1143. * @ver : 2007.12
  1144. * @by : 전지은
  1145. * @---------------------------------------------------
  1146. * @type : function
  1147. * @access : public
  1148. * @desc : 조회해 온 그리드의 CODE를 삭제한다.
  1149. * @param :
  1150. * @return :
  1151. * @---------------------------------------------------
  1152. */
  1153. function fExcCodeDelete() {
  1154. fRowDelete( grd_exclusion );
  1155. //model.makeValue("/root/main/exclusion/exclist[" + grd_exclusion.row + "]/m", "d");
  1156. }
  1157. /**
  1158. * @group :
  1159. * @ver : 2008.06.20
  1160. * @by : 임우성
  1161. * @---------------------------------------------------
  1162. * @type : function
  1163. * @access : public
  1164. * @desc : 조회해 온 그리드의 CODE를 삭제한다.(Drop)
  1165. * @param :
  1166. * @return :
  1167. * @---------------------------------------------------
  1168. */
  1169. function fDropCodeDelete() {
  1170. fRowDelete( grd_drop );
  1171. //model.makeValue("/root/main/exclusion/exclist[" + grd_exclusion.row + "]/m", "d");
  1172. }
  1173. /**
  1174. * @group :
  1175. * @ver : 2007.07
  1176. * @by : 전지은
  1177. * @---------------------------------------------------
  1178. * @type : function
  1179. * @access : public
  1180. * @desc : 그리드의 ROW 데이터 삭제
  1181. * @param : grdName, grdPath
  1182. * @return :
  1183. * @---------------------------------------------------
  1184. */
  1185. function fRowDelete( grdName, grdPath ){
  1186. if( grdPath == null ) {
  1187. grdPath = grdName.nodeset;
  1188. }
  1189. if(grdName.row < 1){
  1190. return;
  1191. }
  1192. /*
  1193. var status = grdName.rowStatus(grdName.row);
  1194. if(status == 1){
  1195. grdName.deleteRow(grdName.row, true);
  1196. }else{
  1197. grdName.rowStatus(grdName.row)= 4;
  1198. }
  1199. */
  1200. //2008.07.25 선택한 여려건 삭제 처리(JJE)
  1201. var iSelectedRows = grdName.selectedRows;
  1202. var iRow = 0;
  1203. var status = 0;
  1204. var iDetlinfoseq = "";
  1205. for( var i=iSelectedRows-1; i>=0; i-- ){
  1206. iRow = grdName.selectedRow(i);
  1207. status = grdName.rowStatus(iRow);
  1208. iDetlinfoseq = model.getValue( grdPath + "[" + iRow + "]/detlinfoseq" );
  1209. if( iDetlinfoseq == "" ){
  1210. //grdName.deleteRow(iRow);
  1211. model.removenode(grdPath + "[" + iRow + "]");
  1212. }else{
  1213. if(status == 4 ){
  1214. //grdName.rowStatus(iRow) = 0;
  1215. model.setValue( grdPath + "[" + iRow + "]/m", "" );
  1216. }else{
  1217. //grdName.rowStatus(iRow) = 4;
  1218. model.setValue( grdPath + "[" + iRow + "]/m", "d" );
  1219. }
  1220. }
  1221. }
  1222. grdName.refresh();
  1223. fSetRowStatus(grdName, grdPath);
  1224. }
  1225. /**
  1226. * @group :
  1227. * @ver : 2007.07
  1228. * @by : 전지은
  1229. * @---------------------------------------------------
  1230. * @type : function
  1231. * @access : public
  1232. * @desc : 그리드의 Rowstatus 변경
  1233. * @param : grdName
  1234. * @return :
  1235. * @---------------------------------------------------
  1236. */
  1237. function fSetRowStatus(grdName, grdPath){
  1238. for( var i=1; i<grdName.rows; i++ ){
  1239. var iStatus = model.getValue(grdPath + "[" + i + "]/m");
  1240. if( iStatus == "i" ){
  1241. grdName.rowstatus(i) = 1;
  1242. }else if( iStatus == "u" ){
  1243. grdName.rowstatus(i) = 2;
  1244. }else if( iStatus == "d" ){
  1245. grdName.rowstatus(i) = 4;
  1246. }
  1247. }
  1248. grdName.rowHidden(0) = true;
  1249. }
  1250. /**
  1251. * @group :
  1252. * @ver : 2007.07
  1253. * @by : 전지은
  1254. * @---------------------------------------------------
  1255. * @type : function
  1256. * @access : public
  1257. * @desc : 그리드의 ROW 데이터 삭제
  1258. * @param : grdName, grdPath
  1259. * @return :
  1260. * @---------------------------------------------------
  1261. */
  1262. function fResizeGrid( grdNM ){
  1263. var grdCtrl = document.controls(grdNM);
  1264. cap_diag.attribute("font-weight") = "";
  1265. cap_op.attribute("font-weight") = "";
  1266. cap_drop.attribute("font-weight") = "";
  1267. cap_exclusion.attribute("font-weight") = "";
  1268. if( grdNM == oldFlag ){
  1269. //원상복귀
  1270. grd_diag.visible = true;
  1271. grd_op.visible = true;
  1272. grd_drop.visible = true;
  1273. grd_exclusion.visible = true;
  1274. line10.visible = true;
  1275. line12.visible = true;
  1276. line19.visible = true;
  1277. if(grdNM == "grd_diag"){
  1278. grd_diag.attribute("top") = grd_diag_attribute_top; //107 - 81
  1279. }else if(grdNM == "grd_op"){
  1280. grd_op.attribute("top") = grd_op_attribute_top;
  1281. }else if(grdNM == "grd_drop"){
  1282. grd_drop.attribute("top") = grd_drop_attribute_top;
  1283. }else if(grdNM == "grd_exclusion"){
  1284. grd_exclusion.attribute("top") = grd_exclusion_attribute_top;
  1285. }
  1286. grdCtrl.attribute("height") = "80px";
  1287. oldFlag = "-";
  1288. }else {
  1289. line10.visible = false;
  1290. line12.visible = false;
  1291. line19.visible = false;
  1292. if( grdNM == "grd_diag" ){
  1293. grd_diag.visible = true;
  1294. grd_op.visible = false;
  1295. grd_drop.visible = false;
  1296. grd_exclusion.visible = false;
  1297. grd_op.attribute("top") = grd_op_attribute_top;
  1298. grd_drop.attribute("top") = grd_drop_attribute_top;
  1299. grd_exclusion.attribute("top") = grd_exclusion_attribute_top;
  1300. grd_op.attribute("height") = "80px";
  1301. grd_drop.attribute("height") = "80px";
  1302. grd_exclusion.attribute("height") = "80px";
  1303. cap_diag.attribute("font-weight") = "bold";
  1304. }else if( grdNM == "grd_op" ){
  1305. grd_diag.visible = false;
  1306. grd_op.visible = true;
  1307. grd_drop.visible = false;
  1308. grd_exclusion.visible = false;
  1309. grd_diag.attribute("top") = grd_diag_attribute_top;
  1310. grd_drop.attribute("top") = grd_drop_attribute_top;
  1311. grd_exclusion.attribute("top") = grd_exclusion_attribute_top;
  1312. grd_diag.attribute("height") = "80px";
  1313. grd_drop.attribute("height") = "80px";
  1314. grd_exclusion.attribute("height") = "80px";
  1315. cap_op.attribute("font-weight") = "bold";
  1316. }else if( grdNM == "grd_drop" ){
  1317. grd_diag.visible = false;
  1318. grd_op.visible = false;
  1319. grd_drop.visible = true;
  1320. grd_exclusion.visible = false;
  1321. grd_diag.attribute("top") = grd_diag_attribute_top;
  1322. grd_op.attribute("top") = grd_op_attribute_top;
  1323. grd_exclusion.attribute("top") = grd_exclusion_attribute_top;
  1324. grd_diag.attribute("height") = "80px";
  1325. grd_op.attribute("height") = "80px";
  1326. grd_exclusion.attribute("height") = "80px";
  1327. cap_drop.attribute("font-weight") = "bold";
  1328. }else if( grdNM == "grd_exclusion" ){
  1329. grd_diag.visible = false;
  1330. grd_op.visible = false;
  1331. grd_drop.visible = false;
  1332. grd_exclusion.visible = true;
  1333. grd_diag.attribute("top") = grd_diag_attribute_top;
  1334. grd_op.attribute("top") = grd_op_attribute_top;
  1335. grd_drop.attribute("top") = grd_drop_attribute_top;
  1336. grd_diag.attribute("height") = "80px";
  1337. grd_op.attribute("height") = "80px";
  1338. grd_drop.attribute("height") = "80px";
  1339. cap_exclusion.attribute("font-weight") = "bold";
  1340. }
  1341. grdCtrl.attribute("top") = grd_diag_attribute_top;
  1342. grdCtrl.attribute("height") = "338px";
  1343. oldFlag = grdNM;
  1344. }
  1345. }
  1346. /**
  1347. * @group :
  1348. * @ver : 2009.02. 26
  1349. * @by : 김영학
  1350. * @---------------------------------------------------
  1351. * @type : function
  1352. * @access : public
  1353. * @desc : 그리드의 넓이 확장
  1354. * @param : grdNM
  1355. * @return :
  1356. * @---------------------------------------------------
  1357. */
  1358. function fCpgResizeGrid(grdNM) {
  1359. var grdCtrl = document.controls(grdNM);
  1360. caption7.attribute("font-weight") = "";
  1361. caption8.attribute("font-weight") = "";
  1362. caption10.attribute("font-weight") = "";
  1363. caption11.attribute("font-weight") = "";
  1364. caption7.attribute("background-color") = "#cce8ff";
  1365. caption8.attribute("background-color") = "#cce8ff";
  1366. caption10.attribute("background-color") = "#cce8ff";
  1367. caption11.attribute("background-color") = "#cce8ff";
  1368. if( grdNM == cpgOldFlag ){
  1369. //원상복귀
  1370. grd_listsrch.visible = true;
  1371. grd_patchk.visible = true;
  1372. grd_popup.visible = true;
  1373. grd_limitime.visible = true;
  1374. line16.visible = true;
  1375. line17.visible = true;
  1376. line20.visible = true;
  1377. //if(grdNM == "grd_listsrch"){
  1378. grd_listsrch.attribute("top") = "73px"
  1379. grd_listsrch.attribute("height") = "98px";
  1380. // }else if(grdNM == "grd_patchk"){
  1381. grd_patchk.attribute("top") = "174px"
  1382. grd_patchk.attribute("height") = "98px";
  1383. // }else if(grdNM == "grd_popup"){
  1384. grd_popup.attribute("top") = "275px"
  1385. grd_popup.attribute("height") = "98px";
  1386. // }else if(grdNM == "grd_limitime"){
  1387. grd_limitime.attribute("top") = "376px"
  1388. grd_limitime.attribute("height") = "98px";
  1389. // }
  1390. cpgOldFlag = "-";
  1391. } else {
  1392. line16.visible = false;
  1393. line17.visible = false;
  1394. line20.visible = false;
  1395. if( grdNM == "grd_listsrch" ){
  1396. grd_listsrch.visible = true;
  1397. grd_patchk.visible = false;
  1398. grd_popup.visible = false;
  1399. grd_limitime.visible = false;
  1400. caption7.attribute("background-color") = "#99ccff";
  1401. caption7.attribute("font-weight") = "bold";
  1402. } else if( grdNM == "grd_patchk" ){
  1403. grd_listsrch.visible = false;
  1404. grd_patchk.visible = true;
  1405. grd_popup.visible = false;
  1406. grd_limitime.visible = false;
  1407. caption8.attribute("background-color") = "#99ccff";
  1408. caption8.attribute("font-weight") = "bold";
  1409. } else if( grdNM == "grd_popup" ){
  1410. grd_listsrch.visible = false;
  1411. grd_patchk.visible = false;
  1412. grd_popup.visible = true;
  1413. grd_limitime.visible = false;
  1414. caption10.attribute("background-color") = "#99ccff";
  1415. caption10.attribute("font-weight") = "bold";
  1416. } else if( grdNM == "grd_limitime" ){
  1417. grd_listsrch.visible = false;
  1418. grd_patchk.visible = false;
  1419. grd_popup.visible = false;
  1420. grd_limitime.visible = true;
  1421. caption11.attribute("background-color") = "#99ccff";
  1422. caption11.attribute("font-weight") = "bold";
  1423. }
  1424. grdCtrl.attribute("top") = "73px";
  1425. grdCtrl.attribute("height") = "401px";
  1426. cpgOldFlag = grdNM;
  1427. }
  1428. }
  1429. /**
  1430. * @group :
  1431. * @ver : 2007.07
  1432. * @by : 전지은
  1433. * @---------------------------------------------------
  1434. * @type : function
  1435. * @access : public
  1436. * @desc : Outline View 화면의 사이즈를 조정한다.
  1437. * @param :
  1438. * @return :
  1439. * @---------------------------------------------------
  1440. */
  1441. function fSizeControl(){
  1442. var width = ivw_outline.currentStyle.width;
  1443. if(width == "838" || width == "838px" ){
  1444. ivw_outline.attribute("left") = "0px";
  1445. ivw_outline.attribute("width") = "1192px";
  1446. ivw_outline.attribute("height") = "655px";
  1447. ivw_detail.attribute("left") = "0px";
  1448. ivw_detail.attribute("width") = "1192px";
  1449. ivw_detail.attribute("height") = "655px";
  1450. line9.attribute("x2") = "350px"; //0113 355
  1451. cap_attfile.attribute("visibility") = "hidden";
  1452. cap_diag.attribute("visibility") = "hidden";
  1453. grd_diag.attribute("visibility") = "hidden";
  1454. cap_ioflag.attribute("visibility") = "hidden";
  1455. rdo_ioflagcd.attribute("visibility") = "hidden";
  1456. //btn_valumngt.attribute("visibility") = "hidden";
  1457. line20.attribute("visibility") = "hidden";
  1458. cap_outlineinfo.attribute("left") = "5px";
  1459. line8.attribute("x1") = "0px";
  1460. btn_sizecntl.attribute("class") = "icon_right";
  1461. btn_initialize.disabled = true;
  1462. grp_inputcpname.attribute("top") = "19px";
  1463. //뷰어 영역
  1464. ivw_outline.window.javascript.fAdjustLine("allEx", "392");
  1465. ivw_outline.grp_swimline.attribute("width") = "1189px";
  1466. ivw_outline.grp_swimline.refresh();
  1467. ivw_outline.grp_button.attribute("left") = "917px";
  1468. //뷰어-OCS
  1469. var vscrollPos = ivw_outline.grp_swimline.vscroll.attribute("pos");
  1470. var hscrollPos = ivw_outline.grp_swimline.hscroll.attribute("pos");
  1471. ivw_outline.ivw_detail.attribute("top") = vscrollPos;
  1472. ivw_outline.ivw_detail.attribute("left") = hscrollPos;
  1473. //ivw_outline.ivw_detail.attribute("left") = "0px";
  1474. ivw_outline.ivw_detail.attribute("width") = "1192px";
  1475. ivw_outline.ivw_detail.attribute("height") = "655px";
  1476. if( ivw_outline.ivw_detail.ivw_prcp.visible == true ) ivw_outline.ivw_detail.grd_prcplist.attribute("width") = "805px";
  1477. else ivw_outline.ivw_detail.grd_prcplist.attribute("width") = "1190px";
  1478. ivw_outline.ivw_detail.btn_excel.attribute("left") = "1117px";
  1479. ivw_outline.ivw_detail.btn_sizecntl.attribute("left") = "1162px";
  1480. ivw_outline.ivw_detail.btn_sizecntl.visible = true;
  1481. } else {
  1482. ivw_outline.attribute("left") = "355px";
  1483. ivw_outline.attribute("width") = "838px";
  1484. ivw_outline.attribute("height") = "655px";
  1485. ivw_detail.attribute("left") = "355px";
  1486. ivw_detail.attribute("width") = "838px";
  1487. ivw_detail.attribute("height") = "655px";
  1488. line9.attribute("x2") = "350px";
  1489. cap_attfile.attribute("visibility") = "visible";
  1490. cap_diag.attribute("visibility") = "visible";
  1491. grd_diag.attribute("visibility") = "visible";
  1492. cap_ioflag.attribute("visibility") = "visible";
  1493. rdo_ioflagcd.attribute("visibility") = "visible";
  1494. //btn_valumngt.attribute("visibility") = "visible";
  1495. line20.attribute("visibility") = "visible";
  1496. cap_outlineinfo.attribute("left") = "360px";
  1497. line8.attribute("x1") = "355px";
  1498. btn_sizecntl.attribute("class") = "icon_left";
  1499. btn_initialize.disabled = false;
  1500. grp_inputcpname.attribute("top") = "45px";
  1501. //뷰어 영역
  1502. ivw_outline.grp_swimline.attribute("width") = "835px";
  1503. ivw_outline.grp_button.attribute("left") = "557px";
  1504. ivw_outline.window.javascript.fAdjustLine("allRe", "392");
  1505. //뷰어-OCS
  1506. var vscrollPos = ivw_outline.grp_swimline.vscroll.attribute("pos");
  1507. var hscrollPos = ivw_outline.grp_swimline.hscroll.attribute("pos");
  1508. ivw_outline.ivw_detail.attribute("top") = vscrollPos;
  1509. ivw_outline.ivw_detail.attribute("left") = hscrollPos;
  1510. //ivw_outline.ivw_detail.attribute("left") = "0px";
  1511. ivw_outline.ivw_detail.attribute("width") = "835px";
  1512. ivw_outline.ivw_detail.attribute("height") = "653px";
  1513. if( ivw_outline.ivw_detail.ivw_prcp.visible == true )ivw_outline.ivw_detail.grd_prcplist.attribute("width") = "452px"; //ivw_outline.ivw_detail.grd_prcplist.attribute("width") = "580px";
  1514. else ivw_outline.ivw_detail.grd_prcplist.attribute("width") = "837px"; //ivw_outline.ivw_detail.grd_prcplist.attribute("width") = "965px";
  1515. ivw_outline.ivw_detail.btn_excel.attribute("left") = "790px";
  1516. //ivw_outline.ivw_detail.btn_sizecntl.attribute("left") = "807px";
  1517. ivw_outline.ivw_detail.btn_sizecntl.attribute("class") = "icon_left";
  1518. ivw_outline.ivw_detail.btn_formsrch.visible = false;
  1519. ivw_outline.ivw_detail.btn_consultsrch.visible = false;
  1520. ivw_outline.ivw_detail.btn_sizecntl.visible = false;
  1521. }
  1522. fRefreshOutline();
  1523. }
  1524. /**
  1525. * @group :
  1526. * @ver : 2009.02
  1527. * @by : 전지은
  1528. * @---------------------------------------------------
  1529. * @type : function
  1530. * @access : public
  1531. * @desc : Outline View의 컨트롤 재생성한다. (refresh)
  1532. * @param :copyYN (mainViewer의 steplist를 outlineViewer의 steplist로 copy할 지 여부)
  1533. * @return :
  1534. * @---------------------------------------------------
  1535. */
  1536. function fRefreshOutline(copyYN){
  1537. if( isNull(copyYN) ) copyYN = "N";
  1538. if(copyYN == "Y"){
  1539. copyNodesetType("/root/main/steplist", "/root/main/steplist", "replace", ivw_outline.model, model);
  1540. }
  1541. //2008.07 (JJE) 사이즈 변경 시, 이전에 선택되었던 컨트롤을 알아두었다가, 컨트롤 remove-create 후, 다시 선택 및 색상 변경 처리 => 오류 수정
  1542. var currentStep = null;
  1543. if( ivw_outline.window.javascript.currentStepCntl != null ){
  1544. currentStep = ivw_outline.window.javascript.currentStepCntl.attribute("id");
  1545. if(currentStep.substr(0, 15) == "xforms:textarea"){
  1546. currentStep = ivw_outline.window.javascript.currentStepCntl.parent.attribute("id");
  1547. }
  1548. }
  1549. ivw_outline.window.javascript.fCreateControl();
  1550. if( currentStep != null ){
  1551. //크게보기/작게보기 모드 변경시, 선택돼있던 스텝의 포커스를 잃는 문제점을 처리한다
  1552. ivw_outline.window.javascript.fChildrenCtrlToSelCtrl(currentStep);
  1553. ivw_outline.window.javascript.currentStepCntl = ivw_outline.document.controls(currentStep);
  1554. ivw_outline.window.javascript.fChangeSelectCntl("#A683B1", ivw_outline.window.javascript.currentStepCntl);
  1555. }
  1556. //alert( "currentStepCntl = " + ivw_outline.window.javascript.currentStepCntl.attribute("id") );
  1557. }
  1558. /**
  1559. * @group :
  1560. * @ver : 2007.07
  1561. * @by : 전지은
  1562. * @---------------------------------------------------
  1563. * @type : function
  1564. * @access : public
  1565. * @desc : FPT 서버에 저장한 파일을 다운로드 한다.
  1566. * @param : idx
  1567. * @return :
  1568. * @---------------------------------------------------
  1569. */
  1570. function fDownLoadFile( idx ){
  1571. model.makeNode("/root/temp/attachfile/filedata");
  1572. var filepath = model.getValue("/root/main/attfileinfo/attach["+idx+"]/file");
  1573. var filenm = model.getValue("/root/main/attfileinfo/attach["+idx+"]/attfilenm");
  1574. var localfile = window.fileDialog("save","|",false,filenm,"","All Files(*.*)|*.*");
  1575. if (localfile != "") {
  1576. model.download(getActionURL("TRMQP00605")+"&filepath="+filepath,localfile);
  1577. var rtn = messageBox("파일을", "Q004");
  1578. if( rtn == 6 ) {
  1579. window.exec(localfile);
  1580. }
  1581. }
  1582. }
  1583. /**
  1584. * @group :
  1585. * @ver : 2007.07
  1586. * @by : 전지은
  1587. * @---------------------------------------------------
  1588. * @type : function
  1589. * @access : public
  1590. * @desc : 아웃라인뷰어에 스윔라인 구조를 생성한다.
  1591. * @param :
  1592. * @return :
  1593. * @---------------------------------------------------
  1594. */
  1595. function fCreateOutLineView(){
  1596. var lineNo = model.getValue("/root/main/masterinfo/info/swimlineno");
  1597. //아웃라인을 셋팅한다.
  1598. if(ivw_outline.model.getValue("/root/main/outlineinfo/info/swimlineno") != "" || ivw_outline.model.getValue("/root/main/outlineinfo/info/swimlineno") != 0){
  1599. ivw_outline.window.javascript.fOutlineCntlInit();
  1600. }
  1601. ivw_outline.model.setValue("/root/main/outlineinfo/info/swimlineno", lineNo);
  1602. ivw_outline.model.setValue("/root/main/outlineinfo/info/cpgorddeptcd", model.getValue("/root/main/masterinfo/info/cpgorddeptcd"));
  1603. /*if(model.getValue("/root/main/masterinfo/info/cpgflagcd") == "01"){
  1604. ivw_outline.model.setValue("/root/main/outlineinfo/info/cpgflagcd", "W");
  1605. }else{
  1606. ivw_outline.model.setValue("/root/main/outlineinfo/info/cpgflagcd", "G");
  1607. }*/
  1608. ivw_outline.model.setValue("/root/main/outlineinfo/info/cpgno", model.getValue("/root/main/masterinfo/info/cpgno"));
  1609. ivw_outline.model.setValue("/root/main/outlineinfo/info/cpghistseq", model.getValue("/root/main/masterinfo/info/cpghistseq"));
  1610. ivw_outline.model.setValue("/root/main/outlineinfo/info/cpgnm", model.getValue("/root/main/masterinfo/info/cpgnm"));
  1611. ivw_outline.window.javascript.fInitialize();
  1612. /*
  1613. if(아웃라인에서 1건 이상이라도 저장된 데이터가 있다면) {
  1614. alert("Step 정보가 저장되었습니다. 모든 Step을 삭제하시겠습니까?");
  1615. }
  1616. */
  1617. }
  1618. /**
  1619. * @group :
  1620. * @ver : 2008.06
  1621. * @by : 전지은
  1622. * @---------------------------------------------------
  1623. * @type : function
  1624. * @access : public
  1625. * @desc : 동일한 CP/CPG명이 있는지 check (사용 안함)
  1626. * @param :
  1627. * @return :
  1628. * @---------------------------------------------------
  1629. */
  1630. function fCheckSameCPGYN(){
  1631. model.removeNodeset("/root/send/masterinfo");
  1632. model.makeNode("/root/send/masterinfo");
  1633. model.copyNode("/root/send/masterinfo", "/root/main/masterinfo/info");
  1634. model.setValue("/root/send/masterinfo/cpgnm" , model.getValue("/root/main/masterinfo/info/orgcpgnm"));
  1635. model.makeValue("/root/send/masterinfo/cpgorddeptnm" , cmb_cpgorddeptcd.label);
  1636. if( ivw_outline.instance1.selectSingleNode("/root/main/steplist/info[times='0']/times") != null ){
  1637. model.makeValue("/root/send/masterinfo/times", "0");
  1638. }else if( ivw_outline.instance1.selectSingleNode("/root/main/steplist/info[times='1']/times") != null ){
  1639. model.makeValue("/root/send/masterinfo/times", "1");
  1640. }
  1641. if( !submit("TRMQP00603", false) ){
  1642. if( instance1.selectSingleNode("/root/temp/rslt/rstdata/cpgno") != null ){
  1643. var msg = messageBox("이미 " + deptNM + "에 '" + cpgFlagNM + "'가(이) 존재합니다. \n 덮어쓰기", "S003", "이름을 변경하려면");
  1644. /*
  1645. if (msg == "6"){
  1646. }else{
  1647. }*/
  1648. return;
  1649. }
  1650. }else{
  1651. return false;
  1652. }
  1653. //★ 조회 결과가 있을 경우, 질문 ( 덮어쓰기? or 이름바꾸기 ) 처리 예정
  1654. }
  1655. /**
  1656. * @group :
  1657. * @ver : 2007.07
  1658. * @by : 전지은
  1659. * @---------------------------------------------------
  1660. * @type : function
  1661. * @access : public
  1662. * @desc : 마스터 및 디테일, 인덱스 정보를 저장한다.
  1663. * @param :
  1664. * @return :
  1665. * @---------------------------------------------------
  1666. */
  1667. function fSaveCPGInfo(){
  1668. //if( fSaveDataCheck( "master" ) == true ) {
  1669. model.removeNodeset("/root/send");
  1670. model.removeNodeset("/root/temp/masterinfo");
  1671. model.makeNode("/root/temp/masterinfo");
  1672. model.resetInstanceNode("/root/temp/tempnode");
  1673. model.removeNodeset("/root/temp/rslt/rstdata");
  1674. if( model.getValue("/root/main/masterinfo/info/cpgno") == "" ) {
  1675. model.setValue("/root/temp/mstatus", "i");
  1676. }
  1677. /*
  1678. //마스터를 update 치면, 이력관리 시 문제가 있으므로, 이전이력은 최종이력여부=N으로 두고, insert 한다
  1679. else if ( model.getValue("/root/temp/mstatus") != "i" && model.getValue("/root/main/masterinfo/info/cpgno") != "" && !fCompareNodes("/root/main/masterinfo/info", "/root/temp/copynodeset/masterinfo/info" ) ){
  1680. model.setValue("/root/temp/mstatus", "u");
  1681. }*/
  1682. var saveStatus = model.getValue("/root/temp/mstatus");
  1683. var selectedDeptNm = cmb_cpgorddeptcd.label;
  1684. var selectedDeptCd = cmb_cpgorddeptcd.value;
  1685. if( saveStatus == "i"){
  1686. if( model.getValue("/root/temp/saveflag") == "N" ){ //새이름으로
  1687. model.setValue("/root/main/masterinfo/info/cpghistseq", ""); //2007.10.16 새이름 저장 : 임시저장으로 고침
  1688. model.setValue("/root/main/masterinfo/info/appdd", ""); //적용일
  1689. model.setValue("/root/main/masterinfo/info/todd", "99991231"); //종료일
  1690. model.setValue("/root/main/masterinfo/info/cretdd", getCurrentDate()); //생성일
  1691. //@@@CPG인 경우 새이름으로 저장 시 속성도 copy as...
  1692. var scrnNodeList = instance1.selectNodes("/root/main/scrninfo/mntrlist");
  1693. var mntrNodeList = instance1.selectNodes("/root/main/mntrinfo/mntrlist");
  1694. var inqrNodeList = instance1.selectNodes("/root/main/inqrinfo/inqrheader");
  1695. var limtNodeList = instance1.selectNodes("/root/main/limtminfo/limheaderinfo");
  1696. if(scrnNodeList.length > 0) model.makeValue("/root/send/mntrlist/scrnstatus", "I");
  1697. if(mntrNodeList.length > 0) model.makeValue("/root/send/mntrinfo/mntrstatus", "I");
  1698. if(inqrNodeList.length > 0) model.makeValue("/root/send/inqrinfo/inqrstatus", "I");
  1699. if(limtNodeList.length > 0) model.makeValue("/root/send/limtinfo/limtstatus", "I");
  1700. }
  1701. //2008.07.17 pymi
  1702. if(ipt_cpaprvno.value == "승인번호") ipt_cpaprvno.value = "";
  1703. /*
  1704. // oldcpgno, oldcpghistseq가 있으므로 필요가 없을 듯
  1705. if( model.getValue("/root/temp/saveflag") == "S" ){ //등록
  1706. if( instance1.selectSingleNode("/root/main/delmasterinfo/delcpgno") != null ){
  1707. model.makeNode("/root/send/delmasterinfo");
  1708. model.copyNode("/root/send/delmasterinfo", "/root/main/delmasterinfo");
  1709. //바로 main 초기화
  1710. model.removeNodeset("/root/main/delmasterinfo");
  1711. model.makeNode("/root/main/delmasterinfo");
  1712. }
  1713. }
  1714. */
  1715. }
  1716. model.makeNode("/root/send/masterinfo"); // : MMPGCINF
  1717. model.makeNode("/root/send/termlist"); // : MMPDDETL
  1718. model.makeNode("/root/send/reqrlist"); // : MMPDDETL
  1719. model.makeNode("/root/send/exclusionlist"); // : MMPDDETL
  1720. model.makeNode("/root/send/deptlist"); // : MMPDDETL (multi 진료과인 경우만 들어감)
  1721. //2008.06.20 LWS
  1722. model.makeNode("/root/send/droplist"); // : MMPDDETL
  1723. model.makeNode("/root/send/deptlist"); // : MMPDDETL
  1724. model.copyNode("/root/send/masterinfo", "/root/main/masterinfo/info");
  1725. model.makeNode("/root/temp/masterinfo/info/cpgno"); //저장 후 새로딴 키값을 얻어올 인스턴스
  1726. model.makeNode("/root/temp/masterinfo/info/cpghistseq"); //저장 후 새로딴 키값을 얻어올 인스턴스
  1727. //model.makeValue("/root/send/masterinfo/todd", model.getValue("/root/main/masterinfo/info/todd")); //이전cp이력순번 2009.04.13 막음
  1728. model.makeValue("/root/send/masterinfo/status", model.getValue("/root/temp/mstatus"));
  1729. model.makeValue("/root/send/masterinfo/oldcpgno", model.getValue("/root/temp/oldcpgno")); //이전cp번호
  1730. model.makeValue("/root/send/masterinfo/oldcpghistseq", model.getValue("/root/temp/oldcpghistseq")); //이전cp이력순번
  1731. model.makeValue("/root/send/masterinfo/oldtmpyn", model.getValue("/root/temp/oldtmpyn")); //이전cp의 임시여부
  1732. model.makeValue("/root/send/masterinfo/saveflag", model.getValue("/root/temp/saveflag")); //이전cp이력순번
  1733. model.makeValue("/root/send/masterinfo/ocssaveyn", OcsSaveYN); //이전cp이력순번
  1734. //원 처방명을 가져간다
  1735. if( model.getValue("/root/main/masterinfo/info/orgcpgnm") == "" || model.getValue("/root/temp/saveflag") == "N" ){ //orgcpgnm 인스턴스가 비어있는 경우 : 최초 저장 (현재 보이는 CP명을 copy)
  1736. //orgcpgnm 인스턴스가 비어있는 경우 : 최초 저장 (현재 보이는 CP명을 copy)
  1737. model.setValue( "/root/send/masterinfo/cpgnm", model.getValue("/root/main/masterinfo/info/cpgnm") );
  1738. }else{ //orgcpgnm 인스턴스에 값이 있는 경우 : 원처방명이 있으므로, orgcpgnm 값을 copy
  1739. model.setValue( "/root/send/masterinfo/cpgnm" , model.getValue("/root/main/masterinfo/info/orgcpgnm") );
  1740. }
  1741. /**** 동일한 CP/CPG명이 있는지 check를 위한 instasnce 구성 -> 덮어쓰기, 새이름 새로 저장 (시작) ****/
  1742. model.makeNode("/root/send/checkcpgnm");
  1743. model.makeNode("/root/send/checkcpgnm/orgcpgno");
  1744. if( model.getValue("/root/temp/saveflag") != "N" ) //새이름저장은 최초저장과 유사하므로, cpgno를 동일CP검색 조건에 걸면 안됨 || (model.getValue("/root/temp/usgecd") != "2" && model.getValue("/root/temp/usgecd") != "3")
  1745. model.setValue("/root/send/checkcpgnm/orgcpgno" , model.getValue("/root/temp/oldcpgno"));
  1746. if( model.getValue("/root/main/masterinfo/info/orgcpgnm") != "" ){
  1747. if( model.getValue("/root/temp/saveflag") != "N" )
  1748. model.makeValue("/root/send/checkcpgnm/chkcpgnm" , model.getValue("/root/main/masterinfo/info/orgcpgnm"));
  1749. else if( model.getValue("/root/temp/saveflag") == "N" )
  1750. model.makeValue("/root/send/checkcpgnm/chkcpgnm" , model.getValue("/root/main/masterinfo/info/cpgnm"));
  1751. }else
  1752. model.makeValue("/root/send/checkcpgnm/chkcpgnm" , model.getValue("/root/main/masterinfo/info/cpgnm")); //신규 저장 시, 저장하려는 CP명을 가져간다
  1753. /* //2008.06.30 (잠시 막음 처리) 2차 개발 시, 아래대로 처리할 예정
  1754. //비교조건 : 어떤 기준으로 check 할 지 구분 (2008.06.30 JJE)
  1755. if( ( model.getValue("/root/temp/saveflag") != "N" && isNull(model.getValue("/root/temp/oldcpgno")) )
  1756. || (model.getValue("/root/temp/saveflag") == "N" && model.getValue("/root/temp/deptchngyn") == "Y") ){
  1757. model.makeValue("/root/send/checkcpgnm/condflagcd" , "D"); //[진료과] : 최초저장 및 등록, 타진료과로 새이름저장시,
  1758. model.makeValue("/root/send/checkcpgnm/orgcpgorddeptcd" , model.getValue("/root/main/masterinfo/info/cpgorddeptcd"));
  1759. }else{
  1760. model.makeValue("/root/send/checkcpgnm/condflagcd" , "I"); //[상위폴더] : 기존CP저장 및 등록, 동일진료과 새이름저장, tree에서 이동 시
  1761. model.makeValue("/root/send/checkcpgnm/supindxno" , model.getValue("/root/temp/getdata/supindxno"));
  1762. }
  1763. */
  1764. //비교조건 : 어떤 기준으로 check 할 지 구분 (2008.06.30 JJE)
  1765. model.makeValue("/root/send/checkcpgnm/condflagcd" , "D"); //[진료과] : 최초저장 및 등록, 타진료과로 새이름저장시,
  1766. model.makeValue("/root/send/checkcpgnm/orgcpgorddeptcd" , model.getValue("/root/main/masterinfo/info/cpgorddeptcd"));
  1767. //day (회차)
  1768. if( ivw_outline.instance1.selectSingleNode("/root/main/steplist/info[times='0']/times") != null ){
  1769. model.makeValue("/root/send/checkcpgnm/orgtimes", "0");
  1770. }else if( ivw_outline.instance1.selectSingleNode("/root/main/steplist/info[times='1']/times") != null ){
  1771. model.makeValue("/root/send/checkcpgnm/orgtimes", "1");
  1772. }else{
  1773. model.makeValue("/root/send/checkcpgnm/orgtimes", "");
  1774. }
  1775. //덮어쓰기(예:yes) 하는 경우, 다시 체크 안함
  1776. if( model.getValue("/root/temp/usgecd") == "4" ){
  1777. model.makeValue("/root/send/checkcpgnm/checkyn", "N");
  1778. }else{
  1779. model.makeValue("/root/send/checkcpgnm/checkyn", "Y");
  1780. }
  1781. /**** 동일한 CP/CPG명이 있는지 check를 위한 instasnce 구성 -> 덮어쓰기, 새이름 새로 저장 (끝)****/
  1782. //용어 데이터를 구성한다.
  1783. var diagData = grd_diag.getUpdateData();
  1784. var opData = grd_op.getUpdateData();
  1785. var ccData = grd_cc.getUpdateData();
  1786. var header = diagData.split("▩")[0] + "▩";
  1787. opData = opData.setReplaceWord( header, "" );
  1788. ccData = ccData.setReplaceWord( header, "" );
  1789. model.setValue("/root/send/termlist", diagData+opData+ccData ); // : m▦rownum▦termcd▦termhngnm▦termengnm▦termflag▩
  1790. //exclusion 사유 리스트를 구성한다.
  1791. model.setValue("/root/send/exclusionlist", grd_exclusion.getUpdateData());
  1792. //drop 사유 리스트를 구성한다. 2008.06.20 LWS
  1793. model.setValue("/root/send/droplist", grd_drop.getUpdateData());
  1794. //요청자 리스트를 구성한다.
  1795. var nodelist = instance1.selectNodes( "/root/main/reqrlist/list" );
  1796. if(nodelist.length > 0){
  1797. var csvForm = getNodeListCSV(nodelist);
  1798. model.setValue("/root/send/reqrlist", csvForm); // : m▦userid▦usernm▩
  1799. }
  1800. //요청번호:1580 병원 CP로 설정한 경우, 선택한 진료과를 리스트로 구성한다 (2009.06 JJE)
  1801. //var nodelist = instance1.selectNodes( "/root/main/orddeptlist/dept[checkyn='Y']" );
  1802. if( !isNull(model.getValue("/root/temp/multideptcdlist")) ){
  1803. var dept_header = "checkyn▦deptcd▦depthngnm";
  1804. var dept_data = "";
  1805. var deptcd_tmp = model.getValue("/root/temp/multideptcdlist").split(",");
  1806. var deptnm_tmp = model.getValue("/root/temp/multideptnmlist").split(",");
  1807. for(var i=0; i < deptcd_tmp.length; i++){
  1808. dept_data = dept_data + "▩" + "Y" + "▦" + deptcd_tmp[i] + "▦" + "deptnm_tmp[i]";
  1809. }
  1810. model.setValue("/root/send/deptlist", dept_header + dept_data);
  1811. }
  1812. //색인 노드셋을 리퀘스트데이터에 함께 보낸다.
  1813. model.makeNode("/root/send/indxlist");
  1814. var header = "m▦indxno▦indxnm▦supindxno▦indxrefseq▦depth▦indxseq▦cpgno▦cpghistseq▦image▦cpgflagcd";
  1815. if(saveIndxlist == ""){
  1816. var ver = "";
  1817. var indxno = "";
  1818. var supindxno = model.getValue("/root/temp/getdata/supindxno");
  1819. var indxrefseq = "";
  1820. var indxseq = "";
  1821. var no = "";
  1822. var nm = model.getValue("/root/main/masterinfo/info/cpgnm");
  1823. //var flag = model.getValue("/root/main/masterinfo/info/cpgflagcd"); //cpg masterinfo 에 동일한 인스턴스명 존재
  1824. if(model.getValue("/root/temp/mstatus") == "i"){
  1825. model.makeValue("/root/send/reqdata/deptcd", selectedDeptCd);
  1826. model.makeValue("/root/send/reqdata/deptnm", selectedDeptNm);
  1827. if( isNull(selectedDeptCd) ){
  1828. var msg = messageBox("진료과를 ", "C002");
  1829. return false;
  1830. }
  1831. var selectIndxCd = "";
  1832. if( !isNull(savesupindxno) && !isNull(savesuprefseq) && savedeptcd == selectedDeptCd ){
  1833. selectIndxCd = savesupindxno;
  1834. supindxno = savesupindxno;
  1835. indxrefseq = parseInt(savesuprefseq);
  1836. }else{
  1837. model.makeNode("/root/temp/rslt/rstdata");
  1838. submit("TRMQP00601", false); //조회결과 : 동일한 색인이 존재하면 존재하는 "색인명", "색인번호", 존재하지 않으면 ""
  1839. selectIndxCd = model.getValue("/root/temp/rslt/rstdata/indxno");
  1840. }
  1841. model.makeValue("/root/temp/getdata/supindxno", selectIndxCd);
  1842. if( isNull(supindxno) ) supindxno = model.getValue("/root/temp/rslt/rstdata/indxno");
  1843. if( (!isNull(selectedDeptCd)) && isNull(selectIndxCd) ) {
  1844. model.makeValue("/root/send/reqdata/indxnm", selectedDeptCd );
  1845. model.makeValue("/root/send/reqdata/supindxno", "0" ); //상위색인
  1846. model.makeValue("/root/send/reqdata/indxrefseq", "0" ); //조회순번
  1847. model.makeValue("/root/send/reqdata/status", "i" ); //구분:등록
  1848. model.makeValue("/root/send/reqdata/cpgflagcd", "" ); //구분:등록
  1849. model.makeNode("/root/send/getdata/savedfolder");
  1850. supindxno = selectIndxCd;
  1851. if( submit("TXMMP01501", false) ){
  1852. supindxno = model.getValue("/root/temp/savedfolder/item/indxno");
  1853. model.makeValue("/root/temp/getdata/supindxno", supindxno);
  1854. }
  1855. }
  1856. saveIndxlist = "▩i▦"+indxno+"▦"+nm+"▦"+supindxno+"▦"+indxrefseq+"▦▦"+indxseq+"▦"+no+"▦"+ver+"▦▦";
  1857. }
  1858. //else if(model.getValue("/root/temp/mstatus") == "u"){
  1859. // saveIndxlist = "▩u▦"+indxno+"▦"+nm+"▦"+supindxno+"▦"+indxrefseq+"▦▦"+indxseq+"▦"+no+"▦"+ver+"▦▦"+flag;
  1860. //}
  1861. else {
  1862. saveIndxlist = "";
  1863. }
  1864. }
  1865. model.setValue("/root/send/indxlist", header + saveIndxlist + "▩");
  1866. //스텝저장 _2007.10.16 추가(트랜잭션 합치기, but 첨부파일은 send에 copy할 수 없기때문에, 아직 따로 저장한다.)
  1867. var cnt_refreshYN = fSaveWithStepInfo();
  1868. if( cnt_refreshYN == false ) return false;
  1869. var cnt = cnt_refreshYN.split("|")[0];
  1870. var refreshYN = cnt_refreshYN.split("|")[1];
  1871. grp_biz.disabled = false;
  1872. grp_btn.disabled = false;
  1873. ivw_outline.disabled = false;
  1874. //첨부파일 : transaction 통일 불가능 ()
  1875. //openLoadingBar("저장중입니다."); //로딩 메세지 open
  1876. //CP/CPG 마스터 & 색인 & 진단, 수술, 주호소코드 정보를 저장한다.
  1877. if(submit("TXMQP00601", false)){
  1878. ivw_outline.window.javascript.fChangeStatus(); //저장flag 를 ''로 변환한다.
  1879. if(model.getValue("/root/main/masterinfo/info/todd") <= getCurrentDate()){ //삭제 시, refresh 하지 않고, CP명만 [종료]로 바꾼 후 return
  1880. //마스터 정보는 새로 따진 cpgno, cpghistseq만 원래 인스턴스에 copy (나머지 값은 저장 직전과 값 동일..)
  1881. model.setValue("/root/main/masterinfo/info/cpgno", model.getValue("/root/temp/masterinfo/info/cpgno"));
  1882. model.setValue("/root/main/masterinfo/info/cpghistseq", model.getValue("/root/temp/masterinfo/info/cpghistseq"));
  1883. fCopyOrgCpgNM();
  1884. btn_newver.disabled = true;
  1885. btn_newnm.disabled = true;
  1886. btn_allInfoSave.disabled = true;
  1887. return;
  1888. }
  1889. if(refreshYN == "Y"){
  1890. var agr1 = cnt; //그려야 할 컨트롤 갯수
  1891. var agr2 = (parseInt(model.getValue("/root/main/masterinfo/info/swimlineno")) * 3) + 1; //아웃라인을 구성하는 라인 컨트롤 갯수
  1892. ivw_outline.window.javascript.initGlobalVariant(agr1, agr2);
  1893. ivw_outline.window.javascript.fCreateControl();
  1894. model.resetInstanceNode("/root/main/steplist");
  1895. }
  1896. if( instance1.selectSingleNode("/root/temp/masterinfo/sameinfo/cpgno") != null ){
  1897. grp_biz.disabled = true;
  1898. grp_btn.disabled = true;
  1899. ivw_outline.disabled = true;
  1900. model.setValue("/root/main/masterinfo/info/cpgno" , model.getValue("/root/temp/oldcpgno"));
  1901. model.setValue("/root/main/masterinfo/info/cpghistseq " , model.getValue("/root/temp/oldcpghistseq"));
  1902. model.setValue("/root/main/masterinfo/info/tmpyn " , model.getValue("/root/temp/oldtmpyn"));
  1903. var cpgNM = model.getValue("/root/main/masterinfo/info/cpgnm");
  1904. //var msg = messageBox("이미 " + selectedDeptNm + "에 '" + cpgNM + "'가(이) 존재합니다. \n덮어쓰기로", "S002");
  1905. var msg = messageBox("이미 " + selectedDeptNm + "에 '" + cpgNM + "'가(이) 존재합니다. \n덮어쓰기", "S003", "이름을 변경");
  1906. if (msg == "6"){
  1907. //덮어쓰기
  1908. model.setValue("/root/main/masterinfo/info/cpgno" , model.getValue("/root/temp/masterinfo/sameinfo/cpgno"));
  1909. model.setValue("/root/main/masterinfo/info/cpghistseq " , model.getValue("/root/temp/masterinfo/sameinfo/cpghistseq"));
  1910. model.setValue("/root/main/masterinfo/info/tmpyn " , model.getValue("/root/temp/masterinfo/sameinfo/tmpyn"));
  1911. model.setValue("/root/temp/usgecd", "4"); //다음 저장 시, 동일 CP 여부 체크 안함
  1912. model.removeNodeset("/root/temp/masterinfo/sameinfo");
  1913. btn_newver.dispatch("DOMActivate");
  1914. fCnclInptNm();
  1915. return false;
  1916. }else if (msg == "7"){
  1917. //이름변경
  1918. //btn_newnm.dispatch("DOMActivate");
  1919. //model.setValue("/root/main/masterinfo/info/cpgnm", model.getValue("/root/main/masterinfo/info/orgcpgnm"));
  1920. //ipt_newcpgnm.refresh();
  1921. cap_iptnewnm.attribute("text") = "변경할 이름을 입력하십시오.";
  1922. cap_newcpgnm.attribute("text") = cpgFlagNM + "명";
  1923. if( model.getValue("/root/main/masterinfo/info/orgcpgnm") == "" ){
  1924. //model.setValue( "/root/send/masterinfo/cpgnm", model.getValue("/root/main/masterinfo/info/cpgnm") );
  1925. //model.setValue( "/root/main/masterinfo/info/cpgnm", model.getValue("/root/main/masterinfo/info/orgcpgnm") );
  1926. //model.setValue( "/root/main/masterinfo/info/orgcpgnm", "" );
  1927. }else{
  1928. model.setValue( "/root/main/masterinfo/info/cpgnm", model.getValue("/root/main/masterinfo/info/orgcpgnm") );
  1929. //model.setValue( "/root/main/masterinfo/info/orgcpgnm", "" );
  1930. ipt_newcpgnm.refresh();
  1931. }
  1932. grp_inputcpname.attribute("height") = 80; //grp_inputcpname.visible = true;
  1933. model.setFocus("ipt_newcpgnm");
  1934. if( model.getValue("/root/temp/usgecd") != "1" ){
  1935. if(model.getValue("/root/temp/saveflag") == "T" || model.getValue("/root/temp/saveflag") == "N" )
  1936. model.setValue("/root/temp/usgecd", "2"); //단순 이름변경 용도
  1937. else if(model.getValue("/root/temp/saveflag") == "S")
  1938. model.setValue("/root/temp/usgecd", "3"); //단순 이름변경 용도
  1939. }
  1940. model.removeNodeset("/root/temp/masterinfo/sameinfo");
  1941. return false;
  1942. }else{
  1943. //취소 누르면 화면 전체가 비활성화->수정가능토록함(2009.03.02 추가)
  1944. grp_inputcpname.attribute("height") = 0; //grp_inputcpname.visible = false;
  1945. grp_biz.disabled = false;
  1946. grp_btn.disabled = false;
  1947. ivw_outline.disabled = false;
  1948. return false;
  1949. }
  1950. }
  1951. model.removeNodeset("/root/temp/masterinfo/sameinfo");
  1952. if( model.getValue("/root/temp/mstatus") == "i" ){
  1953. //마스터 정보는 새로 따진 cpgno, cpghistseq만 원래 인스턴스에 copy (나머지 값은 저장 직전과 값 동일..)
  1954. model.setValue("/root/main/masterinfo/info/cpgno", model.getValue("/root/temp/masterinfo/info/cpgno"));
  1955. model.setValue("/root/main/masterinfo/info/cpghistseq", model.getValue("/root/temp/masterinfo/info/cpghistseq"));
  1956. fCopyOrgCpgNM();
  1957. ivw_outline.model.setValue("/root/main/outlineinfo/info/cpgno", model.getValue("/root/temp/masterinfo/info/cpgno"));
  1958. ivw_outline.model.setValue("/root/main/outlineinfo/info/cpghistseq", model.getValue("/root/temp/masterinfo/info/cpghistseq"));
  1959. ivw_outline.model.setValue("/root/main/outlineinfo/info/cpgnm", model.getValue("/root/main/masterinfo/info/cpgnm"));
  1960. ivw_outline.model.setValue("/root/main/outlineinfo/info/cpgorddeptcd", model.getValue("/root/main/masterinfo/info/cpgorddeptcd"));
  1961. if(model.getValue("/root/main/masterinfo/info/cpgflagcd") == "01") ivw_outline.model.setValue("/root/main/outlineinfo/info/cpgflagcd", "W");
  1962. else ivw_outline.model.setValue("/root/main/outlineinfo/info/cpgflagcd", "G");
  1963. //원 진료과 다시 초기화 (새이름 저장 시, 동일CP 존재유무 체크하기 위함)
  1964. model.setValue("/root/temp/oldcpgorddeptcd", model.getValue("/root/main/masterinfo/info/cpgorddeptcd")); //저장된 진료과로 다시 셋팅
  1965. model.setValue("/root/temp/deptchngyn" , "N");
  1966. }
  1967. model.copyNode("/root/temp/copynodeset/masterinfo/info", "/root/main/masterinfo/info");
  1968. model.setValue("/root/temp/mstatus", "");
  1969. //model.removeNodeset("/root/send/delmasterinfo");
  1970. //model.removeNodeset("/root/main/indexinfo");
  1971. saveIndxHeader = "";
  1972. saveIndxlist = "";
  1973. changedYN = "Y";
  1974. OcsSaveYN = "N";
  1975. //용어 테이블 초기화
  1976. grd_diag.clearStatus();
  1977. grd_op.clearStatus();
  1978. grd_cc.clearStatus();
  1979. grd_exclusion.clearStatus();
  1980. grd_drop.clearStatus();
  1981. model.removeNodeset("/root/main/diaginfo/diaglist[m = 'd']");
  1982. model.removeNodeset("/root/main/opinfo/oplist[m = 'd']");
  1983. model.removeNodeset("/root/main/ccinfo/cclist[m = 'd']");
  1984. //요청자 콤보박스 초기화
  1985. var ref = "/root/main/reqrlist/list";
  1986. var nodeList = instance1.selectNodes(ref + "[m = 'i' or m = 'u']");
  1987. for(var i= 0; i<nodeList.length; i++){
  1988. var node = nodeList.item(i);
  1989. var statusNode = node.selectSingleNode("m");
  1990. model.setValue(statusNode, "");
  1991. }
  1992. model.removeNodeset(ref + "[m = 'd']");
  1993. model.makeNode("/root/main/reqrlist/reqrid");
  1994. model.makeNode("/root/main/reqrlist/inputreqrnm");
  1995. //새이름으로,새버전으로 버튼 재설정
  1996. ipt_cpgnm.disabled = true;
  1997. if( model.getValue("/root/main/masterinfo/info/tmpyn") == "N" ){
  1998. rdo_ioflagcd.disabled = true;
  1999. }else{
  2000. rdo_ioflagcd.disabled = false;
  2001. }
  2002. btn_newver.disabled = false;
  2003. btn_newnm.disabled = false;
  2004. //트랜잭션으로 인해 결과 데이터를 받는 노드를 바꾼다
  2005. //model.makeValue("/root/temp/masterinfo/prms", model.getValue("/root/temp/tempnode"));
  2006. copyNodeListType("/root/temp/tempnode", "/root/temp/masterinfo/prms", "replace", model, model);
  2007. //첨부파일을 저장한다.
  2008. if( instance1.selectSingleNode("/root/main/attfileinfo/attach[check = 'false']") != null ){
  2009. model.makeValue("/root/main/attfileinfo/master/cpgno", model.getValue("/root/main/masterinfo/info/cpgno"));
  2010. model.makeValue("/root/main/attfileinfo/master/cpghistseq", model.getValue("/root/main/masterinfo/info/cpghistseq"));
  2011. if( submit("TXMQP00603") == true ){
  2012. //첨부파일 그리드 상태 초기화
  2013. grd_attfile.clearStatus();
  2014. }
  2015. }
  2016. //첨부파일이나 요청자 수정 후 재조회 데이터가 존재하면, 값을 다시 set한다
  2017. if(instance1.selectSingleNode("/root/temp/masterinfo/diaglist/termcd") != null ){
  2018. copyNodeListType("/root/main/diaginfo", "/root/temp/masterinfo/diaglist[termflag = 'T00' or termflag = 'T01']", "replace", model, model);
  2019. }else {
  2020. model.removeNodeset("/root/main/diaginfo/diaglist");
  2021. grd_diag.refresh();
  2022. }
  2023. if(instance1.selectSingleNode("/root/temp/masterinfo/oplist/termcd") != null ){
  2024. copyNodeListType("/root/main/opinfo", "/root/temp/masterinfo/oplist[termflag = 'T90' or termflag = 'T91']", "replace", model, model);
  2025. }else {
  2026. model.removeNodeset("/root/main/opinfo/oplist");
  2027. grd_op.refresh();
  2028. }
  2029. if(instance1.selectSingleNode("/root/temp/masterinfo/cclist/termcd") != null ) {
  2030. copyNodeListType("/root/main/ccinfo", "/root/temp/masterinfo/cclist[termflag = 'T20']", "replace", model, model);
  2031. }else {
  2032. model.removeNodeset("/root/main/ccinfo/cclist");
  2033. grd_cc.refresh();
  2034. }
  2035. if(instance1.selectSingleNode("/root/temp/masterinfo/list/userid") != null ) {
  2036. copyNodeListType("/root/main/reqrlist", "/root/temp/masterinfo/list", "replace", model, model);
  2037. }else{
  2038. model.removeNodeset("/root/main/reqrlist/list");
  2039. }
  2040. if(instance1.selectSingleNode("/root/temp/masterinfo/exclist") != null ) {
  2041. copyNodeListType("/root/main/exclusion", "/root/temp/masterinfo/exclist", "replace", model, model);
  2042. }else {
  2043. model.removeNodeset("/root/main/exclusion/exclist");
  2044. grd_exclusion.refresh();
  2045. }
  2046. //2008.06.20
  2047. if(instance1.selectSingleNode("/root/temp/masterinfo/droplist") != null ) {
  2048. copyNodeListType("/root/main/dropinfo", "/root/temp/masterinfo/droplist", "replace", model, model);
  2049. }else {
  2050. model.removeNodeset("/root/main/dropinfo/droplist");
  2051. grd_drop.refresh();
  2052. }
  2053. if(instance1.selectSingleNode("/root/temp/masterinfo/sortedsteplist/stepno") != null) {
  2054. //정렬된 스텝을 셋팅한다 (2007.11.01 outlineview 에 노드 추가(스텝처방에서 탭 정렬을 위해))
  2055. //model.resetInstanceNode("/root/main/steplist");
  2056. model.removeNodeset("/root/main/steplist");
  2057. model.makeNode("/root/main/steplist");
  2058. model.removeNodeset("/root/main/sortedsteplist");
  2059. model.makeNode("/root/main/sortedsteplist");
  2060. ivw_outline.model.removeNodeset("/root/main/sortedsteplist");
  2061. ivw_outline.model.makeNode("/root/main/sortedsteplist");
  2062. var nodeList = instance1.selectNodes("/root/temp/masterinfo/sortedsteplist");
  2063. for(var i=0; i<nodeList.length; i++){
  2064. var node = nodeList.item(i);
  2065. var statusNode = node.selectSingleNode("orgstepno");
  2066. model.setValue(statusNode, i+1);
  2067. }
  2068. var stepCSV = getNodeListCSV(nodeList);
  2069. setCSVToNode("/root/main/steplist", stepCSV, "info");
  2070. copyNodeListType("/root/main/sortedsteplist", "/root/main/steplist/info", "replace", ivw_outline.model, model);
  2071. copyNodeListType("/root/main/sortedsteplist", "/root/main/steplist/info", "replace", model, model);
  2072. //main과 outline의 steplist 구조를 맞춘다. (2009.02.26 추가 )
  2073. copyNodeListType("/root/main/steplist", "/root/main/steplist/info", "replace", model, ivw_outline.model);
  2074. }
  2075. if(instance1.selectSingleNode("/root/temp/masterinfo/decisionlist/stepno") != null) {
  2076. model.removeNodeset("/root/main/decisionlist");
  2077. model.makeNode("/root/main/decisionlist");
  2078. var nodeList = instance1.selectNodes("/root/temp/masterinfo/decisionlist");
  2079. var stepCSV = getNodeListCSV(nodeList);
  2080. setCSVToNode("/root/main/decisionlist", stepCSV, "info");
  2081. copyNodeListType("/root/main/decisionlist", "/root/main/decisionlist/info", "replace", ivw_outline.model, model);
  2082. }
  2083. ivw_outline.window.javascript.fChangeStatus(); //저장flag 를 ''로 변환한다.
  2084. if(refreshYN == "N"){
  2085. ivw_outline.window.javascript.fCreateControl();
  2086. ivw_outline.window.javascript.selectedControl = null;
  2087. //CP저장 후 main의 steplist가 비는 현상 -> 주석처리 함 (2009.02.26 주석)
  2088. //model.resetInstanceNode("/root/main/steplist");
  2089. }else{
  2090. refreshYN = "N";
  2091. }
  2092. }
  2093. else return false;
  2094. //첨부파일이나 요청자 수정 후 재조회 데이터가 존재하면, 값을 다시 set한다 (위로)
  2095. model.makeValue("/root/main/reqrlist/reqrid", "");
  2096. model.makeValue("/root/main/reqrlist/inputreqrnm", "");
  2097. model.refresh();
  2098. if( cpgFlagCd == "01" ){
  2099. grd_diag.rowHidden(0) = true;
  2100. grd_op.rowHidden(0) = true;
  2101. grd_cc.rowHidden(0) = true;
  2102. grd_exclusion.rowHidden(0) = true;
  2103. grd_drop.rowHidden(0) = true;
  2104. ipt_swimlineno.disabled = true;
  2105. }else{
  2106. //CPG인 경우, 저장 후 모든 컨트롤이 수정가능->특정 컨트롤 수정 불가(2009.03.02 추가)
  2107. ipt_cpaprvno.disabled = true;
  2108. //ipt_fcstinhospdayno.disabled = true;
  2109. //ipt_times.disabled = true;
  2110. //ipt_times_old.disabled = true;
  2111. }
  2112. rdo_cpgflagcd.disabled = true;
  2113. //} else{
  2114. // return false;
  2115. //}
  2116. }
  2117. /**
  2118. * @group :
  2119. * @ver : 2007.07
  2120. * @by : 전지은
  2121. * @---------------------------------------------------
  2122. * @type : function
  2123. * @access : public
  2124. * @desc : 마스터 저장 시 아웃라인의 모든 스텝을 함께 저장할때, fSaveCPGInfo()와 함께 호출한다.
  2125. * @param :
  2126. * @return :
  2127. * @---------------------------------------------------
  2128. */
  2129. function fSaveWithStepInfo(){
  2130. //스텝의 필수조건 체크 : 임시저장일 경우는 체크 예외
  2131. var refreshYN = "N";
  2132. if( model.getValue("/root/temp/saveflag") == "S" ){
  2133. if( !ivw_outline.window.javascript.fCheckEssVal("Y") ){
  2134. return false;
  2135. }
  2136. }else{
  2137. if( !ivw_outline.window.javascript.fCheckEssVal("N") ){
  2138. return false;
  2139. }
  2140. }
  2141. //2009.03.05 막음
  2142. /*
  2143. if( ivw_outline.instance1.selectSingleNode("/root/main/steplist/info") != null
  2144. && ivw_outline.instance1.selectSingleNode("/root/temp/delsteplist/info") == null
  2145. && ivw_outline.instance1.selectSingleNode("/root/temp/deldecisionlist/info") == null
  2146. && ivw_outline.instance1.selectSingleNode("/root/main/steplist/info[m='i' or m='u']") == null
  2147. && ivw_outline.instance1.selectSingleNode("/root/main/decisionlist/info[m='i' or m='u']") == null ) {
  2148. //저장할 스텝이 1건도 없다면, 바로 return
  2149. return model.getValue("/root/main/masterinfo/info/swimlineno") + "|" + "N";
  2150. }
  2151. */
  2152. /*
  2153. else if(ivw_outline.instance1.selectSingleNode("/root/temp/delsteplist/info") != null
  2154. && ivw_outline.instance1.selectSingleNode("/root/temp/deldecisionlist/info") != null
  2155. && ivw_outline.instance1.selectSingleNode("/root/main/steplist/info[m='i']") != null
  2156. && ivw_outline.instance1.selectSingleNode("/root/main/decisionlist/info[m='i']") != null ) {
  2157. //스텝이 변경되었다면, OCS의 스텝순서도 재조회되어야함
  2158. }
  2159. */
  2160. //2008.06.18 pymi(s)
  2161. //외래예약 step이 지정되지 않았다면 최종step에 외래예약step 처리하기
  2162. fSetOutRNeedStep();
  2163. //2008.06.18 pymi(e)
  2164. //스텝영역 저장.
  2165. model.removeNodeset("/root/main/steplist");
  2166. model.removeNodeset("/root/main/decisionlist");
  2167. model.makeNode("/root/main/steplist");
  2168. model.makeNode("/root/main/decisionlist");
  2169. copyNodesetType("/root/main/steplist", "/root/main/steplist", "replace", model, ivw_outline.model);
  2170. copyNodesetType("/root/main/decisionlist", "/root/main/decisionlist", "replace", model, ivw_outline.model);
  2171. if(ivw_outline.instance1.selectSingleNode("/root/temp/delsteplist/info") != null){
  2172. copyNodesetType("/root/main/steplist", "/root/temp/delsteplist", "after", model, ivw_outline.model);
  2173. }
  2174. if(ivw_outline.instance1.selectSingleNode("/root/temp/deldecisionlist/info") != null){
  2175. copyNodesetType("/root/main/decisionlist", "/root/temp/deldecisionlist", "after", model, ivw_outline.model);
  2176. }
  2177. //카피해 온 스텝이 한건도 없다면, 초기화 set의 스텝을 카피해서 자동으로 만들어준다
  2178. if( ivw_outline.instance1.selectSingleNode("/root/main/steplist/info") == null ){
  2179. fCreateSteps(0); //2009.03.05
  2180. refreshYN = "Y";
  2181. }
  2182. nodelist = instance1.selectNodes("/root/main/steplist/info");
  2183. var stepCSV = getNodeListCSV(nodelist);
  2184. nodelist = instance1.selectNodes("/root/main/decisionlist/info");
  2185. var deciCSV = getNodeListCSV(nodelist);
  2186. if( fSaveStepInfo(stepCSV, deciCSV, "ALL" ) == true ){
  2187. //return cnt + "|" + refreshYN;
  2188. return "|" + "N";
  2189. }else{
  2190. ivw_outline.window.javascript.fChangeStatus(); //저장flag 를 ''로 변환한다.
  2191. if(refreshYN == "Y"){
  2192. var agr1 = cnt; //그려야 할 컨트롤 갯수
  2193. var agr2 = (parseInt(model.getValue("/root/main/masterinfo/info/swimlineno")) * 3) + 1; //아웃라인을 구성하는 라인 컨트롤 갯수
  2194. ivw_outline.window.javascript.initGlobalVariant(agr1, agr2);
  2195. ivw_outline.window.javascript.fCreateControl();
  2196. model.resetInstanceNode("/root/main/steplist");
  2197. }
  2198. }
  2199. }
  2200. /**
  2201. * @group :
  2202. * @ver : 2008.07
  2203. * @by : 박유미
  2204. * @---------------------------------------------------
  2205. * @type : function
  2206. * @access : public
  2207. * @desc : 외래예약 필요step
  2208. * @param :
  2209. * @return :
  2210. * @---------------------------------------------------
  2211. */
  2212. function fSetOutRNeedStep() {
  2213. if( model.getValue("/root/main/masterinfo/info/ioflagcd") == "O") { //외래일때
  2214. var stepNdList = ivw_outline.instance1.selectNodes("/root/main/steplist/info");
  2215. var hddd = model.getValue("/root/main/masterinfo/info/fcstinhospdayno"); //재원일
  2216. for(var i = 1; i <= stepNdList.length; i++) {
  2217. var times = 0;
  2218. var outPt = 0;
  2219. var maxSlno = 0;
  2220. var setFlag = "N";
  2221. if( ivw_outline.model.getValue("/root/main/steplist/info["+ i +"]/times") != null ) { //day 정보가 있으면
  2222. times = ivw_outline.model.getValue("/root/main/steplist/info["+ i +"]/times");
  2223. }
  2224. for(var j = 1; j <= stepNdList.length; j++) {
  2225. //times == 0 인것은 day가 setting되지 않은 것
  2226. if( (times != 0) && ( times != hddd )
  2227. && (times == ivw_outline.model.getValue("/root/main/steplist/info["+ j +"]/times"))
  2228. && (ivw_outline.model.getValue("/root/main/steplist/info["+ j +"]/stepflagcd") == "A") ){ //같은 day에 action step이면
  2229. if( ivw_outline.model.getValue("/root/main/steplist/info["+ j +"]/decirflag") == "O" ||
  2230. ivw_outline.model.getValue("/root/main/steplist/info["+ j +"]/decirflag") != "") { //외래예약 step 정보가 있는지?
  2231. setFlag = "Y";
  2232. break;
  2233. } else {
  2234. var temp = ivw_outline.model.getValue("/root/main/steplist/info["+ j +"]/swimlineno");
  2235. //step 순서가 화면에 보이는 순서가 아니기때문에 swimline 번호가 가장 큰 step을 외래예약필요 step으로 설정
  2236. if(maxSlno < temp) {
  2237. maxSlno = temp;
  2238. outPt = maxSlno;
  2239. }
  2240. }
  2241. }
  2242. }
  2243. if(outPt != 0 && setFlag != "Y") ivw_outline.model.setValue("/root/main/steplist/info[swimlineno = '"+outPt+"']/decirflag", "O");
  2244. }
  2245. }
  2246. }
  2247. /**
  2248. * @group :
  2249. * @ver : 2007.07
  2250. * @by : 전지은
  2251. * @---------------------------------------------------
  2252. * @type : function
  2253. * @access : public
  2254. * @desc : 스텝정보를 저장한다.
  2255. * @param : stepCSV, deciCSV, flag(ALL:생성기 전체 내용 저장 중 스텝 함께 저장 시, 그외:해당 스텝만 따로 저장 시)
  2256. * @return :
  2257. * @---------------------------------------------------
  2258. */
  2259. function fSaveStepInfo(stepCSV, deciCSV, flag){
  2260. //스텝 영역의 정보들을 구성한다.
  2261. model.removeNodeset("/root/send/step");
  2262. model.makeNode("/root/send/step");
  2263. model.makeValue("/root/send/step/steplist", stepCSV); // : MMPDSINF (stepno▦stepflagcd▦stepmemo▦lnkstepno▦times▦startendflag▦swimlineno▦refseq▦decirflag▦setno▦settypecd▦m▩)
  2264. model.makeValue("/root/send/step/decisionlist", deciCSV); // : MMPDSDEC (stepno▦deciseq▦lnkstepno▩m▩)
  2265. model.makeValue("/root/send/step/master/settypecd", setTypeCd);
  2266. if(flag != "ALL"){
  2267. model.makeValue("/root/send/step/master/cpgno", model.getValue("/root/main/masterinfo/info/cpgno"));
  2268. model.makeValue("/root/send/step/master/cpghistseq", model.getValue("/root/main/masterinfo/info/cpghistseq"));
  2269. // 이력번호 비교 후, 다르면 버전이 바뀌기 이전의 이력번호를 oldcpghistseq 에 담아준다 ->
  2270. model.makeValue("/root/send/step/master/oldcpgno", model.getValue("/root/temp/oldcpgno"));
  2271. model.makeValue("/root/send/step/master/oldcpghistseq", model.getValue("/root/temp/oldcpghistseq"));
  2272. model.makeValue("/root/send/step/master/saveflag", model.getValue("/root/temp/saveflag"));
  2273. }
  2274. if( flag == "ALL" ){
  2275. return true;
  2276. }else{
  2277. //따로 스텝만 저장하는 부분의 사용은 막았음, 추후 TXMQP00601, TXMQP00605 두가지 서브밋이 서버단에서 원활하게 하나로 합쳐지도록 하거나, TXMQP00605를 사용하지 않도록 해야 함
  2278. model.makeNode("/root/send/step/masterinfo")
  2279. if(submit("TXMQP00605")){
  2280. //CP 저장 후 main으 steplist가 삭제되는 현상 - 주석처리함 (2009.02.27)
  2281. //model.removeNodeset("/root/main/steplist/info");
  2282. //model.removeNodeset("/root/main/decisionlist/info");
  2283. model.setValue("/root/temp/oldcpgno", "");
  2284. model.setValue("/root/temp/oldcpghistseq", "");
  2285. model.setValue("/root/temp/saveflag", "");
  2286. //트랜잭션으로 인해 결과 데이터를 받는 노드를 바꾼다
  2287. //model.makeValue("/root/temp/masterinfo/prms", model.getValue("/root/temp/tempnode"));
  2288. model.removeNodeset("/root/temp/masterinfo/prms");
  2289. copyNodeListType("/root/temp/masterinfo", "/root/temp/tempnode/prms", "after", model, model);
  2290. }
  2291. }
  2292. }
  2293. /**
  2294. * @group :
  2295. * @ver : 2007.07
  2296. * @by : 전지은
  2297. * @---------------------------------------------------
  2298. * @type : function
  2299. * @access : public
  2300. * @desc : 색인 뷰어에서 이력보기를 선택한 경우, 현재 CP key값을 ivw_histList 에 넘겨준다.
  2301. * @param :
  2302. * @return :
  2303. * @---------------------------------------------------
  2304. */
  2305. function fGetCpgHist(){
  2306. ivw_histlist.datagrid1.attribute("height") = "645px";
  2307. ivw_histlist.datagrid1.attribute("width") = "475px";
  2308. ivw_histlist.line1.attribute("x2") = "475px";
  2309. ivw_histlist.btn_close.visible = true;
  2310. ivw_histlist.btn_close.attribute("left") = "420px";
  2311. ivw_histlist.visible = true;
  2312. ivw_histlist.datagrid1.refresh();
  2313. ivw_histlist.model.makeValue("/root/main/search_cond/cpgflagcd", model.getValue("/root/main/search_cond/cpgflagcd"));
  2314. ivw_histlist.window.javascript.fGetCpgHist();
  2315. }
  2316. /**
  2317. * @group :
  2318. * @ver : 2007.08
  2319. * @by : 전지은
  2320. * @---------------------------------------------------
  2321. * @type : function
  2322. * @access : public
  2323. * @desc : 선택한 cp의 이력 조회 화면을 닫는다.(사용 안함)
  2324. * @param :
  2325. * @return :
  2326. * @---------------------------------------------------
  2327. */
  2328. function fCloseCpgHist(){
  2329. ivw_histlist.visible = false;
  2330. }
  2331. /**
  2332. * @group :
  2333. * @ver : 2007.08
  2334. * @by : 전지은
  2335. * @---------------------------------------------------
  2336. * @type : function
  2337. * @access : public
  2338. * @desc : 예상재원일수를 범위로 하는 콤보 리스트를 구성한다.
  2339. * @param :
  2340. * @return :
  2341. * @---------------------------------------------------
  2342. */
  2343. function fSettingDayComboList(){
  2344. var x = 0;
  2345. var ioflagcd = model.getValue("/root/main/masterinfo/info/ioflagcd");
  2346. var dayno = model.getValue("/root/main/masterinfo/info/fcstinhospdayno");
  2347. if(isNull(dayno)){ //재원일수 없으면 바로 return (2008.12.05)
  2348. return;
  2349. }
  2350. //if(cpgFlagCd == "01"){ //재원일수 존재하는 CPG도 회차에 따라 스텝명이 정해지므로 조건 없앰(2008.12.05)
  2351. // 외래이면 D0 없음
  2352. if( ioflagcd == "O") {
  2353. x = 1;
  2354. } else {
  2355. x = 0;
  2356. }
  2357. //2008.06.18 pymi (종료)
  2358. model.removeNodeset("/root/temp/daylist");
  2359. model.makeNode("/root/temp/daylist");
  2360. model.makeValue("/root/temp/daylist/day[1]/id", "");
  2361. model.makeValue("/root/temp/daylist/day[1]/nm", "");
  2362. model.makeValue("/root/temp/oplist/op[1]/id", "");
  2363. model.makeValue("/root/temp/oplist/op[1]/nm", "");
  2364. if(ioflagcd != "O") {
  2365. for(var i = x; i <= parseInt(dayno); i++){
  2366. model.makeValue("/root/temp/daylist/day[" + (i+2) + "]/id", i);
  2367. model.makeValue("/root/temp/oplist/op[" + (i+2) + "]/id", i);
  2368. if( i == 0 ) {
  2369. model.makeValue("/root/temp/daylist/day[" + (i+2) + "]/nm", "외래");
  2370. }
  2371. /*else if( i == 1) {
  2372. model.makeValue("/root/temp/daylist/day[" + (i+2) + "]/nm", "입원일");
  2373. model.makeValue("/root/temp/oplist/op[" + (i+2) + "]/nm", "OP");
  2374. }*/
  2375. else if( i == parseInt(dayno) ) {
  2376. model.makeValue("/root/temp/daylist/day[" + (i+2) + "]/nm", "퇴원일");
  2377. model.makeValue("/root/temp/oplist/op[" + (i+2) + "]/nm", "POD#" + (i-1));
  2378. } else {
  2379. //model.makeValue("/root/temp/daylist/day[" + (i+2) + "]/nm", "HD#" + (i-1));
  2380. //model.makeValue("/root/temp/oplist/op[" + (i+2) + "]/nm", "POD#" + (i-1));
  2381. model.makeValue("/root/temp/daylist/day[" + (i+2) + "]/nm", "HD#" + i);
  2382. if( i == 1 ) model.makeValue("/root/temp/oplist/op[" + (i+2) + "]/nm", "OP");
  2383. else model.makeValue("/root/temp/oplist/op[" + (i+2) + "]/nm", "POD#" + (i-1));
  2384. }
  2385. }
  2386. } else {
  2387. for(var i = x; i <= parseInt(dayno); i++){
  2388. model.makeValue("/root/temp/daylist/day[" + (i+2) + "]/id", i);
  2389. model.makeValue("/root/temp/daylist/day[" + (i+2) + "]/nm", "OPD#" + i);
  2390. //model.makeValue("/root/temp/oplist/op[" + (i+2) + "]/id", i);
  2391. //model.makeValue("/root/temp/oplist/op[" + (i+2) + "]/nm", "OPD#" + I);
  2392. }
  2393. }
  2394. //if(cpgFlagCd == "01"){
  2395. ipt_times.visible = true;
  2396. cmb_stepnm.visible = true;
  2397. ipt_times_old.visible = false;
  2398. ipt_times.refresh();
  2399. //}
  2400. /*var x = 0;
  2401. if(model.getValue("/root/main/masterinfo/info/cpgflagcd") == "01"){
  2402. // 2008.06.18 pymi (수정)
  2403. // 외래이면 D0 없음
  2404. if( model.getValue("/root/main/masterinfo/info/ioflagcd") == "O") {
  2405. x = 1;
  2406. } else {
  2407. x = 0;
  2408. }
  2409. //2008.06.18 pymi (종료)
  2410. var dayno = model.getValue("/root/main/masterinfo/info/fcstinhospdayno");
  2411. model.removeNodeset("/root/temp/daylist");
  2412. model.makeNode("/root/temp/daylist");
  2413. model.makeValue("/root/temp/daylist/day[1]/id", "");
  2414. model.makeValue("/root/temp/daylist/day[1]/nm", "");
  2415. for(var i = x; i <= parseInt(dayno); i++){
  2416. model.makeValue("/root/temp/daylist/day[" + (i+2) + "]/id", i);
  2417. model.makeValue("/root/temp/daylist/day[" + (i+2) + "]/nm", i);
  2418. }
  2419. ipt_times.visible = true;
  2420. ipt_times_old.visible = false;
  2421. ipt_times.refresh();
  2422. }else{
  2423. ipt_times.visible = false;
  2424. ipt_times_old.visible = true;
  2425. }*/
  2426. }
  2427. /**
  2428. * @group :
  2429. * @ver : 2008.06
  2430. * @by : 전지은
  2431. * @---------------------------------------------------
  2432. * @type : function
  2433. * @access : public
  2434. * @desc : CP/CPG명을 CP검색화면에서의 이름과 동일하게 바꿈
  2435. * @param :
  2436. * @return :
  2437. * @---------------------------------------------------
  2438. */
  2439. function fCopyOrgCpgNM(){
  2440. var preNM = "";
  2441. var DayNo = "";
  2442. var orgCpgNM = "";
  2443. if( instance1.selectSingleNode("/root/main/masterinfo/info/orgcpgnm") == null )
  2444. model.makeNode("/root/main/masterinfo/info/orgcpgnm");
  2445. if( isNull(model.getValue("/root/main/masterinfo/info/orgcpgnm")) || model.getValue("/root/temp/saveflag") == "N" ){
  2446. orgCpgNM = model.getValue("/root/main/masterinfo/info/cpgnm");
  2447. }else{
  2448. orgCpgNM = model.getValue("/root/main/masterinfo/info/orgcpgnm");
  2449. }
  2450. var postNM = "";
  2451. if( model.getValue("/root/main/masterinfo/info/tmpyn") == "Y" )
  2452. preNM = "[미등록] ";
  2453. if( model.getValue("/root/main/masterinfo/info/todd") <= getCurrentDate() )
  2454. preNM = "[종료] ";
  2455. if( ivw_outline.instance1.selectSingleNode("/root/main/steplist/info[times='0']/times") != null ){
  2456. postNM = " (D0)";
  2457. }else if( ivw_outline.instance1.selectSingleNode("/root/main/steplist/info[times='1']/times") != null ){
  2458. postNM = " (D1)";
  2459. }
  2460. //[미완성/종료] + CP명 + (DayNo)
  2461. model.makeValue( "/root/main/masterinfo/info/orgcpgnm", orgCpgNM );
  2462. model.setValue ( "/root/main/masterinfo/info/cpgnm" , preNM + orgCpgNM + postNM );
  2463. ipt_cpgnm.refresh();
  2464. }
  2465. /**
  2466. * @group :
  2467. * @ver : 2007.10
  2468. * @by : 전지은
  2469. * @---------------------------------------------------
  2470. * @type : function
  2471. * @access : public
  2472. * @desc : 환자계획표 전체 조회를 위해 필요한 값을 iviewer로 보낸다
  2473. * @param :
  2474. * @return :
  2475. * @---------------------------------------------------
  2476. */
  2477. function fSendDetailValue(){
  2478. var timesArray = "";
  2479. var tms;
  2480. var settypeArray;
  2481. //2008.1.14 환자계획표의 Day가 숫자임에도, 아스키코드로 sorting 되어, 정렬된 스텝 기준으로 넘김
  2482. var ref = "/root/main/sortedsteplist/info";
  2483. var nodeList = ivw_outline.instance1.selectNodes(ref);
  2484. for(var i=1; i<=nodeList.length; i++){
  2485. var node = ivw_outline.instance1.selectSingleNode("/root/main/sortedsteplist/info[" + i + "]/times");
  2486. var settypeNode = ivw_outline.instance1.selectSingleNode("/root/main/sortedsteplist/info[" + i + "]/settypecd");
  2487. var setnoNode = ivw_outline.instance1.selectSingleNode("/root/main/sortedsteplist/info[" + i + "]/setno");
  2488. if( !isNull(node.text) && tms != node.text){
  2489. timesArray = timesArray + node.text + ",";
  2490. settypeArray = settypeArray + settypeNode.text + ",";
  2491. }
  2492. tms = node.text;
  2493. //if( !isNull(settypeNode.text) && !isNull(setnoNode) && setno != setnoNode.text ){
  2494. //}
  2495. //setno = setnoNode.text;
  2496. }
  2497. timesArray = timesArray.substr(0, timesArray.length-1);
  2498. var cpgno = model.getValue("/root/main/masterinfo/info/cpgno");
  2499. var cpghistseq = model.getValue("/root/main/masterinfo/info/cpghistseq");
  2500. if( !isNull(cpgno) ){
  2501. var returnText = cpgno + "|" + cpghistseq + "|" + setTypeCd + "|" + timesArray + "|" + "generater";
  2502. setParameter("stepinfo", returnText);
  2503. } else{
  2504. messageBox("CP가 저장되지", "E007");
  2505. }
  2506. }
  2507. /**
  2508. * @group :
  2509. * @ver : 2007.08
  2510. * @by : 전지은
  2511. * @---------------------------------------------------
  2512. * @type : function
  2513. * @access : public
  2514. * @desc : 예상재원일수를 범위로 하는 콤보 리스트를 구성한다.
  2515. * @param :
  2516. * @return :
  2517. * @---------------------------------------------------
  2518. */
  2519. function delPrmsPrcpSetInfo(delSetInfo){
  2520. if( ivw_detail.visible == true ){
  2521. ivw_detail.window.javascript.delPrmsPrcpSetInfo(delSetInfo);
  2522. }
  2523. }
  2524. /**
  2525. * @group :
  2526. * @ver : 2008.06.20
  2527. * @by : LWS
  2528. * @---------------------------------------------------
  2529. * @type : function
  2530. * @access : public
  2531. * @desc : 새이름으로 버튼을 눌렀다가 취소버튼을 눌러을 경우 컨트롤 활성화 상태를 원상태로 원복시켜야 함.
  2532. * @param :
  2533. * @return :
  2534. * @---------------------------------------------------
  2535. */
  2536. function fCnclInptNm(){
  2537. grp_inputcpname.attribute("height") = 0; //grp_inputcpname.visible = false;
  2538. grp_biz.disabled = false;
  2539. grp_btn.disabled = false;
  2540. ivw_outline.disabled = false;
  2541. ipt_stepnm.disabled = true;
  2542. tar_stepmemo.disabled = true;
  2543. ipt_times.disabled = true;
  2544. cmb_stepnm.disabled = true;
  2545. ipt_cpgnm.disabled = true;
  2546. if( instance1.selectSingleNode("/root/temp/oldtmpyn") != null ){
  2547. model.setValue( "/root/main/masterinfo/info/tmpyn", model.getValue("/root/temp/oldtmpyn") );
  2548. }
  2549. if( model.getValue("/root/main/masterinfo/info/tmpyn") == "N"){
  2550. rdo_ioflagcd.disabled = true;
  2551. cmb_cpgorddeptcd.disabled = true;
  2552. }else{
  2553. rdo_ioflagcd.disabled = false;
  2554. cmb_cpgorddeptcd.disabled = false;
  2555. }
  2556. rdo_cpgflagcd.disabled = true;
  2557. if(cpgFlagCd == "01"){
  2558. //ipt_fcstinhospdayno.disabled = false;
  2559. ipt_swimlineno.disabled = true;
  2560. }else{
  2561. //ipt_fcstinhospdayno.disabled = true;
  2562. ipt_swimlineno.disabled = false;
  2563. }
  2564. fReturnStatus();
  2565. model.refresh();
  2566. }
  2567. /**
  2568. * @group :
  2569. * @ver : 2008.12.05
  2570. * @by : 김영학
  2571. * @---------------------------------------------------
  2572. * @type : function
  2573. * @access : public
  2574. * @desc : CPG 속성관리창을 오픈하기 위한 함수
  2575. * @param :
  2576. * @return :
  2577. * @---------------------------------------------------
  2578. */
  2579. function fOpenAttAdm(){
  2580. if( isNull(model.getValue("/root/main/masterinfo/info/cpgno")) ){
  2581. messageBox ( "CPG 기본 정보 저장 후에 입력", "I006" );
  2582. return;
  2583. }
  2584. CPGadminObj = getOpenWindow("SPMQP00300");
  2585. if (CPGadminObj != null) {
  2586. CPGadminObj.window.javascript.model.dispatch("xforms-ready");
  2587. } else {
  2588. open("SPMQP00300", "", null, null, "SPMQP00300", "", "", "", false);
  2589. }
  2590. }
  2591. /**
  2592. * @group :
  2593. * @ver : 2009.01.28
  2594. * @by : 김영학
  2595. * @---------------------------------------------------
  2596. * @type : function
  2597. * @access : public
  2598. * @desc : CPG 속성관리창에서 데이터 저장한 경우 생성기창의 리스트 업데이트
  2599. * @param :
  2600. * @return :
  2601. * @---------------------------------------------------
  2602. */
  2603. function fInitAttList(){
  2604. model.makeValue("/root/send/reqdata/cpgno" , model.getValue("/root/main/masterinfo/info/cpgno"));
  2605. model.makeValue("/root/send/reqdata/cpghistseq" , model.getValue("/root/main/masterinfo/info/cpghistseq"));
  2606. submit("TRMQP00606");
  2607. var mntrRef = "/root/temp/temp_attlist/mntrlist";
  2608. var inqrRef = "/root/temp/temp_attlist/inqrheader";
  2609. var limRef = "/root/temp/temp_attlist/limheaderinfo";
  2610. model.removeNodeset("/root/main/scrninfo/mntrlist");
  2611. model.removeNodeset("/root/main/mntrinfo/mntrlist");
  2612. model.removeNodeset("/root/main/inqrinfo/inqrheader");
  2613. model.removeNodeset("/root/main/limtminfo/limheaderinfo");
  2614. copyNodeListType("/root/main/scrninfo", mntrRef + "[cpgmntrflag = 'S']", "replace", model, model);
  2615. copyNodeListType("/root/main/mntrinfo", mntrRef + "[cpgmntrflag = 'M']", "replace", model, model);
  2616. copyNodeListType("/root/main/inqrinfo", inqrRef, "replace", model, model);
  2617. copyNodeListType("/root/main/limtminfo", limRef, "replace", model, model);
  2618. model.refresh();
  2619. }
  2620. /**
  2621. * @group :
  2622. * @ver : 2009.02
  2623. * @by : 전지은
  2624. * @---------------------------------------------------
  2625. * @type : function
  2626. * @access : public
  2627. * @desc : 선택한 스텝의 order , 서식 정보를 팝업으로 조회한다
  2628. * @param :
  2629. * @return :
  2630. * @---------------------------------------------------
  2631. */
  2632. function fOpenStepDetlInfo(){
  2633. var no = model.getValue("/root/main/stepinfo/info/stepno");
  2634. var stepflag = model.getValue("/root/main/stepinfo/info/stepflagcd");
  2635. if( isNull(no) ){
  2636. messageBox("STEP을", "C002");
  2637. return;
  2638. }
  2639. if( ivw_outline.instance1.selectSingleNode("/root/main/steplist/info[setno != '']") == null ){
  2640. messageBox(cpgFlagNM + "의 모든 Step에 저장된 처방이", "E014");
  2641. return;
  2642. }else if( ivw_outline.instance1.selectSingleNode("/root/main/sortedsteplist/info[stepno='" + no + "']") == null ){
  2643. messageBox("선택된 Step은 저장되지 않아 조회", "E001");
  2644. return;
  2645. //no = ivw_outline.model.getValue("/root/main/sortedsteplist/info[1]/stepno");
  2646. //stepflag = ivw_outline.model.getValue("/root/main/sortedsteplist/info[1]/stepflagcd");
  2647. }
  2648. clearParameter("stepinfo");
  2649. clearParameter("steplist");
  2650. //ivw_outline.window.javascript.fViewDetailInfo();
  2651. if( !isNull(no) ){
  2652. if(stepflag == "A" || stepflag == "B"){
  2653. var returnText = no + "|" +
  2654. model.getValue("/root/main/masterinfo/info/cpgno") + "|" +
  2655. model.getValue("/root/main/masterinfo/info/cpghistseq ") + "|" +
  2656. setTypeCd + "|" +
  2657. model.getValue("/root/main/stepinfo/info/setno") + "|" +
  2658. model.getValue("/root/main/stepinfo/info/stepmemo") + "|" +
  2659. model.getValue("/root/main/stepinfo/info/times") + "|" +
  2660. "generater"+ "|" +
  2661. model.getValue("/root/main/stepinfo/info/stepnm");
  2662. //상세보기 팝업에 전체 스텝을 보낸다
  2663. var sortedStepNode = instance1.selectNodes("/root/main/sortedsteplist/info");
  2664. var returnTextList = "";
  2665. var num = 0;
  2666. for(var i=0; i<sortedStepNode.length; i++){
  2667. num++;
  2668. returnTextList = returnTextList + model.getValue("/root/main/sortedsteplist/info["+num+"]/stepno") + "|" +
  2669. model.getValue("/root/main/masterinfo/info/cpgno") + "|" +
  2670. model.getValue("/root/main/masterinfo/info/cpghistseq") + "|" +
  2671. setTypeCd + "|" +
  2672. model.getValue("/root/main/sortedsteplist/info["+num+"]/setno") + "|" +
  2673. model.getValue("/root/main/sortedsteplist/info["+num+"]/stepmemo") + "|" +
  2674. model.getValue("/root/main/sortedsteplist/info["+num+"]/times") + "|" +
  2675. "generater"+ "|" +
  2676. model.getValue("/root/main/sortedsteplist/info["+num+"]/stepnm") + "▦";
  2677. }
  2678. setParameter("stepinfo", returnText);
  2679. setParameter("steplist", returnTextList);
  2680. var StepInfoObj = getOpenWindow("SPMMP01100");
  2681. if (StepInfoObj != null) {
  2682. StepInfoObj.window.javascript.model.dispatch("xforms-ready");
  2683. } else {
  2684. open("SPMMP01100");
  2685. }
  2686. } else if(stepflag == "D"){
  2687. var returnText = model.getValue("/root/main/stepinfo/info/stepnm") + "|" +
  2688. model.getValue("/root/main/stepinfo/info/stepmemo") + "|" +
  2689. model.getValue("/root/main/stepinfo/info/times");
  2690. setParameter("stepinfo", returnText);
  2691. var StepInfoObj = getOpenWindow("SPMMP02100");
  2692. if (StepInfoObj != null) {
  2693. StepInfoObj.window.javascript.model.dispatch("xforms-ready");
  2694. } else {
  2695. open("SPMMP02100");
  2696. }
  2697. }
  2698. } else {
  2699. messageBox("STEP을", "C002");
  2700. }
  2701. }
  2702. /**
  2703. * @group :
  2704. * @ver : 2009.03
  2705. * @by : 전지은
  2706. * @---------------------------------------------------
  2707. * @type : function
  2708. * @access : public
  2709. * @desc : 스텝 자동 생성
  2710. * @param : flag 0 은 저장 후 outline 컨트롤 생성, 1은 즉시 컨트롤 생성
  2711. * @return :
  2712. * @---------------------------------------------------
  2713. */
  2714. function fCreateSteps(flag){
  2715. if( isNull(flag) ) flag = 0;
  2716. //if( ivw_outline.instance1.selectSingleNode("/root/main/steplist/info") == null ){
  2717. var cnt = parseInt( model.getValue("/root/main/masterinfo/info/swimlineno") );
  2718. ivw_outline.model.makeNode("/root/main/steplist");
  2719. for(var i=1; i<=cnt; i++){
  2720. if(i == 1){
  2721. model.setValue("/root/temp/stepinfo/info/startendflag", "S");
  2722. }else if(i == cnt){
  2723. model.setValue("/root/temp/stepinfo/info/startendflag", "E");
  2724. }else{
  2725. model.setValue("/root/temp/stepinfo/info/startendflag", "");
  2726. }
  2727. model.setValue("/root/temp/stepinfo/info/stepno", i);
  2728. model.setValue("/root/temp/stepinfo/info/swimlineno", i);
  2729. if( cpgFlagCd == "01" ){ //회차 자동지정 - cp는 무조건 day 지정, cpg는 재원일수 입력시 스윔라인 수와동일할경우 day를 지정함. (2008.12.05) //회차 자동지정 - cp는 무조건 day 지정, cpg는 재원일수 입력시 스윔라인 수와동일할경우 day를 지정함. (2008.12.05) ////&& model.getValue("/root/main/masterinfo/info/fcstinhospdayno") != model.getValue("/root/main/masterinfo/info/swimlineno")
  2730. model.setValue("/root/temp/stepinfo/info/times", i);
  2731. model.setValue("/root/temp/stepinfo/info/stepnm", model.getValue("/root/temp/daylist/day[id = '"+ (i) +"']/nm]")); // 2008.08.20 pymi day차수를 step명에 setting
  2732. }else{
  2733. model.setValue("/root/temp/stepinfo/info/times", 1); //재원일수 없는 CPG는 모두 1일차로 설정 (2008.12.13)
  2734. model.setValue("/root/temp/stepinfo/info/stepnm", "A" + i); //스텝명 default입력 (2009.03.03)
  2735. }
  2736. if(cnt != i ){
  2737. model.setValue("/root/temp/stepinfo/info/lnkstepno", i+1);
  2738. }else{
  2739. model.setValue("/root/temp/stepinfo/info/lnkstepno", "");
  2740. }
  2741. //스텝속성은 모두 없음으로 설정 (2009.02.23)
  2742. model.setValue("/root/temp/stepinfo/info/stepattrflag", "0/0/0/0");
  2743. copyNodesetType("/root/main/steplist", "/root/temp/stepinfo", "after", model, model);
  2744. // 2008.08.20 pymi step 자동 생성시 outline에만 있는 instance를 강제로 생성해서 복사해야 함
  2745. model.makeNode("/root/temp/stepinfo/info/fixedStCntl");
  2746. model.makeNode("/root/temp/stepinfo/info/tmpstepnm");
  2747. copyNodeListType("/root/main/steplist", "/root/temp/stepinfo/info", "after", ivw_outline.model, model);
  2748. model.removenode("/root/temp/stepinfo/info/fixedStCntl");
  2749. model.removenode("/root/temp/stepinfo/info/tmpstepnm");
  2750. }
  2751. fSetOutRNeedStep();
  2752. //}
  2753. if( flag > 0 ){
  2754. var agr1 = cnt; //그려야 할 컨트롤 갯수
  2755. var agr2 = (parseInt(model.getValue("/root/main/masterinfo/info/swimlineno")) * 3) + 1; //아웃라인을 구성하는 라인 컨트롤 갯수
  2756. ivw_outline.window.javascript.initGlobalVariant(agr1, agr2);
  2757. ivw_outline.window.javascript.fCreateControl();
  2758. ivw_outline.window.javascript.selectedControl = null;
  2759. }
  2760. }
  2761. /**
  2762. * @group :
  2763. * @ver : 2010.03.30
  2764. * @by : 전지은
  2765. * @---------------------------------------------------
  2766. * @type : function
  2767. * @access : public
  2768. * @desc : CP/CPG종류나 진료과에 따라 데이터 및 컨트롤 셋팅을 해줌 (조회 직후, 종류-라디오, 진료과-콤보)
  2769. * @param : flag (T:type, D:dept)
  2770. * @return :
  2771. * @---------------------------------------------------
  2772. */
  2773. function fCngCpgType( flag ){
  2774. if( isNull(flag) ) flag = "D";
  2775. var cpgtypecd = model.getValue("/root/main/masterinfo/info/cpgtypecd");
  2776. var cpgorddeptcd = model.getValue("/root/main/masterinfo/info/cpgorddeptcd");
  2777. //병원공유 선택한 경우, 진료과를 병원으로 자동선택, 포커스는 선택버튼으로...
  2778. if( (flag == "T" && cpgtypecd == "H") || (flag == "D" && cpgorddeptcd == "1000000000") ){
  2779. model.setValue("/root/main/masterinfo/info/cpgorddeptcd", "1000000000");
  2780. model.setValue("/root/main/masterinfo/info/cpgtypecd", "H");
  2781. cmb_cpgorddeptcd.refresh();
  2782. cmb_cpgorddeptcd.visible = false;
  2783. btn_getdept.visible = true;
  2784. ipt_cpgorddeptnm.visible = true;
  2785. model.setFocus("btn_getdept");
  2786. //선택된 진료과들이 있으면 버튼명에서 *을 제외시킴
  2787. //var nodelist = instance1.selectNodes( "/root/main/orddeptlist/dept[checkyn='Y']" );
  2788. if( !isNull(model.getValue("/root/temp/multideptcdlist")) )
  2789. btn_getdept.attribute("text") = "선택";
  2790. else
  2791. btn_getdept.attribute("text") = "선택*";
  2792. btn_getdept.refresh();
  2793. }else{
  2794. model.setValue("/root/main/masterinfo/info/cpgtypecd", "D");
  2795. //유저가 진료의이면 진료과로, 그렇지 않으면 선택 초기화
  2796. if( jobKindCd == "0330" || jobKindCd == "0332" || jobKindCd == "9930" ){
  2797. model.setValue("/root/main/masterinfo/info/cpgorddeptcd", dutPlceCd);
  2798. }else{
  2799. //model.setValue("/root/main/masterinfo/info/cpgorddeptcd", "");
  2800. }
  2801. cmb_cpgorddeptcd.refresh();
  2802. cmb_cpgorddeptcd.visible = true;
  2803. btn_getdept.visible = false;
  2804. ipt_cpgorddeptnm.visible = false;
  2805. model.setValue("/root/temp/multideptcdlist", "");
  2806. model.setValue("/root/temp/multideptnmlist", "");
  2807. ipt_cpgorddeptnm.refresh();
  2808. }
  2809. }
  2810. function fCreateViewer() {
  2811. //grp_form.createChild("xforms:iviewer", "id:ivw_loader;src:../../../emr/medirecweb/xrw/SSMMR01100_서식로더.xrw;visibility:hidden;left:345px; top:36px; width:620px; height:708px; border-width:1px; border-style:solid; ");
  2812. grp_form.createChild("xforms:iviewer", "id:ivw_loader;src:../../../emr/medirecweb/xrw/SSMMR01100_서식로더.xrw;visibility:hidden;left:0px; top:20px; width:620px; height:743px; border-width:1px; border-style:solid; ");
  2813. }
  2814. ]]>
  2815. </script>
  2816. </xhtml:head>
  2817. <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  2818. <group id="grp_tle" style="left:0px; top:0px; width:1195px; height:13px; ">
  2819. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:139px; height:14px; ">CP Generator</caption>
  2820. </group>
  2821. <group id="grp_biz" scroll="auto" style="left:0px; top:13px; width:1195px; height:742px; ">
  2822. <select1 id="rdo_cpgflagcd" ref="/root/main/masterinfo/info/cpgflagcd" navindex="1" appearance="full" cellspacing="150" cols="2" overflow="visible" style="left:88px; top:35px; width:242px; height:20px; border-style:none; ">
  2823. <choices>
  2824. <item>
  2825. <label>CP</label>
  2826. <value>01</value>
  2827. </item>
  2828. </choices>
  2829. <script type="javascript" ev:event="xforms-value-changed">
  2830. <![CDATA[
  2831. fInitializeValue();
  2832. ]]>
  2833. </script>
  2834. </select1>
  2835. <line id="line7" class="line_2" style="x1:0px; y1:55px; x2:345px; y2:55px; "/>
  2836. <line id="line3" class="line_1" style="x1:355px; y1:28px; x2:1194px; y2:28px; "/>
  2837. <caption id="caption19" class="tit_2" style="left:360px; top:13px; width:95px; height:13px; ">Step 정보</caption>
  2838. <line id="line11" class="line_3" style="x1:355px; y1:55px; x2:1194px; y2:55px; "/>
  2839. <input id="ipt_cpgno" ref="/root/main/masterinfo/info/cpgno" class="input_default" visibility="hidden" style="left:460px; top:4px; width:45px; height:19px; "/>
  2840. <input id="ipt_cpghistseq" ref="/root/main/masterinfo/info/cpghistseq" class="input_default" visibility="hidden" style="left:505px; top:4px; width:45px; height:19px; "/>
  2841. <select1 id="cmb_cpglasthistyn" ref="/root/main/masterinfo/info/cpglasthistyn" class="combo_default" visibility="hidden" appearance="minimal" style="left:550px; top:4px; width:40px; height:19px; ">
  2842. <choices>
  2843. <item>
  2844. <label>Y</label>
  2845. <value>Y</value>
  2846. </item>
  2847. <item>
  2848. <label>N</label>
  2849. <value>N</value>
  2850. </item>
  2851. </choices>
  2852. </select1>
  2853. <line id="line8" class="line_1" style="x1:355px; y1:80px; x2:1194; y2:80px; "/>
  2854. <line id="line13" class="line_3" style="x1:355px; y1:742px; x2:1194px; y2:742px; "/>
  2855. <caption id="cap_outlineinfo" class="tit_2" style="left:360px; top:66px; width:130px; height:13px; ">Outline 정보</caption>
  2856. <input id="ipt_cpgnm" ref="/root/main/masterinfo/info/cpgnm" class="input_essential" navindex="2" style="left:87px; top:58px; width:263px; height:19px; "/>
  2857. <caption id="cap_cpgnm" class="cell_1" style="left:0px; top:57px; width:85px; height:23px; ">CP명</caption>
  2858. <caption id="cap_cpaprvno" class="cell_1" style="left:0px; top:33px; width:85px; height:23px; ">구분</caption>
  2859. <input id="ipt_cpaprvno" ref="/root/main/masterinfo/info/cpaprvno" class="input_default" navindex="3" style="left:130px; top:34px; width:130px; height:19px; ">
  2860. <script type="javascript" ev:event="onmouseup">
  2861. <![CDATA[
  2862. if(ipt_cpaprvno.currentText == "승인번호") {
  2863. ipt_cpaprvno.currentText = "";
  2864. }
  2865. ]]>
  2866. </script>
  2867. </input>
  2868. <button id="btn_sizecntl" class="icon_left" style="left:969px; top:60px; width:26px; height:19px; ">
  2869. <caption/>
  2870. <script type="javascript" ev:event="DOMActivate">
  2871. <![CDATA[
  2872. fSizeControl();
  2873. ]]>
  2874. </script>
  2875. </button>
  2876. <caption id="cap_cpgflagcd" class="cell_1" visibility="hidden" style="left:335px; top:32px; width:15px; height:23px; ">CP 구분</caption>
  2877. <button id="button16" class="btn_sw" group="tab1" style="left:0px; top:6px; width:69px; height:22px; ">
  2878. <caption>검색</caption>
  2879. <script type="javascript" ev:event="DOMActivate">
  2880. <![CDATA[
  2881. fIndxMngt();
  2882. ]]>
  2883. </script>
  2884. </button>
  2885. <button id="button17" class="btn_sw" visibility="hidden" group="tab2" style="left:70px; top:6px; width:69px; height:22px; ">
  2886. <caption>묶음CP</caption>
  2887. <script type="javascript" ev:event="DOMActivate">
  2888. <![CDATA[
  2889. if(button17.selected == true){
  2890. button17.selected = false;
  2891. } else {
  2892. button17.selected = true;
  2893. }
  2894. ]]>
  2895. </script>
  2896. </button>
  2897. <line id="line1" class="line_1" style="x1:0px; y1:28px; x2:350px; y2:28px; "/>
  2898. <caption id="caption1" class="cell_1" style="left:355px; top:33px; width:80px; height:23px; ">STEP명</caption>
  2899. <iviewer id="ivw_outline" src="../../../emr/cpgweb/xrw/SPMMP01900_OutlineView.xrw" style="left:355px; top:85px; width:838px; height:655px; border-color:#c0c0c0; margin-left:0; margin-top:0; margin-right:0; margin-bottom:0; "/>
  2900. <iviewer id="ivw_detail" visibility="hidden" src="../../../emr/prcpmngtweb/xrw/SPMMP02200_DetailView.xrw" style="left:355px; top:85px; width:838px; height:655px; border-color:#c0c0c0; margin-left:0; margin-top:0; margin-right:0; margin-bottom:0; "/>
  2901. <input id="ipt_stepnm" ref="/root/main/stepinfo/info/stepnm" class="input_default" disabled="true" navindex="22" editable="true" style="left:438px; top:34px; width:83px; height:19px; ">
  2902. <script type="javascript" ev:event="xforms-value-changed">
  2903. <![CDATA[
  2904. var stepno = parseInt(model.getValue("/root/main/stepinfo/info/stepno")); //스텝번호는 1부터 시작하므로, rowno = indexno 로 간주
  2905. var times = model.getValue("/root/main/stepinfo/info/times");
  2906. var memo = model.getValue("/root/main/stepinfo/info/stepmemo");
  2907. var stepnm = model.getValue("/root/main/stepinfo/info/stepnm");
  2908. ivw_outline.model.setValue( "/root/main/steplist/info[" + stepno + "]/stepnm", stepnm);
  2909. ivw_outline.grp_swimline.refresh();
  2910. if( ivw_outline.model.getValue("/root/main/steplist/info[" + stepno + "]/m") != "i" ){
  2911. ivw_outline.model.setValue( "/root/main/steplist/info[" + stepno + "]/m", "u" );
  2912. }
  2913. ]]>
  2914. </script>
  2915. <script type="javascript" ev:event="DOMFocusIn">
  2916. <![CDATA[
  2917. if( ivw_detail.window.javascript.currentStepCntl != null ){
  2918. messageBox ( "스텝을", "C002" );
  2919. return;
  2920. }
  2921. ]]>
  2922. </script>
  2923. </input>
  2924. <datagrid id="grd_getindxlist" nodeset="/root/main/indexinfo/item" visibility="hidden" caption="indxNO^indxSeq^indxNM^supIndxNO^indxRefSeq^cpgNo^cpgHistSeq^depth^status" colsep="^" colwidth="45, 51, 50, 66, 73, 49, 72, 41, 39" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:355px; top:620px; width:345px; height:107px; ">
  2925. <col ref="indxno"/>
  2926. <col ref="indxseq"/>
  2927. <col ref="indxnm"/>
  2928. <col ref="supindxno"/>
  2929. <col ref="indxrefseq"/>
  2930. <col ref="cpgno"/>
  2931. <col ref="cpghistseq"/>
  2932. <col ref="depth"/>
  2933. <col ref="status"/>
  2934. </datagrid>
  2935. <input id="ipt_times_old" ref="/root/main/stepinfo/info/times" class="input_default" disabled="true" navindex="22" visibility="hidden" style="left:1135px; top:34px; width:58px; height:19px; ">
  2936. <script type="javascript" ev:event="xforms-value-changed">
  2937. <![CDATA[
  2938. var stepno = parseInt(model.getValue("/root/main/stepinfo/info/stepno"));
  2939. var times = model.getValue("/root/main/stepinfo/info/times");
  2940. var memo = model.getValue("/root/main/stepinfo/info/stepmemo");
  2941. var stepnm = model.getValue("/root/main/stepinfo/info/stepnm");
  2942. ivw_outline.model.setValue( "/root/main/steplist/info[" + stepno + "]/times", times);
  2943. ivw_outline.grp_swimline.refresh();
  2944. if( ivw_outline.model.getValue("/root/main/steplist/info[" + stepno + "]/m") != "i" ){
  2945. ivw_outline.model.setValue( "/root/main/steplist/info[" + stepno + "]/m", "u" );
  2946. }
  2947. //day 이미지를 생성한다.
  2948. ivw_outline.window.javascript.fSetDayImage(stepno, times, ipt_times.label, stepnm);
  2949. ]]>
  2950. </script>
  2951. <script type="javascript" ev:event="onkeyup">
  2952. <![CDATA[
  2953. if(event.keyCode == "13") {
  2954. setInputNodeCurText();
  2955. var stepno = parseInt(model.getValue("/root/main/stepinfo/info/stepno"));
  2956. var times = model.getValue("/root/main/stepinfo/info/times");
  2957. var memo = model.getValue("/root/main/stepinfo/info/stepmemo");
  2958. var stepnm = model.getValue("/root/main/stepinfo/info/stepnm");
  2959. var fcstinhospdayno = model.getValue("/root/main/masterinfo/info/fcstinhospdayno");
  2960. ivw_outline.model.setValue( "/root/main/steplist/info[" + stepno + "]/times", times);
  2961. if ( !isNull(fcstinhospdayno) && times <= fcstinhospdayno ){ //cpg일때 day를 입력가능한데, 이때 재원일을 넘어간 일수는 입력 불가
  2962. ipt_times.select(fcstinhospdayno);
  2963. ivw_outline.model.setValue( "/root/main/steplist/info[" + stepno + "]/stepnm", ipt_times.value);
  2964. }
  2965. ivw_outline.grp_swimline.refresh();
  2966. if( ivw_outline.model.getValue("/root/main/steplist/info[" + stepno + "]/m") != "i" ){
  2967. ivw_outline.model.setValue( "/root/main/steplist/info[" + stepno + "]/m", "u" );
  2968. }
  2969. //day 이미지를 생성한다.
  2970. ivw_outline.window.javascript.fSetDayImage(stepno, times, ipt_times.label, stepnm)
  2971. }
  2972. ]]>
  2973. </script>
  2974. </input>
  2975. <select1 id="ipt_times" ref="/root/main/stepinfo/info/times" class="combo_search" disabled="true" navindex="22" appearance="minimal" editmode="search" style="left:1040px; top:34px; width:93px; height:19px; ">
  2976. <choices>
  2977. <itemset nodeset="/root/temp/daylist/day">
  2978. <label ref="nm"/>
  2979. <value ref="id"/>
  2980. </itemset>
  2981. </choices>
  2982. <script type="javascript" ev:event="xforms-value-changed">
  2983. <![CDATA[
  2984. /*
  2985. var stepno = parseInt(model.getValue("/root/main/stepinfo/info/stepno"));
  2986. var times = model.getValue("/root/main/stepinfo/info/times");
  2987. var memo = model.getValue("/root/main/stepinfo/info/stepmemo");
  2988. var stepnm = cmb_stepnm.label;
  2989. ivw_outline.model.setValue( "/root/main/steplist/info[stepno='"+stepno+"']/times", times);
  2990. ivw_outline.model.setValue( "/root/main/steplist/info[stepno='"+stepno+"']/stepnm", ipt_times.label);
  2991. //ivw_outline.model.setValue( "/root/main/steplist/info[stepno='"+stepno+"']/tmpstepnm", ipt_times.label);
  2992. ivw_outline.grp_swimline.refresh();
  2993. if( ivw_outline.model.getValue("/root/main/steplist/info[stepno='"+stepno+"']/m") != "i" ){
  2994. ivw_outline.model.setValue( "/root/main/steplist/info[stepno='"+stepno+"']/m", "u" );
  2995. }
  2996. //day 이미지를 생성한다.
  2997. ivw_outline.window.javascript.fSetDayImage(stepno, times, ipt_times.label, stepnm);
  2998. //선택한 스텝의 다음 라인에 퇴원스텝이 존재할 경우, 퇴원스텝의 times 재설정 (2008.11.12)
  2999. var curSwimLineNo = ivw_outline.model.getValue( "/root/main/steplist/info[stepno='"+stepno+"']/swimlineno");
  3000. ivw_outline.window.javascript.fChgDschTimes( parseInt(curSwimLineNo)+1 );
  3001. */
  3002. ]]>
  3003. </script>
  3004. <script type="javascript" ev:event="DOMFocusOut">
  3005. <![CDATA[
  3006. var selNo = ipt_times.value; // ipt_times.label -> ipt_times.value 2008.08.19 pymi
  3007. var val = model.getValue("/root/main/stepinfo/info/times");
  3008. if( !isNull(selNo) && instance1.selectSingleNode("/root/temp/daylist/day[nm='" + selNo + "']/id") != null ){
  3009. //if( selNo != val ){
  3010. model.setValue("/root/main/stepinfo/info/times", selNo);
  3011. ipt_times.dispatch("xforms-value-changed");
  3012. //}
  3013. }
  3014. ]]>
  3015. </script>
  3016. <script type="javascript" ev:event="xforms-select">
  3017. <![CDATA[
  3018. //재원일수기준 변경에 따른 기존 마스터 변경을 위해 xforms-value-changed => xforms-select 이동 (20100120)
  3019. var stepno = parseInt(model.getValue("/root/main/stepinfo/info/stepno"));
  3020. var times = model.getValue("/root/main/stepinfo/info/times");
  3021. var memo = model.getValue("/root/main/stepinfo/info/stepmemo");
  3022. var stepnm = cmb_stepnm.label;
  3023. //이미 CPG 프로토콜 처방이 저장 된 경우, CP로 변경하는 경우이므로 스텝 삭제를 유도해야 함, CPG셋이 CP셋으로 갑자기 바뀌어서 기존 CP셋이 날라가는 경우가 생김 (2010.07.02)
  3024. if( cpgFlagCd == "02" && ivw_outline.model.getValue("/root/main/steplist/info[stepno='"+stepno+"']/settypecd") == "G" ){
  3025. messageBox( "[" + ivw_outline.model.getValue("/root/main/steplist/info[stepno='"+stepno+"']/stepnm") + "] 스텝에 CPG 프로토콜이 존재합니다.\n이 스텝을 삭제하고 다시 생성", "I008");
  3026. return;
  3027. }
  3028. ivw_outline.model.setValue( "/root/main/steplist/info[stepno='"+stepno+"']/times", times);
  3029. ivw_outline.model.setValue( "/root/main/steplist/info[stepno='"+stepno+"']/stepnm", ipt_times.label);
  3030. //ivw_outline.model.setValue( "/root/main/steplist/info[stepno='"+stepno+"']/tmpstepnm", ipt_times.label);
  3031. ivw_outline.grp_swimline.refresh();
  3032. if( ivw_outline.model.getValue("/root/main/steplist/info[stepno='"+stepno+"']/m") != "i" ){
  3033. ivw_outline.model.setValue( "/root/main/steplist/info[stepno='"+stepno+"']/m", "u" );
  3034. }
  3035. //cpg인 경우, cp 일자를 지정하는 것이므로 decirflag를 W로 setting (2010.06.26 JJE)
  3036. //if( cpgFlagCd == "02" )
  3037. //ivw_outline.model.setValue( "/root/main/steplist/info[stepno='"+stepno+"']/stepsettypecd", "W" );
  3038. ivw_outline.model.setValue( "/root/main/steplist/info[stepno='"+stepno+"']/settypecd", "W" );
  3039. //day 이미지를 생성한다.
  3040. ivw_outline.window.javascript.fSetDayImage(stepno, times, ipt_times.label, stepnm);
  3041. //선택한 스텝의 다음 라인에 퇴원스텝이 존재할 경우, 퇴원스텝의 times 재설정 (2008.11.12)
  3042. var curSwimLineNo = ivw_outline.model.getValue( "/root/main/steplist/info[stepno='"+stepno+"']/swimlineno");
  3043. ivw_outline.window.javascript.fChgDschTimes( parseInt(curSwimLineNo)+1 );
  3044. ]]>
  3045. </script>
  3046. </select1>
  3047. <button id="btn_detailpopup" class="btn5_letter6" style="left:880px; top:60px; width:86px; height:19px; ">
  3048. <caption>스텝상세정보</caption>
  3049. <script type="javascript" ev:event="DOMActivate">
  3050. <![CDATA[
  3051. fOpenStepDetlInfo();
  3052. ]]>
  3053. </script>
  3054. <hint>
  3055. <![CDATA[각 스텝의 상세 정보를 팝업으로 보여줍니다.]]>
  3056. </hint>
  3057. </button>
  3058. <button id="btn_outline_tab" class="btn_sw" group="tab" selected="true" style="left:1130px; top:59px; width:64px; height:22px; ">
  3059. <caption>OutLine</caption>
  3060. <script type="javascript" ev:event="DOMActivate">
  3061. <![CDATA[
  3062. if( ivw_outline.window.javascript.fViewDetailInfo(OpenerKind) != false){
  3063. preSelectedTab = "btn_outline_tab";
  3064. cap_outlineinfo.attribute("text") = "OutLine 정보";
  3065. ivw_outline.visible = true;
  3066. ivw_detail.visible = false;
  3067. }else{
  3068. document.controls(preSelectedTab).selected = true;
  3069. }
  3070. ]]>
  3071. </script>
  3072. </button>
  3073. <button id="btn_action_tab" class="btn_sw" group="tab" style="left:1075px; top:59px; width:54px; height:22px; ">
  3074. <caption>OCS</caption>
  3075. <script type="javascript" ev:event="DOMActivate">
  3076. <![CDATA[
  3077. if( ivw_outline.window.javascript.fViewDetailInfo(OpenerKind) != false ){
  3078. /*
  3079. if( btn_sizecntl.attribute("class") == "icon_left" ){
  3080. ivw_outline.ivw_detail.grd_prcplist.attribute("width") = "837px";
  3081. ivw_outline.ivw_detail.btn_excel.attribute("left") = "790px";
  3082. //ivw_outline.ivw_detail.btn_sizecntl.attribute("left") = "807px";
  3083. ivw_outline.ivw_detail.btn_sizecntl.visible = false;
  3084. }else{
  3085. ivw_outline.ivw_detail.grd_prcplist.attribute("width") = "1190px";
  3086. ivw_outline.ivw_detail.btn_excel.attribute("left") = "1117px";
  3087. ivw_outline.ivw_detail.btn_sizecntl.attribute("left") = "1162px";
  3088. ivw_outline.ivw_detail.btn_sizecntl.visible = true;
  3089. }
  3090. */
  3091. preSelectedTab = "btn_action_tab";
  3092. cap_outlineinfo.attribute("text") = "OCS 정보";
  3093. ivw_outline.visible = true;
  3094. ivw_detail.visible = false;
  3095. }else{
  3096. document.controls(preSelectedTab).selected = true;
  3097. }
  3098. ]]>
  3099. </script>
  3100. </button>
  3101. <button id="btn_detail_tab" class="btn_sw" group="tab" style="left:997px; top:59px; width:77px; height:22px; ">
  3102. <caption>환자계획표</caption>
  3103. <script type="javascript" ev:event="DOMActivate">
  3104. <![CDATA[
  3105. var msg = "";
  3106. if( preSelectedTab == "btn_action_tab" ){
  3107. if( ivw_outline.ivw_detail.instance1.selectSingleNode("/root/main/prcp/prcplist[status = 'i' or status = 'u' or status = 'd']") != null
  3108. || ivw_outline.ivw_detail.instance1.selectSingleNode("/root/main/form/forminfo/formlist[status = 'i' or status = 'd' or status = 'u']") != null
  3109. ){
  3110. msg = messageBox("저장되지 않은 정보가 존재합니다. 임시", "Q002");
  3111. }
  3112. }else if( preSelectedTab == "btn_outline_tab" ){
  3113. if( ivw_outline.instance1.selectSingleNode("/root/main/steplist/info[m = 'i' or m = 'u']/stepno") != null
  3114. || ivw_outline.instance1.selectSingleNode("/root/main/decisionlist/info[m = 'i' or m = 'u']/stepno") != null
  3115. || ivw_outline.instance1.selectSingleNode("/root/temp/delsteplist/info/stepno") != null
  3116. || ivw_outline.instance1.selectSingleNode("/root/temp/deldecisionlist/info/stepno") != null ){
  3117. msg = messageBox("저장되지 않은 정보가 존재합니다. 임시", "Q002");
  3118. }
  3119. }
  3120. if(msg == 6){
  3121. if( model.getValue("/root/temp/getdata/authflag") == "M" ){
  3122. btn_newver.dispatch("DOMActivate");
  3123. }
  3124. }else if(msg == 7){
  3125. document.controls(preSelectedTab).selected = true;
  3126. return false;
  3127. }
  3128. //공통코드 최초 조회 안되는 문제로 인해, 화면 visible 처리 전에 공통코드 조회하도록 위치 변경 (2011.07.04)
  3129. if(loading_detail_YN=="N"){
  3130. ivw_detail.window.javascript.fGetCodeList_Detail();
  3131. loading_detail_YN="Y";
  3132. }
  3133. if( changedYN == "Y" ){ //outline과 환자계획표의 sync를 맞춤
  3134. fSendDetailValue();
  3135. ivw_detail.window.javascript.toNo = 0;
  3136. ivw_detail.window.javascript.fInitGrigInfo();
  3137. changedYN = "N";
  3138. }
  3139. preSelectedTab = "btn_detail_tab";
  3140. cap_outlineinfo.attribute("text") = "환자계획표";
  3141. ivw_outline.visible = false;
  3142. ivw_detail.visible = true;
  3143. ]]>
  3144. </script>
  3145. </button>
  3146. <textarea id="tar_stepmemo" ref="/root/main/stepinfo/info/stepmemo" disabled="true" navindex="24" style="left:607px; top:34px; width:378px; height:19px; ">
  3147. <script type="javascript" ev:event="DOMFocusIn">
  3148. <![CDATA[
  3149. tar_stepmemo.attribute("height") = "50px";
  3150. tar_stepmemo.refresh();
  3151. ]]>
  3152. </script>
  3153. <script type="javascript" ev:event="DOMFocusOut">
  3154. <![CDATA[
  3155. tar_stepmemo.attribute("height") = "19px";
  3156. tar_stepmemo.refresh();
  3157. ]]>
  3158. </script>
  3159. <script type="javascript" ev:event="xforms-value-changed">
  3160. <![CDATA[
  3161. var stepno = parseInt(model.getValue("/root/main/stepinfo/info/stepno"));
  3162. var times = model.getValue("/root/main/stepinfo/info/times");
  3163. var memo = model.getValue("/root/main/stepinfo/info/stepmemo");
  3164. ivw_outline.model.setValue( "/root/main/steplist/info[" + stepno + "]/stepmemo", memo);
  3165. //ivw_outline.model.setValue( "/root/main/steplist/info[" + stepno + "]/times", times);
  3166. ivw_outline.grp_swimline.refresh();
  3167. if( ivw_outline.model.getValue("/root/main/steplist/info[" + stepno + "]/m") == "" ){
  3168. ivw_outline.model.setValue( "/root/main/steplist/info[" + stepno + "]/m", "u" );
  3169. }
  3170. ]]>
  3171. </script>
  3172. </textarea>
  3173. <select1 id="cmb_stepnm" ref="/root/main/stepinfo/info/daynm" class="combo_search" disabled="true" appearance="minimal" style="left:1135px; top:34px; width:58px; height:19px; ">
  3174. <choices>
  3175. <itemset nodeset="/root/temp/oplist/op">
  3176. <label ref="nm"/>
  3177. <value ref="id"/>
  3178. </itemset>
  3179. </choices>
  3180. <script type="javascript" ev:event="xforms-value-changed">
  3181. <![CDATA[
  3182. var stepno = parseInt(model.getValue("/root/main/stepinfo/info/stepno"));
  3183. var times = model.getValue("/root/main/stepinfo/info/times");
  3184. ivw_outline.model.setValue( "/root/main/steplist/info[" + stepno + "]/tmpstepnm", cmb_stepnm.label);
  3185. ivw_outline.grp_swimline.refresh();
  3186. if(ivw_outline.model.getValue("/root/main/steplist/info[" + stepno + "]/m") != "i" ){
  3187. ivw_outline.model.setValue( "/root/main/steplist/info[" + stepno + "]/m", "u" );
  3188. }
  3189. ivw_outline.window.javascript.fSetDayImage(stepno, times, ipt_times.label, cmb_stepnm.label);
  3190. ]]>
  3191. </script>
  3192. </select1>
  3193. <button id="btn_attr" class="btn_sw4" visibility="hidden" group="tab2" style="left:285px; top:5px; width:64px; height:22px; ">
  3194. <caption>속성관리</caption>
  3195. <script type="javascript" ev:event="DOMActivate">
  3196. <![CDATA[
  3197. //model.makeValue("/root/main/masterinfo/info/cpgattadmin", "A");
  3198. //model.makeValue("/root/main/masterinfo/info/stepattadmin", "");
  3199. setParameter("cpgattadmin", "A");
  3200. setParameter("stepattadmin", "");
  3201. fOpenAttAdm();
  3202. ]]>
  3203. </script>
  3204. </button>
  3205. <button id="btn_mntrorder" class="btn_sw10" visibility="hidden" group="tab3" style="left:213px; top:5px; width:136px; height:22px; ">
  3206. <caption>약속처방모니터링관리</caption>
  3207. <script type="javascript" ev:event="DOMActivate">
  3208. <![CDATA[
  3209. ]]>
  3210. </script>
  3211. </button>
  3212. <caption id="cap_ioflag" class="cell_1" style="left:0px; top:81px; width:85px; height:23px; ">외래/입원구분</caption>
  3213. <select1 id="rdo_ioflagcd" ref="/root/main/masterinfo/info/ioflagcd" navindex="3" appearance="full" cellspacing="25" cols="3" overflow="visible" style="left:88px; top:83px; width:207px; height:20px; border-style:none; ">
  3214. <choices>
  3215. <item>
  3216. <label>외래</label>
  3217. <value>O</value>
  3218. </item>
  3219. <item>
  3220. <label>입원</label>
  3221. <value>I</value>
  3222. </item>
  3223. </choices>
  3224. <script type="javascript" ev:event="xforms-value-changed">
  3225. <![CDATA[
  3226. // 2008.06.18 pymi
  3227. // 외래, 입원일때 day 일수 resetting
  3228. ipt_fcstinhospdayno.dispatch("onkeyup");
  3229. //fInitializeValue();
  3230. ]]>
  3231. </script>
  3232. </select1>
  3233. <line id="line4" class="line_2" style="x1:0px; y1:103px; x2:350px; y2:103px; "/>
  3234. <switch id="swt_cpgmain" style="left:0px; top:105px; width:353px; height:634px; ">
  3235. <case id="cpmaster" selected="true">
  3236. <caption id="caption24" class="cell_1" visibility="hidden" style="left:0px; top:197px; width:85px; height:85px; ">주호소</caption>
  3237. <caption id="cap_op" class="cell_1" style="left:0px; top:111px; width:85px; height:85px; ">
  3238. <![CDATA[수술]]>
  3239. <script type="javascript" ev:event="onclick">
  3240. <![CDATA[
  3241. fResizeGrid("grd_op");
  3242. ]]>
  3243. </script>
  3244. </caption>
  3245. <caption id="cap_cretdd" class="cell_1" style="left:0px; top:419px; width:85px; height:23px; ">생성일</caption>
  3246. <caption id="cap_diag" class="cell_1" style="left:0px; top:25px; width:85px; height:85px; ">
  3247. <![CDATA[진단]]>
  3248. <script type="javascript" ev:event="onclick">
  3249. <![CDATA[
  3250. fResizeGrid("grd_diag");
  3251. ]]>
  3252. </script>
  3253. </caption>
  3254. <button id="button1" class="icon_search" navindex="5" style="left:55px; top:149px; width:16px; height:16px; ">
  3255. <caption/>
  3256. <script type="javascript" ev:event="DOMActivate">
  3257. <![CDATA[
  3258. var rowcnt = grd_op.rows - grd_op.fixedRows;
  3259. model.setValue("/root/temp/lastrowcnt", rowcnt);
  3260. //setParameter("flag", "ICD");
  3261. setParameter("flag", "OPCD");
  3262. setParameter("usge", "CP");
  3263. // 2008.07.17 pymi
  3264. //modal("SPMQP01700", 1,1,1,"SPMQP01700", "/root/temp/lastrowcnt", "/root/temp/getdata/grdfocus");
  3265. open("SPMQP01700", 1,1,1,"SPMQP01700", "/root/temp/lastrowcnt", "/root/temp/getdata/grdfocus");
  3266. ]]>
  3267. </script>
  3268. </button>
  3269. <datagrid id="grd_drop" nodeset="/root/main/dropinfo/droplist" allowuserresize="true" caption="^^사유^^caption1" colsep="^" colwidth="0, 0, 225, 0, 0" ellipsis="true" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" tooltip="true" style="left:87px; top:199px; width:263px; height:80px; ">
  3270. <col ref="valuno" style="left:0px; top:23px; width:100px; height:23px; "/>
  3271. <col ref="histseq"/>
  3272. <col ref="valunm"/>
  3273. <col ref="flag"/>
  3274. <col ref="detlinfoseq"/>
  3275. <script type="javascript" ev:event="onmousedown">
  3276. <![CDATA[
  3277. if(event.button == 3){
  3278. if(grd_drop.isCell(event.target) && grd_drop.mouseRow >= grd_drop.fixedrows){
  3279. window.setPopupMenu(true, "/root/temp/popupmenu5/item", "name", "func", false);
  3280. }else{
  3281. window.setPopupMenu(false);
  3282. }
  3283. }
  3284. ]]>
  3285. </script>
  3286. <script type="javascript" ev:event="DOMFocusOut">
  3287. <![CDATA[
  3288. window.setPopupMenu(false);
  3289. ]]>
  3290. </script>
  3291. </datagrid>
  3292. <caption id="cap_cpgorddeptcd" class="cell_1" style="left:0px; top:370px; width:85px; height:23px; ">진료과</caption>
  3293. <input id="ipt_rgstrid" ref="/root/main/masterinfo/info/rgstrid" class="input_default" visibility="hidden" style="left:325px; top:466px; width:25px; height:19px; "/>
  3294. <button id="button2" class="btn2_letter2" navindex="19" style="left:307px; top:538px; width:42px; height:19px; ">
  3295. <caption>찾기</caption>
  3296. <script type="javascript" ev:event="DOMActivate">
  3297. <![CDATA[
  3298. var maxsize = upload1.attribute("filesize");
  3299. var files = window.fileDialog("open", "|", true);
  3300. var filelist = files.split("|");
  3301. if(isNull(filelist)){
  3302. return;
  3303. } else{
  3304. for(var i = 0 ; i < filelist.length ; i++ ) {
  3305. //파일 경로에서 이름을 자른다.
  3306. var fileNM = filelist[i].split("\\");
  3307. grd_attfile.addRow(false);
  3308. grd_attfile.valueMatrix(grd_attfile.rows - 1, 1) = fileNM[fileNM.length-1]; //로컬의 파일 명
  3309. grd_attfile.valueMatrix(grd_attfile.rows - 1, 2) = filelist[i]; //파일 데이터가 담기는 곳
  3310. grd_attfile.valueMatrix(grd_attfile.rows - 1, 3) = "0"; //디테일 시퀀스
  3311. grd_attfile.valueMatrix(grd_attfile.rows - 1, 4) = "false"; //체크여부
  3312. grd_attfile.valueMatrix(grd_attfile.rows - 1, 5) = ""; //저장 후 DB에 저장된 파일경로를 받아올 인스턴스
  3313. if (!checkFileSize(upload1)){
  3314. grd_attfile.removeItem();
  3315. messageBox("파일 크기가 최대치("+maxsize+"Byte)를", "E003");
  3316. }
  3317. }
  3318. }
  3319. ]]>
  3320. </script>
  3321. </button>
  3322. <caption id="cap_lastupdtdt" class="cell_1" style="left:176px; top:443px; width:85px; height:23px; ">최종수정일</caption>
  3323. <button id="button3" class="btn2_letter2" style="left:307px; top:558px; width:42px; height:19px; ">
  3324. <caption>삭제</caption>
  3325. <script type="javascript" ev:event="DOMActivate">
  3326. <![CDATA[
  3327. var iRow = grd_attfile.row;
  3328. if( iRow == null || iRow < 1){
  3329. var msg = messageBox("삭제할 파일명을 ", "C002");
  3330. return;
  3331. } else {
  3332. var status = grd_attfile.rowStatus(grd_attfile.row);
  3333. if(status == 1){
  3334. grd_attfile.deleteRow(grd_attfile.row, true);
  3335. }else{
  3336. /*
  3337. if(instance1.selectSingleNode("/root/main/attfileinfo/delattach") != null){
  3338. model.makeNode("/root/main/attfileinfo/delattach");
  3339. }
  3340. */
  3341. grd_attfile.rowStatus(grd_attfile.row) = 4;
  3342. /*
  3343. var cpgno = model.getValue("/root/main/masterinfo/info/cpgno");
  3344. var cpghistseq = model.getValue("/root/main/masterinfo/info/cpghistseq");
  3345. var detlinfoseq = model.getValue("/root/main/attfileinfo/attach[" + grd_attfile.row + "]/detlinfoseq");
  3346. var delFileInfo = grd_attfile.getUpdateData();
  3347. var header =delFileInfo.split("▩")[0];
  3348. var data = delFileInfo.split("▩")[1];
  3349. header = header + "▦cpgno▦cpghistseq▦detlinfoseq▩";
  3350. data = data + "▦" + cpgno + "▦" + cpghistseq + "▦" + detlinfoseq + "▩";
  3351. model.makeValue("/root/main/attfileinfo/delattach", header+data);
  3352. //submit("TXMQP00602");
  3353. */
  3354. }
  3355. }
  3356. ]]>
  3357. </script>
  3358. </button>
  3359. <line id="line10" class="line_2" style="x1:0px; y1:109px; x2:350px; y2:109px; "/>
  3360. <caption id="cap_attfile" class="cell_1" style="left:0px; top:534px; width:85px; height:96px; ">첨부파일</caption>
  3361. <button id="button19" class="icon_search" navindex="6" style="left:55px; top:232px; width:16px; height:16px; ">
  3362. <caption/>
  3363. <script type="javascript" ev:event="DOMActivate">
  3364. <![CDATA[
  3365. //drop cp별 관리를 위한 화면 처리로직 추가. 2008.06.20 LWS
  3366. setParameter("srchdrop", "Y");
  3367. var rowcnt = grd_drop.rows - grd_drop.fixedRows;
  3368. setParameter("lastrowcnt", rowcnt);
  3369. modal("SMMQP02600", "",1,1,"SMMQP02600", "/root/temp/lastrowcnt", "/root/temp/getdata/grdfocus");
  3370. clearParameter("srchdrop");
  3371. //open("SMMQP02600");
  3372. ]]>
  3373. </script>
  3374. </button>
  3375. <caption id="cap_drop" class="cell_1" style="left:0px; top:197px; width:85px; height:85px; ">
  3376. <![CDATA[Drop]]>
  3377. <script type="javascript" ev:event="onclick">
  3378. <![CDATA[
  3379. fResizeGrid("grd_drop");
  3380. ]]>
  3381. </script>
  3382. </caption>
  3383. <caption id="cap_appdd" class="cell_1" style="left:176px; top:419px; width:85px; height:23px; ">적용일</caption>
  3384. <line id="line22" class="line_2" style="x1:0px; y1:417px; x2:350px; y2:417px; "/>
  3385. <button id="button4" class="btn2_letter2" style="left:307px; top:578px; width:42px; height:19px; ">
  3386. <caption>다운</caption>
  3387. <script type="javascript" ev:event="DOMActivate">
  3388. <![CDATA[
  3389. //저장한 파일을 다운로드한다.
  3390. if( !(grd_attfile.row >= grd_attfile.fixedRows) ) {
  3391. messageBox("다운로드 할 파일을 ", "C002");
  3392. return;
  3393. } else if( model.getValue("/root/main/attfileinfo/attach[" + grd_attfile.row + "]/check") != "true" ) {
  3394. messageBox("저장되지 ", "E007");
  3395. return;
  3396. } else {
  3397. fDownLoadFile( grd_attfile.row );
  3398. }
  3399. ]]>
  3400. </script>
  3401. </button>
  3402. <input id="ipt_rgstrnm" ref="/root/main/masterinfo/info/rgstrnm" class="input_default" editable="false" style="left:263px; top:468px; width:86px; height:19px; "/>
  3403. <line id="line12" class="line_2" style="x1:0px; y1:281px; x2:350px; y2:281px; "/>
  3404. <line id="line23" class="line_2" style="x1:0px; y1:464px; x2:350px; y2:464px; "/>
  3405. <button id="button5" class="icon_search" navindex="6" style="left:54px; top:233px; width:16px; height:16px; ">
  3406. <caption/>
  3407. <script type="javascript" ev:event="DOMActivate">
  3408. <![CDATA[
  3409. //drop cp별 관리를 위한 화면 처리로직 추가. 2008.06.20 LWS
  3410. setParameter("srchdrop", "Y");
  3411. var rowcnt = grd_drop.rows - grd_drop.fixedRows;
  3412. setParameter("lastrowcnt", rowcnt);
  3413. modal("SMMQP02600", "",1,1,"SMMQP02600", "/root/temp/lastrowcnt", "/root/temp/getdata/grdfocus");
  3414. clearParameter("srchdrop");
  3415. //open("SMMQP02600");
  3416. ]]>
  3417. </script>
  3418. </button>
  3419. <datagrid id="grd_attfile" nodeset="/root/main/attfileinfo/attach" caption="파일명^경로^caption1^caption2^path" colsep="^" colwidth="175, 100, 30, 100, 27" ellipsis="true" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" tooltip="true" style="left:87px; top:535px; width:217px; height:95px; ">
  3420. <col ref="attfilenm"/>
  3421. <col ref="file" visibility="hidden"/>
  3422. <col ref="detlinfoseq" visibility="hidden"/>
  3423. <col ref="check" type="checkbox" visibility="hidden"/>
  3424. <col ref="path" visibility="hidden"/>
  3425. <script type="javascript" ev:event="onmouseover">
  3426. <![CDATA[
  3427. //grd_attfile.colDisabled(0) = true;
  3428. ]]>
  3429. </script>
  3430. </datagrid>
  3431. <caption id="cap_exclusion" class="cell_1" style="left:0px; top:283px; width:85px; height:85px; ">
  3432. <![CDATA[Exclusion
  3433. 사유]]>
  3434. <script type="javascript" ev:event="onclick">
  3435. <![CDATA[
  3436. fResizeGrid("grd_exclusion");
  3437. ]]>
  3438. </script>
  3439. </caption>
  3440. <datagrid id="grd_cc" nodeset="/root/main/ccinfo/cclist" visibility="hidden" caption="주호소코드^주호소명^caption1^caption2^caption3" colsep="^" colwidth="80, 145, 100, 100, 0" ellipsis="true" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" tooltip="true" style="left:87px; top:199px; width:263px; height:80px; ">
  3441. <col ref="termcd" style="left:0px; top:23px; width:100px; height:23px; "/>
  3442. <col ref="termengnm"/>
  3443. <col ref="termhngnm" visibility="hidden"/>
  3444. <col ref="termflag" visibility="hidden"/>
  3445. <col ref="detlinfoseq"/>
  3446. <script type="javascript" ev:event="onmousedown">
  3447. <![CDATA[
  3448. if(event.button == 3){
  3449. if(grd_cc.isCell(event.target) && grd_cc.mouseRow >= grd_cc.fixedrows){
  3450. window.setPopupMenu(true, "/root/temp/popupmenu3/item", "name", "func", false);
  3451. }else{
  3452. window.setPopupMenu(false);
  3453. }
  3454. }
  3455. ]]>
  3456. </script>
  3457. <script type="javascript" ev:event="DOMFocusOut">
  3458. <![CDATA[
  3459. window.setPopupMenu(false);
  3460. ]]>
  3461. </script>
  3462. </datagrid>
  3463. <datagrid id="grd_exclusion" nodeset="/root/main/exclusion/exclist" allowuserresize="true" caption="^^사유^^caption1" colsep="^" colwidth="0, 0, 225, 0, 0" ellipsis="true" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" tooltip="true" style="left:87px; top:285px; width:263px; height:80px; ">
  3464. <col ref="valuno" style="left:0px; top:23px; width:100px; height:23px; "/>
  3465. <col ref="histseq"/>
  3466. <col ref="valunm"/>
  3467. <col ref="flag"/>
  3468. <col ref="detlinfoseq"/>
  3469. <script type="javascript" ev:event="onmousedown">
  3470. <![CDATA[
  3471. if(event.button == 3){
  3472. if(grd_exclusion.isCell(event.target) && grd_exclusion.mouseRow >= grd_exclusion.fixedrows){
  3473. window.setPopupMenu(true, "/root/temp/popupmenu4/item", "name", "func", false);
  3474. }else{
  3475. window.setPopupMenu(false);
  3476. }
  3477. }
  3478. ]]>
  3479. </script>
  3480. <script type="javascript" ev:event="DOMFocusOut">
  3481. <![CDATA[
  3482. window.setPopupMenu(false);
  3483. ]]>
  3484. </script>
  3485. </datagrid>
  3486. <datagrid id="grd_op" nodeset="/root/main/opinfo/oplist" allowuserresize="true" autoresize="true" caption="수술코드^수술명^caption1^caption2^caption3" colsep="^" colwidth="80, 145, 100, 100, 0" ellipsis="true" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" tooltip="true" style="left:87px; top:112px; width:263px; height:80px; ">
  3487. <col ref="termcd" style="left:0px; top:23px; width:100px; height:23px; "/>
  3488. <col ref="termengnm"/>
  3489. <col ref="termhngnm" visibility="hidden"/>
  3490. <col ref="termflag" visibility="hidden"/>
  3491. <col ref="detlinfoseq"/>
  3492. <script type="javascript" ev:event="onmousedown">
  3493. <![CDATA[
  3494. if(event.button == 3){
  3495. if(grd_op.isCell(event.target) && grd_op.mouseRow >= grd_op.fixedrows){
  3496. window.setPopupMenu(true, "/root/temp/popupmenu2/item", "name", "func", false);
  3497. }else{
  3498. window.setPopupMenu(false);
  3499. }
  3500. }
  3501. ]]>
  3502. </script>
  3503. <script type="javascript" ev:event="DOMFocusOut">
  3504. <![CDATA[
  3505. window.setPopupMenu(false);
  3506. ]]>
  3507. </script>
  3508. </datagrid>
  3509. <line id="line15" class="line_2" style="x1:0px; y1:440px; x2:350px; y2:440px; "/>
  3510. <caption id="cap_swimlineno" class="cell_1" style="left:176px; top:394px; width:85px; height:23px; ">스윔라인 수</caption>
  3511. <line id="line18" class="line_2" style="x1:0px; y1:532px; x2:350px; y2:532px; "/>
  3512. <line id="line2" class="line_2" style="x1:0px; y1:392px; x2:350px; y2:392px; "/>
  3513. <line id="line19" class="line_2" style="x1:0px; y1:195px; x2:350px; y2:195px; "/>
  3514. <upload id="upload1" nodeset="/root/main/attfileinfo/attach/file" ext="zip" filecount="5" filesize="5242880" style="left:309px; top:604px; width:20px; height:20px; "/>
  3515. <line id="line5" class="line_2" style="x1:0px; y1:489px; x2:350px; y2:489px; "/>
  3516. <datagrid id="grd_diag" nodeset="/root/main/diaginfo/diaglist" allowuserresize="true" autoresize="true" caption="진단코드^진단명^caption1^caption2^caption3" colsep="^" colwidth="80, 145, 100, 101, 0" ellipsis="true" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" tooltip="true" style="left:87px; top:26px; width:263px; height:80px; ">
  3517. <col ref="termcd" style="left:0px; top:23px; width:100px; height:23px; "/>
  3518. <col ref="termengnm"/>
  3519. <col ref="termhngnm" visibility="hidden"/>
  3520. <col ref="termflag" visibility="hidden"/>
  3521. <col ref="detlinfoseq"/>
  3522. <script type="javascript" ev:event="onmousedown">
  3523. <![CDATA[
  3524. if(event.button == 3){
  3525. if(grd_diag.isCell(event.target) && grd_diag.mouseRow >= grd_diag.fixedrows){
  3526. window.setPopupMenu(true, "/root/temp/popupmenu1/item", "name", "func", false);
  3527. }else{
  3528. window.setPopupMenu(false);
  3529. }
  3530. }
  3531. ]]>
  3532. </script>
  3533. <script type="javascript" ev:event="DOMFocusOut">
  3534. <![CDATA[
  3535. window.setPopupMenu(false);
  3536. ]]>
  3537. </script>
  3538. </datagrid>
  3539. <line id="line6" class="line_2" style="x1:0px; y1:368px; x2:350px; y2:368px; "/>
  3540. <button id="button46" class="icon_search" navindex="4" style="left:54px; top:61px; width:16px; height:16px; ">
  3541. <caption/>
  3542. <script type="javascript" ev:event="DOMActivate">
  3543. <![CDATA[
  3544. var rowcnt = grd_diag.rows - grd_diag.fixedRows;
  3545. model.setValue("/root/temp/lastrowcnt", rowcnt);
  3546. setParameter("flag", "ICD"); //ICD10 or 진단코드
  3547. setParameter("usge", "CP");
  3548. // 2008.07.17 pymi
  3549. //modal("SPMQP01600", 1,1,1,"SPMQP01600", "/root/temp/lastrowcnt", "/root/temp/getdata/grdfocus"); //마지막 row no
  3550. open("SPMQP01600" , 1,1,1,"SPMQP01600", "/root/temp/lastrowcnt", "/root/temp/getdata/grdfocus");
  3551. ]]>
  3552. </script>
  3553. </button>
  3554. <button id="button14" class="icon_search" navindex="7" style="left:59px; top:337px; width:16px; height:16px; ">
  3555. <caption/>
  3556. <script type="javascript" ev:event="DOMActivate">
  3557. <![CDATA[
  3558. setParameter("srchexcls", "Y");
  3559. var rowcnt = grd_exclusion.rows - grd_exclusion.fixedRows;
  3560. setParameter("lastrowcnt", rowcnt);
  3561. modal("SMMQP02600", "",1,1,"SMMQP02600", "/root/temp/lastrowcnt", "/root/temp/getdata/grdfocus");
  3562. clearParameter("srchexcls");
  3563. ]]>
  3564. </script>
  3565. </button>
  3566. <caption id="cap_fcstinhospdayno" class="cell_1" style="left:0px; top:394px; width:85px; height:23px; ">재원일수</caption>
  3567. <line id="line9" class="line_3" style="x1:0px; y1:630px; x2:350px; y2:630px; "/>
  3568. <caption id="cap_memo" class="cell_1" style="left:0px; top:491px; width:85px; height:41px; ">메모</caption>
  3569. <caption id="cap_rgstrnm" class="cell_1" style="left:191px; top:467px; width:70px; height:23px; ">등록자</caption>
  3570. <caption id="cap_todd" class="cell_1" style="left:0px; top:443px; width:85px; height:23px; ">종료일</caption>
  3571. <caption id="cap_reqrlist" class="cell_1" style="left:0px; top:467px; width:85px; height:23px; ">요청자</caption>
  3572. <caption id="cap_cpgtypecd" class="cell_1" style="left:0px; top:0px; width:85px; height:23px; ">공유구분</caption>
  3573. <select1 id="cmb_cpgtypecd" ref="/root/main/masterinfo/info/cpgtypecd" navindex="4" appearance="full" cols="2" overflow="visible" style="left:88px; top:3px; width:142px; height:20px; border-style:none; ">
  3574. <choices>
  3575. <item>
  3576. <label>과내공유</label>
  3577. <value>D</value>
  3578. </item>
  3579. <item>
  3580. <label>병원공유</label>
  3581. <value>H</value>
  3582. </item>
  3583. </choices>
  3584. <script type="javascript" ev:event="xforms-value-changed">
  3585. <![CDATA[
  3586. fCngCpgType("T");
  3587. ]]>
  3588. </script>
  3589. </select1>
  3590. <line id="line31" class="line_2" style="x1:0px; y1:23px; x2:350px; y2:23px; "/>
  3591. </case>
  3592. <case id="cpgmaster">
  3593. <datagrid id="grd_popup" nodeset="/root/main/inqrinfo/inqrheader" allowuserresize="true" autoresize="true" caption="제목^Guideline" colsep="^" colwidth="100, 145" ellipsis="true" mergecellsfixedrows="bycolrec" rowsep="|" tooltip="true" style="left:87px; top:275px; width:263px; height:98px; ">
  3594. <col ref="title"/>
  3595. <col ref="guide"/>
  3596. </datagrid>
  3597. <datagrid id="grd_listsrch" nodeset="/root/main/scrninfo/mntrlist" allowuserresize="true" autoresize="true" caption="제목^코드명^caption1^caption3" colsep="^" colwidth="243, 40, 0, 0" ellipsis="true" mergecellsfixedrows="bycolrec" rowsep="|" tooltip="true" style="left:87px; top:73px; width:263px; height:98px; ">
  3598. <col ref="slipnm" style="left:0px; top:23px; width:100px; height:23px; "/>
  3599. <col visibility="hidden"/>
  3600. <col ref="sliphistno" visibility="hidden"/>
  3601. <col ref="slipno" visibility="hidden"/>
  3602. </datagrid>
  3603. <caption id="caption10" class="cell_1" style="left:0px; top:275px; width:85px; height:100px; ">
  3604. <![CDATA[팝업관리]]>
  3605. <script type="javascript" ev:event="onclick">
  3606. <![CDATA[
  3607. fCpgResizeGrid("grd_popup");
  3608. ]]>
  3609. </script>
  3610. </caption>
  3611. <caption id="caption11" class="cell_1" style="left:0px; top:376px; width:85px; height:100px; ">
  3612. <![CDATA[제한시간관리]]>
  3613. <script type="javascript" ev:event="onclick">
  3614. <![CDATA[
  3615. fCpgResizeGrid("grd_limitime");
  3616. ]]>
  3617. </script>
  3618. </caption>
  3619. <datagrid id="grd_limitime" nodeset="/root/main/limtminfo/limheaderinfo" allowuserresize="true" autoresize="true" caption="스탭명^기준시점^limno^caption3" colsep="^" colwidth="80, 165, 0, 0" ellipsis="true" mergecellsfixedrows="bycolrec" rowsep="|" tooltip="true" style="left:87px; top:376px; width:263px; height:98px; ">
  3620. <col ref="stepnm" style="left:0px; top:23px; width:100px; height:23px; "/>
  3621. <col ref="title"/>
  3622. <col ref="limno" visibility="hidden"/>
  3623. <col ref="limhistno" visibility="hidden"/>
  3624. </datagrid>
  3625. <button id="button21" class="icon_search" navindex="4" style="left:55px; top:318px; width:16px; height:16px; ">
  3626. <caption/>
  3627. <script type="javascript" ev:event="DOMActivate">
  3628. <![CDATA[
  3629. //model.makeValue("/root/main/masterinfo/info/cpgattadmin", "B");
  3630. //model.makeValue("/root/main/masterinfo/info/stepattadmin", "");
  3631. setParameter("cpgattadmin", "B");
  3632. setParameter("stepattadmin", "");
  3633. fOpenAttAdm();
  3634. /*
  3635. CPGadminObj = getOpenWindow("SPMQP00300");
  3636. if (CPGadminObj != null) {
  3637. CPGadminObj.window.javascript.model.dispatch("xforms-ready");
  3638. } else {
  3639. open("SPMQP00300", "", null, null, "SPMQP00300", "", "", "", false);
  3640. }
  3641. */
  3642. ]]>
  3643. </script>
  3644. </button>
  3645. <caption id="caption7" class="cell_1" style="left:0px; top:73px; width:85px; height:100px; ">
  3646. <![CDATA[대상자탐색]]>
  3647. <script type="javascript" ev:event="onclick">
  3648. <![CDATA[
  3649. fCpgResizeGrid("grd_listsrch");
  3650. ]]>
  3651. </script>
  3652. </caption>
  3653. <button id="button22" class="icon_search" navindex="4" style="left:55px; top:442px; width:16px; height:16px; ">
  3654. <caption/>
  3655. <script type="javascript" ev:event="DOMActivate">
  3656. <![CDATA[
  3657. //model.makeValue("/root/main/masterinfo/info/cpgattadmin", "C");
  3658. //model.makeValue("/root/main/masterinfo/info/stepattadmin", "");
  3659. setParameter("cpgattadmin", "C");
  3660. setParameter("stepattadmin", "");
  3661. fOpenAttAdm();
  3662. ]]>
  3663. </script>
  3664. </button>
  3665. <caption id="caption8" class="cell_1" style="left:0px; top:174px; width:85px; height:100px; ">
  3666. <![CDATA[환자상태감시]]>
  3667. <script type="javascript" ev:event="onclick">
  3668. <![CDATA[
  3669. fCpgResizeGrid("grd_patchk");
  3670. ]]>
  3671. </script>
  3672. </caption>
  3673. <button id="button20" class="icon_search" navindex="4" style="left:55px; top:242px; width:16px; height:16px; ">
  3674. <caption/>
  3675. <script type="javascript" ev:event="DOMActivate">
  3676. <![CDATA[
  3677. //model.makeValue("/root/main/masterinfo/info/cpgattadmin", "A");
  3678. //model.makeValue("/root/main/masterinfo/info/stepattadmin", "");
  3679. setParameter("cpgattadmin", "D"); //2009.02.16 JJE A->D로 수정 속성팝업에서 해당목적으로 자동 셋팅하기 위함
  3680. setParameter("stepattadmin", "");
  3681. fOpenAttAdm();
  3682. ]]>
  3683. </script>
  3684. </button>
  3685. <datagrid id="grd_patchk" nodeset="/root/main/mntrinfo/mntrlist" allowuserresize="true" autoresize="true" caption="제목^스텝명^코드명^caption1^caption3" colsep="^" colwidth="175, 68, 40, 0, 0" ellipsis="true" mergecellsfixedrows="bycolrec" rowsep="|" tooltip="true" style="left:87px; top:174px; width:263px; height:98px; ">
  3686. <col ref="slipnm" style="left:0px; top:23px; width:100px; height:23px; "/>
  3687. <col ref="stepnm"/>
  3688. <col visibility="hidden"/>
  3689. <col ref="sliphistno" visibility="hidden"/>
  3690. <col ref="slipno" visibility="hidden"/>
  3691. </datagrid>
  3692. <caption id="cap_swimlineno2" class="cell_1" style="left:0px; top:50px; width:85px; height:22px; ">스윔라인 수</caption>
  3693. <caption id="cap_fcstinhospdayno2" class="cell_1" style="left:176px; top:50px; width:85px; height:22px; ">재원일수</caption>
  3694. <caption id="cap_cretdd2" class="cell_1" style="left:0px; top:478px; width:85px; height:23px; ">생성일</caption>
  3695. <caption id="cap_appdd2" class="cell_1" style="left:176px; top:478px; width:85px; height:23px; ">적용일</caption>
  3696. <caption id="cap_todd2" class="cell_1" style="left:0px; top:503px; width:85px; height:23px; ">종료일</caption>
  3697. <caption id="cap_lastupdtdt2" class="cell_1" style="left:176px; top:503px; width:85px; height:23px; ">최종수정일</caption>
  3698. <button id="button6" class="icon_search" navindex="4" style="left:55px; top:134px; width:16px; height:16px; ">
  3699. <caption/>
  3700. <script type="javascript" ev:event="DOMActivate">
  3701. <![CDATA[
  3702. //model.makeValue("/root/main/masterinfo/info/cpgattadmin", "A");
  3703. //model.makeValue("/root/main/masterinfo/info/stepattadmin", "");
  3704. setParameter("cpgattadmin", "A");
  3705. setParameter("stepattadmin", "");
  3706. fOpenAttAdm();
  3707. ]]>
  3708. </script>
  3709. </button>
  3710. <caption id="cap_cpgorddeptcd2" class="cell_1" style="left:0px; top:25px; width:85px; height:23px; ">진료과</caption>
  3711. <caption id="cap_memo2" class="cell_1" style="left:0px; top:553px; width:85px; height:78px; ">
  3712. <![CDATA[메모]]>
  3713. <script type="javascript" ev:event="onclick">
  3714. <![CDATA[
  3715. fResizeGrid("grd_diag");
  3716. ]]>
  3717. </script>
  3718. </caption>
  3719. <caption id="cap_rgstrnm2" class="cell_1" style="left:191px; top:528px; width:70px; height:23px; ">등록자</caption>
  3720. <input id="ipt_rgstrnm2" ref="/root/main/masterinfo/info/rgstrnm" class="input_default" editable="false" style="left:263px; top:530px; width:86px; height:19px; "/>
  3721. <caption id="cap_reqrlist2" class="cell_1" style="left:0px; top:528px; width:85px; height:23px; ">요청자</caption>
  3722. <line id="line30" class="line_3" style="x1:0px; y1:630px; x2:350px; y2:630px; "/>
  3723. <line id="line24" class="line_2" style="x1:0px; y1:501px; x2:350px; y2:501px; "/>
  3724. <line id="line16" class="line_2" style="x1:0px; y1:172px; x2:345px; y2:172px; "/>
  3725. <line id="line17" class="line_2" style="x1:0px; y1:272px; x2:345px; y2:272px; "/>
  3726. <line id="line20" class="line_2" style="x1:0px; y1:374px; x2:345px; y2:374px; "/>
  3727. <line id="line25" class="line_2" style="x1:0px; y1:48px; x2:345px; y2:48px; "/>
  3728. <line id="line27" class="line_2" style="x1:0px; y1:551px; x2:345px; y2:551px; "/>
  3729. <line id="line28" class="line_2" style="x1:0px; y1:526px; x2:345px; y2:526px; "/>
  3730. <line id="line29" class="line_2" style="x1:0px; y1:476px; x2:350px; y2:476px; "/>
  3731. <line id="line14" class="line_2" style="x1:0px; y1:23px; x2:345px; y2:23px; "/>
  3732. <line id="line26" class="line_2" style="x1:0px; y1:71px; x2:345px; y2:71px; "/>
  3733. <caption id="caption2" class="cell_1" style="left:231px; top:0px; width:63px; height:23px; ">평가용</caption>
  3734. <bool id="bool1" navindex="5" checkvalue="Y,N" ref="/root/main/masterinfo/info/valusgeyn" style="left:270px; top:2px; width:25px; height:20px; ">
  3735. <script type="javascript" ev:event="xforms-select">
  3736. <![CDATA[
  3737. model.setValue("/root/main/masterinfo/info/valusgeyn", "Y");
  3738. ]]>
  3739. </script>
  3740. <script type="javascript" ev:event="xforms-deselect">
  3741. <![CDATA[
  3742. model.setValue("/root/main/masterinfo/info/valusgeyn", "N");
  3743. ]]>
  3744. </script>
  3745. </bool>
  3746. <button id="btn_valunm" class="btn2_letter3" navindex="19" style="left:296px; top:2px; width:53px; height:19px; ">
  3747. <caption>평가명*</caption>
  3748. <script type="javascript" ev:event="DOMActivate">
  3749. <![CDATA[
  3750. if( grp_inputvalunm.attribute("height") == 0 ){
  3751. grp_inputvalunm.attribute("height") = 115;
  3752. }else{
  3753. grp_inputvalunm.attribute("height") = 0;
  3754. }
  3755. ]]>
  3756. </script>
  3757. </button>
  3758. <caption id="cap_cpgtypecd2" class="cell_1" style="left:0px; top:0px; width:85px; height:23px; ">공유구분</caption>
  3759. <select1 id="cmb_cpgtypecd2" ref="/root/main/masterinfo/info/cpgtypecd" navindex="4" appearance="full" cols="2" overflow="visible" style="left:88px; top:2px; width:142px; height:20px; border-style:none; ">
  3760. <choices>
  3761. <item>
  3762. <label>과내공유</label>
  3763. <value>D</value>
  3764. </item>
  3765. <item>
  3766. <label>병원공유</label>
  3767. <value>H</value>
  3768. </item>
  3769. </choices>
  3770. <script type="javascript" ev:event="xforms-value-changed">
  3771. <![CDATA[
  3772. fCngCpgType("T");
  3773. ]]>
  3774. </script>
  3775. </select1>
  3776. </case>
  3777. </switch>
  3778. <line id="line21" class="line_2" style="x1:0px; y1:79px; x2:350px; y2:79px; "/>
  3779. <input id="ipt_swimlineno" ref="/root/main/masterinfo/info/swimlineno" class="input_default" disabled="true" navindex="9" imemode="disabled" format="###" style="left:264px; top:502px; width:86px; height:19px; ">
  3780. <script type="javascript" ev:event="xforms-value-changed">
  3781. <![CDATA[
  3782. var orgSwimLineNo = ivw_outline.model.getValue("/root/main/outlineinfo/info/swimlineno");
  3783. if( !isNull(orgSwimLineNo) && orgSwimLineNo != "0" ){
  3784. if( messageBox("Outline을", "Q010") != 6 ) return; //초기화여부
  3785. }
  3786. fCreateOutLineView();
  3787. //if( cpgFlagCd == "02" ) fSettingDayComboList();
  3788. //기본 스텝 셋을 자동으로 그려준다 (2009.03.05)
  3789. fCreateSteps(1);
  3790. /*
  3791. if(model.getValue("/root/main/masterinfo/info/fcstinhospdayno") == ""){
  3792. model.setValue("/root/main/masterinfo/info/fcstinhospdayno", model.getValue("/root/main/masterinfo/info/swimlineno"));
  3793. ipt_fcstinhospdayno.refresh();
  3794. }*/
  3795. if( cpgFlagCd == "01" && model.getValue("/root/main/masterinfo/info/swimlineno") != ""){
  3796. ipt_swimlineno.disabled = true;
  3797. }
  3798. ]]>
  3799. </script>
  3800. <script type="javascript" ev:event="onkeyup">
  3801. <![CDATA[
  3802. //CP만 재원일수가 입력됨.
  3803. if(event.keyCode == "13") {
  3804. var orgSwimLineNo = ivw_outline.model.getValue("/root/main/outlineinfo/info/swimlineno");
  3805. if( !isNull(orgSwimLineNo) && orgSwimLineNo != "0" ){
  3806. if( messageBox("Outline을", "Q010") != 6 ) return; //초기화여부
  3807. }
  3808. setInputNodeCurText();
  3809. fCreateOutLineView();
  3810. //if( cpgFlagCd == "02" ) fSettingDayComboList();
  3811. //기본 스텝 셋을 자동으로 그려준다 (2009.03.05)
  3812. fCreateSteps(1);
  3813. if( cpgFlagCd == "01" ){
  3814. if(model.getValue("/root/main/masterinfo/info/fcstinhospdayno") == ""){
  3815. model.setValue("/root/main/masterinfo/info/fcstinhospdayno", model.getValue("/root/main/masterinfo/info/swimlineno"));
  3816. ipt_fcstinhospdayno.refresh();
  3817. }
  3818. if(model.getValue("/root/main/masterinfo/info/swimlineno") != ""){
  3819. ipt_swimlineno.disabled = true;
  3820. }
  3821. }
  3822. }
  3823. ]]>
  3824. </script>
  3825. </input>
  3826. <input id="ipt_cretdd" ref="/root/main/masterinfo/info/cretdd" class="input_default" navindex="13" inputtype="date" style="left:88px; top:526px; width:86px; height:19px; "/>
  3827. <input id="ipt_fcstinhospdayno" ref="/root/main/masterinfo/info/fcstinhospdayno" class="input_default" navindex="11" imemode="disabled" format="###" style="left:88px; top:502px; width:86px; height:19px; ">
  3828. <script type="javascript" ev:event="xforms-value-changed">
  3829. <![CDATA[
  3830. fSettingDayComboList(); // 스윔라인 존재 여부와 상관 없이 무조건 콤보 세팅 (20100120)
  3831. //CP만 재원일수가 입력됨.
  3832. //if( cpgFlagCd == "01" ){
  3833. var swimlineCnt = model.getValue("/root/main/masterinfo/info/swimlineno");
  3834. if( swimlineCnt == "" || swimlineCnt == "0" ){
  3835. var dayno = model.getValue("/root/main/masterinfo/info/fcstinhospdayno");
  3836. model.setValue("/root/main/masterinfo/info/swimlineno", dayno);
  3837. ipt_swimlineno.refresh();
  3838. setInputNodeCurText();
  3839. fCreateOutLineView();
  3840. //if( messageBox("Outline을", "Q010") != 6 ) return; //초기화여부
  3841. //기본 스텝 셋을 자동으로 그려준다 (2009.03.05) 2009.03.05 (+)
  3842. if( ivw_outline.instance1.selectSingleNode("/root/main/steplist/info") == null ){
  3843. fCreateSteps(1);
  3844. }
  3845. }
  3846. //}
  3847. ]]>
  3848. </script>
  3849. <script type="javascript" ev:event="onkeyup">
  3850. <![CDATA[
  3851. //CP만 재원일수가 입력됨.
  3852. //if( cpgFlagCd == "01" ){
  3853. if(event.keyCode == "13") {
  3854. model.setValue("/root/main/masterinfo/info/fcstinhospdayno", ipt_fcstinhospdayno.currentText);
  3855. ipt_fcstinhospdayno.dispatch("xforms-value-changed");
  3856. model.setfocus("ipt_cretdd", true);
  3857. /*
  3858. var swimlineCnt = model.getValue("/root/main/masterinfo/info/swimlineno");
  3859. if( isNull(swimlineCnt) || swimlineCnt == "0" ){
  3860. fSettingDayComboList(); // 스윔라인 존재 여부와 상관 없이 무조건 콤보 세팅 (20100120)
  3861. var dayno = model.getValue("/root/main/masterinfo/info/fcstinhospdayno");
  3862. model.setValue("/root/main/masterinfo/info/swimlineno", dayno);
  3863. setInputNodeCurText();
  3864. model.setValue("/root/main/masterinfo/info/swimlineno", model.getValue("/root/main/masterinfo/info/fcstinhospdayno"));
  3865. ipt_swimlineno.refresh();
  3866. fCreateOutLineView();
  3867. //if( messageBox("Outline을", "Q010") != 6 ) return; //초기화여부
  3868. //기본 스텝 셋을 자동으로 그려준다 (2009.03.05)
  3869. if( ivw_outline.instance1.selectSingleNode("/root/main/steplist/info") == null ){
  3870. fCreateSteps(1);
  3871. }
  3872. }
  3873. */
  3874. }
  3875. //}
  3876. ]]>
  3877. </script>
  3878. </input>
  3879. <select1 id="cmb_cpgorddeptcd" ref="/root/main/masterinfo/info/cpgorddeptcd" class="combo_search" navindex="8" appearance="minimal" editmode="search" style="left:88px; top:477px; width:262px; height:19px; ">
  3880. <choices>
  3881. <itemset nodeset="/root/init/orddeptlist/dept">
  3882. <label ref="depthngnm"/>
  3883. <value ref="deptcd"/>
  3884. </itemset>
  3885. </choices>
  3886. <script type="javascript" ev:event="xforms-select">
  3887. <![CDATA[
  3888. if(cpgFlagCd == "01")
  3889. model.setFocus("ipt_fcstinhospdayno");
  3890. else
  3891. model.setFocus("ipt_swimlineno");
  3892. ]]>
  3893. </script>
  3894. <script type="javascript" ev:event="xforms-value-changed">
  3895. <![CDATA[
  3896. //원래 진료과와 선택한 진료과가 다르면, 진료과변경여부 instance에 "Y" 셋팅
  3897. if( model.getValue("/root/temp/oldcpgorddeptcd") != model.getValue("/root/main/masterinfo/info/cpgorddeptcd") ){
  3898. model.setValue("/root/temp/deptchngyn", "Y");
  3899. }else{
  3900. model.setValue("/root/temp/deptchngyn", "N");
  3901. }
  3902. //요청번호:1580 진료과 멀티 선택 (병원용)
  3903. fCngCpgType("D");
  3904. ]]>
  3905. </script>
  3906. </select1>
  3907. <input id="ipt_appdd" ref="/root/main/masterinfo/info/appdd" class="input_default" navindex="14" inputtype="date" style="left:264px; top:526px; width:86px; height:19px; "/>
  3908. <input id="ipt_lastupdtdt" ref="/root/main/masterinfo/info/lastupdtdt" class="input_default" navindex="16" inputtype="date" style="left:264px; top:550px; width:86px; height:19px; "/>
  3909. <input id="ipt_todd" ref="/root/main/masterinfo/info/todd" class="input_default" navindex="15" inputtype="date" style="left:88px; top:550px; width:86px; height:19px; "/>
  3910. <select1 id="cmb_reqrlist" ref="/root/main/reqrlist/reqrid" appearance="minimal" editmode="input" style="left:88px; top:574px; width:67px; height:19px; ">
  3911. <choices>
  3912. <itemset nodeset="/root/main/reqrlist/list">
  3913. <label ref="usernm"/>
  3914. <value ref="userid"/>
  3915. </itemset>
  3916. </choices>
  3917. <script type="javascript" ev:event="xforms-value-changed">
  3918. <![CDATA[
  3919. //var iFcs = cmb_reqrlist.focusIndex + 1;
  3920. //model.setValue("/root/main/reqrlist/reqrid", model.getValue("/root/main/reqrlist/list[" + iFcs + "]/userid"));
  3921. ]]>
  3922. </script>
  3923. <script type="javascript" ev:event="onkeyup">
  3924. <![CDATA[
  3925. //model.setFocus("ipt_reqrnm");
  3926. ]]>
  3927. </script>
  3928. <script type="javascript" ev:event="onkeydown">
  3929. <![CDATA[
  3930. if(event.keyCode == "13") {
  3931. btn_srchreqr.dispatch("DOMActivate");
  3932. }
  3933. ]]>
  3934. </script>
  3935. </select1>
  3936. <textarea id="txt_memo" ref="/root/main/masterinfo/info/cpgmemo" navindex="18" style="left:88px; top:598px; width:262px; height:39px; "/>
  3937. <button id="btn_srchreqr" class="icon_search" navindex="17" style="left:157px; top:576px; width:16px; height:16px; ">
  3938. <caption/>
  3939. <script type="javascript" ev:event="DOMActivate">
  3940. <![CDATA[
  3941. model.removeNodeset("/root/main/tempuserinfo");
  3942. model.makeValue("/root/main/userpopupinfo/param", "_OneS");
  3943. model.makeValue("/root/main/userpopupinfo/flag", "usernm");
  3944. model.makeValue("/root/main/userpopupinfo/searchitem", cmb_reqrlist.label );
  3945. modal("../../userdeptinfoweb/xrw/SPZSU10103", "", "200", "200", "SPZSU10103","/root/main/userpopupinfo","/root/main/temp");
  3946. var ref = "/root/main/tempuserinfo";
  3947. model.makeNode(ref);
  3948. var iParam = getParameter("SPZSU10103_");
  3949. setCSVToNode(ref, iParam, "list");
  3950. var totalItemCnt = cmb_reqrlist.length + 1;
  3951. var nodeList = instance1.selectNodes(ref+"/list");
  3952. for(var i=0; i<nodeList.length; i++){
  3953. var node = nodeList.item(i);
  3954. var id = node.selectSingleNode("userid");
  3955. var nm = node.selectSingleNode("usernm");
  3956. model.makeNode("/root/main/reqrlist/list[" + totalItemCnt + "]");
  3957. model.makeValue("/root/main/reqrlist/list[" + totalItemCnt + "]/userid", id.value);
  3958. model.makeValue("/root/main/reqrlist/list[" + totalItemCnt + "]/usernm", nm.value);
  3959. model.makeValue("/root/main/reqrlist/list[" + totalItemCnt + "]/flag", "U01");
  3960. model.makeValue("/root/main/reqrlist/list[" + totalItemCnt + "]/detlinfoseq", "");
  3961. model.makeValue("/root/main/reqrlist/list[" + totalItemCnt + "]/m", "i");
  3962. totalItemCnt++;
  3963. }
  3964. clearParameter("SPZSU10103_");
  3965. model.removeNodeset("/root/main/userpopupinfo");
  3966. cmb_reqrlist.refresh();
  3967. ]]>
  3968. </script>
  3969. </button>
  3970. <button id="btn_delreqr" class="icon_minus" style="left:176px; top:576px; width:13px; height:15px; ">
  3971. <caption/>
  3972. <script type="javascript" ev:event="DOMActivate">
  3973. <![CDATA[
  3974. //var reqrid = model.getValue("/root/main/reqrlist/reqrid");
  3975. var iFcs = cmb_reqrlist.focusIndex + 1;
  3976. if( cmb_reqrlist.focusIndex < 0 ){
  3977. var msg = messageBox("삭제할 요청자를 ", "C002");
  3978. return;
  3979. } else {
  3980. if(model.getValue("/root/main/reqrlist/list[" + iFcs + "]/m") != "i"){
  3981. model.setValue("/root/main/reqrlist/list[" + iFcs + "]/m", "d");
  3982. fSaveCPGInfo();
  3983. }
  3984. model.removeNodeset("/root/main/reqrlist/list[m = 'd']");
  3985. model.setValue("/root/main/reqrlist/reqrid", "");
  3986. cmb_reqrlist.refresh();
  3987. }
  3988. cmb_reqrlist.deselect();
  3989. ]]>
  3990. </script>
  3991. <help>
  3992. <![CDATA[삭제할 요청자를 선택해주세요.]]>
  3993. </help>
  3994. </button>
  3995. <caption id="cap_day" class="cell_1" style="left:988px; top:33px; width:50px; height:23px; ">DAY</caption>
  3996. <caption id="cap_stepmemo" class="cell_1" style="left:524px; top:33px; width:80px; height:23px; ">STEP 개요</caption>
  3997. <group id="grp_cpgorddeptinfo" visibility="hidden" style="left:5px; top:220px; width:345px; height:255px; border-style:solid; ">
  3998. <datagrid id="grd_cpgorddeptinfo" nodeset="/root/main/orddeptlist/dept" visibility="hidden" caption="^caption2^진료과를 선택하세요." colsep="^" colwidth="21, 0, 176" mergecellsfixedrows="bycolrec" rowsep="|" style="left:0px; top:-1px; width:339px; height:250px; ">
  3999. <col checkvalue="Y,N" ref="checkyn" type="checkbox"/>
  4000. <col ref="deptcd"/>
  4001. <col ref="depthngnm"/>
  4002. </datagrid>
  4003. <select id="checkbox1" ref="/root/temp/multideptcdlist" overflow="scroll" scroll="vertical" appearance="full" cols="2" sep="," style="left:0px; top:4px; width:342px; height:248px; border-style:none; ">
  4004. <choices>
  4005. <itemset nodeset="/root/main/orddeptlist/dept">
  4006. <label ref="depthngnm"/>
  4007. <value ref="deptcd"/>
  4008. </itemset>
  4009. </choices>
  4010. <script type="javascript" ev:event="xforms-value-changed">
  4011. <![CDATA[
  4012. // /root/temp/multideptcdlist
  4013. ]]>
  4014. </script>
  4015. </select>
  4016. </group>
  4017. <button id="btn_getdept" class="btn2_letter2" navindex="8" visibility="hidden" style="left:308px; top:477px; width:42px; height:19px; ">
  4018. <caption>선택*</caption>
  4019. <script type="javascript" ev:event="DOMActivate">
  4020. <![CDATA[
  4021. if( grp_cpgorddeptinfo.visible == false ){
  4022. grp_cpgorddeptinfo.visible = true;
  4023. btn_getdept.attribute("text") = "닫기";
  4024. btn_getdept.refresh();
  4025. }else{
  4026. grp_cpgorddeptinfo.visible = false;
  4027. //var nodelist = instance1.selectNodes( "/root/main/orddeptlist/dept[checkyn='Y']" );
  4028. if( !isNull(model.getValue("/root/temp/multideptcdlist")) ){
  4029. btn_getdept.attribute("text") = "선택";
  4030. //@@
  4031. var deptcd_tmp = model.getValue("/root/temp/multideptcdlist").split(",");
  4032. var deptnm_tmp = "";
  4033. var multideptnmlist = "";
  4034. for(var i=0; i < deptcd_tmp.length; i++){
  4035. deptnm_tmp = model.getValue( "/root/main/orddeptlist/dept[deptcd='"+deptcd_tmp[i]+"']/depthngnm" );
  4036. multideptnmlist = multideptnmlist + deptnm_tmp + ",";
  4037. }
  4038. multideptnmlist = multideptnmlist.substr(0, multideptnmlist.length-1);
  4039. model.setValue("/root/temp/multideptnmlist", multideptnmlist);
  4040. ipt_cpgorddeptnm.refresh();
  4041. }else{
  4042. btn_getdept.attribute("text") = "선택*";
  4043. }
  4044. btn_getdept.refresh();
  4045. }
  4046. ]]>
  4047. </script>
  4048. </button>
  4049. <group id="grp_inputvalunm" style="left:355px; top:190px; width:264px; height:112px; background-color:#ffffff; border-color:#000000; border-style:none; ">
  4050. <shape id="roundrect2" class="roundrect_btnset" appearance="roundrect" style="left:2px; top:1px; width:258px; height:109px; border-width:3; "/>
  4051. <button id="button11" class="btn2_letter2" style="left:210px; top:85px; width:42px; height:19px; ">
  4052. <caption>닫기</caption>
  4053. <script type="javascript" ev:event="DOMActivate">
  4054. <![CDATA[
  4055. if( !isNull(model.getValue("/root/main/masterinfo/info/valunm")) ){
  4056. btn_valunm.attribute("text") = "평가명";
  4057. }
  4058. grp_inputvalunm.attribute("height") = 0;
  4059. ]]>
  4060. </script>
  4061. </button>
  4062. <img id="img2" src="../../../com/commonweb/images/icon_n.gif" style="left:7px; top:10px; width:10px; height:13px; background-stretch:stretch; "/>
  4063. <caption id="caption3" style="left:20px; top:5px; width:231px; height:28px; ">평가명을 입력해주세요.</caption>
  4064. <textarea id="textarea1" ref="/root/main/masterinfo/info/valunm" style="left:22px; top:30px; width:230px; height:50px; "/>
  4065. </group>
  4066. <input id="ipt_cpgorddeptnm" ref="/root/temp/multideptnmlist" visibility="hidden" editable="false" style="left:88px; top:477px; width:217px; height:19px; ">
  4067. <script type="javascript" ev:event="onclick">
  4068. <![CDATA[
  4069. btn_getdept.dispatch("DOMActivate");
  4070. ]]>
  4071. </script>
  4072. </input>
  4073. <input id="ipt_cpgorddeptcd" ref="/root/temp/multideptcdlist" visibility="hidden" editable="false" style="left:88px; top:477px; width:32px; height:19px; ">
  4074. <script type="javascript" ev:event="onclick">
  4075. <![CDATA[
  4076. btn_getdept.dispatch("DOMActivate");
  4077. ]]>
  4078. </script>
  4079. </input>
  4080. <button id="btn_essprcpinfo" class="btn5_letter6" visibility="hidden" style="left:791px; top:60px; width:86px; height:19px; ">
  4081. <caption>필수처방정보</caption>
  4082. <script type="javascript" ev:event="DOMActivate">
  4083. <![CDATA[
  4084. open("SPMMP04100");
  4085. ]]>
  4086. </script>
  4087. </button>
  4088. </group>
  4089. <group id="grp_btn" style="left:0px; top:755px; width:1195px; height:27px; ">
  4090. <button id="button8" class="btn4_letter2" visibility="hidden" style="left:72px; top:4px; width:56px; height:22px; ">
  4091. <caption>삭제</caption>
  4092. <script type="javascript" ev:event="DOMActivate">
  4093. <![CDATA[
  4094. if( fDelCPG() != false ){
  4095. btn_initialize.dispatch("DOMActivate");
  4096. model.resetInstanceNode("/root/temp/copynodeset/masterinfo");
  4097. }
  4098. ]]>
  4099. </script>
  4100. </button>
  4101. <button id="btn_allInfoSave" class="btn4_letter2" style="left:1137px; top:5px; width:56px; height:22px; ">
  4102. <caption>등록</caption>
  4103. <script type="javascript" ev:event="DOMActivate">
  4104. <![CDATA[
  4105. if(model.getValue("/root/main/masterinfo/info/todd") <= getCurrentDate()){
  4106. messageBox(cpgFlagNM + " 삭제를 하시려면 저장버튼을", "C002");
  4107. return;
  4108. }
  4109. if( fSaveDataCheck( "master" ) == false ) {
  4110. return;
  4111. }
  4112. var appDate = model.getValue("/root/main/masterinfo/info/appdd");
  4113. if( isNull(appDate) ){
  4114. var msg = messageBox("오늘 일자로", "Q014");
  4115. }else{
  4116. var msg = messageBox(appDate.substr(4,2)+"월 "+appDate.substr(6,2)+"일부터 진료프로그램에서 사용가능하게 됩니다.\n", "Q014");
  4117. }
  4118. if( msg != "6" ){
  4119. if( isNull(appDate) ){
  4120. messageBox("적용일을", "C001");
  4121. }
  4122. return;
  4123. }else{
  4124. if( isNull(appDate) ){
  4125. model.setValue("/root/main/masterinfo/info/appdd", getCurrentDate());
  4126. }
  4127. }
  4128. var cpgno = model.getValue("/root/main/masterinfo/info/cpgno");
  4129. var ver = model.getValue("/root/main/masterinfo/info/cpghistseq");
  4130. var tmpyn = model.getValue("/root/main/masterinfo/info/tmpyn");
  4131. var str = "N";
  4132. model.setValue("/root/temp/oldcpgno" , cpgno);
  4133. model.setValue("/root/temp/oldcpghistseq" , ver);
  4134. model.setValue("/root/temp/oldtmpyn" , tmpyn);
  4135. model.setValue("/root/temp/saveflag", "S");
  4136. model.setValue("/root/main/masterinfo/info/tmpyn", "N");
  4137. model.setValue("/root/temp/mstatus", "i");
  4138. str = "Q";
  4139. if( !isNull(ver) ){
  4140. saveIndxlist = "▩▦▦▦▦▦▦▦▦▦▦"; //새로운 색인 저장을 막는다
  4141. fDelCPG(); //현재 버전 데이터를 삭제처리 하기위해 현재 cp정보를 컬럼에 따로 담음
  4142. // "/root/main/delmasterinfo/" + delcpgno , delcpghistseq , delcpgflagcd
  4143. //model.setValue("/root/main/masterinfo/info/cpghistseq", ""); //MAX+1하기 위해 비워 보낸다
  4144. }
  4145. if( ivw_outline.ivw_detail.visible == true && !isNull(cpgno) ){
  4146. OcsSaveYN = "Y";
  4147. }
  4148. fSettingStatus();
  4149. if( fSaveCPGInfo() == false ){
  4150. //원래 cpgno, cpghistseq를 복원 (2010.05.20 JJE)
  4151. model.setValue("/root/main/masterinfo/info/cpgno", cpgno);
  4152. model.setValue("/root/main/masterinfo/info/cpghistseq", ver);
  4153. model.setValue("/root/main/masterinfo/info/tmpyn", tmpyn);
  4154. return;
  4155. }
  4156. //grp_inputcpname.visible = false;
  4157. cmb_cpgorddeptcd.disabled = true;
  4158. if(instance1.selectSingleNode("/root/temp/tempnode/prms/newsetno") != null){
  4159. ivw_outline.window.javascript.fSetStepSetNo(); //바뀐 셋번호를 다시 세팅해준다
  4160. model.resetInstanceNode("/root/temp/tempnode");
  4161. }
  4162. if( ivw_outline.ivw_detail.visible == true && !isNull(cpgno) ){
  4163. ivw_outline.ivw_detail.window.javascript.fExePrmsSetInfo(str);
  4164. changedYN = "Y";
  4165. }
  4166. model.refresh();
  4167. //closeLoadingBar(); //loading 메세지 닫기
  4168. //색인팝업이 열려있는 경우, 색인 재조회 (2010.03.31 JJE)
  4169. var openObj = getOpenWindow("SPMMP01200");
  4170. if(openObj != null) {
  4171. openObj.btn_indexInitialize.dispatch("DOMActivate");
  4172. }
  4173. ]]>
  4174. </script>
  4175. <help>
  4176. <![CDATA[적용 가능한 CP로 등록합니다.]]>
  4177. </help>
  4178. </button>
  4179. <button id="btn_initialize" class="btn4_letter3" style="left:1px; top:4px; width:68px; height:22px; ">
  4180. <caption>초기화</caption>
  4181. <script type="javascript" ev:event="DOMActivate">
  4182. <![CDATA[
  4183. if(ivw_outline.selected){
  4184. ivw_outline.window.javascript.fViewDetailInfo();
  4185. }
  4186. ipt_cpgnm.disabled = false;
  4187. rdo_cpgflagcd.disabled = false;
  4188. rdo_ioflagcd.disabled = false;
  4189. //textarea1.disabled = false;
  4190. btn_newnm.disabled = true;
  4191. model.resetInstanceNode("/root/main/masterinfo");
  4192. if(ipt_cpaprvno.value == "") {
  4193. ipt_cpaprvno.value = "승인번호";
  4194. }
  4195. btn_valunm.attribute("text") = "평가명*";
  4196. btn_getdept.attribute("text") = "선택*";
  4197. model.removeNodeset("/root/main/diaginfo/diaglist");
  4198. model.removeNodeset("/root/main/opinfo/oplist");
  4199. model.removeNodeset("/root/main/ccinfo/cclist");
  4200. model.removeNodeset("/root/main/attfileinfo/attach");
  4201. model.removeNodeset("/root/main/exclusion/exclist");
  4202. model.removeNodeset("/root/main/dropinfo/droplist");
  4203. model.removeNodeset("/root/main/indexinfo/item");
  4204. model.removeNodeset("/root/main/steplist/info");
  4205. model.removeNodeset("/root/main/decisionlist/info");
  4206. model.removeNodeset("/root/main/sortedsteplist/info");
  4207. model.resetInstanceNode("/root/main/stepinfo/info");
  4208. model.resetInstanceNode("/root/main/tempuserinfo");
  4209. model.removeNodeset("/root/main/reqrlist");
  4210. model.makeNode("/root/main/reqrlist/list");
  4211. model.makeValue("/root/main/reqrlist/reqrid", "");
  4212. model.makeValue("/root/main/reqrlist/inputreqrnm", "");
  4213. ivw_outline.model.removeNodeset("/root/main/steplist");
  4214. ivw_outline.model.removeNodeset("/root/main/decisionlist");
  4215. ivw_outline.model.removeNodeset("/root/temp/delsteplist");
  4216. ivw_outline.model.removeNodeset("/root/temp/deldecisionlist");
  4217. ivw_outline.model.removeNodeset("/root/main/sortedsteplist/info");
  4218. model.setValue("/root/main/masterinfo/info/cpgflagcd", "01");
  4219. model.setValue("/root/main/masterinfo/info/ioflagcd", "I");
  4220. model.setValue("/root/main/masterinfo/info/cpgtypecd", "D");
  4221. model.setValue("/root/main/masterinfo/info/valusgeyn", "N");
  4222. model.setValue("/root/temp/multideptcdlist", "");
  4223. model.setValue("/root/temp/multideptnmlist", "");
  4224. ipt_cpgorddeptnm.refresh();
  4225. fInitializeValue();
  4226. cmb_cpgorddeptcd.disabled = false;
  4227. model.refresh();
  4228. grd_diag.rowhidden(0) = true;
  4229. grd_op.rowhidden(0) = true;
  4230. grd_cc.rowhidden(0) = true;
  4231. grd_exclusion.rowhidden(0) = true;
  4232. grd_drop.rowhidden(0) = true;
  4233. ivw_outline.ivw_detail.visible = false;
  4234. if(ivw_detail.visible == true){
  4235. ivw_outline.visible = true
  4236. }
  4237. ivw_detail.visible = false;
  4238. fCreateOutLineView();
  4239. ]]>
  4240. </script>
  4241. </button>
  4242. <button id="btn_newver" class="btn4_letter2" style="left:1079px; top:4px; width:56px; height:22px; ">
  4243. <caption>저장</caption>
  4244. <script type="javascript" ev:event="DOMActivate">
  4245. <![CDATA[
  4246. //삭제 시 한번 물어봄 (2008.10.06)
  4247. if(model.getValue("/root/main/masterinfo/info/todd") <= getCurrentDate()){
  4248. if( messageBox(cpgFlagNM + "를", "Q001") == 7 ){
  4249. return;
  4250. }
  4251. }
  4252. if( fSaveDataCheck( "master" ) == false ) {
  4253. return;
  4254. }
  4255. var cpgno = model.getValue("/root/main/masterinfo/info/cpgno");
  4256. var ver = model.getValue("/root/main/masterinfo/info/cpghistseq");
  4257. var tmpyn = model.getValue("/root/main/masterinfo/info/tmpyn"); //임시(미등록) 여부
  4258. model.setValue("/root/temp/oldcpgno", cpgno);
  4259. model.setValue("/root/temp/oldcpghistseq", ver);
  4260. model.setValue("/root/temp/oldtmpyn", tmpyn);
  4261. model.setValue("/root/temp/saveflag", "T");
  4262. model.setValue("/root/main/masterinfo/info/tmpyn", "Y");
  4263. model.setValue("/root/temp/mstatus", "i");
  4264. if( !isNull(cpgno) && !isNull(ver) ){
  4265. //1. 최초 미등록
  4266. //2. 등록 -> 미등록
  4267. //3. 미등록 -> 미등록
  4268. saveIndxlist = "";
  4269. /*if( isNull(ver) ){
  4270. //1. 최초 미등록
  4271. model.setValue("/root/main/masterinfo/info/cpghistseq", "1");
  4272. }else{*/
  4273. //2. 등록 -> 미등록
  4274. if(model.getValue("/root/main/masterinfo/info/todd") > getCurrentDate()){ //삭제 시 조회 후 seq 그대로 남음 처리 (2008.10.06)
  4275. model.setValue("/root/main/masterinfo/info/cpghistseq", ""); //parseInt(ver)+1 or MAX+1하기 위해 비워 보낸다
  4276. fSettingStatus(); //각종 데이터의 status를 i로 바꾼다(새버전으로 저장하기 위함)
  4277. }
  4278. saveIndxlist = "▩▦▦▦▦▦▦▦▦▦▦"; //새로운 색인 저장을 막는다 (여기다 두면 제대로 색인저장이 되는지?)
  4279. //}
  4280. }
  4281. if( ivw_outline.ivw_detail.visible == true && !isNull(cpgno) ){
  4282. OcsSaveYN = "Y";
  4283. }else {
  4284. var SetNodeList = ivw_outline.instance1.selectSingleNode("/root/main/steplist/info[setno != '']");
  4285. if( SetNodeList != null ){
  4286. OcsSaveYN = "Y";
  4287. }else{
  4288. OcsSaveYN = "N";
  4289. }
  4290. }
  4291. if ( fSaveCPGInfo() == false ){
  4292. //원래 cpgno, cpghistseq를 복원 (2010.05.20 JJE)
  4293. model.setValue("/root/main/masterinfo/info/cpgno", cpgno);
  4294. model.setValue("/root/main/masterinfo/info/cpghistseq", ver);
  4295. model.setValue("/root/main/masterinfo/info/tmpyn", tmpyn);
  4296. return;
  4297. }
  4298. //grp_inputcpname.visible = false;
  4299. if(instance1.selectSingleNode("/root/temp/tempnode/prms/newsetno") != null){
  4300. ivw_outline.window.javascript.fSetStepSetNo(); //바뀐 셋번호를 다시 세팅해준다
  4301. model.resetInstanceNode("/root/temp/tempnode");
  4302. }
  4303. //if(btn_action_tab.selected == true){
  4304. if( ivw_outline.ivw_detail.visible == true && !isNull(cpgno) ){
  4305. ivw_outline.ivw_detail.window.javascript.fExePrmsSetInfo("T");
  4306. changedYN = "Y";
  4307. }
  4308. model.refresh();
  4309. //closeLoadingBar(); //loading 메세지 닫기
  4310. //색인팝업이 열려있는 경우, 색인 재조회 (2010.03.31 JJE)
  4311. var openObj = getOpenWindow("SPMMP01200");
  4312. if(openObj != null) {
  4313. openObj.btn_indexInitialize.dispatch("DOMActivate");
  4314. }
  4315. ]]>
  4316. </script>
  4317. <hint>
  4318. <![CDATA[미등록 상태로 저장합니다.]]>
  4319. </hint>
  4320. </button>
  4321. <button id="btn_newnm" class="btn4_letter5" style="left:984px; top:4px; width:92px; height:22px; ">
  4322. <caption>새이름으로</caption>
  4323. <script type="javascript" ev:event="DOMActivate">
  4324. <![CDATA[
  4325. if( fSaveDataCheck( "master" ) == false ) {
  4326. return;
  4327. }
  4328. model.setValue("/root/main/masterinfo/info/cpgnm", model.getValue("/root/main/masterinfo/info/orgcpgnm")); //실제 CP명을 보여줌
  4329. ipt_newcpgnm.refresh();
  4330. cap_newcpgnm.attribute("text") = cpgFlagNM + "명";
  4331. grp_inputcpname.attribute("height") = 80; //grp_inputcpname.visible = true;
  4332. grp_biz.disabled = true;
  4333. grp_btn.disabled = true;
  4334. ivw_outline.disabled = true;
  4335. cmb_cpgorddeptcd.disabled = false;
  4336. //if( cpgFlagCd == "01") ipt_fcstinhospdayno.disabled = false;
  4337. model.setValue("/root/main/masterinfo/info/rgstrnm" , getUserName());
  4338. model.setValue("/root/main/masterinfo/info/rgstrid" , getUserId());
  4339. model.setFocus("ipt_newcpgnm");
  4340. model.setValue("/root/temp/usgecd", "1"); //새이름으로(save as)
  4341. model.refresh();
  4342. ]]>
  4343. </script>
  4344. <hint>
  4345. <![CDATA[새로운 이름을 갖는 미등록 상태의 CP를 저장합니다.]]>
  4346. </hint>
  4347. </button>
  4348. <button id="button18" class="btn4_letter8" style="left:71px; top:4px; width:152px; height:22px; ">
  4349. <caption>Drop/Exclusion</caption>
  4350. <script type="javascript" ev:event="DOMActivate">
  4351. <![CDATA[
  4352. setParameter("openmaster", "Y");
  4353. modal("SMMQP02600");
  4354. ]]>
  4355. </script>
  4356. </button>
  4357. <button id="button12" class="btn4_letter4" style="left:200px; top:4px; width:80px; height:22px; ">
  4358. <caption>모니터링</caption>
  4359. <script type="javascript" ev:event="DOMActivate">
  4360. <![CDATA[
  4361. var mon = getCurrentMonitorNumber();
  4362. modal("SMMMP02700", mon, "1", "30", "SMMMP02700");
  4363. ]]>
  4364. </script>
  4365. </button>
  4366. </group>
  4367. <group id="grp_inputcpname" style="left:355px; top:115px; width:264px; height:80px; background-color:#ffffff; border-color:#000000; border-style:none; ">
  4368. <shape id="roundrect1" class="roundrect_btnset" appearance="roundrect" style="left:2px; top:1px; width:258px; height:77px; border-width:3; "/>
  4369. <input id="ipt_newcpgnm" ref="/root/main/masterinfo/info/cpgnm" class="input_default" style="left:70px; top:29px; width:182px; height:19px; border-style:solid; ">
  4370. <script type="javascript" ev:event="onkeyup">
  4371. <![CDATA[
  4372. if(event.keyCode == "13") {
  4373. button9.dispatch("DOMActivate");
  4374. }
  4375. ]]>
  4376. </script>
  4377. </input>
  4378. <button id="button9" class="btn2_letter2" style="left:165px; top:53px; width:42px; height:19px; ">
  4379. <caption>확인</caption>
  4380. <script type="javascript" ev:event="DOMActivate">
  4381. <![CDATA[
  4382. if( model.getValue("/root/temp/usgecd") == "1" ){ //save as new name
  4383. if( fSettingNewNameCp() == false ){
  4384. return;
  4385. }
  4386. }else if( model.getValue("/root/temp/usgecd") == "2" ){ //only modify name(저장)
  4387. model.setValue( "/root/main/masterinfo/info/orgcpgnm", model.getValue("/root/main/masterinfo/info/cpgnm") );
  4388. btn_newver.dispatch("DOMActivate");
  4389. }else if( model.getValue("/root/temp/usgecd") == "3" ){ //only modify name(등록)
  4390. model.setValue( "/root/main/masterinfo/info/orgcpgnm", model.getValue("/root/main/masterinfo/info/cpgnm") );
  4391. btn_allInfoSave.dispatch("DOMActivate");
  4392. }
  4393. //grp_inputcpname.visible = false;
  4394. //grp_inputcpname.refresh();
  4395. //button10.dispatch("DOMActivate"); //2008.06.24(전지은) 새이름 입력창이 닫히면서, 전체창 disable을 풀어야한다
  4396. fCnclInptNm();
  4397. //4 : 2 or 3 -> not check
  4398. //색인팝업이 열려있는 경우, 색인 재조회 (2010.03.31 JJE)
  4399. var openObj = getOpenWindow("SPMMP01200");
  4400. if(openObj != null) {
  4401. openObj.btn_indexInitialize.dispatch("DOMActivate");
  4402. }
  4403. ]]>
  4404. </script>
  4405. </button>
  4406. <button id="button10" class="btn2_letter2" style="left:210px; top:53px; width:42px; height:19px; ">
  4407. <caption>취소</caption>
  4408. <script type="javascript" ev:event="DOMActivate">
  4409. <![CDATA[
  4410. fCopyOrgCpgNM();
  4411. fCnclInptNm();
  4412. ]]>
  4413. </script>
  4414. </button>
  4415. <img id="img1" src="../../../com/commonweb/images/icon_n.gif" style="left:7px; top:10px; width:10px; height:13px; background-stretch:stretch; "/>
  4416. <caption id="cap_iptnewnm" style="left:20px; top:5px; width:231px; height:28px; ">새로 저장할 이름을 입력하십시오.</caption>
  4417. <caption id="cap_newcpgnm" class="tit_2" style="left:8px; top:31px; width:66px; height:13px; ">CP명</caption>
  4418. <select1 id="cmb_usge" ref="/root/temp/usgecd" visibility="hidden" appearance="minimal" style="left:10px; top:55px; width:50px; height:19px; ">
  4419. <choices>
  4420. <item>
  4421. <label>save as new name</label>
  4422. <value>1</value>
  4423. </item>
  4424. <item>
  4425. <label>only modify name(저장)</label>
  4426. <value>2</value>
  4427. </item>
  4428. <item>
  4429. <label>only modify name(등록)</label>
  4430. <value>3</value>
  4431. </item>
  4432. <item>
  4433. <label>
  4434. <![CDATA[2 or 3 -> not check]]>
  4435. </label>
  4436. <value>4</value>
  4437. </item>
  4438. </choices>
  4439. </select1>
  4440. </group>
  4441. <!--iviewer id="ivw_loader" visibility="hidden" style="left:345px; top:36px; width:620px; height:708px; border-width:1px; border-style:solid; "/-->
  4442. <group id="grp_form" visibility="hidden" scroll="auto" style="left:320px; top:6px; width:640px; height:774px; border-style:solid; ">
  4443. <caption id="kkk" class="cell_1" style="left:0px; top:730px; width:10px; height:10px; ">.</caption>
  4444. <button id="btn_hide" class="btn2_letter4" visibility="hidden" style="left:550px; top:2px; width:64px; height:19px; ">
  4445. <caption>서식닫기</caption>
  4446. <script type="javascript" ev:event="onclick">
  4447. <![CDATA[
  4448. ivw_outline.visible = true;
  4449. //ivw_detail.visible = true;
  4450. grp_form.visible = false;
  4451. ivw_loader.visible = false;
  4452. btn_hide.visible = false;
  4453. ]]>
  4454. </script>
  4455. </button>
  4456. </group>
  4457. </xhtml:body>
  4458. </xhtml:html>