SPMMD06100_ClinicalRule관리.xrw 110 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724
  1. <?xml version="1.0" encoding="UTF-8"?>
  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>ClinicalRule관리</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <mntrinfo>i</mntrinfo>
  11. <mntrheaderinfo>
  12. <slipno/>
  13. <sliphistno/>
  14. <slipnm/>
  15. <orddrid/>
  16. <useyn>Y</useyn>
  17. <sliptypecd/>
  18. <slipkindcd>P</slipkindcd>
  19. <alertgrde/>
  20. <guidedocucnts/>
  21. <alertcondflag>A</alertcondflag>
  22. <!--alertcondcnt -->
  23. <ifcondcnt>A</ifcondcnt>
  24. <thencondcnt/>
  25. <cpgmntrflag/>
  26. <cpgno/>
  27. <cpghistseq/>
  28. <stepno/>
  29. <stepnm/>
  30. <!-- stepfromno -->
  31. <!-- stepfromnm -->
  32. <!-- steptono -->
  33. <!-- steptonm -->
  34. <status/>
  35. <lasthistyn/>
  36. <actcnts/>
  37. <recvrflag/>
  38. <essnyn/>
  39. <fromdd/>
  40. <todd/>
  41. <multiorddept/>
  42. </mntrheaderinfo>
  43. <selstepno/>
  44. <selalertcdflag/>
  45. <selpretestcd/>
  46. <mntrpredetlinfo/>
  47. <mntrdetlinfo/>
  48. <mntrdetlform>
  49. <mntrdetllist>
  50. <testitemcd/>
  51. <testitemnm/>
  52. <testcd/>
  53. <testnm/>
  54. <scndcondcd/>
  55. <hvalappflag/>
  56. <lvalappflag/>
  57. <refhval/>
  58. <reflval/>
  59. <unitnm/>
  60. <refcnts/>
  61. <reftypecd/>
  62. <refseq/>
  63. <alertcdflag/>
  64. <alertrem/>
  65. <alertprecondyn/>
  66. <alertcnts/>
  67. <checkyn/>
  68. <m>i</m>
  69. </mntrdetllist>
  70. </mntrdetlform>
  71. <cmprmntrinfo>
  72. <mntrheaderinfo/>
  73. </cmprmntrinfo>
  74. <cmprpredetlinfo>
  75. <mntrdetllist>
  76. <testitemcd/>
  77. <testitemnm/>
  78. <testcd/>
  79. <testnm/>
  80. <scndcondcd/>
  81. <hvalappflag/>
  82. <lvalappflag/>
  83. <refhval/>
  84. <reflval/>
  85. <unitnm/>
  86. <refcnts/>
  87. <reftypecd/>
  88. <refseq/>
  89. <alertcdflag/>
  90. <alertrem/>
  91. <alertprecondyn/>
  92. <alertcnts/>
  93. <checkyn/>
  94. <m/>
  95. </mntrdetllist>
  96. </cmprpredetlinfo>
  97. <selinfo>
  98. <condsexflag/>
  99. <condagelval/>
  100. <condagehval/>
  101. <condnurtprlval/>
  102. <condnurtprhval/>
  103. <condlvalflag>U</condlvalflag>
  104. <condhvalflag>D</condhvalflag>
  105. <alertcdflag/>
  106. <alertprecondyn/>
  107. <openyn>N</openyn>
  108. <condroomval/>
  109. <condroomsel/>
  110. </selinfo>
  111. <mntrpoplist>
  112. <menu>
  113. <item>
  114. <name>삭제</name>
  115. <func>fDelSlipInfo</func>
  116. </item>
  117. </menu>
  118. </mntrpoplist>
  119. <condpoplist>
  120. <menu>
  121. <item>
  122. <name>삭제</name>
  123. <func>fDelCondRow</func>
  124. </item>
  125. </menu>
  126. </condpoplist>
  127. <precondpoplist>
  128. <menu>
  129. <item>
  130. <name>삭제</name>
  131. <func>fDelInCondInfo</func>
  132. </item>
  133. </menu>
  134. </precondpoplist>
  135. <comnusewrdcd/>
  136. <tempuserinfo/>
  137. </main>
  138. <temp/>
  139. <init>
  140. <orddept>
  141. <orddeptlist/>
  142. </orddept>
  143. <slipkindcdlist>
  144. <slipkindcd>
  145. <cdid>P</cdid>
  146. <cdnm>개인</cdnm>
  147. </slipkindcd>
  148. <slipkindcd>
  149. <cdid>A</cdid>
  150. <cdnm>전체과</cdnm>
  151. </slipkindcd>
  152. <slipkindcd>
  153. <cdid>D</cdid>
  154. <cdnm>공통과</cdnm>
  155. </slipkindcd>
  156. </slipkindcdlist>
  157. </init>
  158. <send>
  159. <cond>
  160. <slipkindcd/>
  161. <orddeptcd/>
  162. <useyn/>
  163. <essnyn/>
  164. <fromdd/>
  165. <todd/>
  166. </cond>
  167. </send>
  168. </root>
  169. </instance>
  170. <submission id="TRMMD06101" ref="/root/main/cond" method="post" mediatype="application/x-www-form-urlencoded" resultref="/root/main/mntrinfo"/>
  171. <submission id="TRMMD06102" ref="/root/main/mntrheaderinfo" method="post" mediatype="application/x-www-form-urlencoded" resultref="/root/temp"/>
  172. <submission id="TXMMD06101" ref="/root/send/savedata/monlist" method="post" mediatype="application/x-www-form-urlencoded" resultref="/root/main/mntrinfo"/>
  173. <submission id="TRZSD00109" method="urlencoded-post" mediatype="application/x-www-form-urlencoded" replace="instance"/>
  174. <submission id="TRMMD06103" ref="/root/send/reqdata" method="post" mediatype="application/x-www-form-urlencoded" resultref="/root/init/roomlist"/>
  175. <submission id="TRMMB04101" method="urlencoded-post" mediatype="application/x-www-form-urlencoded" replace="instance"/>
  176. <submission id="TRMMB04105" method="urlencoded-post" mediatype="application/x-www-form-urlencoded" replace="instance"/>
  177. <script type="javascript" ev:event="xforms-ready">
  178. <![CDATA[
  179. fInit();
  180. fGetSlipList();
  181. fSelStepMntrInfo();
  182. ]]>
  183. </script>
  184. <script type="javascript" ev:event="xforms-model-construct-done">
  185. <![CDATA[
  186. var inptTypeCdNode = instance1.selectSingleNode("/root/main/cond/inpttypecd");
  187. var menuParam = getScreenMenuParameter();
  188. if( inptTypeCdNode == null ){
  189. model.makeNode("/root/main/cond/inpttypecd");
  190. }
  191. if( isNull(model.getValue("/root/main/cond/inpttypecd")) ){
  192. if( !isNull(menuParam) ) inptTypeCd = menuParam;
  193. else inptTypeCd = "Q"; //공통코드:M0506 (Q:QI, G:CPG, C:임상의용관심슬립, A:격리주의, L:법정전염병...)
  194. model.setValue("/root/main/cond/inpttypecd", inptTypeCd);
  195. }else{
  196. inptTypeCd = inptTypeCdNode.text;
  197. }
  198. if( inptTypeCd == "G" ){ //특수목적(CPG전용)
  199. switch1.attribute("width") = "725px";
  200. switch1.attribute("height") = "460px";
  201. model.toggle("expert2");
  202. }else{
  203. model.toggle("basic");
  204. }
  205. ]]>
  206. </script>
  207. </model>
  208. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  209. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  210. <script type="javascript" src="../../../com/commonweb/js/numericHelper.js"/>
  211. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  212. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  213. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  214. <script type="javascript" src="../../../com/commonweb/js/utilHelper.js"/>
  215. <script type="javascript" src="../../../com/departmentcodeweb/js/common.js"/>
  216. <script type="javascript" src="../../../com/departmentcodeweb/js/ZSD001.js"/>
  217. <script type="javascript" src="../../../emr/prcpmngtweb/js/MMO001.js"/>
  218. <script type="javascript">
  219. <![CDATA[
  220. var inptTypeCd = "";
  221. var slipGrdNm = "";
  222. var condGrdNm = "";
  223. var slipGrdCtrl = null;
  224. var condGrdCtrl = null;
  225. var trgNM = "";
  226. /**
  227. * @group :
  228. * @ver : 2009.01.18
  229. * @by : 전지은
  230. * @---------------------------------------------------
  231. * @type : function
  232. * @access : public
  233. * @desc : 초기화
  234. * @param :
  235. * @return :
  236. * @---------------------------------------------------
  237. */
  238. function fInit(){
  239. //opener는 CDSS Rule생성기 화면() or CPG속성관리 화면(SPMQP00300)
  240. //inpttypecd는 알람종류(공통코드 M0506)와 동일한 코드 사용, 어떤 목적으로 화면을 open하는지 알 수 있는 flag임.
  241. var inptTypeCdNode = instance1.selectSingleNode("/root/main/cond/inpttypecd");
  242. var menuParam = getScreenMenuParameter();
  243. if( inptTypeCdNode == null ){
  244. model.makeNode("/root/main/cond/inpttypecd");
  245. }
  246. if( isNull(model.getValue("/root/main/cond/inpttypecd")) ){
  247. if( !isNull(menuParam) ) inptTypeCd = menuParam;
  248. else inptTypeCd = "Q"; //공통코드:M0506 (Q:QI, G:CPG, C:임상의용관심슬립, A:격리주의, L:법정전염병...)
  249. model.setValue("/root/main/cond/inpttypecd", inptTypeCd);
  250. }else{
  251. inptTypeCd = inptTypeCdNode.text;
  252. }
  253. if( inptTypeCd == "G" ){ //특수목적(CPG전용)
  254. //switch1.attribute("width") = "725px";
  255. //switch1.attribute("height") = "460px";
  256. //switch1.refresh();
  257. //model.toggle("expert2");
  258. slipGrdNm = "grd_sliplist2"; //CPG 모니터링 그리드
  259. condGrdNm = "grd_slipcondlist2"; //CPG then조건 그리드
  260. trgNM = "모니터링";
  261. //테스트를 위한 값
  262. model.makeValue("/root/main/cond/cpgno", opener.model.getValue("root/main/masterinfo/info/cpgno"));
  263. model.makeValue("/root/main/cond/cpghistseq", opener.model.getValue("root/main/masterinfo/info/cpghistseq"));
  264. model.setValue("/root/main/mntrheaderinfo/cpgno", opener.model.getValue("root/main/masterinfo/info/cpgno"));
  265. model.setValue("/root/main/mntrheaderinfo/cpghistseq", opener.model.getValue("root/main/masterinfo/info/cpghistseq"));
  266. cpgattadmin = opener.window.javascript.getParameter("cpgattadmin");
  267. stepattadmin = opener.window.javascript.getParameter("stepattadmin");
  268. //각 조건 항목 리스트업..
  269. model.makeNode("/root/init/MI0505");
  270. model.makeNode("/root/init/MMT0505");
  271. model.makeNode("/root/init/MST0505");
  272. model.makeNode("/root/init/MT0505"); //실제 콤보와 매핑된 node
  273. model.copyNode("/root/init/MI0505", "/root/init/M0505");
  274. model.copyNode("/root/init/MT0505", "/root/init/M0505");
  275. model.copyNode("/root/init/MMT0505", "/root/init/M0505");
  276. model.copyNode("/root/init/MST0505", "/root/init/M0505");
  277. model.removeNodeset("/root/init/MI0505/M0505[cdid='06']"); //성별
  278. model.removeNodeset("/root/init/MI0505/M0505[cdid='07']"); //연령
  279. model.removeNodeset("/root/init/MI0505/M0505[cdid='03']"); //진단
  280. model.removeNodeset("/root/init/MI0505/M0505[cdid='04']"); //수술
  281. model.removeNodeset("/root/init/MI0505/M0505[cdid='05']"); //주호소
  282. //모니터링 조건 항목
  283. model.removeNodeset("/root/init/MMT0505/M0505[cdid='03']"); //진단
  284. model.removeNodeset("/root/init/MMT0505/M0505[cdid='04']"); //수술
  285. model.removeNodeset("/root/init/MMT0505/M0505[cdid='06']"); //성별
  286. model.removeNodeset("/root/init/MMT0505/M0505[cdid='07']"); //연령
  287. //스크리닝 조건 항목
  288. model.removeNodeset("/root/init/MST0505/M0505[cdid='09']"); //IO
  289. model.removeNodeset("/root/init/MST0505/M0505[cdid='11']"); //투약
  290. model.removeNodeset("/root/init/MST0505/M0505[cdid='12']"); //문진
  291. rdo_cpgmntrflag2.refresh();
  292. grd_slipcondlist2.refresh();
  293. //open 목적에 따라 목적 자동 셋팅
  294. if(isNull(stepattadmin)){
  295. if(cpgattadmin == "D"){
  296. model.setValue("/root/main/mntrheaderinfo/cpgmntrflag", "M");
  297. }else{
  298. model.setValue("/root/main/mntrheaderinfo/cpgmntrflag", "S");
  299. }
  300. fSetupControl("rdo_cpgmntrflag2");
  301. }
  302. }else {
  303. /*
  304. if( inptTypeCd == "C" ){ //일반 임상의용(관심슬립관리)
  305. cap_sliptypecd.visible = true;
  306. rdo_sliptypecd.visible = true;
  307. line5.visible = true;
  308. cap_condlist.attribute("top") = "53px";
  309. cap_condlist.attribute("height") = "402px";
  310. btn_addslipcond.attribute("top") = "55px";
  311. btn_delslipcond.attribute("top") = "55px";
  312. grd_slipcondlist.attribute("top") = "76px";
  313. grd_slipcondlist.attribute("height") = "378px";
  314. }else{ //그외 특수목적 (감염관리 등...)
  315. cap_sliptypecd.visible = false;
  316. rdo_sliptypecd.visible = false;
  317. line5.visible = false;
  318. cap_condlist.attribute("top") = "29px";
  319. cap_condlist.attribute("height") = "295px";
  320. btn_addslipcond.attribute("top") = "29px";
  321. btn_delslipcond.attribute("top") = "29px";
  322. grd_slipcondlist.attribute("top") = "50px";
  323. grd_slipcondlist.attribute("height") = "272px";
  324. }
  325. */
  326. //20100610 by sonjy 권한처리 추가
  327. fSetAuthInfo();
  328. //model.toggle("basic");
  329. slipGrdNm = "grd_sliplist"; //슬립 그리드
  330. condGrdNm = "grd_slipcondlist"; //조건 그리드
  331. trgNM = "Rule";
  332. model.makeNode("/root/init/MI0505"); //실제 콤보와 매핑된 node
  333. model.copyNode("/root/init/MI0505", "/root/init/M0505");
  334. model.removeNodeset("/root/init/MI0505/M0505[cdid='06']"); //성별
  335. model.removeNodeset("/root/init/MI0505/M0505[cdid='07']"); //연령
  336. model.removeNodeset("/root/init/MI0505/M0505[cdid='12']");
  337. model.removeNodeset("/root/init/M0505/M0505[cdid='12']");
  338. grd_slipcondlist.refresh();
  339. }
  340. model.setValue("/root/main/mntrheaderinfo/sliptypecd", inptTypeCd);
  341. model.setValue("/root/main/mntrheaderinfo/recvrflag", "1");
  342. slipGrdCtrl = document.controls(slipGrdNm); //슬립 그리드 컨트롤 obj (CPG용 or 일반/expert용)
  343. condGrdCtrl = document.controls(condGrdNm); //조건 그리드 컨트롤 obj (CPG용 or 일반/expert용)
  344. //model.setValue("/root/main/cond/slipgrdnm", slipGrdNm);
  345. //model.setValue("/root/main/cond/slipcondgrdnm", condGrdNm);
  346. fAddCondRow();
  347. }
  348. /**
  349. * @group :
  350. * @ver : 2009.01.18
  351. * @by : 전지은
  352. * @---------------------------------------------------
  353. * @type : function
  354. * @access : public
  355. * @desc : 리스트 조회
  356. * @param :
  357. * @return :
  358. * @---------------------------------------------------
  359. */
  360. function fGetSlipList(){
  361. //by sonjy 20100610 권한구분 추가
  362. model.makeValue("/root/main/cond/userauthinfoflag" , model.getValue("/root/hidden/userauthinfoflag" ));
  363. model.makeValue("/root/main/cond/fromdd" , model.getValue("/root/send/cond/fromdd" ));
  364. model.makeValue("/root/main/cond/todd" , model.getValue("/root/send/cond/todd" ));
  365. model.makeValue("/root/main/cond/slipkindcd" , model.getValue("/root/send/cond/slipkindcd" ));
  366. model.makeValue("/root/main/cond/orddeptcd" , model.getValue("/root/send/cond/orddeptcd" ));
  367. model.makeValue("/root/main/cond/useyn" , model.getValue("/root/send/cond/useyn" ));
  368. submit("TRMMD06101", false);
  369. model.refresh();
  370. }
  371. /**
  372. * @group :
  373. * @ver : 2009.01.18
  374. * @by : 전지은
  375. * @---------------------------------------------------
  376. * @type : function
  377. * @access : public
  378. * @desc : CPG일 경우만 수행되는 부분으로, 특정 스텝에 해당되는 특정 슬립 정보 조회
  379. * @param :
  380. * @return :
  381. * @---------------------------------------------------
  382. */
  383. function fSelStepMntrInfo(){
  384. if( inptTypeCd == "G" ){
  385. var stepNo = opener.window.javascript.getParameter("stepattadmin");
  386. var no = 0;
  387. if( !isNull(stepNo) ){
  388. var Nodes = instance1.selectNodes("/root/main/mntrinfo/mntrlist");
  389. for( var i=0; i<Nodes.length; i++ ){
  390. var node = Nodes.item(i);
  391. var mntrStepNode = node.selectSingleNode("stepno");
  392. if( mntrStepNode != null && mntrStepNode.text == stepNo ){
  393. no = i + 1;
  394. grd_sliplist2.select(no, 1) = true;
  395. grd_sliplist2.row = grd_sliplist2.selectedRow(0);
  396. fSelSlipInfo();
  397. return;
  398. }
  399. }
  400. }
  401. }
  402. }
  403. /**
  404. * @group :
  405. * @ver : 2009.01.18
  406. * @by : 전지은
  407. * @---------------------------------------------------
  408. * @type : function
  409. * @access : public
  410. * @desc : 리스트 선택 시 해당 슬립 상세 정보 조회
  411. * @param :
  412. * @return :
  413. * @---------------------------------------------------
  414. */
  415. function fSelSlipInfo(){
  416. var iRow = slipGrdCtrl.row;
  417. if ( iRow >= slipGrdCtrl.fixedRows && iRow <slipGrdCtrl.rows ) {
  418. //var limno = model.getValue("/root/main/mntrinfo/mntrlist[" + iRow + "]/limno");
  419. //var limhistno = model.getValue("/root/main/mntrinfo/mntrlist[" + iRow + "]/limhistno");
  420. model.copyNode("/root/main/mntrheaderinfo", "/root/main/mntrinfo/mntrlist[" + iRow + "]");
  421. if( submit("TRMMD06102", false) ){
  422. var preCondNode = instance1.selectNodes("/root/temp/mntrdetllist[alertprecondyn='Y']");
  423. var ifCnt = parseInt(model.getValue("/root/main/mntrheaderinfo/ifcondcnt"));
  424. //if( ifCnt > 1 ){
  425. if( preCondNode.length == 0 ) model.setValue("/root/main/mntrheaderinfo/ifcondcnt", "0");
  426. else if( ifCnt == preCondNode.length ) model.setValue("/root/main/mntrheaderinfo/ifcondcnt", "A");
  427. else model.setValue("/root/main/mntrheaderinfo/ifcondcnt", "1");
  428. if( preCondNode.length > 0 ){
  429. copyNodeListType("/root/main/mntrpredetlinfo", "/root/temp/mntrdetllist[alertprecondyn='Y']", "replace", model, model);
  430. copyNodeListType("/root/main/cmprpredetlinfo", "/root/temp/mntrdetllist[alertprecondyn='Y']", "replace", model, model);
  431. model.removeNodeset("/root/temp/mntrdetllist[alertprecondyn='Y']");
  432. }else{
  433. //model.resetInstanceNode("/root/main/mntrpredetlinfo/mntrdetllist");
  434. //model.resetInstanceNode("/root/main/cmprpredetlinfo/mntrdetllist");
  435. model.removeNodeset("/root/main/mntrpredetlinfo/mntrdetllist");
  436. model.removeNodeset("/root/main/cmprpredetlinfo/mntrdetllist");
  437. }
  438. //if( instance1.selectNodes("/root/temp/mntrdetllist[alertprecondyn!='Y']").length> 0 ){
  439. if( instance1.selectNodes("/root/temp/mntrdetllist[alertprecondyn ='N']").length> 0 ){
  440. copyNodeListType("/root/main/mntrdetlinfo", "/root/temp/mntrdetllist", "replace", model, model);
  441. model.removeNodeset("/root/temp/mntrdetllist");
  442. }else{
  443. model.removeNodeset("/root/main/mntrdetlinfo/mntrdetllist");
  444. }
  445. model.setValue("/root/main/selstepno", model.getValue("/root/main/mntrheaderinfo/stepno"));
  446. }
  447. fSetupControl();
  448. model.refresh();
  449. condGrdCtrl.clearStatus();
  450. fAddCondRow();
  451. }
  452. }
  453. /**
  454. * @group :
  455. * @ver : 2009.01.18
  456. * @by : 전지은
  457. * @---------------------------------------------------
  458. * @type : function
  459. * @access : public
  460. * @desc : 그리드의 rowstatus 설정
  461. * @param : grdCtrl, ref, nodenm (변경하려는 그리드 컨트롤, 인스턴스 경로, 상태값 구분 기준 노드명
  462. * @return :
  463. * @---------------------------------------------------
  464. */
  465. function fSetupGrdStatus( grdCtrl, ref, nodenm ){
  466. for(var i=1; i<grdCtrl.rows; i++ ){
  467. if( model.getValue(ref + "["+ i +"]/" + nodenm) == "i" ) grdCtrl.rowstatus(i) = 1;
  468. else if( model.getValue(ref + "["+ i +"]/" + nodenm) == "u" ) grdCtrl.rowstatus(i) = 2;
  469. else if( model.getValue(ref + "["+ i +"]/" + nodenm) == "d" ) grdCtrl.rowstatus(i) = 4;
  470. else grdCtrl.rowstatus(i) = 0;
  471. }
  472. }
  473. /**
  474. * @group :
  475. * @ver : 2009.01.18
  476. * @by : 전지은
  477. * @---------------------------------------------------
  478. * @type : function
  479. * @access : public
  480. * @desc : 조건 추가를 위해 줄추가
  481. * @param :
  482. * @return :
  483. * @---------------------------------------------------
  484. */
  485. function fAddCondRow(){
  486. /*if( slipGrdCtrl.row <= 0 ){
  487. messageBox ( "입력하려는 " + trgNM + "을", "C002" );
  488. return;
  489. }*/
  490. copyNodeListType("/root/main/mntrdetlinfo", "/root/main/mntrdetlform/mntrdetllist", "after", model, model);
  491. model.refresh();
  492. fSetupGrdStatus(condGrdCtrl, "/root/main/mntrdetlinfo/mntrdetllist", "m");
  493. }
  494. /**
  495. * @group :
  496. * @ver : 2009.01.18
  497. * @by : 전지은
  498. * @---------------------------------------------------
  499. * @type : function
  500. * @access : public
  501. * @desc : 조건 삭제 및 줄삭제
  502. * @param :
  503. * @return :
  504. * @---------------------------------------------------
  505. */
  506. function fDelCondRow(){
  507. //if( condGrdCtrl.rows <= 1 ) return;
  508. //else if( condGrdCtrl.row > 0 ) var iRow = condGrdCtrl.row;
  509. //else var iRow = condGrdCtrl.rows - 1;
  510. var selectedRowList = condGrdCtrl.selectedRows;
  511. if( selectedRowList > 0 ){
  512. for (var i=selectedRowList-1; i>=0; i--) {
  513. var iRow = condGrdCtrl.selectedrow(i);
  514. if( model.getValue("/root/main/mntrdetlinfo/mntrdetllist[" + iRow + "]/m") == "i" ){
  515. model.removenode("/root/main/mntrdetlinfo/mntrdetllist[" + iRow + "]");
  516. //condGrdCtrl.deleteRow(iRow, true);
  517. }else if( model.getValue("/root/main/mntrdetlinfo/mntrdetllist[" + iRow + "]/m") == "d" ){
  518. model.setValue("/root/main/mntrdetlinfo/mntrdetllist[" + iRow + "]/m", "-");
  519. }else{
  520. model.setValue("/root/main/mntrdetlinfo/mntrdetllist[" + iRow + "]/m", "d");
  521. }
  522. }
  523. condGrdCtrl.refresh();
  524. fSetupGrdStatus(condGrdCtrl, "/root/main/mntrdetlinfo/mntrdetllist", "m");
  525. }
  526. }
  527. /**
  528. * @group :
  529. * @ver : 2009.01.18
  530. * @by : 전지은
  531. * @---------------------------------------------------
  532. * @type : function
  533. * @access : public
  534. * @desc : 새로운 속성을 조회하기 위해 팝업 호출
  535. * @param : getFlag(If / Then 구분)
  536. * @return :
  537. * @---------------------------------------------------
  538. */
  539. function fGetNewAttrInfo( getFlag ){
  540. //if (isDataCell() == false) return;
  541. if( isNull(getFlag) ) getFlag = "THEN";
  542. var sCol = condGrdCtrl.col;
  543. var sRow = sRow = condGrdCtrl.row;
  544. var alertcdflag = "";
  545. var alertprecondyn = "";
  546. var setupCondYN = "N";
  547. var changeYN = "N";
  548. var rsltNodes = "";
  549. var rsltNode = "";
  550. var currow = 0;
  551. var callPopCtrl = null;
  552. if( getFlag == "IF" && !isNull(model.getValue("/root/main/selalertcdflag")) ){
  553. alertcdflag = model.getValue("/root/main/selalertcdflag");
  554. alertprecondyn = "Y";
  555. rsltNodes = "/root/main/mntrpredetlinfo";
  556. rsltNode = "/root/main/mntrpredetlinfo/mntrdetllist";
  557. setupCondYN = "Y";
  558. sRow = instance1.selectNodes(rsltNode).length;
  559. }else if( getFlag != "IF" && sRow >= condGrdCtrl.fixedRows && sRow <= condGrdCtrl.rows ){
  560. alertcdflag = model.getValue("/root/main/mntrdetlinfo/mntrdetllist[" + sRow + "]/alertcdflag");
  561. alertprecondyn = "N";
  562. rsltNodes = "/root/main/mntrdetlinfo";
  563. rsltNode = "/root/main/mntrdetlinfo/mntrdetllist";
  564. setupCondYN = "Y";
  565. //sRow = condGrdCtrl.row;
  566. if( !isNull(model.getValue("/root/main/mntrdetlinfo/mntrdetllist[" + sRow + "]/testnm")) ){
  567. return;
  568. }
  569. //if ( condGrdCtrl.colRef("alertcdflag") == condGrdCtrl.col ) {
  570. if( isNull(alertcdflag) ){
  571. return;
  572. }
  573. //}
  574. }else if( getFlag == "U" ){ //값 수정
  575. return;
  576. }else{
  577. return;
  578. }
  579. if( setupCondYN == "Y" ) {
  580. if( getFlag != "IF" && !isNull(model.getValue("/root/main/mntrdetlinfo/mntrdetllist[" + sRow + "]/testcd")) ) {
  581. messageBox ( "상한치, 하한지 값의 수정만 가능합니다.\n삭제 후", "C001" );
  582. return;
  583. }
  584. //성별, 연령, 혈당간호기록 값 입력 후 값 적용 시, 바로 파라메터 전달함.
  585. if(model.getValue("/root/main/selinfo/openyn") != "Y" ){
  586. model.setValue("/root/main/cond/condbutton", getFlag);
  587. model.setValue("/root/main/cond/alertcdflag", alertcdflag);
  588. if (alertcdflag == "01") { // 진단검사
  589. modal("SPMMD06200");
  590. } else if (alertcdflag == '02') {// 핵의학체외검사
  591. modal("SPMMD06200");
  592. } else if (alertcdflag == '03') {// 진단
  593. modal("SPMQP01600");
  594. } else if (alertcdflag == '04') {// 수술
  595. modal("SPMQP01700");
  596. } else if (alertcdflag == '05') {//주호소
  597. modal("SPMQP01800");
  598. } else if (alertcdflag == '06') {// 성별
  599. model.setValue("/root/main/selinfo/condsexflag", "");
  600. model.setValue("/root/main/selinfo/alertcdflag", alertcdflag);
  601. model.setValue("/root/main/selinfo/alertprecondyn", alertprecondyn);
  602. callPopCtrl = document.controls("grp_condsexflag");
  603. model.setFocus("rdo_condsexflag");
  604. } else if (alertcdflag == '07') {// 연령
  605. model.setValue("/root/main/selinfo/condagehval", "");
  606. model.setValue("/root/main/selinfo/condagelval", "");
  607. model.setValue("/root/main/selinfo/alertcdflag", alertcdflag);
  608. model.setValue("/root/main/selinfo/alertprecondyn", alertprecondyn);
  609. ipt_condagehval.refresh();
  610. ipt_condagelval.refresh();
  611. callPopCtrl = document.controls("grp_condageval");
  612. model.setFocus("ipt_condagelval");
  613. } else if (alertcdflag == '08') {// 임상관찰기록
  614. modal("SPMMD06300");
  615. } else if (alertcdflag == '09') {// I/O
  616. modal("SPMMD06300");
  617. } else if (alertcdflag == '10') {// 혈당간호기록
  618. model.setValue("/root/main/selinfo/condnurtprhval", "");
  619. model.setValue("/root/main/selinfo/condnurtprlval", "");
  620. model.setValue("/root/main/selinfo/alertcdflag", alertcdflag);
  621. model.setValue("/root/main/selinfo/alertprecondyn", alertprecondyn);
  622. ipt_condnurtprhval.refresh();
  623. ipt_condnurtprlval.refresh();
  624. callPopCtrl = document.controls("grp_condnurtprval");
  625. model.setFocus("ipt_condnurtprlval");
  626. } else if (alertcdflag == '11') {
  627. modal("SPMMD06400");
  628. }else if (alertcdflag == '13') { //병실
  629. //## 기존 팝업이 아닌 그리드 선택으로 변경 2010.05.06 KHJ
  630. var rslt_ref = "/root/init/inordrepdeptlist";//결과를 받을 인스턴스 경로
  631. if( instance1.selectSingleNode(rslt_ref) == null ) {
  632. var instcd = getUserInfo("dutplceinstcd");
  633. var standard_yn = "orduseyn";
  634. var ord_deptflag = "W";
  635. var sort_field = "depthngnm";//정렬필드(출력순서:'dispseq')
  636. var sort_method = "asc"; //정렬방법(오름차순:'asc')
  637. var base_dd = new Date().getDateFormat("YYYYMMDD");
  638. zbcfGetDeptCodeList(instcd, standard_yn, ord_deptflag, rslt_ref, sort_field, sort_method, base_dd);
  639. }
  640. model.setValue("/root/main/selinfo/condroomval", "");
  641. model.setValue("/root/main/selinfo/condroomsel", "");
  642. model.setValue("/root/main/selinfo/alertcdflag", alertcdflag);
  643. model.setValue("/root/main/selinfo/alertprecondyn", alertprecondyn);
  644. cmb_conddeptlist.deselect();
  645. cmb_condroomlist.deselect();
  646. callPopCtrl = document.controls("grp_condroomval");
  647. /*
  648. modal("SPPMI02000"); //병실정보popup
  649. if( instance1.selectSingleNode("/root/hidden/target/grdroomspec") != null ){
  650. var roomcd = model.getValue("/root/hidden/target/grdroomspec/roomcd");
  651. var header = "testitemcd▦testcd▦testnm▦hvalappflag▦lvalappflag▦refhval▦reflval▦unitnm▦refseq▦alertcdflag▦alertrem▦alertprecondyn▦checkyn▦m▦refcnts";
  652. var data = "▩▦▦병실▦N▦N▦▦▦-▦▦"+alertcdflag+"▦▦"+alertprecondyn+"▦y▦i▦"+roomcd;
  653. clearParameter("SPMMD06100_detlinfo");
  654. setParameter("SPMMD06100_detlinfo", header + data);
  655. }
  656. */
  657. }else if (alertcdflag == '14') { //의사
  658. var ref = "/root/main/tempuserinfo";
  659. model.removeNodeset(ref);
  660. model.makeNode(ref);
  661. model.makeValue("/root/main/userpopupinfo/param", "_OneS"); //_OneS
  662. model.makeValue("/root/main/userpopupinfo/flag", ""); //usernm
  663. model.makeValue("/root/main/userpopupinfo/searchitem", "" ); //cmb_reqrlist.label
  664. modal("../../userdeptinfoweb/xrw/SPZSU10103", "", "200", "200", "SPZSU10103","/root/main/userpopupinfo","/root/main/temp");
  665. var iParam = getParameter("SPZSU10103_");
  666. setCSVToNode(ref, iParam, "list");
  667. var idNode = instance1.selectSingleNode(ref+"/list/userid");
  668. var nmNode = instance1.selectSingleNode(ref+"/list/usernm");
  669. if( idNode != null && nmNode != null ){
  670. var header = "testitemcd▦testcd▦testnm▦hvalappflag▦lvalappflag▦refhval▦reflval▦unitnm▦refseq▦alertcdflag▦alertrem▦alertprecondyn▦checkyn▦m▦refcnts";
  671. var data = "▩▦▦의사 ("+nmNode.value+")▦N▦N▦▦▦-▦▦"+alertcdflag+"▦▦"+alertprecondyn+"▦y▦i▦"+idNode.value;
  672. clearParameter("SPMMD06100_detlinfo");
  673. setParameter("SPMMD06100_detlinfo", header + data);
  674. }
  675. clearParameter("SPZSU10103_");
  676. model.removeNodeset("/root/main/userpopupinfo");
  677. }
  678. //end: 항목별 Parameter 구성
  679. //그룹입력란 띄울때 현재 커서 위치에 바로 띄우기
  680. if( callPopCtrl != null ){
  681. if( getFlag == "IF" ){
  682. var xPos = parseInt(ipt_alertrem2.attribute("left"));
  683. var yPos = parseInt(ipt_alertrem2.attribute("top")) + 23;
  684. }else{
  685. var xPos = parseInt(condGrdCtrl.attribute("left"));
  686. var yPos = parseInt(condGrdCtrl.attribute("top")) + (23 * (condGrdCtrl.row+1) );
  687. var maxPos = parseInt(condGrdCtrl.attribute("top")) + parseInt(condGrdCtrl.attribute("height"));
  688. if( maxPos < yPos ) yPos = maxPos;
  689. }
  690. callPopCtrl.attribute("left") = xPos;
  691. callPopCtrl.attribute("top") = yPos;
  692. callPopCtrl.refresh();
  693. //callPopCtrl.disabled = false;
  694. callPopCtrl.visible = true;
  695. //callPopCtrl = null;
  696. model.setValue("/root/main/selinfo/openyn", "Y");
  697. }
  698. }
  699. var rtnparam = getParameter("SPMMD06100_detlinfo");
  700. var alertCnts = "";
  701. //SPMMD06100_detlinfo => testitemcd▦testcd▦testnm▦hvalappflag▦lvalappflag▦refhval▦reflval▦unitnm▦refseq▦alertcdflag▦alertrem▦alertprecondyn▦checkyn▦m▦refcnts▦scndcondcd▦scndcondnm (17ea)
  702. if( !isNull(rtnparam) ){
  703. //model.removeNodeset("/root/main/mntrdetlinfo/mntrdetllist[testcd='']");
  704. rtnparam = rtnparam.split("▩");
  705. var tmpstr = "";
  706. var testnm = "";
  707. if( getFlag != "IF" ){
  708. model.removenode(rsltNode + "[" + sRow + "]");
  709. }
  710. currow = instance1.selectNodes(rsltNode).length;
  711. for(i = 1; i< rtnparam.length; i++){
  712. //if( getFlag != "IF" ){
  713. copyNodeListType(rsltNodes, "/root/main/mntrdetlform/mntrdetllist", "after", model, model);
  714. currow++;
  715. //}
  716. tmpstr = rtnparam[i].split("▦");
  717. model.setValue(rsltNode + "[" + currow + "]/testitemcd" , tmpstr[0]);
  718. model.setValue(rsltNode + "[" + currow + "]/testcd" , tmpstr[1]);
  719. if(isNull(tmpstr[15])){
  720. testnm = tmpstr[2];
  721. }else{
  722. testnm = tmpstr[2] + "(" + tmpstr[16] + ")";
  723. }
  724. model.setValue(rsltNode + "[" + currow + "]/testnm" , testnm);
  725. model.setValue(rsltNode + "[" + currow + "]/hvalappflag" , tmpstr[3]);
  726. model.setValue(rsltNode + "[" + currow + "]/lvalappflag" , tmpstr[4]);
  727. model.setValue(rsltNode + "[" + currow + "]/refhval" , tmpstr[5]);
  728. model.setValue(rsltNode + "[" + currow + "]/reflval" , tmpstr[6]);
  729. if( isNull(tmpstr[7]) ){
  730. model.setValue(rsltNode + "[" + currow + "]/unitnm" , "-");
  731. }else{
  732. model.setValue(rsltNode + "[" + currow + "]/unitnm" , tmpstr[7]);
  733. }
  734. model.setValue(rsltNode + "[" + currow + "]/refseq" , currow );
  735. model.setValue(rsltNode + "[" + currow + "]/alertcdflag" , tmpstr[9]);
  736. if( isNull(tmpstr[10]) ){
  737. model.setValue(rsltNode + "[" + currow + "]/alertrem" , tmpstr[10]); //코드성 결과 값
  738. }else{
  739. model.setValue(rsltNode + "[" + currow + "]/alertrem" , "-"); //코드성 결과 값
  740. }
  741. //조건(IF)에 필요한 나열식 조건 정보 구성
  742. if( !isNull(tmpstr[5]) && !isNull(tmpstr[6]) ){
  743. alertCnts = tmpstr[6] + " ~ " + tmpstr[5];
  744. }else if( !isNull(tmpstr[5]) && isNull(tmpstr[6]) ){
  745. alertCnts = tmpstr[5] + " 이하";
  746. }else if( isNull(tmpstr[5]) && !isNull(tmpstr[6]) ){
  747. alertCnts = tmpstr[6] + " 이상";
  748. }else{
  749. if( !isNull(tmpstr[14]) ){
  750. alertCnts = testnm + " = " + tmpstr[14];
  751. }else{
  752. alertCnts = tmpstr[1] + " (" + testnm + ")";
  753. }
  754. alertCnts = alertCnts + " (단위:"+ tmpstr[7] +")";
  755. }
  756. if( getFlag == "IF" && ( !isNull(tmpstr[5]) || !isNull(tmpstr[6]) ) ){
  757. alertCnts = tmpstr[1] + "[" + testnm + "] : " + alertCnts;
  758. }
  759. model.setValue(rsltNode + "[" + currow + "]/alertcnts" , alertCnts);
  760. if( getFlag == "IF" ) model.setValue(rsltNode + "[" + currow + "]/alertprecondyn" , "Y");
  761. else model.setValue(rsltNode + "[" + currow + "]/alertprecondyn" , "N");
  762. model.setValue(rsltNode + "[" + currow + "]/checkyn" ,"Y" );
  763. model.setValue(rsltNode + "[" + currow + "]/m" ,"i" );
  764. if( !isNull(tmpstr[14]) ){
  765. model.setValue(rsltNode + "[" + currow + "]/refcnts" , tmpstr[14]); //코드성 결과 값
  766. }else{
  767. model.setValue(rsltNode + "[" + currow + "]/refcnts" , "-"); //코드성 결과 값
  768. }
  769. if( !isNull(tmpstr[15]) ){ //2차 조건 존재 여부에 따라 함께 저장
  770. model.setValue(rsltNode + "[" + currow + "]/scndcondcd" , tmpstr[15]);
  771. }else{
  772. model.setValue(rsltNode + "[" + currow + "]/scndcondcd" , "-");
  773. }
  774. /*
  775. if( isNull(tmpstr[14]) ) model.setValue(rsltNode + "[" + currow + "]/reftypecd" , '01'); //수치
  776. else model.setValue(rsltNode + "[" + currow + "]/reftypecd" , '01'); //수치
  777. */
  778. }
  779. changeYN = "Y";
  780. clearParameter("SPMMD06100_detlinfo");
  781. model.refresh();
  782. if( getFlag == "THEN" ) fAddCondRow(); //2009.03.14
  783. }
  784. }else if( condGrdCtrl.colRef("refhval") == condGrdCtrl.col || condGrdCtrl.colRef("reflval") == condGrdCtrl.col ) {
  785. changeYN = "Y";
  786. }
  787. if( changeYN == "Y" ){
  788. fSetupGrdStatus(condGrdCtrl, "/root/main/mntrdetlinfo/mntrdetllist", "m");
  789. model.setValue("/root/main/selinfo/openyn", "N");
  790. }
  791. }
  792. /**
  793. * @group :
  794. * @ver : 2009.01.18
  795. * @by : 전지은
  796. * @---------------------------------------------------
  797. * @type : function
  798. * @access : public
  799. * @desc : 조건을 더블클릭을 통해 수정하고자 할 때, 해당 팝업에 파라메터 전달
  800. * @param :
  801. * @return :
  802. * @---------------------------------------------------
  803. */
  804. function fEditCondData(){
  805. fGetNewAttrInfo("U");
  806. }
  807. /**
  808. * @group :
  809. * @ver : 2009.01.18
  810. * @by : 전지은
  811. * @---------------------------------------------------
  812. * @type : function
  813. * @access : public
  814. * @desc : 조건 값 변경 시 체크
  815. * @param :
  816. * @return :
  817. * @---------------------------------------------------
  818. */
  819. function fChngCondVal(){
  820. var sCol = condGrdCtrl.col;
  821. var sRow = condGrdCtrl.row;
  822. if ( sRow >= condGrdCtrl.fixedRows && sRow <= condGrdCtrl.rows ) {
  823. var refhval = model.getValue("/root/main/mntrdetlinfo/mntrdetllist[" + sRow + "]/refhval");
  824. var reflval = model.getValue("/root/main/mntrdetlinfo/mntrdetllist[" + sRow + "]/refhval");
  825. var refcnts = model.getValue("/root/main/mntrdetlinfo/mntrdetllist[" + sRow + "]/refcnts");
  826. var testcd = model.getValue("/root/main/mntrdetlinfo/mntrdetllist[" + sRow + "]/testcd");
  827. var testnm = model.getValue("/root/main/mntrdetlinfo/mntrdetllist[" + sRow + "]/testnm");
  828. var m = model.getValue("/root/main/mntrdetlinfo/mntrdetllist[" + sRow + "]/m");
  829. if( condGrdCtrl.colRef("refhval") == sCol ){
  830. if( !isNull(refcnts) && refcnts != "-" ){
  831. if( messageBox ( "내용이 존재합니다.\n내용을", "Q001" ) == "6" ){
  832. model.setValue("/root/main/mntrdetlinfo/mntrdetllist[" + sRow + "]/refcnts", "");
  833. if(m != "i") model.setValue("/root/main/mntrdetlinfo/mntrdetllist[" + sRow + "]/m", "u");
  834. if( inptTypeCd == "G" ){
  835. model.setValue("/root/main/mntrdetlinfo/mntrdetllist[" + sRow + "]/alertcnts", reflval + " ~ " + refhval);
  836. }
  837. }else{
  838. model.setValue("/root/main/mntrdetlinfo/mntrdetllist[" + sRow + "]/refhval", "");
  839. return;
  840. }
  841. }
  842. if(m != "i") model.setValue("/root/main/mntrdetlinfo/mntrdetllist[" + sRow + "]/m", "u");
  843. return;
  844. }else if( condGrdCtrl.colRef("reflval") == sCol ){
  845. if( !isNull(refcnts) && refcnts != "-" ){
  846. if( messageBox ( "내용이 존재합니다.\n내용을", "Q001" ) == "6" ){
  847. model.setValue("/root/main/mntrdetlinfo/mntrdetllist[" + sRow + "]/refcnts", "");
  848. if( inptTypeCd == "G" ){
  849. model.setValue("/root/main/mntrdetlinfo/mntrdetllist[" + sRow + "]/alertcnts", reflval + " ~ " + refhval);
  850. }
  851. }else{
  852. model.setValue("/root/main/mntrdetlinfo/mntrdetllist[" + sRow + "]/refhval", "");
  853. return;
  854. }
  855. }
  856. if(m != "i") model.setValue("/root/main/mntrdetlinfo/mntrdetllist[" + sRow + "]/m", "u");
  857. return;
  858. }else if( condGrdCtrl.colRef("refcnts") == sCol ){
  859. if( !isNull(refhval) || !isNull(reflval) ){
  860. if( messageBox ( "수치값이 존재합니다.\n수치값을", "Q001" ) == "6" ){
  861. model.setValue("/root/main/mntrdetlinfo/mntrdetllist[" + sRow + "]/reflval", "");
  862. model.setValue("/root/main/mntrdetlinfo/mntrdetllist[" + sRow + "]/refhval", "");
  863. model.setValue("/root/main/mntrdetlinfo/mntrdetllist[" + sRow + "]/hvalappflag", "N");
  864. model.setValue("/root/main/mntrdetlinfo/mntrdetllist[" + sRow + "]/lvalappflag", "N");
  865. if( inptTypeCd == "G" ){
  866. model.setValue("/root/main/mntrdetlinfo/mntrdetllist[" + sRow + "]/alertcnts", testnm+" = "+refcnts);
  867. }
  868. }else{
  869. model.setValue("/root/main/mntrdetlinfo/mntrdetllist[" + sRow + "]/refcnts", "");
  870. return;
  871. }
  872. }
  873. if(m != "i") model.setValue("/root/main/mntrdetlinfo/mntrdetllist[" + sRow + "]/m", "u");
  874. return;
  875. }else if( condGrdCtrl.colRef("hvalappflag") == sCol ){
  876. if( isNull(refhval) || reflval == "-" ){
  877. messageBox ( "값이 존재하지 않아 선택", "E001" ); //할 수 없습니다
  878. return;
  879. }
  880. }else if( condGrdCtrl.colRef("lvalappflag") == sCol ){
  881. if( isNull(reflval) || reflval == "-" ){
  882. messageBox ( "값이 존재하지 않아 선택", "E001" ); //할 수 없습니다
  883. return;
  884. }
  885. }
  886. if(m != "i"){
  887. model.setValue("/root/main/mntrdetlinfo/mntrdetllist[" + sRow + "]/m", "u");
  888. }
  889. condGrdCtrl.refresh();
  890. fSetupGrdStatus(condGrdCtrl, "/root/main/mntrdetlinfo/mntrdetllist", "m");
  891. }
  892. }
  893. /**
  894. * @group :
  895. * @ver : 2009.01.18
  896. * @by : 전지은
  897. * @---------------------------------------------------
  898. * @type : function
  899. * @access : public
  900. * @desc : 저장 시 필수값 체크
  901. * @param :
  902. * @return :
  903. * @---------------------------------------------------
  904. */
  905. function fChkEssVal(){
  906. //검사코드 중복 체크 (2009.03.06 추가)
  907. var dupYN = "N";
  908. var ifCnt = instance1.selectNodes("/root/main/mntrpredetlinfo/mntrdetllist");
  909. for(var i=1; i<condGrdCtrl.rows; i++){
  910. var iTestCd = model.getValue("/root/main/mntrdetlinfo/mntrdetllist[" + i + "]/testcd");
  911. var iTestNm = model.getValue("/root/main/mntrdetlinfo/mntrdetllist[" + i + "]/testnm");
  912. var jTestCd = "";
  913. var jTestNm = "";
  914. //다른 then 항목과 비교
  915. for(var j=1; j<condGrdCtrl.rows; j++){
  916. jTestCd = model.getValue("/root/main/mntrdetlinfo/mntrdetllist[" + j + "]/testcd");
  917. jTestNm = model.getValue("/root/main/mntrdetlinfo/mntrdetllist[" + j + "]/testnm");
  918. if( !isNull(iTestCd) ){
  919. if( i != j && iTestCd == jTestCd ){
  920. condGrdCtrl.rowstyle(i, "data", "color") = "#ff0000";
  921. condGrdCtrl.rowstyle(j, "data", "color") = "#ff0000";
  922. dupYN = "Y";
  923. }
  924. }else{
  925. if( i != j && iTestNm == jTestNm ){
  926. condGrdCtrl.rowstyle(i, "data", "color") = "#ff0000";
  927. condGrdCtrl.rowstyle(j, "data", "color") = "#ff0000";
  928. dupYN = "Y";
  929. }
  930. }
  931. }
  932. //if 항목과 비교
  933. if( ifCnt.length > 0 ){
  934. for(var k=1; k<=ifCnt.length; k++){
  935. var kTestCd = model.getValue("/root/main/mntrpredetlinfo/mntrdetllist[" + k + "]/testcd");
  936. var kTestNm = model.getValue("/root/main/mntrpredetlinfo/mntrdetllist[" + k + "]/testnm");
  937. if( !isNull(iTestCd) && iTestCd == kTestCd ){
  938. condGrdCtrl.rowstyle(i, "data", "color") = "#ff0000";
  939. dupYN = "Y";
  940. }else if( iTestNm == kTestNm ){
  941. condGrdCtrl.rowstyle(i, "data", "color") = "#ff0000";
  942. dupYN = "Y";
  943. }
  944. }
  945. }
  946. }
  947. /*
  948. if( dupYN == "Y" ){
  949. messageBox ( "동일한 항목/코드는 중복으로 입력", "E001" ); //할 수 없습니다
  950. return false;
  951. }
  952. */
  953. //이상/이하 flag 체크
  954. var exceptNode1 = instance1.selectSingleNode("/root/main/mntrdetlinfo/mntrdetllist[reflval!='' and reflval!='-' and (lvalappflag!='U' and lvalappflag!='D')]/testnm");
  955. var exceptNode2 = instance1.selectSingleNode("/root/main/mntrdetlinfo/mntrdetllist[refhval!='' and refhval!='-' and (hvalappflag!='U' and hvalappflag!='D')]/testnm");
  956. var exceptNode3 = instance1.selectSingleNode("/root/main/mntrdetlinfo/mntrdetllist[reflval!='' and reflval!='-' and lvalappflag='U' and hvalappflag='U']/testnm");
  957. var exceptNode4 = instance1.selectSingleNode("/root/main/mntrdetlinfo/mntrdetllist[refhval!='' and refhval!='-' and lvalappflag='U' and hvalappflag='U']/testnm");
  958. var exceptNode5 = instance1.selectSingleNode("/root/main/mntrdetlinfo/mntrdetllist[reflval!='' and reflval!='-' and lvalappflag='D' and hvalappflag='D']/testnm");
  959. var exceptNode6 = instance1.selectSingleNode("/root/main/mntrdetlinfo/mntrdetllist[refhval!='' and refhval!='-' and lvalappflag='D' and hvalappflag='D']/testnm");
  960. if(exceptNode1 != null){
  961. messageBox ( exceptNode1.text + "의 이상/이하 여부를", "C002" ); //선택하세요.
  962. return false;
  963. }
  964. if(exceptNode2 != null){
  965. messageBox ( exceptNode2.text + "의 이상/이하 여부를", "C002" ); //선택하세요.
  966. return false;
  967. }
  968. if( exceptNode3 != null || exceptNode4 != null || exceptNode5 != null || exceptNode6 != null ){
  969. messageBox ( "동일한 이상/이하 여부를 선택", "E001" ); //할 수 없습니다
  970. return false;
  971. }
  972. if( inptTypeCd == "G" ){ //특수(CPG)
  973. if ( ! isRequiredControls("ipt_slipnm2", "rdo_cpgmntrflag2", "rdo_alertcondflag2", "rdo_alertgrde2") )
  974. return false;
  975. if( model.getValue("/root/main/mntrheaderinfo/alertcondflag") != "A" ){
  976. if ( ! isRequiredControls("ipt_alertcondcnt2") )
  977. return false;
  978. }
  979. }else{ //일반-관심슬립
  980. if(inptTypeCd != "C"){
  981. if ( ! isRequiredControls("ipt_slipnm", "rdo_sliptypecd") )
  982. return false;
  983. }else{
  984. if ( ! isRequiredControls("ipt_slipnm", "rdo_useyn", "rdo_alertcondflag", "ipt_alertcondcnt", "rdo_alertgrde", "rdo_alertgrde") )
  985. return false;
  986. }
  987. if( model.getValue("/root/main/mntrheaderinfo/alertcondflag") != "A" ){
  988. if ( ! isRequiredControls("ipt_alertcondcnt") )
  989. return false;
  990. }
  991. //권한관련 CHECK by sonjy 20100610
  992. if( model.getValue("/root/hidden/userauthinfoflag" ) == "M" ){
  993. if( model.getValue("/root/main/mntrheaderinfo/slipkindcd") == "D" &&
  994. ( isNull(model.getValue("/root/main/mntrheaderinfo/multiorddept")) || model.getValue("/root/main/mntrheaderinfo/multiorddept") == "-" ) ){
  995. return false;
  996. }
  997. if ( ! isRequiredControls("rdo_essnyn", "ipt_fromdd", "ipt_todd") ) return false;
  998. }
  999. }
  1000. return true;
  1001. }
  1002. /**
  1003. * @group :
  1004. * @ver : 2009.01.18
  1005. * @by : 전지은
  1006. * @---------------------------------------------------
  1007. * @type : function
  1008. * @access : public
  1009. * @desc : 슬립 데이터 저장
  1010. * @param :
  1011. * @return :
  1012. * @---------------------------------------------------
  1013. */
  1014. function fSaveSlipMaster(){
  1015. //슬립 삭제 데이터
  1016. var selRow = slipGrdCtrl.row;
  1017. var iRow = 0;
  1018. if( slipGrdCtrl.isSelected(selRow) ){
  1019. iRow = selRow;
  1020. }
  1021. //변경 데이터가 없으면 저장 안함
  1022. var slipNo = model.getValue("/root/main/mntrheaderinfo/slipno");
  1023. var statusChkFlag = "";
  1024. var delSlipNode = instance1.selectNodes("/root/main/mntrinfo/mntrlist[status='D']");
  1025. if(delSlipNode.length > 0){
  1026. statusChkFlag = "D"; //수정/추가된 데이터는 없고, 삭제만 처리함
  1027. }else{
  1028. if( fChkEssVal() == false ) return false; //필수입력값 체크
  1029. if( !isNull(slipNo) ){
  1030. //헤더 정보
  1031. var orgData = instance1.selectSingleNode("/root/main/mntrheaderinfo");
  1032. model.copyNode("/root/main/cmprmntrinfo/mntrheaderinfo", "/root/main/mntrinfo/mntrlist[slipno='" + slipNo + "']");
  1033. var curData = instance1.selectSingleNode("/root/main/cmprmntrinfo/mntrheaderinfo");
  1034. //선행조건(IF)
  1035. var orgPreData = instance1.selectSingleNode("/root/main/mntrpredetlinfo");
  1036. var curPreData = instance1.selectSingleNode("/root/main/cmprpredetlinfo");
  1037. //후행조건(Then)
  1038. var chgData = instance1.selectSingleNode("/root/main/mntrdetlinfo/mntrdetllist[m!='-']");
  1039. if( orgData.xml == curData.xml && orgPreData.xml == curPreData.xml && chgData == null ){
  1040. messageBox ( "변경된", "E013" );
  1041. return;
  1042. }else{
  1043. statusChkFlag = "I"; //추가/수정/ 혹은 추가/수정+삭제
  1044. }
  1045. }else{
  1046. statusChkFlag = "I"; //추가/수정/ 혹은 추가/수정+삭제
  1047. }
  1048. }
  1049. model.removeNodeset("/root/send/savedata/monlist");
  1050. model.makeNode("/root/send/savedata/monlist");
  1051. //삭제여부 체크
  1052. if( delSlipNode.length > 0 ){
  1053. copyNodeListType("/root/send/savedata/monlist", "/root/main/mntrinfo/mntrlist[status='D']", "after", model, model);
  1054. }else{
  1055. //detail info =>
  1056. if( instance1.selectSingleNode("/root/main/mntrpredetlinfo/mntrdetllist") != null ){
  1057. copyNodeListType("/root/send/savedata/monlist", "/root/main/mntrpredetlinfo/mntrdetllist", "after", model, model);
  1058. model.removeNodeset("/root/send/savedata/monlist[m='d']"); //삭제데이터는 빼고 전송
  1059. }
  1060. copyNodeListType("/root/send/savedata/monlist", "/root/main/mntrdetlinfo/mntrdetllist", "after", model, model);
  1061. model.removeNodeset("/root/send/savedata/monlist/mntrdetllist[m='i' and testnm='']"); //빈줄 삭제
  1062. //header info =>
  1063. //IF조건수 변경
  1064. var ifCnt = model.getValue("/root/main/mntrheaderinfo/ifcondcnt");
  1065. var ifLength = instance1.selectNodes("/root/main/mntrpredetlinfo/mntrdetllist").length;
  1066. if( ifCnt == "A" ) model.setValue("/root/main/mntrheaderinfo/ifcondcnt", ifLength);
  1067. //else if( ifCnt == "1" ) model.setValue("/root/main/mntrheaderinfo/ifcondcnt", "1");
  1068. //else model.setValue("/root/main/mntrheaderinfo/ifcondcnt", "0");
  1069. //저장할 Header 정보
  1070. if( statusChkFlag == "I" ) model.setValue("/root/main/mntrheaderinfo/status", statusChkFlag); //'I' 입력
  1071. model.makeNode("/root/send/savedata/monlist/mntrheaderinfo");
  1072. model.copyNode("/root/send/savedata/monlist/mntrheaderinfo", "/root/main/mntrheaderinfo");
  1073. //권한정보추가 by sonjy 20100610
  1074. model.makeValue("/root/send/savedata/monlist/mntrheaderinfo/authinfo", model.getValue("/root/hidden/userauthinfoflag" ));
  1075. }
  1076. if( !submit("TXMMD06101", true) ) return false;
  1077. //by sonjy 20100610 add
  1078. fGetSlipList();
  1079. //fAddSlipInfo();
  1080. model.refresh();
  1081. if(iRow <= 0){
  1082. iRow = slipGrdCtrl.rows - 1;
  1083. }
  1084. slipGrdCtrl.select(iRow, 1) = true;
  1085. slipGrdCtrl.row = slipGrdCtrl.selectedRow(0);
  1086. condGrdCtrl.rebuildStyle();
  1087. //model.removeNodeset("/root/main/mntrdetlinfo/mntrdetllist[m='d']");
  1088. //condGrdCtrl.refresh();
  1089. fSelSlipInfo();
  1090. //fAddCondRow(); //2009.03.14
  1091. }
  1092. /**
  1093. * @group :
  1094. * @ver : 2009.01.18
  1095. * @by : 전지은
  1096. * @---------------------------------------------------
  1097. * @type : function
  1098. * @access : public
  1099. * @desc : 신규 슬립정보 (신규 버튼 클릭 시)
  1100. * @param :
  1101. * @return :
  1102. * @---------------------------------------------------
  1103. */
  1104. function fAddSlipInfo(){
  1105. var iRow = slipGrdCtrl.row;
  1106. if(iRow > 0){
  1107. slipGrdCtrl.isselected(iRow) = false;
  1108. }
  1109. model.resetInstanceNode("/root/main/mntrheaderinfo");
  1110. model.removeNodeset("/root/main/mntrpredetlinfo/mntrdetllist");
  1111. model.removeNodeset("/root/main/mntrdetlinfo/mntrdetllist");
  1112. if( inptTypeCd == "G" ){
  1113. model.setFocus("ipt_slipnm2");
  1114. model.setValue("/root/main/mntrheaderinfo/cpgno", model.getValue("/root/main/cond/cpgno"));
  1115. model.setValue("/root/main/mntrheaderinfo/cpghistseq", model.getValue("/root/main/cond/cpghistseq"));
  1116. //model.setValue("/root/main/mntrheaderinfo/stepfromno", "");
  1117. //model.setValue("/root/main/mntrheaderinfo/steptono", "");
  1118. model.setValue("/root/main/mntrheaderinfo/stepno", "");
  1119. model.setValue("/root/main/mntrheaderinfo/cpgmntrflag", "");
  1120. }else{
  1121. if(inptTypeCd == "C"){
  1122. model.setValue("/root/main/mntrheaderinfo/alertcondflag", "A");
  1123. }
  1124. model.setValue("/root/main/mntrheaderinfo/cpgmntrflag", "-");
  1125. model.setValue("/root/main/mntrheaderinfo/cpgno", "0");
  1126. model.setValue("/root/main/mntrheaderinfo/cpghistseq", "0");
  1127. //model.setValue("/root/main/mntrheaderinfo/stepfromno", "0");
  1128. //model.setValue("/root/main/mntrheaderinfo/steptono", "0");
  1129. model.setValue("/root/main/mntrheaderinfo/stepno", "0");
  1130. model.setFocus("ipt_slipnm");
  1131. }
  1132. model.setValue("/root/main/mntrheaderinfo/slipkindcd", "P");
  1133. model.setValue("/root/main/mntrheaderinfo/sliptypecd", inptTypeCd);
  1134. model.setValue("/root/main/mntrheaderinfo/ifcondcnt", "");
  1135. model.setValue("/root/main/mntrheaderinfo/thencondcnt", "");
  1136. model.setValue("/root/main/selinfo/openyn", "N");
  1137. //CPG 속성이 아닐 경우에만 권한관련 초기화 처리. by sonjy 20100610
  1138. if( inptTypeCd != "G") {
  1139. fInitAuthInfo();
  1140. }
  1141. model.refresh();
  1142. slipGrdCtrl.select(1,1, slipGrdCtrl.rows-1, slipGrdCtrl.cols-1) = false;
  1143. fSetupControl();
  1144. }
  1145. /**
  1146. * @group :
  1147. * @ver : 2009.01.18
  1148. * @by : 전지은
  1149. * @---------------------------------------------------
  1150. * @type : function
  1151. * @access : public
  1152. * @desc : 기존 슬립정보 삭제 (삭제 버튼 클릭 시)
  1153. * @param : btnYN (버튼 클릭 이벤트를 통해 호출된 경우 'Y', 그렇지 않은경우 '' or 'N')
  1154. * @return :
  1155. * @---------------------------------------------------
  1156. */
  1157. function fDelSlipInfo(btnYN){
  1158. if( isNull(btnYN) ) btnYN = "N";
  1159. var iRow = slipGrdCtrl.row;
  1160. if( !(iRow > 0) ){
  1161. messageBox ( "삭제할 데이터를", "C002" ); //유효하지 않음
  1162. return;
  1163. }
  1164. if ( iRow >= slipGrdCtrl.fixedRows && iRow <slipGrdCtrl.rows ) {
  1165. /*
  1166. var status = model.getValue("/root/main/mntrinfo/mntrlist[" + iRow + "]/status");
  1167. if( status != "D" ){
  1168. model.setValue("/root/main/mntrinfo/mntrlist[" + iRow + "]/status", "D");
  1169. }else{
  1170. model.setValue("/root/main/mntrinfo/mntrlist[" + iRow + "]/status", "-");
  1171. }
  1172. slipGrdCtrl.refresh();
  1173. }
  1174. */
  1175. model.setValue("/root/main/mntrinfo/mntrlist[" + iRow + "]/status", "D");
  1176. if( messageBox ( "정말로 슬립 정보를", "Q001" ) == "6" ){
  1177. //copyNodeListType("/root/send/savedata/monlist", "/root/main/mntrinfo/mntrlist[status='D']", "after", model, model);
  1178. fSaveSlipMaster();
  1179. }else{
  1180. model.setValue("/root/main/mntrinfo/mntrlist[" + iRow + "]/status", "-");
  1181. slipGrdCtrl.refresh();
  1182. }
  1183. }
  1184. }
  1185. /**
  1186. * @group :
  1187. * @ver : 2009.01.18
  1188. * @by : 전지은
  1189. * @---------------------------------------------------
  1190. * @type : function
  1191. * @access : public
  1192. * @desc : 각종 컨트롤 속설 설정
  1193. * @param : ctrlFlag (특정 컨트롤만 변경 시 컨트롤 명칭)
  1194. * @return :
  1195. * @---------------------------------------------------
  1196. */
  1197. function fSetupControl( ctrlFlag ){
  1198. var allChng = "N";
  1199. if( isNull(ctrlFlag) ) allChng = "Y";
  1200. if( allChng == "Y" || ctrlFlag == "rdo_alertcondflag" ){
  1201. if( model.getValue("/root/main/mntrheaderinfo/alertcondflag") == "A" ){
  1202. ipt_alertcondcnt.disabled = true;
  1203. ipt_alertcondcnt2.disabled = true;
  1204. }else{
  1205. ipt_alertcondcnt.disabled = false;
  1206. ipt_alertcondcnt2.disabled = false;
  1207. }
  1208. }
  1209. if( allChng == "Y" || ctrlFlag == "rdo_cpgmntrflag2" ){
  1210. if( model.getValue("/root/main/mntrheaderinfo/cpgmntrflag") == "S" ){
  1211. model.copyNode("/root/init/MT0505", "/root/init/MST0505");
  1212. cmb_alertcdflag2.disabled = true;
  1213. btn_alertcdflag2.disabled = true;
  1214. btn_delalertcdflag2.disabled = true;
  1215. ipt_alertrem2.disabled = true;
  1216. rdo_ifcondcnt.disabled = true;
  1217. }else{
  1218. model.copyNode("/root/init/MT0505", "/root/init/MMT0505");
  1219. cmb_alertcdflag2.disabled = false;
  1220. btn_alertcdflag2.disabled = false;
  1221. btn_delalertcdflag2.disabled = false;
  1222. ipt_alertrem2.disabled = false;
  1223. rdo_ifcondcnt.disabled = false;
  1224. }
  1225. }
  1226. if( ctrlFlag == "ipt_alertcondcnt" ){
  1227. var condCnt = instance1.selectNodes("/root/main/mntrdetlinfo/mntrdetllist[m!='d' and testcd!='']");
  1228. var inptTxt = model.getValue("/root/main/mntrheaderinfo/thencondcnt");
  1229. var inptCnt = parseInt( inptTxt );
  1230. if( !isNull(inptTxt) ){
  1231. if( condCnt.length < inptCnt ){
  1232. messageBox ( "전체 조건 수보다 큽니다.\n입력 데이터가", "E016" ); //유효하지 않음
  1233. return;
  1234. }
  1235. model.setValue("/root/main/mntrheaderinfo/alertcondflag", "P");
  1236. }
  1237. }
  1238. if( allChng == "Y" || ctrlFlag == "rdo_alertgrde" ){
  1239. var grdeCd = model.getValue("/root/main/mntrheaderinfo/alertgrde");
  1240. if( grdeCd == "M04" || grdeCd == "C04" ){
  1241. ipt_alertgrdecnts.disabled = false;
  1242. }else{
  1243. ipt_alertgrdecnts.disabled = true;
  1244. }
  1245. }
  1246. /*
  1247. if( ctrlFlag == "cmb_alertcdflag2" ){
  1248. if( !isNull(model.getValue("/root/main/mntrpredetlinfo/mntrdetllist/alertcdflag")) ){
  1249. model.setValue("", "");
  1250. }else{
  1251. }
  1252. }
  1253. */
  1254. }
  1255. /**
  1256. * @group :
  1257. * @ver : 2009.01.18
  1258. * @by : 전지은
  1259. * @---------------------------------------------------
  1260. * @type : function
  1261. * @access : public
  1262. * @desc : 성별, 연령, 혈당간호 기록 등 정보 입력 시 값 전달
  1263. * @param : iptFlag (그룹-팝업으로 특정 값 입력 시, 값이 들어가는 인스턴스 명칭 : 성별, 나이, 혈당간호기록)
  1264. * @return :
  1265. * @---------------------------------------------------
  1266. */
  1267. function fInputCondVal( iptFlag ){
  1268. var iptGrCtrl = document.controls("grp_" + iptFlag);
  1269. var unitCtrl = document.controls("cap_" + iptFlag + "unit");
  1270. var nmCtrl = document.controls("cap_" + iptFlag + "nm");
  1271. var ref1 = "";
  1272. var ref2 = "";
  1273. var ref = "";
  1274. var reflval = "";
  1275. var refhval = "";
  1276. var refcd = "";
  1277. var flagnm = nmCtrl.attribute("text");
  1278. var unitnm = unitCtrl.attribute("text");
  1279. var alertcdflag = model.getValue("/root/main/selinfo/alertcdflag");
  1280. var alertprecondyn = model.getValue("/root/main/selinfo/alertprecondyn");
  1281. var lvalappflag = model.getValue("/root/main/selinfo/condlvalflag");
  1282. var hvalappflag = model.getValue("/root/main/selinfo/condhvalflag");
  1283. var getFlag = "";
  1284. if( alertprecondyn == "Y" ) getFlag = "IF";
  1285. else getFlag = "THEN";
  1286. //var alertrem = model.getValue("");
  1287. if( iptFlag == "condsexflag" ){
  1288. ref = "/root/main/selinfo/" + iptFlag;
  1289. }else if( iptFlag == "condageval" ){
  1290. ref1 = "/root/main/selinfo/condagelval";
  1291. ref2 = "/root/main/selinfo/condagehval";
  1292. }else if( iptFlag == "condnurtprval" ){
  1293. ref1 = "/root/main/selinfo/condnurtprlval";
  1294. ref2 = "/root/main/selinfo/condnurtprhval";
  1295. }else if( iptFlag == "condroomval" ){
  1296. //## 기존 팝업이 아닌 그리드 선택으로 변경 2010.05.06 KHJ
  1297. ref = "/root/main/selinfo/" + iptFlag;
  1298. }
  1299. if( !isNull(ref1) ) reflval = model.getValue(ref1); //하한치~
  1300. if( !isNull(ref2) ) refhval = model.getValue(ref2); //상한치
  1301. if( !isNull(ref) ) refcd = model.getValue(ref); //특정 결과 코드 (성별, +/- 등..)
  1302. if( isNull(reflval) ) lvalappflag = "N";
  1303. if( isNull(refhval) ) hvalappflag = "N";
  1304. if( isNull(model.getValue(ref)) && isNull(model.getValue(ref1)) && isNull(model.getValue(ref2)) ){
  1305. messageBox ( "", "E013" ); //데이터 없음
  1306. return;
  1307. }
  1308. //값을 조건 인스턴스에 copy (코드 마스터에 나이 성별 혈당간호기록은 어떻게 입력되는가...?? )
  1309. var header = "testitemcd▦testcd▦testnm▦hvalappflag▦lvalappflag▦refhval▦reflval▦unitnm▦refseq▦alertcdflag▦alertrem▦alertprecondyn▦checkyn▦m▦refcnts";
  1310. var data = "▩▦▦"+flagnm+"▦"+hvalappflag+"▦"+lvalappflag+"▦"+refhval+"▦"+reflval+"▦"+unitnm+"▦▦"+alertcdflag+"▦▦"+alertprecondyn+"▦y▦i▦"+refcd;
  1311. setParameter("SPMMD06100_detlinfo", header + data);
  1312. iptGrCtrl.visible = false;
  1313. fGetNewAttrInfo(getFlag);
  1314. }
  1315. /**
  1316. * @group :
  1317. * @ver : 2009.03
  1318. * @by : 전지은
  1319. * @---------------------------------------------------
  1320. * @type : function
  1321. * @access : public
  1322. * @desc :
  1323. * @param :
  1324. * @return :
  1325. * @---------------------------------------------------
  1326. */
  1327. function fInptCncl(){
  1328. grp_condageval.visible = false;
  1329. grp_condnurtprval.visible = false;
  1330. grp_condsexflag.visible = false;
  1331. grp_condroomval.visible = false;
  1332. model.setValue("/root/main/selinfo/alertcdflag", "");
  1333. model.setValue("/root/main/selinfo/alertprecondyn", "");
  1334. model.setValue("/root/main/selinfo/openyn", "N");
  1335. }
  1336. /**
  1337. * @group :
  1338. * @ver : 2009.03
  1339. * @by : 전지은
  1340. * @---------------------------------------------------
  1341. * @type : function
  1342. * @access : public
  1343. * @desc :
  1344. * @param :
  1345. * @return :
  1346. * @---------------------------------------------------
  1347. */
  1348. function fAddSlipList() {
  1349. var slipno = model.getValue("/root/main/mntrheaderinfo/slipno");
  1350. if (isNull(slipno)) { // 슬립번호가 없는 경우만 복사 슬립번호가 있을 경우는 조건 THEN만 복사함
  1351. model.copyNode("/root/main/mntrheaderinfo", "/root/temp/mntrlist");
  1352. fSetupControl("rdo_cpgmntrflag2");
  1353. model.setValue("/root/main/mntrheaderinfo/cpgno" , model.getValue("/root/main/cond/cpgno"));
  1354. model.setValue("/root/main/mntrheaderinfo/cpghistseq" , model.getValue("/root/main/cond/cpghistseq"));
  1355. model.setValue("/root/main/mntrheaderinfo/slipno" , "");
  1356. model.setValue("/root/main/mntrheaderinfo/sliphistno" , "");
  1357. var preCondNode = instance1.selectSingleNode("/root/temp/mntrdetllist[alertprecondyn='Y']");
  1358. if( preCondNode != null ){
  1359. model.copyNode("/root/main/mntrpredetlinfo/mntrdetllist","/root/temp/mntrdetllist[alertprecondyn='Y']");
  1360. model.removenode(preCondNode);
  1361. }else{
  1362. model.resetInstanceNode("/root/main/mntrpredetlinfo/mntrdetllist");
  1363. }
  1364. }
  1365. var mntrList = instance1.selectNodes("/root/temp/mntrdetllist");
  1366. if (mntrList.length > 0) {
  1367. for (i =0; i < mntrList.length ; i++ ) {
  1368. mntrNode = mntrList.item(i);
  1369. model.setValue(mntrNode.selectSingleNode("m"), "i");
  1370. }
  1371. }
  1372. copyNodeListType("/root/main/mntrdetlinfo", "/root/temp/mntrdetllist", "after");
  1373. model.refresh();
  1374. for (i = 0; i < grd_slipcondlist2.rows ; i++) {
  1375. var m = model.getValue("/root/main/mntrdetlinfo/mntrdetllist[" + i + "]/m");
  1376. if (m == "i") {
  1377. grd_slipcondlist2.rowStatus(i) = 1;
  1378. }
  1379. }
  1380. //설정된 스텝번호를 파라메터로 셋팅해서 outline의 아이콘 불이 들어오도록 (2009.04.14)
  1381. setParameter("SPMQP00300_before_stepno", "0");
  1382. setParameter("SPMQP00300_after_stepno", model.getValue("/root/main/mntrheaderinfo/stepno"));
  1383. }
  1384. /**
  1385. * @group :
  1386. * @ver : 2009.04
  1387. * @by : 전지은
  1388. * @---------------------------------------------------
  1389. * @type : function
  1390. * @access : public
  1391. * @desc : 선택한 IF 조건을 삭제한다
  1392. * @param :
  1393. * @return :
  1394. * @---------------------------------------------------
  1395. */
  1396. function fDelInCondInfo(){
  1397. model.resetInstanceNode("/root/main/selalertcdflag");
  1398. var selPreTestCds = model.getValue("/root/main/selpretestcd");
  1399. if( !isNull(selPreTestCds) ){
  1400. var selPreTestCd = selPreTestCds.split("▦");
  1401. for( var i=0; i<selPreTestCd.length; i++){
  1402. model.removeNodeset("/root/main/mntrpredetlinfo/mntrdetllist[testnm='"+selPreTestCd[i]+"']");
  1403. }
  1404. //cmb_alertcdflag2.refresh();
  1405. ipt_alertrem.refresh();
  1406. ipt_alertrem2.refresh();
  1407. model.setValue("/root/main/selpretestcd", "");
  1408. }
  1409. }
  1410. /**
  1411. * @group :
  1412. * @ver : 2010.05
  1413. * @by : 김호준
  1414. * @---------------------------------------------------
  1415. * @type : function
  1416. * @access : public
  1417. * @desc : 선택한 병실을 중복 가능하도록 추가함.
  1418. * @param : 추가하려는 병실 명
  1419. * @return :
  1420. * @---------------------------------------------------
  1421. */
  1422. function fAddRoomInfo(addroom) {
  1423. var roomInfo = model.getValue("/root/main/selinfo/condroomval");
  1424. var dupCD = "N";
  1425. if (roomInfo != "" ) {
  1426. // 중복값 체크
  1427. for (var i=0 ; i<roomInfo.length ; i++) {
  1428. if (addroom == roomInfo.substring(i, i+addroom.length)) dupCD = "Y";
  1429. }
  1430. if (dupCD == "N") roomInfo = roomInfo + ", " + addroom;
  1431. } else {
  1432. roomInfo = addroom;
  1433. }
  1434. model.setValue("/root/main/selinfo/condroomval", roomInfo);
  1435. ipt_roomval.refresh();
  1436. }
  1437. /**
  1438. * @group :
  1439. * @ver : 2010.06.10
  1440. * @by : sonjy
  1441. * @---------------------------------------------------
  1442. * @type : function
  1443. * @access : public
  1444. * @desc : 권한check 및 권한에 따른 setting
  1445. * @param :
  1446. * @return :
  1447. * @---------------------------------------------------
  1448. */
  1449. function fSetAuthInfo(){
  1450. /*=======================================================
  1451. * by sonjy 20100610
  1452. * 1. 진료과 multi select 관련 진료과조회 및 default값 추가
  1453. * 2. 권한구분에 따른 setting
  1454. =========================================================*/
  1455. model.makeNode("/root/send/reqdata");
  1456. mmbfGetDeptCodeComboList("/root/send/reqdata", "/root/init/orddept/orddeptlist" , "A"); //부서코드 콤보(외래+입원)
  1457. var nodelist = model.instance1.selectNodes( "/root/init/orddept/orddeptlist/dept" );
  1458. if( nodelist != null && nodelist.length > 0 ) chx_multiorddept.attribute("rows") = nodelist.length ;
  1459. model.makeNode("/root/init/search/orddept/orddeptlist" );
  1460. model.copyNode( "/root/init/search/orddept/orddeptlist", "/root/init/orddept/orddeptlist" );
  1461. model.makeNode("/root/init/search/slipkindcdlist");
  1462. model.copyNode("/root/init/search/slipkindcdlist", "/root/init/slipkindcdlist");
  1463. search_fromdd.value = getCurrentDate().toDate().getAddDate(-3,"M").getDateFormat();
  1464. search_todd.value = getCurrentDate() ;
  1465. //master 권한 부서 처리
  1466. mmbfGetHardCodeInfoNm("/root/hidden/authinfo", "/root/hidden/authinfo", "223");
  1467. var authdeptlst = model.instance1.selectNodes("/root/hidden/authinfo/hardcd[hardcd='" + getUserInfo("dutplcecd") + "' and cdseqno > 200 ]");
  1468. if( authdeptlst != null && authdeptlst.length > 0 ){
  1469. model.makeValue("/root/hidden/userauthinfoflag", "M" );
  1470. }
  1471. addComboItem("cmb_search_slipkindcd" , "범위-전체", "" );
  1472. if( model.getValue("/root/hidden/userauthinfoflag") == "M" ){
  1473. cmb_search_useyn.disabled = false;
  1474. rdo_essnyn.disabled = false ;
  1475. rdo_sliptypecd.disabled = false ;
  1476. cmb_search_orddept.disabled = false ;
  1477. cmb_search_slipkindcd.disabled = false ;
  1478. addComboItem("cmb_search_orddept" , "진료과-전체", "" );
  1479. } else {
  1480. model.makeValue("/root/hidden/userauthinfoflag", "U" );
  1481. cmb_search_orddept.value = getUserInfo("dutplcecd") ;
  1482. }
  1483. fInitAuthInfo();
  1484. }
  1485. /**
  1486. * @group :
  1487. * @ver : 2010.06.10
  1488. * @by : sonjy
  1489. * @---------------------------------------------------
  1490. * @type : function
  1491. * @access : public
  1492. * @desc : grid size 조정
  1493. * @param :
  1494. * @return :
  1495. * @---------------------------------------------------
  1496. */
  1497. function fSetSlipListSizeEx(){
  1498. var btntxt = btn_resizegrid.attribute("text");
  1499. var orgwidth = 285 ;
  1500. if( btntxt == ">>" ){
  1501. grd_sliplist.attribute("width") = orgwidth + 538 ;
  1502. btn_resizegrid.attribute("text") = "<<";
  1503. } else {
  1504. grd_sliplist.attribute("width") = orgwidth;
  1505. btn_resizegrid.attribute("text") = ">>";
  1506. }
  1507. }
  1508. /**
  1509. * @group :
  1510. * @ver : 2010.06.10
  1511. * @by : sonjy
  1512. * @---------------------------------------------------
  1513. * @type : function
  1514. * @access : public
  1515. * @desc : 권한check 및 권한에 따른 초기화
  1516. * @param :
  1517. * @return :
  1518. * @---------------------------------------------------
  1519. */
  1520. function fInitAuthInfo(){
  1521. if( model.getValue("/root/hidden/userauthinfoflag" ) == "M" ){
  1522. model.makeValue("/root/main/mntrheaderinfo/slipkindcd", "A");
  1523. }else {
  1524. model.makeValue("/root/main/mntrheaderinfo/slipkindcd", "P");
  1525. }
  1526. model.makeValue("/root/main/mntrheaderinfo/essnyn" , "Y");
  1527. model.makeValue("/root/main/mntrheaderinfo/useyn" , "Y");
  1528. model.makeValue("/root/main/mntrheaderinfo/fromdd" , getCurrentDate() );
  1529. model.makeValue("/root/main/mntrheaderinfo/todd" , "99991231");
  1530. model.makeValue("/root/main/mntrheaderinfo/recvrflag" , "1" ) ;
  1531. model.makeValue("/root/main/mntrheaderinfo/alertgrde" , "M01" ) ;
  1532. fSetCtrlAuth();
  1533. }
  1534. ]]>
  1535. </script>
  1536. </xhtml:head>
  1537. <xhtml:body guideline="1,823;1,286;" style="margin-left:8; ">
  1538. <switch id="switch1" style="left:0px; top:0px; width:825px; height:560px; border-style:hidden; ">
  1539. <case id="basic" selected="true">
  1540. <caption id="caption8" class="cell_1" visibility="hidden" style="left:287px; top:325px; width:65px; height:23px; ">알람 조건</caption>
  1541. <caption id="caption20" class="cell_1" style="left:287px; top:507px; width:65px; height:49px; ">
  1542. <![CDATA[알람 후
  1543. 권고]]>
  1544. </caption>
  1545. <line id="line5" class="line_2" style="x1:287px; y1:76px; x2:823px; y2:76px; "/>
  1546. <line id="line8" class="line_2" style="x1:287px; y1:556px; x2:823px; y2:556px; "/>
  1547. <line id="lne_sliplist" class="line_1" style="x1:0px; y1:0px; x2:283px; y2:0px; "/>
  1548. <line id="lne_slipinfo" class="line_1" style="x1:287px; y1:0px; x2:823px; y2:0px; "/>
  1549. <input id="ipt_slipnm" ref="/root/main/mntrheaderinfo/slipnm" navindex="1" class="input_essential" style="left:354px; top:6px; width:468px; height:19px; "/>
  1550. <button id="btn_addslipcond" class="btn2_letter2" style="left:736px; top:157px; width:42px; height:19px; ">
  1551. <caption>추가</caption>
  1552. <script type="javascript" ev:event="DOMActivate">
  1553. <![CDATA[
  1554. fAddCondRow();
  1555. ]]>
  1556. </script>
  1557. </button>
  1558. <button id="btn_delslipcond" class="btn2_letter2" style="left:780px; top:157px; width:42px; height:19px; ">
  1559. <caption>삭제</caption>
  1560. <script type="javascript" ev:event="DOMActivate">
  1561. <![CDATA[
  1562. fDelCondRow();
  1563. ]]>
  1564. </script>
  1565. </button>
  1566. <select1 id="rdo_alertcondflag" ref="/root/main/mntrheaderinfo/alertcondflag" navindex="2" overflow="visible" appearance="full" cols="2" cellspacing="10" style="left:430px; top:421px; width:150px; height:20px; border-style:none; ">
  1567. <choices>
  1568. <item>
  1569. <label>전체충족</label>
  1570. <value>A</value>
  1571. </item>
  1572. <item>
  1573. <label>일부충족</label>
  1574. <value>P</value>
  1575. </item>
  1576. </choices>
  1577. <script type="javascript" ev:event="xforms-value-changed">
  1578. <![CDATA[
  1579. fSetupControl("rdo_alertcondflag");
  1580. ]]>
  1581. </script>
  1582. </select1>
  1583. <select1 id="rdo_alertgrde" ref="/root/main/mntrheaderinfo/alertgrde" navindex="2" overflow="visible" appearance="full" cols="2" cellspacing="30" style="left:354px; top:446px; width:216px; height:40px; border-style:none; ">
  1584. <choices>
  1585. <itemset nodeset="/root/init/M0517/M0517">
  1586. <label ref="cdnm"/>
  1587. <value ref="cdid"/>
  1588. </itemset>
  1589. </choices>
  1590. <script type="javascript" ev:event="xforms-value-changed">
  1591. <![CDATA[
  1592. fSetupControl("rdo_alertgrde");
  1593. ]]>
  1594. </script>
  1595. </select1>
  1596. <input id="ipt_alertgrdecnts" ref="/root/main/mntrheaderinfo/actcnts" class="input_essential" disabled="true" style="left:354px; top:484px; width:468px; height:19px; "/>
  1597. <textarea id="txt_guidedocucnts" ref="/root/main/mntrheaderinfo/guidedocucnts" scroll="autovscroll" style="left:354px; top:508px; width:376px; height:47px; "/>
  1598. <caption id="cap_sliptypecd" class="cell_1" visibility="hidden" style="left:287px; top:29px; width:65px; height:23px; ">분류 구분</caption>
  1599. <select1 id="rdo_sliptypecd" ref="/root/main/mntrheaderinfo/slipkindcd" navindex="2" visibility="visible" disabled="true" overflow="visible" appearance="full" cols="3" style="left:354px; top:30px; width:171px; height:20px; border-style:none; ">
  1600. <choices>
  1601. <itemset nodeset="/root/init/slipkindcdlist/slipkindcd">
  1602. <label ref="cdnm"/>
  1603. <value ref="cdid"/>
  1604. </itemset>
  1605. </choices>
  1606. <script type="javascript" ev:event="xforms-value-changed">
  1607. <![CDATA[
  1608. chx_multiorddept.visible = false ;
  1609. if( model.getValue("/root/hidden/userauthinfoflag" ) == "M" ){
  1610. var slipkindcd = model.getValue("/root/main/mntrheaderinfo/slipkindcd") ;
  1611. if( slipkindcd == "D" ) {
  1612. btn_multiorddept.disabled = false;
  1613. } else {
  1614. btn_multiorddept.disabled = true ;
  1615. if( slipkindcd == "P" ) {
  1616. messageBox("관리자는 개인용 set을 만들수 ", "I004");
  1617. model.makeValue("/root/main/mntrheaderinfo/slipkindcd", "A") ;
  1618. rdo_sliptypecd.refresh();
  1619. return ;
  1620. }
  1621. }
  1622. }
  1623. ]]>
  1624. </script>
  1625. </select1>
  1626. <line id="line1" class="line_2" style="x1:287px; y1:27px; x2:823px; y2:27px; "/>
  1627. <line id="line2" class="line_2" style="x1:287px; y1:150px; x2:823px; y2:150px; "/>
  1628. <line id="line3" class="line_2" style="x1:287px; y1:443px; x2:823px; y2:443px; "/>
  1629. <line id="line4" class="line_2" style="x1:287px; y1:505px; x2:823px; y2:505px; "/>
  1630. <caption id="cap_alertcondcntunit" style="left:580px; top:421px; width:123px; height:20px; ">( 개/전체)</caption>
  1631. <input id="ipt_alertcondcnt" ref="/root/main/mntrheaderinfo/thencondcnt" class="input_default" format="#####" style="left:591px; top:420px; width:55px; height:19px; ">
  1632. <script type="javascript" ev:event="xforms-value-changed">
  1633. <![CDATA[
  1634. fSetupControl("ipt_alertcondcnt");
  1635. ]]>
  1636. </script>
  1637. </input>
  1638. <caption id="cap_alertcondcnt" class="cell_1" visibility="hidden" style="left:764px; top:421px; width:55px; height:20px; ">충족갯수</caption>
  1639. <caption id="cap_alertgrde" class="cell_1" style="left:287px; top:445px; width:65px; height:61px; ">알람 방법</caption>
  1640. <caption id="cap_slipnm" class="cell_1" style="left:287px; top:5px; width:65px; height:23px; ">제목</caption>
  1641. <caption id="cap_condlist" class="cell_1" style="left:287px; top:152px; width:65px; height:292px; ">
  1642. <![CDATA[조건
  1643. [THEN]]]>
  1644. </caption>
  1645. <datagrid id="grd_slipcondlist" nodeset="/root/main/mntrdetlinfo/mntrdetllist" caption="구분^testitemcd^코드^항목명^hvalappflag^lvalappflag^하한치^하한치^상한치^상한치^내용^단위^caption1^refseq^alertrem^alertprecondyn^checkyn^m" colwidth="63, 5, 5, 135, 5, 5, 42, 30, 42, 30, 48, 39, 5, 5, 5, 5, 5, 5" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" colsep="^" tooltip="true" style="left:354px; top:178px; width:468px; height:239px; ">
  1646. <col ref="alertcdflag" type="combo">
  1647. <choices>
  1648. <itemset nodeset="/root/init/M0505/M0505">
  1649. <label ref="cdnm"/>
  1650. <value ref="cdid"/>
  1651. </itemset>
  1652. </choices>
  1653. </col>
  1654. <col ref="testitemcd" visibility="hidden"/>
  1655. <col ref="testcd" visibility="hidden"/>
  1656. <col ref="testnm"/>
  1657. <col ref="lvalappflag" visibility="hidden"/>
  1658. <col ref="hvalappflag" visibility="hidden"/>
  1659. <col class="input_default" ref="reflval" type="input" style="text-align:right; "/>
  1660. <col ref="lvalappflag" type="combo">
  1661. <choices>
  1662. <item>
  1663. <label>이상</label>
  1664. <value>U</value>
  1665. </item>
  1666. <item>
  1667. <label>이하</label>
  1668. <value>D</value>
  1669. </item>
  1670. <item>
  1671. <label/>
  1672. <value>N</value>
  1673. </item>
  1674. </choices>
  1675. </col>
  1676. <col class="input_default" ref="refhval" type="input" style="text-align:right; "/>
  1677. <col ref="hvalappflag" type="combo">
  1678. <choices>
  1679. <item>
  1680. <label>이상</label>
  1681. <value>U</value>
  1682. </item>
  1683. <item>
  1684. <label>이하</label>
  1685. <value>D</value>
  1686. </item>
  1687. <item>
  1688. <label/>
  1689. <value>N</value>
  1690. </item>
  1691. </choices>
  1692. </col>
  1693. <col ref="refcnts" type="input"/>
  1694. <col ref="unitnm"/>
  1695. <col ref="reftypecd" visibility="hidden"/>
  1696. <col ref="refseq" visibility="hidden"/>
  1697. <col ref="alertrem" visibility="hidden"/>
  1698. <col ref="alertprecondyn" visibility="hidden"/>
  1699. <col ref="checkyn" visibility="hidden"/>
  1700. <col ref="m" visibility="hidden"/>
  1701. <script type="javascript" ev:event="xforms-value-changed">
  1702. <![CDATA[
  1703. fGetNewAttrInfo("THEN");
  1704. fChngCondVal();
  1705. ]]>
  1706. </script>
  1707. <script type="javascript" ev:event="onmousedown">
  1708. <![CDATA[
  1709. //by sonjy 20100705 rule 적용
  1710. if( model.getValue("/root/main/cond/inpttypecd") != "Q" ) {
  1711. setPopupMenu("grd_slipcondlist", false, "/root/main/condpoplist/menu/item", "name", "func");
  1712. }
  1713. else {
  1714. if( bDisableMode == "false" ) setPopupMenu("grd_slipcondlist", false, "/root/main/condpoplist/menu/item", "name", "func");
  1715. }
  1716. ]]>
  1717. </script>
  1718. <script type="javascript" ev:event="DOMFocusOut">
  1719. <![CDATA[
  1720. window.setPopupMenu(false);
  1721. ]]>
  1722. </script>
  1723. <script type="javascript" ev:event="ondblclick">
  1724. <![CDATA[
  1725. fGetNewAttrInfo("THEN");
  1726. ]]>
  1727. </script>
  1728. </datagrid>
  1729. <caption id="cap_useyn" class="cell_1" style="left:287px; top:29px; width:65px; height:23px; ">적용범위</caption>
  1730. <select1 id="rdo_useyn" ref="/root/main/mntrheaderinfo/useyn" navindex="2" overflow="visible" appearance="full" cols="2" cellspacing="10" style="left:355px; top:55px; width:81px; height:20px; border-style:none; ">
  1731. <choices>
  1732. <item>
  1733. <label>Y</label>
  1734. <value>Y</value>
  1735. </item>
  1736. <item>
  1737. <label>N</label>
  1738. <value>N</value>
  1739. </item>
  1740. </choices>
  1741. </select1>
  1742. <caption id="caption2" class="cell_1" style="left:287px; top:78px; width:65px; height:73px; ">조건[IF]</caption>
  1743. <select1 id="rdo_cpgmntrflag" ref="/root/main/selalertcdflag" appearance="minimal" style="left:354px; top:79px; width:161px; height:19px; ">
  1744. <choices>
  1745. <itemset nodeset="/root/init/MI0505/M0505">
  1746. <label ref="cdnm"/>
  1747. <value ref="cdid"/>
  1748. </itemset>
  1749. </choices>
  1750. <script type="javascript" ev:event="xforms-value-changed">
  1751. <![CDATA[
  1752. fSetupControl("cmb_alertcdflag2");
  1753. ]]>
  1754. </script>
  1755. </select1>
  1756. <button id="btn_cpgmntrflag" navindex="4" class="icon_search" style="left:480px; top:104px; width:16px; height:16px; ">
  1757. <caption/>
  1758. <script type="javascript" ev:event="DOMActivate">
  1759. <![CDATA[
  1760. fGetNewAttrInfo("IF");
  1761. ]]>
  1762. </script>
  1763. </button>
  1764. <button id="btn_delalertcdflag" class="icon_minus" style="left:501px; top:103px; width:13px; height:15px; ">
  1765. <caption/>
  1766. <script type="javascript" ev:event="DOMActivate">
  1767. <![CDATA[
  1768. fDelInCondInfo();
  1769. ]]>
  1770. </script>
  1771. </button>
  1772. <caption id="caption4" class="cell_1" style="left:354px; top:419px; width:65px; height:23px; ">충족 조건</caption>
  1773. <line id="line6" class="line_2" style="x1:354px; y1:123px; x2:515px; y2:123px; "/>
  1774. <select id="ipt_alertrem" ref="/root/main/selpretestcd" overflow="scroll" scroll="autovscroll" appearance="compact" sep="▦" style="left:517px; top:79px; width:305px; height:69px; ">
  1775. <choices>
  1776. <itemset nodeset="/root/main/mntrpredetlinfo/mntrdetllist">
  1777. <label ref="alertcnts"/>
  1778. <value ref="testnm"/>
  1779. </itemset>
  1780. </choices>
  1781. <script type="javascript" ev:event="onmousedown">
  1782. <![CDATA[
  1783. //by sonjy 20100705 rule 적용
  1784. if( model.getValue("/root/main/cond/inpttypecd") == "Q" ) {
  1785. if( bDisableMode == "false" ) setPopupMenu("ipt_alertrem", false, "/root/main/precondpoplist/menu/item", "name", "func");
  1786. }
  1787. ]]>
  1788. </script>
  1789. </select>
  1790. <select1 id="rdo_ifcondcnt" ref="/root/main/mntrheaderinfo/ifcondcnt" navindex="2" overflow="visible" appearance="full" cols="2" cellspacing="10" style="left:420px; top:129px; width:97px; height:15px; border-style:none; ">
  1791. <choices>
  1792. <item>
  1793. <label>AND</label>
  1794. <value>A</value>
  1795. </item>
  1796. <item>
  1797. <label>OR</label>
  1798. <value>1</value>
  1799. </item>
  1800. </choices>
  1801. <script type="javascript" ev:event="xforms-value-changed">
  1802. <![CDATA[
  1803. fSetupControl("rdo_alertcondflag");
  1804. ]]>
  1805. </script>
  1806. </select1>
  1807. <caption id="cap_ifcondcnt" class="cell_1" style="left:354px; top:126px; width:65px; height:23px; ">충족 조건</caption>
  1808. <caption id="caption5" class="cell_1" style="left:572px; top:445px; width:68px; height:38px; ">수신 대상</caption>
  1809. <select1 id="rdo_recvrflag" ref="/root/main/mntrheaderinfo/recvrflag" overflow="visible" appearance="full" cols="1" cellspacing="20" vcellspacing="3" style="left:645px; top:444px; width:160px; height:40px; border-style:none; ">
  1810. <choices>
  1811. <item>
  1812. <label>담당자</label>
  1813. <value>1</value>
  1814. </item>
  1815. <item>
  1816. <label>환자</label>
  1817. <value>2</value>
  1818. </item>
  1819. </choices>
  1820. </select1>
  1821. <caption id="cap_view" visibility="hidden" style="left:574px; top:420px; width:247px; height:85px; background-color:#ffffff; border-style:solid; ">
  1822. <![CDATA[문구 구성 예 )
  1823. [긴급] #3# 환자의 #6# 검사 결과는
  1824. #8# 입니다.!
  1825. 사용법 ) 직접 입력 및 콤보박스에서 선택]]>
  1826. </caption>
  1827. <button id="btn_guide" class="btn2_letter6" style="left:735px; top:509px; width:86px; height:19px; text-align:center; ">
  1828. <caption>범례</caption>
  1829. <script type="javascript" ev:event="DOMActivate">
  1830. <![CDATA[
  1831. var value = cap_view.attribute("visibility")
  1832. if (value == "hidden") {
  1833. cap_view.visible = true;
  1834. } else {
  1835. cap_view.visible = false;
  1836. }
  1837. ]]>
  1838. </script>
  1839. </button>
  1840. <select1 id="cmb_comnusewrdcd" ref="/root/main/comnusewrdcd" appearance="minimal" style="left:734px; top:533px; width:87px; height:19px; ">
  1841. <choices>
  1842. <itemset nodeset="/root/init/M0606/M0606">
  1843. <label ref="cdnm"/>
  1844. <value ref="cdid"/>
  1845. </itemset>
  1846. </choices>
  1847. <script type="javascript" ev:event="xforms-value-changed">
  1848. <![CDATA[
  1849. var comnusewrdcd = model.getValue("/root/main/comnusewrdcd");
  1850. var guidedocucnts = model.getValue("/root/main/mntrheaderinfo/guidedocucnts");
  1851. model.setValue("/root/main/mntrheaderinfo/guidedocucnts", guidedocucnts + "#" + comnusewrdcd + "#");
  1852. txt_guidedocucnts.refresh();
  1853. ]]>
  1854. </script>
  1855. </select1>
  1856. <line id="line7" class="line_2" style="x1:286px; y1:52px; x2:822px; y2:52px; "/>
  1857. <caption id="caption6" class="cell_1" style="left:287px; top:54px; width:65px; height:23px; ">사용 여부</caption>
  1858. <button id="btn_multiorddept" navindex="4" class="icon_search" disabled="true" style="left:520px; top:30px; width:16px; height:16px; ">
  1859. <caption/>
  1860. <script type="javascript" ev:event="DOMActivate">
  1861. <![CDATA[
  1862. if( model.getValue("/root/hidden/userauthinfoflag" ) == "M" ){
  1863. if( chx_multiorddept.visible == true ) chx_multiorddept.visible = false ;
  1864. else {
  1865. chx_multiorddept.visible = true ;
  1866. }
  1867. }
  1868. ]]>
  1869. </script>
  1870. </button>
  1871. <caption id="caption7" class="cell_1" style="left:540px; top:29px; width:65px; height:23px; ">필수구분</caption>
  1872. <select1 id="rdo_essnyn" ref="/root/main/mntrheaderinfo/essnyn" navindex="2" disabled="true" overflow="visible" appearance="full" cols="2" cellspacing="10" style="left:608px; top:30px; width:117px; height:20px; border-style:none; ">
  1873. <choices>
  1874. <item>
  1875. <label>필수</label>
  1876. <value>Y</value>
  1877. </item>
  1878. <item>
  1879. <label>선택</label>
  1880. <value>N</value>
  1881. </item>
  1882. </choices>
  1883. <script type="javascript" ev:event="xforms-value-changed">
  1884. <![CDATA[
  1885. //by sonjy 20100610 필수일 경우 사용여부 'Y'로 SETTING
  1886. if( model.getValue("/root/main/mntrheaderinfo/essnyn" ) == "Y" ){
  1887. model.makeValue("/root/main/mntrheaderinfo/useyn", "Y" );
  1888. rdo_useyn.refresh();
  1889. }
  1890. ]]>
  1891. </script>
  1892. </select1>
  1893. <caption id="caption9" class="cell_1" style="left:540px; top:54px; width:65px; height:23px; ">적용일자</caption>
  1894. <input id="ipt_fromdd" ref="/root/main/mntrheaderinfo/fromdd" class="input_default" inputtype="date" style="left:608px; top:55px; width:100px; height:19px; "/>
  1895. <input id="ipt_todd" ref="/root/main/mntrheaderinfo/todd" class="input_default" inputtype="date" style="left:722px; top:55px; width:100px; height:19px; "/>
  1896. <caption id="caption10" class="search_no_b" style="left:710px; top:56px; width:12px; height:17px; ">~</caption>
  1897. <select id="chx_multiorddept" ref="/root/main/mntrheaderinfo/multiorddept" visibility="hidden" overflow="scroll" scroll="auto" appearance="full" cols="2" sep="^" style="left:487px; top:55px; width:335px; height:210px; background-color:#ffffff; border-color:#0000ff; border-style:solid; ">
  1898. <choices>
  1899. <itemset nodeset="/root/init/orddept/orddeptlist/dept">
  1900. <label ref="depthngnm"/>
  1901. <value ref="deptcd"/>
  1902. </itemset>
  1903. </choices>
  1904. </select>
  1905. <datagrid id="grd_sliplist" nodeset="/root/main/mntrinfo/mntrlist" autoresize="true" caption="상태^구분^제목^slipno^sliphistno^필수^사용^적용일^종료일^생성일^사용부서" colwidth="0, 46, 216, 0, 0, 42,100, 100, 100, 100, 100" mergecellsfixedrows="bycolrec" rowsep="|" colsep="^" style="left:0px; top:90px; width:285px; height:465px; ">
  1906. <col ref="status" type="combo" disabled="true" style="text-align:center; ">
  1907. <choices>
  1908. <item>
  1909. <label>추가</label>
  1910. <value>I</value>
  1911. </item>
  1912. <item>
  1913. <label>수정</label>
  1914. <value>U</value>
  1915. </item>
  1916. <item>
  1917. <label>삭제</label>
  1918. <value>D</value>
  1919. </item>
  1920. <item>
  1921. <label>-</label>
  1922. <value>-</value>
  1923. </item>
  1924. </choices>
  1925. </col>
  1926. <col ref="slipkindcd" type="combo" disabled="true">
  1927. <choices>
  1928. <itemset nodeset="/root/init/slipkindcdlist/slipkindcd">
  1929. <label ref="cdnm"/>
  1930. <value ref="cdid"/>
  1931. </itemset>
  1932. </choices>
  1933. </col>
  1934. <col ref="slipnm"/>
  1935. <col ref="slipno"/>
  1936. <col ref="sliphistno"/>
  1937. <col ref="essnyn"/>
  1938. <col ref="useyn"/>
  1939. <col ref="fromdd" format="yyyy-mm-dd" style="text-align:center; "/>
  1940. <col ref="todd" format="yyyy-mm-dd" style="text-align:center; "/>
  1941. <col ref="cretdd" format="yyyy-mm-dd" style="text-align:center; "/>
  1942. <col ref="multiorddeptnm"/>
  1943. <script type="javascript" ev:event="ondblclick">
  1944. <![CDATA[
  1945. fSelSlipInfo();
  1946. //by sonjy 권한 check 20100610
  1947. if( model.getValue("/root/main/cond/inpttypecd") != "G" ) fSetCtrlAuth();
  1948. ]]>
  1949. </script>
  1950. <script type="javascript" ev:event="onmousedown">
  1951. <![CDATA[
  1952. setPopupMenu("grd_sliplist", false, "/root/main/mntrpoplist/menu/item", "name", "func");
  1953. ]]>
  1954. </script>
  1955. <script type="javascript" ev:event="DOMFocusOut">
  1956. <![CDATA[
  1957. window.setPopupMenu(false);
  1958. ]]>
  1959. </script>
  1960. </datagrid>
  1961. <group id="group2" style="left:0px; top:5px; width:285px; height:80px; vertical-align:top; ">
  1962. <shape id="roundrect1" appearance="roundrect" style="left:0px; top:0px; width:285px; height:80px; "/>
  1963. <caption id="caption12" class="search_name" style="left:5px; top:9px; width:86px; height:17px; ">일자</caption>
  1964. <input id="search_fromdd" ref="/root/send/cond/fromdd" class="input_s_essential" inputtype="date" style="left:62px; top:8px; width:95px; height:19px; "/>
  1965. <button id="btn_view" class="btn1_letter2" style="left:177px; top:57px; width:56px; height:22px; ">
  1966. <caption>조회</caption>
  1967. <script type="javascript" ev:event="DOMActivate">
  1968. <![CDATA[
  1969. fGetSlipList();
  1970. ]]>
  1971. </script>
  1972. </button>
  1973. <caption id="caption17" class="search_name" style="left:5px; top:33px; width:91px; height:17px; ">구분</caption>
  1974. <input id="search_todd" ref="/root/send/cond/todd" class="input_s_essential" inputtype="date" style="left:177px; top:8px; width:95px; height:19px; "/>
  1975. <caption id="caption18" class="search_n_b" style="left:161px; top:9px; width:12px; height:17px; font-weight:bolder; ">~</caption>
  1976. <select1 id="cmb_search_slipkindcd" ref="/root/send/cond/slipkindcd" class="combo_default" disabled="true" appearance="minimal" style="left:62px; top:33px; width:95px; height:19px; ">
  1977. <choices>
  1978. <itemset nodeset="/root/init/search/slipkindcdlist/slipkindcd">
  1979. <label ref="cdnm"/>
  1980. <value ref="cdid"/>
  1981. </itemset>
  1982. </choices>
  1983. </select1>
  1984. <select1 id="cmb_search_orddept" ref="/root/send/cond/orddeptcd" class="combo_default" disabled="true" appearance="minimal" style="left:177px; top:33px; width:95px; height:19px; ">
  1985. <choices>
  1986. <itemset nodeset="/root/init/search/orddept/orddeptlist/dept">
  1987. <label ref="depthngnm"/>
  1988. <value ref="deptcd"/>
  1989. </itemset>
  1990. </choices>
  1991. </select1>
  1992. <select1 id="cmb_search_useyn" ref="/root/send/cond/useyn" class="combo_default" disabled="true" appearance="minimal" style="left:62px; top:57px; width:95px; height:19px; ">
  1993. <choices>
  1994. <item>
  1995. <label>사용여부-전체</label>
  1996. <value/>
  1997. </item>
  1998. <item>
  1999. <label>Y</label>
  2000. <value>Y</value>
  2001. </item>
  2002. <item>
  2003. <label>N</label>
  2004. <value>N</value>
  2005. </item>
  2006. </choices>
  2007. </select1>
  2008. </group>
  2009. </case>
  2010. <case id="expert2">
  2011. <line id="line10" class="line_2" style="x1:3px; y1:390px; x2:723px; y2:390px; "/>
  2012. <line id="line21" class="line_2" style="x1:0px; y1:364px; x2:723px; y2:364px; "/>
  2013. <line id="line11" class="line_2" style="x1:0px; y1:414px; x2:723px; y2:414px; "/>
  2014. <line id="line13" class="line_2" style="x1:0px; y1:179px; x2:723px; y2:179px; "/>
  2015. <caption id="caption21" class="cell_1" style="left:3px; top:253px; width:85px; height:137px; ">조건[THEN]</caption>
  2016. <caption id="caption11" class="cell_1" style="left:402px; top:180px; width:80px; height:23px; ">선택 STEP</caption>
  2017. <caption id="caption13" class="cell_1" style="left:3px; top:206px; width:85px; height:46px; ">조건[IF]</caption>
  2018. <line id="line17" class="line_2" style="x1:0px; y1:204px; x2:723px; y2:204px; "/>
  2019. <line id="line18" class="line_2" style="x1:0px; y1:250px; x2:723px; y2:250px; "/>
  2020. <caption id="caption15" class="cell_1" style="left:3px; top:417px; width:85px; height:41px; ">알람후 권고</caption>
  2021. <caption id="caption16" class="cell_1" style="left:90px; top:205px; width:65px; height:23px; ">구분</caption>
  2022. <line id="lne_sliplist3" class="line_1" style="x1:0px; y1:16px; x2:723px; y2:16px; "/>
  2023. <datagrid id="grd_sliplist2" nodeset="/root/main/mntrinfo/mntrlist" caption="상태^제목^목적^스탭명" colwidth="33, 327, 226, 117" mergecellsfixedrows="bycolrec" rowsep="|" colsep="^" tooltip="true" style="left:0px; top:20px; width:723px; height:109px; ">
  2024. <col ref="status" type="combo" disabled="true" style="text-align:center; ">
  2025. <choices>
  2026. <item>
  2027. <label>추가</label>
  2028. <value>I</value>
  2029. </item>
  2030. <item>
  2031. <label>수정</label>
  2032. <value>U</value>
  2033. </item>
  2034. <item>
  2035. <label>삭제</label>
  2036. <value>D</value>
  2037. </item>
  2038. <item>
  2039. <label>-</label>
  2040. <value>-</value>
  2041. </item>
  2042. </choices>
  2043. </col>
  2044. <col ref="slipnm"/>
  2045. <col ref="cpgmntrflag" type="combo" disabled="true">
  2046. <choices>
  2047. <itemset nodeset="/root/init/M0514/M0514">
  2048. <label ref="cdnm"/>
  2049. <value ref="cdid"/>
  2050. </itemset>
  2051. </choices>
  2052. </col>
  2053. <col ref="stepnm"/>
  2054. <script type="javascript" ev:event="ondblclick">
  2055. <![CDATA[
  2056. fSelSlipInfo();
  2057. ]]>
  2058. </script>
  2059. <script type="javascript" ev:event="onmousedown">
  2060. <![CDATA[
  2061. setPopupMenu("grd_sliplist2", false, "/root/main/mntrpoplist/menu/item", "name", "func");
  2062. ]]>
  2063. </script>
  2064. <script type="javascript" ev:event="DOMFocusOut">
  2065. <![CDATA[
  2066. window.setPopupMenu(false);
  2067. ]]>
  2068. </script>
  2069. </datagrid>
  2070. <caption id="cap_sliplist2" class="tit_2" style="left:2px; top:2px; width:142px; height:14px; ">모니터링 리스트</caption>
  2071. <button id="btn_addslipinfo2" class="btn2_letter2" style="left:681px; top:131px; width:42px; height:19px; ">
  2072. <caption>신규</caption>
  2073. <script type="javascript" ev:event="DOMActivate">
  2074. <![CDATA[
  2075. fAddSlipInfo();
  2076. ]]>
  2077. </script>
  2078. </button>
  2079. <caption id="cap_slipinfo2" class="tit_2" style="left:0px; top:135px; width:142px; height:13px; ">모니터링 상세내역</caption>
  2080. <line id="lne_slipinfo2" class="line_1" style="x1:0px; y1:151px; x2:723px; y2:151px; "/>
  2081. <input id="ipt_slipnm2" ref="/root/main/mntrheaderinfo/slipnm" navindex="1" class="input_essential" style="left:90px; top:157px; width:633px; height:19px; "/>
  2082. <select1 id="rdo_cpgmntrflag2" ref="/root/main/mntrheaderinfo/cpgmntrflag" navindex="2" overflow="visible" appearance="full" cols="2" cellspacing="30" style="left:90px; top:182px; width:310px; height:20px; border-style:none; ">
  2083. <choices>
  2084. <itemset nodeset="/root/init/M0514/M0514">
  2085. <label ref="cdnm"/>
  2086. <value ref="cdid"/>
  2087. </itemset>
  2088. </choices>
  2089. <script type="javascript" ev:event="xforms-value-changed">
  2090. <![CDATA[
  2091. fSetupControl("rdo_cpgmntrflag2");
  2092. ]]>
  2093. </script>
  2094. </select1>
  2095. <select1 id="cmb_selectstep2" ref="/root/main/selstepno" navindex="1" appearance="minimal" style="left:485px; top:182px; width:238px; height:19px; ">
  2096. <choices>
  2097. <itemset nodeset="/root/init/stepinfo/info">
  2098. <label ref="stepnm"/>
  2099. <value ref="stepno"/>
  2100. </itemset>
  2101. </choices>
  2102. <script type="javascript" ev:event="xforms-value-changed">
  2103. <![CDATA[
  2104. //model.setValue("/root/main/mntrheaderinfo/stepfromno", model.getValue("/root/main/selstepno"));
  2105. //model.setValue("/root/main/mntrheaderinfo/steptono", model.getValue("/root/main/selstepno"));
  2106. model.setValue("/root/main/mntrheaderinfo/stepno", model.getValue("/root/main/selstepno"));
  2107. var keyNo = model.getValue("/root/main/mntrheaderinfo/slipno");
  2108. if( !isNull(keyNo) ){
  2109. //setParameter("SPMQP00300_before_stepno", model.getValue("/root/main/mntrinfo/mntrlist[" + slipGrdCtrl.row + "]/stepfromno"));
  2110. setParameter("SPMQP00300_before_stepno", model.getValue("/root/main/mntrinfo/mntrlist[" + slipGrdCtrl.row + "]/stepno"));
  2111. }else{
  2112. setParameter("SPMQP00300_before_stepno", "0");
  2113. }
  2114. setParameter("SPMQP00300_after_stepno", cmb_selectstep2.value);
  2115. ]]>
  2116. </script>
  2117. </select1>
  2118. <select1 id="cmb_alertcdflag2" ref="/root/main/selalertcdflag" disabled="true" appearance="minimal" style="left:157px; top:208px; width:128px; height:19px; ">
  2119. <choices>
  2120. <itemset nodeset="/root/init/MI0505/M0505">
  2121. <label ref="cdnm"/>
  2122. <value ref="cdid"/>
  2123. </itemset>
  2124. </choices>
  2125. <script type="javascript" ev:event="xforms-value-changed">
  2126. <![CDATA[
  2127. fSetupControl("cmb_alertcdflag2");
  2128. ]]>
  2129. </script>
  2130. </select1>
  2131. <button id="btn_alertcdflag2" navindex="4" class="icon_search" disabled="true" style="left:289px; top:208px; width:16px; height:16px; ">
  2132. <caption/>
  2133. <script type="javascript" ev:event="DOMActivate">
  2134. <![CDATA[
  2135. fGetNewAttrInfo("IF");
  2136. ]]>
  2137. </script>
  2138. </button>
  2139. <button id="btn_addslipcond2" class="btn2_letter2" style="left:3px; top:330px; width:42px; height:19px; ">
  2140. <caption>추가</caption>
  2141. <script type="javascript" ev:event="DOMActivate">
  2142. <![CDATA[
  2143. fAddCondRow();
  2144. ]]>
  2145. </script>
  2146. </button>
  2147. <button id="btn_delslipcond2" class="btn2_letter2" style="left:45px; top:330px; width:42px; height:19px; ">
  2148. <caption>삭제</caption>
  2149. <script type="javascript" ev:event="DOMActivate">
  2150. <![CDATA[
  2151. fDelCondRow();
  2152. ]]>
  2153. </script>
  2154. </button>
  2155. <select1 id="rdo_alertcondflag2" ref="/root/main/mntrheaderinfo/alertcondflag" navindex="2" overflow="visible" appearance="full" cols="2" cellspacing="10" style="left:160px; top:369px; width:150px; height:20px; border-style:none; ">
  2156. <choices>
  2157. <item>
  2158. <label>전체충족</label>
  2159. <value>A</value>
  2160. </item>
  2161. <item>
  2162. <label>일부충족</label>
  2163. <value>P</value>
  2164. </item>
  2165. </choices>
  2166. <script type="javascript" ev:event="xforms-value-changed">
  2167. <![CDATA[
  2168. fSetupControl("rdo_alertcondflag");
  2169. ]]>
  2170. </script>
  2171. </select1>
  2172. <select1 id="rdo_alertgrde2" ref="/root/main/mntrheaderinfo/alertgrde" navindex="2" overflow="visible" appearance="full" cols="6" cellspacing="3" style="left:90px; top:393px; width:632px; height:20px; border-style:none; ">
  2173. <choices>
  2174. <itemset nodeset="/root/init/M0507/M0507">
  2175. <label ref="cdnm"/>
  2176. <value ref="cdid"/>
  2177. </itemset>
  2178. </choices>
  2179. </select1>
  2180. <textarea id="txt_guidedocucnts2" ref="/root/main/mntrheaderinfo/guidedocucnts" scroll="autovscroll" style="left:90px; top:416px; width:543px; height:42px; "/>
  2181. <caption id="cap_slipnm2" class="cell_1" style="left:3px; top:156px; width:85px; height:23px; ">제목</caption>
  2182. <caption id="cap_cpgmntrflag2" class="cell_1" style="left:3px; top:181px; width:85px; height:23px; ">목적</caption>
  2183. <caption id="cap_alertcondflag2" class="cell_1" style="left:90px; top:366px; width:65px; height:23px; ">충족 조건</caption>
  2184. <caption id="cap_alertgrde2" class="cell_1" style="left:3px; top:392px; width:85px; height:23px; ">알람 방법</caption>
  2185. <caption id="cap_alertcondcntunit2" style="left:310px; top:369px; width:118px; height:20px; ">( 개/전체)</caption>
  2186. <input id="ipt_alertcondcnt2" ref="/root/main/mntrheaderinfo/thencondcnt" class="input_default" format="#####" style="left:321px; top:369px; width:55px; height:19px; ">
  2187. <script type="javascript" ev:event="xforms-value-changed">
  2188. <![CDATA[
  2189. fSetupControl("ipt_alertcondcnt");
  2190. ]]>
  2191. </script>
  2192. </input>
  2193. <caption id="cap_alertcondcnt2" class="cell_1" visibility="hidden" style="left:435px; top:367px; width:55px; height:20px; ">충족갯수</caption>
  2194. <datagrid id="grd_slipcondlist2" nodeset="/root/main/mntrdetlinfo/mntrdetllist" caption="구분^groupcd^코드^항목명^scndcondcd^sliphistno^alertgrde^하한치^하한치^상한치^상한치^모니터링 기준^refhval^단위^내용^caption2^alertprecondyn^checkyn" colwidth="97, 5, 50, 190, 5, 5, 5, 45, 40, 45, 40, 5, 5, 47, 40, 5, 5, 5, 100" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" colsep="^" tooltip="true" style="left:90px; top:253px; width:633px; height:110px; font-family:휴먼아미체; ">
  2195. <col ref="alertcdflag" type="combo">
  2196. <choices>
  2197. <itemset nodeset="/root/init/MT0505/M0505">
  2198. <label ref="cdnm"/>
  2199. <value ref="cdid"/>
  2200. </itemset>
  2201. </choices>
  2202. </col>
  2203. <col ref="testitemcd" visibility="hidden"/>
  2204. <col ref="testcd"/>
  2205. <col ref="testnm"/>
  2206. <col ref="scndcondcd" visibility="hidden"/>
  2207. <col ref="hvalappflag" visibility="hidden"/>
  2208. <col ref="lvalappflag" visibility="hidden"/>
  2209. <col ref="reflval" type="input" style="text-align:right; "/>
  2210. <col ref="lvalappflag" type="combo">
  2211. <choices>
  2212. <item>
  2213. <label>이상</label>
  2214. <value>U</value>
  2215. </item>
  2216. <item>
  2217. <label>이하</label>
  2218. <value>D</value>
  2219. </item>
  2220. <item>
  2221. <label/>
  2222. <value>N</value>
  2223. </item>
  2224. </choices>
  2225. </col>
  2226. <col ref="refhval" type="input" style="text-align:right; "/>
  2227. <col ref="hvalappflag" type="combo">
  2228. <choices>
  2229. <item>
  2230. <label>이상</label>
  2231. <value>U</value>
  2232. </item>
  2233. <item>
  2234. <label>이하</label>
  2235. <value>D</value>
  2236. </item>
  2237. <item>
  2238. <label/>
  2239. <value>N</value>
  2240. </item>
  2241. </choices>
  2242. </col>
  2243. <col ref="alertcnts" visibility="hidden"/>
  2244. <col ref="refseq" visibility="hidden"/>
  2245. <col ref="unitnm"/>
  2246. <col ref="refcnts" type="input"/>
  2247. <col ref="reftypecd" visibility="hidden"/>
  2248. <col ref="alertprecondyn" visibility="hidden"/>
  2249. <col ref="checkyn" visibility="hidden"/>
  2250. <col ref="m" visibility="hidden"/>
  2251. <script type="javascript" ev:event="xforms-value-changed">
  2252. <![CDATA[
  2253. fGetNewAttrInfo("THEN");
  2254. fChngCondVal();
  2255. ]]>
  2256. </script>
  2257. <script type="javascript" ev:event="onmousedown">
  2258. <![CDATA[
  2259. setPopupMenu("grd_slipcondlist2", false, "/root/main/condpoplist/menu/item", "name", "func");
  2260. ]]>
  2261. </script>
  2262. <script type="javascript" ev:event="DOMFocusOut">
  2263. <![CDATA[
  2264. window.setPopupMenu(false);
  2265. ]]>
  2266. </script>
  2267. <script type="javascript" ev:event="ondblclick">
  2268. <![CDATA[
  2269. fGetNewAttrInfo("THEN");
  2270. ]]>
  2271. </script>
  2272. </datagrid>
  2273. <button id="btn_delalertcdflag2" class="icon_minus" style="left:312px; top:209px; width:13px; height:15px; ">
  2274. <caption/>
  2275. <script type="javascript" ev:event="DOMActivate">
  2276. <![CDATA[
  2277. fDelInCondInfo();
  2278. ]]>
  2279. </script>
  2280. </button>
  2281. <input id="ipt_alertrem3" ref="/root/main/mntrpredetlinfo/mntrdetllist/alertcnts" visibility="hidden" disabled="true" editable="false" style="left:322px; top:231px; width:13px; height:19px; "/>
  2282. <select id="ipt_alertrem2" ref="/root/main/selpretestcd" overflow="scroll" scroll="autovscroll" appearance="compact" sep="▦" style="left:329px; top:207px; width:393px; height:42px; ">
  2283. <choices>
  2284. <itemset nodeset="/root/main/mntrpredetlinfo/mntrdetllist">
  2285. <label ref="alertcnts"/>
  2286. <value ref="testnm"/>
  2287. </itemset>
  2288. </choices>
  2289. <script type="javascript" ev:event="onmousedown">
  2290. <![CDATA[
  2291. ]]>
  2292. </script>
  2293. </select>
  2294. <select1 id="rdo_ifcondcnt2" ref="/root/main/mntrheaderinfo/ifcondcnt" navindex="2" overflow="visible" appearance="full" cols="2" cellspacing="10" style="left:158px; top:231px; width:97px; height:15px; border-style:none; ">
  2295. <choices>
  2296. <item>
  2297. <label>AND</label>
  2298. <value>A</value>
  2299. </item>
  2300. <item>
  2301. <label>OR</label>
  2302. <value>1</value>
  2303. </item>
  2304. </choices>
  2305. <script type="javascript" ev:event="xforms-value-changed">
  2306. <![CDATA[
  2307. fSetupControl("rdo_alertcondflag");
  2308. ]]>
  2309. </script>
  2310. </select1>
  2311. <caption id="cap_ifcondcnt2" class="cell_1" style="left:90px; top:229px; width:65px; height:23px; ">충족 조건</caption>
  2312. <caption id="cap_view2" visibility="hidden" style="left:475px; top:327px; width:247px; height:85px; background-color:#ffffff; border-style:solid; ">
  2313. <![CDATA[문구 구성 예 )
  2314. [긴급] #3# 환자의 #6# 검사 결과는
  2315. #8# 입니다.!
  2316. 사용법 ) 직접 입력 및 콤보박스에서 선택]]>
  2317. </caption>
  2318. <button id="btn_guide2" class="btn2_letter6" style="left:635px; top:416px; width:86px; height:19px; text-align:center; ">
  2319. <caption>범례</caption>
  2320. <script type="javascript" ev:event="DOMActivate">
  2321. <![CDATA[
  2322. var value = cap_view2.attribute("visibility")
  2323. if (value == "hidden") {
  2324. cap_view2.visible = true;
  2325. } else {
  2326. cap_view2.visible = false;
  2327. }
  2328. ]]>
  2329. </script>
  2330. </button>
  2331. <select1 id="cmb_comnusewrdcd2" ref="/root/main/comnusewrdcd" appearance="minimal" style="left:635px; top:438px; width:87px; height:19px; ">
  2332. <choices>
  2333. <itemset nodeset="/root/init/M0606/M0606">
  2334. <label ref="cdnm"/>
  2335. <value ref="cdid"/>
  2336. </itemset>
  2337. </choices>
  2338. <script type="javascript" ev:event="xforms-value-changed">
  2339. <![CDATA[
  2340. var comnusewrdcd = model.getValue("/root/main/comnusewrdcd");
  2341. var guidedocucnts = model.getValue("/root/main/mntrheaderinfo/guidedocucnts");
  2342. model.setValue("/root/main/mntrheaderinfo/guidedocucnts", guidedocucnts + "#" + comnusewrdcd + "#");
  2343. txt_guidedocucnts2.refresh();
  2344. ]]>
  2345. </script>
  2346. </select1>
  2347. </case>
  2348. </switch>
  2349. <group id="grp_condnurtprval" visibility="hidden" disabled="false" style="left:470px; top:390px; width:251px; height:70px; background-color:#99ccff; border-color:#3366ff; border-style:solid; ">
  2350. <caption id="cap_condnurtprvalnm" style="left:5px; top:6px; width:84px; height:17px; font-weight:bold; vertical-align:middle; ">혈당간호기록</caption>
  2351. <button id="btn_nurtprcnfm" class="btn2_letter2" style="left:159px; top:45px; width:42px; height:19px; ">
  2352. <caption>확인</caption>
  2353. <script type="javascript" ev:event="DOMActivate">
  2354. <![CDATA[
  2355. fInputCondVal("condnurtprval");
  2356. ]]>
  2357. </script>
  2358. </button>
  2359. <button id="btn_nurtprcncl" class="btn2_letter2" style="left:202px; top:45px; width:42px; height:19px; ">
  2360. <caption>취소</caption>
  2361. <script type="javascript" ev:event="DOMActivate">
  2362. <![CDATA[
  2363. fInptCncl();
  2364. ]]>
  2365. </script>
  2366. </button>
  2367. <input id="ipt_condnurtprlval" ref="/root/main/selinfo/condnurtprlval" style="left:9px; top:25px; width:40px; height:19px; "/>
  2368. <input id="ipt_condnurtprhval" ref="/root/main/selinfo/condnurtprhval" style="left:111px; top:24px; width:40px; height:19px; "/>
  2369. <caption id="caption1" style="left:99px; top:25px; width:15px; height:20px; ">~</caption>
  2370. <caption id="cap_condnurtprvalunit" style="left:203px; top:25px; width:38px; height:20px; ">mg/dL</caption>
  2371. <select1 id="combo3" ref="/root/main/selinfo/condlvalflag" appearance="minimal" style="left:49px; top:25px; width:50px; height:19px; ">
  2372. <choices>
  2373. <item>
  2374. <label>이상</label>
  2375. <value>U</value>
  2376. </item>
  2377. <item>
  2378. <label>이하</label>
  2379. <value>D</value>
  2380. </item>
  2381. </choices>
  2382. </select1>
  2383. <select1 id="combo4" ref="/root/main/selinfo/condhvalflag" appearance="minimal" style="left:151px; top:24px; width:50px; height:19px; ">
  2384. <choices>
  2385. <item>
  2386. <label>이상</label>
  2387. <value>U</value>
  2388. </item>
  2389. <item>
  2390. <label>이하</label>
  2391. <value>D</value>
  2392. </item>
  2393. </choices>
  2394. </select1>
  2395. </group>
  2396. <group id="grp_condsexflag" visibility="hidden" disabled="false" style="left:470px; top:405px; width:251px; height:50px; background-color:#99ccff; border-color:#3366ff; border-style:solid; ">
  2397. <caption id="cap_condsexflagnm" style="left:5px; top:5px; width:34px; height:20px; font-weight:bold; vertical-align:middle; ">성별</caption>
  2398. <select1 id="rdo_condsexflag" ref="/root/main/selinfo/condsexflag" overflow="scroll" appearance="full" cols="2" style="left:37px; top:5px; width:102px; height:20px; border-style:none; ">
  2399. <choices>
  2400. <itemset nodeset="/root/init/P0313/P0313">
  2401. <label ref="cdnm"/>
  2402. <value ref="cdid"/>
  2403. </itemset>
  2404. </choices>
  2405. </select1>
  2406. <caption id="cap_condsexflagunit" visibility="hidden" style="left:39px; top:24px; width:10px; height:20px; ">-</caption>
  2407. <button id="btn_sexcnfm" class="btn2_letter2" style="left:158px; top:25px; width:42px; height:19px; ">
  2408. <caption>확인</caption>
  2409. <script type="javascript" ev:event="DOMActivate">
  2410. <![CDATA[
  2411. fInputCondVal("condsexflag");
  2412. ]]>
  2413. </script>
  2414. </button>
  2415. <button id="btn_sexcncl" class="btn2_letter2" style="left:202px; top:25px; width:42px; height:19px; ">
  2416. <caption>취소</caption>
  2417. <script type="javascript" ev:event="DOMActivate">
  2418. <![CDATA[
  2419. fInptCncl();
  2420. ]]>
  2421. </script>
  2422. </button>
  2423. </group>
  2424. <group id="grp_condageval" visibility="hidden" disabled="false" style="left:470px; top:390px; width:251px; height:50px; background-color:#99ccff; border-color:#3366ff; border-style:solid; ">
  2425. <caption id="cap_condagevalnm" style="left:5px; top:5px; width:34px; height:20px; font-weight:bold; vertical-align:middle; ">연령</caption>
  2426. <button id="btn_agecnfm" class="btn2_letter2" style="left:158px; top:25px; width:42px; height:19px; ">
  2427. <caption>확인</caption>
  2428. <script type="javascript" ev:event="DOMActivate">
  2429. <![CDATA[
  2430. fInputCondVal("condageval");
  2431. ]]>
  2432. </script>
  2433. </button>
  2434. <button id="btn_agecncl" class="btn2_letter2" style="left:202px; top:25px; width:42px; height:19px; ">
  2435. <caption>취소</caption>
  2436. <script type="javascript" ev:event="DOMActivate">
  2437. <![CDATA[
  2438. fInptCncl();
  2439. ]]>
  2440. </script>
  2441. </button>
  2442. <input id="ipt_condagelval" ref="/root/main/selinfo/condagelval" style="left:39px; top:5px; width:35px; height:19px; ">
  2443. <script type="javascript" ev:event="onkeyup">
  2444. <![CDATA[
  2445. ]]>
  2446. </script>
  2447. </input>
  2448. <caption id="caption3" style="left:125px; top:6px; width:15px; height:20px; ">~</caption>
  2449. <input id="ipt_condagehval" ref="/root/main/selinfo/condagehval" style="left:137px; top:5px; width:35px; height:19px; ">
  2450. <script type="javascript" ev:event="onkeyup">
  2451. <![CDATA[
  2452. ]]>
  2453. </script>
  2454. </input>
  2455. <caption id="cap_condagevalunit" style="left:225px; top:5px; width:20px; height:20px; ">세</caption>
  2456. <select1 id="combo1" ref="/root/main/selinfo/condlvalflag" appearance="minimal" style="left:74px; top:5px; width:50px; height:19px; ">
  2457. <choices>
  2458. <item>
  2459. <label>이상</label>
  2460. <value>U</value>
  2461. </item>
  2462. <item>
  2463. <label>이하</label>
  2464. <value>D</value>
  2465. </item>
  2466. </choices>
  2467. </select1>
  2468. <select1 id="combo2" ref="/root/main/selinfo/condhvalflag" appearance="minimal" style="left:172px; top:5px; width:50px; height:19px; ">
  2469. <choices>
  2470. <item>
  2471. <label>이상</label>
  2472. <value>U</value>
  2473. </item>
  2474. <item>
  2475. <label>이하</label>
  2476. <value>D</value>
  2477. </item>
  2478. </choices>
  2479. </select1>
  2480. </group>
  2481. <group id="grp_condroomval" visibility="hidden" disabled="false" style="left:470px; top:390px; width:251px; height:70px; background-color:#99ccff; border-color:#3366ff; border-style:solid; ">
  2482. <input id="ipt_roomval" ref="/root/main/selinfo/condroomval" navindex="1" editable="false" style="left:5px; top:25px; width:240px; height:19px; "/>
  2483. <button id="btn_roomadd" class="btn2_letter2" style="left:202px; top:5px; width:42px; height:19px; ">
  2484. <caption>추가</caption>
  2485. <script type="javascript" ev:event="DOMActivate">
  2486. <![CDATA[
  2487. var addroom = model.getValue("/root/main/selinfo/condroomsel");
  2488. if (addroom == "") {
  2489. messageBox("병실이 선택되지 ", "E007", "\n병실 선택 후 추가 버튼을 클릭하여 주십시오. ");
  2490. } else {
  2491. fAddRoomInfo(addroom);
  2492. }
  2493. ]]>
  2494. </script>
  2495. </button>
  2496. <button id="btn_roomcnfm" class="btn2_letter2" style="left:158px; top:45px; width:42px; height:19px; ">
  2497. <caption>확인</caption>
  2498. <script type="javascript" ev:event="DOMActivate">
  2499. <![CDATA[
  2500. if (model.getValue("/root/main/selinfo/condroomval") == "" ) {
  2501. messageBox("병실이 선택되지 ", "E007", "\n병동 선택 후 병실을 선택하십시오. ");
  2502. } else {
  2503. fInputCondVal("condroomval");
  2504. }
  2505. ]]>
  2506. </script>
  2507. </button>
  2508. <button id="btn_roomcncl" class="btn2_letter2" style="left:202px; top:45px; width:42px; height:19px; ">
  2509. <caption>취소</caption>
  2510. <script type="javascript" ev:event="DOMActivate">
  2511. <![CDATA[
  2512. fInptCncl();
  2513. ]]>
  2514. </script>
  2515. </button>
  2516. <caption id="cap_condroomvalunit" visibility="hidden" style="left:39px; top:24px; width:10px; height:20px; ">-</caption>
  2517. <caption id="cap_condroomval" style="left:5px; top:5px; width:34px; height:20px; font-weight:bold; vertical-align:middle; ">병동</caption>
  2518. <select1 id="cmb_conddeptlist" ref="/root/main/selinfo/condlvalflag" appearance="minimal" style="left:35px; top:5px; width:70px; height:19px; ">
  2519. <choices>
  2520. <itemset nodeset="/root/init/inordrepdeptlist/dept">
  2521. <label ref="depthngnm"/>
  2522. <value ref="deptcd"/>
  2523. </itemset>
  2524. </choices>
  2525. <script type="javascript" ev:event="xforms-value-changed">
  2526. <![CDATA[
  2527. model.makeValue("/root/send/reqdata/wardcd", cmb_conddeptlist.value);
  2528. if(submit("TRMMD06103")){
  2529. }
  2530. ]]>
  2531. </script>
  2532. </select1>
  2533. <caption id="cap_condroomvalnm" style="left:110px; top:5px; width:30px; height:20px; font-weight:bold; vertical-align:middle; ">병실</caption>
  2534. <select1 id="cmb_condroomlist" ref="/root/main/selinfo/condroomsel" appearance="minimal" style="left:140px; top:5px; width:60px; height:19px; ">
  2535. <choices>
  2536. <itemset nodeset="/root/init/roomlist/roomlist">
  2537. <label ref="roomnm"/>
  2538. <value ref="roomcd"/>
  2539. </itemset>
  2540. </choices>
  2541. </select1>
  2542. </group>
  2543. </xhtml:body>
  2544. </xhtml:html>