SMLLR00400_검사항목별결과관리.xrw 109 KB

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