SMPMO00900_대진예약변경.xrw 51 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * 제 목 : SMPMO00300_외래진료예약.xrw
  4. * 설 명 : 대진예약변경
  5. * 설 계 자 : 이동식
  6. * 작 성 자 : 이동식
  7. * 작 성 일 : 2007.09.13
  8. * 수정이력 :
  9. * 기 타 :
  10. -->
  11. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
  12. <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">
  13. <xhtml:head>
  14. <xhtml:title>대진예약변경</xhtml:title>
  15. <model id="model1">
  16. <instance id="instance1">
  17. <root xmlns="">
  18. <main>
  19. <beforersrv>
  20. <centcd/>
  21. <orddeptcd/>
  22. <subdeptcd/>
  23. <orddrid/>
  24. <orddd/>
  25. <ordtmflag/>
  26. <bfrsrvspec>
  27. <rsrvspeclist/>
  28. </bfrsrvspec>
  29. </beforersrv>
  30. <afterrsrv>
  31. <centcd/>
  32. <orddeptcd/>
  33. <subdeptcd/>
  34. <orddrid/>
  35. <orddd/>
  36. <ordtmflag/>
  37. <aftrsrvspec>
  38. <rsrvspeclist/>
  39. </aftrsrvspec>
  40. </afterrsrv>
  41. <result/>
  42. <updtcnclresn/>
  43. <updtcnclresncd/>
  44. </main>
  45. <init>
  46. <orddrid>
  47. <orddridlist>
  48. <cd/>
  49. <nm/>
  50. </orddridlist>
  51. </orddrid>
  52. <orddeptcd>
  53. <orddeptcdlist>
  54. <cd/>
  55. <nm/>
  56. <dp/>
  57. <sp/>
  58. </orddeptcdlist>
  59. </orddeptcd>
  60. </init>
  61. <send>
  62. <centcd/>
  63. <orddeptcd/>
  64. <orddrid/>
  65. <orddd/>
  66. <srchflag/>
  67. <subdeptcd/>
  68. <ordtmflag/>
  69. <updtrsrv>
  70. <updtrsrvlist/>
  71. </updtrsrv>
  72. </send>
  73. <hidden>
  74. <rcv/>
  75. <session/>
  76. <init>
  77. <before/>
  78. <after/>
  79. </init>
  80. </hidden>
  81. <init_com>
  82. <init>
  83. <P0341list>
  84. <P0341>
  85. <cdnm/>
  86. <cdid/>
  87. </P0341>
  88. </P0341list>
  89. </init>
  90. </init_com>
  91. <tmp/>
  92. </root>
  93. </instance>
  94. <submission id="TRPMO00204" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/outrgst"/>
  95. <submission id="TRPAM00101" mediatype="application/x-www-form-urlencoded" method="post" replace="instance" resultref="/root/hidden/tmp"/>
  96. <submission id="TRPMO00901" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/result"/>
  97. <submission id="TRPMO00902" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/tmp"/>
  98. <submission id="TXPMO00302" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/updtrsrv" resultref="/root/hidden/rcv"/>
  99. <submission id="TRPMO00305" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/hidden/enrcomncode"/>
  100. <submission id="TXPMO00105" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/chart" resultref="/root/hidden/rcv"/>
  101. <submission id="TRZSD00207" mediatype="application/x-www-form-urlencoded" method="urlencoded-post" replace="instance"/>
  102. <submission id="TRZSD00208" mediatype="application/x-www-form-urlencoded" method="urlencoded-post" replace="instance"/>
  103. <submission id="TRZSU10117" mediatype="application/x-www-form-urlencoded" method="post" replace="instance"/>
  104. <submission id="TRZSU10118" mediatype="application/x-www-form-urlencoded" method="post" replace="instance"/>
  105. <submission id="TRPMO00123" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/hidden/centeryn"/>
  106. <submission id="TRZBC00101" mediatype="application/x-www-form-urlencoded" method="post" replace="instance"/>
  107. </model>
  108. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  109. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  110. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  111. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  112. <script type="javascript" src="../../../com/commonweb/js/numericHelper.js"/>
  113. <script type="javascript" src="../../../com/commonweb/js/utilHelper.js"/>
  114. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  115. <script type="javascript" src="../../../com/departmentcodeweb/js/ZSD001.js"/>
  116. <script type="javascript" src="../../../com/userdeptinfoweb/js/ZSU001.js"/>
  117. <script type="javascript" src="../../../pam/opatmngtweb/js/PMOCOM.js"/>
  118. <script type="javascript" src="../../../pam/pamcomnweb/js/PAM.js"/>
  119. <script type="javascript" ev:event="xforms-ready">
  120. <![CDATA[
  121. fGetUserInfosSampling(); //세션
  122. //변경전 그리드 전체선택 체크박스 추가
  123. datagrid1.fixedcellcheckbox(0,0) = true;
  124. //진료과코드 진료의ID 조회
  125. pamGetDeptCDDrIDList();
  126. zbcfGetCodeList(new Array("P0341"), new Array("/root/init_com/init/P0341list"));
  127. model.setValue("/root/main/beforersrv/orddd" , getCurrentDate());
  128. model.setValue("/root/main/afterrsrv/orddd" , getCurrentDate());
  129. model.removeNodeset("/root/main/beforersrv/bfrsrvspec/rsrvspeclist");
  130. model.removeNodeset("/root/main/afterrsrv/aftrsrvspec/rsrvspeclist");
  131. var orddeptcd = '';
  132. var orddrid = '';
  133. //var pid = '';
  134. // //센터 선 적용 여부 체크
  135. // CENTERYN = fCheckCenterYN();
  136. // if( CENTERYN == 'Y' ){
  137. // cmb_centcd.visible = true;
  138. // combo3.visible = false;
  139. // combo4.visible = false;
  140. // }else{
  141. // cmb_centcd.visible = false;
  142. // combo3.visible = false;
  143. // combo4.visible = false;
  144. // }
  145. //간호 요청사항 추가
  146. var node = getGlobalVariable("paminfo");
  147. if(node != '' && node != null){
  148. setCSVToNode("/root/temp/paminfo", node);
  149. var ioflag = model.getValue("/root/temp/paminfo/list/ioflag");
  150. if( ioflag == 'O' || ioflag == 'o' ){
  151. orddrid = model.getValue("/root/temp/paminfo/list/orddrid");
  152. }else{
  153. orddrid = model.getValue("/root/temp/paminfo/list/medispclid");
  154. }
  155. orddeptcd = model.getValue("/root/temp/paminfo/list/orddeptcd");
  156. //pid = model.getValue("/root/temp/paminfo/list/pid");
  157. }else if(checkOpener()){ //팝업화면으로 사용될 때
  158. orddeptcd = opener.javascript.getParameter("SMPMO00900_PARM1");
  159. orddrid = opener.javascript.getParameter("SMPMO00900_PARM2");
  160. //pid = opener.javascript.getParameter("SMPMO00900_PARM3");
  161. setParameter("SMPMO00900_PARM1", "");
  162. setParameter("SMPMO00900_PARM2", "");
  163. //setParameter("SMPMO00900_PARM3", "");
  164. }
  165. //2008-08-06 이동식 추가
  166. //간호 임미정 선생님 요구사항
  167. //해당간호 진료과로 세팅..
  168. if (orddeptcd == null || orddeptcd == "" || orddeptcd == " " || orddeptcd == "-"){
  169. orddeptcd = model.getValue("/root/hidden/session/sess_dutplcecd");
  170. }
  171. //진료과, 진료의, 등록번호가 넘어오면 화면이 열릴 때 조회해준다.
  172. if(orddeptcd != null && orddeptcd != "" && orddeptcd != " " && orddeptcd != "-"){
  173. //변경 전
  174. model.setValue("/root/main/beforersrv/orddeptcd", orddeptcd);
  175. cmb_bforddeptcd.dispatch("xforms-value-changed");
  176. //변경 후
  177. model.setValue("/root/main/afterrsrv/orddeptcd", orddeptcd);
  178. cmb_aftorddeptcd.dispatch("xforms-value-changed");
  179. }
  180. if(orddrid != null && orddrid != "" && orddrid != " " && orddrid != "-"){
  181. model.setValue("/root/main/beforersrv/orddrid",orddrid); //변경 전
  182. model.setValue("/root/main/afterrsrv/orddrid",orddrid); //변경 후
  183. }
  184. //END..
  185. model.refresh();
  186. ]]>
  187. </script>
  188. <script type="javascript">
  189. <![CDATA[
  190. //예약내역 변경
  191. function fUpdtRsrvSpec( rsrvCnt ){
  192. model.removeNodeset("/root/send/updtrsrv/updtrsrvlist");
  193. model.makeNode("/root/send/updtrsrv/updtrsrvlist");
  194. var bfPath = "/root/main/beforersrv/bfrsrvspec/rsrvspeclist";
  195. var aftPath = "/root/main/afterrsrv/aftrsrvspec/rsrvspeclist";
  196. //2007-10-17 이동식 추가 - 변경취소사유 입력
  197. modal("SPPMO01000", "1","400", "400", "SPPMO01000", "/root/hidden/enrcomncode", "/root/hidden/enrcomncode");
  198. var updtcnclresn = getParameter("SPPMO01000_updtcnclresn");
  199. var updtcnclresncd = getParameter("SPPMO01000_updtcnclresncd");
  200. model.setValue("/root/main/updtcnclresn", updtcnclresn);
  201. model.setValue("/root/main/updtcnclresncd", updtcnclresncd);
  202. if(parseInt( rsrvCnt ) == 1){
  203. var bfRow = fGetRowNum(0, bfPath);
  204. var aftRow = fGetRowNum(0, aftPath);
  205. if(model.getValue(bfPath + "[" + bfRow + "]/otpt_dracptyn") == "Y"){
  206. messageBox("이미 진료본 내역입니다!","E999","");
  207. return false;
  208. }
  209. copyNodeWithPostfix("/root/send/updtrsrv/updtrsrvlist", bfPath + "[" + bfRow + "]", "_old");
  210. model.makeValue("/root/send/updtrsrv/updtrsrvlist/otpt_flag" , 'U');
  211. model.makeValue("/root/send/updtrsrv/updtrsrvlist/orddeptcd" , model.getValue( "/root/main/afterrsrv/orddeptcd" ));
  212. model.makeValue("/root/send/updtrsrv/updtrsrvlist/subdeptcd" , model.getValue( "/root/main/afterrsrv/subdeptcd" ));
  213. model.makeValue("/root/send/updtrsrv/updtrsrvlist/centcd" , model.getValue("/root/main/afterrsrv/centcd"));
  214. var orddrid = model.getValue( "/root/main/afterrsrv/orddrid");
  215. model.makeValue("/root/send/updtrsrv/updtrsrvlist/orddrid" , orddrid);
  216. var userspec = model.getValue("/root/init/orddrid[cd='"+ orddrid +"']/sp");
  217. if(userspec == 'Y'){
  218. model.makeValue("/root/send/updtrsrv/updtrsrvlist/specordyn" , "Y");
  219. }else{
  220. model.makeValue("/root/send/updtrsrv/updtrsrvlist/specordyn" , "N");
  221. }
  222. model.makeValue("/root/send/updtrsrv/updtrsrvlist/sess_dutplceinstcd" , model.getValue( bfPath + "[" + bfRow + "]/otpt_instcd" ));
  223. model.makeValue("/root/send/updtrsrv/updtrsrvlist/sess_userid" , model.getValue( bfPath + "[" + bfRow + "]/otpt_lastupdtrid" ));
  224. model.makeValue("/root/send/updtrsrv/updtrsrvlist/orddd" , model.getValue( "/root/main/afterrsrv/orddd" ));
  225. model.makeValue("/root/send/updtrsrv/updtrsrvlist/ordtm" , model.getValue( aftPath + "[" + aftRow + "]/otpt_ordtm" ));
  226. model.makeValue("/root/send/updtrsrv/updtrsrvlist/updtcnclresn" , model.getValue( "/root/main/updtcnclresn" ));
  227. }else if( parseInt( rsrvCnt ) > 1 ){
  228. var row = 0;
  229. for(var i=1; i<=parseInt(rsrvCnt); i++){
  230. var bfRow = fGetRowNum(row, bfPath);
  231. row = bfRow;
  232. //var aftRow = fGetRowNum(0, aftPath);
  233. if(model.getValue( bfPath + "[" + bfRow + "]/otpt_dracptyn" ) == "Y"){
  234. messageBox("이미 진료본 내역입니다!","E999","");
  235. return false;
  236. }
  237. model.makeNode("/root/send/updtrsrv/updtrsrvlist[" + i + "]");
  238. copyNodeWithPostfix("/root/send/updtrsrv/updtrsrvlist[" + i + "]", bfPath + "[" + bfRow + "]", "_old");
  239. model.makeValue("/root/send/updtrsrv/updtrsrvlist[" + i + "]/otpt_flag" , 'U');
  240. model.makeValue("/root/send/updtrsrv/updtrsrvlist[" + i + "]/orddeptcd" , model.getValue( "/root/main/afterrsrv/orddeptcd" ));
  241. model.makeValue("/root/send/updtrsrv/updtrsrvlist[" + i + "]/subdeptcd" , model.getValue( "/root/main/afterrsrv/subdeptcd" ));
  242. model.makeValue("/root/send/updtrsrv/updtrsrvlist[" + i + "]/centcd" , model.getValue("/root/main/afterrsrv/centcd"));
  243. var orddrid = model.getValue( "/root/main/afterrsrv/orddrid" );
  244. model.makeValue("/root/send/updtrsrv/updtrsrvlist[" + i + "]/orddrid" , orddrid);
  245. var userspec = model.getValue("/root/init/orddrid[cd='"+ orddrid +"']/sp");
  246. if( userspec == 'Y' ){
  247. model.makeValue("/root/send/updtrsrv/updtrsrvlist[" + i + "]/specordyn" , "Y");
  248. }else{
  249. model.makeValue("/root/send/updtrsrv/updtrsrvlist[" + i + "]/specordyn" , "N");
  250. }
  251. model.makeValue("/root/send/updtrsrv/updtrsrvlist[" + i + "]/orddd" , model.getValue( "/root/main/afterrsrv/orddd" ));
  252. model.makeValue("/root/send/updtrsrv/updtrsrvlist[" + i + "]/ordtm" , model.getValue( bfPath + "[" + bfRow + "]/otpt_ordtm" ));
  253. model.makeValue("/root/send/updtrsrv/updtrsrvlist[" + i + "]/updtcnclresn" , model.getValue( "/root/main/updtcnclresn" ));
  254. model.makeValue("/root/send/updtrsrv/updtrsrvlist[" + i + "]/sess_dutplceinstcd" , model.getValue( bfPath + "[" + bfRow + "]/otpt_instcd" ));
  255. model.makeValue("/root/send/updtrsrv/updtrsrvlist[" + i + "]/sess_userid" , model.getValue( bfPath + "[" + bfRow + "]/otpt_lastupdtrid" ));
  256. }
  257. }else{
  258. return false;
  259. }
  260. if(submit("TXPMO00302")){
  261. //차트대출 신청
  262. // fReqChartLend();
  263. btn_aftsearch.dispatch("DOMActivate");
  264. btn_bfsearch.dispatch("DOMActivate");
  265. model.resetInstanceNode("/root/main/updtcnclresn");
  266. model.resetInstanceNode("/root/main/updtcnclresncd");
  267. model.refresh();
  268. }
  269. }
  270. //차트대출 신청
  271. function fReqChartLend(){
  272. var bfChartCnt = getNodesetCount("/root/send/updtrsrv/updtrsrvlist");
  273. var aftChartCnt = getNodesetCount("/root/hidden/rcv/chart/chartlist");
  274. if( bfChartCnt == aftChartCnt && bfChartCnt > 0){
  275. if( getNodesetCount("/root/hidden/rcv/chart/chartlist") < 1 ){
  276. return false;
  277. }
  278. model.removeNodeset("/root/send/chart");
  279. for( var i = 1; i <= bfChartCnt; i++){
  280. if( model.getValue("/root/send/updtrsrv/updtrsrvlist[" + i + "]/otpt_pid_old").length > 1 && model.getValue("/root/send/updtrsrv/updtrsrvlist[" + i + "]/otpt_tablename_old") != 'temp' ){
  281. model.makeValue("/root/send/chart["+ i +"]/high_flag", "U");
  282. model.makeValue("/root/send/chart["+ i +"]/flag", "D");
  283. model.makeValue("/root/send/chart["+ i +"]/pid", model.getValue("/root/send/updtrsrv/updtrsrvlist[" + i + "]/otpt_pid_old"));
  284. model.makeValue("/root/send/chart["+ i +"]/orddd", model.getValue("/root/send/updtrsrv/updtrsrvlist[" + i + "]/otpt_orddd_old"));
  285. model.makeValue("/root/send/chart["+ i +"]/cretno", model.getValue("/root/send/updtrsrv/updtrsrvlist[" + i + "]/otpt_cretno_old"));
  286. model.makeValue("/root/send/chart["+ i +"]/acptseqno", model.getValue("/root/send/updtrsrv/updtrsrvlist[" + i + "]/otpt_acptseqno_old"));
  287. model.makeValue("/root/send/chart["+ i +"]/orddeptcd", model.getValue("/root/send/updtrsrv/updtrsrvlist[" + i + "]/otpt_orddeptcd_old"));
  288. model.makeValue("/root/send/chart["+ i +"]/orddrid", model.getValue("/root/send/updtrsrv/updtrsrvlist[" + i + "]/otpt_orddrid_old"));
  289. model.makeValue("/root/send/chart["+ i +"]/ordtm", model.getValue("/root/send/updtrsrv/updtrsrvlist[" + i + "]/otpt_ordtm_old"));
  290. model.makeValue("/root/send/chart["+ i +"]/fsexamflag", model.getValue("/root/send/updtrsrv/updtrsrvlist[" + i + "]/otpt_fsexamflag_old"));
  291. model.makeValue("/root/send/chart2["+ i +"]/high_flag", "U");
  292. model.makeValue("/root/send/chart2["+ i +"]/flag", "I");
  293. model.makeValue("/root/send/chart2["+ i +"]/pid", model.getValue("/root/hidden/rcv/chart/chartlist[" + i + "]/otpt_pid"));
  294. model.makeValue("/root/send/chart2["+ i +"]/orddd", model.getValue("/root/hidden/rcv/chart/chartlist[" + i + "]/otpt_orddd"));
  295. model.makeValue("/root/send/chart2["+ i +"]/cretno", model.getValue("/root/hidden/rcv/chart/chartlist[" + i + "]/otpt_cretno"));
  296. model.makeValue("/root/send/chart2["+ i +"]/acptseqno", model.getValue("/root/hidden/rcv/chart/chartlist[" + i + "]/otpt_acptseqno"));
  297. model.makeValue("/root/send/chart2["+ i +"]/orddeptcd", model.getValue("/root/hidden/rcv/chart/chartlist[" + i + "]/otpt_orddeptcd"));
  298. model.makeValue("/root/send/chart2["+ i +"]/orddrid", model.getValue("/root/hidden/rcv/chart/chartlist[" + i + "]/otpt_orddrid"));
  299. model.makeValue("/root/send/chart2["+ i +"]/ordtm", model.getValue("/root/hidden/rcv/chart/chartlist[" + i + "]/otpt_ordtm"));
  300. model.makeValue("/root/send/chart2["+ i +"]/fsexamflag", model.getValue("/root/hidden/rcv/chart/chartlist[" + i + "]/otpt_fsexamflag"));
  301. }
  302. }
  303. copyNodeType("/root/send/chart", "/root/send/chart2", "after");
  304. submit("TXPMO00105");
  305. model.removeNodeset("/root/send/chart");
  306. model.resetInstanceNode("/root/hidden/rcv");
  307. }
  308. }
  309. //체크된 ROW 번호를 구한다.
  310. function fGetRowNum( row , strPath ){
  311. var count = getNodesetCount( strPath );
  312. var nextRow = 0;
  313. for( var i = row + 1; i <= count; i++){
  314. if( model.getValue( strPath + "[" + i + "]/check") == 'Y' ){
  315. nextRow = i;
  316. return nextRow;
  317. }
  318. }
  319. return nextRow;
  320. }
  321. //선택된 예약내역 카운트
  322. function fCountCheckValue(strPath){
  323. var count = getNodesetCount( strPath );
  324. var check = 0;
  325. for( var i = 1; i <= count; i++){
  326. if( model.getValue( strPath + "[" + i + "]/check") == 'Y' ){
  327. check = check + 1;
  328. }
  329. }
  330. return check;
  331. }
  332. //진료과 의사별 예약리스트 조회..
  333. function fPatRsrvInfoRef(centcd, orddeptcd, subdeptcd, orddrid, orddd, ordtmflag){
  334. model.resetInstanceNode("/root/send");
  335. if(!isValidDateTime(orddd, "YYYYMMDD")){
  336. messageBox("유효한 날짜가 아닙니다. 진료일자를 확인 후 다시 입력해 주세요", "E999", "");
  337. return false;
  338. }
  339. model.setValue("/root/send/centcd" , centcd);
  340. model.setValue("/root/send/orddeptcd" , orddeptcd);
  341. model.setValue("/root/send/subdeptcd" , subdeptcd);
  342. model.setValue("/root/send/orddrid" , orddrid);
  343. model.setValue("/root/send/orddd" , orddd);
  344. model.setValue("/root/send/ordtmflag" , ordtmflag);
  345. model.setValue("/root/send/srchflag" , "1");
  346. if(submit("TRPMO00901") == true){
  347. }
  348. }
  349. //해당일자 진료가 등록된 진료의 아이디 조회
  350. function fgetOtptDrID(centcd, orddeptcd, subdeptcd, orddd){
  351. model.resetInstanceNode("/root/send");
  352. if(orddd == ''){
  353. return false;
  354. }
  355. if(!isValidDateTime(orddd, "YYYYMMDD")){
  356. messageBox("유효한 날짜가 아닙니다. 진료일자를 확인 후 다시 입력해 주세요", "E999", "");
  357. return false;
  358. }
  359. model.setValue("/root/send/centcd" , centcd);
  360. model.setValue("/root/send/orddeptcd" , orddeptcd);
  361. model.setValue("/root/send/subdeptcd" , subdeptcd);
  362. model.setValue("/root/send/orddd" , orddd);
  363. if(submit("TRPMO00902")){
  364. model.setValue("/root/main/beforersrv/orddrid", "");
  365. return true;
  366. }else{
  367. messageBox("진료의 정보를 가져오지 못했습니다.","E999", "");
  368. return false;
  369. }
  370. }
  371. ]]>
  372. </script>
  373. </xhtml:head>
  374. <xhtml:body>
  375. <datagrid id="datagrid6" nodeset="/root/main/afterrsrv/aftrsrvspec/rsrvspeclist" allowselection="false" caption="^시간^등록번호^성명^수납^예약구분^진료여부^remark" colsep="^" colwidth="20, 45, 60, 70, 45, 55, 60, 200, 100, 100, 100, 100" defaultrows="0" mergecellsfixedrows="bycolrec" rowsep="|" style="left:630px; top:130px; width:575px; height:538px; ">
  376. <col checkvalue="Y,N" ref="check" type="checkbox"/>
  377. <col ref="otpt_ordtm" format="hh:nn" style="text-align:center; "/>
  378. <col ref="otpt_pid"/>
  379. <col ref="ptbs_hngnm" style="text-align:center; "/>
  380. <col disabled="true" ref="otpt_histstat" type="combo" style="text-align:center; ">
  381. <choices>
  382. <item>
  383. <label>수납</label>
  384. <value>R</value>
  385. </item>
  386. <item>
  387. <label>미수납</label>
  388. <value>T</value>
  389. </item>
  390. </choices>
  391. </col>
  392. <col disabled="true" ref="otpt_rsrvflag" type="combo" style="text-align:center; ">
  393. <choices>
  394. <itemset nodeset="/root/init_com/init/P0341list/P0341">
  395. <label ref="cdnm"/>
  396. <value ref="cdid"/>
  397. </itemset>
  398. </choices>
  399. </col>
  400. <col ref="otpt_dracptyn" style="text-align:center; "/>
  401. <col disabled="true" editmode="input" ref="otpt_remfact" type="input"/>
  402. <col ref="ptbs_hometel" visibility="hidden"/>
  403. <col ref="ptbs_mpphontel" visibility="hidden"/>
  404. <col disabled="true" ref="otpt_fsexamflag" type="combo" visibility="hidden">
  405. <choices>
  406. <item>
  407. <label>신환</label>
  408. <value>F</value>
  409. </item>
  410. <item>
  411. <label>과초</label>
  412. <value>D</value>
  413. </item>
  414. <item>
  415. <label>재진</label>
  416. <value>R</value>
  417. </item>
  418. <item>
  419. <label>상초</label>
  420. <value>S</value>
  421. </item>
  422. </choices>
  423. </col>
  424. <col disabled="true" ref="otpt_remfactcd" type="combo" visibility="hidden">
  425. <choices>
  426. <itemset nodeset="/root/hidden/enrcomncode/remark">
  427. <label ref="nm"/>
  428. <value ref="nm"/>
  429. </itemset>
  430. </choices>
  431. </col>
  432. </datagrid>
  433. <input id="input1" ref="/root/main/updtcnclresn" visibility="hidden" style="left:760px; top:672px; width:445px; height:19px; "/>
  434. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:800px; height:14px; ">대진예약변경</caption>
  435. <line id="line4" class="line_1" style="x1:630px; y1:125px; x2:1205px; y2:125px; "/>
  436. <script type="javascript" ev:event="onmousedown">
  437. <![CDATA[
  438. if (event.button == 3 && !datagrid6.isCell(event.target) ) {
  439. window.setPopupMenu(false);
  440. }
  441. ]]>
  442. </script>
  443. <caption id="caption14" class="tit_2" visibility="hidden" style="left:655px; top:675px; width:105px; height:13px; ">변경취소사유 :</caption>
  444. <select1 id="combo2" ref="/root/main/updtcnclresncd" visibility="hidden" appearance="minimal" style="left:1185px; top:672px; width:20px; height:19px; ">
  445. <choices>
  446. <itemset nodeset="/root/hidden/enrcomncode/chngcnclresn">
  447. <label ref="nm"/>
  448. <value ref="cd"/>
  449. </itemset>
  450. </choices>
  451. <script type="javascript" ev:event="xforms-value-changed">
  452. <![CDATA[
  453. model.setValue("/root/hidden/con/updtcnclresn", combo2.value);
  454. ]]>
  455. </script>
  456. </select1>
  457. <group id="group2" style="left:0px; top:60px; width:575px; height:60px; vertical-align:top; ">
  458. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:575px; height:60px; "/>
  459. <caption id="caption3" class="search_name" style="left:178px; top:33px; width:86px; height:17px; ">진료일자 :</caption>
  460. <input id="ipt_bforddd" ref="/root/main/beforersrv/orddd" class="input_s_essential" navindex="3" inputtype="date" style="left:265px; top:32px; width:95px; height:19px; ">
  461. <script type="javascript" ev:event="xforms-value-changed">
  462. <![CDATA[
  463. //해당일자 진료가 등록된 진료의 아이디 조회
  464. var centcd = model.getValue("/root/main/beforersrv/centcd");
  465. var orddeptcd = model.getValue("/root/main/beforersrv/orddeptcd");
  466. var subdeptcd = model.getValue("/root/main/beforersrv/subdeptcd");
  467. var orddrid = model.getValue("/root/main/beforersrv/orddrid");
  468. var orddd = model.getValue("/root/main/beforersrv/orddd");
  469. var ordtmflag = model.getValue("/root/main/beforersrv/ordtmflag");
  470. if(!fgetOtptDrID(centcd, orddeptcd, subdeptcd, orddd)){
  471. return false;
  472. }
  473. cmb_bforddrid.choices.itemset.attribute("nodeset") = "/root/tmp/orddrid/orddridlist";
  474. combo4.choices.itemset.attribute("nodeset") = "/root/tmp/orddrid/orddridlist";
  475. model.setValue("/root/main/beforersrv/orddrid", "");
  476. model.removeNodeset("/root/main/beforersrv/bfrsrvspec/rsrvspeclist");
  477. model.refresh();
  478. ]]>
  479. </script>
  480. </input>
  481. <select1 id="cmb_bforddrid" ref="/root/main/beforersrv/orddrid" navindex="2" appearance="minimal" style="left:75px; top:32px; width:97px; height:19px; ">
  482. <choices>
  483. <itemset nodeset="/root/init/orddrid/orddridlist">
  484. <label ref="nm"/>
  485. <value ref="cd"/>
  486. </itemset>
  487. </choices>
  488. </select1>
  489. <select1 id="cmb_bforddeptcd" ref="/root/main/beforersrv/orddeptcd" navindex="1" appearance="minimal" style="left:252px; top:8px; width:120px; height:19px; ">
  490. <choices>
  491. <itemset nodeset="/root/init/orddeptcd/orddeptcdlist">
  492. <label ref="nm"/>
  493. <value ref="cd"/>
  494. </itemset>
  495. </choices>
  496. <script type="javascript" ev:event="xforms-value-changed">
  497. <![CDATA[
  498. //해당일자 진료가 등록된 진료의 아이디 조회
  499. var centcd = model.getValue("/root/main/beforersrv/centcd");
  500. if(centcd == '' || centcd == ' '){
  501. centcd = '-';
  502. }
  503. var orddeptcd = model.getValue("/root/main/beforersrv/orddeptcd");
  504. var subdeptcd = model.getValue("/root/main/beforersrv/subdeptcd");
  505. var orddrid = model.getValue("/root/main/beforersrv/orddrid");
  506. var orddd = model.getValue("/root/main/beforersrv/orddd");
  507. var ordtmflag = model.getValue("/root/main/beforersrv/ordtmflag");
  508. if(!fgetOtptDrID(centcd, orddeptcd, subdeptcd, orddd)){
  509. return false;
  510. }
  511. cmb_bforddrid.choices.itemset.attribute("nodeset") = "/root/tmp/orddrid/orddridlist";
  512. //sub진료과 세팅 2008-09-12 추가
  513. cmb_bfsubdeptcd.choices.itemset.attribute("nodeset") = "/root/init/subdeptcd/subdeptcdlist[dp = '"+ orddeptcd +"' or dp = '-']";
  514. model.setValue("/root/main/beforersrv/subdeptcd", "-");
  515. cmb_bfsubdeptcd.refresh();
  516. combo4.visible = false;
  517. cmb_bforddrid.visible = true;
  518. //간호과 참고사항 및 변경/취소사항 코드 조회
  519. //model.resetInstanceNode("/root/send");
  520. fSubmitBefore();
  521. fSubmitAfter();
  522. if(centcd == '-'){
  523. model.setValue("/root/send/data1", orddeptcd);
  524. }else{
  525. model.setValue("/root/send/data1", centcd);
  526. }
  527. model.setValue("/root/send/data2", model.getValue("/root/init/orddeptcd[ cd = '" + orddeptcd + "' ]/deptengabbr"));
  528. if(!submit("TRPMO00305")){
  529. messageBox("참고사항 및 변경/취소사항 코드를 가져오지 못했습니다.","E999", "");
  530. return false;
  531. }
  532. model.removenode("/root/send/data1");
  533. model.setValue("/root/main/beforersrv/orddrid", "");
  534. model.removeNodeset("/root/main/beforersrv/bfrsrvspec/rsrvspeclist");
  535. model.refresh();
  536. ]]>
  537. </script>
  538. </select1>
  539. <caption id="caption4" class="search_name" style="left:178px; top:9px; width:74px; height:17px; ">진료과 :</caption>
  540. <caption id="caption5" class="search_name" style="left:5px; top:33px; width:87px; height:17px; ">진료의 :</caption>
  541. <button id="btn_bfsearch" class="btn1_letter2" navindex="4" style="left:514px; top:19px; width:56px; height:22px; ">
  542. <caption>조회</caption>
  543. <script type="javascript" ev:event="DOMActivate">
  544. <![CDATA[
  545. var centcd = model.getValue("/root/main/beforersrv/centcd");
  546. var orddeptcd = model.getValue("/root/main/beforersrv/orddeptcd");
  547. var subdeptcd = model.getValue("/root/main/beforersrv/subdeptcd");
  548. var orddrid = model.getValue("/root/main/beforersrv/orddrid");
  549. var orddd = model.getValue("/root/main/beforersrv/orddd");
  550. var ordtmflag = model.getValue("/root/main/beforersrv/ordtmflag");
  551. if(orddeptcd == '' || orddrid == '' || orddd == '' || orddeptcd == '-' || orddrid == '-' || orddd == '-'){
  552. messageBox("진료과/진료의/진료일자 정보를 모두 입력한 후 조회해 주세요.", "E999", "");
  553. return false;
  554. }
  555. model.removeNodeset("/root/main/beforersrv/bfrsrvspec");
  556. model.makeNode("/root/main/beforersrv/bfrsrvspec");
  557. fPatRsrvInfoRef(centcd, orddeptcd, subdeptcd, orddrid, orddd, ordtmflag);
  558. model.copyNode("/root/main/beforersrv/bfrsrvspec", "/root/main/result");
  559. datagrid1.rebuild();
  560. ]]>
  561. </script>
  562. </button>
  563. <line id="line2" class="line_4" style="x1:508px; y1:8px; x2:508px; y2:51px; "/>
  564. <select1 id="cmb_bfsubdeptcd" ref="/root/main/beforersrv/subdeptcd" navindex="1" appearance="minimal" style="left:390px; top:10px; width:90px; height:19px; ">
  565. <choices>
  566. <itemset nodeset="/root/init/subdeptcd/subdeptcdlist">
  567. <label ref="nm"/>
  568. <value ref="cd"/>
  569. </itemset>
  570. </choices>
  571. <script type="javascript" ev:event="xforms-value-changed">
  572. <![CDATA[
  573. //해당일자 진료가 등록된 진료의 아이디 조회
  574. var centcd = model.getValue("/root/main/beforersrv/centcd");
  575. var orddeptcd = model.getValue("/root/main/beforersrv/orddeptcd");
  576. var subdeptcd = model.getValue("/root/main/beforersrv/subdeptcd");
  577. var orddrid = model.getValue("/root/main/beforersrv/orddrid");
  578. var orddd = model.getValue("/root/main/beforersrv/orddd");
  579. var ordtmflag = model.getValue("/root/main/beforersrv/ordtmflag");
  580. if(!fgetOtptDrID(centcd, orddeptcd, subdeptcd, orddd)){
  581. return false;
  582. }
  583. cmb_bforddrid.choices.itemset.attribute("nodeset") = "/root/tmp/orddrid/orddridlist";
  584. model.setValue("/root/main/beforersrv/orddrid", "");
  585. model.removeNodeset("/root/main/beforersrv/bfrsrvspec/rsrvspeclist");
  586. model.refresh();
  587. ]]>
  588. </script>
  589. </select1>
  590. <caption id="caption11" class="search_name" style="left:5px; top:9px; width:60px; height:17px; ">센터 :</caption>
  591. <select1 id="combo1" ref="/root/main/beforersrv/centcd" navindex="2" appearance="minimal" style="left:67px; top:8px; width:105px; height:19px; ">
  592. <choices>
  593. <itemset nodeset="/root/init/centcd/centcdlist">
  594. <label ref="nm"/>
  595. <value ref="cd"/>
  596. </itemset>
  597. </choices>
  598. <script type="javascript" ev:event="xforms-value-changed">
  599. <![CDATA[
  600. var centcd = model.getValue("/root/main/beforersrv/centcd");
  601. if(centcd == '' || centcd == '-'){
  602. combo3.visible = false;
  603. combo4.visible = false;
  604. cmb_bforddeptcd.visible = true;
  605. cmb_bforddrid.visible = true;
  606. model.setValue("/root/main/beforersrv/orddeptcd", '-');
  607. model.setValue("/root/main/beforersrv/subdeptcd", '-');
  608. model.setValue("/root/main/beforersrv/orddrid", '-');
  609. }else{
  610. var instcd = model.getValue("/root/hidden/session/sess_dutplceinstcd");
  611. var deptcd = model.getValue("/root/main/beforersrv/centcd");
  612. var base_dd = new Date().getDateFormat("YYYYMMDD");
  613. var sort_field = "dispseq"; //정렬필드(출력순서:'dispseq')
  614. var sort_method = "asc"; //정렬방법(오름차순:'asc')
  615. zsufGetCntrSubOrdDepartmentList(instcd, deptcd, 'O', "/root/hidden/init/before/cntrsuborddeptlist", base_dd);
  616. // zsufGetCntrOrdDeptDoctorList(instcd, deptcd, 'O', "/root/hidden/init/before/cntrorddeptdoctorlist",sort_field, sort_method, base_dd);
  617. model.setValue("/root/main/beforersrv/orddeptcd", '-');
  618. model.setValue("/root/main/beforersrv/subdeptcd", '-');
  619. model.setValue("/root/main/beforersrv/orddrid", '-');
  620. //해당일자 진료가 등록된 진료의 아이디 조회
  621. // var centcd = model.getValue("/root/main/beforersrv/centcd");
  622. var orddeptcd = model.getValue("/root/main/beforersrv/orddeptcd");
  623. var subdeptcd = model.getValue("/root/main/beforersrv/subdeptcd");
  624. var orddrid = model.getValue("/root/main/beforersrv/orddrid");
  625. var orddd = model.getValue("/root/main/beforersrv/orddd");
  626. var ordtmflag = model.getValue("/root/main/beforersrv/ordtmflag");
  627. if(!fgetOtptDrID(centcd, orddeptcd, subdeptcd, orddd)){
  628. return false;
  629. }
  630. combo4.choices.itemset.attribute("nodeset") = "/root/tmp/orddrid/orddridlist";
  631. combo3.visible = true;
  632. combo4.visible = true;
  633. cmb_bforddeptcd.visible = false;
  634. cmb_bforddrid.visible = false;
  635. model.setValue("/root/main/beforersrv/orddrid", "");
  636. model.removeNodeset("/root/main/beforersrv/bfrsrvspec/rsrvspeclist");
  637. }
  638. model.refresh();
  639. ]]>
  640. </script>
  641. </select1>
  642. <select1 id="combo3" ref="/root/main/beforersrv/orddeptcd" visibility="hidden" appearance="minimal" style="left:252px; top:8px; width:120px; height:19px; ">
  643. <choices>
  644. <itemset nodeset="/root/hidden/init/before/cntrsuborddeptlist/dept">
  645. <label ref="depthngnm"/>
  646. <value ref="deptcd"/>
  647. </itemset>
  648. </choices>
  649. <script type="javascript" ev:event="xforms-value-changed">
  650. <![CDATA[
  651. //해당일자 진료가 등록된 진료의 아이디 조회
  652. var centcd = model.getValue("/root/main/beforersrv/centcd");
  653. if(centcd == '' || centcd == ' '){
  654. centcd = '-';
  655. }
  656. var orddeptcd = model.getValue("/root/main/beforersrv/orddeptcd");
  657. var subdeptcd = model.getValue("/root/main/beforersrv/subdeptcd");
  658. var orddrid = model.getValue("/root/main/beforersrv/orddrid");
  659. var orddd = model.getValue("/root/main/beforersrv/orddd");
  660. var ordtmflag = model.getValue("/root/main/beforersrv/ordtmflag");
  661. if(!fgetOtptDrID(centcd, orddeptcd, subdeptcd, orddd)){
  662. return false;
  663. }
  664. cmb_bforddrid.choices.itemset.attribute("nodeset") = "/root/tmp/orddrid/orddridlist";
  665. //sub진료과 세팅 2008-09-12 추가
  666. cmb_bfsubdeptcd.choices.itemset.attribute("nodeset") = "/root/init/subdeptcd/subdeptcdlist[dp = '"+ orddeptcd +"' or dp = '-']";
  667. model.setValue("/root/main/beforersrv/subdeptcd", "-");
  668. cmb_bfsubdeptcd.refresh();
  669. combo4.visible = false;
  670. cmb_bforddrid.visible = true;
  671. //간호과 참고사항 및 변경/취소사항 코드 조회
  672. //model.resetInstanceNode("/root/send");
  673. fSubmitBefore();
  674. fSubmitAfter();
  675. if(centcd == '-'){
  676. model.setValue("/root/send/data1", orddeptcd);
  677. }else{
  678. model.setValue("/root/send/data1", centcd);
  679. }
  680. model.setValue("/root/send/data2", model.getValue("/root/init/orddeptcd[ cd = '" + orddeptcd + "' ]/deptengabbr"));
  681. if( ! submit("TRPMO00305")){
  682. messageBox("참고사항 및 변경/취소사항 코드를 가져오지 못했습니다.","E999", "");
  683. return false;
  684. }
  685. model.removenode("/root/send/data1");
  686. model.setValue("/root/main/beforersrv/orddrid", "");
  687. model.removeNodeset("/root/main/beforersrv/bfrsrvspec/rsrvspeclist");
  688. model.refresh();
  689. ]]>
  690. </script>
  691. </select1>
  692. <select1 id="combo4" ref="/root/main/beforersrv/orddrid" visibility="hidden" appearance="minimal" style="left:75px; top:32px; width:97px; height:19px; ">
  693. <!--
  694. <choices>
  695. <itemset nodeset="/root/hidden/init/before/cntrorddeptdoctorlist/user">
  696. <label ref="usernm"/>
  697. <value ref="userid"/>
  698. </itemset>
  699. </choices>
  700. -->
  701. <choices>
  702. <itemset nodeset="/root/init/centcd/centcdlist">
  703. <label ref="nm"/>
  704. <value ref="cd"/>
  705. </itemset>
  706. </choices>
  707. </select1>
  708. <select1 id="radio1" ref="/root/main/beforersrv/ordtmflag" appearance="full" cols="3" rows="1" overflow="visible" style="left:365px; top:35px; width:130px; height:30px; border-style:none; ">
  709. <choices>
  710. <item>
  711. <label>전체</label>
  712. <value/>
  713. </item>
  714. <item>
  715. <label>오전</label>
  716. <value>AM</value>
  717. </item>
  718. <item>
  719. <label>오후</label>
  720. <value>PM</value>
  721. </item>
  722. </choices>
  723. </select1>
  724. </group>
  725. <caption id="caption1" style="left:5px; top:25px; width:130px; height:35px; font-size:20pt; font-weight:bold; ">[변경 전]</caption>
  726. <caption id="caption2" style="left:635px; top:25px; width:130px; height:35px; font-size:20pt; font-weight:bold; ">[변경 후]</caption>
  727. <datagrid id="datagrid1" nodeset="/root/main/beforersrv/bfrsrvspec/rsrvspeclist" allowselection="false" caption="^시간^등록번호^성명^수납^예약구분^진료여부^remark" colsep="^" colwidth="20, 45, 60, 70, 45, 55, 60, 200, 100, 104, 100, 100" defaultrows="0" mergecellsfixedrows="bycolrec" rowsep="|" style="left:0px; top:130px; width:575px; height:538px; ">
  728. <col checkvalue="Y,N" ref="check" type="checkbox"/>
  729. <col ref="otpt_ordtm" format="hh:nn" style="text-align:center; "/>
  730. <col ref="otpt_pid"/>
  731. <col ref="ptbs_hngnm" style="text-align:center; "/>
  732. <col disabled="true" ref="otpt_histstat" type="combo" style="text-align:center; ">
  733. <choices>
  734. <item>
  735. <label>수납</label>
  736. <value>R</value>
  737. </item>
  738. <item>
  739. <label>미수납</label>
  740. <value>T</value>
  741. </item>
  742. </choices>
  743. </col>
  744. <col disabled="true" ref="otpt_rsrvflag" type="combo" style="left:529px; top:23px; width:54px; height:23px; text-align:center; ">
  745. <choices>
  746. <itemset nodeset="/root/init_com/init/P0341list/P0341">
  747. <label ref="cdnm"/>
  748. <value ref="cdid"/>
  749. </itemset>
  750. </choices>
  751. </col>
  752. <col ref="otpt_dracptyn" style="text-align:center; "/>
  753. <col disabled="true" editmode="input" ref="otpt_remfact" type="input"/>
  754. <col ref="ptbs_hometel" visibility="hidden"/>
  755. <col ref="ptbs_mpphontel" visibility="hidden"/>
  756. <col disabled="true" ref="otpt_fsexamflag" type="combo" visibility="hidden">
  757. <choices>
  758. <item>
  759. <label>신환</label>
  760. <value>F</value>
  761. </item>
  762. <item>
  763. <label>과초</label>
  764. <value>D</value>
  765. </item>
  766. <item>
  767. <label>재진</label>
  768. <value>R</value>
  769. </item>
  770. <item>
  771. <label>상초</label>
  772. <value>S</value>
  773. </item>
  774. </choices>
  775. </col>
  776. <col disabled="true" ref="remfactcd" type="combo" visibility="hidden">
  777. <choices>
  778. <itemset nodeset="/root/hidden/enrcomncode/remark">
  779. <label ref="nm"/>
  780. <value ref="nm"/>
  781. </itemset>
  782. </choices>
  783. </col>
  784. <script type="javascript" ev:event="xforms-select">
  785. <![CDATA[
  786. var rows = getNodesetCount("/root/main/beforersrv/bfrsrvspec/rsrvspeclist/otpt_ordtm");
  787. for( var i = 1; i <= rows; i++){
  788. if( model.getValue("/root/main/beforersrv/bfrsrvspec/rsrvspeclist[" + i + "]/otpt_pid") == '' &&
  789. model.getValue("/root/main/beforersrv/bfrsrvspec/rsrvspeclist[" + i + "]/ptbs_hngnm") == '' ){
  790. model.setValue("/root/main/beforersrv/bfrsrvspec/rsrvspeclist[" + i + "]/check", 'N');
  791. }
  792. }
  793. model.refresh();
  794. ]]>
  795. </script>
  796. </datagrid>
  797. <line id="line1" class="line_1" style="x1:0px; y1:125px; x2:575px; y2:125px; "/>
  798. <group id="group1" style="left:630px; top:60px; width:575px; height:60px; vertical-align:top; ">
  799. <shape id="roundrect2" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:575px; height:60px; "/>
  800. <caption id="caption7" class="search_name" style="left:180px; top:33px; width:87px; height:17px; ">진료일자 :</caption>
  801. <input id="ipt_aftorddd" ref="/root/main/afterrsrv/orddd" class="input_s_essential" navindex="7" inputtype="date" style="left:267px; top:32px; width:95px; height:19px; "/>
  802. <select1 id="cmb_aftorddrid" ref="/root/main/afterrsrv/orddrid" navindex="6" appearance="minimal" style="left:75px; top:32px; width:97px; height:19px; ">
  803. <choices>
  804. <itemset nodeset="/root/init/orddrid/orddridlist">
  805. <label ref="nm"/>
  806. <value ref="cd"/>
  807. </itemset>
  808. </choices>
  809. </select1>
  810. <select1 id="cmb_aftorddeptcd" ref="/root/main/afterrsrv/orddeptcd" navindex="5" appearance="minimal" style="left:254px; top:8px; width:120px; height:19px; ">
  811. <choices>
  812. <itemset nodeset="/root/init/orddeptcd/orddeptcdlist">
  813. <label ref="nm"/>
  814. <value ref="cd"/>
  815. </itemset>
  816. </choices>
  817. <script type="javascript" ev:event="xforms-value-changed">
  818. <![CDATA[
  819. var orddeptcd = model.getValue("/root/main/afterrsrv/orddeptcd");
  820. var centcd = model.getValue("/root/main/afterrsrv/centcd");
  821. if( centcd == '' || centcd == ' ' ){
  822. centcd = '-';
  823. }
  824. cmb_aftorddrid.choices.itemset.attribute("nodeset") = "/root/init/orddrid/orddridlist[dp = '" + orddeptcd + "']";
  825. model.setValue("/root/main/afterrsrv/orddrid", "");
  826. model.setValue("/root/main/afterrsrv/subdeptcd", "-");
  827. //sub진료과 세팅 2008-09-12 추가
  828. cmb_aftsubdeptcd.choices.itemset.attribute("nodeset") = "/root/init/subdeptcd/subdeptcdlist[dp = '"+ orddeptcd +"' or dp = '-']";
  829. cmb_aftsubdeptcd.refresh();
  830. combo7.visible = false;
  831. cmb_aftorddrid.visible = true;
  832. //간호과 참고사항 및 변경/취소사항 코드 조회
  833. //model.resetInstanceNode("/root/send");
  834. fSubmitBefore();
  835. fSubmitAfter();
  836. if( centcd == '-' ){
  837. model.setValue("/root/send/data1", orddeptcd);
  838. }else{
  839. model.setValue("/root/send/data1", centcd);
  840. }
  841. model.setValue("/root/send/data2", model.getValue("/root/init/orddeptcd[ cd = '" + orddeptcd + "' ]/deptengabbr"));
  842. if( ! submit("TRPMO00305")){
  843. messageBox("참고사항 및 변경/취소사항 코드를 가져오지 못했습니다.","E999", "");
  844. return false;
  845. }
  846. model.removenode("/root/send/data1");
  847. model.removeNodeset("/root/main/afterrsrv/aftrsrvspec/rsrvspeclist");
  848. model.refresh();
  849. ]]>
  850. </script>
  851. </select1>
  852. <caption id="caption8" class="search_name" style="left:180px; top:9px; width:74px; height:17px; ">진료과 :</caption>
  853. <caption id="caption9" class="search_name" style="left:5px; top:33px; width:87px; height:17px; ">진료의 :</caption>
  854. <button id="btn_aftsearch" class="btn1_letter2" navindex="8" style="left:514px; top:19px; width:56px; height:22px; ">
  855. <caption>조회</caption>
  856. <script type="javascript" ev:event="DOMActivate">
  857. <![CDATA[
  858. var centcd = model.getValue("/root/main/afterrsrv/centcd");
  859. var orddeptcd = model.getValue("/root/main/afterrsrv/orddeptcd");
  860. var subdeptcd = model.getValue("/root/main/afterrsrv/subdeptcd");
  861. var orddrid = model.getValue("/root/main/afterrsrv/orddrid");
  862. var orddd = model.getValue("/root/main/afterrsrv/orddd");
  863. var ordtmflag = model.getValue("/root/main/afterrsrv/ordtmflag");
  864. if( orddeptcd == '' || orddrid == '' || orddd == ''){
  865. messageBox("진료과/진료의/진료일자 정보를 모두 입력한 후 조회해 주세요.", "E999", "");
  866. return false;
  867. }
  868. model.removeNodeset("/root/main/afterrsrv/aftrsrvspec");
  869. model.makeNode("/root/main/afterrsrv/aftrsrvspec");
  870. fPatRsrvInfoRef(centcd, orddeptcd, subdeptcd, orddrid, orddd, ordtmflag);
  871. model.copyNode("/root/main/afterrsrv/aftrsrvspec", "/root/main/result");
  872. datagrid6.rebuild();
  873. ]]>
  874. </script>
  875. </button>
  876. <line id="line3" class="line_4" style="x1:508px; y1:8px; x2:508px; y2:51px; "/>
  877. <select1 id="cmb_aftsubdeptcd" ref="/root/main/afterrsrv/subdeptcd" navindex="5" appearance="minimal" style="left:377px; top:8px; width:90px; height:19px; ">
  878. <choices>
  879. <itemset nodeset="/root/init/subdeptcd/subdeptcdlist">
  880. <label ref="nm"/>
  881. <value ref="cd"/>
  882. </itemset>
  883. </choices>
  884. <script type="javascript" ev:event="xforms-value-changed">
  885. <![CDATA[
  886. var subdeptcd = model.getValue("/root/main/afterrsrv/subdeptcd");
  887. var orddeptcd = model.getValue("/root/main/afterrsrv/orddeptcd");
  888. // if( subdeptcd != '' && subdeptcd != '-' ){
  889. //
  890. // cmb_aftorddrid.choices.itemset.attribute("nodeset") = "/root/init/orddrid/orddridlist[dp = '" + subdeptcd + "']";
  891. // model.setValue("/root/main/afterrsrv/orddrid", "");
  892. // }else{
  893. // cmb_aftorddrid.choices.itemset.attribute("nodeset") = "/root/init/orddrid/orddridlist[dp = '" + orddeptcd + "']";
  894. // model.setValue("/root/main/afterrsrv/orddrid", "");
  895. // }
  896. model.setValue("/root/main/afterrsrv/orddrid", "");
  897. model.removeNodeset("/root/main/afterrsrv/aftrsrvspec/rsrvspeclist");
  898. model.refresh();
  899. ]]>
  900. </script>
  901. </select1>
  902. <select1 id="combo5" ref="/root/main/afterrsrv/centcd" navindex="2" appearance="minimal" style="left:67px; top:8px; width:105px; height:19px; ">
  903. <choices>
  904. <itemset nodeset="/root/init/centcd/centcdlist">
  905. <label ref="nm"/>
  906. <value ref="cd"/>
  907. </itemset>
  908. </choices>
  909. <script type="javascript" ev:event="xforms-value-changed">
  910. <![CDATA[
  911. var centcd = model.getValue("/root/main/afterrsrv/centcd");
  912. if( centcd == '' || centcd == '-' ){
  913. combo6.visible = false;
  914. combo7.visible = false;
  915. cmb_aftorddeptcd.visible = true;
  916. cmb_aftorddrid.visible = true;
  917. model.setValue("/root/main/afterrsrv/orddeptcd", '-');
  918. model.setValue("/root/main/afterrsrv/subdeptcd", '-');
  919. model.setValue("/root/main/afterrsrv/orddrid", '-');
  920. }else{
  921. var instcd = model.getValue("/root/hidden/session/sess_dutplceinstcd");
  922. var deptcd = model.getValue("/root/main/afterrsrv/centcd");
  923. var base_dd = new Date().getDateFormat("YYYYMMDD");
  924. var sort_field = "dispseq";//정렬필드(출력순서:'dispseq')
  925. var sort_method = "asc"; //정렬방법(오름차순:'asc')
  926. zsufGetCntrSubOrdDepartmentList(instcd, deptcd, 'O', "/root/hidden/init/after/cntrsuborddeptlist", base_dd);
  927. zsufGetCntrOrdDeptDoctorList(instcd, deptcd, 'O', "/root/hidden/init/after/cntrorddeptdoctorlist",sort_field, sort_method, base_dd);
  928. combo6.visible = true;
  929. combo7.visible = true;
  930. cmb_aftorddeptcd.visible = false;
  931. cmb_aftorddrid.visible = false;
  932. model.setValue("/root/main/afterrsrv/orddeptcd", '-');
  933. model.setValue("/root/main/afterrsrv/subdeptcd", '-');
  934. model.setValue("/root/main/afterrsrv/orddrid", '-');
  935. }
  936. model.refresh();
  937. ]]>
  938. </script>
  939. </select1>
  940. <caption id="caption12" class="search_name" style="left:5px; top:9px; width:60px; height:17px; ">센터 :</caption>
  941. <select1 id="combo6" ref="/root/main/afterrsrv/orddeptcd" visibility="hidden" appearance="minimal" style="left:254px; top:8px; width:120px; height:19px; ">
  942. <choices>
  943. <itemset nodeset="/root/hidden/init/after/cntrsuborddeptlist/dept">
  944. <label ref="depthngnm"/>
  945. <value ref="deptcd"/>
  946. </itemset>
  947. </choices>
  948. <script type="javascript" ev:event="xforms-value-changed">
  949. <![CDATA[
  950. var orddeptcd = model.getValue("/root/main/afterrsrv/orddeptcd");
  951. var centcd = model.getValue("/root/main/afterrsrv/centcd");
  952. if( centcd == '' || centcd == ' ' ){
  953. centcd = '-';
  954. }
  955. cmb_aftorddrid.choices.itemset.attribute("nodeset") = "/root/init/orddrid/orddridlist[dp = '" + orddeptcd + "']";
  956. model.setValue("/root/main/afterrsrv/orddrid", "");
  957. model.setValue("/root/main/afterrsrv/subdeptcd", "-");
  958. //sub진료과 세팅 2008-09-12 추가
  959. cmb_aftsubdeptcd.choices.itemset.attribute("nodeset") = "/root/init/subdeptcd/subdeptcdlist[dp = '"+ orddeptcd +"' or dp = '-']";
  960. cmb_aftsubdeptcd.refresh();
  961. combo7.visible = false;
  962. cmb_aftorddrid.visible = true;
  963. //간호과 참고사항 및 변경/취소사항 코드 조회
  964. //model.resetInstanceNode("/root/send");
  965. fSubmitBefore();
  966. fSubmitAfter();
  967. if( centcd == '-' ){
  968. model.setValue("/root/send/data1", orddeptcd);
  969. }else{
  970. model.setValue("/root/send/data1", centcd);
  971. }
  972. model.setValue("/root/send/data2", model.getValue("/root/init/orddeptcd[ cd = '" + orddeptcd + "' ]/deptengabbr"));
  973. if( ! submit("TRPMO00305")){
  974. messageBox("참고사항 및 변경/취소사항 코드를 가져오지 못했습니다.","E999", "");
  975. return false;
  976. }
  977. model.removenode("/root/send/data1");
  978. model.removeNodeset("/root/main/afterrsrv/aftrsrvspec/rsrvspeclist");
  979. model.refresh();
  980. ]]>
  981. </script>
  982. </select1>
  983. <select1 id="combo7" ref="/root/main/afterrsrv/orddrid" visibility="hidden" appearance="minimal" style="left:75px; top:32px; width:97px; height:19px; ">
  984. <choices>
  985. <itemset nodeset="/root/hidden/init/after/cntrorddeptdoctorlist/user">
  986. <label ref="usernm"/>
  987. <value ref="userid"/>
  988. </itemset>
  989. </choices>
  990. </select1>
  991. <select1 id="radio2" ref="/root/main/afterrsrv/ordtmflag" appearance="full" cols="3" rows="1" overflow="visible" style="left:365px; top:35px; width:130px; height:30px; border-style:none; ">
  992. <choices>
  993. <item>
  994. <label>전체</label>
  995. <value/>
  996. </item>
  997. <item>
  998. <label>오전</label>
  999. <value>AM</value>
  1000. </item>
  1001. <item>
  1002. <label>오후</label>
  1003. <value>PM</value>
  1004. </item>
  1005. </choices>
  1006. </select1>
  1007. </group>
  1008. <button id="button3" class="icon_right" style="left:590px; top:340px; width:26px; height:19px; ">
  1009. <caption/>
  1010. <script type="javascript" ev:event="DOMActivate">
  1011. <![CDATA[
  1012. var bfCheck = fCountCheckValue("/root/main/beforersrv/bfrsrvspec/rsrvspeclist");
  1013. var aftCheck = fCountCheckValue("/root/main/afterrsrv/aftrsrvspec/rsrvspeclist");
  1014. if( getNodesetCount("/root/main/beforersrv/bfrsrvspec/rsrvspeclist") < 1 ){
  1015. messageBox("[변경 전] 예약내역을 조회해 주세요.", "E999", "");
  1016. return false;
  1017. }
  1018. if( getNodesetCount("/root/main/afterrsrv/aftrsrvspec/rsrvspeclist") < 1 ){
  1019. messageBox("[변경 후] 예약내역을 조회해 주세요.", "E999", "");
  1020. return false;
  1021. }
  1022. var orddd = model.getValue("/root/main/afterrsrv/orddd");
  1023. var today = getCurrentDate();
  1024. //20080809 이동식 추가
  1025. //임미정 선생님 요구사항
  1026. //1. 동일진료과 인경우만... 2. 과거일자로 변경 불가 3. 처방존재하는 경우 변경 불가 4. 특진에서 일반으로 변경 가능 5. 일반에서 특진변경은 원무에서만 이루어지기때문에 외래에서는 불가
  1027. if(model.getValue("/root/main/beforersrv/orddeptcd") != model.getValue("/root/main/afterrsrv/orddeptcd")){
  1028. messageBox("동일과인경우에만 대진예약변경 가능합니다. 확인 후에 다시 예약변경 해주세요!", "E999", "");
  1029. return false;
  1030. /* currentText 오류발생 주석처리 - 20140320
  1031. if(combo1.currentText == "2430000000" && combo5.currentText == "2430000000"){//신종플루센터
  1032. }else{
  1033. messageBox("동일과인경우에만 대진예약변경 가능합니다. 확인 후에 다시 예약변경 해주세요!", "E999", "");
  1034. return false;
  1035. }
  1036. */
  1037. }
  1038. var bforddrid = model.getValue("/root/main/beforersrv/orddrid");
  1039. var bforddrspecyn = model.getValue("/root/init/orddrid/orddridlist[ cd = " + bforddrid + "]/sp");
  1040. var aftorddrid = model.getValue("/root/main/afterrsrv/orddrid");
  1041. var aftorddrspecyn = model.getValue("/root/init/orddrid/orddridlist[ cd = " + aftorddrid + "]/sp");
  1042. //일반 -> 특진으로 변경 불가
  1043. if( bforddrspecyn != 'Y' && aftorddrspecyn == 'Y'){
  1044. messageBox("일반의사 -> 특진의사로 대진예약변경을 할 수 없습니다. 확인 후에 다시 예약변경 해주세요!", "E999", "");
  1045. return false;
  1046. }
  1047. if( orddd < today ){
  1048. messageBox("변경 후 진료일이 과거 일자입니다. 확인 후 다시 예약변경 해주세요!", "E999", "");
  1049. return false;
  1050. }
  1051. if( parseInt(bfCheck) == 0 ){
  1052. messageBox("[변경 전] 예약내역을 선택해 주세요.", "E999", "");
  1053. return false;
  1054. }else if( parseInt( bfCheck ) == 1 ){
  1055. if( parseInt( aftCheck ) < 1 ){
  1056. messageBox("[변경 후] 리스트의 예약시간을 선택해 주세요.", "E999", "");
  1057. return false;
  1058. }else if( parseInt( aftCheck ) == 1 ){
  1059. if( messageBox( bfCheck + "건의 예약내역을 변경하시겠습니까?" , "Q999", "") != 6 ) return false;
  1060. //예약내역 변경
  1061. fUpdtRsrvSpec(bfCheck);
  1062. }else if( parseInt( aftCheck ) > 1 ){
  1063. messageBox("[변경 후] 리스트의 예약시간을 1건만 선택해 주세요.", "E999", "");
  1064. return false;
  1065. }
  1066. }else{
  1067. if( messageBox( bfCheck + "건의 예약내역을 변경하시겠습니까?" , "Q999", "") != 6 ) return false;
  1068. //예약내역 변경
  1069. fUpdtRsrvSpec(bfCheck);
  1070. }
  1071. ]]>
  1072. </script>
  1073. </button>
  1074. <caption id="caption10" style="left:5px; top:669px; width:1196px; height:91px; ">
  1075. <![CDATA[대진예약변경 방법
  1076. ① [변경전] - 변경전 예약목록(과/의사/예약일) 조회, [변경후] - 변경등록할 예약목록(과/의사/예약일) 조회
  1077. ② [변경전] - 변경시킬 리스트 선택, 1건 변경일 경우는, [변경후] - 변경등록할 리스트 선택
  1078. ③ >> 버튼 클릭 * [변경전]에서 1건만 선택한 경우 - [변경후]의 선택된 시간으로 변경됨. * [변경전]에서 2건이상 multi선택한 경우 - [변경전]과 동일한 시간으로 변경됨
  1079. [제한] 1. 동일진료과 인경우만 변경 가능 2. 과거일자로 변경 불가 3. 처방존재하는 경우 변경 불가 4. 특진에서 일반으로 변경 가능 5. 일반에서 특진변경은 원무에서만 이루어지기때문에 외래에서는 불가
  1080. 5. 단, 센터가 신종플루센터일경우는 1번제외.]]>
  1081. </caption>
  1082. </xhtml:body>
  1083. </xhtml:html>