SMMNW05600.js 39 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477
  1. /*
  2. (TRMNW05600_HSCT CBC.xrw - JScript )
  3. - Version :
  4. 1) : Ver.1.00.01
  5. */
  6. var xTopAttributePath = "/root/main/topattribute";
  7. var xRecgrupListPath = "/root/main/recgrup/recgruplist";
  8. var xHIsgrupListPath = "/root/main/histgrup/histgruplist";
  9. var xRecHIstPntListPath = "/root/main/rechistpntgrup/rechistpntlist";
  10. var xClsListPath = "/root/main/detlgrup/detlgruplist"
  11. var xHIsgrupListBKPath = "/root/temp/histgrup/histgruplist";
  12. var xlrgListPath = "/root/main/lrggrup/lrggruplist"
  13. var xCondPath = "/root/main/cond";
  14. var xClsListBKPath = "/root/temp/main/detlgrup/detlgruplist";
  15. var xPopWndClsListBKPath = "/root/temp/main/cond/execpopwnddetlgrup/execpopwnddetlgruplist";
  16. var xExecDetlListPath = "/root/main/cond/execdetlgrup/execdetlgruplist";
  17. var xPopWndExecDetlListPath = "/root/main/cond/execpopwnddetlgrup/execpopwnddetlgruplist";
  18. var xDelDeliveExecPrcpListPath = "/root/main/cond/delivedetlgrup/delivedetlgruplist";
  19. var xBlodReturnReqGrupListPath = "/root/main/cond/blodreturnreqgrup/blodreturnreqgruplist";
  20. var xBlodExecRecGrupListPath = "/root/main/cond/blodexecrecgrup/blodexecrecgruplist";
  21. /**
  22. * @group :
  23. * @ver : 2007.05.09
  24. * @by : 정찬성
  25. * @---------------------------------------------------
  26. * @type : function
  27. * @access : public
  28. * @desc : HSCT CBC 상세점수 display : true , false / 총점 HSCT CBC
  29. * @param :
  30. * @return :
  31. * @---------------------------------------------------
  32. */
  33. function fColLqidty(arg) {
  34. if( arg == "one" ) {
  35. var no2 = 1 ;
  36. for( var i = 0 ; i < 17 ; i++ ) {
  37. no2++ ;
  38. notitl++ ;
  39. datagrid3.colhidden(no2) = true;
  40. datagrid3.colwidth(no2) = 10;
  41. datagrid3.valuematrix(0,no2) = "" ;
  42. datagrid3.valuematrix(1,no2) = "" ;
  43. datagrid3.valuematrix(2,no2) = "" ;
  44. }
  45. var cNt = 1 ;
  46. if(cNt > 0 ){
  47. var no = 1 ;
  48. var notitl = 0 ;
  49. for( var i = 0 ; i < cNt ; i++ ) {
  50. no++ ;
  51. notitl++ ;
  52. datagrid3.colhidden(no) = false;
  53. datagrid3.colwidth(no) = 80;
  54. datagrid3.valuematrix(0,no) = combo2.value ;
  55. datagrid3.valuematrix(1,no) = model.getValue("/root/main/cond/patientgrup/patientgruplist["+ notitl +"]/patientnm") ;
  56. datagrid3.valuematrix(2,no) = "" ;
  57. }
  58. }
  59. } else {
  60. var no3 = 1 ;
  61. for( var i = 0 ; i < 17 ; i++ ) {
  62. no3++ ;
  63. notitl++ ;
  64. datagrid3.colhidden(no3) = true;
  65. datagrid3.colwidth(no3) = 10;
  66. datagrid3.valuematrix(0,no3) = "" ;
  67. datagrid3.valuematrix(1,no3) = "" ;
  68. datagrid3.valuematrix(2,no3) = "" ;
  69. }
  70. var cNt = combo8.length ;
  71. if(cNt > 0 ){
  72. var no = 1 ;
  73. var notitl = 0 ;
  74. for( var i = 0 ; i < cNt ; i++ ) {
  75. no++ ;
  76. notitl++ ;
  77. datagrid3.colhidden(no) = false;
  78. datagrid3.colwidth(no) = 80;
  79. datagrid3.valuematrix(0,no) = combo2.value ;
  80. datagrid3.valuematrix(1,no) = model.getValue("/root/main/cond/patientgrup/patientgruplist["+ notitl +"]/patientnm") ;
  81. datagrid3.valuematrix(2,no) = "" ;
  82. }
  83. }
  84. }
  85. datagrid3.refresh();
  86. }
  87. /**
  88. * @group :
  89. * @ver : 2007.05.09
  90. * @by : 정찬성
  91. * @---------------------------------------------------
  92. * @type : function
  93. * @access : public
  94. * @desc : HSCT CBC 상세점수 내역 / 한글명 / 체크 점수 목록
  95. * @param :
  96. * @return :
  97. * @---------------------------------------------------
  98. */
  99. function fRecHistPntList(){
  100. var iRow = datagrid2.row;
  101. model.removenode("/root/send");
  102. model.makeValue("/root/send/pid", model.getvalue(xRecgrupListPath+"["+iRow+"]/pid"));
  103. model.makeValue("/root/send/execdt", model.getvalue(xRecgrupListPath+"["+iRow+"]/execdt"));
  104. model.makeValue("/root/send/clsflag", model.getvalue(xRecgrupListPath+"["+iRow+"]/clsflag"));
  105. model.makeValue("/root/send/recflag", model.getvalue(xRecgrupListPath+"["+iRow+"]/recflag"));
  106. model.makeValue("/root/send/grupcd", model.getvalue(xRecgrupListPath+"["+iRow+"]/grupcd"));
  107. if(submit("TRMNW04007")){
  108. var iRowNum = datagrid1.row;
  109. }
  110. var iRow = grd_histgrup.row;
  111. var iCol = grd_histgrup.col;
  112. /* HSCT CBC 상세내역 구분 체크 시작 */
  113. var nodelist = bind1.nodeset;
  114. var cNt = nodelist.length;
  115. for(var ins = 1 ; ins <= cNt; ins++ ){// 체크된 값 전체를 돈다.
  116. for(var i = 1 ; i < grd_histgrup.rows; i++ ){// 전체를 돌면서 그룹에 값이 체크되어 있는것 초기화
  117. // alert("55 : " + model.getValue(xHIsgrupListPath+"["+ i +"]/supcd"));
  118. // alert("66 : " + model.getValue("/root/main/rechistpntgrup/serdiaghislist["+ ins +"]/supcd"));
  119. // alert("77 : " + model.getValue(xHIsgrupListPath+"["+ i +"]/refseq"));
  120. // alert("88 : " +model.getValue("/root/main/rechistpntgrup/serdiaghislist["+ ins +"]/refseq"));
  121. if(
  122. (model.getValue(xHIsgrupListPath+"["+ i +"]/supcd") == model.getValue("/root/main/rechistpntgrup/serdiaghislist["+ ins +"]/supcd")) &&
  123. (model.getValue(xHIsgrupListPath+"["+ i +"]/refseq") == model.getValue("/root/main/rechistpntgrup/serdiaghislist["+ ins +"]/refseq"))
  124. ) {
  125. grd_histgrup.textmatrix(i,1) = "Y";
  126. grd_histgrup.textmatrix(i,0) = "-";
  127. }
  128. }
  129. }
  130. /* HSCT CBC 상세내역 구분 체크 끝 */
  131. }
  132. /**
  133. * @group :
  134. * @ver : 2007.06.18
  135. * @by : 정찬성
  136. * @---------------------------------------------------
  137. * @type : function
  138. * @access : public
  139. * @desc : 환자 상세정보 조회 combo
  140. * @param :
  141. * @return :
  142. * @---------------------------------------------------
  143. */
  144. function fGetPatientInfo(){
  145. model.removenode("/root/send");
  146. model.makeValue("/root/send/wardcd", combo7.value);
  147. model.makeValue("/root/send/roomcd", combo2.value);
  148. if( input3.value != "" ){
  149. model.makeValue("/root/send/pid", input3.value);
  150. } else if( model.makeValue("/root/send/pid", combo8.value) != "" ){
  151. model.makeValue("/root/send/pid", combo8.value);
  152. }
  153. if(submit("TRMNW05605")){
  154. }
  155. // model.setfocus("button3");
  156. }
  157. /**
  158. * @group :
  159. * @ver : 2007.06.18
  160. * @by : 정찬성
  161. * @---------------------------------------------------
  162. * @type : function
  163. * @access : public
  164. * @desc : 환자 정보 조회 combo
  165. * @param :
  166. * @return :
  167. * @---------------------------------------------------
  168. */
  169. function fGetPatientList(){
  170. model.removenode("/root/send");
  171. model.makeValue("/root/send/wardcd", combo7.value);
  172. model.makeValue("/root/send/roomcd", combo2.value);
  173. if(submit("TRMNW05604")){
  174. }
  175. fColLqidty();
  176. // model.setfocus("combo8");
  177. }
  178. /**
  179. * @group :
  180. * @ver : 2007.06.18
  181. * @by : 정찬성
  182. * @---------------------------------------------------
  183. * @type : function
  184. * @access : public
  185. * @desc : 병실 조회 combo
  186. * @param :
  187. * @return :
  188. * @---------------------------------------------------
  189. */
  190. function fGetRoomList(){
  191. model.removenode("/root/send");
  192. model.makeValue("/root/send/wardcd", combo7.value);
  193. //alert(cmb_wardcd.value);
  194. if(submit("TRMNW05603")){
  195. }
  196. // model.setfocus("combo2");
  197. }
  198. /**
  199. * @group :
  200. * @ver : 2007.06.18
  201. * @by : 정찬성
  202. * @---------------------------------------------------
  203. * @type : function
  204. * @access : public
  205. * @desc : 병동 조회
  206. * @param :
  207. * @return :
  208. * @---------------------------------------------------
  209. */
  210. function fGetWardList(){
  211. model.removenode("/root/send");
  212. model.makeValue("/root/send/wardcd", model.getValue("/root/main/cond/wardcdgrup/wardcdgruplist/wardcd"));
  213. if(submit("TRMNW05602")){
  214. }
  215. // model.setfocus("combo7");
  216. }
  217. /**
  218. * @group :
  219. * @ver : 2007.05.09
  220. * @by : 정찬성
  221. * @---------------------------------------------------
  222. * @type : function
  223. * @access : public
  224. * @desc : HSCT CBC init
  225. * @param :
  226. * @return :
  227. * @---------------------------------------------------
  228. */
  229. function fInit(){
  230. fGetWardList();// 병동코드 리스트
  231. }
  232. /* 수혈간호 기록 참고 스크립트 시작 */
  233. /**
  234. * @group :
  235. * @ver : 2007.07.09
  236. * @by : 정찬성
  237. * @---------------------------------------------------
  238. * @type : function
  239. * @access : public
  240. * @desc : 미수행기록 목록에서 선택항목 체크(더블클릭)
  241. * @param :
  242. * @return :
  243. * @---------------------------------------------------
  244. */
  245. function fGridSel() {
  246. var sRowCnt2 = datagrid2.rows-datagrid2.fixedrows;
  247. var iRow = datagrid2.Row ;
  248. if( datagrid2.labelmatrix(iRow, 1) == "FALSE" || datagrid2.labelmatrix(iRow, 1) == "false" ){
  249. datagrid2.textmatrix(iRow, 1) = "true" ;
  250. } else if( datagrid2.labelmatrix(iRow, 1) == "true" ) {
  251. datagrid2.textmatrix(iRow, 1) = "FALSE" ;
  252. }
  253. }
  254. /**
  255. * @group :
  256. * @ver : 2007.07.09
  257. * @by : 정찬성
  258. * @---------------------------------------------------
  259. * @type : function
  260. * @access : public
  261. * @desc : 수행기록 내역 상세정보 (더블클릭)
  262. * @param :
  263. * @return :
  264. * @---------------------------------------------------
  265. */
  266. function fBlodExecRecDetlinfo() {
  267. var sRowCnt = datagrid3.rows-datagrid3.fixedrows;
  268. var iRow = datagrid3.row ;
  269. model.setValue(output5.attribute("ref"), model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/blodno"));
  270. model.setValue(output6.attribute("ref"), model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/prcpnm"));
  271. model.setValue(output7.attribute("ref"), model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/abo") + model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/rh") );
  272. model.setValue(input4.attribute("ref"), model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/tnsstrddtm").substring(0,8));
  273. model.setValue(input5.attribute("ref"), model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/tnsstrddtm").substring(8,14));
  274. model.setValue(input6.attribute("ref"), model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/tnsendddtm").substring(0,8));
  275. model.setValue(input7.attribute("ref"), model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/tnsendddtm").substring(8,14));
  276. model.setValue(output10.attribute("ref"), model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/tnsstrnursedeptnm"));
  277. model.setValue(output11.attribute("ref"), model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/tnsstrnursenm"));
  278. model.setValue(output8.attribute("ref"), model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/tnsendnursedeptnm"));
  279. model.setValue(output9.attribute("ref"), model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/tnsendnursenm"));
  280. model.setValue(combo3.attribute("ref"), model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/tnssideeffect"));
  281. model.setValue(input1.attribute("ref"), model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/caution"));
  282. model.setValue(radio1.attribute("ref"), model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/discontinuyn"));
  283. model.setValue(combo4.attribute("ref"), model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/discontinu"));
  284. model.setValue(input8.attribute("ref"), model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/drugqty"));
  285. model.setValue(textarea1.attribute("ref"), model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/tnsrec"));
  286. /*
  287. model.makeValue("/root/send/tnsstrnurseid", sp[0] );
  288. model.makeValue("/root/send/tnsstrnursenm", sp[1] );
  289. model.makeValue("/root/send/tnsstrnursedeptcd", sp[5] );
  290. model.makeValue("/root/send/tnsstrnursedeptnm", sp[4] );
  291. */
  292. model.setValue(output12.attribute("ref"),
  293. model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/tnsstrnurseid")+","+
  294. model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/tnsstrnursenm")+","+","+","+
  295. model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/tnsstrnursedeptnm")+","+
  296. model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/tnsstrnursedeptcd")
  297. );
  298. // alert(output12.value);
  299. model.setValue(output13.attribute("ref"),
  300. model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/tnsendnurseid")+","+
  301. model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/tnsendnursenm")+","+","+","+
  302. model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/tnsendnursedeptnm")+","+
  303. model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/tnsendnursedeptcd")
  304. );
  305. // alert(output13.value);
  306. // model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/tnsendnurseid")+","+
  307. // model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/tnsendnursenm")+","+
  308. // model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/tnsendnursedeptcd")+","+
  309. // model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/tnsendnursenm")
  310. model.refresh();
  311. var sRowCnt2 = datagrid2.rows-datagrid2.fixedrows;
  312. for(var i=1; i<= sRowCnt2; i++){ // 선택한 값이 불출신청 상태인지 체크
  313. datagrid2.textmatrix(i, 1) = "FALSE" ;
  314. }
  315. }
  316. /**
  317. * @group :
  318. * @ver : 2007.07.16
  319. * @by : 정찬성
  320. * @---------------------------------------------------
  321. * @type : function
  322. * @access : public
  323. * @desc : 수혈 수행 내역 리스트
  324. * @param :
  325. * @return :
  326. * @---------------------------------------------------
  327. */
  328. function fGetBlodExecRecList(blodpidflag){
  329. var sRowCnt = datagrid5.rows-datagrid5.fixedrows;
  330. if( model.getValue("/root/main/cond/patientgrupInfo/patientgruplistInfo/pid") == "" && model.getValue("/root/main/cond/blodno") == "" ){
  331. messageBox("혈액번호/등록번호를 ","C001");
  332. model.setfocus("input13");
  333. return;
  334. }
  335. model.refresh();
  336. model.makeValue("/root/send/blodpidflag",blodpidflag);
  337. model.makeValue("/root/send/blodno", input13.value );
  338. model.makeValue("/root/send/prcpddfrom", input9.value );
  339. model.makeValue("/root/send/prcpddto", input10.value );
  340. model.makeValue("/root/send/wardcd", combo5.value );
  341. model.makeValue("/root/send/roomcd", combo1.value );
  342. model.makeValue("/root/send/hngnm", combo6.value );
  343. model.makeValue("/root/send/pid", input12.value );
  344. if(submit("TRMNW05624")){
  345. }
  346. }
  347. /**
  348. * @group :
  349. * @ver : 2007.05.09
  350. * @by : 정찬성
  351. * @---------------------------------------------------
  352. * @type : function
  353. * @access : public
  354. * @desc : 수혈간호기록 기록저장 버튼
  355. * @param :
  356. * @return :
  357. * @---------------------------------------------------
  358. */
  359. function fTnsRecSave(){
  360. if(model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/blodno") == ""){
  361. messageBox("혈액번호를 ","C002");
  362. return;
  363. }
  364. if(model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/prcpnm") == ""){
  365. messageBox("혈액명을 ","C002");
  366. return;
  367. }
  368. if(model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/abo") == ""){
  369. messageBox("혈액형을 ","C002");
  370. return;
  371. }
  372. if(model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/tnsstrdd") == "" || model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/tnsstrtm") == "" ) {
  373. messageBox("수혈시작시간을 ","C001");
  374. return;
  375. }
  376. if(model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/tnsenddd") == "" || model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/tnsendtm") == "" ) {
  377. messageBox("수혈종료시간을 ","C001");
  378. return;
  379. }
  380. if(model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/tnsstrnursdeptnm") == "" || model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/tnsstrnursnm") == "" || model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/tnsstrnursall") == "") {
  381. messageBox("수혈시작 간호사를 ","C002");
  382. return;
  383. }
  384. if(model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/tnsendnursdeptnm") == "" || model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/tnsendnursnm") == "" || model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/tnsendnursall") == "") {
  385. messageBox("수혈종료 간호사를 ","C002");
  386. return;
  387. }
  388. if(model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/tnsrec") == "" ) {
  389. messageBox("수혈기록을 ","C001");
  390. return;
  391. }
  392. model.removenode("/root/send");
  393. model.makeValue("/root/send/pid",model.getValue("/root/main/cond/patientgrupInfo/patientgruplistInfo/pid") ) ;
  394. model.makeValue("/root/send/blodno",model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/blodno") ) ;
  395. model.makeValue("/root/send/tnsstrddtm",model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/tnsstrdd") + model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/tnsstrtm") );
  396. model.makeValue("/root/send/tnsendddtm",model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/tnsenddd") + model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/tnsendtm") );
  397. model.makeValue("/root/send/tnsstrnursall",model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/tnsstrnursall") );
  398. model.makeValue("/root/send/tnsendnursall",model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/tnsendnursall") );
  399. model.makeValue("/root/send/sideeffectcomcodelist",model.getValue("/root/main/cond/tnsnursereccdgrup/sideeffectcomcodelist") );
  400. model.makeValue("/root/send/caution",model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/caution") );
  401. model.makeValue("/root/send/discontinuyn",model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/discontinuyn") );
  402. model.makeValue("/root/send/discontinucomcodelist",model.getValue("/root/main/cond/tnsnursereccdgrup/discontinucomcodelist") );
  403. model.makeValue("/root/send/drugqty",model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/drugqty") );
  404. model.makeValue("/root/send/tnsrec",model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/tnsrec") );
  405. var sp = model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/tnsstrnursall").split(",");
  406. //alert(sp);
  407. model.makeValue("/root/send/tnsstrnurseid", sp[0] );
  408. model.makeValue("/root/send/tnsstrnursenm", sp[1] );
  409. model.makeValue("/root/send/tnsstrnursedeptcd", sp[5] );
  410. model.makeValue("/root/send/tnsstrnursedeptnm", sp[4] );
  411. var sp2 = model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/tnsendnursall").split(",");
  412. //alert(sp2);
  413. model.makeValue("/root/send/tnsendnurseid", sp2[0] );
  414. model.makeValue("/root/send/tnsendnursenm", sp2[1] );
  415. model.makeValue("/root/send/tnsendnursedeptcd", sp2[5] );
  416. model.makeValue("/root/send/tnsendnursedeptnm", sp2[4] );
  417. /* 저장 / 업데이트 구분 체크 시작 */
  418. var check = "" ;
  419. var sRowCnt = datagrid3.rows-datagrid3.fixedrows;
  420. for(var i=1; i<= sRowCnt; i++){ // 선택한 값이 불출신청 상태인지 체크
  421. // alert(datagrid3.labelmatrix(i, 3));
  422. //
  423. // alert(output5.value);
  424. if( datagrid3.labelmatrix(i, 3) == output5.value ) {
  425. check = "Y" ;
  426. }
  427. }
  428. /* 저장 / 업데이트 구분 체크 끝 */
  429. if( check != "Y" ){// 신규 저장
  430. //alert("신규 저장");
  431. model.makeValue("/root/send/detlgrup",datagrid2.getupdatedataAll("i"));
  432. if(messageBox("","Q002") != 6) return;// 저장하시겠습니까?
  433. if(submit("TXMNR01031")){
  434. model.copyNode("/root/hidden/main","/root/main");
  435. var pidblodflag = '';
  436. if(input12.value != ""){
  437. pidblodflag = 'pid';
  438. } else if (input13.value !="") {
  439. pidblodflag = 'blod';
  440. }
  441. fBlodDeliveList(pidblodflag);// 혈액불출내역 리스트
  442. fGetBlodNoExecRecList(pidblodflag); //수혈 미수행 내역 리스트
  443. fGetBlodExecRecList(pidblodflag); //수혈 수행 내역 리스트
  444. }
  445. } else if( check == "Y") {// 업데이트
  446. //alert("업데이트");
  447. if(messageBox("","Q002") != 6) return;// 저장하시겠습니까?
  448. model.makeValue("/root/send/detlgrup",datagrid3.getupdatedataAll("i"));
  449. if(submit("TXMNR01032")){
  450. model.copyNode("/root/hidden/main","/root/main");
  451. var pidblodflag = '';
  452. if(input12.value != ""){
  453. pidblodflag = 'pid';
  454. } else if (input13.value !="") {
  455. pidblodflag = 'blod';
  456. }
  457. fBlodDeliveList(pidblodflag);// 혈액불출내역 리스트
  458. fGetBlodNoExecRecList(pidblodflag); //수혈 미수행 내역 리스트
  459. fGetBlodExecRecList(pidblodflag); //수혈 수행 내역 리스트
  460. }
  461. }
  462. }
  463. /**
  464. * @group :
  465. * @ver : 2007.05.09
  466. * @by : 정찬성
  467. * @---------------------------------------------------
  468. * @type : function
  469. * @access : public
  470. * @desc : 미수행기록목록에서 선택한 혈액정보 기록버튼
  471. * @param :
  472. * @return :
  473. * @---------------------------------------------------
  474. */
  475. function fExecRec(){
  476. var sRowCnt = datagrid2.rows-datagrid2.fixedrows;
  477. var cnt = 0 ;
  478. model.removenode("/root/send");
  479. model.makeValue("/root/send/detlgrup",datagrid2.getupdatedataAll("i"));
  480. var blodno = "" ;
  481. var prcpnm = "" ;
  482. var aborh = "" ;
  483. for(var i=1; i<= sRowCnt; i++){
  484. // alert(datagrid2.labelmatrix(i, 1));
  485. if( datagrid2.labelmatrix(i, 1) == "true" ) {
  486. blodno += datagrid2.labelmatrix(i, 2) + "," ;
  487. prcpnm += datagrid2.labelmatrix(i, 3) + "," ;
  488. aborh += datagrid2.labelmatrix(i, 4)+datagrid2.labelmatrix(i, 5) + "," ;
  489. cnt = cnt + 1;
  490. }
  491. }
  492. // alert(blodno.substr(0,blodno.length-1));
  493. if(cnt < 1){
  494. messageBox("선택 정보가 ","I004");
  495. return;
  496. };
  497. fClearChildNode("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist");
  498. fClearChildNode("/root/main/cond/tnsnursereccdgrup/sideeffectcomcodelist");
  499. fClearChildNode("/root/main/cond/tnsnursereccdgrup/discontinucomcodelist");
  500. model.refresh();
  501. model.setValue(output5.attribute("ref"), blodno.substr(0,blodno.length-1) );
  502. model.setValue(output6.attribute("ref"), prcpnm.substr(0,prcpnm.length-1) );
  503. model.setValue(output7.attribute("ref"), aborh.substr(0,aborh.length-1) );
  504. model.setValue(radio1.attribute("ref"), "N" );
  505. model.setValue(input4.attribute("ref"), getCurrentDate() );
  506. model.setValue(input5.attribute("ref"), getCurrentTime() );
  507. if(submit("TRMNW05623")){
  508. model.copyNode("/root/hidden/main","/root/main");
  509. }
  510. }
  511. /**
  512. * @group :
  513. * @ver : 2007.07.09
  514. * @by : 정찬성
  515. * @---------------------------------------------------
  516. * @type : function
  517. * @access : public
  518. * @desc : 혈액요청서 선택했을때...
  519. * @param :
  520. * @return :
  521. * @---------------------------------------------------
  522. */
  523. function fBlodReqDoc(){
  524. var sRowCnt = datagrid7.rows-datagrid7.fixedrows;
  525. var cnt = 0 ;
  526. model.removeNode ("/root/send/report");
  527. for(var i=1; i<= sRowCnt; i++){ // 선택한 값이 불출신청 상태인지 체크
  528. // alert(datagrid7.labelmatrix(i, 1));
  529. if( datagrid7.labelmatrix(i, 1) == "true" ) {
  530. cnt = cnt + 1;
  531. if( datagrid7.labelmatrix(i, 2) != "매칭검사" ) {
  532. messageBox("매칭검사 상태 이외에는 혈액요청서를 출력 ","E001");
  533. return;
  534. }
  535. if( datagrid7.labelmatrix(i, 8).length < 5 ) {
  536. messageBox("혈액번호가 ","I004");
  537. return;
  538. }
  539. model.makeValue("/root/send/report/delivedetlgrup/delivedetlgruplist["+cnt+"]","");
  540. model.copyNode( "/root/send/report/delivedetlgrup/delivedetlgruplist["+cnt+"]", "/root/main/cond/delivedetlgrup/delivedetlgruplist["+i+"]" );
  541. // alert(instance1.selectSingleNode("/root/send/report/delivedetlgrup/delivedetlgruplist"+"["+cnt+"]").xml);
  542. }
  543. }
  544. if(cnt < 1){
  545. messageBox("선택 정보가 ","I004");
  546. return;
  547. };
  548. model.makeValue("/root/send/report/patientnm",model.getValue("/root/main/cond/patientgrupInfo/patientgruplistInfo/patientnm") );
  549. model.makeValue("/root/send/report/pid",model.getValue("/root/main/cond/patientgrupInfo/patientgruplistInfo/pid") );
  550. model.makeValue("/root/send/report/sexage",model.getValue("/root/main/cond/patientgrupInfo/patientgruplistInfo/sexage") );
  551. model.makeValue("/root/send/report/btypee",model.getValue("/root/main/cond/patientgrupInfo/patientgruplistInfo/btype") );
  552. exeReportPreview("RFMNR01000", "XMLSTR");
  553. }
  554. /**
  555. * @group :
  556. * @ver : 2007.07.09
  557. * @by : 정찬성
  558. * @---------------------------------------------------
  559. * @type : function
  560. * @access : public
  561. * @desc : 혈액불출 내역 선택 삭제
  562. * @param :
  563. * @return :
  564. * @---------------------------------------------------
  565. */
  566. function fDelDeliveExecPrcp(){
  567. var sRowCnt = datagrid7.rows-datagrid7.fixedrows;
  568. var cnt = 0 ;
  569. for(var i=1; i<= sRowCnt; i++){ // 선택한 값이 불출신청 상태인지 체크
  570. // alert(datagrid7.labelmatrix(i, 1));
  571. if( datagrid7.labelmatrix(i, 1) == "true" ) {
  572. cnt = cnt + 1;
  573. if( datagrid7.labelmatrix(i, 2) != "불출신청" ) {
  574. messageBox("불출신청 이외의 상태에서는 삭제할 수 ","I004");
  575. return;
  576. }
  577. }
  578. }
  579. if(cnt < 1){
  580. messageBox("선택 정보가 ","I004");
  581. return;
  582. };
  583. alert("개발 중입니다.");
  584. return ;
  585. // model.removenode("/root/send");
  586. model.refresh();
  587. model.makeValue("/root/send/blodpidflag",blodpidflag);
  588. model.makeValue("/root/send/blodno", input13.value );
  589. model.makeValue("/root/send/prcpddfrom", input9.value );
  590. model.makeValue("/root/send/prcpddto", input10.value );
  591. model.makeValue("/root/send/wardcd", combo5.value );
  592. model.makeValue("/root/send/roomcd", combo1.value );
  593. model.makeValue("/root/send/hngnm", combo6.value );
  594. model.makeValue("/root/send/pid", input12.value );
  595. if(submit("TRMNW05621")){
  596. }
  597. //model.setfocus("input13");
  598. fGetExecDetlList();// 수행처방내역리스트
  599. fGettDeliveDetlList();// 불출신청 내역 리스트
  600. }
  601. /**
  602. * @group :
  603. * @ver : 2007.07.16
  604. * @by : 정찬성
  605. * @---------------------------------------------------
  606. * @type : function
  607. * @access : public
  608. * @desc : 수혈 미수행 내역 리스트
  609. * @param :
  610. * @return :
  611. * @---------------------------------------------------
  612. */
  613. function fGetBlodNoExecRecList(blodpidflag){
  614. var sRowCnt = datagrid5.rows-datagrid5.fixedrows;
  615. if( model.getValue("/root/main/cond/patientgrupInfo/patientgruplistInfo/pid") == "" && model.getValue("/root/main/cond/blodno") == "" ){
  616. messageBox("혈액번호/등록번호를 ","C001");
  617. model.setfocus("input13");
  618. return;
  619. }
  620. /* 수혈간호기록 내용 초기화 */
  621. fClearChildNode("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist");
  622. fClearChildNode("/root/main/cond/tnsnursereccdgrup/sideeffectcomcodelist");
  623. fClearChildNode("/root/main/cond/tnsnursereccdgrup/discontinucomcodelist");
  624. model.refresh();
  625. model.makeValue("/root/send/blodpidflag",blodpidflag);
  626. model.makeValue("/root/send/blodno", input13.value );
  627. model.makeValue("/root/send/prcpddfrom", input9.value );
  628. model.makeValue("/root/send/prcpddto", input10.value );
  629. model.makeValue("/root/send/wardcd", combo5.value );
  630. model.makeValue("/root/send/roomcd", combo1.value );
  631. model.makeValue("/root/send/hngnm", combo6.value );
  632. model.makeValue("/root/send/pid", input12.value );
  633. if(submit("TRMNW05621")){
  634. }
  635. }
  636. /**
  637. * @group :
  638. * @ver : 2007.05.09
  639. * @by : 정찬성
  640. * @---------------------------------------------------
  641. * @type : function
  642. * @access : public
  643. * @desc : 혈액불출내역의 혈액반납의뢰 저장
  644. * @param :
  645. * @return :
  646. * @---------------------------------------------------
  647. */
  648. function fBlodReturnSave(){
  649. var sRowCnt = datagrid1.rows-datagrid1.fixedrows;
  650. var cnt = 0 ;
  651. model.removenode("/root/send");
  652. model.makeValue("/root/send/detlgrup",datagrid1.getupdatedataAll("i"));
  653. var saveyn = 0 ;
  654. for(var i=1; i<= sRowCnt; i++){
  655. //alert(datagrid1.labelmatrix(i, 1));
  656. if( datagrid1.labelmatrix(i, 1) == "true" ) {
  657. cnt = cnt + 1;
  658. // ****************************** 반납사유 필수 로직 추가 ***************************************
  659. //alert(model.getValue(xBlodReturnReqGrupListPath+"["+i+"]/etcprcpresncd"));
  660. if(model.getValue(xBlodReturnReqGrupListPath+"["+i+"]/reqflag") == "-" || model.getValue(xBlodReturnReqGrupListPath+"["+i+"]/reqflag") == ""){//반납/폐기를 체크
  661. messageBox("반납/폐기를 ","C002");
  662. return;
  663. }
  664. if(model.getValue(xBlodReturnReqGrupListPath+"["+i+"]/returnabandondate") == "-" || model.getValue(xBlodReturnReqGrupListPath+"["+i+"]/returnabandondate") == ""){//반납/폐기일 체크
  665. messageBox("반납/폐기일을 ","C002");
  666. return;
  667. }
  668. if(model.getValue(xBlodReturnReqGrupListPath+"["+i+"]/etcprcpresncd") == "-" || model.getValue(xBlodReturnReqGrupListPath+"["+i+"]/etcprcpresncd") == ""){//반납사유 체크
  669. messageBox("반납/폐기 사유를 ","C002");
  670. return;
  671. }
  672. }
  673. }
  674. if(cnt < 1){
  675. messageBox("선택 정보가 ","I004");
  676. return;
  677. };
  678. if(submit("TXMNR01030")){
  679. model.copyNode("/root/hidden/main","/root/main");
  680. }
  681. /* 반납/폐기 이후 정보 조회 실행 */
  682. var pidblodflag = '';
  683. if(input12.value != ""){
  684. pidblodflag = 'pid';
  685. } else if (input13.value !="") {
  686. pidblodflag = 'blod';
  687. }
  688. fBlodDeliveList(pidblodflag); //혈액불출 리스트 조회버튼
  689. fGetBlodNoExecRecList(pidblodflag); //수혈 미수행 내역 리스트
  690. }
  691. /**
  692. * @group :
  693. * @ver : 2007.07.16
  694. * @by : 정찬성
  695. * @---------------------------------------------------
  696. * @type : function
  697. * @access : public
  698. * @desc : 혈액불출 내역 조회 리스트
  699. * @param :
  700. * @return :
  701. * @---------------------------------------------------
  702. */
  703. function fBlodDeliveList(blodpidflag){
  704. var sRowCnt = datagrid5.rows-datagrid5.fixedrows;
  705. if( model.getValue("/root/main/cond/patientgrupInfo/patientgruplistInfo/pid") == "" && model.getValue("/root/main/cond/blodno") == "" ){
  706. messageBox("혈액번호/등록번호를 ","C001");
  707. model.setfocus("input13");
  708. return;
  709. }
  710. model.removenode("/root/send");
  711. model.refresh();
  712. model.makeValue("/root/send/blodpidflag",blodpidflag);
  713. model.makeValue("/root/send/blodno", input13.value );
  714. model.makeValue("/root/send/prcpddfrom", input9.value );
  715. model.makeValue("/root/send/prcpddto", input10.value );
  716. model.makeValue("/root/send/wardcd", combo5.value );
  717. model.makeValue("/root/send/roomcd", combo1.value );
  718. model.makeValue("/root/send/hngnm", combo6.value );
  719. model.makeValue("/root/send/pid", input12.value );
  720. if(submit("TRMNW05620")){
  721. }
  722. model.setfocus("input13");
  723. }
  724. /**
  725. * @group :
  726. * @ver : 2007.06.18
  727. * @by : 정찬성
  728. * @---------------------------------------------------
  729. * @type : function
  730. * @access : public
  731. * @desc : 불출신청 내역 조회 리스트
  732. * @param :
  733. * @return :
  734. * @---------------------------------------------------
  735. */
  736. function fGettDeliveDetlList(){
  737. if( model.getValue("/root/main/cond/wardcdgrup/wardcdgruplist") == "" ){
  738. // messageBox("병동을 ","C002");
  739. // model.setfocus("combo7");
  740. // return;
  741. }
  742. model.removenode("/root/send");
  743. model.makeValue("/root/send/prcpddfrom", input2.value);
  744. model.makeValue("/root/send/prcpddto", input11.value);
  745. model.makeValue("/root/send/wardcd", combo7.value);
  746. model.makeValue("/root/send/roomcd", combo2.value);
  747. model.makeValue("/root/send/hngnm", combo8.value);
  748. model.makeValue("/root/send/pid", input3.value);
  749. if(submit("TRMNW05609")){
  750. }
  751. }
  752. /**
  753. * @group :
  754. * @ver : 2007.04.02
  755. * @by : 정찬성
  756. * @---------------------------------------------------
  757. * @type : function
  758. * @access : public
  759. * @desc : 수행처방 선택시 체크사항
  760. * @param :
  761. * @return :
  762. * @---------------------------------------------------
  763. */
  764. function fSelchange(){
  765. var iRow = datagrid5.row ;
  766. // alert(parseInt(model.getValue(xExecDetlListPath+"["+iRow+"]/prcpqty")));
  767. //
  768. // alert(parseInt(model.getValue(xExecDetlListPath+"["+iRow+"]/appno")));
  769. if( parseInt(model.getValue(xExecDetlListPath+"["+iRow+"]/prcpqty")) <= parseInt(model.getValue(xExecDetlListPath+"["+iRow+"]/appno")) ) {
  770. model.setValue(xExecDetlListPath+"["+iRow+"]/sel", "false" ) ;
  771. messageBox("신청수량이 처방수량보다 클 수 ","I004");
  772. return;
  773. }
  774. if( model.getValue(xExecDetlListPath+"["+iRow+"]/prcpstatcd") == "D/C") {
  775. model.setValue(xExecDetlListPath+"["+iRow+"]/sel", "false" ) ;
  776. messageBox("D/C 상태에서는 신청할 수 ","I004");
  777. return;
  778. } else if( model.getValue(xExecDetlListPath+"["+iRow+"]/prcpstatcd") == "의사") {
  779. model.setValue(xExecDetlListPath+"["+iRow+"]/sel", "false" ) ;
  780. messageBox("의사 상태에서는 신청할 수 ","I004");
  781. return;
  782. } else if( model.getValue(xExecDetlListPath+"["+iRow+"]/prcpstatcd") == "완료") {
  783. model.setValue(xExecDetlListPath+"["+iRow+"]/sel", "false" ) ;
  784. messageBox("완료 상태에서는 신청할 수 ","I004");
  785. return;
  786. }
  787. }
  788. /**
  789. * @group :
  790. * @ver : 2007.04.02
  791. * @by : 정찬성
  792. * @---------------------------------------------------
  793. * @type : function
  794. * @access : public
  795. * @desc : 그리드의 값이 변경되었을때, 상태값을 변경한다.
  796. * @param :
  797. * @return :
  798. * @---------------------------------------------------
  799. */
  800. function fChangedGridCol(){
  801. var sDetlGrupRow = datagrid5.row;
  802. var sDetlGrupBKRow=0;
  803. var num = model.getValue(xPopWndExecDetlListPath+"["+sDetlGrupRow+"]/num");
  804. for(var i=1; i<= getNodesetCount(xPopWndClsListBKPath); i++){
  805. if(model.getValue(xPopWndClsListBKPath+"["+i+"]/num") == num){
  806. sDetlGrupBKRow = i;
  807. break;
  808. }
  809. }
  810. if(event.keyCode == "32") {
  811. messageBox("신청수량에 스페이스를 넣을 수 ","I004");
  812. model.setValue(xPopWndExecDetlListPath+"["+sDetlGrupRow+"]/stat","-");
  813. model.setValue(xPopWndExecDetlListPath+"["+sDetlGrupRow+"]/appno","");
  814. datagrid5.refresh();
  815. return;
  816. }
  817. var irr = datagrid5.textmatrix(sDetlGrupRow,6) ;
  818. if(model.getValue(xPopWndExecDetlListPath+"["+sDetlGrupRow+"]/appno") == "0" || model.getValue(xPopWndExecDetlListPath+"["+sDetlGrupRow+"]/appno") == ""){
  819. model.setValue(xPopWndExecDetlListPath+"["+sDetlGrupRow+"]/stat","-");
  820. datagrid5.rebuild();
  821. //return;
  822. }
  823. // alert(instance1.selectSingleNode(xPopWndExecDetlListPath+"["+sDetlGrupRow+"]").xml);
  824. //
  825. // alert(instance1.selectSingleNode(xPopWndClsListBKPath+"["+sDetlGrupBKRow+"]").xml);
  826. if(instance1.selectSingleNode(xPopWndExecDetlListPath+"["+sDetlGrupRow+"]").xml != instance1.selectSingleNode(xPopWndClsListBKPath+"["+sDetlGrupBKRow+"]").xml){
  827. model.setValue(xPopWndExecDetlListPath+"["+sDetlGrupRow+"]/stat","I");
  828. datagrid5.rebuild();
  829. }
  830. }
  831. /**
  832. * @group :
  833. * @ver : 2007.05.09
  834. * @by : 정찬성
  835. * @---------------------------------------------------
  836. * @type : function
  837. * @access : public
  838. * @desc : HSCT CBC init
  839. * @param :
  840. * @return :
  841. * @---------------------------------------------------
  842. */
  843. function fPopWndSave(){
  844. var sRowCnt = datagrid5.rows-datagrid5.fixedrows;
  845. model.removenode("/root/send");
  846. model.makeValue("/root/send/detlgrup",datagrid5.getupdatedataAll("i"));
  847. var saveyn = 0 ;
  848. for(var i=1; i<= sRowCnt; i++){
  849. if(model.getValue(xPopWndExecDetlListPath+"["+i+"]/stat") != "-") {
  850. saveyn = 1 ;
  851. }
  852. if(model.getValue(xPopWndExecDetlListPath+"["+i+"]/stat") != "-" && model.getValue(xPopWndExecDetlListPath+"["+i+"]/appno") == ""){
  853. messageBox("신청수량은 ","I003");
  854. return;
  855. }
  856. // if( !isNumber(model.getValue(xPopWndExecDetlListPath+"["+i+"]/appno")) ) {
  857. //
  858. // messageBox("숫자형을 ","C001");
  859. // return;
  860. //
  861. // }
  862. if( parseInt(model.getValue(xPopWndExecDetlListPath+"["+i+"]/appno")) < 1 || parseInt(model.getValue(xPopWndExecDetlListPath+"["+i+"]/appno")) == " " ) {
  863. messageBox("신청수량은 1건 이하로 입력할 수 ","E001");
  864. return;
  865. }
  866. if( parseInt(model.getValue(xPopWndExecDetlListPath+"["+i+"]/delivepossno")) < parseInt(model.getValue(xPopWndExecDetlListPath+"["+i+"]/appno")) ) {
  867. messageBox("신청수량은 불출수량보다 크게 입력 ","E001");
  868. return;
  869. }
  870. // alert( model.getValue(xPopWndExecDetlListPath+"["+i+"]/prcphopedd") );
  871. // alert( model.getValue(xPopWndExecDetlListPath+"["+i+"]/prcphopetm") );
  872. if(model.getValue(xPopWndExecDetlListPath+"["+i+"]/prcphopedd") == "" || model.getValue(xPopWndExecDetlListPath+"["+i+"]/prcphopetm") == ""){
  873. messageBox("예약일자/예약시간은 ","I003");
  874. return;
  875. }
  876. }
  877. if(saveyn <= 0 ){
  878. messageBox("수정사항이 없어 저장 ","E001");
  879. return;
  880. }
  881. //alert("result : " + saveyn);
  882. // if(saveyn <= 0 ){
  883. // messageBox("수정사항이 없어 저장 ","E001");
  884. // return;
  885. // }
  886. //alert(model.getValue("/root/main/cond/clsflag"));
  887. //alert(model.getValue("/root/main/cond/recflag"));
  888. //if(messageBox("","Q002") != 6) return;
  889. //alert(model.getValue("/root/main/cond/todd"));
  890. // model.makeValue("/root/send/lrggrupcd", model.getValue(xCondPath+"/lrggrupcd"));
  891. // model.makeValue("/root/send/clsflag", model.getValue("/root/main/cond/clsflag"));
  892. // model.makeValue("/root/send/recflag", model.getValue("/root/main/cond/recflag"))
  893. // model.makeValue("/root/send/todd2", model.getValue("/root/main/cond/todd"))
  894. //alert(model.getValue("/root/send/todd2"));
  895. if(submit("TXMNR01008")){
  896. model.copyNode("/root/hidden/main","/root/main");
  897. }
  898. // grd_detlgrup.row = 1;
  899. window.close();
  900. }
  901. /**
  902. * @group :
  903. * @ver : 2007.05.09
  904. * @by : 정찬성
  905. * @---------------------------------------------------
  906. * @type : function
  907. * @access : public
  908. * @desc : HSCT CBC init
  909. * @param :
  910. * @return :
  911. * @---------------------------------------------------
  912. */
  913. function fPopWndInit(){
  914. model.makeValue("/root/send/prcpddfrom", opener.window.javascript.getParameter("prcpddfrom") );
  915. model.makeValue("/root/send/prcpddto", opener.window.javascript.getParameter("prcpddto") );
  916. model.makeValue("/root/send/wardcd", opener.window.javascript.getParameter("wardcd") );
  917. model.makeValue("/root/send/roomcd", opener.window.javascript.getParameter("roomcd") );
  918. model.makeValue("/root/send/pid", opener.window.javascript.getParameter("pid") );
  919. model.makeValue("/root/send/queryprcpdd", opener.window.javascript.getParameter("queryprcpdd") );
  920. model.makeValue("/root/send/queryprcpno", opener.window.javascript.getParameter("queryprcpno") );
  921. model.makeValue("/root/send/queryprcphistno", opener.window.javascript.getParameter("queryprcphistno") );
  922. //alert(prcpddfrom); alert(prcpddto); alert(wardcd); alert(roomcd); alert(pid);
  923. if(submit("TRMNW05607")){
  924. model.copyNode("/root/temp/main","/root/main");
  925. }
  926. }
  927. /**
  928. * @group :
  929. * @ver : 2007.06.18
  930. * @by : 정찬성
  931. * @---------------------------------------------------
  932. * @type : function
  933. * @access : public
  934. * @desc : 혈액불출신청 팝업
  935. * @param :
  936. * @return :
  937. * @---------------------------------------------------
  938. */
  939. function fPopWnd(){
  940. var iRows = datagrid5.rows;
  941. var queryprcpdd = "" ;
  942. var queryprcpno = "" ;
  943. var queryprcphistno = "" ;
  944. var checkcnt = 0 ;
  945. for(var i = 1 ; i < datagrid5.rows; i++ ) {// 전체를 돌면서 그룹에 값이 체크되어 있는것 초기화
  946. if( model.getValue(xExecDetlListPath+"["+ i +"]/sel") == "true" ) {
  947. // alert("111");
  948. queryprcpdd = queryprcpdd + "'" + model.getValue(xExecDetlListPath+"["+ i +"]/prcpdd2") + "'," ;
  949. queryprcpno = queryprcpno + "" + model.getValue(xExecDetlListPath+"["+ i +"]/prcpno") + "," ;
  950. // alert(model.getValue(xExecDetlListPath+"["+ i +"]/prcphistno"));
  951. queryprcphistno = queryprcphistno + "" + model.getValue(xExecDetlListPath+"["+ i +"]/prcphistno") + "," ;
  952. checkcnt++ ;
  953. } else {
  954. // alert("222");
  955. }
  956. }
  957. if( checkcnt <= 0 ) {
  958. messageBox("수혈처방내역을 ","C002");
  959. return 0 ;
  960. }
  961. queryprcpdd = queryprcpdd.replace(/-/g,"")
  962. // alert(queryprcpdd.replace(/-/g,""));
  963. // alert(queryprcpdd.substr(0,queryprcpdd.length-1));
  964. // alert(queryprcpno.substr(0,queryprcpno.length-1));
  965. // alert(queryprcphistno.substr(0,queryprcphistno.length-1));
  966. queryprcpdd = queryprcpdd.substr(0,queryprcpdd.length-1) ;
  967. queryprcpno = queryprcpno.substr(0,queryprcpno.length-1) ;
  968. queryprcphistno = queryprcphistno.substr(0,queryprcphistno.length-1) ;
  969. // for(var i = 0 ; i < data.length; i++ ) {
  970. //
  971. // queryprcpno = queryprcpno + data[i] ;
  972. //
  973. // }
  974. setParameter("prcpddfrom", input2.value);
  975. setParameter("prcpddto", input11.value);
  976. setParameter("wardcd", combo7.value);
  977. setParameter("roomcd", combo2.value);
  978. setParameter("pid", input3.value);
  979. setParameter("queryprcpdd", queryprcpdd);
  980. setParameter("queryprcpno", queryprcpno);
  981. setParameter("queryprcphistno", queryprcphistno);
  982. var left = event.screenX-1000;
  983. var top = event.screenY+50;
  984. modal("SMMNR01001",1,left,top);
  985. }
  986. /**
  987. * @group :
  988. * @ver : 2007.06.18
  989. * @by : 정찬성
  990. * @---------------------------------------------------
  991. * @type : function
  992. * @access : public
  993. * @desc : 수행처방내역 조회 리스트
  994. * @param :
  995. * @return :
  996. * @---------------------------------------------------
  997. */
  998. function fGetExecDetlList(){
  999. if( model.getValue("/root/main/cond/wardcdgrup/wardcdgruplist") == "" ){
  1000. // messageBox("병동을 ","C002");
  1001. // model.setfocus("combo7");
  1002. // return;
  1003. }
  1004. model.removenode("/root/send");
  1005. model.makeValue("/root/send/prcpddfrom", input2.value);
  1006. model.makeValue("/root/send/prcpddto", input11.value);
  1007. model.makeValue("/root/send/wardcd", combo7.value);
  1008. model.makeValue("/root/send/roomcd", combo2.value);
  1009. model.makeValue("/root/send/hngnm", combo8.value);
  1010. model.makeValue("/root/send/pid", input3.value);
  1011. if(submit("TRMNW05606")){
  1012. }
  1013. }
  1014. /* 수혈간호 기록 참고 스크립트 끝 */