SMADT10300_병동집계표출력.xrw 50 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
  3. <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2002/01/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
  4. <xhtml:head>
  5. <xhtml:title>약국 집계 조회/출력</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. <depthngnm/>
  27. <roomcd/>
  28. <groupcd/>
  29. <prcpcd/>
  30. <prcpnm/>
  31. <prcpqty/>
  32. <prcptims/>
  33. <prcpdayno/>
  34. <totqty/>
  35. <prcpdd/>
  36. <rtndd/>
  37. </prcpinfo>
  38. </prcplist>
  39. <sumterm>
  40. <suminfo>
  41. <sumflag/>
  42. <sumdt/>
  43. <sumfromdd/>
  44. <sumfromtm/>
  45. <sumtodd/>
  46. <sumtotm/>
  47. <sumnm/>
  48. </suminfo>
  49. </sumterm>
  50. <barcdprntsetup/>
  51. </main>
  52. <send>
  53. <srchdata>
  54. <deptflag/>
  55. <drugflag>1 2</drugflag>
  56. <prcpflag>1 2 3</prcpflag>
  57. <srchfromdd/>
  58. <srchtodd/>
  59. <srchorddeptcd/>
  60. <srchprcpcd/>
  61. <udsflag>N</udsflag>
  62. <prcpkindcd/>
  63. <sumdt/>
  64. <srchorddeptflag/>
  65. <sumdeptcd/>
  66. <srchflag>T</srchflag>
  67. <srchdeptcd/>
  68. </srchdata>
  69. <scrnid/>
  70. </send>
  71. <init>
  72. <orddept>
  73. <dept>
  74. <chk/>
  75. <deptcd/>
  76. <depthngnm/>
  77. <orddeptflag/>
  78. <sumkind/>
  79. </dept>
  80. </orddept>
  81. <sumorddept>
  82. <dept>
  83. <chk/>
  84. <deptcd/>
  85. <depthngnm/>
  86. <orddeptflag/>
  87. <sumkind/>
  88. </dept>
  89. </sumorddept>
  90. <allsumorddept>
  91. <dept>
  92. <chk/>
  93. <deptcd/>
  94. <depthngnm/>
  95. <orddeptflag/>
  96. <sumkind/>
  97. </dept>
  98. </allsumorddept>
  99. </init>
  100. <hidden>
  101. <popupmenu>
  102. <menu>
  103. <label>전체선택</label>
  104. <func>fAllCheck</func>
  105. </menu>
  106. <menu>
  107. <label>전체선택해제</label>
  108. <func>fAllCheckDel</func>
  109. </menu>
  110. </popupmenu>
  111. </hidden>
  112. <temp>
  113. <ret/>
  114. <sumrslt>
  115. <sumdt/>
  116. </sumrslt>
  117. <prntinfo>
  118. <sumflagnm>주사</sumflagnm>
  119. <wardnm>외래주사실</wardnm>
  120. <sumfromdd>20070901</sumfromdd>
  121. <sumfromtm>0000</sumfromtm>
  122. <sumtodd>20070930</sumtodd>
  123. <sumtotm>2400</sumtotm>
  124. <sumflag/>
  125. <usetype/>
  126. <sumdt/>
  127. </prntinfo>
  128. <prntprcpinfo>
  129. <suminfo>
  130. <wardnm/>
  131. <prcpcd/>
  132. <prcpnm/>
  133. <prcpflag/>
  134. <sumqty/>
  135. <keepmthdyn/>
  136. <keepmthd/>
  137. <divflag/>
  138. </suminfo>
  139. <sumtitle>
  140. <drugtype/>
  141. <drugcd/>
  142. <hngnm/>
  143. <sumqty/>
  144. <spcltype/>
  145. </sumtitle>
  146. <expnlist>
  147. <prcpdd/>
  148. <drugcd/>
  149. <drugnm/>
  150. <drugno/>
  151. <roomcd/>
  152. <orddeptnm/>
  153. <pid/>
  154. <hngnm/>
  155. <prcpqty/>
  156. <prcpdayno/>
  157. <sumqty/>
  158. </expnlist>
  159. </prntprcpinfo>
  160. <prntudsinfo>
  161. <injinfo>
  162. <roomcd/>
  163. <hngnm/>
  164. <pid/>
  165. <drugno/>
  166. <drugcd/>
  167. <prcpqty/>
  168. <prcptims/>
  169. <drugtype/>
  170. <prcpcd/>
  171. <sumqty/>
  172. </injinfo>
  173. <exuinfo>
  174. <roomcd/>
  175. <hngnm/>
  176. <pid/>
  177. <drugno/>
  178. <drugcd/>
  179. <prcpqty/>
  180. <prcptims/>
  181. <drugtype/>
  182. <prcpcd/>
  183. <sumqty/>
  184. </exuinfo>
  185. <ptpinfo>
  186. <roomcd/>
  187. <hngnm/>
  188. <pid/>
  189. <drugno/>
  190. <drugcd/>
  191. <prcpqty/>
  192. <prcptims/>
  193. <drugtype/>
  194. <prcpcd/>
  195. <sumqty/>
  196. </ptpinfo>
  197. </prntudsinfo>
  198. <prntpatprcp>
  199. <prcpdrug>
  200. <roomcd/>
  201. <hngnm/>
  202. <pid/>
  203. <rrgstno/>
  204. <sna/>
  205. <drugno/>
  206. <drugcd/>
  207. <prcpvol/>
  208. <prcpqty/>
  209. <prcptims/>
  210. <prcpkindcd/>
  211. <drughngnm/>
  212. <prcpdayno/>
  213. <mthdcnts/>
  214. </prcpdrug>
  215. </prntpatprcp>
  216. <deptcd/>
  217. </temp>
  218. </root>
  219. </instance>
  220. <script type="javascript" ev:event="xforms-ready">
  221. <![CDATA[
  222. grd_deptlist.fixedcellcheckbox(0,0) = true;
  223. datagrid3.fixedcellcheckbox(0,0) = true;
  224. model.setValue("/root/send/srchdata/srchfromdd", getCurrentDate());
  225. model.setValue("/root/send/srchdata/srchtodd", getCurrentDate());
  226. //rdo_srchflag.dispatch("xforms-value-changed")
  227. model.refresh();
  228. if ( model.getValue("/root/temp/deptcd") !=""){
  229. grd_deptlist.visible=false;
  230. }
  231. //집계표 출력시 고가, 향정 단독 출력물 출력여부 조회
  232. submit("TRADT10342");
  233. //바코드프린터설정 초기화
  234. model.setValue("/root/send/scrnid", getScreenID());
  235. submit("TRLLC90101", false);
  236. var comm = model.getValue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/comm02/comm");
  237. var prntkind = model.getValue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/prntkind");
  238. if(comm == "2") {
  239. model.setValue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/comm02/comm", "1");
  240. }
  241. if(prntkind == "1") {
  242. model.setValue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/prntkind", "5");
  243. }
  244. model.refresh();
  245. //1일기준인지 1회기준인지 체크하여 컬럼을 hidden
  246. var colHidnValue = grdBaseColHidn("D");
  247. //1회 기준
  248. if( colHidnValue == "C") {
  249. grd_prcplist.colHidden(grd_prcplist.colRef("prcpqty")) = true;
  250. } else {
  251. grd_prcplist.colHidden(grd_prcplist.colRef("prcpqty2")) = true;
  252. }
  253. ]]>
  254. </script>
  255. <script type="javascript">
  256. <![CDATA[
  257. var sBfAllSumDt = "";
  258. var sAfAllSumDt = "";
  259. var gv_deptflag="";
  260. function fSelDeptflag(){
  261. // 진료과
  262. chk_deptcd.visible=true;
  263. var deptflag = model.getValue("/root/send/srchdata/deptflag");
  264. if(deptflag != ""){
  265. if (deptflag.indexOf("W") >-1 ){
  266. rdo_prcp.visible=true;
  267. } else {
  268. rdo_prcp.visible=false;
  269. }
  270. submit("TRADT10321");
  271. //model.setValue("/root/send/srchdata/srchdeptcd", "");
  272. var srchdeptcd = model.GetValue("/root/send/srchdata/srchdeptcd");
  273. var tmp_deptflag = deptflag.split(" ");
  274. for(i=0; i < tmp_deptflag.length; i++){
  275. if(!isSearchString(gv_deptflag, tmp_deptflag[i])){
  276. if(srchdeptcd != "" ) srchdeptcd += "|"; // 데이터 연결을 위한 구분자 삽입
  277. for(var j = 1; j <= getNodesetCount("/root/init/orddept/dept"); j++){
  278. if(model.getValue("/root/init/orddept/dept["+j+"]/orddeptflag") == tmp_deptflag[i]){ // 부서구분이 같은 상세부서만..
  279. srchdeptcd += model.getValue("/root/init/orddept/dept["+j+"]/deptcd")+"|";
  280. //if(j != getNodesetCount("/root/init/orddept/dept")+1) srchdeptcd += "|"; // 가장 마지막은 구분자 삽입하지 않음.
  281. }
  282. model.setValue("/root/init/orddept/dept["+j+"]/chk", "Y");
  283. }
  284. }
  285. }
  286. srchdeptcd = srchdeptcd.substr(0,parseInt(srchdeptcd.length)-1); // 마지막 구분자는 삭제
  287. model.setValue("/root/send/srchdata/srchdeptcd", srchdeptcd);
  288. gv_deptflag = deptflag; // 이전 선택된 부서구분을 위한 비교변수 설정
  289. }
  290. model.refresh();
  291. }
  292. function fAllCheck(){
  293. model.setValue("/root/send/srchdata/srchdeptcd", "");
  294. var srchdeptcd = "";
  295. for(var i = 1; i <= getNodesetCount("/root/init/orddept/dept"); i++){
  296. srchdeptcd += model.getValue("/root/init/orddept/dept["+i+"]/deptcd")+"|";
  297. }
  298. srchdeptcd = srchdeptcd.substr(0,parseInt(srchdeptcd.length)-1); // 마지막 구분자는 삭제
  299. model.setValue("/root/send/srchdata/srchdeptcd", srchdeptcd);
  300. model.refresh();
  301. }
  302. function fAllCheckDel(){
  303. model.setValue("/root/send/srchdata/srchdeptcd", "");
  304. model.refresh();
  305. }
  306. //프린터 설정
  307. function fSetPrint() {
  308. var count = getNodesetCount("/root/main/barcdprntsetup/prntsetupinfo/setupinfo");
  309. if(count == 0) {
  310. model.makeNode("/root/main/barcdprntsetup/prntsetupinfo/setupinfo");
  311. }
  312. open("SPLLC90100_바코드프린터설정.xrw", "", "", "", "", "/root/main/barcdprntsetup/prntsetupinfo/setupinfo", "/root/main/barcdprntsetup/prntsetupinfo/setupinfo");
  313. }
  314. /**
  315. * 라벨출력
  316. */
  317. function fLBLPrint() {
  318. //alert("lblprint");
  319. // Comm 설정
  320. //CommAX.CommPort = "1"; // 출력 Port
  321. //CommAX.Settings = "9600,n,8,1"; // Comm 설정
  322. /*
  323. ex) barPrt.PrnKind = 0; //ZEBRA로 설정됨
  324. barPrt.PrnKind = 1; //ZEBRAH로 설정됨
  325. barPrt.PrnKind = 4; //항목에 없으므로 ZEBRA로 설정됨
  326. barPrt.PrnKind = "ZEBRAH"; //ZEBRAH로 설정됨
  327. barPrt.PrnKind = "SATO(CT400)"; //SATO(CT400)로 설정됨
  328. barPrt.PrnKind = "ZebraH"; //대소문자에 상관 없음. ZEBRAH로 설정됨
  329. */
  330. PrnKind = model.getvalue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/prntkind");
  331. PrnMarginLeft = model.getvalue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/blank/left");
  332. PrnMarginTop = model.getvalue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/blank/top");
  333. var commkind = model.getvalue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/commkind")
  334. if ( PrnKind ==7 ) {
  335. CommAX.PrnKind =4;
  336. } else {
  337. CommAX.PrnKind =PrnKind;
  338. }
  339. //포트 종류 설정
  340. if(commkind == "02") {
  341. CommAX.PortNm = 1;
  342. } else {
  343. CommAX.PortNm = 2;
  344. }
  345. //프린터 포트명, 혹은 네트웍 공유 프린터 명
  346. if(commkind == "01") {
  347. CommAX.PrtNm = model.getvalue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/comm01/setupval");
  348. }
  349. //alert("commax");
  350. //CommAX.Settings = "127.0.0.1"; // Comm 설정
  351. var sSndMsg ="";
  352. var reprint ="";
  353. var iPoint=0;
  354. //if ( CommAX.PortOpen() == true) {
  355. //alert("라벨 프린트 Open");
  356. //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");
  357. //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");
  358. //CommAX.PortClose();
  359. //return;
  360. //페이지번호 조회
  361. var iPageCnt = 0;
  362. for(iPoint = 1; iPoint <= getNodesetCount("/root/temp/prntpat/prcpdrug") ; iPoint++){
  363. if(model.getValue("/root/temp/prntpat/prcpdrug["+iPoint+"]/pid") != "" ) {
  364. //시작(X, Y)
  365. sSndMsg += astfStartFormat(0, 0);
  366. iPageCnt++;
  367. //////////////////////////////////////////////////
  368. // 라벨 상단내용 //
  369. /////////////////////////////////////////////////
  370. //병동
  371. sSndMsg += astfPrintOut(20, 60, 3, model.getValue("/root/temp/prntpat/prcpdrug["+iPoint+"]/wardnm") + " / " + model.getValue("/root/temp/prntpat/prcpdrug["+iPoint+"]/roomcd"),"");
  372. //병실
  373. //sSndMsg += astfPrintOut(260, 60, 3, model.getValue("/root/temp/prntpat/prcpdrug["+iPoint+"]/roomcd"),"");
  374. //환자명
  375. sSndMsg += astfPrintOut(330, 60, 6, model.getValue("/root/temp/prntpat/prcpdrug["+iPoint+"]/hngnm"),"");
  376. //환자번호
  377. sSndMsg += astfPrintOut(30, 115, 3, "등록번호 " + model.getValue("/root/temp/prntpat/prcpdrug["+iPoint+"]/pid"),"");
  378. //성별나이
  379. sSndMsg += astfPrintOut(330, 115, 3, model.getValue("/root/temp/prntpat/prcpdrug["+iPoint+"]/sna"),"");
  380. //진료과
  381. 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"),"");
  382. //주치의
  383. //sSndMsg += astfPrintOut(230, 165, 3, model.getValue("/root/temp/prntpat/prcpdrug["+iPoint+"]/atdoctidnm") + "/","");
  384. //담당의
  385. //sSndMsg += astfPrintOut(330, 165, 3, model.getValue("/root/temp/prntpat/prcpdrug["+iPoint+"]/medispclidnm"),"");
  386. //라벨출력일
  387. var lbldate = getCurrentDate();
  388. lbldate = lbldate.toDate().getDateFormat("YYYY/MM/DD") ;
  389. sSndMsg += astfPrintOut(280, 225, 3, lbldate,"");
  390. //종료(매수)
  391. sSndMsg += astfEndFormat(0);
  392. //alert(sSndMsg);
  393. //CommAX.SendMessage(sSndMsg);
  394. if(commkind == "01") { //COM 포트가 아닐때
  395. CommAX.SendMsg(sSndMsg);
  396. } else {
  397. CommAX.SendMessage(sSndMsg);
  398. }
  399. fSleep(500);
  400. sSndMsg = "";
  401. }
  402. }
  403. CommAX.PortClose();
  404. model.refresh();
  405. //}
  406. }
  407. function fSleep(numberMillis) {
  408. var now = new Date();
  409. var exitTime = now.getTime() + numberMillis;
  410. while (true) {
  411. now = new Date();
  412. if (now.getTime() > exitTime)
  413. return;
  414. }
  415. }
  416. ]]>
  417. </script>
  418. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  419. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  420. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  421. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  422. <script type="javascript" src="../../../com/departmentcodeweb/js/ZSD001.js"/>
  423. <script type="javascript" src="../../../ast/commonweb/js/AST.js"/>
  424. <submission id="TRADT10321" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdata" replace="instance" resultref="/root/init/orddept"/>
  425. <submission id="TRADT10322" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdata" replace="instance" resultref="/root/main/sumlist"/>
  426. <submission id="TRADT10324" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdata" replace="instance" resultref="/root/main/sumterm"/>
  427. <submission id="TRADT10325" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdata" replace="instance" resultref="/root/main/sumlist"/>
  428. <submission id="TRADT10326" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdata" replace="instance" resultref="/root/init/orddept"/>
  429. <submission id="TRADT10327" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdata" replace="instance" resultref="/root/main/prcplist"/>
  430. <submission id="TRADT10329" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdata" replace="instance" resultref="/root/temp/prntprcpinfo"/>
  431. <submission id="TRADT10330" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdata" resultref="/root/init/sumorddept"/>
  432. <submission id="TRADT10332" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdata" replace="instance" resultref="/root/temp/prntudsinfo"/>
  433. <submission id="TRADT10333" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdata" replace="instance" resultref="/root/temp/prntpatprcp"/>
  434. <submission id="TRADT10334" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdata" replace="instance" resultref="/root/temp/prntprcpinfo"/>
  435. <submission id="TXADT10321" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdata" replace="instance" resultref="/root/temp/ret"/>
  436. <submission id="TXADT10322" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdata" replace="instance" add="bottom" resultref="/root/temp/ret"/>
  437. <submission id="TRADT10337" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdata" replace="instance" resultref="/root/temp/prntpat"/>
  438. <submission id="TRADT10318" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdata" resultref="/root/init/allsumorddept"/>
  439. <!-- 프린터 설정-->
  440. <submission id="TRLLC90101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/barcdprntsetup"/>
  441. <submission id="TRADT10342" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdata" resultref="/root/temp/sumprntyn"/>
  442. </model>
  443. </xhtml:head>
  444. <xhtml:body pagewidth="1211" pageheight="784" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  445. <group id="group1" style="left:0px; top:0px; width:1194px; height:13px; ">
  446. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:800px; height:14px; ">약국 집계 조회/출력</caption>
  447. </group>
  448. <group id="group3" scroll="auto" style="left:0px; top:40px; width:1194px; height:742px; ">
  449. <datagrid id="grd_drugsum" nodeset="/root/main/sumterm/suminfo" caption="집계구분^집계일시^집계구간^집계구간^집계구간^집계구간^집계자" colsep="^" colwidth="241, 116, 68, 34, 68, 34, 66" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:609px; top:0px; width:584px; height:160px; ">
  450. <col ref="sumflag"/>
  451. <col ref="sumdt" format="yyyy-mm-dd hh:nn:ss"/>
  452. <col ref="sumfromdd" format="yyyy-mm-dd"/>
  453. <col ref="sumfromtm" format="hh:nn"/>
  454. <col ref="sumtodd" format="yyyy-mm-dd"/>
  455. <col ref="sumtotm" format="hh:nn"/>
  456. <col ref="sumnm"/>
  457. <script type="javascript" ev:event="onclick">
  458. <![CDATA[
  459. model.setValue("/root/temp/prntinfo/sumflag", model.getValue("/root/main/sumterm/suminfo["+grd_drugsum.row+"]/sumflag"));
  460. model.setValue("/root/temp/prntinfo/sumfromdd", model.getValue("/root/main/sumterm/suminfo["+grd_drugsum.row+"]/sumfromdd"));
  461. model.setValue("/root/temp/prntinfo/sumfromtm", model.getValue("/root/main/sumterm/suminfo["+grd_drugsum.row+"]/sumfromtm"));
  462. model.setValue("/root/temp/prntinfo/sumtodd", model.getValue("/root/main/sumterm/suminfo["+grd_drugsum.row+"]/sumtodd"));
  463. model.setValue("/root/temp/prntinfo/sumtotm", model.getValue("/root/main/sumterm/suminfo["+grd_drugsum.row+"]/sumtotm"));
  464. model.setValue("/root/temp/prntinfo/sumdt", model.getValue("/root/main/sumterm/suminfo["+grd_drugsum.row+"]/sumdt"));
  465. model.setValue("/root/send/srchdata/sumdt", model.getValue("/root/main/sumterm/suminfo["+grd_drugsum.row+"]/sumdt"));
  466. submit("TRADT10330");
  467. model.setValue("/root/send/srchdata/srchorddeptcd", model.getValue("/root/init/sumorddept/dept[1]/deptcd"));
  468. model.setValue("/root/send/srchdata/srchorddeptflag", model.getValue("/root/init/sumorddept/dept[1]/orddeptflag"));
  469. //model.setValue("/root/send/srchdata/srchorddeptcd", model.getValue("/root/init/orddept/dept[1]/deptcd")); //황세원 멀티조회 테스트
  470. //model.setValue("/root/send/srchdata/srchorddeptflag", model.getValue("/root/init/orddept/dept[1]/orddeptflag"));
  471. submit("TRADT10325");
  472. model.setValue("/root/send/srchdata/srchprcpcd", model.getValue("/root/main/sumlist/suminfo[1]/prcpcd"));
  473. submit("TRADT10327");
  474. ]]>
  475. </script>
  476. <script type="javascript" ev:event="onaftersort">
  477. <![CDATA[
  478. grd_drugsum.gridToInstance();
  479. ]]>
  480. </script>
  481. </datagrid>
  482. <datagrid id="grd_deptlist" nodeset="/root/init/sumorddept/dept" caption="^코드^부서" colsep="^" colwidth="25, 93, 234" explorerbar="sortshow" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowsep="|" style="left:2px; top:170px; width:375px; height:245px; ">
  483. <col checkvalue="Y,N" ref="chk" type="checkbox"/>
  484. <col ref="deptcd"/>
  485. <col ref="depthngnm"/>
  486. <script type="javascript" ev:event="onclick">
  487. <![CDATA[
  488. if ( ! isDataCell() ) return;
  489. //model.setValue("/root/send/srchdata/srchorddeptcd", model.getValue("/root/init/orddept/dept["+grd_deptlist.row+"]/deptcd")); //황세원 멀티체크 테스트
  490. //model.setValue("/root/send/srchdata/srchorddeptflag", model.getValue("/root/init/orddept/dept["+grd_deptlist.row+"]/orddeptflag"));
  491. model.setValue("/root/send/srchdata/srchorddeptcd", model.getValue("/root/init/sumorddept/dept["+grd_deptlist.row+"]/deptcd"));
  492. model.setValue("/root/send/srchdata/srchorddeptflag", model.getValue("/root/init/sumorddept/dept["+grd_deptlist.row+"]/orddeptflag"));
  493. submit("TRADT10325");
  494. model.setValue("/root/send/srchdata/srchprcpcd", model.getValue("/root/main/sumlist/suminfo[1]/prcpcd"));
  495. submit("TRADT10327");
  496. ]]>
  497. </script>
  498. <script type="javascript" ev:event="onaftersort">
  499. <![CDATA[
  500. grd_deptlist.gridToInstance();
  501. ]]>
  502. </script>
  503. </datagrid>
  504. <line id="line1" class="line_1" style="x1:0px; y1:162px; x2:1194px; y2:162px; "/>
  505. <datagrid id="grd_sumlist" nodeset="/root/main/sumlist/suminfo" class="datagrid2" caption="Group코드^처방코드^처방명^총불출수량" colsep="^" colwidth="89, 89, 120, 49" explorerbar="sortshow" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:2px; top:420px; width:375px; height:320px; ">
  506. <col ref="groupcd"/>
  507. <col ref="prcpcd"/>
  508. <col ref="prcpnm"/>
  509. <col ref="sumqty" style="text-align:right; "/>
  510. <script type="javascript" ev:event="onclick">
  511. <![CDATA[
  512. if ( ! isDataCell() ) return;
  513. model.setValue("/root/send/srchdata/srchprcpcd", model.getValue("/root/main/sumlist/suminfo["+grd_sumlist.row+"]/prcpcd"));
  514. submit("TRADT10327");
  515. ]]>
  516. </script>
  517. <script type="javascript" ev:event="onaftersort">
  518. <![CDATA[
  519. grd_sumlist.gridToInstance();
  520. ]]>
  521. </script>
  522. </datagrid>
  523. <datagrid id="grd_prcplist" nodeset="/root/main/prcplist/prcpinfo" caption="구분^구분^구분^등록번호^환자명^진료과코드^진료과^병실^Group코드^처방코드^처방명^1일수량^1회수량^횟수^일수^불출수량^처방일자^반환일시" colsep="^" colwidth="38, 48, 36, 73, 45, 60, 100, 41, 82, 90, 201, 49, 49, 36, 33, 59, 81, 101" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:380px; top:170px; width:814px; height:570px; ">
  524. <col ref="flag1"/>
  525. <col ref="flag2"/>
  526. <col ref="flag3"/>
  527. <col ref="pid"/>
  528. <col ref="hngnm"/>
  529. <col ref="orddeptcd" visibility="hidden" style="text-align:center; "/>
  530. <col ref="depthngnm" style="text-align:center; "/>
  531. <col ref="roomcd" style="text-align:center; "/>
  532. <col ref="groupcd" visibility="visible" style="text-align:center; "/>
  533. <col ref="prcpcd" style="text-align:center; "/>
  534. <col ref="prcpnm"/>
  535. <col ref="prcpqty" style="text-align:right; "/>
  536. <col ref="prcpqty2" style="text-align:right; "/>
  537. <col ref="prcptims"/>
  538. <col ref="prcpdayno" style="text-align:right; "/>
  539. <col ref="totqty" style="text-align:right; "/>
  540. <col ref="prcpdd" format="yyyy-mm-dd" style="text-align:center; "/>
  541. <col ref="rtndd"/>
  542. </datagrid>
  543. </group>
  544. <group id="group4" scroll="auto" style="left:0px; top:13px; width:1194px; height:27px; ">
  545. <button id="button1" class="btn6_letter5" style="left:280px; top:5px; width:92px; height:22px; ">
  546. <caption>집계표출력</caption>
  547. <script type="javascript" ev:event="DOMActivate">
  548. <![CDATA[
  549. if(model.getValue("/root/temp/sumprntyn/info/prntyn") == "Y") {// 고가, 향정 출력물은 옵션화
  550. model.makeNode("/root/temp/prntprcpinfo/sumtitle");
  551. submit("TRADT10334"); // 집계구간내 향정,영양수액,고가 품목/집계량 조회
  552. if(model.getValue("/root/temp/prntprcpinfo/sumtitle/drugcd") != ""){
  553. for(var i = 0; i < 2; i++){
  554. if(i == 0){
  555. model.setValue("/root/temp/prntinfo/usetype", "<약제팀용>");
  556. }else model.setValue("/root/temp/prntinfo/usetype", "<병동용>");
  557. model.refresh();
  558. exeReportPreview("RPADT10306", "XMLSTR", "", "", "true","","","","","true"); // 집계표 맨 앞장 (향정신성 및 고가의약품 총집계량)
  559. if(getNodesetCount("/root/temp/prntprcpinfo/expnlist") > 0){
  560. exeReportPreview("RPADT10307", "XMLSTR", "", "", "true","","","","","true"); // 집계표 맨 앞장 (고가리스트)
  561. }
  562. }
  563. }
  564. }
  565. for(var i = grd_deptlist.fixedRows; i < grd_deptlist.rows; i++){
  566. if ( model.getValue("/root/init/sumorddept/dept["+i+"]/chk")=="Y"){
  567. model.setValue("/root/send/srchdata/srchorddeptcd", model.getValue("/root/init/sumorddept/dept["+i+"]/deptcd"));
  568. if(submit("TRADT10329")){ // 병동별 집계
  569. var item_cnt = getNodesetCount("/root/temp/prntprcpinfo/suminfo");
  570. model.setValue("/root/temp/prntinfo/wardnm", model.getValue("/root/temp/prntprcpinfo/suminfo["+item_cnt+"]/wardnm"));
  571. var div_cnt = 1;
  572. for(var j = 1; j <= item_cnt ; j++){
  573. if((j-1) % 10 == 0){
  574. div_cnt ++;
  575. }
  576. if(model.getValue("/root/temp/prntprcpinfo/suminfo["+j+"]/keepmthdyn") == "Y"){
  577. model.setValue("/root/temp/prntprcpinfo/suminfo["+j+"]/divflag", div_cnt);
  578. }else{
  579. model.setValue("/root/temp/prntprcpinfo/suminfo["+j+"]/divflag", "-");
  580. }
  581. }
  582. for(var cnt = 0; cnt < 2; cnt++){
  583. if(cnt == 0){
  584. model.setValue("/root/temp/prntinfo/usetype", "<약제팀용>");
  585. }else model.setValue("/root/temp/prntinfo/usetype", "<병동용>");
  586. exeReportPreview("RPADT10301", "XMLSTR", "", "", "true","","","","","true");
  587. }
  588. }
  589. //exeReportPreview("RPADT10301", "XMLSTR", "", "", "true","","","","","true");
  590. }
  591. }
  592. //exeReportPreview("RPADT10300", "XML", "/root/send/srchdata");
  593. //exeReportPreview("RPADT10300", "XMLSTR", "", "", "true","","","","","true");
  594. ]]>
  595. </script>
  596. </button>
  597. <button id="button2" class="btn3_letter4" visibility="hidden" style="left:105px; top:5px; width:80px; height:22px; ">
  598. <caption>약국집계</caption>
  599. <script type="javascript" ev:event="DOMActivate">
  600. <![CDATA[
  601. modal("SMADT10310",0,20,150,"SMADT10310","","");
  602. submit("TRADT10324"); //집계리스트 조회
  603. ]]>
  604. </script>
  605. </button>
  606. <button id="button3" class="btn6_letter6" style="left:375px; top:5px; width:104px; height:22px; ">
  607. <caption>Fill List출력</caption>
  608. <script type="javascript" ev:event="DOMActivate">
  609. <![CDATA[
  610. for(var i = grd_deptlist.fixedRows; i < grd_deptlist.rows; i++){
  611. if ( model.getValue("/root/init/sumorddept/dept["+i+"]/chk")=="Y"){
  612. /* 20120725 UDS외 일반 집계도 출력가능하도록 개선요청, 수정 정창혁 */
  613. //UDS로 집계된 사항만 Fill List로 출력 가능
  614. //if(model.getValue("/root/init/sumorddept/dept["+i+"]/sumkind") == "U"){
  615. model.setValue("/root/send/srchdata/srchorddeptcd", model.getValue("/root/init/sumorddept/dept["+i+"]/deptcd"));
  616. model.setValue("/root/temp/prntinfo/wardnm", model.getValue("/root/init/sumorddept/dept["+i+"]/depthngnm"));
  617. submit("TRADT10332");
  618. // 주사제 fill list 출력
  619. if(model.getValue("/root/temp/prntudsinfo/injinfo/pid") != ""){
  620. exeReportPreview("RPADT10302", "XMLSTR", "", "", "true","","","","","true");
  621. }
  622. // 수액
  623. if(model.getValue("/root/temp/prntudsinfo/exuinfo/pid") != ""){
  624. exeReportPreview("RPADT10303", "XMLSTR", "", "", "true","","","","","true");
  625. }
  626. // PTP
  627. if(model.getValue("/root/temp/prntudsinfo/ptpinfo/pid") != ""){
  628. exeReportPreview("RPADT10304", "XMLSTR", "", "", "true","","","","","true");
  629. }
  630. /*
  631. }else{
  632. messageBox("UDS 집계항목을", "C002");
  633. break;
  634. }
  635. */
  636. }
  637. }
  638. ]]>
  639. </script>
  640. </button>
  641. <button id="button4" class="btn3_letter6" style="left:0px; top:5px; width:104px; height:22px; ">
  642. <caption>수액집계조회</caption>
  643. </button>
  644. <button id="button6" class="btn6_letter6" style="left:482px; top:5px; width:104px; height:22px; ">
  645. <caption>환자별검수지</caption>
  646. <script type="javascript" ev:event="DOMActivate">
  647. <![CDATA[
  648. var sBfSumDT = "";
  649. var sAfSumDT = "";
  650. sBfSumDT = model.getValue("/root/send/srchdata/sumdt");
  651. for(var iNo = 1 ; iNo <= getNodesetCount("/root/main/sumterm/suminfo") ; iNo++) {
  652. if(model.getValue("/root/main/sumterm/suminfo["+ iNo +"]/sumkind") == "U") {
  653. // && model.getValue("/root/main/sumterm/suminfo["+ iNo +"]/sumflag2") == "R") {
  654. if(sAfSumDT == "") {
  655. sAfSumDT = model.getValue("/root/main/sumterm/suminfo["+ iNo +"]/sumdt");
  656. } else {
  657. sAfSumDT += "|" + model.getValue("/root/main/sumterm/suminfo["+ iNo +"]/sumdt");
  658. }
  659. }
  660. }
  661. model.makeValue("/root/send/srchdata/sumdt", sAfSumDT);
  662. sAfAllSumDt = sAfSumDT;
  663. if(submit("TRADT10318")) {
  664. model.makeValue("/root/send/srchdata/sumdt", sBfSumDT);
  665. grp_allsumdeptlist.attribute("left") = 485;
  666. grp_allsumdeptlist.attribute("top") = 40;
  667. grp_allsumdeptlist.attribute("width") = 385;
  668. grp_allsumdeptlist.attribute("height") = 325;
  669. button14.attribute("left") = 195;
  670. button15.visible = false;
  671. button14.visible = true;
  672. grp_allsumdeptlist.visible = true;
  673. model.refresh();
  674. }
  675. ]]>
  676. </script>
  677. </button>
  678. <button id="button7" class="btn6_letter4" style="left:590px; top:5px; width:80px; height:22px; ">
  679. <caption>네임카드</caption>
  680. <script type="javascript" ev:event="DOMActivate">
  681. <![CDATA[
  682. var sBfSumDT = "";
  683. var sAfSumDT = "";
  684. sBfSumDT = model.getValue("/root/send/srchdata/sumdt");
  685. for(var iNo = 1 ; iNo <= getNodesetCount("/root/main/sumterm/suminfo") ; iNo++) {
  686. if(model.getValue("/root/main/sumterm/suminfo["+ iNo +"]/sumkind") == "U") {
  687. // && model.getValue("/root/main/sumterm/suminfo["+ iNo +"]/sumflag2") == "R") {
  688. if(sAfSumDT == "") {
  689. sAfSumDT = model.getValue("/root/main/sumterm/suminfo["+ iNo +"]/sumdt");
  690. } else {
  691. sAfSumDT += "|" + model.getValue("/root/main/sumterm/suminfo["+ iNo +"]/sumdt");
  692. }
  693. }
  694. }
  695. model.makeValue("/root/send/srchdata/sumdt", sAfSumDT);
  696. sAfAllSumDt = sAfSumDT;
  697. if(submit("TRADT10318")) {
  698. model.makeValue("/root/send/srchdata/sumdt", sBfSumDT);
  699. grp_allsumdeptlist.attribute("left") = 590;
  700. grp_allsumdeptlist.attribute("top") = 40;
  701. grp_allsumdeptlist.attribute("width") = 385;
  702. grp_allsumdeptlist.attribute("height") = 325;
  703. button15.attribute("left") = 219;
  704. button14.visible = false;
  705. button15.visible = true;
  706. grp_allsumdeptlist.visible = true;
  707. model.refresh();
  708. }
  709. ]]>
  710. </script>
  711. </button>
  712. <button id="button5" class="btn4_letter4" visibility="hidden" style="left:1110px; top:5px; width:80px; height:22px; ">
  713. <caption>집계취소</caption>
  714. <script type="javascript" ev:event="DOMActivate">
  715. <![CDATA[
  716. if ( messageBox("집계취소를 ","Q004")==6 ) {
  717. submit("TXADT10302");
  718. submit("TRADT10324");
  719. }
  720. ]]>
  721. </script>
  722. </button>
  723. <button id="btn_prnt" class="btn3_letter5" navindex="18" style="left:185px; top:5px; width:92px; height:22px; ">
  724. <caption>프린터설정</caption>
  725. <script type="javascript" ev:event="DOMActivate">
  726. <![CDATA[
  727. fSetPrint();
  728. ]]>
  729. </script>
  730. </button>
  731. </group>
  732. <group id="group2" style="left:0px; top:40px; width:605px; height:160px; ">
  733. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:1px; width:605px; height:154px; background-color:#fffbf2; border-color:#ffd799; "/>
  734. <caption id="caption2" class="search_name" style="left:5px; top:36px; width:60px; height:17px; ">대상 :</caption>
  735. <caption id="caption1" class="search_name" style="left:5px; top:11px; width:90px; height:17px; ">조회구간 :</caption>
  736. <caption id="caption4" class="search_name" style="left:5px; top:58px; width:70px; height:17px; ">구분1 :</caption>
  737. <caption id="caption5" class="search_name" style="left:5px; top:104px; width:70px; height:17px; ">구분2 :</caption>
  738. <select id="checkbox1" ref="/root/send/srchdata/drugflag" class="checkbox_search" overflow="visible" appearance="full" cols="5" style="left:150px; top:58px; width:135px; height:20px; border-style:none; ">
  739. <choices>
  740. <item>
  741. <label>약</label>
  742. <value>1</value>
  743. </item>
  744. <item>
  745. <label>주사</label>
  746. <value>2</value>
  747. </item>
  748. </choices>
  749. </select>
  750. <select id="checkbox3" ref="/root/send/srchdata/prcpflag" class="checkbox_search" overflow="visible" appearance="full" cols="5" style="left:98px; top:129px; width:200px; height:20px; border-style:none; ">
  751. <choices>
  752. <item>
  753. <label>일반</label>
  754. <value>1</value>
  755. </item>
  756. <item>
  757. <label>선처치</label>
  758. <value>2</value>
  759. </item>
  760. <item>
  761. <label>Set처방</label>
  762. <value>3</value>
  763. </item>
  764. </choices>
  765. </select>
  766. <line id="line13" class="line_4" style="x1:525px; y1:70px; x2:525px; y2:148px; border-color:#ffe4bb; border-left-style:solid; "/>
  767. <button id="btn_sea" class="btn1_letter2" style="left:535px; top:95px; width:56px; height:22px; ">
  768. <caption>조회</caption>
  769. <script type="javascript" ev:event="DOMActivate">
  770. <![CDATA[
  771. model.setValue("/root/send/srchdata/sumdeptcd", model.getValue("/root/temp/deptcd"));
  772. chk_deptcd.visible = false;
  773. var srchdeptcd = new Array();
  774. var chkcnt = 0;
  775. var chkrow = new Array();
  776. var srchflag = model.getValue("/root/send/srchdata/srchflag");
  777. if(srchflag == "T"){
  778. // 조회시 대상에 대한 전체 부서 체크박스 선택
  779. if(model.getValue("/root/send/srchdata/deptflag") != "" && model.getValue("/root/send/srchdata/srchdeptcd") == ""){
  780. //fSelDeptflag();
  781. messageBox("대상의 상세부서를","C002");
  782. chk_deptcd.visible=true;
  783. return;
  784. }
  785. submit("TRADT10324");
  786. }else if(srchflag == "P"){
  787. }
  788. model.refresh();
  789. ]]>
  790. </script>
  791. </button>
  792. <input id="ipt_sumdt1" ref="/root/send/srchdata/srchfromdd" class="input_default" inputtype="date" style="left:98px; top:11px; width:95px; height:19px; "/>
  793. <input id="ipt_sumdt2" ref="/root/send/srchdata/srchtodd" class="input_default" inputtype="date" style="left:210px; top:11px; width:95px; height:19px; "/>
  794. <caption id="caption32" style="left:197px; top:10px; width:15px; height:20px; vertical-align:middle; ">~</caption>
  795. <select1 id="radio1" ref="/root/send/srchdata/udsflag" appearance="full" cols="1" rows="2" vcellspacing="8" overflow="visible" style="left:98px; top:55px; width:50px; height:50px; border-style:none; ">
  796. <choices>
  797. <item>
  798. <label>일반</label>
  799. <value>N</value>
  800. </item>
  801. <item>
  802. <label>UDS</label>
  803. <value>U</value>
  804. </item>
  805. </choices>
  806. </select1>
  807. <select id="checkbox4" ref="/root/send/srchdata/drugflag" class="checkbox_search" overflow="visible" appearance="full" cols="5" style="left:150px; top:83px; width:175px; height:20px; border-style:none; ">
  808. <choices>
  809. <item>
  810. <label>PTP</label>
  811. <value>3</value>
  812. </item>
  813. <item>
  814. <label>주사</label>
  815. <value>4</value>
  816. </item>
  817. <item>
  818. <label>외용,수제</label>
  819. <value>5</value>
  820. </item>
  821. </choices>
  822. </select>
  823. <caption id="caption3" class="search_name" style="left:5px; top:129px; width:70px; height:17px; ">구분3 :</caption>
  824. <select id="chk_deptflag" ref="/root/send/srchdata/deptflag" class="checkbox_search" overflow="visible" appearance="full" cols="8" style="left:100px; top:36px; width:500px; height:20px; border-style:none; ">
  825. <choices>
  826. <item>
  827. <label>병동</label>
  828. <value>W</value>
  829. </item>
  830. <item>
  831. <label>응급실</label>
  832. <value>E</value>
  833. </item>
  834. <item>
  835. <label>수술실</label>
  836. <value>O</value>
  837. </item>
  838. <item>
  839. <label>주사실</label>
  840. <value>J</value>
  841. </item>
  842. <item>
  843. <label>집계부서</label>
  844. <value>X</value>
  845. </item>
  846. <item>
  847. <label>진료부서</label>
  848. <value>D</value>
  849. </item>
  850. <item>
  851. <label>복막투석실</label>
  852. <value>A</value>
  853. </item>
  854. <item>
  855. <label>건진</label>
  856. <value>S</value>
  857. </item>
  858. </choices>
  859. <script type="javascript" ev:event="xforms-select">
  860. <![CDATA[
  861. //fSelDeptflag();
  862. // 진료과
  863. chk_deptcd.visible=true;
  864. var deptflag = model.getValue("/root/send/srchdata/deptflag");
  865. if(deptflag != ""){
  866. if (deptflag.indexOf("W") >-1 ){
  867. rdo_prcp.visible=true;
  868. } else {
  869. rdo_prcp.visible=false;
  870. }
  871. submit("TRADT10321");
  872. //model.setValue("/root/send/srchdata/srchdeptcd", "");
  873. var srchdeptcd = model.GetValue("/root/send/srchdata/srchdeptcd");
  874. var tmp_deptflag = deptflag.split(" ");
  875. /*
  876. for(i=0; i < tmp_deptflag.length; i++){
  877. if(!isSearchString(gv_deptflag, tmp_deptflag[i])){
  878. if(srchdeptcd != "" ) srchdeptcd += "|"; // 데이터 연결을 위한 구분자 삽입
  879. for(var j = 1; j <= getNodesetCount("/root/init/orddept/dept"); j++){
  880. if(model.getValue("/root/init/orddept/dept["+j+"]/orddeptflag") == tmp_deptflag[i]){ // 부서구분이 같은 상세부서만..
  881. srchdeptcd += model.getValue("/root/init/orddept/dept["+j+"]/deptcd")+"|";
  882. //if(j != getNodesetCount("/root/init/orddept/dept")+1) srchdeptcd += "|"; // 가장 마지막은 구분자 삽입하지 않음.
  883. }
  884. model.setValue("/root/init/orddept/dept["+j+"]/chk", "Y");
  885. }
  886. }
  887. }
  888. srchdeptcd = srchdeptcd.substr(0,parseInt(srchdeptcd.length)-1); // 마지막 구분자는 삭제
  889. */
  890. //model.setValue("/root/send/srchdata/srchdeptcd", srchdeptcd);
  891. //gv_deptflag = deptflag; // 이전 선택된 부서구분을 위한 비교변수 설정
  892. }
  893. model.refresh();
  894. ]]>
  895. </script>
  896. <script type="javascript" ev:event="xforms-deselect">
  897. <![CDATA[
  898. // 진료과
  899. chk_deptcd.visible=true;
  900. var deptflag = model.getValue("/root/send/srchdata/deptflag");
  901. if(deptflag != ""){
  902. if (deptflag.indexOf("W") >-1 ){
  903. rdo_prcp.visible=true;
  904. } else {
  905. rdo_prcp.visible=false;
  906. }
  907. submit("TRADT10321");
  908. // 체크박스 해제한 항목을 조회조건에서 제외 - 그외 기존 체크항목 유지
  909. var srchdeptcd = "";
  910. var tmp_srchdeptcd = model.getValue("/root/send/srchdata/srchdeptcd").split("|"); //기존 선택한 [상세부서]목록 설정
  911. for(var i = 1; i <= getNodesetCount("/root/init/orddept/dept"); i++){ // 새로조회된 [상세부서]목록만큼.. * 인스턴스배열은 1부터..
  912. if(isSearchString(deptflag, model.getValue("/root/init/orddept/dept["+i+"]/orddeptflag"))){ // 새로 조회된 부서 중 이전 선택한 항목에 대해서만.. [부서구분]으로 비교
  913. for(j = 0; j < tmp_srchdeptcd.length; j++){
  914. if(model.getValue("/root/init/orddept/dept["+i+"]/deptcd") == tmp_srchdeptcd[j]){ // 신/구 [상세부서] 비교
  915. srchdeptcd += tmp_srchdeptcd[j]+"|";
  916. //if(i != (getNodesetCount("/root/init/orddept/dept")+1)) srchdeptcd += "|"; // 가장 마지막은 구분자 삽입하지 않음.
  917. }
  918. model.setValue("/root/init/orddept/dept["+i+"]/chk", "Y");
  919. }
  920. }
  921. }
  922. srchdeptcd = srchdeptcd.substr(0,parseInt(srchdeptcd.length)-1); // 마지막 구분자는 삭제
  923. model.setValue("/root/send/srchdata/srchdeptcd", srchdeptcd);
  924. gv_deptflag = deptflag; // 이전 선택된 부서구분을 위한 비교변수 설정
  925. }else{
  926. // 선택한 대상부서가 없을시 부서 조회조건 초기화
  927. model.resetInstanceNode("/root/init/orddept/dept");
  928. model.setValue("/root/send/srchdata/srchdeptcd", "");
  929. gv_deptflag = "";
  930. }
  931. model.refresh();
  932. ]]>
  933. </script>
  934. <script type="javascript" ev:event="onmouseover">
  935. <![CDATA[
  936. chk_deptcd.visible=true;
  937. ]]>
  938. </script>
  939. </select>
  940. <select1 id="rdo_srchflag" ref="/root/send/srchdata/srchflag" appearance="full" cellspacing="5" cols="3" rows="1" overflow="visible" style="left:407px; top:11px; width:183px; height:20px; border-style:none; ">
  941. <choices>
  942. <item>
  943. <label>시간별</label>
  944. <value>T</value>
  945. </item>
  946. <item>
  947. <label>선불출</label>
  948. <value>P</value>
  949. </item>
  950. </choices>
  951. <script type="javascript" ev:event="xforms-value-changed">
  952. <![CDATA[
  953. var srchflag = model.getValue("/root/send/srchdata/srchflag");
  954. if(srchflag == "T"){
  955. //group5.visible = false;
  956. //group6.visible = false;
  957. grd_drugsum.visible = true;
  958. chk_deptflag.disabled = false;
  959. //model.resetInstanceNode("/root/init/orddept");
  960. }else if(srchflag == "D"){
  961. group5.visible = true;
  962. group6.visible = true;
  963. chk_deptflag.disabled = false;
  964. //model.resetInstanceNode("/root/init/orddept");
  965. }else if(srchflag == "P"){
  966. //group5.visible = false;
  967. //group6.visible = false;
  968. grd_drugsum.visible = false;
  969. chk_deptflag.disabled = true;
  970. model.resetInstanceNode("/root/init/orddept");
  971. model.setValue("/root/send/srchdata/deptflag", "");
  972. model.setValue("/root/send/srchdata/srchdeptcd","");
  973. }
  974. model.refresh();
  975. ]]>
  976. </script>
  977. </select1>
  978. <caption id="caption7" class="search_name" style="left:315px; top:10px; width:90px; height:17px; ">조회구분 :</caption>
  979. <select id="rdo_prcp" ref="/root/send/srchdata/prcpkindcd" visibility="hidden" overflow="visible" appearance="full" cellspacing="5" cols="6" style="left:100px; top:105px; width:225px; height:20px; border-style:none; ">
  980. <choices>
  981. <item>
  982. <label>정규</label>
  983. <value>R</value>
  984. </item>
  985. <item>
  986. <label>추가</label>
  987. <value>A</value>
  988. </item>
  989. <item>
  990. <label>응급</label>
  991. <value>E</value>
  992. </item>
  993. <item>
  994. <label>Admission</label>
  995. <value>M</value>
  996. </item>
  997. </choices>
  998. </select>
  999. </group>
  1000. <select id="chk_deptcd" ref="/root/send/srchdata/srchdeptcd" visibility="visible" overflow="visible" appearance="full" cols="3" sep="|" style="left:100px; top:95px; width:100px; height:20px; background-color:#f8f8f8; border-style:none; ">
  1001. <choices>
  1002. <itemset nodeset="/root/init/orddept/dept">
  1003. <label ref="depthngnm"/>
  1004. <value ref="deptcd"/>
  1005. </itemset>
  1006. </choices>
  1007. <script type="javascript" ev:event="onmousemove">
  1008. <![CDATA[
  1009. chk_deptcd.visible=true;
  1010. ]]>
  1011. </script>
  1012. <script type="javascript" ev:event="onmouseout">
  1013. <![CDATA[
  1014. chk_deptcd.visible=false;
  1015. ]]>
  1016. </script>
  1017. <script type="javascript" ev:event="onmousedown">
  1018. <![CDATA[
  1019. setPopupMenu("chk_deptcd", false , "/root/hidden/popupmenu/menu", "label", "func");
  1020. ]]>
  1021. </script>
  1022. <script type="javascript" ev:event="DOMFocusOut">
  1023. <![CDATA[
  1024. initPopupMenu();
  1025. ]]>
  1026. </script>
  1027. </select>
  1028. <group id="group7" visibility="hidden" style="left:430px; top:130px; width:60px; height:50px; ">
  1029. <object id="CommAX" clsid="{B721F534-D025-466B-8A28-7CF40E700ACD}" style="left:5px; top:0px; width:45px; height:45px; "/>
  1030. </group>
  1031. <group id="grp_allsumdeptlist" visibility="hidden" style="left:635px; top:390px; width:385px; height:325px; ">
  1032. <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; ">
  1033. <col checkvalue="Y,N" ref="chk" type="checkbox"/>
  1034. <col ref="deptcd"/>
  1035. <col ref="depthngnm"/>
  1036. </datagrid>
  1037. <button id="button14" class="btn6_letter8" style="left:195px; top:295px; width:128px; height:22px; ">
  1038. <caption>환자별검수지출력</caption>
  1039. <script type="javascript" ev:event="DOMActivate">
  1040. <![CDATA[
  1041. var sCurPid = "";
  1042. var sBfPid = "";
  1043. var iRowNumber = 1;
  1044. var sBfSumDeptCd = "";
  1045. var sAfSumDeptCd = "";
  1046. var sBfSumDT = "";
  1047. sBfSumDT = model.getValue("/root/send/srchdata/sumdt");
  1048. sBfSumDeptCd = model.getValue("/root/send/srchdata/srchorddeptcd");
  1049. for(var iNo = 1 ; iNo <= getNodesetCount("/root/init/allsumorddept/dept") ; iNo++) {
  1050. if(model.getValue("/root/init/allsumorddept/dept["+ iNo +"]/chk") == "Y") {
  1051. if(sAfSumDeptCd == "") {
  1052. sAfSumDeptCd = model.getValue("/root/init/allsumorddept/dept["+ iNo +"]/deptcd");
  1053. } else {
  1054. sAfSumDeptCd += "|" + model.getValue("/root/init/allsumorddept/dept["+ iNo +"]/deptcd");
  1055. }
  1056. }
  1057. }
  1058. model.makeValue("/root/send/srchdata/sumdt", sAfAllSumDt);
  1059. model.makeValue("/root/send/srchdata/srchorddeptcd", sAfSumDeptCd);
  1060. submit("TRADT10333");
  1061. model.makeValue("/root/send/srchdata/sumdt", sBfSumDT);
  1062. model.makeValue("/root/send/srchdata/srchorddeptcd", sBfSumDeptCd);
  1063. //등록번호 별로 구분 하여 출력 한다.
  1064. model.removenode("/root/temp/tempprntpatprcp");
  1065. model.makeNode("/root/temp/tempprntpatprcp");
  1066. model.copyNode("/root/temp/tempprntpatprcp", "/root/temp/prntpatprcp");
  1067. model.removenode("/root/temp/prntpatprcp");
  1068. for(var iRowNo = 1 ; iRowNo <= getNodesetCount("/root/temp/tempprntpatprcp/prcpdrug") ; iRowNo++) {
  1069. sCurPid = model.getValue("/root/temp/tempprntpatprcp/prcpdrug["+ iRowNo +"]/pid");
  1070. if(sCurPid != sBfPid) {
  1071. iRowNumber = 1;
  1072. model.removenode("/root/temp/prntpatprcp");
  1073. for(var iNo = 1 ; iNo <= getNodesetCount("/root/temp/tempprntpatprcp/prcpdrug") ; iNo++) {
  1074. if(sCurPid == model.getValue("/root/temp/tempprntpatprcp/prcpdrug["+ iNo +"]/pid")) {
  1075. model.makeNode("/root/temp/prntpatprcp/prcpdrug["+ iRowNumber +"]");
  1076. model.copyNode("/root/temp/prntpatprcp/prcpdrug["+ iRowNumber +"]", "/root/temp/tempprntpatprcp/prcpdrug["+ iNo +"]");
  1077. iRowNumber++;
  1078. }
  1079. }
  1080. //출력
  1081. if(model.getValue("/root/temp/prntpatprcp/prcpdrug/pid") != ""){
  1082. exeReportPreview("RPADT10305", "XMLSTR", "", "", "true","","","","","true");
  1083. }
  1084. }
  1085. sBfPid = sCurPid;
  1086. }
  1087. ]]>
  1088. </script>
  1089. </button>
  1090. <button id="btn_cls" class="btn4_letter2" style="left:325px; top:295px; width:56px; height:22px; background-image:../../../com/commonweb/images/btn4_letter2.gif; ">
  1091. <caption>닫기</caption>
  1092. <script type="javascript" ev:event="onclick">
  1093. <![CDATA[
  1094. grp_allsumdeptlist.visible = false;
  1095. model.refresh();
  1096. ]]>
  1097. </script>
  1098. </button>
  1099. <button id="button15" class="btn6_letter6" style="left:89px; top:295px; width:104px; height:22px; ">
  1100. <caption>네임카드출력</caption>
  1101. <script type="javascript" ev:event="DOMActivate">
  1102. <![CDATA[
  1103. var sBfSumDeptCd = "";
  1104. var sAfSumDeptCd = "";
  1105. var sBfSumDT = "";
  1106. sBfSumDT = model.getValue("/root/send/srchdata/sumdt");
  1107. sBfSumDeptCd = model.getValue("/root/send/srchdata/srchorddeptcd");
  1108. for(var iNo = 1 ; iNo <= getNodesetCount("/root/init/allsumorddept/dept") ; iNo++) {
  1109. if(model.getValue("/root/init/allsumorddept/dept["+ iNo +"]/chk") == "Y") {
  1110. if(sAfSumDeptCd == "") {
  1111. sAfSumDeptCd = model.getValue("/root/init/allsumorddept/dept["+ iNo +"]/deptcd");
  1112. } else {
  1113. sAfSumDeptCd += "|" + model.getValue("/root/init/allsumorddept/dept["+ iNo +"]/deptcd");
  1114. }
  1115. }
  1116. }
  1117. model.makeValue("/root/send/srchdata/sumdt", sAfAllSumDt);
  1118. model.makeValue("/root/send/srchdata/srchorddeptcd", sAfSumDeptCd);
  1119. submit("TRADT10337");
  1120. model.makeValue("/root/send/srchdata/sumdt", sBfSumDT);
  1121. model.makeValue("/root/send/srchdata/srchorddeptcd", sBfSumDeptCd);
  1122. fLBLPrint();
  1123. ]]>
  1124. </script>
  1125. </button>
  1126. </group>
  1127. </xhtml:body>
  1128. </xhtml:html>