SPPEA00203_예약제어등록.xrw 48 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
  3. <xhtml:html xmlns:ex="http://www.comsquare.co.kr/xforms/excel" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:ms="urn:schemas-microsoft-com:xslt" xmlns:my="http://www.comsquare.co.kr/example" 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" xmlns:cs="http://www.comsquare.co.kr/xforms">
  4. <xhtml:head>
  5. <xhtml:title>검사예약</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <init>
  10. <deptlist>
  11. <srchinfo>
  12. <cd/>
  13. <nm/>
  14. </srchinfo>
  15. </deptlist>
  16. </init>
  17. <main>
  18. <ctrllist>
  19. <ctrlinfo>
  20. <ctrlseq/>
  21. <fromdd/>
  22. <todd/>
  23. <roomcd/>
  24. <room/>
  25. <orddrid/>
  26. <orddr/>
  27. <specdrid/>
  28. <specdr/>
  29. <fromtm/>
  30. <totm/>
  31. <capa/>
  32. <excd/>
  33. <expt/>
  34. <exptnm/>
  35. <exnm/>
  36. <ctrldesc/>
  37. </ctrlinfo>
  38. </ctrllist>
  39. </main>
  40. <send>
  41. <srch>
  42. <suppdeptcd>2010302030</suppdeptcd>
  43. <deptcd>2010302030</deptcd>
  44. <srchdd/>
  45. <histflag>Y</histflag>
  46. <srchflag/>
  47. <excuroomcd>T</excuroomcd>
  48. <srchcd/>
  49. <srchnm/>
  50. </srch>
  51. <rgst>
  52. <rsrvplce>A</rsrvplce>
  53. <suppdeptcd>2010302030</suppdeptcd>
  54. <excuroomcd>T</excuroomcd>
  55. <excucd>T</excucd>
  56. <ctrlseq/>
  57. <ctrlflag>A</ctrlflag>
  58. <ctrldesc/>
  59. <fromdd/>
  60. <todd/>
  61. <termlist>
  62. <terminfo>
  63. <ctrlseq/>
  64. <termseq/>
  65. <itemtype/>
  66. <itemseq/>
  67. <opcode/>
  68. <valtype/>
  69. <valseq/>
  70. <val/>
  71. <valnm/>
  72. <inflag/>
  73. <aoflag/>
  74. </terminfo>
  75. </termlist>
  76. </rgst>
  77. <del>
  78. <rsrvplce/>
  79. <suppdeptcd/>
  80. <excuroomcd/>
  81. <excucd/>
  82. <ctrlseq/>
  83. </del>
  84. </send>
  85. <temp>
  86. <ctrlseq/>
  87. <srchlist>
  88. <srchinfo>
  89. <cd/>
  90. <nm/>
  91. </srchinfo>
  92. </srchlist>
  93. <fromdd/>
  94. <todd/>
  95. <roomarr/>
  96. <roomlist>
  97. <roominfo>
  98. <cd/>
  99. <nm/>
  100. </roominfo>
  101. </roomlist>
  102. <orddrarr/>
  103. <orddrlist>
  104. <orddrinfo>
  105. <cd/>
  106. <nm/>
  107. </orddrinfo>
  108. </orddrlist>
  109. <specdrarr/>
  110. <specdrlist>
  111. <specdrinfo>
  112. <cd/>
  113. <nm/>
  114. </specdrinfo>
  115. </specdrlist>
  116. <ptflag/>
  117. <ptarr/>
  118. <ptlist>
  119. <ptinfo>
  120. <cd/>
  121. <nm/>
  122. </ptinfo>
  123. </ptlist>
  124. <fromhh/>
  125. <frommm/>
  126. <tohh/>
  127. <tomm/>
  128. <capa/>
  129. <excdlist>
  130. <excdinfo>
  131. <cd/>
  132. <nm/>
  133. </excdinfo>
  134. </excdlist>
  135. <ctrldesc/>
  136. <rslt>
  137. <ctrlseq/>
  138. </rslt>
  139. </temp>
  140. </root>
  141. </instance>
  142. <submission id="TRPEA00212" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srch" replace="instance" resultref="/root/main/ctrllist/ctrlinfo"/>
  143. <submission id="TRPEA00207" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srch" resultref="/root/temp/srchlist/srchinfo"/>
  144. <submission id="TXPEA00203" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/rgst" resultref="/root/temp/rslt"/>
  145. <submission id="TXPEA00205" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/del"/>
  146. <script type="javascript">
  147. <![CDATA[
  148. var ITEM_FLAG = "";
  149. function fInit() {
  150. model.setValue("/root/send/rgst/ctrlseq", "");
  151. model.resetInstanceNode("/root/send/rgst/termlist/terminfo");
  152. model.setValue("/root/send/del/ctrlseq", "");
  153. model.resetInstanceNode("/root/temp");
  154. model.resetInstanceNode("/root/temp/srchlist/srchinfo");
  155. model.resetInstanceNode("/root/temp/roomlist/roominfo");
  156. model.resetInstanceNode("/root/temp/orddrlist/orddrinfo");
  157. model.resetInstanceNode("/root/temp/specdrlist/specdrinfo");
  158. model.resetInstanceNode("/root/temp/ptlist/ptinfo");
  159. model.resetInstanceNode("/root/temp/excdlist/excdinfo");
  160. model.setValue("/root/temp/fromdd", getCurrentDate());
  161. model.setValue("/root/temp/ctrldesc", "");
  162. model.setValue("/root/temp/rslt/ctrlseq", "");
  163. btn_save.value = "등록";
  164. model.refresh();
  165. }
  166. function fSearch() {
  167. submit("TRPEA00212");
  168. fInit();
  169. }
  170. function fSrchItem(flag) {
  171. model.resetInstanceNode("/root/temp/srchlist/srchinfo");
  172. grd_srch.refresh();
  173. cap_srch.visible = false;
  174. cap_srch.attribute("width") = "75px";
  175. cmb_srchcd.visible = false;
  176. ipt_srchnm.visible = false;
  177. rdo_ptflag.visible = false;
  178. grd_srch.fixedcellischeck(0, 0) = false;
  179. if (flag == "room") {
  180. model.setValue("/root/send/srch/srchflag", "room");
  181. grd_srch.caption = "^검사실^검사실";
  182. submit("TRPEA00207");
  183. } else if (flag == "orddr") {
  184. model.setValue("/root/send/srch/srchflag", "ordr");
  185. grd_srch.caption = "^처방의^처방의";
  186. cap_srch.visible = true;
  187. cap_srch.value = "진료과 : ";
  188. cmb_srchcd.visible = true;
  189. } else if (flag == "specdr") {
  190. model.setValue("/root/send/srch/srchflag", "ordr");
  191. grd_srch.caption = "^지정의^지정의";
  192. cap_srch.visible = true;
  193. cap_srch.value = "진료과 : ";
  194. cmb_srchcd.visible = true;
  195. } else if (flag == "excd") {
  196. model.setValue("/root/send/srch/srchflag", "excd");
  197. grd_srch.caption = "^검사코드^검사명";
  198. cap_srch.visible = true;
  199. cap_srch.value = "검사명 : ";
  200. ipt_srchnm.visible = true;
  201. submit("TRPEA00207");
  202. } else if (flag == "pt") {
  203. cap_srch.attribute("width") = "89px";
  204. cap_srch.value = "환자검색 :";
  205. cap_srch.visible = true;
  206. ipt_srchnm.visible = true;
  207. rdo_ptflag.visible = true;
  208. grd_srch.caption = "^등록번호^이름";
  209. for (var i = 1; i <= instance1.selectNodes("/root/temp/ptlist/ptinfo[cd!='']").length; i++) {
  210. model.makeValue("/root/temp/srchlist/srchinfo[" + i + "]/chk", "true");
  211. model.makeValue("/root/temp/srchlist/srchinfo[" + i + "]/cd", model.getValue("/root/temp/ptlist/ptinfo[" + i + "]/cd"));
  212. model.makeValue("/root/temp/srchlist/srchinfo[" + i + "]/nm", model.getValue("/root/temp/ptlist/ptinfo[" + i + "]/nm"));
  213. }
  214. grp_srch.visible = true;
  215. grd_srch.refresh();
  216. model.setFocus("ipt_srchnm");
  217. }
  218. grp_srch.visible = true;
  219. ITEM_FLAG = flag;
  220. }
  221. ]]>
  222. </script>
  223. </model>
  224. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  225. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  226. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  227. <script type="javascript" src="../../../com/commonweb/js/numericHelper.js"/>
  228. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  229. <script type="javascript" ev:event="xforms-ready">
  230. <![CDATA[
  231. model.setValue("/root/send/srch/srchdd", getCurrentDate());
  232. cmb_srchcd.attribute("top") = "10px";
  233. grd_srch.fixedcellcheckbox(0, 0) = true;
  234. model.setValue("/root/send/srch/srchflag", "orddept");
  235. submit("TRPEA00207", false);
  236. model.copyNode("/root/init/deptlist", "/root/temp/srchlist");
  237. model.resetInstanceNode("/root/temp/srchlist/srchinfo");
  238. cmb_srchcd.refresh();
  239. cmb_srchcd.select(0);
  240. fInit();
  241. fSearch();
  242. ]]>
  243. </script>
  244. </xhtml:head>
  245. <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  246. <line id="line3" style="x1:0px; y1:734px; x2:1195px; y2:734px; border-color:#c0c0c0; "/>
  247. <caption id="cap_title" class="tit_1" style="left:0px; top:0px; width:340px; height:14px; ">실시 의사 일정 및 검사 예약 제한 관리 (내시경검사실)</caption>
  248. <caption id="caption18" class="tit_2" style="left:0px; top:30px; width:105px; height:13px; ">제한 등록 내역</caption>
  249. <select id="chk_histflag" ref="/root/send/srch/histflag" overflow="visible" appearance="full" style="left:120px; top:29px; width:100px; height:14px; border-style:none; ">
  250. <choices>
  251. <item>
  252. <label>과거 내역 제외</label>
  253. <value>Y</value>
  254. </item>
  255. </choices>
  256. <script type="javascript" ev:event="xforms-value-changed">
  257. <![CDATA[
  258. fSearch();
  259. ]]>
  260. </script>
  261. </select>
  262. <line id="line2" class="line_1" style="x1:0px; y1:45px; x2:1195px; y2:45px; "/>
  263. <datagrid id="grd_ctrl" nodeset="/root/main/ctrllist/ctrlinfo" caption="예약일^예약일^검사실^처방의^지정의^제한 시각^제한 시각^허용 인원^예외 환자^예외 코드^제한 사유" colsep="^" colwidth="80, 80, 120, 100, 100, 50, 50, 60, 100,220,220" ellipsis="true" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowsep="|" tooltip="true" style="left:0px; top:50px; width:1195px; height:470px; text-align:center; ">
  264. <col ref="fromdd" format="yyyy-mm-dd"/>
  265. <col ref="todd" format="yyyy-mm-dd"/>
  266. <col ref="room"/>
  267. <col ref="orddr"/>
  268. <col ref="specdr"/>
  269. <col ref="fromtm" format="hh:nn"/>
  270. <col ref="totm" format="hh:nn"/>
  271. <col ref="capa"/>
  272. <col ref="exptnm"/>
  273. <col ref="exnm" maxlength="200"/>
  274. <col ref="ctrldesc"/>
  275. <script type="javascript" ev:event="ondblclick">
  276. <![CDATA[
  277. if (!grd_ctrl.isCell(event.target)) {
  278. return;
  279. }
  280. var row = grd_ctrl.row;
  281. if (row < 1) {
  282. return;
  283. }
  284. fInit();
  285. var path = "/root/main/ctrllist/ctrlinfo[" + row + "]/";
  286. model.setValue("/root/temp/ctrlseq", model.getValue(path + "ctrlseq"));
  287. model.setValue("/root/temp/fromdd", model.getValue(path + "fromdd"));
  288. model.setValue("/root/temp/todd", model.getValue(path + "todd"));
  289. model.setValue("/root/temp/roomarr", model.getValue(path + "room"));
  290. model.setValue("/root/temp/orddrarr", model.getValue(path + "orddr"));
  291. model.setValue("/root/temp/specdrarr", model.getValue(path + "specdr"));
  292. model.setValue("/root/temp/capa", model.getValue(path + "capa"));
  293. model.setValue("/root/temp/ptarr", model.getValue(path + "exptnm"));
  294. model.setValue("/root/temp/ctrldesc", model.getValue(path + "ctrldesc"));
  295. var fromtm = model.getValue(path + "fromtm");
  296. if (fromtm.length == 4) {
  297. model.setValue("/root/temp/fromhh", fromtm.substr(0, 2));
  298. model.setValue("/root/temp/frommm", fromtm.substr(2, 2));
  299. }
  300. var totm = model.getValue(path + "totm");
  301. if (totm.length == 4) {
  302. model.setValue("/root/temp/tohh", totm.substr(0, 2));
  303. model.setValue("/root/temp/tomm", totm.substr(2, 2));
  304. }
  305. var cdArr = model.getValue(path + "roomcd").split("│");
  306. var nmArr = model.getValue(path + "room").split("│");
  307. for (var i = 0; i < cdArr.length; i++) {
  308. model.makeValue("/root/temp/roomlist/roominfo[" + ( i + 1 ) + "]/cd", cdArr[i]);
  309. model.makeValue("/root/temp/roomlist/roominfo[" + ( i + 1 ) + "]/nm", nmArr[i]);
  310. }
  311. cdArr = model.getValue(path + "orddrid").split("│");
  312. nmArr = model.getValue(path + "orddr").split("│");
  313. for (var i = 0; i < cdArr.length; i++) {
  314. model.makeValue("/root/temp/orddrlist/orddrinfo[" + ( i + 1 ) + "]/cd", cdArr[i]);
  315. model.makeValue("/root/temp/orddrlist/orddrinfo[" + ( i + 1 ) + "]/nm", nmArr[i]);
  316. }
  317. cdArr = model.getValue(path + "specdrid").split("│");
  318. nmArr = model.getValue(path + "specdr").split("│");
  319. for (var i = 0; i < cdArr.length; i++) {
  320. model.makeValue("/root/temp/specdrlist/specdrinfo[" + ( i + 1 ) + "]/cd", cdArr[i]);
  321. model.makeValue("/root/temp/specdrlist/specdrinfo[" + ( i + 1 ) + "]/nm", nmArr[i]);
  322. }
  323. cdArr = model.getValue(path + "expt").split("│");
  324. nmArr = model.getValue(path + "exptnm").split("│");
  325. for (var i = 0; i < cdArr.length; i++) {
  326. model.makeValue("/root/temp/ptlist/ptinfo[" + ( i + 1 ) + "]/cd", cdArr[i]);
  327. model.makeValue("/root/temp/ptlist/ptinfo[" + ( i + 1 ) + "]/nm", nmArr[i]);
  328. }
  329. cdArr = model.getValue(path + "excd").split("│");
  330. nmArr = model.getValue(path + "exnm").split("│");
  331. for (var i = 0; i < cdArr.length; i++) {
  332. model.makeValue("/root/temp/excdlist/excdinfo[" + ( i + 1 ) + "]/cd", cdArr[i]);
  333. model.makeValue("/root/temp/excdlist/excdinfo[" + ( i + 1 ) + "]/nm", nmArr[i]);
  334. }
  335. btn_save.value = "수정";
  336. model.refresh();
  337. ]]>
  338. </script>
  339. </datagrid>
  340. <caption id="caption11" class="tit_2" style="left:0px; top:540px; width:154px; height:13px; ">예약 제한 등록 및 수정</caption>
  341. <caption id="caption12" style="left:175px; top:540px; width:110px; height:14px; ">( : 필수 항목 )</caption>
  342. <shape id="rectangle1" appearance="rectangle" style="left:185px; top:539px; width:15px; height:15px; background-color:#ffffa0; border-color:gray; "/>
  343. <line id="line1" class="line_1" style="x1:0px; y1:555px; x2:1195px; y2:555px; "/>
  344. <caption id="caption20" class="cell_1" style="left:0px; top:560px; width:108px; height:23px; ">예약일</caption>
  345. <input id="ipt_fromdd" ref="/root/temp/fromdd" inputtype="date" style="left:110px; top:562px; width:89px; height:19px; background-color:#ffffa0; "/>
  346. <caption id="caption19" style="left:200px; top:560px; width:19px; height:23px; text-align:center; ">~</caption>
  347. <input id="ipt_todd" ref="/root/temp/todd" inputtype="date" style="left:220px; top:562px; width:89px; height:19px; "/>
  348. <caption id="caption3" class="cell_1" style="left:0px; top:585px; width:108px; height:23px; ">검사실</caption>
  349. <caption id="cap_room" ref="/root/temp/roomarr" ellipsis="true" style="left:110px; top:587px; width:445px; height:19px; padding-left:3; background-color:#ffffa0; border-color:#c0c0c0; border-style:solid; "/>
  350. <button id="btn_srch_room" class="icon_search" style="left:564px; top:588px; width:16px; height:16px; ">
  351. <caption/>
  352. <script type="javascript" ev:event="DOMActivate">
  353. <![CDATA[
  354. fSrchItem("room");
  355. ]]>
  356. </script>
  357. </button>
  358. <caption id="caption4" class="cell_1" style="left:0px; top:610px; width:108px; height:23px; ">처방의</caption>
  359. <caption id="cap_orddr" ref="/root/temp/orddrarr" ellipsis="true" style="left:110px; top:612px; width:445px; height:19px; padding-left:3; border-color:#c0c0c0; border-style:solid; "/>
  360. <button id="btn_srch_orddr" class="icon_search" style="left:564px; top:613px; width:16px; height:16px; ">
  361. <caption/>
  362. <script type="javascript" ev:event="DOMActivate">
  363. <![CDATA[
  364. fSrchItem("orddr");
  365. ]]>
  366. </script>
  367. </button>
  368. <caption id="caption5" class="cell_1" style="left:0px; top:635px; width:108px; height:23px; ">지정의</caption>
  369. <caption id="cap_specdr" ref="/root/temp/specdrarr" ellipsis="true" style="left:110px; top:637px; width:445px; height:19px; padding-left:3; border-color:#c0c0c0; border-style:solid; "/>
  370. <button id="btn_srch_specdr" class="icon_search" style="left:564px; top:638px; width:16px; height:16px; ">
  371. <caption/>
  372. <script type="javascript" ev:event="DOMActivate">
  373. <![CDATA[
  374. fSrchItem("specdr");
  375. ]]>
  376. </script>
  377. </button>
  378. <caption id="caption6" class="cell_1" style="left:0px; top:660px; width:108px; height:23px; ">제한 시각</caption>
  379. <input id="ipt_fromhh" ref="/root/temp/fromhh" maxlength="2" style="left:110px; top:662px; width:29px; height:19px; text-align:center; ">
  380. <script type="javascript" ev:event="DOMFocusOut">
  381. <![CDATA[
  382. var str = model.getValue("/root/temp/fromhh");
  383. str = str.length == 1 ? "0" + str : str;
  384. model.setValue("/root/temp/fromhh", str);
  385. ipt_fromhh.refresh();
  386. ]]>
  387. </script>
  388. </input>
  389. <caption id="caption14" style="left:140px; top:660px; width:14px; height:23px; text-align:center; ">:</caption>
  390. <input id="ipt_frommm" ref="/root/temp/frommm" maxlength="2" style="left:155px; top:662px; width:29px; height:19px; text-align:center; ">
  391. <script type="javascript" ev:event="DOMFocusOut">
  392. <![CDATA[
  393. var str = model.getValue("/root/temp/frommm");
  394. str = str.length == 1 ? "0" + str : str;
  395. model.setValue("/root/temp/frommm", str);
  396. ipt_frommm.refresh();
  397. ]]>
  398. </script>
  399. </input>
  400. <caption id="caption15" style="left:185px; top:660px; width:19px; height:23px; text-align:center; ">~</caption>
  401. <input id="ipt_tohh" ref="/root/temp/tohh" maxlength="2" style="left:205px; top:662px; width:29px; height:19px; text-align:center; ">
  402. <script type="javascript" ev:event="DOMFocusOut">
  403. <![CDATA[
  404. var str = model.getValue("/root/temp/tohh");
  405. str = str.length == 1 ? "0" + str : str;
  406. model.setValue("/root/temp/tohh", str);
  407. ipt_tohh.refresh();
  408. ]]>
  409. </script>
  410. </input>
  411. <caption id="caption16" style="left:235px; top:660px; width:14px; height:23px; text-align:center; ">:</caption>
  412. <input id="ipt_tomm" ref="/root/temp/tomm" maxlength="2" style="left:250px; top:662px; width:29px; height:19px; text-align:center; ">
  413. <script type="javascript" ev:event="DOMFocusOut">
  414. <![CDATA[
  415. var str = model.getValue("/root/temp/tomm");
  416. str = str.length == 1 ? "0" + str : str;
  417. model.setValue("/root/temp/tomm", str);
  418. ipt_tomm.refresh();
  419. ]]>
  420. </script>
  421. </input>
  422. <caption id="caption17" style="left:285px; top:660px; width:125px; height:24px; ">( ※ 24 시간 형식 )</caption>
  423. <caption id="caption9" class="cell_1" style="left:0px; top:685px; width:108px; height:23px; ">허용 인원</caption>
  424. <input id="ipt_capa" ref="/root/temp/capa" maxlength="1" style="left:110px; top:687px; width:29px; height:19px; text-align:center; "/>
  425. <caption id="caption10" style="left:145px; top:685px; width:200px; height:24px; ">명 ( ※ 기존 가용 인원 초과 불가 )</caption>
  426. <caption id="cap_pt" class="cell_1" style="left:0px; top:710px; width:108px; height:23px; ">예외(허용) 환자</caption>
  427. <caption id="cap_ptarr" ref="/root/temp/ptarr" ellipsis="true" style="left:110px; top:712px; width:445px; height:19px; padding-left:3; border-color:#c0c0c0; border-style:solid; "/>
  428. <button id="btn_srch_pt" class="icon_search" style="left:564px; top:713px; width:16px; height:16px; ">
  429. <caption/>
  430. <script type="javascript" ev:event="DOMActivate">
  431. <![CDATA[
  432. if (model.getValue("/root/temp/ptflag") == "") {
  433. model.setValue("/root/temp/ptflag", "pid");
  434. rdo_ptflag.refresh();
  435. }
  436. fSrchItem("pt");
  437. ]]>
  438. </script>
  439. </button>
  440. <caption id="caption8" class="cell_1" style="left:590px; top:560px; width:108px; height:123px; text-align:left; ">
  441. <![CDATA[예외(허용) 코드]]>
  442. </caption>
  443. <button id="btn_srch_excd" class="icon_search" style="left:635px; top:638px; width:16px; height:16px; ">
  444. <caption/>
  445. <script type="javascript" ev:event="DOMActivate">
  446. <![CDATA[
  447. fSrchItem("excd");
  448. ]]>
  449. </script>
  450. </button>
  451. <datagrid id="grd_excd" nodeset="/root/temp/excdlist/excdinfo" autoresize="true" colsep="^" colwidth="0,410" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:700px; top:560px; width:495px; height:123px; ">
  452. <col ref="cd"/>
  453. <col ref="nm"/>
  454. </datagrid>
  455. <caption id="cap_desc" class="cell_1" style="left:590px; top:685px; width:108px; height:48px; text-align:left; ">예약 제한 사유</caption>
  456. <textarea id="tar_desc" ref="/root/temp/ctrldesc" scroll="autovscroll" style="left:700px; top:685px; width:495px; height:48px; padding-left:3; background-color:#ffffa0; "/>
  457. <button id="btn_init" class="btn2_letter3" style="left:1142px; top:535px; width:53px; height:19px; background-image:../../../com/commonweb/images/btn1_letter2.gif; ">
  458. <caption>초기화</caption>
  459. <script type="javascript" ev:event="DOMActivate">
  460. <![CDATA[
  461. fInit();
  462. ]]>
  463. </script>
  464. </button>
  465. <button id="btn_save" class="btn4_letter2" style="left:1139px; top:743px; width:56px; height:22px; background-image:../../../com/commonweb/images/btn1_letter2.gif; ">
  466. <caption>등록</caption>
  467. <script type="javascript" ev:event="DOMActivate">
  468. <![CDATA[
  469. // ctrl 정보 생성
  470. model.setValue("/root/send/rgst/ctrlseq", model.getValue("/root/temp/ctrlseq"));
  471. model.setValue("/root/send/rgst/fromdd", getCurrentDate());
  472. model.setValue("/root/send/rgst/todd", "99991231");
  473. // 입력값 확인
  474. var fromdd = model.getValue("/root/temp/fromdd");
  475. if (fromdd == "") {
  476. messageBox("예약일을 입력해 주십시오.", "E999");
  477. return;
  478. }
  479. var roomarr = model.getValue("/root/temp/roomarr");
  480. if (roomarr == "") {
  481. messageBox("검사실을 지정해 주십시오.", "E999");
  482. return;
  483. }
  484. var fromtm = model.getValue("/root/temp/fromhh") + model.getValue("/root/temp/frommm");
  485. if (fromtm != "" ) {
  486. if (!isValidDateTime(fromtm, "hhmm")) {
  487. messageBox("제한 시작 시각을 정확히 입력해 주십시오.", "E999");
  488. return;
  489. }
  490. }
  491. var totm = model.getValue("/root/temp/tohh") + model.getValue("/root/temp/tomm");
  492. if (totm != "") {
  493. if (!isValidDateTime(totm, "hhmm")) {
  494. messageBox("제한 종료 시각을 정확히 입력해 주십시오.", "E999");
  495. return;
  496. }
  497. if (fromtm == "") {
  498. messageBox("제한 시작 시각을 입력해 주십시오.", "E999");
  499. return;
  500. }
  501. }
  502. var ctrldesc = model.getValue("/root/temp/ctrldesc");
  503. if (ctrldesc == "") {
  504. messageBox("예약 제한 사유를 입력해 주십시오.", "E999");
  505. return;
  506. }
  507. // comment 생성
  508. model.setValue("/root/send/rgst/ctrldesc", ctrldesc);
  509. // term 정보 생성
  510. model.resetInstanceNode("/root/send/rgst/termlist/terminfo");
  511. var termseq = 1;
  512. // 예약일
  513. var todd = model.getValue("/root/temp/todd");
  514. var opcode = ( todd != "" ? "OV" : "EQ" );
  515. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/ctrlseq", "");
  516. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/termseq", termseq);
  517. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/itemtype", "R");
  518. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/itemseq", 4);
  519. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/opcode", opcode);
  520. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/valtype", "D");
  521. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/valseq", "");
  522. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/val", fromdd);
  523. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/valnm", fromdd);
  524. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/inflag", "");
  525. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/aoflag", "");
  526. if (todd != "") {
  527. termseq++;
  528. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/ctrlseq", "");
  529. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/termseq", termseq);
  530. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/itemtype", "R");
  531. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/itemseq", 4);
  532. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/opcode", "BW");
  533. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/valtype", "D");
  534. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/valseq", "");
  535. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/val", todd);
  536. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/valnm", todd);
  537. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/inflag", "");
  538. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/aoflag", "");
  539. }
  540. var cnt = 0;
  541. var cd = "";
  542. var nm = "";
  543. var inflag = "";
  544. // 검사실
  545. cnt = instance1.selectNodes("/root/temp/roomlist/roominfo[cd!='']").length;
  546. if (cnt == 1) {
  547. termseq++;
  548. cd = model.getValue("/root/temp/roomlist/roominfo/cd");
  549. nm = model.getValue("/root/temp/roomlist/roominfo/nm");
  550. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/ctrlseq", "");
  551. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/termseq", termseq);
  552. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/itemtype", "R");
  553. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/itemseq", 2);
  554. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/opcode", "EQ");
  555. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/valtype", "S");
  556. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/valseq", "");
  557. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/val", cd);
  558. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/valnm", nm);
  559. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/inflag", "");
  560. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/aoflag", "");
  561. } else {
  562. for (var i = 1; i <= cnt; i++) {
  563. termseq++;
  564. cd = model.getValue("/root/temp/roomlist/roominfo[" + i + "]/cd");
  565. nm = model.getValue("/root/temp/roomlist/roominfo[" + i + "]/nm");
  566. inflag = ( i == 1 ? "B" : ( i == cnt ? "E" : "I" ) );
  567. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/ctrlseq", "");
  568. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/termseq", termseq);
  569. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/itemtype", "R");
  570. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/itemseq", 2);
  571. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/opcode", "IN");
  572. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/valtype", "S");
  573. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/valseq", "");
  574. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/val", cd);
  575. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/valnm", nm);
  576. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/inflag", inflag);
  577. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/aoflag", "O");
  578. }
  579. }
  580. // 처방의
  581. cnt = instance1.selectNodes("/root/temp/orddrlist/orddrinfo[cd!='']").length;
  582. if (cnt == 1) {
  583. termseq++;
  584. cd = model.getValue("/root/temp/orddrlist/orddrinfo/cd");
  585. nm = model.getValue("/root/temp/orddrlist/orddrinfo/nm");
  586. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/ctrlseq", "");
  587. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/termseq", termseq);
  588. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/itemtype", "R");
  589. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/itemseq", 16);
  590. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/opcode", "EQ");
  591. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/valtype", "S");
  592. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/valseq", "");
  593. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/val", cd);
  594. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/valnm", nm);
  595. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/inflag", "");
  596. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/aoflag", "");
  597. } else if (cnt > 1) {
  598. for (var i = 1; i <= cnt; i++) {
  599. termseq++;
  600. cd = model.getValue("/root/temp/orddrlist/orddrinfo[" + i + "]/cd");
  601. nm = model.getValue("/root/temp/orddrlist/orddrinfo[" + i + "]/nm");
  602. inflag = ( i == 1 ? "B" : ( i == cnt ? "E" : "I" ) );
  603. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/ctrlseq", "");
  604. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/termseq", termseq);
  605. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/itemtype", "R");
  606. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/itemseq", 16);
  607. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/opcode", "IN");
  608. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/valtype", "S");
  609. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/valseq", "");
  610. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/val", cd);
  611. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/valnm", nm);
  612. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/inflag", inflag);
  613. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/aoflag", "O");
  614. }
  615. }
  616. // 지정의
  617. cnt = instance1.selectNodes("/root/temp/specdrlist/specdrinfo[cd!='']").length;
  618. if (cnt == 1) {
  619. termseq++;
  620. cd = model.getValue("/root/temp/specdrlist/specdrinfo/cd");
  621. nm = model.getValue("/root/temp/specdrlist/specdrinfo/nm");
  622. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/ctrlseq", "");
  623. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/termseq", termseq);
  624. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/itemtype", "R");
  625. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/itemseq", 70);
  626. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/opcode", "EQ");
  627. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/valtype", "S");
  628. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/valseq", "");
  629. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/val", cd);
  630. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/valnm", nm);
  631. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/inflag", "");
  632. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/aoflag", "");
  633. } else if (cnt > 1) {
  634. for (var i = 1; i <= cnt; i++) {
  635. termseq++;
  636. cd = model.getValue("/root/temp/specdrlist/specdrinfo[" + i + "]/cd");
  637. nm = model.getValue("/root/temp/specdrlist/specdrinfo[" + i + "]/nm");
  638. inflag = ( i == 1 ? "B" : ( i == cnt ? "E" : "I" ) );
  639. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/ctrlseq", "");
  640. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/termseq", termseq);
  641. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/itemtype", "R");
  642. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/itemseq", 70);
  643. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/opcode", "IN");
  644. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/valtype", "S");
  645. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/valseq", "");
  646. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/val", cd);
  647. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/valnm", nm);
  648. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/inflag", inflag);
  649. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/aoflag", "O");
  650. }
  651. }
  652. // 제한 시각
  653. if (fromtm != "") {
  654. termseq++;
  655. opcode = ( totm != "" ? "OV" : "EQ" );
  656. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/ctrlseq", "");
  657. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/termseq", termseq);
  658. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/itemtype", "R");
  659. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/itemseq", 5);
  660. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/opcode", opcode);
  661. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/valtype", "D");
  662. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/valseq", "");
  663. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/val", fromtm);
  664. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/valnm", fromtm);
  665. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/inflag", "");
  666. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/aoflag", "");
  667. }
  668. if (totm != "") {
  669. termseq++;
  670. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/ctrlseq", "");
  671. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/termseq", termseq);
  672. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/itemtype", "R");
  673. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/itemseq", 5);
  674. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/opcode", "BW");
  675. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/valtype", "D");
  676. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/valseq", "");
  677. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/val", totm);
  678. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/valnm", totm);
  679. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/inflag", "");
  680. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/aoflag", "");
  681. }
  682. // 허용 인원
  683. var capa = model.getValue("/root/temp/capa");
  684. if (capa != "") {
  685. termseq++;
  686. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/ctrlseq", "");
  687. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/termseq", termseq);
  688. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/itemtype", "R");
  689. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/itemseq", 134);
  690. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/opcode", "EX");
  691. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/valtype", "D");
  692. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/valseq", "");
  693. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/val", capa);
  694. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/valnm", capa);
  695. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/inflag", "");
  696. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/aoflag", "");
  697. }
  698. // 예외 환자
  699. cnt = instance1.selectNodes("/root/temp/ptlist/ptinfo[cd!='']").length;
  700. if (cnt == 1) {
  701. termseq++;
  702. cd = model.getValue("/root/temp/ptlist/ptinfo/cd");
  703. nm = model.getValue("/root/temp/ptlist/ptinfo/nm");
  704. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/ctrlseq", "");
  705. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/termseq", termseq);
  706. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/itemtype", "R");
  707. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/itemseq", 114);
  708. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/opcode", "NE");
  709. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/valtype", "D");
  710. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/valseq", "");
  711. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/val", cd);
  712. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/valnm", nm);
  713. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/inflag", "");
  714. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/aoflag", "");
  715. } else if (cnt > 1) {
  716. for (var i = 1; i <= cnt; i++) {
  717. termseq++;
  718. cd = model.getValue("/root/temp/ptlist/ptinfo[" + i + "]/cd");
  719. nm = model.getValue("/root/temp/ptlist/ptinfo[" + i + "]/nm");
  720. inflag = ( i == 1 ? "B" : ( i == cnt ? "E" : "I" ) );
  721. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/ctrlseq", "");
  722. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/termseq", termseq);
  723. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/itemtype", "R");
  724. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/itemseq", 114);
  725. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/opcode", "NI");
  726. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/valtype", "D");
  727. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/valseq", "");
  728. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/val", cd);
  729. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/valnm", nm);
  730. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/inflag", inflag);
  731. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/aoflag", "O");
  732. }
  733. }
  734. // 예외(허용) 코드
  735. cnt = instance1.selectNodes("/root/temp/excdlist/excdinfo[cd!='']").length;
  736. if (cnt == 1) {
  737. termseq++;
  738. cd = model.getValue("/root/temp/excdlist/excdinfo/cd");
  739. nm = model.getValue("/root/temp/excdlist/excdinfo/nm");
  740. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/ctrlseq", "");
  741. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/termseq", termseq);
  742. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/itemtype", "R");
  743. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/itemseq", 3);
  744. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/opcode", "NE");
  745. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/valtype", "S");
  746. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/valseq", "");
  747. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/val", cd);
  748. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/valnm", nm);
  749. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/inflag", "");
  750. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/aoflag", "");
  751. } else if (cnt > 1) {
  752. for (var i = 1; i <= cnt; i++) {
  753. termseq++;
  754. cd = model.getValue("/root/temp/excdlist/excdinfo[" + i + "]/cd");
  755. nm = model.getValue("/root/temp/excdlist/excdinfo[" + i + "]/nm");
  756. inflag = ( i == 1 ? "B" : ( i == cnt ? "E" : "I" ) );
  757. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/ctrlseq", "");
  758. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/termseq", termseq);
  759. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/itemtype", "R");
  760. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/itemseq", 3);
  761. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/opcode", "NI");
  762. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/valtype", "S");
  763. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/valseq", "");
  764. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/val", cd);
  765. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/valnm", nm);
  766. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/inflag", inflag);
  767. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/aoflag", "O");
  768. }
  769. }
  770. // 예약 제어
  771. termseq++;
  772. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/ctrlseq", "");
  773. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/termseq", termseq);
  774. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/itemtype", "C");
  775. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/itemseq", 39);
  776. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/opcode", "");
  777. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/valtype", "");
  778. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/valseq", "");
  779. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/val", "");
  780. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/valnm", "");
  781. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/inflag", "");
  782. model.makeValue("/root/send/rgst/termlist/terminfo[" + termseq + "]/aoflag", "");
  783. if (messageBox("예약 제한 정보를 " + btn_save.value + "하시겠습니까?", "Q999") != 6) {
  784. return;
  785. }
  786. submit("TXPEA00203");
  787. fSearch();
  788. ]]>
  789. </script>
  790. </button>
  791. <group id="grp_srch" visibility="hidden" style="left:410px; top:85px; width:370px; height:420px; ">
  792. <shape id="roundrect1" appearance="roundrect" ellipsewidth="20" ellipseheight="20" style="left:0px; top:0px; width:370px; height:420px; border-color:#b0b0b0; "/>
  793. <caption id="cap_srch" class="search_name" style="left:10px; top:11px; width:89px; height:17px; ">환자검색 :</caption>
  794. <datagrid id="grd_srch" nodeset="/root/temp/srchlist/srchinfo" caption="^코드^이름" colsep="^" colwidth="30, 90, 220" ellipsis="true" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowsep="|" style="left:10px; top:35px; width:350px; height:347px; ">
  795. <col ref="chk" type="checkbox"/>
  796. <col ref="cd" style="text-align:center; "/>
  797. <col ref="nm"/>
  798. </datagrid>
  799. <input id="ipt_srchnm" ref="/root/send/srch/srchnm" style="left:100px; top:10px; width:70px; height:19px; ">
  800. <script type="javascript" ev:event="onkeyup">
  801. <![CDATA[
  802. if (event.keyCode == "13") {
  803. inputEnterKey("btn_srch", "DOMActivate");
  804. }
  805. ]]>
  806. </script>
  807. </input>
  808. <select1 id="cmb_srchcd" ref="/root/send/srch/srchcd" appearance="minimal" style="left:90px; top:30px; width:140px; height:19px; ">
  809. <choices>
  810. <itemset nodeset="/root/init/deptlist/srchinfo">
  811. <label ref="nm"/>
  812. <value ref="cd"/>
  813. </itemset>
  814. </choices>
  815. </select1>
  816. <button id="btn_srch" class="btn1_letter2" style="left:304px; top:9px; width:56px; height:22px; ">
  817. <caption>조회</caption>
  818. <script type="javascript" ev:event="DOMActivate">
  819. <![CDATA[
  820. if (ITEM_FLAG == "pt") {
  821. model.setValue("/root/send/srch/srchflag", model.getValue("/root/temp/ptflag"));
  822. submit("TRPEA00207", false);
  823. var pPath = "/root/temp/ptlist/ptinfo";
  824. var sPath = "/root/temp/srchlist/srchinfo";
  825. var cnt = instance1.selectNodes(pPath + "[cd!='']").length;
  826. for (var i = instance1.selectNodes(sPath).length + cnt; i > 0; i--) {
  827. if (i > cnt) {
  828. model.makeValue(sPath + "[" + i + "]/chk", "false");
  829. model.makeValue(sPath + "[" + i + "]/cd", model.getValue(sPath + "[" + ( i - cnt ) + "]/cd"));
  830. model.makeValue(sPath + "[" + i + "]/nm", model.getValue(sPath + "[" + ( i - cnt ) + "]/nm"));
  831. } else {
  832. model.makeValue(sPath + "[" + i + "]/chk", "true");
  833. model.makeValue(sPath + "[" + i + "]/cd", model.getValue(pPath + "[" + i + "]/cd"));
  834. model.makeValue(sPath + "[" + i + "]/nm", model.getValue(pPath + "[" + i + "]/nm"));
  835. }
  836. }
  837. grd_srch.refresh();
  838. } else {
  839. submit("TRPEA00207");
  840. }
  841. ]]>
  842. </script>
  843. </button>
  844. <button id="btn_input" class="btn4_letter2" style="left:244px; top:390px; width:56px; height:22px; ">
  845. <caption>입력</caption>
  846. <script type="javascript" ev:event="DOMActivate">
  847. <![CDATA[
  848. var path = "";
  849. if (ITEM_FLAG == "room") {
  850. path = "/root/temp/roomlist/roominfo";
  851. } else if (ITEM_FLAG == "orddr") {
  852. path = "/root/temp/orddrlist/orddrinfo";
  853. } else if (ITEM_FLAG == "specdr") {
  854. path = "/root/temp/specdrlist/specdrinfo";
  855. } else if (ITEM_FLAG == "excd") {
  856. path = "/root/temp/excdlist/excdinfo";
  857. } else if (ITEM_FLAG == "pt") {
  858. path = "/root/temp/ptlist/ptinfo";
  859. }
  860. model.resetInstanceNode(path);
  861. var cnt = instance1.selectNodes("/root/temp/srchlist/srchinfo").length;
  862. var arr = "";
  863. var idx = 0;
  864. for (var i = 1; i <= cnt; i++) {
  865. if (model.getValue("/root/temp/srchlist/srchinfo[" + i + "]/chk") != "true") {
  866. continue;
  867. }
  868. idx++;
  869. model.makeValue(path + "[" + idx + "]/cd", model.getValue("/root/temp/srchlist/srchinfo[" + i + "]/cd"));
  870. model.makeValue(path + "[" + idx + "]/nm", model.getValue("/root/temp/srchlist/srchinfo[" + i + "]/nm"));
  871. arr += ( idx > 1 ? "│" : "" );
  872. arr += model.getValue("/root/temp/srchlist/srchinfo[" + i + "]/nm");
  873. }
  874. model.resetInstanceNode("/root/temp/srchlist/srchinfo");
  875. if (ITEM_FLAG == "room") {
  876. model.setValue("/root/temp/roomarr", arr);
  877. cap_room.refresh();
  878. cap_room.hint = arr;
  879. } else if (ITEM_FLAG == "orddr") {
  880. model.setValue("/root/temp/orddrarr", arr);
  881. cap_orddr.refresh();
  882. cap_orddr.hint = arr;
  883. } else if (ITEM_FLAG == "specdr") {
  884. model.setValue("/root/temp/specdrarr", arr);
  885. cap_specdr.refresh();
  886. cap_specdr.hint = arr;
  887. } else if (ITEM_FLAG == "excd") {
  888. grd_excd.refresh();
  889. } else if (ITEM_FLAG == "pt") {
  890. model.setValue("/root/temp/ptarr", arr);
  891. cap_ptarr.refresh();
  892. cap_ptarr.hint = arr;
  893. }
  894. grp_srch.visible = false;
  895. ]]>
  896. </script>
  897. </button>
  898. <button id="btn_close" class="btn4_letter2" style="left:304px; top:390px; width:56px; height:22px; ">
  899. <caption>닫기</caption>
  900. <script type="javascript" ev:event="DOMActivate">
  901. <![CDATA[
  902. grp_srch.visible = false;
  903. ]]>
  904. </script>
  905. </button>
  906. <select1 id="rdo_ptflag" ref="/root/temp/ptflag" appearance="full" cellspacing="3" cols="2" overflow="visible" style="left:180px; top:12px; width:115px; height:20px; border-style:none; ">
  907. <choices>
  908. <item>
  909. <label>등록번호</label>
  910. <value>pid</value>
  911. </item>
  912. <item>
  913. <label>이름</label>
  914. <value>hngnm</value>
  915. </item>
  916. </choices>
  917. </select1>
  918. </group>
  919. <button id="btn_del" class="btn2_letter2" style="left:1153px; top:25px; width:42px; height:19px; ">
  920. <caption>삭제</caption>
  921. <script type="javascript" ev:event="DOMActivate">
  922. <![CDATA[
  923. var row = grd_ctrl.row;
  924. if (grd_ctrl.row < 1) {
  925. messageBox("삭제할 내역을 선택해 주십시오.", "E999");
  926. return;
  927. }
  928. if (messageBox("선택된 제한 내역을 삭제하시겠습니까?", "Q999") != 6) {
  929. return;
  930. }
  931. model.setValue("/root/send/del/rsrvplce", model.getValue("/root/main/ctrllist/ctrlinfo[" + row + "]/rsrvplce"));
  932. model.setValue("/root/send/del/suppdeptcd", model.getValue("/root/main/ctrllist/ctrlinfo[" + row + "]/suppdeptcd"));
  933. model.setValue("/root/send/del/excuroomcd", model.getValue("/root/main/ctrllist/ctrlinfo[" + row + "]/excuroomcd"));
  934. model.setValue("/root/send/del/excucd", model.getValue("/root/main/ctrllist/ctrlinfo[" + row + "]/excucd"));
  935. model.setValue("/root/send/del/ctrlseq", model.getValue("/root/main/ctrllist/ctrlinfo[" + row + "]/ctrlseq"));
  936. submit("TXPEA00205");
  937. fSearch();
  938. ]]>
  939. </script>
  940. </button>
  941. </xhtml:body>
  942. </xhtml:html>