SMADT10310_약국집계.xrw 96 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
  3. <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2002/01/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
  4. <xhtml:head>
  5. <xhtml:title>약국집계</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <sumlist>
  11. <suminfo>
  12. <groupcd/>
  13. <prcpcd/>
  14. <prcpnm/>
  15. <sumqty/>
  16. </suminfo>
  17. </sumlist>
  18. <prcplist>
  19. <prcpinfo>
  20. <flag1/>
  21. <flag2/>
  22. <flag3/>
  23. <pid/>
  24. <hngnm/>
  25. <orddeptcd/>
  26. <wardcd/>
  27. <groupcd/>
  28. <prcpcd/>
  29. <prcpnm/>
  30. <prcpqty/>
  31. <prcptims/>
  32. <prcpdayno/>
  33. <totqty/>
  34. <drugno/>
  35. <execdt/>
  36. <drugsumdt/>
  37. <prcpno/>
  38. <prcpdd/>
  39. <rtndd/>
  40. </prcpinfo>
  41. </prcplist>
  42. <sumterm>
  43. <suminfo>
  44. <sumflag/>
  45. <sumdt/>
  46. <sumfromdd/>
  47. <sumfromtm/>
  48. <sumtodd/>
  49. <sumtotm/>
  50. <sumdeptnm/>
  51. <sumnm/>
  52. </suminfo>
  53. </sumterm>
  54. <detlprcplist>
  55. <detlprcpinfo>
  56. <ioflagnm/>
  57. <ioflag/>
  58. <prcpno/>
  59. <drugno/>
  60. <execdd/>
  61. <exectm/>
  62. <drugsumdt/>
  63. <execdeptnm/>
  64. <execdeptcd/>
  65. <issdeptcd/>
  66. <issdeptcdnm/>
  67. </detlprcpinfo>
  68. </detlprcplist>
  69. <barlist>
  70. <prcpinfo>
  71. <flag1/>
  72. <flag2/>
  73. <flag3/>
  74. <pid/>
  75. <hngnm/>
  76. <orddeptcd/>
  77. <wardcd/>
  78. <groupcd/>
  79. <prcpcd/>
  80. <prcpnm/>
  81. <prcpqty/>
  82. <prcptims/>
  83. <prcpdayno/>
  84. <totqty/>
  85. <drugno/>
  86. <execdt/>
  87. <drugsumdt/>
  88. <prcpno/>
  89. <prcpdd/>
  90. <rtndd/>
  91. </prcpinfo>
  92. </barlist>
  93. <barcdprntsetup/>
  94. <prnt>
  95. </prnt>
  96. </main>
  97. <send>
  98. <srchdata>
  99. <deptflag/>
  100. <drugflag>1 2</drugflag>
  101. <prcpflag>1 2 3</prcpflag>
  102. <srchfromdd/>
  103. <srchfromtm>0000</srchfromtm>
  104. <srchtodd/>
  105. <srchtotm>2400</srchtotm>
  106. <srchprcpcd/>
  107. <udsflag>N</udsflag>
  108. <prcpkindcd>A</prcpkindcd>
  109. <sumdt/>
  110. <srchorddeptcd/>
  111. <srchorddeptflag/>
  112. <userid/>
  113. <instcd/>
  114. <srchdeptnm/>
  115. <stocdeptcd>3242107000</stocdeptcd>
  116. <pid/>
  117. <drugcd/>
  118. <sumflag/>
  119. <orderby/>
  120. <expnflag/>
  121. <prcpno/>
  122. <ptpall/>
  123. <drugno/>
  124. </srchdata>
  125. <deptdata>
  126. <deptinfo>
  127. <sumorddeptcd/>
  128. <sumorddeptflag/>
  129. </deptinfo>
  130. </deptdata>
  131. <srchdetlinfo>
  132. <srchpid/>
  133. <prcpdd/>
  134. <orddeptflag/>
  135. <prcpno/>
  136. </srchdetlinfo>
  137. <srchbcinfo>
  138. <srchdrugdd/>
  139. <srchdrugno/>
  140. <srchioflag/>
  141. <srchbcno1/>
  142. </srchbcinfo>
  143. <scrnid/>
  144. <srchdept>
  145. <deptcd/>
  146. </srchdept>
  147. <srchpid>
  148. <sumdt/>
  149. <srchorddeptcd/>
  150. <pid/>
  151. <drugno/>
  152. </srchpid>
  153. </send>
  154. <init>
  155. <sumdept>
  156. <dept>
  157. <chk/>
  158. <deptcd/>
  159. <depthngnm/>
  160. <orddeptflag/>
  161. </dept>
  162. </sumdept>
  163. <orddept>
  164. <dept>
  165. <chk/>
  166. <deptcd/>
  167. <depthngnm/>
  168. <orddeptflag/>
  169. </dept>
  170. </orddept>
  171. <sumorddept>
  172. <dept>
  173. <chk/>
  174. <deptcd/>
  175. <depthngnm/>
  176. <orddeptflag/>
  177. <sumkind/>
  178. </dept>
  179. </sumorddept>
  180. <allsumorddept>
  181. <dept>
  182. <chk/>
  183. <deptcd/>
  184. <depthngnm/>
  185. <orddeptflag/>
  186. <sumkind/>
  187. </dept>
  188. </allsumorddept>
  189. </init>
  190. <hidden>
  191. <popupmenu>
  192. <menu>
  193. <label>선택약품 개별집계</label>
  194. <func>fIndCaseEnd</func>
  195. </menu>
  196. </popupmenu>
  197. <stocdeptlist>
  198. <deptlist>
  199. <stocdeptcd/>
  200. <stocdeptnm/>
  201. </deptlist>
  202. </stocdeptlist>
  203. </hidden>
  204. <temp>
  205. <ret/>
  206. <sumrslt>
  207. <sumdt/>
  208. </sumrslt>
  209. <prntinfo>
  210. <sumflagnm>약품</sumflagnm>
  211. <wardnm>외래주사실</wardnm>
  212. <sumfromdd>20070901</sumfromdd>
  213. <sumfromtm>0000</sumfromtm>
  214. <sumtodd>20070930</sumtodd>
  215. <sumtotm>2400</sumtotm>
  216. <sumflag/>
  217. <usetype/>
  218. <sumdt/>
  219. <sumtotalnm>
  220. <![CDATA[< 향정신성 및 고가의약품 총집계량 >]]>
  221. </sumtotalnm>
  222. </prntinfo>
  223. <prntprcpinfo>
  224. <suminfo>
  225. <wardnm/>
  226. <prcpcd/>
  227. <prcpnm/>
  228. <prcpflag/>
  229. <sumqty/>
  230. <spcldurg/>
  231. <expninjyn/>
  232. <expnyn/>
  233. <keepmthdyn/>
  234. <keepmthd/>
  235. <divflag/>
  236. </suminfo>
  237. <sumtitle>
  238. <drugtype/>
  239. <drugcd/>
  240. <hngnm/>
  241. <sumqty/>
  242. <spcltype/>
  243. </sumtitle>
  244. <expnlist>
  245. <prcpdd/>
  246. <drugcd/>
  247. <drugnm/>
  248. <drugno/>
  249. <roomcd/>
  250. <orddeptnm/>
  251. <pid/>
  252. <hngnm/>
  253. <prcpqty/>
  254. <prcpdayno/>
  255. <sumqty/>
  256. </expnlist>
  257. </prntprcpinfo>
  258. <prntudsinfo>
  259. <injinfo>
  260. <roomcd/>
  261. <hngnm/>
  262. <pid/>
  263. <drugno/>
  264. <drugcd/>
  265. <prcpqty/>
  266. <prcptims/>
  267. <drugtype/>
  268. <prcpcd/>
  269. <sumqty/>
  270. </injinfo>
  271. <exuinfo>
  272. <roomcd/>
  273. <hngnm/>
  274. <pid/>
  275. <drugno/>
  276. <drugcd/>
  277. <prcpqty/>
  278. <prcptims/>
  279. <drugtype/>
  280. <prcpcd/>
  281. <sumqty/>
  282. </exuinfo>
  283. <ptpinfo>
  284. <roomcd/>
  285. <hngnm/>
  286. <pid/>
  287. <drugno/>
  288. <drugcd/>
  289. <prcpqty/>
  290. <prcptims/>
  291. <drugtype/>
  292. <prcpcd/>
  293. <sumqty/>
  294. </ptpinfo>
  295. </prntudsinfo>
  296. <prntpatprcp>
  297. <prcpdrug>
  298. <roomcd/>
  299. <hngnm/>
  300. <pid/>
  301. <rrgstno/>
  302. <sna/>
  303. <drugno/>
  304. <drugcd/>
  305. <prcpvol/>
  306. <prcpqty/>
  307. <prcptims/>
  308. <prcpkindcd/>
  309. <drughngnm/>
  310. <prcpdayno/>
  311. <mthdcnts/>
  312. </prcpdrug>
  313. <resn>
  314. <resnnm/>
  315. <resncnts/>
  316. <durdrugcd/>
  317. </resn>
  318. </prntpatprcp>
  319. <srchdata>
  320. <deptflag/>
  321. <drugflag>1 2</drugflag>
  322. <prcpflag>1 2 3</prcpflag>
  323. <srchfromdd/>
  324. <srchfromtm>0000</srchfromtm>
  325. <srchtodd/>
  326. <srchtotm>2400</srchtotm>
  327. <srchprcpcd/>
  328. <udsflag>N</udsflag>
  329. <prcpkindcd>A</prcpkindcd>
  330. <sumdt/>
  331. <srchorddeptcd/>
  332. <srchorddeptflag/>
  333. <userid/>
  334. <instcd/>
  335. <srchdeptnm/>
  336. <stocdeptcd>3242107000</stocdeptcd>
  337. <pid/>
  338. <drugcd/>
  339. <sumflag/>
  340. </srchdata>
  341. <sumprntyn>
  342. <info>
  343. <prntyn/>
  344. </info>
  345. </sumprntyn>
  346. <barcodeprt>Y</barcodeprt>
  347. <sumpid>
  348. <pid/>
  349. <drugno/>
  350. <roomcd/>
  351. </sumpid>
  352. <filllistno>Y</filllistno>
  353. <fillinstcd/>
  354. </temp>
  355. </root>
  356. </instance>
  357. <script type="javascript" ev:event="xforms-ready">
  358. <![CDATA[
  359. makeReportPreview(0, 50, 1179, 678, "grp_prnt");
  360. grd_deptlist.fixedcellcheckbox(0,0) = true;
  361. datagrid3.fixedcellcheckbox(0,0) = true;
  362. model.setValue("/root/send/srchdata/srchfromdd", getCurrentDate());
  363. model.setValue("/root/send/srchdata/srchtodd", getCurrentDate());
  364. model.setValue("/root/temp/srchdata/srchfromdd", getCurrentDate());
  365. model.setValue("/root/temp/srchdata/srchtodd", getCurrentDate());
  366. ////////2015.9.5 김치국 칠곡은 Filllist 라벨 출력을 안하는걸로 세팅
  367. model.setValue("/root/temp/fillinstcd", getUserInfo("dutplceinstcd"));
  368. var fillinstcd = model.getValue("/root/temp/fillinstcd");
  369. if( fillinstcd == "032") {
  370. model.setValue("/root/temp/barcodeprt", "");
  371. }
  372. //////
  373. model.refresh();
  374. submit("TRADT10324");
  375. //바코드프린터설정 초기화
  376. model.setValue("/root/send/scrnid", getScreenID());
  377. submit("TRLLC90101", false);
  378. var comm = model.getValue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/comm02/comm");
  379. var prntkind = model.getValue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/prntkind");
  380. if(comm == "2") {
  381. model.setValue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/comm02/comm", "1");
  382. }
  383. if(prntkind == "1") {
  384. model.setValue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/prntkind", "5");
  385. }
  386. //집계표 출력시 고가, 향정 단독 출력물 출력여부 조회
  387. submit("TRADT10342");
  388. // 20100203_laboru_불출부서 visibility 막기
  389. submit("TRADT00704");
  390. if(model.getValue("/root/hidden/stocdeptlist/deptlist/stocdeptcd") == "Y") {
  391. cmb_stocdeptcd.visible = false;
  392. caption21.visible = false;
  393. }
  394. model.refresh();
  395. //1일기준인지 1회기준인지 체크하여 컬럼을 hidden
  396. var colHidnValue = grdBaseColHidn("D");
  397. //1회 기준
  398. if( colHidnValue == "C") {
  399. grd_prcplist.colHidden(grd_prcplist.colRef("prcpqty")) = true;
  400. datagrid2.colHidden(datagrid2.colRef("prcpqty")) = true;
  401. } else {
  402. grd_prcplist.colHidden(grd_prcplist.colRef("prcpqty2")) = true;
  403. datagrid2.colHidden(datagrid2.colRef("prcpqty2")) = true;
  404. }
  405. // 20101229 wify 경북대병원 영양수액 추가를 위한 flag
  406. model.makeNode("/root/send/srchdata/spclflag1");
  407. model.makeNode("/root/send/srchdata/spclflag2");
  408. model.makeNode("/root/send/srchdata/spclflag3");
  409. ]]>
  410. </script>
  411. <script type="javascript" ev:event="onPrintFinished">
  412. <![CDATA[
  413. cleanIViewer();
  414. ]]>
  415. </script>
  416. <script type="javascript">
  417. <![CDATA[
  418. var sBfAllSumDt = "";
  419. var sAfAllSumDt = "";
  420. var gCurrPrtObj = null; //현재 출력 IViewer
  421. //=========================================================================================================
  422. // 부서코드의 선택 여부를 판별
  423. // 선택사항이 없을때 : false, 선택사항이 있을때 : true
  424. //=========================================================================================================
  425. function fSelDeptchk(){
  426. for(var i =grd_deptlist.fixedRows; i < grd_deptlist.rows; i++){
  427. if(model.getValue("/root/init/orddept/dept["+i+"]/chk") == "Y") return true;
  428. }
  429. return false;
  430. }
  431. //=========================================================================================================
  432. // 선택환자 개별마감
  433. //=========================================================================================================
  434. function fIndCaseEnd(){
  435. for(var i =grd_deptlist.fixedRows; i < grd_deptlist.rows; i++){
  436. model.setValue("/root/init/orddept/dept["+i+"]/chk", "N");
  437. }
  438. var deptrow = grd_deptlist.selectedRow(0);
  439. model.setValue("/root/init/orddept/dept["+deptrow+"]/chk", "Y");
  440. var row = grd_prcplist.selectedRow(0);
  441. model.setValue("/root/send/srchdata/pid", model.getValue("/root/main/prcplist/prcpinfo["+row+"]/pid"));
  442. model.setValue("/root/send/srchdata/drugcd", model.getValue("/root/main/prcplist/prcpinfo["+row+"]/prcpno")); //2010.07.22 pymi
  443. model.refresh();
  444. btn_sum.dispatch("DOMActivate");
  445. }
  446. function fSelSum(){
  447. model.setValue("/root/temp/prntinfo/sumflag", model.getValue("/root/main/sumterm/suminfo["+grd_drugsum.row+"]/sumflag"));
  448. model.setValue("/root/temp/prntinfo/sumfromdd", model.getValue("/root/main/sumterm/suminfo["+grd_drugsum.row+"]/sumfromdd"));
  449. model.setValue("/root/temp/prntinfo/sumfromtm", model.getValue("/root/main/sumterm/suminfo["+grd_drugsum.row+"]/sumfromtm"));
  450. model.setValue("/root/temp/prntinfo/sumtodd", model.getValue("/root/main/sumterm/suminfo["+grd_drugsum.row+"]/sumtodd"));
  451. model.setValue("/root/temp/prntinfo/sumtotm", model.getValue("/root/main/sumterm/suminfo["+grd_drugsum.row+"]/sumtotm"));
  452. model.setValue("/root/temp/prntinfo/sumdt", model.getValue("/root/main/sumterm/suminfo["+grd_drugsum.row+"]/sumdt"));
  453. model.setValue("/root/send/srchdata/sumdt", model.getValue("/root/main/sumterm/suminfo["+grd_drugsum.row+"]/sumdt"));
  454. submit("TRADT10330");
  455. }
  456. //Fill List 전체 출력
  457. function fPrtAllFillList(prtPath) {
  458. var iCnt = getNodesetCount(prtPath);
  459. var tmpRptStr = "";
  460. for(var i = 1; i <= iCnt; i++){
  461. if ( model.getValue(prtPath+"["+i+"]/chk")=="Y"){
  462. //UDS로 집계된 사항만 Fill List로 출력 가능
  463. ///if(model.getValue("/root/init/sumorddept/dept/sumkind") == "U"){
  464. model.setValue("/root/send/srchdata/orderby", "");
  465. model.setValue("/root/send/srchdata/srchorddeptcd", model.getValue(prtPath+"["+i+"]/deptcd"));
  466. model.setValue("/root/temp/prntinfo/wardnm", model.getValue(prtPath+"["+i+"]/depthngnm"));
  467. //submit("TRADT10332");
  468. //////////////// 2015.6.22 김치국 fillist 출력 유무 체크하기
  469. var filllistno = model.getValue("/root/temp/filllistno");
  470. if (filllistno == 'Y') {
  471. submit("TRADT10332");
  472. tmpRptStr = "report_"+i;
  473. if(model.getValue("/root/temp/prntudsinfo/injinfo/pid") != ""){
  474. tmpRptStr += "10302";
  475. gCurrPrtObj = "ivr_"+tmpRptStr;
  476. makeReportIViewer(0,0,10, 10,tmpRptStr);
  477. exeRexPreview("RPADT10302", "XMLSTR", "", "", "true","","","","","", "", tmpRptStr);
  478. //exeReportPreview("RPADT10302", "XMLSTR", "", "", "true","","","","","true");
  479. }
  480. if(model.getValue("/root/temp/prntudsinfo/exuinfo/pid") != ""){
  481. //exeReportPreview("RPADT10303", "XMLSTR", "", "", "true","","","","","true");
  482. tmpRptStr += "10303";
  483. gCurrPrtObj = "ivr_"+tmpRptStr;
  484. makeReportIViewer(0,0,10, 10, tmpRptStr);
  485. exeRexPreview("RPADT10303", "XMLSTR", "", "", "true","","","","","", "", tmpRptStr);
  486. }
  487. if(model.getValue("/root/temp/prntudsinfo/ptpinfo/pid") != ""){
  488. //exeReportPreview("RPADT10304", "XMLSTR", "", "", "true","","","","","true");
  489. tmpRptStr += "10304";
  490. gCurrPrtObj = "ivr_"+tmpRptStr;
  491. makeReportIViewer(0,0,10, 10, tmpRptStr);
  492. exeRexPreview("RPADT10304", "XMLSTR", "", "", "true","","","","","", "", tmpRptStr);
  493. }
  494. }
  495. ////////2015년 6월 16일 라벨출력 김치국
  496. // debugger;
  497. fPrintBigbar();
  498. //}else{
  499. // messageBox("UDS 집계항목을", "C002");
  500. // break;
  501. //}
  502. }
  503. }
  504. }
  505. //Fill list 선택된 병동만 출력
  506. function fPrtCheckedFillList(prtPath) {
  507. var arrDept = chk_deptcd.value.split("|");
  508. var tmpRptStr = "";
  509. for (var i = 0; i < arrDept.length; i++) {
  510. model.setValue("/root/send/srchdata/orderby", "");
  511. model.setValue("/root/send/srchdata/srchorddeptcd", arrDept[i]);
  512. model.setValue("/root/temp/prntinfo/wardnm", model.getValue(prtPath+"[deptcd="+ arrDept[i] +"]/depthngnm"));
  513. //submit("TRADT10332");
  514. //////////////// 2015.6.22 김치국 fillist 출력 유무 체크하기
  515. var filllistno = model.getValue("/root/temp/filllistno");
  516. if (filllistno == 'Y') {
  517. submit("TRADT10332");
  518. tmpRptStr = "report_"+i;
  519. if(model.getValue("/root/temp/prntudsinfo/injinfo/pid") != ""){
  520. tmpRptStr += "10302";
  521. gCurrPrtObj = "ivr_"+tmpRptStr;
  522. makeReportIViewer(0,0,10, 10,tmpRptStr);
  523. exeRexPreview("RPADT10302", "XMLSTR", "", "", "true","","","","","", "", tmpRptStr);
  524. //exeReportPreview("RPADT10302", "XMLSTR", "", "", "true","","","","","true");
  525. }
  526. if(model.getValue("/root/temp/prntudsinfo/exuinfo/pid") != ""){
  527. //exeReportPreview("RPADT10303", "XMLSTR", "", "", "true","","","","","true");
  528. tmpRptStr += "10303";
  529. gCurrPrtObj = "ivr_"+tmpRptStr;
  530. makeReportIViewer(0,0,10, 10, tmpRptStr);
  531. exeRexPreview("RPADT10303", "XMLSTR", "", "", "true","","","","","", "", tmpRptStr);
  532. }
  533. if(model.getValue("/root/temp/prntudsinfo/ptpinfo/pid") != ""){
  534. tmpRptStr += "10304";
  535. //exeReportPreview("RPADT10304", "XMLSTR", "", "", "true","","","","","true");
  536. gCurrPrtObj = "ivr_"+tmpRptStr;
  537. makeReportIViewer(0,0,10, 10, tmpRptStr);
  538. exeRexPreview("RPADT10304", "XMLSTR", "", "", "true","","","","","", "", tmpRptStr);
  539. }
  540. }
  541. fPrintBigbar();
  542. }
  543. }
  544. //프린터 설정
  545. function fSetPrint() {
  546. var count = getNodesetCount("/root/main/barcdprntsetup/prntsetupinfo/setupinfo");
  547. if(count == 0) {
  548. model.makeNode("/root/main/barcdprntsetup/prntsetupinfo/setupinfo");
  549. }
  550. //20101221 wify 경북대병원 라벨출력방식을 rexpert로 변경
  551. //open("SPLLC90100_바코드프린터설정.xrw", "", "", "", "", "/root/main/barcdprntsetup/prntsetupinfo/setupinfo", "/root/main/barcdprntsetup/prntsetupinfo/setupinfo");
  552. open("SPZUR00300_바코드프린터설정_knuh.xrw", "", "", "", "", "/root/main/barcdprntsetup/prntsetupinfo/setupinfo", "/root/main/barcdprntsetup/prntsetupinfo/setupinfo");
  553. }
  554. // 20101221 wify 경북대병원 라벨출력방식을 rexpert로 변경
  555. function fLBLPrintR() {
  556. //alert("lblprint");
  557. // Comm 설정
  558. //CommAX.CommPort = "1"; // 출력 Port
  559. //CommAX.Settings = "9600,n,8,1"; // Comm 설정
  560. /*
  561. ex) barPrt.PrnKind = 0; //ZEBRA로 설정됨
  562. barPrt.PrnKind = 1; //ZEBRAH로 설정됨
  563. barPrt.PrnKind = 4; //항목에 없으므로 ZEBRA로 설정됨
  564. barPrt.PrnKind = "ZEBRAH"; //ZEBRAH로 설정됨
  565. barPrt.PrnKind = "SATO(CT400)"; //SATO(CT400)로 설정됨
  566. barPrt.PrnKind = "ZebraH"; //대소문자에 상관 없음. ZEBRAH로 설정됨
  567. */
  568. PrnKind = model.getvalue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/prntkind");
  569. PrnMarginLeft = model.getvalue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/blank/left");
  570. PrnMarginTop = model.getvalue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/blank/top");
  571. var commkind = model.getvalue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/commkind")
  572. //프린터 포트명, 혹은 네트웍 공유 프린터 명
  573. if(commkind == "01") {
  574. CommAX.PrtNm = model.getvalue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/comm01/setupval");
  575. }
  576. var reprint ="";
  577. var iPoint=0;
  578. //페이지번호 조회
  579. var iPageCnt = 0;
  580. for(iPoint = 1; iPoint <= getNodesetCount("/root/temp/prntpat/prcpdrug") ; iPoint++){
  581. if(model.getValue("/root/temp/prntpat/prcpdrug["+iPoint+"]/pid") != "" ) {
  582. iPageCnt++;
  583. //////////////////////////////////////////////////
  584. // 라벨 상단내용 //
  585. /////////////////////////////////////////////////
  586. //병동
  587. model.setValue("/root/temp/prntpat/prcpdrug["+iPoint+"]/wardnm" ,model.getValue("/root/temp/prntpat/prcpdrug["+iPoint+"]/wardnm") + " / " + model.getValue("/root/temp/prntpat/prcpdrug["+iPoint+"]/roomcd"));
  588. //환자번호
  589. model.setValue("/root/temp/prntpat/prcpdrug["+iPoint+"]/pid", "등록번호:" + model.getValue("/root/temp/prntpat/prcpdrug["+iPoint+"]/pid") );
  590. //진료과
  591. model.setValue("/root/temp/prntpat/prcpdrug["+iPoint+"]/orddeptnm" , model.getValue("/root/temp/prntpat/prcpdrug["+iPoint+"]/orddeptnm") + "/" + model.getValue("/root/temp/prntpat/prcpdrug["+iPoint+"]/medispclidnm") + "/" + model.getValue("/root/temp/prntpat/prcpdrug["+iPoint+"]/atdoctidnm") );
  592. //라벨출력일
  593. var lbldate = getCurrentDate();
  594. lbldate = lbldate.toDate().getDateFormat("YYYY/MM/DD") ;
  595. model.makeValue("/root/temp/prntpat/prcpdrug["+iPoint+"]/lbldate" , lbldate);
  596. }
  597. }
  598. // 20100507_laboru_네임 카드 라벨 .
  599. //makeReportPreview(0,0,10, 10, "");
  600. //fPrintRexbar("RFADT10310");
  601. // 20100507_laboru_네임 카드 라벨
  602. if (arguments[0] == "undefined") {
  603. makeReportPreview(0,0,10, 10, "");
  604. fPrintRexbar("RFADT10310");
  605. } else {
  606. makeReportIViewer(0,0,10, 10, arguments[0]);
  607. fPrintRex("RFADT10310", "undefined", "undefined", "undefined", "undefined", "undefined", arguments[0]);
  608. }
  609. model.refresh();
  610. }
  611. /**
  612. 생성된 IViewer삭제
  613. **/
  614. function cleanIViewer() {
  615. if (arguments[0] == "undefined" || arguments[0] == undefined) { //파라미터가 없으면 현재 gCurrPrtObj변수로 IViewer를 삭제하고
  616. var o = document.all("ivr_"+gCurrPrtObj);
  617. if (o != null) {
  618. body.removeChild("ivr_"+gCurrPrtObj);
  619. }
  620. } else { //파라미터가 존재하면 파라미터 배열의 IViewer를 삭제함
  621. if (arguments[0].indexOf("|") != -1)
  622. return;
  623. var arr = arguments[0].split("|");
  624. for (var i in arr) {
  625. var o = document.all("ivr_"+arr[i]);
  626. if (o != null) {
  627. body.removeChild("ivr_"+arr[i]);
  628. }
  629. }
  630. }
  631. gCurrPrtObj = null;
  632. }
  633. /**
  634. * @-----------------------------------------------------------------------------------
  635. * @desc : 레포트 미리보기 Object를 생성한다.
  636. * @param :
  637. * @return :
  638. * @-----------------------------------------------------------------------------------
  639. */
  640. function makeReportIViewer(left, top, width, height, iViewerName){
  641. if(left==null || top==null || width==null || height==null){
  642. messageBox("미리보기 크기정보가", "I004");
  643. }else{
  644. if(iViewerName != null && iViewerName != ""){
  645. if(document.all("ivr_"+iViewerName) == null){
  646. if(document.all("grp_biz") == null){
  647. body.createChild("xforms:iviewer", "id:ivr_"+iViewerName+"; src:../../../com/commonweb/xrw/SPZUR00100_보고서.xrw; left:"+left+"px; top:"+top+"px; width:"+width+"px; height:"+height+
  648. "px;");
  649. }else{
  650. grp_biz.createChild("xforms:iviewer", "id:ivr_"+iViewerName+"; src:../../../com/commonweb/xrw/SPZUR00100_보고서.xrw; left:"+left+"px; top:"+top+"px; width:"+width+"px; height:"+height+
  651. "px;");
  652. }
  653. model.refresh();
  654. }
  655. }
  656. }
  657. }
  658. /**
  659. * 라벨출력
  660. */
  661. function fLBLPrint() {
  662. //alert("lblprint");
  663. // Comm 설정
  664. //CommAX.CommPort = "1"; // 출력 Port
  665. //CommAX.Settings = "9600,n,8,1"; // Comm 설정
  666. /*
  667. ex) barPrt.PrnKind = 0; //ZEBRA로 설정됨
  668. barPrt.PrnKind = 1; //ZEBRAH로 설정됨
  669. barPrt.PrnKind = 4; //항목에 없으므로 ZEBRA로 설정됨
  670. barPrt.PrnKind = "ZEBRAH"; //ZEBRAH로 설정됨
  671. barPrt.PrnKind = "SATO(CT400)"; //SATO(CT400)로 설정됨
  672. barPrt.PrnKind = "ZebraH"; //대소문자에 상관 없음. ZEBRAH로 설정됨
  673. */
  674. PrnKind = model.getvalue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/prntkind");
  675. PrnMarginLeft = model.getvalue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/blank/left");
  676. PrnMarginTop = model.getvalue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/blank/top");
  677. var commkind = model.getvalue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/commkind")
  678. if ( PrnKind ==7 ) {
  679. CommAX.PrnKind =4;
  680. } else {
  681. CommAX.PrnKind =PrnKind;
  682. }
  683. //포트 종류 설정
  684. if(commkind == "02") {
  685. CommAX.PortNm = 1;
  686. } else {
  687. CommAX.PortNm = 2;
  688. }
  689. //프린터 포트명, 혹은 네트웍 공유 프린터 명
  690. if(commkind == "01") {
  691. CommAX.PrtNm = model.getvalue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/comm01/setupval");
  692. }
  693. //alert("commax");
  694. //CommAX.Settings = "127.0.0.1"; // Comm 설정
  695. var sSndMsg ="";
  696. var reprint ="";
  697. var iPoint=0;
  698. //if ( CommAX.PortOpen() == true) {
  699. //alert("라벨 프린트 Open");
  700. //CommAX.SendMessage("^XA^SEE:UHANGUL.DAT^FS^CWQ,E:AAAAA.FNT^FS^CI26^FO100,50^AQN,40,40^FD이훈재ABCDEFGHI1234^FS^FO100,100^AQN,40,40^FD(주)한글인쇄테스트ABCDEFGHI1234^FS^FO100,150^AQN,40,40^FD A B C D E F G H I^FS^CI0^FO100,200^A0,50,50^FDPRINTING TEST^FS^FO100,250^BY2^B3N,N,100,Y,N,N^FD1232423423^FS^XZ");
  701. //CommAX.SendMessage("^XA^LH0,0^PRB^CF0,89^FO10,05^FDSH07^FS^CF0,70^FO260,05^FD10/10^FS^CF0,89^FO50,80^FD- 234567^FS^CFA20,20^FO10,150^FD1234567890^FS~DGGRAPH001,00504,021,0078000000E00000800000F01E000C00201FFC0000003C0000007007FFC00000F01E000C00201FFC000000006000003003000000C0701C00180060180C03000FFFF00FFE3003000000C0701C00180060180C0300061000061C300300000300783C003001E0101800C0007E000018300300C00300783C003001E0101800C000C30000303001FFE006006C6C006003600018006001818000603000180006006C6C006003600018006000C30000C03000180004006C6C00C0066000300020007E0001803000180004006C6C00C006600030002000180003003000181E0C0066CC0180186000600030001800060030FFFFFF0C0066CC018018600060003000181E1800207000000C00638C0300306000C00030FFFFFF0000000000000C00638C0300306000C000307000000000000000000400638C060060600180002000000000FFF00038000400638C0600606001800020007E00006060007E000600610C0C007FFC0180006000C30000006000C3000600610C0C007FFC018000600181800000400181800300600C18000060018000C001818000FFE00181800300600C18000060018000C001818000600001818000C0F03E300001F80180030000C30000600000C30000C0F03E300001F801800300007E00006060007E00000000000000000000000000003800003FF0003800000000000000000000000000^FO140,150^XGGRAPH001,1,1^FS~DGGRAPH002,00216,009,0000700000000001C00000380000000000E00000180000000000600000180000000000600FFF1807FFE0000060060E180300C03FFC60001C180000C0181C60003018000080001C600060180FFFC000186000D018070000001860018C180300000C18600307180300C006106606031801FFE006207F18001800000006006000001801860006036000001800C300061C6000001000C300FFE06000E00000C30070006000300000C31E000060003000FFFFFF000060003000700000000060003018000000000060001FFC000000000060000000000000000040^FO320,150^XGGRAPH002,1,1^FS^CFA20,20^FO10,180^FD2007-04-25^FS~DGGRAPH003,00240,010,002001E00000E0000080002001E000007007FFC0006006380000300300000060063800303003000001E00C1830183003000001E00C181818300300C003600800181BF001FFE0036008001FF830001800066018001818300018000660180018183000180018601BF0181BF000181E18601BF01FF830FFFFFF30601C1810103070000030601C180000200000006060180C0000000000006060180C0007000038007FFC0C0C000FC0007E007FFC0C0C00186000C30000600E1800303001818000600E1800303001818001F803E000303001818001F803E000186000C30000000000000FC0007E0000000000000700003800^FO140,180^XGGRAPH003,1,1^FS^CFE10,10^FO10,210^FDStomach 2/10^FS^CFA20,20^FO10,240^FDBiopsh^FS^PQ1^XZ");
  702. //CommAX.PortClose();
  703. //return;
  704. //페이지번호 조회
  705. var iPageCnt = 0;
  706. for(iPoint = 1; iPoint <= getNodesetCount("/root/temp/prntpat/prcpdrug") ; iPoint++){
  707. if(model.getValue("/root/temp/prntpat/prcpdrug["+iPoint+"]/pid") != "" ) {
  708. //시작(X, Y)
  709. sSndMsg += astfStartFormat(0, 0);
  710. iPageCnt++;
  711. //////////////////////////////////////////////////
  712. // 라벨 상단내용 //
  713. /////////////////////////////////////////////////
  714. //병동
  715. sSndMsg += astfPrintOut(20, 60, 3, model.getValue("/root/temp/prntpat/prcpdrug["+iPoint+"]/wardnm") + " / " + model.getValue("/root/temp/prntpat/prcpdrug["+iPoint+"]/roomcd"),"");
  716. //병실
  717. //sSndMsg += astfPrintOut(260, 60, 3, model.getValue("/root/temp/prntpat/prcpdrug["+iPoint+"]/roomcd"),"");
  718. //환자명
  719. sSndMsg += astfPrintOut(330, 60, 6, model.getValue("/root/temp/prntpat/prcpdrug["+iPoint+"]/hngnm"),"");
  720. //환자번호
  721. sSndMsg += astfPrintOut(30, 115, 3, "등록번호 " + model.getValue("/root/temp/prntpat/prcpdrug["+iPoint+"]/pid"),"");
  722. //성별나이
  723. sSndMsg += astfPrintOut(330, 115, 3, model.getValue("/root/temp/prntpat/prcpdrug["+iPoint+"]/sna"),"");
  724. //진료과
  725. sSndMsg += astfPrintOut(30, 165, 3, model.getValue("/root/temp/prntpat/prcpdrug["+iPoint+"]/orddeptnm") + "/" + model.getValue("/root/temp/prntpat/prcpdrug["+iPoint+"]/medispclidnm") + "/" + model.getValue("/root/temp/prntpat/prcpdrug["+iPoint+"]/atdoctidnm"),"");
  726. //주치의
  727. //sSndMsg += astfPrintOut(230, 165, 3, model.getValue("/root/temp/prntpat/prcpdrug["+iPoint+"]/atdoctidnm") + "/","");
  728. //담당의
  729. //sSndMsg += astfPrintOut(330, 165, 3, model.getValue("/root/temp/prntpat/prcpdrug["+iPoint+"]/medispclidnm"),"");
  730. //라벨출력일
  731. var lbldate = getCurrentDate();
  732. lbldate = lbldate.toDate().getDateFormat("YYYY/MM/DD") ;
  733. sSndMsg += astfPrintOut(280, 225, 3, lbldate,"");
  734. //종료(매수)
  735. sSndMsg += astfEndFormat(0);
  736. //alert(sSndMsg);
  737. //CommAX.SendMessage(sSndMsg);
  738. if(commkind == "01") { //COM 포트가 아닐때
  739. CommAX.SendMsg(sSndMsg);
  740. } else {
  741. CommAX.SendMessage(sSndMsg);
  742. }
  743. fSleep(500);
  744. sSndMsg = "";
  745. }
  746. }
  747. CommAX.PortClose();
  748. model.refresh();
  749. //}
  750. }
  751. function fPrintRex(rexnm, closeYn, printCount, dataXPath, paramsXPath, infoXPath, parentId){
  752. var posx = '';
  753. var posy = '';
  754. var printnm = '';
  755. if(infoXPath == "" || infoXPath == "undefined" || infoXPath == null) infoXPath = "/root/main/barcdprntsetup/prntsetupinfo";
  756. if(model.getValue(infoXPath + "/setupinfo/rexgbn") != "1") return false;
  757. try{
  758. if(model.getXpathValue("count(" + infoXPath + "/setupinfo/pcl/pcllist[barnm='"+rexnm+"']/barnm)") > "0"){
  759. posx = model.getValue(infoXPath + "/setupinfo/pcl/pcllist[barnm='"+rexnm+"']/xpos");
  760. posy = model.getValue(infoXPath + "/setupinfo/pcl/pcllist[barnm='"+rexnm+"']/ypos");
  761. printnm = model.getValue(infoXPath + "/setupinfo/pcl/pcllist[barnm='"+rexnm+"']/prtnm");
  762. }else{
  763. posx = model.getValue(infoXPath + "/setupinfo/blank/left");
  764. posy = model.getValue(infoXPath + "/setupinfo/blank/top");
  765. printnm = model.getValue(infoXPath + "/setupinfo/comm01/setupval");
  766. }
  767. if(posx == '') posx = "0";
  768. if(posy == '') posy = "0";
  769. if(closeYn == "true") printnm = "";
  770. exeRexPreview(rexnm, 'XMLSTR', paramsXPath, '', printnm,
  771. '', '', '', '', '',
  772. '', parentId, '', '', '',
  773. printCount, '', 'offsetx=' + posx + ';offsety=' + posy + ';', dataXPath, '',
  774. '');
  775. }
  776. catch(e){
  777. alert("출력시 오류가 발생하였습니다\n" + e);
  778. return true;
  779. }
  780. return true;
  781. }
  782. function exeRexPreview(rid, dataType, paramsXPath, submitId, print, printDialog, fileType, fileName, fileDialog, closeYn, monNo, parentObjId, printPaperBin, userService, showButton, printCount, zoomRate, printOption, dataXPath, mainDataXPath, subDataXPath)
  783. {
  784. var reportNode = instance1.selectSingleNode(gvReportPath);
  785. var syscd = getSystemCd();
  786. syscd = syscd.substr(3,3);
  787. //if(syscd == "888" || syscd == "999" || syscd == "") syscd = "001";
  788. if(syscd == "") syscd = "001";
  789. //레포트 관련 내용 초기화
  790. if(reportNode != null){
  791. model.removeNodeset(gvReportPath);
  792. }
  793. model.makeNode(gvReportPath);
  794. model.makeNode(gvReportParamsPath);
  795. model.makeNode(gvReportPropsPath);
  796. model.makeNode(gvReportOptionsPath);
  797. paramsXPath = instance1.selectSingleNode(paramsXPath);
  798. if(paramsXPath != null){
  799. model.copyNode(gvReportParamsPath, paramsXPath);
  800. }
  801. model.makeValue(gvReportParamsPath+"/userid", getUserId());
  802. model.makeValue(gvReportParamsPath+"/logoimgurl", getImageURL("error_logo"+getLogoImageKey()));
  803. model.makeValue(gvReportParamsPath+"/url", rid);
  804. model.makeValue(gvReportPropsPath+"/rex_rptname", rid);
  805. model.makeValue(gvReportPropsPath+"/rex_datatype", dataType);
  806. model.makeValue(gvReportPropsPath+"/rex_submitid", submitId);
  807. model.makeValue(gvReportPropsPath+"/rex_userservice", userService);
  808. model.makeValue(gvReportPropsPath+"/rex_data_xpath", dataXPath);
  809. model.makeValue(gvReportPropsPath+"/rex_xpath", mainDataXPath);
  810. model.makeValue(gvReportPropsPath+"/rex_xpath1", subDataXPath);
  811. model.makeValue(gvReportOptionsPath+"/rex_print", print);
  812. model.makeValue(gvReportOptionsPath+"/rex_printdialog", printDialog);
  813. model.makeValue(gvReportOptionsPath+"/rex_printpaperbin", printPaperBin);
  814. model.makeValue(gvReportOptionsPath+"/rex_filetype", fileType);
  815. model.makeValue(gvReportOptionsPath+"/rex_filename", fileName);
  816. model.makeValue(gvReportOptionsPath+"/rex_filedialog", fileDialog);
  817. model.makeValue(gvReportOptionsPath+"/rex_close", closeYn);
  818. model.makeValue(gvReportOptionsPath+"/rex_showbutton", showButton);
  819. model.makeValue(gvReportOptionsPath+"/rex_printcount", printCount);
  820. model.makeValue(gvReportOptionsPath+"/rex_zoomrate", zoomRate);
  821. model.makeValue(gvReportOptionsPath+"/rex_printoption", printOption);
  822. if(parentObjId == null || parentObjId == ""){
  823. if(document.all("ivr_report") == null){
  824. //popup
  825. setParameter("onready","true");
  826. modal("SPZUR00100", monNo);
  827. }else{
  828. //iviewer
  829. ivr_report.window.javascript.fInitRexpert();
  830. }
  831. }else{
  832. var parentObj = document.all("ivr_"+parentObjId);
  833. if(parentObj != null){
  834. var childObj = document.all("ivr_"+parentObjId);
  835. if(childObj != null){
  836. gCurrPrtObj = "ivr_"+parentObjId; //삭제할 viewer를 현재 출력 obj변수에 설정하고.. 프린트 끝난후 현재변수의 Iviewer를 삭제
  837. childObj.window.javascript.fInitRexpert();
  838. }
  839. }
  840. }
  841. }
  842. function fSleep(numberMillis) {
  843. var now = new Date();
  844. var exitTime = now.getTime() + numberMillis;
  845. while (true) {
  846. now = new Date();
  847. if (now.getTime() > exitTime)
  848. return;
  849. }
  850. }
  851. function fSetNode() {
  852. if ( isSearchString(chk_deptflag.value, "W") && isSearchString(chk_drugflag1.value, "2") && isSearchString(rdo_prcp.value, "E") ) {
  853. model.setValue("/root/send/srchdata/spclflag1", "W");
  854. }
  855. if( isSearchString(chk_deptflag.value, "E") && isSearchString(chk_drugflag1.value, "2" )) {
  856. model.setValue("/root/send/srchdata/spclflag2", "E");
  857. }
  858. if( isSearchString(chk_deptflag.value, "J") && isSearchString(chk_drugflag1.value, "2" )) {
  859. model.setValue("/root/send/srchdata/spclflag3", "J");
  860. }
  861. }
  862. function fUnChkAll() {
  863. /*
  864. var s = chk_deptcd.choices.itemset.attribute("nodeset");
  865. var iCnt = getNodesetCount(s);
  866. var rtn = "";
  867. for (var i = 1; i <= iCnt; i++) {
  868. rtn += model.getValue(s+"["+i+"]/deptcd") +"|";
  869. }
  870. rtn = rtn.substring(0, rtn.length-1);
  871. chk_deptcd.value = rtn;
  872. */
  873. chk_deptcd.value = "";
  874. }
  875. function fAppendSaveNode( desNode, srcNodeList ) {
  876. var saveDrPrcpList = model.instances(0).selectNodes( srcNodeList ); //의사처방 저장데이터
  877. for(var i = 0; i < saveDrPrcpList.length; i++) {
  878. var destNode = model.instances(0).selectSingleNode( desNode );
  879. destNode.appendChild(saveDrPrcpList.item(i).cloneNode(true));
  880. }
  881. }
  882. ////////////////////2015년 6월16일 김치국 라벨처리
  883. function fPrintBigbar(){
  884. var sbarcode = model.getValue("/root/temp/barcodeprt");
  885. if (sbarcode == 'Y') {
  886. // debugger;
  887. model.removeNodeset("/root/temp/temp");
  888. model.makeNode("/root/temp/temp");
  889. submit("TRADT10351");
  890. model.refresh();
  891. for(var k = 1 ; k <= getNodesetCount("/root/temp/temp/sumpid") ; k++){
  892. // for(var k = 1 ; k <= 1 ; k++){
  893. var vpid = model.getValue("/root/temp/temp/sumpid["+k+"]/pid");
  894. var vdrugno = model.getValue("/root/temp/temp/sumpid["+k+"]/drugno");
  895. var vsumdt = model.getValue("/root/send/srchdata/sumdt");
  896. // alert(vsumdt) ;
  897. model.setValue("/root/send/srchdata/pid", vpid);
  898. model.setValue("/root/send/srchdata/drugno", vdrugno);
  899. model.removeNodeset("/root/main/prnt/lbllist/lbllist");
  900. model.makeNode("/root/main/prnt/lbllist/lbllist");
  901. modal("SMADT10311",0,200,200,"SMADT10311","/root/send/srchdata","/root/send/srchdata");
  902. model.refresh();
  903. }
  904. }
  905. }
  906. /////////////////////
  907. ]]>
  908. </script>
  909. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  910. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  911. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  912. <script type="javascript" src="../../../com/departmentcodeweb/js/ZSD001.js"/>
  913. <script type="javascript" src="../../../ast/commonweb/js/AST.js"/>
  914. <script type="javascript" src="../../../ast/commonweb/js/stringHelper.js"/>
  915. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  916. <script type="javascript" src="../../../ast/pharmacyweb/js/SPADT62305.js"/>
  917. <submission id="TRADT10321" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdata" replace="instance" resultref="/root/init/orddept"/>
  918. <submission id="TRADT10322" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdata" replace="instance" resultref="/root/main/sumlist"/>
  919. <submission id="TRADT10323" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdata" replace="instance" resultref="/root/main/prcplist"/>
  920. <submission id="TRADT10324" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/temp/srchdata" replace="instance" resultref="/root/main/sumterm"/>
  921. <submission id="TRADT10330" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/init/sumorddept"/>
  922. <submission id="TRADT10329" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdata" replace="instance" resultref="/root/temp/prntprcpinfo"/>
  923. <submission id="TRADT10331" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdetlinfo" replace="instance" resultref="/root/main/detlprcplist"/>
  924. <submission id="TRADT10332" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdata" replace="instance" resultref="/root/temp/prntudsinfo"/>
  925. <submission id="TRADT10333" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchpid" replace="instance" resultref="/root/temp/prntpatprcp"/>
  926. <submission id="TRADT10334" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdata" replace="instance" resultref="/root/temp/prntprcpinfo"/>
  927. <submission id="TXADT10321" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/temp/ret"/>
  928. <submission id="TXADT10322" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdata" replace="instance" add="bottom" resultref="/root/temp/ret"/>
  929. <submission id="TXADT10333" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" add="bottom" resultref="/root/temp/ret"/>
  930. <submission id="TXADT10323" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/temp/sumrslt"/>
  931. <submission id="TRADT10336" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdata" replace="instance" resultref="/root/main/barlist"/>
  932. <submission id="TRADT10337" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdata" replace="instance" resultref="/root/temp/prntpat"/>
  933. <!--병동별네임카드출력 -->
  934. <submission id="TRADT10345" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdata" replace="instance" resultref="/root/temp/prntpat"/>
  935. <submission id="TRADT10318" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdata" resultref="/root/init/allsumorddept"/>
  936. <!-- 프린터 설정-->
  937. <submission id="TRLLC90101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/barcdprntsetup"/>
  938. <submission id="TRADT00704" mediatype="application/x-www-form-urlencoded" method="post" replace="instance" resultref="/root/hidden/stocdeptlist"/>
  939. <submission id="TRADT10342" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdata" resultref="/root/temp/sumprntyn"/>
  940. <!-- 프린터 설정-->
  941. <submission id="TRADT10350" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdata" replace="instance" resultref="/root/main/prnt"/>
  942. <!-- 개인별 바코드 출력을 위한 던지는 쿼리-->
  943. <submission id="TRADT10351" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdata" replace="instance" resultref="/root/temp/sumpid"/>
  944. </model>
  945. </xhtml:head>
  946. <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  947. <group id="group3" scroll="auto" style="left:0px; top:40px; width:1195px; height:744px; ">
  948. <datagrid id="grd_sumlist" nodeset="/root/main/sumlist/suminfo" caption="Group코드^처방코드^처방명^총불출수량" colsep="^" colwidth="87, 101, 210, 72" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:684px; top:80px; width:510px; height:220px; ">
  949. <col ref="groupcd"/>
  950. <col ref="prcpcd"/>
  951. <col ref="prcpnm"/>
  952. <col ref="sumqty" style="text-align:right; "/>
  953. <script type="javascript" ev:event="onclick">
  954. <![CDATA[
  955. if ( ! isDataCell() ) return;
  956. group5.visible = false;
  957. model.setValue("/root/send/srchdata/srchprcpcd", model.getValue("/root/main/sumlist/suminfo["+grd_sumlist.row+"]/prcpcd"));
  958. submit("TRADT10323");
  959. model.refresh();
  960. ]]>
  961. </script>
  962. </datagrid>
  963. <datagrid id="grd_prcplist" nodeset="/root/main/prcplist/prcpinfo" allowselection="false" caption="구분^구분^구분^투약번호^병실^등록번호^환자명^orddeptcd^진료과^병동^Group코드^처방코드^처방명^1일수량^1회수량^횟수^일수^불출수량^실시일시^집계시간^처방번호^처방일자^반환일시^마감일시^출력일시" colsep="^" colwidth="45, 48, 46, 56, 53, 73, 45, 0, 60, 41, 73, 90, 196, 49, 49, 36, 33, 59, 130, 130, 100, 100, 100, 127, 137" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:215px; top:305px; width:979px; height:435px; ">
  964. <col ref="flag1"/>
  965. <col ref="flag2"/>
  966. <col ref="flag3"/>
  967. <col ref="drugno" style="text-align:center; "/>
  968. <col ref="roomcd" style="text-align:center; "/>
  969. <col ref="pid"/>
  970. <col ref="hngnm"/>
  971. <col ref="orddeptcd"/>
  972. <col ref="orddeptnm"/>
  973. <col ref="wardcd"/>
  974. <col ref="groupcd"/>
  975. <col ref="prcpcd"/>
  976. <col ref="prcpnm" style="left:650px; top:23px; width:196px; height:23px; "/>
  977. <col ref="prcpqty" style="left:725px; top:23px; width:49px; height:23px; text-align:right; "/>
  978. <col ref="prcpqty2" style="left:725px; top:23px; width:49px; height:23px; text-align:right; "/>
  979. <col ref="prcptims"/>
  980. <col ref="prcpdayno" style="text-align:right; "/>
  981. <col ref="totqty" style="left:843px; top:23px; width:59px; height:23px; text-align:right; "/>
  982. <col ref="execdt" format="yyyy-mm-dd hh:nn" style="text-align:center; "/>
  983. <col ref="drugsumdt" format="yyyy-mm-dd hh:nn:ss" style="text-align:center; "/>
  984. <col ref="prcpno" visibility="hidden"/>
  985. <col ref="prcpdd" format="yyyy-mm-dd" style="text-align:center; "/>
  986. <col ref="rtndd"/>
  987. <col ref="sumdt" format="yyyy-mm-dd hh:nn:ss" style="text-align:center; "/>
  988. <col ref="prntdt" format="yyyy-mm-dd hh:nn:ss" style="text-align:center; "/>
  989. <script type="javascript" ev:event="ondblclick">
  990. <![CDATA[
  991. if ( ! isDataCell() ) return;
  992. var row = grd_prcplist.selectedRow(0);
  993. model.setValue("/root/send/srchdetlinfo/srchpid", model.getValue("/root/main/prcplist/prcpinfo["+row+"]/pid"));
  994. model.setValue("/root/send/srchdetlinfo/prcpno", model.getValue("/root/main/prcplist/prcpinfo["+row+"]/prcpno"));
  995. model.setValue("/root/send/srchdetlinfo/prcpdd", model.getValue("/root/main/prcplist/prcpinfo["+row+"]/prcpdd"));
  996. model.setValue("/root/send/srchdetlinfo/orddeptflag", model.getValue("/root/send/srchdata/srchorddeptflag"));
  997. submit("TRADT10331");
  998. group5.visible = true;
  999. model.refresh();
  1000. ]]>
  1001. </script>
  1002. <script type="javascript" ev:event="onmousedown">
  1003. <![CDATA[
  1004. setPopupMenu("grd_prcplist", false, "/root/hidden/popupmenu/menu", "label", "func");
  1005. ]]>
  1006. </script>
  1007. <script type="javascript" ev:event="DOMFocusOut">
  1008. <![CDATA[
  1009. initPopupMenu();
  1010. ]]>
  1011. </script>
  1012. <script type="javascript" ev:event="onaftersort">
  1013. <![CDATA[
  1014. grd_prcplist.gridToInstance();
  1015. ]]>
  1016. </script>
  1017. </datagrid>
  1018. <line id="line1" class="line_1" style="x1:0px; y1:72px; x2:1194px; y2:72px; "/>
  1019. <datagrid id="grd_deptlist" nodeset="/root/init/orddept/dept" allowselection="false" caption="^코드^부서^구분" colsep="^" colwidth="25, 37, 144, 100" explorerbar="sortshow" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowsep="|" style="left:0px; top:105px; width:210px; height:635px; ">
  1020. <col checkvalue="Y,N" ref="chk" type="checkbox"/>
  1021. <col ref="deptcd" visibility="hidden"/>
  1022. <col ref="depthngnm"/>
  1023. <col ref="orddeptflag" visibility="hidden"/>
  1024. <script type="javascript" ev:event="onclick">
  1025. <![CDATA[
  1026. fSetNode();
  1027. if ( ! isDataCell() ) return;
  1028. group5.visible = false;
  1029. if(model.getValue("/root/send/srchdata/udsflag") == "U" && model.getValue("/root/send/srchdata/drugflag")== "") {
  1030. messageBox("약품종류를 ", "C002");
  1031. return;
  1032. }
  1033. if ( grd_deptlist.col != grd_deptlist.colRef("chk")){
  1034. model.removeNodeset("/root/main/prcplist/prcpinfo");
  1035. model.setValue("/root/send/srchdata/srchorddeptcd", model.getValue("/root/init/orddept/dept["+grd_deptlist.row+"]/deptcd"));
  1036. model.setValue("/root/send/srchdata/srchorddeptflag", model.getValue("/root/init/orddept/dept["+grd_deptlist.row+"]/orddeptflag"));
  1037. submit("TRADT10322");
  1038. }
  1039. model.refresh();
  1040. ]]>
  1041. </script>
  1042. <script type="javascript" ev:event="onaftersort">
  1043. <![CDATA[
  1044. // 소트 후 인스턴스 정리
  1045. grd_deptlist.gridToInstance(); // Sort 된 Grid 상의 Data 순서와 Instance Node 상의 Data 순서를 동일하게 맞춰준다.
  1046. ]]>
  1047. </script>
  1048. </datagrid>
  1049. <datagrid id="grd_drugsum" nodeset="/root/main/sumterm/suminfo" autoresize="true" caption="집계구분^집계일시^집계구간^집계구간^집계구간^집계구간^집계부서^집계자" colsep="^" colwidth="121, 116, 68, 34, 68, 34, 400, 58" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowsep="|" style="left:215px; top:105px; width:465px; height:195px; ">
  1050. <col ref="sumflag"/>
  1051. <col ref="sumdt" format="yyyy-mm-dd hh:nn:ss"/>
  1052. <col ref="sumfromdd" format="yyyy-mm-dd"/>
  1053. <col ref="sumfromtm" format="hh:nn"/>
  1054. <col ref="sumtodd" format="yyyy-mm-dd" style="left:339px; top:23px; width:68px; height:23px; "/>
  1055. <col ref="sumtotm" format="hh:nn"/>
  1056. <col ref="sumdeptnm"/>
  1057. <col ref="sumnm"/>
  1058. <script type="javascript" ev:event="onclick">
  1059. <![CDATA[
  1060. if ( ! isDataCell() ) return;
  1061. fSelSum();
  1062. /*
  1063. function fSelSum(){
  1064. model.setValue("/root/temp/prntinfo/sumflag", model.getValue("/root/main/sumterm/suminfo["+grd_drugsum.row+"]/sumflag"));
  1065. model.setValue("/root/temp/prntinfo/sumfromdd", model.getValue("/root/main/sumterm/suminfo["+grd_drugsum.row+"]/sumfromdd"));
  1066. model.setValue("/root/temp/prntinfo/sumfromtm", model.getValue("/root/main/sumterm/suminfo["+grd_drugsum.row+"]/sumfromtm"));
  1067. model.setValue("/root/temp/prntinfo/sumtodd", model.getValue("/root/main/sumterm/suminfo["+grd_drugsum.row+"]/sumtodd"));
  1068. model.setValue("/root/temp/prntinfo/sumtotm", model.getValue("/root/main/sumterm/suminfo["+grd_drugsum.row+"]/sumtotm"));
  1069. model.setValue("/root/temp/prntinfo/sumdt", model.getValue("/root/main/sumterm/suminfo["+grd_drugsum.row+"]/sumdt"));
  1070. model.setValue("/root/send/srchdata/sumdt", model.getValue("/root/main/sumterm/suminfo["+grd_drugsum.row+"]/sumdt"));
  1071. submit("TRADT10330");
  1072. }
  1073. */
  1074. /*
  1075. model.setValue("/root/send/srchdata/srchorddeptcd", model.getValue("/root/init/orddept/dept[1]/deptcd"));
  1076. model.setValue("/root/send/srchdata/srchorddeptflag", model.getValue("/root/init/orddept/dept[1]/orddeptflag"));
  1077. submit("TRADT10305");
  1078. model.setValue("/root/send/srchdata/srchprcpcd", model.getValue("/root/main/sumlist/suminfo[1]/prcpcd"));
  1079. submit("TRADT10307");
  1080. */
  1081. ]]>
  1082. </script>
  1083. <script type="javascript" ev:event="onaftersort">
  1084. <![CDATA[
  1085. grd_drugsum.gridToInstance();
  1086. ]]>
  1087. </script>
  1088. </datagrid>
  1089. <caption id="caption3" class="search_name" style="left:5px; top:81px; width:63px; height:17px; ">부서명</caption>
  1090. <input id="input3" ref="/root/send/srchdata/srchdeptnm" class="input_default" style="left:73px; top:81px; width:137px; height:19px; ">
  1091. <script type="javascript" ev:event="onkeyup">
  1092. <![CDATA[
  1093. if(event.keyCode == "13") {
  1094. setInputNodeCurText();
  1095. btn_sea.dispatch("DOMActivate");
  1096. submit("TRADT10321");
  1097. }
  1098. ]]>
  1099. </script>
  1100. </input>
  1101. <group id="group6" visibility="hidden" style="left:230px; top:355px; width:935px; height:245px; ">
  1102. <button id="button2" class="btn4_letter2" style="left:875px; top:220px; width:56px; height:22px; ">
  1103. <caption>닫기</caption>
  1104. <script type="javascript" ev:event="DOMActivate">
  1105. <![CDATA[
  1106. group6.visible = false;
  1107. ]]>
  1108. </script>
  1109. </button>
  1110. <datagrid id="datagrid2" nodeset="/root/main/barlist/prcpinfo" allowselection="false" caption="구분^구분^구분^투약번호^병실^등록번호^환자명^진료과^Group코드^처방코드^처방명^1일수량^1회수량^횟수^일수^불출수량^실시일시^집계시간^처방번호^처방일자^반환일시^마감일시^출력일시" colsep="^" colwidth="42, 48, 46, 58, 43, 73, 45, 60, 73, 90, 196, 49, 49, 36, 33, 59, 130, 130, 100, 100, 100, 129, 131" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:5px; top:5px; width:925px; height:210px; ">
  1111. <col ref="flag1"/>
  1112. <col ref="flag2"/>
  1113. <col ref="flag3"/>
  1114. <col ref="drugno"/>
  1115. <col ref="roomcd"/>
  1116. <col ref="pid"/>
  1117. <col ref="hngnm"/>
  1118. <col ref="orddeptcd"/>
  1119. <col ref="groupcd"/>
  1120. <col ref="prcpcd"/>
  1121. <col ref="prcpnm"/>
  1122. <col ref="prcpqty" style="left:725px; top:23px; width:49px; height:23px; text-align:right; "/>
  1123. <col ref="prcpqty2" style="left:725px; top:23px; width:49px; height:23px; text-align:right; "/>
  1124. <col ref="prcptims"/>
  1125. <col ref="prcpdayno" style="text-align:right; "/>
  1126. <col ref="totqty" style="left:843px; top:23px; width:59px; height:23px; text-align:right; "/>
  1127. <col ref="execdt" format="yyyy-mm-dd hh:nn:ss" style="text-align:center; "/>
  1128. <col ref="drugsumdt" format="yyyy-mm-dd hh:nn:ss" style="text-align:center; "/>
  1129. <col ref="prcpno" visibility="hidden"/>
  1130. <col ref="prcpdd" format="yyyy-mm-dd"/>
  1131. <col ref="rtndd"/>
  1132. <col ref="sumdt" format="yyyy-mm-dd hh:nn:ss"/>
  1133. <col ref="prntdt" format="yyyy-mm-dd hh:nn:ss"/>
  1134. <script type="javascript" ev:event="ondblclick">
  1135. <![CDATA[
  1136. if ( ! isDataCell() ) return;
  1137. var row = grd_prcplist.selectedRow(0);
  1138. model.setValue("/root/send/srchdetlinfo/srchpid", model.getValue("/root/main/prcplist/prcpinfo["+row+"]/pid"));
  1139. model.setValue("/root/send/srchdetlinfo/prcpno", model.getValue("/root/main/prcplist/prcpinfo["+row+"]/prcpno"));
  1140. model.setValue("/root/send/srchdetlinfo/prcpdd", model.getValue("/root/main/prcplist/prcpinfo["+row+"]/prcpdd"));
  1141. model.setValue("/root/send/srchdetlinfo/orddeptflag", model.getValue("/root/send/srchdata/srchorddeptflag"));
  1142. submit("TRADT10331");
  1143. group5.visible = true;
  1144. model.refresh();
  1145. ]]>
  1146. </script>
  1147. <script type="javascript" ev:event="onmousedown">
  1148. <![CDATA[
  1149. setPopupMenu("grd_prcplist", false, "/root/hidden/popupmenu/menu", "label", "func");
  1150. ]]>
  1151. </script>
  1152. <script type="javascript" ev:event="DOMFocusOut">
  1153. <![CDATA[
  1154. initPopupMenu();
  1155. ]]>
  1156. </script>
  1157. </datagrid>
  1158. </group>
  1159. <input id="input6" ref="/root/temp/srchdata/srchfromdd" class="input_default" inputtype="date" style="left:487px; top:81px; width:90px; height:19px; ">
  1160. <script type="javascript" ev:event="xforms-value-changed">
  1161. <![CDATA[
  1162. submit("TRADT10324");
  1163. ]]>
  1164. </script>
  1165. </input>
  1166. <input id="input7" ref="/root/temp/srchdata/srchtodd" class="input_default" inputtype="date" style="left:590px; top:81px; width:90px; height:19px; ">
  1167. <script type="javascript" ev:event="xforms-value-changed">
  1168. <![CDATA[
  1169. submit("TRADT10324");
  1170. ]]>
  1171. </script>
  1172. </input>
  1173. <caption id="caption10" style="left:577px; top:82px; width:15px; height:20px; vertical-align:middle; ">~</caption>
  1174. <caption id="caption11" class="search_name" style="left:394px; top:81px; width:101px; height:17px; ">집계일자 :</caption>
  1175. <group id="group5" visibility="hidden" style="left:290px; top:430px; width:790px; height:220px; ">
  1176. <datagrid id="datagrid1" nodeset="/root/main/detlprcplist/detlprcpinfo" visibility="visible" scroll="auto" caption="구분^ioflag^처방번호^투약번호^병실^실시일자^실시시간^집계일시^집계부서^시행부서^발행부서^마감일시^출력일시" colsep="^" colwidth="40, 5, 3, 57, 51, 81, 71, 123, 121, 121, 121, 120, 138" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:0px; top:0px; width:790px; height:190px; ">
  1177. <col ref="ioflagnm" style="text-align:center; "/>
  1178. <col ref="ioflag" visibility="hidden"/>
  1179. <col ref="prcpno" visibility="hidden" style="text-align:center; ">
  1180. <![CDATA[/>]]>
  1181. </col>
  1182. <col ref="drugno" style="text-align:center; "/>
  1183. <col ref="roomcd" style="text-align:center; "/>
  1184. <col ref="execdd" format="yyyy-mm-dd" style="text-align:center; "/>
  1185. <col ref="exectm" format="hh:nn" style="text-align:center; "/>
  1186. <col ref="drugsumdt" format="yyyy-mm-dd hh:nn:ss" style="text-align:center; "/>
  1187. <col ref="sumdeptnm" style="text-align:center; "/>
  1188. <col ref="execdeptnm" style="text-align:center; "/>
  1189. <col ref="issdeptcdnm" style="text-align:center; "/>
  1190. <col ref="sumdt" format="yyyy-mm-dd hh:nn:ss" style="text-align:center; "/>
  1191. <col ref="prntdt" format="yyyy-mm-dd hh:nn:ss" style="text-align:center; "/>
  1192. </datagrid>
  1193. <button id="button10" class="btn4_letter2" style="left:730px; top:195px; width:56px; height:22px; ">
  1194. <caption>닫기</caption>
  1195. <script type="javascript" ev:event="DOMActivate">
  1196. <![CDATA[
  1197. group5.visible = false;
  1198. ]]>
  1199. </script>
  1200. </button>
  1201. </group>
  1202. <select id="chk_barcode" ref="/root/temp/barcodeprt" overflow="visible" appearance="full" style="left:307px; top:83px; width:89px; height:15px; font-size:10pt; border-style:none; ">
  1203. <choices>
  1204. <item>
  1205. <label>FillList라벨</label>
  1206. <value>Y</value>
  1207. </item>
  1208. </choices>
  1209. </select>
  1210. <select id="chk_fillno" ref="/root/temp/filllistno" overflow="visible" appearance="full" style="left:221px; top:83px; width:79px; height:15px; font-size:10pt; border-style:none; ">
  1211. <choices>
  1212. <item>
  1213. <label>FillList</label>
  1214. <value>Y</value>
  1215. </item>
  1216. </choices>
  1217. </select>
  1218. </group>
  1219. <group id="group1" style="left:0px; top:0px; width:1194px; height:13px; ">
  1220. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:800px; height:14px; ">
  1221. <![CDATA[약국 집계]]>
  1222. </caption>
  1223. </group>
  1224. <group id="group4" scroll="auto" style="left:0px; top:13px; width:1195px; height:27px; ">
  1225. <button id="btn_prntsum" class="btn6_letter5" style="left:295px; top:5px; width:92px; height:22px; ">
  1226. <caption>집계표출력</caption>
  1227. <script type="javascript" ev:event="DOMActivate">
  1228. <![CDATA[
  1229. //exeReportPreview("RPADT10300", "XML", "/root/send/srchdata");
  1230. if(model.getValue("/root/temp/sumprntyn/info/prntyn") == "Y") {// 고가, 향정 출력물은 옵션화
  1231. model.makeNode("/root/temp/prntprcpinfo/sumtitle");
  1232. submit("TRADT10334"); // 집계구간내 향정,영양수액,고가 품목/집계량 조회
  1233. if(model.getValue("/root/temp/prntprcpinfo/sumtitle/drugcd") != ""){
  1234. for(var i = 0; i < 2; i++){
  1235. if(i == 0){
  1236. model.setValue("/root/temp/prntinfo/usetype", "<약국용>");
  1237. }else model.setValue("/root/temp/prntinfo/usetype", "<병동용>");
  1238. model.refresh();
  1239. exeReportPreview("RPADT10306", "XMLSTR", "", "", "true","","","","","true"); // 집계표 맨 앞장 (향정신성 및 고가의약품 총집계량)
  1240. if(getNodesetCount("/root/temp/prntprcpinfo/expnlist") > 0){
  1241. exeReportPreview("RPADT10307", "XMLSTR", "", "", "true","","","","","true"); // 집계표 맨 앞장 (고가리스트)
  1242. }
  1243. }
  1244. }
  1245. }
  1246. for(var i = grd_sumdeptlist.fixedRows; i < grd_sumdeptlist.rows; i++){
  1247. if ( model.getValue("/root/init/sumorddept/dept["+i+"]/chk") == "Y"){
  1248. model.setValue("/root/send/srchdata/srchorddeptcd", model.getValue("/root/init/sumorddept/dept["+i+"]/deptcd"));
  1249. if(submit("TRADT10329")){ // 병동별 집계
  1250. var item_cnt = getNodesetCount("/root/temp/prntprcpinfo/suminfo");
  1251. if(item_cnt > 0) { // 2009.10.30 pymi 교환약만 집계된 출력물은 제외
  1252. model.setValue("/root/temp/prntinfo/wardnm", model.getValue("/root/temp/prntprcpinfo/suminfo["+item_cnt+"]/wardnm"));
  1253. //alert(item_cnt+". 전송병실 : " + model.getValue("/root/temp/prntinfo/wardnm")+ "\n집계된부서 : "+model.getValue("/root/temp/prntprcpinfo/suminfo["+(item_cnt)+"]/wardnm"));
  1254. var div_cnt = 1;
  1255. for(var j = 1; j <= item_cnt; j++){
  1256. if((j-1) % 10 == 0){
  1257. div_cnt ++;
  1258. }
  1259. if(model.getValue("/root/temp/prntprcpinfo/suminfo["+j+"]/keepmthdyn") == "Y"){
  1260. model.setValue("/root/temp/prntprcpinfo/suminfo["+j+"]/divflag", div_cnt);
  1261. }
  1262. }
  1263. for(var cnt = 0; cnt < 2; cnt++){
  1264. if(cnt == 0){
  1265. model.setValue("/root/temp/prntinfo/usetype", "<약국용>");
  1266. }else model.setValue("/root/temp/prntinfo/usetype", "<병동용>");
  1267. exeReportPreview("RPADT10301", "XMLSTR", "", "", "true","","","","","true");
  1268. }
  1269. }
  1270. }
  1271. }
  1272. }
  1273. ]]>
  1274. </script>
  1275. </button>
  1276. <button id="btn_sum" class="btn4_letter2" style="left:1058px; top:5px; width:56px; height:22px; ">
  1277. <caption>집계</caption>
  1278. <script type="javascript" ev:event="DOMActivate">
  1279. <![CDATA[
  1280. btn_sum.disabled =true;
  1281. model.setValue("/root/send/srchbcinfo/srchdrugdd" ,"-");
  1282. model.setValue("/root/send/srchbcinfo/srchdrugno" ,"0");
  1283. model.setValue("/root/send/srchbcinfo/srchioflag" ,"");
  1284. if ( messageBox("집계를 ","Q004")==6 ) {
  1285. if(model.getValue("/root/send/srchdata/udsflag") == "U" && model.getValue("/root/send/srchdata/drugflag")== "") {
  1286. messageBox("약품종류를 ", "C002");
  1287. btn_sum.disabled =false;
  1288. return;
  1289. }
  1290. var ptpall = model.getValue("/root/send/srchdata/ptpall");
  1291. if(fSelDeptchk() && ptpall != "Y"){ // 집계할 부서 선택 여부를 판별
  1292. var prcpkindcd = model.getValue("/root/send/srchdata/prcpkindcd");
  1293. var deptflag = chk_deptflag.value;
  1294. if(prcpkindcd == "" && deptflag.indexOf("W") >= 0) {
  1295. messageBox("집계할 처방의 구분2를","C002");
  1296. return ;
  1297. }
  1298. model.setValue("/root/send/srchdata/sumdt",getCurrentDate()+ getCurrentTime());
  1299. model.setValue("/root/send/srchdata/userid",getUserId());
  1300. model.setValue("/root/send/srchdata/instcd","");
  1301. model.setValue("/root/send/srchdata/srchprcpcd","");
  1302. if(submit("TXADT10323")){ // 약품집계 마스터에 집계사항 저장
  1303. for(var i = grd_deptlist.fixedRows; i < grd_deptlist.rows; i++){
  1304. if(model.getValue("/root/init/orddept/dept["+i+"]/chk") == "Y"){
  1305. model.removeNodeset("/root/send/deptdata/deptinfo");
  1306. //var irow = parseInt(getNodesetCount("/root/send/deptdata/deptinfo"))+1;
  1307. model.makeNode ( "/root/send/deptdata/deptinfo[1]/sumorddeptcd");
  1308. model.makeNode ( "/root/send/deptdata/deptinfo[1]/sumorddeptflag");
  1309. model.setValue("/root/send/deptdata/deptinfo[1]/sumorddeptcd",model.getValue("/root/init/orddept/dept["+i+"]/deptcd"));
  1310. model.setValue("/root/send/deptdata/deptinfo[1]/sumorddeptflag",model.getValue("/root/init/orddept/dept["+i+"]/orddeptflag"));
  1311. model.refresh();
  1312. submit("TXADT10321"); // 약품집계 처방상세 저장
  1313. }
  1314. }
  1315. submit("TRADT10324");
  1316. // 집계표 출력 대상 선택 start
  1317. var sumdt = model.getValue("/root/temp/sumrslt/sumdt");
  1318. var rowno = "";
  1319. if(sumdt != ""){
  1320. for(var i = grd_drugsum.fixedRows; i < grd_drugsum.rows; i++){
  1321. if(model.getValue("/root/main/sumterm/suminfo["+i+"]/sumdt") == sumdt){
  1322. break;
  1323. }
  1324. }
  1325. }
  1326. grd_drugsum.row = parseInt(i);
  1327. // 집계표 출력 대상 선택 end
  1328. var tmp = model.getValue("/root/main/sumterm/suminfo["+grd_drugsum.row+"]/sumdt");
  1329. if(model.getValue("/root/send/srchdata/drugflag") != "6") { //'UDS 내복약'을 집계하였을 경우에는 집계표를 자동으로 뽑지 않는다.
  1330. fSelSum(); // 집계표 출력값 설정
  1331. btn_prntsum.dispatch("DOMActivate"); // [집계표 출력]
  1332. }
  1333. }
  1334. } else if(!fSelDeptchk() && ptpall == "Y"){ // 20130405_ptp 만 전체 집계 시
  1335. var prcpkindcd = model.getValue("/root/send/srchdata/prcpkindcd");
  1336. var deptflag = chk_deptflag.value;
  1337. if(prcpkindcd == "" && deptflag.indexOf("W") >= 0) {
  1338. messageBox("집계할 처방의 구분2를","C002");
  1339. return ;
  1340. }
  1341. model.setValue("/root/send/srchdata/sumdt",getCurrentDate()+ getCurrentTime());
  1342. model.setValue("/root/send/srchdata/userid",getUserId());
  1343. model.setValue("/root/send/srchdata/instcd","");
  1344. model.setValue("/root/send/srchdata/srchprcpcd","");
  1345. if(submit("TXADT10323")){ // 약품집계 마스터에 집계사항 저장
  1346. //for(var i = grd_deptlist.fixedRows; i < grd_deptlist.rows; i++){
  1347. //if(model.getValue("/root/init/orddept/dept["+i+"]/chk") == "Y"){
  1348. model.removeNodeset("/root/send/deptdata/deptinfo");
  1349. //var irow = parseInt(getNodesetCount("/root/send/deptdata/deptinfo"))+1;
  1350. model.makeNode ( "/root/send/deptdata/deptinfo[1]/sumorddeptcd");
  1351. model.makeNode ( "/root/send/deptdata/deptinfo[1]/sumorddeptflag");
  1352. model.setValue("/root/send/deptdata/deptinfo[1]/sumorddeptcd","ptpall");
  1353. model.setValue("/root/send/deptdata/deptinfo[1]/sumorddeptflag","W");
  1354. model.refresh();
  1355. submit("TXADT10321"); // 약품집계 처방상세 저장
  1356. //}
  1357. //}
  1358. submit("TRADT10324");
  1359. // 집계표 출력 대상 선택 start
  1360. var sumdt = model.getValue("/root/temp/sumrslt/sumdt");
  1361. var rowno = "";
  1362. if(sumdt != ""){
  1363. for(var i = grd_drugsum.fixedRows; i < grd_drugsum.rows; i++){
  1364. if(model.getValue("/root/main/sumterm/suminfo["+i+"]/sumdt") == sumdt){
  1365. break;
  1366. }
  1367. }
  1368. }
  1369. grd_drugsum.row = parseInt(i);
  1370. // 집계표 출력 대상 선택 end
  1371. var tmp = model.getValue("/root/main/sumterm/suminfo["+grd_drugsum.row+"]/sumdt");
  1372. if(model.getValue("/root/send/srchdata/drugflag") != "6") { //'UDS 내복약'을 집계하였을 경우에는 집계표를 자동으로 뽑지 않는다.
  1373. fSelSum(); // 집계표 출력값 설정
  1374. btn_prntsum.dispatch("DOMActivate"); // [집계표 출력]
  1375. }
  1376. }
  1377. } else{
  1378. messageBox("집계할 부서를","C002");
  1379. }
  1380. }
  1381. model.setValue("/root/send/srchdata/pid","");
  1382. model.setValue("/root/send/srchdata/drugcd","");
  1383. model.refresh();
  1384. btn_sum.disabled =false;
  1385. ]]>
  1386. </script>
  1387. </button>
  1388. <button id="button3" class="btn6_letter6" style="left:385px; top:5px; width:104px; height:22px; ">
  1389. <caption>Fill List출력</caption>
  1390. <script type="javascript" ev:event="DOMActivate">
  1391. <![CDATA[
  1392. var prtPath = grd_sumdeptlist.nodeset;
  1393. var iCnt = getNodesetCount(prtPath);
  1394. if (grd_drugsum.row <= 0)
  1395. return;
  1396. //집계된 병동을 선택할지 묻는다.. 20120725 정창혁
  1397. if (iCnt > 1 && (messageBox("["+iCnt+"]건의 집계된 병동이 존재합니다. 출력할 병동을", "Q013") == 6)) {
  1398. model.removeNodeset("/root/init/sumdept");
  1399. model.makeNode("/root/init/sumdept");
  1400. model.copyNode("/root/init/sumdept", "/root/init/sumorddept");
  1401. model.refresh();
  1402. fUnChkAll();
  1403. var iHeight = ((Math.ceil(iCnt/3)+1)*20)+5;
  1404. grp_dept.attribute("style") = "left:390px; top:50px; width:570px; height:"+iHeight +"px; background-color:#fffbf2; border-color:#ffd799; border-width:1px; border-style:solid; "
  1405. grp_dept.visible = true;
  1406. } else {
  1407. messageBox("집계된 병동 전체를 출력합니다", "I000");
  1408. fPrtAllFillList(prtPath);
  1409. }
  1410. //return;
  1411. ]]>
  1412. </script>
  1413. </button>
  1414. <button id="button4" class="btn3_letter6" style="left:105px; top:5px; width:104px; height:22px; ">
  1415. <caption>집계현황조회</caption>
  1416. <script type="javascript" ev:event="DOMActivate">
  1417. <![CDATA[
  1418. open("SMADT10300",0,20,150,"SMADT10300","","");
  1419. ]]>
  1420. </script>
  1421. </button>
  1422. <button id="button5" class="btn4_letter4" style="left:1115px; top:5px; width:80px; height:22px; ">
  1423. <caption>집계취소</caption>
  1424. <script type="javascript" ev:event="DOMActivate">
  1425. <![CDATA[
  1426. if ( model.getValue("/root/send/srchdata/sumdt") ==""){
  1427. messageBox("취소할 집계 자료를 목록에서 ","C002");
  1428. return;
  1429. }
  1430. if ( messageBox("집계취소를 ","Q004")==6 ) {
  1431. submit("TXADT10322");
  1432. submit("TRADT10324");
  1433. }
  1434. ]]>
  1435. </script>
  1436. </button>
  1437. <button id="button6" class="btn6_letter6" style="left:487px; top:5px; width:104px; height:22px; ">
  1438. <caption>환자별검수지</caption>
  1439. <script type="javascript" ev:event="DOMActivate">
  1440. <![CDATA[
  1441. var sBfSumDT = "";
  1442. var sAfSumDT = "";
  1443. //for(var i = grd_sumdeptlist.fixedRows; i < grd_sumdeptlist.rows; i++){
  1444. //if ( model.getValue("/root/init/sumorddept/dept["+i+"]/chk")=="Y"){
  1445. //UDS로 집계된 사항만 환자별검수지 출력 가능
  1446. //if(model.getValue("/root/init/sumorddept/dept/sumkind") == "U"){
  1447. //model.setValue("/root/send/srchdata/srchorddeptcd", model.getValue("/root/init/sumorddept/dept["+i+"]/deptcd"));
  1448. //model.setValue("/root/temp/prntinfo/wardnm", model.getValue("/root/init/sumorddept/dept["+i+"]/depthngnm"));
  1449. sBfSumDT = model.getValue("/root/send/srchdata/sumdt");
  1450. for(var iNo = 1 ; iNo <= getNodesetCount("/root/main/sumterm/suminfo") ; iNo++) {
  1451. if(model.getValue("/root/main/sumterm/suminfo["+ iNo +"]/sumkind") == "U") {
  1452. // && model.getValue("/root/main/sumterm/suminfo["+ iNo +"]/sumflag2") == "R") {
  1453. if(sAfSumDT == "") {
  1454. sAfSumDT = model.getValue("/root/main/sumterm/suminfo["+ iNo +"]/sumdt");
  1455. } else {
  1456. sAfSumDT += "|" + model.getValue("/root/main/sumterm/suminfo["+ iNo +"]/sumdt");
  1457. }
  1458. }
  1459. }
  1460. model.makeValue("/root/send/srchdata/sumdt", sAfSumDT);
  1461. sAfAllSumDt = sAfSumDT;
  1462. if(submit("TRADT10318")) {
  1463. model.makeValue("/root/send/srchdata/sumdt", sBfSumDT);
  1464. grp_allsumdeptlist.attribute("left") = 490;
  1465. grp_allsumdeptlist.attribute("top") = 40;
  1466. grp_allsumdeptlist.attribute("width") = 385;
  1467. grp_allsumdeptlist.attribute("height") = 325;
  1468. button14.attribute("left") = 195;
  1469. button15.visible = false;
  1470. button14.visible = true;
  1471. grp_allsumdeptlist.visible = true;
  1472. model.refresh();
  1473. }
  1474. /*
  1475. }else{
  1476. messageBox("UDS 집계항목을", "C002");
  1477. break;
  1478. }
  1479. */
  1480. //}
  1481. //}
  1482. ]]>
  1483. </script>
  1484. </button>
  1485. <button id="button7" class="btn6_letter4" style="left:590px; top:5px; width:80px; height:22px; ">
  1486. <caption>네임카드</caption>
  1487. <script type="javascript" ev:event="DOMActivate">
  1488. <![CDATA[
  1489. /*
  1490. var sBfSumDT = "";
  1491. var sAfSumDT = "";
  1492. //for(var i = grd_sumdeptlist.fixedRows; i < grd_sumdeptlist.rows; i++){
  1493. //if ( model.getValue("/root/init/sumorddept/dept["+i+"]/chk")=="Y"){
  1494. //UDS로 집계된 사항만 네임카드 출력 가능
  1495. //if(model.getValue("/root/init/sumorddept/dept/sumkind") == "U"){
  1496. //model.setValue("/root/send/srchdata/srchorddeptcd", model.getValue("/root/init/sumorddept/dept["+i+"]/deptcd"));
  1497. //model.setValue("/root/temp/prntinfo/wardnm", model.getValue("/root/init/sumorddept/dept["+i+"]/depthngnm"));
  1498. sBfSumDT = model.getValue("/root/send/srchdata/sumdt");
  1499. for(var iNo = 1 ; iNo <= getNodesetCount("/root/main/sumterm/suminfo") ; iNo++) {
  1500. if(model.getValue("/root/main/sumterm/suminfo["+ iNo +"]/sumkind") == "U") {
  1501. // && model.getValue("/root/main/sumterm/suminfo["+ iNo +"]/sumflag2") == "R") {
  1502. if(sAfSumDT == "") {
  1503. sAfSumDT = model.getValue("/root/main/sumterm/suminfo["+ iNo +"]/sumdt");
  1504. } else {
  1505. sAfSumDT += "|" + model.getValue("/root/main/sumterm/suminfo["+ iNo +"]/sumdt");
  1506. }
  1507. }
  1508. }
  1509. model.makeValue("/root/send/srchdata/sumdt", sAfSumDT);
  1510. sAfAllSumDt = sAfSumDT;
  1511. if(submit("TRADT10318")) {
  1512. model.makeValue("/root/send/srchdata/sumdt", sBfSumDT);
  1513. grp_allsumdeptlist.attribute("left") = 590;
  1514. grp_allsumdeptlist.attribute("top") = 40;
  1515. grp_allsumdeptlist.attribute("width") = 385;
  1516. grp_allsumdeptlist.attribute("height") = 325;
  1517. button15.attribute("left") = 219;
  1518. button14.visible = false;
  1519. button15.visible = true;
  1520. grp_allsumdeptlist.visible = true;
  1521. model.refresh();
  1522. }
  1523. //}else{
  1524. // messageBox("UDS 집계항목을", "C002");
  1525. // break;
  1526. //}
  1527. //}
  1528. //}
  1529. */
  1530. var combDeptCd = "";
  1531. var deptNode = grd_deptlist.nodeset;
  1532. for(var iNo = 1 ; iNo <= getNodesetCount(deptNode) ; iNo++) {
  1533. if(model.getValue(deptNode+"["+ iNo +"]/chk") == "Y") {
  1534. combDeptCd += model.getValue(deptNode+"["+iNo+"]/deptcd")+"|";
  1535. }
  1536. }
  1537. if (combDeptCd.indexOf("|") > 0) { //선택된 부서가 있으면.. 한방에 처리..
  1538. model.makeValue("/root/send/srchdata/srchorddeptcd", combDeptCd.substring(0, combDeptCd.length));
  1539. submit("TRADT10345");
  1540. if (getNodesetCount(TRADT10345.attribute("resultref")+"/prcpdrug") == 0) {
  1541. messageBox("출력할 네임카드가", "I004");
  1542. return;
  1543. }
  1544. fLBLPrintR("report_1");
  1545. } else {
  1546. messageBox("부서를", "C002");
  1547. return;
  1548. }
  1549. ]]>
  1550. </script>
  1551. </button>
  1552. <button id="button8" class="btn3_letter6" style="left:0px; top:5px; width:104px; height:22px; ">
  1553. <caption>수액집계조회</caption>
  1554. <script type="javascript" ev:event="DOMActivate">
  1555. <![CDATA[
  1556. open("SMADT11001",0,20,150,"SMADT11001","","");
  1557. ]]>
  1558. </script>
  1559. </button>
  1560. <button id="button9" class="btn4_letter2" visibility="hidden" style="left:1000px; top:5px; width:56px; height:22px; ">
  1561. <caption>발주</caption>
  1562. <script type="javascript" ev:event="DOMActivate">
  1563. <![CDATA[
  1564. model.setValue("/root/send/srchdata/sumdt",model.getValue("/root/main/sumterm/suminfo["+grd_drugsum.row+"]/sumdt"));
  1565. submit("TXADT10333");
  1566. ]]>
  1567. </script>
  1568. </button>
  1569. <select1 id="cmb_stocdeptcd" ref="/root/send/srchdata/stocdeptcd" class="combo_search" appearance="minimal" style="left:955px; top:5px; width:100px; height:19px; ">
  1570. <choices>
  1571. <item>
  1572. <label>외래약국Unit</label>
  1573. <value>3242106000</value>
  1574. </item>
  1575. <item>
  1576. <label>병동약국Unit</label>
  1577. <value>3242107000</value>
  1578. </item>
  1579. <item>
  1580. <label>특수조제Unit</label>
  1581. <value>3242104000</value>
  1582. </item>
  1583. </choices>
  1584. </select1>
  1585. <caption id="caption21" class="cell_1" style="left:898px; top:3px; width:55px; height:23px; vertical-align:middle; ">불출부서</caption>
  1586. <button id="button1" class="btn6_letter7" style="left:670px; top:5px; width:116px; height:22px; ">
  1587. <caption>약품별목록출력</caption>
  1588. <script type="javascript" ev:event="DOMActivate">
  1589. <![CDATA[
  1590. model.setValue("/root/send/srchdata/orderby", "drugcd");
  1591. for(var i = grd_sumdeptlist.fixedRows; i < grd_sumdeptlist.rows; i++){
  1592. if ( model.getValue("/root/init/sumorddept/dept["+i+"]/chk")=="Y"){
  1593. //UDS로 집계된 사항만 Fill List로 출력 가능
  1594. ///if(model.getValue("/root/init/sumorddept/dept/sumkind") == "U"){
  1595. model.setValue("/root/send/srchdata/srchorddeptcd", model.getValue("/root/init/sumorddept/dept["+i+"]/deptcd"));
  1596. model.setValue("/root/temp/prntinfo/wardnm", model.getValue("/root/init/sumorddept/dept["+i+"]/depthngnm"));
  1597. submit("TRADT10332");
  1598. if(model.getValue("/root/temp/prntudsinfo/injinfo/pid") != ""){
  1599. exeReportPreview("RPADT10308", "XMLSTR", "", "", "true","","","","","true");
  1600. }
  1601. if(model.getValue("/root/temp/prntudsinfo/exuinfo/pid") != ""){
  1602. exeReportPreview("RPADT10309", "XMLSTR", "", "", "true","","","","","true");
  1603. }
  1604. if(model.getValue("/root/temp/prntudsinfo/ptpinfo/pid") != ""){
  1605. exeReportPreview("RPADT10310", "XMLSTR", "", "", "true","","","","","true");
  1606. }
  1607. //}else{
  1608. // messageBox("UDS 집계항목을", "C002");
  1609. // break;
  1610. //}
  1611. }
  1612. }
  1613. model.setValue("/root/send/srchdata/orderby", "");
  1614. ]]>
  1615. </script>
  1616. </button>
  1617. <button id="btn_prnt" class="btn3_letter5" navindex="18" style="left:205px; top:5px; width:92px; height:22px; ">
  1618. <caption>프린터설정</caption>
  1619. <script type="javascript" ev:event="DOMActivate">
  1620. <![CDATA[
  1621. fSetPrint();
  1622. ]]>
  1623. </script>
  1624. </button>
  1625. <button id="button11" class="btn6_letter6" style="left:786px; top:5px; width:104px; height:22px; ">
  1626. <caption>고가수액출력</caption>
  1627. <script type="javascript" ev:event="DOMActivate">
  1628. <![CDATA[
  1629. // 2009.09.02 pymi
  1630. model.makeNode("/root/temp/prntprcpinfo/sumtitle");
  1631. model.setValue("/root/send/srchdata/expnflag", "Y");
  1632. model.setValue("/root/temp/prntinfo/sumflagnm", "고가수액");
  1633. model.setValue("/root/temp/prntinfo/sumtotalnm", "< 고가수액 총집계량 >");
  1634. submit("TRADT10334");
  1635. if(model.getValue("/root/temp/prntprcpinfo/sumtitle/drugcd") != ""){
  1636. //for(var i = 0; i < 2; i++){
  1637. //if(i == 0){
  1638. model.setValue("/root/temp/prntinfo/usetype", "<약제팀용>");
  1639. //}else model.setValue("/root/temp/prntinfo/usetype", "<병동용>");
  1640. model.refresh();
  1641. exeReportPreview("RPADT10306", "XMLSTR", "", "", "true","","","","","true"); // 집계표 맨 앞장 (향정신성 및 고가의약품 총집계량)
  1642. /*if(getNodesetCount("/root/temp/prntprcpinfo/expnlist") > 0){
  1643. exeReportPreview("RPADT10307", "XMLSTR", "", "", "true","","","","","true"); // 집계표 맨 앞장 (고가리스트)
  1644. }*/
  1645. //}
  1646. }
  1647. for(var i = grd_sumdeptlist.fixedRows; i < grd_sumdeptlist.rows; i++){
  1648. if ( model.getValue("/root/init/sumorddept/dept["+i+"]/chk") == "Y"){
  1649. model.setValue("/root/send/srchdata/srchorddeptcd", model.getValue("/root/init/sumorddept/dept["+i+"]/deptcd"));
  1650. if(submit("TRADT10329")){ // 병동별 집계
  1651. var item_cnt = getNodesetCount("/root/temp/prntprcpinfo/suminfo");
  1652. if(item_cnt > 0) {
  1653. model.setValue("/root/temp/prntinfo/wardnm", model.getValue("/root/temp/prntprcpinfo/suminfo["+item_cnt+"]/wardnm"));
  1654. var div_cnt = 1;
  1655. for(var j = 1; j <= item_cnt; j++){
  1656. if((j-1) % 10 == 0){
  1657. div_cnt ++;
  1658. }
  1659. if(model.getValue("/root/temp/prntprcpinfo/suminfo["+j+"]/keepmthdyn") == "Y"){
  1660. model.setValue("/root/temp/prntprcpinfo/suminfo["+j+"]/divflag", div_cnt);
  1661. }
  1662. }
  1663. for(var cnt = 0; cnt < 2; cnt++){
  1664. if(cnt == 0){
  1665. model.setValue("/root/temp/prntinfo/usetype", "<약제팀용>");
  1666. }else model.setValue("/root/temp/prntinfo/usetype", "<병동용>");
  1667. exeReportPreview("RPADT10301", "XMLSTR", "", "", "true","","","","","true");
  1668. }
  1669. }
  1670. }
  1671. }
  1672. }
  1673. model.setValue("/root/send/srchdata/expnflag", "N");
  1674. model.setValue("/root/temp/prntinfo/sumflagnm", "약품");
  1675. model.setValue("/root/temp/prntinfo/sumtotalnm", "< 향정신성 및 고가의약품 총집계량 >");
  1676. // (e)
  1677. ]]>
  1678. </script>
  1679. </button>
  1680. </group>
  1681. <group id="group2" style="left:0px; top:40px; width:1195px; height:70px; ">
  1682. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:1px; width:1194px; height:65px; background-color:#fffbf2; border-color:#ffd799; "/>
  1683. <select id="chk_deptflag" ref="/root/send/srchdata/deptflag" class="checkbox_search" overflow="visible" appearance="full" cols="8" style="left:60px; top:11px; width:480px; height:20px; border-style:none; ">
  1684. <choices>
  1685. <item>
  1686. <label>병동</label>
  1687. <value>W</value>
  1688. </item>
  1689. <item>
  1690. <label>응급실</label>
  1691. <value>E</value>
  1692. </item>
  1693. <item>
  1694. <label>수술실</label>
  1695. <value>O</value>
  1696. </item>
  1697. <item>
  1698. <label>주사실</label>
  1699. <value>J</value>
  1700. </item>
  1701. <item>
  1702. <label>집계부서</label>
  1703. <value>X</value>
  1704. </item>
  1705. <item>
  1706. <label>진료부서</label>
  1707. <value>D</value>
  1708. </item>
  1709. <item>
  1710. <label>인공신장실</label>
  1711. <value>A</value>
  1712. </item>
  1713. <item>
  1714. <label>건진</label>
  1715. <value>S</value>
  1716. </item>
  1717. </choices>
  1718. <script type="javascript" ev:event="xforms-value-changed">
  1719. <![CDATA[
  1720. // 진료과
  1721. if(model.getValue("/root/send/srchdata/deptflag") != ""){
  1722. if (model.getValue("/root/send/srchdata/deptflag").indexOf("W") >-1 ){
  1723. if(model.getValue("/root/send/srchdata/prcpkindcd") =="") {
  1724. //messageBox("구분2 를 ","C001");
  1725. model.setValue("/root/send/srchdata/prcpkindcd" ,"A");
  1726. return;
  1727. }
  1728. rdo_prcp.visible=true;
  1729. bool_ptpall.visible=true; // 20130405_병동 선택시만 보이도록 수정
  1730. caption12.visible=true;
  1731. } else {
  1732. rdo_prcp.visible=false;
  1733. model.setValue("/root/send/srchdata/prcpkindcd","");
  1734. model.setValue("/root/send/srchdata/ptpall", "");
  1735. bool_ptpall.visible=false;
  1736. caption12.visible=false;
  1737. }
  1738. var drugcd = model.getValue("/root/send/srchdata/drugcd");
  1739. model.setValue("/root/send/srchdata/drugcd", drugcd.toUpperCase());
  1740. submit("TRADT10321");
  1741. }else{
  1742. model.removeNodeset("/root/init/orddept");
  1743. }
  1744. model.refresh();
  1745. ]]>
  1746. </script>
  1747. </select>
  1748. <caption id="caption2" class="search_name" style="left:5px; top:11px; width:60px; height:17px; ">대상:</caption>
  1749. <caption id="caption1" class="search_name" style="left:5px; top:36px; width:150px; height:17px; ">적용일자(실시일자) :</caption>
  1750. <caption id="caption4" class="search_name" style="left:535px; top:10px; width:70px; height:17px; ">구분1:</caption>
  1751. <caption id="caption5" class="search_name" style="left:805px; top:10px; width:70px; height:17px; ">구분2 :</caption>
  1752. <input id="input1" ref="/root/send/srchdata/srchfromtm" class="input_search" visibility="hidden" format="hh:nn" style="left:590px; top:45px; width:45px; height:19px; "/>
  1753. <input id="input2" ref="/root/send/srchdata/srchtotm" class="input_search" visibility="hidden" format="hh:nn" style="left:590px; top:25px; width:45px; height:19px; "/>
  1754. <line id="line13" class="line_4" style="x1:1132px; y1:11px; x2:1132px; y2:59px; border-color:#ffe4bb; border-left-style:solid; "/>
  1755. <button id="btn_sea" class="btn1_letter2" style="left:1135px; top:26px; width:56px; height:22px; ">
  1756. <caption>조회</caption>
  1757. <script type="javascript" ev:event="DOMActivate">
  1758. <![CDATA[
  1759. chk_deptflag.dispatch("xforms-value-changed");
  1760. //submit("TRADT10324");
  1761. ]]>
  1762. </script>
  1763. </button>
  1764. <input id="ipt_sumdt1" ref="/root/send/srchdata/srchfromdd" class="input_default" inputtype="date" style="left:158px; top:36px; width:90px; height:19px; "/>
  1765. <input id="ipt_sumdt2" ref="/root/send/srchdata/srchtodd" class="input_default" inputtype="date" style="left:261px; top:36px; width:90px; height:19px; "/>
  1766. <caption id="caption32" style="left:248px; top:36px; width:15px; height:20px; vertical-align:middle; ">~</caption>
  1767. <select id="rdo_prcp" ref="/root/send/srchdata/prcpkindcd" visibility="hidden" overflow="visible" appearance="full" cellspacing="5" cols="6" style="left:875px; top:10px; width:225px; height:20px; border-style:none; ">
  1768. <choices>
  1769. <item>
  1770. <label>정규</label>
  1771. <value>R</value>
  1772. </item>
  1773. <item>
  1774. <label>추가</label>
  1775. <value>A</value>
  1776. </item>
  1777. <item>
  1778. <label>응급</label>
  1779. <value>E</value>
  1780. </item>
  1781. <item>
  1782. <label>Admission</label>
  1783. <value>M</value>
  1784. </item>
  1785. </choices>
  1786. <script type="javascript" ev:event="xforms-value-changed">
  1787. <![CDATA[
  1788. if(model.getValue("/root/send/srchdata/prcpkindcd") =="") {
  1789. return;
  1790. } else {
  1791. submit("TRADT10322");
  1792. }
  1793. ]]>
  1794. </script>
  1795. </select>
  1796. <select1 id="radio1" ref="/root/send/srchdata/udsflag" appearance="full" cols="1" rows="2" vcellspacing="8" overflow="visible" style="left:595px; top:7px; width:50px; height:50px; border-style:none; ">
  1797. <choices>
  1798. <item>
  1799. <label>일반</label>
  1800. <value>N</value>
  1801. </item>
  1802. <item>
  1803. <label>UDS</label>
  1804. <value>U</value>
  1805. </item>
  1806. </choices>
  1807. <script type="javascript" ev:event="xforms-value-changed">
  1808. <![CDATA[
  1809. if(radio1.value == 'N'){
  1810. chk_drugflag2.value = "";
  1811. chk_drugflag2.disabled = true;
  1812. chk_drugflag1.value = "1 2";
  1813. chk_drugflag1.disabled = false;
  1814. }else if(radio1.value == 'U'){
  1815. chk_drugflag1.value = "";
  1816. chk_drugflag1.disabled = true;
  1817. chk_drugflag2.value = "";
  1818. chk_drugflag2.disabled = false;
  1819. }
  1820. submit("TRADT10322");
  1821. model.refresh();
  1822. ]]>
  1823. </script>
  1824. </select1>
  1825. <caption id="caption7" class="search_name" style="left:805px; top:36px; width:90px; height:17px; ">등록번호 :</caption>
  1826. <input id="input4" ref="/root/send/srchdata/pid" autonext="false" maxlength="10" format="9999999999" style="left:890px; top:36px; width:75px; height:19px; ">
  1827. <script type="javascript" ev:event="onkeydown">
  1828. <![CDATA[
  1829. inputEnterKey("chk_deptflag","xforms-value-changed");
  1830. ]]>
  1831. </script>
  1832. </input>
  1833. <caption id="caption8" class="search_name" style="left:970px; top:36px; width:90px; height:17px; ">약품코드 :</caption>
  1834. <input id="input5" ref="/root/send/srchdata/drugcd" style="left:1055px; top:36px; width:75px; height:19px; ">
  1835. <script type="javascript" ev:event="onkeydown">
  1836. <![CDATA[
  1837. inputEnterKey("chk_deptflag","xforms-value-changed");
  1838. ]]>
  1839. </script>
  1840. </input>
  1841. <select id="chk_drugflag1" ref="/root/send/srchdata/drugflag" class="checkbox_search" overflow="visible" appearance="full" cols="5" style="left:638px; top:10px; width:82px; height:20px; border-style:none; ">
  1842. <choices>
  1843. <item>
  1844. <label>약</label>
  1845. <value>1</value>
  1846. </item>
  1847. <item>
  1848. <label>주사</label>
  1849. <value>2</value>
  1850. </item>
  1851. </choices>
  1852. </select>
  1853. <select id="chk_drugflag2" ref="/root/send/srchdata/drugflag" class="checkbox_search" disabled="true" overflow="visible" appearance="full" cols="3" style="left:638px; top:31px; width:160px; height:34px; border-style:none; ">
  1854. <choices>
  1855. <item>
  1856. <label>PTP</label>
  1857. <value>3</value>
  1858. </item>
  1859. <item>
  1860. <label>주사</label>
  1861. <value>4</value>
  1862. </item>
  1863. <item>
  1864. <label>외용,수제</label>
  1865. <value>5</value>
  1866. </item>
  1867. <item>
  1868. <label>내복약</label>
  1869. <value>6</value>
  1870. </item>
  1871. </choices>
  1872. </select>
  1873. <input id="ipt_bcno1" ref="/root/send/srchbcinfo/srchbcno1" class="input_search" imemode="alpha" style="left:485px; top:36px; width:100px; height:19px; ">
  1874. <script type="javascript" ev:event="onkeyup">
  1875. <![CDATA[
  1876. var barcode = "";
  1877. var drugdd = "";
  1878. var drugno = "";
  1879. var ioflag = "";
  1880. if(event.keyCode == "13") {
  1881. // 바코드
  1882. setInputNodeCurText();
  1883. barcode = model.getValue("/root/send/srchbcinfo/srchbcno1");
  1884. if (barcode.length > 9) {
  1885. ioflag = barcode.substr(0,1);
  1886. drugdd = barcode.substr(1,8);
  1887. drugno = barcode.substr(9,barcode.length-9);
  1888. model.setValue("/root/send/srchbcinfo/srchbcno1","");
  1889. //if (ioflag.toUpperCase() != "I") {
  1890. // messageBox("입원처방이 아니므로 처리","E001");
  1891. // model.refresh();
  1892. // return;
  1893. //}
  1894. } else {
  1895. return;
  1896. }
  1897. // 조회
  1898. model.setValue("/root/send/srchbcinfo/srchdrugdd" ,drugdd);
  1899. model.setValue("/root/send/srchbcinfo/srchdrugno" ,drugno);
  1900. model.setValue("/root/send/srchbcinfo/srchioflag" ,"I");
  1901. model.setValue("/root/send/srchdata/sumdt",getCurrentDate()+ getCurrentTime());
  1902. model.setValue("/root/send/srchdata/userid",getUserId());
  1903. model.setValue("/root/send/srchdata/instcd","");
  1904. model.setValue("/root/send/srchdata/srchprcpcd","");
  1905. model.removeNodeset("/root/send/deptdata/deptinfo");
  1906. //var irow = parseInt(getNodesetCount("/root/send/deptdata/deptinfo"))+1;
  1907. model.makeNode ( "/root/send/deptdata/deptinfo[1]/sumorddeptcd");
  1908. model.makeNode ( "/root/send/deptdata/deptinfo[1]/sumorddeptflag");
  1909. model.setValue("/root/send/deptdata/deptinfo[1]/sumorddeptcd","-");
  1910. model.setValue("/root/send/deptdata/deptinfo[1]/sumorddeptflag","W");
  1911. model.refresh();
  1912. submit("TXADT10321");
  1913. submit("TRADT10336");
  1914. group6.visible=true;
  1915. model.setValue("/root/send/srchbcinfo/srchdrugdd" ,"-");
  1916. model.setValue("/root/send/srchbcinfo/srchdrugno" ,"0");
  1917. model.setValue("/root/send/srchbcinfo/srchioflag" ,"");
  1918. model.refresh();
  1919. if ( datagrid2.rows == 1 ){
  1920. messageBox("선불출할 데이터가 없습니다. ", "C999");
  1921. }
  1922. }
  1923. ]]>
  1924. </script>
  1925. </input>
  1926. <caption id="caption9" class="search_name" style="left:360px; top:36px; width:124px; height:17px; ">바코드(선불출) :</caption>
  1927. <group id="group7" visibility="hidden" style="left:1045px; top:5px; width:60px; height:50px; ">
  1928. <object id="CommAX" clsid="{B721F534-D025-466B-8A28-7CF40E700ACD}" style="left:5px; top:0px; width:45px; height:45px; "/>
  1929. </group>
  1930. <bool id="bool_ptpall" visibility="hidden" checkvalue="Y,N" overflow="visible" ref="/root/send/srchdata/ptpall" style="left:727px; top:8px; width:25px; height:20px; border-style:none; "/>
  1931. <caption id="caption12" visibility="hidden" style="left:751px; top:11px; width:45px; height:15px; ">PTP만</caption>
  1932. </group>
  1933. <datagrid id="grd_sumdeptlist" nodeset="/root/init/sumorddept/dept" visibility="hidden" caption="^코드^부서" colsep="^" colwidth="25, 93, 234" explorerbar="sortshow" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowsep="|" style="left:360px; top:175px; width:375px; height:85px; ">
  1934. <col checkvalue="Y,N" ref="chk" type="checkbox"/>
  1935. <col ref="deptcd"/>
  1936. <col ref="depthngnm"/>
  1937. <script type="javascript" ev:event="onclick">
  1938. <![CDATA[
  1939. model.setValue("/root/send/srchdata/srchorddeptcd", model.getValue("/root/init/orddept/dept["+grd_deptlist.row+"]/deptcd"));
  1940. model.setValue("/root/send/srchdata/srchorddeptflag", model.getValue("/root/init/orddept/dept["+grd_deptlist.row+"]/orddeptflag"));
  1941. submit("TRADT10305");
  1942. model.setValue("/root/send/srchdata/srchprcpcd", model.getValue("/root/main/sumlist/suminfo[1]/prcpcd"));
  1943. submit("TRADT10307");
  1944. ]]>
  1945. </script>
  1946. </datagrid>
  1947. <button id="button12" class="btn4_letter3" visibility="hidden" style="left:1055px; top:90px; width:68px; height:22px; ">
  1948. <caption>구집계</caption>
  1949. <script type="javascript" ev:event="DOMActivate">
  1950. <![CDATA[
  1951. model.makeValue ("/root/send/srchdata/sumver","old");
  1952. ]]>
  1953. </script>
  1954. </button>
  1955. <script type="javascript" ev:event="onkeyup">
  1956. <![CDATA[
  1957. if (event.keyCode==121){
  1958. button12.visible=true;
  1959. button13.visible=true;
  1960. }
  1961. ]]>
  1962. </script>
  1963. <button id="button13" class="btn4_letter3" visibility="hidden" style="left:1126px; top:90px; width:68px; height:22px; ">
  1964. <caption>신집계</caption>
  1965. <script type="javascript" ev:event="DOMActivate">
  1966. <![CDATA[
  1967. model.makeValue ("/root/send/srchdata/sumver","new");
  1968. ]]>
  1969. </script>
  1970. </button>
  1971. <group id="grp_allsumdeptlist" visibility="hidden" style="left:745px; top:175px; width:385px; height:325px; ">
  1972. <button id="button14" class="btn6_letter8" style="left:195px; top:295px; width:128px; height:22px; ">
  1973. <caption>환자별검수지출력</caption>
  1974. <script type="javascript" ev:event="DOMActivate">
  1975. <![CDATA[
  1976. var sCurPid = "";
  1977. var sBfPid = "";
  1978. var iRowNumber = 1;
  1979. var sBfSumDeptCd = "";
  1980. var sAfSumDeptCd = "";
  1981. var sBfSumDT = "";
  1982. sBfSumDT = model.getValue("/root/send/srchdata/sumdt");
  1983. sBfSumDeptCd = model.getValue("/root/send/srchdata/srchorddeptcd");
  1984. for(var iNo = 1 ; iNo <= getNodesetCount("/root/init/allsumorddept/dept") ; iNo++) {
  1985. sCurPid = "";
  1986. sBfPid = "";
  1987. iRowNumber = 1;
  1988. if(model.getValue("/root/init/allsumorddept/dept["+ iNo +"]/chk") == "Y") {
  1989. //if(sAfSumDeptCd == "") {
  1990. // sAfSumDeptCd = model.getValue("/root/init/allsumorddept/dept["+ iNo +"]/deptcd");
  1991. //} else {
  1992. // sAfSumDeptCd += "|" + model.getValue("/root/init/allsumorddept/dept["+ iNo +"]/deptcd");
  1993. //}
  1994. sAfSumDeptCd = model.getValue("/root/init/allsumorddept/dept["+ iNo +"]/deptcd");
  1995. model.makeValue("/root/send/srchdata/sumdt", sAfAllSumDt);
  1996. model.makeValue("/root/send/srchdata/srchorddeptcd", sAfSumDeptCd);
  1997. submit("TRADT10333");
  1998. model.makeValue("/root/send/srchdata/sumdt", sBfSumDT);
  1999. model.makeValue("/root/send/srchdata/srchorddeptcd", sBfSumDeptCd);
  2000. //---------------------------------------------------------------------------------------------------
  2001. //등록번호 별로 구분 하여 출력 한다.
  2002. model.removenode("/root/temp/tempprntpatprcp");
  2003. model.makeNode("/root/temp/tempprntpatprcp");
  2004. model.copyNode("/root/temp/tempprntpatprcp", "/root/temp/prntpatprcp");
  2005. model.removenode("/root/temp/prntpatprcp");
  2006. for(var iRowNo = 1 ; iRowNo <= getNodesetCount("/root/temp/tempprntpatprcp/prcpdrug") ; iRowNo++) {
  2007. sCurPid = model.getValue("/root/temp/tempprntpatprcp/prcpdrug["+ iRowNo +"]/pid");
  2008. if(sCurPid != sBfPid) {
  2009. iRowNumber = 1;
  2010. model.removenode("/root/temp/prntpatprcp");
  2011. for(var iRNo = 1 ; iRNo <= getNodesetCount("/root/temp/tempprntpatprcp/prcpdrug") ; iRNo++) {
  2012. if(sCurPid == model.getValue("/root/temp/tempprntpatprcp/prcpdrug["+ iRNo +"]/pid")) {
  2013. model.makeNode("/root/temp/prntpatprcp/prcpdrug["+ iRowNumber +"]");
  2014. model.copyNode("/root/temp/prntpatprcp/prcpdrug["+ iRowNumber +"]", "/root/temp/tempprntpatprcp/prcpdrug["+ iRNo +"]");
  2015. iRowNumber++;
  2016. }
  2017. }
  2018. iRowNumber1 = 1;
  2019. for(var iRNo = 1 ; iRNo <= getNodesetCount("/root/temp/tempprntpatprcp/resn") ; iRNo++) {
  2020. if(sCurPid == model.getValue("/root/temp/tempprntpatprcp/resn["+ iRNo +"]/pid")) {
  2021. model.makeNode("/root/temp/prntpatprcp/resn["+ iRowNumber1 +"]");
  2022. model.copyNode("/root/temp/prntpatprcp/resn["+ iRowNumber1 +"]", "/root/temp/tempprntpatprcp/resn["+ iRNo +"]");
  2023. iRowNumber1++;
  2024. }
  2025. }
  2026. var chkresn = model.getValue("/root/temp/prntpatprcp/resn/pid");
  2027. //alert(chkresn);
  2028. //출력
  2029. if(model.getValue("/root/temp/prntpatprcp/prcpdrug/pid") != ""){
  2030. if(isNull(chkresn)){
  2031. exeReportPreview("RPADT10305", "XMLSTR", "", "", "true","","","","","true");
  2032. }
  2033. else{
  2034. exeReportPreview("RPADT10311", "XMLSTR", "", "", "true","","","","","true");
  2035. }
  2036. }
  2037. }
  2038. sBfPid = sCurPid;
  2039. }
  2040. //---------------------------------------------------------------------------------------------------
  2041. }
  2042. }
  2043. ]]>
  2044. </script>
  2045. </button>
  2046. <button id="btn_cls" class="btn4_letter2" style="left:325px; top:295px; width:56px; height:22px; background-image:../../../com/commonweb/images/btn4_letter2.gif; ">
  2047. <caption>닫기</caption>
  2048. <script type="javascript" ev:event="onclick">
  2049. <![CDATA[
  2050. grp_allsumdeptlist.visible = false;
  2051. model.refresh();
  2052. ]]>
  2053. </script>
  2054. </button>
  2055. <button id="button15" class="btn6_letter6" style="left:89px; top:295px; width:104px; height:22px; ">
  2056. <caption>네임카드출력</caption>
  2057. <script type="javascript" ev:event="DOMActivate">
  2058. <![CDATA[
  2059. var sBfSumDeptCd = "";
  2060. var sAfSumDeptCd = "";
  2061. var sBfSumDT = "";
  2062. sBfSumDT = model.getValue("/root/send/srchdata/sumdt");
  2063. sBfSumDeptCd = model.getValue("/root/send/srchdata/srchorddeptcd");
  2064. var oRptViewer = "";
  2065. for(var iNo = 1 ; iNo <= getNodesetCount("/root/init/allsumorddept/dept") ; iNo++) {
  2066. if(model.getValue("/root/init/allsumorddept/dept["+ iNo +"]/chk") == "Y") {
  2067. //if(sAfSumDeptCd == "") {
  2068. // sAfSumDeptCd = model.getValue("/root/init/allsumorddept/dept["+ iNo +"]/deptcd");
  2069. //} else {
  2070. // sAfSumDeptCd += "|" + model.getValue("/root/init/allsumorddept/dept["+ iNo +"]/deptcd");
  2071. //}
  2072. sAfSumDeptCd = model.getValue("/root/init/allsumorddept/dept["+ iNo +"]/deptcd");
  2073. model.makeValue("/root/send/srchdata/sumdt", sAfAllSumDt);
  2074. model.makeValue("/root/send/srchdata/srchorddeptcd", sAfSumDeptCd);
  2075. submit("TRADT10337");
  2076. model.makeValue("/root/send/srchdata/sumdt", sBfSumDT);
  2077. model.makeValue("/root/send/srchdata/srchorddeptcd", sBfSumDeptCd);
  2078. // 20101221 wify 경북대병원 라벨출력방식을 rexpert로 변경
  2079. //fLBLPrint();
  2080. oRptViewer += "report_"+iNo+"|"; //출력을 위해 생성한 IViewer 삭제용
  2081. fLBLPrintR( "report_"+iNo); //기존 함수에 iViewer이름을 추가함.
  2082. //
  2083. }
  2084. }
  2085. //cleanIViewer(oRptViewer);//생성된 임시 iViewer삭제
  2086. ]]>
  2087. </script>
  2088. </button>
  2089. <datagrid id="datagrid3" nodeset="/root/init/allsumorddept/dept" caption="^코드^부서" colsep="^" colwidth="25, 93, 234" explorerbar="sortshow" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowsep="|" style="left:5px; top:5px; width:375px; height:285px; ">
  2090. <col checkvalue="Y,N" ref="chk" type="checkbox"/>
  2091. <col ref="deptcd"/>
  2092. <col ref="depthngnm"/>
  2093. </datagrid>
  2094. </group>
  2095. <group id="grp_dept" visibility="hidden" style="left:285px; top:555px; width:630px; height:190px; background-color:#fffbf2; border-color:#ffd799; border-width:1px; border-style:solid; ">
  2096. <select id="chk_deptcd" ref="/root/send/srchdept/deptcd" overflow="visible" appearance="full" cols="3" sep="|" style="left:135px; top:8px; width:100px; height:20px; background-color:#f8f8f8; border-style:none; ">
  2097. <choices>
  2098. <itemset nodeset="/root/init/sumdept/dept">
  2099. <label ref="depthngnm"/>
  2100. <value ref="deptcd"/>
  2101. </itemset>
  2102. </choices>
  2103. </select>
  2104. <button id="btn_print" class="btn4_letter2" style="left:5px; top:5px; width:56px; height:22px; ">
  2105. <caption>출력</caption>
  2106. <script type="javascript" ev:event="DOMActivate">
  2107. <![CDATA[
  2108. messageBox("선택한 병동으로 출력합니다", "I000");
  2109. fPrtCheckedFillList(chk_deptcd.choices.itemset.attribute("nodeset"));
  2110. grp_dept.visible = false;
  2111. ]]>
  2112. </script>
  2113. </button>
  2114. <script type="javascript" ev:event="onmouseout">
  2115. <![CDATA[
  2116. //grp_dept.visible = false;
  2117. ]]>
  2118. </script>
  2119. <button id="button16" class="btn4_letter2" style="left:63px; top:5px; width:56px; height:22px; background-image:../../../com/commonweb/images/btn4_letter2.gif; ">
  2120. <caption>닫기</caption>
  2121. <script type="javascript" ev:event="onclick">
  2122. <![CDATA[
  2123. grp_dept.visible = false;
  2124. //model.refresh();
  2125. ]]>
  2126. </script>
  2127. </button>
  2128. </group>
  2129. </xhtml:body>
  2130. </xhtml:html>