SMPID21900_외래급비변경.xrw 56 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191
  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. <init>
  10. <P0117list>
  11. <P0117>
  12. <cdnm/>
  13. <cdid/>
  14. <cdval/>
  15. <dispseq/>
  16. </P0117>
  17. </P0117list>
  18. </init>
  19. <main>
  20. <grd1>
  21. <unexeclist/>
  22. </grd1>
  23. <grd2>
  24. <unexecordlist/>
  25. </grd2>
  26. <patinfo>
  27. <patinfolist/>
  28. </patinfo>
  29. <item1>
  30. <clcj>
  31. <edicd/>
  32. <spclcd/>
  33. <remfact/>
  34. <spclspec/>
  35. <spclmemoflag/>
  36. <row/>
  37. <basespclcd/>
  38. </clcj>
  39. </item1>
  40. <popupendflag/>
  41. </main>
  42. <send>
  43. <pid/>
  44. <patnm/>
  45. <rdo/>
  46. <chk>Y</chk>
  47. <chk2>Y</chk2>
  48. <orddeptcd/>
  49. <prcphopedd/>
  50. <orddd/>
  51. <orddrid/>
  52. <insukind/>
  53. <cretno/>
  54. <diag>
  55. <pid/>
  56. <orddd/>
  57. <ioflag/>
  58. <deptcd/>
  59. <row/>
  60. <instcd/>
  61. <insukind/>
  62. </diag>
  63. <datalist/>
  64. <delclcj>
  65. <clcj>
  66. <delprcpdd/>
  67. <delprcpno/>
  68. <delprcphistno/>
  69. <delexecprcpseqno/>
  70. <delpid/>
  71. </clcj>
  72. </delclcj>
  73. <insclcj>
  74. <clcj>
  75. <prcpdd/>
  76. <prcpno/>
  77. <prcphistno/>
  78. <execprcpseqno/>
  79. <inspid/>
  80. <unitflag/>
  81. <spclmemoflag/>
  82. <edicd/>
  83. <spclcd/>
  84. <spclspec/>
  85. <remfact/>
  86. </clcj>
  87. </insclcj>
  88. <payflag>
  89. <list>
  90. <payprcpdd/>
  91. <payprcpno/>
  92. <payprcphistno/>
  93. <paypayflagcd/>
  94. </list>
  95. </payflag>
  96. <fromdd/>
  97. <todd/>
  98. </send>
  99. <hidden>
  100. <sppmc02500>
  101. <cond>
  102. <!-- SPPMC02500_환자조회 화면으로 검색조건을 보내는 경로임 -->
  103. <srchcond/>
  104. <pid/>
  105. <hngnm/>
  106. <rrgstno1/>
  107. <rrgstno2/>
  108. <autoflag/>
  109. </cond>
  110. </sppmc02500>
  111. <rcv>
  112. <patInfo>
  113. <pid/>
  114. <patnm/>
  115. </patInfo>
  116. </rcv>
  117. <popupmenu>
  118. <oprc>
  119. <item>
  120. <name>급여</name>
  121. <func>fOrdChangePay</func>
  122. </item>
  123. <item>
  124. <name>전액본인</name>
  125. <func>fOrdChangeNoPay</func>
  126. </item>
  127. <item>
  128. <name>비급여</name>
  129. <func>fOrdChangeGnrl</func>
  130. </item>
  131. </oprc>
  132. </popupmenu>
  133. <oprc/>
  134. </hidden>
  135. </root>
  136. </instance>
  137. <submission id="TRZBC00101" mediatype="application/x-www-form-urlencoded" method="post" replace="instance" resultref="/root/init"/>
  138. <submission id="TRPID21402" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/grd2"/>
  139. <submission id="TRPID21403" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/hidden/rcv"/>
  140. <submission id="TXPID21402" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/grd2"/>
  141. <script type="javascript" ev:event="xforms-ready">
  142. <![CDATA[
  143. // 그리드 빈줄 제거
  144. model.removeNodeset("/root/main/grd1/unexeclist");
  145. model.removeNodeset("/root/main/grd2/unexecordlist");
  146. // grd_outunexecprcpord.colDisabled(grd_outunexecprcpord.colRef("diagyn")) = true;
  147. //
  148. model.removeNodeset("/root/main/grd1/unexeclist");
  149. model.removeNodeset("/root/main/grd2/unexecordlist");
  150. fInitialize(); // 기본데이터 초기화
  151. //
  152. //
  153. // var ipt_pid = model.getValue("/root/send/pid");
  154. //
  155. // if (ipt_pid) {
  156. //
  157. // model.setValue("/root/hidden/sppmc02500/cond/srchcond", "1"); // 검색조건 : 등록번호로 설정
  158. // model.setValue("/root/hidden/sppmc02500/cond/pid", ipt_pid);
  159. // model.setValue("/root/hidden/sppmc02500/cond/autoflag","Y");
  160. //
  161. // model.makeNode("root/main/popupendflag");
  162. //
  163. // // 환자 조회
  164. // if (submit("TRPID21403")) {
  165. // var patInfocnt = getNodesetCount("/root/hidden/rcv/patInfo");
  166. //
  167. // if (patInfocnt == 1) {
  168. // model.setValue("/root/send/patnm", model.getValue("/root/hidden/rcv/patInfo/patnm"));
  169. // model.refresh();
  170. //
  171. // var controlObj = document.controls("btn_srch");
  172. // controlObj.dispatch("DOMActivate");
  173. //
  174. // } else if (patInfocnt > 1) {
  175. // fOJBaseInfoRef();
  176. // }
  177. // }
  178. //
  179. // } else {
  180. // model.resetInstanceNode("/root/hidden/sppmc02500/cond");
  181. // }
  182. model.refresh();
  183. ]]>
  184. </script>
  185. <submission id="TXPID21403" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/hidden"/>
  186. <submission id="TRPID21901" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/grd1"/>
  187. <submission id="TXPID21901" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance"/>
  188. </model>
  189. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  190. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  191. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  192. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  193. <script type="javascript">
  194. <![CDATA[
  195. function fInitialize()
  196. {
  197. // zbcfGetCodeList(
  198. // new Array("P0117"),
  199. // new Array("/root/init/P0117list") // 특정내역
  200. // );
  201. //model.setValue("/root/send/pid","00036823");
  202. // model.makeNode("/root/send/patnm");
  203. // model.makeNode("/root/send/rdo");
  204. // model.makeNode("/root/send/prcphopedd");
  205. // model.makeNode("/root/send/orddd");
  206. // model.makeNode("/root/send/orddrid");
  207. // model.makeNode("/root/send/insukind");
  208. // model.makeNode("/root/send/datalist");
  209. // model.makeNode("/root/send/chk2");
  210. // model.setValue("/root/send/chk2", "");
  211. // model.removeNodeset("/root/send/delclcj/clcj");
  212. // model.removeNodeset("/root/send/insclcj/clcj");
  213. // 외래접수 일자 fromdd - todd 세팅 (한달전 ~ 현재일)
  214. model.setValue("/root/send/fromdd", getCurrentDate().toDate().getAddDate(-1,"M").getDateFormat("YYYYMMDD"));
  215. model.setValue("/root/send/todd", getCurrentDate());
  216. }
  217. // 환자번호 조회 후 처리작업
  218. function fSearch(){
  219. // 1.조회를 위해 넘어가야 할 데이터 세팅
  220. model.setValue("/root/send/pid", model.getValue("/root/main/patinfo/patinfolist/pid"));
  221. // 2.조회
  222. fSrchUnexecOrdList();
  223. }
  224. function fOJBaseInfoRef()
  225. {
  226. //modal("SPPMC02500", 1,150, 150, "SPPMC02500", "/root/hidden/sppmc02500/cond", "/root/send");
  227. open("../../../pam/patinfomngtweb/xrw/SPPMC02500", 1,150, 150, "SPPMC02500", "/root/hidden/sppmc02500/cond", "/root/send");
  228. if ( model.getValue("/root/main/popupendflag") == "ok" ) {
  229. model.setValue("/root/send/pid",model.getValue("/root/main/patinfo/patinfolist/pid"));
  230. model.setValue("/root/send/patnm",model.getValue("/root/main/patinfo/patinfolist/hngnm"));
  231. }
  232. model.setValue("/root/hidden/sppmc02500/cond/autoflag","");
  233. model.resetInstanceNode("/root/main/patinfo/patinfolist");
  234. model.refresh();
  235. }
  236. // 입력된 특정내역의 길이를 체크한다.
  237. function fCheckSpclSpecLength() {
  238. var spclspec = model.getValue("/root/main/item1/clcj/spclspec");
  239. return spclspec.isByteSize(1050); // (stringHelper.js) 문자열의 Byte 크기가 제한값을 벗어나는지 체크 (벗어나면 false 리턴)
  240. }
  241. // 조회
  242. function fSrchUnexecOrdList() {
  243. var pid = model.getValue("/root/send/pid");
  244. if (pid != "") {
  245. grp_spcl.visible = false;
  246. model.removeNodeset("/root/main/grd1/unexeclist");
  247. model.removeNodeset("/root/main/grd2/unexecordlist");
  248. // model.removeNodeset("/root/send/delclcj/clcj");
  249. // model.removeNodeset("/root/send/insclcj/clcj");
  250. // 일자별 목록을 선택했을 때 미시행오더를 조회해오는 조건이 전체 조회에 영향을 미치므로 초기화한다.
  251. model.resetInstanceNode("/root/send/orddeptcd");
  252. // 외래미시행처방일자 목록조회
  253. if (submit("TRPID21901")) {
  254. var unexeclistcnt = getNodesetCount("/root/main/grd1/unexeclist");
  255. if (unexeclistcnt >= 1) {
  256. grd_outunexecprcp.isselected(1) = true;
  257. grp_spcl.visible = false; // 특정내역 상세용 Group
  258. var row = "1";
  259. model.setValue("/root/send/pid",grd_outunexecprcp.valueMatrix(row, grd_outunexecprcp.colRef("pid")));
  260. model.setValue("/root/send/orddd",grd_outunexecprcp.valueMatrix(row, grd_outunexecprcp.colRef("orddd")));
  261. model.setValue("/root/send/prcphopedd",grd_outunexecprcp.valueMatrix(row, grd_outunexecprcp.colRef("prcphopedd")));
  262. model.setValue("/root/send/orddeptcd",grd_outunexecprcp.valueMatrix(row, grd_outunexecprcp.colRef("orddeptcd")));
  263. model.setValue("/root/send/orddrid",grd_outunexecprcp.valueMatrix(row, grd_outunexecprcp.colRef("orddrid")));
  264. model.setValue("/root/send/insukind",grd_outunexecprcp.valueMatrix(row, grd_outunexecprcp.colRef("insukind")));
  265. model.setValue("/root/send/cretno",grd_outunexecprcp.valueMatrix(row, grd_outunexecprcp.colRef("cretno")));
  266. // model.setValue("/root/send/acptseqno",grd_outunexecprcp.valueMatrix(row, grd_outunexecprcp.colRef("acptseqno")));
  267. // 외래미시행처방 미시행 오더 조회
  268. submit("TRPID21402");
  269. //
  270. // var judgend = model.getValue("/root/main/grd2/unexecordlist[1]/judgendflag");
  271. //
  272. // if (judgend == "Y") {
  273. // btn_judgend.visible = false;
  274. // btn_judgcancel.visible = true;
  275. // } else {
  276. // btn_judgend.visible = true;
  277. // btn_judgcancel.visible = false;
  278. // }
  279. //
  280. //
  281. grd_outunexecprcpord.clearStatus();
  282. grd_outunexecprcpord.colStyle(1, "data","background-image") = "../../../com/commonweb/images/icon_n.gif";
  283. // model.resetInstanceNode("/root/main/item1/clcj");
  284. // model.removeNodeset("/root/send/delclcj/clcj");
  285. // model.removeNodeset("/root/send/insclcj/clcj");
  286. // model.resetInstanceNode("/root/send/datalist");
  287. }
  288. }
  289. } else {
  290. messageBox("환자정보 조회가 이루어지지 ", "E007");
  291. }
  292. }
  293. // 타과포함조회, 시행처방포함조회 체크 선택시 해당 일자의 미시행오더를 조회하도록 한다.
  294. function fSrchUnexecOrdList2() {
  295. grp_spcl.visible = false;
  296. //model.removeNodeset("/root/main/grd1/unexeclist");
  297. model.removeNodeset("/root/main/grd2/unexecordlist");
  298. model.removeNodeset("/root/send/delclcj/clcj");
  299. model.removeNodeset("/root/send/insclcj/clcj");
  300. // 일자별 목록을 선택했을 때 미시행오더를 조회해오는 조건이 전체 조회에 영향을 미치므로 초기화한다.
  301. model.resetInstanceNode("/root/send/orddeptcd");
  302. model.refresh();
  303. // 외래미시행처방일자 목록조회
  304. var row = grd_outunexecprcp.row;
  305. if (row < 1) row = 1; // 선택되지 않은 상태면 default로 첫 row 를 준다.
  306. model.setValue("/root/send/pid",grd_outunexecprcp.valueMatrix(row, grd_outunexecprcp.colRef("pid")));
  307. model.setValue("/root/send/orddd",grd_outunexecprcp.valueMatrix(row, grd_outunexecprcp.colRef("orddd")));
  308. model.setValue("/root/send/prcphopedd",grd_outunexecprcp.valueMatrix(row, grd_outunexecprcp.colRef("prcphopedd")));
  309. model.setValue("/root/send/orddeptcd",grd_outunexecprcp.valueMatrix(row, grd_outunexecprcp.colRef("orddeptcd")));
  310. model.setValue("/root/send/orddrid",grd_outunexecprcp.valueMatrix(row, grd_outunexecprcp.colRef("orddrid")));
  311. model.setValue("/root/send/insukind",grd_outunexecprcp.valueMatrix(row, grd_outunexecprcp.colRef("insukind")));
  312. model.setValue("/root/send/cretno",grd_outunexecprcp.valueMatrix(row, grd_outunexecprcp.colRef("cretno")));
  313. // 외래미시행처방 미시행 오더 조회
  314. submit("TRPID21402");
  315. var judgend = model.getValue("/root/main/grd2/unexecordlist[1]/judgendflag");
  316. if (judgend == "Y") {
  317. btn_judgend.visible = false;
  318. btn_judgcancel.visible = true;
  319. } else {
  320. btn_judgend.visible = true;
  321. btn_judgcancel.visible = false;
  322. }
  323. grd_outunexecprcpord.clearStatus();
  324. grd_outunexecprcpord.colStyle(1, "data","background-image") = "../../../com/commonweb/images/icon_n.gif";
  325. model.resetInstanceNode("/root/main/item1/clcj");
  326. model.removeNodeset("/root/send/delclcj/clcj");
  327. model.removeNodeset("/root/send/insclcj/clcj");
  328. model.resetInstanceNode("/root/send/datalist");
  329. }
  330. // 마우스 오른쪽 메뉴 - 급여 선택
  331. function fOrdChangePay()
  332. {
  333. if (messageBox("해당 처방의 급비여부를 급여로 변경", "Q004") == 6) {
  334. fSetOprcPayFlag("0");
  335. }
  336. }
  337. // 마우스 오른쪽 메뉴 - 전액본인 선택
  338. function fOrdChangeNoPay()
  339. {
  340. if (messageBox("해당 처방의 급비여부를 전액본인으로 변경", "Q004") == 6) {
  341. fSetOprcPayFlag("1");
  342. }
  343. }
  344. // 마우스 오른쪽 메뉴 - 일반 선택
  345. function fOrdChangeGnrl()
  346. {
  347. if (messageBox("해당 처방의 급비여부를 일반으로 변경", "Q004") == 6) {
  348. fSetOprcPayFlag("2");
  349. }
  350. }
  351. // 급비 변경 처리
  352. function fSetOprcPayFlag(payflagcd) {
  353. // 1. 화면 수정
  354. var rows = grd_outunexecprcpord.selectedRows;
  355. for (var i = 0; i < rows; i++) {
  356. var sel = grd_outunexecprcpord.selectedRow(i);
  357. grd_outunexecprcpord.rowstatus(sel) = 2;
  358. grd_outunexecprcpord.cellStyle("background-image", sel, 1) = "../../../com/commonweb/images/icon_u.gif";
  359. model.setValue("/root/main/grd2/unexecordlist["+ sel +"]/payflagcd", payflagcd);
  360. model.setValue("/root/main/grd2/unexecordlist["+ sel +"]/payflagyn", "Y");
  361. // grd_outunexecprcpord.valueMatrix(sel, grd_outunexecprcpord.colRef("payflagcd")) = payflagcd;
  362. // grd_outunexecprcpord.valueMatrix(sel, grd_outunexecprcpord.colRef("payflagyn")) = "Y";
  363. }
  364. }
  365. ]]>
  366. </script>
  367. </xhtml:head>
  368. <xhtml:body pagewidth="1230" pageheight="780" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  369. <group id="grp_tle" style="left:0px; top:0px; width:1195px; height:13px; ">
  370. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:132px; height:13px; ">외래급비변경</caption>
  371. </group>
  372. <group id="grp_biz" scroll="auto" style="left:0px; top:210px; width:1195px; height:515px; ">
  373. <select id="chk_otherdept" ref="/root/send/chk" navindex="4" visibility="hidden" overflow="visible" appearance="full" style="left:465px; top:45px; width:95px; height:15px; border-style:none; ">
  374. <choices>
  375. <item>
  376. <label>타과포함 조회</label>
  377. <value>Y</value>
  378. </item>
  379. </choices>
  380. <script type="javascript" ev:event="xforms-value-changed">
  381. <![CDATA[
  382. // 조회
  383. //fSrchUnexecOrdList();
  384. fSrchUnexecOrdList2();
  385. ]]>
  386. </script>
  387. </select>
  388. <button id="btn_srch" class="btn1_letter2" navindex="5" style="left:205px; top:10px; width:56px; height:22px; ">
  389. <caption>조회</caption>
  390. <script type="javascript" ev:event="DOMActivate">
  391. <![CDATA[
  392. // 조회
  393. fSrchUnexecOrdList();
  394. ]]>
  395. </script>
  396. </button>
  397. <select id="chk_execdd" ref="/root/send/chk2" navindex="4" visibility="hidden" overflow="visible" appearance="full" style="left:565px; top:45px; width:95px; height:15px; border-style:none; ">
  398. <choices>
  399. <item>
  400. <label>시행처방 포함</label>
  401. <value>Y</value>
  402. </item>
  403. </choices>
  404. <script type="javascript" ev:event="xforms-value-changed">
  405. <![CDATA[
  406. // 조회
  407. //fSrchUnexecOrdList();
  408. fSrchUnexecOrdList2();
  409. ]]>
  410. </script>
  411. </select>
  412. <line id="line8" class="line_1" style="x1:0px; y1:55px; x2:275px; y2:55px; "/>
  413. <caption id="caption15" class="tit_2" style="left:5px; top:40px; width:125px; height:13px; ">외래접수내역</caption>
  414. <caption id="caption3" class="tit_2" style="left:279px; top:15px; width:87px; height:13px; ">처방내역</caption>
  415. <line id="line2" class="line_1" style="x1:279px; y1:30px; x2:1194px; y2:30px; "/>
  416. <button id="button3" class="btn2_letter2" navindex="6" visibility="hidden" style="left:1009px; top:49px; width:42px; height:19px; ">
  417. <caption>엑셀</caption>
  418. <script type="javascript" ev:event="DOMActivate">
  419. <![CDATA[
  420. var fileName = window.fileDialog("save", ",", false, "미시행오더", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  421. if (fileName != "") {
  422. grd_outunexecprcpord.saveExcel(fileName, "SheetName", true, true, "", "");
  423. }
  424. window.exec(fileName);
  425. ]]>
  426. </script>
  427. </button>
  428. <button id="btn_judgend" class="btn2_letter6" navindex="7" visibility="hidden" style="left:1054px; top:49px; width:86px; height:19px; ">
  429. <caption>통합심사완료</caption>
  430. <script type="javascript" ev:event="DOMActivate">
  431. <![CDATA[
  432. var rows = grd_outunexecprcpord.rows;
  433. if (rows >1 ) {
  434. for (i=1; i<rows; i++) {
  435. model.setValue("/root/main/grd2/unexecordlist[" + i + "]/judgendflag","Y");
  436. grd_outunexecprcpord.rowstatus(i) = 2; // 2 : update
  437. }
  438. var updateData = getGridUpdateData(grd_outunexecprcpord);
  439. model.setValue("/root/send/datalist", updateData);
  440. if (updateData) {
  441. submit("TXPID21402");
  442. var judgend = model.getValue("/root/main/grd2/unexecordlist[1]/judgendflag");
  443. if (judgend == "Y") {
  444. btn_judgend.visible = false;
  445. btn_judgcancel.visible = true;
  446. } else {
  447. btn_judgend.visible = true;
  448. btn_judgcancel.visible = false;
  449. }
  450. model.refresh();
  451. }
  452. }
  453. ]]>
  454. </script>
  455. </button>
  456. <button id="btn_judgcancel" class="btn2_letter6" navindex="7" visibility="hidden" style="left:1015px; top:50px; width:86px; height:19px; ">
  457. <caption>통합심사취소</caption>
  458. <script type="javascript" ev:event="DOMActivate">
  459. <![CDATA[
  460. var rows = grd_outunexecprcpord.rows;
  461. if (rows >1 ) {
  462. for (i=1; i<rows; i++) {
  463. model.setValue("/root/main/grd2/unexecordlist[" + i + "]/judgendflag","N");
  464. grd_outunexecprcpord.rowstatus(i) = 2; // 2 : update
  465. }
  466. var updateData = getGridUpdateData(grd_outunexecprcpord);
  467. model.setValue("/root/send/datalist", updateData);
  468. if (updateData) {
  469. submit("TXPID21402");
  470. var judgend = model.getValue("/root/main/grd2/unexecordlist[1]/judgendflag");
  471. if (judgend == "Y") {
  472. btn_judgend.visible = false;
  473. btn_judgcancel.visible = true;
  474. } else {
  475. btn_judgend.visible = true;
  476. btn_judgcancel.visible = false;
  477. }
  478. model.refresh();
  479. }
  480. }
  481. ]]>
  482. </script>
  483. </button>
  484. <button id="btn_save" class="btn2_letter2" navindex="8" visibility="hidden" style="left:1143px; top:49px; width:42px; height:19px; ">
  485. <caption>저장</caption>
  486. <script type="javascript" ev:event="DOMActivate">
  487. <![CDATA[
  488. if (grp_spcl.visible == true) {
  489. var ans = messageBox("특정내역 수정 사항을 적용하여 저장", "S001"); ///특정내역 수정 사항을 적용하여 저장하시려면 예(Yes)\n아니면 아니오(No)
  490. if (ans == 6) { // 6: yes
  491. btn_confirm.dispatch("DOMActivate");
  492. } else {
  493. grp_spcl.visible = false;
  494. if (ans == 2) { // 2: 취소
  495. return;
  496. }
  497. }
  498. }
  499. model.removeNodeset("/root/send/delclcj/clcj");
  500. model.removeNodeset("/root/send/insclcj/clcj");
  501. model.removeNodeset("/root/send/payflag/list");
  502. model.resetInstanceNode("/root/send/datalist");
  503. // 처방급비 변경을 위해 노드에 담는다. (payflagyn이 Y인 ROW가 처방급비가 변경된 row이다)
  504. var updateyn = "N"; // 처방급비만 변경되어도 저장할 수 있어야 한다.
  505. var payCnt = 0;
  506. for (var i = grd_outunexecprcpord.fixedRows; i < grd_outunexecprcpord.rows; i++) {
  507. var payflagyn = model.getValue("/root/main/grd2/unexecordlist[" + i + "]/payflagyn");
  508. if (payflagyn == "Y") {
  509. var prcpdd = model.getValue("/root/main/grd2/unexecordlist["+ i +"]/prcpdd");
  510. var prcpno = model.getValue("/root/main/grd2/unexecordlist["+ i +"]/prcpno");
  511. var prcphistno = model.getValue("/root/main/grd2/unexecordlist["+ i +"]/prcphistno");
  512. var payflagcd = model.getValue("/root/main/grd2/unexecordlist["+ i +"]/payflagcd");
  513. payCnt++;
  514. model.makeValue("/root/send/payflag/list[" + payCnt + "]/payprcpdd", prcpdd);
  515. model.makeValue("/root/send/payflag/list[" + payCnt + "]/payprcpno", prcpno);
  516. model.makeValue("/root/send/payflag/list[" + payCnt + "]/payprcphistno", prcphistno);
  517. model.makeValue("/root/send/payflag/list[" + payCnt + "]/paypayflagcd", payflagcd);
  518. updateyn = "Y";
  519. }
  520. }
  521. var updateData = getGridUpdateData(grd_outunexecprcpord);
  522. model.setValue("/root/send/datalist", updateData);
  523. if (updateData || updateyn == "Y") {
  524. //
  525. // 기존 특정내역을 삭제한다.
  526. var delCnt = 0;
  527. var insCnt = 0;
  528. for (var i = grd_outunexecprcpord.fixedRows; i < grd_outunexecprcpord.rows; i++) {
  529. // var rowstatus = grd_outunexecprcpord.rowstatus(i);
  530. var pid = model.getValue("/root/main/grd2/unexecordlist["+ i +"]/pid");
  531. var orddd = model.getValue("/root/main/grd2/unexecordlist["+ i +"]/orddd");
  532. var cretno = model.getValue("/root/main/grd2/unexecordlist["+ i +"]/cretno");
  533. var seqno = model.getValue("/root/main/grd2/unexecordlist["+ i +"]/seqno");
  534. var spclchange = model.getValue("/root/main/grd2/unexecordlist["+ i +"]/spclchange");
  535. var prcpdd = model.getValue("/root/main/grd2/unexecordlist["+ i +"]/prcpdd");
  536. var prcpno = model.getValue("/root/main/grd2/unexecordlist["+ i +"]/prcpno");
  537. var prcphistno = model.getValue("/root/main/grd2/unexecordlist["+ i +"]/prcphistno");
  538. var execprcpseqno = model.getValue("/root/main/grd2/unexecordlist["+ i +"]/execprcpseqno");
  539. if (spclchange == "2" || spclchange == "4") {
  540. delCnt++;
  541. model.makeValue("/root/send/delclcj/clcj[" + delCnt + "]/delpid", pid);
  542. model.makeValue("/root/send/delclcj/clcj[" + delCnt + "]/delorddd", orddd);
  543. model.makeValue("/root/send/delclcj/clcj[" + delCnt + "]/delcretno", cretno);
  544. model.makeValue("/root/send/delclcj/clcj[" + delCnt + "]/delseqno", seqno);
  545. /*
  546. model.makeValue("/root/send/delclcj/clcj[" + delCnt + "]/delprcpdd", prcpdd);
  547. model.makeValue("/root/send/delclcj/clcj[" + delCnt + "]/delprcpno", prcpno);
  548. model.makeValue("/root/send/delclcj/clcj[" + delCnt + "]/delprcphistno", prcphistno);
  549. model.makeValue("/root/send/delclcj/clcj[" + delCnt + "]/delexecprcpseqno", execprcpseqno);
  550. */
  551. }
  552. if (spclchange != "" && spclchange != "0" && spclchange != "4") {
  553. var spclcd = model.getValue("/root/main/grd2/unexecordlist["+ i +"]/spclcd");
  554. var spclspec = model.getValue("/root/main/grd2/unexecordlist["+ i +"]/spclspec");
  555. if (spclcd == "JX999" || spclcd == "MX999") {
  556. var iSpclCdTotLength = getStringLength(spclspec); // (stringHelper.js) 문자열의 길이를 구한다.
  557. var insCharTotCnt = 0; // 특정내역으로 잘라진 총 글자 수
  558. if (iSpclCdTotLength > 350) { // 새로 입력된 특정코드가 700byte를 넘는다.
  559. // 영문(700자), 한글(350자) 길이로 잘라서 n개의 특정코드를 만든다.
  560. var iLen = 0; // 특정내역 길이가 700 byte가 되었는지 계산
  561. var iStartInx = 0; // 특정내역 시작 index
  562. var iCharCnt = 0; // 몇글자로 구성되는지 계산
  563. for (var j=0; j < spclspec.length; j++) {
  564. var sBit = spclspec.charAt(j);
  565. iCharCnt++;
  566. if (escape(sBit).length > 4) {
  567. iLen = iLen + 2;
  568. } else {
  569. iLen = iLen + 1;
  570. }
  571. if (iLen == 350 || iLen > 350) { // 영문(700자), 한글(350자)
  572. insCnt++;
  573. if (iLen == 350) { // 700byte로 길이가 끝난 경우
  574. model.makeValue("/root/send/insclcj/clcj[" + insCnt + "]/prcpdd", prcpdd);
  575. model.makeValue("/root/send/insclcj/clcj[" + insCnt + "]/prcpno", prcpno);
  576. model.makeValue("/root/send/insclcj/clcj[" + insCnt + "]/prcphistno", prcphistno);
  577. model.makeValue("/root/send/insclcj/clcj[" + insCnt + "]/execprcpseqno", execprcpseqno);
  578. model.makeValue("/root/send/insclcj/clcj[" + insCnt + "]/inspid", pid);
  579. model.makeValue("/root/send/insclcj/clcj[" + insCnt + "]/insorddd", orddd);
  580. model.makeValue("/root/send/insclcj/clcj[" + insCnt + "]/inscretno", cretno);
  581. model.makeValue("/root/send/insclcj/clcj[" + insCnt + "]/unitflag", model.getValue("/root/main/grd2/unexecordlist["+ i +"]/unitflag"));
  582. model.makeValue("/root/send/insclcj/clcj[" + insCnt + "]/spclmemoflag", model.getValue("/root/main/grd2/unexecordlist["+ i +"]/spclmemoflag"));
  583. model.makeValue("/root/send/insclcj/clcj[" + insCnt + "]/edicd", model.getValue("/root/main/grd2/unexecordlist["+ i +"]/edicd"));
  584. model.makeValue("/root/send/insclcj/clcj[" + insCnt + "]/spclcd", spclcd);
  585. model.makeValue("/root/send/insclcj/clcj[" + insCnt + "]/spclspec", spclspec.substr(iStartInx, iCharCnt));
  586. model.makeValue("/root/send/insclcj/clcj[" + insCnt + "]/remfact", model.getValue("/root/main/grd2/unexecordlist["+ i +"]/remfact"));
  587. // model.makeValue(item3Path + insCnt + "]/" + item3Node + "spclspec", spclspec.substr(iStartInx, iCharCnt));
  588. iStartInx += iCharCnt;
  589. insCharTotCnt += 350;
  590. }
  591. else if (iLen > 350) { // 영문(700자), 한글(350자)를 넘는 경우
  592. model.makeValue("/root/send/insclcj/clcj[" + insCnt + "]/prcpdd", prcpdd);
  593. model.makeValue("/root/send/insclcj/clcj[" + insCnt + "]/prcpno", prcpno);
  594. model.makeValue("/root/send/insclcj/clcj[" + insCnt + "]/prcphistno", prcphistno);
  595. model.makeValue("/root/send/insclcj/clcj[" + insCnt + "]/execprcpseqno", execprcpseqno);
  596. model.makeValue("/root/send/insclcj/clcj[" + insCnt + "]/inspid", pid);
  597. model.makeValue("/root/send/insclcj/clcj[" + insCnt + "]/insorddd", orddd);
  598. model.makeValue("/root/send/insclcj/clcj[" + insCnt + "]/inscretno", cretno);
  599. model.makeValue("/root/send/insclcj/clcj[" + insCnt + "]/unitflag", model.getValue("/root/main/grd2/unexecordlist["+ i +"]/unitflag"));
  600. model.makeValue("/root/send/insclcj/clcj[" + insCnt + "]/spclmemoflag", model.getValue("/root/main/grd2/unexecordlist["+ i +"]/spclmemoflag"));
  601. model.makeValue("/root/send/insclcj/clcj[" + insCnt + "]/edicd", model.getValue("/root/main/grd2/unexecordlist["+ i +"]/edicd"));
  602. model.makeValue("/root/send/insclcj/clcj[" + insCnt + "]/spclcd", spclcd);
  603. model.makeValue("/root/send/insclcj/clcj[" + insCnt + "]/spclspec", spclspec.substr(iStartInx, iCharCnt - 1));
  604. model.makeValue("/root/send/insclcj/clcj[" + insCnt + "]/remfact", model.getValue("/root/main/grd2/unexecordlist["+ i +"]/remfact"));
  605. // model.makeValue(item3Path + insCnt + "]/" + item3Node + "spclspec", spclspec.substr(iStartInx, iCharCnt - 1));
  606. iStartInx += (iCharCnt - 1);
  607. j--;
  608. insCharTotCnt += 349;
  609. }
  610. iCharCnt = 0;
  611. iLen = 0;
  612. }
  613. }
  614. if (iSpclCdTotLength != insCharTotCnt) {
  615. insCnt++;
  616. model.makeValue("/root/send/insclcj/clcj[" + insCnt + "]/prcpdd", prcpdd);
  617. model.makeValue("/root/send/insclcj/clcj[" + insCnt + "]/prcpno", prcpno);
  618. model.makeValue("/root/send/insclcj/clcj[" + insCnt + "]/prcphistno", prcphistno);
  619. model.makeValue("/root/send/insclcj/clcj[" + insCnt + "]/execprcpseqno", execprcpseqno);
  620. model.makeValue("/root/send/insclcj/clcj[" + insCnt + "]/inspid", pid);
  621. model.makeValue("/root/send/insclcj/clcj[" + insCnt + "]/insorddd", orddd);
  622. model.makeValue("/root/send/insclcj/clcj[" + insCnt + "]/inscretno", cretno);
  623. model.makeValue("/root/send/insclcj/clcj[" + insCnt + "]/unitflag", model.getValue("/root/main/grd2/unexecordlist["+ i +"]/unitflag"));
  624. model.makeValue("/root/send/insclcj/clcj[" + insCnt + "]/spclmemoflag", model.getValue("/root/main/grd2/unexecordlist["+ i +"]/spclmemoflag"));
  625. model.makeValue("/root/send/insclcj/clcj[" + insCnt + "]/edicd", model.getValue("/root/main/grd2/unexecordlist["+ i +"]/edicd"));
  626. model.makeValue("/root/send/insclcj/clcj[" + insCnt + "]/spclcd", spclcd);
  627. model.makeValue("/root/send/insclcj/clcj[" + insCnt + "]/spclspec", spclspec.substring(iStartInx, spclspec.length));
  628. model.makeValue("/root/send/insclcj/clcj[" + insCnt + "]/remfact", model.getValue("/root/main/grd2/unexecordlist["+ i +"]/remfact"));
  629. // model.makeValue(item3Path + insCnt + "]/" + item3Node + "spclspec", spclspec.substring(iStartInx, spclspec.length));
  630. }
  631. } else { // 새로 입력된 특정코드는 700byte를 넘지 않는다.
  632. insCnt++;
  633. model.makeValue("/root/send/insclcj/clcj[" + insCnt + "]/prcpdd", prcpdd);
  634. model.makeValue("/root/send/insclcj/clcj[" + insCnt + "]/prcpno", prcpno);
  635. model.makeValue("/root/send/insclcj/clcj[" + insCnt + "]/prcphistno", prcphistno);
  636. model.makeValue("/root/send/insclcj/clcj[" + insCnt + "]/execprcpseqno", execprcpseqno);
  637. model.makeValue("/root/send/insclcj/clcj[" + insCnt + "]/inspid", pid);
  638. model.makeValue("/root/send/insclcj/clcj[" + insCnt + "]/insorddd", orddd);
  639. model.makeValue("/root/send/insclcj/clcj[" + insCnt + "]/inscretno", cretno);
  640. model.makeValue("/root/send/insclcj/clcj[" + insCnt + "]/unitflag", model.getValue("/root/main/grd2/unexecordlist["+ i +"]/unitflag"));
  641. model.makeValue("/root/send/insclcj/clcj[" + insCnt + "]/spclmemoflag", model.getValue("/root/main/grd2/unexecordlist["+ i +"]/spclmemoflag"));
  642. model.makeValue("/root/send/insclcj/clcj[" + insCnt + "]/edicd", model.getValue("/root/main/grd2/unexecordlist["+ i +"]/edicd"));
  643. model.makeValue("/root/send/insclcj/clcj[" + insCnt + "]/spclcd", spclcd);
  644. model.makeValue("/root/send/insclcj/clcj[" + insCnt + "]/spclspec", spclspec);
  645. model.makeValue("/root/send/insclcj/clcj[" + insCnt + "]/remfact", model.getValue("/root/main/grd2/unexecordlist["+ i +"]/remfact"));
  646. }
  647. } else { // 기타 특정내역이 아닌 경우 입력을 받으면서 길이를 체크하고, 저장시에는 글자 길이로 자르지 않는다.
  648. insCnt++;
  649. model.makeValue("/root/send/insclcj/clcj[" + insCnt + "]/prcpdd", prcpdd);
  650. model.makeValue("/root/send/insclcj/clcj[" + insCnt + "]/prcpno", prcpno);
  651. model.makeValue("/root/send/insclcj/clcj[" + insCnt + "]/prcphistno", prcphistno);
  652. model.makeValue("/root/send/insclcj/clcj[" + insCnt + "]/execprcpseqno", execprcpseqno);
  653. model.makeValue("/root/send/insclcj/clcj[" + insCnt + "]/inspid", pid);
  654. model.makeValue("/root/send/insclcj/clcj[" + insCnt + "]/insorddd", orddd);
  655. model.makeValue("/root/send/insclcj/clcj[" + insCnt + "]/inscretno", cretno);
  656. model.makeValue("/root/send/insclcj/clcj[" + insCnt + "]/unitflag", model.getValue("/root/main/grd2/unexecordlist["+ i +"]/unitflag"));
  657. model.makeValue("/root/send/insclcj/clcj[" + insCnt + "]/spclmemoflag", model.getValue("/root/main/grd2/unexecordlist["+ i +"]/spclmemoflag"));
  658. model.makeValue("/root/send/insclcj/clcj[" + insCnt + "]/edicd", model.getValue("/root/main/grd2/unexecordlist["+ i +"]/edicd"));
  659. model.makeValue("/root/send/insclcj/clcj[" + insCnt + "]/spclcd", spclcd);
  660. model.makeValue("/root/send/insclcj/clcj[" + insCnt + "]/spclspec", spclspec);
  661. model.makeValue("/root/send/insclcj/clcj[" + insCnt + "]/remfact", model.getValue("/root/main/grd2/unexecordlist["+ i +"]/remfact"));
  662. }
  663. }
  664. }
  665. submit("TXPID21401");
  666. grd_outunexecprcpord.clearStatus();
  667. grd_outunexecprcpord.colStyle(1, "data","background-image") = "../../../com/commonweb/images/icon_n.gif";
  668. model.resetInstanceNode("/root/main/item1/clcj");
  669. model.removeNodeset("/root/send/delclcj/clcj");
  670. model.removeNodeset("/root/send/insclcj/clcj");
  671. model.removeNodeset("/root/send/payflag/list");
  672. model.resetInstanceNode("/root/send/datalist");
  673. // 다시 조회
  674. fSrchUnexecOrdList2();
  675. } else {
  676. messageBox("변경된 데이터가","I004"); ///변경된 데이터가 없습니다.
  677. }
  678. ]]>
  679. </script>
  680. </button>
  681. <datagrid id="grd_outunexecprcp" nodeset="/root/main/grd1/unexeclist" caption="환자번호^처방일^실시희망일^진료과코드^진료과^진료의코드^진료의^cretno^" colsep="^" colwidth="0, 67, 71, 0, 47, 0, 42, 100, 0" dataheight="23" ellipsis="true" explorerbar="sort" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="23" rowsep="|" tooltip="true" style="left:0px; top:60px; width:275px; height:450px; ">
  682. <col ref="pid"/>
  683. <col ref="orddd" format="yyyy-mm-dd" style="text-align:center; "/>
  684. <col ref="prcphopedd" format="yyyy-mm-dd" style="text-align:center; "/>
  685. <col ref="orddeptcd"/>
  686. <col ref="orddeptnm" style="text-align:center; "/>
  687. <col ref="orddrid"/>
  688. <col ref="orddrnm"/>
  689. <col ref="cretno" visibility="hidden"/>
  690. <col ref="insukind"/>
  691. <script type="javascript" ev:event="onclick">
  692. <![CDATA[
  693. if(grd_outunexecprcp.isCell(event.target) && grd_outunexecprcp.row >= grd_outunexecprcp.fixedRows) {
  694. grp_spcl.visible = false; // 특정내역 상세용 Group
  695. var row = grd_outunexecprcp.row ;
  696. model.setValue("/root/send/pid",grd_outunexecprcp.valueMatrix(row, grd_outunexecprcp.colRef("pid")));
  697. model.setValue("/root/send/orddd",grd_outunexecprcp.valueMatrix(row, grd_outunexecprcp.colRef("orddd")));
  698. model.setValue("/root/send/prcphopedd",grd_outunexecprcp.valueMatrix(row, grd_outunexecprcp.colRef("prcphopedd")));
  699. model.setValue("/root/send/orddeptcd",grd_outunexecprcp.valueMatrix(row, grd_outunexecprcp.colRef("orddeptcd")));
  700. model.setValue("/root/send/orddrid",grd_outunexecprcp.valueMatrix(row, grd_outunexecprcp.colRef("orddrid")));
  701. model.setValue("/root/send/insukind",grd_outunexecprcp.valueMatrix(row, grd_outunexecprcp.colRef("insukind")));
  702. model.setValue("/root/send/cretno",grd_outunexecprcp.valueMatrix(row, grd_outunexecprcp.colRef("cretno")));
  703. // 외래미시행처방 미시행 오더 조회
  704. submit("TRPID21402");
  705. var judgend = model.getValue("/root/main/grd2/unexecordlist[1]/judgendflag");
  706. if (judgend == "Y") {
  707. btn_judgend.visible = false;
  708. btn_judgcancel.visible = true;
  709. } else {
  710. btn_judgend.visible = true;
  711. btn_judgcancel.visible = false;
  712. }
  713. grd_outunexecprcpord.clearStatus();
  714. grd_outunexecprcpord.colStyle(1, "data","background-image") = "../../../com/commonweb/images/icon_n.gif";
  715. model.resetInstanceNode("/root/main/item1/clcj");
  716. model.removeNodeset("/root/send/delclcj/clcj");
  717. model.removeNodeset("/root/send/insclcj/clcj");
  718. model.resetInstanceNode("/root/send/datalist");
  719. }
  720. ]]>
  721. </script>
  722. <script type="javascript" ev:event="onaftersort">
  723. <![CDATA[
  724. grd_outunexecprcp.gridToInstance(); // Sort 된 Grid 상의 Data 순서와 Instance Node 상의 Data 순서를 동일하게 맞춰준다.
  725. ]]>
  726. </script>
  727. </datagrid>
  728. <datagrid id="grd_outunexecprcpord" nodeset="/root/main/grd2/unexecordlist" visibility="visible" caption="^^G^처방코드^EDI코드^한글명^급^투여량^회^일^처방시간^실시처방일^실시희망일^실시일시^예약일시^실시상태^진료과^진료의^상병^특정코드^특정내역^통합심사^unitflag^환자번호^외래등록일자^외래생성번호^일련번호^처방번호^처방이력번호^실시처방일련번호^기관코드^특정메모구분^참고사항^저장여부^보험유형^처방일자" colsep="^" colwidth="20, 0, 20, 70, 65, 145, 25, 42, 19, 19, 120, 70, 70, 120, 120, 55, 100, 100, 30, 55, 60, 55, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100" dataheight="25" ellipsis="true" explorerbar="sortshowmove" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="25" rowsep="|" tooltip="true" style="left:279px; top:35px; width:915px; height:475px; ">
  729. <col class="update_n" ref="update"/>
  730. <col ref="spclchange"/>
  731. <col ref="grupsnglyn" style="text-align:center; "/>
  732. <col ref="calcscorcd"/>
  733. <col ref="edicd"/>
  734. <col ref="ordnm"/>
  735. <col disabled="true" ref="payflagcd" type="combo" style="text-align:center; ">
  736. <choices>
  737. <item>
  738. <label>급</label>
  739. <value>0</value>
  740. </item>
  741. <item>
  742. <label>100</label>
  743. <value>1</value>
  744. </item>
  745. <item>
  746. <label>비</label>
  747. <value>2</value>
  748. </item>
  749. </choices>
  750. </col>
  751. <col ref="execprcpqty" format="#,###.00" style="text-align:right; "/>
  752. <col ref="execprcptims" format="#,###" style="text-align:right; "/>
  753. <col ref="execprcpdayno" format="#,###" style="text-align:right; "/>
  754. <col ref="prcptm" format="yyyy-mm-dd hh:nn:ss" style="text-align:center; "/>
  755. <col ref="actorddd" format="yyyy-mm-dd" style="text-align:center; "/>
  756. <col ref="prcphopedd" format="yyyy-mm-dd" style="text-align:center; "/>
  757. <col ref="exectm" format="yyyy-mm-dd hh:nn:ss"/>
  758. <col ref="rsrvtm" format="yyyy-mm-dd hh:nn:ss" style="text-align:center; "/>
  759. <col ref="execprcpstatcd" style="text-align:center; "/>
  760. <col ref="orddeptcd" visibility="hidden"/>
  761. <col ref="orddrid" visibility="hidden"/>
  762. <col ref="diagyn" visibility="hidden" style="text-align:center; "/>
  763. <col ref="spclcd" visibility="hidden">
  764. <![CDATA[-]]>
  765. </col>
  766. <col ref="spclspec" visibility="hidden"/>
  767. <col ref="judgendflag" visibility="hidden" style="text-align:center; "/>
  768. <col ref="unitflag" visibility="hidden"/>
  769. <col ref="pid" visibility="hidden"/>
  770. <col ref="orddd" visibility="hidden"/>
  771. <col ref="cretno" visibility="hidden"/>
  772. <col ref="seqno" visibility="hidden"/>
  773. <col ref="prcpno" visibility="hidden"/>
  774. <col ref="prcphistno" visibility="hidden"/>
  775. <col ref="execprcpseqno" visibility="hidden"/>
  776. <col ref="instcd" visibility="hidden"/>
  777. <col ref="spclmemoflag" visibility="hidden"/>
  778. <col ref="remfact" visibility="hidden"/>
  779. <col ref="spclyn" visibility="hidden"/>
  780. <col ref="insukind" visibility="hidden"/>
  781. <col ref="prcpdd" visibility="hidden"/>
  782. <script type="javascript" ev:event="onrowchanged">
  783. <![CDATA[
  784. grp_spcl.visible = false;
  785. ]]>
  786. </script>
  787. <script type="javascript" ev:event="xforms-value-changed">
  788. <![CDATA[
  789. /*
  790. - 0 : new
  791. - 1 : insert
  792. - 2 : update
  793. - 3 : insert & new
  794. - 4 : delete
  795. */
  796. var row = grd_outunexecprcpord.row;
  797. // var col = grd_outunexecprcpord.col;
  798. // if (col = grd_outunexecprcpord.colRef("")) {
  799. var curRowStatus = grd_outunexecprcpord.rowStatus(row);
  800. if(curRowStatus != 4) {
  801. grd_outunexecprcpord.cellStyle("background-image", grd_outunexecprcpord.row, 1) = "../../../com/commonweb/images/icon_u.gif";
  802. }
  803. // }
  804. ]]>
  805. </script>
  806. <script type="javascript" ev:event="onclick">
  807. <![CDATA[
  808. if(grd_outunexecprcpord.isCell(event.target) && grd_outunexecprcpord.row >= grd_outunexecprcpord.fixedRows) {
  809. if (grd_outunexecprcpord.col == grd_outunexecprcpord.colRef("diagyn")) {
  810. // 상병 컬럼 선택시
  811. var row = grd_outunexecprcpord.row;
  812. var rows = grd_outunexecprcpord.rows;
  813. model.makeValue("/root/send/diag/pid", model.getValue("/root/main/grd2/unexecordlist["+row+"]/pid"));
  814. model.makeValue("/root/send/diag/orddd", model.getValue("/root/main/grd2/unexecordlist["+row+"]/orddd"));
  815. model.makeValue("/root/send/diag/ioflag", model.getValue("/root/main/grd2/unexecordlist["+row+"]/ioflag"));
  816. model.makeValue("/root/send/diag/deptcd", model.getValue("/root/main/grd2/unexecordlist["+row+"]/orddeptcd"));
  817. model.makeValue("/root/send/diag/instcd", model.getValue("/root/main/grd2/unexecordlist["+row+"]/instcd"));
  818. model.makeValue("/root/send/diag/insukind", model.getValue("/root/main/grd2/unexecordlist["+row+"]/insukind"));
  819. model.makeValue("/root/send/diag/row", rows);
  820. modal("../../../pam/aftjudgweb/xrw/SPPID21500", 1,150, 150, "SPPID21500", "/root/send/diag", "/root/send", "", "");
  821. }
  822. else if (grd_outunexecprcpord.col == grd_outunexecprcpord.colRef("spclcd") || grd_outunexecprcpord.col == grd_outunexecprcpord.colRef("spclspec"))
  823. {
  824. // 특정내역 Grid 에서 선택한 줄단위 특정내역을 조회하고, 명세서단위 특정내역을 수정/입력한다.
  825. model.resetInstanceNode("/root/main/item1/clcj");
  826. var row = grd_outunexecprcpord.row;
  827. // 특정내역 상세 활성화
  828. var spclcd = model.getValue("/root/main/grd2/unexecordlist[" + row + "]/spclcd");
  829. model.setValue("/root/main/item1/clcj/row",row);
  830. model.setValue("/root/main/item1/clcj/edicd", grd_outunexecprcpord.valueMatrix(row, grd_outunexecprcpord.colRef("edicd")));
  831. if (spclcd == "") {
  832. model.setValue("/root/main/item1/clcj/spclcd", "JX999");
  833. var index = 41;
  834. if (model.getValue("/root/main/item1/clcj/edilnno")) { // 줄단위 인 경우 index 와 실제 init data 순서가 다르므로
  835. index = index + 24;
  836. } else {
  837. index = index + 1; // combo 의 index 는 0 부터 시작하지만, init data 순서는 1부터 시작하므로
  838. }
  839. var format = model.getValue("/root/init/P0117list/P0117[" + index + "]/cdval");
  840. model.setValue("/root/main/item1/clcj/remfact", format);
  841. model.setValue("/root/main/item1/clcj/spclmemoflag", "E"); // EDI메모 상태를 기본값으로 한다.
  842. var spclcd = model.getValue("/root/main/item1/clcj/spclcd");
  843. } else {
  844. model.setValue("/root/main/item1/clcj/spclcd", spclcd);
  845. model.setValue("/root/main/item1/clcj/remfact", model.getValue("/root/main/grd2/unexecordlist[" + row + "]/remfact")); // 기재형식
  846. model.setValue("/root/main/item1/clcj/spclspec", model.getValue("/root/main/grd2/unexecordlist[" + row + "]/spclspec"));
  847. model.setValue("/root/main/item1/clcj/spclmemoflag", model.getValue("/root/main/grd2/unexecordlist[" + row + "]/spclmemoflag")); // 사용자메모, EDI메모 구분
  848. }
  849. model.setValue("/root/main/item1/clcj/basespclcd", "JX999"); // 단위주석 구분 : 명일련단위주석(MX999), 줄단위주석(JX999)
  850. model.refresh();
  851. grp_spcl.visible = true;
  852. }
  853. }
  854. ]]>
  855. </script>
  856. <script type="javascript" ev:event="onaftersort">
  857. <![CDATA[
  858. // 소트 후 인스턴스 정리
  859. grd_outunexecprcpord.gridToInstance(); // Sort 된 Grid 상의 Data 순서와 Instance Node 상의 Data 순서를 동일하게 맞춰준다.
  860. ]]>
  861. </script>
  862. <script type="javascript" ev:event="onmousedown">
  863. <![CDATA[
  864. // 급비 변경
  865. if (event.button == 3) { // 3 : 오른쪽 버튼
  866. if (grd_outunexecprcpord.isCell(event.target) && grd_outunexecprcpord.mouseRow >= grd_outunexecprcpord.fixedrows) {
  867. var rowstatus = grd_outunexecprcpord.rowstatus(grd_outunexecprcpord.mouseRow);
  868. window.setPopupMenu(true, "/root/hidden/popupmenu/oprc/item", "name", "func", false);
  869. } else {
  870. window.setPopupMenu(false);
  871. }
  872. }
  873. ]]>
  874. </script>
  875. <script type="javascript" ev:event="DOMFocusOut">
  876. <![CDATA[
  877. window.setPopupMenu(false);
  878. ]]>
  879. </script>
  880. </datagrid>
  881. <group id="grp_spcl" visibility="hidden" style="left:589px; top:328px; width:596px; height:100px; border-color:#c7a3cf; border-style:solid; ">
  882. <group id="group1" visibility="hidden" scroll="auto" style="left:-1px; top:-1px; width:594px; height:100px; ">
  883. <caption id="caption2" class="tit_2" style="left:5px; top:10px; width:100px; height:13px; ">특정내역 상세</caption>
  884. <line id="line3" class="line_1" style="x1:0px; y1:25px; x2:593px; y2:25px; "/>
  885. <caption id="caption4" class="cell_1" style="left:0px; top:30px; width:59px; height:23px; ">EDI코드</caption>
  886. <output id="opt_snglcalcscorcd" ref="/root/main/item1/clcj/edicd" class="output_fix" style="left:62px; top:31px; width:100px; height:19px; "/>
  887. <caption id="caption5" class="cell_1" style="left:165px; top:30px; width:59px; height:23px; ">특정코드</caption>
  888. <select1 id="cmb_spclcd" ref="/root/main/item1/clcj/spclcd" class="combo_default" appearance="minimal" style="left:227px; top:31px; width:366px; height:19px; ">
  889. <choices>
  890. <itemset nodeset="/root/init/P0117list/P0117">
  891. <label ref="cdnm"/>
  892. <value ref="cdid"/>
  893. </itemset>
  894. </choices>
  895. <script type="javascript" ev:event="xforms-select">
  896. <![CDATA[
  897. //var index = cmb_spclcd.focusIndex + 1; // 시작 인덱스 = 0 대신에 empty 상태의 초기 빈 node를 추가하였음
  898. var index = cmb_spclcd.focusIndex; // 시작 인덱스 = 0 (빈 node 추가하면서 +1 하지 않음)
  899. if (index == 0) {
  900. model.resetInstanceNode("/root/main/item1/clcj/spclcd");
  901. model.resetInstanceNode("/root/main/item1/clcj/spclspec");
  902. model.resetInstanceNode("/root/main/item1/clcj/remfact");
  903. model.resetInstanceNode("/root/main/item1/clcj/spclmemoflag");
  904. rdo_spclmemoflag.visible = false;
  905. } else {
  906. if (model.getValue("/root/main/item1/clcj/edilnno")) { // 줄단위 인 경우 index 와 실제 init data 순서가 다르므로
  907. index = index + 24;
  908. } else {
  909. index = index + 1; // combo 의 index 는 0 부터 시작하지만, init data 순서는 1부터 시작하므로
  910. }
  911. var format = model.getValue("/root/init/P0117list/P0117[" + index + "]/cdval");
  912. model.setValue("/root/main/item1/clcj/remfact", format);
  913. model.setValue("/root/main/item1/clcj/spclmemoflag", "E"); // EDI메모 상태를 기본값으로 한다.
  914. var spclcd = model.getValue("/root/main/item1/clcj/spclcd");
  915. }
  916. model.refresh();
  917. ]]>
  918. </script>
  919. </select1>
  920. <line id="line4" class="line_2" style="x1:0px; y1:52px; x2:593px; y2:52px; "/>
  921. <caption id="caption7" class="cell_1" style="left:0px; top:54px; width:59px; height:146px; ">특정내역</caption>
  922. <textarea id="tar_spclspec" ref="/root/main/item1/clcj/spclspec" style="left:62px; top:55px; width:531px; height:142px; "/>
  923. <line id="line5" class="line_2" style="x1:0px; y1:199px; x2:593px; y2:199px; "/>
  924. <caption id="caption8" class="cell_1" style="left:0px; top:201px; width:59px; height:23px; ">기재형식</caption>
  925. <output id="opt_spclformat" ref="/root/main/item1/clcj/remfact" class="output_fix" style="left:62px; top:202px; width:531px; height:19px; "/>
  926. <line id="line6" class="line_3" style="x1:0px; y1:223px; x2:593px; y2:223px; "/>
  927. <button id="btn_delete" class="btn2_letter2" style="left:552px; top:4px; width:42px; height:19px; ">
  928. <caption>삭제</caption>
  929. <script type="javascript" ev:event="DOMActivate">
  930. <![CDATA[
  931. model.resetInstanceNode("/root/main/item1/clcj/spclcd");
  932. model.resetInstanceNode("/root/main/item1/clcj/spclspec");
  933. model.resetInstanceNode("/root/main/item1/clcj/remfact");
  934. model.resetInstanceNode("/root/main/item1/clcj/spclmemoflag");
  935. btn_confirm.dispatch("DOMActivate");
  936. ]]>
  937. </script>
  938. </button>
  939. <select1 id="radio1" ref="/root/main/item1/clcj/basespclcd" appearance="full" cellspacing="5" cols="2" overflow="visible" style="left:425px; top:6px; width:120px; height:17px; border-style:none; ">
  940. <choices>
  941. <item>
  942. <label>JX999</label>
  943. <value>JX999</value>
  944. </item>
  945. <item>
  946. <label>MX999</label>
  947. <value>MX999</value>
  948. </item>
  949. </choices>
  950. <script type="javascript" ev:event="xforms-value-changed">
  951. <![CDATA[
  952. var index = 0;
  953. var spclcd = model.getValue("/root/main/item1/clcj/basespclcd");
  954. if (spclcd == "JX999") {
  955. index = 42;
  956. } else {
  957. index = 24;
  958. }
  959. model.setValue("/root/main/item1/clcj/spclcd",spclcd);
  960. var format = model.getValue("/root/init/P0117list/P0117[" + index + "]/cdval");
  961. model.setValue("/root/main/item1/clcj/remfact", format);
  962. model.setValue("/root/main/item1/clcj/spclmemoflag", "E"); // EDI메모 상태를 기본값으로 한다.
  963. model.refresh();
  964. ]]>
  965. </script>
  966. </select1>
  967. </group>
  968. <group id="grp_btn" visibility="hidden" scroll="auto" style="left:0px; top:224px; width:594px; height:27px; ">
  969. <line id="line7" class="line_6" style="x1:0px; y1:0px; x2:593px; y2:0px; "/>
  970. <button id="btn_cancel" class="btn4_letter2" style="left:537px; top:5px; width:56px; height:22px; ">
  971. <caption>취소</caption>
  972. <script type="javascript" ev:event="DOMActivate">
  973. <![CDATA[
  974. grp_spcl.visible = false;
  975. ]]>
  976. </script>
  977. </button>
  978. <button id="btn_confirm" class="btn4_letter2" style="left:478px; top:5px; width:56px; height:22px; ">
  979. <caption>확인</caption>
  980. <script type="javascript" ev:event="DOMActivate">
  981. <![CDATA[
  982. var spclcd = model.getValue("/root/main/item1/clcj/spclcd");
  983. // if (spclcd == "MX999" || spclcd == "JX999") {
  984. // messageBox("기타 특정내역(MX999, JX999)은 저장하실 수", "I004"); ///기타 특정내역(MX999, JX999)은 저장하실 수 없습니다.
  985. // return;
  986. // }
  987. var row = model.getValue("/root/main/item1/clcj/row");
  988. var flag = model.getValue("/root/main/grd2/unexecordlist["+row+"]/spclyn");
  989. if (spclcd == "") {
  990. if (flag == "N") {
  991. model.resetInstanceNode("/root/main/grd2/unexecordlist["+row+"]/spclcd");
  992. model.resetInstanceNode("/root/main/grd2/unexecordlist["+row+"]/spclspec");
  993. model.resetInstanceNode("/root/main/grd2/unexecordlist["+row+"]/remfact");
  994. model.resetInstanceNode("/root/main/grd2/unexecordlist["+row+"]/spclmemoflag");
  995. grd_outunexecprcpord.cellStyle("background-image", row, 1) = "../../../com/commonweb/images/icon_n.gif";
  996. model.setValue("/root/main/grd2/unexecordlist["+row+"]/spclchange", "0");
  997. grd_outunexecprcpord.rowStatus(row) = 0;
  998. } else {
  999. grd_outunexecprcpord.cellStyle("background-image", row, 1) = "../../../com/commonweb/images/icon_d.gif";
  1000. model.setValue("/root/main/grd2/unexecordlist["+row+"]/spclchange", "4");
  1001. grd_outunexecprcpord.rowStatus(row) = 4;
  1002. }
  1003. model.refresh();
  1004. }
  1005. else {
  1006. // else if (fCheckSpclSpecLength()) { // 특정내역 필드 길이 = 1050 Byte 임 asdfasdfasd
  1007. if (spclcd != "MX999" && spclcd != "JX999") {
  1008. var spclspec = model.getValue("/root/main/item1/clcj/spclspec");
  1009. if (spclspec.isByteSize(1050) == false) { // (stringHelper.js) 문자열의 Byte 크기가 제한값을 벗어나는지 체크 (벗어나면 false 리턴)
  1010. messageBox("특정내역 입력 제한길이(1050 Byte)를", "E003"); ///특정내역 입력 제한길이(1050 Byte)를 초과하였습니다
  1011. return;
  1012. }
  1013. }
  1014. //사용자가 특정내역을 입력한 경우에 전달해 준다.
  1015. model.setValue("/root/main/grd2/unexecordlist["+row+"]/spclcd", spclcd);
  1016. model.setValue("/root/main/grd2/unexecordlist["+row+"]/unitflag", spclcd.substr(0, 1));
  1017. model.setValue("/root/main/grd2/unexecordlist["+row+"]/spclspec",model.getValue("/root/main/item1/clcj/spclspec"));
  1018. model.setValue("/root/main/grd2/unexecordlist["+row+"]/remfact",model.getValue("/root/main/item1/clcj/remfact"));
  1019. model.setValue("/root/main/grd2/unexecordlist["+row+"]/spclmemoflag",model.getValue("/root/main/item1/clcj/spclmemoflag"));
  1020. if (flag == "N") {
  1021. grd_outunexecprcpord.cellStyle("background-image", row, 1) = "../../../com/commonweb/images/icon_i.gif";
  1022. model.setValue("/root/main/grd2/unexecordlist["+row+"]/spclchange", "1");
  1023. grd_outunexecprcpord.rowStatus(row) = 1;
  1024. } else {
  1025. grd_outunexecprcpord.cellStyle("background-image", row, 1) = "../../../com/commonweb/images/icon_u.gif";
  1026. model.setValue("/root/main/grd2/unexecordlist["+row+"]/spclchange", "2");
  1027. grd_outunexecprcpord.rowStatus(row) = 2;
  1028. }
  1029. model.refresh();
  1030. // } else {
  1031. // messageBox("특정내역 입력 제한길이(1050 Byte)를", "E003"); ///특정내역 입력 제한길이(1050 Byte)를 초과하였습니다
  1032. // return;
  1033. }
  1034. grp_spcl.visible = false;
  1035. ]]>
  1036. </script>
  1037. </button>
  1038. </group>
  1039. </group>
  1040. <button id="btn_payflag" class="btn2_letter6" navindex="8" visibility="visible" style="left:1108px; top:9px; width:86px; height:19px; ">
  1041. <caption>처방급비저장</caption>
  1042. <script type="javascript" ev:event="DOMActivate">
  1043. <![CDATA[
  1044. model.removeNodeset("/root/send/payflag/list");
  1045. // 처방급비 변경을 위해 노드에 담는다. (payflagyn이 Y인 ROW가 처방급비가 변경된 row이다)
  1046. var updateyn = "N"; // 처방급비만 변경되어도 저장할 수 있어야 한다.
  1047. var payCnt = 0;
  1048. for (var i = grd_outunexecprcpord.fixedRows; i < grd_outunexecprcpord.rows; i++) {
  1049. var payflagyn = model.getValue("/root/main/grd2/unexecordlist[" + i + "]/payflagyn");
  1050. if (payflagyn == "Y") {
  1051. var prcpdd = model.getValue("/root/main/grd2/unexecordlist["+ i +"]/prcpdd");
  1052. var prcpno = model.getValue("/root/main/grd2/unexecordlist["+ i +"]/prcpno");
  1053. var prcphistno = model.getValue("/root/main/grd2/unexecordlist["+ i +"]/prcphistno");
  1054. var payflagcd = model.getValue("/root/main/grd2/unexecordlist["+ i +"]/payflagcd");
  1055. payCnt++;
  1056. model.makeValue("/root/send/payflag/list[" + payCnt + "]/payprcpdd", prcpdd);
  1057. model.makeValue("/root/send/payflag/list[" + payCnt + "]/payprcpno", prcpno);
  1058. model.makeValue("/root/send/payflag/list[" + payCnt + "]/payprcphistno", prcphistno);
  1059. model.makeValue("/root/send/payflag/list[" + payCnt + "]/paypayflagcd", payflagcd);
  1060. updateyn = "Y";
  1061. }
  1062. }
  1063. if (updateyn == "Y") {
  1064. submit("TXPID21901");
  1065. grd_outunexecprcpord.clearStatus();
  1066. grd_outunexecprcpord.colStyle(1, "data","background-image") = "../../../com/commonweb/images/icon_n.gif";
  1067. model.resetInstanceNode("/root/main/item1/clcj");
  1068. model.removeNodeset("/root/send/delclcj/clcj");
  1069. model.removeNodeset("/root/send/insclcj/clcj");
  1070. model.removeNodeset("/root/send/payflag/list");
  1071. model.resetInstanceNode("/root/send/datalist");
  1072. // 다시 조회
  1073. fSrchUnexecOrdList2();
  1074. } else {
  1075. messageBox("변경된 데이터가","I004"); ///변경된 데이터가 없습니다.
  1076. }
  1077. ]]>
  1078. </script>
  1079. </button>
  1080. <input id="ipt_fromdd" ref="/root/send/fromdd" class="input_default" inputtype="date" style="left:6px; top:11px; width:85px; height:19px; "/>
  1081. <input id="ipt_todd" ref="/root/send/todd" class="input_default" inputtype="date" style="left:111px; top:11px; width:85px; height:19px; "/>
  1082. <caption id="caption1" style="left:95px; top:12px; width:15px; height:20px; ">~</caption>
  1083. </group>
  1084. <group id="group2" style="left:0px; top:723px; width:1195px; height:27px; ">
  1085. <button id="btn_init" class="btn4_letter3" navindex="9" visibility="hidden" style="left:1117px; top:5px; width:68px; height:22px; ">
  1086. <caption>초기화</caption>
  1087. <script type="javascript" ev:event="DOMActivate">
  1088. <![CDATA[
  1089. // grp_spcl.visible = false;
  1090. // model.resetInstanceNode("/root/send/pid");
  1091. // model.resetInstanceNode("/root/send/patnm");
  1092. // model.resetInstanceNode("/root/send/chk");
  1093. // model.removeNodeset("/root/main/grd1/unexeclist");
  1094. // model.removeNodeset("/root/main/grd2/unexecordlist");
  1095. // model.removeNodeset("/root/send/delclcj/clcj");
  1096. // model.removeNodeset("/root/send/insclcj/clcj");
  1097. // model.refresh();
  1098. ]]>
  1099. </script>
  1100. </button>
  1101. <button id="btn_close" class="btn4_letter2" navindex="10" visibility="hidden" style="left:1129px; top:5px; width:56px; height:22px; ">
  1102. <caption>닫기</caption>
  1103. <close ev:event="DOMActivate"/>
  1104. </button>
  1105. </group>
  1106. <import id="import1" src="../../../pam/patinfomngtweb/xrw/SSPMC00100_인적사항.xrw" style="left:0px; top:12px; width:1195px; height:197px; "/>
  1107. </xhtml:body>
  1108. </xhtml:html>