SMMNW039.js 48 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827
  1. /*
  2. (SMMNW03900_HSCT Infusion기록.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.08.17
  24. * @by : 정찬성
  25. * @---------------------------------------------------
  26. * @type : function
  27. * @access : public
  28. * @desc : HSCT 시간/상세정보 초기화
  29. * @param :
  30. * @return :
  31. * @---------------------------------------------------
  32. */
  33. function fHsctInit(){
  34. // model.removeNodeset("/root/main/cond/tnssideeffectgrup");// 삭제후 부작용 코드 초기화
  35. model.setValue(input18.attribute("ref"), getCurrentDate());
  36. model.setValue(input4.attribute("ref"), getCurrentDate());
  37. model.setValue(input6.attribute("ref"), getCurrentDate());
  38. model.setValue(input3.attribute("ref"), getCurrentTime());
  39. model.setValue(input1.attribute("ref"), getCurrentTime());
  40. model.setValue(input7.attribute("ref"), getCurrentTime());
  41. model.setValue(radio4.attribute("ref"), "1");
  42. model.setValue(radio3.attribute("ref"), "1");
  43. model.setValue(radio5.attribute("ref"), "1");
  44. model.setValue(radio2.attribute("ref"), "1");
  45. model.setValue(radio6.attribute("ref"), "1");
  46. model.setValue(radio1.attribute("ref"), "2");
  47. model.setValue(input15.attribute("ref"), "");
  48. model.setValue(radio7.attribute("ref"), "1");
  49. model.setValue(radio8.attribute("ref"), "1");
  50. model.setValue(input16.attribute("ref"), "");
  51. model.setValue(input17.attribute("ref"), "");
  52. model.refresh();
  53. input15.disabled = true ;// 프리텍스트 disabled
  54. }
  55. /**
  56. * @group :
  57. * @ver : 2007.08.13
  58. * @by : 정찬성
  59. * @---------------------------------------------------
  60. * @type : function
  61. * @access : public
  62. * @desc : HSCT Infusion 삭제
  63. * @param :
  64. * @return :
  65. * @---------------------------------------------------
  66. */
  67. function fDelHsctRec(){
  68. if(messageBox("","Q001") != 6) return;// 저장하시겠습니까?
  69. model.removenode("/root/send");
  70. model.makeValue("/root/send/pid", input2.value);
  71. model.makeValue("/root/send/prcpddfrom2", input9.value);
  72. model.makeValue("/root/send/prcpddto2", input10.value);
  73. if( model.getValue("/root/main/cond/pid") == "" ){
  74. messageBox("혈액번호는 ","I003");
  75. model.setfocus("input2");
  76. return;
  77. } else if( input9.value == "" ){
  78. messageBox("불출일자는 ","I003");
  79. model.setfocus("input9");
  80. return;
  81. } else if( input10.value == "" ){
  82. messageBox("불출일자는 ","I003");
  83. model.setfocus("input10");
  84. return;
  85. }
  86. model.makeValue("/root/send/detlgrup",datagrid2.getupdatedataAll("i"));
  87. if(submit("TXMNW03911")){
  88. }
  89. fGetCellProcInfoList();//Cell 처리정보 리스트
  90. fGetExecList();//수행리스트
  91. fHsctInit();//HSCT 시간/상세정보 초기화
  92. messageBox("정보 삭제가 ","I002");
  93. }
  94. /**
  95. * @group :
  96. * @ver : 2007.08.16
  97. * @by : 정찬성
  98. * @---------------------------------------------------
  99. * @type : function
  100. * @access : public
  101. * @desc : 수행 리스트 더블클릭시 상세정보 모두
  102. * @param :
  103. * @return :
  104. * @---------------------------------------------------
  105. */
  106. function fGetExecDetlInfo(){
  107. model.removenode("/root/send");
  108. model.makeValue("/root/send/pid", input2.value);
  109. model.makeValue("/root/send/prcpddfrom2", input9.value);
  110. model.makeValue("/root/send/prcpddto2", input10.value);
  111. if( model.getValue("/root/main/cond/pid") == "" ){
  112. messageBox("혈액번호는 ","I003");
  113. model.setfocus("input2");
  114. return;
  115. } else if( input9.value == "" ){
  116. messageBox("불출일자는 ","I003");
  117. model.setfocus("input9");
  118. return;
  119. } else if( input10.value == "" ){
  120. messageBox("불출일자는 ","I003");
  121. model.setfocus("input10");
  122. return;
  123. }
  124. var iRow = datagrid1.Row ;
  125. var grupcd = "" ;
  126. // alert(datagrid1.labelmatrix(iRow, 5));
  127. if( datagrid1.labelmatrix(iRow, 5).length > 7 ){
  128. grupcd = datagrid1.labelmatrix(iRow, 5) ;
  129. // alert(grupcd);
  130. } else if( datagrid1.labelmatrix(iRow, 5).length <= 7 ) {
  131. messageBox("그룹코드가 ","I004");
  132. return ;
  133. }
  134. model.makeValue("/root/send/grupcd", grupcd);
  135. if(submit("TRMNW03906")){// 기본정보
  136. }
  137. if(submit("TRMNW03907")){// 공여자정보
  138. }
  139. if(submit("TRMNW03908")){// Cell 처리 정보
  140. }
  141. datagrid2.colDisabled(1) = true;// 선택 disabled
  142. if(submit("TRMNW03909")){// 투여 상세정보
  143. }
  144. // model.removeNodeset("/root/main/cond/tnssideeffectgrup");// 삭제후 부작용 코드 초기화
  145. model.refresh();
  146. if(radio1.value == "1" && input15.value == "" ) {
  147. //alert(datagrid2.labelmatrix(1, 10)) ;
  148. }
  149. model.makeValue("/root/send/grupcd", datagrid2.labelmatrix(1, 10) );
  150. if(submit("TRMNW03920")){// Side Effect 정보
  151. if(radio1.value == "1" && input15.value != "" ) {
  152. for(var i = 1 ; i < datagrid5.rows; i++ ){// 전체를 돌면서 중증도 내역선택시 상태를 초기화
  153. datagrid5.textmatrix(i,1) = "false";
  154. }
  155. datagrid5.colDisabled(1) = true;// 선택 disabled
  156. input15.disabled = false ;// 프리텍스트 disabled
  157. } else if( radio1.value == "1" && input15.value == "" ) {
  158. for(var i = 1 ; i < datagrid5.rows; i++ ){// 전체를 돌면서 중증도 내역선택시 상태를 초기화
  159. datagrid5.colDisabled(1) = false;// 선택 disabled
  160. }
  161. input15.disabled = true ;// 프리텍스트 disabled
  162. } else if( radio1.value == "2" ) {
  163. for(var i = 1 ; i < datagrid5.rows; i++ ){// 전체를 돌면서 중증도 내역선택시 상태를 초기화
  164. datagrid5.textmatrix(i,1) = "false";
  165. datagrid5.colDisabled(1) = true;// 선택 disabled
  166. }
  167. input15.disabled = true ;// 프리텍스트 disabled
  168. }
  169. }
  170. }
  171. /**
  172. * @group :
  173. * @ver : 2007.08.13
  174. * @by : 정찬성
  175. * @---------------------------------------------------
  176. * @type : function
  177. * @access : public
  178. * @desc : 수행리스트
  179. * @param :
  180. * @return :
  181. * @---------------------------------------------------
  182. */
  183. function fGetExecList(){
  184. model.removenode("/root/send");
  185. model.makeValue("/root/send/pid", input2.value);
  186. model.makeValue("/root/send/prcpddfrom2", input9.value);
  187. model.makeValue("/root/send/prcpddto2", input10.value);
  188. if( model.getValue("/root/main/cond/pid") == "" ){
  189. messageBox("혈액번호는 ","I003");
  190. model.setfocus("input2");
  191. return;
  192. } else if( input9.value == "" ){
  193. messageBox("불출일자는 ","I003");
  194. model.setfocus("input9");
  195. return;
  196. } else if( input10.value == "" ){
  197. messageBox("불출일자는 ","I003");
  198. model.setfocus("input10");
  199. return;
  200. }
  201. if(submit("TRMNW03905")){
  202. }
  203. model.setValue(input18.attribute("ref"), getCurrentDate());// 기준일에 현재날짜(디폴트)
  204. model.setValue(input4.attribute("ref"), getCurrentDate());// 기준일에 현재날짜(디폴트)
  205. model.setValue(input6.attribute("ref"), getCurrentDate());// 기준일에 현재날짜(디폴트)
  206. model.setValue(input3.attribute("ref"), getCurrentTime());
  207. model.setValue(input1.attribute("ref"), getCurrentTime());
  208. model.setValue(input7.attribute("ref"), getCurrentTime());
  209. }
  210. /**
  211. * @group :
  212. * @ver : 2007.03.30
  213. * @by : 정찬성
  214. * @---------------------------------------------------
  215. * @type : function
  216. * @access : public
  217. * @desc : HSCT 기록 저장한다.
  218. * @param :
  219. * @return :
  220. * @---------------------------------------------------
  221. */
  222. function fHsctRecSave(){
  223. var inpt = "" ;
  224. var cnt = 0 ;
  225. model.removeNode ("/root/send");
  226. if(radio1.value == "1"){
  227. if(datagrid5.row < 1){
  228. cnt = cnt + 1;
  229. }
  230. for(var i=1; i<= datagrid5.rows; i++){
  231. if( datagrid5.labelmatrix(i, 1) == "true" ) {
  232. cnt = cnt + 1;
  233. }
  234. }
  235. // if(cnt < 1){
  236. // messageBox("Side Effect 선택 정보가 ","I004");
  237. // return;
  238. // }
  239. }
  240. cnt = 0 ;
  241. for(var i=1; i<= datagrid2.rows; i++){
  242. if( datagrid2.labelmatrix(i, 1) == "true" ) {
  243. cnt = cnt + 1;
  244. inpt = datagrid2.labelmatrix(1, 9) ;
  245. }
  246. }
  247. if(cnt < 1){
  248. messageBox("Cell 처리 선택 정보가 ","I004");
  249. return;
  250. };
  251. // alert(datagrid2.getupdatedataAll("i"));
  252. // alert(datagrid5.getupdatedataAll("i"));
  253. model.makeValue("/root/send/detlgrup",datagrid2.getupdatedataAll("i"));
  254. model.makeValue("/root/send/sidegrup",datagrid5.getupdatedataAll("i"));
  255. if(messageBox("","Q002") != 6) return;// 저장하시겠습니까?
  256. model.makeValue("/root/send/pid", input2.value);
  257. model.makeValue("/root/send/execdd", input18.value);
  258. model.makeValue("/root/send/exectm", input3.value);
  259. model.makeValue("/root/send/indd", output8.value);
  260. model.makeValue("/root/send/ordtypenm", output9.value);
  261. model.makeValue("/root/send/depthngnm", output10.value);
  262. model.makeValue("/root/send/medispclidnm", output11.value);
  263. model.makeValue("/root/send/atdoctidnm", output12.value);
  264. model.makeValue("/root/send/termhngnm", output1.value);
  265. model.makeValue("/root/send/dnornm", output15.value);
  266. model.makeValue("/root/send/dnorage", output17.value);
  267. model.makeValue("/root/send/dnorsex", output18.value);
  268. model.makeValue("/root/send/dnorbtype", output19.value);
  269. model.makeValue("/root/send/tnsstrdd", input4.value);
  270. model.makeValue("/root/send/tnsstrtm", input1.value);
  271. model.makeValue("/root/send/tnsenddd", input6.value);
  272. model.makeValue("/root/send/tnsendtm", input7.value);
  273. model.makeValue("/root/send/filteryn", radio4.value);
  274. model.makeValue("/root/send/vadssel", radio3.value);
  275. model.makeValue("/root/send/ekgyn", radio5.value);
  276. model.makeValue("/root/send/inptouptyn", radio2.value);
  277. model.makeValue("/root/send/pltsel", radio6.value);
  278. model.makeValue("/root/send/sideyn", radio1.value);
  279. model.makeValue("/root/send/tnssideeffecttext", input15.value);
  280. model.makeValue("/root/send/cultureyn", radio7.value);
  281. model.makeValue("/root/send/postyn", radio8.value);
  282. model.makeValue("/root/send/infusionbag", input16.value);
  283. model.makeValue("/root/send/remark", input17.value);
  284. if(inpt == "INPUT"){// 등록시
  285. // model.makeValue("/root/send/recgrup",datagrid2.getupdatedataAll("i"));
  286. // model.makeValue("/root/send/histgrup",grd_histgrup.getupdatedataAll("i"));
  287. if(submit("TXMNW03910")){
  288. fGetCellProcInfoList();// Cell 처리 정보 리스트
  289. fHsctInit();//HSCT 시간/상세정보 초기화
  290. for(var i = 1 ; i < datagrid5.rows; i++ ){// 전체를 돌면서 중증도 내역선택시 상태를 초기화
  291. datagrid5.textmatrix(i,1) = "false";
  292. datagrid5.colDisabled(1) = true ;// 선택 disabled
  293. }
  294. messageBox("정보 저장이 ","I002");
  295. }
  296. } else if (inpt == "UPDATE") {//수정시
  297. //
  298. // model.makeValue("/root/send/recgrup",datagrid2.getupdatedataAll("i"));
  299. // model.makeValue("/root/send/histgrup",grd_histgrup.getupdatedataAll("i"));
  300. if(submit("TXMNW03912")){
  301. messageBox("정보 업데이트가 ","I002");
  302. }
  303. }
  304. }
  305. /**
  306. * @group :
  307. * @ver : 2007.08.13
  308. * @by : 정찬성
  309. * @---------------------------------------------------
  310. * @type : function
  311. * @access : public
  312. * @desc : 수혈부작용 코드
  313. * @param :
  314. * @return :
  315. * @---------------------------------------------------
  316. */
  317. function fTnsSideEffectList(){
  318. model.removenode("/root/send");
  319. model.makeValue("/root/send/pid", input2.value);
  320. model.makeValue("/root/send/prcpddfrom2", input9.value);
  321. model.makeValue("/root/send/prcpddto2", input10.value);
  322. if( model.getValue("/root/main/cond/pid") == "" ){
  323. messageBox("혈액번호는 ","I003");
  324. model.setfocus("input2");
  325. return;
  326. } else if( input9.value == "" ){
  327. messageBox("불출일자는 ","I003");
  328. model.setfocus("input9");
  329. return;
  330. } else if( input10.value == "" ){
  331. messageBox("불출일자는 ","I003");
  332. model.setfocus("input10");
  333. return;
  334. }
  335. if(submit("TRMNW03904")){
  336. }
  337. // model.setfocus("button3");
  338. }
  339. /**
  340. * @group :
  341. * @ver : 2007.08.13
  342. * @by : 정찬성
  343. * @---------------------------------------------------
  344. * @type : function
  345. * @access : public
  346. * @desc : 공여자 정보 리스트
  347. * @param :
  348. * @return :
  349. * @---------------------------------------------------
  350. */
  351. function fDnorInfoList(){
  352. model.removenode("/root/send");
  353. model.makeValue("/root/send/pid", input2.value);
  354. model.makeValue("/root/send/prcpddfrom2", input9.value);
  355. model.makeValue("/root/send/prcpddto2", input10.value);
  356. if( model.getValue("/root/main/cond/pid") == "" ){
  357. messageBox("혈액번호는 ","I003");
  358. model.setfocus("input2");
  359. return;
  360. } else if( input9.value == "" ){
  361. messageBox("불출일자는 ","I003");
  362. model.setfocus("input9");
  363. return;
  364. } else if( input10.value == "" ){
  365. messageBox("불출일자는 ","I003");
  366. model.setfocus("input10");
  367. return;
  368. }
  369. if(submit("TRMNW03902")){
  370. }
  371. // model.setfocus("button3");
  372. }
  373. /**
  374. * @group :
  375. * @ver : 2007.08.13
  376. * @by : 정찬성
  377. * @---------------------------------------------------
  378. * @type : function
  379. * @access : public
  380. * @desc : Cell 처리정보 리스트
  381. * @param :
  382. * @return :
  383. * @---------------------------------------------------
  384. */
  385. function fGetCellProcInfoList(){
  386. model.removenode("/root/send");
  387. model.makeValue("/root/send/pid", input2.value);
  388. model.makeValue("/root/send/prcpddfrom2", input9.value);
  389. model.makeValue("/root/send/prcpddto2", input10.value);
  390. if( model.getValue("/root/main/cond/pid") == "" ){
  391. messageBox("혈액번호는 ","I003");
  392. model.setfocus("input2");
  393. return;
  394. } else if( input9.value == "" ){
  395. messageBox("불출일자는 ","I003");
  396. model.setfocus("input9");
  397. return;
  398. } else if( input10.value == "" ){
  399. messageBox("불출일자는 ","I003");
  400. model.setfocus("input10");
  401. return;
  402. }
  403. if(submit("TRMNW03903")){
  404. }
  405. datagrid2.colDisabled(1) = false;
  406. }
  407. /**
  408. * @group :
  409. * @ver : 2007.08.09
  410. * @by : 정찬성
  411. * @---------------------------------------------------
  412. * @type : function
  413. * @access : public
  414. * @desc : 환자 개인정보 조회
  415. * @param :
  416. * @return :
  417. * @---------------------------------------------------
  418. */
  419. function fGetPatientInfo(){
  420. model.removenode("/root/send");
  421. model.makeValue("/root/send/pid", input2.value);
  422. model.makeValue("/root/send/prcpddfrom2", input9.value);
  423. model.makeValue("/root/send/prcpddto2", input10.value);
  424. if( model.getValue("/root/main/cond/pid") == "" ){
  425. messageBox("혈액번호는 ","I003");
  426. model.setfocus("input2");
  427. return;
  428. } else if( input9.value == "" ){
  429. messageBox("불출일자는 ","I003");
  430. model.setfocus("input9");
  431. return;
  432. } else if( input10.value == "" ){
  433. messageBox("불출일자는 ","I003");
  434. model.setfocus("input10");
  435. return;
  436. }
  437. if(submit("TRMNW03901")){
  438. }
  439. // model.setfocus("button3");
  440. }
  441. /* 혈액불출 스크립트 참조 시작 */
  442. /* 혈액불출관리 참조 스크립트 시작 20070809 */
  443. /**
  444. * @group :
  445. * @ver : 2007.07.09
  446. * @by : 정찬성
  447. * @---------------------------------------------------
  448. * @type : function
  449. * @access : public
  450. * @desc : 미수행기록 목록에서 선택항목 체크(더블클릭)
  451. * @param :
  452. * @return :
  453. * @---------------------------------------------------
  454. */
  455. function fGridSel() {
  456. var sRowCnt2 = datagrid2.rows-datagrid2.fixedrows;
  457. var iRow = datagrid2.Row ;
  458. if( datagrid2.labelmatrix(iRow, 1) == "FALSE" || datagrid2.labelmatrix(iRow, 1) == "false" ){
  459. datagrid2.textmatrix(iRow, 1) = "true" ;
  460. } else if( datagrid2.labelmatrix(iRow, 1) == "true" ) {
  461. datagrid2.textmatrix(iRow, 1) = "FALSE" ;
  462. }
  463. }
  464. /**
  465. * @group :
  466. * @ver : 2007.07.09
  467. * @by : 정찬성
  468. * @---------------------------------------------------
  469. * @type : function
  470. * @access : public
  471. * @desc : 수행기록 내역 상세정보 (더블클릭)
  472. * @param :
  473. * @return :
  474. * @---------------------------------------------------
  475. */
  476. function fBlodExecRecDetlinfo() {
  477. var sRowCnt = datagrid3.rows-datagrid3.fixedrows;
  478. var iRow = datagrid3.row ;
  479. model.setValue(output5.attribute("ref"), model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/blodno"));
  480. model.setValue(output6.attribute("ref"), model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/prcpnm"));
  481. model.setValue(output7.attribute("ref"), model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/abo") + model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/rh") );
  482. model.setValue(input4.attribute("ref"), model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/tnsstrddtm").substring(0,8));
  483. model.setValue(input5.attribute("ref"), model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/tnsstrddtm").substring(8,14));
  484. model.setValue(input6.attribute("ref"), model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/tnsendddtm").substring(0,8));
  485. model.setValue(input7.attribute("ref"), model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/tnsendddtm").substring(8,14));
  486. model.setValue(output10.attribute("ref"), model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/tnsstrnursedeptnm"));
  487. model.setValue(output11.attribute("ref"), model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/tnsstrnursenm"));
  488. model.setValue(output8.attribute("ref"), model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/tnsendnursedeptnm"));
  489. model.setValue(output9.attribute("ref"), model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/tnsendnursenm"));
  490. model.setValue(combo3.attribute("ref"), model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/tnssideeffect"));
  491. model.setValue(input1.attribute("ref"), model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/caution"));
  492. model.setValue(radio1.attribute("ref"), model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/discontinuyn"));
  493. model.setValue(combo4.attribute("ref"), model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/discontinu"));
  494. model.setValue(input8.attribute("ref"), model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/drugqty"));
  495. model.setValue(textarea1.attribute("ref"), model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/tnsrec"));
  496. /*
  497. model.makeValue("/root/send/tnsstrnurseid", sp[0] );
  498. model.makeValue("/root/send/tnsstrnursenm", sp[1] );
  499. model.makeValue("/root/send/tnsstrnursedeptcd", sp[5] );
  500. model.makeValue("/root/send/tnsstrnursedeptnm", sp[4] );
  501. */
  502. model.setValue(output12.attribute("ref"),
  503. model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/tnsstrnurseid")+","+
  504. model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/tnsstrnursenm")+","+","+","+
  505. model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/tnsstrnursedeptnm")+","+
  506. model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/tnsstrnursedeptcd")
  507. );
  508. // alert(output12.value);
  509. model.setValue(output13.attribute("ref"),
  510. model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/tnsendnurseid")+","+
  511. model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/tnsendnursenm")+","+","+","+
  512. model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/tnsendnursedeptnm")+","+
  513. model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/tnsendnursedeptcd")
  514. );
  515. // alert(output13.value);
  516. // model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/tnsendnurseid")+","+
  517. // model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/tnsendnursenm")+","+
  518. // model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/tnsendnursedeptcd")+","+
  519. // model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/tnsendnursenm")
  520. model.refresh();
  521. var sRowCnt2 = datagrid2.rows-datagrid2.fixedrows;
  522. for(var i=1; i<= sRowCnt2; i++){ // 선택한 값이 불출신청 상태인지 체크
  523. datagrid2.textmatrix(i, 1) = "FALSE" ;
  524. }
  525. }
  526. /**
  527. * @group :
  528. * @ver : 2007.07.16
  529. * @by : 정찬성
  530. * @---------------------------------------------------
  531. * @type : function
  532. * @access : public
  533. * @desc : 수혈 수행 내역 리스트
  534. * @param :
  535. * @return :
  536. * @---------------------------------------------------
  537. */
  538. function fGetBlodExecRecList(blodpidflag){
  539. var sRowCnt = datagrid5.rows-datagrid5.fixedrows;
  540. if( model.getValue("/root/main/cond/patientgrupInfo/patientgruplistInfo/pid") == "" && model.getValue("/root/main/cond/blodno") == "" ){
  541. messageBox("혈액번호/등록번호를 ","C001");
  542. model.setfocus("input13");
  543. return;
  544. }
  545. model.refresh();
  546. model.makeValue("/root/send/blodpidflag",blodpidflag);
  547. model.makeValue("/root/send/blodno", input13.value );
  548. model.makeValue("/root/send/prcpddfrom", input9.value );
  549. model.makeValue("/root/send/prcpddto", input10.value );
  550. model.makeValue("/root/send/wardcd", combo5.value );
  551. model.makeValue("/root/send/roomcd", combo1.value );
  552. model.makeValue("/root/send/hngnm", combo6.value );
  553. model.makeValue("/root/send/pid", input12.value );
  554. if(submit("TRMNR01024")){
  555. }
  556. }
  557. /**
  558. * @group :
  559. * @ver : 2007.05.09
  560. * @by : 정찬성
  561. * @---------------------------------------------------
  562. * @type : function
  563. * @access : public
  564. * @desc : HSCT Infusion기록 기록저장 버튼
  565. * @param :
  566. * @return :
  567. * @---------------------------------------------------
  568. */
  569. function fTnsRecSave(){
  570. if(model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/blodno") == ""){
  571. messageBox("혈액번호를 ","C002");
  572. return;
  573. }
  574. if(model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/prcpnm") == ""){
  575. messageBox("혈액명을 ","C002");
  576. return;
  577. }
  578. if(model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/abo") == ""){
  579. messageBox("혈액형을 ","C002");
  580. return;
  581. }
  582. if(model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/tnsstrdd") == "" || model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/tnsstrtm") == "" ) {
  583. messageBox("수혈시작시간을 ","C001");
  584. return;
  585. }
  586. if(model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/tnsenddd") == "" || model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/tnsendtm") == "" ) {
  587. messageBox("수혈종료시간을 ","C001");
  588. return;
  589. }
  590. 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") == "") {
  591. messageBox("수혈시작 간호사를 ","C002");
  592. return;
  593. }
  594. 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") == "") {
  595. messageBox("수혈종료 간호사를 ","C002");
  596. return;
  597. }
  598. if(model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/tnsrec") == "" ) {
  599. messageBox("수혈기록을 ","C001");
  600. return;
  601. }
  602. model.removenode("/root/send");
  603. model.makeValue("/root/send/pid",model.getValue("/root/main/cond/patientgrupInfo/patientgruplistInfo/pid") ) ;
  604. model.makeValue("/root/send/blodno",model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/blodno") ) ;
  605. model.makeValue("/root/send/tnsstrddtm",model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/tnsstrdd") + model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/tnsstrtm") );
  606. model.makeValue("/root/send/tnsendddtm",model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/tnsenddd") + model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/tnsendtm") );
  607. model.makeValue("/root/send/tnsstrnursall",model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/tnsstrnursall") );
  608. model.makeValue("/root/send/tnsendnursall",model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/tnsendnursall") );
  609. model.makeValue("/root/send/sideeffectcomcodelist",model.getValue("/root/main/cond/tnsnursereccdgrup/sideeffectcomcodelist") );
  610. model.makeValue("/root/send/caution",model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/caution") );
  611. model.makeValue("/root/send/discontinuyn",model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/discontinuyn") );
  612. model.makeValue("/root/send/discontinucomcodelist",model.getValue("/root/main/cond/tnsnursereccdgrup/discontinucomcodelist") );
  613. model.makeValue("/root/send/drugqty",model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/drugqty") );
  614. model.makeValue("/root/send/tnsrec",model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/tnsrec") );
  615. var sp = model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/tnsstrnursall").split(",");
  616. //alert(sp);
  617. model.makeValue("/root/send/tnsstrnurseid", sp[0] );
  618. model.makeValue("/root/send/tnsstrnursenm", sp[1] );
  619. model.makeValue("/root/send/tnsstrnursedeptcd", sp[5] );
  620. model.makeValue("/root/send/tnsstrnursedeptnm", sp[4] );
  621. var sp2 = model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/tnsendnursall").split(",");
  622. //alert(sp2);
  623. model.makeValue("/root/send/tnsendnurseid", sp2[0] );
  624. model.makeValue("/root/send/tnsendnursenm", sp2[1] );
  625. model.makeValue("/root/send/tnsendnursedeptcd", sp2[5] );
  626. model.makeValue("/root/send/tnsendnursedeptnm", sp2[4] );
  627. /* 저장 / 업데이트 구분 체크 시작 */
  628. var check = "" ;
  629. var sRowCnt = datagrid3.rows-datagrid3.fixedrows;
  630. for(var i=1; i<= sRowCnt; i++){ // 선택한 값이 불출신청 상태인지 체크
  631. // alert(datagrid3.labelmatrix(i, 3));
  632. //
  633. // alert(output5.value);
  634. if( datagrid3.labelmatrix(i, 3) == output5.value ) {
  635. check = "Y" ;
  636. }
  637. }
  638. /* 저장 / 업데이트 구분 체크 끝 */
  639. if( check != "Y" ){// 신규 저장
  640. //alert("신규 저장");
  641. model.makeValue("/root/send/detlgrup",datagrid2.getupdatedataAll("i"));
  642. if(messageBox("","Q002") != 6) return;// 저장하시겠습니까?
  643. if(submit("TXMNR01031")){
  644. model.copyNode("/root/hidden/main","/root/main");
  645. var pidblodflag = '';
  646. if(input12.value != ""){
  647. pidblodflag = 'pid';
  648. } else if (input13.value !="") {
  649. pidblodflag = 'blod';
  650. }
  651. fBlodDeliveList(pidblodflag);// 혈액불출내역 리스트
  652. fGetBlodNoExecRecList(pidblodflag); //수혈 미수행 내역 리스트
  653. fGetBlodExecRecList(pidblodflag); //수혈 수행 내역 리스트
  654. }
  655. } else if( check == "Y") {// 업데이트
  656. //alert("업데이트");
  657. if(messageBox("","Q002") != 6) return;// 저장하시겠습니까?
  658. model.makeValue("/root/send/detlgrup",datagrid3.getupdatedataAll("i"));
  659. if(submit("TXMNR01032")){
  660. model.copyNode("/root/hidden/main","/root/main");
  661. var pidblodflag = '';
  662. if(input12.value != ""){
  663. pidblodflag = 'pid';
  664. } else if (input13.value !="") {
  665. pidblodflag = 'blod';
  666. }
  667. fBlodDeliveList(pidblodflag);// 혈액불출내역 리스트
  668. fGetBlodNoExecRecList(pidblodflag); //수혈 미수행 내역 리스트
  669. fGetBlodExecRecList(pidblodflag); //수혈 수행 내역 리스트
  670. }
  671. }
  672. }
  673. /**
  674. * @group :
  675. * @ver : 2007.05.09
  676. * @by : 정찬성
  677. * @---------------------------------------------------
  678. * @type : function
  679. * @access : public
  680. * @desc : 미수행기록목록에서 선택한 혈액정보 기록버튼
  681. * @param :
  682. * @return :
  683. * @---------------------------------------------------
  684. */
  685. function fExecRec(){
  686. var sRowCnt = datagrid2.rows-datagrid2.fixedrows;
  687. var cnt = 0 ;
  688. model.removenode("/root/send");
  689. model.makeValue("/root/send/detlgrup",datagrid2.getupdatedataAll("i"));
  690. var blodno = "" ;
  691. var prcpnm = "" ;
  692. var aborh = "" ;
  693. for(var i=1; i<= sRowCnt; i++){
  694. // alert(datagrid2.labelmatrix(i, 1));
  695. if( datagrid2.labelmatrix(i, 1) == "true" ) {
  696. blodno += datagrid2.labelmatrix(i, 2) + "," ;
  697. prcpnm += datagrid2.labelmatrix(i, 3) + "," ;
  698. aborh += datagrid2.labelmatrix(i, 4)+datagrid2.labelmatrix(i, 5) + "," ;
  699. cnt = cnt + 1;
  700. }
  701. }
  702. // alert(blodno.substr(0,blodno.length-1));
  703. if(cnt < 1){
  704. messageBox("선택 정보가 ","I004");
  705. return;
  706. };
  707. fClearChildNode("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist");
  708. fClearChildNode("/root/main/cond/tnsnursereccdgrup/sideeffectcomcodelist");
  709. fClearChildNode("/root/main/cond/tnsnursereccdgrup/discontinucomcodelist");
  710. model.refresh();
  711. model.setValue(output5.attribute("ref"), blodno.substr(0,blodno.length-1) );
  712. model.setValue(output6.attribute("ref"), prcpnm.substr(0,prcpnm.length-1) );
  713. model.setValue(output7.attribute("ref"), aborh.substr(0,aborh.length-1) );
  714. model.setValue(radio1.attribute("ref"), "N" );
  715. model.setValue(input4.attribute("ref"), getCurrentDate() );
  716. model.setValue(input5.attribute("ref"), getCurrentTime() );
  717. if(submit("TRMNR01023")){
  718. model.copyNode("/root/hidden/main","/root/main");
  719. }
  720. }
  721. /**
  722. * @group :
  723. * @ver : 2007.07.09
  724. * @by : 정찬성
  725. * @---------------------------------------------------
  726. * @type : function
  727. * @access : public
  728. * @desc : 혈액요청서 선택했을때...
  729. * @param :
  730. * @return :
  731. * @---------------------------------------------------
  732. */
  733. function fBlodReqDoc(){
  734. var sRowCnt = datagrid7.rows-datagrid7.fixedrows;
  735. var cnt = 0 ;
  736. model.removeNode ("/root/send/report");
  737. for(var i=1; i<= sRowCnt; i++){ // 선택한 값이 불출신청 상태인지 체크
  738. // alert(datagrid7.labelmatrix(i, 1));
  739. if( datagrid7.labelmatrix(i, 1) == "true" ) {
  740. cnt = cnt + 1;
  741. if( datagrid7.labelmatrix(i, 2) != "매칭검사" ) {
  742. messageBox("매칭검사 상태 이외에는 혈액요청서를 출력 ","E001");
  743. return;
  744. }
  745. if( datagrid7.labelmatrix(i, 8).length < 5 ) {
  746. messageBox("혈액번호가 ","I004");
  747. return;
  748. }
  749. model.makeValue("/root/send/report/delivedetlgrup/delivedetlgruplist["+cnt+"]","");
  750. model.copyNode( "/root/send/report/delivedetlgrup/delivedetlgruplist["+cnt+"]", "/root/main/cond/delivedetlgrup/delivedetlgruplist["+i+"]" );
  751. // alert(instance1.selectSingleNode("/root/send/report/delivedetlgrup/delivedetlgruplist"+"["+cnt+"]").xml);
  752. }
  753. }
  754. if(cnt < 1){
  755. messageBox("선택 정보가 ","I004");
  756. return;
  757. };
  758. model.makeValue("/root/send/report/patientnm",model.getValue("/root/main/cond/patientgrupInfo/patientgruplistInfo/patientnm") );
  759. model.makeValue("/root/send/report/pid",model.getValue("/root/main/cond/patientgrupInfo/patientgruplistInfo/pid") );
  760. model.makeValue("/root/send/report/sexage",model.getValue("/root/main/cond/patientgrupInfo/patientgruplistInfo/sexage") );
  761. model.makeValue("/root/send/report/btypee",model.getValue("/root/main/cond/patientgrupInfo/patientgruplistInfo/btype") );
  762. exeReportPreview("RFMNR01000", "XMLSTR");
  763. }
  764. /**
  765. * @group :
  766. * @ver : 2007.07.09
  767. * @by : 정찬성
  768. * @---------------------------------------------------
  769. * @type : function
  770. * @access : public
  771. * @desc : 혈액불출 내역 선택 삭제
  772. * @param :
  773. * @return :
  774. * @---------------------------------------------------
  775. */
  776. function fDelDeliveExecPrcp(){
  777. var sRowCnt = datagrid7.rows-datagrid7.fixedrows;
  778. var cnt = 0 ;
  779. for(var i=1; i<= sRowCnt; i++){ // 선택한 값이 불출신청 상태인지 체크
  780. // alert(datagrid7.labelmatrix(i, 1));
  781. if( datagrid7.labelmatrix(i, 1) == "true" ) {
  782. cnt = cnt + 1;
  783. if( datagrid7.labelmatrix(i, 2) != "불출신청" ) {
  784. messageBox("불출신청 이외의 상태에서는 삭제할 수 ","I004");
  785. return;
  786. }
  787. }
  788. }
  789. if(cnt < 1){
  790. messageBox("선택 정보가 ","I004");
  791. return;
  792. };
  793. alert("개발 중입니다.");
  794. return ;
  795. // model.removenode("/root/send");
  796. model.refresh();
  797. model.makeValue("/root/send/blodpidflag",blodpidflag);
  798. model.makeValue("/root/send/blodno", input13.value );
  799. model.makeValue("/root/send/prcpddfrom", input9.value );
  800. model.makeValue("/root/send/prcpddto", input10.value );
  801. model.makeValue("/root/send/wardcd", combo5.value );
  802. model.makeValue("/root/send/roomcd", combo1.value );
  803. model.makeValue("/root/send/hngnm", combo6.value );
  804. model.makeValue("/root/send/pid", input12.value );
  805. if(submit("TRMNR01021")){
  806. }
  807. //model.setfocus("input13");
  808. fGetExecDetlList();// 수행처방내역리스트
  809. fGettDeliveDetlList();// 불출신청 내역 리스트
  810. }
  811. /**
  812. * @group :
  813. * @ver : 2007.07.16
  814. * @by : 정찬성
  815. * @---------------------------------------------------
  816. * @type : function
  817. * @access : public
  818. * @desc : 수혈 미수행 내역 리스트
  819. * @param :
  820. * @return :
  821. * @---------------------------------------------------
  822. */
  823. function fGetBlodNoExecRecList(blodpidflag){
  824. var sRowCnt = datagrid5.rows-datagrid5.fixedrows;
  825. if( model.getValue("/root/main/cond/patientgrupInfo/patientgruplistInfo/pid") == "" && model.getValue("/root/main/cond/blodno") == "" ){
  826. messageBox("혈액번호/등록번호를 ","C001");
  827. model.setfocus("input13");
  828. return;
  829. }
  830. /* HSCT Infusion기록 내용 초기화 */
  831. fClearChildNode("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist");
  832. fClearChildNode("/root/main/cond/tnsnursereccdgrup/sideeffectcomcodelist");
  833. fClearChildNode("/root/main/cond/tnsnursereccdgrup/discontinucomcodelist");
  834. model.refresh();
  835. model.makeValue("/root/send/blodpidflag",blodpidflag);
  836. model.makeValue("/root/send/blodno", input13.value );
  837. model.makeValue("/root/send/prcpddfrom", input9.value );
  838. model.makeValue("/root/send/prcpddto", input10.value );
  839. model.makeValue("/root/send/wardcd", combo5.value );
  840. model.makeValue("/root/send/roomcd", combo1.value );
  841. model.makeValue("/root/send/hngnm", combo6.value );
  842. model.makeValue("/root/send/pid", input12.value );
  843. if(submit("TRMNR01021")){
  844. }
  845. }
  846. /**
  847. * @group :
  848. * @ver : 2007.05.09
  849. * @by : 정찬성
  850. * @---------------------------------------------------
  851. * @type : function
  852. * @access : public
  853. * @desc : 혈액불출내역의 혈액반납의뢰 저장
  854. * @param :
  855. * @return :
  856. * @---------------------------------------------------
  857. */
  858. function fBlodReturnSave(){
  859. var sRowCnt = datagrid1.rows-datagrid1.fixedrows;
  860. var cnt = 0 ;
  861. model.removenode("/root/send");
  862. model.makeValue("/root/send/detlgrup",datagrid1.getupdatedataAll("i"));
  863. var saveyn = 0 ;
  864. for(var i=1; i<= sRowCnt; i++){
  865. //alert(datagrid1.labelmatrix(i, 1));
  866. if( datagrid1.labelmatrix(i, 1) == "true" ) {
  867. cnt = cnt + 1;
  868. // ****************************** 반납사유 필수 로직 추가 ***************************************
  869. //alert(model.getValue(xBlodReturnReqGrupListPath+"["+i+"]/etcprcpresncd"));
  870. if(model.getValue(xBlodReturnReqGrupListPath+"["+i+"]/reqflag") == "-" || model.getValue(xBlodReturnReqGrupListPath+"["+i+"]/reqflag") == ""){//반납/폐기를 체크
  871. messageBox("반납/폐기를 ","C002");
  872. return;
  873. }
  874. if(model.getValue(xBlodReturnReqGrupListPath+"["+i+"]/returnabandondate") == "-" || model.getValue(xBlodReturnReqGrupListPath+"["+i+"]/returnabandondate") == ""){//반납/폐기일 체크
  875. messageBox("반납/폐기일을 ","C002");
  876. return;
  877. }
  878. if(model.getValue(xBlodReturnReqGrupListPath+"["+i+"]/etcprcpresncd") == "-" || model.getValue(xBlodReturnReqGrupListPath+"["+i+"]/etcprcpresncd") == ""){//반납사유 체크
  879. messageBox("반납/폐기 사유를 ","C002");
  880. return;
  881. }
  882. }
  883. }
  884. if(cnt < 1){
  885. messageBox("선택 정보가 ","I004");
  886. return;
  887. };
  888. if(submit("TXMNR01030")){
  889. model.copyNode("/root/hidden/main","/root/main");
  890. }
  891. /* 반납/폐기 이후 정보 조회 실행 */
  892. var pidblodflag = '';
  893. if(input12.value != ""){
  894. pidblodflag = 'pid';
  895. } else if (input13.value !="") {
  896. pidblodflag = 'blod';
  897. }
  898. fBlodDeliveList(pidblodflag); //혈액불출 리스트 조회버튼
  899. fGetBlodNoExecRecList(pidblodflag); //수혈 미수행 내역 리스트
  900. }
  901. /**
  902. * @group :
  903. * @ver : 2007.07.16
  904. * @by : 정찬성
  905. * @---------------------------------------------------
  906. * @type : function
  907. * @access : public
  908. * @desc : 혈액불출 내역 조회 리스트
  909. * @param :
  910. * @return :
  911. * @---------------------------------------------------
  912. */
  913. function fBlodDeliveList(blodpidflag){
  914. var sRowCnt = datagrid5.rows-datagrid5.fixedrows;
  915. if( model.getValue("/root/main/cond/patientgrupInfo/patientgruplistInfo/pid") == "" && model.getValue("/root/main/cond/blodno") == "" ){
  916. messageBox("혈액번호/등록번호를 ","C001");
  917. model.setfocus("input13");
  918. return;
  919. }
  920. model.removenode("/root/send");
  921. model.refresh();
  922. model.makeValue("/root/send/blodpidflag",blodpidflag);
  923. model.makeValue("/root/send/blodno", input13.value );
  924. model.makeValue("/root/send/prcpddfrom", input9.value );
  925. model.makeValue("/root/send/prcpddto", input10.value );
  926. model.makeValue("/root/send/wardcd", combo5.value );
  927. model.makeValue("/root/send/roomcd", combo1.value );
  928. model.makeValue("/root/send/hngnm", combo6.value );
  929. model.makeValue("/root/send/pid", input12.value );
  930. if(submit("TRMNR01020")){
  931. }
  932. model.setfocus("input13");
  933. }
  934. /**
  935. * @group :
  936. * @ver : 2007.06.18
  937. * @by : 정찬성
  938. * @---------------------------------------------------
  939. * @type : function
  940. * @access : public
  941. * @desc : 불출신청 내역 조회 리스트
  942. * @param :
  943. * @return :
  944. * @---------------------------------------------------
  945. */
  946. function fGettDeliveDetlList(){
  947. if( model.getValue("/root/main/cond/wardcdgrup/wardcdgruplist") == "" ){
  948. // messageBox("병동을 ","C002");
  949. // model.setfocus("combo7");
  950. // return;
  951. }
  952. model.removenode("/root/send");
  953. model.makeValue("/root/send/prcpddfrom", input2.value);
  954. model.makeValue("/root/send/prcpddto", input11.value);
  955. model.makeValue("/root/send/wardcd", combo7.value);
  956. model.makeValue("/root/send/roomcd", combo2.value);
  957. model.makeValue("/root/send/hngnm", combo8.value);
  958. model.makeValue("/root/send/pid", input3.value);
  959. if(submit("TRMNR01009")){
  960. }
  961. }
  962. /**
  963. * @group :
  964. * @ver : 2007.04.02
  965. * @by : 정찬성
  966. * @---------------------------------------------------
  967. * @type : function
  968. * @access : public
  969. * @desc : 수행처방 선택시 체크사항
  970. * @param :
  971. * @return :
  972. * @---------------------------------------------------
  973. */
  974. function fSelchange(){
  975. var iRow = datagrid5.row ;
  976. // alert(parseInt(model.getValue(xExecDetlListPath+"["+iRow+"]/prcpqty")));
  977. //
  978. // alert(parseInt(model.getValue(xExecDetlListPath+"["+iRow+"]/appno")));
  979. if( parseInt(model.getValue(xExecDetlListPath+"["+iRow+"]/prcpqty")) <= parseInt(model.getValue(xExecDetlListPath+"["+iRow+"]/appno")) ) {
  980. model.setValue(xExecDetlListPath+"["+iRow+"]/sel", "false" ) ;
  981. messageBox("신청수량이 처방수량보다 클 수 ","I004");
  982. return;
  983. }
  984. if( model.getValue(xExecDetlListPath+"["+iRow+"]/prcpstatcd") == "D/C") {
  985. model.setValue(xExecDetlListPath+"["+iRow+"]/sel", "false" ) ;
  986. messageBox("D/C 상태에서는 신청할 수 ","I004");
  987. return;
  988. } else if( model.getValue(xExecDetlListPath+"["+iRow+"]/prcpstatcd") == "의사") {
  989. model.setValue(xExecDetlListPath+"["+iRow+"]/sel", "false" ) ;
  990. messageBox("의사 상태에서는 신청할 수 ","I004");
  991. return;
  992. } else if( model.getValue(xExecDetlListPath+"["+iRow+"]/prcpstatcd") == "완료") {
  993. model.setValue(xExecDetlListPath+"["+iRow+"]/sel", "false" ) ;
  994. messageBox("완료 상태에서는 신청할 수 ","I004");
  995. return;
  996. }
  997. }
  998. /**
  999. * @group :
  1000. * @ver : 2007.04.02
  1001. * @by : 정찬성
  1002. * @---------------------------------------------------
  1003. * @type : function
  1004. * @access : public
  1005. * @desc : 그리드의 값이 변경되었을때, 상태값을 변경한다.
  1006. * @param :
  1007. * @return :
  1008. * @---------------------------------------------------
  1009. */
  1010. function fChangedGridCol(){
  1011. var sDetlGrupRow = datagrid5.row;
  1012. var sDetlGrupBKRow=0;
  1013. var num = model.getValue(xPopWndExecDetlListPath+"["+sDetlGrupRow+"]/num");
  1014. for(var i=1; i<= getNodesetCount(xPopWndClsListBKPath); i++){
  1015. if(model.getValue(xPopWndClsListBKPath+"["+i+"]/num") == num){
  1016. sDetlGrupBKRow = i;
  1017. break;
  1018. }
  1019. }
  1020. if(event.keyCode == "32") {
  1021. messageBox("신청수량에 스페이스를 넣을 수 ","I004");
  1022. model.setValue(xPopWndExecDetlListPath+"["+sDetlGrupRow+"]/stat","-");
  1023. model.setValue(xPopWndExecDetlListPath+"["+sDetlGrupRow+"]/appno","");
  1024. datagrid5.refresh();
  1025. return;
  1026. }
  1027. var irr = datagrid5.textmatrix(sDetlGrupRow,6) ;
  1028. if(model.getValue(xPopWndExecDetlListPath+"["+sDetlGrupRow+"]/appno") == "0" || model.getValue(xPopWndExecDetlListPath+"["+sDetlGrupRow+"]/appno") == ""){
  1029. model.setValue(xPopWndExecDetlListPath+"["+sDetlGrupRow+"]/stat","-");
  1030. datagrid5.rebuild();
  1031. //return;
  1032. }
  1033. // alert(instance1.selectSingleNode(xPopWndExecDetlListPath+"["+sDetlGrupRow+"]").xml);
  1034. //
  1035. // alert(instance1.selectSingleNode(xPopWndClsListBKPath+"["+sDetlGrupBKRow+"]").xml);
  1036. if(instance1.selectSingleNode(xPopWndExecDetlListPath+"["+sDetlGrupRow+"]").xml != instance1.selectSingleNode(xPopWndClsListBKPath+"["+sDetlGrupBKRow+"]").xml){
  1037. model.setValue(xPopWndExecDetlListPath+"["+sDetlGrupRow+"]/stat","I");
  1038. datagrid5.rebuild();
  1039. }
  1040. }
  1041. /**
  1042. * @group :
  1043. * @ver : 2007.05.09
  1044. * @by : 정찬성
  1045. * @---------------------------------------------------
  1046. * @type : function
  1047. * @access : public
  1048. * @desc : 혈액불출관리 init
  1049. * @param :
  1050. * @return :
  1051. * @---------------------------------------------------
  1052. */
  1053. function fPopWndSave(){
  1054. var sRowCnt = datagrid5.rows-datagrid5.fixedrows;
  1055. model.removenode("/root/send");
  1056. model.makeValue("/root/send/detlgrup",datagrid5.getupdatedataAll("i"));
  1057. var saveyn = 0 ;
  1058. for(var i=1; i<= sRowCnt; i++){
  1059. if(model.getValue(xPopWndExecDetlListPath+"["+i+"]/stat") != "-") {
  1060. saveyn = 1 ;
  1061. }
  1062. if(model.getValue(xPopWndExecDetlListPath+"["+i+"]/stat") != "-" && model.getValue(xPopWndExecDetlListPath+"["+i+"]/appno") == ""){
  1063. messageBox("신청수량은 ","I003");
  1064. return;
  1065. }
  1066. // if( !isNumber(model.getValue(xPopWndExecDetlListPath+"["+i+"]/appno")) ) {
  1067. //
  1068. // messageBox("숫자형을 ","C001");
  1069. // return;
  1070. //
  1071. // }
  1072. if( parseInt(model.getValue(xPopWndExecDetlListPath+"["+i+"]/appno")) < 1 || parseInt(model.getValue(xPopWndExecDetlListPath+"["+i+"]/appno")) == " " ) {
  1073. messageBox("신청수량은 1건 이하로 입력할 수 ","E001");
  1074. return;
  1075. }
  1076. if( parseInt(model.getValue(xPopWndExecDetlListPath+"["+i+"]/delivepossno")) < parseInt(model.getValue(xPopWndExecDetlListPath+"["+i+"]/appno")) ) {
  1077. messageBox("신청수량은 불출수량보다 크게 입력 ","E001");
  1078. return;
  1079. }
  1080. // alert( model.getValue(xPopWndExecDetlListPath+"["+i+"]/prcphopedd") );
  1081. // alert( model.getValue(xPopWndExecDetlListPath+"["+i+"]/prcphopetm") );
  1082. if(model.getValue(xPopWndExecDetlListPath+"["+i+"]/prcphopedd") == "" || model.getValue(xPopWndExecDetlListPath+"["+i+"]/prcphopetm") == ""){
  1083. messageBox("예약일자/예약시간은 ","I003");
  1084. return;
  1085. }
  1086. }
  1087. if(saveyn <= 0 ){
  1088. messageBox("수정사항이 없어 저장 ","E001");
  1089. return;
  1090. }
  1091. //alert("result : " + saveyn);
  1092. // if(saveyn <= 0 ){
  1093. // messageBox("수정사항이 없어 저장 ","E001");
  1094. // return;
  1095. // }
  1096. //alert(model.getValue("/root/main/cond/clsflag"));
  1097. //alert(model.getValue("/root/main/cond/recflag"));
  1098. //if(messageBox("","Q002") != 6) return;
  1099. //alert(model.getValue("/root/main/cond/todd"));
  1100. // model.makeValue("/root/send/lrggrupcd", model.getValue(xCondPath+"/lrggrupcd"));
  1101. // model.makeValue("/root/send/clsflag", model.getValue("/root/main/cond/clsflag"));
  1102. // model.makeValue("/root/send/recflag", model.getValue("/root/main/cond/recflag"))
  1103. // model.makeValue("/root/send/todd2", model.getValue("/root/main/cond/todd"))
  1104. //alert(model.getValue("/root/send/todd2"));
  1105. if(submit("TXMNR01008")){
  1106. model.copyNode("/root/hidden/main","/root/main");
  1107. }
  1108. // grd_detlgrup.row = 1;
  1109. window.close();
  1110. }
  1111. /**
  1112. * @group :
  1113. * @ver : 2007.05.09
  1114. * @by : 정찬성
  1115. * @---------------------------------------------------
  1116. * @type : function
  1117. * @access : public
  1118. * @desc : 혈액불출관리 init
  1119. * @param :
  1120. * @return :
  1121. * @---------------------------------------------------
  1122. */
  1123. function fPopWndInit(){
  1124. model.makeValue("/root/send/prcpddfrom", opener.window.javascript.getParameter("prcpddfrom") );
  1125. model.makeValue("/root/send/prcpddto", opener.window.javascript.getParameter("prcpddto") );
  1126. model.makeValue("/root/send/wardcd", opener.window.javascript.getParameter("wardcd") );
  1127. model.makeValue("/root/send/roomcd", opener.window.javascript.getParameter("roomcd") );
  1128. model.makeValue("/root/send/pid", opener.window.javascript.getParameter("pid") );
  1129. model.makeValue("/root/send/queryprcpdd", opener.window.javascript.getParameter("queryprcpdd") );
  1130. model.makeValue("/root/send/queryprcpno", opener.window.javascript.getParameter("queryprcpno") );
  1131. model.makeValue("/root/send/queryprcphistno", opener.window.javascript.getParameter("queryprcphistno") );
  1132. //alert(prcpddfrom); alert(prcpddto); alert(wardcd); alert(roomcd); alert(pid);
  1133. if(submit("TRMNR01007")){
  1134. model.copyNode("/root/temp/main","/root/main");
  1135. }
  1136. }
  1137. /**
  1138. * @group :
  1139. * @ver : 2007.06.18
  1140. * @by : 정찬성
  1141. * @---------------------------------------------------
  1142. * @type : function
  1143. * @access : public
  1144. * @desc : 혈액불출신청 팝업
  1145. * @param :
  1146. * @return :
  1147. * @---------------------------------------------------
  1148. */
  1149. function fPopWnd(){
  1150. var iRows = datagrid5.rows;
  1151. var queryprcpdd = "" ;
  1152. var queryprcpno = "" ;
  1153. var queryprcphistno = "" ;
  1154. var checkcnt = 0 ;
  1155. for(var i = 1 ; i < datagrid5.rows; i++ ) {// 전체를 돌면서 그룹에 값이 체크되어 있는것 초기화
  1156. if( model.getValue(xExecDetlListPath+"["+ i +"]/sel") == "true" ) {
  1157. // alert("111");
  1158. queryprcpdd = queryprcpdd + "'" + model.getValue(xExecDetlListPath+"["+ i +"]/prcpdd2") + "'," ;
  1159. queryprcpno = queryprcpno + "" + model.getValue(xExecDetlListPath+"["+ i +"]/prcpno") + "," ;
  1160. // alert(model.getValue(xExecDetlListPath+"["+ i +"]/prcphistno"));
  1161. queryprcphistno = queryprcphistno + "" + model.getValue(xExecDetlListPath+"["+ i +"]/prcphistno") + "," ;
  1162. checkcnt++ ;
  1163. } else {
  1164. // alert("222");
  1165. }
  1166. }
  1167. if( checkcnt <= 0 ) {
  1168. messageBox("수혈처방내역을 ","C002");
  1169. return 0 ;
  1170. }
  1171. queryprcpdd = queryprcpdd.replace(/-/g,"")
  1172. // alert(queryprcpdd.replace(/-/g,""));
  1173. // alert(queryprcpdd.substr(0,queryprcpdd.length-1));
  1174. // alert(queryprcpno.substr(0,queryprcpno.length-1));
  1175. // alert(queryprcphistno.substr(0,queryprcphistno.length-1));
  1176. queryprcpdd = queryprcpdd.substr(0,queryprcpdd.length-1) ;
  1177. queryprcpno = queryprcpno.substr(0,queryprcpno.length-1) ;
  1178. queryprcphistno = queryprcphistno.substr(0,queryprcphistno.length-1) ;
  1179. // for(var i = 0 ; i < data.length; i++ ) {
  1180. //
  1181. // queryprcpno = queryprcpno + data[i] ;
  1182. //
  1183. // }
  1184. setParameter("prcpddfrom", input2.value);
  1185. setParameter("prcpddto", input11.value);
  1186. setParameter("wardcd", combo7.value);
  1187. setParameter("roomcd", combo2.value);
  1188. setParameter("pid", input3.value);
  1189. setParameter("queryprcpdd", queryprcpdd);
  1190. setParameter("queryprcpno", queryprcpno);
  1191. setParameter("queryprcphistno", queryprcphistno);
  1192. var left = event.screenX-1000;
  1193. var top = event.screenY+50;
  1194. modal("SMMNR01001",1,left,top);
  1195. }
  1196. /**
  1197. * @group :
  1198. * @ver : 2007.06.18
  1199. * @by : 정찬성
  1200. * @---------------------------------------------------
  1201. * @type : function
  1202. * @access : public
  1203. * @desc : 수행처방내역 조회 리스트
  1204. * @param :
  1205. * @return :
  1206. * @---------------------------------------------------
  1207. */
  1208. function fGetExecDetlList(){
  1209. if( model.getValue("/root/main/cond/wardcdgrup/wardcdgruplist") == "" ){
  1210. // messageBox("병동을 ","C002");
  1211. // model.setfocus("combo7");
  1212. // return;
  1213. }
  1214. model.removenode("/root/send");
  1215. model.makeValue("/root/send/prcpddfrom", input2.value);
  1216. model.makeValue("/root/send/prcpddto", input11.value);
  1217. model.makeValue("/root/send/wardcd", combo7.value);
  1218. model.makeValue("/root/send/roomcd", combo2.value);
  1219. model.makeValue("/root/send/hngnm", combo8.value);
  1220. model.makeValue("/root/send/pid", input3.value);
  1221. if(submit("TRMNR01006")){
  1222. }
  1223. }
  1224. /**
  1225. * @group :
  1226. * @ver : 2007.06.18
  1227. * @by : 정찬성
  1228. * @---------------------------------------------------
  1229. * @type : function
  1230. * @access : public
  1231. * @desc : 환자 정보 조회 combo
  1232. * @param :
  1233. * @return :
  1234. * @---------------------------------------------------
  1235. */
  1236. function fGetPatientList(){
  1237. model.removenode("/root/send");
  1238. model.makeValue("/root/send/wardcd", combo7.value);
  1239. model.makeValue("/root/send/roomcd", combo2.value);
  1240. if(submit("TRMNR01004")){
  1241. }
  1242. model.setfocus("combo8");
  1243. }
  1244. /**
  1245. * @group :
  1246. * @ver : 2007.06.18
  1247. * @by : 정찬성
  1248. * @---------------------------------------------------
  1249. * @type : function
  1250. * @access : public
  1251. * @desc : 병실 조회 combo
  1252. * @param :
  1253. * @return :
  1254. * @---------------------------------------------------
  1255. */
  1256. function fGetRoomList(){
  1257. model.removenode("/root/send");
  1258. model.makeValue("/root/send/wardcd", cmb_wardcd.value);
  1259. //alert(cmb_wardcd.value);
  1260. if(submit("TRMNR01003")){
  1261. }
  1262. model.setfocus("combo2");
  1263. }
  1264. /**
  1265. * @group :
  1266. * @ver : 2007.06.18
  1267. * @by : 정찬성
  1268. * @---------------------------------------------------
  1269. * @type : function
  1270. * @access : public
  1271. * @desc : 병동 조회
  1272. * @param :
  1273. * @return :
  1274. * @---------------------------------------------------
  1275. */
  1276. function fGetWardList(){
  1277. model.removenode("/root/send");
  1278. model.makeValue("/root/send/wardcd", model.getValue("/root/main/cond/wardcdgrup/wardcdgruplist/wardcd"));
  1279. if(submit("TRMNR01002")){
  1280. }
  1281. // model.setfocus("combo7");
  1282. }
  1283. /**
  1284. * @group :
  1285. * @ver : 2007.05.09
  1286. * @by : 정찬성
  1287. * @---------------------------------------------------
  1288. * @type : function
  1289. * @access : public
  1290. * @desc : 혈액불출관리 init
  1291. * @param :
  1292. * @return :
  1293. * @---------------------------------------------------
  1294. */
  1295. function fInit(){
  1296. fGetWardList();// 병동코드 리스트
  1297. }
  1298. /* 혈액불출 스크립트 참조 끝 */