SMADC10900_임상약출력.xrw 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851
  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. <crdruglist>
  11. <item>
  12. <sel/>
  13. <drugstatnm/>
  14. <pid/>
  15. <hngnm/>
  16. <crflag/>
  17. <orddeptnm/>
  18. <wardnm/>
  19. <orddrnm/>
  20. <drugno/>
  21. <clincstdycd/>
  22. <prcpno/>
  23. <prcpcd/>
  24. <prcpnm/>
  25. <prcpqty/>
  26. <prcpqtyunit/>
  27. <prcptims/>
  28. <prcpdayno/>
  29. <totqty/>
  30. <totqtyunit/>
  31. <delivedt/>
  32. <deliveid/>
  33. <prcphistcd/>
  34. <drugstat/>
  35. <ioflag/>
  36. <hosinhosoutflag/>
  37. <drugdd/>
  38. </item>
  39. </crdruglist>
  40. <paramdata>
  41. <param>
  42. <pid/>
  43. <orddd/>
  44. <cretno/>
  45. <orddeptcd/>
  46. <orddrid/>
  47. <prcpdd/>
  48. <drugdd/>
  49. <drugno/>
  50. </param>
  51. </paramdata>
  52. <barcdprntsetup>
  53. </barcdprntsetup>
  54. </main>
  55. <send>
  56. <srchinfo>
  57. <srchprcpdd/>
  58. <srchtoprcpdd/>
  59. <srchioflag>A</srchioflag>
  60. <srchwardcd/>
  61. <srchorddeptcd/>
  62. <srchbcno/>
  63. <srchpid/>
  64. <srchdrugcd/>
  65. <srchorddrid/>
  66. </srchinfo>
  67. <deptinfo>
  68. <deptflag/>
  69. </deptinfo>
  70. <paramsrch/>
  71. <req>
  72. <drugdd/>
  73. <drugno/>
  74. <ioflag/>
  75. <drugstat/>
  76. <dispflag/>
  77. <dispcnts/>
  78. <inputtm/>
  79. <userid/>
  80. <stocdeptcd/>
  81. <instcd/>
  82. <crdrugprintflag/>
  83. </req>
  84. <scrnid/>
  85. </send>
  86. <init>
  87. <deptlist>
  88. <ward>
  89. <wardnm/>
  90. <wardcd/>
  91. </ward>
  92. </deptlist>
  93. <orddept>
  94. <dept>
  95. <depthngnm/>
  96. <deptcd/>
  97. </dept>
  98. </orddept>
  99. <autoflag/>
  100. <barcdprntsetup>
  101. <setupinfo/>
  102. </barcdprntsetup>
  103. <orddrlist>
  104. <usernm/>
  105. <userid/>
  106. </orddrlist>
  107. </init>
  108. <hidden>
  109. <prcpsrch>
  110. <drugno/>
  111. <prntflag/>
  112. <stocdeptcd/>
  113. </prcpsrch>
  114. </hidden>
  115. <temp>
  116. <ret/>
  117. </temp>
  118. </root>
  119. </instance>
  120. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  121. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  122. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  123. <script type="javascript" src="../../../com/departmentcodeweb/js/ZSD001.js"/>
  124. <script type="javascript" src="../../../ast/commonweb/js/AST.js"/>
  125. <script type="javascript" ev:event="xforms-ready">
  126. <![CDATA[
  127. // 진료과
  128. zbcfGetDeptCodeList(getUserInfo("dutplceinstcd"), "orduseyn", "D", "/root/init/orddept"); //부서코드 콤보조회
  129. astfAddCombo("/root/init/orddept","dept","deptcd,depthngnm",",전체");
  130. //병동 Combo 조회
  131. model.setValue("/root/send/deptinfo/deptflag", "W");
  132. success = submit("TRADT10204");
  133. if (success) astfAddCombo("/root/init/deptlist","ward","wardcd,wardnm",",전체");
  134. model.setValue("/root/send/srchinfo/srchprcpdd", getCurrentDate());
  135. model.setValue("/root/send/srchinfo/srchtoprcpdd", getCurrentDate());
  136. model.refresh();
  137. grd_crdruglist.fixedcellcheckbox(0,1) = true;
  138. //바코드프린터설정 초기화
  139. model.setValue("/root/send/scrnid", getScreenID());
  140. submit("TRLLC90101");
  141. var comm = model.getValue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/comm02/comm");
  142. var prntkind = model.getValue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/prntkind");
  143. if(comm == "2") {
  144. model.setValue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/comm02/comm", "1");
  145. }
  146. if(prntkind == "1") {
  147. model.setValue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/prntkind", "5");
  148. }
  149. grd_crdruglist.fixedcellcheckbox(0,3) = true;
  150. //1일기준인지 1회기준인지 체크하여 컬럼을 hidden
  151. var colHidnValue = grdBaseColHidn("D");
  152. //1회 기준
  153. if( colHidnValue == "C") {
  154. grd_crdruglist.colHidden(grd_crdruglist.colRef("prcpqty")) = true;
  155. } else {
  156. grd_crdruglist.colHidden(grd_crdruglist.colRef("prcpqty2")) = true;
  157. }
  158. // 출고부서 조회, 설정
  159. submit("TRADT01106");
  160. if(combo3.length == 1) {
  161. combo3.select(0);
  162. } else {
  163. // 2010.01.25 pymi 입원주사조제실 제거
  164. if(model.getValue("/root/init/misdeptlist/deptlist[1]/deptcd") == "3242104000") {
  165. combo3.choices.itemset.attribute("nodeset") = "/root/init/misdeptlist/deptlist[deptcd != '3242104000' ]";
  166. combo3.refresh();
  167. } else {
  168. combo3.select(0); // 20101019_laboru_경북대병원_cmc 셋팅을 경북대병원용으로 변경
  169. }
  170. }
  171. ]]>
  172. </script>
  173. <script id="script1" type="javascript">
  174. <![CDATA[
  175. var gTimer;
  176. ]]>
  177. </script>
  178. <script type="javascript">
  179. <![CDATA[
  180. function fExeSaveToExcel(){
  181. var fileName = window.fileDialog("save", ",", false, "임상약리스트"+getCurrentDate(), "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  182. if (fileName != "")
  183. {
  184. grd_crdruglist.saveExcel(fileName);
  185. }
  186. }
  187. /**
  188. * 처방전/라벨 출력
  189. */
  190. function fPrcpMPSPrint() {
  191. var chk_drugno = model.getValue("/root/hidden/prcpsrch/drugno");
  192. model.setValue("/root/hidden/prcpsrch/prntflag", "Y");
  193. model.copyNode("/root/send/paramsrch","/root/hidden/prcpsrch");
  194. //원외 처방전 출력
  195. fHosOutMPSPrint();
  196. }
  197. /**
  198. * 라벨 출력
  199. */
  200. function fHosInLBLPrint() {
  201. var sParam = "";
  202. var drugdd ="";
  203. var drugno ="";
  204. var ioflag ="";
  205. for ( var i = 1 ; i<grd_crdruglist.rows; i++){
  206. if(model.getValue("/root/main/crdruglist/item["+i+"]/sel")=="Y"){
  207. if ( drugdd + drugno + ioflag != model.getValue("/root/main/crdruglist/item["+i+"]/drugdd")+model.getValue("/root/main/crdruglist/item["+i+"]/drugno")+model.getValue("/root/main/crdruglist/item["+i+"]/ioflag")){
  208. drugdd =model.getValue("/root/main/crdruglist/item["+i+"]/drugdd");
  209. drugno =model.getValue("/root/main/crdruglist/item["+i+"]/drugno");
  210. ioflag =model.getValue("/root/main/crdruglist/item["+i+"]/ioflag");
  211. sParam = "drugdd▦drugno▦ioflag▦prcpdd▦orddd▦cretno▦prcpgenrflag▦pid▦orddeptcd▦wardcd▦lblflag▦prcpflag▦prntflag▦drugflag▩";
  212. sParam += model.getValue("/root/main/crdruglist/item["+i+"]/drugdd")+"▦"+
  213. model.getValue("/root/main/crdruglist/item["+i+"]/drugno")+"▦"+
  214. model.getValue("/root/main/crdruglist/item["+i+"]/ioflag")+"▦"+
  215. model.getValue("/root/main/crdruglist/item["+i+"]/prcpdd")+"▦"+
  216. model.getValue("/root/main/crdruglist/item["+i+"]/orddd")+"▦"+
  217. model.getValue("/root/main/crdruglist/item["+i+"]/cretno")+"▦"+
  218. model.getValue("/root/main/crdruglist/item["+i+"]/prcpgenrflag")+"▦"+
  219. model.getValue("/root/main/crdruglist/item["+i+"]/pid")+"▦"+
  220. model.getValue("/root/main/crdruglist/item["+i+"]/orddeptcd")+"▦"+
  221. model.getValue("/root/main/crdruglist/item["+i+"]/wardcd")+"▦"+
  222. model.getValue("/root/main/crdruglist/item["+i+"]/lblflag")+"▦"+
  223. //model.getValue("/root/main/crdruglist/item["+i+"]/prcpflag")+"▦"+
  224. //20110111_laboru_경북대병원_임상약 라벨위해 flag 값 셋팅
  225. "R" +"▦"+
  226. model.getValue("/root/main/crdruglist/item["+i+"]/prntflag")+"▦"+
  227. model.getValue("/root/main/crdruglist/item["+i+"]/drugflag")+"▦"+
  228. //""+"▦"+""+"▦"+"C"+"▩"; // 20100325_laboru_라벨출력
  229. model.getValue("/root/main/crdruglist/item["+i+"]/prcpno")+"▦"+""+"▦"+"C"+"▩"; // 20100325_laboru_라벨출력
  230. model.setAttribute("params", sParam);
  231. model.copyNode("/root/init/barcdprntsetup", "/root/main/barcdprntsetup");
  232. //modal("SPADT63300",0,200,200,"SPADT63300","/root/init/barcdprntsetup","/root/init/barcdprntsetup");
  233. modal("SPADT63300",0,200,200,"SPADT63300","/root","/root"); // 20101220 wify 경북대병원 라벨출력방식 rexpert로 변경
  234. model.setAttribute("params", "");
  235. }
  236. }
  237. }
  238. // submit("TRADT10205");
  239. }
  240. /**
  241. * 원외 처방전 출력
  242. */
  243. function fHosOutMPSPrint() {
  244. var sParam = "";
  245. var drugno ="";
  246. for ( var i = 1 ; i<grd_crdruglist.rows; i++){
  247. //********* 자동출력시 외래 원외 처방은 제외========== 2008.10.29 김귀남*************************************************************
  248. var b_prntyn = false;
  249. // autoflag =1 : 자동출력
  250. if(model.getValue("/root/init/autoflag") == 1){
  251. if(model.getValue("/root/main/crdruglist/item["+i+"]/sel")=="Y" && model.getValue("/root/main/crdruglist/item["+i+"]/hosinhosoutflag") != "O"){
  252. b_prntyn = true;
  253. }
  254. }else{
  255. if(model.getValue("/root/main/crdruglist/item["+i+"]/sel")=="Y"){
  256. b_prntyn = true;
  257. }
  258. }
  259. // ****************************************************************************************************************************
  260. if (b_prntyn) {
  261. sParam = "";
  262. if ( drugno != model.getValue("/root/main/crdruglist/item["+i+"]/drugno") ) {
  263. drugno = model.getValue("/root/main/crdruglist/item["+i+"]/drugno");
  264. sParam = "pid▦orddd▦prcpdd▦cretno▦orddeptcd▦orddrid▦prcpgenrflag▦ioflag▦clincstdycd▦drugno▦crflag▦hosinhosoutflag▩";
  265. sParam += model.getValue("/root/main/crdruglist/item["+i+"]/pid")+"▦"+
  266. model.getValue("/root/main/crdruglist/item["+i+"]/orddd")+"▦"+
  267. model.getValue("/root/main/crdruglist/item["+i+"]/prcpdd")+"▦"+
  268. model.getValue("/root/main/crdruglist/item["+i+"]/cretno")+"▦"+
  269. model.getValue("/root/main/crdruglist/item["+i+"]/orddeptcd")+"▦"+
  270. model.getValue("/root/main/crdruglist/item["+i+"]/orddrid")+"▦"+
  271. model.getValue("/root/main/crdruglist/item["+i+"]/prcpgenrflag")+"▦"+
  272. model.getValue("/root/main/crdruglist/item["+i+"]/ioflag")+"▦"+
  273. model.getValue("/root/main/crdruglist/item["+i+"]/clincstdycd")+"▦"+
  274. model.getValue("/root/main/crdruglist/item["+i+"]/drugno")+"▦"+
  275. model.getValue("/root/main/crdruglist/item["+i+"]/crflag")+"▦"+
  276. model.getValue("/root/main/crdruglist/item["+i+"]/hosinhosoutflag")+"▩";
  277. model.setAttribute("params", sParam);
  278. modal("SPADC61500",0,200,200,"","");
  279. model.setAttribute("params", "");
  280. }
  281. }
  282. }
  283. }
  284. function fGetDrugPatList(){
  285. model.removeNodeset("/root/main/crdruglist");
  286. submit("TRADC10901");
  287. model.setValue("/root/send/srchinfo/srchwardcd","");
  288. model.setValue("/root/send/srchinfo/srchorddrid","");
  289. model.setValue("/root/send/srchinfo/srchorddeptcd","");
  290. grd_crdruglist.rebuildStyle();
  291. for ( var i = grd_crdruglist.fixedRows ; i<grd_crdruglist.rows; i++){
  292. if ( model.getValue("/root/main/crdruglist/item["+i+"]/drugstat")=="NP"
  293. && model.getValue("/root/main/crdruglist/item["+i+"]/spcldrug") != "M"
  294. // 20100107_laboru_prcphistcd 가 d,c 된 처방이면 check 하지 않음
  295. && model.getValue("/root/main/crdruglist/item["+i+"]/prcphistcd") != "C"
  296. && model.getValue("/root/main/crdruglist/item["+i+"]/prcphistcd") != "D"
  297. && model.getValue("/root/main/crdruglist/item["+i+"]/prcphistcd") != "E") {
  298. model.setValue("/root/main/crdruglist/item["+i+"]/sel", "Y");
  299. }else model.setValue("/root/main/crdruglist/item["+i+"]/sel","N");
  300. // 원외 색상 변경 -- D,C,E 색상변경전에 처리 - 2008-10-09 김귀남
  301. if(model.getValue("/root/main/crdruglist/item["+i+"]/hosinhosoutflag") == "O" ) {
  302. grd_crdruglist.rowStyle(i, "data", "background-color") = "#ffff99";
  303. }
  304. //********************************************************
  305. }
  306. setRowStyle("grd_crdruglist" , "4" , "C" , "prcphistcd", "equal" );
  307. setRowStyle("grd_crdruglist" , "3" , "D" , "prcphistcd", "equal" );
  308. setRowStyle("grd_crdruglist" , "2" , "E" , "prcphistcd", "equal" );
  309. //grd_crdruglist.autoMerge = "true";
  310. model.refresh();
  311. }
  312. function fDrugNo(){
  313. submit("TXADC10901");
  314. submit("TXADC10902");
  315. }
  316. function fAuto(){
  317. fDrugNo();
  318. fGetDrugPatList();
  319. fPrcpMPSPrint();
  320. fHosInLBLPrint(); // 자동마감 걸었을 때 라벨 출력 기능도 포함되게 수정 2011.9.15 jmkim
  321. }
  322. function fSubmitDrugStat(drugstat){
  323. var selrow = 0;
  324. var predrugstat = ""; // 이전처방상태
  325. if (grd_crdruglist.rows > 0 && grd_crdruglist.row <= 0) {
  326. selrow = 1;
  327. } else {
  328. selrow = grd_crdruglist.row;
  329. }
  330. for(var i = 0; i < grd_crdruglist.rows; i++) {
  331. selrow = i;
  332. if(model.getValue("/root/main/crdruglist/item["+selrow+"]/sel") == "Y") {
  333. // 처방상태처리
  334. predrugstat = model.getValue("/root/main/crdruglist/item["+selrow+"]/drugstat");
  335. //if (drugstat == "P" && predrugstat != "D") {
  336. // messageBox("이전상태가 조제완료가 아니므로 조제취소하실 수 없습니다.","I999");
  337. // return;
  338. if (drugstat == "NM" && predrugstat != "M") {
  339. messageBox("이전상태가 투약완료가 아니므로 투약취소를 하실 수 없습니다.","I999");
  340. return;
  341. }else if(drugstat == "M" && predrugstat != "D"){
  342. // messageBox("이전상태가 출력이 아니므로 불출처리를 하실 수 없습니다.","I999");
  343. messageBox("이전상태가 조제완료가 아니므로 투약완료를 하실 수 없습니다.","I999");
  344. return;
  345. }else if(drugstat == "D" && predrugstat != "P") {
  346. messageBox("이전상태가 출력이 아니므로 조제완료를 하실 수 없습니다.","I999");
  347. return;
  348. }else if(drugstat == "P" && predrugstat != "D") {
  349. messageBox("이전상태가 조제완료가 아니므로 조제취소를 하실 수 없습니다.","I999");
  350. return;
  351. }
  352. //if (drugstat == "M" && predrugstat != "D") {
  353. // messageBox("조제완료 상태가 아니므로 투약완료하실 수 없습니다.","I999");
  354. // return;
  355. // }
  356. // 투약취소 -> 조제완료
  357. var drugstat2 = drugstat;
  358. if (drugstat == "NM" ) drugstat = "D";
  359. // 전송정보
  360. model.setValue("/root/send/req/drugdd" , model.getValue("/root/main/crdruglist/item["+selrow+"]/drugdd"));
  361. model.setValue("/root/send/req/drugno" , model.getValue("/root/main/crdruglist/item["+selrow+"]/drugno"));
  362. model.setValue("/root/send/req/ioflag" , model.getValue("/root/main/crdruglist/item["+selrow+"]/ioflag"));
  363. model.setValue("/root/send/req/drugstat" , drugstat);
  364. model.setValue("/root/send/req/userid" , getUserId());
  365. model.setValue("/root/send/req/instcd" , getUserInfo("dutplceinstcd"));
  366. model.setValue("/root/send/req/crdrugprintflag" , "Y");
  367. // 투약처리
  368. if (drugstat =="M") model.setValue("/root/send/req/stocdeptcd", "3242103000");
  369. // 수정
  370. var success = submit("TXADT00701");
  371. if(drugstat2 == "NM") drugstat = "NM";
  372. }
  373. }
  374. // 처리결과
  375. if (success) fGetDrugPatList();
  376. }
  377. //프린터 설정
  378. function fSetPrint() {
  379. var count = getNodesetCount("/root/main/barcdprntsetup/prntsetupinfo/setupinfo");
  380. if(count == 0) {
  381. model.makeNode("/root/main/barcdprntsetup/prntsetupinfo/setupinfo");
  382. }
  383. //open("SPLLC90100_바코드프린터설정.xrw", "", "", "", "", "/root/main/barcdprntsetup/prntsetupinfo/setupinfo", "/root/main/barcdprntsetup/prntsetupinfo/setupinfo");
  384. // 20101220 wify 경북대병원 라벨 출력방식 rexpert로 변경.
  385. open("SPZUR00300_바코드프린터설정_knuh.xrw", "", "", "", "", "/root/main/barcdprntsetup/prntsetupinfo/setupinfo", "/root/main/barcdprntsetup/prntsetupinfo/setupinfo");
  386. }
  387. ]]>
  388. </script>
  389. <submission id="TRZSD00109" mediatype="application/x-www-form-urlencoded" method="post" replace="instance" resultref="/root/init/deptinfo"/>
  390. <submission id="TRADT10204" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/deptinfo" replace="instance" resultref="/root/init/deptlist"/>
  391. <submission id="TRADC10901" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" add="bottom" resultref="/root/main/crdruglist"/>
  392. <submission id="TXADC10901" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchinfo" replace="instance" resultref="/root/temp/ret"/>
  393. <submission id="TXADC10902" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchinfo" replace="instance" resultref="/root/temp/ret"/>
  394. <submission id="TXADT00701" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/req" replace="instance" resultref="/root/hidden/item"/>
  395. <submission id="TXADT00702" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/req" replace="instance" resultref="/root/hidden/item"/>
  396. <submission id="TRADC02104" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/orddrinfo" replace="instance" resultref="/root/init/orddrlist"/>
  397. <!-- 프린터 설정-->
  398. <submission id="TRLLC90101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/barcdprntsetup"/>
  399. <submission id="TRADT01106" mediatype="application/x-www-form-urlencoded" method="post" resultref="/root/init/misdeptlist"/>
  400. </model>
  401. </xhtml:head>
  402. <xhtml:body guideline="1,1195;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  403. <group id="group1" style="left:0px; top:0px; width:1194px; height:13px; ">
  404. <caption id="caption19" class="tit_1" style="left:0px; top:0px; width:142px; height:14px; ">임상약 처방전 출력</caption>
  405. </group>
  406. <group id="group3" scroll="auto" style="left:0px; top:40px; width:1195px; height:744px; ">
  407. <input id="input8" class="input_default" style="left:1107px; top:37px; width:80px; height:19px; "/>
  408. <group id="group2" style="left:0px; top:5px; width:895px; height:60px; ">
  409. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:1px; width:890px; height:55px; background-color:#fffbf2; border-color:#ffd799; "/>
  410. <caption id="caption2" class="search_name" style="left:5px; top:7px; width:91px; height:17px; ">처방일자 :</caption>
  411. <caption id="caption24" class="search_name" style="left:291px; top:31px; width:91px; height:17px; ">진료과 :</caption>
  412. <caption id="caption4" class="search_name" style="left:291px; top:7px; width:91px; height:17px; ">병동 :</caption>
  413. <line id="line1" class="line_4" style="x1:700px; y1:28px; x2:700px; y2:50px; border-color:#ffe4bb; border-left-style:solid; "/>
  414. <input id="input1" ref="/root/send/srchinfo/srchprcpdd" class="input_s_essential" inputtype="date" style="left:91px; top:6px; width:93px; height:19px; "/>
  415. <select1 id="radio2" ref="/root/send/srchinfo/srchioflag" class="radio_search" appearance="full" cols="3" rows="1" overflow="visible" style="left:95px; top:30px; width:145px; height:20px; border-style:none; ">
  416. <choices>
  417. <item>
  418. <label>외래</label>
  419. <value>O</value>
  420. </item>
  421. <item>
  422. <label>병동</label>
  423. <value>I</value>
  424. </item>
  425. <item>
  426. <label>전체</label>
  427. <value>A</value>
  428. </item>
  429. </choices>
  430. </select1>
  431. <button id="btn_sea" class="btn1_letter2" style="left:825px; top:29px; width:56px; height:22px; ">
  432. <caption>조회</caption>
  433. <script type="javascript" ev:event="DOMActivate">
  434. <![CDATA[
  435. fGetDrugPatList();
  436. ]]>
  437. </script>
  438. </button>
  439. <select1 id="cbo_srchwardcd" ref="/root/send/srchinfo/srchwardcd" class="combo_search" appearance="minimal" cols="2" style="left:370px; top:6px; width:105px; height:19px; ">
  440. <choices>
  441. <itemset nodeset="/root/init/deptlist/ward">
  442. <label ref="wardnm"/>
  443. <value ref="wardcd"/>
  444. </itemset>
  445. </choices>
  446. </select1>
  447. <select1 id="cbo_srchorddeptcd" ref="/root/send/srchinfo/srchorddeptcd" class="combo_search" appearance="minimal" style="left:370px; top:30px; width:105px; height:19px; ">
  448. <choices>
  449. <itemset nodeset="/root/init/orddept/dept">
  450. <label ref="depthngnm"/>
  451. <value ref="deptcd"/>
  452. </itemset>
  453. </choices>
  454. <script type="javascript" ev:event="xforms-value-changed">
  455. <![CDATA[
  456. model.makeValue("/root/send/srchinfo/srchorddrid","");
  457. model.makeValue("/root/send/orddrinfo/userflag", "03%");
  458. model.makeValue("/root/send/orddrinfo/deptcd", model.getValue("/root/send/srchinfo/srchorddeptcd"));
  459. submit("TRADC02104");
  460. ]]>
  461. </script>
  462. </select1>
  463. <select id="chk_autoflag" ref="/root/init/autoflag" overflow="visible" appearance="full" style="left:712px; top:32px; width:46px; height:15px; border-style:none; ">
  464. <choices>
  465. <item>
  466. <label>자동</label>
  467. <value>1</value>
  468. </item>
  469. </choices>
  470. <script type="javascript" ev:event="onclick">
  471. <![CDATA[
  472. var autoflag = model.getValue("/root/init/autoflag");
  473. if (autoflag == "1" ) {
  474. if (gTimer == null) {
  475. gTimer = window.setInterval("fAuto()",10000);
  476. }
  477. } else {
  478. if (gTimer != null) {
  479. window.clearinterval(gTimer);
  480. gTimer = null;
  481. }
  482. }
  483. ]]>
  484. </script>
  485. </select>
  486. <button id="button1" class="btn4_letter2" style="left:767px; top:29px; width:56px; height:22px; ">
  487. <caption>마감</caption>
  488. <script type="javascript" ev:event="DOMActivate">
  489. <![CDATA[
  490. fDrugNo();
  491. btn_sea.dispatch("DOMActivate");
  492. ]]>
  493. </script>
  494. </button>
  495. <input id="input7" ref="/root/send/srchinfo/srchdrugcd" class="input_s_default" style="left:785px; top:5px; width:95px; height:19px; "/>
  496. <caption id="caption5" class="search_name" style="left:485px; top:7px; width:90px; height:17px; vertical-align:middle; ">등록번호 :</caption>
  497. <caption id="caption7" class="search_name" style="left:690px; top:6px; width:95px; height:17px; vertical-align:middle; ">약품코드 :</caption>
  498. <input id="input6" ref="/root/send/srchinfo/srchpid" class="input_s_default" style="left:580px; top:6px; width:95px; height:19px; "/>
  499. <input id="input2" ref="/root/send/srchinfo/srchtoprcpdd" class="input_s_essential" inputtype="date" style="left:196px; top:6px; width:93px; height:19px; "/>
  500. <caption id="caption1" style="left:185px; top:9px; width:15px; height:15px; ">~</caption>
  501. <caption id="caption8" class="search_name" style="left:485px; top:30px; width:90px; height:17px; vertical-align:middle; ">담당의 :</caption>
  502. <select1 id="combo1" ref="/root/send/srchinfo/srchorddrid" class="combo_search" appearance="minimal" style="left:580px; top:30px; width:95px; height:19px; ">
  503. <choices>
  504. <itemset nodeset="/root/init/orddrlist/user">
  505. <label ref="usernm"/>
  506. <value ref="userid"/>
  507. </itemset>
  508. </choices>
  509. </select1>
  510. </group>
  511. <caption id="caption3" class="cell_1" style="left:897px; top:36px; width:60px; height:23px; vertical-align:middle; ">불출자ID</caption>
  512. <caption id="caption13" class="cell_1" style="left:897px; top:11px; width:60px; height:23px; vertical-align:middle; ">조제완료</caption>
  513. <caption id="caption6" class="cell_1" style="left:1044px; top:36px; width:60px; height:23px; vertical-align:middle; ">불출자</caption>
  514. <line id="line2" class="line_1" style="x1:895px; y1:6px; x2:1190px; y2:6px; "/>
  515. <line id="line3" class="line_2" style="x1:895px; y1:34px; x2:1190px; y2:34px; "/>
  516. <input id="input3" ref="/root/send/srchinfo/srchbcno" class="input_default" style="left:960px; top:12px; width:80px; height:19px; ">
  517. <script type="javascript" ev:event="onkeyup">
  518. <![CDATA[
  519. if(event.keyCode == "13") {
  520. var barcode = "";
  521. var ioflag ="";
  522. var drugdd="";
  523. var drugno ="";
  524. var drugstat ="D";
  525. setInputNodeCurText();
  526. barcode = model.getValue("/root/send/srchinfo/srchbcno");
  527. // 임상약 데이터만 처리
  528. if (barcode.length > 1) {
  529. ioflag = barcode.substr(0,1);
  530. if (ioflag.toUpperCase() != "C") return;
  531. } else {
  532. return;
  533. }
  534. ioflag = barcode.substr(1,1);
  535. drugdd = barcode.substr(2,8);
  536. drugno = barcode.substr(10,5);
  537. // 전송정보
  538. model.setValue("/root/send/req/drugdd" , drugdd);
  539. model.setValue("/root/send/req/drugno" , drugno);
  540. model.setValue("/root/send/req/ioflag" , ioflag);
  541. model.setValue("/root/send/req/drugstat" , drugstat);
  542. model.setValue("/root/send/req/userid" , getUserId());
  543. model.setValue("/root/send/req/instcd" , getUserInfo("dutplceinstcd"));
  544. // 투약처리
  545. if (drugstat =="D") model.setValue("/root/send/req/stocdeptcd", "3242103000");
  546. // 수정
  547. var success = submit("TXADT00701");
  548. model.setValue ( "/root/send/srchinfo/srchprcpdd", drugdd);
  549. // 처리결과
  550. if (success) fGetDrugPatList();
  551. model.setValue("/root/send/srchinfo/srchbcno","");
  552. model.refresh();
  553. }
  554. ]]>
  555. </script>
  556. </input>
  557. <input id="input5" class="input_default" style="left:960px; top:37px; width:80px; height:19px; "/>
  558. <line id="line6" class="line_3" style="x1:895px; y1:60px; x2:1190px; y2:60px; "/>
  559. <datagrid id="grd_crdruglist" nodeset="/root/main/crdruglist/item" caption="약번호(hidden)^구분(hidden)^^상태^투약번호^처방일자^등록번호^성명^구분^진료과^병동^담당의^과제번호^약품번호^약품코드^약품명^ 1일수량^1회수량^단위^횟수^일수^총량^단위^불출일시^불출약사^반환^상태" colsep="^" colwidth="1, 1, 26, 60, 56, 75, 70, 50, 40, 100, 70, 50, 100, 100, 80, 201, 52, 51, 36, 39, 33, 52, 34, 100, 60, 41, 41, 100" explorerbar="sortshowmove" mergecells="byrestriccol" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:0px; top:65px; width:1194px; height:675px; ">
  560. <col ref="drugno" visibility="hidden"/>
  561. <col ref="crflag" visibility="hidden"/>
  562. <col checkvalue="Y,N" ref="sel" type="checkbox"/>
  563. <col ref="drugstatnm"/>
  564. <col ref="drugno"/>
  565. <col ref="drugdd" format="yyyy-mm-dd" style="text-align:center; "/>
  566. <col ref="pid"/>
  567. <col ref="hngnm"/>
  568. <col ref="crflag" style="text-align:center; "/>
  569. <col ref="orddeptnm"/>
  570. <col ref="wardnm"/>
  571. <col ref="orddrnm"/>
  572. <col ref="clincstdycd"/>
  573. <!-- 20100203 황세원 자동머지 해제 했지요-->
  574. <col ref="prcpno" visibility="hidden"/>
  575. <!-- 20100223 여기까지 수정했지요-->
  576. <col ref="prcpcd"/>
  577. <col ref="prcpnm"/>
  578. <col ref="prcpqty" style="text-align:right; "/>
  579. <col ref="prcpqty2" style="text-align:right; "/>
  580. <col ref="prcpqtyunit"/>
  581. <col ref="prcptims" style="text-align:right; "/>
  582. <col ref="prcpdayno" style="text-align:right; "/>
  583. <col ref="totqty" visibility="hidden" style="text-align:right; "/>
  584. <col ref="totqtyunit" visibility="hidden"/>
  585. <col ref="delivedt"/>
  586. <col ref="deliveid"/>
  587. <col ref="prcphistcd"/>
  588. <col ref="drugstat"/>
  589. <script type="javascript" ev:event="onclick">
  590. <![CDATA[
  591. model.setValue("/root/init/autoflag","");
  592. if (gTimer != null) {
  593. window.clearinterval(gTimer);
  594. gTimer = null;
  595. }
  596. model.refresh();
  597. ]]>
  598. </script>
  599. <script type="javascript" ev:event="xforms-select">
  600. <![CDATA[
  601. var startrow = 0;
  602. if(grd_crdruglist.mouseCol == 3 && grd_crdruglist.mouseRow > 0) {
  603. startrow = grd_crdruglist.row;
  604. } else {
  605. startrow = 1;
  606. }
  607. // Cell Merge.. 체크박스 일괄선택기능 2008-09-12 김귀남 START
  608. selDrugno = model.getValue("/root/main/crdruglist/item["+grd_crdruglist.mouseRow+"]/drugno");
  609. selCrflag = model.getValue("/root/main/crdruglist/item["+grd_crdruglist.mouseRow+"]/crflag");
  610. for(var i = startrow; selDrugno == model.getValue("/root/main/crdruglist/item["+i+"]/drugno"); i++){
  611. if(selCrflag == model.getValue("/root/main/crdruglist/item["+i+"]/crflag")){
  612. model.setValue("/root/main/crdruglist/item["+i+"]/sel", "Y");
  613. }
  614. }
  615. model.refresh();
  616. // Cell Merge.. 체크박스 일괄선택기능 2008-09-12 김귀남 END
  617. ]]>
  618. </script>
  619. <script type="javascript" ev:event="xforms-deselect">
  620. <![CDATA[
  621. var startrow = 0;
  622. if(grd_crdruglist.mouseCol == 3 && grd_crdruglist.mouseRow > 0) {
  623. startrow = grd_crdruglist.row;
  624. } else {
  625. startrow = 1;
  626. }
  627. // Cell Merge.. 체크박스 일괄선택기능 2008-09-12 김귀남 START
  628. selDrugno = model.getValue("/root/main/crdruglist/item["+grd_crdruglist.mouseRow+"]/drugno");
  629. selCrflag = model.getValue("/root/main/crdruglist/item["+grd_crdruglist.mouseRow+"]/crflag");
  630. for(var i = startrow; selDrugno == model.getValue("/root/main/crdruglist/item["+i+"]/drugno"); i++){
  631. if(selCrflag == model.getValue("/root/main/crdruglist/item["+i+"]/crflag")){
  632. model.setValue("/root/main/crdruglist/item["+i+"]/sel", "N");
  633. }
  634. }
  635. model.refresh();
  636. // Cell Merge.. 체크박스 일괄선택기능 2008-09-12 김귀남 END
  637. ]]>
  638. </script>
  639. </datagrid>
  640. <caption id="caption9" class="cell_1" style="left:1045px; top:10px; width:60px; height:23px; vertical-align:middle; ">투약완료</caption>
  641. <input id="input4" ref="/root/send/srchinfo/srchbcno" class="input_default" style="left:1108px; top:11px; width:80px; height:19px; ">
  642. <script type="javascript" ev:event="onkeyup">
  643. <![CDATA[
  644. if(event.keyCode == "13") {
  645. var barcode = "";
  646. var ioflag ="";
  647. var drugdd="";
  648. var drugno ="";
  649. var drugstat ="M";
  650. setInputNodeCurText();
  651. barcode = model.getValue("/root/send/srchinfo/srchbcno");
  652. // 임상약 데이터만 처리
  653. if (barcode.length > 1) {
  654. ioflag = barcode.substr(0,1);
  655. if (ioflag.toUpperCase() != "C") return;
  656. } else {
  657. return;
  658. }
  659. ioflag = barcode.substr(1,1);
  660. drugdd = barcode.substr(2,8);
  661. drugno = barcode.substr(10,5);
  662. // 전송정보
  663. model.setValue("/root/send/req/drugdd" , drugdd);
  664. model.setValue("/root/send/req/drugno" , drugno);
  665. model.setValue("/root/send/req/ioflag" , ioflag);
  666. model.setValue("/root/send/req/drugstat" , drugstat);
  667. model.setValue("/root/send/req/userid" , getUserId());
  668. model.setValue("/root/send/req/instcd" , getUserInfo("dutplceinstcd"));
  669. // 투약처리
  670. if (drugstat =="M") model.setValue("/root/send/req/stocdeptcd", "3242103000");
  671. // 수정
  672. var success = submit("TXADT00701");
  673. model.setValue ( "/root/send/srchinfo/srchprcpdd", drugdd);
  674. // 처리결과
  675. if (success) fGetDrugPatList();
  676. model.setValue("/root/send/srchinfo/srchbcno","");
  677. model.refresh();
  678. }
  679. ]]>
  680. </script>
  681. </input>
  682. </group>
  683. <group id="group4" scroll="auto" style="left:0px; top:13px; width:1195px; height:27px; ">
  684. <button id="button2" class="btn4_letter4" style="left:1113px; top:5px; width:80px; height:22px; ">
  685. <caption>투약취소</caption>
  686. <script type="javascript" ev:event="DOMActivate">
  687. <![CDATA[
  688. fSubmitDrugStat ("NM");
  689. ]]>
  690. </script>
  691. </button>
  692. <button id="button3" class="btn4_letter4" style="left:1030px; top:5px; width:80px; height:22px; ">
  693. <caption>투약완료</caption>
  694. <script type="javascript" ev:event="DOMActivate">
  695. <![CDATA[
  696. fSubmitDrugStat ("M");
  697. ]]>
  698. </script>
  699. </button>
  700. <button id="button4" class="btn6_letter5" style="left:90px; top:5px; width:92px; height:22px; ">
  701. <caption>처방전출력</caption>
  702. <script type="javascript" ev:event="DOMActivate">
  703. <![CDATA[
  704. fPrcpMPSPrint();
  705. fGetDrugPatList();
  706. ]]>
  707. </script>
  708. </button>
  709. <button id="button5" class="btn6_letter4" style="left:185px; top:5px; width:80px; height:22px; ">
  710. <caption>라벨출력</caption>
  711. <script type="javascript" ev:event="DOMActivate">
  712. <![CDATA[
  713. fHosInLBLPrint();
  714. ]]>
  715. </script>
  716. </button>
  717. <button id="button23" class="btn3_letter4" style="left:5px; top:5px; width:80px; height:22px; ">
  718. <caption>약력조회</caption>
  719. <script type="javascript" ev:event="DOMActivate">
  720. <![CDATA[
  721. open("SMADB10100",0,0,0,"SMADB10100","/root/main/crdruglist/item["+grd_crdruglist.row+"]/pid","/root/temp/patinfo/pid");
  722. ]]>
  723. </script>
  724. </button>
  725. <button id="btn_excel" class="btn2_letter4" style="left:795px; top:5px; width:64px; height:19px; ">
  726. <caption>엑셀저장</caption>
  727. <script type="javascript" ev:event="DOMActivate">
  728. <![CDATA[
  729. if (grd_crdruglist.rows>1) {
  730. fExeSaveToExcel();
  731. }
  732. ]]>
  733. </script>
  734. </button>
  735. <button id="btn_prnt" class="btn3_letter5" navindex="18" style="left:265px; top:5px; width:92px; height:22px; ">
  736. <caption>프린터설정</caption>
  737. <script type="javascript" ev:event="DOMActivate">
  738. <![CDATA[
  739. fSetPrint();
  740. ]]>
  741. </script>
  742. </button>
  743. <button id="button6" class="btn4_letter4" style="left:945px; top:5px; width:80px; height:22px; ">
  744. <caption>조제취소</caption>
  745. <script type="javascript" ev:event="DOMActivate">
  746. <![CDATA[
  747. fSubmitDrugStat ("P");
  748. ]]>
  749. </script>
  750. </button>
  751. <button id="button7" class="btn4_letter4" style="left:862px; top:5px; width:80px; height:22px; ">
  752. <caption>조제완료</caption>
  753. <script type="javascript" ev:event="DOMActivate">
  754. <![CDATA[
  755. fSubmitDrugStat ("D");
  756. ]]>
  757. </script>
  758. </button>
  759. <!-- 20101021_laboru_경북대병원_실출고부서 셋팅-->
  760. <caption id="caption10" style="left:550px; top:5px; width:69px; height:20px; font-weight:bold; color:#ff0000; ">실출고부서</caption>
  761. <select1 id="combo3" ref="/root/hidden/prcpsrch/stocdeptcd" appearance="minimal" style="left:625px; top:5px; width:121px; height:19px; ">
  762. <choices>
  763. <itemset nodeset="/root/init/misdeptlist/deptlist">
  764. <label ref="deptnm"/>
  765. <value ref="deptcd"/>
  766. </itemset>
  767. </choices>
  768. <script type="javascript" ev:event="xforms-value-changed">
  769. <![CDATA[
  770. var chk_cnt = 0;
  771. if(chk_cnt != 0) {
  772. var ret = messageBox("약품출고부서를 " + combo3.label +"으로 ", "S001");
  773. if(ret == "6") {
  774. model.setValue("/root/send/suminfo/mstocdeptcd", combo3.value);
  775. } else {
  776. model.setValue("/root/send/suminfo/mstocdeptcd", model.getValue("/root/temp/stocdeptcd"));
  777. //model.setValue("/root/hidden/prcpsrch/stocdeptcd", model.getValue("/root/temp/stocdeptcd"));
  778. }
  779. combo3.refresh();
  780. }
  781. ]]>
  782. </script>
  783. </select1>
  784. </group>
  785. </xhtml:body>
  786. </xhtml:html>