SMLPB00900_Cassette발행.xrw 54 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * 제 목 : SMLPB00900_Cassette발행.xrw
  4. * 설 명 : Cassette발행 화면
  5. * 설 계 자 : (주)에이씨케이 - 유동철
  6. * 작 성 자 : (주)에이씨케이 - 유동철
  7. * 작 성 일 : 2010.12.06
  8. * 수정이력 :
  9. * 기 타 :
  10. -->
  11. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
  12. <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2002/01/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
  13. <xhtml:head>
  14. <xhtml:title>Cassette발행</xhtml:title>
  15. <model id="model1">
  16. <instance id="instance1">
  17. <root xmlns="">
  18. <main>
  19. <acptptno>
  20. <acptptnolist>
  21. <choi/>
  22. <instcd/>
  23. <ptno/>
  24. <dispptno/>
  25. <acptdd/>
  26. <acptno/>
  27. <spcacptdd/>
  28. <spcacptno/>
  29. <spcacptseqno/>
  30. <spccd/>
  31. <spcnm/>
  32. <from11/>
  33. <from12/>
  34. <fixchar/>
  35. <from21/>
  36. <from22/>
  37. <hopper/>
  38. <spchistno/>
  39. <maxcsteno/>
  40. <curcsteno/>
  41. </acptptnolist>
  42. </acptptno>
  43. <isscste>
  44. <isscstelist>
  45. <choi/>
  46. <instcd/>
  47. <ptno/>
  48. <dispptno/>
  49. <spcacptdd/>
  50. <spcacptno/>
  51. <spcacptseqno/>
  52. <csteno/>
  53. <cstekindcd/>
  54. <cstecnts/>
  55. <tisscnt/>
  56. <hoppno/>
  57. <maxcsteno/>
  58. <bizflagcd/>
  59. <scrno/>
  60. <acptdd/>
  61. <acptno/>
  62. <testcd/>
  63. <acptitemno/>
  64. <slidno/>
  65. <spccd/>
  66. <spchistno/>
  67. <statsinclflagcd/>
  68. </isscstelist>
  69. </isscste>
  70. <cstestats>
  71. <cstestatslist>
  72. <instcd/>
  73. <cstekind/>
  74. <cstecnt/>
  75. <slidcnt/>
  76. </cstestatslist>
  77. </cstestats>
  78. <eqinfo>
  79. <caeqlist>
  80. <eqnm/>
  81. <eqip/>
  82. <eqport/>
  83. <eqflag/>
  84. <eqseqno/>
  85. <resncd/>
  86. <baseflagcd/>
  87. </caeqlist>
  88. <slideqlist>
  89. <eqnm/>
  90. <eqip/>
  91. <eqport/>
  92. <eqflag/>
  93. <eqseqno/>
  94. <resncd/>
  95. <baseflagcd/>
  96. </slideqlist>
  97. </eqinfo>
  98. <slideinfo>
  99. <slidelist>
  100. <instcd/>
  101. <ptno/>
  102. <spcacptdd/>
  103. <spcacptno/>
  104. <spcacptseqno/>
  105. <csteno/>
  106. <bloccnts/>
  107. <prntcsscnts/>
  108. <slidno/>
  109. <cstekindcd/>
  110. <cstecnts/>
  111. <workattr/>
  112. <prntcsscnts/>
  113. <cstecnts/>
  114. <ipttype/>
  115. <maxcsteno/>
  116. <bizflagcd/>
  117. <acptdd/>
  118. <acptno/>
  119. <testcd/>
  120. <acptitemno/>
  121. <scrno/>
  122. <spccd/>
  123. <spchistno/>
  124. <statsinclflagcd/>
  125. <relaptno/>
  126. <bloccnts/>
  127. <reladispptno/>
  128. <workflagcd/>
  129. <dispptno/>
  130. <prtnblocnm/>
  131. </slidelist>
  132. </slideinfo>
  133. </main>
  134. <send>
  135. <slideflag/>
  136. </send>
  137. <init>
  138. <ptnocode/>
  139. <fromyear/>
  140. <fromptno/>
  141. <toyear/>
  142. <toptno/>
  143. <acptfromdd/>
  144. <acpttodd/>
  145. <seameth/>
  146. <seaval/>
  147. <ptnofrom/>
  148. <ptnoto/>
  149. <sysdt>
  150. <sysdtinfo>
  151. <sysdd/>
  152. <systm/>
  153. </sysdtinfo>
  154. </sysdt>
  155. <userinfo>
  156. <userinfolist>
  157. <userid/>
  158. <usernm/>
  159. <jobkindcd/>
  160. </userinfolist>
  161. </userinfo>
  162. <hospenv>
  163. <hospenvinfo>
  164. <instcd/>
  165. <lendrtnterm/>
  166. <recvqualmthdcd/>
  167. <plgydeptcd/>
  168. <plgyteamcd/>
  169. <doctjobgradcd/>
  170. <teamjobgradcd/>
  171. <csteeqmtip/>
  172. <csteeqmtport/>
  173. <slideqmtip/>
  174. <slideqmtport/>
  175. </hospenvinfo>
  176. </hospenv>
  177. <resncd>
  178. <resncdlist>
  179. <instcd/>
  180. <baseflagcd/>
  181. <resncd/>
  182. <resncnts/>
  183. </resncdlist>
  184. </resncd>
  185. <ptnocd>
  186. <ptnocdlist>
  187. <instcd/>
  188. <ptnocd/>
  189. <ptnonm/>
  190. </ptnocdlist>
  191. </ptnocd>
  192. <cstechar>
  193. <cstecharlist>
  194. <no>1</no>
  195. <cnts>C</cnts>
  196. </cstecharlist>
  197. </cstechar>
  198. <cstecharno>
  199. <cstecharnolist>
  200. <no>1</no>
  201. <cnts>이중번호</cnts>
  202. </cstecharnolist>
  203. </cstecharno>
  204. <choicstechar/>
  205. <choicstekindcd/>
  206. <choichopperval/>
  207. <eqseqno/>
  208. <slideflag/>
  209. <slideeqseqno/>
  210. <ptno/>
  211. </init>
  212. <hidden>
  213. <userdeptcd/>
  214. </hidden>
  215. </root>
  216. </instance>
  217. <script type="javascript" ev:event="xforms-ready">
  218. <![CDATA[
  219. fExeInitialize();
  220. ]]>
  221. </script>
  222. <submission id="TRLPZ00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/init/hospenv/hospenvinfo"/>
  223. <submission id="TRLPZ00102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/init/sysdt/sysdtinfo"/>
  224. <submission id="TRLPZ00103" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/init/resncd/resncdlist"/>
  225. <submission id="TRLPZ00105" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/init/userinfo/userinfolist"/>
  226. <submission id="TRLPB00901" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/acptptno/acptptnolist"/>
  227. <submission id="TRLPB00202" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/cstestats/cstestatslist"/>
  228. <submission id="TXLPB00201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/slideinfo/slidelist"/>
  229. <submission id="TRLPZ00109" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/init/ptnocd/ptnocdlist"/>
  230. <submission id="TRLPC01802" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/eqinfo"/>
  231. </model>
  232. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  233. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  234. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  235. <script type="javascript" src="../../../com/commonweb/js/numericHelper.js"/>
  236. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  237. <script type="javascript" src="../../../lis/commonweb/js/LPZ001.js"/>
  238. <script type="javascript">
  239. <![CDATA[
  240. //---------------
  241. // Socket연결상태
  242. var isConnected = false;
  243. //카세트, 슬라이드 출력 여부
  244. var sCasteSlideflag = "C";
  245. //장비 인터페이스출력완료 여부 표시
  246. var sEqFinish = "N";
  247. var interval_id = "";
  248. var bParentWindow = false;
  249. /* @group : Cassette발행
  250. * @ver : 2010.12.07 (CMCDEV-0001)
  251. * @by : 유동철(ACK)
  252. * @-----------------------------------
  253. * @type : function
  254. * @access : public
  255. * @desc : 초기화 Function
  256. */
  257. function fExeInitialize() {
  258. var iMaxNo = 0;
  259. var sCurDate = "";
  260. //---------------------
  261. // Instance Node 초기화
  262. model.removeNodeset("/root/main/acptptno/acptptnolist"); // 병리번호리스트 초기화
  263. model.removeNodeset("/root/main/isscste/isscstelist"); // 발행 및 삭제Cassette리스트 초기화
  264. model.removeNodeset("/root/init/ptnocd/ptnocdlist");
  265. //--------------------------------
  266. model.removeNodeset("/root/send");
  267. model.makeValue("/root/send/instcd", getUserInfo("dutplceinstcd"));
  268. submit("TRLPZ00101", false);
  269. submit("TRLPZ00109", false);
  270. //---------------------------------------------------------
  271. // 병원환경정보를 취득하여 병리과와 병리팀 코드를 편집한다.
  272. lpzfUserDeptCd("/root/init/hospenv/hospenvinfo", "/root/hidden");
  273. //-------------------------------------------------------------------------------------
  274. model.makeValue("/root/send/userdeptcd", model.getValue("/root/hidden/userdeptcd"));
  275. model.makeValue("/root/send/doctjobgradcd", model.getValue("/root/init/hospenv/hospenvinfo/doctjobgradcd"));
  276. model.makeValue("/root/send/teamjobgradcd", model.getValue("/root/init/hospenv/hospenvinfo/teamjobgradcd"));
  277. submit("TRLPZ00105", false);
  278. //------------------------------------------
  279. // Cassette(블록) 및 Slide(슬라이드) 목록 조회
  280. model.makeValue("/root/send/baseflagcd", "'81'");
  281. submit("TRLPZ00103");
  282. model.removeNodeset("/root/init/resncd/resncdlist[resncd='ZZZZ']");
  283. //------------------
  284. // Cassette내용 분리
  285. lpzfExeCsteCntsSplit("/root/init/resncd/resncdlist");
  286. iMaxNo = getNodesetCount("/root/init/cstechar/cstecharlist");
  287. model.makeValue("/root/init/cstechar/cstecharlist["+(Number(iMaxNo)+1)+"]/no", "Z");
  288. model.makeValue("/root/init/cstechar/cstecharlist["+(Number(iMaxNo)+1)+"]/cnts", "");
  289. //블록 장비 조회
  290. model.makeValue("/root/send/instcd", getUserInfo("dutplceinstcd")); //instcd
  291. model.makeValue("/root/send/seaflagcd", "0"); //"0:전체, 1:카세트, 2:슬라이드"
  292. submit("TRLPC01802");
  293. cmb_slideqlist.select(0);
  294. cmb_slid.select(0);
  295. //---------------------
  296. // 시스템 현재일시를 조회
  297. fExeSysDtSet();
  298. //------------------------------------------------------------
  299. sCurDate = model.getValue("/root/init/sysdt/sysdtinfo/sysdd");
  300. model.makeValue("/root/init/ptnocode", "");
  301. model.makeValue("/root/init/fromyear", sCurDate.substr(2,2));
  302. model.makeValue("/root/init/toyear", sCurDate.substr(2,2));
  303. model.makeValue("/root/init/fromptno", "");
  304. model.makeValue("/root/init/toptno", "");
  305. //----------------------------------------
  306. model.setValue("/root/init/seameth", "1"); // 검색방법 초기화(0:병리번호, 1:등록번호)
  307. model.setValue("/root/init/seaval", ""); // 검색값 초기화
  308. model.setValue("/root/init/ptnocode", "-");
  309. cbo_ptnocd.visible = true;
  310. //-----------------------------------------
  311. grd_ptnolist.fixedcellcheckbox(0,0) = true;
  312. //-------------
  313. model.refresh();
  314. //---------------------------------------------
  315. // 일반검사결과등록 화면에서 호출했을 경우 처리
  316. // 2010-11-13 : YDC
  317. if (window.parent == null) {
  318. // Continue
  319. } else {
  320. if ( opener.javascript.getParameter("SMLPB00900_ptno") != "") {
  321. //--------------------
  322. bParentWindow = true;
  323. //------------------------------------------------------------
  324. var sPtNo = opener.javascript.getParameter("SMLPB00900_ptno");
  325. model.makeValue("/root/init/acptfromdd", opener.javascript.getParameter("SMLPB00900_acptdd"));
  326. model.makeValue("/root/init/acpttodd", opener.javascript.getParameter("SMLPB00900_acptdd"));
  327. model.makeValue("/root/init/pid", opener.javascript.getParameter("SMLPB00900_pid"));
  328. model.makeValue("/root/init/ptnocode", sPtNo.substr(0, sPtNo.length-8) );
  329. model.makeValue("/root/init/fromyear", sPtNo.substr(sPtNo.length-8, 2) );
  330. model.makeValue("/root/init/fromptno", sPtNo.substr(sPtNo.length-6, 6) );
  331. model.makeValue("/root/init/toyear", sPtNo.substr(sPtNo.length-8, 2) );
  332. model.makeValue("/root/init/toptno", sPtNo.substr(sPtNo.length-6, 6) );
  333. //----------------
  334. fGetAcptSpcList();
  335. }
  336. }
  337. }
  338. function fGetAcptList() {
  339. if (window.parent == null) {
  340. // Continue
  341. } else {
  342. if ( opener.javascript.getParameter("SMLPB00900_ptno") != "") {
  343. //--------------------
  344. bParentWindow = true;
  345. //------------------------------------------------------------
  346. var sPtNo = opener.javascript.getParameter("SMLPB00900_ptno");
  347. model.makeValue("/root/init/acptfromdd", opener.javascript.getParameter("SMLPB00900_acptdd"));
  348. model.makeValue("/root/init/acpttodd", opener.javascript.getParameter("SMLPB00900_acptdd"));
  349. model.makeValue("/root/init/pid", opener.javascript.getParameter("SMLPB00900_pid"));
  350. model.makeValue("/root/init/ptnocode", sPtNo.substr(0, sPtNo.length-8) );
  351. model.makeValue("/root/init/fromyear", sPtNo.substr(sPtNo.length-8, 2) );
  352. model.makeValue("/root/init/fromptno", sPtNo.substr(sPtNo.length-6, 6) );
  353. model.makeValue("/root/init/toyear", sPtNo.substr(sPtNo.length-8, 2) );
  354. model.makeValue("/root/init/toptno", sPtNo.substr(sPtNo.length-6, 6) );
  355. model.makeValue("/root/init/ptno", sPtNo);
  356. //----------------
  357. fGetAcptSpcList();
  358. }
  359. }
  360. }
  361. /* @group : Cassette발행
  362. * @ver : 2010.12.07 (CMCDEV-0001)
  363. * @by : 유동철(ACK)
  364. * @-----------------------------------
  365. * @type : function
  366. * @access : public
  367. * @desc : 시스템일시 설정 처리 Function
  368. */
  369. function fExeSysDtSet() {
  370. //-------------------
  371. submit("TRLPZ00102"); // 시스템 현재일시를 조회
  372. model.makeValue("/root/init/acptfromdd", model.getValue("/root/init/sysdt/sysdtinfo/sysdd"));
  373. model.makeValue("/root/init/acpttodd", model.getValue("/root/init/sysdt/sysdtinfo/sysdd"));
  374. }
  375. /* @group : Cassette발행
  376. * @ver : 2010.12.07 (CMCDEV-0001)
  377. * @by : 유동철(ACK)
  378. * @-----------------------------------
  379. * @type : function
  380. * @access : public
  381. * @desc : 접수검체 목록 조회 처리 Function
  382. */
  383. function fGetAcptSpcList() {
  384. var sTemp = "";
  385. var sSysDD = model.getValue("/root/init/sysdt/sysdtinfo/sysdd");
  386. var sFromDD = model.getValue("/root/init/acptfromdd");
  387. var sToDD = model.getValue("/root/init/acpttodd");
  388. //--------------------------------
  389. model.removeNodeset("/root/send");
  390. model.removeNodeset("/root/main/acptptno/acptptnolist");
  391. //------------------------------------------------
  392. if (model.getValue("/root/init/ptnocode") != "") {
  393. //------------------------------------------------
  394. if (model.getValue("/root/init/fromyear") == "") {
  395. model.makeValue("/root/init/fromyear", sFromDD.substr(2,2));
  396. } else {
  397. sTemp = model.getValue("/root/init/fromyear");
  398. model.makeValue("/root/init/fromyear", sTemp.getLeftPad(2, "0"));
  399. }
  400. //----------------------------------------------
  401. if (model.getValue("/root/init/toyear") == "") {
  402. model.makeValue("/root/init/toyear", sToDD.substr(2,2));
  403. } else {
  404. sTemp = model.getValue("/root/init/toyear");
  405. model.makeValue("/root/init/toyear", sTemp.getLeftPad(2, "0"));
  406. }
  407. //------------------------------------------------
  408. if (model.getValue("/root/init/fromptno") == "") {
  409. model.makeValue("/root/init/fromptno", "000000");
  410. } else {
  411. sTemp = model.getValue("/root/init/fromptno");
  412. model.makeValue("/root/init/fromptno", sTemp.getLeftPad(6, "0"));
  413. }
  414. //----------------------------------------------
  415. if (model.getValue("/root/init/toptno") == "") {
  416. model.makeValue("/root/init/toptno", "999999");
  417. } else {
  418. sTemp = model.getValue("/root/init/toptno");
  419. model.makeValue("/root/init/toptno", sTemp.getLeftPad(6, "0"));
  420. }
  421. }
  422. //--------------------------------------------
  423. sTemp = model.getValue("/root/init/ptnocode");
  424. //---------------------------------------------------------------------
  425. model.makeValue("/root/send/instcd", getUserInfo("dutplceinstcd"));
  426. model.makeValue("/root/send/acptfromdd", model.getValue("/root/init/acptfromdd"));
  427. model.makeValue("/root/send/acpttodd", model.getValue("/root/init/acpttodd"));
  428. model.makeValue("/root/send/seamthd", model.getValue("/root/init/seameth"));
  429. model.makeValue("/root/send/seaval", model.getValue("/root/init/seaval"));
  430. model.makeValue("/root/send/ptnocode", sTemp.replace("-", ""));
  431. model.makeValue("/root/send/fromyear", model.getValue("/root/init/fromyear"));
  432. model.makeValue("/root/send/fromptno", model.getValue("/root/init/fromptno"));
  433. model.makeValue("/root/send/toyear", model.getValue("/root/init/toyear"));
  434. model.makeValue("/root/send/toptno", model.getValue("/root/init/toptno"));
  435. model.makeValue("/root/send/ptno", model.getValue("/root/init/ptno"));
  436. //---------------------------
  437. submit("TRLPB00901", false);
  438. //-------------------
  439. if (bParentWindow) {
  440. var sNode = "/root/main/acptptno/acptptnolist";
  441. //-----------------------------------------------------------------
  442. for (var iRowNo = 1; iRowNo <= getNodesetCount(sNode); iRowNo++) {
  443. model.makeValue(sNode+"["+iRowNo+"]/choi", "true");
  444. model.makeValue(sNode+"["+iRowNo+"]/cstekindcd", "9999");
  445. }
  446. }
  447. //--------------
  448. model.refresh();
  449. }
  450. /* @group : Cassette발행
  451. * @ver : 2010.12.07 (CMCDEV-0001)
  452. * @by : 유동철(ACK)
  453. * @-----------------------------------
  454. * @type : function
  455. * @access : public
  456. * @desc : 블럭 생성정보 계산 처리 Function
  457. */
  458. function fExeCalcCste(pFixChar, pFrom, pTo, pRowNo) {
  459. var iCsteNo = 0;
  460. var iFrom = 0;
  461. var iTo = 0;
  462. var iStartNo = 0;
  463. var iMaxCsteNo = 0;
  464. var bCharState = false;
  465. //-------------------------------------------------
  466. var sSrcNode = "/root/main/acptptno/acptptnolist";
  467. var sDescNode = "/root/main/isscste/isscstelist";
  468. //-----------------------------------------------------------------
  469. if ( pFrom.getTrim() == "" && pTo.getTrim() == "" ) return false;
  470. //--------------------------
  471. pFrom = pFrom.toUpperCase();
  472. pTo = pTo.toUpperCase();
  473. //---------------------------
  474. if (pFrom.getTrim() == "") {
  475. //---------------------
  476. if (pTo.isNumber()) {
  477. iFrom = 1;
  478. iStartNo = 1;
  479. } else {
  480. iFrom = 1;
  481. iStartNo = 65; // A로 고정
  482. bCharState = true;
  483. }
  484. } else if (pFrom.isNumber()) {
  485. iFrom = Number(pFrom);
  486. iStartNo = iFrom;
  487. } else {
  488. iFrom = Number(pFrom.charCodeAt(0)) - 64;
  489. iStartNo = Number(pFrom.charCodeAt(0));
  490. bCharState = true;
  491. }
  492. //------------------------
  493. if (pTo.getTrim() == "") {
  494. iTo = 0;
  495. } else if (pTo.isNumber()) {
  496. iTo = Number(pTo);
  497. } else {
  498. iTo = Number(pTo.charCodeAt(0)) - 64;
  499. }
  500. //--------------------------
  501. iCsteNo = (iTo - iFrom) + 1;
  502. //--------------------------------------------------
  503. for (var iRowNo = 0; iRowNo < iCsteNo; iRowNo++) {
  504. //-----------------------
  505. grd_isscstelist.addRow();
  506. iCurCnt = getNodesetCount(sDescNode);
  507. //-------------------------------------------------------------------------
  508. iMaxCsteNo = Number(model.getValue(sSrcNode+"[" + pRowNo + "]/curcsteno"));
  509. //---------------------------------------------------------------------
  510. model.makeValue(sDescNode+"[" + iCurCnt + "]/choi", "true");
  511. model.makeValue(sDescNode+"[" + iCurCnt + "]/instcd", model.getValue(sSrcNode+"[" + pRowNo + "]/instcd"));
  512. model.makeValue(sDescNode+"[" + iCurCnt + "]/ptno", model.getValue(sSrcNode+"[" + pRowNo + "]/ptno"));
  513. model.makeValue(sDescNode+"[" + iCurCnt + "]/dispptno", model.getValue(sSrcNode+"[" + pRowNo + "]/dispptno"));
  514. model.makeValue(sDescNode+"[" + iCurCnt + "]/spcacptdd", model.getValue(sSrcNode+"[" + pRowNo + "]/spcacptdd"));
  515. model.makeValue(sDescNode+"[" + iCurCnt + "]/spcacptno", model.getValue(sSrcNode+"[" + pRowNo + "]/spcacptno"));
  516. model.makeValue(sDescNode+"[" + iCurCnt + "]/spcacptseqno", model.getValue(sSrcNode+"[" + pRowNo + "]/spcacptseqno"));
  517. if ( bCharState ) {
  518. model.makeValue(sDescNode+"[" + iCurCnt + "]/cstecnts", pFixChar + String.fromCharCode(iStartNo + iRowNo) );
  519. } else {
  520. model.makeValue(sDescNode+"[" + iCurCnt + "]/cstecnts", pFixChar + (iStartNo + iRowNo).toString() );
  521. }
  522. model.makeValue(sSrcNode+"[" + pRowNo + "]/curcsteno", (iMaxCsteNo + 1).toString().getLeftPad(3, "0") );
  523. model.makeValue(sDescNode+"[" + iCurCnt + "]/csteno", (iMaxCsteNo + 1).toString().getLeftPad(3, "0") );
  524. model.makeValue(sDescNode+"[" + iCurCnt + "]/cstekindcd", "1001");
  525. model.makeValue(sDescNode+"[" + iCurCnt + "]/tisscnt", "1");
  526. model.makeValue(sDescNode+"[" + iCurCnt + "]/hoppno", model.getValue(sSrcNode+"[" + pRowNo + "]/hopper"));
  527. model.makeValue(sDescNode+"[" + iCurCnt + "]/maxcsteno", model.getValue(sSrcNode+"[" + pRowNo + "]/maxcsteno"));
  528. model.makeValue(sDescNode+"[" + iCurCnt + "]/scrno", "10");
  529. model.makeValue(sDescNode+"[" + iCurCnt + "]/acptdd", model.getValue(sSrcNode+"[" + pRowNo + "]/acptdd"));
  530. model.makeValue(sDescNode+"[" + iCurCnt + "]/acptno", model.getValue(sSrcNode+"[" + pRowNo + "]/acptno"));
  531. model.makeValue(sDescNode+"[" + iCurCnt + "]/testcd", "-");
  532. model.makeValue(sDescNode+"[" + iCurCnt + "]/acptitemno", "0");
  533. model.makeValue(sDescNode+"[" + iCurCnt + "]/slidno", "000");
  534. model.makeValue(sDescNode+"[" + iCurCnt + "]/spccd", model.getValue(sSrcNode+"[" + pRowNo + "]/spccd"));
  535. model.makeValue(sDescNode+"[" + iCurCnt + "]/spchistno", model.getValue(sSrcNode+"[" + pRowNo + "]/spchistno"));
  536. model.makeValue(sDescNode+"[" + iCurCnt + "]/statsinclflagcd", "0");
  537. }
  538. }
  539. /* @group : Cassette발행
  540. * @ver : 2010.12.07 (CMCDEV-0001)
  541. * @by : 유동철(ACK)
  542. * @-----------------------------------
  543. * @type : function
  544. * @access : public
  545. * @desc : 블럭 생성정보 전달 처리 Function
  546. */
  547. function fExeInfoSend() {
  548. var sFixChar = "";
  549. var sTemp1 = "";
  550. var sTemp2 = "";
  551. //-------------------------------------------------
  552. var sSrcNode = "/root/main/acptptno/acptptnolist";
  553. var sDescNode = "/root/main/isscste/isscstelist";
  554. //------------------------------------------------------------------
  555. for (var iRowNo=1; iRowNo <= getNodesetCount(sSrcNode); iRowNo++) {
  556. //-------------------------------------------------------------
  557. if (model.getValue(sSrcNode+"["+iRowNo+"]/choi") == "true") {
  558. //---------------------------------------------------------
  559. sFixChar = model.getValue(sSrcNode+"["+iRowNo+"]/fixchar");
  560. sFixChar = sFixChar.getTrim().toUpperCase();
  561. //------------------------------------------------------
  562. sTemp1 = model.getValue(sSrcNode+"["+iRowNo+"]/from11"); // Case1 처리
  563. sTemp2 = model.getValue(sSrcNode+"["+iRowNo+"]/from12");
  564. //---------------------------------------
  565. fExeCalcCste("", sTemp1, sTemp2, iRowNo);
  566. //------------------------------------------------------
  567. sTemp1 = model.getValue(sSrcNode+"["+iRowNo+"]/from21"); // Case2 처리
  568. sTemp2 = model.getValue(sSrcNode+"["+iRowNo+"]/from22");
  569. //---------------------------------------------
  570. fExeCalcCste(sFixChar, sTemp1, sTemp2, iRowNo);
  571. }
  572. }
  573. //--------------
  574. model.refresh();
  575. }
  576. /* @group : Cassette발행
  577. * @ver : 2010.12.07 (CMCDEV-0001)
  578. * @by : 유동철(ACK)
  579. * @-----------------------------------
  580. * @type : function
  581. * @access : public
  582. * @desc : 발행 Cassette목록을 장비로 전송 Function
  583. */
  584. function fExeSocketSend() {
  585. var sSendMsg = "";
  586. //-----------------------------------------------
  587. var sInfoNode = "/root/init/hospenv/hospenvinfo";
  588. var sCsteNode = "/root/main/isscste/isscstelist";
  589. //var sCsteIP = model.getValue(sInfoNode+"/csteeqmtip");
  590. //var sCstePort = model.getValue(sInfoNode+"/csteeqmtport");
  591. var sCsteIP = "";
  592. var sCstePort = "";
  593. //장비IP set
  594. if(sCasteSlideflag == "C") { //카세트
  595. for(var iRowNo = 1 ; iRowNo <= getNodesetCount("/root/main/eqinfo/caeqlist") ; iRowNo++){
  596. if(model.getValue("/root/init/eqseqno") == model.getValue("/root/main/eqinfo/caeqlist["+ iRowNo +"]/eqseqno")) {
  597. sCsteIP = model.getValue("/root/main/eqinfo/caeqlist["+ iRowNo +"]/eqip");
  598. sCstePort = model.getValue("/root/main/eqinfo/caeqlist["+ iRowNo +"]/eqport");
  599. }
  600. }
  601. } else { //슬라이드
  602. for(var iRowNo = 1 ; iRowNo <= getNodesetCount("/root/main/eqinfo/slideqlist") ; iRowNo++){
  603. if(model.getValue("/root/init/slideeqseqno") == model.getValue("/root/main/eqinfo/slideqlist["+ iRowNo +"]/eqseqno")) {
  604. sCsteIP = model.getValue("/root/main/eqinfo/slideqlist["+ iRowNo +"]/eqip");
  605. sCstePort = model.getValue("/root/main/eqinfo/slideqlist["+ iRowNo +"]/eqport");
  606. }
  607. }
  608. }
  609. //---------------------------
  610. // 칠곡경북대에만 장비가 존재
  611. if ( getUserInfo("dutplceinstcd") == "032" ) {
  612. //------------------------------------
  613. if (sCsteIP == "" || sCsteIP == "-") {
  614. messageBox("Cassette(블럭)장비의 IP주소가 없습니다. 병원별 환경설정에서 ", "C001");
  615. return false;
  616. }
  617. //----------------------------------------
  618. if (sCstePort == "" || sCstePort == "-") {
  619. messageBox("Cassette(블럭)장비의 Port번호가 없습니다. 병원별 환경설정에서 ", "C001");
  620. return false;
  621. }
  622. //---------------------------------
  623. socket.connect(sCsteIP, sCstePort);
  624. }
  625. }
  626. /* @group : Cassette발행
  627. * @ver : 2010.12.07 (CMCDEV-0001)
  628. * @by : 유동철(ACK)
  629. * @-----------------------------------
  630. * @type : function
  631. * @access : public
  632. * @desc :검색방법 선택 처리 Function
  633. */
  634. function fExeRefMthdChange() {
  635. switch (model.getValue("/root/init/seameth")) {
  636. case "0" : model.toggle("caseptno");
  637. cbo_ptnocd.visible = true;
  638. break;
  639. case "1" : model.toggle("casepid");
  640. cbo_ptnocd.visible = false;
  641. break;
  642. }
  643. }
  644. /* @group : Cassette발행
  645. * @ver : 2008.01.03 (CMCDEV-0001)
  646. * @by : 유동철(ACK)
  647. * @-----------------------------------
  648. * @type : function
  649. * @access : public
  650. * @desc : Cassette 변경 처리 Function
  651. */
  652. function fExeCsteChange() {
  653. var iNo = grd_ptnolist.row;
  654. var sCsteCnts = "";
  655. var sResnCnts = "";
  656. var sCsteChar = "";
  657. var sCsteCharNo = "";
  658. var sNode = "/root/main/acptptno/acptptnolist";
  659. var sCharList = "/root/init/cstechar/cstecharlist";
  660. var sNoList = "/root/init/cstecharno/cstecharnolist";
  661. var re = /([!-~]*)*/g;
  662. var matchMatrix = "";
  663. var bState = false;
  664. //-------------------------
  665. switch (grd_ptnolist.col) {
  666. case grd_ptnolist.colRef("cstecharinpt") :
  667. case grd_ptnolist.colRef("cstecharchoi") :
  668. sCsteChar = model.getValue(sCharList+"[no='"+model.getValue(sNode+"["+iNo+"]/cstecharchoi")+"']/cnts");
  669. sCsteCharNo = model.getValue(sNoList+"[no='"+model.getValue(sNode+"["+iNo+"]/cstecharno")+"']/cnts");
  670. //----------------------------------
  671. matchMatrix = sCsteCharNo.match(re);
  672. //-------------
  673. bState = false;
  674. for(j = 0; j < (matchMatrix.length-1); j++) {
  675. tmpStr = matchMatrix[j] + "";
  676. tmpLen = tmpStr.length;
  677. //---------------------------
  678. if (tmpStr.getTrim() == "") {
  679. bState = true;
  680. break;
  681. }
  682. }
  683. //----------------------------------------------------------
  684. if (model.getValue(sNode+"["+iNo+"]/cstecharchoi") == "Z") {
  685. if (model.getValue(sNode+"["+iNo+"]/cstecharno") == "-") {
  686. model.setValue(sNode+"["+iNo+"]/cstekindcd", "-"); // 수정 2008.08.26
  687. return false;
  688. } else {
  689. sCsteCnts = sCsteCharNo;
  690. }
  691. } else {
  692. if (bState) {
  693. sCsteCnts = sCsteCharNo;
  694. } else {
  695. sCsteCnts = sCsteChar + "." + sCsteCharNo;
  696. }
  697. }
  698. //--------------------------------------------------------------------------------------
  699. for (var iRowNo=1; iRowNo < getNodesetCount("/root/init/resncd/resncdlist"); iRowNo++) {
  700. sResnCnts = model.getValue("/root/init/resncd/resncdlist["+iRowNo+"]/resncnts");
  701. sResnCnts = sResnCnts.getTrim().replace("\n", "");
  702. if (sCsteCnts == sResnCnts) {
  703. model.setValue(sNode+"["+iNo+"]/cstekindcd", model.getValue("/root/init/resncd/resncdlist["+iRowNo+"]/resncd"));
  704. break;
  705. }
  706. //-------- 수정 2008.08.26 ---------------
  707. //root/init/resncd/resncdlist에 일치하는 경우가 없는 경우 sNode+"["+iNo+"]/cstekindcd 초기값 set
  708. if((iRowNo+1) == getNodesetCount("/root/init/resncd/resncdlist")) {
  709. model.setValue(sNode+"["+iNo+"]/cstekindcd", "-");
  710. }
  711. //-----------------------------------------
  712. }
  713. break;
  714. }
  715. }
  716. /* @group : Cassette발행
  717. * @ver : 2008.01.11 (CMCDEV-0001)
  718. * @by : 유동철(ACK)
  719. * @-----------------------------------
  720. * @type : function
  721. * @access : public
  722. * @desc : 등록번호 입력 처리 Function
  723. */
  724. function fExeRefValKeyPress() {
  725. //-----------------------
  726. if(event.keyCode == 13) {
  727. model.makeValue("/root/init/refval", ipt_seaval.currentText);
  728. ipt_seaval.refresh();
  729. //----------------
  730. fGetAcptSpcList();
  731. }
  732. }
  733. /* @group : Cassette발행
  734. * @ver : 2008.10.22 (CMCDEV-0001)
  735. * @by : 하만석(ACK)
  736. * @-----------------------------------
  737. * @type : function
  738. * @access : public
  739. * @desc : Hopper 변경 일괄 처리 Function
  740. */
  741. function fExeHopperKind() {
  742. var sNode = "/root/main/acptptno/acptptnolist"; // datagrid 설정
  743. //-----------------------------------------------------
  744. for (var iNo=1; iNo <= getNodesetCount(sNode); iNo++) {
  745. if (model.getValue(sNode+"["+iNo+"]/choi") == "true") { // grid 에서 선택된 항목만 hopper 값 변경
  746. model.setValue(sNode+"["+iNo+"]/hoppno", model.getValue("/root/init/choichopperval"));
  747. }
  748. }
  749. //---------------------
  750. grd_ptnolist.refresh();
  751. }
  752. function fExeCsteCharChoi() {
  753. var sNode = "/root/main/acptptno/acptptnolist";
  754. //-----------------------------------------------------
  755. for (var iNo=1; iNo <= getNodesetCount(sNode); iNo++) {
  756. if (model.getValue(sNode+"["+iNo+"]/choi") == "true") {
  757. model.setValue(sNode+"["+iNo+"]/cstecharchoi", model.getValue("/root/init/choicstechar"));
  758. }
  759. }
  760. //---------------------
  761. grd_ptnolist.refresh();
  762. }
  763. function fExeCsteCharKind() {
  764. var sNode = "/root/main/acptptno/acptptnolist";
  765. //-----------------------------------------------------
  766. for (var iNo=1; iNo <= getNodesetCount(sNode); iNo++) {
  767. if (model.getValue(sNode+"["+iNo+"]/choi") == "true") {
  768. model.setValue(sNode+"["+iNo+"]/cstekindcd", model.getValue("/root/init/choicstekindcd"));
  769. }
  770. }
  771. //---------------------
  772. grd_ptnolist.refresh();
  773. }
  774. function fExeToPtNoKeyPress() {
  775. //-----------------------
  776. if(event.keyCode == 13) {
  777. model.makeValue("/root/init/toptno", ipt_toptno.currentText);
  778. ipt_toptno.refresh();
  779. //----------------
  780. fGetAcptSpcList();
  781. }
  782. }
  783. function fExeHeaderChoi(pBizFlagCd) {
  784. var sNode = "/root/main/acptptno/acptptnolist";
  785. //--------------
  786. // 전체선택 처리
  787. if (grd_ptnolist.row == 0 && grd_ptnolist.col == 0) {
  788. //-----------------------------------------------------
  789. for (var iNo=1; iNo <= getNodesetCount(sNode); iNo++) {
  790. if (pBizFlagCd == "S") {
  791. model.setValue(sNode+"["+iNo+"]/choi", "true");
  792. } else {
  793. model.setValue(sNode+"["+iNo+"]/choi", "false");
  794. }
  795. }
  796. }
  797. //---------------------
  798. grd_ptnolist.refresh();
  799. }
  800. function fPrtnSlide() {
  801. //카세트 출력이 완료 되었는지 확인 후 슬라이드 출력.
  802. if(sEqFinish == "Y") {
  803. sCasteSlideflag = "S";
  804. fExeSocketSend();
  805. sEqFinish = "N";
  806. window.clearinterval(interval_id);
  807. }
  808. }
  809. function fExeIssInitialize() {
  810. //-------------------------------------------------
  811. var sSrcNode = "/root/main/acptptno/acptptnolist";
  812. var sCsteNode = "/root/main/isscste/isscstelist";
  813. //-----------------------------
  814. model.removeNodeset(sCsteNode);
  815. //------------------------------------------------------------------
  816. for (var iRowNo=1; iRowNo <= getNodesetCount(sSrcNode); iRowNo++) {
  817. model.makeValue(sSrcNode+"["+iRowNo+"]/curcsteno", model.getValue(sSrcNode+"["+iRowNo+"]/maxcsteno"));
  818. }
  819. //--------------
  820. model.refresh();
  821. }
  822. /* @group : Cassette일괄출력
  823. * @ver : 2007.05.24 (CMCDEV-0001)
  824. * @by : 유동철(ACK)
  825. * @-----------------------------------
  826. * @type : function
  827. * @access : public
  828. * @desc : 블럭 생성정보 전달 처리 Function
  829. */
  830. function fExeCsteIssDel(pBizFlagCd) {
  831. //--------------------------------
  832. model.removeNodeset("/root/send");
  833. //--------------------------------
  834. //카세트 삭제
  835. if(pBizFlagCd == "DELETE") {
  836. // Continue
  837. } else {
  838. if(getNodesetCount("/root/main/isscste/isscstelist") < 1) {
  839. messageBox("Cassette 발행 목록을 입력", "I008");
  840. return;
  841. }
  842. //----------------------------
  843. grd_isscstelist.clearStatus();
  844. //----------------------------------------------------------------------------------------
  845. for (var iRowNo=1; iRowNo <= getNodesetCount("/root/main/isscste/isscstelist"); iRowNo++) {
  846. if (model.getValue("/root/main/isscste/isscstelist[" + iRowNo + "]/choi") == "true") {
  847. model.makeValue("/root/main/isscste/isscstelist[" + iRowNo + "]/bizflagcd", pBizFlagCd);
  848. model.makeValue("/root/main/isscste/isscstelist[" + iRowNo + "]/scrno", "10");
  849. model.makeValue("/root/main/isscste/isscstelist[" + iRowNo + "]/statsinclflagcd", "0");
  850. model.makeValue("/root/main/isscste/isscstelist[" + iRowNo + "]/slideflag", model.getValue("/root/init/slideflag")); //슬라이드 출력여부
  851. grd_isscstelist.addStatus(iRowNo, "insert");
  852. }
  853. }
  854. //-------------------------------------------------------------------------
  855. model.makeValue("/root/send/isscstelist", grd_isscstelist.getUpdateData());
  856. if (submit("TXLPB00201")) {
  857. //messageBox("Cassette(블럭) 발행이 ", "I002");
  858. //--------------------------------
  859. // Cassette Labeler 장비 Interface
  860. if (pBizFlagCd == "C") {
  861. sEqFinish = "N";
  862. sCasteSlideflag = "C";
  863. fExeSocketSend();
  864. //슬라이드도 동시에 출력
  865. if(model.getValue("/root/init/slideflag") == "Y") {
  866. interval_id = window.setinterval("fPrtnSlide()", 1000);
  867. }
  868. }
  869. //------------------------------------
  870. // Cassette(블럭) 생성 후 자료 초기화
  871. model.removeNodeset("/root/main/isscste/isscstelist");
  872. fGetAcptSpcList();
  873. }
  874. }
  875. }
  876. ]]>
  877. </script>
  878. </xhtml:head>
  879. <xhtml:body guideline="1,1195;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  880. <group id="grp_tle" style="left:0px; top:0px; width:1195px; height:13px; ">
  881. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:150px; height:14px; ">Cassette발행</caption>
  882. </group>
  883. <group id="grp_biz" scroll="auto" style="left:0px; top:40; width:1195px; height:744px; ">
  884. <group id="grp_sea" style="left:0px; top:10px; width:1194px; height:35px; vertical-align:top; ">
  885. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1194px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
  886. <caption id="caption2" class="search_name" style="left:797; top:9px; width:86px; height:17px; ">접수일자 :</caption>
  887. <caption id="caption5" class="search_no_b" style="left:983; top:10px; width:12px; height:17px; ">~</caption>
  888. <line id="line13" class="line_4" style="x1:1107px; y1:7px; x2:1107px; y2:29px; "/>
  889. <input id="ipt_acptddfrom" ref="/root/init/acptfromdd" class="input_s_essential" navindex="7" inputtype="date" format="yyyy-mm-dd" mask="exclude" showmask="true" style="left:886; top:8px; width:94px; height:19px; ">
  890. <script type="javascript" ev:event="xforms-value-changed">
  891. <![CDATA[
  892. lpzfExeDateChange(ipt_fromyear, "/root/init/acptfromdd", "/root/init/fromyear");
  893. ]]>
  894. </script>
  895. </input>
  896. <input id="ipt_acptddto" ref="/root/init/acpttodd" class="input_s_essential" navindex="8" inputtype="date" format="yyyy-mm-dd" mask="exclude" showmask="true" style="left:998; top:8px; width:94px; height:19px; ">
  897. <script type="javascript" ev:event="xforms-value-changed">
  898. <![CDATA[
  899. lpzfExeDateChange(ipt_toyear, "/root/init/acpttodd", "/root/init/toyear");
  900. ]]>
  901. </script>
  902. </input>
  903. <caption id="caption1" class="search_name" style="left:535px; top:9px; width:86px; height:17px; ">등록번호 :</caption>
  904. <button id="btn_sea" accesskey="f4" class="btn1_letter2" navindex="9" style="left:1123px; top:7px; width:56px; height:22px; ">
  905. <caption>조회</caption>
  906. <script type="javascript" ev:event="DOMActivate">
  907. <![CDATA[
  908. fGetAcptSpcList();
  909. ]]>
  910. </script>
  911. </button>
  912. <select1 id="cbo_ptnocd" ref="/root/init/ptnocode" navindex="1" appearance="minimal" editmode="search" style="left:109px; top:8px; width:151px; height:19px; ">
  913. <choices>
  914. <itemset nodeset="/root/init/ptnocd/ptnocdlist">
  915. <label ref="ptnonm"/>
  916. <value ref="ptnocd"/>
  917. </itemset>
  918. </choices>
  919. </select1>
  920. <input id="ipt_fromptno" ref="/root/init/fromptno" class="text_center" navindex="3" maxlength="6" style="left:293px; top:8px; width:50px; height:19px; "/>
  921. <caption id="caption9" class="search_name" style="left:15px; top:9px; width:90px; height:17px; ">병리번호 :</caption>
  922. <caption id="caption10" class="search_no_b" style="left:346px; top:8px; width:12px; height:17px; ">~</caption>
  923. <input id="ipt_fromyear" ref="/root/init/fromyear" class="text_center" navindex="2" maxlength="2" style="left:263px; top:8px; width:27px; height:19px; "/>
  924. <input id="ipt_seaval" ref="/root/init/seaval" class="input_search" navindex="6" style="left:624px; top:8px; width:93px; height:19px; ">
  925. <script type="javascript" ev:event="onkeypress">
  926. <![CDATA[
  927. fExeRefValKeyPress();
  928. ]]>
  929. </script>
  930. </input>
  931. <input id="ipt_toyear" ref="/root/init/toyear" class="text_center" navindex="4" maxlength="2" style="left:361px; top:8px; width:27px; height:19px; "/>
  932. <input id="ipt_toptno" ref="/root/init/toptno" class="text_center" navindex="5" maxlength="6" style="left:391px; top:8px; width:50px; height:19px; ">
  933. <script type="javascript" ev:event="onkeypress">
  934. <![CDATA[
  935. fExeToPtNoKeyPress();
  936. ]]>
  937. </script>
  938. </input>
  939. </group>
  940. <line id="line1" class="line_1" style="x1:0px; y1:69px; x2:715px; y2:69px; "/>
  941. <caption id="caption3" class="tit_2" style="left:5px; top:54px; width:139px; height:14px; ">병리번호 목록</caption>
  942. <datagrid id="grd_ptnolist" nodeset="/root/main/acptptno/acptptnolist" class="datagrid2" caption="선&#xA;택^기관코드^ptno^병리번호^acptdd^acptno^spcacptdd^spcacptno^검체번호^spccd^검체명^Case1^Case1^Case2^Case2^Case2^Hopper^spchistno^maxcsteno" colsep="^" colwidth="40, 0, 0, 90, 0, 0, 0, 0, 60, 0, 136, 60, 60, 60, 60, 60, 60, 0, 0" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheight="32" rowsep="|" selectionmode="free" navindex="10" style="left:0px; top:74px; width:715px; height:653; ">
  943. <col ref="choi" type="checkbox"/>
  944. <col ref="instcd"/>
  945. <col ref="ptno"/>
  946. <col ref="dispptno" style="text-align:center; "/>
  947. <col ref="acptdd"/>
  948. <col ref="acptno"/>
  949. <col ref="spcacptdd"/>
  950. <col ref="spcacptno"/>
  951. <col ref="spcacptseqno" style="text-align:center; "/>
  952. <col ref="spccd"/>
  953. <col ref="spcnm"/>
  954. <col ref="from11" type="input" style="text-align:center; "/>
  955. <col ref="from12" type="input" style="text-align:center; "/>
  956. <col ref="fixchar" type="input" style="text-align:center; "/>
  957. <col ref="from21" type="input" style="text-align:center; "/>
  958. <col ref="from22" type="input" style="text-align:center; "/>
  959. <col ref="hopper" type="combo">
  960. <choices>
  961. <item>
  962. <label>1</label>
  963. <value>1</value>
  964. </item>
  965. <item>
  966. <label>2</label>
  967. <value>2</value>
  968. </item>
  969. <item>
  970. <label>3</label>
  971. <value>3</value>
  972. </item>
  973. <item>
  974. <label>4</label>
  975. <value>4</value>
  976. </item>
  977. <item>
  978. <label>5</label>
  979. <value>5</value>
  980. </item>
  981. <item>
  982. <label>6</label>
  983. <value>6</value>
  984. </item>
  985. </choices>
  986. </col>
  987. <col ref="spchistno"/>
  988. <col ref="maxcsteno"/>
  989. <script type="javascript" ev:event="onaftersort">
  990. <![CDATA[
  991. grd_ptnolist.gridToInstance();
  992. ]]>
  993. </script>
  994. </datagrid>
  995. <caption id="caption7" class="tit_2" style="left:724px; top:54px; width:194px; height:14px; ">Cassette 발행 목록</caption>
  996. <line id="line2" class="line_1" style="x1:719px; y1:69px; x2:1194px; y2:69px; "/>
  997. <button id="btn_addcste" class="btn2_letter4" navindex="12" style="left:651px; top:49px; width:64px; height:19px; ">
  998. <caption>정보전달</caption>
  999. <script type="javascript" ev:event="DOMActivate">
  1000. <![CDATA[
  1001. fExeInfoSend();
  1002. ]]>
  1003. </script>
  1004. </button>
  1005. <datagrid id="grd_isscstelist" nodeset="/root/main/isscste/isscstelist" class="datagrid2" caption="선&#xA;택^기관코드^병리번호^병리번호^검체접수일자^검체접수번호'^검체&#xA;번호^블럭&#xA;번호^블럭&#xA;종류^Cassette내용^조직&#xA;갯수^Hopper^maxcsteno^bizflagcd^scrno^acptdd^acptno^testcd^acptitemno^slidno^spccd^spchistno^statsinclflagcd^slideflag" colsep="^" colwidth="30, 0, 0, 100, 0, 0, 0, 0, 0, 242, 0, 80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100" dataheight="23" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheight="32" rowsep="|" navindex="13" style="left:719px; top:74px; width:475px; height:653px; ">
  1006. <col ref="choi" type="checkbox"/>
  1007. <col ref="instcd"/>
  1008. <col ref="ptno"/>
  1009. <col class="text_center" ref="dispptno"/>
  1010. <col ref="spcacptdd"/>
  1011. <col ref="spcacptno"/>
  1012. <col class="text_center" ref="spcacptseqno"/>
  1013. <col class="text_center" ref="csteno"/>
  1014. <col ref="cstekindcd" type="combo">
  1015. <choices>
  1016. <itemset nodeset="/root/init/resncd/resncdlist">
  1017. <label ref="resncnts"/>
  1018. <value ref="resncd"/>
  1019. </itemset>
  1020. </choices>
  1021. </col>
  1022. <col ref="cstecnts" type="input"/>
  1023. <col class="text_center" ref="tisscnt" type="input"/>
  1024. <col ref="hoppno" type="combo">
  1025. <choices>
  1026. <item>
  1027. <label>1</label>
  1028. <value>1</value>
  1029. </item>
  1030. <item>
  1031. <label>2</label>
  1032. <value>2</value>
  1033. </item>
  1034. <item>
  1035. <label>3</label>
  1036. <value>3</value>
  1037. </item>
  1038. <item>
  1039. <label>4</label>
  1040. <value>4</value>
  1041. </item>
  1042. <item>
  1043. <label>5</label>
  1044. <value>5</value>
  1045. </item>
  1046. <item>
  1047. <label>6</label>
  1048. <value>6</value>
  1049. </item>
  1050. </choices>
  1051. </col>
  1052. <col ref="maxcsteno"/>
  1053. <col ref="bizflagcd"/>
  1054. <col ref="scrno"/>
  1055. <col ref="acptdd"/>
  1056. <col ref="acptno"/>
  1057. <col ref="testcd"/>
  1058. <col ref="acptitemno"/>
  1059. <col ref="slidno"/>
  1060. <col ref="spccd"/>
  1061. <col ref="spchistno"/>
  1062. <col ref="statsinclflagcd"/>
  1063. <col ref="slideflag" visibility="hidden"/>
  1064. <script type="javascript" ev:event="onaftersort">
  1065. <![CDATA[
  1066. grd_isscstelist.gridToInstance();
  1067. ]]>
  1068. </script>
  1069. <script type="javascript" ev:event="onkeyup">
  1070. <![CDATA[
  1071. //엔터 입력시 한줄아래 Cassette내용으로 포커스를 이동시켜준다.
  1072. if ( (grd_isscstelist.row >= grd_isscstelist.fixedRows) && (grd_isscstelist.isCell(event.target)) && (grd_isscstelist.col == grd_isscstelist.colRef("cstecnts"))) {
  1073. if(event.keyCode == 13) {
  1074. if(grd_isscstelist.row < (Number(grd_isscstelist.rows) - 1)){
  1075. grd_isscstelist.row = Number(grd_isscstelist.row) + 1;
  1076. grd_isscstelist.editCell();
  1077. }
  1078. }
  1079. }
  1080. ]]>
  1081. </script>
  1082. </datagrid>
  1083. <button id="btn_clear" class="btn2_letter3" navindex="14" style="left:1141px; top:49px; width:53px; height:19px; ">
  1084. <caption>초기화</caption>
  1085. <script type="javascript" ev:event="DOMActivate">
  1086. <![CDATA[
  1087. fExeIssInitialize();
  1088. ]]>
  1089. </script>
  1090. </button>
  1091. <object id="socket" clsid="{81e9de7e-90be-4958-bbda-ac731c05aba8}" visibility="hidden" style="left:600px; top:40px; width:35px; height:30px; ">
  1092. <!-- 소켓 받은 메시지 이벤트 -->
  1093. <script type="javascript" ev:event="OnReceive(nDataLength, szID)">
  1094. <![CDATA[
  1095. ]]>
  1096. </script>
  1097. <!-- 소켓 에러 이벤트 -->
  1098. <script type="javascript" ev:event="OnError(lError, szMsg)">
  1099. <![CDATA[
  1100. alert("Error code = " + lError+"\nError Message : "+szMsg);
  1101. socket.close(); // 소켓 닫기
  1102. isConnected = false; // 접속 여부 false
  1103. sEqFinish = "Y";
  1104. ]]>
  1105. </script>
  1106. <!-- 소켓 연결 이벤트 -->
  1107. <script type="javascript" ev:event="OnConnect(szID)">
  1108. <![CDATA[
  1109. isConnected = true; // 접속 여부 false
  1110. if(sCasteSlideflag == "C") {
  1111. //카세트 출력
  1112. var sCsteNode = "/root/main/isscste/isscstelist";
  1113. //------------------------------------------------------------------
  1114. for (var iRowNo=1; iRowNo <= getNodesetCount(sCsteNode); iRowNo++) {
  1115. if (model.getValue(sCsteNode+"["+iRowNo+"]/choi") == "true") {
  1116. sSendMsg = "";
  1117. sSendMsg += model.getValue(sCsteNode+"["+iRowNo+"]/ptno") + "▦"; // 병리번호
  1118. sSendMsg += model.getValue(sCsteNode+"["+iRowNo+"]/dispptno") + "▦"; // 표시병리번호
  1119. sSendMsg += model.getValue(sCsteNode+"["+iRowNo+"]/spcacptseqno") + "▦"; // 검체일련번호
  1120. sSendMsg += model.getValue(sCsteNode+"["+iRowNo+"]/csteno") + "▦"; // 블럭번호
  1121. sSendMsg += "000" + "▦"; // 슬라이드번호
  1122. sSendMsg += model.getValue(sCsteNode+"["+iRowNo+"]/cstecnts") + "▦"; // 블럭내용
  1123. sSendMsg += model.getValue(sCsteNode+"["+iRowNo+"]/hoppno") + "▦"; // Hopper번호
  1124. sSendMsg += "C" + "▩";
  1125. socket.sendString(sSendMsg); // 전송한다.
  1126. }
  1127. }
  1128. //----------------------------------------------------
  1129. model.removeNodeset(sCsteNode);
  1130. grd_isscstelist.refresh();
  1131. } else {
  1132. var sCsteNode = "/root/main/slideinfo/slidelist";
  1133. var iMaxRowCnt = getNodesetCount(sCsteNode);
  1134. //------------------------------------------------------------------
  1135. for (var iRowNo=1 ; iRowNo <= iMaxRowCnt ; iRowNo++) {
  1136. sSendMsg = "";
  1137. sSendMsg += model.getValue(sCsteNode+"["+iRowNo+"]/ptno") + "▦"; // 병리번호
  1138. sSendMsg += model.getValue(sCsteNode+"["+iRowNo+"]/dispptno") + "▦"; // 표시병리번호
  1139. sSendMsg += model.getValue(sCsteNode+"["+iRowNo+"]/spcacptseqno") + "▦"; // 검체일련번호
  1140. sSendMsg += model.getValue(sCsteNode+"["+iRowNo+"]/csteno") + "▦"; // 블럭
  1141. sSendMsg += "001" + "▦"; // 슬라이드번호
  1142. sSendMsg += model.getValue(sCsteNode+"["+iRowNo+"]/prtnblocnm") + "▦"; // 블럭내용
  1143. sSendMsg += model.getValue(sCsteNode+"["+iRowNo+"]/cstecnts") + "▦";
  1144. //------------------
  1145. // 전송종료여부 설정
  1146. if (iRowNo == iMaxRowCnt) {
  1147. sSendMsg += "Y" + "▦";
  1148. } else {
  1149. sSendMsg += "N" + "▦";
  1150. }
  1151. //--------------------------------------------------------------
  1152. sSendMsg += model.getValue(sCsteNode+"["+iRowNo+"]/pid") + "▦"; // 환자번호
  1153. sSendMsg += model.getValue(sCsteNode+"["+iRowNo+"]/hngnm") + "▦"; // 환자명
  1154. sSendMsg += "-" + "▩";
  1155. socket.sendString(sSendMsg); // 전송한다.
  1156. }
  1157. //----------------------------------------------------
  1158. model.removeNodeset(sCsteNode);
  1159. }
  1160. //----------
  1161. // 소켓 닫기
  1162. socket.close();
  1163. isConnected = false; // 접속 여부 false
  1164. sEqFinish = "Y";
  1165. ]]>
  1166. </script>
  1167. <!-- 소켓 close 이벤트 -->
  1168. <script type="javascript" ev:event="OnClose(szID)">
  1169. <![CDATA[
  1170. isConnected = false; // 접속 여부 false
  1171. sEqFinish = "Y";
  1172. ]]>
  1173. </script>
  1174. </object>
  1175. <select1 id="cmb_cstechar" ref="/root/init/choicstechar" navindex="11" visibility="hidden" appearance="minimal" style="left:310px; top:49px; width:70px; height:19px; ">
  1176. <choices>
  1177. <itemset nodeset="/root/init/cstechar/cstecharlist">
  1178. <label ref="cnts"/>
  1179. <value ref="no"/>
  1180. </itemset>
  1181. </choices>
  1182. <script type="javascript" ev:event="xforms-value-changed">
  1183. <![CDATA[
  1184. fExeCsteCharChoi();
  1185. ]]>
  1186. </script>
  1187. </select1>
  1188. <select1 id="cmb_hopkind" ref="/root/init/choichopperval" appearance="minimal" style="left:452px; top:49px; width:60px; height:19px; ">
  1189. <choices>
  1190. <item>
  1191. <label>1</label>
  1192. <value>1</value>
  1193. </item>
  1194. <item>
  1195. <label>2</label>
  1196. <value>2</value>
  1197. </item>
  1198. <item>
  1199. <label>3</label>
  1200. <value>3</value>
  1201. </item>
  1202. <item>
  1203. <label>4</label>
  1204. <value>4</value>
  1205. </item>
  1206. <item>
  1207. <label>5</label>
  1208. <value>5</value>
  1209. </item>
  1210. <item>
  1211. <label>6</label>
  1212. <value>6</value>
  1213. </item>
  1214. </choices>
  1215. <script type="javascript" ev:event="xforms-value-changed">
  1216. <![CDATA[
  1217. fExeHopperKind();
  1218. ]]>
  1219. </script>
  1220. </select1>
  1221. <select1 id="cmb_cstekind" ref="/root/init/choicstekindcd" appearance="minimal" style="left:381px; top:49px; width:70px; height:19px; ">
  1222. <choices>
  1223. <itemset nodeset="/root/init/resncd/resncdlist">
  1224. <label ref="resncnts"/>
  1225. <value ref="resncd"/>
  1226. </itemset>
  1227. </choices>
  1228. <script type="javascript" ev:event="xforms-value-changed">
  1229. <![CDATA[
  1230. fExeCsteCharKind();
  1231. ]]>
  1232. </script>
  1233. </select1>
  1234. <caption id="caption4" class="cell_1" style="left:937px; top:49px; width:65px; height:19px; text-align:left; vertical-align:middle; padding-left:10px; ">출력장비</caption>
  1235. <select1 id="cmb_slideqlist" ref="/root/init/eqseqno" appearance="minimal" style="left:1004px; top:49px; width:134px; height:19px; ">
  1236. <choices>
  1237. <itemset nodeset="/root/main/eqinfo/caeqlist">
  1238. <label ref="eqnm"/>
  1239. <value ref="eqseqno"/>
  1240. </itemset>
  1241. </choices>
  1242. </select1>
  1243. <datagrid id="datagrid1" nodeset="/root/main/slideinfo/slidelist" visibility="hidden" caption="instcd^ptno^spcacptdd^spcacptno^spcacptseqno^csteno^bloccnts^prntcsscnts^slidno^cstekindcd^cstecnts^workattr^prntcsscnts^cstecnts^ipttype^maxcsteno^bizflagcd^acptdd^acptno^testcd^acptitemno^scrno^spccd^spchistno^statsinclflagcd^relaptno^bloccnts^reladispptno^workflagcd^dispptno^prtnblocnm" colsep="^" colwidth="100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100" mergecellsfixedrows="bycolrec" rowsep="|" style="left:200px; top:375px; width:890px; height:240px; ">
  1244. <col ref="instcd"/>
  1245. <col ref="ptno"/>
  1246. <col ref="spcacptdd"/>
  1247. <col ref="spcacptno"/>
  1248. <col ref="spcacptseqno"/>
  1249. <col ref="csteno"/>
  1250. <col ref="bloccnts"/>
  1251. <col ref="prntcsscnts"/>
  1252. <col ref="slidno"/>
  1253. <col ref="cstekindcd"/>
  1254. <col ref="cstecnts"/>
  1255. <col ref="workattr"/>
  1256. <col ref="prntcsscnts"/>
  1257. <col ref="cstecnts"/>
  1258. <col ref="ipttype"/>
  1259. <col ref="maxcsteno"/>
  1260. <col ref="bizflagcd"/>
  1261. <col ref="acptdd"/>
  1262. <col ref="acptno"/>
  1263. <col ref="testcd"/>
  1264. <col ref="acptitemno"/>
  1265. <col ref="scrno"/>
  1266. <col ref="spccd"/>
  1267. <col ref="spchistno"/>
  1268. <col ref="statsinclflagcd"/>
  1269. <col ref="relaptno"/>
  1270. <col ref="bloccnts"/>
  1271. <col ref="reladispptno"/>
  1272. <col ref="workflagcd"/>
  1273. <col ref="dispptno"/>
  1274. <col ref="prtnblocnm"/>
  1275. </datagrid>
  1276. </group>
  1277. <group id="grp_btn" style="left:0px; top:13; width:1195px; height:27px; ">
  1278. <line id="line17" class="line_6" style="x1:0px; y1:25; x2:1194px; y2:25; "/>
  1279. <button id="btn_create" accesskey="f2" class="btn4_letter2" navindex="16" style="left:1137px; top:3px; width:56px; height:22px; ">
  1280. <caption>발행</caption>
  1281. <script type="javascript" ev:event="DOMActivate">
  1282. <![CDATA[
  1283. fExeCsteIssDel("C");
  1284. ]]>
  1285. </script>
  1286. </button>
  1287. <caption id="cap_slide" style="left:951px; top:6px; width:124px; height:15px; ">슬라이드동시발행여부</caption>
  1288. <bool id="bol_slideflag" checkvalue="Y,N" ref="/root/init/slideflag" style="left:930px; top:4px; width:30px; height:20px; ">
  1289. <script type="javascript" ev:event="xforms-value-changed">
  1290. <![CDATA[
  1291. if(model.getValue("/root/init/slideflag") == "Y") {
  1292. cap_slid.visible = true;
  1293. cmb_slid.visible = true;
  1294. } else {
  1295. cap_slid.visible = false;
  1296. cmb_slid.visible = false;
  1297. }
  1298. cap_slid.refresh();
  1299. cmb_slid.refresh();
  1300. ]]>
  1301. </script>
  1302. </bool>
  1303. <caption id="cap_slid" class="cell_1" visibility="hidden" style="left:723px; top:4px; width:65px; height:19px; text-align:left; vertical-align:middle; padding-left:10px; ">출력장비</caption>
  1304. <select1 id="cmb_slid" ref="/root/init/slideeqseqno" visibility="hidden" appearance="minimal" style="left:790px; top:4px; width:134px; height:19px; ">
  1305. <choices>
  1306. <itemset nodeset="/root/main/eqinfo/slideqlist">
  1307. <label ref="eqnm"/>
  1308. <value ref="eqseqno"/>
  1309. </itemset>
  1310. </choices>
  1311. </select1>
  1312. </group>
  1313. </xhtml:body>
  1314. </xhtml:html>