SMAEB02800_핵종사용량일정관리.xrw 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880
  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. <therpinfo>
  11. <therplist/>
  12. </therpinfo>
  13. <cond>
  14. <fromdd/>
  15. <todd/>
  16. <wardcd/>
  17. <pid/>
  18. <hngnm/>
  19. </cond>
  20. <patinfo>
  21. <patinfolist>
  22. <pid/>
  23. <hngnm/>
  24. </patinfolist>
  25. </patinfo>
  26. <iptbox>
  27. <wardcd/>
  28. <roomcd/>
  29. </iptbox>
  30. <popupendflag/>
  31. </main>
  32. <send>
  33. <reqdata/>
  34. <savedata/>
  35. <bdioflag>I</bdioflag>
  36. <itemflag>N</itemflag>
  37. <globalinstance>
  38. <instance1/>
  39. </globalinstance>
  40. <data2>
  41. <srchcond/>
  42. <pid/>
  43. <hngnm/>
  44. <rrgstno1/>
  45. <rrgstno2/>
  46. <acptdd/>
  47. </data2>
  48. <nuclcdapplist/>
  49. <wardcd/>
  50. </send>
  51. <hidden>
  52. <srchcond/>
  53. <pid/>
  54. <hngnm/>
  55. <rrgstno1/>
  56. <rrgstno2/>
  57. <newElement/>
  58. </hidden>
  59. <init>
  60. <today/>
  61. <item>
  62. <examcurecdlist>
  63. <excucd/>
  64. <excucdnm/>
  65. </examcurecdlist>
  66. <roomlist/>
  67. </item>
  68. </init>
  69. <tmp>
  70. <list1/>
  71. <suplcustcd/>
  72. <suplcustnm/>
  73. </tmp>
  74. <temp/>
  75. <combo/>
  76. </root>
  77. </instance>
  78. <script type="javascript" ev:event="xforms-ready">
  79. <![CDATA[
  80. fInitialize();
  81. ]]>
  82. </script>
  83. <script type="javascript" ev:event="xforms-model-construct-done">
  84. <![CDATA[
  85. group1.attribute("height") = 0;
  86. ]]>
  87. </script>
  88. <submission id="TRMMO04103" mediatype="application/x-www-form-urlencoded" method="post"/>
  89. <submission id="TRMMO04104" mediatype="application/x-www-form-urlencoded" method="post"/>
  90. <submission id="TRMMO04105" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/init/patnm"/>
  91. <submission id="TRMMO04106" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/init/wardlist"/>
  92. <submission id="TRMMO04107" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/init/roomlist"/>
  93. <submission id="TRPMI00106" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data3" resultref="/root/hidden/init"/>
  94. <submission id="TXAEB02801" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/savedata" resultref="/root/main/therpinfo"/>
  95. <submission id="TRAEB02801" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/main/therpinfo"/>
  96. <submission id="TRAEB02802" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/init/item"/>
  97. <submission id="TRAEB02803" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/patinfo"/>
  98. <submission id="TRAEB02702" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/list2"/>
  99. <submission id="TXAEB02701" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send"/>
  100. <submission id="TRAEB01802" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/combo/nuclcd"/>
  101. <submission id="TRPMOCOM01" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/hidden/session" replace="instance" resultref="/root/init"/>
  102. <bind id="bind1" ref="/root/main/therpinfo/therplist/rsrvdd" readonly="../pid != ''"/>
  103. </model>
  104. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  105. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  106. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  107. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  108. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  109. <script type="javascript" src="../../../emr/prcpmngtweb/js/MMO001.js"/>
  110. <script type="javascript" src="../../../ast/examcureweb/js/AEZ0001.js"/>
  111. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  112. <script type="javascript">
  113. <![CDATA[var sTHERPLIST_PATH = "/root/main/therpinfo/therplist";
  114. /**
  115. * @desc : Therapy일정관리 초기화
  116. * @
  117. * @param :
  118. * @return :
  119. * @author : 오지훈
  120. * @---------------------------------------------------
  121. */
  122. function fInitialize(){
  123. aezfSetSuppDeptcd();
  124. //조회기간 시작일자는 현재, 종료일자는 7일 후로 설정한다.
  125. model.setValue("/root/init/today", getCurrentDate());
  126. var fromdd = ((getCurrentDate()).toDate()).getAddDate(-7);
  127. model.setValue("/root/main/cond/fromdd", fromdd.getDateFormat());
  128. var todd = ((getCurrentDate()).toDate()).getAddDate(7);
  129. model.setValue("/root/main/cond/todd" , todd.getDateFormat());
  130. //콤보박스에 설정될 부서리스트 조회
  131. //reqGetDeptList("/root/send/reqdata", "/root/init/deptlist", "", getUserInfo("dutplceinstcd"));
  132. // 진료과/진료의 조회
  133. submit("TRPMOCOM01");
  134. //콤보박스에 설정된 병실리스트 조회
  135. //reqGetRoomList("3050123000");
  136. //reqGetRoomList("3050135000");
  137. model.setValue("/root/send/wardcd","3050135000");
  138. model.makeValue("/root/send/reqdata/newoldyb","1");
  139. model.makeValue("/root/send/reqdata/srchexamcurecd","THD%");
  140. submit("TRAEB02802");
  141. submit("TRAEB01802");
  142. //Therapy일정리스트 그리드 초기화
  143. model.removeNodeset(sTHERPLIST_PATH);
  144. model.refresh();
  145. }
  146. /**
  147. * @desc : Therapy 일정리스트 한줄 추가
  148. * @
  149. * @param :
  150. * @return :
  151. * @author : 오지훈
  152. * @---------------------------------------------------
  153. */
  154. function fAddRow(){
  155. //그리드 한줄 추가 후에 refresh, disabled상태 유지 모두 true
  156. grd_therapy.addRow();
  157. var iRow = grd_therapy.row;
  158. model.setValue(sTHERPLIST_PATH + "[" + iRow + "]/genrdd", getCurrentDate());
  159. //예약일자는 기본을 현재일자로 설정
  160. model.setValue(sTHERPLIST_PATH + "[" + iRow + "]/rsrvdd", getCurrentDate());
  161. model.setValue(sTHERPLIST_PATH + "[" + iRow + "]/calcscorcd", "THD071N");
  162. model.setValue(sTHERPLIST_PATH + "[" + iRow + "]/updtimpsiyn", "N");
  163. grd_therapy.col = 4;
  164. grd_therapy.editCell();
  165. model.refresh();
  166. }
  167. /**
  168. * @desc : Therapy 일정 저장
  169. * @
  170. * @param :
  171. * @return :
  172. * @author : 오지훈
  173. * @---------------------------------------------------
  174. */
  175. function fSaveTherapyInfo(){
  176. if(fChkValidSaveData()==true){
  177. model.setValue("/root/send/savedata", grd_therapy.getUpdateData());
  178. if (submit("TXAEB02801")) {
  179. // 핵종 사용량 일정 조회
  180. fReqTherapyInfo();
  181. // 수정 권한 체크
  182. fSetAuthGrid();
  183. }
  184. }
  185. }
  186. /**
  187. * @desc : Therapy 일정 조회
  188. * @
  189. * @param :
  190. * @return :
  191. * @author : 오지훈
  192. * @---------------------------------------------------
  193. */
  194. function fReqTherapyInfo(){
  195. model.copyNode("/root/send/reqdata", "/root/main/cond");
  196. if ( submit("TRAEB02801") ) {
  197. // 수정 권한 체크
  198. fSetAuthGrid();
  199. }
  200. }
  201. /**
  202. * @desc : 수정권한 체크
  203. * @
  204. * @param :
  205. * @return :
  206. * @author : 오지훈
  207. * @---------------------------------------------------
  208. */
  209. function fSetAuthGrid(){
  210. var userid = getUserId();
  211. for (var i=1; i<grd_therapy.rows; i++) {
  212. var updtimpsiyn = grd_therapy.valueMatrix(i, grd_therapy.colRef("updtimpsiyn"));
  213. var rsrvdd = grd_therapy.valueMatrix(i, grd_therapy.colRef("rsrvdd"));
  214. grd_therapy.rowstyle( i , "data" , "background-color" ) = "#FFFFFF";
  215. grd_therapy.rowstyle( i , "data" , "color" ) = "#000000";
  216. // 수정 권한 최태성 팀장님만 있음
  217. // if (updtimpsiyn == "Y" && "80030977" != userid ) {
  218. // if (updtimpsiyn == "Y") {
  219. // grd_therapy.isReadOnly(i,grd_therapy.colRef("rsrvdd"), i, grd_therapy.colRef("updtimpsiyn")) = true;
  220. // }
  221. if (rsrvdd < getCurrentDate() ) {
  222. grd_therapy.rowstyle( i , "data" , "background-color" ) = "#F0FFFF";
  223. }
  224. }
  225. }
  226. /**
  227. * @desc : Therapy 일정 삭제
  228. * @
  229. * @param :
  230. * @return :
  231. * @author : 오지훈
  232. * @---------------------------------------------------
  233. */
  234. function fDelRow(){
  235. var iRow = grd_therapy.row;
  236. var updtimpsiyn = grd_therapy.valueMatrix(iRow, grd_therapy.colRef("updtimpsiyn"));
  237. if (updtimpsiyn == "Y") {
  238. messageBox("해당 핵종에 대해서는 임의로 삭제를", "E001");
  239. return false;
  240. }
  241. var iStatus = grd_therapy.rowStatus(iRow);
  242. if(iStatus == 1 || iStatus == 3){
  243. grd_therapy.deleteRow(iRow);
  244. }else{
  245. grd_therapy.rowStatus(iRow) = 4;
  246. }
  247. }
  248. /**
  249. * @desc : 환자정보 확인버튼 클릭
  250. * @
  251. * @param :
  252. * @return :
  253. * @author : 오지훈
  254. * @---------------------------------------------------
  255. */
  256. function fClkCfrmBtn(){
  257. var iRow = grd_patinfopopup.row;
  258. fSetPatInfo(iRow);
  259. group1.attribute("height") = 0;
  260. btn_add.disabled = false;
  261. btn_del.disabled = false;
  262. btn_save.disabled= false;
  263. btn_req.disabled = false;
  264. btn_getpatinfo.disabled = false;
  265. }
  266. /**
  267. * @desc : 환자정보 조회
  268. * @
  269. * @param :
  270. * @return :
  271. * @author : 오지훈
  272. * @---------------------------------------------------
  273. */
  274. function fReqPatInfo(paramflag, param, param2){
  275. var iRow = grd_therapy.row;
  276. if(reqPatInfo(paramflag, "otpt", param, param2) == true){ //환자정보 조회
  277. var iCnt = getNodeSetCnt("/root/init/patnm/patnm");
  278. if(iCnt > 1){ //조회결과가 두 줄 이상인 경우, grid를 화면에 보여준다.
  279. group1.attribute("top") = 116 + (23 * (grd_therapy.rows - 2));
  280. group1.attribute("height") = 170;
  281. btn_add.disabled = true;
  282. btn_del.disabled = true;
  283. btn_save.disabled= true;
  284. btn_req.disabled = true;
  285. btn_getpatinfo.disabled = true;
  286. }else{
  287. fSetPatInfo(1); //조회결과가 한 줄인 경우, grid를 보여주는 것 없이 바로 결과값을 setting
  288. }
  289. }else{
  290. model.setValue(sTHERPLIST_PATH + "[" + iRow + "]/pid" , "");
  291. model.setValue(sTHERPLIST_PATH + "[" + iRow + "]/hngnm", "");
  292. model.refresh();
  293. }
  294. }
  295. /**
  296. * @desc : 환자정보 설정
  297. * @
  298. * @param :
  299. * @return :
  300. * @author : 오지훈
  301. * @---------------------------------------------------
  302. */
  303. function fSetPatInfo(iRow){
  304. sPid = model.getValue("/root/init/patnm/patnm[" + iRow + "]/pid");
  305. sHngNM = model.getValue("/root/init/patnm/patnm[" + iRow + "]/hngnm");
  306. sDeptCD = model.getValue("/root/init/patnm/patnm[" + iRow + "]/deptcd");
  307. sDrID = model.getValue("/root/init/patnm/patnm[" + iRow + "]/drid");
  308. sDrNM = model.getValue("/root/init/patnm/patnm[" + iRow + "]/drnm");
  309. var iCurRow = grd_therapy.row;
  310. model.setValue("/root/main/therpinfo/therplist[" + iCurRow + "]/pid", sPid);
  311. model.setValue("/root/main/therpinfo/therplist[" + iCurRow + "]/hngnm", sHngNM);
  312. model.setValue("/root/main/therpinfo/therplist[" + iCurRow + "]/orddeptcd", sDeptCD);
  313. model.setValue("/root/main/therpinfo/therplist[" + iCurRow + "]/orddrid", sDrID);
  314. model.setValue("/root/main/therpinfo/therplist[" + iCurRow + "]/orddrnm", sDrNM);
  315. model.refresh();
  316. }
  317. /**
  318. * @desc : 환자정보 취소버튼 클릭
  319. * @
  320. * @param :
  321. * @return :
  322. * @author : 오지훈
  323. * @---------------------------------------------------
  324. */
  325. function fClkCnClBtn(){
  326. group1.attribute("height") = 0;
  327. btn_add.disabled = false;
  328. btn_del.disabled = false;
  329. btn_save.disabled= false;
  330. btn_req.disabled = false;
  331. btn_getpatinfo.disabled = false;
  332. }
  333. /**
  334. * @desc : 그리드 input button클릭
  335. * @
  336. * @param :
  337. * @return :
  338. * @author : 오지훈
  339. * @---------------------------------------------------
  340. */
  341. function fClkGrdInptBtn(){
  342. //model.setValue("/root/hidden/srchcond", "2");
  343. modal("SPPMC02500", "1", 100, 100, "SPPMC02500", "/root/hidden", "/root/send");
  344. var sPid = model.getValue("/root/main/patinfo/patinfolist/pid");
  345. var sHngnm = model.getValue("/root/main/patinfo/patinfolist/hngnm");
  346. if(model.getValue("/root/main/popupendflag") != "cancel"){
  347. var iRow = grd_therapy.row;
  348. model.setValue(sTHERPLIST_PATH + "[" + iRow + "]/pid" , sPid);
  349. model.setValue(sTHERPLIST_PATH + "[" + iRow + "]/hngnm", sHngnm);
  350. }
  351. }
  352. /**
  353. * @desc : 저장데이터의 무결성검사
  354. * @
  355. * @param :
  356. * @return :
  357. * @author : 오지훈
  358. * @---------------------------------------------------
  359. */
  360. function fChkValidSaveData() {
  361. var update = getGridUpdateData(grd_therapy);
  362. if ( update == "" ) {
  363. messageBox("저장할 내역이", "I004");
  364. return;
  365. } else {
  366. var sDoseVal = model.getValue(sTHERPLIST_PATH + "[doseval='" + "" + "']/rsrvdd");
  367. var sRoomCD = model.getValue(sTHERPLIST_PATH + "[roomcd='" + "" + "']/rsrvdd");
  368. var sPid = model.getValue(sTHERPLIST_PATH + "[pid='" + "" + "']/rsrvdd");
  369. var sHngNM = model.getValue(sTHERPLIST_PATH + "[hngnm='" + "" + "']/rsrvdd");
  370. var sDeptCD = model.getValue(sTHERPLIST_PATH + "[orddeptcd='" + "" + "']/rsrvdd");
  371. var sOrddrid = model.getValue(sTHERPLIST_PATH + "[orddrid='" + "" + "']/rsrvdd");
  372. if (sDoseVal != "") {
  373. messageBox("Dose 값을", "C001");
  374. return false;
  375. // } else if (sRoomCD != ""){
  376. // messageBox("병실을 ", "C002");
  377. // return false;
  378. } else if (sPid != ""){
  379. messageBox("등록번호를 ", "C001");
  380. return false;
  381. } else if (sHngNM != ""){
  382. messageBox("환자명를 ", "C001");
  383. return false;
  384. } else if (sDeptCD != ""){
  385. messageBox("진료과 ", "C001");
  386. return false;
  387. } else if (sOrddrid != ""){
  388. messageBox("진료의 ", "C001");
  389. return false;
  390. // } else if (sOrddrnm != ""){
  391. // messageBox("입력한 환자의 접수정보가 없습니다. 환자를 다시", "C001");
  392. // return false;
  393. } else {
  394. return true;
  395. }
  396. }
  397. }
  398. /*** 주간 단위 핵종 신청량저장 ***/
  399. function chkUpdatedData() {
  400. if ( messageBox("", "Q002") == 6 ) {
  401. var nodeCnt = getNodesetCount("/root/main/list2/nuclcdapplist");
  402. nodeCnt = (nodeCnt*1) +1;
  403. for (var i=1; i<nodeCnt; i++) {
  404. var appdd = model.getValue("/root/main/list2/nuclcdapplist["+ i + "]/appdd");
  405. if (appdd == "") {
  406. messageBox("신청일자는 필수 입력입니다.", "I");
  407. return;
  408. }
  409. // 비고 size 제한 255
  410. var rem = model.getValue("/root/main/list2/nuclcdapplist["+ i + "]/rem");
  411. var iRemLength = getStringLength(rem);
  412. if (iRemLength > 255) {
  413. messageBox("비고 내용이 입력 범위를 초과하였습니다.", "I");
  414. return;
  415. }
  416. // true => Y , false=> N 변경 [DB size :CHARACTER(1)]
  417. var cnfmyn = model.getValue("/root/main/list2/nuclcdapplist["+ i + "]/cnfmyn");
  418. if (cnfmyn == "true") {
  419. model.setValue("/root/main/list2/nuclcdapplist["+ i + "]/cnfmyn","Y");
  420. } else {
  421. model.setValue("/root/main/list2/nuclcdapplist["+ i + "]/cnfmyn","N");
  422. }
  423. }
  424. var update = getGridUpdateData(grd_nuclcdapplist);
  425. if ( update == "" ) {
  426. messageBox("업데이트 정보가 없습니다.", "I");
  427. return;
  428. } else {
  429. model.setValue("/root/send/nuclcdapplist", update);
  430. if ( submit("TXAEB02701") ) {
  431. // 저장 후 재 조회
  432. submit("TRAEB02702");
  433. }
  434. model.refresh();
  435. }
  436. }
  437. }
  438. ]]>
  439. </script>
  440. </xhtml:head>
  441. <xhtml:body pagewidth="1100" pageheight="791" style="margin-left:8; margin-top:8; margin-right:8; margin-bottom:8; ">
  442. <caption id="caption22" class="tit_2" style="left:1px; top:48px; width:181px; height:14px; ">핵종 사용량 일정</caption>
  443. <line id="line1" class="line_1" style="x1:0px; y1:63px; x2:1084px; y2:63px; "/>
  444. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1084px; height:39px; background-color:#fffbf2; border-color:#ffd799; "/>
  445. <button id="btn_req" class="btn1_letter2" style="left:1022; top:10px; width:56px; height:22px; ">
  446. <caption>조회</caption>
  447. <script type="javascript" ev:event="DOMActivate">
  448. <![CDATA[
  449. fReqTherapyInfo();
  450. ]]>
  451. </script>
  452. </button>
  453. <line id="line3" style="x1:1006px; y1:8px; x2:1006px; y2:35px; border-color:#ffe4bb; border-left-style:solid; "/>
  454. <caption id="caption1" class="search_name" style="left:5px; top:11px; width:91px; height:17px; ">조회기간 :</caption>
  455. <input id="input1" ref="/root/main/cond/fromdd" inputtype="date" style="left:95px; top:10px; width:85px; height:19px; "/>
  456. <input id="input2" ref="/root/main/cond/todd" inputtype="date" style="left:201px; top:10px; width:85px; height:19px; "/>
  457. <caption id="caption2" style="left:185px; top:11px; width:20px; height:20px; ">~</caption>
  458. <caption id="caption5" class="search_name" style="left:322px; top:10px; width:91px; height:17px; ">등록번호 :</caption>
  459. <input id="input4" ref="/root/main/cond/pid" style="left:413px; top:10px; width:88px; height:19px; ">
  460. <script type="javascript" ev:event="onkeypress">
  461. <![CDATA[
  462. if ( event.keyCode == 13 ) {
  463. setInputNodeCurText();
  464. fReqTherapyInfo();
  465. }
  466. ]]>
  467. </script>
  468. </input>
  469. <button id="btn_getpatinfo" class="icon_search" style="left:507px; top:11px; width:16px; height:16px; ">
  470. <caption/>
  471. <script type="javascript" ev:event="DOMActivate">
  472. <![CDATA[
  473. model.setValue("/root/send/data2/srchcond", "2");
  474. model.setValue("/root/send/data2/pid", model.getValue("/root/main/cond/pid"));
  475. modal("SPPMC02500", "", "200", "200", "SPPMC02500","/root/send/data2","/root/send");
  476. var sPid = model.getValue("/root/main/patinfo/patinfolist/pid");
  477. var sHngnm = model.getValue("/root/main/patinfo/patinfolist/hngnm");
  478. model.setValue("/root/main/cond/pid", sPid);
  479. model.setValue("/root/main/cond/hngnm", sHngnm);
  480. model.refresh();
  481. ]]>
  482. </script>
  483. </button>
  484. <datagrid id="grd_therapy" nodeset="/root/main/therpinfo/therplist" caption="genrdd^genrno^일자^환자명^등록번호^진료과^병실^의사ID^의사명^검사^Dose(mCi)^변경불가^Dose(mCi)" colsep="^" colwidth="0, 0, 100, 104, 96, 161, 85, 0, 87, 259, 79, 69" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" selectionmode="byrow" style="left:0px; top:68px; width:1084px; height:507px; margin-left:0; margin-top:0; margin-right:0; margin-bottom:0; ">
  485. <col ref="genrdd"/>
  486. <col ref="genrno"/>
  487. <col ref="rsrvdd" type="inputdate"/>
  488. <col ref="hngnm" type="inputbutton"/>
  489. <col ref="pid" type="input"/>
  490. <col ref="orddeptcd" type="combo">
  491. <choices>
  492. <itemset nodeset="/root/init/orddeptcd">
  493. <label ref="nm"/>
  494. <value ref="cd"/>
  495. </itemset>
  496. </choices>
  497. </col>
  498. <col ref="roomcd" type="combo" style="text-align:center; ">
  499. <choices>
  500. <itemset nodeset="/root/init/item/roomlist">
  501. <label ref="roomnm"/>
  502. <value ref="roomcd"/>
  503. </itemset>
  504. </choices>
  505. </col>
  506. <col ref="orddrnm"/>
  507. <col ref="orddrid" type="combo">
  508. <choices>
  509. <itemset nodeset="/root/init/orddrid">
  510. <label ref="nm"/>
  511. <value ref="cd"/>
  512. </itemset>
  513. </choices>
  514. </col>
  515. <col ref="calcscorcd" type="combo">
  516. <choices>
  517. <itemset nodeset="/root/init/item/examcurecdlist">
  518. <label ref="excucdnm"/>
  519. <value ref="excucd"/>
  520. </itemset>
  521. </choices>
  522. </col>
  523. <col ref="doseval" type="input" format="#,###.000" style="text-align:right; "/>
  524. <col ref="updtimpsiyn" type="combo" visibility="hidden" style="text-align:center; ">
  525. <choices>
  526. <item>
  527. <label>N</label>
  528. <value>N</value>
  529. </item>
  530. <item>
  531. <label>Y</label>
  532. <value>Y</value>
  533. </item>
  534. </choices>
  535. </col>
  536. <script type="javascript" ev:event="onkeypress">
  537. <![CDATA[
  538. if(event.keyCode == 13){
  539. btn_grdpatinfo.dispatch("DOMActivate");
  540. }
  541. ]]>
  542. </script>
  543. <script type="javascript" ev:event="onbuttonclick">
  544. <![CDATA[
  545. var iCol = grd_therapy.col;
  546. if(iCol != 3){
  547. fClkGrdInptBtn();
  548. }
  549. ]]>
  550. </script>
  551. <script type="javascript" ev:event="xforms-value-changed">
  552. <![CDATA[
  553. // grd_therapy.choices.itemset.attribute("nodeset") = "/root/init/orddrid[dp = '"+ cmb_orddept.value +"']";
  554. // cmb_orddr.refresh();
  555. ]]>
  556. </script>
  557. </datagrid>
  558. <group id="group1" style="left:335px; top:116px; width:411px; height:170px; border-color:transparent; border-style:none; ">
  559. <caption id="caption3" class="tit_2" style="left:1px; top:0px; width:144px; height:13px; ">환자정보</caption>
  560. <line id="line2" class="line_1" style="x1:1px; y1:14px; x2:409px; y2:14px; "/>
  561. <datagrid id="grd_patinfopopup" nodeset="/root/init/patnm/patnm" caption="등록번호^환자명^진료과^진료의사^진료과코드^의사코드" colsep="^" colwidth="107, 100, 100, 100, 0, 0" mergecellsfixedrows="bycolrec" rowsep="|" style="left:0px; top:19px; width:409px; height:121px; ">
  562. <col ref="pid"/>
  563. <col ref="hngnm"/>
  564. <col ref="deptnm"/>
  565. <col ref="drnm"/>
  566. <col ref="deptcd"/>
  567. <col ref="drid"/>
  568. <script type="javascript" ev:event="ondblclick">
  569. <![CDATA[
  570. fClkCfrmBtn();
  571. ]]>
  572. </script>
  573. </datagrid>
  574. <button id="button1" class="btn2_letter2" style="left:320px; top:142px; width:42px; height:19px; ">
  575. <caption>확인</caption>
  576. <script type="javascript" ev:event="DOMActivate">
  577. <![CDATA[
  578. fClkCfrmBtn();
  579. ]]>
  580. </script>
  581. </button>
  582. <button id="button2" class="btn2_letter2" style="left:364px; top:142px; width:42px; height:19px; ">
  583. <caption>취소</caption>
  584. <script type="javascript" ev:event="DOMActivate">
  585. <![CDATA[
  586. fClkCnClBtn();
  587. ]]>
  588. </script>
  589. </button>
  590. </group>
  591. <button id="btn_srchpatnm" disabled="true" style="left:460px; top:10px; width:50px; height:20px; ">
  592. <caption/>
  593. <script type="javascript" ev:event="DOMActivate">
  594. <![CDATA[
  595. reqPatInfo("pid", model.getValue("/root/main/cond/pid"), "ptbs");
  596. model.setValue("/root/main/cond/hngnm", model.getValue("/root/init/patnm/patnm/hngnm"));
  597. model.refresh();
  598. ]]>
  599. </script>
  600. </button>
  601. <button id="btn_grdpatinfo" disabled="true" style="left:567px; top:41px; width:100px; height:20px; ">
  602. <caption/>
  603. <script type="javascript" ev:event="DOMActivate">
  604. <![CDATA[
  605. var iPidCol = grd_therapy.colRef("pid");
  606. var iNmCol = grd_therapy.colRef("hngnm");
  607. var iCol = grd_therapy.col;
  608. var iRow =grd_therapy.row;
  609. model.setValue("/root/send/data2/pid", model.getValue(sTHERPLIST_PATH + "[" + iRow + "]/pid"));
  610. model.setValue("/root/send/data2/hngnm", model.getValue(sTHERPLIST_PATH + "[" + iRow + "]/hngnm"));
  611. if ( submit("TRAEB02803") ) {
  612. model.setValue(sTHERPLIST_PATH + "[" + iRow + "]/pid",model.getValue("/root/main/patinfo/patinfolist/pid"));
  613. model.setValue(sTHERPLIST_PATH + "[" + iRow + "]/hngnm",model.getValue("/root/main/patinfo/patinfolist/hngnm"));
  614. }
  615. /*
  616. if(iCol == iPidCol){ //등록번호 조회
  617. //reqPatInfo(paramFlag, tblFlag, param, param2)
  618. fReqPatInfo("pid", model.getValue(sTHERPLIST_PATH + "[" + iRow + "]/pid"), model.getValue(sTHERPLIST_PATH + "[" + iRow + "]/rsrvdd"));
  619. }else if(iCol == iNmCol){ //환자명 조회
  620. fReqPatInfo("hngnm", model.getValue(sTHERPLIST_PATH + "[" + iRow + "]/hngnm"), model.getValue(sTHERPLIST_PATH + "[" + iRow + "]/rsrvdd"));
  621. }
  622. */
  623. model.recalculate();
  624. ]]>
  625. </script>
  626. </button>
  627. <button id="btn_save" class="btn2_letter2" style="left:999px; top:43px; width:42px; height:19px; ">
  628. <caption>저장</caption>
  629. <script type="javascript" ev:event="DOMActivate">
  630. <![CDATA[
  631. fSaveTherapyInfo();
  632. ]]>
  633. </script>
  634. </button>
  635. <button id="btn_add" class="btn2_letter3" style="left:891px; top:43px; width:53px; height:19px; ">
  636. <caption>행추가</caption>
  637. <script type="javascript" ev:event="DOMActivate">
  638. <![CDATA[
  639. fAddRow();
  640. ]]>
  641. </script>
  642. </button>
  643. <button id="btn_del" class="btn2_letter3" style="left:945px; top:43px; width:53px; height:19px; ">
  644. <caption>핵삭제</caption>
  645. <script type="javascript" ev:event="DOMActivate">
  646. <![CDATA[
  647. fDelRow();
  648. ]]>
  649. </script>
  650. </button>
  651. <output id="ipt_patnm" ref="/root/main/cond/hngnm" class="output_fix" style="left:530px; top:10px; width:72px; height:19px; "/>
  652. <button id="button3" class="btn2_letter2" style="left:1042px; top:43px; width:42px; height:19px; ">
  653. <caption>출력</caption>
  654. <script type="javascript" ev:event="DOMActivate">
  655. <![CDATA[
  656. for (var row=1; row<grd_therapy.rows; row++) {
  657. model.makeValue("/root/main/therpinfo/therplist["+ row + "]/calcscornm", grd_therapy.labelMatrix(row, grd_therapy.colRef("calcscorcd")));
  658. model.makeValue("/root/main/therpinfo/therplist["+ row + "]/orddeptnm", grd_therapy.labelMatrix(row, grd_therapy.colRef("orddeptcd")));
  659. }
  660. model.refresh();
  661. exeReportPreview("RPAEB02800", "XMLSTR", "/root/main/therpinfo/therplist");
  662. ]]>
  663. </script>
  664. </button>
  665. <datagrid id="grd_nuclcdapplist" nodeset="/root/main/list2/nuclcdapplist" caption="기준일자^지원부서코드^일련번호^신청일^핵종^판매회사^판매회사명^신청량^확인^비고" colsep="^" colwidth="100, 100, 100, 100, 120, 100, 150, 100, 53, 433" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:0px; top:600px; width:1085px; height:135px; ">
  666. <col ref="basedd" visibility="hidden"/>
  667. <col ref="suppdeptcd" visibility="hidden"/>
  668. <col ref="seqno" visibility="hidden"/>
  669. <col ref="appdd" type="inputdate" format="yyyy-mm-dd" style="text-align:center; "/>
  670. <col ref="nuclcd" type="combo">
  671. <choices>
  672. <itemset nodeset="/root/combo/itemlist/item">
  673. <label ref="itemnm"/>
  674. <value ref="itemcd"/>
  675. </itemset>
  676. </choices>
  677. </col>
  678. <col ref="suplcmpy" type="inputbutton">
  679. <script type="javascript" ev:event="onbuttonclick">
  680. <![CDATA[
  681. misfOpenPopUpList("14", ipt_suplcmpy, "", "suplcustcd,suplcustnm");
  682. model.refresh();
  683. var selectedrow = grd_nuclcdapplist.selectedCells.item(0).row;
  684. model.setValue("/root/main/list2/nuclcdapplist[" + selectedrow + "]/suplcmpy", model.getValue("/root/tmp/suplcustcd"));
  685. model.setValue("/root/main/list2/nuclcdapplist[" + selectedrow + "]/suplcmpynm", model.getValue("/root/tmp/suplcustnm"));
  686. model.refresh();
  687. ]]>
  688. </script>
  689. </col>
  690. <col ref="suplcmpynm" type="output"/>
  691. <col ref="appqty" type="input" format="#,###.00" maxlength="10" style="text-align:right; "/>
  692. <col ref="cnfmyn" type="checkbox"/>
  693. <col ref="rem" type="input"/>
  694. </datagrid>
  695. <caption id="caption4" class="tit_2" style="left:0px; top:580px; width:149px; height:13px; ">핵종별 신청내역</caption>
  696. <button id="button5" class="btn2_letter3" style="left:976px; top:580px; width:53px; height:19px; ">
  697. <caption>행추가</caption>
  698. <script type="javascript" ev:event="DOMActivate">
  699. <![CDATA[
  700. grd_nuclcdapplist.addRow();
  701. row = grd_nuclcdapplist.rows;
  702. row = row -1;
  703. model.makeValue("/root/main/list2/nuclcdapplist["+ row + "]/basedd",model.getValue("/root/send/mon"));
  704. model.makeValue("/root/main/list2/nuclcdapplist["+ row + "]/suppdeptcd",model.getValue("/root/send/suppdeptcd"));
  705. model.makeValue("/root/main/list2/nuclcdapplist["+ row + "]/appdd",getCurrentDate());
  706. ]]>
  707. </script>
  708. </button>
  709. <button id="btn_grddel" class="btn2_letter3" style="left:1031px; top:580px; width:53px; height:19px; ">
  710. <caption>행삭제</caption>
  711. <script type="javascript" ev:event="DOMActivate">
  712. <![CDATA[
  713. var row = grd_nuclcdapplist.row;
  714. grd_nuclcdapplist.deleteRow(row);
  715. ]]>
  716. </script>
  717. </button>
  718. <button id="btn_close" class="btn4_letter2" style="left:1025px; top:740px; width:56px; height:22px; ">
  719. <caption>닫기</caption>
  720. <script type="javascript" ev:event="DOMActivate">
  721. <![CDATA[
  722. window.close();
  723. ]]>
  724. </script>
  725. </button>
  726. <button id="button4" class="btn4_letter2" style="left:910px; top:740px; width:56px; height:22px; ">
  727. <caption>저장</caption>
  728. <script type="javascript" ev:event="DOMActivate">
  729. <![CDATA[
  730. chkUpdatedData();
  731. ]]>
  732. </script>
  733. </button>
  734. <button id="btn_print" class="btn4_letter2" style="left:967px; top:740px; width:56px; height:22px; ">
  735. <caption>출력</caption>
  736. <script type="javascript" ev:event="DOMActivate">
  737. <![CDATA[
  738. model.copyNode("/root/tmp/list1", "/root/main/list1");
  739. var rowcnt = getNodesetCount("/root/tmp/list1/nuclcdlist");
  740. rowcnt = (rowcnt*1) +1;
  741. var seq = "";
  742. var monnm = grd_nuclcdlist.valueMatrix(0, 3);
  743. var tuenm = grd_nuclcdlist.valueMatrix(0, 5);
  744. var wednm = grd_nuclcdlist.valueMatrix(0, 7);
  745. var thunm = grd_nuclcdlist.valueMatrix(0, 9);
  746. var frinm = grd_nuclcdlist.valueMatrix(0, 11);
  747. var satnm = grd_nuclcdlist.valueMatrix(0, 13);
  748. for (var i=1; i<rowcnt; i++) {
  749. seq = model.getValue("/root/tmp/list1/nuclcdlist["+ i + "]/seq");
  750. if (seq == "1") {
  751. model.setValue("/root/tmp/list1/nuclcdlist["+ i + "]/seq","▣");
  752. } else if (seq == "2") {
  753. model.setValue("/root/tmp/list1/nuclcdlist["+ i + "]/seq","-");
  754. }
  755. if (i == 1) {
  756. model.makeValue("/root/tmp/list1/nuclcdlist["+ i + "]/monnm",monnm);
  757. model.makeValue("/root/tmp/list1/nuclcdlist["+ i + "]/tuenm",tuenm);
  758. model.makeValue("/root/tmp/list1/nuclcdlist["+ i + "]/wednm",wednm);
  759. model.makeValue("/root/tmp/list1/nuclcdlist["+ i + "]/thunm",thunm);
  760. model.makeValue("/root/tmp/list1/nuclcdlist["+ i + "]/frinm",frinm);
  761. model.makeValue("/root/tmp/list1/nuclcdlist["+ i + "]/satnm",satnm);
  762. model.makeValue("/root/tmp/list1/nuclcdlist["+ i + "]/todate",opt_date.label);
  763. }
  764. }
  765. exeReportPreview("RPAEB02700", "XMLSTR", "/root/tmp/list1");
  766. ]]>
  767. </script>
  768. </button>
  769. <input id="ipt_suplcmpynm" ref="/root/tmp/suplcustnm" visibility="hidden" style="left:590px; top:740px; width:90px; height:19px; "/>
  770. <input id="ipt_suplcmpy" ref="/root/tmp/suplcustcd" visibility="hidden" style="left:370px; top:740px; width:85px; height:19px; "/>
  771. <button id="btn_Previous" class="icon_left" style="left:837px; top:43px; width:26px; height:19px; ">
  772. <script type="javascript" ev:event="DOMActivate">
  773. <![CDATA[
  774. // 기준일자
  775. var setDate = model.getValue("/root/main/cond/fromdd");
  776. var sysDate = setDate.toDate("YYYYMMDD");
  777. var nowDate = sysDate.getAddDate(-14,"D");
  778. nowDate = nowDate.getDateFormat("YYYYMMDD");
  779. // 기준일자 생성
  780. model.makeValue("/root/main/cond/fromdd",nowDate);
  781. model.makeValue("/root/main/cond/todd",setDate);
  782. model.refresh();
  783. fReqTherapyInfo();
  784. ]]>
  785. </script>
  786. <caption/>
  787. </button>
  788. <button id="button6" class="icon_right" style="left:864px; top:43px; width:26px; height:19px; ">
  789. <script type="javascript" ev:event="DOMActivate">
  790. <![CDATA[
  791. // 기준일자
  792. var setDate = model.getValue("/root/main/cond/todd");
  793. var sysDate = setDate.toDate("YYYYMMDD");
  794. var nowDate = sysDate.getAddDate(14,"D");
  795. nowDate = nowDate.getDateFormat("YYYYMMDD");
  796. // 기준일자 생성
  797. model.makeValue("/root/main/cond/fromdd",setDate);
  798. model.makeValue("/root/main/cond/todd",nowDate);
  799. model.refresh();
  800. fReqTherapyInfo();
  801. ]]>
  802. </script>
  803. <caption/>
  804. </button>
  805. </xhtml:body>
  806. </xhtml:html>