SMADT10400_병동투약관리.xrw 78 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005
  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. <masterinfo>
  11. <grd_druglist>
  12. <sel/>
  13. <ordrtnflag/>
  14. <prcpdd/>
  15. <drugno/>
  16. <prcpkindcdnm/>
  17. <roomcd/>
  18. <hngnm/>
  19. <pid/>
  20. <drugstat/>
  21. <prcpdt/>
  22. <bcno/>
  23. <drugpath/>
  24. <drugdt/>
  25. <nodeliveyn/>
  26. <nodelivedt/>
  27. <rtnflag/>
  28. <rtndt/>
  29. <drugdd/>
  30. <ioflag/>
  31. <instcd/>
  32. <predrugstat/>
  33. <userid/>
  34. <predrugpath/>
  35. <stocdeptcd/>
  36. <stocdeptnm/>
  37. <stocdt/>
  38. <medispclnm/>
  39. <atdocnm/>
  40. <prntdt/>
  41. <drugenddt/>
  42. </grd_druglist>
  43. <grd_exelist>
  44. <prcphistcdnm/>
  45. <prcpcd/>
  46. <prcpnm/>
  47. <prcpqty/>
  48. <prcptims/>
  49. <prcpdayno/>
  50. </grd_exelist>
  51. <grd_histlist>
  52. <prcphistcdnm/>
  53. <prcpcd/>
  54. <prcpnm/>
  55. <prcpqty/>
  56. <prcpqty/>
  57. <prcptims/>
  58. <prcpdayno/>
  59. </grd_histlist>
  60. </masterinfo>
  61. <detailinfo>
  62. <pat_info>
  63. <drugno/>
  64. <roomcd/>
  65. <hngnm/>
  66. <pid/>
  67. <indd/>
  68. <orddeptnm/>
  69. <atdocnm/>
  70. <medispclnm/>
  71. </pat_info>
  72. <item>
  73. <sel/>
  74. <ordrtnflag/>
  75. <prcpcd/>
  76. <drugnm/>
  77. <drugtypenm/>
  78. <prcpqty/>
  79. <prcptims/>
  80. <prcpdayno/>
  81. <prntdt/>
  82. <nodeliveyn/>
  83. <nodelivedt/>
  84. <rtnflag/>
  85. <rtndt/>
  86. <prcpdt/>
  87. <drugpathnm/>
  88. <drugdt/>
  89. <sumdt/>
  90. <pid/>
  91. <drugno/>
  92. <bcno/>
  93. <powdflag/>
  94. <drugdd/>
  95. <ioflag/>
  96. <drugseqno/>
  97. <instcd/>
  98. <prcpdd/>
  99. <prcpno/>
  100. <prcphistno/>
  101. <execprcpno/>
  102. <drugtype/>
  103. <drugstat/>
  104. <userid/>
  105. <userdeptcd/>
  106. <drugpath/>
  107. <prcpkindcd/>
  108. <prcphistcd/>
  109. <stocdeptcd/>
  110. <stocdeptnm/>
  111. <stocdt/>
  112. <spcldrug/>
  113. </item>
  114. <memoinfo>
  115. <pid/>
  116. <indd/>
  117. <seqno/>
  118. <instcd/>
  119. <orddeptcd/>
  120. <orddeptnm/>
  121. <writid/>
  122. <writid2/>
  123. <writnm/>
  124. <writdt/>
  125. <memo/>
  126. <useyn/>
  127. <m/>
  128. <ioflag/>
  129. </memoinfo>
  130. </detailinfo>
  131. <reokdateflag>
  132. <reokdateflag1/>
  133. <reokdateflag2/>
  134. </reokdateflag>
  135. </main>
  136. <send>
  137. <req1>
  138. <drugdd/>
  139. <drugno/>
  140. </req1>
  141. <req2>
  142. <list/>
  143. </req2>
  144. <srchinfo>
  145. <srchsumdd1/>
  146. <srchsumtm1/>
  147. <srchsumdd2/>
  148. <srchsumtm2/>
  149. <srchwardcd/>
  150. <srchpid/>
  151. <srchhngnm/>
  152. <srchprcpcd/>
  153. <srchdrugno/>
  154. <srchioflag/>
  155. <srchsumdt1/>
  156. <srchsumdt2/>
  157. <srchprcpkindcd> D</srchprcpkindcd>
  158. <srchprcpkindall/>
  159. <srchprcpnm/>
  160. <rtnstocdeptcd/>
  161. </srchinfo>
  162. <srchdetinfo>
  163. <drugdd/>
  164. <drugno/>
  165. <ioflag/>
  166. <srchpid/>
  167. </srchdetinfo>
  168. <srchbcinfo>
  169. <srchdrugdd/>
  170. <srchdrugno/>
  171. <srchioflag/>
  172. <srchbcno1/>
  173. <srchbcno2/>
  174. </srchbcinfo>
  175. <deptinfo>
  176. <deptflag/>
  177. </deptinfo>
  178. <srchprcpcdinfo>
  179. <srchdrugcd/>
  180. </srchprcpcdinfo>
  181. <memosrchinfo>
  182. <srchpid/>
  183. <srchseqno/>
  184. <srchindd/>
  185. <srchinstcd/>
  186. <srchioflag/>
  187. </memosrchinfo>
  188. <usersrchinfo>
  189. <srchuserid/>
  190. </usersrchinfo>
  191. <req>
  192. <data1>
  193. </data1>
  194. <data2/>
  195. <data3/>
  196. </req>
  197. </send>
  198. <init>
  199. <deptlist>
  200. <ward>
  201. <wardcd/>
  202. <wardnm/>
  203. </ward>
  204. </deptlist>
  205. <drugpathinfo>
  206. <A0149/>
  207. </drugpathinfo>
  208. <prcpkindinfo>
  209. <M0003/>
  210. </prcpkindinfo>
  211. <drugstatallinfo>
  212. <A0004/>
  213. </drugstatallinfo>
  214. <drugstatinfo/>
  215. <rtnflaginfo>
  216. <item>
  217. <cdid>X</cdid>
  218. <cdnm>미불출</cdnm>
  219. </item>
  220. <item>
  221. <cdid>D</cdid>
  222. <cdnm>반환확인</cdnm>
  223. </item>
  224. </rtnflaginfo>
  225. <patinfo>
  226. <pid/>
  227. <hngnm/>
  228. </patinfo>
  229. <grdwideyn/>
  230. <stocinfo>
  231. <stocdeptcd>3242107000</stocdeptcd>
  232. <deptlist>
  233. <stocdeptcd/>
  234. <stocdeptnm/>
  235. </deptlist>
  236. </stocinfo>
  237. <misdeptlist>
  238. <deptlist/>
  239. </misdeptlist>
  240. <dateinfo/>
  241. </init>
  242. <hidden>
  243. <drugitem>
  244. <drugcd/>
  245. <drugnm/>
  246. </drugitem>
  247. <receivedrugcd>/root/send/srchinfo/srchprcpcd</receivedrugcd>
  248. <stocdeptlist>
  249. <deptlist>
  250. <stocdeptcd/>
  251. <stocdeptnm/>
  252. </deptlist>
  253. </stocdeptlist>
  254. </hidden>
  255. <temp>
  256. <receivedata>
  257. <receiveref/>
  258. </receivedata>
  259. <popup>
  260. <drugstat>
  261. <mouserght>
  262. <label>[일괄처리항목]</label>
  263. <value>-</value>
  264. </mouserght>
  265. <mouserght>
  266. <label>-</label>
  267. <value/>
  268. </mouserght>
  269. <mouserght>
  270. <label>조제완료</label>
  271. <value>D</value>
  272. </mouserght>
  273. <mouserght>
  274. <label>조제보류</label>
  275. <value>ND</value>
  276. </mouserght>
  277. <mouserght>
  278. <label>-</label>
  279. <value/>
  280. </mouserght>
  281. <mouserght>
  282. <label>투약완료</label>
  283. <value>M</value>
  284. </mouserght>
  285. <mouserght>
  286. <label>투약취소</label>
  287. <value>MC</value>
  288. </mouserght>
  289. <mouserght>
  290. <label>-</label>
  291. <value/>
  292. </mouserght>
  293. <mouserght>
  294. <label>컨베어</label>
  295. <value>C</value>
  296. </mouserght>
  297. <mouserght>
  298. <label>에어슈터</label>
  299. <value>A</value>
  300. </mouserght>
  301. <mouserght>
  302. <label>포터</label>
  303. <value>P</value>
  304. </mouserght>
  305. <mouserght>
  306. <label>복약상담</label>
  307. <value>E</value>
  308. </mouserght>
  309. <mouserght>
  310. <label>투약구</label>
  311. <value>M</value>
  312. </mouserght>
  313. <mouserght>
  314. <label>기타</label>
  315. <value>Q</value>
  316. </mouserght>
  317. </drugstat>
  318. </popup>
  319. <reteresn/>
  320. </temp>
  321. <temp2>
  322. <rtnlist>
  323. <grd_exelist/>
  324. <grd_histlist/>
  325. </rtnlist>
  326. </temp2>
  327. </root>
  328. </instance>
  329. <script type="javascript" ev:event="xforms-ready">
  330. <![CDATA[
  331. //2008-12-03 버튼권한
  332. ipt_bcno1.disabled = !checkAuth("X"); //조제완료 바코드
  333. ipt_bcno2.disabled = !checkAuth("X"); //반환확인 바코드
  334. chk_redateflag1.disabled = !checkAuth("X"); //조제완료 제 시간등록 2015.1.27 김치국
  335. chk_redateflag2.disabled = !checkAuth("X"); //조제완료 제 시간등록 2015.1.27 김치국
  336. cmb_stocdeptcd.disabled =! checkAuth("X"); //불출부서
  337. button36.disabled = !checkAuth("X"); //조제상태저장
  338. button1.disabled = !checkAuth("X"); //이동경로저장
  339. button4.disabled = !checkAuth("X"); //미불출확인
  340. button5.disabled = !checkAuth("X"); //미불출취소
  341. button6.disabled = !checkAuth("X"); //반환확인저장
  342. btn_save.disabled = !checkAuth("X"); //반환확인취소
  343. // 현재날짜
  344. model.setValue("/root/send/srchinfo/srchsumdd1",getCurrentDate());
  345. model.setValue("/root/send/srchinfo/srchsumdd2",getCurrentDate());
  346. // 초기코드값
  347. model.removeNodeset("/root/init/drugpathinfo/A0149");
  348. zbcfGetCodeList( new Array("A0149", "M0003","A0004"), new Array("/root/init/drugpathinfo","/root/init/prcpkindinfo","/root/init/drugstatallinfo") );
  349. var success = submit("TRADT10404");
  350. if (success) astfAddCombo("/root/init/drugpathinfo","A0149","cdid,cdnm",",-");
  351. //병동 Combo 조회
  352. model.setValue("/root/send/deptinfo/deptflag", "W");
  353. submit("TRADT10203");
  354. astfAddCombo("/root/init/deptlist","ward","wardcd,wardnm",",전체");
  355. var index = 1;
  356. var nodeList = instance1.selectNodes("/root/init/drugstatallinfo/A0004");
  357. for( var i=1; i<=nodeList.length; i++) {
  358. var cdid = model.getValue("/root/init/drugstatallinfo/A0004["+i+"]/cdid");
  359. if (cdid == "ND" || cdid == "MD" || cdid == "D" || cdid == "M") { // 20120829_투약완료 상태 추가
  360. index++;
  361. model.makeNode("/root/init/drugstatinfo/A0004["+index+"]");
  362. model.copyNode("/root/init/drugstatinfo/A0004["+index+"]","/root/init/drugstatallinfo/A0004["+i+"]");
  363. if (cdid == "MD") model.setValue("/root/init/drugstatinfo/A0004["+index+"]/cdnm","");
  364. }
  365. }
  366. // 전체선택
  367. grd_druglist.fixedcellcheckbox(0,1) = true;
  368. grd_detdruglist.fixedcellcheckbox(0,1) = true;
  369. // 상세보기 default값
  370. model.setValue("/root/init/grdwideyn","y");
  371. // 처방종류 전체선택
  372. //model.setValue("/root/send/srchinfo/srchprcpkindall","Y");
  373. //model.setValue("/root/send/srchinfo/srchprcpkindcd","R A D S M");
  374. // 재고불출부서
  375. model.setValue("/root/init/stocinfo/stocdeptcd",getUserInfo("dutplcecd")); // 재고불출부서 로긴부서로 default세팅
  376. // model.setValue("/root/init/stocinfo/stocdeptcd","3242106000");
  377. // 반환 출고부서 2009.11.17 pymi
  378. var dutplceinstcd = getUserInfo("dutplceinstcd");
  379. submit("TRADT01106");
  380. /*
  381. if((dutplceinstcd == "013") || (dutplceinstcd == "014") || (dutplceinstcd == "017") || (dutplceinstcd == "011")) {
  382. combo1.select(0);
  383. } else if(dutplceinstcd == "012"){
  384. combo1.select(2);
  385. } else {
  386. combo1.select(1);
  387. }*/
  388. // 20101021_laboru_경북대병원_실출고부서 셋팅
  389. combo1.select(0);
  390. //model.setValue("/root/temp/stocdeptcd", model.getValue("/root/hidden/srchinfo/stocdeptcd"));
  391. // (e)
  392. // 20100203_laboru_불출부서 visibility 막기
  393. // submit("TRADT00704");
  394. // if(model.getValue("/root/hidden/stocdeptlist/deptlist/stocdeptcd") == "Y") {
  395. // cmb_stocdeptcd.visible = false;
  396. // caption21.visible = false;
  397. // }
  398. model.refresh();
  399. ]]>
  400. </script>
  401. <submission id="TRADT10401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchinfo" replace="instance" resultref="/root/main/masterinfo/grd_druglist"/>
  402. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  403. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  404. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  405. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  406. <script type="javascript" src="../../../ast/commonweb/js/AST.js"/>
  407. <submission id="TRADT10402" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdetinfo" replace="instance" resultref="/root/main/detailinfo"/>
  408. <submission id="TRADT10403" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchbcinfo" replace="instance" resultref="/root/main/masterinfo"/>
  409. <submission id="TXADT10401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/req2" replace="instance" resultref="/root/hidden"/>
  410. <submission id="TXADT10402" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/req2" replace="instance" resultref="/root/hidden"/>
  411. <submission id="TXADT10403" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/req2" replace="instance" resultref="/root/hidden"/>
  412. <submission id="TRADT10404" mediatype="application/x-www-form-urlencoded" method="post" replace="instance" resultref="/root/init/wardinfo"/>
  413. <submission id="TXADT10101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/req/data1" replace="instance" resultref="/root/hidden"/>
  414. <submission id="TRADT01106" mediatype="application/x-www-form-urlencoded" method="post" replace="instance" resultref="/root/init/misdeptlist"/>
  415. <submission id="TXADT10102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/req/data2" replace="instance" resultref="/root/hidden"/>
  416. <submission id="TRADT00105" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/usersrchinfo" replace="instance" resultref="/root/hidden/userinfo"/>
  417. <submission id="TRADT00103" mediatype="application/x-www-form-urlencoded" method="post" replace="instance" resultref="/root/init/dateinfo"/>
  418. <submission id="TRZBC00101"/>
  419. <script type="javascript">
  420. <![CDATA[
  421. // 전체선택 인덱스
  422. var varDrugTotSel = "false"; // 처방목록 전체선택
  423. var varDrugPathIndex = 2; // 처방목록 이동경로
  424. var varDrugStatIndex = 3; // 처방목록 조제상태
  425. var varDrugStocIndex = 1; // 처방상세 미불출/반환확인
  426. function fSetValueGrid2Cell(popupParam) {
  427. var row = grd_druglist.row;
  428. var col = grd_druglist.col;
  429. var nodeList = null;
  430. var drugpath = "";
  431. var drugstat = "";
  432. var predrugstat = "";
  433. var predrugpath = "";
  434. for( var i=1; i< grd_druglist.rows; i++) {
  435. if ( model.getValue("/root/main/masterinfo/grd_druglist["+i+"]/drugdt") == "-") {
  436. model.setValue("/root/main/masterinfo/grd_druglist["+i+"]/drugpath","-");
  437. }
  438. }
  439. model.refresh();
  440. if (popupParam== "D") { // 투약처방상태
  441. for( var i=1; i< grd_druglist.rows; i++) {
  442. predrugstat = model.getValue("/root/main/masterinfo/grd_druglist["+i+"]/predrugstat" );
  443. if ( model.getValue("/root/main/masterinfo/grd_druglist["+i+"]/sel") == "true") { // 20120829
  444. if (predrugstat == "MD" || predrugstat == "P" || predrugstat == "ND" || predrugstat == "D") {
  445. model.setValue("/root/main/masterinfo/grd_druglist["+i+"]/sel" ,"true");
  446. model.setValue("/root/main/masterinfo/grd_druglist["+i+"]/drugstat" ,popupParam);
  447. }else {
  448. model.setValue("/root/main/masterinfo/grd_druglist["+i+"]/sel" ,"false");
  449. }
  450. }
  451. }
  452. } else if (popupParam== "ND") { // 투약처방상태 (조제보류)
  453. for( var i=1; i< grd_druglist.rows; i++) {
  454. predrugstat = model.getValue("/root/main/masterinfo/grd_druglist["+i+"]/predrugstat" );
  455. if ( model.getValue("/root/main/masterinfo/grd_druglist["+i+"]/sel") == "true") {
  456. if ((predrugstat == "MD" || predrugstat == "P" || predrugstat == "ND" || predrugstat == "D") ) { // && (model.getValue("/root/main/masterinfo/grd_druglist["+i+"]/drugdt") == "-") 20120829_조건 삭제
  457. model.setValue("/root/main/masterinfo/grd_druglist["+i+"]/sel" ,"true");
  458. model.setValue("/root/main/masterinfo/grd_druglist["+i+"]/drugstat" ,popupParam);
  459. }else {
  460. model.setValue("/root/main/masterinfo/grd_druglist["+i+"]/sel" ,"false");
  461. }
  462. }
  463. }
  464. } else if (popupParam== "M") { // 20120829_투약처방상태 (투약완료)
  465. for( var i=1; i< grd_druglist.rows; i++) {
  466. predrugstat = model.getValue("/root/main/masterinfo/grd_druglist["+i+"]/predrugstat" );
  467. if ( model.getValue("/root/main/masterinfo/grd_druglist["+i+"]/sel") == "true") {
  468. if (predrugstat == "D" ) {
  469. model.setValue("/root/main/masterinfo/grd_druglist["+i+"]/sel" ,"true");
  470. model.setValue("/root/main/masterinfo/grd_druglist["+i+"]/drugstat" ,popupParam);
  471. }else {
  472. model.setValue("/root/main/masterinfo/grd_druglist["+i+"]/sel" ,"false");
  473. }
  474. }
  475. }
  476. } else if (popupParam== "MC") { // 20120829_투약처방상태 (투약취소)
  477. for( var i=1; i< grd_druglist.rows; i++) {
  478. predrugstat = model.getValue("/root/main/masterinfo/grd_druglist["+i+"]/predrugstat" );
  479. if ( model.getValue("/root/main/masterinfo/grd_druglist["+i+"]/sel") == "true") {
  480. if (predrugstat == "M" ) {
  481. model.setValue("/root/main/masterinfo/grd_druglist["+i+"]/sel" ,"true");
  482. model.setValue("/root/main/masterinfo/grd_druglist["+i+"]/drugstat" ,"D");
  483. }else {
  484. model.setValue("/root/main/masterinfo/grd_druglist["+i+"]/sel" ,"false");
  485. }
  486. }
  487. }
  488. } else { // 이동경로
  489. for( var i=1; i< grd_druglist.rows; i++) {
  490. predrugstat = model.getValue("/root/main/masterinfo/grd_druglist["+i+"]/predrugstat" );
  491. predrugpath = model.getValue("/root/main/masterinfo/grd_druglist["+i+"]/predrugpath" );
  492. if ( model.getValue("/root/main/masterinfo/grd_druglist["+i+"]/sel") == "true") {
  493. if (predrugstat == "D" && (predrugpath == '-' || predrugpath == '')) {
  494. model.setValue("/root/main/masterinfo/grd_druglist["+i+"]/drugpath",popupParam);
  495. model.setValue("/root/main/masterinfo/grd_druglist["+i+"]/sel" ,"true");
  496. } else {
  497. model.setValue("/root/main/masterinfo/grd_druglist["+i+"]/sel" ,"false");
  498. }
  499. }
  500. }
  501. }
  502. button36.dispatch("DOMActivate"); // 20120829
  503. model.refresh();
  504. }
  505. function fgetprcpdesclist() {
  506. var rows = grd_druglist.rows;
  507. var row = grd_druglist.row;
  508. var col = grd_druglist.col;
  509. var predrugstat = "";
  510. var detdrugstat = "";
  511. // 전체선택
  512. if (row == 0 && col== 1) {
  513. for( var i=1; i< grd_druglist.rows; i++) {
  514. predrugstat = model.getValue("/root/main/masterinfo/grd_druglist["+i+"]/drugstat" );
  515. /*if (predrugstat == "ND") {
  516. model.setValue("/root/main/masterinfo/grd_druglist["+i+"]/sel" ,"false");
  517. } */
  518. }
  519. return;
  520. }
  521. // row 인덱스 처리
  522. if (row == -1) row = 1;
  523. if (rows <= 1 ) return;
  524. // 노드초기화
  525. model.removeNodeset("/root/main/detailinfo/pat_info");
  526. model.removeNodeset("/root/main/detailinfo/item");
  527. // 처방상세조회
  528. predrugstat = model.getValue("/root/main/masterinfo/grd_druglist["+row+"]/predrugstat");
  529. model.setValue("/root/send/srchdetinfo/drugdd", model.getValue("/root/main/masterinfo/grd_druglist["+row+"]/drugdd"));
  530. model.setValue("/root/send/srchdetinfo/drugno", model.getValue("/root/main/masterinfo/grd_druglist["+row+"]/drugno"));
  531. model.setValue("root/send/srchdetinfo/ioflag" , model.getValue("/root/main/masterinfo/grd_druglist["+row+"]/ioflag"));
  532. model.setValue("root/send/srchdetinfo/srchpid" , model.getValue("/root/main/masterinfo/grd_druglist["+row+"]/pid"));
  533. var success = submit("TRADT10402");
  534. // 처리결과
  535. if (success) {
  536. // 반환처방-컬러세팅
  537. // 컬러 병동처방전감사와 동일하게 처리 2008.09.11
  538. grd_detdruglist.rebuildStyle();
  539. //setRowStyle("grd_detdruglist" , "1" , "true" , "ordrtnflag", "equal" );
  540. var style = new Array("#fcd2c1" , "#ffe79d" , "#f3e1bf" , "#7BE6B7" , "#b9e5fb" , "#f7a08b" , "#fec34d" , "#dec6a4" , "#c8e67b" , "#43c8f5", "#99cf16", "#e5f3c2" );
  541. for (var i = 1; i < grd_detdruglist.rows; i ++){
  542. var sprcphistcd = model.getValue("/root/main/detailinfo/item["+i+"]/prcphistcd");
  543. grd_detdruglist.cellStyle("background-color", i, grd_detdruglist.colRef("prcpcd")) = '#ffffff';
  544. if( sprcphistcd == "C") {
  545. grd_detdruglist.cellStyle("background-color", i, grd_detdruglist.colRef("prcpcd")) = style[2];
  546. }
  547. if( sprcphistcd == "D") {
  548. grd_detdruglist.cellStyle("background-color", i, grd_detdruglist.colRef("prcpcd")) = style[6];
  549. }
  550. if( sprcphistcd == "E") {
  551. grd_detdruglist.cellStyle("background-color", i, grd_detdruglist.colRef("prcpcd")) = style[6];
  552. }
  553. if(sprcphistcd == "O" && model.getValue("/root/main/detailinfo/item["+i+"]/execprcphistcd") == "Z") { //반환후 남은 처방
  554. grd_detdruglist.cellStyle("background-color", i, grd_detdruglist.colRef("prcpcd")) = style[4];
  555. }
  556. grd_detdruglist.fixedcellischeck(0, 1) = false;
  557. grd_detdruglist.isreadonly(i,1) = false;
  558. var nodeliveyn = model.getValue("/root/main/detailinfo/item["+i+"]/nodeliveyn"); //미불출여부
  559. var rtnflag = model.getValue("/root/main/detailinfo/item["+i+"]/rtnflag"); //반환확인여부
  560. if(nodeliveyn == "true") {
  561. grd_detdruglist.cellStyle("background-color", i, grd_detdruglist.colRef("nodeliveyn")) = "#FF0000";
  562. }
  563. if(rtnflag == "true") {
  564. grd_detdruglist.cellStyle("background-color", i, grd_detdruglist.colRef("rtnflag")) = "#FF0000";
  565. }
  566. }
  567. model.refresh();
  568. // 조제보류시 내역선택 불가
  569. // 이선경 2008-08-25 주석(조제보류시에도 반환확인할 수 있음)
  570. //for (var i=1; i<=grd_detdruglist.rows; i++) {
  571. //detdrugstat = model.getValue("/root/main/detailinfo/item["+i+"]/drugstat");
  572. //if (detdrugstat == "ND") {
  573. //grd_detdruglist.isreadonly(i,1) = true;
  574. //grd_detdruglist.isreadonly(i,10) = true;
  575. //grd_detdruglist.isreadonly(i,13) = true;
  576. //} else {
  577. //grd_detdruglist.isreadonly(i,1) = false;
  578. //grd_detdruglist.isreadonly(i,10) = false;
  579. //grd_detdruglist.isreadonly(i,13) = false;
  580. //}
  581. //}
  582. }
  583. }
  584. function fSubmitDrugChk(mode,drugstat,bccode){
  585. var reteresn = "";
  586. var nodeList = null;
  587. var rCSV = null;
  588. var sel = null;
  589. var befdrugstat = null;
  590. var prcpcd = null;
  591. nodeList = instance1.selectNodes("/root/main/detailinfo/item[sel='true']");
  592. rCSV = getNodeListCSV(nodeList);
  593. if ( rCSV == null ) {
  594. messageBox("처방내역을 선택해 주십시오.","I999");
  595. return;
  596. }
  597. // 검수보류사유
  598. if (drugstat == "ND") {
  599. modal("SMADT00101",0,100,160,"SMADT00101","","");
  600. reteresn = model.getValue("/root/temp/reteresn");
  601. if (reteresn == "") {
  602. messageBox("보류사유을", "C002");
  603. return;
  604. }
  605. }
  606. // 투약/미불출은 데이터 처리불가
  607. for (var j=1; j<grd_detdruglist.rows; j++) {
  608. sel = model.getValue("/root/main/detailinfo/item["+j+"]/sel");
  609. if (sel == "true") {
  610. befdrugstat = model.getValue("/root/main/detailinfo/item["+j+"]/drugstat");
  611. prcpcd = model.getValue("/root/main/detailinfo/item["+j+"]/prcpcd");
  612. prcpkindcdnm = model.getValue("/root/main/masterinfo/grd_druglist["+ grd_druglist.row+"]/prcpkindcdnm");
  613. //alert(prcpkindcdnm );
  614. if ( prcpkindcdnm != "퇴원" && prcpkindcdnm != "외출/외박"){
  615. if (befdrugstat == "M") {
  616. messageBox("[" + prcpcd + "] 약은 투약완료되어 처리", "E001");
  617. return;
  618. } else if (befdrugstat == "X") {
  619. messageBox("[" + prcpcd + "] 약은 미불출되어 처리", "E001");
  620. return;
  621. }
  622. }
  623. }
  624. }
  625. // 검수보류사유와 검수상태셋팅
  626. for(var i=1; i<grd_detdruglist.rows; i++) {
  627. model.setValue("/root/main/detailinfo/item["+i+"]/drugstat",drugstat);
  628. model.makeNode("/root/main/detailinfo/item["+i+"]/reteresn");
  629. model.setValue("/root/main/detailinfo/item["+i+"]/reteresn",reteresn);
  630. model.makeNode("/root/main/detailinfo/item["+i+"]/userid");
  631. model.setValue("/root/main/detailinfo/item["+i+"]/userid",getUserId());
  632. // 2015년 1월27일 조제완료일자 재등록을 위한 Flag 김치국
  633. model.makeNode("/root/main/detailinfo/item["+i+"]/mchk");
  634. model.setValue("/root/main/detailinfo/item["+i+"]/mchk",model.getValue("/root/main/reokdateflag/reokdateflag2"));
  635. }
  636. nodeList = instance1.selectNodes("/root/main/detailinfo/item[sel='true']");
  637. rCSV = getNodeListCSV(nodeList);
  638. model.removeNodeset("/root/send/req/data1");
  639. model.makeNode("/root/send/req/data1");
  640. setCSVToNode("/root/send/req/data1", rCSV);
  641. // 수정
  642. var sucess = submit("TXADT10101");
  643. if (sucess) {
  644. // 환자리스트 처리결과(조제상태없이 바코드 전체조회)
  645. fgetprcpdesclist();
  646. }
  647. }
  648. function fSubmitMemo() {
  649. var varSaveMode = ""; // i-입력, m-수정(제외)
  650. var varSaveFlag = false;
  651. var varWritId = "";
  652. // 환자선택 필수
  653. if (model.getValue("/root/main/detailinfo/pat_info/pid") == "" ) {
  654. messageBox("환자를 선택하시고", "C001");
  655. return;
  656. }
  657. // 작성자
  658. varWritId = model.getValue("/root/main/detailinfo/memoinfo/writid2");
  659. if (varWritId == "" ) {
  660. messageBox("메모작성자 이름은", "I003");
  661. // setInputNodeCurText();
  662. // model.setFocus("ipt_writeid");
  663. return;
  664. }
  665. // 메모내용필수
  666. if (model.getValue("/root/main/detailinfo/memoinfo/memo") == "" ) {
  667. messageBox("메모내용은", "I003");
  668. return;
  669. }
  670. /* 본인이 작성하지 않은 메모수정불가
  671. if (model.getValue("/root/main/detailinfo/memoinfo/writid") != getUserId()) {
  672. messageBox("자료를 수정할", "E002");
  673. return;
  674. }
  675. */
  676. model.setValue("/root/main/detailinfo/memoinfo/pid" , model.getValue("/root/main/detailinfo/pat_info/pid"));
  677. model.setValue("/root/main/detailinfo/memoinfo/indd" , model.getValue("/root/main/detailinfo/pat_info/indd"));
  678. model.setValue("/root/main/detailinfo/memoinfo/useyn" , "Y");
  679. model.setValue("/root/main/detailinfo/memoinfo/seqno" , "");
  680. // model.setValue("/root/main/detailinfo/memoinfo/memo" , "");
  681. model.setValue("/root/main/detailinfo/memoinfo/orddeptcd" , model.getValue("/root/main/detailinfo/pat_info/orddeptcd"));
  682. // model.setValue("/root/main/detailinfo/memoinfo/writid" , getUserId());
  683. // model.setValue("/root/main/detailinfo/memoinfo/writid2" , "");
  684. // model.setValue("/root/main/detailinfo/memoinfo/writnm" , getUserName());
  685. if(submit("TRADT00103")) {
  686. model.setValue("/root/main/detailinfo/memoinfo/writdt" , model.getValue("/root/init/dateinfo/currentdt"));
  687. }
  688. // 입원/외래 구분 로직 필요
  689. model.setValue("/root/main/detailinfo/memoinfo/ioflag" , "I");
  690. // 자료수집
  691. model.setValue("/root/main/detailinfo/memoinfo/writid",varWritId);
  692. model.copyNode("/root/send/req/data2", "/root/main/detailinfo/memoinfo");
  693. // 저장은 무조건 추가로 처리, 수정기능은 제외
  694. varSaveMode = "i";
  695. /*
  696. if (model.getValue("/root/main/detailinfo/memoinfo/seqno") == "") {
  697. varSaveMode = "i";
  698. } else {
  699. varSaveMode = "u";
  700. }
  701. */
  702. model.setValue("/root/send/req/data2/m", varSaveMode);
  703. submit("TXADT10102");
  704. varSaveFlag = true;
  705. /* 저장여부확인
  706. if (varSaveMode == "i" && Number(model.getValue("/root/hidden/memoitem/seqno")) > 0) {
  707. varSaveFlag = true;
  708. model.setValue("/root/main/detailinfo/memoinfo/seqno", model.getValue("/root/hidden/memoitem/seqno"));
  709. }
  710. /* 저장은 무조건 추가로 처리, 수정기능은 제외
  711. if (varSaveMode == "u" && Number(model.getValue("/root/hidden/memoitem/count")) > 0) {
  712. varSaveFlag = true;
  713. }
  714. */
  715. // 화면정리 및 메세지처리
  716. if (varSaveFlag == true) {
  717. model.refresh();
  718. messageBox("메모저장이", "I002");
  719. }
  720. }
  721. function trim(data) {
  722. return data.replace(/(^\s*)|(\s*$)/g, "");
  723. }
  724. ]]>
  725. </script>
  726. <submission id="TRADB02604" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchprcpcdinfo" replace="instance" resultref="/root/hidden/drugitem"/>
  727. <submission id="TXADT10404" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/req2" replace="instance" resultref="/root/hidden"/>
  728. <submission id="TXADT10405" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/req2" replace="instance" resultref="/root/hidden"/>
  729. <submission id="TRADT10203" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/deptinfo" replace="instance" resultref="/root/init/deptlist"/>
  730. <submission id="TRADT10405" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchbcinfo" replace="instance" resultref="/root/temp2/rtnlist"/>
  731. <submission id="TRADT00704" mediatype="application/x-www-form-urlencoded" method="post" replace="instance" resultref="/root/hidden/stocdeptlist"/>
  732. </model>
  733. </xhtml:head>
  734. <xhtml:body guideline="1,1195;2,781;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  735. <script type="javascript" ev:event="onmenu">
  736. <![CDATA[
  737. var popupParam = event.description;
  738. fSetValueGrid2Cell(popupParam);
  739. ]]>
  740. </script>
  741. <group id="group3" scroll="auto" style="left:0px; top:13px; width:1195px; height:768px; ">
  742. <datagrid id="grd_detdruglist" nodeset="/root/main/detailinfo/item" caption="선택^반환^약품코드^약품명^제형구분^1일수량^횟수^일수^처방전 출력시간^미불출^미불출일시^반환확인^반환확인일시^조제상태^조제완료일시^이동경로^이동시간^적용일시^등록번호^약번호^바코드^산제여부" colsep="^" colwidth="50, 31, 91, 216, 64, 48, 37, 36, 112, 47, 110, 56, 119, 68, 118, 108, 120, 123, 74, 100, 100, 60" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:0px; top:459px; width:1194px; height:308px; ">
  743. <col ref="sel" type="checkbox"/>
  744. <col disabled="true" ref="ordrtnflag" type="checkbox" style="color:#ff0000; "/>
  745. <col ref="prcpcd"/>
  746. <col ref="drugnm"/>
  747. <col ref="drugtypenm"/>
  748. <col ref="prcpqty" style="text-align:right; "/>
  749. <col ref="prcptims" style="text-align:right; "/>
  750. <col ref="prcpdayno" style="text-align:right; "/>
  751. <col ref="prntdt" format="yyyy-mm-dd hh:mm:ss"/>
  752. <col disabled="true" ref="nodeliveyn" type="checkbox"/>
  753. <col ref="nodelivedt" format="yyyy-mm-dd hh:mm:ss"/>
  754. <col disabled="true" ref="rtnflag" type="checkbox"/>
  755. <col ref="rtndt" format="yyyy-mm-dd hh:mm:ss"/>
  756. <col ref="drugstatname"/>
  757. <col ref="prcpdt" format="yyyy-mm-dd hh:mm:ss"/>
  758. <col ref="drugpathnm"/>
  759. <col ref="drugdt" format="yyyy-mm-dd hh:ss:mm"/>
  760. <col ref="sumdt" format="yyyy-mm-dd hh:mm:ss"/>
  761. <col ref="pid"/>
  762. <col ref="drugno"/>
  763. <col ref="bcno"/>
  764. <col ref="powdflag" type="checkbox"/>
  765. <col ref="mchk" type="checkbox"/>
  766. <script type="javascript" ev:event="onclick">
  767. <![CDATA[
  768. var row = grd_detdruglist.row;
  769. var col = grd_detdruglist.col;
  770. var predrugstat = "";
  771. var ordrtnflag="";
  772. // 전체선택
  773. if (row == 0 && col== 1) {
  774. for( var i=1; i< grd_detdruglist.rows; i++) {
  775. predrugstat = model.getValue("/root/main/detailinfo/item["+i+"]/drugstat" );
  776. ordrtnflag = model.getValue("/root/main/detailinfo/item["+i+"]/ordrtnflag" );
  777. /*if (predrugstat == "ND" && ordrtnflag =="false") {
  778. model.setValue("/root/main/detailinfo/item["+i+"]/sel" ,"false");
  779. } */
  780. }
  781. return;
  782. }
  783. ]]>
  784. </script>
  785. </datagrid>
  786. <button id="button1" class="btn4_letter6" style="left:1088px; top:64px; width:104px; height:22px; ">
  787. <caption>이동경로저장</caption>
  788. <script type="javascript" ev:event="DOMActivate">
  789. <![CDATA[
  790. var node = null;
  791. var nodeList = null;
  792. var rCSV = null;
  793. var cnt = 0;
  794. var stocdeptcd = model.getValue("/root/init/stocinfo/stocdeptcd");
  795. // 조제완료만 CHECK
  796. for (var i=1; i<grd_druglist.rows; i++) {
  797. var sel = model.getValue("/root/main/masterinfo/grd_druglist["+i+"]/sel");
  798. var drugstat = model.getValue("/root/main/masterinfo/grd_druglist["+i+"]/drugstat");
  799. var drugpath = model.getValue("/root/main/masterinfo/grd_druglist["+i+"]/drugpath");
  800. var predrugpath = model.getValue("/root/main/masterinfo/grd_druglist["+i+"]/predrugpath");
  801. // 사용자 id
  802. if (sel == "true") {
  803. /*if (drugstat != "D") {
  804. messageBox("조제완료 상태만 이동경로를 저장하실수 있습니다.","I999");
  805. return;
  806. }
  807. */
  808. // 처리조건
  809. if ((predrugpath == "" || predrugpath == "-") && (drugpath == "" || drugpath == "-")) {
  810. messageBox("이동경로를 선택하십시오.","I999");
  811. return;
  812. }
  813. if ((predrugpath != "" && predrugpath != "-") && (drugpath != "" && drugpath != "-")) {
  814. messageBox("이동경로가 이미 처리되었습니다.","I999");
  815. return;
  816. }
  817. model.setValue("/root/main/masterinfo/grd_druglist["+i+"]/userid" ,getUserId());
  818. model.setValue("/root/main/masterinfo/grd_druglist["+i+"]/stocdeptcd",model.getValue("/root/init/stocinfo/stocdeptcd"));
  819. cnt++;
  820. }
  821. }
  822. // 처방내역 선택여부
  823. if ( cnt == 0 ) {
  824. messageBox("처방내역을 선택해 주십시오.","I999");
  825. return;
  826. }
  827. nodeList = instance1.selectNodes("/root/main/masterinfo/grd_druglist[sel='true']");
  828. rCSV = getNodeListCSV(nodeList);
  829. model.removeNodeset("/root/send/req2/list");
  830. setCSVToNode("/root/send/req2", rCSV);
  831. var success = submit("TXADT10401");
  832. if (success) {
  833. btn_sea.dispatch("DOMActivate");
  834. grd_druglist.fixedcellischeck(0,1) = false;
  835. varDrugTotSel = false;
  836. }
  837. ]]>
  838. </script>
  839. </button>
  840. <output id="input10" ref="/root/main/detailinfo/pat_info/pid" class="input_search" appearance="output" style="left:467px; top:371px; width:70px; height:19px; "/>
  841. <group id="group2" style="left:0px; top:2px; width:1195px; height:58px; ">
  842. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1194px; height:55px; background-color:#fffbf2; border-color:#ffd799; "/>
  843. <caption id="caption2" style="left:252px; top:9px; width:15px; height:20px; vertical-align:middle; ">~</caption>
  844. <caption id="caption3" class="search_name" style="left:20px; top:10px; width:86px; height:17px; ">적용일시</caption>
  845. <caption id="caption4" class="search_name" style="left:420px; top:10px; width:86px; height:17px; ">병 동</caption>
  846. <caption id="caption5" class="search_name" style="left:635px; top:10px; width:86px; height:17px; ">등록번호</caption>
  847. <caption id="caption6" class="search_name" style="left:20px; top:33px; width:86px; height:17px; ">약품코드</caption>
  848. <button id="btn_sea" class="btn1_letter2" style="left:1128px; top:19px; width:56px; height:22px; ">
  849. <caption>조회</caption>
  850. <script type="javascript" ev:event="DOMActivate">
  851. <![CDATA[
  852. //일시 세팅
  853. var srchsumdt1 = "";
  854. var srchsumdt2 = "";
  855. var drugstat = "";
  856. var sumfromdd = model.getValue("/root/send/srchinfo/srchsumdd1");
  857. var sumtodd = model.getValue("/root/send/srchinfo/srchsumdd2");
  858. var sumfromtm = model.getValue("/root/send/srchinfo/srchsumtm1");
  859. var sumtotm = model.getValue("/root/send/srchinfo/srchsumtm2");
  860. var predrugstat = "";
  861. if (sumfromtm == "") sumfromtm = "0000";
  862. if (sumtotm == "") sumtotm = "2359";
  863. srchsumdt1 = sumfromdd + sumfromtm;
  864. srchsumdt2 = sumtodd + sumtotm;
  865. model.setValue("/root/send/srchinfo/srchsumdt1",srchsumdt1);
  866. model.setValue("/root/send/srchinfo/srchsumdt2",srchsumdt2);
  867. // 초기화
  868. grd_druglist.rebuildStyle();
  869. model.removeNodeset("/root/main/masterinfo/grd_druglist");
  870. var success = submit("TRADT10401");
  871. if (success == false) return;
  872. if (grd_druglist.rows> 1) {
  873. grd_druglist.dispatch("ondblclick");
  874. } else {
  875. model.removeNodeset("/root/main/detailinfo/pat_info");
  876. model.removeNodeset("/root/main/detailinfo/item");
  877. model.refresh();
  878. }
  879. // 처리결과(반환처방-컬러세팅)
  880. setRowStyle("grd_druglist" , "1" , "true" , "ordrtnflag", "equal" );
  881. // 조제보류 데이터변경불가
  882. for (var i=1; i<grd_druglist.rows; i++) {
  883. predrugstat = model.getValue("/root/main/masterinfo/grd_druglist["+i+"]/predrugstat" );
  884. grd_druglist.isReadOnly(i, 1) = false;
  885. grd_druglist.isreadonly(i, 9) = false;
  886. grd_druglist.isreadonly(i, 13) = false;
  887. /*if (predrugstat == "ND") {
  888. grd_druglist.isReadOnly(i, 1) = true;
  889. grd_druglist.isreadonly(i, 9) = true;
  890. grd_druglist.isreadonly(i, 13) = true;
  891. }
  892. if (model.getValue("/root/main/masterinfo/grd_druglist["+i+"]/ordrtnflag" )=="true" ){
  893. grd_druglist.isReadOnly(i, 1) = true;
  894. } */
  895. }
  896. // 처방상세 클릭이벤트
  897. if (grd_druglist.rows> 1) {
  898. grd_druglist.row = 1;
  899. //grd_druglist.dispatch("onclick");
  900. fgetprcpdesclist();
  901. }
  902. // 이동경로
  903. varDrugPathIndex = 2;
  904. ]]>
  905. </script>
  906. </button>
  907. <input id="ipt_sumdt1" ref="/root/send/srchinfo/srchsumdd1" class="input_default" inputtype="date" style="left:110px; top:9px; width:90px; height:19px; "/>
  908. <input id="ipt_sumdt2" ref="/root/send/srchinfo/srchsumdd2" class="input_default" inputtype="date" style="left:265px; top:9px; width:90px; height:19px; "/>
  909. <select1 id="cmb_wardcd" ref="/root/send/srchinfo/srchwardcd" class="combo_search" appearance="minimal" cols="2" style="left:500px; top:9px; width:125px; height:19px; ">
  910. <choices>
  911. <itemset nodeset="/root/init/deptlist/ward">
  912. <label ref="wardnm"/>
  913. <value ref="wardcd"/>
  914. </itemset>
  915. </choices>
  916. </select1>
  917. <input id="ipt_pid" ref="/root/send/srchinfo/srchpid" class="input_search" autonext="false" maxlength="10" style="left:714px; top:9px; width:80px; height:19px; ">
  918. <script type="javascript" ev:event="onkeyup">
  919. <![CDATA[
  920. if(event.keyCode == "13") {
  921. setInputNodeCurText();
  922. btn_sea.dispatch("onclick");
  923. }
  924. ]]>
  925. </script>
  926. </input>
  927. <input id="ipt_prcpcd" ref="/root/send/srchinfo/srchprcpcd" class="input_search" autonext="false" imemode="alpha" maxlength="12" style="left:110px; top:32px; width:90px; height:19px; ">
  928. <script type="javascript" ev:event="onkeyup">
  929. <![CDATA[
  930. if(event.keyCode == "13") {
  931. setInputNodeCurText();
  932. btn_sea.dispatch("onclick");
  933. }
  934. ]]>
  935. </script>
  936. </input>
  937. <button id="button2" class="icon_search" style="left:205px; top:33px; width:16px; height:16px; ">
  938. <caption/>
  939. <script type="javascript" ev:event="DOMActivate">
  940. <![CDATA[
  941. var prcpcd = "";
  942. model.setValue("/root/temp/receivedata/receiveref", model.getValue("/root/hidden/receivedrugcd"));
  943. modal("SPADB60100",0,100,150,"SPADB60100","/root/temp/receivedata","/root/temp/receivedata");
  944. prcpcd = model.getValue("/root/send/srchinfo/srchprcpcd");
  945. if (prcpcd != "") {
  946. model.setValue("/root/send/srchprcpcdinfo/srchdrugcd",prcpcd);
  947. submit("TRADB02604");
  948. model.setValue("/root/send/srchinfo/srchprcpnm",model.getValue("/root/hidden/drugitem/drugnm"));
  949. model.refresh();
  950. }
  951. ]]>
  952. </script>
  953. </button>
  954. <input id="input1" ref="/root/send/srchinfo/srchhngnm" class="input_search" editable="false" style="left:815px; top:9px; width:80px; height:19px; "/>
  955. <button id="button3" class="icon_search" style="left:797px; top:11px; width:16px; height:16px; ">
  956. <caption/>
  957. <script type="javascript" ev:event="DOMActivate">
  958. <![CDATA[
  959. modal("SPPMC02500", "1","150", "150", "SPPMC02500", "/root/init/patinfo", "/root/send");
  960. model.setValue("/root/send/srchinfo/srchpid" ,model.getValue("/root/init/patinfo/pid"));
  961. model.setValue("/root/send/srchinfo/srchhngnm",model.getValue("/root/init/patinfo/hngnm"));
  962. ]]>
  963. </script>
  964. </button>
  965. <input id="input2" ref="/root/send/srchinfo/srchsumtm1" class="input_search" format="hh:nn" style="left:202px; top:9px; width:45px; height:19px; "/>
  966. <input id="input3" ref="/root/send/srchinfo/srchsumtm2" class="input_search" format="hh:nn" style="left:357px; top:9px; width:45px; height:19px; "/>
  967. <caption id="caption29" class="search_name" style="left:420px; top:33px; width:86px; height:17px; ">처방종류</caption>
  968. <line id="line13" class="line_4" style="x1:1105px; y1:8px; x2:1105px; y2:50px; border-color:#ffe4bb; border-left-style:solid; "/>
  969. <input id="input4" ref="/root/send/srchinfo/srchprcpnm" class="input_search" style="left:225px; top:32px; width:177px; height:19px; "/>
  970. <input id="input5" ref="/root/send/srchinfo/srchdrugno" class="input_search" autonext="false" maxlength="5" format="99999" style="left:984px; top:9px; width:80px; height:19px; ">
  971. <script type="javascript" ev:event="onkeyup">
  972. <![CDATA[
  973. if(event.keyCode == "13") {
  974. setInputNodeCurText();
  975. btn_sea.dispatch("onclick");
  976. }
  977. ]]>
  978. </script>
  979. </input>
  980. <caption id="caption17" class="search_name" style="left:905px; top:10px; width:86px; height:17px; ">투약번호</caption>
  981. <select id="chk_prcpkind" ref="/root/send/srchinfo/srchprcpkindcd" class="checkbox_search" overflow="visible" appearance="full" cols="5" rows="1" style="left:542px; top:33px; width:285px; height:15px; border-style:none; ">
  982. <choices>
  983. <item>
  984. <label>정규</label>
  985. <value>R</value>
  986. </item>
  987. <item>
  988. <label>추가</label>
  989. <value>A</value>
  990. </item>
  991. <item>
  992. <label>퇴원</label>
  993. <value>D</value>
  994. </item>
  995. <item>
  996. <label>외출/외박</label>
  997. <value>S</value>
  998. </item>
  999. <item>
  1000. <label>Admission</label>
  1001. <value>M</value>
  1002. </item>
  1003. </choices>
  1004. </select>
  1005. <select id="chk_prcpkindall" ref="/root/send/srchinfo/srchprcpkindall" overflow="visible" appearance="full" style="left:498px; top:33px; width:45px; height:21px; border-style:none; ">
  1006. <choices>
  1007. <item>
  1008. <label>전체</label>
  1009. <value>Y</value>
  1010. </item>
  1011. </choices>
  1012. <script type="javascript" ev:event="onclick">
  1013. <![CDATA[
  1014. var allflag = model.getValue("/root/send/srchinfo/srchprcpkindall");
  1015. var nodeList = instance1.selectNodes("/root/init/prcpkindinfo/M0003/cdid");
  1016. var prcpkind = "";
  1017. // 전체선택
  1018. if (allflag == "Y") {
  1019. model.setValue("/root/send/srchinfo/srchprcpkindcd","R A D S M");
  1020. } else {
  1021. model.setValue("/root/send/srchinfo/srchprcpkindcd","");
  1022. }
  1023. model.refresh();
  1024. ]]>
  1025. </script>
  1026. </select>
  1027. <select id="checkbox1" ref="/root/send/srchinfo/srchprcpkindcd" overflow="visible" appearance="full" style="left:840px; top:33px; width:65px; height:21px; border-style:none; ">
  1028. <choices>
  1029. <item>
  1030. <label>응급만</label>
  1031. <value>E</value>
  1032. </item>
  1033. </choices>
  1034. <script type="javascript" ev:event="onclick">
  1035. <![CDATA[
  1036. model.setValue("/root/send/srchinfo/srchprcpkindall", "");
  1037. if(model.getValue("/root/send/srchinfo/srchprcpkindcd") == "E") {
  1038. chk_prcpkindall.disabled = true;
  1039. chk_prcpkind.disabled = true;
  1040. } else {
  1041. chk_prcpkindall.disabled = false;
  1042. chk_prcpkind.disabled = false;
  1043. }
  1044. model.refresh();
  1045. ]]>
  1046. </script>
  1047. </select>
  1048. </group>
  1049. <output id="input11" ref="/root/main/detailinfo/pat_info/orddeptnm" class="input_search" appearance="output" style="left:743px; top:371px; width:110px; height:19px; "/>
  1050. <caption id="caption10" class="cell_1" style="left:404px; top:370px; width:60px; height:23px; vertical-align:middle; ">등록번호</caption>
  1051. <caption id="caption1" class="cell_1" style="left:340px; top:63px; width:60px; height:23px; vertical-align:middle; ">반환확인</caption>
  1052. <output id="input12" ref="/root/main/detailinfo/pat_info/atdocnm" class="input_search" appearance="output" style="left:904px; top:371px; width:90px; height:19px; "/>
  1053. <caption id="caption11" class="cell_1" style="left:694px; top:370px; width:46px; height:23px; vertical-align:middle; ">진료과</caption>
  1054. <caption id="caption22" class="tit_2" style="left:5px; top:73px; width:216px; height:13px; ">처방목록</caption>
  1055. <output id="input13" ref="/root/main/detailinfo/pat_info/medispclnm" class="input_search" appearance="output" style="left:1048px; top:371px; width:90px; height:19px; "/>
  1056. <caption id="caption12" class="cell_1" style="left:86px; top:63px; width:60px; height:23px; vertical-align:middle; ">조제완료</caption>
  1057. <caption id="caption13" class="cell_1" style="left:857px; top:370px; width:45px; height:23px; vertical-align:middle; ">주치의</caption>
  1058. <caption id="caption14" class="cell_1" style="left:1000px; top:370px; width:45px; height:23px; vertical-align:middle; ">전문의</caption>
  1059. <line id="line1" class="line_1" style="x1:0px; y1:88px; x2:1194px; y2:88px; "/>
  1060. <line id="line2" class="line_1" style="x1:1px; y1:365px; x2:1194px; y2:365px; "/>
  1061. <caption id="caption7" class="cell_1" style="left:1px; top:370px; width:59px; height:23px; vertical-align:middle; ">투약번호</caption>
  1062. <caption id="caption8" class="cell_1" style="left:140px; top:370px; width:35px; height:23px; vertical-align:middle; ">병실</caption>
  1063. <caption id="caption9" class="cell_1" style="left:272px; top:370px; width:35px; height:23px; vertical-align:middle; ">성명</caption>
  1064. <button id="button36" class="btn4_letter6" style="left:979px; top:64px; width:104px; height:22px; ">
  1065. <caption>조제상태저장</caption>
  1066. <script type="javascript" ev:event="DOMActivate">
  1067. <![CDATA[
  1068. var nodeList = null;
  1069. var rCSV = null;
  1070. var cnt = 0;
  1071. // 조제완료만 CHECK
  1072. for (var i=1; i<grd_druglist.rows; i++) {
  1073. var sel = model.getValue("/root/main/masterinfo/grd_druglist["+i+"]/sel");
  1074. var drugstat = model.getValue("/root/main/masterinfo/grd_druglist["+i+"]/drugstat");
  1075. var drugdd = model.getValue("/root/main/masterinfo/grd_druglist["+i+"]/drugdd");
  1076. var drugno = model.getValue("/root/main/masterinfo/grd_druglist["+i+"]/drugno");
  1077. model.setValue("/root/send/srchbcinfo/srchdrugdd" ,drugdd);
  1078. model.setValue("/root/send/srchbcinfo/srchdrugno" ,drugno);
  1079. if(sel == "true") {
  1080. if ( drugstat =="P"){
  1081. messageBox("조제상태를 ","C002");
  1082. return;
  1083. }
  1084. if ( drugstat == "D") {
  1085. model.removeNodeset("/root/temp2/rtnlist/grd_exelist");
  1086. model.removeNodeset("/root/temp2/rtnlist/grd_histlist");
  1087. var success1 = submit("TRADT10405");
  1088. // 처방변경이력
  1089. var count1 = 0;
  1090. var count2 = 0;
  1091. var datacount = 0;
  1092. //var nodeList = instance1.selectNodes("/root/main/masterinfo/grd_druglist");
  1093. var ordNodeList = instance1.selectNodes("/root/temp2/rtnlist/grd_exelist");
  1094. var ordHistNodeList = instance1.selectNodes("/root/temp2/rtnlist/grd_histlist");
  1095. count1 = ordNodeList.length;
  1096. count2 = ordHistNodeList.length;
  1097. datacount = count1 + count2;
  1098. //if (datacount > 0) {
  1099. if (count2 > 0) {
  1100. modal("SMADT11100",0,100,150,"SMADT11100","/root/temp2/rtnlist","/root/temp2/rtnlist");
  1101. }
  1102. }
  1103. model.setValue("/root/main/masterinfo/grd_druglist["+i+"]/drugstat",drugstat);
  1104. model.setValue("/root/main/masterinfo/grd_druglist["+i+"]/userid",getUserId());
  1105. cnt++;
  1106. }
  1107. }
  1108. // 처방내역 선택체크
  1109. if ( cnt == 0 ) {
  1110. messageBox("처방내역을 선택해 주십시오.","I999");
  1111. return;
  1112. }
  1113. nodeList = instance1.selectNodes("/root/main/masterinfo/grd_druglist[sel='true']");
  1114. rCSV = getNodeListCSV(nodeList);
  1115. model.removeNodeset("/root/send/req2/list");
  1116. setCSVToNode("/root/send/req2", rCSV);
  1117. var success = submit("TXADT10405");
  1118. if (success) {
  1119. btn_sea.dispatch("DOMActivate");
  1120. grd_druglist.fixedcellischeck(0,1) = false;
  1121. varDrugTotSel = false;
  1122. }
  1123. ]]>
  1124. </script>
  1125. </button>
  1126. <output id="input14" ref="/root/main/detailinfo/pat_info/indd" class="input_search" format="yyyy-mm-dd" appearance="output" style="left:604px; top:371px; width:85px; height:19px; "/>
  1127. <caption id="caption16" class="cell_1" style="left:542px; top:370px; width:60px; height:23px; vertical-align:middle; ">입원일자</caption>
  1128. <input id="ipt_bcno1" ref="/root/send/srchbcinfo/srchbcno1" class="input_search" imemode="alpha" style="left:147px; top:65px; width:110px; height:19px; ">
  1129. <script type="javascript" ev:event="onkeyup">
  1130. <![CDATA[
  1131. var barcode = "";
  1132. var drugdd = "";
  1133. var drugno = "";
  1134. var ioflag = "";
  1135. if(event.keyCode == "13") {
  1136. // 바코드
  1137. setInputNodeCurText();
  1138. barcode = model.getValue("/root/send/srchbcinfo/srchbcno1");
  1139. if (barcode.length > 9) {
  1140. ioflag = barcode.substr(0,1);
  1141. drugdd = barcode.substr(1,8);
  1142. drugno = barcode.substr(9,barcode.length-9);
  1143. model.setValue("/root/send/srchbcinfo/srchbcno1","");
  1144. if (ioflag.toUpperCase() != "I") {
  1145. messageBox("입원처방이 아니므로 처리","E001");
  1146. model.refresh();
  1147. return;
  1148. }
  1149. } else {
  1150. return;
  1151. }
  1152. // 조회
  1153. model.setValue("/root/send/srchbcinfo/srchdrugdd" ,drugdd);
  1154. model.setValue("/root/send/srchbcinfo/srchdrugno" ,drugno);
  1155. model.setValue("/root/send/srchbcinfo/srchioflag" ,"I");
  1156. // 초기화
  1157. model.removeNodeset("/root/main/masterinfo/grd_exelist");
  1158. model.removeNodeset("/root/main/masterinfo/grd_histlist");
  1159. var success1 = submit("TRADT10403");
  1160. // 처방변경이력
  1161. var count1 = 0;
  1162. var count2 = 0;
  1163. var datacount = 0;
  1164. var nodeList = instance1.selectNodes("/root/main/masterinfo/grd_druglist");
  1165. var ordNodeList = instance1.selectNodes("/root/main/masterinfo/grd_exelist");
  1166. var ordHistNodeList = instance1.selectNodes("/root/main/masterinfo/grd_histlist");
  1167. count1 = ordNodeList.length;
  1168. count2 = ordHistNodeList.length;
  1169. datacount = count1 + count2;
  1170. //if (datacount > 0) {
  1171. if (count2 > 0) {
  1172. //grp_ordhist.visible = true;
  1173. modal("SMADT11100",0,100,150,"SMADT11100","/root/main/masterinfo","/root/temp2/rtnlist");
  1174. }
  1175. // 데이터 처리건수
  1176. var rCSV = getNodeListCSV(nodeList);
  1177. if ( rCSV == null ) {
  1178. messageBox("처리할 데이터가 없습니다.","I999");
  1179. return;
  1180. }
  1181. // 투약상태 세팅
  1182. model.removeNodeset("/root/send/req2/list");
  1183. setCSVToNode("/root/send/req2", rCSV);
  1184. for( var i=1; i< grd_druglist.rows; i++) {
  1185. model.setValue("/root/send/req2/list["+i+"]/drugstat","D");
  1186. model.setValue("/root/send/req2/list["+i+"]/userid",getUserId());
  1187. // 2015년 1월27일 조제완료일자 재등록을 위한 Flag 김치국
  1188. model.makeNode("/root/send/req2/list/mchk");
  1189. model.setValue("/root/send/req2/list/mchk",model.getValue("/root/main/reokdateflag/reokdateflag1"));
  1190. }
  1191. // 처리
  1192. var success2 = submit("TXADT10405");
  1193. var success3 = submit("TRADT10403");
  1194. // 처리결과(반환처방-컬러세팅)
  1195. setRowStyle("grd_druglist" , "1" , "true" , "ordrtnflag", "equal" );
  1196. // 상세클릭
  1197. if (grd_druglist.rows> 1) {
  1198. grd_druglist.dispatch("onclick");
  1199. } else {
  1200. model.removeNodeset("/root/main/detailinfo/pat_info");
  1201. model.removeNodeset("/root/main/detailinfo/item");
  1202. model.refresh();
  1203. }
  1204. }
  1205. ]]>
  1206. </script>
  1207. </input>
  1208. <input id="ipt_bcno2" ref="/root/send/srchbcinfo/srchbcno2" class="input_search" imemode="alpha" style="left:401px; top:65px; width:110px; height:19px; ">
  1209. <script type="javascript" ev:event="onkeyup">
  1210. <![CDATA[
  1211. var barcode = "";
  1212. var drugdd = "";
  1213. var drugno = "";
  1214. var ioflag = "";
  1215. if(event.keyCode == "13") {
  1216. // 바코드
  1217. setInputNodeCurText();
  1218. barcode = model.getValue("/root/send/srchbcinfo/srchbcno2");
  1219. if (barcode.length > 9) {
  1220. ioflag = barcode.substr(0,1);
  1221. drugdd = barcode.substr(1,8);
  1222. drugno = barcode.substr(9,barcode.length-9);
  1223. model.setValue("/root/send/srchbcinfo/srchbcno2","");
  1224. if (ioflag.toUpperCase() != "I") {
  1225. messageBox("입원처방이 아니므로 처리","E001");
  1226. model.refresh();
  1227. return;
  1228. }
  1229. } else {
  1230. return;
  1231. }
  1232. // 조회
  1233. model.setValue("/root/send/srchbcinfo/srchdrugdd" ,drugdd);
  1234. model.setValue("/root/send/srchbcinfo/srchdrugno" ,drugno);
  1235. model.setValue("/root/send/srchbcinfo/srchioflag" ,"I");
  1236. submit("TRADT10403");
  1237. // 데이터 확인
  1238. var nodeList = instance1.selectNodes("/root/main/masterinfo/grd_druglist[sel='']");
  1239. var rCSV = getNodeListCSV(nodeList);
  1240. if ( rCSV == null ) {
  1241. messageBox("처리할 데이터가 없습니다.","I999");
  1242. return;
  1243. }
  1244. // 반환처리
  1245. model.removeNodeset("/root/send/req2/list");
  1246. setCSVToNode("/root/send/req2", rCSV);
  1247. for( var i=1; i< grd_druglist.rows; i++) {
  1248. model.setValue("/root/send/req2/list["+i+"]/rtnflag","R");
  1249. model.setValue("/root/send/req2/list["+i+"]/userid",getUserId());
  1250. model.setValue("/root/send/req2/list["+i+"]/userdeptcd",getUserInfo("dutplcecd"));
  1251. }
  1252. submit("TXADT10402");
  1253. submit("TRADT10403");
  1254. }
  1255. ]]>
  1256. </script>
  1257. </input>
  1258. <output id="ipt_drugno" ref="/root/main/detailinfo/pat_info/drugno" class="input_search" appearance="output" style="left:63px; top:371px; width:73px; height:19px; "/>
  1259. <output id="ipt_roomcd" ref="/root/main/detailinfo/pat_info/roomcd" class="input_search" appearance="output" style="left:177px; top:371px; width:90px; height:19px; "/>
  1260. <output id="ipt_hngnm" ref="/root/main/detailinfo/pat_info/hngnm" class="input_search" appearance="output" style="left:310px; top:371px; width:90px; height:19px; "/>
  1261. <script type="javascript" ev:event="onkeyup">
  1262. <![CDATA[
  1263. // ESC키를 누르면 조제 바코드에 focus
  1264. if(event.keyCode == "27") {
  1265. model.setFocus("ipt_bcno1");
  1266. }
  1267. ]]>
  1268. </script>
  1269. <group id="group4" scroll="auto" style="left:0px; top:338px; width:1195px; height:27px; ">
  1270. <button id="btn_save" class="btn4_letter4" visibility="hidden" style="left:1111px; top:3px; width:80px; height:22px; ">
  1271. <caption>반환취소</caption>
  1272. <script type="javascript" ev:event="DOMActivate">
  1273. <![CDATA[
  1274. var nodeList = null;
  1275. var rCSV = null;
  1276. nodeList = instance1.selectNodes("/root/main/detailinfo/item[sel='true']");
  1277. rCSV = getNodeListCSV(nodeList);
  1278. if ( rCSV == null ) {
  1279. messageBox("처방내역을 선택해 주십시오.","I999");
  1280. return;
  1281. }
  1282. // 퇴원약과 반환여부
  1283. for (var i=1; i<grd_detdruglist.rows; i++) {
  1284. var sel = model.getValue("/root/main/detailinfo/item["+i+"]/sel");
  1285. var prcpkindcd = model.getValue("/root/main/detailinfo/item["+i+"]/prcpkindcd");
  1286. var prcphistcd = model.getValue("/root/main/detailinfo/item["+i+"]/prcphistcd");
  1287. if (sel == "true") {
  1288. // 처방종류가 퇴원이면서 반납의뢰일경우만 처리
  1289. if (prcpkindcd == "60" && (prcphistcd =="C" || prcphistcd =="D" )) {
  1290. } else {
  1291. messageBox("퇴원반환약일 경우만 반환취소 하실 수 있습니다.","I999");
  1292. return;
  1293. }
  1294. //cnt++;
  1295. }
  1296. }
  1297. model.removeNodeset("/root/send/req2/list");
  1298. setCSVToNode("/root/send/req2", rCSV);
  1299. for (var i=1; i<=nodeList.length; i++) {
  1300. model.setValue("/root/send/req2/list["+i+"]/userid",getUserId());
  1301. model.setValue("/root/send/req2/list["+i+"]/userdeptcd",getUserInfo("dutplcecd"));
  1302. }
  1303. var success = submit("TXADT10402");
  1304. if (success) {
  1305. //grd_druglist.dispatch("onclick");
  1306. fgetprcpdesclist();
  1307. grd_detdruglist.fixedcellischeck(0,1) = false;
  1308. varDrugTotSel = false;
  1309. }
  1310. ]]>
  1311. </script>
  1312. </button>
  1313. <caption id="caption15" class="tit_2" style="left:0px; top:11px; width:216px; height:13px; ">처방상세</caption>
  1314. <button id="button4" class="btn4_letter5" style="left:839px; top:3px; width:92px; height:22px; ">
  1315. <caption>미불출 확인</caption>
  1316. <script type="javascript" ev:event="DOMActivate">
  1317. <![CDATA[
  1318. var nodeList = null;
  1319. var rCSV = null;
  1320. var cnt = 0;
  1321. // 퇴원약과 반환여부
  1322. for (var i=1; i<grd_detdruglist.rows; i++) {
  1323. var sel = model.getValue("/root/main/detailinfo/item["+i+"]/sel");
  1324. var drugstat = model.getValue("/root/main/detailinfo/item["+i+"]/drugstat");
  1325. if (sel == "true") {
  1326. // 투약처리된 약은 미불출 처리할수 없음
  1327. /*if (drugstat =="ND") {
  1328. messageBox("조제보류 처방은 미불출 처리하실 수 없습니다.","I999");
  1329. return;
  1330. } */
  1331. if (drugstat == "M") {
  1332. messageBox("이동경로가 지정되어 미불출 처리하실 수 없습니다.","I999");
  1333. return;
  1334. }
  1335. model.setValue("/root/main/detailinfo/item["+i+"]/nodeliveyn","Y");
  1336. model.setValue("/root/main/detailinfo/item["+i+"]/userid",getUserId());
  1337. cnt++;
  1338. }
  1339. }
  1340. // 처방선택여부
  1341. if ( cnt == 0 ) {
  1342. messageBox("처방내역을 선택해 주십시오.","I999");
  1343. return;
  1344. }
  1345. nodeList = instance1.selectNodes("/root/main/detailinfo/item[sel='true']");
  1346. rCSV = getNodeListCSV(nodeList);
  1347. model.removeNodeset("/root/send/req2/list");
  1348. setCSVToNode("/root/send/req2", rCSV);
  1349. var success = submit("TXADT10403");
  1350. if (success) {
  1351. //grd_druglist.dispatch("onclick");
  1352. fgetprcpdesclist();
  1353. grd_detdruglist.fixedcellischeck(0,1) = false;
  1354. varDrugTotSel = false;
  1355. }
  1356. ]]>
  1357. </script>
  1358. </button>
  1359. <button id="button5" class="btn4_letter5" style="left:934px; top:3px; width:92px; height:22px; ">
  1360. <caption>미불출 취소</caption>
  1361. <script type="javascript" ev:event="DOMActivate">
  1362. <![CDATA[
  1363. var nodeList = null;
  1364. var rCSV = null;
  1365. var cnt = 0;
  1366. // 퇴원약과 반환여부
  1367. for (var i=1; i<grd_detdruglist.rows; i++) {
  1368. var sel = model.getValue("/root/main/detailinfo/item["+i+"]/sel");
  1369. var nodeliveyn = model.getValue("/root/main/detailinfo/item["+i+"]/nodeliveyn");
  1370. if (sel == "true") {
  1371. // 투약처리된 약은 미불출 처리할수 없음
  1372. if (nodeliveyn =="false") {
  1373. messageBox("미불출 되지않은 약이 선택되었습니다.","I999");
  1374. return;
  1375. }
  1376. model.setValue("/root/main/detailinfo/item["+i+"]/nodeliveyn","N");
  1377. model.setValue("/root/main/detailinfo/item["+i+"]/userid",getUserId());
  1378. cnt++;
  1379. }
  1380. }
  1381. // 처방선택여부
  1382. if ( cnt == 0 ) {
  1383. messageBox("처방내역을 선택해 주십시오.","I999");
  1384. return;
  1385. }
  1386. nodeList = instance1.selectNodes("/root/main/detailinfo/item[sel='true']");
  1387. rCSV = getNodeListCSV(nodeList);
  1388. model.removeNodeset("/root/send/req2/list");
  1389. setCSVToNode("/root/send/req2", rCSV);
  1390. var success = submit("TXADT10403");
  1391. if (success) {
  1392. //grd_druglist.dispatch("onclick");
  1393. fgetprcpdesclist();
  1394. grd_detdruglist.fixedcellischeck(0,1) = false;
  1395. varDrugTotSel = false;
  1396. }
  1397. ]]>
  1398. </script>
  1399. </button>
  1400. <button id="button6" class="btn4_letter4" style="left:1029px; top:3px; width:80px; height:22px; ">
  1401. <caption>반환확인</caption>
  1402. <script type="javascript" ev:event="DOMActivate">
  1403. <![CDATA[
  1404. var nodeList = null;
  1405. var rCSV = null;
  1406. var cnt = 0;
  1407. // 퇴원약과 반환여부
  1408. for (var i=1; i<grd_detdruglist.rows; i++) {
  1409. var sel = model.getValue("/root/main/detailinfo/item["+i+"]/sel");
  1410. var prcpkindcd = model.getValue("/root/main/detailinfo/item["+i+"]/prcpkindcd");
  1411. var prcphistcd = model.getValue("/root/main/detailinfo/item["+i+"]/prcphistcd");
  1412. if (sel == "true") {
  1413. // 처방종류가 퇴원이면서 반납의뢰일경우만 처리
  1414. if ((prcpkindcd == "60" || prcpkindcd == "50") && (prcphistcd =="E" || prcphistcd =="C")) {
  1415. model.setValue("/root/main/detailinfo/item["+i+"]/rtnflag","R");
  1416. model.setValue("/root/main/detailinfo/item["+i+"]/userid",getUserId());
  1417. model.setValue("/root/main/detailinfo/item["+i+"]/userdeptcd",model.getValue("/root/init/stocinfo/stocdeptcd"));
  1418. model.setValue("/root/main/detailinfo/item["+i+"]/rtnstocdeptcd",model.getValue("/root/send/srchinfo/rtnstocdeptcd")); //2009.11.17 pymi
  1419. } else {
  1420. messageBox("퇴원 또는 외출(외박) 반환약 일 경우만 반환확인하실 수 있습니다.","I999");
  1421. return;
  1422. }
  1423. cnt++;
  1424. }
  1425. }
  1426. // 처방선택여부
  1427. if ( cnt == 0 ) {
  1428. messageBox("처방내역을 선택해 주십시오.","I999");
  1429. return;
  1430. }
  1431. nodeList = instance1.selectNodes("/root/main/detailinfo/item[sel='true']");
  1432. rCSV = getNodeListCSV(nodeList);
  1433. model.removeNodeset("/root/send/req2/list");
  1434. setCSVToNode("/root/send/req2", rCSV);
  1435. var success = submit("TXADT10404");
  1436. if (success) {
  1437. //grd_druglist.dispatch("onclick");
  1438. fgetprcpdesclist();
  1439. grd_detdruglist.fixedcellischeck(0,1) = false;
  1440. varDrugTotSel = false;
  1441. }
  1442. ]]>
  1443. </script>
  1444. </button>
  1445. <caption id="caption24" style="left:630px; top:5px; width:74px; height:20px; font-weight:bold; color:#ff0000; ">실출고부서</caption>
  1446. <select1 id="combo1" ref="/root/send/srchinfo/rtnstocdeptcd" appearance="minimal" style="left:705px; top:5px; width:120px; height:19px; ">
  1447. <choices>
  1448. <itemset nodeset="/root/init/misdeptlist/deptlist">
  1449. <label ref="deptnm"/>
  1450. <value ref="deptcd"/>
  1451. </itemset>
  1452. </choices>
  1453. </select1>
  1454. </group>
  1455. <datagrid id="grd_druglist" nodeset="/root/main/masterinfo/grd_druglist" caption="^반환^적용일자^투약번호^처방종류^병실^환자명^등록번호^조제상태^조제완료일시^바코드^이동경로^투약(이동)시간^미불출^미불출일시^반환확인^반환확인일시^caption1^caption2^caption3^caption4^caption5^caption6^caption7^caption8^caption9^caption10^전문의^주치의^처방전 출력시간" colsep="^" colwidth="29, 31, 71, 56, 74, 72, 84, 74, 73, 123, 94, 101, 122, 52, 116, 56, 125, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 60, 60, 122" explorerbar="sort" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:0px; top:93px; width:1194px; height:242px; ">
  1456. <col ref="sel" type="checkbox"/>
  1457. <col disabled="true" ref="ordrtnflag" type="checkbox" style="color:#ff0000; "/>
  1458. <col ref="prcpdd" format="yyyy-mm-dd"/>
  1459. <col ref="drugno"/>
  1460. <col ref="prcpkindcdnm"/>
  1461. <col ref="roomcd"/>
  1462. <col ref="hngnm"/>
  1463. <col ref="pid"/>
  1464. <col ref="drugstat" type="combo">
  1465. <choices>
  1466. <itemset nodeset="/root/init/drugstatinfo/A0004">
  1467. <label ref="cdnm"/>
  1468. <value ref="cdid"/>
  1469. </itemset>
  1470. </choices>
  1471. </col>
  1472. <col ref="prcpdt" format="yyyy-mm-dd hh:mm:ss"/>
  1473. <col ref="bcno" style="text-align:center; "/>
  1474. <col ref="drugpath" type="combo">
  1475. <choices>
  1476. <itemset nodeset="/root/init/drugpathinfo/A0149">
  1477. <label ref="cdnm"/>
  1478. <value ref="cdid"/>
  1479. </itemset>
  1480. </choices>
  1481. </col>
  1482. <col ref="drugdt" format="yyyy-mm-dd hh:mm:ss"/>
  1483. <col disabled="true" ref="nodeliveyn" type="checkbox"/>
  1484. <col ref="nodelivedt" format="yyyy-mm-dd hh:mm:ss"/>
  1485. <col ref="rtnflag" type="checkbox"/>
  1486. <col ref="rtndt" format="yyyy-mm-dd hh:mm:ss"/>
  1487. <col ref="nodeliveyn" visibility="hidden"/>
  1488. <col ref="drugdd" visibility="hidden"/>
  1489. <col ref="ioflag" visibility="hidden"/>
  1490. <col ref="instcd" visibility="hidden"/>
  1491. <col ref="predrugstat" visibility="hidden"/>
  1492. <col ref="predrugpath" visibility="hidden"/>
  1493. <col ref="userid" visibility="hidden"/>
  1494. <col ref="stocdeptcd" visibility="hidden"/>
  1495. <col ref="stocdeptnm" visibility="hidden"/>
  1496. <col ref="stocdt" visibility="hidden"/>
  1497. <col ref="medispclnm"/>
  1498. <col ref="atdocnm"/>
  1499. <col ref="prntdt" format="yyyy-mm-dd hh:nn:ss"/>
  1500. <script type="javascript" ev:event="onclick">
  1501. <![CDATA[
  1502. if(isDataCell()) {
  1503. fgetprcpdesclist();
  1504. }
  1505. ]]>
  1506. </script>
  1507. <script type="javascript" ev:event="xforms-value-changed">
  1508. <![CDATA[
  1509. var row = grd_druglist.row;
  1510. var col = grd_druglist.col;
  1511. // 조제상태나 이동경로가 바뀌면 체크
  1512. if (col == 9 || col == 12) {
  1513. model.setValue("/root/main/masterinfo/grd_druglist["+row+"]/sel" ,"true");
  1514. }
  1515. ]]>
  1516. </script>
  1517. <script type="javascript" ev:event="onmousedown">
  1518. <![CDATA[
  1519. setPopupMenu("grd_druglist", true, "/root/temp/popup/drugstat/mouserght", "label", "value");
  1520. ]]>
  1521. </script>
  1522. <script type="javascript" ev:event="DOMFocusOut">
  1523. <![CDATA[
  1524. initPopupMenu();
  1525. ]]>
  1526. </script>
  1527. <script type="javascript" ev:event="onmouseup">
  1528. <![CDATA[
  1529. if ( grd_druglist.iscell(event.target) && grd_druglist.row >0){
  1530. if(grd_druglist.col != grd_druglist.colRef("sel")){
  1531. for ( var i =1 ; i< grd_druglist.rows ;i++){
  1532. model.setValue("/root/main/masterinfo/grd_druglist[" + i + "]/sel", "false");
  1533. }
  1534. for ( var i =0 ; i< grd_druglist.selectedRows;i++){
  1535. if ( grd_druglist.isReadOnly(grd_druglist.selectedRow(i) , 1) == false ){
  1536. model.setValue("/root/main/masterinfo/grd_druglist[" + grd_druglist.selectedRow(i) + "]/sel", "true");
  1537. } else {
  1538. model.setValue("/root/main/masterinfo/grd_druglist[" + grd_druglist.selectedRow(i) + "]/sel", "false");
  1539. }
  1540. }
  1541. }
  1542. model.refresh();
  1543. }
  1544. ]]>
  1545. </script>
  1546. <script type="javascript" ev:event="onaftersort">
  1547. <![CDATA[
  1548. grd_druglist.gridToInstance();
  1549. ]]>
  1550. </script>
  1551. </datagrid>
  1552. <select1 id="cmb_stocdeptcd" ref="/root/init/stocinfo/stocdeptcd" class="combo_search" visibility="hidden" appearance="minimal" style="left:621px; top:65px; width:115px; height:19px; ">
  1553. <choices>
  1554. <item>
  1555. <label>외래약국Unit</label>
  1556. <value>3242106000</value>
  1557. </item>
  1558. <item>
  1559. <label>병동약국Unit</label>
  1560. <value>3242107000</value>
  1561. </item>
  1562. <item>
  1563. <label>특수조제Unit</label>
  1564. <value>3242104000</value>
  1565. </item>
  1566. </choices>
  1567. </select1>
  1568. <caption id="caption21" class="cell_1" visibility="hidden" style="left:560px; top:63px; width:60px; height:23px; vertical-align:middle; ">불출부서</caption>
  1569. <caption id="caption40" class="color_2" style="left:1010px; top:437px; width:15px; height:15px; "/>
  1570. <caption id="caption30" class="color_5" style="left:1077px; top:437px; width:15px; height:15px; "/>
  1571. <caption id="caption31" style="left:1095px; top:439px; width:94px; height:14px; vertical-align:middle; ">반환후 남은 처방</caption>
  1572. <caption id="caption36" style="left:940px; top:438px; width:50px; height:14px; vertical-align:middle; ">반환의뢰</caption>
  1573. <caption id="caption37" style="left:1028px; top:439px; width:35px; height:14px; vertical-align:middle; ">반환</caption>
  1574. <caption id="caption38" class="color_7" style="left:922px; top:437px; width:15px; height:15px; "/>
  1575. <caption id="caption39" class="cell_2" style="left:844px; top:435px; width:55px; height:20px; ">범 례</caption>
  1576. <button id="button51" class="btn2_letter4" style="left:909px; top:67px; width:64px; height:19px; ">
  1577. <caption>엑셀저장</caption>
  1578. <script type="javascript" ev:event="DOMActivate">
  1579. <![CDATA[
  1580. var file = window.fileDialog("save","","false","","xls","Excel Files(*.xls)|*.xls");
  1581. grd_druglist.saveExcel(file);
  1582. ]]>
  1583. </script>
  1584. </button>
  1585. <button id="btn_widesea" class="btn2_letter4" style="left:841px; top:67px; width:64px; height:19px; ">
  1586. <caption>확대보기</caption>
  1587. <script type="javascript" ev:event="DOMActivate">
  1588. <![CDATA[
  1589. var grdwideyn = model.getValue("/root/init/grdwideyn");
  1590. if (grdwideyn == "y") {
  1591. btn_widesea.attribute("text") = "축소보기";
  1592. grd_druglist.attribute ("height") = 673;
  1593. model.setValue("/root/init/grdwideyn","n");
  1594. } else {
  1595. btn_widesea.attribute("text") = "확대보기";
  1596. grd_druglist.attribute ( "height" ) = 265;
  1597. model.setValue("/root/init/grdwideyn","y");
  1598. }
  1599. ]]>
  1600. </script>
  1601. </button>
  1602. <button id="button7" class="btn5_letter4" style="left:995px; top:411px; width:64px; height:19px; ">
  1603. <caption>조제보류</caption>
  1604. <script type="javascript" ev:event="DOMActivate">
  1605. <![CDATA[
  1606. fSubmitDrugChk("Btn","ND","");
  1607. ]]>
  1608. </script>
  1609. </button>
  1610. <button id="button9" class="btn5_letter4" style="left:1062px; top:411px; width:64px; height:19px; ">
  1611. <caption>조제완료</caption>
  1612. <script type="javascript" ev:event="DOMActivate">
  1613. <![CDATA[
  1614. fSubmitDrugChk("Btn","D","");
  1615. ]]>
  1616. </script>
  1617. </button>
  1618. <shape id="roundrect2" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:835px; top:431px; width:358px; height:27px; background-color:transparent; border-color:#7cbbdd; border-style:solid; "/>
  1619. <button id="btn_hist" class="btn2_letter2" style="left:82px; top:399px; width:42px; height:19px; ">
  1620. <caption>이력</caption>
  1621. <script type="javascript" ev:event="DOMActivate">
  1622. <![CDATA[
  1623. if (model.getValue("/root/main/detailinfo/pat_info/pid") == "" ) {
  1624. messageBox("환자를", "C002");
  1625. return;
  1626. }
  1627. // 약사메모이력
  1628. model.setValue("/root/send/memosrchinfo/srchpid", model.getValue("/root/main/detailinfo/pat_info/pid"));
  1629. model.setValue("/root/send/memosrchinfo/srchinstcd", getUserInfo("dutplceinstcd"));
  1630. model.setValue("/root/send/memosrchinfo/srchioflag", "I");
  1631. modal("SPADB60601",0,100,150,"SPADB60601","/root/send/memosrchinfo","/root/send/srchinfo");
  1632. ]]>
  1633. </script>
  1634. </button>
  1635. <input id="ipt_writeid" ref="/root/main/detailinfo/memoinfo/writid2" class="input_essential" autonext="false" maxlength="10" style="left:447px; top:398px; width:72px; height:19px; ">
  1636. <script type="javascript" ev:event="onkeyup">
  1637. <![CDATA[
  1638. if(event.keyCode == "13") {
  1639. setInputNodeCurText();
  1640. if(trim(model.getValue("/root/main/detailinfo/memoinfo/writid2")) != "") {
  1641. var writid = trim(model.getValue("/root/main/detailinfo/memoinfo/writid2"));
  1642. model.setValue("/root/send/usersrchinfo/srchuserid",writid);
  1643. var success = submit("TRADT00105");
  1644. if (success) {
  1645. model.setValue("/root/main/detailinfo/memoinfo/writid2", trim(model.getValue("/root/main/detailinfo/memoinfo/writid2")));
  1646. model.setValue("/root/main/detailinfo/memoinfo/writnm",model.getValue("/root/hidden/userinfo/item/usernm"));
  1647. model.refresh();
  1648. // 반환된 약사정보(이름) 체크
  1649. if(trim(model.getValue("/root/main/detailinfo/memoinfo/writnm")) != "") {
  1650. // 메모 내용 입력여부 체크
  1651. if (trim(model.getValue("/root/main/detailinfo/memoinfo/memo")) == "" ) {
  1652. messageBox("메모내용은", "I003");
  1653. model.setFocus("tar_memo");
  1654. return;
  1655. } else {
  1656. fSubmitMemo();
  1657. /* 메모저장여부 확인 부분
  1658. if (messageBox("메모사항을", "Q002", "") == 7) {
  1659. return;
  1660. } else {
  1661. fSubmitMemo();
  1662. return;
  1663. }
  1664. */
  1665. }
  1666. } else {
  1667. messageBox("입력한 사번으로 이름 확인을", "E009");
  1668. return;
  1669. }
  1670. }
  1671. } else {
  1672. messageBox("약사메모 입력을 위해 사번은", "I003");
  1673. model.setValue("/root/main/detailinfo/memoinfo/writid2", trim(model.getValue("/root/main/detailinfo/memoinfo/writid2")));
  1674. return;
  1675. }
  1676. }
  1677. /*
  1678. if(event.keyCode == "13") {
  1679. setInputNodeCurText();
  1680. var writid = model.getValue("/root/main/detailinfo/memoinfo/writid2");
  1681. model.setValue("/root/send/usersrchinfo/srchuserid",writid);
  1682. var success = submit("TRADT00105");
  1683. if (success) {
  1684. model.setValue("/root/main/detailinfo/memoinfo/writnm",model.getValue("/root/hidden/userinfo/item/usernm"));
  1685. model.refresh();
  1686. }
  1687. }
  1688. */
  1689. ]]>
  1690. </script>
  1691. </input>
  1692. <button id="button8" class="btn5_letter2" style="left:126px; top:399px; width:42px; height:19px; ">
  1693. <caption>저장</caption>
  1694. <script type="javascript" ev:event="DOMActivate">
  1695. <![CDATA[
  1696. fSubmitMemo();
  1697. /*
  1698. var varSaveMode = ""; // i-입력,m-수정
  1699. var varSaveFlag = false;
  1700. var varWritId = "";
  1701. // 환자선택 필수
  1702. if (model.getValue("/root/main/detailinfo/baseinfo/pid") == "" ) {
  1703. messageBox("환자를 선택하시고", "C001");
  1704. return;
  1705. }
  1706. // 작성자
  1707. varWritId = model.getValue("/root/main/detailinfo/memoinfo/writid2");
  1708. if (varWritId == "" ) {
  1709. messageBox("메모작성자를", "I003");
  1710. return;
  1711. }
  1712. // 메모내용필수
  1713. if (model.getValue("/root/main/detailinfo/memoinfo/memo") == "" ) {
  1714. messageBox("메모내용은", "I003");
  1715. return;
  1716. }
  1717. // 본인이 작성하지 않은 메모수정불가
  1718. if (model.getValue("/root/main/detailinfo/memoinfo/writid") != getUserId()) {
  1719. messageBox("자료를 수정할", "E002");
  1720. return;
  1721. }
  1722. // 자료수집
  1723. model.setValue("/root/main/detailinfo/memoinfo/writid",varWritId);
  1724. model.copyNode("/root/send/req/data2", "/root/main/detailinfo/memoinfo");
  1725. if (model.getValue("/root/main/detailinfo/memoinfo/seqno") == "") {
  1726. varSaveMode = "i";
  1727. } else {
  1728. varSaveMode = "u";
  1729. }
  1730. model.setValue("/root/send/req/data2/m", varSaveMode);
  1731. submit("TXADT10102","false");
  1732. // 저장여부확인
  1733. if (varSaveMode == "i" && Number(model.getValue("/root/hidden/memoitem/seqno")) > 0) {
  1734. varSaveFlag = true;
  1735. model.setValue("/root/main/detailinfo/memoinfo/seqno", model.getValue("/root/hidden/memoitem/seqno"));
  1736. }
  1737. if (varSaveMode == "u" && Number(model.getValue("/root/hidden/memoitem/count")) > 0) {
  1738. varSaveFlag = true;
  1739. }
  1740. // 화면정리 및 메세지처리
  1741. if (varSaveFlag == true) {
  1742. model.refresh();
  1743. messageBox("메모저장이", "I002");
  1744. }
  1745. */
  1746. ]]>
  1747. </script>
  1748. </button>
  1749. <caption id="caption23" class="cell_1" style="left:404px; top:396px; width:41px; height:23px; vertical-align:middle; ">사번</caption>
  1750. <input id="ipt_writenm" ref="/root/main/detailinfo/memoinfo/writnm" class="output_fix" style="left:561px; top:398px; width:75px; height:19px; "/>
  1751. <caption id="caption25" class="cell_1" style="left:0px; top:420px; width:80px; height:38px; vertical-align:middle; ">메모사항</caption>
  1752. <input id="ipt_writdt" ref="/root/main/detailinfo/memoinfo/writdt" class="output_fix" format="yyyy-mm-dd hh:mm:ss" style="left:703px; top:398px; width:127px; height:19px; "/>
  1753. <caption id="caption26" class="cell_1" style="left:640px; top:396px; width:60px; height:23px; vertical-align:middle; ">작성일시</caption>
  1754. <caption id="caption27" class="tit_2" style="left:0px; top:402px; width:82px; height:13px; ">약사메모</caption>
  1755. <caption id="caption28" class="cell_1" style="left:523px; top:396px; width:36px; height:23px; vertical-align:middle; ">이름</caption>
  1756. <button id="btn_ref" class="btn2_letter7" style="left:170px; top:399px; width:97px; height:19px; ">
  1757. <caption>조제시참조사항</caption>
  1758. <script type="javascript" ev:event="DOMActivate">
  1759. <![CDATA[
  1760. modal("SPADB60602",0,100,160,"SPADB60602","/root/send/memosrchinfo","/root/send/srchinfo");
  1761. ]]>
  1762. </script>
  1763. </button>
  1764. <textarea id="tar_memo" ref="/root/main/detailinfo/memoinfo/memo" style="left:82px; top:420px; width:748px; height:38px; "/>
  1765. <group id="grp_ordhist" visibility="hidden" style="left:250px; top:85px; width:685px; height:683px; border-style:solid; ">
  1766. <datagrid id="datagrid1" nodeset="/root/main/masterinfo/grd_exelist" caption="처방이력상태^약코드^약품명^수량^횟수^일수" colsep="^" colwidth="98, 78, 244, 80, 65, 80" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:0px; top:35px; width:680px; height:255px; ">
  1767. <col ref="prcphistcdnm" format="yyyy-mm-dd"/>
  1768. <col ref="prcpcd"/>
  1769. <col ref="prcpnm"/>
  1770. <col ref="prcpqty"/>
  1771. <col ref="prcptims"/>
  1772. <col ref="prcpdayno"/>
  1773. <script type="javascript" ev:event="ondblclick">
  1774. <![CDATA[
  1775. var rows = grd_druglist.rows;
  1776. var selRow = grd_druglist.row;
  1777. if (rows >0) {
  1778. if (selRow<= 0) {
  1779. selRow = 1;
  1780. }
  1781. }
  1782. model.setValue("root/send/srchdetinfo/drugdd", model.getValue("/root/main/masterinfo/grd_druglist["+selRow+"]/drugdd"));
  1783. model.setValue("root/send/srchdetinfo/drugno", model.getValue("/root/main/masterinfo/grd_druglist["+selRow+"]/drugno"));
  1784. model.setValue("root/send/srchdetinfo/ioflag" , model.getValue("/root/main/masterinfo/grd_druglist["+selRow+"]/ioflag"));
  1785. submit("TRADT10402");
  1786. ]]>
  1787. </script>
  1788. </datagrid>
  1789. <caption id="caption18" class="tit_2" style="left:5px; top:15px; width:216px; height:13px; ">현재 실행가능한 처방목록</caption>
  1790. <line id="line3" class="line_1" style="x1:1px; y1:28px; x2:681px; y2:28px; "/>
  1791. <line id="line4" class="line_1" style="x1:0px; y1:313px; x2:680px; y2:313px; "/>
  1792. <caption id="caption20" class="tit_2" style="left:5px; top:300px; width:216px; height:13px; ">반환된 처방목록</caption>
  1793. <button id="btn_cls" class="btn4_letter2" style="left:620px; top:657px; width:56px; height:22px; ">
  1794. <caption>닫기</caption>
  1795. <script type="javascript" ev:event="DOMActivate">
  1796. <![CDATA[
  1797. grp_ordhist.visible = false;
  1798. ]]>
  1799. </script>
  1800. </button>
  1801. <datagrid id="datagrid2" nodeset="/root/main/masterinfo/grd_histlist" caption="처방이력상태^약코드^약품명^수량^횟수^일수" colsep="^" colwidth="97, 78, 243, 80, 65, 80" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:0px; top:322px; width:680px; height:330px; ">
  1802. <col ref="prcphistcdnm" style="text-align:center; "/>
  1803. <col ref="prcpcd"/>
  1804. <col ref="prcpnm"/>
  1805. <col ref="prcpqty" style="text-align:right; "/>
  1806. <col ref="prcpqty" style="text-align:right; "/>
  1807. <col ref="prcptims" style="text-align:right; "/>
  1808. <script type="javascript" ev:event="ondblclick">
  1809. <![CDATA[
  1810. var rows = grd_druglist.rows;
  1811. var selRow = grd_druglist.row;
  1812. if (rows >0 && selRow<= 0) selRow = 1;
  1813. model.setValue("root/send/srchdetinfo/drugdd", model.getValue("/root/main/masterinfo/grd_druglist["+selRow+"]/drugdd"));
  1814. model.setValue("root/send/srchdetinfo/drugno", model.getValue("/root/main/masterinfo/grd_druglist["+selRow+"]/drugno"));
  1815. model.setValue("root/send/srchdetinfo/ioflag" , model.getValue("/root/main/masterinfo/grd_druglist["+selRow+"]/ioflag"));
  1816. submit("TRADT10402");
  1817. ]]>
  1818. </script>
  1819. </datagrid>
  1820. </group>
  1821. <line id="line5" class="line_2" style="x1:0px; y1:393px; x2:1194px; y2:393px; "/>
  1822. <select id="chk_redateflag2" ref="/root/main/reokdateflag/reokdateflag2" overflow="visible" appearance="full" style="left:1131px; top:412px; width:60px; height:20px; border-style:none; ">
  1823. <choices>
  1824. <item>
  1825. <label>재등록</label>
  1826. <value>Y</value>
  1827. </item>
  1828. </choices>
  1829. </select>
  1830. <select id="chk_redateflag1" ref="/root/main/reokdateflag/reokdateflag1" overflow="visible" appearance="full" style="left:260px; top:65px; width:70px; height:20px; border-style:none; ">
  1831. <choices>
  1832. <item>
  1833. <label>재등록</label>
  1834. <value>Y</value>
  1835. </item>
  1836. </choices>
  1837. </select>
  1838. </group>
  1839. <group id="group1" style="left:0px; top:0px; width:1194px; height:13px; ">
  1840. <caption id="caption19" class="tit_1" style="left:0px; top:0px; width:106px; height:14px; ">병동투약관리</caption>
  1841. </group>
  1842. </xhtml:body>
  1843. </xhtml:html>