SMMRC01500.xjs 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <Script type="xscript4.0"><![CDATA[/**
  3. - ▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩
  4. - 외래차트대출신청 및 상태조회 ( SMMRC01500_외래차트대출신청 및 상태조회.xrw - JScript )
  5. - Version :
  6. 1) : Ver.1.00.01
  7. - ▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩
  8. **/
  9. /**
  10. * @ver : 2007/12/11
  11. * @desc : 폼초기화 및 공통코드 load,상단정보 있을시 검색
  12. * @
  13. * @by : 이창록
  14. * @param :
  15. * @return :
  16. * @---------------------------------------------------
  17. */
  18. function finitialize() {
  19. ds_main_appchrt_outchrtlist.clearData();
  20. ds_main_otherchrt_otherchrtlist.clearData();
  21. cap_oldimgER.text = "";
  22. cap_oldimgAH.text = "";
  23. //mmbfGetDeptCodeComboList("/root/send/reqdata", "/root/init/wardlist", "W"); //병동코드 콤보
  24. lf_mmbfGetDeptCodeComboList(ds_init_wardlist, "W");
  25. var pamInfoCvs = sysf_getGlobalVariable("paminfo");
  26. if (!utlf_isNull(pamInfoCvs)) { //cvs가 null이 아닌 경우에만 처리함.
  27. ds_main_result_paminfo_list.clearData();
  28. dsf_setCSVToDs("ds_main_result_paminfo_list", pamInfoCvs);
  29. var pid = ds_main_result_paminfo_list.getColumn(0, "pid");
  30. var orddeptcd = ds_main_result_paminfo_list.getColumn(0, "orddeptcd");
  31. var wardcd = ds_main_result_paminfo_list.getColumn(0, "wardcd");
  32. var roomcd = ds_main_result_paminfo_list.getColumn(0, "roomcd");
  33. var indd = ds_main_result_paminfo_list.getColumn(0, "indd");
  34. //model.setColumn("/root/outcond/chrtdept" ,orddeptcd);
  35. ds_outcond.setColumn(0, "ward", wardcd);
  36. ds_outcond.setColumn(0, "pid", pid);
  37. ds_outcond.setColumn(0, "ddlist", utlf_getCurrentDate());
  38. dsf_makeValue(ds_outcond, "instcd", "string", sysf_getUserInfo("dutplceinstcd"));
  39. //dsf_makeValue("/root/outcond/dschdd" ,getCurrentDate());
  40. ds_othercond.setColumn(0, "ward", wardcd);
  41. fSelectWard();
  42. fOutChartList();
  43. ds_othercond.setColumn(0, "room", roomcd);
  44. fRoomPatList();
  45. ds_othercond.setColumn(0, "pid", pid);
  46. dsf_makeValue(ds_othercond, "indd", "string", indd);
  47. dsf_makeValue(ds_othercond, "instcd", "string", sysf_getUserInfo("dutplceinstcd"));
  48. fOtherChrtList();
  49. } else if (utlf_isNull(pamInfoCvs)) {
  50. ds_outcond.setColumn(0, "ward", sysf_getUserInfo("dutplcecd"));
  51. dsf_makeValue(ds_outcond, "ddlist", "string", utlf_getCurrentDate());
  52. dsf_makeValue(ds_outcond, "instcd", "string", sysf_getUserInfo("dutplceinstcd"));
  53. fOutChartList();
  54. }
  55. grd_outchrtlist.setCellProperty("body", 9, "edittype", "none");
  56. }
  57. /**
  58. * @group :
  59. * @ver : 2007.12.11
  60. * @by : 이창록
  61. * @---------------------------------------------------
  62. * @type : function
  63. * @access : public
  64. * @desc : 외래차트대출 상태조회
  65. * @param :
  66. * @return :
  67. * @---------------------------------------------------
  68. */
  69. function fOutChartList() {
  70. var oParam = {};
  71. oParam.id = "TRMRC01501";
  72. oParam.service = "chrtmngtapp.ChrtRendMngt";
  73. oParam.method = "reqGetOutchartList";
  74. oParam.inds = "outcond=ds_outcond";
  75. oParam.outds = "ds_main_appchrt_outchrtlist=outchrtlist";
  76. oParam.async = false;
  77. oParam.callback = "cf_TRMRC01501";
  78. tranf_submit(oParam);
  79. if(utlf_isNull(ds_main_appchrt_outchrtlist.getColumnInfo("edittype")))
  80. {
  81. ds_main_appchrt_outchrtlist.addColumn("edittype", "string");
  82. }
  83. if (arErrorCode.pop("TRMRC01501") > -1) {
  84. if(utlf_isNull(ds_main_appchrt_outchrtlist.getColumnInfo("rendflag"))){
  85. ds_main_appchrt_outchrtlist.addColumn("rendflag", "string");
  86. }
  87. for (var i = 0; i < ds_main_appchrt_outchrtlist.rowcount; i++) {
  88. if (ds_outcond.getColumn(0, "dschInddlist") == "dschdd") {
  89. if (!utlf_isNull(ds_main_appchrt_outchrtlist.getColumn(i, "trgCol"))) { //그 인덱스 값이 없을 때
  90. //grd_outchrtlist.isReadOnly(i, "rendflag") = true; //edit못하게
  91. ds_main_appchrt_outchrtlist.setColumn(i, "edittype", "none");
  92. }
  93. } else if (ds_outcond.getColumn(0, "dschInddlist") == "indd") {
  94. if (ds_main_appchrt_outchrtlist.getColumn(i, "appdd") == "신청중") {
  95. grd_outchrtlist.isReadOnly(i, rendflagCol) = true;
  96. } else if (!utlf_isNull(ds_main_appchrt_outchrtlist.getColumn(i, "appdd"))) {
  97. //grd_outchrtlist.isReadOnly(i, "rendflag") = true;
  98. ds_main_appchrt_outchrtlist.setColumn(i, "edittype", "none");
  99. } else {
  100. // grd_outchrtlist.isReadOnly(i, "rendflag") = false;
  101. ds_main_appchrt_outchrtlist.setColumn(i, "edittype", "checkbox");
  102. }
  103. }
  104. else
  105. {
  106. ds_main_appchrt_outchrtlist.setColumn(i, "edittype", "checkbox");
  107. }
  108. }
  109. }
  110. }
  111. function cf_TRMRC01501(sSvcId, nErrorCode, sErrorMsg) {
  112. arErrorCode.push(sSvcId, nErrorCode);
  113. }
  114. /**
  115. * @group :
  116. * @ver : 2007.12.11
  117. * @by : 이창록
  118. * @---------------------------------------------------
  119. * @type : function
  120. * @access : public
  121. * @desc : 외래차트대출
  122. * @param :
  123. * @return :
  124. * @---------------------------------------------------
  125. */
  126. function fRowRendflag() {
  127. if (ds_main_appchrt_outchrtlist.rowposition >= 0) {
  128. var iRow = ds_main_appchrt_outchrtlist.rowposition;
  129. var rRow = ds_main_otherchrt_otherchrtlist.rowposition;
  130. var rendflag = ds_main_appchrt_outchrtlist.getColumn(iRow, "rendflag");
  131. var chrtflag = ds_main_appchrt_outchrtlist.getColumn(iRow, "chrtflag");
  132. var appdeptcd = ds_main_appchrt_outchrtlist.getColumn(iRow, "appdeptcd");
  133. var appdd = ds_main_appchrt_outchrtlist.getColumn(iRow, "appdd");
  134. var appmanid = ds_main_appchrt_outchrtlist.getColumn(iRow, "appmanid");
  135. var lendmanid = ds_main_appchrt_outchrtlist.getColumn(iRow, "lendmanid");
  136. var rtndd = ds_main_appchrt_outchrtlist.getColumn(iRow, "rtndd");
  137. if (chrtflag != "P") {
  138. sysf_messageBox("이 환자는 해당 입원과 차트가 없으니 오른쪽의 타과 차트 대출에서 신청", "I008");
  139. ds_main_appchrt_outchrtlist.setColumn(iRow, "rendflag", "false");
  140. return;
  141. }
  142. if (rendflag == "true" || rendflag == "1") {
  143. ds_main_appchrt_outchrtlist.setColumn(iRow, "rendflag", "true");
  144. ds_main_appchrt_outchrtlist.setColumn(iRow, "appdd", utlf_getCurrentDate());
  145. } else if (rendflag == "false" || rendflag == "0") {
  146. ds_main_appchrt_outchrtlist.setColumn(iRow, "appdd", "");
  147. ds_main_appchrt_outchrtlist.setColumn(iRow, "rendflag", "false");
  148. }
  149. }
  150. }
  151. /**
  152. * @group :
  153. * @ver : 2007.12.11
  154. * @by : 이창록
  155. * @---------------------------------------------------
  156. * @type : function
  157. * @access : public
  158. * @desc : 병동에 병실 조회
  159. * @param :
  160. * @return :
  161. * @---------------------------------------------------
  162. */
  163. function fSelectWard() {
  164. dsf_makeValue(ds_send_reqdata, "wardcd", "string", ds_othercond.getColumn(0, "ward"));
  165. var oParam = {};
  166. oParam.id = "TRMRC00051";
  167. oParam.service = "chrtmngtapp.ChrtRendMngt";
  168. oParam.method = "reqGetRoom";
  169. oParam.inds = "req=ds_send_reqdata";
  170. oParam.outds = "ds_init_room=room";
  171. oParam.async = false;
  172. //oParam.callback = "cf_TRMRC00051";
  173. tranf_submit(oParam);
  174. ipt_pid.value = "";
  175. }
  176. /**
  177. * @group :
  178. * @ver : 2007.12.11
  179. * @by : 이창록
  180. * @---------------------------------------------------
  181. * @type : function
  182. * @access : public
  183. * @desc : 입원환자차트리스트 저장
  184. * @param :
  185. * @return :
  186. * @---------------------------------------------------
  187. */
  188. function fReqLendChrt() {
  189. //grd_outchrtlist.clearStatus();
  190. //ds_send.clearData();
  191. var iRow = ds_main_appchrt_outchrtlist.rowposition;
  192. var bSave = false;
  193. for (var i = 0; i < ds_main_appchrt_outchrtlist.rowcount; i++) {
  194. var check = ds_main_appchrt_outchrtlist.getColumn(i, "rendflag");
  195. if (check == "true" || check == "1") {
  196. //grd_outchrtlist.rowStatus(i) = 1;
  197. ds_main_appchrt_outchrtlist.enableevent = false;
  198. ds_main_appchrt_outchrtlist.updatecontrol = false;
  199. ds_main_appchrt_outchrtlist.setRowType(i, 2);
  200. ds_main_appchrt_outchrtlist.updatecontrol = true;
  201. ds_main_appchrt_outchrtlist.enableevent = true;
  202. bSave = true;
  203. }
  204. }
  205. if (bSave == true) {
  206. var iRow = ds_main_appchrt_outchrtlist.rowposition;
  207. var ward = ds_outcond.getColumn(0, "ward");
  208. if (ward == "2280200000") {
  209. //병동이 응급의료센터일때 대출용도를 강제로 006로 저장
  210. ds_main_appchrt_outchrtlist.setColumn(iRow, "rendcd", "006");
  211. } else{
  212. ds_main_appchrt_outchrtlist.setColumn(iRow, "rendcd", "004");
  213. }
  214. //dsf_makeValue(ds_send, "savedata", "string", grd_outchrtlist.getUpdateData());
  215. var oParam = {};
  216. oParam.id = "TXMRC01501";
  217. oParam.service = "chrtmngtapp.ChrtRendMngt";
  218. oParam.method = "insOutChrtList";
  219. oParam.inds = "req=ds_main_appchrt_outchrtlist";
  220. oParam.outds = "";
  221. oParam.async = false;
  222. oParam.callback = "cf_TXMRC01501";
  223. tranf_submit(oParam);
  224. if (arErrorCode.pop("TXMRC01501") > -1) {
  225. sysf_messageBox("선택하신 차트가", "I001");
  226. } else {
  227. sysf_messageBox("선택하신 차트가", "E009");
  228. }
  229. //model.removeNodeset("/root/send/savedata");
  230. fOutChartList();
  231. } else {
  232. sysf_messageBox("대출신청할 종이차트를", "C002");
  233. }
  234. }
  235. function cf_TXMRC01501(sSvcId, nErrorCode, sErrorMsg) {
  236. arErrorCode.push(sSvcId, nErrorCode);
  237. }
  238. /**
  239. * @group :
  240. * @ver : 2007.12.11
  241. * @by : 이창록
  242. * @---------------------------------------------------
  243. * @type : function
  244. * @access : public
  245. * @desc : 병실에 환자 가져오기
  246. * @param :
  247. * @return :
  248. * @---------------------------------------------------
  249. */
  250. function fRoomPatList() {
  251. dsf_makeValue(ds_send_reqdata, "roomcd", "string", ds_othercond.getColumn(0, "room"));
  252. var oParam = {};
  253. oParam.id = "TRMRC01503";
  254. oParam.service = "chrtmngtapp.ChrtRendMngt";
  255. oParam.method = "reqGetRoomPatList";
  256. oParam.inds = "req=ds_send_reqdata";
  257. oParam.outds = "ds_init_roompatlist=roompatlist";
  258. //oParam.async = false;
  259. tranf_submit(oParam);
  260. ipt_pid.value = "";
  261. }
  262. /**
  263. * @group :
  264. * @ver : 2007.12.11
  265. * @by : 이창록
  266. * @---------------------------------------------------
  267. * @type : function
  268. * @access : public
  269. * @desc : 기준일자에 따른 버튼 disabled 상태변경 및 TEXT명 변경
  270. * @param :
  271. * @return :
  272. * @---------------------------------------------------
  273. */
  274. function fSelectRdoList() {
  275. var dschInddlist = ds_outcond.getColumn(0, "dschInddlist");
  276. if (dschInddlist == "indd") {
  277. cap_snm.text = "입원기준일";
  278. btn_x_appchrt.disabled = "false";
  279. //grd_outchrtlist.colHidden(10) = true;
  280. //grd_outchrtlist.colHidden(7) = false;
  281. grd_outchrtlist.setCellProperty("body", 9, "edittype", "none");
  282. grd_outchrtlist.setCellProperty("body", 6, "edittype", "none");
  283. ds_main_appchrt_outchrtlist.clearData();
  284. } else if (dschInddlist == "dschdd") {
  285. cap_snm.text = "퇴원기준일";
  286. btn_x_appchrt.disabled = "true";
  287. //grd_outchrtlist.colHidden(10) = false;
  288. //grd_outchrtlist.colHidden(7) = true;
  289. grd_outchrtlist.setCellProperty("body", 9, "edittype", "none");
  290. grd_outchrtlist.setCellProperty("body", 6, "edittype", "none");
  291. ds_outcond.setColumn(0, "ddlist", utlf_getCurrentDate());
  292. ds_main_appchrt_outchrtlist.clearData();
  293. }
  294. }
  295. /**
  296. * @group :
  297. * @ver : 2007.12.11
  298. * @by : 이창록
  299. * @---------------------------------------------------
  300. * @type : function
  301. * @access : public
  302. * @desc :타과 차트리스트 조회
  303. * @param :
  304. * @return :
  305. * @---------------------------------------------------
  306. */
  307. function fOtherChrtList() {
  308. var pid = ds_othercond.getColumn(0, "pid");
  309. var indd = ds_init_roompatlist.lookup("pid", pid, "indd");
  310. var iRow = ds_main_otherchrt_otherchrtlist.rowposition;
  311. var instcd = sysf_getUserInfo("dutplceinstcd");
  312. dsf_makeValue(ds_othercond, "indd", "string", indd);
  313. dsf_makeValue(ds_othercond, "instcd", "string", instcd);
  314. var oParam = {};
  315. oParam.id = "TRMRC01502";
  316. oParam.service = "chrtmngtapp.ChrtRendMngt";
  317. oParam.method = "reqGetOtherChrtList";
  318. oParam.inds = "othercond=ds_othercond";
  319. oParam.outds = "ds_main_otherchrt_otherchrtlist=otherchrtlist";
  320. oParam.async = false;
  321. oParam.callback = "cf_TRMRC01502";
  322. tranf_submit(oParam);
  323. if(utlf_isNull(ds_main_otherchrt_otherchrtlist.getColumnInfo("edittype")))
  324. {
  325. ds_main_otherchrt_otherchrtlist.addColumn("edittype", "string");
  326. }
  327. if (arErrorCode.pop("TRMRC01502") > -1) {
  328. for (var i = 0; i < ds_main_otherchrt_otherchrtlist.rowcount; i++) {
  329. //var trgCol = grd_otherchrtlist.colRef("appdd");
  330. //var rendflagCol = grd_otherchrtlist.colRef("rendflag");
  331. var appmCol = cmb_ward.value;
  332. if (ds_main_otherchrt_otherchrtlist.getColumn(i, "trgCol") == "신청중") {
  333. //grd_otherchrtlist.isReadOnly(i, rendflagCol) = true;
  334. ds_main_appchrt_outchrtlist.setColumn(i, "edittype", "none");
  335. } else {
  336. if (!utlf_isNull(ds_main_otherchrt_otherchrtlist.getColumn(i, "trgCol"))) {
  337. //grd_otherchrtlist.isReadOnly(i, rendflagCol) = true;
  338. ds_main_appchrt_outchrtlist.setColumn(i, "edittype", "none");
  339. } else {
  340. //grd_otherchrtlist.isReadOnly(i, rendflagCol) = false;
  341. ds_main_appchrt_outchrtlist.setColumn(i, "edittype", "checkbox");
  342. }
  343. }
  344. // else{
  345. // ds_main_appchrt_outchrtlist.setColumn(i, "edittype", "checkbox");
  346. // }
  347. }
  348. }
  349. // 2009.06.02. 의정부인 경우.. 응급실, 건진센터 구영상 조회하기..
  350. var instcd = sysf_getUserInfo("dutplceinstcd");
  351. if (instcd == "013") {
  352. var oParam = {};
  353. oParam.id = "TRMRC00147";
  354. oParam.service = "chrtmngtapp.ChrtRendMngt";
  355. oParam.method = "reqGetOldImgRec";
  356. oParam.inds = "req=ds_othercond";
  357. oParam.outds = "ds_main_oldimg_oldimglist=oldimglist";
  358. oParam.async = false;
  359. oParam.callback = "cf_TRMRC00147";
  360. tranf_submit(oParam);
  361. var msgER = "";
  362. var msgAH = "";
  363. var dataCnt = ds_main_oldimg_oldimglist.rowcount;
  364. for (var i = 0; i <= dataCnt; i++) {
  365. var cls = ds_main_oldimg_oldimglist.getColumn(i, "cls");
  366. var cnt = ds_main_oldimg_oldimglist.getColumn(i, "cnt");
  367. // 구영상 응급의학과
  368. if (cls == "E") {
  369. msgER = "▣ 구영상 응급의학과 (" + cnt + "건)";
  370. }
  371. // 구영상 건진
  372. if (cls == "S") {
  373. msgAH = "▣ 구영상 건진 (" + cnt + "건)";
  374. }
  375. }
  376. // ds_hidden.setColumn(0, "cap_oldimgER", msgER);
  377. // ds_hidden.setColumn(0, "cap_oldimgAH", msgAH);
  378. cap_oldimgER.text = msgER;
  379. cap_oldimgAH.text = msgAH;
  380. }
  381. }
  382. function cf_TRMRC01502(sSvcId, nErrorCode, sErrorMsg) {
  383. arErrorCode.push(sSvcId, nErrorCode);
  384. }
  385. /**
  386. * @group :
  387. * @ver : 2007.12.11
  388. * @by : 이창록
  389. * @---------------------------------------------------
  390. * @type : function
  391. * @access : public
  392. * @desc :타과 차트신청
  393. * @param :
  394. * @return :
  395. * @---------------------------------------------------
  396. */
  397. function fReqotherLendChrt() {
  398. //grd_otherchrtlist.clearStatus();
  399. var iRow = ds_main_otherchrt_otherchrtlist.rowposition;
  400. var cSave = false;
  401. for (var i = 0; i < ds_main_otherchrt_otherchrtlist.rowcount; i++) {
  402. var check = ds_main_otherchrt_otherchrtlist.getColumn(i, "rendflag");
  403. var stat = ds_main_otherchrt_otherchrtlist.getColumn(i, "stat");
  404. if (check == "true" || check == "1") {
  405. if (utlf_isNull(stat)) {
  406. //grd_otherchrtlist.rowStatus(i) = 1;
  407. ds_main_otherchrt_otherchrtlist.enableevent = false;
  408. ds_main_otherchrt_otherchrtlist.updatecontrol = false;
  409. ds_main_otherchrt_otherchrtlist.setRowType(i, 2);
  410. ds_main_otherchrt_otherchrtlist.updatecontrol = true;
  411. ds_main_otherchrt_otherchrtlist.enableevent = true;
  412. } else if (stat == "u") {
  413. //grd_otherchrtlist.rowStatus(i) = 2;
  414. ds_main_otherchrt_otherchrtlist.enableevent = false;
  415. ds_main_otherchrt_otherchrtlist.updatecontrol = false;
  416. ds_main_otherchrt_otherchrtlist.setRowType(i, 4);
  417. ds_main_otherchrt_otherchrtlist.updatecontrol = true;
  418. ds_main_otherchrt_otherchrtlist.enableevent = true;
  419. }
  420. cSave = true;
  421. }
  422. }
  423. if (cSave == true) {
  424. var iRow = ds_main_otherchrt_otherchrtlist.rowposition;
  425. var xOtherChrtListPath = ds_main_otherchrt_otherchrtlist;
  426. var ward = ds_othercond.getColumn(0, "ward");
  427. if (ward == "2280200000") {
  428. ds_main_otherchrt_otherchrtlist.setColumn(iRow, "rendcd", "006");
  429. } else {
  430. ds_main_otherchrt_otherchrtlist.setColumn(iRow, "rendcd", "004");
  431. }
  432. //dsf_makeValue("/root/send/savedata", grd_otherchrtlist.getUpdateData());
  433. var oParam = {};
  434. oParam.id = "TXMRC01502";
  435. oParam.service = "chrtmngtapp.ChrtRendMngt";
  436. oParam.method = "reqExeOtherChrtList";
  437. oParam.inds = "req=ds_main_otherchrt_otherchrtlist";
  438. oParam.outds = "";
  439. oParam.async = false;
  440. oParam.callback = "cf_TXMRC01502";
  441. tranf_submit(oParam);
  442. if (arErrorCode.pop("TXMRC01502") > -1) {
  443. sysf_messageBox("선택한 차트가", "I001");
  444. //model.removeNodeset("/root/send/savedata");
  445. fOtherChrtList();
  446. }
  447. } else {
  448. sysf_messageBox("대출신청할 차트가", "I004");
  449. }
  450. }
  451. function cf_TXMRC01502(sSvcId, nErrorCode, sErrorMsg) {
  452. arErrorCode.push(sSvcId, nErrorCode);
  453. }
  454. /**
  455. * @group :
  456. * @ver : 2007.12.11
  457. * @by : 이창록
  458. * @---------------------------------------------------
  459. * @type : function
  460. * @access : public
  461. * @desc :타과 차트 신청시 신청된 차트는 확인
  462. * @param :
  463. * @return :
  464. * @---------------------------------------------------
  465. */
  466. function fOtherRowRendflag() {
  467. if (ds_main_otherchrt_otherchrtlist.rowposition >= 0) {
  468. var iRow =ds_main_otherchrt_otherchrtlist.rowposition;
  469. var outRow = ds_main_appchrt_outchrtlist.rowposition;
  470. var Rendflag = ds_main_otherchrt_otherchrtlist.getColumn(iRow, "rendflag");
  471. var Chrtflag = ds_main_otherchrt_otherchrtlist.getColumn(iRow, "chrtflag");
  472. var ward = ds_main_otherchrt_otherchrtlist.getColumn(iRow, "ward");
  473. var Otherdeptcd = ds_main_otherchrt_otherchrtlist.getColumn(outRow, "appdeptcd");
  474. var Outdeptcd = ds_main_appchrt_outchrtlist.getColumn(outRow, "appdeptcd");
  475. if (Chrtflag != "P") {
  476. sysf_messageBox("종이차트만 대출신청", "I006");
  477. ds_main_otherchrt_otherchrtlist.setColumn(iRow, "rendflag", "false");
  478. return;
  479. }
  480. if (Rendflag == "true" || Rendflag == "1") {
  481. if (ds_main_otherchrt_otherchrtlist.getColumn(iRow, "appdd") == "신청중") {
  482. var Msgchrt = sysf_messageBox("이 차트는 이미 신청된차트입니다. 그래도 ", "Q004");
  483. if (Msgchrt == "7") {
  484. ds_main_otherchrt_otherchrtlist.setColumn(iRow, "rendflag", "false");
  485. dsf_makeValue(ds_main_otherchrt_otherchrtlist, "appdd", "string", "신청중", iRow);
  486. return;
  487. } else if (Msgchrt == "6") {
  488. ds_main_otherchrt_otherchrtlist.setColumn(iRow, "rendflag", "true");
  489. ds_main_otherchrt_otherchrtlist.setColumn(iRow, "appdd", utlf_getCurrentDate(), iRow);
  490. dsf_makeValue(ds_main_otherchrt_otherchrtlist, "appmanid", "string", sysf_getUserId(), iRow);
  491. dsf_makeValue(ds_main_otherchrt_otherchrtlist, "appmanm", "string", sysf_getUserInfo("usernm"), iRow);
  492. dsf_makeValue(ds_main_otherchrt_otherchrtlist, "appdeptcd", "string", sysf_getUserInfo("dutplcecd"), iRow);
  493. dsf_makeValue(ds_main_otherchrt_otherchrtlist, "appdeptnm", "string", sysf_getUserInfo("dutplcenm"), iRow);
  494. //dsf_makeValue("/root/main/otherchrt/otherchrtlist[" + iRow + "]/stat" ,"u");
  495. }
  496. } else {
  497. ds_main_otherchrt_otherchrtlist.setColumn(iRow, "rendflag", "true");
  498. ds_main_otherchrt_otherchrtlist.setColumn(iRow, "appdd", utlf_getCurrentDate());
  499. }
  500. } else if (Rendflag == "false" || Rendflag == "0") {
  501. ds_main_otherchrt_otherchrtlist.setColumn(iRow, "appdd", "");
  502. ds_main_otherchrt_otherchrtlist.setColumn(iRow, "appmanid", "");
  503. ds_main_otherchrt_otherchrtlist.setColumn(iRow, "appmanm", "");
  504. ds_main_otherchrt_otherchrtlist.setColumn(iRow, "appdeptcd", "");
  505. ds_main_otherchrt_otherchrtlist.setColumn(iRow, "appdeptnm", "");
  506. }
  507. }
  508. }
  509. /**
  510. * @ver :
  511. * @desc : 입원/퇴원환자 차트 리스트 조회한 것을 엑셀에 저장
  512. * @
  513. * @by : 이창록
  514. * @param :
  515. * @return :
  516. * @---------------------------------------------------
  517. */
  518. function fChrtListSaveExcel() {
  519. //var fileName = window.fileDialog("save", ",", false, "입퇴원환자차트리스트", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  520. if (ds_main_appchrt_outchrtlist.rowcount > 0) {
  521. //grd_outchrtlist.saveExcel(fileName, "SheetName", false, false, "", "", "false");
  522. grdf_exportExcel(grd_outchrtlist, "입퇴원환자차트리스트", "입퇴원환자차트리스트", false, "", "", false);
  523. }
  524. }
  525. /**
  526. * @ver :
  527. * @desc : 입/퇴원환자차트 리스트 더블클릭시 환자별 차트리스트 조회
  528. * @
  529. * @by : 이창록
  530. * @param :
  531. * @return :
  532. * @---------------------------------------------------
  533. */
  534. function fPatChrtInfo(iRow) {
  535. ds_othercond.setColumn(0, "ward", ds_main_appchrt_outchrtlist.getColumn(iRow, "ward"));
  536. ds_othercond.setColumn(0, "instcd", ds_main_appchrt_outchrtlist.getColumn(iRow, "instcd"));
  537. fSelectWard();
  538. ds_othercond.setColumn(0, "room", ds_main_appchrt_outchrtlist.getColumn(iRow, "roomcd"));
  539. ds_othercond.setColumn(0, "indd", ds_main_appchrt_outchrtlist.getColumn(iRow, "indd"));
  540. fRoomPatList();
  541. ds_othercond.setColumn(0, "pid", ds_main_appchrt_outchrtlist.getColumn(iRow, "pid"));
  542. fOtherChrtList();
  543. }]]></Script>