SMLLR00410_두검사항목별결과관리.xrw 103 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * 제 목 : SMLLR00400.xrw
  4. * 설 명 : 검사항목별결과관리
  5. * 설 계 자 : (주)에이씨케이 -
  6. * 작 성 자 : (주)에이씨케이 - 조철형
  7. * 작 성 일 : 2007.5.21
  8. * 수정이력 :
  9. * 기 타 :
  10. -->
  11. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
  12. <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">
  13. <xhtml:head>
  14. <xhtml:title/>
  15. <model id="model1">
  16. <instance id="instance1">
  17. <root>
  18. <main>
  19. <testinfo>
  20. <patlist>
  21. <chk/>
  22. <workno/>
  23. <bcno/>
  24. <pid/>
  25. <patnm/>
  26. <sexage/>
  27. <orddrnm/>
  28. <orddeptnm/>
  29. <wardroom/>
  30. <inptrslt1 readonly=""/>
  31. <inptrslt2 readonly=""/>
  32. <inptrslt3 readonly=""/>
  33. <inptrslt4 readonly=""/>
  34. <inptrslt5 readonly=""/>
  35. <inptrslt6 readonly=""/>
  36. <inptrslt7 readonly=""/>
  37. <inptrslt8 readonly=""/>
  38. <inptrslt9 readonly=""/>
  39. <inptrslt10 readonly=""/>
  40. <inptrslt11 readonly=""/>
  41. <inptrslt12 readonly=""/>
  42. <inptrslt13 readonly=""/>
  43. <inptrslt14 readonly=""/>
  44. <inptrslt15 readonly=""/>
  45. <inptrslt16 readonly=""/>
  46. <inptrslt17 readonly=""/>
  47. <inptrslt18 readonly=""/>
  48. <inptrslt19 readonly=""/>
  49. <inptrslt20 readonly=""/>
  50. <inptrslt21 readonly=""/>
  51. <inptrslt22 readonly=""/>
  52. <inptrslt23 readonly=""/>
  53. <inptrslt24 readonly=""/>
  54. <inptrslt25 readonly=""/>
  55. <inptrslt26 readonly=""/>
  56. <inptrslt27 readonly=""/>
  57. <inptrslt28 readonly=""/>
  58. <inptrslt29 readonly=""/>
  59. <inptrslt30 readonly=""/>
  60. </patlist>
  61. <spcinfo>
  62. <spcscrnnm/>
  63. <refval/>
  64. <judgmark/>
  65. <panicmark/>
  66. <deltamark/>
  67. <criticalmark/>
  68. <alertmark/>
  69. <rsltmark/>
  70. <reptrslt/>
  71. <bfreptrslt/>
  72. <bflastreptdt/>
  73. <testeqmtcd/>
  74. <rsltregid/>
  75. <mdlreptid/>
  76. <lastreptdt/>
  77. <cmt/>
  78. <testcmt/>
  79. <testcont/>
  80. <testcmts/>
  81. </spcinfo>
  82. <testlist>
  83. <rkey/>
  84. <workno/>
  85. <bcno/>
  86. <execprcpuniqno/>
  87. <testcd/>
  88. <spccd/>
  89. <bufinptrslt/>
  90. <reptrslt/>
  91. <rsltunit/>
  92. <judgmark/>
  93. <panicmark/>
  94. <deltamark/>
  95. <criticalmark/>
  96. <alertmark/>
  97. <rsltmark/>
  98. <rsltstat/>
  99. <bfbcno/>
  100. <bflastreptdt/>
  101. <testeqmtcd/>
  102. <comment/>
  103. <tclskind/>
  104. <spcacptid/>
  105. <spcacptdt/>
  106. <spcacptnm/>
  107. <rsltrgsgid/>
  108. <rsltrgstdt/>
  109. <rsltrgstnm/>
  110. <mdlreptid/>
  111. <mdlreptdt/>
  112. <mdlreptnm/>
  113. <lastreptid/>
  114. <lastreptdt/>
  115. <lastreptnm/>
  116. <tclscd/>
  117. <bfinptrslt/>
  118. <bfreptrslt/>
  119. <rsltseq/>
  120. <prcpgenrflag/>
  121. <rsltkind/>
  122. <rsltintsize/>
  123. <rsltdcmlsize/>
  124. <rundkind/>
  125. <rvalflag/>
  126. <descrval/>
  127. <judgkind/>
  128. <userjudgchar1/>
  129. <userjudgchar2/>
  130. <userjudgchar3/>
  131. <panicflag/>
  132. <panicminval/>
  133. <panicmaxval/>
  134. <deltaflag/>
  135. <deltaminval/>
  136. <deltamaxval/>
  137. <deltaterm/>
  138. <criticflag/>
  139. <criticminval/>
  140. <criticmaxval/>
  141. <alertflag/>
  142. <alertminval/>
  143. <allertmaxval/>
  144. <alimitls/>
  145. <alimitflag/>
  146. <alimitminval/>
  147. <alimith/>
  148. <alimiths/>
  149. <alimitls/>
  150. <refl/>
  151. <refls/>
  152. <refh/>
  153. <refhs/>
  154. <reflt/>
  155. <rstinterval/>
  156. <iud/>
  157. <spcscrnnm/>
  158. <inptrslt/>
  159. </testlist>
  160. <BAK_TESTITEM>
  161. <rkey/>
  162. <workno/>
  163. <testcd/>
  164. <spccd/>
  165. <inptrslt/>
  166. </BAK_TESTITEM>
  167. </testinfo>
  168. <testgrupdetl>
  169. <chk/>
  170. <tclsnm/>
  171. <tclscd/>
  172. </testgrupdetl>
  173. <getUsernm>
  174. <usernm/>
  175. </getUsernm>
  176. </main>
  177. <send>
  178. <data1/>
  179. <data2/>
  180. <data4/>
  181. </send>
  182. <init>
  183. <LB0106>
  184. <cd/>
  185. <nm/>
  186. </LB0106>
  187. <LB0103>
  188. <cd/>
  189. <nm/>
  190. </LB0103>
  191. </init>
  192. <hidden>
  193. <refparam>
  194. <startdd/>
  195. <enddd/>
  196. <tsectcd/>
  197. <sworkseq/>
  198. <eworkseq>9999</eworkseq>
  199. <rsltstat0>1</rsltstat0>
  200. <tclscdlist/>
  201. <rsltstat1/>
  202. <rsltstat2/>
  203. <tclscdlist2/>
  204. <testgrupseqno/>
  205. <rsltstat/>
  206. <userid/>
  207. <starttm>0000</starttm>
  208. <endtm>2359</endtm>
  209. </refparam>
  210. <ref>
  211. <tclscdlist>
  212. <tclsnmlist/>
  213. <tclscdlist/>
  214. <tclscdlist2/>
  215. <testgrup/>
  216. <tclsnmlist2/>
  217. </tclscdlist>
  218. </ref>
  219. <testcont>
  220. <tsectcd/>
  221. <testcontcd/>
  222. </testcont>
  223. <testconttsectcd>
  224. <cd/>
  225. <nm/>
  226. </testconttsectcd>
  227. <default/>
  228. <currenRow/>
  229. <updateparam>
  230. <rsltstat/>
  231. <tclslrgkind>-</tclslrgkind>
  232. <XFMGbn>result</XFMGbn>
  233. </updateparam>
  234. <rsltcode>
  235. <cd/>
  236. <nm/>
  237. </rsltcode>
  238. <rsltcont>
  239. </rsltcont>
  240. <refflag>
  241. <userid/>
  242. <p_isedit/>
  243. <bcno/>
  244. <rsltstat/>
  245. <testlrgkind/>
  246. </refflag>
  247. <cursor/>
  248. <cmtflag>1</cmtflag>
  249. </hidden>
  250. </root>
  251. </instance>
  252. <bind id="bind1" ref="/root/main/testinfo/patlist/inptrslt1" readonly="../inptrslt1/@readonly = 'true'"/>
  253. <bind id="bind2" ref="/root/main/testinfo/patlist/inptrslt2" readonly="../inptrslt2/@readonly = 'true'"/>
  254. <bind id="bind3" ref="/root/main/testinfo/patlist/inptrslt3" readonly="../inptrslt3/@readonly = 'true'"/>
  255. <bind id="bind4" ref="/root/main/testinfo/patlist/inptrslt4" readonly="../inptrslt4/@readonly = 'true'"/>
  256. <bind id="bind5" ref="/root/main/testinfo/patlist/inptrslt5" readonly="../inptrslt5/@readonly = 'true'"/>
  257. <bind id="bind6" ref="/root/main/testinfo/patlist/inptrslt6" readonly="../inptrslt6/@readonly = 'true'"/>
  258. <bind id="bind7" ref="/root/main/testinfo/patlist/inptrslt7" readonly="../inptrslt7/@readonly = 'true'"/>
  259. <bind id="bind8" ref="/root/main/testinfo/patlist/inptrslt8" readonly="../inptrslt8/@readonly = 'true'"/>
  260. <bind id="bind9" ref="/root/main/testinfo/patlist/inptrslt9" readonly="../inptrslt9/@readonly = 'true'"/>
  261. <bind id="bind10" ref="/root/main/testinfo/patlist/inptrslt10" readonly="../inptrslt10/@readonly = 'true'"/>
  262. <bind id="bind11" ref="/root/main/testinfo/patlist/inptrslt11" readonly="../inptrslt11/@readonly = 'true'"/>
  263. <bind id="bind12" ref="/root/main/testinfo/patlist/inptrslt12" readonly="../inptrslt12/@readonly = 'true'"/>
  264. <bind id="bind13" ref="/root/main/testinfo/patlist/inptrslt13" readonly="../inptrslt13/@readonly = 'true'"/>
  265. <bind id="bind14" ref="/root/main/testinfo/patlist/inptrslt14" readonly="../inptrslt14/@readonly = 'true'"/>
  266. <bind id="bind15" ref="/root/main/testinfo/patlist/inptrslt15" readonly="../inptrslt15/@readonly = 'true'"/>
  267. <bind id="bind16" ref="/root/main/testinfo/patlist/inptrslt16" readonly="../inptrslt16/@readonly = 'true'"/>
  268. <bind id="bind17" ref="/root/main/testinfo/patlist/inptrslt17" readonly="../inptrslt17/@readonly = 'true'"/>
  269. <bind id="bind18" ref="/root/main/testinfo/patlist/inptrslt18" readonly="../inptrslt18/@readonly = 'true'"/>
  270. <bind id="bind19" ref="/root/main/testinfo/patlist/inptrslt19" readonly="../inptrslt19/@readonly = 'true'"/>
  271. <bind id="bind20" ref="/root/main/testinfo/patlist/inptrslt20" readonly="../inptrslt20/@readonly = 'true'"/>
  272. <bind id="bind21" ref="/root/main/testinfo/patlist/inptrslt21" readonly="../inptrslt21/@readonly = 'true'"/>
  273. <bind id="bind22" ref="/root/main/testinfo/patlist/inptrslt22" readonly="../inptrslt22/@readonly = 'true'"/>
  274. <bind id="bind23" ref="/root/main/testinfo/patlist/inptrslt23" readonly="../inptrslt23/@readonly = 'true'"/>
  275. <bind id="bind24" ref="/root/main/testinfo/patlist/inptrslt24" readonly="../inptrslt24/@readonly = 'true'"/>
  276. <bind id="bind25" ref="/root/main/testinfo/patlist/inptrslt25" readonly="../inptrslt25/@readonly = 'true'"/>
  277. <bind id="bind26" ref="/root/main/testinfo/patlist/inptrslt26" readonly="../inptrslt26/@readonly = 'true'"/>
  278. <bind id="bind27" ref="/root/main/testinfo/patlist/inptrslt27" readonly="../inptrslt27/@readonly = 'true'"/>
  279. <bind id="bind28" ref="/root/main/testinfo/patlist/inptrslt28" readonly="../inptrslt28/@readonly = 'true'"/>
  280. <bind id="bind29" ref="/root/main/testinfo/patlist/inptrslt29" readonly="../inptrslt29/@readonly = 'true'"/>
  281. <bind id="bind30" ref="/root/main/testinfo/patlist/inptrslt30" readonly="../inptrslt30/@readonly = 'true'"/>
  282. <script type="javascript" ev:event="xforms-model-construct-done">
  283. <![CDATA[
  284. fSetInit();
  285. ]]>
  286. </script>
  287. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  288. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  289. <script type="javascript" src="../../../com/commonweb/js/numericHelper.js"/>
  290. <script type="javascript" src="../../../lis/commonweb/js/LLZ001.js"/>
  291. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  292. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  293. <submission id="TRLZZ00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/init"/>
  294. <submission id="TRLLR00402" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/testinfo"/>
  295. <submission id="TXLLR00401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance"/>
  296. <submission id="TRLLF90401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/testgrupdetl"/>
  297. <submission id="TRLZZ00104" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/getUsernm"/>
  298. <submission id="TXLLR80101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/properties"/>
  299. <submission id="TRLLR80104" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/dpd" replace="instance" resultref="/root/hidden/dpdrslt"/>
  300. <submission id="TRLZZ00103" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/init/LB0210"/>
  301. </model>
  302. <script type="javascript">
  303. <![CDATA[
  304. var gStartCol = 12;
  305. function fOnclick_btnRef(){
  306. grd_testlist.rebuildStyle();
  307. if(model.getvalue("/root/hidden/ref/tclscdlist/tclscdlist") == ""){
  308. messageBox("검사항목을","C002","") ;
  309. return;
  310. }
  311. var sworkseq = model.getvalue("/root/hidden/refparam/sworkseq");
  312. var eworkseq = model.getvalue("/root/hidden/refparam/eworkseq");
  313. // sworkseq = sworkseq.getLeftPad(4,"0");
  314. eworkseq = eworkseq.getLeftPad(4,"0");
  315. model.setvalue("/root/hidden/refparam/sworkseq" , sworkseq);
  316. model.setvalue("/root/hidden/refparam/eworkseq" , eworkseq);
  317. model.setvalue("/root/hidden/refparam/tclscdlist" , model.getvalue("/root/hidden/ref/tclscdlist/tclscdlist"));
  318. model.setvalue("/root/hidden/refparam/tclscdlist2" , model.getvalue("/root/hidden/ref/tclscdlist/tclscdlist2"));
  319. var rsltstat0 = model.getvalue("/root/hidden/refparam/rsltstat0");
  320. var rsltstat1 = model.getvalue("/root/hidden/refparam/rsltstat1");
  321. var rsltstat2 = model.getvalue("/root/hidden/refparam/rsltstat2");
  322. if(rsltstat0 == "" && rsltstat1 == "" && rsltstat2 == ""){
  323. messageBox("결과구분을 하나이상","C002","") ;
  324. return;
  325. }
  326. // 결과구분 정의
  327. var isRstGbn0 = false; //결과미입력
  328. var isRstGbn1 = false; //결과입력
  329. var isRstGbn2 = false; //최종보고
  330. if(rsltstat0 == "1") isRstGbn0 = true;
  331. if(rsltstat1 == "1") isRstGbn1 = true;
  332. if(rsltstat2 == "1") isRstGbn2 = true;
  333. if (isRstGbn2) {
  334. model.setvalue("/root/hidden/refparam/rsltstat" , "3");
  335. } else {
  336. if (isRstGbn0 && isRstGbn1) {
  337. model.setvalue("/root/hidden/refparam/rsltstat" , "2");
  338. } else if (isRstGbn1) {
  339. model.setvalue("/root/hidden/refparam/rsltstat" , "1");
  340. } else {
  341. model.setvalue("/root/hidden/refparam/rsltstat" , "0");
  342. }
  343. }
  344. model.copyNode("/root/send/data1" , "/root/hidden/refparam");
  345. model.makeValue("/root/send/data1/userdeptflagcd", model.getValue("/root/init/LB0000/nm"));
  346. submit("TRLLR00402" , false);
  347. model.copyNode("/root/send/data1" , "/root/hidden/default");
  348. model.refresh();
  349. fGrdReMake2();
  350. }
  351. //조회후 그리드 리메이크
  352. function fGrdReMake2(){
  353. var vCdList = model.getValue("/root/hidden/ref/tclscdlist/tclscdlist2").split("▦");
  354. var vCdCount = vCdList.length;
  355. var vOrgrst = "";
  356. var curCol = 0;
  357. for (var row = 1; row < grd_testlist.rows; row++) {
  358. for (var col=0; col < parseInt(vCdCount); col++) {
  359. vOrgrst = "inptrslt" + (eval(col+1) );
  360. var testcol = col + gStartCol;
  361. var testrow = fGetRow(row, testcol);
  362. //positive 결과 뻘건색 표시
  363. if(isSearchString(grd_testlist.valueMatrix(row, testcol).toUpperCase(), "POSITIVE")){
  364. grd_testlist.cellStyle("color", row, testcol, row, testcol) = "#ff0000";
  365. }
  366. if (model.getValue("/root/main/testinfo/patlist["+row+"]/"+vOrgrst+"/@readonly") == "true") {
  367. curCol = eval(gStartCol+col);
  368. grd_testlist.cellStyle("background-color", row, curCol, row, curCol) = "#eaeaea";
  369. }
  370. }
  371. }
  372. }
  373. //검사그룹 선택시 그리드 리 메이크
  374. function fGrdReMake(){
  375. if(model.getvalue("/root/hidden/ref/tclscdlist/tclscdlist") !=""){
  376. model.removeNodeset("/root/main/testinfo/patlist");
  377. model.refresh();
  378. if(grd_testlist.cols > gStartCol){
  379. var cols = grd_testlist.cols
  380. for(i=cols ; i > gStartCol ; i--)
  381. grd_testlist.colHidden(i) = true;
  382. }
  383. var caption = "^접수일시^바코드번호^등록번호^성명^성별^나이^진료과^병동/병실^의뢰의사^검체명";
  384. var vTclsnmA = model.getvalue("/root/hidden/ref/tclscdlist/tclsnmlist2").split("▦");
  385. for(i=0;i<vTclsnmA.length;i++){
  386. grd_testlist.colHidden(i + gStartCol) = false;
  387. caption += "^" + vTclsnmA[i];
  388. //grd_testlist.caption = caption; //블럭밖으로 뺌 20080825_승현
  389. //grd_testlist.caption = grd_testlist.caption +"^" + vTclsnmA[i];
  390. //grd_testlist.valueMatrix(0, i + 11) = vTclsnmA[i];
  391. }
  392. grd_testlist.colHidden(i + gStartCol) = false;
  393. caption += "^" + '편차' ;
  394. grd_testlist.caption = caption;
  395. //grd_testlist.rebuild();
  396. }
  397. }
  398. function fPatGridClick(pRow,pCol, Event){
  399. var sDetilRow = fGetRow(pRow,pCol);
  400. //fCurrentHangMok(pCol);
  401. //결과코드 값 가져오기
  402. var testcd = model.getvalue("/root/main/testinfo/testlist["+ sDetilRow +"]/testcd");
  403. cmb_rslt.choices.itemset.attribute("nodeset") = "/root/init/LB0109[etc01='"+ testcd +"']";
  404. if(sDetilRow > 0){
  405. model.setValue("/root/hidden/currenRow", sDetilRow);
  406. model.makeValue("/root/main/testinfo/spcinfo/spcscrnnm" , model.getvalue("/root/main/testinfo/testlist["+sDetilRow+"]/spcscrnnm"));
  407. model.makeValue("/root/main/testinfo/spcinfo/refval" , model.getvalue("/root/main/testinfo/testlist["+sDetilRow+"]/refval"));
  408. model.makeValue("/root/main/testinfo/spcinfo/judgmark" , model.getvalue("/root/main/testinfo/testlist["+sDetilRow+"]/judgmark"));
  409. model.makeValue("/root/main/testinfo/spcinfo/panicmark" , model.getvalue("/root/main/testinfo/testlist["+sDetilRow+"]/panicmark"));
  410. model.makeValue("/root/main/testinfo/spcinfo/deltamark" , model.getvalue("/root/main/testinfo/testlist["+sDetilRow+"]/deltamark"));
  411. model.makeValue("/root/main/testinfo/spcinfo/criticalmark" , model.getvalue("/root/main/testinfo/testlist["+sDetilRow+"]/criticalmark"));
  412. model.makeValue("/root/main/testinfo/spcinfo/alertmark" , model.getvalue("/root/main/testinfo/testlist["+sDetilRow+"]/alertmark"));
  413. model.makeValue("/root/main/testinfo/spcinfo/rsltmark" , model.getvalue("/root/main/testinfo/testlist["+sDetilRow+"]/rsltmark"));
  414. model.makeValue("/root/main/testinfo/spcinfo/reptrslt" , model.getvalue("/root/main/testinfo/testlist["+sDetilRow+"]/reptrslt"));
  415. model.makeValue("/root/main/testinfo/spcinfo/bfreptrslt" , model.getvalue("/root/main/testinfo/testlist["+sDetilRow+"]/bfreptrslt"));
  416. model.makeValue("/root/main/testinfo/spcinfo/bflastreptdt" , model.getvalue("/root/main/testinfo/testlist["+sDetilRow+"]/bflastreptdt"));
  417. model.makeValue("/root/main/testinfo/spcinfo/testeqmtcd" , model.getvalue("/root/main/testinfo/testlist["+sDetilRow+"]/testeqmtcd"));
  418. model.makeValue("/root/main/testinfo/spcinfo/rsltrgsgnm" , model.getvalue("/root/main/testinfo/testlist["+sDetilRow+"]/rsltrgsgnm"));
  419. model.makeValue("/root/main/testinfo/spcinfo/mdlreptnm" , model.getvalue("/root/main/testinfo/testlist["+sDetilRow+"]/mdlreptnm"));
  420. model.makeValue("/root/main/testinfo/spcinfo/lastreptnm" , model.getvalue("/root/main/testinfo/testlist["+sDetilRow+"]/lastreptnm"));
  421. //model.makeValue("/root/main/testinfo/spcinfo/comment" , model.getvalue("/root/main/testinfo/testlist["+sDetilRow+"]/comment"));
  422. model.makeValue("/root/main/testinfo/spcinfo/testcmt" , model.getvalue("/root/main/testinfo/testlist["+sDetilRow+"]/testcmt"));
  423. model.makeValue("/root/main/testinfo/spcinfo/testcont" , "");
  424. model.makeValue("/root/main/testinfo/spcinfo/testcmts" , ""); //검사항목별소견
  425. var vJudg = model.getvalue("/root/main/testinfo/testlist["+sDetilRow+"]/judgmark")
  426. if(vJudg == "H"){
  427. datagrid2.cellStyle ("background-color",1,0,1,0) = "#f7a08b";
  428. }
  429. else if(vJudg == "L"){
  430. datagrid2.cellStyle ("background-color",1,0,1,0) = "#b9e5fb";
  431. }
  432. else{
  433. datagrid2.cellStyle ("background-color",1,0,1,0) = "#ffffff";
  434. }
  435. //panic
  436. var vPanic = model.getvalue("/root/main/testinfo/testlist["+sDetilRow+"]/panicmark");
  437. if(vPanic == "P"){
  438. datagrid2.cellStyle ("background-color",1,1,1,1) = "#7BE6B7";
  439. //datagrid2.cellStyle ("background-color",1,1,1,1) = "#7BE6B7";
  440. }
  441. else{
  442. datagrid2.cellStyle ("background-color",1,1,1,1) = "#ffffff";
  443. }
  444. //delta
  445. var vDelta = model.getvalue("/root/main/testinfo/testlist["+sDetilRow+"]/deltamark");
  446. if(vDelta == "D"){
  447. datagrid2.cellStyle ("background-color",1,2,1,2) = "#dec6a4";
  448. //grd_TestInfoCnts.cellstyle("background-color" , i,4) = "#7BE6B7";
  449. }
  450. else{
  451. datagrid2.cellStyle ("background-color",1,2,1,2) = "#ffffff";
  452. }
  453. //critical
  454. var vCritical = model.getvalue("/root/main/testinfo/testlist["+sDetilRow+"]/criticalmark");
  455. if(vCritical == "C"){
  456. datagrid2.cellStyle ("background-color",1,3,1,3) = "#ffe79d";
  457. //grd_TestInfoCnts.cellstyle("background-color" , i,4) = "#7BE6B7";
  458. }
  459. else{
  460. datagrid2.cellStyle ("background-color",1,3,1,3) = "#ffffff";
  461. }
  462. //alert
  463. var vAlert= model.getvalue("/root/main/testinfo/testlist["+sDetilRow+"]/alertmark");
  464. if(vAlert == "A"){
  465. datagrid2.cellStyle ("background-color",1,4,1,4) = "#fec34d";
  466. //grd_TestInfoCnts.cellstyle("background-color" , i,4) = "#7BE6B7";
  467. }
  468. else{
  469. datagrid2.cellStyle ("background-color",1,4,1,4) = "#ffffff";
  470. }
  471. /*if(model.getValue("/root/main/testinfo/testlist["+ sDetilRow +"]/judgmark") != ""
  472. || model.getValue("/root/main/testinfo/testlist["+ sDetilRow +"]/panicmark") != ""
  473. || model.getValue("/root/main/testinfo/testlist["+ sDetilRow +"]/deltamark") != ""
  474. || model.getValue("/root/main/testinfo/testlist["+ sDetilRow +"]/criticalmark") != ""
  475. || model.getValue("/root/main/testinfo/testlist["+ sDetilRow +"]/alertmark") != ""
  476. || model.getValue("/root/main/testinfo/testlist["+ sDetilRow +"]/relatingmark") != ""
  477. || model.getValue("/root/main/testinfo/testlist["+ sDetilRow +"]/amrmark") != "") {
  478. grd_testlist.cellStyle("color", pRow, pCol) = "#f7a08b";
  479. }else {
  480. grd_testlist.cellStyle("color", pRow, pCol) = "#000000";
  481. }*/
  482. //model.setvalue("/root/main/testinfo/spcinfo/comment" , "-")
  483. if(Event != "M") { //이벤트가 mousemove가 아닐때..
  484. var vSectcd = model.getValue("/root/main/testinfo/testlist["+ sDetilRow +"]/sectcd");
  485. var vTsectcd = model.getValue("/root/main/testinfo/testlist["+ sDetilRow +"]/tsectcd");
  486. fCMTPCD_ChangeNodeset(vSectcd, vTsectcd, sDetilRow);
  487. fInitializeSoGyeon(sDetilRow); //소견 조회초기화
  488. }
  489. model.refresh();
  490. }
  491. else{
  492. model.setValue("/root/hidden/currenRow", "");
  493. model.resetInstanceNode("/root/main/testinfo/spcinfo");
  494. model.refresh();
  495. }
  496. }
  497. // 환자 선택, 취소 클릭
  498. function fSelectCancle() {
  499. pCol = grd_testlist.col;
  500. pRow = grd_testlist.row;
  501. if(pRow == 0) {
  502. for(i = 1; i < grd_testlist.rows; i++) {
  503. var isChk = model.getValue("/root/main/testinfo/patlist[" + i + "]/chk");
  504. var vWorkno = model.getValue("/root/main/testinfo/patlist[" + i + "]/workno");
  505. var vCdList = model.getValue("/root/hidden/refparam/tclscdlist2").split("▦");
  506. if (isChk == "true") {
  507. grd_testlist.rowStyle(i, "data", "background-color") = "#f3e1bf";
  508. } else {
  509. grd_testlist.rowStyle(i, "data", "background-color") = "#FFFFFF";
  510. fGrdReMake2();
  511. }
  512. for (var idx=0; idx < vCdList.length; idx++) {
  513. var vInptRslt = "";
  514. vInptRslt = "inptrslt" + (eval(idx+1) );
  515. var readonly = model.getValue("/root/main/testinfo/patlist["+ i +"]/"+vInptRslt+"/@readonly");
  516. var rstval = model.getValue("/root/main/testinfo/patlist["+ i +"]/"+vInptRslt);
  517. if (readonly == "false") {
  518. col = idx + gStartCol;
  519. var refRow = fGetRow(i, col);
  520. if(rstval == ""){
  521. model.setValue("/root/main/testinfo/testlist[" + refRow + "]/iud", "");
  522. }else{
  523. // 수정된항목 색변경
  524. // grd_testlist.cellStyle("background-color", i, col, i, col) = "#f3e1bf";
  525. model.setValue("/root/main/testinfo/testlist[" + refRow + "]/iud", (isChk != "true") ? "" : "U");
  526. }
  527. }
  528. }
  529. }
  530. } else {
  531. var isChk = model.getValue("/root/main/testinfo/patlist[" + pRow + "]/chk");
  532. var vWorkno = model.getValue("/root/main/testinfo/patlist[" + pRow + "]/workno");
  533. var vCdList = model.getValue("/root/hidden/refparam/tclscdlist2").split("▦");
  534. if (isChk == "true") {
  535. grd_testlist.rowStyle(pRow, "data", "background-color") = "#f3e1bf";
  536. } else {
  537. grd_testlist.rowStyle(pRow, "data", "background-color") = "#FFFFFF";
  538. fGrdReMake2();
  539. }
  540. for (var idx=0; idx < vCdList.length; idx++) {
  541. var vInptRslt = "";
  542. vInptRslt = "inptrslt" + (eval(idx+1) );
  543. var readonly = model.getValue("/root/main/testinfo/patlist["+pRow+"]/"+vInptRslt+"/@readonly");
  544. var rstval = model.getValue("/root/main/testinfo/patlist["+pRow+"]/"+vInptRslt);
  545. if (readonly == "false") {
  546. //var find = grd_testlist.findRow("true", 1, 1, true, true);
  547. col = idx + gStartCol;
  548. //grd_testlist.col = col;
  549. //grd_testlist.row = pRow;
  550. grd_testlist.select(pRow, col) = true;
  551. var refRow = fGetRow(pRow, col);
  552. if(rstval == ""){
  553. model.setValue("/root/main/testinfo/testlist[" + refRow + "]/iud", "");
  554. }else{
  555. // 수정된항목 색변경
  556. // grd_testlist.cellStyle("background-color", pRow, col, pRow, col) = "#f3e1bf";
  557. model.setValue("/root/main/testinfo/testlist[" + refRow + "]/iud", (isChk != "true") ? "" : "U");
  558. }
  559. }
  560. }
  561. }
  562. //결과코드 값 가져오기
  563. var testcd = model.getvalue("/root/main/testinfo/testlist["+ refRow +"]/testcd");
  564. cmb_rslt.choices.itemset.attribute("nodeset") = "/root/init/LB0109[etc01='"+ testcd +"']";
  565. model.refresh();
  566. }
  567. //소견 노드 셋팅
  568. function fCMTPCD_ChangeNodeset(pSectcd, pTsectcd, refRow) {
  569. model.resetInstanceNode("/root/hidden/testconttsectcd");
  570. if(typeof(pSectcd) == "undefined") {
  571. cmb_cmt.choices.itemset.attribute("nodeset") ="/root/init/LB0210[cd='00']";
  572. //model.setValue("/root/hidden/testcont/testcontcd", "-");
  573. } else {
  574. cmb_cmt.choices.itemset.attribute("nodeset")="/root/init/LB0210[cd='00' or (etc01='" + pSectcd + "' and etc02='" + pTsectcd + "')]";
  575. }
  576. model.setvalue("/root/hidden/testcont/testcontcd" , "00");
  577. cmb_cmt.refresh();
  578. var vCmtTsect = model.getValue("/root/main/testinfo/testlist["+ refRow +"]/tsectcd");
  579. model.setValue("/root/hidden/testconttsectcd[1]/cd", "00");
  580. model.setValue("/root/hidden/testconttsectcd[1]/nm", "- 시행부서선택 -");
  581. if(vCmtTsect != ""){
  582. model.makeValue("/root/hidden/testconttsectcd[2]/cd" , vCmtTsect);
  583. model.makeValue("/root/hidden/testconttsectcd[2]/nm" ,
  584. model.getValue("/root/init/LB0106[cd='" + vCmtTsect + "']/nm"));
  585. }
  586. else{
  587. model.setvalue("/root/hidden/testcont/tsectcd" , "00");
  588. }
  589. cmb_sect.refresh();
  590. }
  591. //시행부서선택시 소견노드 셋팅
  592. function fCMTPCD_ChangeNodeset2(){
  593. var tsectcd = model.getvalue("/root/hidden/testcont/tsectcd");
  594. if(tsectcd == "00"){
  595. cmb_cmt.choices.itemset.attribute("nodeset") ="/root/init/LB0210[cd='00']";
  596. }
  597. else{
  598. cmb_cmt.choices.itemset.attribute("nodeset")="/root/init/LB0210[cd='00' or (etc02='" + tsectcd + "')]" ;
  599. }
  600. model.setvalue("/root/hidden/testcont/testcontcd" , "00");
  601. cmb_cmt.refresh();
  602. }
  603. //소견 초기화
  604. function fInitializeSoGyeon(refRow){
  605. var cntTsect = getNodesetCount("/root/hidden/testconttsectcd");
  606. var cntSG = getNodesetCount("/root/main/testinfo/testcont");
  607. var curTsect = "";
  608. var strSG = "";
  609. var plusIdx = 1;
  610. /*if(cntSG == 0){
  611. model.makenode("/root/main/testinfo/testcont");
  612. }
  613. for(var sNum = 2; sNum <= cntTsect; sNum++){
  614. curTsect = model.getValue("/root/hidden/testconttsectcd[" + sNum + "]/cd");
  615. if(model.getValue("/root/main/testinfo/testcont[execdeptcd='"+ curTsect + "']/execdeptcd") == ""){
  616. var SG = parseInt(cntSG)+parseInt(plusIdx);
  617. model.makeNode("/root/main/testinfo/testcont[" + SG + "]/testcontcd");
  618. model.makeNode("/root/main/testinfo/testcont[" + SG + "]/execdeptcd");
  619. model.makeNode("/root/main/testinfo/testcont[" + SG + "]/testcont");
  620. model.makeNode("/root/main/testinfo/testcont[" + SG + "]/testcontkind");
  621. //model.makeNode("/root/main/TestInfo/testcont[" + (cntSG+plusIdx) + "]/rsltstat");
  622. model.makeNode("/root/main/testinfo/testcont[" + SG+ "]/iud");
  623. model.setValue("/root/main/testinfo/testcont[" +SG + "]/execdeptcd", curTsect);
  624. model.setValue("/root/main/testinfo/testcont[" + SG + "]/iud", "n");
  625. plusIdx++;
  626. }
  627. }
  628. */
  629. if(cntTsect == 2){
  630. model.setValue("/root/hidden/testcont/tsectcd", model.getValue("/root/hidden/testconttsectcd[2]/cd"));
  631. model.setValue("/root/hidden/testcont/testcontcd", "00");
  632. }else{
  633. model.setValue("/root/hidden/testcont/tsectcd", "00");
  634. model.setValue("/root/hidden/testcont/testcontcd", "00");
  635. }
  636. fSelectTestContTsect(refRow);
  637. //model.makeValue("/root/hidden/refflag/p_isedit", "");
  638. //model.refresh();
  639. }
  640. //선택 시행부서 소견
  641. function fSelectTestContTsect(refRow){
  642. var selTsectcd = model.getValue("/root/hidden/testcont/tsectcd").getTrim();
  643. var vSectcd = "";
  644. var vTsectcd = "";
  645. var vBcno = "";
  646. var vTestcd = "";
  647. if(refRow != "return") {
  648. vSectcd = model.getValue("/root/main/testinfo/testlist["+ refRow +"]/sectcd");
  649. vTsectcd = model.getValue("/root/main/testinfo/testlist["+ refRow +"]/tsectcd");
  650. vBcno = model.getValue("/root/main/testinfo/testlist["+ refRow +"]/bcno");
  651. vTestcd = model.getValue("/root/main/testinfo/testlist["+ refRow +"]/testcd");
  652. }else{//소견 시행부서 변경시 그냥 return
  653. return;
  654. }
  655. //오류있음.. 전체 선택시 해당 검체의 모든 시행부서 소견을 가져와야 하나 다른 검체 소견 같이 가져옴..
  656. //주석처리합니다.20100205
  657. /*var cntSoGyeon = getNodesetCount("/root/main/testinfo/testcont"); //소견 저장 개수
  658. var strSG = "";
  659. if(selTsectcd == "00"){
  660. for(var slipR = 1; slipR <= cntSoGyeon; slipR++){
  661. if(model.getValue("/root/main/testinfo/testcont[" + slipR + "]/iud") != "n"){
  662. strSG += "【" + model.getValue("/root/main/testinfo/testcont[" + slipR + "]/execdeptcd") + "】"
  663. + model.getValue("/root/main/testinfo/testcont[" + slipR + "]/testcont") + "\n";
  664. }
  665. }
  666. }else{
  667. for(var slipR = 1; slipR <= cntSoGyeon; slipR++){
  668. if(model.getValue("/root/main/testinfo/testcont[" + slipR + "]/execdeptcd") == vTsectcd){
  669. if(model.getValue("/root/main/testinfo/testcont[" + slipR + "]/bcno") == vBcno){
  670. strSG += model.getValue("/root/main/testinfo/testcont[" + slipR + "]/testcont") + "\n";
  671. //strSG += "【" + selSlip + "】"
  672. // + model.getValue("/root/MainData/GSHMSangSe/GeomSaSoGyeon[" + slipR + "]/cmtp") + "\n";
  673. }
  674. }
  675. }
  676. }*/
  677. //시행부서별 소견 전체는.. 걍 버리고 해당 검사 시행부서 소견만 조회
  678. model.setValue("/root/main/testinfo/spcinfo/testcont"
  679. , model.getValue("/root/main/testinfo/testcont[bcno = '"+ vBcno + "' and execdeptcd = '" + selTsectcd + "']/testcont"));
  680. //검사항목별 소견 추가
  681. model.setValue("/root/main/testinfo/spcinfo/testcmts"
  682. , model.getValue("/root/main/testinfo/testcmts[bcno = '"+ vBcno + "' and testcd = '"+ vTestcd + "']/testcont") != "" ?
  683. model.getValue("/root/main/testinfo/testcmts[bcno = '"+ vBcno + "' and testcd = '"+ vTestcd + "']/testcont")
  684. : model.getvalue("/root/main/testinfo/testlist["+refRow+"]/tclsscrnnm") + " : ");
  685. model.refresh();
  686. }
  687. //소견 선택시
  688. function fSetCmt(pRow,pCol){
  689. var sDetilRow = fGetRow(pRow,pCol); //testlist row 조회
  690. var curSlip = model.getValue("/root/hidden/testcont/tsectcd");
  691. var curCmptcd = model.getValue("/root/hidden/testcont/testcontcd");
  692. if(curSlip == "00"){
  693. //TFGetMsgBox( -1, "소견을 입력할 슬립을 지정하여 주세요", "소견입력오류", "I", "OK" );
  694. model.setValue("/root/hidden/testcont/testcontcd", "00");
  695. model.refresh();
  696. return;
  697. }
  698. var vSectcd = model.getValue("/root/main/testinfo/testlist["+ sDetilRow +"]/sectcd");
  699. var vTsectcd = model.getValue("/root/main/testinfo/testlist["+ sDetilRow +"]/tsectcd");
  700. var newCmt = model.getValue("/root/init/LB0210[cd='" + curCmptcd + "' and etc01='" + vSectcd + "' and etc02='" + vTsectcd + "']/etc03");
  701. var vContFlag = model.getValue("/root/hidden/cmtflag");
  702. if(vContFlag == 1){ //시행부서별 소견
  703. var curCmt = model.getValue("/root/main/testinfo/spcinfo/testcont");
  704. if(curCmt == "\n" || curCmt=="") {
  705. var rstCmt = newCmt;
  706. } else{
  707. var rstCmt = curCmt + "\n" + newCmt;
  708. }
  709. model.setValue("/root/main/testinfo/spcinfo/testcont", rstCmt);
  710. textarea3.selBegin = (rstCmt).length;
  711. }else{ //검사항목별 소견
  712. var curCmt = model.getValue("/root/main/testinfo/spcinfo/testcmts");
  713. var rstCmt = curCmt + " " + newCmt;
  714. model.setValue("/root/main/testinfo/spcinfo/testcmts", rstCmt);
  715. text_testcmts.selBegin = (rstCmt).length;
  716. }
  717. //model.refresh();
  718. fSoGyeonJeoJang(vContFlag);
  719. }
  720. //소견저장
  721. function fSetContCmt(pRow,pCol){
  722. var sDetilRow = fGetRow(pRow,pCol); //testlist row 조회
  723. if(model.getvalue("/root/hidden/refparam/userid") == "" || model.getvalue("/root/main/getUsernm/usernm") == ""){
  724. messageBox("검사자를 " , "C001" ,"");
  725. model.setFocus("ipt_testpsn");
  726. return;
  727. }
  728. /* 결과 저장시 소견 입력 여부에 따라 등록되지 않은게 있다면 같이 저장하기 위해 막음
  729. if(model.getvalue("/root/main/testinfo/testlist["+ sDetilRow +"]/rsltstat") == "-") {
  730. messageBox("소견등록은 결과저장 이후에 가능합니다. " , "C" ,"");
  731. return;
  732. }*/
  733. /*if(model.getvalue("/root/main/testpatlist/patlist["+grd_patList.row+"]/rsltstat") == "4") {
  734. messageBox("최종보고된 검체의 소견은 수정할수 없습니다." , "C" ,"");
  735. return;
  736. }*/
  737. if (model.getValue("/root/hidden/refflag/p_isedit") != "true"
  738. && model.getxPathValue('count(/root/main/testinfo/testcmts[m = ""])') == "0") {
  739. messageBox("소견을 입력 하세요!" , "C" ,"");
  740. return;
  741. }
  742. model.setvalue("/root/send/data1", "m▦rownum▦selchk▦tclsscrnm▦bufinptrslt▦reptrslt▦multiflag▦rstdt▦refval▦rsltunit▦judgmark▦panicmark▦deltamark▦criticalmark▦alertmark▦▦▦rsltmark▦erprcpflag▦bfreptrslt▦bflastreptdt▦rstnm▦eqmtnm▦testcmt▦tclskind▦testcd▦spccd▦rsltseq▦inptrslt▩");
  743. model.setValue("/root/hidden/refflag/bcno", model.getvalue("/root/main/testinfo/testlist["+ sDetilRow +"]/bcno"));
  744. model.setValue("/root/hidden/refflag/rsltstat", "1");
  745. model.setValue("/root/hidden/refflag/testlrgkind", "-");
  746. model.setValue("/root/hidden/refflag/userid", model.getValue("/root/hidden/refparam/userid"));
  747. //여러 검체 동시에 일괄 저장 때리기 위한 구분
  748. model.makeValue("/root/hidden/refflag/rsltscrflag", "test");
  749. model.copyNode("/root/send/data2" , "/root/hidden/refflag");
  750. //시행부서별, 검사항목별 소견 저장데이터 생성
  751. fMakeSendSoGyeon();
  752. }
  753. //소견 저장을 위한 소견 데이터 만들기
  754. function fMakeSendSoGyeon(){
  755. //시행부서별 소견
  756. var cntSG = getNodesetCount("/root/main/testinfo/testcont"); //소견 저장 개수
  757. var vSndSG = "m▦bcno▦testcontcd▦execdeptcd▦testcont▦testcontkind▩";
  758. for(var i = 1; i <= cntSG; i++){
  759. if(model.getValue("/root/main/testinfo/testcont[" + i + "]/iud") != ""){
  760. vSndSG += "u" + "▦" //i로 넣었다 왜 u로 넣고 있어? ㅡ,.ㅡ
  761. + model.getValue("/root/main/testinfo/testcont[" + i + "]/bcno") + "▦"
  762. + model.getValue("/root/main/testinfo/testcont[" + i + "]/testcontcd") + "▦"
  763. + model.getValue("/root/main/testinfo/testcont[" + i + "]/execdeptcd") + "▦"
  764. + model.getValue("/root/main/testinfo/testcont[" + i + "]/testcont") + "▦"
  765. + model.getValue("/root/main/testinfo/testcont[" + i + "]/testcontkind") + "▩";
  766. }
  767. }
  768. model.makeValue("/root/send/data3", vSndSG);
  769. //검사항목별 소견
  770. var vSndTestcmts = "m▦bcno▦tclscd▦testcd▦spccd▦rsltseq▦testcontcd▦testcont▦flag▩";
  771. var vTestCmtCounts = model.getxPathValue('count(/root/main/testinfo/testcmts)');
  772. var xPath = "/root/main/testinfo/testcmts";
  773. for (j = 1; j <= vTestCmtCounts; j++){
  774. if(model.getValue(xPath+ "[" + j + "]/m") != ""){
  775. vSndTestcmts += model.getValue(xPath+ "[" + j + "]/m") + "▦"
  776. + model.getValue(xPath+ "[" + j + "]/bcno") + "▦"
  777. + model.getValue(xPath+ "[" + j + "]/tclscd") + "▦"
  778. + model.getValue(xPath+ "[" + j + "]/testcd") + "▦"
  779. + model.getValue(xPath+ "[" + j + "]/spccd") + "▦"
  780. + model.getValue(xPath+ "[" + j + "]/rsltseq") + "▦"
  781. + model.getValue(xPath+ "[" + j + "]/testcontcd") + "▦"
  782. + model.getValue(xPath+ "[" + j + "]/testcont") + "▦"
  783. + "2▩"; //소견만 저장하기때문에 2보냄 결과등록시와 소견만 저장시 결과seq때문에..
  784. }
  785. }
  786. model.makeValue("/root/send/data4", vSndTestcmts);
  787. submit("TXLLR80101",false);
  788. //저장 후 소견 iud초기화
  789. for (j = 1; j <= vTestCmtCounts; j++){
  790. model.setValue(xPath+ "[" + j + "]/m", "");
  791. }
  792. model.setValue("/root/hidden/refflag/p_isedit", "");
  793. model.removeNodeset("/root/send/data2"); //아씨..이게 소견저장할때와 검사결과 저장할때 같은 노드임 ㅡ,.ㅡ
  794. model.makeNode("/root/send/data2");
  795. model.refresh();
  796. }
  797. //소견내용이 바뀔경우
  798. function fSoGyeonJeoJang(pRef){ //pRef : 소견구분 1:시행부서별, 2:검사항목별
  799. var curSlip = model.getValue("/root/hidden/testcont/tsectcd");
  800. var curCmptcd = model.getValue("/root/hidden/testcont/testcontcd");
  801. var vCmtp = model.getValue("/root/main/testinfo/spcinfo/testcont"); //시행부서별 소견
  802. var vTestCmts = model.getValue("/root/main/testinfo/spcinfo/testcmts"); //검사항목별 소견
  803. var vNodeCnt, vContNodeCount;
  804. var vRow = fGetRow(grd_testlist.row,grd_testlist.col);
  805. var vBcno = model.getvalue("/root/main/testinfo/testlist["+vRow+"]/bcno");
  806. var vTestcd = model.getvalue("/root/main/testinfo/testlist["+vRow+"]/testcd"); //검사코드
  807. var vTsectcd = model.getvalue("/root/main/testinfo/testlist["+vRow+"]/tsectcd"); //시행부서
  808. var vTclscd, vSpccd, vRsltseq;
  809. if(curSlip == "-"){
  810. return;
  811. }
  812. if(pRef == 1){ //시행부서별 소견
  813. var xPath_Cont = "/root/main/testinfo/testcont";
  814. //해당 바코드, 시행부서 노드 존재 여부 판단 위해
  815. vNodeCnt = model.getxPathValue('count(/root/main/testinfo/testcont[bcno = "'+ vBcno + '" and execdeptcd = "'+ vTsectcd + '"]/testcont)');
  816. if(vCmtp.getTrim() == "" || vCmtp.getTrim() == "-"){
  817. if(vNodeCnt > 0){ //소견 변경했는데 소견이 빈값이고 저장된 소견이 존재 할 경우
  818. model.setValue(xPath_Cont + "[bcno = '" + vBcno + "' and execdeptcd = '" + vTsectcd + "' ]/testcontcd", "-");
  819. model.setValue(xPath_Cont + "[bcno = '" + vBcno + "' and execdeptcd = '" + vTsectcd + "' ]/testcont", "-");
  820. //시행부서별 소견은 무조건 넣고 이력쌓아서 무조건 i로 날림
  821. model.setValue(xPath_Cont + "[bcno = '" + vBcno + "' and execdeptcd = '" + vTsectcd + "' ]/iud", "i");
  822. model.setValue(xPath_Cont + "[bcno = '" + vBcno + "' and execdeptcd = '" + vTsectcd + "' ]/testcontkind", "3"); //이건 어떤 용도?
  823. }else{
  824. return; //소견내용 없고 저장된소견도 없을때 return;
  825. }
  826. }else{
  827. if(vNodeCnt > 0){ //소견 존재시 setValue
  828. model.setValue(xPath_Cont + "[bcno = '" + vBcno + "' and execdeptcd = '" + vTsectcd + "' ]/testcontcd", curCmptcd);
  829. model.setValue(xPath_Cont + "[bcno = '" + vBcno + "' and execdeptcd = '" + vTsectcd + "' ]/testcont", vCmtp);
  830. model.setValue(xPath_Cont + "[bcno = '" + vBcno + "' and execdeptcd = '" + vTsectcd + "' ]/iud", "i");
  831. }else{ //없을때 만들어 넣기
  832. vContNodeCount = model.getxPathValue('count(/root/main/testinfo/testcont)');
  833. vContNodeCount = parseInt(vContNodeCount) + 1;
  834. model.makeValue(xPath_Cont + "[" + vContNodeCount + "]/iud" , "i")
  835. model.makeValue(xPath_Cont + "[" + vContNodeCount + "]/bcno" , vBcno)
  836. model.makeValue(xPath_Cont + "[" + vContNodeCount + "]/testcontcd" , curCmptcd)
  837. model.makeValue(xPath_Cont + "[" + vContNodeCount + "]/testcont" , vCmtp)
  838. model.makeValue(xPath_Cont + "[" + vContNodeCount + "]/testcontkind" , "01")
  839. model.makeValue(xPath_Cont + "[" + vContNodeCount + "]/execdeptcd" , vTsectcd)
  840. }
  841. model.setValue("/root/hidden/refflag/p_isedit", "true"); //저장할거 생겼다.
  842. }
  843. }else{ //검사항목별 소견
  844. var xPath_TestCmts = "/root/main/testinfo/testcmts";
  845. //검사별 소견 노드 존재 여부
  846. vNodeCnt = model.getxPathValue('count(/root/main/testinfo/testcmts[bcno = "'+ vBcno + '" and testcd = "'+ vTestcd + '"]/testcont)');
  847. //소견을 수정했는데 빈값일경우
  848. if(vTestCmts.getTrim() == ""){
  849. if(vNodeCnt > 0){
  850. if(model.getvalue("/root/main/testinfo/testcmts[bcno = '"+ vBcno + "' and testcd = '"+ vTestcd + "']/m") == "i"){
  851. //신규로 저장하고자 존재 했다면 노드 삭제
  852. model.removeNode("/root/main/testinfo/testcmts[bcno = '"+ vBcno + "' and testcd = '"+ vTestcd + "']");
  853. }else{ //u, d일경우 d로 변경
  854. model.setValue("/root/main/testinfo/testcmts[bcno = '"+ vBcno + "' and testcd = '"+ vTestcd + "']/m", "d");
  855. model.setValue(xPath_TestCmts + "[bcno = '"+ vBcno + "' and testcd = '"+ vTestcd + "']/testcont", vTestCmts);
  856. }
  857. }
  858. return;
  859. }
  860. if( vNodeCnt > 0){
  861. model.setValue(xPath_TestCmts + "[bcno = '"+ vBcno + "' and testcd = '"+ vTestcd + "']/testcont", vTestCmts);
  862. model.setValue(xPath_TestCmts+ "[bcno = '"+ vBcno + "' and testcd = '"+ vTestcd + "']/testcontcd", curCmptcd);
  863. if(model.getvalue(xPath_TestCmts + "[bcno = '"+ vBcno + "' and testcd = '"+ vTestcd + "']/m") == "i"){ //신규 소견등록시
  864. //저장 내역 조회될때 m에는 빈값, 신규 저장시 i넣어주고, 수정될때 u로 바꿈
  865. model.setValue(xPath_TestCmts + "[bcno = '"+ vBcno + "' and testcd = '"+ vTestcd + "']/m", "i");
  866. }else{
  867. //신규저장이 아니면 저장내역으로 보고 u로 변경
  868. model.setValue(xPath_TestCmts + "[bcno = '"+ vBcno + "' and testcd = '"+ vTestcd + "']/m", "u");
  869. }
  870. }else{ //없다면 makeValue
  871. vContNodeCount = model.getxPathValue('count(/root/main/testinfo/testcmts)');
  872. vTclscd = model.getvalue("/root/main/testinfo/testlist["+vRow+"]/tclscd");
  873. vSpccd = model.getvalue("/root/main/testinfo/testlist["+vRow+"]/spccd");
  874. vRsltseq = model.getvalue("/root/main/testinfo/testlist["+vRow+"]/rsltseq");
  875. vContNodeCount = parseInt(vContNodeCount) +1;
  876. model.makeValue(xPath_TestCmts + "[" + vContNodeCount + "]/m" , "i")
  877. model.makeValue(xPath_TestCmts + "[" + vContNodeCount + "]/bcno" , vBcno);
  878. model.makeValue(xPath_TestCmts + "[" + vContNodeCount + "]/tclscd" , vTclscd);
  879. model.makeValue(xPath_TestCmts + "[" + vContNodeCount + "]/testcd" , vTestcd);
  880. model.makeValue(xPath_TestCmts + "[" + vContNodeCount + "]/spccd" , vSpccd);
  881. model.makeValue(xPath_TestCmts + "[" + vContNodeCount + "]/rsltseq" , vRsltseq);
  882. model.makeValue(xPath_TestCmts + "[" + vContNodeCount + "]/testcontcd", curCmptcd);
  883. model.makeValue(xPath_TestCmts + "[" + vContNodeCount + "]/testcont" , vTestCmts)
  884. }
  885. model.setValue("/root/hidden/refflag/p_isedit", "true"); //저장할거 생겼다.
  886. //
  887. }
  888. model.refresh();
  889. }
  890. //선택한 testlist row 알기
  891. function fGetRow(pRow, pCol) {
  892. var findRow = pRow;
  893. if (!pRow>0) return 0;
  894. if (pCol < gStartCol) {
  895. } else {
  896. var vWorkno = model.getValue("/root/main/testinfo/patlist["+pRow+"]/workno").getTrim();
  897. var vCdList = model.getValue("/root/hidden/refparam/tclscdlist2").split("▦");
  898. var vIdx = parseInt(pCol) - parseInt(gStartCol);
  899. if(vCdList.length > vIdx) {
  900. var vRkey = vWorkno+vCdList[vIdx].getTrim();
  901. findRow = datagrid1.findRow(vRkey, 1,1, false, true);
  902. }
  903. return findRow;
  904. }
  905. return 0;
  906. }
  907. function fCvtViewResult(pInptRslt, pRefRow, pMatch) {
  908. var vRow = pRefRow;
  909. if (typeof(pMatch) == "undefined") pMatch = false
  910. // 실제 결과
  911. var vBufInptRslt = pInptRslt;
  912. // 입력결과와 기존의 결과가 같으면 판정안함...
  913. if (!pMatch) {
  914. model.setValue("/root/main/testinfo/testlist["+vRow+"]/inptrslt", vBufInptRslt);
  915. var colorTF = false;
  916. var vRsltkind = model.getvalue("/root/main/testinfo/testlist["+vRow+"]/testrsltkind");
  917. var vRsltintsize = model.getvalue("/root/main/testinfo/testlist["+vRow+"]/rsltintsize");
  918. var vRsltdcmlsize = model.getvalue("/root/main/testinfo/testlist["+vRow+"]/rsltdcmlsize");
  919. var vRundkind = model.getvalue("/root/main/testinfo/testlist["+vRow+"]/rundkind");
  920. var vNvalrsltlimyn = model.getvalue("/root/main/testinfo/testlist["+vRow+"]/nvalrsltlimyn");
  921. var vReptrslt = fCOMLIS_CvtReptrslt(vBufInptRslt, vRsltkind, vRsltintsize, vRsltdcmlsize, vRundkind,vNvalrsltlimyn);
  922. if(vReptrslt == "err") {
  923. model.setvalue("/root/main/testinfo/testlist["+vRow+"]/bufinptrslt","");
  924. return;
  925. }
  926. model.setvalue("/root/main/testinfo/testlist["+vRow+"]/inptrslt",vBufInptRslt);
  927. //LH 판정
  928. var vJudgkind = model.getvalue("/root/main/testinfo/testlist["+vRow+"]/judgkind");
  929. var vRefL = model.getvalue("/root/main/testinfo/testlist["+vRow+"]/refl");
  930. var vRefLS = model.getvalue("/root/main/testinfo/testlist["+vRow+"]/refls");
  931. var vRefH = model.getvalue("/root/main/testinfo/testlist["+vRow+"]/refh");
  932. var vRefHS = model.getvalue("/root/main/testinfo/testlist["+vRow+"]/refhs");
  933. var vRefLT = model.getvalue("/root/main/testinfo/testlist["+vRow+"]/reflt");
  934. var vRvalflag = model.getvalue("/root/main/testinfo/testlist["+vRow+"]/rvalflag");
  935. var vJudgLH = fCOMLIS_JudgLH(vReptrslt, vJudgkind, vRefL, vRefLS, vRefH, vRefHS, vRefLT,vRvalflag);
  936. model.setvalue("/root/main/testinfo/testlist["+vRow+"]/judgmark",vJudgLH);
  937. if(vJudgLH == "H"){
  938. datagrid2.cellStyle ("background-color", 1,0,1,0) = "#f7a08b";
  939. }
  940. else if(vJudgLH == "L"){
  941. datagrid2.cellStyle ("background-color", 1,0,1,0) = "#b9e5fb";
  942. }
  943. else{
  944. datagrid2.cellStyle ("background-color", 1,0,1,0) = "#fffff:"
  945. }
  946. //grd_TestInfoCnts.cellStyle("text-align",vRow,8) = "center";
  947. //panic 판정
  948. var vJudgGbn = model.getvalue("/root/main/testinfo/testlist["+vRow+"]/panicflag").getTrim();
  949. var vRefL = model.getvalue("/root/main/testinfo/testlist["+vRow+"]/panicminval").getTrim();
  950. var vRefH = model.getvalue("/root/main/testinfo/testlist["+vRow+"]/panicmaxval").getTrim();
  951. var vJudgPanic = fCOMLIS_JudgPCA(vReptrslt, vJudgGbn, vRefL, vRefH, "P");
  952. if(vJudgPanic == "P"){
  953. datagrid2.cellStyle ("background-color", 1,1,1,1) = "#7BE6B7";
  954. //datagrid2.cellstyle ("background-color" , vRow,4,vRow,4) = "#7BE6B7";
  955. colorTF = true;
  956. }
  957. else{
  958. datagrid2.cellStyle ("background-color", 1,1,1,1) = "#ffffff";
  959. }
  960. model.setvalue("/root/main/testinfo/testlist["+vRow+"]/panicmark", vJudgPanic);
  961. // Panic판정의 전경/배경색 변경
  962. // Delta판정
  963. var vBfResult = model.getvalue("/root/main/testinfo/testlist["+vRow+"]/bfreptrslt").getTrim();
  964. var vJudgGbn = model.getvalue("/root/main/testinfo/testlist["+vRow+"]/deltaflag").getTrim();
  965. var vRefH = model.getvalue("/root/main/testinfo/testlist["+vRow+"]/deltamaxval").getTrim();
  966. var vDeltaday = model.getvalue("/root/main/testinfo/testlist["+vRow+"]/deltaterm").getTrim();
  967. var vRstinterval = model.getvalue("/root/main/testinfo/testlist["+vRow+"]/rstinterval").getTrim();
  968. var vJudgDelta = fCOMLIS_JudgDelta(vReptrslt, vBfResult, vJudgGbn, vRefH, vDeltaday, vRstinterval);
  969. model.setvalue("/root/main/testinfo/testlist["+vRow+"]/deltamark", vJudgDelta);
  970. if(vJudgDelta == "D"){
  971. datagrid2.cellStyle ("background-color", 1,2,1,2) = "#dec6a4";
  972. //grd_TestInfoCnts.cellstyle("background-color" , vRow,4) = "#7BE6B7";
  973. colorTF = true;
  974. }
  975. else{
  976. datagrid2.cellStyle ("background-color", 1,2,1,2) = "#ffffff";
  977. }
  978. // Critical판정
  979. var vJudgGbn = model.getvalue("/root/main/testinfo/testlist["+vRow+"]/criticalflag").getTrim();
  980. var vRefL = model.getvalue("/root/main/testinfo/testlist["+vRow+"]/criticalminval").getTrim();
  981. var vRefH = model.getvalue("/root/main/testinfo/testlist["+vRow+"]/criticalmaxval").getTrim();
  982. var vJudgCritical = fCOMLIS_JudgPCA(vReptrslt, vJudgGbn, vRefL, vRefH, "C");
  983. model.setvalue("/root/main/testinfo/testlist["+vRow+"]/criticalmark", vJudgCritical);
  984. // Critical판정의 전경/배경색 변경
  985. if(vJudgCritical == "C"){
  986. datagrid2.cellStyle ("background-color", 1,3,1,3) = "#ffe79d";
  987. //grd_TestInfoCnts.cellstyle("background-color" , vRow,4) = "#7BE6B7";
  988. colorTF = true;
  989. }
  990. else{
  991. datagrid2.cellStyle ("background-color", 1,3,1,3) = "#ffffff";
  992. }
  993. // Alert판정
  994. var vJudgGbn = model.getvalue("/root/main/testinfo/testlist["+vRow+"]/alertflag").getTrim();
  995. var vRefL = model.getvalue("/root/main/testinfo/testlist["+vRow+"]/alertminval").getTrim();
  996. var vRefH = model.getvalue("/root/main/testinfo/testlist["+vRow+"]/alertmaxval").getTrim();
  997. var vJudgAlert = fCOMLIS_JudgPCA(vReptrslt, vJudgGbn, vRefL, vRefH, "A");
  998. model.setvalue("/root/main/testinfo/testlist["+vRow+"]/alertmark", vJudgAlert)
  999. // Alert판정의 전경/배경색 변경
  1000. if(vJudgAlert == "A"){
  1001. datagrid2.cellStyle ("background-color", 1,4,1,4) = "#fec34d";
  1002. //grd_TestInfoCnts.cellstyle("background-color" , vRow,4) = "#7BE6B7";
  1003. colorTF = true;
  1004. }
  1005. else{
  1006. datagrid2.cellStyle ("background-color", 1,4,1,4) = "#ffffff";
  1007. }
  1008. //if(!colorTF) grd_TestInfoCnts.cellstyle("background-color" , vRow,4) = "#FFFFFA";
  1009. // 허용참고치 판정
  1010. var vJudgGbn = model.getvalue("/root/main/testinfo/testlist["+vRow+"]/alimitflag").getTrim();
  1011. var vRefL = model.getvalue("/root/main/testinfo/testlist["+vRow+"]/alimitminval").getTrim();
  1012. var vRefLS = model.getvalue("/root/main/testinfo/testlist["+vRow+"]/alimitmaxval").getTrim();
  1013. var vRefH = model.getvalue("/root/main/testinfo/testlist["+vRow+"]/alimitmaxvalsinq").getTrim();
  1014. var vRefHS = model.getvalue("/root/main/testinfo/testlist["+vRow+"]/alimiminvalsinq").getTrim();
  1015. vReptrslt = fCOMLIS_JudgLimit(vReptrslt, vJudgGbn, vRefL, vRefLS, vRefH, vRefHS);
  1016. // 사용자정의판정 결과변경
  1017. var vUjudglt = new Array(3);
  1018. vUjudglt[0] = vJudgkind;
  1019. for (var i = 1; i <= 3; i++) {
  1020. vUjudglt[i] = model.getValue("/root/main/testinfo/testlist["+vRow+"]/userjudgchar" + i.toString());
  1021. }
  1022. vReptrslt = fCOMLIS_CvtUjudgRst(vBufInptRslt, vReptrslt, vJudgLH, vUjudglt);
  1023. model.setvalue ("/root/main/testinfo/testlist["+vRow+"]/reptrslt",vReptrslt);
  1024. // 수정데이타 반영
  1025. model.setValue("/root/main/testinfo/testlist["+vRow+"]/iud", "U");
  1026. model.refresh();
  1027. }
  1028. }
  1029. function fValidation(pRstflag) {
  1030. if(model.getvalue("/root/hidden/refparam/userid") == "" || model.getvalue("/root/main/getUsernm/usernm") == ""){
  1031. messageBox("검사자를 " , "C001" ,"");
  1032. model.setFocus("ipt_testpsn");
  1033. return;
  1034. }
  1035. //수정된 소견이 있을경우 소견부터 저장
  1036. if (model.getValue("/root/hidden/refflag/p_isedit") == "true"
  1037. || model.getxPathValue('count(/root/main/testinfo/testcmts[m != ""])') > 0) {
  1038. fSetContCmt();
  1039. }
  1040. var nMaxRow = grd_testlist.rows - 1;
  1041. var isErr = false;
  1042. var sErrMsg = "";
  1043. if (pRstflag == "1") {
  1044. sErrMsg = "결과저장";
  1045. } else if (pRstflag == "2") {
  1046. sErrMsg = "중간(예비)보고";
  1047. } else if (pRstflag == "4") {
  1048. sErrMsg = "최종보고";
  1049. }
  1050. // 수정/선택한 환자 유무
  1051. if (nMaxRow > 0) {
  1052. var findRow = datagrid1.findRow("U", 1, 74, false, false);
  1053. if (findRow < 0) isErr = true;
  1054. } else {
  1055. isErr = true;
  1056. }
  1057. if (isErr) {
  1058. alert( "수정된 항목이 없습니다.");
  1059. return false;
  1060. }
  1061. return true;
  1062. }
  1063. function fCheckChangeValue(pState){
  1064. var nMaxRow = datagrid1.rows;
  1065. var rkey = "";
  1066. var vO_inptrslt = "";
  1067. var vN_inptrslt = "";
  1068. var vRstflag = "";
  1069. var isErr = "false";
  1070. for(var vRow = 1; vRow < nMaxRow; vRow++){
  1071. isUpdate = model.getValue("/root/main/testinfo/testlist[" + vRow + "]/iud");
  1072. if(pState == "3"){
  1073. //"권한관리"
  1074. }
  1075. if(isUpdate == "U"){
  1076. datagrid1.addStatus(vRow , "update");
  1077. rkey = model.getValue("/root/main/testinfo/testlist[" + vRow + "]/rkey");
  1078. vO_inptrslt = model.getValue("/root/main/testinfo/BAK_TESTITEM[rkey = '" + rkey + "']/inptrslt");
  1079. vN_inptrslt = model.getValue("/root/main/testinfo/testlist[" + vRow + "]/inptrslt");
  1080. vRstflag = model.getValue("/root/main/testinfo/testlist[" + vRow + "]/rsltstat");
  1081. if(vO_inptrslt == vN_inptrslt){
  1082. if(vRstflag == pState){
  1083. model.setValue("/root/main/testinfo/testlist[" + vRow + "]/iud", "");
  1084. datagrid1.removeStatus(vRow,"update");
  1085. }
  1086. }
  1087. }
  1088. }
  1089. return isErr;
  1090. }
  1091. // 결과저장
  1092. function fInsRsltSave(){
  1093. //model.setValue("/root/HideData/RstCode", "");
  1094. if(fCheckChangeValue("1") == "false"){
  1095. if (fValidation("1")) {
  1096. model.setvalue("/root/hidden/updateparam/rsltstat" , "1") ;
  1097. model.copyNode("/root/send/data1" , "/root/hidden/updateparam");
  1098. model.setValue("/root/send/data2", datagrid1.getUpdateData());
  1099. submit("TXLLR00401" , false);
  1100. datagrid1.clearStatus();
  1101. model.setValue("/root/hidden/currenRow", "");
  1102. datagrid2.cellStyle("background-color",1,1,1,5) = "#ffffff";
  1103. fSetClear2();
  1104. }
  1105. }
  1106. }
  1107. // 중간보고
  1108. function fSetMdlRept(){
  1109. if(fCheckChangeValue("2") == "false"){
  1110. if (fValidation("2")) {
  1111. model.setvalue("/root/hidden/updateparam/rsltstat" , "2") ;
  1112. model.copyNode("/root/send/data1" , "/root/hidden/updateparam");
  1113. model.setValue("/root/send/data2", datagrid1.getUpdateData());
  1114. submit("TXLLR00401" , false);
  1115. datagrid1.clearStatus();
  1116. model.setValue("/root/hidden/currenRow", "");
  1117. datagrid2.cellStyle("background-color",1,1,1,5) = "#ffffff";
  1118. fSetClear2();
  1119. }
  1120. }
  1121. }
  1122. // 최종보고
  1123. function fSetLstRept(){
  1124. if(fCheckChangeValue("4") == "false"){
  1125. if (fValidation("4")) {
  1126. if(fUpdtRslt() != 0) return;
  1127. model.setvalue("/root/hidden/updateparam/rsltstat" , "4") ;
  1128. model.copyNode("/root/send/data1" , "/root/hidden/updateparam");
  1129. model.setValue("/root/send/data2", datagrid1.getUpdateData());
  1130. submit("TXLLR00401" , false);
  1131. datagrid1.clearStatus();
  1132. model.setValue("/root/hidden/currenRow", "");
  1133. datagrid2.cellStyle("background-color",1,1,1,5) = "#ffffff";
  1134. fSetClear2();
  1135. }
  1136. }
  1137. }
  1138. //수정결과 팝업 띄우기
  1139. function fUpdtRslt(){
  1140. var testlist = "";
  1141. var returnyn = "";
  1142. var bufDJGG = "";
  1143. for(i = 0; i < datagrid1.rows; i++) {
  1144. if(((model.getValue("/root/main/testinfo/testlist["+ i +"]/rsltstat") == "4") || (model.getValue("/root/main/testinfo/testlist["+ i +"]/rsltstat") == "5"))
  1145. && (model.getvalue("/root/main/testinfo/testlist["+ i +"]/iud") == "U")) { //수정 및 선택된 경우
  1146. var vPID = model.getValue("/root/main/testinfo/testlist["+ i +"]/pid"); //등록번호
  1147. var vBcno = model.getValue("/root/main/testinfo/testlist["+ i +"]/bcno"); //바코드
  1148. bufDJGG += model.getValue("/root/main/testinfo/testlist["+ i +"]/testcd") + "▦" + model.getValue("/root/main/testinfo/testlist["+ i +"]/reptrslt") + "▩";
  1149. testlist += "'" + model.getValue("/root/main/testinfo/testlist["+ i +"]/testcd") + "',"; //'testcd', 'testcd',
  1150. //model.setvalue("/root/hidden/DJGGParm/userid" , model.getvalue("/root/hidden/refflag/userid")); 6/12일 수정자ID 직접입력을 원하셔서 막음..
  1151. if((vPID != "") //pid가 있고
  1152. && (vBcno != model.getValue("/root/main/testinfo/testlist["+ (i+1) +"]/bcno")) //이전바코드번호랑 다르고
  1153. && (i != 0)){ //i != 0임
  1154. model.makeValue("/root/hidden/DJGGParm/bcno" , vBcno);
  1155. model.makeValue("/root/hidden/DJGGParm/testcdlist", testlist.substr(0, testlist.length - 1)); //'testcd', 'testcd', <-맨뒤의 ',' 빼기 위해
  1156. model.makeValue("/root/hidden/DJGGParm/bufDJGG", bufDJGG);
  1157. model.makeNode("/root/hidden/DJGGParm/userid");
  1158. model.makeNode("/root/hidden/DJGGParm/rsltsaveYN");
  1159. testlist = ""; //초기화
  1160. modal("SMLLR90600" , "","","","","/root/hidden/DJGGParm" , "/root/hidden/DJGGParm");
  1161. if(model.getvalue("/root/hidden/DJGGParm/rsltsaveYN") == "Y")
  1162. returnyn = 0;
  1163. else
  1164. returnyn = 1;
  1165. }
  1166. }
  1167. }
  1168. return returnyn;
  1169. }
  1170. //onkeypress 이벤트시..
  1171. function fGridKeyEvent(){
  1172. var curRow = grd_testlist.row;
  1173. var curCol = grd_testlist.col;
  1174. if (event.keyCode == 13) {
  1175. var refRow = fGetRow(curRow, curCol);
  1176. if (refRow > 0) {
  1177. // 입력 실제결과
  1178. var vInptRslt = grd_testlist.valueMatrix(curRow, curCol).getTrim();
  1179. // if(vInptRslt == ""){
  1180. //return;
  1181. // }
  1182. //결과코드 검색
  1183. /*var vTclscd = model.getValue("/root/HideData/CurrentHangMok/tclscd");
  1184. var vCvtRst = fGetSeekRst(vTclscd, vOrgRst);
  1185. if (vOrgRst != vCvtRst) {
  1186. vOrgRst = vCvtRst;
  1187. grd_testlist.valueMatrix(curRow, curCol) = vOrgRst;
  1188. }*/
  1189. /*------------------------------------------------------------------시작
  1190. DPD 검사일 경우 Urine Creatinine(LCU102) 검사의 결과와 계산하여 결과 보고 하여야 한다고 함
  1191. DPD / (Creatinine × 0.088)
  1192. Creatinine 조회 기준은 같은 처방일 임 */
  1193. var vTestcd = model.getvalue("/root/main/testinfo/testlist["+refRow+"]/testcd")
  1194. var vPrcpdd = model.getvalue("/root/main/testinfo/testlist["+refRow+"]/prcpdd")
  1195. var vPid = model.getvalue("/root/main/testinfo/testlist["+refRow+"]/pid")
  1196. //일단 하드코딩 합니다 ^^
  1197. if(vTestcd == "LSS180"){
  1198. model.makeValue("/root/send/dpd/prcpdd" , vPrcpdd);
  1199. model.makeValue("/root/send/dpd/testcd" , "LCU102");
  1200. model.makeValue("/root/send/dpd/pid" , vPid);
  1201. if(vInptRslt.isFloat()){
  1202. submit("TRLLR80104");
  1203. var vUrineRslt = model.getValue("/root/hidden/dpdrslt/rslt");
  1204. var vUrineRsltDt = model.getValue("/root/hidden/dpdrslt/dt");
  1205. if(vUrineRslt == ""){
  1206. messageBox("해당 처방일에 Urine Creatinine 검사결과가 없습니다.", "I");
  1207. }else{
  1208. if(vUrineRslt.isFloat()){
  1209. var rtn = messageBox("Urine Creatinine 결과 : " + vUrineRslt + "\n보고일 : " + vUrineRsltDt + "\n계산식 : DPD / (Creatinine × 0.088)\n변환", "S001");
  1210. if(rtn == 6){ //예
  1211. //계산적용
  1212. vInptRslt = parseFloat(vInptRslt) / (parseFloat(vUrineRslt) * 0.088) ;
  1213. //소숫점 2째에서 반올림
  1214. vInptRslt = Math.round(vInptRslt * Math.pow(10, -2 * (-1)-1)) / Math.pow(10, -2 *(-1)-1);
  1215. vInptRslt = vInptRslt.toString(); //요거 String으로 안바꿔주면 에러남
  1216. //보이는 그리드에 변환 된 값 설정
  1217. grd_testlist.valueMatrix(curRow, curCol) = vInptRslt;
  1218. }
  1219. else if(rtn == 2){ //취소
  1220. grd_testlist.valueMatrix(curRow, curCol) = "";
  1221. return;
  1222. }
  1223. }else{
  1224. messageBox("Urine Creatinine검사 결과 수치가 부적합 합니다.\n검사결과 : "+ vUrineRslt, "I");
  1225. }
  1226. }
  1227. }else{
  1228. messageBox("DPD검사 결과변환은 숫자만 가능합니다!!", "E");
  1229. }
  1230. }
  1231. //-------------------------------------------------------------------끝
  1232. fCvtViewResult(vInptRslt, refRow);
  1233. /*if(model.getValue("/root/main/testinfo/testlist["+ refRow +"]/judgmark") != ""
  1234. || model.getValue("/root/main/testinfo/testlist["+ refRow +"]/panicmark") != ""
  1235. || model.getValue("/root/main/testinfo/testlist["+ refRow +"]/deltamark") != ""
  1236. || model.getValue("/root/main/testinfo/testlist["+ refRow +"]/criticalmark") != ""
  1237. || model.getValue("/root/main/testinfo/testlist["+ refRow +"]/alertmark") != ""
  1238. || model.getValue("/root/main/testinfo/testlist["+ refRow +"]/relatingmark") != ""
  1239. || model.getValue("/root/main/testinfo/testlist["+ refRow +"]/amrmark") != "") {
  1240. grd_testlist.cellStyle("color", curRow, curCol) = "#f7a08b";
  1241. } else {
  1242. grd_testlist.cellStyle("color", curRow, curCol) = "#000000";
  1243. }*/
  1244. if(vInptRslt == ""){
  1245. if(model.getValue("/root/main/testinfo/testlist["+refRow+"]/iud") != "") {
  1246. model.setValue("/root/main/testinfo/testlist["+refRow+"]/iud", "");
  1247. datagrid1.rebuild();
  1248. }
  1249. model.setValue("/root/main/testinfo/patlist["+ curRow +"]/chk", "false");
  1250. //return;
  1251. } else {
  1252. model.setValue("/root/main/testinfo/patlist["+ curRow +"]/chk", "true");
  1253. }
  1254. grd_testlist.cellStyle("background-color", curRow, curCol, curRow, curCol) = "#f3e1bf";
  1255. if(model.getValue("/root/hidden/cursor") == "1") {
  1256. // 다음 Row로 이동
  1257. var max = grd_testlist.rows;
  1258. var vRstNo = parseInt(eval(curCol - gStartCol + 1)).toString();
  1259. var posRow = -1
  1260. for (var r = (curRow + 1); r < max; r++) {
  1261. var isReadonly = model.getValue("/root/main/testinfo/patlist[" + r + "]/inptrslt" + vRstNo + "/@readonly");
  1262. if (isReadonly == "false") {
  1263. posRow = r;
  1264. break;
  1265. }
  1266. }
  1267. if (posRow > 0) {
  1268. grd_testlist.row= posRow;
  1269. grd_testlist.col = curCol;
  1270. fPatGridClick(posRow, curCol);
  1271. } else {
  1272. fPatGridClick(curRow, curCol);
  1273. }
  1274. } else {
  1275. // 다음 Col로 이동
  1276. var max = grd_testlist.cols;
  1277. var posCol = -1
  1278. for (var r = (curCol + 1); r < max; r++) {
  1279. var vRstNo = parseInt(eval(r - gStartCol + 1)).toString();
  1280. var isReadonly = model.getValue("/root/main/testinfo/patlist[" + curRow + "]/inptrslt" + vRstNo + "/@readonly");
  1281. if (isReadonly == "false") {
  1282. posCol = r;
  1283. break;
  1284. }
  1285. }
  1286. if (posCol > 0) {
  1287. grd_testlist.row= curRow;
  1288. grd_testlist.col = posCol;
  1289. fPatGridClick(curRow, posCol);
  1290. } else {
  1291. fPatGridClick(curRow, curCol);
  1292. }
  1293. }
  1294. } else {
  1295. //fg.textMatrix(curRow, curCol) = "";
  1296. }
  1297. }
  1298. }
  1299. //onkeydown 이벤트시
  1300. function fGridKeyDown(){
  1301. var curRow = grd_testlist.row; //현재로우
  1302. var curCol = grd_testlist.col; //현재컬럼
  1303. if (event.keyCode == 37 || event.keyCode == 38 || event.keyCode == 39 || event.keyCode == 40) {
  1304. if (event.keyCode == 37) { //←
  1305. --curCol;
  1306. } else if (event.keyCode == 38) { //↑
  1307. --curRow;
  1308. } else if (event.keyCode == 39) { //→
  1309. ++curCol;
  1310. } else if (event.keyCode == 40) { //↓
  1311. ++curRow;
  1312. }
  1313. var refRow = fGetRow(curRow, curCol); //실제 데이터있는 그리드의 로우 검색
  1314. fPatGridClick(curRow, curCol); //검체정보 조회
  1315. if (refRow > 0) {
  1316. var vInptRslt = model.getValue("/root/main/testinfo/testlist["+refRow+"]/inptrslt");
  1317. grd_testlist.valueMatrix(curRow, curCol) = vInptRslt;
  1318. }
  1319. }
  1320. }
  1321. function fRstGbn_XForms_Value_Changed(pIdx) {
  1322. // alert(pIdx);
  1323. if (pIdx == "0") {
  1324. // 결과미입력 클릭
  1325. if (model.getValue("/root/hidden/refparam/rsltstat0") == "1") {
  1326. model.setValue("/root/hidden/refparam/rsltstat2", "");
  1327. }
  1328. } else if (pIdx == "1") {
  1329. // 결과입력 클릭
  1330. if (model.getValue("/root/hidden/refparam/rsltstat1") == "1") {
  1331. model.setValue("/root/hidden/refparam/rsltstat2", "");
  1332. }
  1333. } else {
  1334. // 최종보고 클릭
  1335. if (model.getValue("/root/hidden/refparam/rsltstat2") == "1") {
  1336. model.setValue("/root/hidden/refparam/rsltstat0", "");
  1337. model.setValue("/root/hidden/refparam/rsltstat1", "");
  1338. }
  1339. }
  1340. model.refresh();
  1341. }
  1342. function fSelectTestGrup(){
  1343. model.makeValue("/root/send/testgrupnm", combo2.label);
  1344. submit("TRLLF90401" ,false);
  1345. fSetPopUpTclscdList();
  1346. }
  1347. function fSetPopUpTclscdList(){
  1348. var count = getNodesetCount("/root/main/testgrupdetl")
  1349. if(count > 0){
  1350. var sendtclsnm = model.getValue("/root/main/testgrupdetl[1]/tclsnm");
  1351. var sendtclsnm2 = model.getValue("/root/main/testgrupdetl[1]/tclsnm");
  1352. var sendtclscd = model.getValue("/root/main/testgrupdetl[1]/tclscd");
  1353. var sendtclscd2 = model.getValue("/root/main/testgrupdetl[1]/tclscd");
  1354. // 검사그룹 상세 목록 없을때
  1355. if(sendtclsnm == ""){
  1356. model.setValue("/root/hidden/tclscdlist/tclscdlist", "");
  1357. model.setValue("/root/hidden/tclscdlist/tclsnmlist", "");
  1358. }else{ // 검사그룹 상세 목록 있을때
  1359. for(i=2; i<= count; i++){
  1360. sendtclsnm = sendtclsnm + ", " + model.getValue("/root/main/testgrupdetl["+i+"]/tclsnm");
  1361. sendtclsnm2 = sendtclsnm2 + "▦ " + model.getValue("/root/main/testgrupdetl["+i+"]/tclsnm");
  1362. //sendtclscd = sendtclscd + "▦" + model.getValue("/root/main/testgrupdetl["+i+"]/tclscd");
  1363. sendtclscd = sendtclscd + "','" + model.getValue("/root/main/testgrupdetl["+i+"]/tclscd");
  1364. sendtclscd2 = sendtclscd2 + "▦" + model.getValue("/root/main/testgrupdetl["+i+"]/tclscd");
  1365. }
  1366. model.setValue("/root/hidden/ref/tclscdlist/tclsnmlist", sendtclsnm);
  1367. model.setValue("/root/hidden/ref/tclscdlist/tclscdlist", "'" + sendtclscd + "'");
  1368. model.setValue("/root/hidden/ref/tclscdlist/tclscdlist2", sendtclscd2);
  1369. model.setValue("/root/hidden/ref/tclscdlist/tclsnmlist2", sendtclsnm2);
  1370. }
  1371. model.refresh();
  1372. fGrdReMake();
  1373. }
  1374. }
  1375. function fSetInit(ref){
  1376. if(ref != 2) {
  1377. model.removeNodeset("/root/main/testinfo/patlist");
  1378. model.removeNodeset("/root/main/testinfo/testlist");
  1379. model.resetInstanceNode("/root/main/testinfo/spcinfo");
  1380. model.setvalue("/root/hidden/refparam/startdd" , getCurrentDate());
  1381. model.setvalue("/root/hidden/refparam/enddd" , getCurrentDate());
  1382. model.setValue("/root/hidden/refparam/tsectcd" , "00");
  1383. model.setValue("/root/hidden/refparam/sworkseq" , "0");
  1384. model.setValue("/root/hidden/refparam/eworkseq" , "0");
  1385. model.setValue("/root/hidden/refparam/starttm" , "0000");
  1386. model.setValue("/root/hidden/refparam/endtm" , "2359");
  1387. model.setValue("/root/hidden/refparam/rsltstat0" , "1");
  1388. model.setValue("/root/hidden/ref/tclscdlist/tclsnmlist" , "");
  1389. model.setValue("/root/hidden/ref/tclscdlist/testgrup" , "");
  1390. model.setValue("/root/hidden/rsltcont" , "");
  1391. model.setValue("/root/hidden/refparam/rsltstat1" , "");
  1392. model.setValue("/root/hidden/refparam/rsltstat2" , "");
  1393. model.setValue("/root/hidden/cursor" , "1");
  1394. datagrid2.rowStyle(1, "data", "background-color") = "#FFFFFF";
  1395. //model.setvalue("/root/hidden/refparam/testgrupseqno", model.getvalue("/root/init/LB0103/cd"));
  1396. datagrid2.disabled = true;
  1397. grd_testlist.fixedcellcheckbox(0, 1) = true;
  1398. grd_testlist.fixedcellischeck(0, 1) = false;
  1399. grd_testlist.removeRow();
  1400. for(i=grd_testlist.cols ; i >= gStartCol ; i--)
  1401. grd_testlist.colHidden(i) = true;
  1402. if(ref != 1) {
  1403. model.setvalue("/root/hidden/refparam/userid" , "");
  1404. model.setvalue("/root/main/getUsernm/usernm" , "");
  1405. }
  1406. }
  1407. fBaseInfoRef("0106|0103|0109|0000|0210|0105|1005|");
  1408. fCMTPCD_ChangeNodeset();
  1409. model.refresh();
  1410. }
  1411. function fSetClear2(){
  1412. model.removeNodeset("/root/main/testinfo/patlist");
  1413. model.resetInstanceNode("/root/main/testinfo/spcinfo");
  1414. model.removeNodeset("/root/main/testinfo/testlist");
  1415. datagrid2.rowStyle(1, "data", "background-color") = "#FFFFFF";
  1416. //model.setvalue("/root/hidden/refparam/userid" , "");
  1417. //model.setvalue("/root/main/getUsernm/usernm" , "");
  1418. model.refresh();
  1419. }
  1420. function fRsltCDEnterKey(vInptRslt){
  1421. //var vInptRslt = cmb_rslt.label.getTrim(); // 적용할 실제결과
  1422. var curRow = grd_testlist.row;
  1423. var curCol = grd_testlist.Col;
  1424. if (curCol < parseInt(gStartCol)) return;
  1425. if (curRow < 0) return;
  1426. if (vInptRslt.getTrim() == "") return;
  1427. var vTclscd = model.getValue("/root/hidden/currentest/tclscd");
  1428. var vCvtRst = fGetSeekRst(vTclscd, vInptRslt);
  1429. if (vInptRslt != vCvtRst) {
  1430. vInptRslt = vCvtRst;
  1431. }
  1432. var selectedCells = grd_testlist.selectedCells;
  1433. for (var i=0; i<selectedCells.length; i++){
  1434. var cell = selectedCells.item(i);
  1435. if (cell){
  1436. var curRow = cell.row;
  1437. var curCol = cell.col;
  1438. var refRow = fGetRow(curRow, curCol);
  1439. var vOrgrstseq = "inptrslt" + eval((curCol - gStartCol) + 1).toString();
  1440. if (refRow > 0) {
  1441. model.setValue("/root/main/testinfo/patlist[" + curRow + "]/" + vOrgrstseq, vInptRslt);
  1442. fCvtViewResult(vInptRslt, refRow);
  1443. if(vInptRslt == ""){
  1444. if(model.getValue("/root/main/testinfo/testlist["+ refRow +"]/iud") != "") {
  1445. model.setValue("/root/main/testinfo/testlist["+ refRow +"]/iud", "");
  1446. datagrid1.rebuild();
  1447. }
  1448. model.setValue("/root/main/testinfo/patlist["+ curRow +"]/chk", "false");
  1449. //return;
  1450. } else {
  1451. model.setValue("/root/main/testinfo/patlist["+ curRow +"]/chk", "true");
  1452. }
  1453. // 수정항목 색변경
  1454. //var color = fCOMLIS_getBackColor("GREEN");
  1455. grd_testlist.cellStyle("background-color", curRow, curCol, curRow, curCol) = "#f3e1bf";
  1456. //TFGridRowColor("grdHwanJaGSHML", i, curCol, i, curCol, 1, color[0], color[1], color[2]);
  1457. }
  1458. }
  1459. }
  1460. model.setValue("/root/hidden/rsltcont", "");
  1461. }
  1462. function fGetSeekRst(vTestcd, vInptRslt) {
  1463. var result = vInptRslt
  1464. var cdNodes = instance1.selectNodes("/root/init/LB0109[etc01='" + vTestcd + "']/cd");
  1465. var cdNodes2 = instance1.selectNodes("/root/init/LB0109[etc01='" + vTestcd + "']/nm");
  1466. var vRstcontLower ="";
  1467. var vRstcontUpper = "";
  1468. for (i = 1; i <= cdNodes.length; i++) {
  1469. var cd = cdNodes.item(i - 1).text;
  1470. var nm = cdNodes2.item(i - 1).text;
  1471. if(vInptRslt.toLowerCase() == cd) vRstcontLower = nm;
  1472. if(vInptRslt.toUpperCase() == cd) vRstcontUpper = nm;
  1473. }
  1474. if (vRstcontLower.getTrim() != "" || vRstcontUpper.getTrim() != "" ) {
  1475. result = (vRstcontLower.getTrim() != "") ? vRstcontLower.getTrim() : vRstcontUpper.getTrim();
  1476. }
  1477. return result;
  1478. }
  1479. function fUserNMRef(){
  1480. if(model.getvalue("/root/hidden/refparam/userid") != ""){
  1481. model.makeValue("/root/send/userid" , model.getvalue("/root/hidden/refparam/userid"));
  1482. submit("TRLZZ00104");
  1483. }
  1484. }
  1485. //마우스오른쪽 클릭시 결과코드 보이기
  1486. function fGetMouseDown(){
  1487. model.removeNodeset("/root/hidden/popupmenu");
  1488. if(event.button == 3){ // 라이트클릭 메뉴만들기...
  1489. model.makeNode("/root/hidden/popupmenu/grid");
  1490. model.makeNode("/root/hidden/popupmenu/grid/item");
  1491. var curRow = grd_testlist.mouseRow;
  1492. var curCol = grd_testlist.mouseCol;
  1493. var refRow = fGetRow(curRow, curCol);
  1494. if(curCol >= gStartCol && refRow >0){
  1495. var testcd = model.getvalue("/root/main/testinfo/testlist["+ refRow +"]/testcd");
  1496. //결과코드관련
  1497. var n = getNodesetCount("/root/init/LB0109[etc01='" + testcd + "']");
  1498. if (n > 0) {
  1499. var cdNodes = instance1.selectNodes("/root/init/LB0109[etc01='" + testcd + "']/cd");
  1500. var cdNodes2 = instance1.selectNodes("/root/init/LB0109[etc01='" + testcd + "']/nm");
  1501. var dispyn = instance1.selectNodes("/root/init/LB0109[etc01='" + testcd + "']/etc03");
  1502. for (i = 1; i <= n; i++) {
  1503. var cd = cdNodes.item(i - 1).text;
  1504. var nm = cdNodes2.item(i - 1).text;
  1505. var yn = dispyn.item(i - 1).text;
  1506. if(yn == "Y"){
  1507. //var cd = model.getvalue("/root/init/LB0109[etc01='" + testcd + "']["+ i +"]/cd");
  1508. //var nm = model.getvalue("/root/init/LB0109[etc01='" + testcd + "']["+ i +"]/nm");
  1509. model.makeValue("/root/hidden/popupmenu/grid/item["+ i +"]/name" , "["+cd+"] "+ nm);
  1510. model.makeValue("/root/hidden/popupmenu/grid/item["+ i +"]/func" , nm + "▦" + refRow);
  1511. //model.makeValue("/root/hidden/popupmenu/grid/item["+i+"]/value" , cd);
  1512. }
  1513. }
  1514. }
  1515. n = parseInt(getNodesetCount("/root/hidden/popupmenu/grid/item")) + 1;
  1516. if(n>1){
  1517. model.makeValue("/root/hidden/popupmenu/grid/item["+n+"]/name" , "-");
  1518. model.makeValue("/root/hidden/popupmenu/grid/item["+n+"]/func" , "");
  1519. n++
  1520. }
  1521. model.makeValue("/root/hidden/popupmenu/grid/item["+n+"]/name" , "▶ 누적결과조회");
  1522. model.makeValue("/root/hidden/popupmenu/grid/item["+n+"]/func" , "fAcmlRsltRef▦" + refRow);
  1523. }
  1524. }
  1525. if((grd_testlist.isCell(event.target) && grd_testlist.row >= grd_testlist.fixedRows) && grd_testlist.col >= gStartCol ){
  1526. window.setPopupMenu(true , "/root/hidden/popupmenu/grid/item" , "name", "func" , true);
  1527. //setPopupMenu("grd_TestInfoCnts" , true, "/root/hidden/popupmenu/grid/item", "name", "func");
  1528. }else{
  1529. window.setPopupMenu(false);
  1530. }
  1531. }
  1532. //누적결과조회
  1533. function fAcmlRsltRef(row){
  1534. model.makeValue("/root/hidden/AcmlRsltRef/pid", model.getValue("/root/main/testinfo/testlist["+ row +"]/pid"));
  1535. model.makeValue("/root/hidden/AcmlRsltRef/testcd", model.getValue("/root/main/testinfo/testlist["+ row +"]/testcd"));
  1536. model.makeValue("/root/hidden/AcmlRsltRef/hngnm", model.getValue("/root/main/testinfo/testlist["+ row +"]/patnm"));
  1537. model.makeValue("/root/hidden/AcmlRsltRef/sex", model.getValue("/root/main/testinfo/testlist["+ row +"]/patsex"));
  1538. model.makeValue("/root/hidden/AcmlRsltRef/age", model.getValue("/root/main/testinfo/testlist["+ row +"]/patage"));
  1539. modal("SPLLP90100 ","","","","","/root/hidden/AcmlRsltRef","/root/init/baseinfo");
  1540. }
  1541. //팝업메뉴
  1542. function fOnmenu(popupParam){
  1543. if(popupParam.substring(0,12) == "fAcmlRsltRef") { //누적결과조회
  1544. var aL = popupParam.split("▦");
  1545. fAcmlRsltRef(aL[1]);
  1546. }else{
  1547. if(popupParam != ""){
  1548. var aL = popupParam.split("▦");
  1549. fRsltCDEnterKey(aL[0]);
  1550. }
  1551. }
  1552. }
  1553. ]]>
  1554. </script>
  1555. </xhtml:head>
  1556. <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  1557. <group id="group3" scroll="auto" style="left:0px; top:40; width:1195px; height:744px; ">
  1558. <group id="group4" style="left:0px; top:10px; width:1195px; height:60px; ">
  1559. <shape id="roundrect2" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1194px; height:60px; "/>
  1560. <button id="button3" class="btn1_letter2" style="left:1123px; top:31px; width:56px; height:22px; ">
  1561. <caption>조회</caption>
  1562. <script type="javascript" ev:event="DOMActivate">
  1563. <![CDATA[
  1564. fOnclick_btnRef();
  1565. ]]>
  1566. </script>
  1567. </button>
  1568. <line id="line9" class="line_4" style="x1:1108px; y1:31px; x2:1108px; y2:53px; "/>
  1569. <select id="checkbox4" ref="/root/hidden/refparam/rsltstat0" class="checkbox_search" overflow="visible" appearance="full" cols="3" style="left:607px; top:11px; width:81px; height:13px; border-style:none; ">
  1570. <choices>
  1571. <item>
  1572. <label>결과미입력</label>
  1573. <value>1</value>
  1574. </item>
  1575. </choices>
  1576. <script type="javascript" ev:event="xforms-value-changed">
  1577. <![CDATA[
  1578. fRstGbn_XForms_Value_Changed("0");
  1579. ]]>
  1580. </script>
  1581. </select>
  1582. <caption id="caption23" class="search_name" style="left:15px; top:9px; width:90px; height:17px; ">작업일자 :</caption>
  1583. <select1 id="combo3" ref="/root/hidden/refparam/tsectcd" class="combo_search" appearance="minimal" style="left:105px; top:35px; width:105px; height:19px; ">
  1584. <choices>
  1585. <itemset nodeset="/root/init/LB0106">
  1586. <label ref="nm"/>
  1587. <value ref="cd"/>
  1588. </itemset>
  1589. </choices>
  1590. </select1>
  1591. <caption id="caption24" class="search_no_b" style="left:193px; top:10px; width:12px; height:17px; ">~</caption>
  1592. <caption id="caption25" class="search_name" style="left:15px; top:36px; width:90px; height:17px; ">작업그룹 :</caption>
  1593. <caption id="caption26" class="search_name" style="left:304px; top:9px; width:90px; height:17px; ">작업번호 :</caption>
  1594. <input id="input5" ref="/root/hidden/refparam/startdd" class="input_search" inputtype="date" style="left:105px; top:8px; width:85px; height:19px; "/>
  1595. <caption id="caption27" class="search_no_b" style="left:440px; top:10px; width:12px; height:17px; ">~</caption>
  1596. <input id="input6" ref="/root/hidden/refparam/enddd" class="input_search" inputtype="date" style="left:209px; top:8px; width:85px; height:19px; "/>
  1597. <caption id="caption28" class="search_name" style="left:514px; top:9px; width:90px; height:17px; ">결과구분 :</caption>
  1598. <input id="input7" ref="/root/hidden/refparam/sworkseq" class="input_search" style="left:392px; top:8px; width:45px; height:19px; "/>
  1599. <input id="input8" ref="/root/hidden/refparam/eworkseq" class="input_search" style="left:457px; top:8px; width:45px; height:19px; "/>
  1600. <caption id="caption29" class="search_name" style="left:414px; top:34px; width:90px; height:17px; ">검사항목 :</caption>
  1601. <button id="button4" class="icon_search" style="left:1071px; top:32px; width:16px; height:16px; background-image:../../../com/commonweb/images/icon_search.gif; ">
  1602. <caption/>
  1603. <script type="javascript" ev:event="DOMActivate">
  1604. <![CDATA[
  1605. modal("SMLLF90400", "", "", "", "", "/root/hidden/ref/tclscdlist/testgrup", "/root/hidden/tclscdlist/testgrup");
  1606. fGrdReMake();
  1607. ]]>
  1608. </script>
  1609. </button>
  1610. <input id="input9" ref="/root/hidden/ref/tclscdlist/tclsnmlist" class="input_search" style="left:625px; top:33px; width:434px; height:19px; "/>
  1611. <select id="checkbox5" ref="/root/hidden/refparam/rsltstat1" class="checkbox_search" overflow="visible" appearance="full" cols="3" style="left:689px; top:11px; width:69px; height:13px; border-style:none; ">
  1612. <choices>
  1613. <item>
  1614. <label>결과입력</label>
  1615. <value>1</value>
  1616. </item>
  1617. </choices>
  1618. <script type="javascript" ev:event="xforms-value-changed">
  1619. <![CDATA[
  1620. fRstGbn_XForms_Value_Changed("1");
  1621. ]]>
  1622. </script>
  1623. </select>
  1624. <select id="checkbox6" ref="/root/hidden/refparam/rsltstat2" class="checkbox_search" overflow="visible" appearance="full" cols="3" style="left:758px; top:11px; width:72px; height:13px; border-style:none; ">
  1625. <choices>
  1626. <item>
  1627. <label>최종보고</label>
  1628. <value>1</value>
  1629. </item>
  1630. </choices>
  1631. <script type="javascript" ev:event="xforms-value-changed">
  1632. <![CDATA[
  1633. fRstGbn_XForms_Value_Changed("2");
  1634. ]]>
  1635. </script>
  1636. </select>
  1637. <select1 id="combo4" ref="/root/hidden/ref/tclscdlist/testgrup" class="combo_search" appearance="minimal" style="left:506px; top:33px; width:118px; height:19px; ">
  1638. <choices>
  1639. <itemset nodeset="/root/init/LB0103">
  1640. <label ref="nm"/>
  1641. <value ref="cd"/>
  1642. </itemset>
  1643. </choices>
  1644. <script type="javascript" ev:event="xforms-value-changed">
  1645. <![CDATA[
  1646. fSelectTestGrup();
  1647. ]]>
  1648. </script>
  1649. </select1>
  1650. <caption id="caption30" class="search_name" style="left:225px; top:35px; width:95px; height:17px; ">결과코드 :</caption>
  1651. <input id="input10" ref="/root/hidden/refparam/userid" class="input_essential" style="left:1018px; top:7px; width:76px; height:19px; ">
  1652. <script type="javascript" ev:event="onkeyup">
  1653. <![CDATA[
  1654. if(event.keyCode == "13"){
  1655. model.setvalue("/root/hidden/refparam/userid",ipt_testpsn.currentText);
  1656. model.refresh();
  1657. fUserNMRef();
  1658. ipt_testpsn.selBegin = 0;
  1659. ipt_testpsn.selEnd = ipt_testpsn.currentText.length;
  1660. }
  1661. ]]>
  1662. </script>
  1663. </input>
  1664. <output id="output11" ref="/root/main/getUsernm/usernm" class="output_fix" style="left:1096px; top:7px; width:82px; height:19px; "/>
  1665. <caption id="caption31" class="tit_2" style="left:948px; top:10px; width:66px; height:13px; ">검사자 :</caption>
  1666. <select1 id="combo5" ref="/root/hidden/rsltcont" class="combo_search" appearance="minimal" editmode="input" style="left:315px; top:34px; width:85px; height:19px; ">
  1667. <choices>
  1668. <itemset nodeset="/root/init/LB0109[etc01='']">
  1669. <label ref="nm"/>
  1670. <value ref="cd"/>
  1671. </itemset>
  1672. </choices>
  1673. <script type="javascript" ev:event="xforms-value-changed">
  1674. <![CDATA[
  1675. fRsltCDEnterKey(cmb_rslt.label.getTrim());
  1676. ]]>
  1677. </script>
  1678. </select1>
  1679. <caption id="caption32" class="tit_2" style="left:948px; top:10px; width:66px; height:13px; ">검사자 :</caption>
  1680. </group>
  1681. <line id="line1" class="line_1" style="x1:0px; y1:95px; x2:1194px; y2:95px; "/>
  1682. <caption id="caption2" class="tit_2" style="left:5px; top:80px; width:134px; height:14px; ">검사항목내역</caption>
  1683. <button id="button2" class="btn2_letter2" style="left:1152px; top:74px; width:42px; height:19px; ">
  1684. <caption>엑셀</caption>
  1685. <script type="javascript" ev:event="onclick">
  1686. <![CDATA[
  1687. //addData();
  1688. //datagrid1.saveExcel();
  1689. var fileName = window.fileDialog("save", ",", false, "검사항목별결과관리", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  1690. if (fileName != "")
  1691. {
  1692. grd_testlist.saveExcel(fileName);
  1693. }
  1694. ]]>
  1695. </script>
  1696. </button>
  1697. <group id="group1" style="left:0px; top:10px; width:1195px; height:60px; ">
  1698. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1194px; height:60px; "/>
  1699. <button id="button1" class="btn1_letter2" style="left:1123px; top:21px; width:56px; height:22px; ">
  1700. <caption>조회</caption>
  1701. <script type="javascript" ev:event="DOMActivate">
  1702. <![CDATA[
  1703. fOnclick_btnRef();
  1704. ]]>
  1705. </script>
  1706. </button>
  1707. <line id="line11" class="line_4" style="x1:1105px; y1:10px; x2:1105px; y2:58px; "/>
  1708. <caption id="caption1" class="search_name" style="left:15px; top:9px; width:90px; height:17px; ">접수일자 :</caption>
  1709. <select1 id="combo1" ref="/root/hidden/refparam/tsectcd" class="combo_search" appearance="minimal" style="left:500px; top:10px; width:105px; height:19px; ">
  1710. <choices>
  1711. <itemset nodeset="/root/init/LB0106">
  1712. <label ref="nm"/>
  1713. <value ref="cd"/>
  1714. </itemset>
  1715. </choices>
  1716. </select1>
  1717. <caption id="caption3" class="search_no_b" style="left:238px; top:10px; width:12px; height:17px; ">~</caption>
  1718. <caption id="caption4" class="search_name" style="left:410px; top:10px; width:90px; height:17px; ">작업그룹 :</caption>
  1719. <input id="input1" ref="/root/hidden/refparam/startdd" class="input_search" inputtype="date" style="left:105px; top:8px; width:85px; height:19px; "/>
  1720. <input id="input_starttm" ref="/root/hidden/refparam/starttm" class="input_search" maxlength="4" format="99:99" style="left:190px; top:8px; width:45px; height:19px; "/>
  1721. <input id="input2" ref="/root/hidden/refparam/enddd" class="input_search" inputtype="date" style="left:254px; top:8px; width:85px; height:19px; "/>
  1722. <input id="input_endtm" ref="/root/hidden/refparam/endtm" class="input_search" maxlength="4" format="99:99" style="left:340px; top:8px; width:45px; height:19px; "/>
  1723. <input id="input3" ref="/root/hidden/refparam/sworkseq" class="input_search" visibility="visible" style="left:710px; top:26px; width:45px; height:19px; "/>
  1724. <input id="input4" ref="/root/hidden/refparam/eworkseq" class="input_search" visibility="hidden" style="left:905px; top:30px; width:35px; height:19px; "/>
  1725. <caption id="caption9" class="search_name" style="left:15px; top:35px; width:90px; height:17px; ">검사항목 :</caption>
  1726. <button id="button61" class="icon_search" style="left:610px; top:35px; width:16px; height:16px; background-image:../../../com/commonweb/images/icon_search.gif; ">
  1727. <caption/>
  1728. <script type="javascript" ev:event="DOMActivate">
  1729. <![CDATA[
  1730. modal("SMLLF90400", "", "", "", "", "/root/hidden/ref/tclscdlist/testgrup", "/root/hidden/tclscdlist/testgrup");
  1731. fGrdReMake();
  1732. ]]>
  1733. </script>
  1734. </button>
  1735. <input id="ipt_tclscdlist" ref="/root/hidden/ref/tclscdlist/tclsnmlist" class="input_search" style="left:230px; top:35px; width:375px; height:19px; "/>
  1736. <select1 id="combo2" ref="/root/hidden/ref/tclscdlist/testgrup" class="combo_search" appearance="minimal" style="left:105px; top:35px; width:118px; height:19px; ">
  1737. <choices>
  1738. <itemset nodeset="/root/init/LB0103">
  1739. <label ref="nm"/>
  1740. <value ref="cd"/>
  1741. </itemset>
  1742. </choices>
  1743. <script type="javascript" ev:event="xforms-value-changed">
  1744. <![CDATA[
  1745. fSelectTestGrup();
  1746. ]]>
  1747. </script>
  1748. </select1>
  1749. <select1 id="cmb_rslt" ref="/root/hidden/rsltcont" class="combo_search" visibility="hidden" appearance="minimal" editmode="input" style="left:760px; top:5px; width:35px; height:19px; ">
  1750. <choices>
  1751. <itemset nodeset="/root/init/LB0109[etc01='']">
  1752. <label ref="nm"/>
  1753. <value ref="cd"/>
  1754. </itemset>
  1755. </choices>
  1756. <script type="javascript" ev:event="xforms-value-changed">
  1757. <![CDATA[
  1758. fRsltCDEnterKey(cmb_rslt.label.getTrim());
  1759. ]]>
  1760. </script>
  1761. </select1>
  1762. <caption id="caption5" class="search_name" visibility="visible" style="left:640px; top:25px; width:90px; height:17px; ">기준값:</caption>
  1763. </group>
  1764. <datagrid id="datagrid1" nodeset="/root/main/testinfo/testlist" class="datagrid2" visibility="hidden" caption="rkey^workno^bcno^execprcpuniqno^testcd^spccd^bufinptrslt^reptrslt^rsltunit^judgmark^panicmark^deltamark^criticalmark^alertmark^rsltmark^rsltstat^bfbcno^bflastreptdt^testeqmtcd^comment^tclskind^spcacptid^spcacptdt^spcacptnm^rsltrgsgid^rsltrgstdt^rsltrgstnm^mdlreptid^mdlreptdt^mdlreptnm^lastreptid^lastreptdt^lastreptnm^tclscd^bfinptrslt^bfreptrslt^rsltseq^prcpgenrflag^rsltkind^rsltintsize^rsltdcmlsize^rundkind^rvalflag^descrval^judgkind^userjudgchar1^userjudgchar2^userjudgchar3^panicflag^panicminval^panicmaxval^deltaflag^deltaminval^deltamaxval^deltaterm^criticflag^criticminval^criticmaxval^alertflag^alertminval^allertmaxval^alimitls^alimitflag^alimitminval^alimith^alimiths^alimitls^refl^refls^refh^refhs^reflt^rstinterval^iud^spcscrnnm^inptrslt^testcmt" colsep="^" colwidth="150, 118, 104, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 100, 100, 100" ellipsis="true" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:135px; top:305px; width:300px; height:80px; ">
  1765. <col ref="rkey"/>
  1766. <col ref="workno"/>
  1767. <col ref="bcno"/>
  1768. <col ref="execprcpuniqno"/>
  1769. <col ref="testcd"/>
  1770. <col ref="spccd"/>
  1771. <col ref="bufinptrslt"/>
  1772. <col ref="reptrslt"/>
  1773. <col ref="rsltunit"/>
  1774. <col ref="judgmark"/>
  1775. <col ref="panicmark"/>
  1776. <col ref="deltamark"/>
  1777. <col ref="criticalmark"/>
  1778. <col ref="alertmark"/>
  1779. <col ref="rsltmark"/>
  1780. <col ref="rsltstat"/>
  1781. <col ref="bfbcno"/>
  1782. <col ref="bflastreptdt"/>
  1783. <col ref="testeqmtcd"/>
  1784. <col ref="comment"/>
  1785. <col ref="tclskind"/>
  1786. <col ref="spcacptid"/>
  1787. <col ref="spcacptdt"/>
  1788. <col ref="spcacptnm"/>
  1789. <col ref="rsltrgsgid"/>
  1790. <col ref="rsltrgstdt"/>
  1791. <col ref="rsltrgstnm"/>
  1792. <col ref="mdlreptid"/>
  1793. <col ref="mdlreptdt"/>
  1794. <col ref="mdlreptnm"/>
  1795. <col ref="lastreptid"/>
  1796. <col ref="lastreptdt"/>
  1797. <col ref="lastreptnm"/>
  1798. <col ref="tclscd"/>
  1799. <col ref="bfinptrslt"/>
  1800. <col ref="bfreptrslt"/>
  1801. <col ref="rsltseq"/>
  1802. <col ref="prcpgenrflag"/>
  1803. <col ref="rsltkind"/>
  1804. <col ref="rsltintsize"/>
  1805. <col ref="rsltdcmlsize"/>
  1806. <col ref="rundkind"/>
  1807. <col ref="rvalflag"/>
  1808. <col ref="descrval"/>
  1809. <col ref="judgkind"/>
  1810. <col ref="userjudgchar1"/>
  1811. <col ref="userjudgchar2"/>
  1812. <col ref="userjudgchar3"/>
  1813. <col ref="panicflag"/>
  1814. <col ref="panicminval"/>
  1815. <col ref="panicmaxval"/>
  1816. <col ref="deltaflag"/>
  1817. <col ref="deltaminval"/>
  1818. <col ref="deltamaxval"/>
  1819. <col ref="deltaterm"/>
  1820. <col ref="criticflag"/>
  1821. <col ref="criticminval"/>
  1822. <col ref="criticmaxval"/>
  1823. <col ref="alertflag"/>
  1824. <col ref="alertminval"/>
  1825. <col ref="allertmaxval"/>
  1826. <col ref="alimitls"/>
  1827. <col ref="alimitflag"/>
  1828. <col ref="alimitminval"/>
  1829. <col ref="alimith"/>
  1830. <col ref="alimiths"/>
  1831. <col ref="alimitls"/>
  1832. <col ref="refl"/>
  1833. <col ref="refls"/>
  1834. <col ref="refh"/>
  1835. <col ref="refhs"/>
  1836. <col ref="reflt"/>
  1837. <col ref="rstinterval"/>
  1838. <col ref="iud"/>
  1839. <col ref="spcscrnnm"/>
  1840. <col ref="inptrslt"/>
  1841. <col ref="testcmt"/>
  1842. </datagrid>
  1843. <line id="line8" class="line_2" style="x1:267px; y1:687px; x2:522px; y2:687px; "/>
  1844. <input id="ipt_bf" ref="/root/main/testinfo/spcinfo/bfreptrslt" class="input_fix" style="left:343px; top:642px; width:179px; height:19px; "/>
  1845. <datagrid id="datagrid2" nodeset="/root/main/testinfo/spcinfo" caption="N^P^D^C^A^R" colsep="^" colwidth="30, 30, 30, 30, 30, 27" dataheight="23" defaultrows="1" mergecellsfixedrows="bycolrec" rowheight="23" rowsep="|" fixed.background-image="../../../com/commonweb/images/grid_bg.gif" style="left:83px; top:664px; width:179px; height:48px; ">
  1846. <col ref="judgmark" style="text-align:center; "/>
  1847. <col ref="panicmark" style="text-align:center; "/>
  1848. <col ref="deltamark" style="left:60px; top:25px; width:30px; height:25px; text-align:center; "/>
  1849. <col ref="criticalmark" style="text-align:center; "/>
  1850. <col ref="alertmark" style="text-align:center; "/>
  1851. <col ref="rsltmark" style="text-align:center; "/>
  1852. </datagrid>
  1853. <select1 id="cmb_cmt" ref="/root/hidden/testcont/testcontcd" class="combo_default" appearance="minimal" style="left:923px; top:617px; width:250px; height:19px; ">
  1854. <choices>
  1855. <itemset nodeset="/root/init/LB0210">
  1856. <label ref="nm"/>
  1857. <value ref="cd"/>
  1858. </itemset>
  1859. </choices>
  1860. <script type="javascript" ev:event="xforms-select">
  1861. <![CDATA[
  1862. fSetCmt(grd_testlist.row,grd_testlist.col);
  1863. ]]>
  1864. </script>
  1865. </select1>
  1866. <input id="ipt_bfdt" ref="/root/main/testinfo/spcinfo/bflastreptdt" class="input_fix" format="yyyy-mm-dd hh:nn:ss" style="left:343px; top:666px; width:179px; height:19px; "/>
  1867. <output id="output10" ref="/root/main/testinfo/spcinfo/lastreptnm" class="output_fix" style="left:436px; top:720px; width:85px; height:19px; "/>
  1868. <output id="output6" ref="/root/main/testinfo/spcinfo/testeqmtcd" class="output_fix" style="left:343px; top:690px; width:179px; height:19px; "/>
  1869. <output id="output7" ref="/root/hidden/currenRow" visibility="hidden" style="left:680px; top:591px; width:100px; height:19px; "/>
  1870. <line id="line10" class="line_1" style="x1:785px; y1:610px; x2:1194px; y2:610px; "/>
  1871. <output id="output8" ref="/root/main/testinfo/spcinfo/rsltrgsgnm" class="output_fix" style="left:83px; top:720px; width:85px; height:19px; "/>
  1872. <caption id="caption20" class="cell_1" style="left:0px; top:719px; width:80px; height:23px; ">결과입력자</caption>
  1873. <button id="button5" class="icon_search" style="left:1178px; top:617px; width:16px; height:16px; background-image:../../../com/commonweb/images/icon_search.gif; ">
  1874. <caption/>
  1875. <script type="javascript" ev:event="DOMActivate">
  1876. <![CDATA[
  1877. modal("SMLLF00800");
  1878. model.removeNodeset("/root/init/LB0210");
  1879. fBaseInfoRef2("0210|");
  1880. var vSectcd = model.getValue("/root/main/TestInfo/getSpcInfo/sectcd");
  1881. var vTsectcd = model.getValue("/root/main/TestInfo/getSpcInfo/tsectcd");
  1882. //alert(model.getValue("/root/main/TestInfo/getSpcInfo/sectcd"));
  1883. //alert(model.getValue("/root/main/TestInfo/getSpcInfo/tsectcd"));
  1884. fCMTPCD_ChangeNodeset(vSectcd, vTsectcd);
  1885. //fGrdReMake();
  1886. ]]>
  1887. </script>
  1888. </button>
  1889. <output id="output9" ref="/root/main/testinfo/spcinfo/mdlreptnm" class="output_fix" style="left:274px; top:720px; width:85px; height:19px; "/>
  1890. <line id="line12" class="line_1" style="x1:527px; y1:610px; x2:780px; y2:610px; "/>
  1891. <button id="button6" class="btn2_letter4" style="left:1130px; top:591px; width:64px; height:19px; ">
  1892. <caption>소견저장</caption>
  1893. <script type="javascript" ev:event="onclick">
  1894. <![CDATA[
  1895. fSetContCmt(grd_testlist.row,grd_testlist.col);
  1896. ]]>
  1897. </script>
  1898. </button>
  1899. <caption id="caption21" class="cell_1" style="left:171px; top:719px; width:100px; height:23px; ">중간보고자</caption>
  1900. <line id="line13" class="line_2" style="x1:267px; y1:711px; x2:522px; y2:711px; "/>
  1901. <caption id="caption10" class="tit_2" style="left:5px; top:595px; width:74px; height:13px; ">검체정보</caption>
  1902. <caption id="caption11" class="cell_1" style="left:0px; top:615px; width:80px; height:23px; ">검체명</caption>
  1903. <caption id="caption22" class="cell_1" style="left:363px; top:719px; width:70px; height:23px; ">최종보고자</caption>
  1904. <caption id="caption12" class="cell_1" style="left:0px; top:639px; width:80px; height:78px; ">
  1905. <![CDATA[참고치&판정]]>
  1906. </caption>
  1907. <caption id="caption35" class="tit_2" style="left:790px; top:595px; width:84px; height:14px; ">소견</caption>
  1908. <caption id="caption13" class="cell_1" style="left:267px; top:617px; width:73px; height:23px; ">보이는결과</caption>
  1909. <caption id="caption14" class="cell_1" style="left:267px; top:641px; width:73px; height:23px; ">이전결과</caption>
  1910. <line id="line2" class="line_1" style="x1:0px; y1:610px; x2:522px; y2:610px; "/>
  1911. <caption id="caption15" class="cell_1" style="left:267px; top:665px; width:73px; height:23px; ">이전결과일</caption>
  1912. <line id="line3" class="line_2" style="x1:0px; y1:717px; x2:262px; y2:717px; "/>
  1913. <caption id="caption16" class="cell_1" style="left:267px; top:689px; width:73px; height:23px; ">검사장비</caption>
  1914. <textarea id="textarea1" ref="/root/main/testinfo/spcinfo/testcmt" style="left:527px; top:617px; width:253px; height:125px; ">
  1915. <script type="javascript" ev:event="DOMFocusOut">
  1916. <![CDATA[
  1917. var vCurrentRow = model.getValue("/root/hidden/currenRow");
  1918. if(vCurrentRow !="") {
  1919. var vComment = model.getValue("/root/main/testinfo/spcinfo/testcmt");
  1920. model.setValue("/root/main/testinfo/testlist["+vCurrentRow+"]/testcmt", vComment);
  1921. }
  1922. ]]>
  1923. </script>
  1924. </textarea>
  1925. <line id="line4" class="line_2" style="x1:0px; y1:637px; x2:262px; y2:637px; "/>
  1926. <textarea id="textarea3" ref="/root/main/testinfo/spcinfo/testcont" style="left:825px; top:639px; width:369px; height:50px; ">
  1927. <script type="javascript" ev:event="xforms-value-changed">
  1928. <![CDATA[
  1929. fSoGyeonJeoJang(1);
  1930. ]]>
  1931. </script>
  1932. <script type="javascript" ev:event="onclick">
  1933. <![CDATA[
  1934. textarea3.selBegin = (textarea3.value).length;
  1935. ]]>
  1936. </script>
  1937. </textarea>
  1938. <textarea id="text_testcmts" ref="/root/main/testinfo/spcinfo/testcmts" style="left:825px; top:690px; width:369px; height:52px; ">
  1939. <script type="javascript" ev:event="xforms-value-changed">
  1940. <![CDATA[
  1941. fSoGyeonJeoJang(2);
  1942. ]]>
  1943. </script>
  1944. <script type="javascript" ev:event="onclick">
  1945. <![CDATA[
  1946. text_testcmts.selBegin = (text_testcmts.value).length;
  1947. ]]>
  1948. </script>
  1949. </textarea>
  1950. <caption id="cap_1818" class="cell_1" style="left:785px; top:638px; width:38px; height:103px; ">
  1951. <![CDATA[시행
  1952. 부서
  1953. 검사
  1954. 항목]]>
  1955. </caption>
  1956. <select1 id="cmb_sect" ref="/root/hidden/testcont/tsectcd" class="combo_default" appearance="minimal" style="left:785px; top:617px; width:135px; height:19px; ">
  1957. <choices>
  1958. <itemset nodeset="/root/hidden/testconttsectcd">
  1959. <label ref="nm"/>
  1960. <value ref="cd"/>
  1961. </itemset>
  1962. </choices>
  1963. <script type="javascript" ev:event="xforms-select">
  1964. <![CDATA[
  1965. fSelectTestContTsect("return");
  1966. fCMTPCD_ChangeNodeset2();
  1967. ]]>
  1968. </script>
  1969. </select1>
  1970. <caption id="caption18" class="tit_2" style="left:532px; top:595px; width:84px; height:13px; ">comment</caption>
  1971. <line id="line5" class="line_2" style="x1:83px; y1:661px; x2:262px; y2:661px; "/>
  1972. <output id="output1" ref="/root/main/testinfo/spcinfo/spcscrnnm" class="output_fix" style="left:83px; top:616px; width:179px; height:19px; "/>
  1973. <line id="line6" class="line_2" style="x1:267px; y1:639px; x2:522px; y2:639px; "/>
  1974. <output id="output2" ref="/root/main/testinfo/spcinfo/refval" class="output_fix" style="left:83px; top:640px; width:179px; height:19px; "/>
  1975. <line id="line7" class="line_2" style="x1:267px; y1:663px; x2:522px; y2:663px; "/>
  1976. <output id="output3" ref="/root/main/testinfo/spcinfo/reptrslt" class="output_fix" style="left:343px; top:618px; width:179px; height:19px; "/>
  1977. <select1 id="radio2" ref="/root/hidden/cmtflag" appearance="full" vcellspacing="28" overflow="visible" style="left:795px; top:623px; width:15px; height:85px; border-style:none; ">
  1978. <choices>
  1979. <item>
  1980. <label/>
  1981. <value>1</value>
  1982. </item>
  1983. <item>
  1984. <label/>
  1985. <value>2</value>
  1986. </item>
  1987. </choices>
  1988. </select1>
  1989. <button id="button7" class="btn3_letter6" visibility="hidden" style="left:815px; top:15px; width:104px; height:22px; ">
  1990. <caption>바코드재출력</caption>
  1991. <script type="javascript" ev:event="DOMActivate">
  1992. <![CDATA[
  1993. openInternal("modeless", "SMLLJ00400", "scn", "", "", "", "", "", "", "", "");
  1994. ]]>
  1995. </script>
  1996. </button>
  1997. <button id="btn_cle" class="btn4_letter3" style="left:1025px; top:30px; width:68px; height:22px; ">
  1998. <caption>초기화</caption>
  1999. <script type="javascript" ev:event="onclick">
  2000. <![CDATA[
  2001. fSetInit(1);
  2002. ]]>
  2003. </script>
  2004. </button>
  2005. <datagrid id="grd_testlist" nodeset="/root/main/testinfo/patlist" class="datagrid2" autoresize="true" backcoloralternate="transparent" caption="^접수일시^바코드번호^등록번호^성명^성별^나이^진료과^병동/병실^의뢰의사^검체명^inptrslt1^inptrslt12^inptrslt3^inptrslt4^inptrslt5^inptrslt6^inptrslt7^inptrslt8^inptrslt9^inptrslt10^inptrslt11^inptrslt12^inptrslt13^inptrslt14^inptrslt15^inptrslt16^inptrslt17^inptrslt18^inptrslt19^inptrslt20^inptrslt21^inptrslt22^inptrslt23^inptrslt24^inptrslt25^inptrslt26^inptrslt27^inptrslt28^inptrslt29^inptrslt30" colsep="^" colwidth="20, 114, 98, 80, 70, 30, 30, 70, 60, 70, 100, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60" dataheight="23" defaultrows="1" ellipsis="true" explorerbar="sortshow" frozencols="9" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="32" rowsep="|" selectionmode="free" fixed.background-image="../../../com/commonweb/images/grid_bg.gif" style="left:0px; top:100px; width:1194px; height:640px; ">
  2006. <col checkvalue="true,false" ref="chk" type="checkbox"/>
  2007. <col ref="spcacptdt" format="yyyy-mm-dd hh:nn"/>
  2008. <col ref="bcno" type="input"/>
  2009. <col ref="pid"/>
  2010. <col ref="patnm"/>
  2011. <col ref="sex"/>
  2012. <col ref="age"/>
  2013. <col ref="orddeptnm"/>
  2014. <col ref="wardroom"/>
  2015. <col ref="orddrnm"/>
  2016. <col disabled="true" ref="spccd" type="combo">
  2017. <choices>
  2018. <itemset nodeset="/root/init/LB0105">
  2019. <label ref="nm"/>
  2020. <value ref="cd"/>
  2021. </itemset>
  2022. </choices>
  2023. </col>
  2024. <col ref="inptrslt1" type="input"/>
  2025. <col ref="inptrslt2" type="input"/>
  2026. <col ref="inptrslt3" type="input"/>
  2027. <col ref="inptrslt4" type="input"/>
  2028. <col ref="inptrslt5" type="input"/>
  2029. <col ref="inptrslt6" type="input"/>
  2030. <col ref="inptrslt7" type="input"/>
  2031. <col ref="inptrslt8" type="input"/>
  2032. <col ref="inptrslt9" type="input"/>
  2033. <col ref="inptrslt10" type="input"/>
  2034. <col ref="inptrslt11" type="input"/>
  2035. <col ref="inptrslt12" type="input"/>
  2036. <col ref="inptrslt13" type="input"/>
  2037. <col ref="inptrslt14" type="input"/>
  2038. <col ref="inptrslt15" type="input"/>
  2039. <col ref="inptrslt16" type="input"/>
  2040. <col ref="inptrslt17" type="input"/>
  2041. <col ref="inptrslt18" type="input"/>
  2042. <col ref="inptrslt19" type="input"/>
  2043. <col ref="inptrslt20" type="input"/>
  2044. <col ref="inptrslt21" type="input"/>
  2045. <col ref="inptrslt22" type="input"/>
  2046. <col ref="inptrslt23" type="input"/>
  2047. <col ref="inptrslt24" type="input"/>
  2048. <col ref="inptrslt25" type="input"/>
  2049. <col ref="inptrslt26" type="input"/>
  2050. <col ref="inptrslt27" type="input"/>
  2051. <col ref="inptrslt28" type="input"/>
  2052. <col ref="inptrslt29" type="input"/>
  2053. <col ref="inptrslt30" type="input"/>
  2054. <!-- <script type="javascript" ev:event="onmousemove">
  2055. <![CDATA[
  2056. if((grd_testlist.isCell(event.target) && grd_testlist.row >= grd_testlist.fixedRows) && grd_testlist.col >= 10 ){
  2057. alert(1);
  2058. fPatGridClick(grd_testlist.row,grd_testlist.col, "M");
  2059. }
  2060. ]]>
  2061. </script> -->
  2062. <script type="javascript" ev:event="onkeypress">
  2063. <![CDATA[
  2064. fGridKeyEvent();
  2065. ]]>
  2066. </script>
  2067. <!-- <script type="javascript" ev:event="ondblclick">
  2068. <![CDATA[
  2069. if((grd_testlist.isCell(event.target) && grd_testlist.row >= grd_testlist.fixedRows) && grd_testlist.col == 3 ){ //바코드
  2070. var strBcno = model.getValue("/root/main/testinfo/patlist[" + grd_testlist.row + "]/bcno");
  2071. window.clipBoardData = strBcno;
  2072. }
  2073. ]]>
  2074. </script> -->
  2075. <script type="javascript" ev:event="onmousedown">
  2076. <![CDATA[
  2077. fGetMouseDown();
  2078. ]]>
  2079. </script>
  2080. <script type="javascript" ev:event="onaftersort">
  2081. <![CDATA[
  2082. grd_testlist.gridToInstance();
  2083. ]]>
  2084. </script>
  2085. <script type="javascript" ev:event="oncopy">
  2086. <![CDATA[
  2087. //grid_oncopy();
  2088. ]]>
  2089. </script>
  2090. <script type="javascript" ev:event="onkeydown">
  2091. <![CDATA[
  2092. fGridKeyDown();
  2093. ]]>
  2094. </script>
  2095. <script type="javascript" ev:event="onclick">
  2096. <![CDATA[
  2097. if((grd_testlist.isCell(event.target) && grd_testlist.row >= grd_testlist.fixedRows) && grd_testlist.col >= 2 ){ //검사항목
  2098. fPatGridClick(grd_testlist.row,grd_testlist.col);
  2099. if(grd_testlist.col == 3){
  2100. var strBcno = model.getValue("/root/main/testinfo/patlist[" + grd_testlist.row + "]/bcno");
  2101. window.clipBoardData = strBcno;
  2102. }
  2103. } else if(grd_testlist.col == 1) { //체크박스
  2104. fSelectCancle();
  2105. }
  2106. ]]>
  2107. </script>
  2108. </datagrid>
  2109. </group>
  2110. <group id="group2" style="left:0px; top:15px; width:1195px; height:13px; ">
  2111. <caption id="caption17" class="tit_1" style="left:0px; top:0px; width:800px; height:15px; ">
  2112. <![CDATA[ 두검사결과 비교조회]]>
  2113. <script type="javascript" ev:event="ondblclick">
  2114. <![CDATA[
  2115. if(datagrid1.visible == true){
  2116. datagrid1.visible = false;
  2117. }else{
  2118. datagrid1.visible = true;
  2119. }
  2120. ]]>
  2121. </script>
  2122. </caption>
  2123. </group>
  2124. <script type="javascript" ev:event="onmenu">
  2125. <![CDATA[
  2126. var popupParam = event.description;
  2127. fOnmenu(popupParam);
  2128. ]]>
  2129. </script>
  2130. </xhtml:body>
  2131. </xhtml:html>