SPPID21400_외래미시행처방조회.xrw 71 KB

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