SPAEA03200_임시예약(사이버나이프).xrw 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035
  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>임시예약</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <example>Sample</example>
  10. <send>
  11. <globalinstance>
  12. <instance1/>
  13. </globalinstance>
  14. <date/>
  15. <suppdeptcd/>
  16. <data>
  17. <suppdeptcd/>
  18. <schergstdd/>
  19. <pid/>
  20. <instcd/>
  21. <rtno/>
  22. <schergsttm/>
  23. <schedesc/>
  24. <curersrvflag/>
  25. <hour/>
  26. <second/>
  27. <gubun/>
  28. </data>
  29. </send>
  30. <main>
  31. <patinfo>
  32. <patinfolist/>
  33. </patinfo>
  34. <PatInfo>
  35. <rsrvdd/>
  36. <reqhospcd/>
  37. <seq/>
  38. <suppdeptcd/>
  39. <srchrsrvhh/>
  40. <srchrsrvmm/>
  41. <ampmflag/>
  42. <pid/>
  43. <hngnm/>
  44. <rrgstno1/>
  45. <rrgstno2/>
  46. <age/>
  47. <sex/>
  48. <tel/>
  49. <addr/>
  50. <rsrvrem/>
  51. <flag/>
  52. </PatInfo>
  53. <send/>
  54. </main>
  55. <hidden>
  56. <calendar>
  57. <year/>
  58. <month/>
  59. <weeklist>
  60. <list>
  61. <sun/>
  62. <mon/>
  63. <tue/>
  64. <wed/>
  65. <thu/>
  66. <fri/>
  67. <sat/>
  68. <sun_memo/>
  69. <mon_memo/>
  70. <tue_memo/>
  71. <wed_memo/>
  72. <thu_memo/>
  73. <fri_memo/>
  74. <sat_memo/>
  75. </list>
  76. </weeklist>
  77. </calendar>
  78. <sppmc02500>
  79. <cond>
  80. <!-- SPPMC02500_환자조회 화면으로 검색조건을 보내는 경로임 -->
  81. <srchcond/>
  82. <pid/>
  83. <hngnm/>
  84. <rrgstno1/>
  85. <rrgstno2/>
  86. </cond>
  87. </sppmc02500>
  88. <updtflag/>
  89. </hidden>
  90. <init>
  91. <curerprescondlist>
  92. <curerprescond>
  93. <userid/>
  94. <usernm/>
  95. </curerprescond>
  96. <rsrvcalendar>
  97. <rsrvdd/>
  98. <count/>
  99. <max/>
  100. </rsrvcalendar>
  101. </curerprescondlist>
  102. <pseursrvinfo>
  103. <seq/>
  104. </pseursrvinfo>
  105. </init>
  106. </root>
  107. </instance>
  108. <!--onLoading-->
  109. <script type="javascript" ev:event="xforms-ready">
  110. <![CDATA[
  111. /*
  112. model.setValue("root/send/data/rtno","-");//default 값 셋팅
  113. model.setValue("root/send/globalinstance/instance1","2360500000")
  114. model.setValue("root/send/data/suppdeptcd","2360500000") //사이버나이프
  115. model.setValue("root/send/data/curersrvflag","Y");//치료플래그(defualt값 셋팅)
  116. */
  117. var dutplcecd = getUserInfo("dutplcecd");
  118. var selectplcecd = getScreenPrestDeptCd();
  119. if ( selectplcecd == "" ) {
  120. selectplcecd = dutplcecd;
  121. }
  122. model.setValue("/root/main/PatInfo/sex","M");
  123. model.setValue("/root/send/suppdeptcd", selectplcecd);
  124. //달력셋팅
  125. initCalendar();
  126. setCurrentDate();
  127. var seq = model.getValue("/root/init/pseursrvinfo/seq");
  128. if (seq != "") {
  129. submit("TRAEA03207");
  130. model.setValue("/root/send/data/pid", model.getValue("/root/main/PatInfo/pid"));
  131. model.refresh();
  132. }
  133. ]]>
  134. </script>
  135. <!--임시예약-->
  136. <submission id="TXAEA01200" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data" replace="instance" resultref="/root/hidden"/>
  137. <submission id="TXAEA03201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/PatInfo" replace="instance" resultref="/root/main/PatInfo"/>
  138. <submission id="TRAEA03207" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/init/pseursrvinfo" replace="instance" resultref="/root/main/PatInfo"/>
  139. <!--병원일정-->
  140. <submission id="TRAEA03203" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/hidden/calendarinfo"/>
  141. <!--예약가용인원 조회-->
  142. <submission id="TRAEA01107" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/init/curerprescondlist"/>
  143. </model>
  144. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  145. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  146. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  147. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  148. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  149. <script type="javascript" src="../../../ast/examcureweb/js/AEZ0001.js"/>
  150. <script type="javascript">
  151. <![CDATA[
  152. function initCalendar() {
  153. if( model.getValue("/root/hidden/calendar/year") == "" || model.getValue("/root/hidden/calendar/month") == "" ){
  154. var curDate = getCurrentDate().toDate();
  155. model.setValue("/root/hidden/calendar/year", curDate.getDateFormat('YYYY'));
  156. model.setValue("/root/hidden/calendar/month", curDate.getDateFormat('MM'));
  157. model.refresh();
  158. setCalendar(curDate);
  159. }
  160. }
  161. function fGetHospitalCalendar(){
  162. var dd = (model.getValue("/root/hidden/calendar/year")).concat(model.getValue("/root/hidden/calendar/month"));
  163. model.makeNode("/root/send/date");
  164. model.setValue("/root/send/date",dd);
  165. if (submit("TRAEA03203") == true) return true;
  166. else return false;
  167. }
  168. function setCalendar(dateObj) {
  169. //서버로 자료 요청
  170. if ( fGetHospitalCalendar() != true ){
  171. messageBox("병원일정 데이터를 가져올 수", "I004");
  172. }
  173. // 그리드 초기화
  174. model.removeNodeset("/root/hidden/calendar/weeklist/list");
  175. //grd_calendar.rebuild()
  176. dateObj.setDate(1);
  177. var startDay = dateObj.getDay();
  178. var days = dateObj.getMonthDay();
  179. var rows = Math.ceil( ( startDay + days ) / 7 );
  180. for( var i = 0; i < rows; i++ )
  181. grd_calendar.addRow(false);
  182. grd_calendar.rebuild();
  183. grd_calendar.rebuildStyle();
  184. var rowIndex = grd_calendar.fixedRows;
  185. var colIndex = startDay;
  186. var dutflag = '';
  187. for( var i = 1; i <= days; i++ ) {
  188. //write date
  189. grd_calendar.valueMatrix(rowIndex, colIndex) = i;
  190. grd_calendar.cellStyle("font-weight", rowIndex, colIndex) = "bold";
  191. //write memo
  192. grd_calendar.valueMatrix(rowIndex , colIndex + 7) = fGetCalendarMemo( i );
  193. dutflag = model.getValue("/root/hidden/calendarinfo/calendarinfolist[" + i +"]/dutflag");
  194. if( dutflag == '8' ){ //'0' 평일, '4' 토요일, '8' 휴일
  195. fSetTextColor(rowIndex, colIndex, '#ff0000');
  196. }
  197. colIndex++;
  198. if( colIndex == 7 ) {
  199. colIndex = 0;
  200. rowIndex++;
  201. }
  202. }
  203. grd_calendar.resizeCells();
  204. }
  205. function setCalendar2(dateObj) {
  206. // 그리드 초기화
  207. model.removeNodeset("/root/hidden/calendar/weeklist/list");
  208. //grd_calendar.rebuild()
  209. dateObj.setDate(1);
  210. var startDay = dateObj.getDay();
  211. var days = dateObj.getMonthDay();
  212. var rows = Math.ceil( ( startDay + days ) / 7 );
  213. for( var i = 0; i < rows; i++ )
  214. grd_calendar.addRow(false);
  215. grd_calendar.rebuild();
  216. grd_calendar.rebuildStyle();
  217. var rowIndex = grd_calendar.fixedRows;
  218. var colIndex = startDay;
  219. var ampmflag = '';
  220. var dutflag = '';
  221. for( var i = 1; i <= days; i++ ) {
  222. //write date
  223. grd_calendar.valueMatrix(rowIndex, colIndex) = i;
  224. grd_calendar.cellStyle("font-weight", rowIndex, colIndex) = "bold";
  225. //write memo
  226. grd_calendar.valueMatrix(rowIndex , colIndex + 7) = fGetCalendarMemo2( i );
  227. ampmflag = model.getValue("/root/hidden/calendarinfo/calendarinfolist[" + i +"]/ampmflag");
  228. dutflag = model.getValue("/root/hidden/calendarinfo/calendarinfolist[" + i +"]/dutflag");
  229. if( ampmflag == '1' ){
  230. fSetBGColor(rowIndex, colIndex, '#ffff99');
  231. }else if( ampmflag == '10' ){
  232. fSetBGColor(rowIndex, colIndex, '#ccffff');
  233. }else if( ampmflag == '100' ) {
  234. fSetBGColor(rowIndex, colIndex, '#ff99cc');
  235. }else if( ampmflag == '11' || ampmflag == '110' || ampmflag == '101' || ampmflag == '111' ){
  236. fSetBGColor(rowIndex, colIndex, '#ffcc99');
  237. }
  238. if( dutflag == '8' ){
  239. fSetTextColor(rowIndex, colIndex, '#ff0000');
  240. }
  241. colIndex++;
  242. if( colIndex == 7 ) {
  243. colIndex = 0;
  244. rowIndex++;
  245. }
  246. }
  247. grd_calendar.resizeCells();
  248. }
  249. //그리드의 배경색상을 변경한다.
  250. function fSetBGColor(calRow, calCol, bgColor) {
  251. //var calRow = gridObj.row;
  252. //var calCol = gridObj.col;
  253. if( calCol < 7 ){
  254. //calCol = calCol + 7;
  255. grd_calendar.cellStyle("background-color", calRow, calCol) = bgColor;
  256. grd_calendar.cellStyle("background-color", calRow, calCol + 7) = bgColor;
  257. }else{
  258. //calCol = calCol - 7;
  259. grd_calendar.cellStyle("background-color", calRow, calCol) = bgColor;
  260. grd_calendar.cellStyle("background-color", calRow, calCol - 7) = bgColor;
  261. }
  262. //grd_calendar.rebuildStyle();
  263. //grd_calendar.cellStyle("background-color", calRow, calCol) = bgColor;
  264. }
  265. //그리드의 폰트 색상을 변경한다.
  266. function fSetTextColor(calRow, calCol, bgColor) {
  267. if( calCol < 7 ){
  268. //calCol = calCol + 7;
  269. grd_calendar.cellStyle("color", calRow, calCol) = bgColor;
  270. grd_calendar.cellStyle("color", calRow, calCol + 7) = bgColor;
  271. }else{
  272. //calCol = calCol - 7;
  273. grd_calendar.cellStyle("color", calRow, calCol) = bgColor;
  274. grd_calendar.cellStyle("color", calRow, calCol - 7) = bgColor;
  275. }
  276. //grd_calendar.rebuildStyle();
  277. }
  278. function setCellColor(calRow, calCol) {
  279. var isMonth = model.getValue("/root/hidden/calendar/month");
  280. var isYear = model.getValue("/root/hidden/calendar/year");
  281. var isDate = (isYear+isMonth+1).toDate();
  282. //fGetCalendarData();
  283. setCalendar2(isDate);
  284. if( calCol < 7 ){
  285. //calCol = calCol + 7;
  286. grd_calendar.cellStyle("background-color", calRow, calCol) = "#daa7d9";
  287. grd_calendar.cellStyle("background-color", calRow, calCol + 7) = "#daa7d9";
  288. }else{
  289. //calCol = calCol - 7;
  290. grd_calendar.cellStyle("background-color", calRow, calCol) = "#daa7d9";
  291. grd_calendar.cellStyle("background-color", calRow, calCol - 7) = "#daa7d9";
  292. }
  293. //gridObj.rebuildStyle();
  294. //gridObj.cellStyle("background-color", calRow, calCol) = "#daa7d9";
  295. }
  296. //해당 일자의 병원 일정 정보를 얻어 온다
  297. function fGetCalendarMemo( i )
  298. {
  299. var holiflag = "";
  300. var holinm = "";
  301. holiflag = model.getValue("/root/hidden/calendarinfo/calendarinfolist[" + i +"]/holiflag");
  302. holinm = model.getValue("/root/hidden/calendarinfo/calendarinfolist[" + i +"]/holinm");
  303. if( holinm == '-' ){
  304. holinm = "";
  305. }
  306. return holinm;
  307. }
  308. //달력을 클릭(선택) 했을 때
  309. function fClickOnCalendar(){
  310. var calRow = grd_calendar.row;
  311. var calCol = grd_calendar.col;
  312. calCol = calCol % 7;
  313. var isDay = grd_calendar.valueMatrix(calRow, calCol);
  314. if( isDay != "" ){
  315. if( isDay.length == 1 ) isDay = "0" + isDay;
  316. var dd = ( (model.getValue("/root/hidden/calendar/year")).concat(model.getValue("/root/hidden/calendar/month")) ).concat(isDay);
  317. optRsrvDD.value = dd;
  318. model.setValue("/root/send/data/schergstdd", dd);
  319. //fGetOutRsgt();
  320. }
  321. }
  322. function fSetMonth(newMonth){
  323. model.setValue("/root/hidden/calendar/month", newMonth);
  324. var isMonth = model.getValue("/root/hidden/calendar/month");
  325. var isYear = model.getValue("/root/hidden/calendar/year");
  326. var isDate = (isYear+isMonth+1).toDate();
  327. //setCalendar(isDate);
  328. fGetCalendarData();
  329. }
  330. //날짜 00 맞추기 위한 방법
  331. function fncSetFormate(arg) {
  332. var rtnValue ='';
  333. if(arg <10)
  334. {
  335. rtnValue = '0'+arg;
  336. }
  337. else
  338. {
  339. rtnValue = arg;
  340. }
  341. return rtnValue;
  342. }
  343. /* @group : 통합예약관리
  344. * @ver : 2007.08.10
  345. * @by : 임헤정
  346. * @-----------------------------------
  347. * @type : function
  348. * @access : public
  349. * @desc : 오늘날짜 달력에 표시
  350. */
  351. function setCurrentDate() {
  352. var curDate = getCurrentDate().substr(6,2); //오늘날짜
  353. var curWeek = getCurrentDate().toDate().getDayOfWeek("E").toLowerCase(); //오늘요일
  354. if(curDate <10) {
  355. curDate= curDate.substr(1,1);
  356. }
  357. if (curWeek == "sun") {
  358. model.makeValue("/root/hidden/grdcellcolor/calcol",0);
  359. model.makeValue("/root/hidden/grdcellcolor/bfcalcol",0);
  360. } else if (curWeek == "mon") {
  361. model.makeValue("/root/hidden/grdcellcolor/calcol",1);
  362. model.makeValue("/root/hidden/grdcellcolor/bfcalcol",1);
  363. } else if (curWeek == "tue") {
  364. model.makeValue("/root/hidden/grdcellcolor/calcol",2);
  365. model.makeValue("/root/hidden/grdcellcolor/bfcalcol",2);
  366. } else if (curWeek == "wed") {
  367. model.makeValue("/root/hidden/grdcellcolor/calcol",3);
  368. model.makeValue("/root/hidden/grdcellcolor/bfcalcol",3);
  369. } else if (curWeek == "thu") {
  370. model.makeValue("/root/hidden/grdcellcolor/calcol",4);
  371. model.makeValue("/root/hidden/grdcellcolor/bfcalcol",4);
  372. } else if (curWeek == "fri") {
  373. model.makeValue("/root/hidden/grdcellcolor/calcol",5);
  374. model.makeValue("/root/hidden/grdcellcolor/bfcalcol",5);
  375. } else if (curWeek == "sat") {
  376. model.makeValue("/root/hidden/grdcellcolor/calcol",6);
  377. model.makeValue("/root/hidden/grdcellcolor/bfcalcol",6);
  378. }
  379. for(var i = 0 ; i <grd_calendar.rows; i++ ) {
  380. if(model.getValue("/root/hidden/calendar/weeklist/list["+i+"]/"+curWeek) ==curDate) {
  381. model.makeValue("/root/hidden/grdcellcolor/calrow",i);
  382. model.makeValue("/root/hidden/grdcellcolor/bfcalrow",i);
  383. }
  384. }
  385. model.makeValue("/root/hidden/grdcellcolor/color",1);
  386. setNewCellColor(grd_calendar);
  387. }
  388. function setNewCellColor(gridObj) {
  389. var calRow = 0; //현재선택
  390. var calCol = 0; //현재선택
  391. var bfcalRow = 0; //전에 선택
  392. var bfcalCol = 0; //전에 선택
  393. var white = 1; //#ffffff
  394. var green = 2; //#c4e693
  395. calRow = Number(model.getValue("/root/hidden/grdcellcolor/calrow"));
  396. calCol = Number(model.getValue("/root/hidden/grdcellcolor/calcol"));
  397. bfcalRow = Number(model.getValue("/root/hidden/grdcellcolor/bfcalrow"));
  398. bfcalCol = Number(model.getValue("/root/hidden/grdcellcolor/bfcalcol"));
  399. // 1. 원래 색으로 돌려놓기
  400. if(model.getValue("/root/hidden/grdcellcolor/color") == "1" ) {
  401. gridObj.cellStyle("background-color", bfcalRow, bfcalCol) = "#ffffff";
  402. if( bfcalCol < 7 ) {
  403. bfcalCol += 7;
  404. } else {
  405. bfcalCol -= 7;
  406. }
  407. gridObj.cellStyle("background-color", bfcalRow, bfcalCol) = "#ffffff";
  408. } else if (model.getValue("/root/hidden/grdcellcolor/color") == "2" ) {
  409. gridObj.cellStyle("background-color", bfcalRow, bfcalCol) = "#c4e693";
  410. if( bfcalCol < 7 ) {
  411. bfcalCol += 7;
  412. } else {
  413. bfcalCol -= 7;
  414. }
  415. gridObj.cellStyle("background-color", bfcalRow, bfcalCol) = "#c4e693";
  416. }
  417. // 2. bf 인스턴스에 선택한 원래 셀 담아두기
  418. if(gridObj.cellStyle("background-color", calRow, calCol) == "white" ) {
  419. model.setValue("/root/hidden/grdcellcolor/color", "1");
  420. }
  421. if(gridObj.cellStyle("background-color", calRow, calCol) == "#c4e693" ) {
  422. model.setValue("/root/hidden/grdcellcolor/color", "2");
  423. }
  424. model.setValue("/root/hidden/grdcellcolor/bfcalrow",calRow);
  425. model.setValue("/root/hidden/grdcellcolor/bfcalcol",calCol);
  426. // 3. 선택한 셀에 보라색 주기
  427. gridObj.cellStyle("background-color", calRow, calCol) = "#daa7d9";
  428. if( calCol < 7 ) {
  429. calCol += 7;
  430. } else {
  431. calCol -= 7;
  432. }
  433. gridObj.cellStyle("background-color", calRow, calCol) = "#daa7d9";
  434. }
  435. ]]>
  436. </script>
  437. </xhtml:head>
  438. <xhtml:body pagewidth="1020" pageheight="420" guideline="1,1195;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  439. <group id="group1" style="left:0px; top:0px; width:500px; height:13px; ">
  440. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:119px; height:14px; ">임시예약</caption>
  441. </group>
  442. <group id="grp_biz" scroll="auto" style="left:0px; top:20px; width:1000px; height:365px; ">
  443. <group id="group2" style="left:465px; top:0px; width:525px; height:355px; vertical-align:top; ">
  444. <caption id="caption29" class="cell_1" style="left:5px; top:30px; width:105px; height:23px; ">환자ID</caption>
  445. <input id="optName" ref="/root/main/PatInfo/hngnm" class="input_search" navindex="3" appearance="input" style="left:115px; top:57px; width:135px; height:19px; "/>
  446. <caption id="caption30" class="tit_2" style="left:0px; top:4px; width:169px; height:13px; ">환자 예약 정보</caption>
  447. <line id="line15" class="line_1" style="x1:2px; y1:21px; x2:515px; y2:21px; "/>
  448. <line id="line16" class="line_3" style="x1:2px; y1:236px; x2:515px; y2:236px; "/>
  449. <line id="line17" class="line_2" style="x1:6px; y1:52px; x2:515px; y2:52px; "/>
  450. <caption id="caption31" class="cell_1" style="left:5px; top:56px; width:105px; height:23px; ">환자성명</caption>
  451. <line id="line18" class="line_2" style="x1:6px; y1:79px; x2:515px; y2:79px; "/>
  452. <textarea id="tar_prcpremfact" ref="/root/main/PatInfo/rsrvrem" navindex="10" style="left:115px; top:135px; width:395px; height:67px; "/>
  453. <input id="iptPid" ref="/root/send/data/pid" class="input_s_essential" navindex="1" style="left:115px; top:31px; width:105px; height:19px; ">
  454. <script type="javascript" ev:event="onkeydown">
  455. <![CDATA[
  456. inputEnterKey("btnPatinfo","DOMActivate");
  457. ]]>
  458. </script>
  459. <script type="javascript" ev:event="DOMFocusIn">
  460. <![CDATA[
  461. iptPid.value = "";
  462. ]]>
  463. </script>
  464. </input>
  465. <caption id="caption32" class="cell_1" style="left:5px; top:83px; width:105px; height:23px; ">주민번호</caption>
  466. <line id="line19" class="line_2" style="x1:6px; y1:106px; x2:515px; y2:106px; "/>
  467. <caption id="caption33" class="cell_1" style="left:5px; top:110px; width:105px; height:23px; ">주소</caption>
  468. <caption id="caption34" class="cell_1" style="left:255px; top:83px; width:75px; height:23px; ">연락처</caption>
  469. <caption id="caption35" class="cell_1" style="left:255px; top:29px; width:75px; height:23px; ">병원</caption>
  470. <input id="optRrgstNO" ref="/root/main/PatInfo/rrgstno1" class="input_search" navindex="6" maxlength="6" format="#" appearance="input" style="left:115px; top:84px; width:55px; height:19px; "/>
  471. <caption id="caption1" class="cell_1" style="left:255px; top:56px; width:75px; height:23px; ">성별/나이</caption>
  472. <input id="optTel" ref="/root/main/PatInfo/tel" class="input_search" navindex="8" appearance="input" style="left:335px; top:84px; width:167px; height:19px; "/>
  473. <input id="optAddress1" ref="/root/main/PatInfo/addr" class="input_search" navindex="9" appearance="input" style="left:115px; top:110px; width:387px; height:19px; "/>
  474. <caption id="caption2" class="cell_1" style="left:5px; top:136px; width:105px; height:70px; ">참고사항</caption>
  475. <caption id="caption3" class="cell_1" style="left:5px; top:210px; width:105px; height:23px; ">예약일자</caption>
  476. <output id="optRsrvDD" ref="/root/main/PatInfo/rsrvdd" class="output_fix" format="yyyy-mm-dd" style="left:115px; top:211px; width:135px; height:19px; "/>
  477. <caption id="caption4" class="cell_1" style="left:254px; top:210px; width:80px; height:23px; ">예약시간</caption>
  478. <caption id="caption20" style="left:383px; top:212px; width:20px; height:20px; ">시</caption>
  479. <caption id="caption21" style="left:444px; top:212px; width:20px; height:20px; ">분</caption>
  480. <select1 id="cmbHour" ref="/root/main/PatInfo/srchrsrvhh" navindex="11" appearance="minimal" style="left:340px; top:211px; width:40px; height:19px; ">
  481. <choices>
  482. <item>
  483. <label>--</label>
  484. <value/>
  485. </item>
  486. <item>
  487. <label>1</label>
  488. <value>1</value>
  489. </item>
  490. <item>
  491. <label>2</label>
  492. <value>2</value>
  493. </item>
  494. <item>
  495. <label>3</label>
  496. <value>3</value>
  497. </item>
  498. <item>
  499. <label>4</label>
  500. <value>4</value>
  501. </item>
  502. <item>
  503. <label>5</label>
  504. <value>5</value>
  505. </item>
  506. <item>
  507. <label>6</label>
  508. <value>6</value>
  509. </item>
  510. <item>
  511. <label>7</label>
  512. <value>7</value>
  513. </item>
  514. <item>
  515. <label>8</label>
  516. <value>8</value>
  517. </item>
  518. <item>
  519. <label>9</label>
  520. <value>9</value>
  521. </item>
  522. <item>
  523. <label>10</label>
  524. <value>10</value>
  525. </item>
  526. <item>
  527. <label>11</label>
  528. <value>11</value>
  529. </item>
  530. <item>
  531. <label>12</label>
  532. <value>12</value>
  533. </item>
  534. <item>
  535. <label>13</label>
  536. <value>13</value>
  537. </item>
  538. <item>
  539. <label>14</label>
  540. <value>14</value>
  541. </item>
  542. <item>
  543. <label>15</label>
  544. <value>15</value>
  545. </item>
  546. <item>
  547. <label>16</label>
  548. <value>16</value>
  549. </item>
  550. <item>
  551. <label>17</label>
  552. <value>17</value>
  553. </item>
  554. <item>
  555. <label>18</label>
  556. <value>18</value>
  557. </item>
  558. <item>
  559. <label>19</label>
  560. <value>19</value>
  561. </item>
  562. <item>
  563. <label>20</label>
  564. <value>20</value>
  565. </item>
  566. <item>
  567. <label>21</label>
  568. <value>21</value>
  569. </item>
  570. <item>
  571. <label>22</label>
  572. <value>22</value>
  573. </item>
  574. <item>
  575. <label>23</label>
  576. <value>23</value>
  577. </item>
  578. <item>
  579. <label>24</label>
  580. <value>24</value>
  581. </item>
  582. </choices>
  583. </select1>
  584. <select1 id="cmbSec" ref="/root/main/PatInfo/srchrsrvmm" navindex="12" appearance="minimal" style="left:400px; top:211px; width:40px; height:19px; ">
  585. <choices>
  586. <item>
  587. <label>--</label>
  588. <value/>
  589. </item>
  590. <item>
  591. <label>00</label>
  592. <value>00</value>
  593. </item>
  594. <item>
  595. <label>10</label>
  596. <value>10</value>
  597. </item>
  598. <item>
  599. <label>20</label>
  600. <value>20</value>
  601. </item>
  602. <item>
  603. <label>30</label>
  604. <value>30</value>
  605. </item>
  606. <item>
  607. <label>40</label>
  608. <value>40</value>
  609. </item>
  610. <item>
  611. <label>50</label>
  612. <value>50</value>
  613. </item>
  614. </choices>
  615. </select1>
  616. <select1 id="cmbInstCd" ref="/root/main/PatInfo/reqhospcd" navindex="2" appearance="minimal" style="left:335px; top:30px; width:125px; height:19px; ">
  617. <choices>
  618. <item>
  619. <label>강남성모병원</label>
  620. <value>012</value>
  621. </item>
  622. <item>
  623. <label>성모병원</label>
  624. <value>011</value>
  625. </item>
  626. <item>
  627. <label>의정부성모병원</label>
  628. <value>013</value>
  629. </item>
  630. </choices>
  631. </select1>
  632. <line id="line2" class="line_2" style="x1:6px; y1:206px; x2:515px; y2:206px; "/>
  633. <line id="line3" class="line_2" style="x1:6px; y1:232px; x2:515px; y2:232px; "/>
  634. <select1 id="cmbHalf" ref="/root/main/PatInfo/ampmflag" navindex="13" visibility="hidden" appearance="minimal" style="left:464px; top:211px; width:40px; height:19px; ">
  635. <choices>
  636. <item>
  637. <label>AM</label>
  638. <value>A</value>
  639. </item>
  640. <item>
  641. <label>PM</label>
  642. <value>P</value>
  643. </item>
  644. </choices>
  645. </select1>
  646. <button id="btn_acpt" class="btn4_letter2" navindex="15" disable.background-image="../../../com/commonweb/images/dis_btn4_letter2.gif" style="left:335px; top:240px; width:56px; height:22px; background-image:../../../com/commonweb/images/btn4_letter2.gif; ">
  647. <caption>예약</caption>
  648. <script type="javascript" ev:event="DOMActivate">
  649. <![CDATA[
  650. //예약시간
  651. var flag = model.getValue("/root/main/PatInfo/flag");
  652. if (flag != "U") {
  653. model.makeValue("/root/main/PatInfo/flag","I");
  654. }
  655. model.setValue("/root/main/PatInfo/pid",model.getValue("/root/send/data/pid"));
  656. model.setValue("/root/main/PatInfo/suppdeptcd",model.getValue("/root/send/suppdeptcd"));
  657. //
  658. if (model.getValue("/root/main/PatInfo/pid") == "" && model.getValue("/root/main/PatInfo/hngnm") == "" ) {
  659. messageBox("환자ID 또는 환자성명 중 하나 이상은", "C001");
  660. return;
  661. }
  662. //
  663. if (model.getValue("/root/main/PatInfo/reqhospcd") == "" ) {
  664. messageBox("병원이 선택되지", "E007");
  665. return;
  666. }
  667. if (model.getValue("/root/main/PatInfo/rsrvdd") == "" ) {
  668. messageBox("예약일자가 선택되지", "E007");
  669. return;
  670. }
  671. if (model.getValue("/root/main/PatInfo/srchrsrvhh") == "" ) {
  672. messageBox("예약시간이 선택되지", "E007");
  673. return;
  674. }
  675. if (model.getValue("/root/main/PatInfo/srchrsrvmm") == "" ) {
  676. messageBox("예약분이 선택되지", "E007");
  677. return;
  678. }
  679. // if (model.getValue("/root/main/PatInfo/ampmflag") == "" ) {
  680. // messageBox("오전/오후가 선택되지", "E007");
  681. // return;
  682. // }
  683. var curDate = getCurrentDate().substr(0,8); //오늘날짜
  684. var rsrvdd = model.getValue("/root/main/PatInfo/rsrvdd"); //선택일자
  685. var rsrvtm = model.getValue("/root/main/PatInfo/srchrsrvhh") + model.getValue("/root/main/PatInfo/srchrsrvmm");
  686. //당일예약
  687. if(curDate == rsrvdd) {
  688. if(getCurrentTime().substr(0,4) > rsrvtm ) { //현재시간 이전시간을 예약
  689. messageBox("예약시간이 과거시간", "E008");
  690. return;
  691. }
  692. } else if (curDate > rsrvdd) { //당일 이전 예약
  693. messageBox("예약일자가 과거일자", "E008");
  694. return;
  695. }
  696. model.makeValue("/root/main/PatInfo/srchrsrvtm", rsrvtm);
  697. if (submit("TXAEA03201")) {
  698. model.makeValue("/root/hidden/updtflag","Y");
  699. //달력셋팅
  700. initCalendar();
  701. messageBox("예약이", "I002");
  702. }
  703. ]]>
  704. </script>
  705. </button>
  706. <button id="button13" class="btn4_letter2" navindex="16" disable.background-image="../../../com/commonweb/images/dis_btn4_letter2.gif" style="left:450px; top:240px; width:56px; height:22px; background-image:../../../com/commonweb/images/btn4_letter2.gif; ">
  707. <caption>종료</caption>
  708. <script type="javascript" ev:event="DOMActivate">
  709. <![CDATA[
  710. if (checkOpener()) {
  711. var updtflag = model.getValue("/root/hidden/updtflag");
  712. if (updtflag == "Y") {
  713. opener.javascript.initCalendar();
  714. opener.javascript.getRsrvPossTm(grd_calendar);
  715. }
  716. }
  717. window.close();
  718. ]]>
  719. </script>
  720. </button>
  721. <button id="btnPatinfo" class="icon_search" style="left:225px; top:32px; width:16px; height:16px; ">
  722. <caption/>
  723. <script type="javascript" ev:event="DOMActivate">
  724. <![CDATA[
  725. var ipt_pid = model.getValue("/root/send/data/pid");
  726. if (ipt_pid) {
  727. model.setValue("/root/hidden/sppmc02500/cond/srchcond", "1"); // 검색조건 : 등록번호로 설정
  728. model.setValue("/root/hidden/sppmc02500/cond/pid", ipt_pid);
  729. } else {
  730. model.resetInstanceNode("/root/hidden/sppmc02500/cond");
  731. }
  732. // 환자조회
  733. modal("SPPMC02500", 1,150, 150, "SPPMC02500", "/root/hidden/sppmc02500/cond", "/root/send", "", "");
  734. //환자이름
  735. model.setValue("/root/main/PatInfo/hngnm", model.getValue("/root/main/patinfo/patinfolist/hngnm"));
  736. //환자아이디
  737. model.setValue("/root/send/data/pid", model.getValue("/root/main/patinfo/patinfolist/pid"));
  738. model.setValue("/root/main/PatInfo/pid", model.getValue("/root/main/patinfo/patinfolist/pid"));
  739. //환자성별
  740. model.setValue("/root/main/PatInfo/sex", model.getValue("/root/main/patinfo/patinfolist/sex"));
  741. //환자나이
  742. model.setValue("/root/main/PatInfo/age", model.getValue("/root/main/patinfo/patinfolist/age"));
  743. //환자 주민번호
  744. model.setValue("/root/main/PatInfo/rrgstno1", model.getValue("/root/main/patinfo/patinfolist/rrgstno1"));
  745. model.setValue("/root/main/PatInfo/rrgstno2", model.getValue("/root/main/patinfo/patinfolist/rrgstno2"));
  746. //환자주소
  747. model.setValue("/root/main/PatInfo/addr",model.getValue("/root/main/patinfo/patinfolist/detladdr") );
  748. //환자연락처
  749. model.setValue("/root/main/PatInfo/rsrvrem",model.getValue("/root/main/patinfo/patinfolist/hometel") );
  750. model.refresh();
  751. ]]>
  752. </script>
  753. </button>
  754. <button id="button3" class="btn3_letter3" navindex="14" disable.background-image="../../../com/commonweb/images/dis_btn4_letter2.gif" style="left:265px; top:240px; width:68px; height:22px; background-image:../../../com/commonweb/images/btn4_letter2.gif; ">
  755. <caption>초기화</caption>
  756. <script type="javascript" ev:event="DOMActivate">
  757. <![CDATA[
  758. model.resetInstanceNode("/root/main/PatInfo");
  759. model.resetInstanceNode("/root/send/data");
  760. initCalendar();
  761. model.refresh();
  762. ]]>
  763. </script>
  764. </button>
  765. <select1 id="radio1" ref="/root/main/PatInfo/sex" class="radio_search" navindex="4" appearance="full" cols="2" overflow="visible" style="left:340px; top:60px; width:105px; height:15px; border-style:none; ">
  766. <choices>
  767. <item>
  768. <label>M(남)</label>
  769. <value>M</value>
  770. </item>
  771. <item>
  772. <label>F(여)</label>
  773. <value>F</value>
  774. </item>
  775. </choices>
  776. </select1>
  777. <input id="input1" ref="/root/main/PatInfo/age" class="input_search" navindex="5" maxlength="3" format="#" appearance="input" style="left:447px; top:57px; width:28px; height:19px; text-align:right; "/>
  778. <line id="line4" class="line_2" style="x1:6px; y1:134px; x2:515px; y2:134px; "/>
  779. <input id="input2" ref="/root/main/PatInfo/rrgstno2" class="input_search" navindex="7" maxlength="7" format="#" appearance="input" style="left:185px; top:85px; width:65px; height:19px; "/>
  780. <caption id="caption8" style="left:170px; top:84px; width:15px; height:19px; text-align:center; ">-</caption>
  781. <button id="button1" class="btn4_letter2" navindex="15" disable.background-image="../../../com/commonweb/images/dis_btn4_letter2.gif" style="left:392px; top:240px; width:56px; height:22px; background-image:../../../com/commonweb/images/btn4_letter2.gif; ">
  782. <caption>삭제</caption>
  783. <script type="javascript" ev:event="DOMActivate">
  784. <![CDATA[
  785. var seq = model.getValue("/root/main/PatInfo/seq");
  786. if (seq == "") {
  787. messageBox("삭제할 예약 정보가 없습니다.", "I004");
  788. return;
  789. }
  790. model.makeValue("/root/main/PatInfo/flag","D");
  791. if (submit("TXAEA03201")) {
  792. model.makeValue("/root/hidden/updtflag","Y");
  793. //달력셋팅
  794. initCalendar();
  795. messageBox("예약이", "I002");
  796. }
  797. ]]>
  798. </script>
  799. </button>
  800. </group>
  801. <shape id="rectangle1" class="calendar_header" appearance="rectangle" style="left:0px; top:1px; width:457px; height:30px; "/>
  802. <output id="opt_month" ref="/root/hidden/calendar/month" class="calendar_output" style="left:228px; top:7px; width:30px; height:19px; "/>
  803. <caption id="caption5" class="calendar_output" style="left:208px; top:7px; width:20px; height:19px; ">년</caption>
  804. <caption id="caption7" class="calendar_output" style="left:258px; top:7px; width:20px; height:19px; ">월</caption>
  805. <button id="btn_premonth" class="icon_pre_month" style="left:152px; top:9px; width:16px; height:16px; ">
  806. <caption/>
  807. <script type="javascript" ev:event="DOMActivate">
  808. <![CDATA[
  809. var isMonth = model.getValue("/root/hidden/calendar/month");
  810. var isYear = model.getValue("/root/hidden/calendar/year");
  811. var isDate = (isYear+isMonth+1).toDate().getAddDate(-1,'M');
  812. model.setValue("/root/hidden/calendar/year", isDate.getDateFormat('YYYY'));
  813. model.setValue("/root/hidden/calendar/month", isDate.getDateFormat('MM'));
  814. model.refresh();
  815. model.resetInstanceNode("/root/hidden/calendarinfo")
  816. setCalendar(isDate);//날짜 셋팅
  817. ]]>
  818. </script>
  819. </button>
  820. <multilinegrid id="grd_calendar" nodeset="/root/hidden/calendar/weeklist/list" class="gridcalendar" autoresize="true" backcoloralternate="transparent" caption="일^월^화^수^목^금^토" colsep="^" colwidth="65, 65, 65, 65, 65, 65, 65" ellipsis="true" focuscolor="transparent" rowsep="|" selectionmode="free" mergecellsfixedrows="bycolrec" style="left:0px; top:32px; width:457px; height:328px; font-size:10pt; ">
  821. <row>
  822. <col class="color_sun" ref="sun" style="border-bottom-width:0px; "/>
  823. <col ref="mon" style="border-bottom-width:0px; "/>
  824. <col ref="tue" style="border-bottom-width:0px; "/>
  825. <col ref="wed" style="border-bottom-width:0px; "/>
  826. <col ref="thu" style="border-bottom-width:0px; "/>
  827. <col ref="fri" style="border-bottom-width:0px; "/>
  828. <col class="color_sat" ref="sat" style="border-bottom-width:0px; "/>
  829. </row>
  830. <row>
  831. <col ref="sun_memo" style="border-top-width:0px; "/>
  832. <col ref="mon_memo" style="border-top-width:0px; "/>
  833. <col ref="tue_memo" style="border-top-width:0px; "/>
  834. <col ref="wed_memo" style="border-top-width:0px; "/>
  835. <col ref="thu_memo" style="border-top-width:0px; "/>
  836. <col ref="fri_memo" style="border-top-width:0px; "/>
  837. <col class="color_sat" ref="sat_memo" style="border-top-width:0px; "/>
  838. </row>
  839. <script type="javascript" ev:event="onclick">
  840. <![CDATA[
  841. if (grd_calendar.isCell(event.target) && grd_calendar.mouseRow >= grd_calendar.fixedrows) {
  842. model.setValue("/root/hidden/grdcellcolor/calrow",grd_calendar.row);
  843. model.setValue("/root/hidden/grdcellcolor/calcol",grd_calendar.col);
  844. setNewCellColor(grd_calendar);
  845. fClickOnCalendar();
  846. }
  847. ]]>
  848. </script>
  849. </multilinegrid>
  850. <button id="button31" class="icon_pre_year" style="left:133px; top:9px; width:16px; height:16px; ">
  851. <caption/>
  852. <script type="javascript" ev:event="DOMActivate">
  853. <![CDATA[
  854. var isMonth = model.getValue("/root/hidden/calendar/month");
  855. var isYear = model.getValue("/root/hidden/calendar/year");
  856. var isDate = (isYear+isMonth+1).toDate().getAddDate(-1,'Y');
  857. model.setValue("/root/hidden/calendar/year", isDate.getDateFormat('YYYY'));
  858. model.setValue("/root/hidden/calendar/month", isDate.getDateFormat('MM'));
  859. model.refresh();
  860. model.resetInstanceNode("/root/hidden/calendarinfo")
  861. setCalendar(isDate);//날짜 셋팅
  862. ]]>
  863. </script>
  864. </button>
  865. <button id="button32" class="icon_next_year" style="left:308px; top:9px; width:16px; height:16px; ">
  866. <caption/>
  867. <script type="javascript" ev:event="DOMActivate">
  868. <![CDATA[
  869. var isMonth = model.getValue("/root/hidden/calendar/month");
  870. var isYear = model.getValue("/root/hidden/calendar/year");
  871. var isDate = (isYear+isMonth+1).toDate().getAddDate(1,'Y');
  872. model.setValue("/root/hidden/calendar/year", isDate.getDateFormat('YYYY'));
  873. model.setValue("/root/hidden/calendar/month", isDate.getDateFormat('MM'));
  874. model.refresh();
  875. model.resetInstanceNode("/root/hidden/calendarinfo")
  876. setCalendar(isDate);//날짜 셋팅
  877. ]]>
  878. </script>
  879. </button>
  880. <output id="opt_year" ref="/root/hidden/calendar/year" class="calendar_output" style="left:178px; top:7px; width:30px; height:19px; "/>
  881. <button id="button34" class="icon_next_month" style="left:289px; top:9px; width:16px; height:16px; ">
  882. <caption/>
  883. <script type="javascript" ev:event="DOMActivate">
  884. <![CDATA[
  885. var isMonth = model.getValue("/root/hidden/calendar/month");
  886. var isYear = model.getValue("/root/hidden/calendar/year");
  887. var isDate = (isYear+isMonth+1).toDate().getAddDate(1,'M');
  888. model.setValue("/root/hidden/calendar/year", isDate.getDateFormat('YYYY'));
  889. model.setValue("/root/hidden/calendar/month", isDate.getDateFormat('MM'));
  890. model.refresh();
  891. model.resetInstanceNode("/root/hidden/calendarinfo")
  892. setCalendar(isDate);//날짜 셋팅
  893. ]]>
  894. </script>
  895. </button>
  896. </group>
  897. </xhtml:body>
  898. </xhtml:html>