SMAEA02000_통합예약관리(한개로합친거).xrw 100 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441
  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. <main>
  10. <rsrvposstmlist>
  11. <rsrvposstm>
  12. <rsrvtm/>
  13. <count/>
  14. <max/>
  15. </rsrvposstm>
  16. <rsrvlist>
  17. <srchrsrvtm/>
  18. <pid/>
  19. <hngnm/>
  20. <prcpcd/>
  21. <rgstdepthngnm/>
  22. </rsrvlist>
  23. <deptmemo>
  24. <memodt/>
  25. <memorem/>
  26. </deptmemo>
  27. <updtlist>
  28. <updtresndesc/>
  29. </updtlist>
  30. </rsrvposstmlist>
  31. <exculist>
  32. <mainordlist5>
  33. <check/>
  34. <rsrvflagyn/>
  35. <rcptyn/>
  36. <prcpdd/>
  37. <orddepthngnm/>
  38. <orddrnm/>
  39. <calcscorcd/>
  40. <prcpnm/>
  41. <excuroom/>
  42. <prcphopedd/>
  43. <srchrsrvtm/>
  44. <excutm/>
  45. <endtime/>
  46. <rsrvrem/>
  47. <excuroomnm/>
  48. <genrflag/>
  49. <prcpdd/>
  50. <execprcpuniqno/>
  51. <execprcpstatcd/>
  52. <prcpkindcd/>
  53. <excupartcd/>
  54. <indd/>
  55. <actorddd/>
  56. <orddrid/>
  57. <execrid/>
  58. <suppdeptcd/>
  59. <cnclrescd/>
  60. <pid/>
  61. <prcpdelivefact/>
  62. <rsrvplceflag/>
  63. <rsrvexcupossyn/>
  64. <rsrvexmptmplcd/>
  65. <tmpldata/>
  66. <rsrvflag/>
  67. <cretno/>
  68. <orddd/>
  69. <rsrvdt/>
  70. <excuroomcd/>
  71. <bf_srchrsrvtm/>
  72. <pacsnocretyn/>
  73. <rgsttm/>
  74. <rgstrid/>
  75. <orddeptcd/>
  76. <rsrvtmcntlyn/>
  77. <rsrvpsnnocntlyn/>
  78. <excucdrem/>
  79. <prcpgenrflag/>
  80. </mainordlist5>
  81. <subordlist2>
  82. <rsrvflagyn/>
  83. <rcptyn/>
  84. <prcpdd/>
  85. <orddepthngnm/>
  86. <orddrnm/>
  87. <execprcpstatcd/>
  88. <calcscorcd/>
  89. <prcpnm/>
  90. <excuroom/>
  91. <prcphopedd/>
  92. <srchrsrvtm/>
  93. <exectm/>
  94. <excutm/>
  95. <endtime/>
  96. <rsrvrem/>
  97. </subordlist2>
  98. <subordlist3>
  99. <rows>
  100. <pid/>
  101. <cmtdd/>
  102. <patcmt/>
  103. <iudgb/>
  104. </rows>
  105. </subordlist3>
  106. <mainordlist1>
  107. <ordnm/>
  108. <orddt/>
  109. <orddrnm/>
  110. <deptengabbr/>
  111. <orddd/>
  112. <pid/>
  113. <orddrid/>
  114. <orddeptcd/>
  115. </mainordlist1>
  116. <mainordlist2>
  117. <suminfo/>
  118. <orddt/>
  119. </mainordlist2>
  120. <mainordlist3>
  121. <opschedd/>
  122. </mainordlist3>
  123. <mainordlist4>
  124. <rsrvdt/>
  125. <prcpnm/>
  126. <basecdflagdesc/>
  127. <execprcpstatcd/>
  128. <acttime/>
  129. <usernm/>
  130. <rsrvrid/>
  131. </mainordlist4>
  132. <mainordlist6>
  133. <inhopedd/>
  134. </mainordlist6>
  135. <patinfo>
  136. <patinfolist/>
  137. </patinfo>
  138. </exculist>
  139. <orddeptinfo>
  140. <orddeptlist>
  141. <orddeptcd/>
  142. </orddeptlist>
  143. </orddeptinfo>
  144. <exculist2>
  145. <subordlist2>
  146. <excuroomnm/>
  147. <prcpdd/>
  148. <prcpnm/>
  149. <calcscorcd/>
  150. <execprcpstatcd/>
  151. </subordlist2>
  152. </exculist2>
  153. <curfile>
  154. <filename/>
  155. <rtfcode/>
  156. </curfile>
  157. <rtflist/>
  158. <patinfo>
  159. <patinfolist/>
  160. </patinfo>
  161. <comment1>
  162. <prcpcmt/>
  163. </comment1>
  164. <popupendflag/>
  165. </main>
  166. <send>
  167. <data>
  168. <cmb_info>
  169. <initexecroom>
  170. <excuroomcdid/>
  171. </initexecroom>
  172. </cmb_info>
  173. <srchpid/>
  174. <hngnm/>
  175. <acptlistflag/>
  176. <orddd/>
  177. <rsrvdd/>
  178. <excuroomcd/>
  179. <suppdeptcd/>
  180. <suppdeptcd1/>
  181. <chkflag/>
  182. <rsrvdate/>
  183. <orddeptcd/>
  184. <autorsrvtmset>
  185. <autorsrvtm/>
  186. </autorsrvtmset>
  187. <excuroomnm/>
  188. <print/>
  189. <prcpgenrflag/>
  190. <excucd/>
  191. </data>
  192. <globalinstance>
  193. <instance1/>
  194. </globalinstance>
  195. <req>
  196. <cnclcd/>
  197. <flag/>
  198. <chkflag/>
  199. <data/>
  200. </req>
  201. <req1>
  202. <data/>
  203. </req1>
  204. <rtfcode/>
  205. <filename/>
  206. </send>
  207. <init>
  208. <cmb_info>
  209. <initexecroom>
  210. <excuroomcdid/>
  211. <excuroomcdnm/>
  212. <userid/>
  213. </initexecroom>
  214. <initexecward>
  215. <execwardcdid/>
  216. <execwardcdnm/>
  217. </initexecward>
  218. </cmb_info>
  219. <curerprescondlist>
  220. <curerprescond>
  221. <userid/>
  222. <usernm/>
  223. </curerprescond>
  224. <rsrvcalendar>
  225. <rsrvdd/>
  226. <count/>
  227. <max/>
  228. </rsrvcalendar>
  229. <orddeptlist>
  230. <orddeptcd/>
  231. </orddeptlist>
  232. </curerprescondlist>
  233. <baseinfo>
  234. <initexecprcpstatcd/>
  235. </baseinfo>
  236. </init>
  237. <hidden>
  238. <calendar>
  239. <year/>
  240. <month/>
  241. <weeklist>
  242. <list>
  243. <sun/>
  244. <mon/>
  245. <tue/>
  246. <wed/>
  247. <thu/>
  248. <fri/>
  249. <sat/>
  250. <sun_memo/>
  251. <mon_memo/>
  252. <tue_memo/>
  253. <wed_memo/>
  254. <thu_memo/>
  255. <fri_memo/>
  256. <sat_memo/>
  257. </list>
  258. </weeklist>
  259. <dd/>
  260. </calendar>
  261. <grdcellcolor>
  262. <calrow/>
  263. <calcol/>
  264. <bfcalrow/>
  265. <bfcalcol/>
  266. <color/>
  267. </grdcellcolor>
  268. <cnclcdlist>
  269. <cnclcd/>
  270. </cnclcdlist>
  271. <beforersrvtm>
  272. <rsrvdtlist>
  273. <before/>
  274. </rsrvdtlist>
  275. </beforersrvtm>
  276. <con>
  277. <date/>
  278. </con>
  279. <rsrvbtn>
  280. <rsrvyn/>
  281. </rsrvbtn>
  282. <autorsrvtmset>
  283. <autorsrvtm/>
  284. </autorsrvtmset>
  285. <boolcontrol>
  286. <bool/>
  287. </boolcontrol>
  288. <chkgam/>
  289. <orddeptcheck/>
  290. <tmp/>
  291. <rsrvrem/>
  292. </hidden>
  293. <reqdata>
  294. <srchcond/>
  295. <pid/>
  296. <hngnm/>
  297. </reqdata>
  298. <reqdata1>
  299. <subordlist3>
  300. <rows>
  301. <pid/>
  302. <cmtdd/>
  303. <patcmt/>
  304. <iudgb/>
  305. </rows>
  306. </subordlist3>
  307. </reqdata1>
  308. </root>
  309. </instance>
  310. <script type="javascript" ev:event="xforms-ready">
  311. <![CDATA[
  312. model.removeNodeset("/root/main/orddeptinfo/orddeptlist");
  313. model.removeNodeset("/root/main/exculist/subordlist3");
  314. aezfSetSuppDeptcd();
  315. model.setValue("/root/hidden/chkgam","");
  316. submit("TRAEA02002", false);
  317. //처방상태 공통코드 갖고오기
  318. zbcfGetCodeList( new Array("M0011"), new Array("/root/init/baseinfo/initexecprcpstatcd") );
  319. submit("TRZBC00101", false);
  320. //grd_mainordlist5.fixedcellcheckbox(0,0)=true;
  321. model.removeNodeset("/root/hidden/beforersrvtm/rsrvdtlist"); //변경전 시간 담아놓는 그리드
  322. cmb_excuroom.select(3);
  323. //initCalendar();
  324. //setCurrentDate();
  325. model.toggle("case1");
  326. btn_case1.selected = true;
  327. btn_case2.selected = false;
  328. //타과링크시 등로
  329. //flag : T => 통합, A : 영상, S : 건진
  330. model.setValue("/root/send/data/chkflag", "T");
  331. /*
  332. param = "34104" + "▦" + "A" + "▦" + "2160000000";
  333. condarray = param.split("▦");
  334. model.setValue("/root/send/data/srchpid", condarray[0]);
  335. model.setValue("/root/send/data/chkflag", condarray[1]);
  336. model.setValue("/root/send/data/suppdeptcd1", condarray[2]);
  337. //btn_sea.dispatch("DOMActivate");
  338. */
  339. if ( model.getValue("/root/send/data/srchpid") != "" ) {
  340. btn_sea.dispatch("DOMActivate");
  341. }else
  342. if(checkOpener()) //opener 검사
  343. {
  344. var param = opener.javascript.getParameter("opener_parameter_id"); //opener parameter value를 get
  345. if(param != "") // opener parameter value가 있는 경우
  346. {
  347. //parameter value를 이용하여 프로그램 수행
  348. condarray = param.split("▦");
  349. model.setValue("/root/send/data/srchpid", condarray[0]);
  350. model.setValue("/root/send/data/chkflag", condarray[1]);
  351. model.setValue("/root/send/data/suppdeptcd1", condarray[2]);
  352. btn_sea.dispatch("DOMActivate");
  353. }
  354. else // opener parameter가 없는 경우 화면 원무 정보 check
  355. {
  356. var paminfo = getGlobalVariable("paminfo"); //프로그램에 따라 원무정보(paminfo), 환자기본정보(patflag) get
  357. if(paminfo != "") //원무 정보(기본 정보)가 있는 경우
  358. {
  359. model.removeNodeset("/root/paminfo"); //여러개의 instance발생을 막기 위해 removeNodeset을 해줘야 함.
  360. model.makeNode("/root/paminfo");
  361. setCSVToNode("/root/paminfo", paminfo);
  362. //상단 정보를 이용하여 프로그램 수행
  363. var pid = model.getValue("/root/paminfo" + "/list/pid");
  364. model.setValue("/root/send/data/srchpid", pid);
  365. btn_sea.dispatch("DOMActivate");
  366. }
  367. else //원무 정보(기본 정보)가 없는 경우
  368. {
  369. //원무 정보가 없는 상태로 프로그램 수행
  370. }
  371. }
  372. }else {
  373. if ( model.getValue("/root/send/data/srchpid") != "" ) {
  374. btn_sea.dispatch("DOMActivate");
  375. }
  376. }
  377. model.setFocus("ipt_pid");
  378. if (model.getValue("/root/send/data/chkflag") != "T"){
  379. document.title = "자체예약관리";
  380. caption6.text = "자체예약관리";
  381. }
  382. model.refresh();
  383. ]]>
  384. </script>
  385. <submission id="TRAEA02001" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/ordlist"/>
  386. <submission id="TRAEA02002" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/globalinstance" replace="instance" resultref="/root/init/cmb_info"/>
  387. <submission id="TRAEA02003" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/exculist"/>
  388. <submission id="TRAEA02004" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/init/curerprescondlist"/>
  389. <submission id="TRAEA02005" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/rsrvposstmlist"/>
  390. <submission id="TRAEA02010" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/exculist"/>
  391. <submission id="TXAEA02001" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/req" replace="instance" resultref="/root/temp"/>
  392. <submission id="TXAEA02002" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/req1" replace="instance" resultref="/root/temp"/>
  393. <submission id="TRAEA02009" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/reqdata1"/>
  394. <bind id="bind_orddeptlist" ref="/root/main/orddeptinfo/orddeptlist/orddeptcd" readonly="../orddeptcd!=''"/>
  395. <bind id="bind_mainordlist5" ref="/root/main/exculist/mainordlist5/excuroom" readonly="../excuroom!=''"/>
  396. <submission id="TRAEA02008" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data/autorsrvtmset" replace="instance" resultref="/root/hidden/autorsrvtmset"/>
  397. <submission id="TRZBC00101"/>
  398. </model>
  399. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  400. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  401. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  402. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  403. <script type="javascript" src="../../../ast/examcureweb/js/AEZ0001.js"/>
  404. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  405. <script type="javascript">
  406. <![CDATA[
  407. /* @group : 통합예약관리
  408. * @ver : 2007.08.09
  409. * @by : 임헤정
  410. * @-----------------------------------
  411. * @type : function
  412. * @access : public
  413. * @desc : 달력초기화
  414. */
  415. function initCalendar() {
  416. var curDate = getCurrentDate().toDate();
  417. model.setValue("/root/hidden/calendar/year", curDate.getDateFormat('YYYY'));
  418. model.setValue("/root/hidden/calendar/month", curDate.getDateFormat('MM'));
  419. //model.refresh();
  420. setCalendar(curDate);
  421. }
  422. function initCalendar2() {
  423. var curDate = getCurrentDate().toDate();
  424. model.setValue("/root/hidden/calendar/year", curDate.getDateFormat('YYYY'));
  425. model.setValue("/root/hidden/calendar/month", curDate.getDateFormat('MM'));
  426. model.refresh();
  427. // 그리드 초기화
  428. model.removeNodeset("/root/hidden/calendar/weeklist/list");
  429. model.removeNodeset("/root/init/curerprescondlist/rsrvcalendar");
  430. grd_calendar.rebuild();
  431. var dateObj = curDate;
  432. dateObj.setDate(1);
  433. var startDay = dateObj.getDay();
  434. var days = dateObj.getMonthDay();
  435. var rows = Math.ceil( ( startDay + days ) / 7 );
  436. for( var i = 0; i < rows; i++ )
  437. grd_calendar.addRow(false);
  438. grd_calendar.rebuild();
  439. var rowIndex = grd_calendar.fixedRows;
  440. var colIndex = startDay;
  441. for( var i = 1; i <= days; i++ ) {
  442. grd_calendar.valueMatrix(rowIndex, colIndex) = i;
  443. grd_calendar.valueMatrix(rowIndex, colIndex + 7) = "0/0";
  444. colIndex++;
  445. if( colIndex == 7 ) {
  446. colIndex = 0;
  447. rowIndex++;
  448. }
  449. }
  450. model.setValue("/root/send/data/rsrvdd",model.getValue("/root/hidden/calendar/year")+model.getValue("/root/hidden/calendar/month")+"01");
  451. }
  452. /* @group : 통합예약관리
  453. * @ver : 2007.05.18
  454. * @by : 이선경
  455. * @-----------------------------------
  456. * @type : function
  457. * @access : public
  458. * @desc : 달력에 일자별로 가용현황을 보여준다.
  459. */
  460. function setRsrvPresCondByMonth() {
  461. if (grd_mainordlist5.row > 0){
  462. model.setValue("/root/send/data/prcpgenrflag", model.getValue("/root/main/exculist/mainordlist5[" + grd_mainordlist5.row + "]/prcpgenrflag"));
  463. }
  464. submit("TRAEA02004");
  465. var isMonth = model.getValue("/root/hidden/calendar/month");
  466. var isYear = model.getValue("/root/hidden/calendar/year");
  467. var isDate = (isYear+isMonth+1).toDate();
  468. var startDay = isDate.getDay();
  469. grd_calendar.rebuildStyle();
  470. for (var i = 1; i < grd_temp.rows; i++) {
  471. var dd = model.getValue("/root/init/curerprescondlist/rsrvcalendar[" + i + "]/rsrvdd");
  472. var colidx = dd.toDate().getDay();
  473. var rowidx = Math.ceil( ( startDay + Number(dd.substr(6,2)) ) / 7 );
  474. grd_calendar.valueMatrix(rowidx, colidx+7) = model.getValue("/root/init/curerprescondlist/rsrvcalendar[" + i + "]/count") + "/" + model.getValue("/root/init/curerprescondlist/rsrvcalendar[" + i + "]/max") ;
  475. //예약가능일자 녹색주기
  476. if(model.getValue("/root/init/curerprescondlist/rsrvcalendar[" + i + "]/count") < model.getValue("/root/init/curerprescondlist/rsrvcalendar[" + i + "]/max")){
  477. grd_calendar.cellStyle("background-color", rowidx, colidx) = "#c4e693";
  478. grd_calendar.cellStyle("background-color", rowidx, colidx+7) = "#c4e693"; // #D9EFB9 < #C4E693 < #ABDC65
  479. }
  480. }
  481. }
  482. function readfunc(){
  483. initCalendar2();
  484. setCurrentDate();
  485. model.removeNodeset("root/main/exculist/mainordlist1");
  486. model.removeNodeset("root/main/exculist/mainordlist2");
  487. model.removeNodeset("root/main/exculist/mainordlist3");
  488. model.removeNodeset("root/main/exculist/mainordlist4");
  489. model.removeNodeset("root/main/exculist/mainordlist5");
  490. model.setValue("/root/send/data/orddeptcd","");
  491. //model.resetInstanceNode("/root/send/data/cmb_info/initexecroom/excuroomcdid");
  492. model.removeNodeset("/root/main/orddeptinfo/orddeptlist");
  493. model.removeNodeset("/root/main/rsrvposstmlist/rsrvlist");
  494. model.removeNodeset("/root/init/curerprescondlist/rsrvcalendar");
  495. model.removeNodeset("/root/hidden/beforersrvtm/rsrvdtlist");
  496. model.removeNodeset("/root/main/rsrvposstmlist/rsrvposstm");
  497. model.removeNodeset("/root/main/exculist/subordlist3");
  498. // 환자내역
  499. //submit("TRAEA02001");
  500. //처방현황
  501. model.setValue("/root/send/data/srchpid",model.getValue("/root/send/data/srchpid"));
  502. model.setValue("/root/send/data/orddd","");
  503. if (submit("TRAEA02010")){
  504. patcmt();
  505. }
  506. }
  507. /* @group : 통합예약관리
  508. * @ver : 2007.08.10
  509. * @by : 임헤정
  510. * @-----------------------------------
  511. * @type : function
  512. * @access : public
  513. * @desc : 오늘날짜 달력에 표시
  514. */
  515. function setCurrentDate() {
  516. var curDate = getCurrentDate().substr(6,2); //오늘날짜
  517. var curWeek = getCurrentDate().toDate().getDayOfWeek("E").toLowerCase(); //오늘요일
  518. if(curDate <10) {
  519. curDate= curDate.substr(1,1);
  520. }
  521. if(curWeek == "sun")
  522. model.setValue("/root/hidden/grdcellcolor/calcol",0);
  523. if(curWeek == "mon")
  524. model.setValue("/root/hidden/grdcellcolor/calcol",1);
  525. if(curWeek == "tue")
  526. model.setValue("/root/hidden/grdcellcolor/calcol",2);
  527. if(curWeek == "wed")
  528. model.setValue("/root/hidden/grdcellcolor/calcol",3);
  529. if(curWeek == "thu")
  530. model.setValue("/root/hidden/grdcellcolor/calcol",4);
  531. if(curWeek == "fri")
  532. model.setValue("/root/hidden/grdcellcolor/calcol",5);
  533. if(curWeek == "sat")
  534. model.setValue("/root/hidden/grdcellcolor/calcol",6);
  535. for(var i = 0 ; i <grd_calendar.rows; i++ ) {
  536. if(model.getValue("/root/hidden/calendar/weeklist/list["+i+"]/"+curWeek) ==curDate) {
  537. model.setValue("/root/hidden/grdcellcolor/calrow",i);
  538. }
  539. }
  540. setCellColor(grd_calendar);
  541. }
  542. /* @group : 통합예약관리
  543. * @ver : 2007.08.09
  544. * @by : 임헤정
  545. * @-----------------------------------
  546. * @type : function
  547. * @access : public
  548. * @desc : 선택날짜 색 주기
  549. */
  550. function setCalendar(dateObj) {
  551. // 그리드 초기화
  552. model.removeNodeset("/root/hidden/calendar/weeklist/list");
  553. model.removeNodeset("/root/init/curerprescondlist/rsrvcalendar");
  554. grd_calendar.rebuild();
  555. dateObj.setDate(1);
  556. var startDay = dateObj.getDay();
  557. var days = dateObj.getMonthDay();
  558. var rows = Math.ceil( ( startDay + days ) / 7 );
  559. /*
  560. for( var i = 0; i < rows; i++ )
  561. grd_calendar.addRow(false);
  562. grd_calendar.rebuild();
  563. */
  564. if (rows != grd_calendar.rows - 1){
  565. model.removeNodeset("/root/hidden/calendar/weeklist/list");
  566. for( var i = 0; i < rows; i++ ){
  567. grd_calendar.addRow(false);
  568. }
  569. }else{
  570. model.setValue("/root/hidden/calendar/weeklist/list", "");
  571. }
  572. grd_calendar.rebuild();
  573. var rowIndex = grd_calendar.fixedRows;
  574. var colIndex = startDay;
  575. for( var i = 1; i <= days; i++ ) {
  576. grd_calendar.valueMatrix(rowIndex, colIndex) = i;
  577. grd_calendar.valueMatrix(rowIndex, colIndex + 7) = "0/0";
  578. colIndex++;
  579. if( colIndex == 7 ) {
  580. colIndex = 0;
  581. rowIndex++;
  582. }
  583. }
  584. model.setValue("/root/send/data/rsrvdd",model.getValue("/root/hidden/calendar/year")+model.getValue("/root/hidden/calendar/month")+"01");
  585. setRsrvPresCondByMonth();
  586. }
  587. /* @group : 통합예약관리
  588. * @ver : 2007.08.09
  589. * @by : 임헤정
  590. * @-----------------------------------
  591. * @type : function
  592. * @access : public
  593. * @desc : 선택날짜 색 주기
  594. */
  595. function setCellColor(gridObj) {
  596. var calRow = 0; //현재선택
  597. var calCol = 0; //현재선택
  598. var bfcalRow = 0; //전에 선택
  599. var bfcalCol = 0; //전에 선택
  600. var white = 1; //#ffffff
  601. var green = 2; //#c4e693
  602. calRow = Number(model.getValue("/root/hidden/grdcellcolor/calrow"));
  603. calCol = Number(model.getValue("/root/hidden/grdcellcolor/calcol"));
  604. bfcalRow = Number(model.getValue("/root/hidden/grdcellcolor/bfcalrow"));
  605. bfcalCol = Number(model.getValue("/root/hidden/grdcellcolor/bfcalcol"));
  606. // 1. 원래 색으로 돌려놓기
  607. if(model.getValue("/root/hidden/grdcellcolor/color") == "1" ) {
  608. gridObj.cellStyle("background-color", bfcalRow, bfcalCol) = "#ffffff";
  609. if( bfcalCol < 7 )
  610. bfcalCol += 7;
  611. else
  612. bfcalCol -= 7;
  613. gridObj.cellStyle("background-color", bfcalRow, bfcalCol) = "#ffffff";
  614. }
  615. else if (model.getValue("/root/hidden/grdcellcolor/color") == "2" ) {
  616. gridObj.cellStyle("background-color", bfcalRow, bfcalCol) = "#c4e693";
  617. if( bfcalCol < 7 )
  618. bfcalCol += 7;
  619. else
  620. bfcalCol -= 7;
  621. gridObj.cellStyle("background-color", bfcalRow, bfcalCol) = "#c4e693";
  622. }
  623. // 2. bf 인스턴스에 선택한 원래 셀 담아두기
  624. if(gridObj.cellStyle("background-color", calRow, calCol) == "white" ) {
  625. model.setValue("/root/hidden/grdcellcolor/color", "1");
  626. }
  627. if(gridObj.cellStyle("background-color", calRow, calCol) == "#c4e693" ) {
  628. model.setValue("/root/hidden/grdcellcolor/color", "2");
  629. }
  630. model.setValue("/root/hidden/grdcellcolor/bfcalrow",calRow);
  631. model.setValue("/root/hidden/grdcellcolor/bfcalcol",calCol);
  632. //alert("인스턴스 : "+model.getValue("/root/hidden/grdcellcolor/color"));
  633. // 3. 선택한 셀에 보라색 주기
  634. // gridObj.rebuildStyle();
  635. gridObj.cellStyle("background-color", calRow, calCol) = "#daa7d9";
  636. if( calCol < 7 )
  637. calCol += 7;
  638. else
  639. calCol -= 7;
  640. gridObj.cellStyle("background-color", calRow, calCol) = "#daa7d9";
  641. }
  642. /* @group : 통합예약관리
  643. * @ver : 2007.08.09
  644. * @by : 임헤정
  645. * @-----------------------------------
  646. * @type : function
  647. * @access : public
  648. * @desc : 예약가능시간보여주기
  649. */
  650. function getRsrvPossTm(gridObj) {
  651. /*
  652. if(model.getValue("/root/send/ioflag") == "") {
  653. messageBox("입원,외래중","C002");
  654. return;
  655. } else if(model.getValue("/root/send/excuroomcd") == "") {
  656. messageBox("치료실","C002");
  657. return;
  658. } else { */
  659. // var calRow = gridObj.row;
  660. // var calCol = gridObj.col;
  661. var calRow = model.getValue("/root/hidden/grdcellcolor/calrow");
  662. var calCol = model.getValue("/root/hidden/grdcellcolor/calcol");
  663. if( calCol >= 7 )
  664. calCol -= 7;
  665. var yyyy = model.getValue("/root/hidden/calendar/year");
  666. var mm = model.getValue("/root/hidden/calendar/month");
  667. var dd = model.getValue("/root/hidden/calendar/weeklist/list[" + calRow + "]/" + gridObj.colAttribute(calCol, "ref"));
  668. if (getStringLength(dd) == 1) {
  669. dd = "0" + dd;
  670. }
  671. model.setValue("/root/send/data/rsrvdd", yyyy + mm + dd);
  672. model.setValue("/root/send/data/rsrvdate",model.getValue("/root/send/data/rsrvdd"));
  673. /*
  674. if (gridObj.cellStyle("background-color", calRow, calCol) == "#daa7d9") {
  675. grd_temp2.addRow();
  676. grd_temp2.setValue("/root/send/rsrvdd[" + grd_temp2.bottomRow + "]/yyyymmdd", yyyy + mm + dd);
  677. }*/
  678. if (grd_mainordlist5.row > 0){
  679. model.setValue("/root/send/data/prcpgenrflag", model.getValue("/root/main/exculist/mainordlist5[" + grd_mainordlist5.row + "]/prcpgenrflag"));
  680. model.setValue("/root/send/data/excucd", model.getValue("/root/main/exculist/mainordlist5[" + grd_mainordlist5.row + "]/calcscorcd"));
  681. }
  682. submit("TRAEA02005",false);
  683. model.refresh();
  684. // }
  685. }
  686. /* @group : 통합예약
  687. * @ver : 2007.07.03
  688. * @by : 임혜정
  689. * @-----------------------------------
  690. * @type : function
  691. * @access : public
  692. * @desc : 예약, 취소 버튼의 click 이벤트 처리
  693. */
  694. function exeRsrvTransaction(str) {
  695. var sColSep = "▦";
  696. var sRowSep = "▩";
  697. var rCSV = "";
  698. // PACS연동하기 위해 추가함. 20071017,장준원
  699. // pacsnocretyn,rgsttm,rgstrid,prcpdelivefact,orddepthngnm,prcpnm,orddd,rgstdepthngnm
  700. rCSV += "pid" + sColSep + "excuroomcd" + sColSep +"prcpdd" + sColSep + "execprcpuniqno" + sColSep + "rsrvflag" + sColSep + "rsrvdt" + sColSep + "srchrsrvtm" + sColSep + "prcpkindcd" + sColSep + "excupartcd" + sColSep + "indd" + sColSep + "actorddd" + sColSep + "orddeptcd" + sColSep + "orddrid" + sColSep + "calcscorcd" + sColSep+ "execrid" + sColSep+ "rsrvrem" + sColSep +"suppdeptcd" + sColSep+ "cnclresncd" + sColSep+ "pacsnocretyn" + sColSep+ "rgsttm" + sColSep+ "rgstrid" + sColSep+ "prcpdelivefact" + sColSep+ "orddepthngnm" + sColSep+ "prcpnm" + sColSep+ "orddd" + sColSep+ "rgstdepthngnm"+ sColSep+ "examroomnm" + sColSep+ "bf_srchrsrvtm" + sColSep+ "rsrvflagyn" + sColSep+ "prcpexecdeptcd" + sColSep+ "rsrvtmcntlyn" + sColSep + "rsrvpsnnocntlyn" + sColSep + "excuroom" + sRowSep;
  701. //헤더인 excuroomcd를 앞에 붙여줘서 보냄.
  702. var k = 0;
  703. for (var i = 1;i < grd_mainordlist5.rows;i++){
  704. if (model.getValue("/root/main/exculist/mainordlist5["+i+"]/check")=="true"){
  705. if (model.getValue("/root/main/exculist/mainordlist5["+i+"]/examroomnm") == ""){
  706. messageBox(i + "번째행에 수행부서를 선택하시기 바랍니다.", "E999", "");
  707. return false;
  708. }
  709. //rCSV += model.getValue("/root/main/exculist/mainordlist5[" + i + "]/excuroomcd") + sColSep + sRowSep;
  710. rCSV += grd_mainordlist5.valueMatrix(i, grd_mainordlist5.colRef("pid")) + sColSep + grd_mainordlist5.valueMatrix(i, grd_mainordlist5.colRef("excuroomcd")) + sColSep +grd_mainordlist5.valueMatrix(i, grd_mainordlist5.colRef("prcpdd")) + sColSep +grd_mainordlist5.valueMatrix(i, grd_mainordlist5.colRef("execprcpuniqno")) + sColSep + grd_mainordlist5.valueMatrix(i, grd_mainordlist5.colRef("rsrvflag")) + sColSep+ grd_mainordlist5.valueMatrix(i, grd_mainordlist5.colRef("rsrvdt")) + sColSep +grd_mainordlist5.valueMatrix(i, grd_mainordlist5.colRef("srchrsrvtm")) + sColSep +grd_mainordlist5.valueMatrix(i, grd_mainordlist5.colRef("prcpkindcd")) + sColSep +grd_mainordlist5.valueMatrix(i, grd_mainordlist5.colRef("excupartcd")) + sColSep +grd_mainordlist5.valueMatrix(i, grd_mainordlist5.colRef("indd")) + sColSep +grd_mainordlist5.valueMatrix(i, grd_mainordlist5.colRef("actorddd")) + sColSep +grd_mainordlist5.valueMatrix(i, grd_mainordlist5.colRef("orddeptcd")) + sColSep +grd_mainordlist5.valueMatrix(i, grd_mainordlist5.colRef("orddrid")) + sColSep +grd_mainordlist5.valueMatrix(i, grd_mainordlist5.colRef("calcscorcd")) + sColSep +grd_mainordlist5.valueMatrix(i, grd_mainordlist5.colRef("execrid")) + sColSep +grd_mainordlist5.valueMatrix(i, grd_mainordlist5.colRef("rsrvrem")) + sColSep +grd_mainordlist5.valueMatrix(i, grd_mainordlist5.colRef("suppdeptcd")) + sColSep + grd_mainordlist5.valueMatrix(i, grd_mainordlist5.colRef("cnclresncd")) + sColSep + grd_mainordlist5.valueMatrix(i, grd_mainordlist5.colRef("pacsnocretyn")) + sColSep + grd_mainordlist5.valueMatrix(i, grd_mainordlist5.colRef("rgsttm")) + sColSep + grd_mainordlist5.valueMatrix(i, grd_mainordlist5.colRef("rgstrid")) + sColSep + grd_mainordlist5.valueMatrix(i, grd_mainordlist5.colRef("prcpdelivefact")) + sColSep + grd_mainordlist5.valueMatrix(i, grd_mainordlist5.colRef("orddepthngnm")) + sColSep + grd_mainordlist5.valueMatrix(i, grd_mainordlist5.colRef("prcpnm")) + sColSep + grd_mainordlist5.valueMatrix(i, grd_mainordlist5.colRef("orddd")) + sColSep + grd_mainordlist5.valueMatrix(i, grd_mainordlist5.colRef("rgstdepthngnm"))+ sColSep + grd_mainordlist5.valueMatrix(i, grd_mainordlist5.colRef("examroomnm")) + sColSep + grd_mainordlist5.valueMatrix(i, grd_mainordlist5.colRef("bf_srchrsrvtm")) + sColSep + grd_mainordlist5.valueMatrix(i, grd_mainordlist5.colRef("rsrvflagyn")) + sColSep + grd_mainordlist5.valueMatrix(i, grd_mainordlist5.colRef("prcpexecdeptcd")) + sColSep + grd_mainordlist5.valueMatrix(i, grd_mainordlist5.colRef("rsrvtmcntlyn")) + sColSep + grd_mainordlist5.valueMatrix(i, grd_mainordlist5.colRef("rsrvpsnnocntlyn")) + sColSep + grd_mainordlist5.valueMatrix(i, grd_mainordlist5.colRef("excuroom")) + sRowSep;
  711. k = parseInt(k) + 1;
  712. }
  713. }
  714. model.resetInstanceNode("/root/send/req/data");
  715. // model.setValue("/root/send/req/data", rCSV);
  716. model.setValue("/root/send/req/flag", str);
  717. model.setValue("/root/send/req/chkflag", model.getValue("/root/send/data/chkflag"));
  718. model.removeNode("/root/temp");
  719. model.makeNode("/root/temp");
  720. setCSVToNode("/root/temp", rCSV);
  721. instance1.selectSingleNode("/root/temp").xml;
  722. model.copyNode("/root/send/req/data", "/root/temp");
  723. if (submit("TXAEA02001", false)){
  724. model.removeNodeset("/root/main/rehbprcpsubinfolist");
  725. return true;
  726. }else{
  727. return false;
  728. }
  729. // submit("TRAEA01905");
  730. // setTree(grd_prcpsubinfo, 1, 3, false);
  731. //getRsrvPossTm(grd_calendar);
  732. }
  733. /* @group : 통합예약
  734. * @ver : 2007.08.07
  735. * @by : 임혜정
  736. * @-----------------------------------
  737. * @type : function
  738. * @access : public
  739. * @desc : 달력 월버튼 이벤트
  740. */
  741. function fGetCalendar(arg)
  742. {
  743. var isMonth = model.getValue("/root/hidden/calendar/month");
  744. var isYear = model.getValue("/root/hidden/calendar/year");
  745. if(model.getValue("/root/hidden/calendar/month") < arg) {
  746. var num = arg- isMonth ;
  747. var isDate = (isYear+isMonth+1).toDate().getAddDate(+num,'M');
  748. }
  749. if(model.getValue("/root/hidden/calendar/month") > arg) {
  750. var num = isMonth - arg ;
  751. var isDate = (isYear+isMonth+1).toDate().getAddDate(-num,'M');
  752. }
  753. model.setValue("/root/hidden/calendar/year", isDate.getDateFormat('YYYY'));
  754. model.setValue("/root/hidden/calendar/month", isDate.getDateFormat('MM'));
  755. model.refresh();
  756. setCalendar(isDate);
  757. }
  758. /* @group : 통합예약
  759. * @ver : 2007.08.21
  760. * @by : 임혜정
  761. * @-----------------------------------
  762. * @type : function
  763. * @access : public
  764. * @desc : 예약증 출력
  765. */
  766. function fOpenRtfFileDialog() {
  767. var file = window.fileDialog("open","","false","","","RTF Files(*.rtf)|*.rtf");
  768. return file;
  769. }
  770. /* @group : 통합예약
  771. * @ver : 2007.08.21
  772. * @by : 임혜정
  773. * @-----------------------------------
  774. * @type : function
  775. * @access : public
  776. * @desc : 예약증 출력
  777. */
  778. function fGetFileName(path) {
  779. var lastIdx = path.lastIndexOf("\\");
  780. if (lastIdx >= 0) {
  781. return path.substr(lastIdx+1);
  782. } else {
  783. return path;
  784. }
  785. }
  786. /* @group : 통합예약
  787. * @ver : 2007.08.21
  788. * @by : 임혜정
  789. * @-----------------------------------
  790. * @type : function
  791. * @access : public
  792. * @desc : 예약증 출력 초기화
  793. */
  794. function fInitialize() {
  795. model.removeNodeset("/root/main/rtflist");
  796. model.resetInstanceNode("/root/main/curfile/filename");
  797. model.resetInstanceNode("/root/main/curfile/rtfcode");
  798. model.resetInstanceNode("/root/send/rtfcode");
  799. model.resetInstanceNode("/root/send/filename");
  800. rtfviewer.clear();
  801. model.refresh();
  802. }
  803. function fSetGrdMainordlist(){
  804. setRowStyle("grd_mainordlist5" , "5" , "미수납" , "rcptyn" ); //미수납
  805. // submit("TRPMC02500");
  806. //자동예약시간뿌려주기
  807. //미예약인 처방에 제일 빠른 시간 뿌려줌.
  808. /*
  809. var nodeList = instance1.selectNodes("/root/main/exculist/mainordlist5[rsrvflagyn='미예약']"); //미예약 다 뿌려줌
  810. var rCSV = getNodeListCSV(nodeList);
  811. */
  812. /* 유재정 처리 - 2007.10.25
  813. var sColSep = "▦";
  814. var sRowSep = "▩";
  815. var rCSV = "";
  816. rCSV += "excuroomcd" + sRowSep; //헤더인 excuroomcd를 앞에 붙여줘서 보냄.
  817. var k = 0;
  818. for (var i = 1;i < grd_mainordlist5.rows;i++){
  819. if (model.getValue("/root/main/exculist/mainordlist5[" + i + "]/rsrvflagyn") == "미예약" && model.getValue("/root/main/exculist/mainordlist5[" + i + "]/excuroomnm") != ""){
  820. //rCSV += model.getValue("/root/main/exculist/mainordlist5[" + i + "]/excuroomcd") + sColSep + sRowSep;
  821. rCSV += grd_mainordlist5.valueMatrix(i, grd_mainordlist5.colRef("excuroomcd")) + sRowSep;
  822. k = parseInt(k) + 1;
  823. }
  824. }
  825. model.setValue("/root/send/data/autorsrvtmset/autorsrvtm", rCSV);
  826. if (k > 0){
  827. submit("TRAEA02008");
  828. }
  829. */
  830. var j = 1;
  831. cap_sleep.visible = false;
  832. for(var i = 1 ; i < grd_mainordlist5.rows ; i++ ){
  833. /* 유재정 처리 - 2007.10.25
  834. if(model.getValue("/root/main/exculist/mainordlist5["+i+"]/rsrvflagyn") == "미예약" && model.getValue("/root/main/exculist/mainordlist5[" + i + "]/excuroomnm") != ""){
  835. model.setValue("/root/main/exculist/mainordlist5["+i+"]/rsrvdt",model.getValue("/root/hidden/autorsrvtmset/autorsrvtm["+j+"]/rsrvdt"));
  836. model.setValue("/root/main/exculist/mainordlist5["+i+"]/srchrsrvtm",model.getValue("/root/hidden/autorsrvtmset/autorsrvtm["+j+"]/rsrvdt"));
  837. j++;
  838. }
  839. */
  840. model.setValue("/root/main/exculist/mainordlist5["+i+"]/rsrvdt",model.getValue("/root/main/exculist/mainordlist5["+i+"]/srchrsrvtm"));
  841. if (model.getValue("/root/main/exculist/mainordlist5[" + i + "]/rsrvtmcntlyn") == "Y"){
  842. grd_mainordlist5.isReadOnly(i, grd_mainordlist5.colRef("srchrsrvtm")) = true;
  843. }else{
  844. grd_mainordlist5.isReadOnly(i, grd_mainordlist5.colRef("srchrsrvtm")) = false;
  845. }
  846. if (model.getValue("/root/main/exculist/mainordlist5["+i+"]/calcscorcd") == "GMA0001") {
  847. cap_sleep.visible = true;
  848. model.setValue("/root/hidden/chkgam","수면");
  849. }
  850. }
  851. for(var chk = 1; chk < grd_anoprcplist.rows; chk++){
  852. if (model.getValue("/root/main/exculist/subordlist2["+chk+"]/calcscorcd") == "GMA0001") {
  853. cap_sleep.visible = true;
  854. model.setValue("/root/hidden/chkgam","수면");
  855. }
  856. }
  857. model.refresh();
  858. }
  859. function fTopInfo(){
  860. //TOP 정보 보여주기
  861. schk = "N";
  862. if ( model.getValue("/root/main/exculist/mainordlist5["+grd_mainordlist5.row+"]/genrflag") =="O" ){
  863. var pat_info = "O▦"+ model.getValue("/root/send/data/srchpid") +"▦"+model.getValue("/root/main/exculist/mainordlist5["+grd_mainordlist5.row+"]/orddd")+"▦"+model.getValue("/root/main/exculist/mainordlist5["+grd_mainordlist5.row+"]/cretno")+"▦"+getUserInfo("dutplcecd")+"▦1▦"+model.getValue("/root/main/exculist/mainordlist5["+grd_mainordlist5.row+"]/orddd");
  864. schk = "Y";
  865. }
  866. else if ( model.getValue("/root/main/exculist/mainordlist5["+grd_mainordlist5.row+"]/genrflag") =="I" ){
  867. //var pat_infoready = "I▦"+ model.getValue("/root/send/data/srchpid") +"▦"+model.getValue("/root/main/exculist/mainordlist5["+grd_mainordlist5.row+"]/orddd")+"▦"+model.getValue("/root/main/exculist/mainordlist5["+grd_mainordlist5.row+"]/cretno")+"▦"+"012"+"▦1▦"+model.getValue("/root/main/exculist/mainordlist5["+grd_mainordlist5.row+"]/orddd");
  868. var pat_info = "I▦"+ model.getValue("/root/send/data/srchpid") +"▦"+model.getValue("/root/main/exculist/mainordlist5["+grd_mainordlist5.row+"]/orddd")+"▦"+model.getValue("/root/main/exculist/mainordlist5["+grd_mainordlist5.row+"]/cretno")+"▦"+getUserInfo("dutplcecd")+"▦"+model.getValue("/root/main/exculist/mainordlist5["+grd_mainordlist5.row+"]/orddd");
  869. schk = "Y";
  870. }
  871. else if ( model.getValue("/root/main/exculist/mainordlist5["+grd_mainordlist5.row+"]/genrflag") =="S" ){
  872. //var pat_infoready = "I▦"+ model.getValue("/root/send/data/srchpid") +"▦"+model.getValue("/root/main/exculist/mainordlist5["+grd_mainordlist5.row+"]/orddd")+"▦"+model.getValue("/root/main/exculist/mainordlist5["+grd_mainordlist5.row+"]/cretno")+"▦"+"012"+"▦1▦"+model.getValue("/root/main/exculist/mainordlist5["+grd_mainordlist5.row+"]/orddd");
  873. var pat_info = "S▦"+ model.getValue("/root/main/exculist/mainordlist5["+grd_mainordlist5.row+"]/prcpdd") +"▦"+model.getValue("/root/main/exculist/mainordlist5["+grd_mainordlist5.row+"]/execprcpuniqno")+"▦"+getUserInfo("dutplcecd");
  874. schk = "Y";
  875. }
  876. if (schk == "Y"){
  877. setParameter("condparam", pat_info);
  878. modal("SPMMO08900", 1, "", "", "", "", "", "left:0; right:0; width:0; height:0; sysmenu:hidden; caption:hidden; min:hidden, max:hidden;");
  879. }
  880. }
  881. function patcmt(){
  882. if (datagrid2.rows > 1){
  883. var irow = datagrid2.findRow(getCurrentDate(), 1, 1);
  884. if (irow < 1){
  885. datagrid2.insertRow(1, "above");
  886. model.setValue("/root/main/exculist/subordlist3/rows[" + 1 + "] /iudgb", "I");
  887. }
  888. }else{
  889. datagrid2.insertRow(0);
  890. model.setValue("/root/main/exculist/subordlist3/rows[" + 1 + "] /iudgb", "I");
  891. }
  892. model.setValue("/root/main/exculist/subordlist3/rows[" + 1 + "] /pid", model.getValue("/root/send/data/srchpid"));
  893. model.setValue("/root/main/exculist/subordlist3/rows[" + 1 + "] /cmtdd", getCurrentDate());
  894. button1.disabled = false;
  895. datagrid2.refresh();
  896. }
  897. ]]>
  898. </script>
  899. </xhtml:head>
  900. <xhtml:body guideline="1,1194;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  901. <input id="opt_hngnm" ref="/root/main/exculist/patinfolist/hngnm" class="output_fix" disabled="true" style="left:497px; top:30px; width:55px; height:19px; "/>
  902. <caption id="caption1" class="cell_1" style="left:450px; top:27px; width:46px; height:23px; vertical-align:middle; ">환자명</caption>
  903. <multilinegrid id="grd_calendar" nodeset="/root/hidden/calendar/weeklist/list" class="gridcalendar" autoresize="true" caption="일^월^화^수^목^금^토" colsep="^" colwidth="56, 55, 55, 55, 55, 56, 56" dataheight="20" extendlastcol="noscroll" focuscolor="transparent" rowsep="|" mergecellsfixedrows="bycolrec" style="left:261px; top:482px; width:390px; height:297px; ">
  904. <row>
  905. <col class="color_sun" ref="sun" style="border-bottom-width:0px; "/>
  906. <col ref="mon" style="border-bottom-width:0px; "/>
  907. <col ref="tue" style="border-bottom-width:0px; "/>
  908. <col ref="wed" style="border-bottom-width:0px; "/>
  909. <col ref="thu" style="border-bottom-width:0px; "/>
  910. <col ref="fri" style="border-bottom-width:0px; "/>
  911. <col class="color_sat" ref="sat" style="border-bottom-width:0px; "/>
  912. </row>
  913. <row>
  914. <col ref="sun_memo" style="border-top-width:0px; "/>
  915. <col ref="mon_memo" style="border-top-width:0px; "/>
  916. <col ref="tue_memo" style="border-top-width:0px; "/>
  917. <col ref="wed_memo" style="border-top-width:0px; "/>
  918. <col ref="thu_memo" style="border-top-width:0px; "/>
  919. <col ref="fri_memo" style="border-top-width:0px; "/>
  920. <col ref="sat_memo" style="border-top-width:0px; "/>
  921. </row>
  922. <script type="javascript" ev:event="onclick">
  923. <![CDATA[
  924. if(grd_calendar.row != 0 ) {
  925. model.setValue("/root/hidden/grdcellcolor/calrow",grd_calendar.row);
  926. model.setValue("/root/hidden/grdcellcolor/calcol",grd_calendar.col);
  927. setCellColor(grd_calendar);
  928. getRsrvPossTm(grd_calendar);
  929. var curDate = getCurrentDate().substr(0,8); //오늘날짜
  930. var rsrvdd =model.getValue("/root/send/data/rsrvdd"); //선택일자
  931. if(curDate <= rsrvdd) {
  932. for(var i = 1; i <grd_rsrvlist.rows ; i++ ) {
  933. if(model.getValue("/root/main/exculist/patinfolist/hngnm")== model.getValue("/root/main/rsrvposstmlist/rsrvlist["+i+"]/hngnm") && model.getValue("/root/send/data/srchpid") != model.getValue("/root/main/rsrvposstmlist/rsrvlist["+i+"]/pid") ) {
  934. messageBox("동명이인 예약", "E008");
  935. return 0;
  936. }
  937. }
  938. }
  939. }
  940. ]]>
  941. </script>
  942. </multilinegrid>
  943. <datagrid id="datagrid1" nodeset="/root/main/rsrvposstmlist/updtlist" visibility="hidden" autoresize="true" caption="변동사유" colsep="^" colwidth="245" mergecellsfixedrows="bycolrec" rowsep="|" style="left:350px; top:680px; width:258px; height:71px; ">
  944. <col ref="updtresndesc"/>
  945. </datagrid>
  946. <caption id="caption11" class="cell_1" style="left:646px; top:29px; width:50px; height:23px; vertical-align:middle; ">집전화</caption>
  947. <caption id="caption4" class="cell_1" style="left:939px; top:29px; width:50px; height:23px; vertical-align:middle; ">집주소</caption>
  948. <caption id="caption5" class="cell_1" style="left:795px; top:29px; width:50px; height:23px; vertical-align:middle; ">핸드폰</caption>
  949. <caption id="caption22" class="tit_2" style="left:4px; top:60px; width:107px; height:13px; ">환자내역(처방)</caption>
  950. <caption id="caption7" class="tit_2" style="left:238px; top:60px; width:95px; height:13px; ">진료예약내역</caption>
  951. <caption id="caption8" class="tit_2" style="left:573px; top:59px; width:121px; height:13px; ">당일검사예약현황</caption>
  952. <caption id="caption13" class="tit_2" style="left:4px; top:681px; width:106px; height:13px; ">환자Comment</caption>
  953. <caption id="caption14" class="tit_2" style="left:4px; top:413px; width:69px; height:13px; ">수행부서</caption>
  954. <group id="grp_sea" style="left:0px; top:20px; width:443px; height:35px; vertical-align:top; ">
  955. <shape id="roundrect2" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:440px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
  956. <caption id="caption17" class="search_name" style="left:10px; top:8px; width:91px; height:17px; ">등록번호 :</caption>
  957. <line id="line13" class="line_4" style="x1:369px; y1:8px; x2:369px; y2:30px; "/>
  958. <button id="btn_sea" class="btn1_letter2" navindex="3" style="left:375px; top:7px; width:56px; height:22px; ">
  959. <caption>조회</caption>
  960. <script type="javascript" ev:event="DOMActivate">
  961. <![CDATA[
  962. if(ipt_pid.value == "" ) {
  963. messageBox("환자번호를 ", "C001")
  964. return 0 ;
  965. }
  966. else {
  967. model.removeNodeset("/root/hidden/calendar/weeklist/list");
  968. readfunc();
  969. if (grd_mainordlist5.rows > 1){
  970. grd_mainordlist5.row = 1;
  971. fTopInfo();
  972. }else{
  973. delPatientInfos();
  974. }
  975. //상태별 색상주기
  976. fSetGrdMainordlist();
  977. if (model.getValue("/root/send/data/srchpid") != ""){
  978. //btn_execcncl.dispatch("DOMActivate");
  979. var child = getOpenWindow("SMMMO02500") ;
  980. if (child != null ) {
  981. child.model.setValue("/root/init/srchcond2" , model.getValue("/root/send/data/srchpid"));
  982. setParameter ( "SMMMO02500_cond" , model.getValue("/root/send/data/srchpid"));
  983. child.btn_bfprcpsrch.dispatch("DOMActivate");
  984. if (child.grd_patchosinfo.rows > 0){
  985. child.grd_patchosinfo.row = 1;
  986. }
  987. child.javascript.fPatChosInfo();
  988. }
  989. }
  990. }
  991. ]]>
  992. </script>
  993. </button>
  994. <caption id="caption19" class="search_name" style="left:195px; top:9px; width:91px; height:17px; ">환자명 :</caption>
  995. <input id="ipt_pid" ref="/root/send/data/srchpid" class="input_search" navindex="1" style="left:98px; top:8px; width:92px; height:19px; ">
  996. <script type="javascript" ev:event="onkeyup">
  997. <![CDATA[
  998. // inputEnterKey("btn_pid","DOMActivate");
  999. if(event.keyCode == "13") {
  1000. inputEnterKey("btn_sea","DOMActivate");
  1001. }
  1002. ]]>
  1003. </script>
  1004. <script type="javascript" ev:event="xforms-value-changed">
  1005. <![CDATA[
  1006. //btn_execcncl.dispatch("DOMActivate");
  1007. ]]>
  1008. </script>
  1009. </input>
  1010. <button id="btn_pid" class="icon_search" style="left:346px; top:10px; width:16px; height:16px; ">
  1011. <caption/>
  1012. <script type="javascript" ev:event="DOMActivate">
  1013. <![CDATA[
  1014. // 환자조회
  1015. modal("SPPMC02500", "", "200", "200", "SPPMC02500","/root/send/data/srchpid","/root/main/send");
  1016. if (model.getValue("/root/main/popupendflag") != "cancel"){
  1017. model.setValue("/root/send/data/srchpid", model.getValue("/root/main/patinfo/patinfolist/pid"));
  1018. // 환자내역
  1019. //submit("TRAEA02001");
  1020. btn_sea.dispatch("DOMActivate");
  1021. }
  1022. ]]>
  1023. </script>
  1024. </button>
  1025. <input id="input1" ref="/root/send/data/hngnm" navindex="2" imemode="hangul" style="left:270px; top:8px; width:70px; height:19px; text-align:left; ">
  1026. <script type="javascript" ev:event="onkeypress">
  1027. <![CDATA[
  1028. if(event.keyCode == "13") {
  1029. if (input1.currentText == ""){
  1030. model.setValue("/root/reqdata/srchcond", "3");
  1031. model.setValue("/root/reqdata/hngnm", "");
  1032. modal("SPPMC02500", "", "200", "200", "SPPMC02500","/root/reqdata","/root/send");
  1033. model.setValue("/root/send/data/srchpid", model.getValue("/root/main/patinfo/patinfolist/pid"));
  1034. model.setValue("/root/send/data/hngnm", model.getValue("/root/main/patinfo/patinfolist/hngnm"));
  1035. }else{
  1036. model.setValue("/root/reqdata/srchcond", "2");
  1037. model.setValue("/root/reqdata/hngnm", input1.currentText);
  1038. modal("SPPMC02500", "", "200", "200", "SPPMC02500","/root/reqdata","/root/send");
  1039. model.setValue("/root/send/data/srchpid", model.getValue("/root/main/patinfo/patinfolist/pid"));
  1040. model.setValue("/root/send/data/hngnm", model.getValue("/root/main/patinfo/patinfolist/hngnm"));
  1041. }
  1042. if (model.getValue("/root/main/popupendflag") != "cancel"){
  1043. model.setValue("/root/send/data/srchpid", model.getValue("/root/main/patinfo/patinfolist/pid"));
  1044. // 환자내역
  1045. //submit("TRAEA02001");
  1046. btn_sea.dispatch("DOMActivate");
  1047. }else{
  1048. model.setValue("/root/send/data/hngnm", "");
  1049. }
  1050. model.refresh();
  1051. }
  1052. ]]>
  1053. </script>
  1054. </input>
  1055. </group>
  1056. <group id="group1" style="left:0px; top:0px; width:1194px; height:13px; ">
  1057. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:106px; height:14px; ">통합예약관리</caption>
  1058. </group>
  1059. <line id="line12" class="line_1" style="x1:449px; y1:23px; x2:1192px; y2:22px; "/>
  1060. <line id="line1" class="line_1" style="x1:2px; y1:624px; x2:260px; y2:624px; "/>
  1061. <line id="line7" class="line_1" style="x1:2px; y1:548px; x2:260px; y2:548px; "/>
  1062. <caption id="caption20" class="tit_2" style="left:4px; top:534px; width:191px; height:14px; ">수행부서/변동내역 Comment</caption>
  1063. <caption id="caption21" class="tit_2" style="left:4px; top:609px; width:173px; height:13px; ">처방 Comment</caption>
  1064. <input id="opt_age" ref="/root/main/exculist/patinfolist/age" class="output_fix" disabled="true" style="left:599px; top:30px; width:25px; height:19px; text-align:center; "/>
  1065. <input id="opt_sex" ref="/root/main/exculist/patinfolist/sex" class="output_fix" disabled="true" style="left:623px; top:30px; width:20px; height:19px; text-align:center; "/>
  1066. <input id="opt_hometel" ref="/root/main/exculist/patinfolist/hometel" class="output_fix" disabled="true" style="left:697px; top:30px; width:95px; height:19px; "/>
  1067. <input id="opt_mpphontel" ref="/root/main/exculist/patinfolist/mpphontel" class="output_fix" disabled="true" style="left:846px; top:30px; width:90px; height:19px; "/>
  1068. <input id="opt_addr" ref="/root/main/exculist/patinfolist/addr" class="output_fix" disabled="true" style="left:990px; top:30px; width:203px; height:19px; "/>
  1069. <datagrid id="grd_mainordlist1" nodeset="/root/main/exculist/mainordlist1" caption="진료과(진료의)^진료일시^진료의^진료과^orddd^pid^orddrid^orddeptcd" colsep="^" colwidth="107, 104, 44, 75, 0, 0, 0, 0" mergecellsfixedrows="bycolrec" rowsep="|" style="left:2px; top:79px; width:233px; height:116px; ">
  1070. <col ref="ordnm" style="text-align:left; "/>
  1071. <col ref="orddt" format="yyyy-mm-dd hh:nn" style="text-align:center; "/>
  1072. <col ref="orddrnm" visibility="hidden"/>
  1073. <col ref="deptengabbr" visibility="hidden"/>
  1074. <col ref="orddd"/>
  1075. <col ref="pid"/>
  1076. <col ref="orddrid"/>
  1077. <col ref="orddeptcd"/>
  1078. <script type="javascript" ev:event="ondblclick">
  1079. <![CDATA[
  1080. for (var i = 1 ; i < grd_mainordlist5.rows ; i++ ){
  1081. if (model.getValue("/root/main/exculist/mainordlist5[" + i + "]/orddeptcd") == model.getValue("/root/main/exculist/mainordlist1[" + grd_mainordlist1.row + "]/orddeptcd")){
  1082. grd_mainordlist5.rowHidden(i) = false;
  1083. }else{
  1084. grd_mainordlist5.rowHidden(i) = true;
  1085. }
  1086. }
  1087. for(var i = 1 ; i < grd_mainordlist5.rows ; i++ ){
  1088. if (model.getValue("/root/main/exculist/mainordlist5["+i+"]/calcscorcd") == "GMA0001") {
  1089. cap_sleep.visible = true;
  1090. model.setValue("/root/hidden/chkgam","수면");
  1091. }
  1092. }
  1093. for(var chk = 1; chk < grd_anoprcplist.rows; chk++){
  1094. if (model.getValue("/root/main/exculist/subordlist2["+chk+"]/calcscorcd") == "GMA0001") {
  1095. cap_sleep.visible = true;
  1096. model.setValue("/root/hidden/chkgam","수면");
  1097. }
  1098. }
  1099. model.refresh();
  1100. ]]>
  1101. </script>
  1102. </datagrid>
  1103. <datagrid id="grd_mainordlist2" nodeset="/root/main/exculist/mainordlist2" caption="진료과(진료의)^예약일시" colsep="^" colwidth="89, 103" mergecellsfixedrows="bycolrec" rowsep="|" style="left:238px; top:79px; width:211px; height:116px; ">
  1104. <col ref="suminfo"/>
  1105. <col ref="orddt" format="yyyy-mm-dd hh:nn"/>
  1106. </datagrid>
  1107. <datagrid id="grd_mainordlist3" nodeset="/root/main/exculist/mainordlist6" caption="입원예정일" colsep="^" colwidth="99" mergecellsfixedrows="bycolrec" rowsep="|" style="left:452px; top:79px; width:115px; height:48px; ">
  1108. <col ref="inhopedd" format="yyyy-mm-dd" style="left:0px; top:23px; width:158px; height:23px; "/>
  1109. </datagrid>
  1110. <datagrid id="grd_mainordlist4" nodeset="/root/main/exculist/mainordlist4" caption="검사예약일^검사명^검사실^상태^수행시간^예약자^rsrvid" colsep="^" colwidth="100, 195, 99, 71, 58, 79, 0" mergecellsfixedrows="bycolrec" rowsep="|" style="left:570px; top:79px; width:623px; height:116px; ">
  1111. <col ref="rsrvdt" format="yyyy-mm-dd hh:nn" style="text-align:center; "/>
  1112. <col ref="prcpnm"/>
  1113. <col ref="basecdflagdesc"/>
  1114. <col ref="execprcpstatcd"/>
  1115. <col ref="acttime"/>
  1116. <col ref="usernm"/>
  1117. <col ref="rsrvrid"/>
  1118. </datagrid>
  1119. <datagrid id="grd_rsrvlist" nodeset="/root/main/rsrvposstmlist/rsrvlist" caption="시간^등록번호^이름^처방코드^진료과(진료의)" colsep="^" colwidth="35, 70, 49, 90, 103" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:806px; top:436px; width:385px; height:342px; ">
  1120. <col ref="srchrsrvtm" format="hh:nn" style="text-align:center; "/>
  1121. <col ref="pid"/>
  1122. <col ref="hngnm"/>
  1123. <col ref="prcpcd"/>
  1124. <col ref="rgstdepthngnm"/>
  1125. </datagrid>
  1126. <datagrid id="grd_rsrvposstm" nodeset="/root/main/rsrvposstmlist/rsrvposstm" caption="시간^현황^가용" colsep="^" colwidth="41, 33, 32" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:656px; top:436px; width:144px; height:343px; ">
  1127. <col ref="rsrvtm" format="hh:nn" style="text-align:center; "/>
  1128. <col ref="count" style="text-align:center; "/>
  1129. <col ref="max" style="text-align:center; "/>
  1130. <script type="javascript" ev:event="ondblclick">
  1131. <![CDATA[
  1132. if (+grd_mainordlist5.row != "" ) {
  1133. var curDate = getCurrentDate().substr(0,8); //오늘날짜
  1134. var rsrvdd =model.getValue("/root/send/data/rsrvdd"); //선택일자
  1135. if (model.getValue("/root/main/exculist/mainordlist5[" + grd_mainordlist5.row + "]/rsrvtmcntlyn") == "Y"){
  1136. messageBox("예약시간을 변경할 수 없는 검사/치료실입니다.", "E999", "");
  1137. return;
  1138. }
  1139. //현황과 가용인원 같을 경우 예약 불가능
  1140. if(model.getValue("/root/main/rsrvposstmlist/rsrvposstm["+grd_rsrvposstm.row+"]/count") >= model.getValue("/root/main/rsrvposstmlist/rsrvposstm["+grd_rsrvposstm.row+"]/max")) {
  1141. if (messageBox("가용인원을 초과하였습니다.", "Q003") != 6) {
  1142. }else {
  1143. //당일예약
  1144. if(curDate == rsrvdd) {
  1145. if(getCurrentTime().substr(0,4) > model.getValue("/root/main/rsrvposstmlist/rsrvposstm["+grd_rsrvposstm.row+"]/rsrvtm")) { //현재시간 이전시간을 예약
  1146. messageBox("예약시간이 과거시간", "E008");
  1147. }
  1148. else { //현재시간 이후시간을 예약
  1149. model.setValue("/root/main/exculist/mainordlist5["+grd_mainordlist5.row+"]/rsrvdt",model.getValue("/root/send/data/rsrvdd")+model.getValue("/root/main/rsrvposstmlist/rsrvposstm["+grd_rsrvposstm.row+"]/rsrvtm")); // 예약시간
  1150. model.setValue("/root/main/exculist/mainordlist5["+grd_mainordlist5.row+"]/srchrsrvtm",model.getValue("/root/send/data/rsrvdd")+model.getValue("/root/main/rsrvposstmlist/rsrvposstm["+grd_rsrvposstm.row+"]/rsrvtm")); // 예약시간
  1151. model.setValue("/root/main/exculist/mainordlist5["+grd_mainordlist5.row+"]/check", "true");
  1152. }
  1153. }
  1154. else if(curDate > rsrvdd) { //당일 이전 예약
  1155. messageBox("예약일자가 과거일자", "E008");
  1156. }
  1157. else { // 당일 이후 예약
  1158. model.setValue("/root/main/exculist/mainordlist5["+grd_mainordlist5.row+"]/rsrvdt",model.getValue("/root/send/data/rsrvdd")+model.getValue("/root/main/rsrvposstmlist/rsrvposstm["+grd_rsrvposstm.row+"]/rsrvtm")); // 예약시간
  1159. model.setValue("/root/main/exculist/mainordlist5["+grd_mainordlist5.row+"]/srchrsrvtm",model.getValue("/root/send/data/rsrvdd")+model.getValue("/root/main/rsrvposstmlist/rsrvposstm["+grd_rsrvposstm.row+"]/rsrvtm")); // 예약시간
  1160. model.setValue("/root/main/exculist/mainordlist5["+grd_mainordlist5.row+"]/check", "true");
  1161. }
  1162. model.refresh();
  1163. }
  1164. }else {
  1165. //당일예약
  1166. if(curDate == rsrvdd) {
  1167. if(getCurrentTime().substr(0,4) > model.getValue("/root/main/rsrvposstmlist/rsrvposstm["+grd_rsrvposstm.row+"]/rsrvtm")) { //현재시간 이전시간을 예약
  1168. messageBox("예약시간이 과거시간", "E008");
  1169. }
  1170. else { //현재시간 이후시간을 예약
  1171. model.setValue("/root/main/exculist/mainordlist5["+grd_mainordlist5.row+"]/rsrvdt",model.getValue("/root/send/data/rsrvdd")+model.getValue("/root/main/rsrvposstmlist/rsrvposstm["+grd_rsrvposstm.row+"]/rsrvtm")); // 예약시간
  1172. model.setValue("/root/main/exculist/mainordlist5["+grd_mainordlist5.row+"]/srchrsrvtm",model.getValue("/root/send/data/rsrvdd")+model.getValue("/root/main/rsrvposstmlist/rsrvposstm["+grd_rsrvposstm.row+"]/rsrvtm")); // 예약시간
  1173. model.setValue("/root/main/exculist/mainordlist5["+grd_mainordlist5.row+"]/check", "true");
  1174. }
  1175. }
  1176. else if(curDate > rsrvdd) { //당일 이전 예약
  1177. messageBox("예약일자가 과거일자", "E008");
  1178. }
  1179. else { // 당일 이후 예약
  1180. model.setValue("/root/main/exculist/mainordlist5["+grd_mainordlist5.row+"]/rsrvdt",model.getValue("/root/send/data/rsrvdd")+model.getValue("/root/main/rsrvposstmlist/rsrvposstm["+grd_rsrvposstm.row+"]/rsrvtm")); // 예약시간
  1181. model.setValue("/root/main/exculist/mainordlist5["+grd_mainordlist5.row+"]/srchrsrvtm",model.getValue("/root/send/data/rsrvdd")+model.getValue("/root/main/rsrvposstmlist/rsrvposstm["+grd_rsrvposstm.row+"]/rsrvtm")); // 예약시간
  1182. model.setValue("/root/main/exculist/mainordlist5["+grd_mainordlist5.row+"]/check", "true");
  1183. }
  1184. model.refresh();
  1185. }
  1186. }
  1187. else {
  1188. messageBox("처방을", "C002");
  1189. }
  1190. ]]>
  1191. </script>
  1192. </datagrid>
  1193. <datagrid id="grd_temp" nodeset="/root/init/curerprescondlist/rsrvcalendar" visibility="hidden" caption="일자(dd)^가용현황^max^caption3" colsep="^" colwidth="76, 62, 32" mergecellsfixedrows="bycolrec" rowsep="|" fixed.background-image="../../../com/commonweb/images/grid_bg.gif" style="left:831px; top:560px; width:175px; height:170px; ">
  1194. <col ref="rsrvdd"/>
  1195. <col ref="count"/>
  1196. <col ref="max"/>
  1197. </datagrid>
  1198. <datagrid id="grd_orddept" nodeset="/root/main/orddeptinfo/orddeptlist" caption="수행부서" colsep="^" colwidth="237" mergecellsfixedrows="bycolrec" rowsep="|" selectionmode="byrow" style="left:0px; top:432px; width:258px; height:94px; ">
  1199. <col disabled="true" ref="orddeptcd" type="combo">
  1200. <choices>
  1201. <itemset nodeset="/root/init/cmb_info/initexecroom">
  1202. <label ref="excuroomcdnm"/>
  1203. <value ref="excuroomcdid"/>
  1204. </itemset>
  1205. </choices>
  1206. </col>
  1207. <script type="javascript" ev:event="onclick">
  1208. <![CDATA[
  1209. if ( (grd_orddept.row >= grd_orddept.fixedRows) && (grd_orddept.isCell(event.target))) {
  1210. model.setValue("/root/hidden/orddeptcheck","check");
  1211. model.setValue("/root/send/data/excuroomcd",model.getValue("/root/main/orddeptinfo/orddeptlist["+grd_orddept.row+"]/orddeptcd"));
  1212. model.setValue("/root/main/exculist/mainordlist5["+grd_mainordlist5.row+"]/excuroomcd",model.getValue("/root/main/orddeptinfo/orddeptlist["+grd_orddept.row+"]/orddeptcd"));
  1213. model.setValue("/root/main/exculist/mainordlist5["+grd_mainordlist5.row+"]/examroomnm",grd_orddept.labelmatrix(grd_orddept.row, grd_orddept.col));
  1214. //model.setValue("/root/main/exculist/mainordlist5["+grd_mainordlist5.row+"]/examroomnm",model.getValue("/root/main/orddeptinfo/orddeptlist["+grd_orddept.row+"]/orddeptcd"));
  1215. initCalendar();
  1216. model.refresh();
  1217. }
  1218. ]]>
  1219. </script>
  1220. </datagrid>
  1221. <select1 id="cmb_excuroom" ref="/root/send/data/cmb_info/initexecroom/excuroomcdid" class="combo_default" visibility="hidden" appearance="minimal" style="left:280px; top:755px; width:255px; height:19px; ">
  1222. <choices>
  1223. <itemset nodeset="/root/init/cmb_info/initexecroom">
  1224. <label ref="excuroomcdnm"/>
  1225. <value ref="excuroomcdid"/>
  1226. </itemset>
  1227. </choices>
  1228. <script type="javascript" ev:event="xforms-select">
  1229. <![CDATA[
  1230. model.setValue("/root/send/data/excuroomcd",model.getValue("/root/send/data/cmb_info/initexecroom/excuroomcdid"));
  1231. initCalendar();
  1232. model.refresh();
  1233. ]]>
  1234. </script>
  1235. </select1>
  1236. <button id="button5" class="icon_top" style="left:203px; top:528px; width:26px; height:19px; ">
  1237. <caption/>
  1238. <script type="javascript" ev:event="DOMActivate">
  1239. <![CDATA[
  1240. grd_momolist.attribute("height") = 49;
  1241. ]]>
  1242. </script>
  1243. </button>
  1244. <button id="button15" class="icon_bottom" style="left:232px; top:528px; width:26px; height:19px; ">
  1245. <caption/>
  1246. <script type="javascript" ev:event="DOMActivate">
  1247. <![CDATA[
  1248. grd_momolist.attribute("height") = 142;
  1249. ]]>
  1250. </script>
  1251. </button>
  1252. <button id="button16" class="icon_bottom" style="left:232px; top:604px; width:26px; height:19px; ">
  1253. <caption/>
  1254. <script type="javascript" ev:event="DOMActivate">
  1255. <![CDATA[
  1256. tar_prcpremfact.attribute("height") = 142;
  1257. ]]>
  1258. </script>
  1259. </button>
  1260. <button id="button17" class="icon_top" style="left:203px; top:604px; width:26px; height:19px; ">
  1261. <caption/>
  1262. <script type="javascript" ev:event="DOMActivate">
  1263. <![CDATA[
  1264. tar_prcpremfact.attribute("height") = 43;
  1265. ]]>
  1266. </script>
  1267. </button>
  1268. <group id="group2" scroll="auto" style="left:261px; top:425px; width:394px; height:55px; ">
  1269. <shape id="rectangle2" class="calendar_header" appearance="rectangle" style="left:0px; top:3px; width:390px; height:52px; "/>
  1270. <button id="button7" class="icon_month" style="left:20px; top:25px; width:27px; height:27px; ">
  1271. <caption>1</caption>
  1272. <script type="javascript" ev:event="DOMActivate">
  1273. <![CDATA[
  1274. if(opt_month.value!== "01") {
  1275. fGetCalendar("01");
  1276. }
  1277. ]]>
  1278. </script>
  1279. </button>
  1280. <button id="button8" class="icon_month" style="left:50px; top:25px; width:27px; height:27px; ">
  1281. <caption>2</caption>
  1282. <script type="javascript" ev:event="DOMActivate">
  1283. <![CDATA[
  1284. if(opt_month.value!== "02") {
  1285. fGetCalendar("02");
  1286. }
  1287. ]]>
  1288. </script>
  1289. </button>
  1290. <button id="button9" class="icon_month" style="left:80px; top:25px; width:27px; height:27px; ">
  1291. <caption>3</caption>
  1292. <script type="javascript" ev:event="DOMActivate">
  1293. <![CDATA[
  1294. if(opt_month.value!== "03") {
  1295. fGetCalendar("03");
  1296. }
  1297. ]]>
  1298. </script>
  1299. </button>
  1300. <button id="button10" class="icon_month" style="left:110px; top:25px; width:27px; height:27px; ">
  1301. <caption>4</caption>
  1302. <script type="javascript" ev:event="DOMActivate">
  1303. <![CDATA[
  1304. if(opt_month.value!== "04") {
  1305. fGetCalendar("04");
  1306. }
  1307. ]]>
  1308. </script>
  1309. </button>
  1310. <button id="button11" class="icon_month" style="left:140px; top:25px; width:27px; height:27px; ">
  1311. <caption>5</caption>
  1312. <script type="javascript" ev:event="DOMActivate">
  1313. <![CDATA[
  1314. if(opt_month.value!== "05") {
  1315. fGetCalendar("05");
  1316. }
  1317. ]]>
  1318. </script>
  1319. </button>
  1320. <button id="button12" class="icon_month" style="left:170px; top:25px; width:27px; height:27px; ">
  1321. <caption>6</caption>
  1322. <script type="javascript" ev:event="DOMActivate">
  1323. <![CDATA[
  1324. if(opt_month.value!== "06") {
  1325. fGetCalendar("06");
  1326. }
  1327. ]]>
  1328. </script>
  1329. </button>
  1330. <button id="button13" class="icon_month" style="left:200px; top:25px; width:27px; height:27px; ">
  1331. <caption>7</caption>
  1332. <script type="javascript" ev:event="DOMActivate">
  1333. <![CDATA[
  1334. if(opt_month.value!== "07") {
  1335. fGetCalendar("07");
  1336. }
  1337. ]]>
  1338. </script>
  1339. </button>
  1340. <button id="button14" class="icon_month" style="left:230px; top:25px; width:27px; height:27px; ">
  1341. <caption>8</caption>
  1342. <script type="javascript" ev:event="DOMActivate">
  1343. <![CDATA[
  1344. if(opt_month.value!== "08") {
  1345. fGetCalendar("08");
  1346. }
  1347. ]]>
  1348. </script>
  1349. </button>
  1350. <button id="button18" class="icon_month" style="left:260px; top:25px; width:27px; height:27px; ">
  1351. <caption>9</caption>
  1352. <script type="javascript" ev:event="DOMActivate">
  1353. <![CDATA[
  1354. if(opt_month.value!== "09") {
  1355. fGetCalendar("09");
  1356. }
  1357. ]]>
  1358. </script>
  1359. </button>
  1360. <button id="button19" class="icon_month" style="left:290px; top:25px; width:27px; height:27px; ">
  1361. <caption>10</caption>
  1362. <script type="javascript" ev:event="DOMActivate">
  1363. <![CDATA[
  1364. if(opt_month.value!== "10") {
  1365. fGetCalendar("10");
  1366. }
  1367. ]]>
  1368. </script>
  1369. </button>
  1370. <button id="button20" class="icon_month" style="left:320px; top:25px; width:27px; height:27px; ">
  1371. <caption>11</caption>
  1372. <script type="javascript" ev:event="DOMActivate">
  1373. <![CDATA[
  1374. if(opt_month.value!== "11") {
  1375. fGetCalendar("11");
  1376. }
  1377. ]]>
  1378. </script>
  1379. </button>
  1380. <button id="button21" class="icon_month" style="left:350px; top:25px; width:27px; height:27px; ">
  1381. <caption>12</caption>
  1382. <script type="javascript" ev:event="DOMActivate">
  1383. <![CDATA[
  1384. if(opt_month.value!== "12") {
  1385. fGetCalendar("12");
  1386. }
  1387. ]]>
  1388. </script>
  1389. </button>
  1390. <output id="opt_month" ref="/root/hidden/calendar/month" class="calendar_output" style="left:200px; top:2px; width:20px; height:19px; "/>
  1391. <caption id="caption24" class="calendar_output" style="left:178px; top:2px; width:20px; height:19px; ">년</caption>
  1392. <caption id="caption25" class="calendar_output" style="left:220px; top:2px; width:20px; height:19px; ">월</caption>
  1393. <button id="button31" class="icon_next_year" style="left:270px; top:5px; width:16px; height:16px; background-image:../../../com/commonweb/images/cal_next_y.gif; ">
  1394. <caption/>
  1395. <script type="javascript" ev:event="DOMActivate">
  1396. <![CDATA[
  1397. var isMonth = model.getValue("/root/hidden/calendar/month");
  1398. var isYear = model.getValue("/root/hidden/calendar/year");
  1399. var isDate = (isYear+isMonth+1).toDate().getAddDate(1,'Y');
  1400. model.setValue("/root/hidden/calendar/year", isDate.getDateFormat('YYYY'));
  1401. model.setValue("/root/hidden/calendar/month", isDate.getDateFormat('MM'));
  1402. model.refresh();
  1403. setCalendar(isDate);
  1404. // getCurerPresCond();
  1405. ]]>
  1406. </script>
  1407. </button>
  1408. <button id="button33" class="icon_pre_month" visibility="hidden" style="left:121px; top:5px; width:16px; height:16px; background-image:../../../com/commonweb/images/cal_pre_m.gif; ">
  1409. <caption/>
  1410. <script type="javascript" ev:event="DOMActivate">
  1411. <![CDATA[
  1412. var isMonth = model.getValue("/root/hidden/calendar/month");
  1413. var isYear = model.getValue("/root/hidden/calendar/year");
  1414. var isDate = (isYear+isMonth+1).toDate().getAddDate(-1,'M');
  1415. model.setValue("/root/hidden/calendar/year", isDate.getDateFormat('YYYY'));
  1416. model.setValue("/root/hidden/calendar/month", isDate.getDateFormat('MM'));
  1417. model.refresh();
  1418. // if(model.getValue("/root/send/data/excuroomcd") == "") {
  1419. // messageBox("치료실","C002");
  1420. // return;
  1421. // }
  1422. setCalendar(isDate);
  1423. // getCurerPresCond();
  1424. ]]>
  1425. </script>
  1426. </button>
  1427. <output id="opt_year" ref="/root/hidden/calendar/year" class="calendar_output" style="left:148px; top:2px; width:30px; height:19px; "/>
  1428. <button id="button35" class="icon_next_month" visibility="hidden" style="left:246px; top:5px; width:16px; height:16px; background-image:../../../com/commonweb/images/cal_next_m.gif; ">
  1429. <caption/>
  1430. <script type="javascript" ev:event="DOMActivate">
  1431. <![CDATA[
  1432. var isMonth = model.getValue("/root/hidden/calendar/month");
  1433. var isYear = model.getValue("/root/hidden/calendar/year");
  1434. var isDate = (isYear+isMonth+1).toDate().getAddDate(1,'M');
  1435. model.setValue("/root/hidden/calendar/year", isDate.getDateFormat('YYYY'));
  1436. model.setValue("/root/hidden/calendar/month", isDate.getDateFormat('MM'));
  1437. model.refresh();
  1438. if(model.getValue("/root/send/data/excuroomcd") == "") {
  1439. messageBox("치료실","C002");
  1440. return;
  1441. }
  1442. setCalendar(isDate);
  1443. // getCurerPresCond();
  1444. ]]>
  1445. </script>
  1446. </button>
  1447. <button id="button36" class="icon_pre_year" style="left:98px; top:5px; width:16px; height:16px; background-image:../../../com/commonweb/images/cal_pre_y.gif; ">
  1448. <caption/>
  1449. <script type="javascript" ev:event="DOMActivate">
  1450. <![CDATA[
  1451. var isMonth = model.getValue("/root/hidden/calendar/month");
  1452. var isYear = model.getValue("/root/hidden/calendar/year");
  1453. var isDate = (isYear+isMonth+1).toDate().getAddDate(-1,'Y');
  1454. model.setValue("/root/hidden/calendar/year", isDate.getDateFormat('YYYY'));
  1455. model.setValue("/root/hidden/calendar/month", isDate.getDateFormat('MM'));
  1456. model.refresh();
  1457. setCalendar(isDate);
  1458. // getCurerPresCond();
  1459. ]]>
  1460. </script>
  1461. </button>
  1462. </group>
  1463. <button id="btn_case1" class="btn_sw" group="tab" selected="true" style="left:3px; top:198px; width:72px; height:22px; ">
  1464. <caption>검사현황</caption>
  1465. <toggle case="case1" ev:event="onclick"/>
  1466. <script type="javascript" ev:event="DOMActivate">
  1467. <![CDATA[
  1468. model.toggle("case1");
  1469. btn_case1.selected = true;
  1470. btn_case2.selected = false;
  1471. ]]>
  1472. </script>
  1473. </button>
  1474. <button id="btn_case2" class="btn_sw" group="tab" selected="false" style="left:76px; top:198px; width:83px; height:22px; ">
  1475. <caption>타검사현황</caption>
  1476. <toggle case="case2" ev:event="onclick"/>
  1477. <script type="javascript" ev:event="DOMActivate">
  1478. <![CDATA[
  1479. model.toggle("case2");
  1480. btn_case1.selected = false;
  1481. btn_case2.selected = true;
  1482. ]]>
  1483. </script>
  1484. </button>
  1485. <button id="btn_execcncl" class="btn2_letter4" style="left:1066px; top:197px; width:64px; height:19px; ">
  1486. <caption>처방조회</caption>
  1487. <script type="javascript" ev:event="DOMActivate">
  1488. <![CDATA[
  1489. /*
  1490. if ( model.getValue("/root/send/data/srchpid") == "" ) {
  1491. messageBox("[조회필수항목-등록번호] 를 입력하십시오.","I999");
  1492. model.setfocus( "ipt_pid" );
  1493. return;
  1494. }
  1495. */
  1496. var child = getOpenWindow("SMMMO02500") ;
  1497. if (child != null ) {
  1498. child.model.setValue("/root/init/srchcond2" , model.getValue("/root/send/data/srchpid"));
  1499. setParameter ( "SMMMO02500_cond" , model.getValue("/root/send/data/srchpid"));
  1500. child.btn_bfprcpsrch.dispatch("DOMActivate");
  1501. if (child.grd_patchosinfo.rows > 0){
  1502. child.grd_patchosinfo.row = 1;
  1503. }
  1504. child.javascript.fPatChosInfo();
  1505. }else{
  1506. setParameter ( "SMMMO02500_cond" , model.getValue("/root/send/data/srchpid"));
  1507. open("SMMMO02500", "","","", "SMMMO02500", "/root/send/data/srchpid","/root/init/srchcond2");
  1508. }
  1509. ]]>
  1510. </script>
  1511. </button>
  1512. <button id="button2" class="btn2_letter4" style="left:1038px; top:54px; width:64px; height:19px; ">
  1513. <caption>예약현황</caption>
  1514. <script type="javascript" ev:event="DOMActivate">
  1515. <![CDATA[
  1516. //var child = getChildWindow("SMMMO02500");
  1517. /*
  1518. var child = getOpenWindow("SMMMO02500") ;
  1519. if (child != null ) {
  1520. child.close();
  1521. }
  1522. */
  1523. /*
  1524. if ( model.getValue("/root/send/data/srchpid") == "" ) {
  1525. messageBox("[조회필수항목-등록번호] 를 입력하십시오.","I999");
  1526. model.setfocus( "ipt_pid" );
  1527. return;
  1528. }
  1529. */
  1530. open("SMAEA00300", "","","", "SMAEA00300", "/root/send/data/srchpid","/root/send/srchpid");
  1531. //modal("SMAEA00900", "1","150", "150", "SMAEA00900", "/root/send/data/srchpid", "/root/send/pid"); //팝업
  1532. ]]>
  1533. </script>
  1534. </button>
  1535. <line id="line11" class="line_1" style="x1:2px; y1:74px; x2:235px; y2:74px; "/>
  1536. <line id="line3" class="line_1" style="x1:570px; y1:74px; x2:1195px; y2:74px; "/>
  1537. <line id="line4" class="line_1" style="x1:238px; y1:74px; x2:449px; y2:74px; "/>
  1538. <line id="line9" class="line_1" style="x1:2px; y1:695px; x2:260px; y2:695px; "/>
  1539. <datagrid id="grd_rsrvtemp" nodeset="/root/hidden/beforersrvtm/rsrvdtlist" visibility="hidden" caption="변경전" colsep="^" colwidth="122" mergecellsfixedrows="bycolrec" rowsep="|" style="left:975px; top:490px; width:120px; height:235px; ">
  1540. <col ref="before" style="left:0px; top:23px; width:159px; height:23px; "/>
  1541. </datagrid>
  1542. <caption id="caption9" class="tit_2" style="left:452px; top:60px; width:95px; height:13px; ">입원예정일</caption>
  1543. <line id="line10" class="line_1" style="x1:452px; y1:74px; x2:567px; y2:74px; "/>
  1544. <line id="line15" class="line_1" style="x1:452px; y1:142px; x2:567px; y2:142px; "/>
  1545. <caption id="caption12" class="tit_2" style="left:450px; top:128px; width:95px; height:13px; ">수술예정일</caption>
  1546. <button id="button3" class="icon_bottom" style="left:1164px; top:197px; width:26px; height:19px; ">
  1547. <caption/>
  1548. <script type="javascript" ev:event="DOMActivate">
  1549. <![CDATA[
  1550. // switch1.attribute("height") = 501;
  1551. // grd_mainordlist5.attribute("height") = 490;
  1552. // grd_anoprcplist.attribute("height") = 490;
  1553. switch1.attribute("top") = 216;
  1554. switch1.attribute("height") = 189;
  1555. case1.attribute("height") = 212;
  1556. case2.attribute("height") = 212;
  1557. grd_mainordlist5.attribute("height") = 179;
  1558. grd_anoprcplist.attribute("height") = 179;
  1559. //btn_timecls.attribute("top") = 236;
  1560. cap_sleep.attribute("top") = 197;
  1561. btn_execcncl.attribute("top") = 197;
  1562. button4.attribute("top") = 197;
  1563. button3.attribute("top") = 197;
  1564. ]]>
  1565. </script>
  1566. </button>
  1567. <button id="button4" class="icon_top" style="left:1134px; top:197px; width:26px; height:19px; ">
  1568. <caption/>
  1569. <script type="javascript" ev:event="DOMActivate">
  1570. <![CDATA[
  1571. // switch1.attribute("height") = 132;
  1572. // grd_mainordlist5.attribute("height") = 123;
  1573. // grd_anoprcplist.attribute("height") = 123;
  1574. switch1.attribute("top") = 20;
  1575. switch1.attribute("height") = 356;
  1576. case1.attribute("height") = 379;
  1577. case2.attribute("height") = 379;
  1578. grd_mainordlist5.attribute("height") = 347;
  1579. grd_anoprcplist.attribute("height") = 347;
  1580. //btn_timecls.attribute("top") = 358;
  1581. cap_sleep.attribute("top") = 383;
  1582. btn_execcncl.attribute("top") = 383;
  1583. button4.attribute("top") = 383;
  1584. button3.attribute("top") = 383;
  1585. ]]>
  1586. </script>
  1587. </button>
  1588. <datagrid id="grd_opschedd" nodeset="/root/main/exculist/mainordlist3" caption="수술예정일" colsep="^" colwidth="99" mergecellsfixedrows="bycolrec" rowsep="|" style="left:452px; top:147px; width:115px; height:48px; ">
  1589. <col ref="opschedd" format="yyyy-mm-dd" style="left:0px; top:23px; width:159px; height:23px; "/>
  1590. </datagrid>
  1591. <datagrid id="grd_momolist" nodeset="/root/main/rsrvposstmlist/deptmemo" class="datagrid0" scroll="vertical" caption="일자^메모내용" colsep="^" colwidth="0, 245" mergecellsfixedrows="bycolrec" rowsep="|" tooltip="true" style="left:0px; top:553px; width:258px; height:49px; ">
  1592. <col ref="memodt"/>
  1593. <col disabled="true" ref="memorem" type="input" style="left:0px; top:0px; width:54px; height:23px; "/>
  1594. </datagrid>
  1595. <textarea id="tar_prcpremfact" ref="/root/main/comment1/prcpcmt" disabled="true" style="left:0px; top:629px; width:258px; height:43px; "/>
  1596. <object id="rtfviewer" clsid="{a4bf7e18-5f67-4868-a726-eed421632374}" visibility="hidden" style="left:855px; top:680px; width:40px; height:45px; "/>
  1597. <caption id="cap_sleep" ref="/root/hidden/chkgam" visibility="hidden" style="left:997px; top:196px; width:63px; height:20px; font-family:굴림; font-size:12pt; font-weight:bold; color:#ffffff; text-align:center; vertical-align:bottom; background-color:#ff0000; "/>
  1598. <button id="btn_timecls" class="btn2_letter4" visibility="hidden" style="left:930px; top:196px; width:64px; height:19px; ">
  1599. <caption>시간배정</caption>
  1600. <script type="javascript" ev:event="DOMActivate">
  1601. <![CDATA[
  1602. var nodeList = instance1.selectNodes("/root/main/exculist/mainordlist5[rsrvflagyn='미예약' & excuroomnm != '' ]"); //미예약 다 뿌려줌
  1603. var rCSV = getNodeListCSV(nodeList);
  1604. model.setValue("/root/send/data/autorsrvtmset/autorsrvtm", rCSV);
  1605. submit("TRAEA02008");
  1606. var j = 1;
  1607. for(var i = 0 ; i < grd_mainordlist5.rows ; i++ ){
  1608. if(model.getValue("/root/main/exculist/mainordlist5["+i+"]/rsrvflagyn") == "미예약") {
  1609. model.setValue("/root/main/exculist/mainordlist5["+i+"]/rsrvdt",model.getValue("/root/hidden/autorsrvtmset/autorsrvtm["+j+"]/rsrvdt"));
  1610. model.setValue("/root/main/exculist/mainordlist5["+i+"]/srchrsrvtm",model.getValue("/root/hidden/autorsrvtmset/autorsrvtm["+j+"]/rsrvdt"));
  1611. j++;
  1612. }
  1613. }
  1614. model.refresh();
  1615. ]]>
  1616. </script>
  1617. </button>
  1618. <caption id="caption16" class="cell_1" style="left:555px; top:27px; width:43px; height:23px; vertical-align:middle; ">S/A</caption>
  1619. <button id="button6" class="btn2_letter6" style="left:1106px; top:54px; width:86px; height:19px; ">
  1620. <caption>예약변경조회</caption>
  1621. <script type="javascript" ev:event="DOMActivate">
  1622. <![CDATA[
  1623. /*
  1624. var child = getChildWindow("SMMMO02500");
  1625. if (child != null ) {
  1626. child.javascript.window.close();
  1627. }
  1628. */
  1629. open("SMAEA00800", "","","", "SMAEA00800", "/root/send/data/srchpid","/root/send/pid");
  1630. // window.setInterval("getChildWindow('SMAEA00800').window.activate()", 1000);
  1631. ]]>
  1632. </script>
  1633. </button>
  1634. <line id="line14" class="line_3" style="x1:449px; y1:52px; x2:1194px; y2:52px; "/>
  1635. <line id="line2" class="line_1" style="x1:2px; y1:427px; x2:260px; y2:427px; "/>
  1636. <button id="button22" class="btn2_letter6" style="left:172px; top:407px; width:86px; height:19px; ">
  1637. <caption>예약변경관리</caption>
  1638. <script type="javascript" ev:event="DOMActivate">
  1639. <![CDATA[
  1640. /*
  1641. var child = getChildWindow("SMMMO02500");
  1642. if (child != null ) {
  1643. child.javascript.window.close();
  1644. }
  1645. */
  1646. open("SMAEA00700", "","","", "SMAEA00700", "","");
  1647. ]]>
  1648. </script>
  1649. </button>
  1650. <button id="btn_rsrv" class="btn4_letter2" style="left:1008px; top:408px; width:56px; height:22px; ">
  1651. <caption>저장</caption>
  1652. <script type="javascript" ev:event="DOMActivate">
  1653. <![CDATA[
  1654. var nodeList = instance1.selectNodes("/root/main/exculist/mainordlist5[check='true' ]");
  1655. var rCSV = getNodeListCSV(nodeList);
  1656. var nodeList2= instance1.selectNodes("/root/main/exculist/mainordlist5[srchrsrvtm='-' ]");
  1657. var rCSV2 = getNodeListCSV(nodeList2);
  1658. if ( rCSV == null ) {
  1659. messageBox("처방내역을 ","C002");
  1660. return "0";
  1661. }
  1662. if ( rCSV != null && rCSV2 != null ) {
  1663. messageBox("예약시간을 ","C002");
  1664. return "0";
  1665. }
  1666. //얘약 수정시 메시지박스 띄워주기
  1667. var modifyinfo = "";
  1668. var j = 1;
  1669. var checknum = 0;
  1670. for(var i = 0; i < grd_mainordlist5.rows ; i++) {
  1671. if(model.getValue("/root/main/exculist/mainordlist5["+i+"]/check") == "true" && model.getValue("/root/main/exculist/mainordlist5["+i+"]/rsrvflagyn") == "예약" ) {
  1672. var before =model.getValue("/root/main/exculist/mainordlist5["+i+"]/bf_srchrsrvtm");
  1673. var rsrvdt = model.getValue("/root/main/exculist/mainordlist5["+i+"]/srchrsrvtm");
  1674. var bf_cdnm = model.getValue("/root/main/exculist/mainordlist5["+i+"]/prcpnm");
  1675. checknum = checknum +1;
  1676. modifyinfo +=checknum +"."+ bf_cdnm+" \r\n"+ " → 전 :"+before.substr(0,4)+"-"+before.substr(4,2)+"-"+before.substr(6,2)+" "+before.substr(8,2)+":"+before.substr(10,2) +" / 후 : "+rsrvdt.substr(0,4)+"-"+rsrvdt.substr(4,2)+"-"+rsrvdt.substr(6,2)+" "+rsrvdt.substr(8,2)+":"+rsrvdt.substr(10,2)+" \r\n\r\n" ;
  1677. j++;
  1678. }
  1679. }
  1680. for(var i = 0; i < grd_mainordlist5.rows ; i++) {
  1681. if(model.getValue("/root/main/exculist/mainordlist5["+i+"]/check") == "true" && model.getValue("/root/main/exculist/mainordlist5["+i+"]/rsrvflagyn") == "미예약" ) {
  1682. var sexcuroomcd = model.getValue("/root/main/exculist/mainordlist5["+ i +"]/excuroomcd");
  1683. if (sexcuroomcd.length > 3){
  1684. var ssonogb = sexcuroomcd.substring(0, 4)
  1685. if (ssonogb == "SONO"){
  1686. messageBox("수행부서를 선택하시기 바랍니다.", "E999", "");
  1687. return;
  1688. }
  1689. }
  1690. }
  1691. }
  1692. if (model.getValue("/root/send/data/chkflag") == "T"){
  1693. var message = messageBox( modifyinfo +"\r\n\r\n예약(수정) 저장 후 예약증 출력","S001","\r\n예약(수정)를 취소하시려면 취소를 누르십시오.");
  1694. var chk = "N";
  1695. if ( message == 6 ) { //예
  1696. if (exeRsrvTransaction("rsrv") == true){
  1697. chk = "Y";
  1698. for(var i = 1 ; i < grd_mainordlist5.rows; i ++) {
  1699. if(model.getValue("/root/main/exculist/mainordlist5["+i+"]/check") == "true" ) {
  1700. var rsrvdt = model.getValue("/root/main/exculist/mainordlist5["+i+"]/srchrsrvtm");
  1701. var prcpnm = model.getValue("/root/main/exculist/mainordlist5["+i+"]/prcpnm");
  1702. var sna = opt_sex.value+"/"+opt_age.value ;
  1703. var tmpldata = model.getValue("/root/main/exculist/mainordlist5["+i+"]/tmpldata");
  1704. var year = rsrvdt.substr(0,4);
  1705. var month = rsrvdt.substr(4,2);
  1706. var day = rsrvdt.substr(6,2);
  1707. var week = rsrvdt.substr(0,8).toDate().getDayOfWeek("K");
  1708. var hh = rsrvdt.substr(8,2);
  1709. if(hh > 12)
  1710. {
  1711. hh = "오후 "+(hh-12);
  1712. }
  1713. else{
  1714. hh = "오전 "+hh;
  1715. }
  1716. var mm = rsrvdt.substr(10,2);
  1717. //예약증 출력
  1718. if(tmpldata != "") {
  1719. //1. 예약예문내용을 뷰어로 보여주기
  1720. rtfviewer.TextRtf = tmpldata;
  1721. //2. 바꾸기
  1722. rtfviewer.ReplaceRtfCode("pid",ipt_pid.value); //등록번호
  1723. rtfviewer.ReplaceRtfCode("patnm",opt_hngnm.value); //성명
  1724. rtfviewer.ReplaceRtfCode("year",year); //년
  1725. rtfviewer.ReplaceRtfCode("month",month); //월
  1726. rtfviewer.ReplaceRtfCode("day",day); //일
  1727. rtfviewer.ReplaceRtfCode("week",week); //요일
  1728. rtfviewer.ReplaceRtfCode("hh",hh); //시
  1729. rtfviewer.ReplaceRtfCode("mm",mm); //분
  1730. //3. 현재내용을 파일에 저장
  1731. rtfviewer.SaveRtfFile();
  1732. //4. 출력
  1733. rtfviewer.print();
  1734. //5. 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
  1735. fInitialize();
  1736. }
  1737. }
  1738. }
  1739. }
  1740. }
  1741. if (message == 7 ) { //아니오
  1742. if (exeRsrvTransaction("rsrv") == true){
  1743. chk = "Y";
  1744. }
  1745. }
  1746. }else{
  1747. if( messageBox("해당 선택 정보내역을 " , "Q002" ) == 6 ){
  1748. if (exeRsrvTransaction("rsrv") == true){
  1749. chk = "Y";
  1750. }
  1751. }
  1752. }
  1753. if (chk == "Y"){
  1754. readfunc();
  1755. //상태별 색상주기
  1756. fSetGrdMainordlist();
  1757. }
  1758. ]]>
  1759. </script>
  1760. </button>
  1761. <button id="btn_can" class="btn4_letter2" style="left:1066px; top:408px; width:56px; height:22px; ">
  1762. <caption>취소</caption>
  1763. <script type="javascript" ev:event="DOMActivate">
  1764. <![CDATA[
  1765. var rsrvdt = model.getValue("/root/main/exculist/mainordlist5["+grd_mainordlist5.row+"]/rsrvdt");
  1766. // if ( messageBox(rsrvdt.substr(0,4)+"-"+rsrvdt.substr(4,2)+"-"+rsrvdt.substr(6,2)+" "+rsrvdt.substr(8,2)+":"+rsrvdt.substr(10,2)+" 예약취소를","Q002")==6 ) {
  1767. var nodeList = instance1.selectNodes("/root/main/exculist/mainordlist5[check='true' ]");
  1768. var rCSV = getNodeListCSV(nodeList);
  1769. if ( rCSV == null ) {
  1770. messageBox("처방내역을 ","C002");
  1771. return "0";
  1772. }
  1773. exeRsrvTransaction("cncl");
  1774. readfunc();
  1775. //상태별 색상주기
  1776. fSetGrdMainordlist();
  1777. // }
  1778. ]]>
  1779. </script>
  1780. </button>
  1781. <button id="btn_init" class="btn4_letter3" style="left:1125px; top:408px; width:68px; height:22px; ">
  1782. <caption>재출력</caption>
  1783. <script type="javascript" ev:event="DOMActivate">
  1784. <![CDATA[
  1785. //********************************
  1786. // ******예약증 출력 20070821******
  1787. //********************************
  1788. var rsrvdt = model.getValue("/root/main/exculist/mainordlist5["+grd_mainordlist5.row+"]/srchrsrvtm");
  1789. var prcpnm = model.getValue("/root/main/exculist/mainordlist5["+grd_mainordlist5.row+"]/prcpnm");
  1790. var sna = opt_sex.value+"/"+opt_age.value ;
  1791. var tmpldata = model.getValue("/root/main/exculist/mainordlist5["+grd_mainordlist5.row+"]/tmpldata");
  1792. var year = rsrvdt.substr(0,4);
  1793. var month = rsrvdt.substr(4,2);
  1794. var day = rsrvdt.substr(6,2);
  1795. var week = rsrvdt.substr(0,8).toDate().getDayOfWeek("K");
  1796. var hh = rsrvdt.substr(8,2);
  1797. var mm = rsrvdt.substr(10,2);
  1798. if(hh > 12)
  1799. {
  1800. hh = "오후 "+(hh-12);
  1801. }
  1802. else{
  1803. hh = "오전 "+hh;
  1804. }
  1805. var mm = rsrvdt.substr(10,2);
  1806. if(tmpldata != "") {
  1807. //1. 예약예문내용을 뷰어로 보여주기
  1808. // alert(tmpldata);
  1809. rtfviewer.TextRtf = tmpldata;
  1810. //2. 바꾸기
  1811. rtfviewer.ReplaceRtfCode("pid",ipt_pid.value); //등록번호
  1812. rtfviewer.ReplaceRtfCode("patnm",opt_hngnm.value); //성명
  1813. // rtfviewer.ReplaceRtfCode("@@gender/age",sna); //성별,연령
  1814. // rtfviewer.ReplaceRtfCode("@@prcpnm",prcpnm); //검사명
  1815. rtfviewer.ReplaceRtfCode("year",year); //년
  1816. rtfviewer.ReplaceRtfCode("month",month); //월
  1817. rtfviewer.ReplaceRtfCode("day",day); //일
  1818. rtfviewer.ReplaceRtfCode("week",week); //요일
  1819. rtfviewer.ReplaceRtfCode("hh",hh); //시
  1820. rtfviewer.ReplaceRtfCode("mm",mm); //분
  1821. //3. 현재내용을 파일에 저장
  1822. rtfviewer.SaveRtfFile();
  1823. //4. 출력
  1824. rtfviewer.print();
  1825. //5. 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
  1826. fInitialize();
  1827. }
  1828. else {
  1829. messageBox("등록된 예약예문이 ", "I004");
  1830. }
  1831. ]]>
  1832. </script>
  1833. </button>
  1834. <caption id="caption10" class="tit_2" style="left:806px; top:416px; width:85px; height:13px; ">예약내역</caption>
  1835. <line id="line5" class="line_1" style="x1:806px; y1:431px; x2:1191px; y2:431px; "/>
  1836. <line id="line6" class="line_1" style="x1:657px; y1:431px; x2:799px; y2:431px; "/>
  1837. <caption id="caption15" class="tit_2" style="left:659px; top:416px; width:85px; height:13px; ">예약시간</caption>
  1838. <switch id="switch1" style="left:2px; top:216px; width:1192px; height:189px; ">
  1839. <case id="case1" selected="true" style="left:0px; top:0px; width:1190px; height:212px; ">
  1840. <line id="line16" class="line_1" style="x1:0px; y1:1px; x2:1188px; y2:1px; "/>
  1841. <datagrid id="grd_mainordlist5" nodeset="/root/main/exculist/mainordlist5" caption="^구분^수납^처방일자^진료과^처방의^검사코드^검사명^수행부서^희망일자^예약시간^소요시간^종료시간^Remark^수행가능부서^prcpgenflag^prcpdd^execprcpuniqno^execprcpstatcd^prcpkindcd^excupartcd^indd^actorddd^orddrid^execrid^suppdeptcd^cnclresncd^pid^prcpdelivefact^rsrvplceflag^rsrvexcupossyn^rsrvexmptmplcd^tmpldata^rsrvflag^cretno^orddd^rsrvdt^excuroomcd^bf_srchrsrvtm^pacsnocretyn^rgsttm^rgstrid^examroomnm^caption1^caption2^caption3^caption4^caption5^caption6^orddd" colsep="^" colwidth="26, 49, 53, 77, 89, 54, 73, 280, 100, 77, 109, 60, 58, 360, 147, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100, 100, 100, 100, 100, 100, 100, 100, 27, 25, 33, 31, 29, 32" explorerbar="sortshow" frozencols="7" mergecellsfixedrows="bycolrec" rowsep="|" style="left:0px; top:6px; width:1188px; height:179px; ">
  1842. <col checkvalue="true,false" ref="check" type="checkbox"/>
  1843. <col ref="rsrvflagyn"/>
  1844. <col ref="rcptyn"/>
  1845. <col ref="prcpdd" format="yyyy-mm-dd"/>
  1846. <col ref="orddepthngnm"/>
  1847. <col ref="orddrnm"/>
  1848. <col ref="calcscorcd"/>
  1849. <col disabled="true" ref="prcpnm"/>
  1850. <col disabled="true" ref="excuroom" type="combo">
  1851. <choices>
  1852. <itemset nodeset="/root/init/cmb_info/initexecroom">
  1853. <label ref="excuroomcdnm"/>
  1854. <value ref="excuroomcdid"/>
  1855. </itemset>
  1856. </choices>
  1857. </col>
  1858. <col ref="prcphopedd" format="yyyy-mm-dd hh:nn"/>
  1859. <col ref="srchrsrvtm" type="input" format="yyyy-mm-dd hh:nn"/>
  1860. <col ref="excutm" style="text-align:center; "/>
  1861. <col ref="endtime" format="hh:nn" style="text-align:center; "/>
  1862. <col ref="rsrvrem" type="input"/>
  1863. <col ref="excuroomnm" visibility="hidden"/>
  1864. <col ref="genrflag"/>
  1865. <col ref="prcpdd"/>
  1866. <col ref="execprcpuniqno"/>
  1867. <col ref="execprcpstatcd"/>
  1868. <col ref="prcpkindcd"/>
  1869. <col ref="excupartcd"/>
  1870. <col ref="indd"/>
  1871. <col ref="actorddd"/>
  1872. <col ref="orddrid"/>
  1873. <col ref="execrid"/>
  1874. <col ref="suppdeptcd"/>
  1875. <col ref="cnclrescd"/>
  1876. <col ref="pid"/>
  1877. <col ref="prcpdelivefact"/>
  1878. <col ref="rsrvplceflag"/>
  1879. <col ref="rsrvexcupossyn"/>
  1880. <col ref="rsrvexmptmplcd"/>
  1881. <col ref="tmpldata"/>
  1882. <col ref="rsrvflag"/>
  1883. <col ref="cretno"/>
  1884. <col ref="orddd" visibility="hidden"/>
  1885. <col ref="rsrvdt" visibility="hidden"/>
  1886. <col ref="excuroomcd" visibility="hidden"/>
  1887. <col ref="bf_srchrsrvtm" visibility="hidden"/>
  1888. <col ref="pacsnocretyn" visibility="hidden"/>
  1889. <col ref="rgsttm" visibility="hidden"/>
  1890. <col ref="rgstrid" visibility="hidden"/>
  1891. <col ref="examroomnm" visibility="hidden"/>
  1892. <col ref="orddeptcd" visibility="hidden"/>
  1893. <col ref="prcpexecdeptcd" visibility="hidden"/>
  1894. <col ref="rsrvtmcntlyn" visibility="hidden"/>
  1895. <col ref="rsrvpsnnocntlyn" visibility="hidden"/>
  1896. <col ref="excucdrem" visibility="hidden"/>
  1897. <col ref="prcpgenrflag" visibility="hidden"/>
  1898. <script type="javascript" ev:event="onclick">
  1899. <![CDATA[
  1900. //스크롤 조작시 온클릭 이벤트 안타도록
  1901. if( isDataCell() ){
  1902. if (model.getValue("/root/main/exculist/mainordlist5[" + grd_mainordlist5.row + "]/excucdrem") != ""){
  1903. //alert(model.getValue("/root/main/exculist/mainordlist5[" + grd_mainordlist5.row + "]/excucdrem"));
  1904. messageBox(model.getValue("/root/main/exculist/mainordlist5[" + grd_mainordlist5.row + "]/excucdrem"), "E999", "");
  1905. }
  1906. if(grd_mainordlist5.col != 0 && grd_mainordlist5.col != 10 && grd_mainordlist5.col != 13 ) {
  1907. // 예약 Comment 복사
  1908. model.setValue("/root/hidden/rsrvrem", model.getValue("/root/main/exculist/mainordlist5[" + grd_mainordlist5.row + "]/rsrvrem"));
  1909. var schk = model.getValue("/root/main/exculist/mainordlist5[" + grd_mainordlist5.row + "]/check");
  1910. if (schk == "true"){
  1911. model.setValue("/root/main/exculist/mainordlist5[" + grd_mainordlist5.row + "]/check", "false");
  1912. }else{
  1913. model.setValue("/root/main/exculist/mainordlist5[" + grd_mainordlist5.row + "]/check", "true");
  1914. }
  1915. grd_mainordlist5.refresh();
  1916. // 달력에 처음 로딩시 color값 안들어 가기 위해
  1917. model.setValue("/root/hidden/grdcellcolor/color","");
  1918. //tar_prcpremfact.value = model.getValue("/root/main/exculist/mainordlist5["+grd_mainordlist5.row+"]/prcpdelivefact");
  1919. model.setValue("/root/main/comment1/prcpcmt", model.getValue("/root/main/exculist/mainordlist5["+grd_mainordlist5.row+"]/prcpdelivefact"));
  1920. // model.setValue("/root/main/comment1/prcpcmt",model.getValue("/root/main/exculist/mainordlist5["+grd_mainordlist5.row+"]/prcpdelivefact"));
  1921. model.setValue("/root/send/data/suppdeptcd",model.getValue("/root/main/exculist/mainordlist5["+grd_mainordlist5.row+"]/suppdeptcd"));
  1922. model.removeNodeset("/root/main/orddeptinfo/orddeptlist");
  1923. grd_orddept.refresh();
  1924. //수행부서 리스트 담기
  1925. //var excuroomnm = model.getValue("/root/main/exculist/mainordlist5["+grd_mainordlist5.row+"]/excuroomnm");
  1926. model.setValue("/root/send/data/excuroomnm", model.getValue("/root/main/exculist/mainordlist5["+grd_mainordlist5.row+"]/excuroomnm"));
  1927. /*
  1928. var str = excuroomnm.split("^");
  1929. var row = 1;
  1930. for(var i =0 ; i < str.length ; i++ ) {
  1931. grd_orddept.addRow(false);
  1932. var aa = str[i];
  1933. model.setValue("/root/main/orddeptinfo/orddeptlist["+row+"]/orddeptcd",aa.getTrim());
  1934. row++ ;
  1935. }
  1936. grd_orddept.refresh();
  1937. if(model.getValue("/root/main/orddeptinfo/orddeptlist["+grd_orddept.bottomRow+"]/orddeptcd") == "")
  1938. {
  1939. grd_orddept.deleteItem(grd_orddept.bottomRow);
  1940. }
  1941. model.setValue("/root/send/data/excuroomcd",str[0]);
  1942. */
  1943. model.setValue("/root/send/data/excuroomcd", model.getValue("/root/main/exculist/mainordlist5["+grd_mainordlist5.row+"]/excuroom"));
  1944. initCalendar();
  1945. setCurrentDate();
  1946. model.makeNode("/root/main/orddeptinfo/orddeptlist");
  1947. copyNodesetType("/root/main/orddeptinfo/orddeptlist", "/root/init/curerprescondlist/orddeptlist", "replace");
  1948. grd_orddept.refresh();
  1949. model.setValue("/root/send/data/excuroomnm", "");
  1950. if (model.getValue("/root/main/exculist/mainordlist5["+grd_mainordlist5.row+"]/rsrvflagyn") == "예약"){
  1951. model.setValue("/root/main/exculist/mainordlist5["+grd_mainordlist5.row+"]/examroomnm",grd_mainordlist5.labelmatrix(grd_mainordlist5.row, grd_mainordlist5.colRef("excuroom")));
  1952. }else{
  1953. var iname = grd_mainordlist5.labelmatrix(grd_mainordlist5.row, grd_mainordlist5.colRef("excuroom"));
  1954. if (iname == ""){
  1955. iname = model.getValue("/root/main/exculist/mainordlist5["+grd_mainordlist5.row+"]/orddrnm");
  1956. }
  1957. if (instance1.selectSingleNode("/root/init/cmb_info/initexecroom[excuroomcdnm='" + iname + "']") == null){
  1958. var icode = "";
  1959. }else{
  1960. var icode = instance1.selectSingleNode("/root/init/cmb_info/initexecroom[excuroomcdnm='" + iname + "']").excuroomcdid.nodeValue;
  1961. }
  1962. var irow = grd_orddept.findRow(icode, 1, 0, false, true);
  1963. if (irow > 0){
  1964. grd_orddept.row = irow;
  1965. grd_orddept.topRow = irow;
  1966. model.refresh();
  1967. }
  1968. }
  1969. //model.refresh();
  1970. if( grd_mainordlist5.valueMatrix(grd_mainordlist5.row, 0) == "true" && model.getValue("/root/main/exculist/mainordlist5["+grd_mainordlist5.row+"]/rsrvplceflag") !="1") {
  1971. if (model.getValue("/root/send/data/chkflag") == "T"){
  1972. messageBox("통합예약실에서 예약", "E001");
  1973. model.setValue("/root/main/exculist/mainordlist5[" + grd_mainordlist5.row + "]/check", "false");
  1974. }
  1975. }
  1976. else{
  1977. if(model.getValue("/root/main/exculist/mainordlist5["+grd_mainordlist5.row+"]/rsrvflagyn") == "예약"){
  1978. grd_rsrvtemp.addRow();
  1979. model.setValue("/root/hidden/beforersrvtm/rsrvdtlist["+grd_rsrvtemp.bottomRow+"]/before",model.getValue("/root/main/exculist/mainordlist5["+grd_mainordlist5.row+"]/srchrsrvtm"));
  1980. }
  1981. }
  1982. fTopInfo();
  1983. //처방선택시 자동으로 달력에서 오늘날짜 onclick 이벤트 처리
  1984. getRsrvPossTm(grd_calendar);
  1985. }
  1986. }
  1987. ]]>
  1988. </script>
  1989. <script type="javascript" ev:event="onendedit">
  1990. <![CDATA[
  1991. //예약시간 수정후
  1992. if(grd_mainordlist5.col == "10") {
  1993. var srchrsrvtm = model.getValue("/root/main/exculist/mainordlist5["+grd_mainordlist5.row+"]/srchrsrvtm");
  1994. var rsrvtm = model.getValue("/root/main/exculist/mainordlist5["+grd_mainordlist5.row+"]/rsrvdt");
  1995. var term = model.getValue("/root/main/exculist/mainordlist5["+grd_mainordlist5.row+"]/excutm");
  1996. var posstm ="";
  1997. //수기로 입력시 과거시간 체크
  1998. if( srchrsrvtm < getCurrentDate().substr(0,8) + getCurrentTime().substr(0,4) ) {
  1999. messageBox("예약시간이 과거시간", "E008");
  2000. return ;
  2001. }
  2002. //수기로 입력시 미래일자 체크
  2003. /*
  2004. if( srchrsrvtm.substr(0,8) != rsrvtm.substr(0,8) ) {
  2005. messageBox("수정일자와 선택일자가", "E004");
  2006. return ;
  2007. }
  2008. */
  2009. else {
  2010. for( var i = 1 ; i < grd_rsrvlist.rows ; i++ ) {
  2011. var min = model.getValue("/root/main/rsrvposstmlist/rsrvlist["+i+"]/srchrsrvtm");
  2012. if(srchrsrvtm.substr(8,4) > min.substr(0,4) ) {
  2013. posstm = min.substr(0,4);
  2014. }
  2015. else {
  2016. posstm = min.substr(0,4);
  2017. break;
  2018. }
  2019. }
  2020. var dateObj = new Date();
  2021. var dateObj2 = new Date();
  2022. // alert("posstm : "+posstm);
  2023. if(posstm > srchrsrvtm.substr(8,4) ) {
  2024. dateObj.setHours(posstm.substr(0,2)- srchrsrvtm.substr(8,2), posstm.substr(2,2)- srchrsrvtm.substr(10,2));
  2025. dateObj2.setHours(00,term);
  2026. // alert("후 : " + dateObj.getHours()+ "시" + dateObj.getMinutes() + "분");
  2027. // alert("후 : " + dateObj2.getHours()+ "시" + dateObj2.getMinutes() + "분");
  2028. // alert(dateObj.getHours()+ "" + dateObj.getMinutes() );
  2029. if( dateObj.setHours(posstm.substr(0,2)- srchrsrvtm.substr(8,2), posstm.substr(2,2)- srchrsrvtm.substr(10,2)) < dateObj2.setHours(00,term)) {
  2030. messageBox("소요시간 초과로 예약", "E001");
  2031. model.setValue("/root/main/exculist/mainordlist5["+grd_mainordlist5.row+"]/srchrsrvtm","-");
  2032. }
  2033. model.refresh();
  2034. }
  2035. }
  2036. }
  2037. ]]>
  2038. </script>
  2039. <script type="javascript" ev:event="xforms-value-changed">
  2040. <![CDATA[
  2041. //예약시간이 변경되거나 Remark가 변경된 경우
  2042. if(grd_mainordlist5.col == 10 || grd_mainordlist5.col == 13){
  2043. if (grd_mainordlist5.col == 10 && model.getValue("/root/main/exculist/mainordlist5["+grd_mainordlist5.row+"]/excuroom") == ""){
  2044. messageBox("미예약된 항목의 예약시간 수정을 위해서 수행부서 선택은 필수", "E008", "수행부서를 선택해 주세요");
  2045. return false;
  2046. }
  2047. if (model.getValue("/root/hidden/orddeptcheck") != "check"){
  2048. //model.alert("aaa");
  2049. model.setValue("/root/main/exculist/mainordlist5["+grd_mainordlist5.row+"]/examroomnm",grd_mainordlist5.labelmatrix(grd_mainordlist5.row,8));
  2050. model.setValue("/root/main/exculist/mainordlist5["+grd_mainordlist5.row+"]/excuroomcd", model.getValue("/root/main/exculist/mainordlist5["+grd_mainordlist5.row+"]/excuroom"));
  2051. }
  2052. model.setValue("/root/hidden/orddeptcheck","");
  2053. model.setValue("/root/main/exculist/mainordlist5["+grd_mainordlist5.row+"]/check" ,"true");
  2054. }
  2055. model.refresh();
  2056. ]]>
  2057. </script>
  2058. <script type="javascript" ev:event="onaftersort">
  2059. <![CDATA[
  2060. grd_mainordlist5.gridToInstance();
  2061. ]]>
  2062. </script>
  2063. </datagrid>
  2064. <bool id="bool1" ref="/root/hidden/boolcontrol/bool" style="left:4px; top:9px; width:20px; height:20px; ">
  2065. <script type="javascript" ev:event="xforms-select">
  2066. <![CDATA[
  2067. // var execprcpuniqno = model.getValue("/root/main/exculist/mainordlist5[" + ( grd_mainordlist5.row - grd_mainordlist5.fixedRows + 1 ) + "]/rsrvflagyn");
  2068. var nodeList = instance1.selectNodes("/root/main/exculist/mainordlist5[rsrvflagyn='미예약']");
  2069. var node;
  2070. while( node = nodeList.nextNode() ) {
  2071. node.check.text = "true";
  2072. }
  2073. ]]>
  2074. </script>
  2075. <script type="javascript" ev:event="xforms-deselect">
  2076. <![CDATA[
  2077. // var execprcpuniqno = model.getValue("/root/main/exculist/mainordlist5[" + ( grd_mainordlist5.row - grd_mainordlist5.fixedRows + 1 ) + "]/execprcpuniqno");
  2078. // var nodeList = instance1.selectNodes("/root/main/exculist/mainordlist5[execprcpuniqno!='" + execprcpuniqno + "']");
  2079. var nodeList = instance1.selectNodes("/root/main/exculist/mainordlist5[check='true']");
  2080. var node;
  2081. while( node = nodeList.nextNode() ) {
  2082. node.check.text = "false";
  2083. }
  2084. ]]>
  2085. </script>
  2086. </bool>
  2087. </case>
  2088. <case id="case2">
  2089. <line id="line17" class="line_1" style="x1:0px; y1:1px; x2:1190px; y2:1px; "/>
  2090. <datagrid id="grd_anoprcplist" nodeset="/root/main/exculist/subordlist2" caption="구분^수납^처방일자^진료과^처방의^처방상태^검사코드^검사명^수행부서^희망일자^예약시간^실시시간^소요시간^종료시간^Remark^prcpgenflag^prcpdd^execprcpuniqno^execprcpstatcd^prcpkindcd^excupartcd^indd^actorddd^orddrid^execrid^suppdeptcd^cnclresncd^pid^prcpdelivefact^rsrvplceflag^rsrvexcupossyn^rsrvexmptmplcd^tmpldata^rsrvflag^cretno^orddd" colsep="^" colwidth="49, 53, 77, 89, 54, 100, 73, 280, 100, 77, 109, 100, 60, 58, 360" explorerbar="sortshow" frozencols="7" mergecellsfixedrows="bycolrec" rowsep="|" style="left:0px; top:6px; width:1188px; height:179px; ">
  2091. <col ref="rsrvflagyn" visibility="hidden"/>
  2092. <col ref="rcptyn"/>
  2093. <col ref="prcpdd" format="yyyy-mm-dd"/>
  2094. <col ref="orddepthngnm"/>
  2095. <col ref="orddrnm"/>
  2096. <col disabled="true" ref="execprcpstatcd" type="combo">
  2097. <choices>
  2098. <itemset nodeset="/root/init/baseinfo/initexecprcpstatcd/M0011">
  2099. <label ref="cdnm"/>
  2100. <value ref="cdid"/>
  2101. </itemset>
  2102. </choices>
  2103. </col>
  2104. <col ref="calcscorcd"/>
  2105. <col disabled="true" ref="prcpnm"/>
  2106. <col disabled="true" ref="excuroom"/>
  2107. <col ref="prcphopedd" format="yyyy-mm-dd hh:nn"/>
  2108. <col ref="srchrsrvtm" format="yyyy-mm-dd hh:nn"/>
  2109. <col ref="exectm" format="yyyy-mm-dd hh:nn"/>
  2110. <col ref="excutm" style="text-align:center; "/>
  2111. <col ref="endtime" format="hh:nn" style="text-align:center; "/>
  2112. <col ref="rsrvrem"/>
  2113. <script type="javascript" ev:event="onaftersort">
  2114. <![CDATA[
  2115. grd_anoprcplist.gridToInstance();
  2116. ]]>
  2117. </script>
  2118. </datagrid>
  2119. </case>
  2120. </switch>
  2121. <datagrid id="datagrid2" nodeset="/root/main/exculist/subordlist3/rows" caption="환자번호^일자^Comment^caption1" colsep="^" colwidth="100, 77, 162, 100" mergecellsfixedrows="bycolrec" rowsep="|" style="left:0px; top:700px; width:258px; height:79px; ">
  2122. <col ref="pid" visibility="hidden"/>
  2123. <col ref="cmtdd" format="yyyy-mm-dd" style="text-align:center; "/>
  2124. <col ref="patcmt" type="input"/>
  2125. <col ref="iudgb" visibility="hidden"/>
  2126. <script type="javascript" ev:event="xforms-value-changed">
  2127. <![CDATA[
  2128. if (model.getValue("/root/main/exculist/subordlist3/rows[" + datagrid2.row + "]/iudgb") != "I"){
  2129. model.setValue("/root/main/exculist/subordlist3/rows[" + datagrid2.row + "]/iudgb", "U");
  2130. }
  2131. datagrid2.refresh();
  2132. ]]>
  2133. </script>
  2134. </datagrid>
  2135. <button id="button1" class="btn4_letter2" disabled="true" style="left:200px; top:673px; width:56px; height:22px; ">
  2136. <caption>저장</caption>
  2137. <script type="javascript" ev:event="DOMActivate">
  2138. <![CDATA[
  2139. var update = getGridUpdateData(datagrid2);
  2140. if(update == ""){
  2141. messageBox("업데이트 정보가 없습니다.", "I");
  2142. return 0;
  2143. } else {
  2144. model.setValue("/root/send/req1/data", update);
  2145. if (submit("TXAEA02002", false)){
  2146. if (submit("TRAEA02009", false)){
  2147. //model.removeNodeset("/root/main/exculist/subordlist3");
  2148. //model.makeNode("/root/main/exculist/subordlist3");
  2149. //model.resetInstanceNode("/root/main/exculist/subordlist3/rows");
  2150. model.removeNodeset("/root/main/exculist/subordlist3/rows");
  2151. copyNodeType("/root/main/exculist/subordlist3", "/root/reqdata1/subordlist3", "replace");
  2152. datagrid2.refresh();
  2153. patcmt();
  2154. }
  2155. }
  2156. }
  2157. ]]>
  2158. </script>
  2159. </button>
  2160. </xhtml:body>
  2161. </xhtml:html>