SMMNB012.js 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089
  1. /*
  2. 24시간 업무보고 (SMMNB01200.xrw - JScript )
  3. - Version :
  4. 1) : Ver.1.00.01
  5. */
  6. var GRD_INPTLIST_FIXCOL = 15;
  7. var dutplcecd = getUserInfo("dutplcecd");
  8. var deptcd = "";
  9. var erdeptflag =""; //칠곡에는 null으로 고정. 값 셋팅해주는 곳 없음.
  10. var erdeptcd="";
  11. var erdeptnm="";
  12. var cnt = 0;
  13. /**
  14. * @group :
  15. * @ver : 2007.08.13
  16. * @by : 하재륜
  17. * @---------------------------------------------------
  18. * @type : function
  19. * @access : public
  20. * @desc : 외래진료 현황
  21. * @param :
  22. * @return :
  23. * @---------------------------------------------------
  24. */
  25. function fSearch_otptlist(){ // 통합통계 외래환자수 서브미션 태움 수정 by 박영우 20091215
  26. model.removenodeset("/root/send/reqdata");
  27. model.removenodeset("/root/main/outpatinfo");
  28. //messageBox("개발중","I009");
  29. if ( isNull(model.getValue("/root/temp/srchdd")) ){
  30. messageBox("기간","I003");//필수입력입니다
  31. return;
  32. }
  33. model.removeNode("/root/send/reqdata");
  34. model.makeValue("/root/send/reqdata/srchdd", model.getValue("/root/temp/srchdd") );
  35. model.makeValue("/root/send/reqdata/menu", "SUM");
  36. if ( !isNull( model.getValue("/root/temp/orddeptcd") ) && model.getValue("/root/temp/orddeptcd") != "%") {
  37. model.makeValue("/root/send/reqdata/orddeptcd", model.getValue("/root/temp/orddeptcd"));
  38. }
  39. if ( !isNull( model.getValue("/root/temp/orddrid") ) && model.getValue("/root/temp/orddrid") != "%") {
  40. model.makeValue("/root/send/reqdata/orddrid", model.getValue("/root/temp/orddrid"));
  41. }
  42. model.makeValue("/root/send/orddd",ipt_orddd.value); //보고일자
  43. submit("TRSNO00101",false);
  44. model.refresh();
  45. }
  46. /**
  47. * @group :
  48. * @ver : 2007.08.13
  49. * @by : 하재륜
  50. * @---------------------------------------------------
  51. * @type : function
  52. * @access : public
  53. * @desc : Unit별 현황
  54. * @param :
  55. * @return :
  56. * @---------------------------------------------------
  57. */
  58. function fSearch_inptlist(){
  59. for(var i = 1 ; i <= 99 ; i++){
  60. grd_inptlist.colhidden(GRD_INPTLIST_FIXCOL+i) = true;
  61. }
  62. model.removenodeset("/root/main/inpt/dept");
  63. model.removenodeset("/root/main/inpt/inptlist");
  64. model.makeValue("/root/send/orddd",ipt_orddd.value); //보고일자
  65. submit("TRMNB01203",false);
  66. model.makeValue("/root/send/orddd",ipt_orddd.value); //보고일자
  67. submit("TRMNB01202",false);
  68. }
  69. /**
  70. * @group :
  71. * @ver : 2007.08.13
  72. * @by : 하재륜
  73. * @---------------------------------------------------
  74. * @type : function
  75. * @access : public
  76. * @desc : 보고 행추가
  77. * @param :
  78. * @return :
  79. * @---------------------------------------------------
  80. */
  81. function fAdd_Reptrows(grdflg){
  82. var wardcd = dutplcecd; //세션에서 받아처리
  83. var plandd = getCurrentDate();
  84. var plandt = getCurrentDate()+getCurrentTime().substring(0,4);
  85. if(grdflg == "psnlist"){
  86. if(grd_psnlist.rows < 2){
  87. grd_psnlist.addRow();
  88. }else{
  89. grd_psnlist.insertRow(1);
  90. }
  91. model.setValue("/root/main/inpt/reptdata/psnlist["+grd_psnlist.row+"]/staiud","insert");
  92. model.setValue("/root/main/inpt/reptdata/psnlist["+grd_psnlist.row+"]/wardcd",wardcd);
  93. model.setValue("/root/main/inpt/reptdata/psnlist["+grd_psnlist.row+"]/plandd",plandd);
  94. model.setValue("/root/main/inpt/reptdata/psnlist["+grd_psnlist.row+"]/plandt",plandt);
  95. model.setValue("/root/main/inpt/reptdata/psnlist["+grd_psnlist.row+"]/usernm",getUserName());
  96. model.setValue("/root/main/inpt/reptdata/psnlist["+grd_psnlist.row+"]/posdeptnm",getUserInfo("dutplcenm"));
  97. model.setValue("/root/main/inpt/reptdata/psnlist["+grd_psnlist.row+"]/userid",getUserId());
  98. model.setValue("/root/main/inpt/reptdata/psnlist["+grd_psnlist.row+"]/deliveflagcd","01");
  99. grd_psnlist.cellStyle("background-image", grd_psnlist.row, 1) = "../../../com/commonweb/images/icon_i.gif";
  100. }else if(grdflg == "wardlist"){
  101. if(grd_wardlist.rows < 2){
  102. grd_wardlist.addRow();
  103. }else{
  104. grd_wardlist.insertRow(1);
  105. }
  106. model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/staiud","insert");
  107. model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/plandd",plandd);
  108. model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/plandt",plandt);
  109. var strTmp = model.getValue("/root/temp/duty");
  110. model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/duty", strTmp == "4" ? "1" : strTmp);
  111. model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/usernm",getUserName());
  112. model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/userid",getUserId());
  113. if(erdeptflag == "Y") {
  114. model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/wardcd", erdeptcd);
  115. model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/posdeptnm", erdeptnm);
  116. } else {
  117. model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/wardcd", wardcd);
  118. model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/posdeptnm", getUserInfo("dutplcenm"));
  119. }
  120. model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/deliveflagcd","02");
  121. }else if(grdflg == "edulist"){
  122. if(grd_edulist.rows < 2){
  123. grd_edulist.addRow();
  124. }else{
  125. grd_edulist.insertRow(1);
  126. }
  127. model.setValue("/root/main/inpt/reptdata/edulist["+grd_edulist.row+"]/staiud","insert");
  128. model.setValue("/root/main/inpt/reptdata/edulist["+grd_edulist.row+"]/wardcd",wardcd);
  129. model.setValue("/root/main/inpt/reptdata/edulist["+grd_edulist.row+"]/plandd",plandd);
  130. model.setValue("/root/main/inpt/reptdata/edulist["+grd_edulist.row+"]/plandt",plandt);
  131. model.setValue("/root/main/inpt/reptdata/edulist["+grd_edulist.row+"]/usernm",getUserName());
  132. model.setValue("/root/main/inpt/reptdata/edulist["+grd_edulist.row+"]/posdeptnm",getUserInfo("dutplcenm"));
  133. model.setValue("/root/main/inpt/reptdata/edulist["+grd_edulist.row+"]/userid",getUserId());
  134. model.setValue("/root/main/inpt/reptdata/edulist["+grd_edulist.row+"]/deliveflagcd","03");
  135. grd_edulist.cellStyle("background-image", grd_edulist.row, 1) = "../../../com/commonweb/images/icon_i.gif";
  136. }else if(grdflg == "etclist"){
  137. if(grd_etclist.rows < 2){
  138. grd_etclist.addRow();
  139. }else{
  140. grd_etclist.insertRow(1);
  141. }
  142. model.setValue("/root/main/inpt/reptdata/etclist["+grd_etclist.row+"]/staiud","insert");
  143. model.setValue("/root/main/inpt/reptdata/etclist["+grd_etclist.row+"]/wardcd",wardcd);
  144. model.setValue("/root/main/inpt/reptdata/etclist["+grd_etclist.row+"]/plandd",plandd);
  145. model.setValue("/root/main/inpt/reptdata/etclist["+grd_etclist.row+"]/plandt",plandt);
  146. model.setValue("/root/main/inpt/reptdata/etclist["+grd_etclist.row+"]/usernm",getUserName());
  147. model.setValue("/root/main/inpt/reptdata/etclist["+grd_etclist.row+"]/userid",getUserId());
  148. model.setValue("/root/main/inpt/reptdata/etclist["+grd_etclist.row+"]/deliveflagcd","04");
  149. grd_etclist.cellStyle("background-image", grd_etclist.row, 1) = "../../../com/commonweb/images/icon_i.gif";
  150. }else if(grdflg == "notilist"){
  151. if(grd_noti.rows < 2){
  152. grd_noti.addRow();
  153. }else{
  154. grd_noti.insertRow(1);
  155. }
  156. model.setValue("/root/main/inpt/reptdata/notilist["+grd_noti.row+"]/staiud","insert");
  157. model.setValue("/root/main/inpt/reptdata/notilist["+grd_noti.row+"]/wardcd",wardcd);
  158. model.setValue("/root/main/inpt/reptdata/notilist["+grd_noti.row+"]/plandd",plandd);
  159. model.setValue("/root/main/inpt/reptdata/notilist["+grd_noti.row+"]/plandt",plandt);
  160. model.setValue("/root/main/inpt/reptdata/notilist["+grd_noti.row+"]/usernm",getUserName());
  161. model.setValue("/root/main/inpt/reptdata/notilist["+grd_noti.row+"]/userid",getUserId());
  162. model.setValue("/root/main/inpt/reptdata/notilist["+grd_noti.row+"]/deliveflagcd","05");
  163. grd_noti.cellStyle("background-image", grd_noti.row, 1) = "../../../com/commonweb/images/icon_i.gif";
  164. }
  165. model.refresh();
  166. }
  167. /**
  168. * @group :
  169. * @ver : 2007.08.13
  170. * @by : 하재륜
  171. * @---------------------------------------------------
  172. * @type : function
  173. * @access : public
  174. * @desc : 보고 행수정
  175. * @param :
  176. * @return :
  177. * @---------------------------------------------------
  178. */
  179. function fUpt_Reptrows(grdflg){
  180. var wardcd = dutplcecd; //세션에서 받아처리
  181. var plandd = model.getValue(ipt_orddd2.attribute("ref"));
  182. var plandt = getCurrentDate()+getCurrentTime().substring(0,4);
  183. if(grdflg == "psnlist"){
  184. var staiud = model.getValue("/root/main/inpt/reptdata/psnlist["+grd_psnlist.row+"]/staiud");
  185. if( (staiud =="insert") || (staiud =="delete") ){
  186. return;
  187. }
  188. model.setValue("/root/main/inpt/reptdata/psnlist["+grd_psnlist.row+"]/staiud","update");
  189. model.setValue("/root/main/inpt/reptdata/psnlist["+grd_psnlist.row+"]/wardcd",wardcd);
  190. model.setValue("/root/main/inpt/reptdata/psnlist["+grd_psnlist.row+"]/usernm",getUserName());
  191. model.setValue("/root/main/inpt/reptdata/psnlist["+grd_psnlist.row+"]/posdeptnm",getUserInfo("dutplcenm"));
  192. model.setValue("/root/main/inpt/reptdata/psnlist["+grd_psnlist.row+"]/userid",getUserId());
  193. model.setValue("/root/main/inpt/reptdata/psnlist["+grd_psnlist.row+"]/deliveflagcd","01");
  194. grd_psnlist.cellStyle("background-image", grd_psnlist.row, 1) = "../../../com/commonweb/images/icon_u.gif";
  195. }else if(grdflg == "wardlist"){
  196. var staiud = model.getValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/staiud");
  197. if( (staiud =="insert") || (staiud =="delete") ){
  198. return;
  199. }
  200. var dt = model.getValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/plandt");
  201. if(dt == null || dt == "") {
  202. model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/plandd",plandd);
  203. model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/plandt",plandt);
  204. }
  205. model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/staiud","update");
  206. model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/usernm",getUserName());
  207. model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/userid",getUserId());
  208. model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/deliveflagcd","02");
  209. }else if(grdflg == "edulist"){
  210. var staiud = model.getValue("/root/main/inpt/reptdata/edulist["+grd_edulist.row+"]/staiud");
  211. if( (staiud =="insert") || (staiud =="delete") ){
  212. return;
  213. }
  214. model.setValue("/root/main/inpt/reptdata/edulist["+grd_edulist.row+"]/staiud","update");
  215. model.setValue("/root/main/inpt/reptdata/edulist["+grd_edulist.row+"]/wardcd",wardcd);
  216. model.setValue("/root/main/inpt/reptdata/edulist["+grd_edulist.row+"]/usernm",getUserName());
  217. model.setValue("/root/main/inpt/reptdata/edulist["+grd_edulist.row+"]/posdeptnm",getUserInfo("dutplcenm"));
  218. model.setValue("/root/main/inpt/reptdata/edulist["+grd_edulist.row+"]/userid",getUserId());
  219. model.setValue("/root/main/inpt/reptdata/edulist["+grd_edulist.row+"]/deliveflagcd","03");
  220. grd_edulist.cellStyle("background-image", grd_edulist.row, 1) = "../../../com/commonweb/images/icon_u.gif";
  221. }else if(grdflg == "etclist"){
  222. var staiud = model.getValue("/root/main/inpt/reptdata/etclist["+grd_etclist.row+"]/staiud");
  223. if( (staiud =="insert") || (staiud =="delete") ){
  224. return;
  225. }
  226. model.setValue("/root/main/inpt/reptdata/etclist["+grd_etclist.row+"]/staiud","update");
  227. model.setValue("/root/main/inpt/reptdata/etclist["+grd_etclist.row+"]/wardcd",wardcd);
  228. model.setValue("/root/main/inpt/reptdata/etclist["+grd_etclist.row+"]/usernm",getUserName());
  229. model.setValue("/root/main/inpt/reptdata/etclist["+grd_etclist.row+"]/userid",getUserId());
  230. model.setValue("/root/main/inpt/reptdata/etclist["+grd_etclist.row+"]/deliveflagcd","04");
  231. grd_etclist.cellStyle("background-image", grd_etclist.row, 1) = "../../../com/commonweb/images/icon_u.gif";
  232. }else if(grdflg == "notilist"){
  233. var staiud = model.getValue("/root/main/inpt/reptdata/notilist["+grd_noti.row+"]/staiud");
  234. if( (staiud =="insert") || (staiud =="delete") ){
  235. return;
  236. }
  237. model.setValue("/root/main/inpt/reptdata/notilist["+grd_noti.row+"]/staiud","update");
  238. model.setValue("/root/main/inpt/reptdata/notilist["+grd_noti.row+"]/wardcd",wardcd);
  239. model.setValue("/root/main/inpt/reptdata/notilist["+grd_noti.row+"]/usernm",getUserName());
  240. model.setValue("/root/main/inpt/reptdata/notilist["+grd_noti.row+"]/userid",getUserId());
  241. model.setValue("/root/main/inpt/reptdata/notilist["+grd_noti.row+"]/deliveflagcd","05");
  242. grd_noti.cellStyle("background-image", grd_noti.row, 1) = "../../../com/commonweb/images/icon_u.gif";
  243. }
  244. model.refresh();
  245. }
  246. /**
  247. * @group :
  248. * @ver : 2007.08.13
  249. * @by : 하재륜
  250. * @---------------------------------------------------
  251. * @type : function
  252. * @access : public
  253. * @desc : 보고 행삭제
  254. * @param :
  255. * @return :
  256. * @---------------------------------------------------
  257. */
  258. function fDel_Reptrows(grdflg){
  259. var reptcnt;
  260. if(grdflg == "psnlist"){
  261. reptcnt = grd_psnlist.rows;
  262. }else if(grdflg == "wardlist"){
  263. reptcnt = grd_wardlist.rows;
  264. }else if(grdflg == "edulist"){
  265. reptcnt = grd_edulist.rows;
  266. }else if(grdflg == "etclist"){
  267. reptcnt = grd_etclist.rows;
  268. }else if(grdflg == "notilist"){
  269. reptcnt = grd_noti.rows;
  270. }
  271. if(reptcnt < 2){
  272. messageBox("삭제 할 자료가 ","I004");
  273. return;
  274. }
  275. if(grdflg == "psnlist"){
  276. model.setValue("/root/main/inpt/reptdata/psnlist["+grd_psnlist.row+"]/staiud","delete");
  277. grd_psnlist.cellStyle("background-image", grd_psnlist.row, 1) = "../../../com/commonweb/images/icon_d.gif";
  278. }else if(grdflg == "wardlist"){
  279. model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/staiud","delete");
  280. grd_wardlist.rowStatus(grd_wardlist.row) = "4";
  281. }else if(grdflg == "edulist"){
  282. model.setValue("/root/main/inpt/reptdata/edulist["+grd_edulist.row+"]/staiud","delete");
  283. grd_edulist.cellStyle("background-image", grd_edulist.row, 1) = "../../../com/commonweb/images/icon_d.gif";
  284. }else if(grdflg == "etclist"){
  285. model.setValue("/root/main/inpt/reptdata/etclist["+grd_etclist.row+"]/staiud","delete");
  286. grd_etclist.cellStyle("background-image", grd_etclist.row, 1) = "../../../com/commonweb/images/icon_d.gif";
  287. }else if(grdflg == "notilist"){
  288. model.setValue("/root/main/inpt/reptdata/notilist["+grd_noti.row+"]/staiud","delete");
  289. grd_noti.cellStyle("background-image", grd_noti.row, 1) = "../../../com/commonweb/images/icon_d.gif";
  290. }
  291. model.refresh();
  292. }
  293. /**
  294. * @group :
  295. * @ver : 2007.08.13
  296. * @by : 하재륜
  297. * @---------------------------------------------------
  298. * @type : function
  299. * @access : public
  300. * @desc : 외래진료 현황
  301. * @param :
  302. * @return :
  303. * @---------------------------------------------------
  304. */
  305. function fCaseChange(){
  306. if(unitflg == 1){
  307. fSearch_inptlist();
  308. fSearch_specnurs();
  309. }else if(unitflg == 2){
  310. fSearch_otptlist();
  311. }
  312. }
  313. /**
  314. * @group :
  315. * @ver : 2008.06.05
  316. * @by : 하재륜
  317. * @---------------------------------------------------
  318. * @type : function
  319. * @access : public
  320. * @desc : 수술,응급,분만,신생아,HD,APU,주사 각각 조회
  321. * @param :
  322. * @return :
  323. * @---------------------------------------------------
  324. */
  325. function fSearch_specnurs(){
  326. model.removenodeset("/root/main/inpt/specnurs/oprsinfo"); // 수술 (정규,응급,통원,전체)
  327. model.removenodeset("/root/main/inpt/specnurs/oprsdetl"); // 수술 (종류,구분,건수)
  328. model.removenodeset("/root/main/inpt/specnurs/ernurs"); // 응급
  329. model.removenodeset("/root/main/inpt/specnurs/partrtn"); // 분만
  330. model.removenodeset("/root/main/inpt/specnurs/nbabycare"); // 신생아
  331. model.removenodeset("/root/main/inpt/specnurs/hdroom"); // HD
  332. model.removenodeset("/root/main/inpt/specnurs/apuroom"); // APU
  333. model.removenodeset("/root/main/inpt/specnurs/injction"); // 주사
  334. model.removenodeset("/root/send");
  335. //model.refresh();
  336. model.makeValue("/root/send/plandd",ipt_orddd.value); //업무일자
  337. model.makeValue("/root/send/deptflg",deptflg); //특수간호
  338. model.makeValue("/root/send/instcd", getUserInfo("dutplceinstcd")); // 기관코드
  339. submit("TRMNB01206");
  340. }
  341. /**
  342. * @group :
  343. * @ver : 2007.08.13
  344. * @by : 하재륜
  345. * @---------------------------------------------------
  346. * @type : function
  347. * @access : public
  348. * @desc : 보고 저장
  349. * @param :
  350. * @return :
  351. * @---------------------------------------------------
  352. */
  353. function fSave_Reptrows(grdflg){
  354. if(messageBox("","Q002") != 6) return;
  355. var xReptPath;
  356. var reptcnt;
  357. var num = "";
  358. if(grdflg == "psnlist"){
  359. xReptPath = "/root/main/inpt/reptdata/psnlist";
  360. reptcnt = grd_psnlist.rows;
  361. }else if(grdflg == "wardlist"){
  362. xReptPath = "/root/main/inpt/reptdata/wardlist";
  363. reptcnt = grd_wardlist.rows;
  364. }else if(grdflg == "edulist"){
  365. xReptPath = "/root/main/inpt/reptdata/edulist";
  366. reptcnt = grd_edulist.rows;
  367. }else if(grdflg == "etclist"){
  368. xReptPath = "/root/main/inpt/reptdata/etclist";
  369. reptcnt = grd_etclist.rows;
  370. }else if(grdflg == "notilist"){
  371. xReptPath = "/root/main/inpt/reptdata/notilist";
  372. reptcnt = grd_noti.rows;
  373. }
  374. for(i=1; i<reptcnt; i++){
  375. var state = model.getValue("/root/main/inpt/reptdata/"+grdflg+"["+i+"]/staiud");
  376. if (state == "insert" || state == "update" || state == "delete"){
  377. num = "";
  378. break;
  379. }else{
  380. num = "1";
  381. }
  382. }
  383. if(reptcnt < 2 || num == "1" ){
  384. messageBox("저장할 자료가 존재하지 않습니다.","I");
  385. return;
  386. }
  387. if(grdflg == "wardlist") {
  388. model.removenode("/root/send");
  389. model.makeNode("/root/send");
  390. model.makeValue("/root/send/sReptPath" ,getGridUpdateData(grd_wardlist) );
  391. } else {
  392. var sReptPath =
  393. "wardcd" //01병동코드
  394. + "▦plandd" //02계획일자
  395. + "▦plandt" //03계획시간
  396. + "▦deliveflagcd" //04전달구분
  397. + "▦delivecnts" //05내용
  398. + "▦userid" //06작성자
  399. + "▦staiud" //07상태
  400. + "▦seqno" //08시퀀스번호
  401. + "▦duty" //09todolist
  402. + "▦filenm" //파일명
  403. + "▦filesize" //파일크기
  404. + "▦filetype" //파일형식
  405. + "▦filepath" //ftp파일경로
  406. + "▩" ;
  407. var plandd = "";
  408. var seqno = "";
  409. for (i=1;i < reptcnt; i++ ) {
  410. seqno = model.getValue(xReptPath + "["+ i + "]/seqno");
  411. if(seqno == null || seqno == "") {
  412. plandd = getCurrentDate();
  413. } else {
  414. plandd = model.getValue(xReptPath + "["+ i + "]/plandd");
  415. }
  416. sReptPath += model.getValue(xReptPath + "["+ i + "]/wardcd" ) //01병동코드
  417. + "▦" + plandd //02계획일자
  418. + "▦" + model.getValue(xReptPath + "["+ i + "]/plandt" ) //03계획시간
  419. + "▦" + model.getValue(xReptPath + "["+ i + "]/deliveflagcd") //04전달구분
  420. + "▦" + model.getValue(xReptPath + "["+ i + "]/delivecnts" ) //05내용
  421. + "▦" + model.getValue(xReptPath + "["+ i + "]/userid" ) //06작성자
  422. + "▦" + model.getValue(xReptPath + "["+ i + "]/staiud" ) //07상태
  423. + "▦" + model.getValue(xReptPath + "["+ i + "]/seqno" ) //08시퀀스번호
  424. + "▦" + model.getValue(xReptPath + "["+ i + "]/duty" ) //09todolist
  425. + "▦" + model.getValue(xReptPath + "["+ i + "]/filenm" ) //파일명
  426. + "▦" + model.getValue(xReptPath + "["+ i + "]/filesize" ) //파일크기
  427. + "▦" + model.getValue(xReptPath + "["+ i + "]/filetype" ) //파일형식
  428. + "▦" + model.getValue(xReptPath + "["+ i + "]/filepath" ) //ftp파일경로
  429. + "▩" ;
  430. }
  431. model.makeNode("/root/send/sReptPath");
  432. model.makeValue("/root/send/sReptPath",sReptPath );
  433. model.refresh();
  434. }
  435. submit("TXMNB01201");
  436. if(grdflg == "psnlist"){
  437. for(i= 1 ; i <= grd_psnlist.rows ; i++){
  438. grd_psnlist.cellStyle("background-image", + i , 1) = "../../../com/commonweb/images/icon_n.gif";
  439. }
  440. button66.dispatch("DOMActivate");
  441. }else if(grdflg == "wardlist"){
  442. for(i= 1 ; i <= grd_wardlist.rows ; i++){
  443. //grd_wardlist.cellStyle("background-image", + i , 1) = "../../../com/commonweb/images/icon_n.gif";
  444. }
  445. button2.dispatch("DOMActivate");
  446. }else if(grdflg == "edulist"){
  447. for(i= 1 ; i <= grd_edulist.rows ; i++){
  448. grd_edulist.cellStyle("background-image", + i , 1) = "../../../com/commonweb/images/icon_n.gif";
  449. }
  450. button3.dispatch("DOMActivate");
  451. }else if(grdflg == "etclist"){
  452. for(i= 1 ; i <= grd_etclist.rows ; i++){
  453. grd_etclist.cellStyle("background-image", + i , 1) = "../../../com/commonweb/images/icon_n.gif";
  454. }
  455. btn_etc.dispatch("DOMActivate");
  456. }else if(grdflg == "notilist"){
  457. for(i= 1 ; i <= grd_noti.rows ; i++){
  458. grd_noti.cellStyle("background-image", + i , 1) = "../../../com/commonweb/images/icon_n.gif";
  459. }
  460. btn_nightnoti.dispatch("DOMActivate");
  461. }
  462. cnt = 2;
  463. btn_srch2.dispatch("DOMActivate"); //MIS DB링크로 인해..조회가 바로되지않아서 2번태움.
  464. cnt = 0;
  465. btn_srch2.dispatch("DOMActivate");
  466. }
  467. /**
  468. * @group :
  469. * @ver : 2007.08.13
  470. * @by : 하재륜
  471. * @---------------------------------------------------
  472. * @type : function
  473. * @access : public
  474. * @desc : 화면 로드시
  475. * @param :
  476. * @return : 입력한날짜 + 날자
  477. * @---------------------------------------------------
  478. */
  479. function getAddDay(inputday,addend){
  480. var backDate ="";
  481. var rt = 0;
  482. var yyyy = inputday.substring(0,4) +"";
  483. var mm = inputday.substring(4,6) +"";
  484. var dd = inputday.substring(6,8) +"";
  485. var startDate = new Date(yyyy,(eval(mm)-1),dd);
  486. startDate.setTime(startDate.getTime()+(86400000*addend));
  487. NowYear = startDate.getYear();// 년
  488. NowMonth = startDate.getMonth()+1;// 월
  489. NowDay = startDate.getDate(); // 일
  490. backDate += NowYear ; //년도
  491. if (NowMonth < 10 ) backDate += "0" + NowMonth ;
  492. else backDate += (startDate.getMonth() + 1);
  493. if (NowDay < 10 ) backDate += "0" + NowDay ;
  494. else backDate += (startDate.getDate());
  495. return backDate ;
  496. }
  497. /**
  498. * @group :
  499. * @ver : 2007.08.13
  500. * @by : 하재륜
  501. * @---------------------------------------------------
  502. * @type : function
  503. * @access : public
  504. * @desc : 보고 조회
  505. * @param :
  506. * @return :
  507. * @---------------------------------------------------
  508. */
  509. function fSearch_reptlist(){
  510. var wardcd = dutplcecd; //세션에서 받아처리
  511. var jobrespcd = getUserInfo("jobrespcd");
  512. var jobkindcd = getUserInfo("jobkindcd");
  513. var jobposcd = getUserInfo("jobposcd");
  514. var fstdeptnm="";
  515. var deptnm ="";
  516. model.removenodeset("/root/main/inpt/reptdata/psnlist");
  517. model.removenodeset("/root/main/inpt/reptdata/wardlist");
  518. model.removenodeset("/root/main/inpt/reptdata/edulist");
  519. model.removenodeset("/root/main/inpt/reptdata/etclist");
  520. model.removenodeset("/root/send");
  521. model.setValue(opt_certnm.attribute("ref"), "");
  522. model.setValue(opt_certdt.attribute("ref"), "");
  523. opt_certnm.refresh();
  524. opt_certdt.refresh();
  525. if ( jobkindcd == "1140" && (jobposcd == "41" || jobposcd == "84" || jobposcd == "41-1" || jobposcd == "89" ||getUserInfo("userid") == "ENR" || dutplcecd == model.getValue("/root/code/codeinfo/codelist[cdgrupid='I11' and cdid='"+ dutplcecd +"']/cdid") || getUserInfo("userid") == model.getValue("/root/code/codeinfo/codelist[cdgrupid='I10' and cdid='"+getUserInfo("userid") +"']/cdid"))){//간호부와 간호행정교육팀도 전체 조회 --> 간호부장과 팀장만 전체로 보도록. 이원희 선생님경우 전부되도록.
  526. model.makeValue("/root/send/wardcd","%"); //병동코드
  527. model.makeValue("/root/send/authallyn","Y"); //전부서조회
  528. } else {
  529. model.makeValue("/root/send/wardcd",wardcd); //병동코드
  530. model.makeValue("/root/send/authallyn","N"); //전부서조회
  531. if(erdeptflag == "Y") {
  532. model.makeValue("/root/send/authallyn", "E");
  533. }
  534. }
  535. model.makeValue("/root/send/plandd",ipt_orddd2.value); //계획일자
  536. model.makeValue("/root/send/duty", "4"); //todo "4":All 20111018_KNUH_Start 무조건 All로 조회되도록 수정.
  537. model.makeValue("/root/send/deliveflagcd",reptflg); //전달구분
  538. model.makeValue("/root/send/deptflag", model.getValue(rdo_deptflag.attribute("ref")));
  539. if(cnt == 2) {
  540. submit("TRMNB01204", false);
  541. } else {
  542. submit("TRMNB01204");
  543. }
  544. if(grd_wardlist.rows > grd_wardlist.fixedRows) {
  545. fstdeptnm = grd_wardlist.valueMatrix(1, grd_wardlist.colRef("posdeptnm"));
  546. }
  547. for(var i = grd_wardlist.fixedRows; i < grd_wardlist.rows; i++){
  548. deptnm = grd_wardlist.valueMatrix(i, grd_wardlist.colRef("posdeptnm"));
  549. if(fstdeptnm != deptnm) {
  550. fstdeptnm = deptnm;
  551. grd_wardlist.rowStyle(i-1, "data", "border-bottom-color") = "#ff0000";
  552. grd_wardlist.rowStyle(i-1, "data", "border-top-width") = "3";
  553. } else {
  554. grd_wardlist.rowStyle(i-1, "data", "border-bottom-color") = "#b0b0b0";
  555. grd_wardlist.rowStyle(i-1, "data", "border-top-width") = "3";
  556. }
  557. }
  558. opt_certnm.refresh();
  559. opt_certdt.refresh();
  560. }
  561. /**
  562. * @group :
  563. * @ver : 2007.08.21
  564. * @by : 하재륜
  565. * @---------------------------------------------------
  566. * @type : function
  567. * @access : public
  568. * @desc : 공지사항 저장
  569. * @param :
  570. * @return :
  571. * @---------------------------------------------------
  572. */
  573. function fSave_board(){
  574. if(messageBox("","Q002") != 6) return;
  575. var wardcd = "9999999999"; // 병동코드 모든부서가 보이게 임의로 부여.
  576. var plandd = ipt_orddd2.value; //업무일자->보고일자수정
  577. var plandt = ipt_orddd.value+"0000"; //계획시간 하루에 1개이기때문에 임의로 부여.
  578. var deliveflagcd = "00";
  579. var staiud;
  580. if(model.getValue("/root/main/inpt/board/boarddetl/staiud")=="update"){
  581. staiud = "update";
  582. }else{
  583. staiud = "insert";
  584. }
  585. model.removenode("/root/send");
  586. model.makeNode("/root/send");
  587. model.makeValue("/root/send/wardcd" , wardcd );
  588. model.makeValue("/root/send/plandd" , plandd );
  589. model.makeValue("/root/send/plandt" , plandt );
  590. model.makeValue("/root/send/deliveflagcd" , deliveflagcd );
  591. model.makeValue("/root/send/delivecnts" ,model.getValue("/root/main/inpt/board/boarddetl/delivecnts") );
  592. model.makeValue("/root/send/staiud" ,staiud );
  593. model.makeValue("/root/send/seqno" ,model.getValue("/root/main/inpt/board/boarddetl/seqno") );
  594. submit("TXMNB01202");
  595. fSearch_board();
  596. }
  597. /**
  598. * @group :
  599. * @ver : 2007.08.13
  600. * @by : 하재륜
  601. * @---------------------------------------------------
  602. * @type : function
  603. * @access : public
  604. * @desc : 공지사항 조회
  605. * @param :
  606. * @return :
  607. * @---------------------------------------------------
  608. */
  609. function fSearch_board(){
  610. var wardcd = "9999999999"; //임의로 지정.
  611. // model.makeValue("/root/main/inpt/board/boarddetl/delivecnts","");
  612. // model.makeValue("/root/main/inpt/board/boarddetl/staiud","");
  613. //model.refresh();
  614. model.resetInstanceNode("/root/main/inpt/board/boarddetl");
  615. model.removenodeset("/root/send");
  616. model.makeValue("/root/send/wardcd",wardcd); //병동코드
  617. model.makeValue("/root/send/plandd",ipt_orddd2.value); //업무일자->보고일자로수정
  618. submit("TRMNB01205");
  619. if ( isNull(model.getValue("/root/main/inpt/board/boarddetl/delivecnts")) ){
  620. model.makeValue("/root/main/inpt/board/boarddetl/delivecnts","");
  621. model.makeValue("/root/main/inpt/board/boarddetl/staiud","");
  622. model.makeValue("/root/main/inpt/board/boarddetl/seqno","");
  623. }
  624. /*
  625. if(model.getValue("/root/main/inpt/board/boarddetl/staiud")!= "update") {
  626. model.copyNode("/root/main/inpt/board","/root/temp/board");
  627. }
  628. //model.refresh();
  629. */
  630. }
  631. function fSearch_DataList(){
  632. //병동별 과별
  633. model.removenodeset("/root/main/inpt/dept/deptlist");
  634. model.removenodeset("/root/main/inpt/inptlist");
  635. //특수파트
  636. model.removenodeset("/root/main/inpt/specnurs/oprsinfo"); // 수술 (정규,응급,통원,전체)
  637. model.removenodeset("/root/main/inpt/specnurs/oprsdetl"); // 수술 (종류,구분,건수)
  638. model.removenodeset("/root/main/inpt/specnurs/ernurs"); // 응급
  639. model.removenodeset("/root/main/inpt/specnurs/partrtn"); // 분만
  640. model.removenodeset("/root/main/inpt/specnurs/nbabycare"); // 신생아
  641. model.removenodeset("/root/main/inpt/specnurs/hdroom"); // HD
  642. model.removenodeset("/root/main/inpt/specnurs/apuroom"); // APU
  643. model.removenodeset("/root/main/inpt/specnurs/injction"); // 주사
  644. //보고
  645. var wardcd = dutplcecd; //세션에서 받아처리
  646. model.removenodeset("/root/main/inpt/reptdata/psnlist");
  647. model.removenodeset("/root/main/inpt/reptdata/wardlist");
  648. model.removenodeset("/root/main/inpt/reptdata/edulist");
  649. model.removenodeset("/root/main/inpt/reptdata/etclist");
  650. //공지사항
  651. model.removenodeset("/root/main/inpt/board/boarddetl");
  652. model.removenodeset("/root/send");
  653. model.makeValue("/root/send/orddd",ipt_orddd.value); //보고일자
  654. model.makeValue("/root/send/plandd",ipt_orddd.value); //업무일자
  655. model.makeValue("/root/send/deptflg",deptflg); //특수간호
  656. model.makeValue("/root/send/wardcd",wardcd); //병동코드
  657. model.makeValue("/root/send/deliveflagcd",reptflg); //전달구분
  658. submit("TRMNB01207");
  659. model.refresh();
  660. var inpttitle = "부서^병상^재원^입원^전입^입실^퇴원^전출^퇴실^사망^수술^가동율^전일\n퇴원예고율^평균\n재원일수^실재원^당일\n입퇴원";
  661. var deptengabbr = "";
  662. for(var i = 1 ; i <= grd_deptlist.rows-1 ; i++){
  663. grd_inptlist.colhidden(GRD_INPTLIST_FIXCOL+i) = false;
  664. deptengabbr = model.getValue("/root/main/inpt/dept/deptlist[" + i + "]/deptengabbr");
  665. inpttitle = inpttitle +"^"+ deptengabbr;
  666. }
  667. grd_inptlist.caption = inpttitle;
  668. if(model.getValue("/root/main/inpt/board/boarddetl/staiud")!= "update") {
  669. model.copyNode("/root/main/inpt/board","/root/temp/board");
  670. }
  671. model.refresh();
  672. }
  673. function fSearch_InptDataList(){
  674. // fSearch_inptlist();
  675. fCaseChange();
  676. fSearch_board();
  677. model.refresh();
  678. var inpttitle = "부서^병상^재원^입원^전입^입실^퇴원^전출^퇴실^사망^수술^가동율^전일\n퇴원예고율^평균\n재원일수^실재원^당일\n입퇴원";
  679. var deptengabbr = "";
  680. for(var i = 1 ; i <= grd_deptlist.rows-1 ; i++){
  681. grd_inptlist.colhidden(GRD_INPTLIST_FIXCOL+i) = false;
  682. deptengabbr = model.getValue("/root/main/inpt/dept/deptlist[" + i + "]/deptengabbr");
  683. inpttitle = inpttitle +"^"+ deptengabbr;
  684. }
  685. grd_inptlist.caption = inpttitle;
  686. // if(model.getValue("/root/main/inpt/board/boarddetl/staiud")!= "update") {
  687. // model.copyNode("/root/main/inpt/board","/root/temp/board");
  688. // }
  689. // "계"항목 수술건수 포함
  690. var optotal = 0;
  691. for(var i=1; i<=grd_inptlist.rows-1; i++){
  692. optotal += Number(model.getValue("/root/main/inpt/inptlist["+i+"]/opcnfmdd"));
  693. }
  694. model.makeValue("/root/main/inpt/inptlist["+(grd_inptlist.rows-1)+"]/opcnfmdd", optotal);
  695. model.refresh();
  696. }
  697. /**
  698. * @group :
  699. * @ver :
  700. * @by : 김기용
  701. * @---------------------------------------------------
  702. * @type : function
  703. * @access : public
  704. * @desc : 그리드 별 엑셀저장
  705. * @param :
  706. * @return :
  707. * @---------------------------------------------------
  708. */
  709. function saveExcelAll(){
  710. var paramLen = saveExcelAll.arguments.length;
  711. // 마지막 인자가 Boolean일 경우 처리
  712. var extendsCaptionBool;
  713. if( typeof(saveExcelAll.arguments[paramLen - 1]) == "boolean" ) {
  714. extendsCaptionBool = saveExcelAll.arguments[paramLen - 1];
  715. paramLen = paramLen - 1;
  716. }
  717. else{
  718. extendsCaptionBool = false;
  719. }
  720. var tmpParamArray = new Array();
  721. if( extendsCaptionBool ) {
  722. for( var i = 0; i < paramLen; i++ ) {
  723. tmpParamArray[i] = saveExcelAll.arguments[i];
  724. }
  725. saveExcelAllWithCaption(tmpParamArray);
  726. }
  727. else{
  728. for( var i = 0; i < paramLen; i++ ) {
  729. tmpParamArray[i] = saveExcelAll.arguments[i];
  730. }
  731. saveExcelAllWithNotCaption(tmpParamArray);
  732. }
  733. }
  734. function saveExcelAllWithCaption( sheetArray ) {
  735. // alert(gridCaptionArray);
  736. var fileName = window.fileDialog("save", ",", false, "excel", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  737. if( fileName == "" )
  738. return;
  739. // var sheetArray = new Array("grd_bizprescondstats|업무현황", "grd_patprescondstats|환자현황", "grd_hdstatsinfo|혈액투석현황", "grd_pdstatsinfo|복막투석현황", "grd_pdbizstatsinfo|복막투석업무현황");
  740. var sheetArrayLen = sheetArray.length;
  741. var gridId;
  742. var gridObj;
  743. for( var i = 0; i < sheetArray.length; i++ ) {
  744. gridId = sheetArray[i].split("|")[0];
  745. gridObj = document.all.item(gridId);
  746. // saveText() 함수는 Caption저장이 불가능 하여 SaveExcel()을 이용한다.
  747. gridObj.saveExcel("C:\\Temp\\tmp_TFExcel_" + i +".xls");
  748. }
  749. // excel application 실행함
  750. tfexcel.launchnewinstance(0);
  751. //실행된 excel application에서 새로운 workbook을 생성
  752. tfexcel.createworkbook();
  753. tfexcel.activatesheet(1);
  754. var sheetName;
  755. var nResult;
  756. for( var i = 0; i < sheetArrayLen; i++ )
  757. {
  758. sheetName = sheetArray[i].split("|")[1];
  759. if( i > 1 ) {
  760. nResult = tfexcel.activatesheet(i+1);
  761. tfexcel.sheetname(i+1) = sheetName;
  762. }
  763. else {
  764. nResult = tfexcel.addsheet(i+1, sheetName);
  765. }
  766. if( nResult < 0 ) {
  767. messageBox(sheetName + " 저장을", "E009");
  768. // alert(sheetName + " 오류발생");
  769. return;
  770. }
  771. tfexcel.loadCSV("C:\\Temp\\tmp_TFExcel_" + i + ".xls");
  772. }
  773. //tfexcel.loadCSV("C:\\Temp\\tmp_TFExcel.xls");
  774. //workbook을 저장.
  775. tfexcel.save(fileName);
  776. //excel application을 종료. excel application 생성 후 반드시 close해야함.
  777. tfexcel.close();
  778. var fso = new ActiveXObject("Scripting.FileSystemObject");
  779. for( var i = 0; i < sheetArrayLen; i++ ) {
  780. fso.DeleteFile("C:\\Temp\\tmp_TFExcel_" + i + ".xls");
  781. }
  782. var rmsg = messageBox("저장된 Excel을", "Q004");
  783. // var rmsg = window.alert("저장된 Excel을 실행하시겠습니까?", "알림", 36);
  784. if( rmsg == 6 )
  785. window.exec("excel.exe", '\"' + fileName + '\"');
  786. }
  787. // 지표관리 조회
  788. function fSearch_idctlist(){
  789. var dept = ""
  790. model.removenodeset("/root/send/reqdata");
  791. model.removenodeset("/root/main/idct");
  792. if ( isNull(model.getValue("/root/temp/recdd")) ){
  793. messageBox("작성일자","I003");//필수입력입니다
  794. return;
  795. }
  796. if(model.getValue("/root/temp/deptcd") == ""){
  797. dept = dutplcecd;
  798. }else{
  799. dept = model.getValue("/root/temp/deptcd");
  800. }
  801. model.makeValue("/root/send/reqdata/deptcd", dept );
  802. model.makeValue("/root/send/reqdata/recdd", model.getValue("/root/temp/recdd") );
  803. submit("TRMNB01211");
  804. }
  805. // 지표관리 저장
  806. function fSave_Idctrows(grdflg){
  807. if(messageBox("","Q002") != 6) return;
  808. var xIdctPath;
  809. var idctgrd;
  810. var updtdata = "Y";
  811. var duty = "";
  812. var recdt = getCurrentDate()+getCurrentTime().substring(0,4);
  813. var dept = "";
  814. if(grdflg == "idctdlist"){
  815. xIdctPath = "/root/main/idct/idctdlist";
  816. idctgrd = grd_idctdlist;
  817. duty = 1;
  818. }else if(grdflg == "idctelist"){
  819. xIdctPath = "/root/main/idct/idctelist";
  820. idctgrd = grd_idctelist;
  821. duty = 2;
  822. }else if(grdflg == "idctnlist"){
  823. xIdctPath = "/root/main/idct/idctnlist";
  824. idctgrd = grd_idctnlist;
  825. duty = 3;
  826. }
  827. if(model.getValue("/root/temp/deptcd") == ""){
  828. dept = dutplcecd;
  829. }else{
  830. dept = model.getValue("/root/temp/deptcd");
  831. }
  832. model.removeNodeset("/root/send/savedata");
  833. model.makeNode("/root/send/savedata");
  834. for (i = idctgrd.fixedRows - 1 ; i < idctgrd.rows - 1; i++) {
  835. model.setValue(xIdctPath + "[" + i + "]/deptcd",dept);
  836. model.setValue(xIdctPath + "[" + i + "]/duty", duty);
  837. model.setValue(xIdctPath + "[" + i + "]/recdd", model.getValue("/root/temp/recdd"));
  838. model.setValue(xIdctPath + "[" + i + "]/recdt", recdt);
  839. }
  840. if(grdflg == "idctdlist"){
  841. updtdata = getGridUpdateData(idctgrd);
  842. }else if(grdflg == "idctelist"){
  843. updtdata = getGridUpdateData(idctgrd);
  844. }else if(grdflg == "idctnlist"){
  845. updtdata = getGridUpdateData(idctgrd);
  846. }
  847. model.makeValue("/root/send/savedata/idctinfo", updtdata);
  848. submit("TXMNB01211");
  849. btn_idct.dispatch("DOMActivate");
  850. }
  851. // 지표관리 삭제
  852. function fDel_Idctrows(grdflg){
  853. var idctchk;
  854. var idctgrd;
  855. var xIdctPath;
  856. if(grdflg == "idctdlist"){
  857. idctchk = grd_idctdlist.row - 1;
  858. idctgrd = grd_idctdlist;
  859. xIdctPath = "/root/main/idct/idctdlist";
  860. }else if(grdflg == "idctelist"){
  861. idctchk = grd_idctelist.row - 1;
  862. idctgrd = grd_idctelist;
  863. xIdctPath = "/root/main/idct/idctelist";
  864. }else if(grdflg == "idctnlist"){
  865. idctchk = grd_idctnlist.row - 1;
  866. idctgrd = grd_idctnlist;
  867. xIdctPath = "/root/main/idct/idctnlist";
  868. }
  869. if(grdflg == "idctdlist"){
  870. if ( model.getValue(xIdctPath + "[" + idctchk + "]/seqno") != "") {
  871. idctgrd.addStatus(grd_idctdlist.row, "delete");
  872. }else{
  873. messageBox("삭제 할 자료가 ","I004");
  874. return;
  875. }
  876. }else if(grdflg == "idctelist"){
  877. if ( model.getValue(xIdctPath + "[" + idctchk + "]/seqno") != "") {
  878. idctgrd.addStatus(grd_idctelist.row, "delete");
  879. }else{
  880. messageBox("삭제 할 자료가 ","I004");
  881. return;
  882. }
  883. }else if(grdflg == "idctnlist"){
  884. if ( model.getValue(xIdctPath + "[" + idctchk + "]/seqno") != "") {
  885. idctgrd.addStatus(grd_idctnlist.row, "delete");
  886. }else{
  887. messageBox("삭제 할 자료가 ","I004");
  888. return;
  889. }
  890. }
  891. model.refresh();
  892. }
  893. // 본원 NEW 24시간 업무보고 저장
  894. function fSave_Reptrows2(){
  895. if(messageBox("","Q002") != 6) return;
  896. var updtdata = getGridUpdateData(grd_wardlist) ;
  897. model.removenode("/root/send");
  898. model.makeNode("/root/send");
  899. model.makeValue("/root/send/sReptPath" , updtdata);
  900. if(updtdata == null || updtdata == ""){
  901. messageBox("저장할 자료가 존재하지 않습니다.","I");
  902. return;
  903. }
  904. submit("TXMNB01201");
  905. btn_srch2.dispatch("DOMActivate");
  906. }
  907. // 본원 NEW 일별 부서 현황 조회
  908. function fSearch_InptDataList2(){
  909. fCaseChange();
  910. //fSearch_board();
  911. model.refresh();
  912. var inpttitle = "부서^병상^재원^입원^전입^입실^퇴원^전출^퇴실^사망^수술^가동율^전일\n퇴원예고율^평균\n재원일수^실재원^당일\n입퇴원";
  913. var deptengabbr = "";
  914. for(var i = 1 ; i <= grd_deptlist.rows-1 ; i++){
  915. grd_inptlist.colhidden(GRD_INPTLIST_FIXCOL+i) = false;
  916. deptengabbr = model.getValue("/root/main/inpt/dept/deptlist[" + i + "]/deptengabbr");
  917. inpttitle = inpttitle +"^"+ deptengabbr;
  918. }
  919. grd_inptlist.caption = inpttitle;
  920. // "계"항목 수술건수 포함
  921. var optotal = 0;
  922. for(var i=1; i<=grd_inptlist.rows-1; i++){
  923. optotal += Number(model.getValue("/root/main/inpt/inptlist["+i+"]/opcnfmdd"));
  924. }
  925. //model.makeValue("/root/main/inpt/inptlist["+(grd_inptlist.rows-1)+"]/opcnfmdd", optotal);
  926. model.refresh();
  927. }