SMARC02300_1차회신서조회.xrw 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.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>1차회신서조회</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <fstreqlist>
  11. <fstreqlistinfo>
  12. <pid/>
  13. <hngnm/>
  14. <depthngnm/>
  15. <usernm/>
  16. <rgstdd/>
  17. <coophospnm/>
  18. <drnm/>
  19. <fstprint/>
  20. <replflag/>
  21. <orddeptcd/>
  22. <orddrid/>
  23. <coophospcd/>
  24. <coopdrcd/>
  25. <brthdd/>
  26. <age/>
  27. <sex/>
  28. <min_orddd/>
  29. <instcdnm/>
  30. <spcltestitem/>
  31. <fstprntdt/>
  32. <addr1/>
  33. <addr2/>
  34. <zipcd1/>
  35. <zipcd2/>
  36. <fstprntdt/>
  37. <seqno/>
  38. <orddd/>
  39. <cretno/>
  40. <acptseqno/>
  41. <printyn/>
  42. <drflag/>
  43. <telno1/>
  44. <telno2/>
  45. <faxno/>
  46. <url/>
  47. <mainemail/>
  48. <maindeptnm/>
  49. <printcheck/>
  50. <cc/>
  51. <afterplan/>
  52. <recnm/>
  53. <replnm/>
  54. <ctelno/>
  55. <cfaxno/>
  56. </fstreqlistinfo>
  57. </fstreqlist>
  58. <hospflag/>
  59. <hospinfo>
  60. <hospinfolist/>
  61. </hospinfo>
  62. <printinfo>
  63. <printlist>
  64. <pid/>
  65. <hngnm/>
  66. <orddd/>
  67. <depthngnm/>
  68. <usernm/>
  69. <rgstdd/>
  70. <coophospnm/>
  71. <drnm/>
  72. <coophospcd/>
  73. <coopdrcd/>
  74. <replmthd/>
  75. <orddeptcd/>
  76. <orddrid/>
  77. <fstprint/>
  78. <printyn/>
  79. </printlist>
  80. </printinfo>
  81. <patinfo>
  82. <patinfolist>
  83. <pid/>
  84. </patinfolist>
  85. </patinfo>
  86. <temp>
  87. <print/>
  88. </temp>
  89. </main>
  90. <send>
  91. <reqdata>
  92. <srchfromdd/>
  93. <srchtodd/>
  94. <hospgrade/>
  95. <coophospnm/>
  96. <drnm/>
  97. <coophospcd/>
  98. <coopdrcd/>
  99. <hospflag/>
  100. <printyn/>
  101. <pid/>
  102. <replflag/>
  103. <printvlaue>D</printvlaue>
  104. <fstprint/>
  105. </reqdata>
  106. <savedata>
  107. </savedata>
  108. </send>
  109. <init>
  110. <comcodelist>
  111. <replmthd>
  112. <A0422/>
  113. </replmthd>
  114. <replflag>
  115. <A0636/>
  116. </replflag>
  117. </comcodelist>
  118. <rex>
  119. <for>
  120. <coophospnm/>
  121. <drnm/>
  122. <brthdd/>
  123. <sex/>
  124. <age/>
  125. <orddd/>
  126. <depthngnm/>
  127. <usernm/>
  128. <min_orddd/>
  129. <spcltestitem/>
  130. <star/>
  131. </for>
  132. <coophospnm/>
  133. <drnm/>
  134. <instcdnm/>
  135. <addr1/>
  136. <addr2/>
  137. <zipcd1/>
  138. <zipcd2/>
  139. <star/>
  140. </rex>
  141. </init>
  142. <hidden>
  143. <srchfromdd/>
  144. <srchtodd/>
  145. <orddrid/>
  146. <pid/>
  147. <seqno/>
  148. <orddd/>
  149. <cretno/>
  150. <acptseqno/>
  151. <printcheck/>
  152. </hidden>
  153. </root>
  154. </instance>
  155. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  156. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  157. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  158. <script type="javascript" src="../../../com/commonweb/js/utilHelper.js"/>
  159. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  160. <script type="javascript" src="../../../ast/commonweb/js/AST.js"/>
  161. <script type="javascript" ev:event="xforms-ready">
  162. <![CDATA[
  163. fGetComCdList();
  164. addComboItem("cmb_replflag", "", "-", "above");
  165. cmb_replflag.select(0);
  166. cmb_fstprint.select(0);
  167. model.refresh();
  168. ]]>
  169. </script>
  170. <submission id="TRZBC00101" mediatype="application/x-www-form-urlencoded" method="post"/>
  171. <submission id="TRZBC00102" mediatype="application/x-www-form-urlencoded" method="post"/>
  172. <submission id="TRARC02301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" replace="instance" resultref="/root/main/fstreqlist"/>
  173. <submission id="TXARC02301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/savedata" replace="instance" resultref="/root/hidden"/>
  174. </model>
  175. <script type="javascript">
  176. <![CDATA[
  177. /**========================================================================================================================================
  178. * 공통코드조회(항목구분)
  179. =========================================================================================================================================*/
  180. function fGetComCdList(){
  181. // 공통코드 목록 가져오기
  182. zbcfGetCodeList(new Array("A0422", "A0636"), new Array("/root/init/comcodelist/replmthd", "/root/init/comcodelist/replflag") , true);
  183. model.refresh();
  184. // 그리드초기화
  185. model.removeNodeset("/root/main/fstreqlist/fstreqlistinfo");
  186. // 오늘 날짜로 세팅
  187. var curDt = getCurrentDate();
  188. model.setValue("/root/send/reqdata/srchfromdd" , curDt);
  189. model.setValue("/root/send/reqdata/srchtodd" , curDt);
  190. model.removeNodeset("/root/main/fstreqlist/fstreqlistinfo");
  191. model.refresh();
  192. }
  193. /**========================================================================================================================================
  194. * 1차회신서조회
  195. =========================================================================================================================================*/
  196. // 조회전 필수 체크
  197. function fCheckDate()
  198. {
  199. var fromdd = model.getValue("/root/send/reqdata/srchfromdd");
  200. var todd = model.getValue("/root/send/reqdata/srchtodd");
  201. if( ! isValidDateTime( fromdd, 'YYYYMMDD') || ! isValidDateTime( todd, 'YYYYMMDD') ){
  202. messageBox("입력하신 일자구분이 정확한 날짜타입이 아닙니다.", "E999", "");
  203. return false;
  204. }
  205. if( getDateInterval(fromdd, todd) > 31 ){
  206. messageBox("조회가능한 최대 기간은 1달입니다. 일자구분에서 날짜를 수정하세요!", "E999", "");
  207. return false;
  208. }
  209. if( getDateInterval(fromdd, todd) < 0 ){
  210. messageBox("일자구분에서 시작일자가 종료일자보다 미래일자 입니다. 확인하세요!", "E999", "");
  211. return false;
  212. }
  213. return true;
  214. }
  215. function fGetFstReqList(){
  216. submit("TRARC02301");
  217. }
  218. /**========================================================================================================================================
  219. * 출력상태구분 update
  220. =========================================================================================================================================*/
  221. function fUpdateData(){
  222. //alert(model.getValue('/root/main/fstreqlist/fstreqlistinfo['+grd_fstreqlist.row+']/pid'));
  223. //alert(model.getValue('/root/main/fstreqlist/fstreqlistinfo['+grd_fstreqlist.row+']/seqno'));
  224. /*
  225. model.setValue("/root/main/savedata/savelist/pid" , model.getValue("/root/main/fstreqlist/fstreqlistinfo[" + grd_fstreqlist.row + "]/pid"));
  226. model.setValue("/root/main/savedata/savelist/fstprntdt" ,getCurrentDate());
  227. model.setValue("/root/main/savedata/savelist/seqno" , model.getValue("/root/main/fstreqlist/fstreqlistinfo[" + grd_fstreqlist.row + "]/seqno"));
  228. model.setValue("/root/main/savedata/savelist/orddd" , model.getValue("/root/main/fstreqlist/fstreqlistinfo[" + grd_fstreqlist.row + "]/orddd"));
  229. model.setValue("/root/main/savedata/savelist/cretno" , model.getValue("/root/main/fstreqlist/fstreqlistinfo[" + grd_fstreqlist.row + "]/cretno"));
  230. model.setValue("/root/main/savedata/savelist/acptseqno" , model.getValue("/root/main/fstreqlist/fstreqlistinfo[" + grd_fstreqlist.row + "]/acptseqno"));
  231. */
  232. model.resetInstanceNode("/root/send/savedata");
  233. //var savedata = grd_fstreqlist.getUpdateDataAll("u");
  234. var savedata = grd_fstreqlist.getUpdateData("update");
  235. // var savedata = grd_fstreqlist.getNode("/root/main/fstreqlist/fstreqlistinfo[printcheck='Y']");
  236. // grd_fstreqlist.
  237. model.setValue("/root/send/savedata", savedata);
  238. // copyNodesetType("/root/send/savedata", "/root/main/fstreqlist/fstreqlistinfo[printcheck='Y']");
  239. // model.copyNode("/root/send/savedata","/root/main/fstreqlist/fstreqlistinfo[printcheck='Y']");
  240. // model.setValue("/root/send/savedata", savedata);
  241. // var savedata = model.getValue("/root/send/savedata");
  242. // alert(model.getValue("/root/send/savedata"));
  243. if(submit("TXARC02301",false )== true){
  244. model.setValue('/root/send/reqdata/printvlaue', model.getValue('/root/main/temp/print'));
  245. fGetFstReqList();
  246. }
  247. }
  248. /**========================================================================================================================================
  249. * 1차회신서 출력
  250. =========================================================================================================================================*/
  251. /*model.setValue("/root/main/printinfo/printlist/pid" , model.getValue("/root/main/fstreqlist/fstreqlistinfo[" + grd_fstreqlist.row + "]/pid"));
  252. model.setValue("/root/main/printinfo/printlist/hngnm" , model.getValue("/root/main/fstreqlist/fstreqlistinfo[" + grd_fstreqlist.row + "]/hngnm"));
  253. model.setValue("/root/main/printinfo/printlist/orddd" , model.getValue("/root/main/fstreqlist/fstreqlistinfo[" + grd_fstreqlist.row + "]/orddd"));
  254. model.setValue("/root/main/printinfo/printlist/depthngnm" , model.getValue("/root/main/fstreqlist/fstreqlistinfo[" + grd_fstreqlist.row + "]/depthngnm"));
  255. model.setValue("/root/main/printinfo/printlist/usernm" , model.getValue("/root/main/fstreqlist/fstreqlistinfo[" + grd_fstreqlist.row + "]/usernm"));
  256. model.setValue("/root/main/printinfo/printlist/rgstdd" , model.getValue("/root/main/fstreqlist/fstreqlistinfo[" + grd_fstreqlist.row + "]/rgstdd"));
  257. model.setValue("/root/main/printinfo/printlist/coophospnm" , model.getValue("/root/main/fstreqlist/fstreqlistinfo[" + grd_fstreqlist.row + "]/coophospnm"));
  258. model.setValue("/root/main/printinfo/printlist/drnm" , model.getValue("/root/main/fstreqlist/fstreqlistinfo[" + grd_fstreqlist.row + "]/drnm"));
  259. model.setValue("/root/main/printinfo/printlist/replmthd" , model.getValue("/root/main/fstreqlist/fstreqlistinfo[" + grd_fstreqlist.row + "]/replmthd"));
  260. model.setValue("/root/main/printinfo/printlist/orddeptcd" , model.getValue("/root/main/fstreqlist/fstreqlistinfo[" + grd_fstreqlist.row + "]/orddeptcd"));
  261. model.setValue("/root/main/printinfo/printlist/orddrid" , model.getValue("/root/main/fstreqlist/fstreqlistinfo[" + grd_fstreqlist.row + "]/orddrid"));
  262. model.setValue("/root/main/printinfo/printlist/fstprint" , model.getValue("/root/main/fstreqlist/fstreqlistinfo[" + grd_fstreqlist.row + "]/fstprint"));
  263. model.setValue("/root/main/printinfo/printlist/printyn" , model.getValue("/root/main/fstreqlist/fstreqlistinfo[" + grd_fstreqlist.row + "]/printyn"));
  264. model.refresh();
  265. setParameter("reportprintyn", "");
  266. exeReportPreview("RPARC02301", "XMLSTR", "/root/main/printinfo/printlist");
  267. //alert(getParameter('reportprintyn'));
  268. if (getParameter("reportprintyn") == "Y"){
  269. fUpdateData();
  270. }*/
  271. function ftest(param, hpnm, drnm, i ){
  272. model.makeNode("/root/init/rex["+param +"]/coophospnm");
  273. model.makeNode("/root/init/rex["+ param +"]/drnm");
  274. model.makeNode("/root/init/rex["+ param +"]/instcdnm");
  275. model.makeNode("/root/init/rex["+ param +"]/addr1");
  276. model.makeNode("/root/init/rex["+ param +"]/addr2");
  277. model.makeNode("/root/init/rex["+ param +"]/zipcd1");
  278. model.makeNode("/root/init/rex["+ param +"]/zipcd2");
  279. model.setValue("/root/init/rex["+ param +"]/coophospnm", hpnm);
  280. model.setValue("/root/init/rex["+ param +"]/drnm" , drnm);
  281. model.setValue("/root/init/rex["+ param +"]/instcdnm" , model.getValue(grd_fstreqlist.nodeset + "[" + i + "]/instcdnm"));
  282. model.setValue("/root/init/rex["+ param +"]/addr1" , model.getValue(grd_fstreqlist.nodeset + "[" + i + "]/addr1") );
  283. model.setValue("/root/init/rex["+ param +"]/addr2" , model.getValue(grd_fstreqlist.nodeset + "[" + i + "]/addr2") );
  284. model.setValue("/root/init/rex["+ param +"]/zipcd1" , model.getValue(grd_fstreqlist.nodeset + "[" + i + "]/zipcd1") );
  285. model.setValue("/root/init/rex["+ param +"]/zipcd2" , model.getValue(grd_fstreqlist.nodeset + "[" + i + "]/zipcd2") );
  286. }
  287. //1차회신서 출력 수정본(2007.12.18) - node새로생성
  288. function fFstReqListPrnt(){
  289. var df = 0;
  290. var irow = grd_fstreqlist.rows - grd_fstreqlist.fixedRows;
  291. var histhopnm = "";
  292. var cnt =0;
  293. model.removeNodeset("/root/init/rex");
  294. for(var i=1 ; i < irow ; i++){
  295. if(histhopnm != model.getValue("/root/main/fstreqlist/fstreqlistinfo[" + i + "]/coophospnm") ) {
  296. alert(i +" : " + histhopnm+" : " +model.getValue("/root/main/fstreqlist/fstreqlistinfo[" + i + "]/coophospnm") );
  297. histhopnm = model.getValue("/root/main/fstreqlist/fstreqlistinfo[" + i + "]/coophospnm");
  298. cnt++;
  299. var hpnm = model.getValue("/root/main/fstreqlist/fstreqlistinfo[" + i+ "]/coophospnm");
  300. var drnm = model.getValue("/root/main/fstreqlist/fstreqlistinfo[" + i+ "]/drnm");
  301. ftest(cnt, hpnm, drnm , i);
  302. // }
  303. //model.makeNode("/root/init/rex[" + i + "]");
  304. // model.makeNode("/root/init/rex["+ i +"]/coophospnm");
  305. // model.makeNode("/root/init/rex["+ i +"]/drnm");
  306. // model.makeNode("/root/init/rex["+ i +"]/instcdnm");
  307. // model.makeNode("/root/init/rex["+ i +"]/addr1");
  308. // model.makeNode("/root/init/rex["+ i +"]/addr2");
  309. // model.makeNode("/root/init/rex["+ i +"]/zipcd1");
  310. // model.makeNode("/root/init/rex["+ i +"]/zipcd2");
  311. //
  312. //
  313. // model.setValue("/root/init/rex["+ i +"]/coophospnm", hpnm);
  314. // model.setValue("/root/init/rex["+ i +"]/drnm" , drnm);
  315. // model.setValue("/root/init/rex["+ i +"]/instcdnm" , model.getValue(grd_fstreqlist.nodeset + "[" + i + "]/instcdnm"));
  316. // model.setValue("/root/init/rex["+ i +"]/addr1" , model.getValue(grd_fstreqlist.nodeset + "[" + i + "]/addr1") );
  317. // model.setValue("/root/init/rex["+ i +"]/addr2" , model.getValue(grd_fstreqlist.nodeset + "[" + i + "]/addr2") );
  318. // model.setValue("/root/init/rex["+ i +"]/zipcd1" , model.getValue(grd_fstreqlist.nodeset + "[" + i + "]/zipcd1") );
  319. // model.setValue("/root/init/rex["+ i +"]/zipcd2" , model.getValue(grd_fstreqlist.nodeset + "[" + i + "]/zipcd2") );
  320. var jcnt =0 ;
  321. for( var j=1; j <= irow; j++){
  322. var hpnm1 = model.getValue("/root/main/fstreqlist/fstreqlistinfo[" + j + "]/coophospnm");
  323. var drnm1 = model.getValue("/root/main/fstreqlist/fstreqlistinfo[" + j + "]/drnm");
  324. if (( hpnm == hpnm1) && ( drnm == drnm1 )){
  325. jcnt++;
  326. model.makeNode("/root/init/rex[" + cnt + "]/for[" + jcnt + "]/coophospnm");
  327. model.makeNode("/root/init/rex[" + cnt + "]/for[" + jcnt + "]/drnm");
  328. model.makeNode("/root/init/rex[" + cnt + "]/for[" + jcnt + "]/pid");
  329. model.makeNode("/root/init/rex[" + cnt + "]/for[" + jcnt + "]/brthdd");
  330. model.makeNode("/root/init/rex[" + cnt + "]/for[" + jcnt + "]/sex");
  331. model.makeNode("/root/init/rex[" + cnt + "]/for[" + jcnt + "]/age");
  332. model.makeNode("/root/init/rex[" + cnt + "]/for[" + jcnt + "]/orddd");
  333. model.makeNode("/root/init/rex[" + cnt + "]/for[" + jcnt + "]/depthngnm");
  334. model.makeNode("/root/init/rex[" + cnt + "]/for[" + jcnt + "]/usernm");
  335. model.makeNode("/root/init/rex[" + cnt + "]/for[" + jcnt + "]/min_orddd");
  336. model.makeNode("/root/init/rex[" + cnt + "]/for[" + jcnt + "]/spcltestitem");
  337. model.makeNode("/root/init/rex[" + cnt + "]/for[" + jcnt + "]/printcheck");
  338. model.setValue("/root/init/rex[" + cnt + "]/for[" + jcnt +"]/coophospnm" , hpnm1);
  339. model.setValue("/root/init/rex[" + cnt + "]/for[" + jcnt +"]/drnm" , drnm1);
  340. model.setValue("/root/init/rex[" + cnt + "]/for[" + jcnt + "]/pid" , model.getValue(grd_fstreqlist.nodeset + "[" + j + "]/pid") );
  341. model.setValue("/root/init/rex[" + cnt + "]/for[" + jcnt + "]/brthdd" , model.getValue(grd_fstreqlist.nodeset + "[" + j + "]/brthdd") );
  342. model.setValue("/root/init/rex[" + cnt + "]/for[" + jcnt + "]/sex" , model.getValue(grd_fstreqlist.nodeset + "[" + j + "]/sex") );
  343. model.setValue("/root/init/rex[" + cnt + "]/for[" + jcnt + "]/age" , model.getValue(grd_fstreqlist.nodeset + "[" + j + "]/age") );
  344. model.setValue("/root/init/rex[" + cnt + "]/for[" + jcnt + "]/orddd" , model.getValue(grd_fstreqlist.nodeset + "[" + j + "]/ordd") );
  345. model.setValue("/root/init/rex[" + cnt + "]/for[" + jcnt + "]/depthngnm" , model.getValue(grd_fstreqlist.nodeset + "[" + j + "]/depthngnm") );
  346. model.setValue("/root/init/rex[" + cnt + "]/for[" + jcnt + "]/usernm" , model.getValue(grd_fstreqlist.nodeset + "[" + j + "]/usernm") );
  347. model.setValue("/root/init/rex[" + cnt + "]/for[" + jcnt + "]/min_orddd" , model.getValue(grd_fstreqlist.nodeset + "[" + j + "]/min_orddd") );
  348. model.setValue("/root/init/rex[" + cnt + "]/for[" + jcnt + "]/spcltestitem" , model.getValue(grd_fstreqlist.nodeset + "[" + j + "]/spcltestitem") );
  349. model.setValue("/root/init/rex[" + cnt + "]/for[" + jcnt + "]/printcheck" , model.getValue(grd_fstreqlist.nodeset + "[" + j + "]/printcheck") );
  350. model.refresh();
  351. df = df + 1
  352. }
  353. if(df >= "4"){
  354. model.makeNode("/root/init/rex[" + cnt + "]/for[" + jcnt + "]/star");
  355. // model.setValue("/root/init/rex[" + cnt + "]/for[" + jcnt + "]/star" , model.getValue(grd_fstreqlist.nodeset + "[" + j + "]/star") );
  356. model.refresh();
  357. //model.makeNode("/root/init/rex[" + cnt + "]/for[" + jcnt + "]/star");
  358. // model.makeValue("/root/init/rex[" + cnt + "]/for[" + jcnt + "]/star", "S") ;
  359. // }else{
  360. // model.makeNode("/root/init/rex[" + cnt + "]/for[" + jcnt + "]/star");
  361. // model.makeValue("/root/init/rex[" + cnt + "]/for[" + jcnt + "]/star", "") ;
  362. }
  363. }
  364. }
  365. }
  366. //return;
  367. setParameter("reportprintyn", "");
  368. exeReportPreview("RPARC02301", "XMLSTR", "/root/main/printinfo/printlist");
  369. //alert(getParameter('reportprintyn'));
  370. if (getParameter("reportprintyn") == "Y"){
  371. fUpdateData();
  372. }
  373. }
  374. /**========================================================================================================================================
  375. * 의뢰병원 / 의사명 팝업
  376. =========================================================================================================================================*/
  377. function fHospPopUp(){
  378. model.setValue("/root/main/hospflag", "N");
  379. modal("SPARH00200",1,1,1);
  380. if( model.getValue("/root/main/hospflag") == "Y" ) {
  381. model.setValue("/root/send/reqdata/coophospnm" , model.getValue("/root/main/hospinfo/hospinfolist/coophospnm"));
  382. model.setValue("/root/send/reqdata/coophospcd" , model.getValue("/root/main/hospinfo/hospinfolist/coophospcd"));
  383. model.setValue("/root/send/reqdata/coopdrcd" , model.getValue("/root/main/hospinfo/hospinfolist/coopdrcd"));
  384. model.setValue("/root/send/reqdata/hospflag" , model.getValue("/root/main/hospinfo/hospinfolist/clsmatyn"));
  385. model.setValue("/root/send/reqdata/drnm" , model.getValue("/root/main/hospinfo/hospinfolist/drnm"));
  386. }
  387. model.refresh();
  388. }
  389. /**========================================================================================================================================
  390. * 조회조건 refresh
  391. =========================================================================================================================================*/
  392. function fFocusOut(){
  393. model.setValue("/root/send/reqdata/coophospnm","");
  394. model.setValue("/root/send/reqdata/coophospcd","");
  395. model.setValue("/root/send/reqdata/drnm","");
  396. model.setValue("/root/send/reqdata/coopdrcd","");
  397. model.setValue("/root/send/reqdata/fstprint","");
  398. model.refresh();
  399. }
  400. /**========================================================================================================================================
  401. * 초기화
  402. =========================================================================================================================================*/
  403. function fClear(){
  404. var CurrentDate = getCurrentDate();
  405. model.setValue("/root/send/reqdata/srchfromdd", CurrentDate);
  406. model.setValue("/root/send/reqdata/srchtodd" , CurrentDate);
  407. model.resetInstanceNode("/root/send/reqdata/coophospnm");
  408. model.resetInstanceNode("/root/send/reqdata/drnm");
  409. model.resetInstanceNode("/root/send/reqdata/coophospcd");
  410. model.resetInstanceNode("/root/send/reqdata/coopdrcd");
  411. model.resetInstanceNode("/root/send/reqdata/fstprint");
  412. model.resetInstanceNode("/root/main/fstreqlist/fstreqlistinfo");
  413. cmb_replflag.select(0);
  414. model.refresh();
  415. }
  416. // 엑셀 저장
  417. function fExcel()
  418. {
  419. if (grd_fstreqlist.rows <= 1) return;
  420. var fileName = window.fileDialog("save", ",", false, "1차회신환자리스트", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  421. if (fileName != ""){
  422. grd_fstreqlist.saveExcel(fileName, "SheetName", false, false, "", "", false);
  423. }
  424. }
  425. // 등록번호 조회 팝업
  426. function fPatPopUp()
  427. {
  428. if (ipt_pid.currentText.length> 0)
  429. {
  430. model.makeValue("/root/temp/pid", model.getValue("/root/send/search/pid"));
  431. model.makeValue("/root/temp/srchcond","1");
  432. model.makeValue("/root/temp/autoflag","Y");
  433. }
  434. modal("SPPMC02500", 1,10, 10, "SPPMC02500", "/root/temp", "/root/send");
  435. //model.resetInstanceNode("/root/main/patinfo/patinfolist");
  436. //model.resetInstanceNode("/root/send/cond");
  437. model.setValue("/root/send/reqdata/pid", model.getValue("/root/main/patinfo/patinfolist/pid"));
  438. //fHistSearch();
  439. model.refresh();
  440. }
  441. ]]>
  442. </script>
  443. </xhtml:head>
  444. <xhtml:body guideline="1,1194;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  445. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  446. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:147px; height:14px; ">1차회신서조회</caption>
  447. </group>
  448. <group id="group5" scroll="auto" style="left:0px; top:757px; width:1195px; height:27px; ">
  449. <line id="line37" class="line_6" style="x1:0px; y1:0px; x2:1194px; y2:0px; "/>
  450. <button id="btn_search0" class="btn4_letter3" style="left:1126px; top:5px; width:68px; height:22px; ">
  451. <caption>초기화</caption>
  452. <script type="javascript" ev:event="DOMActivate">
  453. <![CDATA[
  454. fClear();
  455. ]]>
  456. </script>
  457. </button>
  458. </group>
  459. <group id="group2" scroll="auto" style="left:0px; top:13px; width:1195px; height:744px; ">
  460. <caption id="caption21" class="tit_2" style="left:0px; top:70px; width:190px; height:13px; ">1차회신서조회</caption>
  461. <group id="group4" style="left:0px; top:5px; width:1194px; height:55px; vertical-align:top; ">
  462. <shape id="roundrect3" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1194px; height:55px; "/>
  463. <caption id="caption22" class="search_no_b" style="left:200px; top:6px; width:12px; height:17px; ">~</caption>
  464. <line id="line2" style="x1:1083px; y1:7px; x2:1083px; y2:50px; border-color:#ffe4bb; border-left-style:solid; "/>
  465. <input id="ipt_srchfromdd" ref="/root/send/reqdata/srchfromdd" class="input_default" inputtype="date" style="left:95px; top:6px; width:100px; height:19px; "/>
  466. <input id="ipt_srchtodd" ref="/root/send/reqdata/srchtodd" class="input_default" inputtype="date" style="left:215px; top:6px; width:100px; height:19px; "/>
  467. <caption id="caption2" class="search_name" style="left:5px; top:6px; width:99px; height:17px; ">등록일자 :</caption>
  468. <caption id="caption3" class="search_name" style="left:355px; top:6px; width:147px; height:17px; ">의뢰병원 / 의사명 :</caption>
  469. <button id="btn_pat" class="icon_search" style="left:744px; top:7px; width:16px; height:16px; ">
  470. <caption/>
  471. <script type="javascript" ev:event="DOMActivate">
  472. <![CDATA[
  473. fHospPopUp();
  474. ]]>
  475. </script>
  476. </button>
  477. <input id="opt_coophospnm" ref="/root/send/reqdata/coophospnm" class="output_fix" style="left:498px; top:6px; width:146px; height:19px; ">
  478. <script type="javascript" ev:event="DOMFocusOut">
  479. <![CDATA[
  480. fFocusOut();
  481. ]]>
  482. </script>
  483. </input>
  484. <input id="opt_drnm" ref="/root/send/reqdata/drnm" class="output_fix" style="left:648px; top:6px; width:91px; height:19px; ">
  485. <script type="javascript" ev:event="DOMFocusOut">
  486. <![CDATA[
  487. fFocusOut();
  488. ]]>
  489. </script>
  490. </input>
  491. <button id="btn_search" class="btn1_letter2" style="left:1098px; top:17px; width:67px; height:28px; ">
  492. <caption>조회</caption>
  493. <script type="javascript" ev:event="DOMActivate">
  494. <![CDATA[
  495. if ( !fCheckDate() ) return; //필수 저장여부 체크
  496. //출력상태를 업데이트 하기 위한 srchfromdd, srchtodd 값을 hidden필드에 임시저장한다.
  497. model.removenode('/root/hidden/srchfromdd');
  498. model.removenode('/root/hidden/srchtodd');
  499. model.removenode('/root/hidden/orddrid');
  500. model.removenode('/root/hidden/pid');
  501. model.removenode('/root/hidden/seqno');
  502. model.removenode('/root/hidden/orddd');
  503. model.removenode('/root/hidden/cretno');
  504. model.removenode('/root/hidden/acptseqno');
  505. model.removenode('/root/hidden/printcheck');
  506. model.removenode('/root/main/temp/print');
  507. model.makeNode('/root/hidden/srchfromdd');
  508. model.makeNode('/root/hidden/srchtodd');
  509. model.makeNode('/root/hidden/orddrid');
  510. model.makeNode('/root/hidden/pid');
  511. model.makeNode('/root/hidden/seqno');
  512. model.makeNode('/root/hidden/orddd');
  513. model.makeNode('/root/hidden/cretno');
  514. model.makeNode('/root/hidden/acptseqno');
  515. model.makeNode('/root/hidden/printcheck');
  516. model.makeNode('/root/main/temp/print');
  517. model.setValue('/root/hidden/srchfromdd', model.getValue('/root/send/reqdata/srchfromdd'));
  518. model.setValue('/root/hidden/srchtodd', model.getValue('/root/send/reqdata/srchtodd'));
  519. model.setValue('/root/hidden/orddrid', model.getValue('/root/send/reqdata/orddrid'));
  520. model.setValue('/root/hidden/pid', model.getValue('/root/send/reqdata/pid'));
  521. model.setValue('/root/hidden/seqno', model.getValue('/root/send/reqdata/seqno'));
  522. model.setValue('/root/hidden/orddd', model.getValue('/root/send/reqdata/orddd'));
  523. model.setValue('/root/hidden/cretno', model.getValue('/root/send/reqdata/cretno'));
  524. model.setValue('/root/hidden/acptseqno', model.getValue('/root/send/reqdata/acptseqno'));
  525. model.setValue('/root/hidden/printcheck', model.getValue('/root/send/reqdata/printcheck'));
  526. model.setValue('/root/main/temp/print', model.getValue('/root/send/reqdata/printvlaue'));
  527. fGetFstReqList();
  528. grd_fstreqlist.fixedcellcheckbox(0, 1) = true;
  529. ]]>
  530. </script>
  531. </button>
  532. <select1 id="printValue_rdo" ref="/root/send/reqdata/printvlaue" appearance="full" cellspacing="15" cols="2" rows="1" overflow="visible" style="left:885px; top:6px; width:170px; height:19px; font-weight:bold; border-style:none; ">
  533. <choices>
  534. <item>
  535. <label>의뢰의사별</label>
  536. <value>D</value>
  537. </item>
  538. <item>
  539. <label>환자별</label>
  540. <value>P</value>
  541. </item>
  542. </choices>
  543. </select1>
  544. <caption id="caption1" class="search_name" style="left:790px; top:6px; width:90px; height:17px; ">출력조건 :</caption>
  545. <caption id="caption4" class="search_name" style="left:5px; top:32px; width:95px; height:17px; ">환자번호 :</caption>
  546. <input id="ipt_pid" ref="/root/send/reqdata/pid" class="input_search" style="left:95px; top:32px; width:100px; height:19px; ">
  547. <script type="javascript" ev:event="onkeypress">
  548. <![CDATA[
  549. inputEnterKey("btn_search", "DOMActivate");
  550. ]]>
  551. </script>
  552. </input>
  553. <button id="button1" class="icon_search" style="left:199px; top:32px; width:16px; height:16px; ">
  554. <caption/>
  555. <script type="javascript" ev:event="DOMActivate">
  556. <![CDATA[
  557. fPatPopUp();
  558. ]]>
  559. </script>
  560. </button>
  561. <caption id="caption5" class="search_name" style="left:355px; top:32px; width:180px; height:17px; ">진료정보공개동의여부 :</caption>
  562. <select1 id="cmb_replflag" ref="/root/send/reqdata/replflag" class="combo_search" appearance="minimal" style="left:525px; top:32px; width:118px; height:19px; ">
  563. <choices>
  564. <itemset nodeset="/root/init/comcodelist/replflag/A0636">
  565. <label ref="cdnm"/>
  566. <value ref="cdid"/>
  567. </itemset>
  568. </choices>
  569. </select1>
  570. <select1 id="cmb_fstprint" ref="/root/send/reqdata/fstprint" class="combo_search" appearance="minimal" style="left:885px; top:32px; width:100px; height:19px; ">
  571. <choices>
  572. <item>
  573. <label>- 전체 -</label>
  574. <value/>
  575. </item>
  576. <item>
  577. <label>미출력</label>
  578. <value>N</value>
  579. </item>
  580. <item>
  581. <label>기출력</label>
  582. <value>Y</value>
  583. </item>
  584. </choices>
  585. </select1>
  586. <caption id="caption7" class="search_name" style="left:790px; top:32px; width:90px; height:17px; ">출력여부 :</caption>
  587. </group>
  588. <datagrid id="grd_fstreqlist" nodeset="/root/main/fstreqlist/fstreqlistinfo" visibility="visible" allowselection="true" autoresize="true" caption="^등록번호^환자명^진료일자^진료과^진료의^등록일자^병원명^의뢰의사명^발송방법^출력상태구분^동의여부^fstprntdt^cretno^acptseqno^seqno^생년월일^나이^성별^외래예약일^기관명^특수검사항목^주소1^주소2^우편번호1^printyn^우편번호2" colsep="^" colwidth="24, 83, 83, 90, 120, 83, 90, 197, 100, 108, 100, 85, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:0px; top:92px; width:1195px; height:640px; ">
  589. <col checkvalue="Y,N" ref="printcheck" type="checkbox"/>
  590. <col ref="pid" style="text-align:center; "/>
  591. <col ref="hngnm" style="text-align:center; "/>
  592. <col ref="orddd" format="yyyy-mm-dd" style="text-align:center; "/>
  593. <col ref="depthngnm" style="text-align:left; "/>
  594. <col ref="usernm" style="text-align:center; "/>
  595. <col ref="rgstdd" format="yyyy-mm-dd" style="text-align:center; "/>
  596. <col ref="coophospnm" style="text-align:left; "/>
  597. <col ref="drnm" style="text-align:center; "/>
  598. <col disabled="true" ref="replmthd" type="combo" style="text-align:left; ">
  599. <choices>
  600. <itemset nodeset="/root/init/comcodelist/replmthd/A0422">
  601. <label ref="cdnm"/>
  602. <value ref="cdid"/>
  603. </itemset>
  604. </choices>
  605. </col>
  606. <col ref="fstprint" style="text-align:center; "/>
  607. <col disabled="true" ref="replflag" type="combo" style="text-align:center; ">
  608. <choices>
  609. <itemset nodeset="/root/init/comcodelist/replflag/A0636">
  610. <label ref="cdnm"/>
  611. <value ref="cdid"/>
  612. </itemset>
  613. </choices>
  614. </col>
  615. <col ref="brthdd" visibility="hidden"/>
  616. <col ref="age" visibility="hidden"/>
  617. <col ref="sex" visibility="hidden"/>
  618. <col ref="min_orddd" visibility="hidden"/>
  619. <col ref="instcdnm" visibility="hidden"/>
  620. <col ref="spcltestitem" visibility="hidden"/>
  621. <col ref="orddrid" visibility="hidden"/>
  622. <col ref="coophospcd" visibility="hidden"/>
  623. <col ref="coopdrcd" visibility="hidden"/>
  624. <col ref="cretno" visibility="hidden"/>
  625. <col ref="acptseqno" visibility="hidden"/>
  626. <col ref="seqno" visibility="hidden"/>
  627. <col ref="fstprntdt" visibility="hidden"/>
  628. <col ref="printyn" visibility="hidden"/>
  629. <col ref="zipcd2" visibility="hidden"/>
  630. </datagrid>
  631. <button id="button15" class="btn2_letter7" style="left:1054px; top:69px; width:97px; height:19px; ">
  632. <caption>1차회신서출력</caption>
  633. <script type="javascript" ev:event="DOMActivate">
  634. <![CDATA[
  635. //조회조건의 srchfromdd, srchtodd, drid를 printYN update시 paramter로 넘겨주기 위한 savedata 인스턴스를 세팅한다.
  636. /*
  637. model.setValue("/root/main/savedata/savelist/srchfromdd", model.getValue("/root/hidden/srchfromdd"));
  638. model.setValue("/root/main/savedata/savelist/srchtodd", model.getValue("/root/hidden/srchtodd"));
  639. model.setValue("/root/main/savedata/savelist/fstprntdt", getCurrentDate() + getCurrentTime());
  640. model.setValue("/root/main/savedata/savelist/orddrid", model.getValue("/root/hidden/orddrid"));
  641. model.setValue("/root/main/savedata/savelist/pid", model.getValue("/root/hidden/pid"));
  642. model.setValue("/root/main/savedata/savelist/seqno", model.getValue("/root/hidden/seqno"));
  643. model.setValue("/root/main/savedata/savelist/orddd", model.getValue("/root/hidden/orddd"));
  644. model.setValue("/root/main/savedata/savelist/cretno", model.getValue("/root/hidden/cretno"));
  645. model.setValue("/root/main/savedata/savelist/acptseqno", model.getValue("/root/hidden/acptseqno"));
  646. */
  647. //fFstReqListPrnt();
  648. // 미출력건만 출력하기 위해서 수정(2008.09.25)
  649. model.removeNodeset("/root/main/printinfo/printlist");
  650. model.makeNode("/root/main/printinfo/printlist");
  651. //copyNodesetType("/root/main/printinfo/printlist", "/root/main/fstreqlist/fstreqlistinfo[printyn ='N']");
  652. copyNodesetType("/root/main/printinfo/printlist", "/root/main/fstreqlist/fstreqlistinfo[printcheck='Y']");
  653. setParameter("reportprintyn", "");
  654. //exeReportPreview("RPARC02301", "XMLSTR", "/root/main/fstreqlist/fstreqlistinfo");
  655. if (model.getValue("/root/send/reqdata/printvlaue")=="P"){
  656. exeReportPreview("RPARC02302", "XMLSTR", "/root/main/printinfo/printlist");
  657. }
  658. if(model.getValue("/root/send/reqdata/printvlaue")=="D"){
  659. exeReportPreview("RPARC02301", "XMLSTR", "/root/main/printinfo/printlist");
  660. }
  661. if (getParameter("reportprintyn") == "Y" ){
  662. fUpdateData();
  663. }
  664. ]]>
  665. </script>
  666. </button>
  667. <line id="line1" class="line_1" style="x1:0px; y1:88px; x2:1194px; y2:88px; "/>
  668. <button id="btn_excel" class="btn2_letter2" style="left:1152px; top:69px; width:42px; height:19px; ">
  669. <caption>엑셀</caption>
  670. <script type="javascript" ev:event="DOMActivate">
  671. <![CDATA[
  672. fExcel();
  673. ]]>
  674. </script>
  675. </button>
  676. </group>
  677. </xhtml:body>
  678. </xhtml:html>