SPMQP03800_약속처방.xrw 49 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204
  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. <prmsprcpsetinfo>
  11. <prmsprcpsetlist>
  12. <levl/>
  13. <setno/>
  14. <supsetno/>
  15. <sortno/>
  16. <setkindcd/>
  17. <setclscd/>
  18. <settrgtcd/>
  19. <setnm/>
  20. <settypecd/>
  21. <prtlno/>
  22. <ioflag/>
  23. </prmsprcpsetlist>
  24. </prmsprcpsetinfo>
  25. <iptbox>
  26. <setnm/>
  27. </iptbox>
  28. <prcp>
  29. <prcplist/>
  30. <status/>
  31. </prcp>
  32. <cond>
  33. <deptcd/>
  34. <setnm/>
  35. </cond>
  36. <steplist>
  37. <!--
  38. <stepinfo>
  39. <stepno>0</stepno>
  40. <setno/>
  41. <setnm/>
  42. <stepnm>전체</stepnm>
  43. <times/>
  44. </stepinfo>
  45. -->
  46. </steplist>
  47. <stepcond>
  48. <status/>
  49. <setnm/>
  50. <issneedyn/>
  51. <fromstepno/>
  52. <tostepno/>
  53. <setno/>
  54. <settypecd/>
  55. <cpgno/>
  56. <cpghistseq/>
  57. <setattrno/>
  58. <setattrhistno/>
  59. <steplistno/>
  60. <inqrno/>
  61. <qestno/>
  62. </stepcond>
  63. <essprcpsetinfo/>
  64. <pop_steplist>
  65. <pop_steplistno/>
  66. <pop_steplistnm/>
  67. </pop_steplist>
  68. </main>
  69. <init>
  70. <detlvw>p</detlvw>
  71. <msrght>
  72. <mouserghtprcp>
  73. <label>삭제</label>
  74. <func>fDelPrmsPrcp</func>
  75. </mouserghtprcp>
  76. <mouserghtprcp>
  77. <label>대체약 일괄변경</label>
  78. <func>fAltDrugAll</func>
  79. </mouserghtprcp>
  80. <mouserghtprcp>
  81. <label>대체약 선택폴더내 변경</label>
  82. <func>fAltDrugFolder</func>
  83. </mouserghtprcp>
  84. <mouserghtset>
  85. <label>새폴더</label>
  86. <func>fAddPrmsDiagSet</func>
  87. </mouserghtset>
  88. <mouserghtset>
  89. <label>이름바꾸기</label>
  90. <func>fUpdtPrmsDiagSet_INF</func>
  91. </mouserghtset>
  92. <mouserghtset>
  93. <label>삭제</label>
  94. <func>fDelPrmsDiagSet</func>
  95. </mouserghtset>
  96. <mouserghtset>
  97. <label/>
  98. <func/>
  99. </mouserghtset>
  100. <mouserghtset>
  101. <label>폴더복사</label>
  102. <func>fFolderCopy</func>
  103. </mouserghtset>
  104. <mouserghtset>
  105. <label>폴더붙여넣기</label>
  106. <func>fFolderPaste</func>
  107. </mouserghtset>
  108. <mouserghtset>
  109. <label/>
  110. <func/>
  111. </mouserghtset>
  112. <mouserghtset>
  113. <label>폴더순서변경</label>
  114. <func>fOpenPrmsSetFolderOrderChng</func>
  115. </mouserghtset>
  116. <mouserghtset2>
  117. <label>폴더복사</label>
  118. <func>fFolderCopy</func>
  119. </mouserghtset2>
  120. <mouserghtset2>
  121. <label>폴더붙여넣기</label>
  122. <func>fFolderPaste</func>
  123. </mouserghtset2>
  124. <mouserghtset3>
  125. <label>폴더복사</label>
  126. <func>fFolderCopy</func>
  127. </mouserghtset3>
  128. </msrght>
  129. <srchcond1/>
  130. <srchcond2>1</srchcond2>
  131. <srchcond3>P</srchcond3>
  132. <srchcond4>O</srchcond4>
  133. <payflagcd/>
  134. <grdwd>200</grdwd>
  135. <extngrdwd>718</extngrdwd>
  136. <grdnm>grd_promprcplist</grdnm>
  137. <orddept/>
  138. <autoflag/>
  139. </init>
  140. <hidden>
  141. <prmsprcpsetinfo>
  142. <prmsprcpsetlist>
  143. <status/>
  144. <levl/>
  145. <setno/>
  146. <supsetno/>
  147. <sortno/>
  148. <setkindcd/>
  149. <setclscd/>
  150. <settrgtcd/>
  151. <setnm/>
  152. <settypecd/>
  153. <prtlno/>
  154. <ioflag/>
  155. </prmsprcpsetlist>
  156. </prmsprcpsetinfo>
  157. <trv_value/>
  158. </hidden>
  159. <send>
  160. <reqdata/>
  161. <savedata/>
  162. <cond1/>
  163. <cond2/>
  164. <cond3/>
  165. <cond4/>
  166. <cond5/>
  167. <cond6/>
  168. <cond99/>
  169. </send>
  170. <result>
  171. <prcperrlist/>
  172. </result>
  173. <prcpdirec/>
  174. <prcpgroup/>
  175. <save>
  176. <prcp/>
  177. </save>
  178. <temp>
  179. <copy>
  180. <setno/>
  181. <settypecd/>
  182. <setkindcd/>
  183. <setclscd/>
  184. <settrgtcd/>
  185. <setnm/>
  186. <supsetno/>
  187. <trgtsettypecd/>
  188. <trgtsetkindcd/>
  189. <trgtsettrgtcd/>
  190. <trgtsetclscd/>
  191. <trgtioflag/>
  192. <ioflag/>
  193. </copy>
  194. </temp>
  195. <param>
  196. <prcpdd/>
  197. <insukind/>
  198. </param>
  199. </root>
  200. </instance>
  201. <submission id="TRZBC00101" mediatype="application/x-www-form-urlencoded" method="post"/>
  202. <submission id="TRZSD00109" mediatype="application/x-www-form-urlencoded" method="post"/>
  203. <submission id="TRMMB00601" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/main/prmsprcpsetinfo"/>
  204. <submission id="TXMMB00601" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/savedata" resultref="/root/main/prmsprcpsetinfo"/>
  205. <submission id="TRMMB00202" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/prcp"/>
  206. <submission id="TXMMB00201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/cond1" resultref="/root/main/prcp"/>
  207. <submission id="TRMMB00604" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/init/deptlist"/>
  208. <submission id="TRMMB00203" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/result"/>
  209. <submission id="TXMMB00607" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/savedata" resultref="/root/main/prmsprcpsetinfo"/>
  210. <submission id="TRMMB04101" mediatype="application/x-www-form-urlencoded" method="post"/>
  211. <submission id="TRMMO00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/prcpgroup"/>
  212. <submission id="TRMMO00102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/prcpdirec"/>
  213. <submission id="TRMMO00207" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/addsetprcp"/>
  214. <submission id="TRMMO15701" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/temp/send" resultref="/root/temp/patsupkind"/>
  215. <submission id="TRMQP03801" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/stepcond" resultref="/root/main/essprcpsetinfo"/>
  216. <submission id="TXMQP03801" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/essprcpsetinfo" resultref="/root/main/essprcpsetinfo"/>
  217. <script type="javascript" ev:event="xforms-ready">
  218. <![CDATA[
  219. if( opener.model.getValue ( "/root/cp" ) == "S" || opener.model.getValue ( "/root/cp" ) == "D" ){
  220. line8.attribute("x2") = "377px";
  221. trv_promprcpset.attribute("height") = "520px";
  222. grd_promprcplist.attribute("width") = "200px";
  223. grd_promprcplist.attribute("height") = "343px";
  224. }else if ( opener.model.getValue ( "/root/cp" ) == "Y" ) {
  225. //CP일 경우, viewer안의 컨트롤 height 사이즈를 모두 조정해야 함 (2008.08.28 JJE)
  226. opener.window.javascript.fResizeControls();
  227. }
  228. group1.attribute("height") = 0;
  229. model.removeNodeset ("/root/main/prcp/prcplist");
  230. model.setValue("/root/init/srchcond1", "P");
  231. model.setValue("/root/init/srchcond4", "O");
  232. model.makeValue("/root/send/reqdata/settypecd", opener.javascript.ivwPrcpUseFlag); //@@필수처방/약속처방모니터링
  233. model.makeValue("/root/send/reqdata/setkindcd", "D"); //@@P는 개인, D는 부서
  234. model.makeValue("/root/send/reqdata/setclscd" , "D"); //의사 SET
  235. model.makeValue("/root/send/reqdata/ioflag", "O"); //외래입원구분
  236. model.makeValue("/root/send/reqdata/procflag", "D"); //@@타과 악속SET 조회
  237. model.makeValue("/root/send/reqdata/deptcd", "1000000000"); //@@타과 악속SET 조회
  238. model.makeValue("/root/send/reqdata/deptnm", "병원"); //@@타과 악속SET 조회
  239. model.makeValue("/root/main/prmsprcpsetinfo/prmsprcpsetlist/procflag", "D"); //@@타과 악속SET 조회
  240. model.makeValue("/root/main/prmsprcpsetinfo/prmsprcpsetlist/deptcd", "1000000000"); //@@타과 악속SET 조회
  241. model.makeValue("/root/main/prmsprcpsetinfo/prmsprcpsetlist/deptnm", "병원"); //@@타과 악속SET 조회
  242. if ( opener.model.getValue("/root/initsrch/envinfo[qestcd='009']/answvalnm") == "입원") {
  243. model.setValue("/root/init/srchcond4", "I");
  244. model.makeValue("/root/send/reqdata/ioflag", "I"); //외래입원구분
  245. }
  246. if ( opener.model.getValue("/root/initsrch/envinfo[qestcd='010']/answvalnm") == "과") {
  247. model.setValue("/root/init/srchcond1", "D");
  248. model.makeValue("/root/send/reqdata/setkindcd", "D"); //P는 개인, D는 부서
  249. }
  250. if ( opener.model.getValue("/root/initsrch/envinfo[qestcd='010']/answvalnm") == "타과") {
  251. model.setValue("/root/init/srchcond1", "T");
  252. model.makeValue("/root/send/reqdata/setkindcd", "T"); //P는 개인, D는 부서
  253. }
  254. if(submit("TRMMB00601")){
  255. zbcfGetCodeList(new Array("M0029" ), new Array("/root/init/payflagcd"));
  256. //zbcfGetDeptCodeList(getUserInfo("dutplceinstcd"), "orduseyn", "D", "/root/init/orddept", "depthngnm"); //부서코드 콤보 조회
  257. //2008. 06. 04 오지훈 진료부서 콤보 조회는 mmbfGetDeptCodeComboList로 변경
  258. mmbfGetDeptCodeComboList("/root/send/reqdata", "/root/init/orddept", "O");
  259. }
  260. trv_promprcpset.rebuild();
  261. cmb_deptset.disabled = true;
  262. model.refresh();
  263. //2008. 06. 12. 약속처방 재선택시, 기존의 조회내용 자동 선택기능
  264. //자동저장시에는 기존의 조회내용 자동선택 기능을 해제한다.
  265. if(opener.model.getValue("/root/init/prmsautoflag") != "Y"){
  266. var selectval = opener.javascript.getParameter("SMMMO02300_selectindex");
  267. var scrnopenflag = opener.javascript.getParameter("SMMMO02300_scrnopenflag")
  268. }else{
  269. var selectval = 0;
  270. var scrnopenflag = "Y";
  271. opener.model.setValue("/root/init/prmsautoflag", "N");
  272. }
  273. if(scrnopenflag == "Y"){
  274. var path = trv_promprcpset.getItemPath(selectval, "/");
  275. var curindex = 0;
  276. var node;
  277. for(var j = 0; j < path.length; j++){
  278. if(path.charAt(j) == '/'){
  279. node = path.substring(curindex, j);
  280. curindex = j+1;
  281. trv_promprcpset.expand(labelToIndex(node, trv_promprcpset), true);
  282. }
  283. }
  284. trv_promprcpset.select(selectval);
  285. }
  286. //자동저장시 처리 완료 이후에는 처방의 자동저장구분을 N으로 처리, 추후 탭변경시, 자동선택 기능 해제되는 것을 방지함
  287. opener.model.setValue("/root/init/prmsautoflag", "N");
  288. fInitSetAttrData();
  289. model.setValue("/root/main/stepcond/fromstepno", opener.javascript.stepNo);
  290. model.setValue("/root/main/stepcond/tostepno", opener.javascript.stepNo);
  291. model.setValue("/root/main/stepcond/cpgno", opener.javascript.cpgNo);
  292. model.setValue("/root/main/stepcond/cpghistseq", opener.javascript.cpgHistSeq);
  293. submit("TRMQP03801");
  294. ]]>
  295. </script>
  296. <script type="javascript">
  297. <![CDATA[
  298. //스텝 리스트를 콤보박스 컴트롤에 mapping, 현재 선택된 스텝에 focusing
  299. function fInitSetAttrData(){
  300. //model.removeNodeset("/root/main/steplist/steplist");
  301. copyNodesetType ( "/root/main/steplist", "/root/temp/sortedsteplist" , "replace", model, opener.model);
  302. chk_steplistno1.refresh();
  303. chk_steplistno2.refresh();
  304. }
  305. //처방복사, CHC, 2009-06-22
  306. function fCopyPrcpSets(){
  307. var ndlst = instance1.selectNodes ( "/root/main/prcp/prcplist[ status='I' and prcpclscd='04']");
  308. if(ndlst != null && ndlst.length > 0 ){
  309. //20090209 마정민 수정. 홍은영선생님 요청 약속처방 저장 가능
  310. //messageBox("BMT지시처방은 지시처방검색을 통해서만 가능합니다", "I");
  311. //return ;
  312. }
  313. addPrcp ( "child", "/root/main/prcp/prcplist", "/root/main/prcp", "Y", "status", "I", grd_promprcplist, "N", "02");
  314. }
  315. function fSaveEssPrmsPrcpInfo(){
  316. var sCpgNo = model.getValue("/root/main/stepcond/cpgno");
  317. var sCpgHistSeq = model.getValue("/root/main/stepcond/cpghistseq");
  318. var sSetNo = model.getValue("/root/hidden/prmsprcpsetinfo/prmsprcpsetlist/setno");
  319. var sSetNm = model.getValue("/root/hidden/prmsprcpsetinfo/prmsprcpsetlist/setnm");
  320. var sSetSetTypeCd = model.getValue("/root/hidden/prmsprcpsetinfo/prmsprcpsetlist/settypecd");
  321. //저장 후 조회할 조건 정보
  322. model.makeValue("/root/send/essprcpsetinfo/condcpgno", sCpgNo);
  323. model.makeValue("/root/send/essprcpsetinfo/condcpghistseq", sCpgHistSeq);
  324. model.makeValue("/root/send/essprcpsetinfo/condfromstepno", model.getValue("/root/main/stepcond/fromstepno"));
  325. model.makeValue("/root/send/essprcpsetinfo/condtostepno", model.getValue("/root/main/stepcond/tostepno"));
  326. if( !submit("TXMQP03801", true) ){
  327. }
  328. }
  329. function fSizeControl_SetArray(){
  330. if( btn_sizecntl.attribute("class") == "icon_left"){
  331. btn_sizecntl.attribute("class") = "icon_right";
  332. trv_promprcpset.attribute("height") = "318px";
  333. grd_promprcpset.attribute("height") = "318px";
  334. grp_dummy2.attribute("left") = "0";
  335. grp_dummy2.attribute("width") = "387";
  336. grd_esslist.attribute("width") = "386";
  337. //grd_esslist.extendlastcol = "scroll";
  338. grd_esslist.colWidth(grd_esslist.colRef("steplistnm")) = parseInt(grd_esslist.colWidth(grd_esslist.colRef("steplistnm"))) + 100;
  339. }else{
  340. btn_sizecntl.attribute("class") = "icon_left";
  341. trv_promprcpset.attribute("height") = "545px";
  342. grd_promprcpset.attribute("height") = "545px";
  343. grp_dummy2.attribute("left") = "177";
  344. grp_dummy2.attribute("width") = "200";
  345. grd_esslist.attribute("width") = "199";
  346. //grd_esslist.extendlastcol = "";
  347. grd_esslist.colWidth(grd_esslist.colRef("steplistnm")) = parseInt(grd_esslist.colWidth(grd_esslist.colRef("steplistnm"))) - 100;
  348. }
  349. btn_sizecntl.refresh();
  350. grd_esslist.refresh();
  351. }
  352. function fUpdtPrmsDiagSet_INF(){
  353. var item = trv_promprcpset.item(trv_promprcpset.selectedIndex);
  354. if(item == null){return;}
  355. var currow = item.index + 1;
  356. var indx = trv_promprcpset.selectedIndex;
  357. var foldernm = model.getValue(sPRMSPRCPSETLIST + "[" + currow + "]/setnm");
  358. model.setValue("/root/main/iptbox/setnm", foldernm);
  359. model.refresh();
  360. fUpdtPrmsDiagSet();
  361. }
  362. ]]>
  363. </script>
  364. </model>
  365. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  366. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  367. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  368. <script type="javascript" src="../../../emr/prcpmngtweb/js/MMO001.js"/>
  369. <script type="javascript" src="../../../emr/prcpmngtweb/js/SMMMO02300.js"/>
  370. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  371. <script type="javascript" src="../../../com/departmentcodeweb/js/ZSD001.js"/>
  372. </xhtml:head>
  373. <xhtml:body overflow="hidden" guideline="1,890;2,636;">
  374. <group id="grp_dummy1" style="left:177px; top:402px; width:200px; height:225px; ">
  375. <datagrid id="datagrid1" caption="모니터링" colsep="^" colwidth="176" mergecellsfixedrows="bycolrec" rowsep="|" style="left:0px; top:0px; width:199px; height:225px; ">
  376. <col/>
  377. </datagrid>
  378. </group>
  379. <group id="grp_dummy2" style="left:177px; top:402px; width:200px; height:225px; ">
  380. <caption id="cap_slipnm2" class="cell_1" style="left:0px; top:0px; width:70px; height:23px; ">스텝구간</caption>
  381. <select1 id="combo2" ref="/root/main/stepcond/tostepno" visibility="hidden" appearance="minimal" style="left:90px; top:180px; width:23px; height:19px; ">
  382. <choices>
  383. <itemset nodeset="/root/main/steplist/info">
  384. <label ref="stepnm"/>
  385. <value ref="stepno"/>
  386. </itemset>
  387. </choices>
  388. <script type="javascript" ev:event="xforms-value-changed">
  389. <![CDATA[
  390. submit("TRMQP03801");
  391. ]]>
  392. </script>
  393. </select1>
  394. <select1 id="combo1" ref="/root/main/stepcond/tostepno" visibility="hidden" appearance="minimal" style="left:70px; top:180px; width:23px; height:19px; ">
  395. <choices>
  396. <itemset nodeset="/root/main/steplist/info">
  397. <label ref="stepnm"/>
  398. <value ref="stepno"/>
  399. </itemset>
  400. </choices>
  401. <script type="javascript" ev:event="xforms-value-changed">
  402. <![CDATA[
  403. submit("TRMQP03801");
  404. ]]>
  405. </script>
  406. </select1>
  407. <button id="button5" class="btn2_letter2" style="left:112px; top:180px; width:42px; height:19px; ">
  408. <caption>수정</caption>
  409. <script type="javascript" ev:event="DOMActivate">
  410. <![CDATA[
  411. var selectedRows = instance1.selectNodes("/root/main/essprcpsetinfo/essprcpsetlist[status='U']");
  412. if( selectedRows.length > 0 ){
  413. //if( messageBox("선택한 선택필수 정보를", "Q001") == 6 ){
  414. model.makeNode("/root/send/essprcpsetinfo");
  415. copyNodeListType( "/root/send/essprcpsetinfo", "/root/main/essprcpsetinfo/essprcpsetlist[status='U']", "replace", model, model );
  416. fSaveEssPrmsPrcpInfo();
  417. model.removeNodeset("/root/send/essprcpsetinfo");
  418. //}
  419. }else{
  420. messageBox("수정된 데이터가", "I004");
  421. return;
  422. }
  423. ]]>
  424. </script>
  425. </button>
  426. <button id="button6" class="btn2_letter2" visibility="hidden" style="left:29px; top:179px; width:42px; height:19px; ">
  427. <caption>조회</caption>
  428. <script type="javascript" ev:event="DOMActivate">
  429. <![CDATA[
  430. submit("TRMQP03801");
  431. ]]>
  432. </script>
  433. </button>
  434. <button id="button7" class="btn2_letter2" style="left:156px; top:180px; width:42px; height:19px; ">
  435. <caption>삭제</caption>
  436. <script type="javascript" ev:event="DOMActivate">
  437. <![CDATA[
  438. var selectedRows = grd_esslist.selectedRows;
  439. if( selectedRows > 0 ){
  440. if( messageBox("선택한 선택필수 정보를", "Q001") == 6 ){
  441. model.makeNode("/root/send/essprcpsetinfo");
  442. for (var i=selectedRows-1; i>=0; i--) {
  443. if ( model.getValue("/root/main/essprcpsetinfo/essprcpsetlist[" + grd_esslist.selectedrow(i) + "]/status") == "I" ) {
  444. model.removeNodeset("/root/main/essprcpsetinfo/essprcpsetlist[" + grd_esslist.selectedrow(i) + "]"); //remove
  445. }else if ( model.getValue("/root/main/essprcpsetinfo/essprcpsetlist[" + grd_esslist.selectedrow(i) + "]/status") == "I" ) {
  446. model.setValue("/root/main/essprcpsetinfo/essprcpsetlist[" + grd_esslist.selectedrow(i) + "]/status", "-");
  447. }else{
  448. model.setValue("/root/main/essprcpsetinfo/essprcpsetlist[" + grd_esslist.selectedrow(i) + "]/status", "D");
  449. }
  450. }
  451. copyNodeListType("/root/send/essprcpsetinfo", "/root/main/essprcpsetinfo/essprcpsetlist[status='D']", "replace", model, model);
  452. fSaveEssPrmsPrcpInfo();
  453. model.removeNodeset("/root/send/essprcpsetinfo");
  454. }
  455. }else{
  456. messageBox("선택된 데이터가", "I004");
  457. return;
  458. }
  459. ]]>
  460. </script>
  461. </button>
  462. <datagrid id="grd_esslist" nodeset="/root/main/essprcpsetinfo/essprcpsetlist" caption="^선택필수명^발행필^시작^종료^setno^settypecd^cpgno^cpghistseq^setattrno^setattrhistno^steplistno^스텝구간^inqrno^qestno" colsep="^" colwidth="18, 125, 42, 40, 40, 0, 0, 0, 0, 0, 0, 43, 80,0,0" mergecellsfixedrows="bycolrec" rowsep="|" style="left:0px; top:48px; width:199px; height:130px; ">
  463. <col disabled="true" ref="status" type="combo">
  464. <choices>
  465. <item>
  466. <label/>
  467. <value>-</value>
  468. </item>
  469. <item>
  470. <label>I</label>
  471. <value>I</value>
  472. </item>
  473. <item>
  474. <label>U</label>
  475. <value>U</value>
  476. </item>
  477. <item>
  478. <label>D</label>
  479. <value>D</value>
  480. </item>
  481. </choices>
  482. </col>
  483. <col ref="setnm" type="output"/>
  484. <col checkvalue="Y,N" ref="issneedyn" type="checkbox"/>
  485. <col ref="fromstepno" type="combo" visibility="hidden">
  486. <choices>
  487. <itemset nodeset="/root/main/steplist/info">
  488. <label ref="stepnm"/>
  489. <value ref="stepno"/>
  490. </itemset>
  491. </choices>
  492. </col>
  493. <col ref="tostepno" type="combo" visibility="hidden">
  494. <choices>
  495. <itemset nodeset="/root/main/steplist/info">
  496. <label ref="stepnm"/>
  497. <value ref="stepno"/>
  498. </itemset>
  499. </choices>
  500. </col>
  501. <col ref="setno"/>
  502. <col ref="settypecd"/>
  503. <col ref="cpgno"/>
  504. <col ref="cpghistseq"/>
  505. <col ref="setattrno"/>
  506. <col ref="setattrhistno"/>
  507. <col ref="steplistno" visibility="hidden"/>
  508. <col ref="steplistnm" type="inputbutton"/>
  509. <col ref="inqrno" visibility="hidden"/>
  510. <col ref="qestno" visibility="hidden"/>
  511. <script type="javascript" ev:event="xforms-value-changed">
  512. <![CDATA[
  513. var iRow = grd_esslist.row;
  514. if(iRow>0 && iRow <= grd_esslist.rows){
  515. var statusNode = instance1.selectSingleNode("/root/main/essprcpsetinfo/essprcpsetlist["+iRow+"]/status");
  516. if( statusNode != null && statusNode.text != "I" ) model.setValue(statusNode, "U");
  517. }
  518. ]]>
  519. </script>
  520. <script type="javascript" ev:event="ondblclick">
  521. <![CDATA[
  522. var iRow = grd_esslist.row;
  523. if(iRow>0 && iRow <= grd_esslist.rows){
  524. opener.model.makeNode("/root/send/essprmsdata");
  525. opener.model.makeValue("/root/send/essprmsdata/cond1", model.getValue("/root/main/essprcpsetinfo/essprcpsetlist["+iRow+"]/setno"));
  526. opener.model.makeValue("/root/send/essprmsdata/cond2", model.getValue("/root/main/essprcpsetinfo/essprcpsetlist["+iRow+"]/settypecd"));
  527. opener.model.makeValue("/root/send/essprmsdata/cpyn", "N");
  528. opener.window.javascript.fGetEssPrmsPrcpList();
  529. }
  530. ]]>
  531. </script>
  532. <script type="javascript" ev:event="onbuttonclick">
  533. <![CDATA[
  534. var iRow = grd_esslist.row;
  535. model.setValue("/root/main/pop_steplist/pop_steplistno", model.getValue("/root/main/essprcpsetinfo/essprcpsetlist["+iRow+"]/steplistno"));
  536. model.setValue("/root/main/pop_steplist/pop_steplistnm", model.getValue("/root/main/essprcpsetinfo/essprcpsetlist["+iRow+"]/steplistnm"));
  537. pop_steplistno.attribute("left") = parseInt(grd_esslist.attribute("width")) - 122;
  538. btn_steplistno.attribute("left") = parseInt(grd_esslist.attribute("width")) - 15;
  539. pop_steplistno.visible = true;
  540. btn_steplistno.visible = true;
  541. btn_steplistno.refresh();
  542. chk_steplistno2.refresh();
  543. ]]>
  544. </script>
  545. </datagrid>
  546. <button id="button8" class="btn2_letter2" style="left:157px; top:26px; width:42px; height:19px; ">
  547. <caption>등록</caption>
  548. <script type="javascript" ev:event="DOMActivate">
  549. <![CDATA[
  550. var sCpgNo = model.getValue("/root/main/stepcond/cpgno");
  551. var sCpgHistSeq = model.getValue("/root/main/stepcond/cpghistseq");
  552. var sSetNo = model.getValue("/root/hidden/prmsprcpsetinfo/prmsprcpsetlist/setno");
  553. var sSetNm = model.getValue("/root/hidden/prmsprcpsetinfo/prmsprcpsetlist/setnm");
  554. var sSetSetTypeCd = model.getValue("/root/hidden/prmsprcpsetinfo/prmsprcpsetlist/settypecd");
  555. //폴더 선택 했는지 체크
  556. if( isNull(trv_promprcpset.value) || isNull(sSetNo) ){
  557. messageBox("등록할 선택필수 폴더를", "C002");
  558. return;
  559. }
  560. model.setValue("/root/main/stepcond/status", "I");
  561. model.setValue("/root/main/stepcond/cpgno", sCpgNo);
  562. model.setValue("/root/main/stepcond/cpghistseq", sCpgHistSeq);
  563. model.setValue("/root/main/stepcond/setno", sSetNo);
  564. model.setValue("/root/main/stepcond/settypecd", sSetSetTypeCd);
  565. model.setValue("/root/main/stepcond/inqrno", "0");
  566. model.setValue("/root/main/stepcond/qestno", "0");
  567. model.setValue("/root/main/stepcond/setnm", sSetNm);
  568. //저장할 정보
  569. model.makeNode("/root/send/essprcpsetinfo");
  570. model.copyNode("/root/send/essprcpsetinfo", "/root/main/stepcond");
  571. fSaveEssPrmsPrcpInfo();
  572. model.removeNodeset("/root/send/essprcpsetinfo");
  573. opener.window.javascript.fInitMainAttList("D"); //"필수처방 미발행사유 문진" 추가에 따른 재조회
  574. ]]>
  575. </script>
  576. </button>
  577. <bool id="bool1" checkvalue="Y,N" ref="/root/main/stepcond/issneedyn" style="left:74px; top:27px; width:20px; height:20px; ">
  578. <hint>
  579. <![CDATA[발행필수여부]]>
  580. </hint>
  581. </bool>
  582. <caption id="caption3" class="cell_1" style="left:0px; top:24px; width:70px; height:23px; ">발행필수</caption>
  583. <button id="btn_sizecntl" class="icon_left" style="left:0px; top:179px; width:26px; height:19px; ">
  584. <caption/>
  585. <script type="javascript" ev:event="DOMActivate">
  586. <![CDATA[
  587. fSizeControl_SetArray(); //btn_sizecntl.attribute("class") = "icon_right";
  588. ]]>
  589. </script>
  590. </button>
  591. <group id="grp_steplistno" style="left:75px; top:5px; width:120px; height:19px; ">
  592. <select id="chk_steplistno1" ref="/root/main/stepcond/steplistno" overflow="visible" appearance="full" rows="100" sep="," style="left:0px; top:0px; width:100px; height:90px; border-style:none; ">
  593. <choices>
  594. <itemset nodeset="/root/main/steplist/info">
  595. <label ref="stepnm"/>
  596. <value ref="stepno"/>
  597. </itemset>
  598. </choices>
  599. <script type="javascript" ev:event="xforms-value-changed">
  600. <![CDATA[
  601. /*var steplistno = model.getValue("/root/main/stepcond/steplistno");
  602. if(!isNull(steplistno)){
  603. if( steplistno.substr(0, 1) == "0" ){
  604. }else{
  605. }
  606. }*/
  607. ]]>
  608. </script>
  609. </select>
  610. </group>
  611. <group id="pop_steplistno" visibility="hidden" style="left:76px; top:70px; width:120px; height:105px; border-style:solid; ">
  612. <select id="chk_steplistno2" ref="/root/main/pop_steplist/pop_steplistno" overflow="visible" appearance="full" rows="100" sep="," style="left:0px; top:0px; width:100px; height:99px; border-style:none; ">
  613. <choices>
  614. <itemset nodeset="/root/main/steplist/info">
  615. <label ref="stepnm"/>
  616. <value ref="stepno"/>
  617. </itemset>
  618. </choices>
  619. <script type="javascript" ev:event="xforms-value-changed">
  620. <![CDATA[
  621. var deptcd_tmp = model.getValue("/root/main/pop_steplist/pop_steplistno").split(",");
  622. var deptnm_tmp = "";
  623. var multideptnmlist = "";
  624. for(var i=0; i < deptcd_tmp.length; i++){
  625. deptnm_tmp = model.getValue( "/root/main/steplist/info[stepno='"+deptcd_tmp[i]+"']/stepnm" );
  626. multideptnmlist = multideptnmlist + deptnm_tmp + ",";
  627. }
  628. multideptnmlist = multideptnmlist.substr(0, multideptnmlist.length-1);
  629. model.setValue("/root/main/pop_steplist/pop_steplistnm", multideptnmlist);
  630. ]]>
  631. </script>
  632. </select>
  633. </group>
  634. <button id="btn_steplistno" class="icon_minus" visibility="hidden" style="left:184px; top:53px; width:13px; height:15px; ">
  635. <caption/>
  636. <script type="javascript" ev:event="DOMActivate">
  637. <![CDATA[
  638. btn_steplistno.visible = false;
  639. pop_steplistno.visible = false;
  640. var iRow = grd_esslist.row;
  641. if( iRow > 0 ){
  642. model.setValue("/root/main/essprcpsetinfo/essprcpsetlist["+iRow+"]/steplistno", model.getValue("/root/main/pop_steplist/pop_steplistno"));
  643. model.setValue("/root/main/essprcpsetinfo/essprcpsetlist["+iRow+"]/steplistnm", model.getValue("/root/main/pop_steplist/pop_steplistnm"));
  644. model.setValue("/root/main/essprcpsetinfo/essprcpsetlist["+iRow+"]/status", "U");
  645. }
  646. grd_esslist.refresh();
  647. ]]>
  648. </script>
  649. </button>
  650. <button id="btn_stepscop" class="icon_plus" style="left:55px; top:5px; width:13px; height:15px; ">
  651. <caption/>
  652. <script type="javascript" ev:event="onclick">
  653. <![CDATA[
  654. if( btn_stepscop.attribute("class") == "icon_minus" ){
  655. grp_steplistno.attribute("height") = "19px";
  656. btn_stepscop.attribute("class") = "icon_plus";
  657. //btn_stepscop.refresh();
  658. }else{
  659. grp_steplistno.attribute("height") = "120px";
  660. btn_stepscop.attribute("class") = "icon_minus";
  661. }
  662. ]]>
  663. </script>
  664. </button>
  665. </group>
  666. <select1 id="rdo_srchcond3" ref="/root/init/srchcond3" visibility="hidden" appearance="full" cellspacing="10" cols="4" overflow="visible" style="left:11px; top:27px; width:155px; height:20px; border-style:none; ">
  667. <choices>
  668. <item>
  669. <label>약속처방</label>
  670. <value>P</value>
  671. </item>
  672. <item>
  673. <label>프로토콜</label>
  674. <value>C</value>
  675. </item>
  676. </choices>
  677. <script type="javascript" ev:event="xforms-value-changed">
  678. <![CDATA[
  679. model.resetInstanceNode("/root/temp/copy");
  680. var srchcond3 = model.getValue("/root/init/srchcond3");
  681. if(srchcond3 == "P"){
  682. model.setValue("/root/init/srchcond1", "P"); //개인으로 설정
  683. cmb_deptset.disabled = true;
  684. rdo_srchcond1.disabled = false;
  685. radio1.disabled = false;
  686. model.removeNodeset("/root/send/reqdata");
  687. model.makeValue("/root/send/reqdata/settypecd", "P"); //P는 의사, C는 프로토콜
  688. model.makeValue("/root/send/reqdata/setkindcd", "P"); //P는 개인, D는 부서
  689. model.makeValue("/root/send/reqdata/setclscd" , "D"); //의사 SET
  690. model.makeValue("/root/send/reqdata/ioflag", model.getValue("/root/init/srchcond4")); //외래입원구분
  691. model.setValue("/root/main/cond/deptcd", "");
  692. submit("TRMMB00601", false);
  693. }else if(srchcond3 == "C"){
  694. model.setValue("/root/init/srchcond1", "T"); //타과로 설정
  695. cmb_deptset.disabled = false;
  696. rdo_srchcond1.disabled = true;
  697. radio1.disabled = true;
  698. model.makeValue("/root/send/reqdata/setkindcd", "D"); //부서
  699. model.makeValue("/root/send/reqdata/setclscd" , "D"); //의사
  700. model.makeValue("/root/send/reqdata/settypecd", srchcond3); //처방, 프로토콜
  701. model.makeValue("/root/send/reqdata/procflag", "D"); //처리구분(D: 부서SET을 조회)
  702. model.makeValue("/root/send/reqdata/deptcd", getUserInfo("dutplcecd"));
  703. model.makeValue("/root/send/reqdata/deptnm", cmb_deptset.label);
  704. model.makeValue("/root/send/reqdata/ioflag", model.getValue("/root/init/srchcond4")); //외래입원구분
  705. submit("TRMMB00601");
  706. }
  707. model.refresh();
  708. model.setValue(trv_promprcpset.attribute("ref"), "");
  709. trv_promprcpset.rebuild();
  710. ]]>
  711. </script>
  712. </select1>
  713. <line id="line8" class="line_1" style="x1:0px; y1:53px; x2:375px; y2:53px; "/>
  714. <shape id="roundrect3" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:375px; height:30px; background-color:#fffbf2; border-color:#ffd799; "/>
  715. <datagrid id="grd_promprcplist" nodeset="/root/main/prcp/prcplist" scroll="auto" caption="^처방명^처방코드^총용량^총용량^수량^수량^횟수^일수^급비^용법검체^MIX^전달" colsep="^" colwidth="20, 176, 25, 40, 27, 37, 27, 40, 37, 70, 140, 38, 30" dataheight="25" ellipsis="true" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheight="25" rowsep="|" tooltip="true" style="left:177px; top:58px; width:199px; height:343px; text-align:center; ">
  716. <col checkvalue="I,-" ref="status" type="checkbox"/>
  717. <col ref="prcpnm" style="text-align:left; "/>
  718. <col ref="prcpcd" visibility="hidden"/>
  719. <col ref="prcpvol"/>
  720. <col ref="prcpvolunitnm"/>
  721. <col ref="prcpqty"/>
  722. <col ref="prcpqtyunitnm"/>
  723. <col ref="prcptims"/>
  724. <col ref="prcpdayno"/>
  725. <col disabled="true" ref="payflagcd" type="combo">
  726. <choices>
  727. <itemset nodeset="/root/init/payflagcd/M0029">
  728. <label ref="cdnm"/>
  729. <value ref="cdid"/>
  730. </itemset>
  731. </choices>
  732. </col>
  733. <col ref="drugmthdspccdnm" style="text-align:left; "/>
  734. <col ref="prcpmixno"/>
  735. <col ref="prcpdelivefact"/>
  736. <script type="javascript" ev:event="onmousedown">
  737. <![CDATA[
  738. fMouseRghtBtnPopupPrcp()
  739. ]]>
  740. </script>
  741. <script type="javascript" ev:event="ondblclick">
  742. <![CDATA[
  743. //if( grd_promprcplist.isCell(event.target) && grd_promprcplist.row >= grd_promprcplist.fixedRows ){
  744. if(isDataCell()){
  745. //hsct지시처방일 경우 약속set에서 copy되지 않도록. by sonjy 2008-08-29
  746. if( model.getValue ( "/root/main/prcp/prcplist[" + grd_promprcplist.row + "]/prcpclscd" ) == "04" ) {
  747. //messageBox("BMT지시처방은 지시처방검색을 통해서만 가능합니다", "I");
  748. //return ;
  749. }
  750. model.setValue ( "/root/main/prcp/prcplist[" + grd_promprcplist.row + "]/status", "I" );
  751. //model.refresh();
  752. addPrcp( "child", "/root/main/prcp/prcplist", "/root/main/prcp", "N", "status", "I", grd_promprcplist, "N", "02");
  753. }
  754. ]]>
  755. </script>
  756. <script type="javascript" ev:event="onclick">
  757. <![CDATA[
  758. if( grd_promprcplist.isCell(event.target) && grd_promprcplist.row >= grd_promprcplist.fixedRows ){
  759. if ( grd_promprcplist.col != 0 ) {
  760. if ( model.getValue ( "/root/main/prcp/prcplist["+ grd_promprcplist.row +"]/status" ) == "-" ) {
  761. model.setValue ( "/root/main/prcp/prcplist["+ grd_promprcplist.row +"]/status", "I" );
  762. } else {
  763. model.setValue ( "/root/main/prcp/prcplist["+ grd_promprcplist.row +"]/status", "-" );
  764. }
  765. }
  766. }
  767. model.refresh();
  768. ]]>
  769. </script>
  770. <script type="javascript" ev:event="onmouseup">
  771. <![CDATA[
  772. ]]>
  773. </script>
  774. </datagrid>
  775. <datagrid id="grd_promprcpset" nodeset="/root/main/set/promprcpset" caption="SET" colsep="^" colwidth="149" dataheight="23" ellipsis="true" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheight="23" rowsep="|" style="left:0px; top:58px; width:178px; height:403px; text-align:center; ">
  776. <col ref="setnm"/>
  777. </datagrid>
  778. <treeview id="trv_promprcpset" ref="/root/hidden/trv_value" dragmode="true" dropmode="true" expanddepth="1" fullrowselect="false" image="../../../com/commonweb/images/icon_folder_close.gif" itemsettype="depth" selectedimage="../../../com/commonweb/images/icon_folder_open.gif" style="left:0px; top:82px; width:177px; height:545px; border-color:#c7a3cf; border-style:solid; ">
  779. <script type="javascript" ev:event="onmousedown">
  780. <![CDATA[
  781. fMouseRghtBtnPopupSet();
  782. ]]>
  783. </script>
  784. <itemset nodeset="/root/main/prmsprcpsetinfo/prmsprcpsetlist">
  785. <label ref="setnm"/>
  786. <value ref="setno"/>
  787. <depth ref="levl"/>
  788. </itemset>
  789. <script type="javascript" ev:event="xforms-select">
  790. <![CDATA[
  791. //db click시 treeview 펼치기
  792. var indx = trv_promprcpset.selectedIndex;
  793. fReqPrmsDetlSet();
  794. model.makeValue("/root/hidden/prmsprcpsetinfo/prmsprcpsetlist/procflag", "D"); //@@타과 악속SET 조회
  795. model.makeValue("/root/hidden/prmsprcpsetinfo/prmsprcpsetlist/deptcd", "1000000000"); //@@타과 악속SET 조회
  796. model.makeValue("/root/hidden/prmsprcpsetinfo/prmsprcpsetlist/deptnm", "병원"); //@@타과 악속SET 조회
  797. trv_promprcpset.expand(indx, true);
  798. trv_promprcpset.refresh();
  799. opener.javascript.setParameter("SMMMO02300_selectindex" , trv_promprcpset.selectedIndex);
  800. opener.javascript.setParameter("SMMMO02300_scrnopenflag", "Y");
  801. if ( opener.model.getValue("/root/initsrch/envinfo[qestcd='008']/answvalnm") == "Y") {
  802. fCopyPrcpSets();
  803. }
  804. ]]>
  805. </script>
  806. </treeview>
  807. <group id="group1" style="left:6px; top:175px; width:164px; height:55px; background-color:#99ccff; border-color:#3366ff; border-style:solid; ">
  808. <caption id="caption4" style="left:5px; top:5px; width:41px; height:20px; font-weight:bold; vertical-align:middle; ">폴더명</caption>
  809. <input id="ipt_setnm" ref="/root/main/iptbox/setnm" class="input_default" style="left:55px; top:5px; width:104px; height:19px; border-color:#3366ff; border-style:solid; ">
  810. <script type="javascript" ev:event="onkeypress">
  811. <![CDATA[
  812. inputEnterKey("btn_cnfm", "DOMActivate");
  813. var keycode = event.keyCode;
  814. if(keycode == 27){
  815. group1.attribute("height") = 0;
  816. model.setFocus("trv_promprcpset");
  817. return;
  818. }
  819. ]]>
  820. </script>
  821. </input>
  822. <button id="btn_cnfm" class="btn2_letter2" style="left:73px; top:26px; width:42px; height:19px; ">
  823. <caption>확인</caption>
  824. <script type="javascript" ev:event="DOMActivate">
  825. <![CDATA[
  826. var indx = trv_promprcpset.selectedIndex;
  827. group1.attribute("height") = 0;
  828. model.setFocus("trv_promprcpset");
  829. model.refresh();
  830. fSavePrmsDiagSet();
  831. //폴더 저장 이후, 저장된 폴더에 focus를 주기
  832. //indx == 0인 경우는 최상위 폴더, treeview의 맨 마지막 폴더가 신규로 생성된 폴더이다.
  833. if(indx == 0){
  834. trv_promprcpset.select(trv_promprcpset.length - 1);
  835. //하위 폴더의 경우, 신규로 생성될 폴더의 부모폴더를 찾고 폴더를 펼친다.
  836. //하위 폴더의 마지막 폴더가 신규로 생성된 폴더(+haschilditem())이다.
  837. }else{
  838. var path = trv_promprcpset.getItemPath(indx, "/");
  839. var curindex = 0;
  840. var node;
  841. for(var j = 0; j < path.length; j++){
  842. if(path.charAt(j) == '/'){
  843. node = path.substring(curindex, j);
  844. curindex = j+1;
  845. trv_promprcpset.expand(labelToIndex(node, trv_promprcpset), true);
  846. }
  847. }
  848. var treeitem = trv_promprcpset.item(indx);
  849. trv_promprcpset.select(indx + treeitem.haschilditem());
  850. trv_promprcpset.expand(indx , true);
  851. }
  852. trv_promprcpset.refresh();
  853. //처방화면에서 폴더선택하지 않고 바로 등록을 처리한 경우(autoflag:Y)
  854. //신규로 생성된 폴더에 처방을 등록함
  855. if(model.getValue("/root/init/autoflag") == "Y"){
  856. fPrmsSave();
  857. model.setValue("/root/init/autoflag", "N");
  858. }
  859. ]]>
  860. </script>
  861. </button>
  862. <button id="button3" class="btn2_letter2" style="left:117px; top:26px; width:42px; height:19px; ">
  863. <caption>취소</caption>
  864. <script type="javascript" ev:event="DOMActivate">
  865. <![CDATA[
  866. group1.attribute("height") = 0;
  867. ]]>
  868. </script>
  869. </button>
  870. </group>
  871. <button id="btn_srchprcp" class="btn1_letter2" style="left:309px; top:4px; width:56px; height:22px; ">
  872. <caption>검색</caption>
  873. <script type="javascript" ev:event="DOMActivate">
  874. <![CDATA[
  875. var setnm = model.getValue("/root/main/cond/setnm");
  876. for(var i = 1; i <= trv_promprcpset.length; i++){
  877. var cmpsetnm = model.getValue("/root/main/prmsprcpsetinfo/prmsprcpsetlist[" + i + "]/setnm");
  878. if(setnm == cmpsetnm){
  879. break;
  880. }
  881. }
  882. var path = trv_promprcpset.getItemPath(i-1, "/");
  883. var curindex = 0;
  884. var node;
  885. for(var j = 0; j < path.length; j++){
  886. if(path.charAt(j) == '/'){
  887. node = path.substring(curindex, j);
  888. curindex = j+1;
  889. trv_promprcpset.expand(labelToIndex(node, trv_promprcpset), true);
  890. }
  891. }
  892. trv_promprcpset.select(i-1);
  893. ]]>
  894. </script>
  895. </button>
  896. <input id="ipt_srchsetnm" ref="/root/main/cond/setnm" style="left:135px; top:6px; width:156px; height:19px; ">
  897. <script type="javascript" ev:event="onkeypress">
  898. <![CDATA[
  899. inputEnterKey("btn_srchprcp", "DOMActivate");
  900. ]]>
  901. </script>
  902. </input>
  903. <select1 id="rdo_srchcond1" ref="/root/init/srchcond1" visibility="hidden" appearance="full" cellspacing="8" cols="3" overflow="visible" style="left:0px; top:30px; width:140px; height:20px; border-style:none; ">
  904. <choices>
  905. <item>
  906. <label>개인</label>
  907. <value>P</value>
  908. </item>
  909. <item>
  910. <label>과</label>
  911. <value>D</value>
  912. </item>
  913. <item>
  914. <label>타과</label>
  915. <value>T</value>
  916. </item>
  917. </choices>
  918. <script type="javascript" ev:event="xforms-value-changed">
  919. <![CDATA[
  920. radio1.disabled = false;
  921. var srchcond1 = model.getValue ( "/root/init/srchcond1" ); //P는 의사, D는 부서, C는 프로토콜(부서);
  922. if ( srchcond1 == "P" ) { //의사차벙(개인)
  923. cmb_deptset.disabled = true;
  924. model.setValue("/root/main/cond/deptcd", "");
  925. model.removeNodeset("/root/send/reqdata");
  926. model.makeValue("/root/send/reqdata/settypecd", "P"); //P는 의사, C는 프로토콜
  927. model.makeValue("/root/send/reqdata/setkindcd", "P"); //P는 개인, D는 부서
  928. model.makeValue("/root/send/reqdata/setclscd" , "D"); //의사 SET
  929. model.makeValue("/root/send/reqdata/ioflag", model.getValue("/root/init/srchcond4")); //외래입원구분
  930. submit("TRMMB00601", false);
  931. } else if ( srchcond1 == "D" ) { //의사처방(부서)
  932. cmb_deptset.disabled = true;
  933. model.removeNodeset("/root/send/reqdata");
  934. model.makeValue("/root/send/reqdata/settypecd", "P"); //P는 의사, C는 프로토콜
  935. model.makeValue("/root/send/reqdata/setkindcd", "D"); //P는 개인, D는 부서
  936. model.makeValue("/root/send/reqdata/setclscd" , "D"); //의사 SET
  937. model.makeValue("/root/send/reqdata/ioflag", model.getValue("/root/init/srchcond4")); //외래입원구분
  938. submit("TRMMB00601", false);
  939. } else if ( srchcond1 == "C" ) { //프로토콜 처방(부서)
  940. cmb_deptset.disabled = false;
  941. model.removeNodeset("/root/send/reqdata");
  942. model.makeValue("/root/send/reqdata/settypecd", "C"); //P는 의사, C는 프로토콜
  943. model.makeValue("/root/send/reqdata/setkindcd", "D"); //P는 개인, D는 부서
  944. model.makeValue("/root/send/reqdata/setclscd" , "D"); //의사 SET
  945. submit("TRMMB00601", false);
  946. } else if ( srchcond1 == "T" ) { //타과
  947. cmb_deptset.disabled = false;
  948. model.removeNodeset("/root/send/reqdata");
  949. model.makeValue("/root/send/reqdata/setkindcd", "D"); //부서
  950. model.makeValue("/root/send/reqdata/setclscd" , "D"); //의사
  951. model.makeValue("/root/send/reqdata/settypecd", "P"); //처방
  952. model.makeValue("/root/send/reqdata/ioflag", model.getValue("/root/init/srchcond4")); //외래입원구분
  953. model.removeNodeset("/root/main/prmsprcpsetinfo/prmsprcpsetlist");
  954. }
  955. model.removeNodeset ( "/root/main/prcp/prcplist" );
  956. model.refresh();
  957. model.setValue(trv_promprcpset.attribute("ref"), "");
  958. trv_promprcpset.rebuild();
  959. ]]>
  960. </script>
  961. </select1>
  962. <select1 id="cmb_deptset" ref="/root/main/cond/deptcd" visibility="hidden" appearance="minimal" style="left:11px; top:30px; width:155px; height:19px; ">
  963. <choices>
  964. <itemset nodeset="/root/init/orddept/dept">
  965. <label ref="depthngnm"/>
  966. <value ref="deptcd"/>
  967. </itemset>
  968. </choices>
  969. <script type="javascript" ev:event="xforms-value-changed">
  970. <![CDATA[
  971. var srchcond3 = model.getValue("/root/init/srchcond3");
  972. var deptcd = model.getValue("/root/main/prmsprcp/cond/deptcd");
  973. if(deptcd != "-"){
  974. model.removeNodeset("/root/send/reqdata");
  975. model.makeValue("/root/send/reqdata/setkindcd", "D"); //부서
  976. model.makeValue("/root/send/reqdata/setclscd" , "D"); //의사
  977. model.makeValue("/root/send/reqdata/settypecd", srchcond3); //처방, 프로토콜
  978. model.makeValue("/root/send/reqdata/procflag", "D"); //처리구분(D: 부서SET을 조회)
  979. model.makeValue("/root/send/reqdata/deptcd", model.getValue("/root/main/cond/deptcd"));
  980. model.makeValue("/root/send/reqdata/deptnm", cmb_deptset.label);
  981. model.makeValue("/root/send/reqdata/ioflag", model.getValue("/root/init/srchcond4"));
  982. submit("TRMMB00601");
  983. }
  984. model.setValue(trv_promprcpset.attribute("ref"), "");
  985. trv_promprcpset.rebuild();
  986. ]]>
  987. </script>
  988. </select1>
  989. <select1 id="radio1" ref="/root/init/srchcond4" appearance="full" cellspacing="8" cols="3" overflow="visible" style="left:10px; top:5px; width:110px; height:20px; border-style:none; ">
  990. <choices>
  991. <item>
  992. <label>외래</label>
  993. <value>O</value>
  994. </item>
  995. <item>
  996. <label>입원</label>
  997. <value>I</value>
  998. </item>
  999. </choices>
  1000. <script type="javascript" ev:event="xforms-value-changed">
  1001. <![CDATA[
  1002. var setkindcd = model.getValue("/root/init/srchcond1");
  1003. if(setkindcd == "T"){
  1004. setkindcd = "D";
  1005. }
  1006. model.removeNodeset("/root/send/reqdata");
  1007. model.makeValue("/root/send/reqdata/settypecd", opener.javascript.ivwPrcpUseFlag); //@@필수처방/약속처방모니터링
  1008. model.makeValue("/root/send/reqdata/setkindcd", "D"); //@@P는 개인, D는 부서
  1009. model.makeValue("/root/send/reqdata/setclscd" , "D"); //의사 SET
  1010. model.makeValue("/root/send/reqdata/procflag", "D"); //처리구분(D: 부서SET을 조회)
  1011. model.makeValue("/root/send/reqdata/deptcd", "1000000000");
  1012. model.makeValue("/root/send/reqdata/deptnm", "병원");
  1013. model.makeValue("/root/send/reqdata/ioflag", radio1.value); //외래입원구분
  1014. model.removeNodeset("/root/main/prmsprcpsetinfo/prmsprcpsetlist");
  1015. submit("TRMMB00601", false);
  1016. model.setValue(trv_promprcpset.attribute("ref"), "");
  1017. trv_promprcpset.rebuild();
  1018. ]]>
  1019. </script>
  1020. </select1>
  1021. <shape id="rectangle1" visibility="hidden" appearance="rectangle" style="left:5px; top:243px; width:165px; height:52px; color:#99ccff; background-color:#99ccff; "/>
  1022. <button id="button2" class="btn2_letter2" visibility="hidden" style="left:78px; top:270px; width:42px; height:19px; ">
  1023. <caption>확인</caption>
  1024. <script type="javascript" ev:event="DOMActivate">
  1025. <![CDATA[
  1026. var indx = trv_promprcpset.selectedIndex;
  1027. rectangle1.attribute("visibility") = "hidden";
  1028. caption1.attribute("visibility") = "hidden";
  1029. input1.attribute("visibility") = "hidden";
  1030. button2.attribute("visibility") = "hidden";
  1031. button4.attribute("visibility") = "hidden";
  1032. model.setFocus("trv_promprcpset");
  1033. model.refresh();
  1034. //약속처방 자동 저장시 부모폴더 번호 1을 설정해줘야함
  1035. model.setValue(sPRMSPRCPSETLIST_HIDDEN + "/status" , "i");
  1036. model.setValue(sPRMSPRCPSETLIST_HIDDEN + "/supsetno", 1);
  1037. fSavePrmsDiagSet();
  1038. //폴더 저장 이후, 저장된 폴더에 focus를 주기
  1039. //indx == 0인 경우는 최상위 폴더, treeview의 맨 마지막 폴더가 신규로 생성된 폴더이다.
  1040. if(indx == 0){
  1041. trv_promprcpset.select(trv_promprcpset.length - 1);
  1042. //하위 폴더의 경우, 신규로 생성될 폴더의 부모폴더를 찾고 폴더를 펼친다.
  1043. //하위 폴더의 마지막 폴더가 신규로 생성된 폴더(+haschilditem())이다.
  1044. }else{
  1045. var path = trv_promprcpset.getItemPath(indx, "/");
  1046. var curindex = 0;
  1047. var node;
  1048. for(var j = 0; j < path.length; j++){
  1049. if(path.charAt(j) == '/'){
  1050. node = path.substring(curindex, j);
  1051. curindex = j+1;
  1052. trv_promprcpset.expand(labelToIndex(node, trv_promprcpset), true);
  1053. }
  1054. }
  1055. var treeitem = trv_promprcpset.item(indx);
  1056. trv_promprcpset.select(indx + treeitem.haschilditem());
  1057. trv_promprcpset.expand(indx , true);
  1058. }
  1059. trv_promprcpset.refresh();
  1060. //처방화면에서 폴더선택하지 않고 바로 등록을 처리한 경우(autoflag:Y)
  1061. //신규로 생성된 폴더에 처방을 등록함
  1062. if(model.getValue("/root/init/autoflag") == "Y"){
  1063. fPrmsSave();
  1064. model.setValue("/root/init/autoflag", "N");
  1065. }
  1066. ]]>
  1067. </script>
  1068. </button>
  1069. <button id="button4" class="btn2_letter2" visibility="hidden" style="left:122px; top:270px; width:42px; height:19px; ">
  1070. <caption>취소</caption>
  1071. <script type="javascript" ev:event="DOMActivate">
  1072. <![CDATA[
  1073. rectangle1.attribute("visibility") = "hidden";
  1074. caption1.attribute("visibility") = "hidden";
  1075. input1.attribute("visibility") = "hidden";
  1076. button2.attribute("visibility") = "hidden";
  1077. button4.attribute("visibility") = "hidden";
  1078. model.setValue("/root/init/autoflag", "N");
  1079. trv_promprcpset.deselect();
  1080. model.refresh();
  1081. ]]>
  1082. </script>
  1083. </button>
  1084. <caption id="caption1" visibility="hidden" style="left:11px; top:250px; width:41px; height:20px; font-weight:bold; vertical-align:middle; ">폴더명</caption>
  1085. <input id="input1" ref="/root/main/iptbox/setnm" class="input_default" visibility="hidden" style="left:62px; top:248px; width:104px; height:19px; border-color:#3366ff; border-style:solid; ">
  1086. <script type="javascript" ev:event="onkeypress">
  1087. <![CDATA[
  1088. inputEnterKey("button2", "DOMActivate");
  1089. var keycode = event.keyCode;
  1090. if(keycode == 27){
  1091. rectangle1.attribute("visibility") = "hidden";
  1092. caption1.attribute("visibility") = "hidden";
  1093. input1.attribute("visibility") = "hidden";
  1094. button2.attribute("visibility") = "hidden";
  1095. button4.attribute("visibility") = "hidden";
  1096. model.setFocus("trv_promprcpset");
  1097. return;
  1098. }
  1099. ]]>
  1100. </script>
  1101. </input>
  1102. <button id="button26" class="btn2_letter4" style="left:177px; top:32px; width:64px; height:19px; ">
  1103. <caption>선택취소</caption>
  1104. <script type="javascript" ev:event="DOMActivate">
  1105. <![CDATA[
  1106. for ( i = 1; i < grd_promprcplist.rows; i++ ) {
  1107. model.setValue( "/root/main/prcp/prcplist[" + i + "]/status" ,"-");
  1108. }
  1109. model.refresh();
  1110. ]]>
  1111. </script>
  1112. </button>
  1113. <button id="button1" class="btn2_letter4" style="left:244px; top:32px; width:64px; height:19px; ">
  1114. <caption>상세보기</caption>
  1115. <script type="javascript" ev:event="DOMActivate">
  1116. <![CDATA[
  1117. fIvwDetlVwCom("prms");
  1118. ]]>
  1119. </script>
  1120. </button>
  1121. <button id="btn_copy" class="btn5_letter4" style="left:311px; top:32px; width:64px; height:19px; ">
  1122. <caption>처방복사</caption>
  1123. <script type="javascript" ev:event="DOMActivate">
  1124. <![CDATA[
  1125. fCopyPrcpSets();
  1126. ]]>
  1127. </script>
  1128. </button>
  1129. <button id="button31" class="btn2_letter4" style="left:110px; top:32px; width:64px; height:19px; ">
  1130. <caption>전체선택</caption>
  1131. <script type="javascript" ev:event="DOMActivate">
  1132. <![CDATA[
  1133. for ( i = 1; i < grd_promprcplist.rows; i++ ) {
  1134. model.setValue( "/root/main/prcp/prcplist[" + i + "]/status" ,"I");
  1135. }
  1136. model.refresh();
  1137. ]]>
  1138. </script>
  1139. </button>
  1140. </xhtml:body>
  1141. </xhtml:html>