SMPIJ02901_항암제투여현황제외처방관리.xrw 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * @(#)SMPID33000_항암제 투여 현황 제외 처방 등록 관리.xrw
  4. * 수정이력
  5. * - 2013.01.19 / 최초작성 / 이경민
  6. -->
  7. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
  8. <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">
  9. <xhtml:head>
  10. <xhtml:title>항암제 투여 현황 제외 처방 등록 관리</xhtml:title>
  11. <model id="model1">
  12. <instance id="instance1">
  13. <root xmlns="">
  14. <main>
  15. <prcplist>
  16. <prcp/>
  17. </prcplist>
  18. </main>
  19. <send>
  20. <prcplist>
  21. </prcplist>
  22. <calccd/>
  23. <cd_name/>
  24. <instcd>031</instcd>
  25. </send>
  26. <init>
  27. <PAM>
  28. <PK024list/>
  29. </PAM>
  30. </init>
  31. <hidden>
  32. <popupmenu>
  33. <clcj>
  34. <item>
  35. <name>행 추가</name>
  36. <func>fSpclGridInsertRow</func>
  37. </item>
  38. <item>
  39. <name>-</name>
  40. <func/>
  41. </item>
  42. <item>
  43. <name>행 삭제</name>
  44. <func>fSpclGridDeleteRow</func>
  45. </item>
  46. </clcj>
  47. </popupmenu>
  48. <smpic00200>
  49. <judgsrch>
  50. <con1_dd/>
  51. <con2_gsflag/>
  52. <con3_search1/>
  53. <con4_search2/>
  54. <con5_insu/>
  55. <con_ordinptflag/>
  56. <con6_calcscorcd/>
  57. <con7_todd/>
  58. <con8_instcd/>
  59. <con11_edicd/>
  60. </judgsrch>
  61. </smpic00200>
  62. </hidden>
  63. </root>
  64. </instance>
  65. <script type="javascript" ev:event="xforms-ready">
  66. <![CDATA[
  67. // 화면을 초기화한다.
  68. fInitialize();
  69. ]]>
  70. </script>
  71. <submission id="TRPAM00105" mediatype="application/x-www-form-urlencoded" method="post"/>
  72. <submission id="TXPIJ02903" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main"/>
  73. <submission id="TRPIJ02903" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main"/>
  74. </model>
  75. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  76. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  77. <script type="javascript" src="../../../com/commonweb/js/numericHelper.js"/>
  78. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  79. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  80. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  81. <script type="javascript" src="../../../pam/pamcomnweb/js/PAM001.js"/>
  82. <script type="javascript">
  83. <![CDATA[
  84. var gToday = new Date();
  85. var gBaseyear = gToday.getDateFormat("YYYY"); // (dateHelper.js)에서 제공하는 함수를 사용하여 해당 년를 구한다.
  86. var gBasemonth = gToday.getDateFormat("MM");
  87. var gBaseday = gToday.getDateFormat("DD");
  88. var gCurrentdd = gBaseyear + gBasemonth + gBaseday;
  89. var gCurrentym = gBaseyear + gBasemonth;
  90. // -----------------------
  91. // ▶ 화면초기화
  92. // -----------------------
  93. function fInitialize() {
  94. // 2013.02.19 - 부가코드 원무공통코드조회
  95. pamfGetCodeList(new Array(
  96. "PK024"
  97. ),
  98. new Array("/root/init/PAM/PK024list"
  99. ));
  100. btn_select.dispatch("DOMActivate");
  101. }
  102. // ----------------------------------------------------------------------
  103. // ▶ 동일진료일 명세서조회
  104. // ----------------------------------------------------------------------
  105. function fGetDocuList() {
  106. var chk = true;
  107. // if (model.getValue("/root/send/orddd") == "") {
  108. // chk = false;
  109. // messageBox("기준년월은", "I003"); //I003=필수입력입니다.
  110. // model.setFocus("ipt_orddd");
  111. // }
  112. if (chk == true) {
  113. submit("TRPIJ02903");
  114. }
  115. }
  116. // 화면을 초기화한다.
  117. function fSpclGridInsertRow(){
  118. grd_prcplist.AddRow();
  119. grd_prcplist.valueMatrix(grd_prcplist.row, grd_prcplist.colRef("fromdd")) = gCurrentdd;
  120. grd_prcplist.valueMatrix(grd_prcplist.row, grd_prcplist.colRef("todd")) = "99991231";
  121. grd_prcplist.bottomRow = grd_prcplist.rows;
  122. }
  123. function fSpclGridDeleteRow(){
  124. for (var i = 0; i < grd_prcplist.selectedRows; i++) {
  125. var sel = grd_prcplist.selectedRow(i);
  126. grd_prcplist.rowstatus(sel) = "4";
  127. }
  128. }
  129. function fGetSnglcalcscorcd() {
  130. // 처방시작일을 수가조회 기준일자로 설정
  131. model.setValue("/root/hidden/smpic00200/judgsrch/con1_dd", gCurrentdd);
  132. // 싱글수가코드
  133. model.setValue("/root/hidden/smpic00200/judgsrch/con2_gsflag", "S");
  134. // SMPIC00200_수가조회 화면의 검색조건 combo 조건값 설정
  135. // 수가 > calcscorcd , edi > edicd , 한글 hngnm
  136. // model.setValue("/root/hidden/smpic00200/judgsrch/con3_search1", rdo_code.value);
  137. model.setValue("/root/hidden/smpic00200/judgsrch/con3_search1", "calcscorcd");
  138. // SMPIC00200_수가조회 용
  139. model.setValue("/root/hidden/smpic00200/judgsrch/con4_search2", grd_prcplist.valueMatrix(grd_prcplist.row, grd_prcplist.colRef("cdnm")));
  140. // 보험으로 박아서 날린다
  141. model.setValue("/root/hidden/smpic00200/judgsrch/con5_insu", "insu");
  142. model.setValue("/root/hidden/smpic00200/judgsrch/con_ordinptflag", "PAM");
  143. model.removeNodeset("/root/hidden/smpic00200/rslt/mech"); // SMPIC00200_수가조회 에서 선택된 결과가 copyNode되는 경로임
  144. model.removeNodeset("/root/hidden/smpic00200/rslt/picmmech"); // SMPIC00200_수가조회 에서 선택된 결과가 copyNode되는 경로임
  145. setParameter("openflag", "edicd");
  146. modal("SMPIC00200", "1", "10", "10", "SMPIC00200", "root/hidden/smpic00200", "/root/temp", "", ""); // SMPIC00200_수가조회.xrw
  147. var mechSelect = instance1.selectSingleNode("/root/temp/mech");
  148. if (mechSelect == null) { // 선택한 코드가 없는 경우
  149. messageBox("수가조회 화면에서 선택한 결과가", "I004"); ///수가조회 화면에서 선택한 결과가 없습니다.
  150. return;
  151. }
  152. // SMPIC00200_수가조회 화면에서 보낸 결과 값에 대한 처리
  153. model.makeNode("/root/hidden/smpic00200/rslt/mech");
  154. model.makeNode("/root/hidden/smpic00200/rslt/picmmech");
  155. model.copyNode("/root/hidden/smpic00200/rslt/mech", "/root/temp/mech");
  156. model.copyNode("/root/hidden/smpic00200/rslt/picmmech", "/root/temp/picmmech");
  157. model.removeNodeset("/root/temp"); // SMPIC00200_수가조회 에서 선택된 결과가 직접 전달되는 경로임
  158. if (model.getValue("/root/hidden/smpic00200/rslt/mech/ordinptflag") != "A") { // 처방입력구분(코드군 P0141) A: 가능
  159. messageBox("처방이 불가한 코드", "E008"); ///처방이 불가한 코드입니다.
  160. return;
  161. }
  162. // 수가코드만 조회하기 때문에 수가코드로 박는다 2009.02.23
  163. //model.setValue("/root/send/code", model.getValue("/root/hidden/smpic00200/rslt/picmmech/picmmech_calcscorcd"));
  164. grd_prcplist.valueMatrix(grd_prcplist.row, grd_prcplist.colRef("cdnm")) = model.getValue("/root/hidden/smpic00200/rslt/picmmech/picmmech_calcscorcd");
  165. grd_prcplist.valueMatrix(grd_prcplist.row, grd_prcplist.colRef("detldesc")) = model.getValue("/root/hidden/smpic00200/rslt/picmmech/picmmech_hngnm");
  166. //ipt_code.refresh();
  167. }
  168. ]]>
  169. </script>
  170. </xhtml:head>
  171. <xhtml:body pagewidth="760" pageheight="660" guideline="1,1163;2,727;2,739;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  172. <group id="grp_tle" style="left:0px; top:0px; width:740px; height:13px; ">
  173. <caption id="cap_title" class="tit_1" style="left:0px; top:0px; width:315px; height:13px; ">항암제 투여 현황 제외 처방 등록 관리</caption>
  174. </group>
  175. <group id="grp_biz" scroll="auto" style="left:0px; top:28px; width:740px; height:592px; ">
  176. <datagrid id="grd_prcplist" nodeset="/root/main/prcplist/prcp" class="datagrid3" caption="cdid^처방코드^처방명^시작일자^종료일자^등록자^등록일자^수정자^수정일자" colsep="^" colwidth="13, 79, 180, 66, 66, 60, 100, 60, 100" dataheight="23" ellipsis="true" extendlastcol="scroll" mergecellsfixedcols="bycol" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="32" rowsep="|" tooltip="true" style="left:0px; top:77px; width:740px; height:514px; ">
  177. <col ref="cdid" visibility="hidden"/>
  178. <col imemode="disabled" ref="cdnm" type="input" maxlength="12" _chartype="upper" style="text-align:center; "/>
  179. <col ref="detldesc"/>
  180. <col disabled="true" ref="fromdd" type="input" format="yyyy-mm-dd" maxlength="8"/>
  181. <col disabled="true" ref="todd" type="input" format="yyyy-mm-dd" maxlength="8"/>
  182. <col ref="fstrgstrid" type="output" style="text-align:center; "/>
  183. <col ref="fstrgstdt" type="output" format="yyyy-mm-dd hh:nn"/>
  184. <col ref="lastupdtrid" style="text-align:center; "/>
  185. <col ref="lastupdtdt" visibility="visible" format="yyyy-mm-dd hh:nn"/>
  186. <script type="javascript" ev:event="onmousedown">
  187. <![CDATA[
  188. if (event.button == 3) { // 3 : 오른쪽 버튼
  189. if (grd_prcplist.isCell(event.target) && grd_prcplist.mouseRow >= grd_prcplist.fixedrows) {
  190. window.setPopupMenu(true, "/root/hidden/popupmenu/clcj/item", "name", "func", false);
  191. } else {
  192. window.showPopupMenu(true);
  193. window.setPopupMenu(true, "/root/hidden/popupmenu/clcj/item", "name", "func", false);
  194. }
  195. }
  196. ]]>
  197. </script>
  198. <script type="javascript" ev:event="DOMFocusOut">
  199. <![CDATA[
  200. window.setPopupMenu(false);
  201. ]]>
  202. </script>
  203. <script type="javascript" ev:event="onkeypress">
  204. <![CDATA[
  205. if (event.keyCode == 13 && grd_prcplist.col == grd_prcplist.colRef("cdnm")) {
  206. fGetSnglcalcscorcd();
  207. if (grd_prcplist.rowstatus(grd_prcplist.row) == 0) {
  208. grd_prcplist.rowstatus(grd_prcplist.row) = "2";
  209. }
  210. }
  211. ]]>
  212. </script>
  213. </datagrid>
  214. <caption id="cap_judgtrgtman" class="tit_2" style="left:4px; top:56px; width:234px; height:15px; ">제외 처방 리스트</caption>
  215. <line id="line1" class="line_1" style="x1:0px; y1:72px; x2:740px; y2:72px; "/>
  216. <group id="group1" style="left:0px; top:5px; width:740px; height:40px; vertical-align:top; ">
  217. <shape id="roundrect3" appearance="roundrect" style="left:0px; top:0px; width:740px; height:40px; "/>
  218. <button id="btn_select" class="btn1_letter2" navindex="32" style="left:675px; top:10px; width:56px; height:22px; ">
  219. <caption>조회</caption>
  220. <script type="javascript" ev:event="DOMActivate">
  221. <![CDATA[
  222. fGetDocuList();
  223. ]]>
  224. </script>
  225. </button>
  226. <line id="line3" class="line_4" style="x1:660px; y1:5px; x2:660px; y2:38px; "/>
  227. </group>
  228. <button id="btn_excelsave" class="btn2_letter4" _auth="P" style="left:523px; top:52px; width:64px; height:19px; ">
  229. <caption>엑셀저장</caption>
  230. <script type="javascript" ev:event="DOMActivate">
  231. <![CDATA[
  232. grd_prcplist.gridToInstance();
  233. if (grd_prcplist.rows > 1) {
  234. var fileName = window.fileDialog("save", "", false, cap_title.value, "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  235. if (fileName != "") {
  236. grd_prcplist.saveExcel(fileName, "sheetname:;colhiddenextend:true;rowhiddenextend:false;col_3:label;col_4:label;col_5:label;col_6:label;", true, true, "", "", true);
  237. }
  238. } else {
  239. messageBox("엑셀저장할 내역이", "I004"); ///엑셀저장할 내역이 없습니다.
  240. }
  241. ]]>
  242. </script>
  243. </button>
  244. <button id="button1" class="btn5_letter2" _auth="P" style="left:696px; top:52px; width:42px; height:19px; ">
  245. <caption>저장</caption>
  246. <script type="javascript" ev:event="DOMActivate">
  247. <![CDATA[
  248. var updtdata = getGridUpdateData(grd_prcplist);
  249. if (updtdata == "") {
  250. messageBox("변경된 데이터가","I004");
  251. return;
  252. }
  253. for (var i=0; i < grd_prcplist.rows; i++){
  254. if ((grd_prcplist.rowStatus(i) == 1 || grd_prcplist.rowStatus(i) == 2 || grd_prcplist.rowStatus(i) == 3) &&
  255. ( grd_prcplist.valueMatrix(i,grd_prcplist.colRef("cdnm")).length ==0
  256. || grd_prcplist.valueMatrix(i,grd_prcplist.colRef("fromdd")).length ==0
  257. || grd_prcplist.valueMatrix(i,grd_prcplist.colRef("todd")).length ==0))
  258. {
  259. var errmsg = "";
  260. if (grd_prcplist.valueMatrix(i,grd_prcplist.colRef("todd")).length ==0)
  261. {
  262. errmsg = grd_prcplist.labelMatrix(0,grd_prcplist.colRef("todd"));
  263. }
  264. if (grd_prcplist.valueMatrix(i,grd_prcplist.colRef("fromdd")).length ==0)
  265. {
  266. errmsg = grd_prcplist.labelMatrix(0,grd_prcplist.colRef("fromdd"));
  267. }
  268. if (grd_prcplist.valueMatrix(i,grd_prcplist.colRef("cdnm")).length ==0)
  269. {
  270. errmsg = grd_prcplist.labelMatrix(0,grd_prcplist.colRef("cdnm"));
  271. }
  272. messageBox(errmsg.split("\n").join("") +"는","I003");
  273. return false;
  274. }
  275. }
  276. if (messageBox("저장", "S001") == 6) {
  277. model.setValue("/root/send/prcplist",grd_prcplist.getUpdateData());
  278. if ( submit("TXPIJ02903") ) {
  279. messageBox("저장이","I002");
  280. }
  281. }
  282. ]]>
  283. </script>
  284. </button>
  285. <button id="button2" class="btn2_letter3" _auth="P" style="left:588px; top:52px; width:53px; height:19px; ">
  286. <caption>행삭제</caption>
  287. <script type="javascript" ev:event="DOMActivate">
  288. <![CDATA[
  289. fSpclGridDeleteRow();
  290. ]]>
  291. </script>
  292. </button>
  293. <button id="button3" class="btn2_letter3" _auth="P" style="left:642px; top:52px; width:53px; height:19px; ">
  294. <caption>행추가</caption>
  295. <script type="javascript" ev:event="DOMActivate">
  296. <![CDATA[
  297. fSpclGridInsertRow();
  298. ]]>
  299. </script>
  300. </button>
  301. </group>
  302. <button id="btn_cancel" class="btn4_letter2" style="left:680px; top:625px; width:56px; height:22px; ">
  303. <caption>종료</caption>
  304. <close ev:event="DOMActivate"/>
  305. </button>
  306. </xhtml:body>
  307. </xhtml:html>