SPZCS00301_ScreenMessage.xrw 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
  3. <xhtml:html xmlns:ex="http://www.comsquare.co.kr/xforms/excel" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:ms="urn:schemas-microsoft-com:xslt" xmlns:my="http://www.comsquare.co.kr/example" 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" xmlns:cs="http://www.comsquare.co.kr/xforms">
  4. <xhtml:head>
  5. <xhtml:title>검토결과 보기</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <codeList/>
  11. </main>
  12. <send>
  13. <req>
  14. <pScope>01</pScope>
  15. </req>
  16. <screen>
  17. </screen>
  18. <prcpdd/>
  19. <reqDDIM>
  20. <pCodeType/>
  21. <pMonograpCd/>
  22. </reqDDIM>
  23. </send>
  24. <init/>
  25. <hidden/>
  26. <temp>
  27. </temp>
  28. <screenMessageList>
  29. <정상처리여부/>
  30. <메세지유무/>
  31. <patientInfoList>
  32. <patientid/>
  33. <gender/>
  34. <age/>
  35. <brthdd/>
  36. <diseasecd/>
  37. <diseasenm/>
  38. </patientInfoList>
  39. <drugInofList>
  40. <currentyn/>
  41. <prcpdd/>
  42. <deptnm/>
  43. <ordusernm/>
  44. <firstordusernm/>
  45. <orddrugcd/>
  46. <orddrugnm/>
  47. <dosageonceqty/>
  48. <dosagedaycount/>
  49. <execstartdate/>
  50. </drugInofList>
  51. <screenResultList>
  52. <modulenm/>
  53. <sldesc/>
  54. <orddrugnm/>
  55. <scnmessage/>
  56. <resncd/>
  57. <resnnm/>
  58. <resncnts/>
  59. <difguid/>
  60. <moduleid/>
  61. <monograpid/>
  62. <처방식별키1/>
  63. <처방식별키2/>
  64. <처방식별키3/>
  65. <처방식별키4/>
  66. </screenResultList>
  67. </screenMessageList>
  68. <paminfo/>
  69. <telinfo>
  70. <srchgrupid>
  71. <initgrupid/>
  72. </srchgrupid>
  73. </telinfo>
  74. </root>
  75. </instance>
  76. <script type="javascript" ev:event="xforms-ready">
  77. <![CDATA[
  78. /*
  79. 화면을 초기화 합니다.
  80. */
  81. fInitialize();
  82. //submit("TRZCS00301");
  83. model.setValue("/root/send/prcpdd", model.getValue("/root/screenMessageList/drugInofList[1]/prcpdd"));
  84. submit("TRZCS09901");
  85. fCreateComboItemSet();
  86. //2009-10-27수정 var moduleID = model.getValue("/root/screenMessageList/screenResultList[1]/moduleid");
  87. var moduleID = model.getValue("/root/screenMessageList/screenResultList[1]/subgrup");
  88. fSetResnCodeList(moduleID);
  89. datagrid1.select(1,1) = true;
  90. //var vloc = model.getValue("/root/screenMessageList/patientInfoList[1]/loc");
  91. var vloc = opener.model.getValue ( "/root/paminfo/list/roomcd" );
  92. var vpid = model.getValue("/root/screenMessageList/patientInfoList[1]/patientid");
  93. var vhngnm = model.getValue("/root/screenMessageList/patientInfoList[1]/hngnm");
  94. var vgender = model.getValue("/root/screenMessageList/patientInfoList[1]/gender");
  95. var vage = model.getValue("/root/screenMessageList/patientInfoList[1]/age");
  96. output1.value ="병실:"+vloc+", 등록번호:"+vpid+", 환자명:"+vhngnm+", 성별/나이:"+vgender+"/"+vage;
  97. var vdiseasecd = model.getValue("/root/screenMessageList/patientInfoList[1]/diseasecd");
  98. var diseasenm = model.getValue("/root/screenMessageList/patientInfoList[1]/diseasenm");
  99. output2.value = " "+vdiseasecd+" "+diseasenm;
  100. output2.refresh();
  101. // 20091123 이남익 추가(전체 처방검토 모듈 Trace를 위한 instance)
  102. model.makeValue("/root/paminfo/list/roomcd", opener.model.getValue( "/root/paminfo/list/pid"));
  103. var rowCnt = datagrid1.rows;
  104. for(i=1; i<=rowCnt;i++){
  105. if("A"==model.getValue("/root/screenMessageList/screenResultList["+i+"]/defaulta")){
  106. model.makeValue("/root/screenMessageList/screenResultList["+i+"]/resncd","A");
  107. model.makeValue("/root/screenMessageList/screenResultList["+i+"]/resnnm", "사유 필요없음. (default)");
  108. datagrid1.refresh();
  109. }
  110. }
  111. datagrid1.mergecol(2)=false;
  112. datagrid1.mergecol(3)=false;
  113. datagrid1.mergecol(4)=false;
  114. datagrid1.mergecol(6)=false;
  115. datagrid1.mergecol(7)=false;
  116. datagrid1.mergecol(8)=false;
  117. datagrid1.mergecol(9)=false;
  118. datagrid1.mergecol(10)=false;
  119. datagrid1.mergecells="byrestriccol";
  120. datagrid1.refresh();
  121. ]]>
  122. </script>
  123. <submission id="TRZCS09901" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp"/>
  124. <submission id="TRZCS00301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/screen" resultref="/root/screenMessageList"/>
  125. <submission id="TXZCS00101"/>
  126. <submission id="TXZCS00102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp/result"/>
  127. <submission id="TRADB00001"/>
  128. </model>
  129. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  130. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  131. <script type="javascript" src="../../../com/referenceweb/js/ZCR001.js"/>
  132. <script type="javascript" src="../../../com/navigationweb/js/ZCN001.js"/>
  133. <script type="javascript" src="../../../ast/pharmacybaseweb/js/pharmacycombolist.js"/>
  134. <script type="javascript">
  135. <![CDATA[
  136. /*
  137. 초기화 작업을 합니다.
  138. */
  139. function fInitialize(){
  140. pharmacyGetCodeList( new Array("DUR1"), new Array("/root/telinfo/srchgrupid/initgrupid") );
  141. /*
  142. model.removeNodeset("/root/screenMessageList");
  143. grd_resultlist.refresh();
  144. */
  145. model.removenode("/root/telinfo/srchgrupid/initgrupid/DUR1[1]");
  146. }
  147. /*
  148. model.getValue(); 를 함수로 만들었습니다.
  149. param1 : node는 grid의 xPath입니다.
  150. param2 : row는 grid에서 선택한 row값입니다.
  151. param3 : element는 getvalue할 해당 element 명입니다.
  152. 해당 getvalue값을 return 해줍니다.
  153. return 하지 않으면 해당값을 가져올 수 없습니다.
  154. */
  155. function fGetValue(node, row, element) {
  156. var rtnValue = model.getValue(node + "[" + row + "]/" + element);
  157. return rtnValue;
  158. }
  159. function fCreateComboItemSet(){
  160. var node = instance1.selectNodes("/root/temp/codeList");
  161. var codeCnt = node.length;
  162. for(j=1; j<=codeCnt;j++){
  163. var moduleid = model.getValue("/root/temp/codeList["+j+"]/moduleid");
  164. var seq = model.getValue("/root/temp/codeList["+j+"]/seq");
  165. var modulenm = model.getValue("/root/temp/codeList["+j+"]/modulenm");
  166. var resncd = model.getValue("/root/temp/codeList["+j+"]/resncd");
  167. var resnnm = model.getValue("/root/temp/codeList["+j+"]/resnnm");
  168. var edityn = model.getValue("/root/temp/codeList["+j+"]/edityn");
  169. if(seq =="1"){
  170. var node = instance1.createNode("", "itemSet"+moduleid, ""); // 입력컨트롤의 입력값으로 createNode 수행
  171. var selnode = instance1.selectSingleNode("/root/main/codeList"); // 생성할 엘리먼트를 위치할 노드 선택함
  172. selnode.appendChild(node); // 생성한 엘리먼트를 선택한 노드의 하위에 적용함
  173. var att = instance1.createNode("attribute", "newAtt", ""); // createNode 메서드로 newAtt 라는 attribute node 를 생성함
  174. att.text = "style"; // 생성한 attribute 에 style 이라는 값을 설정
  175. var namedNodeMap = node.attributes; // 생성한 element node 의 attribute 리스트를 namedNodeMap 객체로 반환
  176. namedNodeMap.setNamedItem(att); // namedNodeMap 객체에 생성한 attribute 를 설정함
  177. }
  178. model.makeValue("/root/main/codeList/itemSet"+moduleid+"["+seq+"]/moduleid",moduleid);
  179. model.makeValue("/root/main/codeList/itemSet"+moduleid+"["+seq+"]/modulenm",modulenm);
  180. model.makeValue("/root/main/codeList/itemSet"+moduleid+"["+seq+"]/resncd",resncd);
  181. model.makeValue("/root/main/codeList/itemSet"+moduleid+"["+seq+"]/resnnm",resnnm);
  182. model.makeValue("/root/main/codeList/itemSet"+moduleid+"["+seq+"]/edityn",edityn);
  183. }
  184. }
  185. function fSetResnCodeList(param1){
  186. var resnNodeSet = "/root/main/codeList/itemSet"+ param1;
  187. datagrid3.nodeset = resnNodeSet;
  188. datagrid3.refresh();
  189. }
  190. function fCellDisabled(param1, param2){
  191. var colDisabledYN = "";
  192. var colDisabledCol = "";
  193. if(param2=="Y"){
  194. colDisabledYN = "true";
  195. colDisabledCol = "#f0f0f0"
  196. }else{
  197. colDisabledYN = "false";
  198. colDisabledCol = "#FFFFFF"
  199. }
  200. datagrid1.cellAttribute("disabled", param1, 9, param1, 9) = colDisabledYN;
  201. datagrid1.cellstyle("background-color", param1, 9, param1, 9) = colDisabledCol;
  202. }
  203. ]]>
  204. </script>
  205. </xhtml:head>
  206. <xhtml:body pagewidth="1100" pageheight="745" guideline="2,296;1,1200;2,779;" style="margin-left:0; margin-top:0; margin-right:0; margin-bottom:0; ">
  207. <line id="line1" class="line_1" style="x1:5px; y1:511px; x2:1080px; y2:511px; "/>
  208. <caption id="caption2" class="tit_2" style="left:5px; top:35px; width:70px; height:13px; ">검토결과</caption>
  209. <line id="line2" class="line_1" style="x1:5px; y1:50px; x2:1080px; y2:50px; "/>
  210. <button id="btn_save" class="btn4_letter4" style="left:1003px; top:718px; width:80px; height:22px; ">
  211. <caption>처방취소</caption>
  212. <script type="javascript" ev:event="DOMActivate">
  213. <![CDATA[
  214. //처방창에 취소플래그 리턴, 차현철, 2009-10-29
  215. opener.javascript.setParameter ( "SPZCS00301_rtn1", "N" );
  216. window.close();
  217. /* if ( submit("TXZCS00101") ) {
  218. datagrid1.clearStatus(); // submit() 성공하면 그리드의 i,u,d 상태 제거
  219. submit("TRZCS00101");
  220. } */
  221. ]]>
  222. </script>
  223. </button>
  224. <button id="button1" class="btn4_letter4" style="left:921px; top:718px; width:80px; height:22px; ">
  225. <caption>계속저장</caption>
  226. <script type="javascript" ev:event="DOMActivate">
  227. <![CDATA[
  228. var uPdatagrid1RowSize = datagrid1.rows
  229. var uPdatagrid4RowSize = datagrid4.rows
  230. for(i=1; i<uPdatagrid1RowSize; i++){
  231. var mappingID = datagrid1.valuematrix(i, 2) ;
  232. var resnseqNO = datagrid1.valuematrix(i, 3) ;
  233. var resnnm = datagrid1.valuematrix(i, 7) ;
  234. var resnCD = datagrid1.valuematrix(i, 8) ;
  235. var resncntsNM = datagrid1.valuematrix(i, 9) ;
  236. // var resncnts = datagrid1.valuematrix(i-1, 9) ;
  237. // var mappingID = model.getValue("/root/screenMessageList/screenResultList["+i+"]/mappingid");
  238. // var resnseqNO = model.getValue("/root/screenMessageList/screenResultList["+i+"]/resnseqno");
  239. // var resnCD = model.getValue("/root/screenMessageList/screenResultList["+i+"]/resncd");
  240. //사유명 null 오류로 수정함, 차현철, 2009-11-08
  241. //var resncntsNM = model.getValue("/root/screenMessageList/screenResultList["+i+"]/resncnts");
  242. //var resncntsNM = model.getValue("/root/screenMessageList/screenResultList["+i+"]/resnnm");
  243. if(resnCD==""){
  244. alert("사유입력 누락된 부분이 있습니다. 모듈명을 클릭후 사유 선택 하십시요.");
  245. return;
  246. }
  247. if(resnCD=="Z"&&resncntsNM==""){
  248. alert("스크린 사유를 기타(Z)로 선택한 경우 기타사유 항목이 누락 되었습니다. 기타사유 항목을 입력해 주세요...!!");
  249. return;
  250. }
  251. for(j=1;j<uPdatagrid4RowSize;j++){
  252. var mappingID4 = model.getValue("/root/screenMessageList/screenRenList["+j+"]/mappingid");
  253. var resnseqNO4 = model.getValue("/root/screenMessageList/screenRenList["+j+"]/resnseqno")
  254. if(mappingID==mappingID4 &&resnseqNO==resnseqNO4){
  255. model.makeValue("/root/screenMessageList/screenRenList["+j+"]/resncd",resnCD);
  256. if(resnCD=="Z"){
  257. model.makeValue("/root/screenMessageList/screenRenList["+j+"]/resncnts", resncntsNM);
  258. }else{
  259. model.makeValue("/root/screenMessageList/screenRenList["+j+"]/resncnts", resnnm);
  260. }
  261. model.makeValue("/root/screenMessageList/screenRenList["+j+"]/pid", opener.model.getValue( "/root/paminfo/list/pid"));
  262. if (opener.model.getValue( "/root/paminfo/list/ioflag") == "O" || opener.model.getValue( "/root/paminfo/list/ioflag") == "S" ) {
  263. model.makeValue("/root/screenMessageList/screenRenList["+j+"]/orddd", opener.model.getValue( "/root/paminfo/list/orddd"));
  264. } else {
  265. model.makeValue("/root/screenMessageList/screenRenList["+j+"]/orddd", opener.model.getValue( "/root/paminfo/list/indd"));
  266. }
  267. model.makeValue("/root/screenMessageList/screenRenList["+j+"]/cretno", opener.model.getValue( "/root/paminfo/list/cretno"));
  268. model.makeValue("/root/screenMessageList/screenRenList["+j+"]/ordtype", opener.model.getValue( "/root/paminfo/list/ioflag"));
  269. model.makeValue("/root/screenMessageList/screenRenList["+j+"]/orddeptcd", opener.model.getValue( "/root/paminfo/list/orddeptcd"));
  270. model.makeValue("/root/screenMessageList/screenRenList["+j+"]/resnflag", "P");
  271. model.makeValue("/root/screenMessageList/screenRenList["+j+"]/lastupdtrid", getUserInfo("userid"));
  272. }
  273. }
  274. }
  275. /*
  276. if(!checkGridUpdate(datagrid1))
  277. {
  278. alert("개발진행중.");
  279. return;
  280. }
  281. if ( submit("TXZCS00101") ) {
  282. datagrid1.clearStatus(); // submit() 성공하면 그리드의 i,u,d 상태 제거
  283. submit("TRZCS00101");
  284. }
  285. */
  286. //처방입력사유저장, 차현철, 2009-11-07
  287. var ResnInfoHeader = "instcd▦pid▦orddd▦cretno▦ordtype▦orddeptcd▦prcpdd▦prcpno▦prcphistno▦resnflag▦resncd▦resncnts▦lastupdtrid▦resnseqno▩";
  288. var ResnInfoData = "";
  289. for (var i = 1; i<= getNodesetCount("/root/screenMessageList/screenRenList"); i++) {
  290. ResnInfoData += model.getValue("/root/screenMessageList/screenRenList["+i+"]/instcd")
  291. + "▦" + model.getValue("/root/screenMessageList/screenRenList["+i+"]/pid")
  292. + "▦" + model.getValue("/root/screenMessageList/screenRenList["+i+"]/orddd")
  293. + "▦" + model.getValue("/root/screenMessageList/screenRenList["+i+"]/cretno")
  294. + "▦" + model.getValue("/root/screenMessageList/screenRenList["+i+"]/ordtype")
  295. + "▦" + model.getValue("/root/screenMessageList/screenRenList["+i+"]/orddeptcd")
  296. + "▦" + model.getValue("/root/screenMessageList/screenRenList["+i+"]/prcpdd")
  297. + "▦" + model.getValue("/root/screenMessageList/screenRenList["+i+"]/prcpno")
  298. + "▦" + model.getValue("/root/screenMessageList/screenRenList["+i+"]/prcphistno")
  299. + "▦" + model.getValue("/root/screenMessageList/screenRenList["+i+"]/mappingid")
  300. + "▦" + model.getValue("/root/screenMessageList/screenRenList["+i+"]/resncd")
  301. + "▦" + model.getValue("/root/screenMessageList/screenRenList["+i+"]/resncnts")
  302. + "▦" + model.getValue("/root/screenMessageList/screenRenList["+i+"]/lastupdtrid")
  303. + "▦" + model.getValue("/root/screenMessageList/screenRenList["+i+"]/resnseqno")
  304. + "▩";
  305. }
  306. model.makeValue("/root/send/resninfo", ResnInfoHeader + ResnInfoData);
  307. //처방창에 저장완료플래그 리턴 후 화면 종료, 차현철, 2009-10-29
  308. if(submit("TXZCS00102")) {
  309. opener.javascript.setParameter ( "SPZCS00301_rtn1", "Y" );
  310. } else {
  311. opener.javascript.setParameter ( "SPZCS00301_rtn1", "N" );
  312. }
  313. window.close();
  314. ]]>
  315. </script>
  316. </button>
  317. <datagrid id="datagrid3" autoresize="true" caption="모듈명^선택^코드^상세사유^모듈ID^입력가능여부" colsep="^" colwidth="128, 34, 48, 782, 0, 0" ellipsis="true" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:5px; top:330px; width:1075px; height:155px; ">
  318. <col ref="modulenm"/>
  319. <col editable="false" ref="chk" type="inputbutton" visibility="hidden"/>
  320. <col ref="resncd" style="text-align:center; "/>
  321. <col ref="resnnm"/>
  322. <col ref="moduleid" visibility="hidden"/>
  323. <col ref="edityn" visibility="hidden"/>
  324. <script type="javascript" ev:event="ondblclick">
  325. <![CDATA[
  326. var rcnt = (datagrid3.row);
  327. var pScope = model.getValue("/root/send/req/pScope");
  328. var resnCD = datagrid3.valuematrix(datagrid3.row, 3) ;
  329. var resnNM = datagrid3.valuematrix(datagrid3.row, 4) ;
  330. var moduleID = datagrid3.valuematrix(datagrid3.row, 5) ;
  331. var editYN = datagrid3.valuematrix(datagrid3.row, 6) ;
  332. var uPdatagridRow = datagrid1.row
  333. var uPdatagridRowSize = datagrid1.rows
  334. // alert("[moduleID:"+moduleID+"] [resnCD:"+resnCD+"] [resnNM:"+resnNM+"] [pScope:"+pScope+"] [uPdatagridRow:"+uPdatagridRow+"]");
  335. if (pScope == "01"){ // 모듈 일괄사유등록
  336. for(i=1; i<=uPdatagridRowSize; i++){
  337. //2009-10-27수정 if(moduleID == model.getValue("/root/screenMessageList/screenResultList["+i+"]/moduleid")){
  338. if(moduleID == model.getValue("/root/screenMessageList/screenResultList["+i+"]/subgrup")){
  339. model.makeValue("/root/screenMessageList/screenResultList["+i+"]/resncd",resnCD);
  340. model.makeValue("/root/screenMessageList/screenResultList["+i+"]/resnnm", resnNM);
  341. if(editYN=="Y"){
  342. fCellDisabled(i, "N");
  343. }else{
  344. fCellDisabled(i, "N");
  345. model.makeValue("/root/screenMessageList/screenResultList["+i+"]/resncnts", "");
  346. }
  347. }
  348. }
  349. }
  350. else if(pScope == "02"){ // 개별사유등록
  351. model.makeValue("/root/screenMessageList/screenResultList["+uPdatagridRow+"]/resncd",resnCD);
  352. model.makeValue("/root/screenMessageList/screenResultList["+uPdatagridRow+"]/resnnm", resnNM);
  353. if(editYN=="Y"){
  354. fCellDisabled(uPdatagridRow, "N");
  355. }else{
  356. fCellDisabled(uPdatagridRow, "N");
  357. model.makeValue("/root/screenMessageList/screenResultList["+uPdatagridRow+"]/resncnts", "");
  358. }
  359. }
  360. datagrid1.refresh();
  361. ]]>
  362. </script>
  363. <script type="javascript" ev:event="onbuttonclick">
  364. <![CDATA[
  365. var rcnt = (datagrid3.row);
  366. var pScope = model.getValue("/root/send/req/pScope");
  367. var resnCD = datagrid3.valuematrix(datagrid3.row, 3) ;
  368. var resnNM = datagrid3.valuematrix(datagrid3.row, 4) ;
  369. var moduleID = datagrid3.valuematrix(datagrid3.row, 5) ;
  370. var editYN = datagrid3.valuematrix(datagrid3.row, 6) ;
  371. var uPdatagridRow = datagrid1.row
  372. var uPdatagridRowSize = datagrid1.rows
  373. // alert("[moduleID:"+moduleID+"] [resnCD:"+resnCD+"] [resnNM:"+resnNM+"] [pScope:"+pScope+"] [uPdatagridRow:"+uPdatagridRow+"]");
  374. if (pScope == "01"){ // 모듈 일괄사유등록
  375. for(i=1; i<=uPdatagridRowSize; i++){
  376. //2009-10-27수정 if(moduleID == model.getValue("/root/screenMessageList/screenResultList["+i+"]/moduleid")){
  377. if(moduleID == model.getValue("/root/screenMessageList/screenResultList["+i+"]/subgrup")){
  378. model.makeValue("/root/screenMessageList/screenResultList["+i+"]/resncd",resnCD);
  379. model.makeValue("/root/screenMessageList/screenResultList["+i+"]/resnnm", resnNM);
  380. if(editYN=="Y"){
  381. fCellDisabled(i, "N");
  382. }else{
  383. fCellDisabled(i, "N");
  384. model.makeValue("/root/screenMessageList/screenResultList["+i+"]/resncnts", "");
  385. }
  386. }
  387. }
  388. }
  389. else if(pScope == "02"){ // 개별사유등록
  390. model.makeValue("/root/screenMessageList/screenResultList["+uPdatagridRow+"]/resncd",resnCD);
  391. model.makeValue("/root/screenMessageList/screenResultList["+uPdatagridRow+"]/resnnm", resnNM);
  392. if(editYN=="Y"){
  393. fCellDisabled(uPdatagridRow, "N");
  394. }else{
  395. fCellDisabled(uPdatagridRow, "N");
  396. model.makeValue("/root/screenMessageList/screenResultList["+uPdatagridRow+"]/resncnts", "");
  397. }
  398. }
  399. datagrid1.refresh();
  400. ]]>
  401. </script>
  402. </datagrid>
  403. <caption id="caption3" class="tit_2" autoresize="true" style="left:5px; top:310px; width:760px; height:13px; ">사유선택 (더블 클릭시 사유를 입력할 수 있습니다.)</caption>
  404. <line id="line3" class="line_1" style="x1:5px; y1:325px; x2:1080px; y2:325px; "/>
  405. <select1 id="rdo_pScope" ref="/root/send/req/pScope" class="radio_search" visibility="visible" appearance="full" cols="2" itemwidth="120" overflow="visible" style="left:859px; top:307px; width:220px; height:15px; border-style:none; ">
  406. <choices>
  407. <item>
  408. <label>동일모듈일괄입력</label>
  409. <value>01</value>
  410. </item>
  411. <item>
  412. <label>결과별사유입력</label>
  413. <value>02</value>
  414. </item>
  415. </choices>
  416. </select1>
  417. <caption id="caption8" class="search_name" style="left:775px; top:307px; width:86px; height:17px; ">적용범위 :</caption>
  418. <button id="button2" class="btn2_letter10" style="left:950px; top:30px; width:130px; height:19px; ">
  419. <caption>처방검토결과(전체)</caption>
  420. <script type="javascript" ev:event="DOMActivate">
  421. <![CDATA[
  422. modal("../../screenweb/xrw/SPZCS00501_DurMessage", "", "", "", "SPZCS00501","/root/screenMessageList/otherInfoList","/root/send/screen");
  423. ]]>
  424. </script>
  425. </button>
  426. <button id="button4" class="btn4_letter4" style="left:1000px; top:2px; width:80px; height:22px; ">
  427. <caption>처방취소</caption>
  428. <script type="javascript" ev:event="DOMActivate">
  429. <![CDATA[
  430. //처방창에 취소플래그 리턴, 차현철, 2009-10-29
  431. opener.javascript.setParameter ( "SPZCS00301_rtn1", "N" );
  432. window.close();
  433. /* if ( submit("TXZCS00101") ) {
  434. datagrid1.clearStatus(); // submit() 성공하면 그리드의 i,u,d 상태 제거
  435. submit("TRZCS00101");
  436. } */
  437. ]]>
  438. </script>
  439. </button>
  440. <datagrid id="datagrid2" nodeset="/root/screenMessageList/drugInofList" autoresize="true" caption="현처방^처방일^진료부서^주치의^처방의^약품코드^약품명^총용량^총용량^수량^수량^횟수^일수^투여시작일" colsep="^" colwidth="48, 75, 90, 50, 50, 90, 313, 45, 45, 40, 35, 40, 40, 85" ellipsis="true" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:5px; top:515px; width:1075px; height:200px; ">
  441. <col ref="currentordflag" style="text-align:center; "/>
  442. <col ref="prcpdd" style="text-align:center; "/>
  443. <col ref="deptnm" style="text-align:center; "/>
  444. <col ref="ordusernm" style="text-align:center; "/>
  445. <col ref="firstordusernm" style="text-align:center; "/>
  446. <col ref="orddrugcd"/>
  447. <col ref="orddrugnm"/>
  448. <col ref="sumcntsvol" style="text-align:right; "/>
  449. <col ref="cntsunit" style="text-align:right; "/>
  450. <col ref="dosageoriginonceqty" style="text-align:right; "/>
  451. <col ref="dosageunit" style="text-align:right; "/>
  452. <col ref="dosageonedayfrq" style="text-align:right; "/>
  453. <col ref="dosagedaycount" style="text-align:right; "/>
  454. <col ref="execstartdate" style="text-align:center; "/>
  455. <script type="javascript" ev:event="ondblclick">
  456. <![CDATA[
  457. var selectedrow = (datagrid2.row );
  458. if(0 == selectedrow){return;}
  459. var param1 = model.getValue("/root/screenMessageList/drugInofList["+selectedrow+"]/orddrugcd");
  460. model.makeValue("/root/difParam/pYakpumCd", param1);
  461. window.load("../../../com/navigationweb/xrw/SMZCN00301_Opener.xrw","modal","","","/root/difParam","/root/resultParam");
  462. ]]>
  463. </script>
  464. </datagrid>
  465. <button id="button7" class="icon_top" style="left:85px; top:29px; width:26px; height:19px; ">
  466. <caption/>
  467. <script type="javascript" ev:event="DOMActivate">
  468. <![CDATA[
  469. datagrid1.attribute("height") = 245;
  470. datagrid1.refresh();
  471. datagrid3.attribute("top") = 330;
  472. datagrid3.attribute("height") = 155;
  473. caption3.attribute("top") = 310;
  474. line3.attribute("y1") = 325;
  475. line3.attribute("y2") = 325;
  476. caption8.attribute("top") = 307;
  477. rdo_pScope.attribute("top") = 307;
  478. caption1.attribute("top") = 495;
  479. button5.attribute("top") = 490;
  480. button6.attribute("top") = 490;
  481. line1.attribute("y1") = 511;
  482. line1.attribute("y2") = 511;
  483. datagrid2.attribute("top") = 515;
  484. caption1.visible = true;
  485. button5.visible = true;
  486. button6.visible = true;
  487. line1.visible = true;
  488. datagrid2.visible = true;
  489. //top:130px; width:1075px; height:245px;
  490. //datagrid2.attribute("top") = 10;
  491. //datagrid2.attribute("top") = 10;
  492. //datagrid2.attribute("top") = 10;
  493. ]]>
  494. </script>
  495. </button>
  496. <button id="button8" class="icon_bottom" style="left:110px; top:29px; width:26px; height:19px; ">
  497. <caption/>
  498. <script type="javascript" ev:event="DOMActivate">
  499. <![CDATA[
  500. datagrid1.attribute("height") = 430;
  501. datagrid1.refresh();
  502. datagrid3.attribute("top") =330 + 185;
  503. datagrid3.attribute("height") = 155 + 45;
  504. caption3.attribute("top") = 310 + 185;
  505. line3.attribute("y1") = 325 + 185;
  506. line3.attribute("y2") = 325 + 185;
  507. caption8.attribute("top") = 307 + 185;
  508. rdo_pScope.attribute("top") = 307 + 185;
  509. caption1.attribute("top") = 495 + 185;
  510. button5.attribute("top") = 490 + 185;
  511. button6.attribute("top") = 490 + 185;
  512. line1.attribute("y1") = 511 + 185;
  513. line1.attribute("y2") = 511 + 185;
  514. datagrid2.attribute("top") = 515 + 185;
  515. caption1.visible=false;
  516. button5.visible = false;
  517. button6.visible = false;
  518. line1.visible = false;
  519. datagrid2.visible = false;
  520. //datagrid2.attribute("top") = 10;
  521. //datagrid2.attribute("top") = 10;
  522. //datagrid2.attribute("top") = 10;
  523. ]]>
  524. </script>
  525. </button>
  526. <caption id="caption1" class="tit_2" autoresize="true" style="left:5px; top:495px; width:1075px; height:13px; background-color:#ffffff; border-color:#ffffff; border-style:solid; ">약물복용정보 (약제를 더블 클릭 시 약품정보를 볼 수 있습니다.)</caption>
  527. <button id="button5" class="icon_top" style="left:410px; top:490px; width:26px; height:19px; ">
  528. <caption/>
  529. <script type="javascript" ev:event="DOMActivate">
  530. <![CDATA[
  531. datagrid2.attribute("top") = 330;
  532. datagrid2.attribute("height") = 385;
  533. button5.attribute("top") = 304;
  534. button6.attribute("top") = 304;
  535. caption1.attribute("top") = 309;
  536. datagrid2.refresh();
  537. ]]>
  538. </script>
  539. </button>
  540. <button id="button6" class="icon_bottom" style="left:435px; top:490px; width:26px; height:19px; ">
  541. <caption/>
  542. <script type="javascript" ev:event="DOMActivate">
  543. <![CDATA[
  544. datagrid2.attribute("top") = 515;
  545. datagrid2.attribute("height") = 200;
  546. button5.attribute("top") = 490;
  547. button6.attribute("top") = 490;
  548. caption1.attribute("top") = 495;
  549. datagrid2.refresh();
  550. ]]>
  551. </script>
  552. </button>
  553. <output id="output1" style="left:6px; top:5px; width:454px; height:19px; font-weight:bold; "/>
  554. <caption id="caption4" class="cell_1" style="left:470px; top:6px; width:87px; height:18px; font-family:돋움; vertical-align:middle; ">진단정보</caption>
  555. <button id="button61" class="icon_search" style="left:535px; top:7px; width:16px; height:16px; ">
  556. <caption/>
  557. <script type="javascript" ev:event="DOMActivate">
  558. <![CDATA[
  559. modal("SPZCS00601", "1","150", "150", "SPZCS00601", "/root/screenMessageList", "/root/screenMessageList");
  560. ]]>
  561. </script>
  562. </button>
  563. <output id="output2" style="left:557px; top:6px; width:349px; height:19px; border-color:#3366ff; border-width:1px; border-style:solid; "/>
  564. <caption id="caption5" ref="/root/telinfo/srchgrupid/initgrupid/DUR1/cdnm" class="tit_2" autoresize="true" style="left:6px; top:725px; width:284px; height:13px; background-color:#ffffff; border-color:#ffffff; border-style:solid; "/>
  565. <datagrid id="datagrid1" nodeset="/root/screenMessageList/screenResultList" autoresize="true" caption="모듈명^모듈맵핑코드^SEQ^등급^처방내용^결과내용^사유명^사유코드^기타사유^상세정보" colsep="^" colwidth="93, 0, 0, 91, 340, 251, 100, 0, 100, 55" ellipsis="true" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:5px; top:55px; width:1075px; height:245px; ">
  566. <col ref="modulenm"/>
  567. <col ref="mappingid" visibility="hidden"/>
  568. <col ref="resnseqno" visibility="hidden"/>
  569. <col ref="sldesc"/>
  570. <col ref="orddrugnm"/>
  571. <col ref="scnmessage"/>
  572. <col ref="resnnm"/>
  573. <col ref="resncd" visibility="hidden"/>
  574. <col disabled="false" ref="resncnts" type="input" style="color:transparent; background-color:#f0f0f0; border-color:#ff0000; border-left-style:none; "/>
  575. <col editable="false" ref="monograpnm" type="inputbutton" style="text-align:right; "/>
  576. <script type="javascript" ev:event="onclick">
  577. <![CDATA[
  578. var rcnt = (datagrid1.row);
  579. //2009-10-27 수정 var moduleID = model.getValue("/root/screenMessageList/screenResultList["+rcnt+"]/moduleid");
  580. var moduleID = model.getValue("/root/screenMessageList/screenResultList["+rcnt+"]/subgrup");
  581. fSetResnCodeList(moduleID);
  582. ]]>
  583. </script>
  584. <script type="javascript" ev:event="onbuttonclick">
  585. <![CDATA[
  586. var rcnt = (datagrid1.row);
  587. var pMonograpCd = model.getValue("root/screenMessageList/screenResultList["+rcnt+"]/monograpid");
  588. var vModuleID = model.getValue("root/screenMessageList/screenResultList["+rcnt+"]/moduleid");
  589. if (pMonograpCd!=""){
  590. model.setValue("/root/send/reqDDIM/pMonograpCd",pMonograpCd);
  591. if (vModuleID=="I"){
  592. model.setValue("/root/send/reqDDIM/pCodeType", '14');
  593. modal("../../referenceweb/xrw/SPZCR00201", "", "", "", "SPZCR00201","/root/send/reqDDIM","/root/send/reqDDIM");
  594. }
  595. else if(vModuleID=="W"){
  596. model.setValue("/root/send/reqDDIM/pCodeType", '16');
  597. modal("../../referenceweb/xrw/SPZCR00201", "", "", "", "SPZCR00201","/root/send/reqDDIM","/root/send/reqDDIM");
  598. }
  599. }
  600. ]]>
  601. </script>
  602. </datagrid>
  603. <button id="button3" class="btn4_letter4" style="left:918px; top:2px; width:80px; height:22px; ">
  604. <caption>계속저장</caption>
  605. <script type="javascript" ev:event="DOMActivate">
  606. <![CDATA[
  607. var uPdatagrid1RowSize = datagrid1.rows
  608. var uPdatagrid4RowSize = datagrid4.rows
  609. for(i=1; i<uPdatagrid1RowSize; i++){
  610. var mappingID = datagrid1.valuematrix(i, 2) ;
  611. var resnseqNO = datagrid1.valuematrix(i, 3) ;
  612. var resnnm = datagrid1.valuematrix(i, 7) ;
  613. var resnCD = datagrid1.valuematrix(i, 8) ;
  614. var resncntsNM = datagrid1.valuematrix(i, 9) ;
  615. // var resncnts = datagrid1.valuematrix(i-1, 9) ;
  616. // var mappingID = model.getValue("/root/screenMessageList/screenResultList["+i+"]/mappingid");
  617. // var resnseqNO = model.getValue("/root/screenMessageList/screenResultList["+i+"]/resnseqno");
  618. // var resnCD = model.getValue("/root/screenMessageList/screenResultList["+i+"]/resncd");
  619. //사유명 null 오류로 수정함, 차현철, 2009-11-08
  620. //var resncntsNM = model.getValue("/root/screenMessageList/screenResultList["+i+"]/resncnts");
  621. //var resncntsNM = model.getValue("/root/screenMessageList/screenResultList["+i+"]/resnnm");
  622. if(resnCD==""){
  623. alert("사유입력 누락된 부분이 있습니다. 모듈명을 클릭후 사유 선택 하십시요.");
  624. return;
  625. }
  626. if(resnCD=="Z"&&resncntsNM==""){
  627. alert("스크린 사유를 기타(Z)로 선택한 경우 기타사유 항목이 누락 되었습니다. 기타사유 항목을 입력해 주세요...!!");
  628. return;
  629. }
  630. for(j=1;j<uPdatagrid4RowSize;j++){
  631. var mappingID4 = model.getValue("/root/screenMessageList/screenRenList["+j+"]/mappingid");
  632. var resnseqNO4 = model.getValue("/root/screenMessageList/screenRenList["+j+"]/resnseqno")
  633. if(mappingID==mappingID4 &&resnseqNO==resnseqNO4){
  634. model.makeValue("/root/screenMessageList/screenRenList["+j+"]/resncd",resnCD);
  635. if(resnCD=="Z"){
  636. model.makeValue("/root/screenMessageList/screenRenList["+j+"]/resncnts", resncntsNM);
  637. }else{
  638. model.makeValue("/root/screenMessageList/screenRenList["+j+"]/resncnts", resnnm);
  639. }
  640. model.makeValue("/root/screenMessageList/screenRenList["+j+"]/pid", opener.model.getValue( "/root/paminfo/list/pid"));
  641. if (opener.model.getValue( "/root/paminfo/list/ioflag") == "O" ) {
  642. model.makeValue("/root/screenMessageList/screenRenList["+j+"]/orddd", opener.model.getValue( "/root/paminfo/list/orddd"));
  643. } else {
  644. model.makeValue("/root/screenMessageList/screenRenList["+j+"]/orddd", opener.model.getValue( "/root/paminfo/list/indd"));
  645. }
  646. model.makeValue("/root/screenMessageList/screenRenList["+j+"]/cretno", opener.model.getValue( "/root/paminfo/list/cretno"));
  647. model.makeValue("/root/screenMessageList/screenRenList["+j+"]/ordtype", opener.model.getValue( "/root/paminfo/list/ioflag"));
  648. model.makeValue("/root/screenMessageList/screenRenList["+j+"]/orddeptcd", opener.model.getValue( "/root/paminfo/list/orddeptcd"));
  649. model.makeValue("/root/screenMessageList/screenRenList["+j+"]/resnflag", "P");
  650. model.makeValue("/root/screenMessageList/screenRenList["+j+"]/lastupdtrid", getUserInfo("userid"));
  651. }
  652. }
  653. }
  654. /*
  655. if(!checkGridUpdate(datagrid1))
  656. {
  657. alert("개발진행중.");
  658. return;
  659. }
  660. if ( submit("TXZCS00101") ) {
  661. datagrid1.clearStatus(); // submit() 성공하면 그리드의 i,u,d 상태 제거
  662. submit("TRZCS00101");
  663. }
  664. */
  665. //처방입력사유저장, 차현철, 2009-11-07
  666. var ResnInfoHeader = "instcd▦pid▦orddd▦cretno▦ordtype▦orddeptcd▦prcpdd▦prcpno▦prcphistno▦resnflag▦resncd▦resncnts▦lastupdtrid▦resnseqno▩";
  667. var ResnInfoData = "";
  668. for (var i = 1; i<= getNodesetCount("/root/screenMessageList/screenRenList"); i++) {
  669. ResnInfoData += model.getValue("/root/screenMessageList/screenRenList["+i+"]/instcd")
  670. + "▦" + model.getValue("/root/screenMessageList/screenRenList["+i+"]/pid")
  671. + "▦" + model.getValue("/root/screenMessageList/screenRenList["+i+"]/orddd")
  672. + "▦" + model.getValue("/root/screenMessageList/screenRenList["+i+"]/cretno")
  673. + "▦" + model.getValue("/root/screenMessageList/screenRenList["+i+"]/ordtype")
  674. + "▦" + model.getValue("/root/screenMessageList/screenRenList["+i+"]/orddeptcd")
  675. + "▦" + model.getValue("/root/screenMessageList/screenRenList["+i+"]/prcpdd")
  676. + "▦" + model.getValue("/root/screenMessageList/screenRenList["+i+"]/prcpno")
  677. + "▦" + model.getValue("/root/screenMessageList/screenRenList["+i+"]/prcphistno")
  678. + "▦" + model.getValue("/root/screenMessageList/screenRenList["+i+"]/mappingid")
  679. + "▦" + model.getValue("/root/screenMessageList/screenRenList["+i+"]/resncd")
  680. + "▦" + model.getValue("/root/screenMessageList/screenRenList["+i+"]/resncnts")
  681. + "▦" + model.getValue("/root/screenMessageList/screenRenList["+i+"]/lastupdtrid")
  682. + "▦" + model.getValue("/root/screenMessageList/screenRenList["+i+"]/resnseqno")
  683. + "▩";
  684. }
  685. model.makeValue("/root/send/resninfo", ResnInfoHeader + ResnInfoData);
  686. //처방창에 저장완료플래그 리턴 후 화면 종료, 차현철, 2009-10-29
  687. if(submit("TXZCS00102")) {
  688. opener.javascript.setParameter ( "SPZCS00301_rtn1", "Y" );
  689. } else {
  690. opener.javascript.setParameter ( "SPZCS00301_rtn1", "N" );
  691. }
  692. window.close();
  693. ]]>
  694. </script>
  695. </button>
  696. <datagrid id="datagrid4" nodeset="/root/screenMessageList/screenRenList" visibility="hidden" autoresize="true" caption="모듈ID^처방코드^SEQ^사유^기타사유" colsep="^" colwidth="37, 72, 60, 100, 100" ellipsis="true" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:490px; top:385px; width:455px; height:320px; ">
  697. <col ref="mappingid"/>
  698. <col ref="orddrugcd"/>
  699. <col ref="resnseqno"/>
  700. <col ref="resncd"/>
  701. <col ref="resncnts"/>
  702. </datagrid>
  703. <caption id="caption6" class="tit_2" visibility="hidden" autoresize="true" style="left:310px; top:725px; width:284px; height:13px; background-color:#ffffff; border-color:#ffffff; border-style:solid; ">약품정보문의 : 2523, 전산운영문의 : 5809</caption>
  704. </xhtml:body>
  705. </xhtml:html>