SMMNR077.js 40 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685
  1. /*
  2. (SMMNR07700_혈액반납의뢰.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. /**
  21. * @group :
  22. * @ver : 2007.05.09
  23. * @by : 정찬성
  24. * @---------------------------------------------------
  25. * @type : function
  26. * @access : public
  27. * @desc : 혈액반납의뢰 저장
  28. * @param :
  29. * @return :
  30. * @---------------------------------------------------
  31. */
  32. function fBlodReturnSave(){
  33. var sRowCnt = datagrid5.rows-datagrid5.fixedrows;
  34. model.removenode("/root/send");
  35. model.makeValue("/root/send/detlgrup",datagrid5.getupdatedataAll("i"));
  36. var saveyn = 0 ;
  37. for(var i=1; i<= sRowCnt; i++){
  38. // ****************************** 반납사유 필수 로직 추가 ***************************************
  39. //alert(model.getValue(xBlodReturnReqGrupListPath+"["+i+"]/etcprcpresncd"));
  40. if(model.getValue(xBlodReturnReqGrupListPath+"["+i+"]/etcprcpresncd") == "-" || model.getValue(xBlodReturnReqGrupListPath+"["+i+"]/etcprcpresncd") == ""){//반납사유 필수 체크
  41. messageBox("반납사유코드는 ","I003");
  42. model.setfocus("input13");
  43. return;
  44. }
  45. }
  46. if(submit("TXMNR07705")){
  47. model.copyNode("/root/hidden/main","/root/main");
  48. }
  49. model.setfocus("input13");
  50. }
  51. /**
  52. * @group :
  53. * @ver : 2007.07.16
  54. * @by : 정찬성
  55. * @---------------------------------------------------
  56. * @type : function
  57. * @access : public
  58. * @desc : 혈액반납 내역 조회 리스트
  59. * @param :
  60. * @return :
  61. * @---------------------------------------------------
  62. */
  63. function fBlodReturnReqList(){
  64. var sRowCnt = datagrid5.rows-datagrid5.fixedrows;
  65. if( model.getValue("/root/main/cond/blodno") == "" ){
  66. messageBox("혈액번호를 ","C001");
  67. model.setfocus("input13");
  68. return;
  69. }
  70. for(var i=1; i<= sRowCnt; i++){ // 반납의뢰 혈액번호가 중복되었는지 체크
  71. if( input13.value == model.getValue("/root/main/cond/blodreturnreqgrup["+i+"]/blodreturnreqgruplist["+1+"]/blodno") ) {
  72. messageBox("이미 조회된 등록번호 ","E008");
  73. model.setfocus("input13");
  74. return;
  75. }
  76. }
  77. model.removenode("/root/send");
  78. model.refresh();
  79. model.makeValue("/root/send/blodno", input13.value );
  80. if(submit("TRMNR07701")){
  81. }
  82. model.setfocus("input13");
  83. }
  84. /**
  85. * @group :
  86. * @ver : 2007.07.09
  87. * @by : 정찬성
  88. * @---------------------------------------------------
  89. * @type : function
  90. * @access : public
  91. * @desc : 혈액불출 내역 선택 삭제
  92. * @param :
  93. * @return :
  94. * @---------------------------------------------------
  95. */
  96. function fDelDeliveExecPrcp(){
  97. var sRowCnt = datagrid7.rows-datagrid7.fixedrows;
  98. model.removenode("/root/send");
  99. model.makeValue("/root/send/detlgrup",datagrid7.getupdatedataAll("i"));
  100. //alert(datagrid7.getupdatedataAll("i"));
  101. var saveyn = 0 ;
  102. // for(var i=1; i<= sRowCnt; i++){
  103. //
  104. // if(model.getValue(xDelDeliveExecPrcpListPath+"["+i+"]/stat") != "-") {
  105. //
  106. // saveyn = 1 ;
  107. //
  108. // }
  109. //
  110. // if(model.getValue(xDelDeliveExecPrcpListPath+"["+i+"]/stat") != "-" && model.getValue(xDelDeliveExecPrcpListPath+"["+i+"]/appno") == ""){
  111. // messageBox("신청수량은 ","I003");
  112. // return;
  113. // }
  114. //
  115. // if( parseInt(model.getValue(xDelDeliveExecPrcpListPath+"["+i+"]/prcpqty")) < parseInt(model.getValue(xDelDeliveExecPrcpListPath+"["+i+"]/appno")) ) {
  116. //
  117. // messageBox("신청수량은 불출수량보다 크게 입력 ","E001");
  118. // return;
  119. // }
  120. //
  121. // }
  122. //
  123. // if(saveyn <= 0 ){
  124. // messageBox("수정사항이 없어 저장 ","E001");
  125. // return;
  126. // }
  127. //alert("result : " + saveyn);
  128. // if(saveyn <= 0 ){
  129. // messageBox("수정사항이 없어 저장 ","E001");
  130. // return;
  131. // }
  132. //alert(model.getValue("/root/main/cond/clsflag"));
  133. //alert(model.getValue("/root/main/cond/recflag"));
  134. //if(messageBox("","Q002") != 6) return;
  135. //alert(model.getValue("/root/main/cond/todd"));
  136. // model.makeValue("/root/send/lrggrupcd", model.getValue(xCondPath+"/lrggrupcd"));
  137. // model.makeValue("/root/send/clsflag", model.getValue("/root/main/cond/clsflag"));
  138. // model.makeValue("/root/send/recflag", model.getValue("/root/main/cond/recflag"))
  139. // model.makeValue("/root/send/todd2", model.getValue("/root/main/cond/todd"))
  140. //alert(model.getValue("/root/send/todd2"));
  141. if(submit("TXMNR01010")){
  142. model.copyNode("/root/hidden/main","/root/main");
  143. }
  144. }
  145. /**
  146. * @group :
  147. * @ver : 2007.04.02
  148. * @by : 정찬성
  149. * @---------------------------------------------------
  150. * @type : function
  151. * @access : public
  152. * @desc : 수행처방 선택시 체크사항
  153. * @param :
  154. * @return :
  155. * @---------------------------------------------------
  156. */
  157. function fSelchange(){
  158. var iRow = datagrid5.row ;
  159. // alert(parseInt(model.getValue(xExecDetlListPath+"["+iRow+"]/prcpqty")));
  160. //
  161. // alert(parseInt(model.getValue(xExecDetlListPath+"["+iRow+"]/appno")));
  162. if( parseInt(model.getValue(xExecDetlListPath+"["+iRow+"]/prcpqty")) <= parseInt(model.getValue(xExecDetlListPath+"["+iRow+"]/appno")) ) {
  163. model.setValue(xExecDetlListPath+"["+iRow+"]/sel", "false" ) ;
  164. messageBox("신청수량이 처방수량보다 클 수 ","I004");
  165. return;
  166. }
  167. if( model.getValue(xExecDetlListPath+"["+iRow+"]/prcpstatcd") == "D/C") {
  168. model.setValue(xExecDetlListPath+"["+iRow+"]/sel", "false" ) ;
  169. messageBox("D/C 상태에서는 신청할 수 ","I004");
  170. return;
  171. } else if( model.getValue(xExecDetlListPath+"["+iRow+"]/prcpstatcd") == "의사") {
  172. model.setValue(xExecDetlListPath+"["+iRow+"]/sel", "false" ) ;
  173. messageBox("의사 상태에서는 신청할 수 ","I004");
  174. return;
  175. } else if( model.getValue(xExecDetlListPath+"["+iRow+"]/prcpstatcd") == "완료") {
  176. model.setValue(xExecDetlListPath+"["+iRow+"]/sel", "false" ) ;
  177. messageBox("완료 상태에서는 신청할 수 ","I004");
  178. return;
  179. }
  180. }
  181. /**
  182. * @group :
  183. * @ver : 2007.04.02
  184. * @by : 정찬성
  185. * @---------------------------------------------------
  186. * @type : function
  187. * @access : public
  188. * @desc : 그리드의 값이 변경되었을때, 상태값을 변경한다.
  189. * @param :
  190. * @return :
  191. * @---------------------------------------------------
  192. */
  193. function fChangedGridCol(){
  194. var sDetlGrupRow = datagrid5.row;
  195. var sDetlGrupBKRow=0;
  196. var num = model.getValue(xPopWndExecDetlListPath+"["+sDetlGrupRow+"]/num");
  197. for(var i=1; i<= getNodesetCount(xPopWndClsListBKPath); i++){
  198. if(model.getValue(xPopWndClsListBKPath+"["+i+"]/num") == num){
  199. sDetlGrupBKRow = i;
  200. break;
  201. }
  202. }
  203. if(event.keyCode == "32") {
  204. messageBox("신청수량에 스페이스를 넣을 수 ","I004");
  205. model.setValue(xPopWndExecDetlListPath+"["+sDetlGrupRow+"]/stat","-");
  206. model.setValue(xPopWndExecDetlListPath+"["+sDetlGrupRow+"]/appno","");
  207. datagrid5.refresh();
  208. return;
  209. }
  210. var irr = datagrid5.textmatrix(sDetlGrupRow,6) ;
  211. if(model.getValue(xPopWndExecDetlListPath+"["+sDetlGrupRow+"]/appno") == "0" || model.getValue(xPopWndExecDetlListPath+"["+sDetlGrupRow+"]/appno") == ""){
  212. model.setValue(xPopWndExecDetlListPath+"["+sDetlGrupRow+"]/stat","-");
  213. datagrid5.rebuild();
  214. //return;
  215. }
  216. // alert(instance1.selectSingleNode(xPopWndExecDetlListPath+"["+sDetlGrupRow+"]").xml);
  217. //
  218. // alert(instance1.selectSingleNode(xPopWndClsListBKPath+"["+sDetlGrupBKRow+"]").xml);
  219. if(instance1.selectSingleNode(xPopWndExecDetlListPath+"["+sDetlGrupRow+"]").xml != instance1.selectSingleNode(xPopWndClsListBKPath+"["+sDetlGrupBKRow+"]").xml){
  220. model.setValue(xPopWndExecDetlListPath+"["+sDetlGrupRow+"]/stat","I");
  221. datagrid5.rebuild();
  222. }
  223. }
  224. /**
  225. * @group :
  226. * @ver : 2007.05.09
  227. * @by : 정찬성
  228. * @---------------------------------------------------
  229. * @type : function
  230. * @access : public
  231. * @desc : 혈액불출관리 init
  232. * @param :
  233. * @return :
  234. * @---------------------------------------------------
  235. */
  236. function fPopWndInit(){
  237. model.makeValue("/root/send/prcpddfrom", opener.window.javascript.getParameter("prcpddfrom") );
  238. model.makeValue("/root/send/prcpddto", opener.window.javascript.getParameter("prcpddto") );
  239. model.makeValue("/root/send/wardcd", opener.window.javascript.getParameter("wardcd") );
  240. model.makeValue("/root/send/roomcd", opener.window.javascript.getParameter("roomcd") );
  241. model.makeValue("/root/send/pid", opener.window.javascript.getParameter("pid") );
  242. model.makeValue("/root/send/queryprcpdd", opener.window.javascript.getParameter("queryprcpdd") );
  243. model.makeValue("/root/send/queryprcpno", opener.window.javascript.getParameter("queryprcpno") );
  244. model.makeValue("/root/send/queryprcphistno", opener.window.javascript.getParameter("queryprcphistno") );
  245. //alert(prcpddfrom); alert(prcpddto); alert(wardcd); alert(roomcd); alert(pid);
  246. if(submit("TRMNR01007")){
  247. model.copyNode("/root/temp/main","/root/main");
  248. }
  249. }
  250. /**
  251. * @group :
  252. * @ver : 2007.07.16
  253. * @by : 정찬성
  254. * @---------------------------------------------------
  255. * @type : function
  256. * @access : public
  257. * @desc : 수행처방내역 조회 리스트
  258. * @param :
  259. * @return :
  260. * @---------------------------------------------------
  261. */
  262. function fGetExecDetlList(){
  263. if( model.getValue("/root/main/cond/wardcdgrup/wardcdgruplist") == "" ){
  264. // messageBox("병동을 ","C002");
  265. // model.setfocus("combo7");
  266. // return;
  267. }
  268. model.removenode("/root/send");
  269. model.makeValue("/root/send/prcpddfrom", input2.value);
  270. model.makeValue("/root/send/prcpddto", input11.value);
  271. model.makeValue("/root/send/wardcd", combo7.value);
  272. model.makeValue("/root/send/roomcd", combo2.value);
  273. model.makeValue("/root/send/hngnm", combo8.value);
  274. model.makeValue("/root/send/pid", input3.value);
  275. if(submit("TRMNR01006")){
  276. }
  277. }
  278. /**
  279. * @group :
  280. * @ver : 2007.07.16
  281. * @by : 정찬성
  282. * @---------------------------------------------------
  283. * @type : function
  284. * @access : public
  285. * @desc : 환자 상세정보 조회 combo
  286. * @param :
  287. * @return :
  288. * @---------------------------------------------------
  289. */
  290. function fGetPatientInfo(){
  291. model.removenode("/root/send");
  292. model.makeValue("/root/send/wardcd", combo7.value);
  293. model.makeValue("/root/send/roomcd", combo2.value);
  294. if( input3.value != "" ){
  295. model.makeValue("/root/send/pid", input3.value);
  296. } else if( model.makeValue("/root/send/pid", combo8.value) != "" ){
  297. model.makeValue("/root/send/pid", combo8.value);
  298. }
  299. if(submit("TRMNR01005")){
  300. }
  301. model.setfocus("button3");
  302. }
  303. /**
  304. * @group :
  305. * @ver : 2007.07.16
  306. * @by : 정찬성
  307. * @---------------------------------------------------
  308. * @type : function
  309. * @access : public
  310. * @desc : 환자 정보 조회 combo
  311. * @param :
  312. * @return :
  313. * @---------------------------------------------------
  314. */
  315. function fGetPatientList(){
  316. model.removenode("/root/send");
  317. model.makeValue("/root/send/wardcd", combo7.value);
  318. model.makeValue("/root/send/roomcd", combo2.value);
  319. if(submit("TRMNR01004")){
  320. }
  321. model.setfocus("combo8");
  322. }
  323. /**
  324. * @group :
  325. * @ver : 2007.07.16
  326. * @by : 정찬성
  327. * @---------------------------------------------------
  328. * @type : function
  329. * @access : public
  330. * @desc : 병실 조회 combo
  331. * @param :
  332. * @return :
  333. * @---------------------------------------------------
  334. */
  335. function fGetRoomList(){
  336. model.removenode("/root/send");
  337. model.makeValue("/root/send/wardcd", cmb_wardcd.value);
  338. //alert(cmb_wardcd.value);
  339. if(submit("TRMNR01003")){
  340. }
  341. model.setfocus("combo2");
  342. }
  343. /**
  344. * @group :
  345. * @ver : 2007.07.16
  346. * @by : 정찬성
  347. * @---------------------------------------------------
  348. * @type : function
  349. * @access : public
  350. * @desc : 병동 조회
  351. * @param :
  352. * @return :
  353. * @---------------------------------------------------
  354. */
  355. function fGetWardList(){
  356. model.removenode("/root/send");
  357. model.makeValue("/root/send/wardcd", model.getValue("/root/main/cond/wardcdgrup/wardcdgruplist/wardcd"));
  358. if(submit("TRMNR01002")){
  359. }
  360. model.setfocus("combo7");
  361. }
  362. /**
  363. * @group :
  364. * @ver : 2007.05.09
  365. * @by : 정찬성
  366. * @---------------------------------------------------
  367. * @type : function
  368. * @access : public
  369. * @desc : 혈액불출관리 init
  370. * @param :
  371. * @return :
  372. * @---------------------------------------------------
  373. */
  374. function fInit(){
  375. fGetWardList();// 병동코드 리스트
  376. }
  377. /**
  378. * @group :
  379. * @ver : 2007.05.09
  380. * @by : 정찬성
  381. * @---------------------------------------------------
  382. * @type : function
  383. * @access : public
  384. * @desc : 중증도 등록버튼 누를때, 최근값으로 상세내역 셋팅
  385. * @param :
  386. * @return :
  387. * @---------------------------------------------------
  388. */
  389. function fRecHistPntListInsert(){
  390. // alert();
  391. var iRow = datagrid2.row;
  392. model.removenode("/root/send");
  393. model.makeValue("/root/send/execdt", model.getvalue(xRecgrupListPath+"["+iRow+"]/execdt"));
  394. model.makeValue("/root/send/pid", model.getvalue("/root/main/recgrup/rectmaxvallist/pid"));
  395. model.makeValue("/root/send/clsflag", model.getvalue("/root/main/recgrup/rectmaxvallist/clsflag"));
  396. model.makeValue("/root/send/recflag", model.getvalue("/root/main/recgrup/rectmaxvallist/recflag"));
  397. model.makeValue("/root/send/grupcd", model.getvalue("/root/main/recgrup/rectmaxvallist/grupcd"));
  398. // model.setValue("/root/main/hiddengrup/grupcd",model.getValue("/root/main/recgrup/rectmaxvallist/grupcd"));// 등록시 grupcd 를 가지고 마지막 등록값을 가져온다.
  399. // model.setValue("/root/main/hiddengrup/pid",model.getValue("/root/main/recgrup/rectmaxvallist/pid"));// 등록시 pid 를 가지고 마지막 등록값을 가져온다.
  400. // model.setValue("/root/main/hiddengrup/clsflag",model.getValue("/root/main/recgrup/rectmaxvallist/clsflag"));// 등록시 clsflag 를 가지고 마지막 등록값을 가져온다.
  401. // model.setValue("/root/main/hiddengrup/recflag",model.getValue("/root/main/recgrup/rectmaxvallist/recflag"));// 등록시 recflag 를 가지고 마지막 등록값을 가져온다.
  402. if(submit("TRMNW04007")){
  403. var iRowNum = datagrid1.row;
  404. }
  405. var iRow = grd_histgrup.row;
  406. var iCol = grd_histgrup.col;
  407. /* 중증도 상세내역 구분 체크 시작 */
  408. var nodelist = bind1.nodeset;
  409. var cNt = nodelist.length;
  410. for(var ins = 1 ; ins <= cNt; ins++ ){// 체크된 값 전체를 돈다.
  411. for(var i = 1 ; i < grd_histgrup.rows; i++ ){// 전체를 돌면서 그룹에 값이 체크되어 있는것 초기화
  412. if(
  413. (model.getValue(xHIsgrupListPath+"["+ i +"]/supcd") == model.getValue("/root/main/rechistpntgrup/serdiaghislist["+ ins +"]/supcd")) &&
  414. (model.getValue(xHIsgrupListPath+"["+ i +"]/basepnt") == model.getValue("/root/main/rechistpntgrup/serdiaghislist["+ ins +"]/timsval"))
  415. ) {
  416. grd_histgrup.textmatrix(i,1) = "Y";
  417. grd_histgrup.textmatrix(i,0) = "I";
  418. }
  419. }
  420. }
  421. /* 중증도 상세내역 구분 체크 끝 */
  422. }
  423. /**
  424. * @group :
  425. * @ver : 2007.05.09
  426. * @by : 정찬성
  427. * @---------------------------------------------------
  428. * @type : function
  429. * @access : public
  430. * @desc : 중증도 저장/업데이트 후 리로딩
  431. * @param :
  432. * @return :
  433. * @---------------------------------------------------
  434. */
  435. function fReload(iRow){
  436. // alert(iRow);
  437. datagrid2.row = iRow ;
  438. for(var i = 1 ; i < datagrid2.rows; i++ ){// 전체를 돌면서 중증도 내역선택시 상태를 초기화
  439. datagrid2.textmatrix(i,1) = "-"; // 중증도 내역선택시 상태를 초기화
  440. }
  441. tar_desccnts.value = "" ; // 중증도 내역 선택시 설명 부분 클리어
  442. tar_desccnts.refresh();// 화면에 적용. 그리드는 rebuild()
  443. fFlag();// 중증도구분 / 낙상 구분 체크
  444. fHistList(); // 중증도 상세내역 리스트 04006
  445. fRecHistPntList();// 중증도 상세점수 내역 / 한글명 / 체크 점수 목록 04007
  446. fColLqidty();// 중증도 상세점수 display : true , false / 총점 중증도
  447. rdo_clsflaga.disabled = true ;// 중증도구분 비활성화 시킨다.
  448. rdo_clsflagb.disabled = true ;// 낙상구분 비활성화 시킨다.
  449. }
  450. /**
  451. * @group :
  452. * @ver : 2007.05.09
  453. * @by : 정찬성
  454. * @---------------------------------------------------
  455. * @type : function
  456. * @access : public
  457. * @desc : 중증도 상세내역 구분을 선택했을 때 동작
  458. * @param :
  459. * @return :
  460. * @---------------------------------------------------
  461. */
  462. function fGrupTest(){
  463. var iRow = grd_histgrup.row;
  464. var iCol = grd_histgrup.col;
  465. //alert(iCol);
  466. var sDetlGrupRow = grd_histgrup.row;
  467. var sDetlGrupBKRow=0;
  468. // alert( model.getValue(xHIsgrupListPath+"["+sDetlGrupRow+"]/supcd") );
  469. //
  470. // alert(grd_histgrup.textmatrix(iRow,1));
  471. if(model.getValue(xHIsgrupListPath+"["+sDetlGrupRow+"]/supcd") == "00000000"){// supcd 00000000 일때, 00000000을 초기화
  472. grd_histgrup.textmatrix(sDetlGrupRow,1) = "N";
  473. grd_histgrup.textmatrix(sDetlGrupRow,0) = "-";
  474. return;
  475. }
  476. //alert(model.getValue(xHIsgrupListPath+"["+sDetlGrupRow+"]/supcd"));
  477. var supcd = model.getValue(xHIsgrupListPath+"["+sDetlGrupRow+"]/supcd") ;
  478. for(var i = 1 ; i < grd_histgrup.rows; i++ ){// 전체를 돌면서 그룹에 값이 체크되어 있는것 초기화
  479. if(supcd == model.getValue(xHIsgrupListPath+"["+ i +"]/supcd") ) {
  480. // alert("supcd : " + supcd);
  481. // alert("grd_histgrup : " + model.getValue(xHIsgrupListPath+"["+i+"]/supcd"));
  482. grd_histgrup.textmatrix(i,1) = "N";
  483. grd_histgrup.textmatrix(i,0) = "-";
  484. }
  485. }
  486. grd_histgrup.textmatrix(sDetlGrupRow,1) = "Y"; // 현재 선택값 다시 체크
  487. var cNt = 0 ;
  488. // for(var i = 1 ; i < grd_histgrup.rows; i++ ){// 전체를 돌면서 값이 체크 값을 찾아 중증도 내역 총점에 합산한다.
  489. //
  490. // if(grd_histgrup.textmatrix(i,1) == "Y") {
  491. //
  492. // cNt = cNt + parseInt(model.getValue(xHIsgrupListPath+"["+i+"]/basepnt"));
  493. //
  494. // }
  495. //
  496. // }
  497. //
  498. // datagrid2.textmatrix(1,13) = cNt;
  499. // datagrid2.textmatrix(1,0) = "U";
  500. //
  501. //
  502. // alert(datagrid2.textmatrix(1,0));
  503. //
  504. // return ;
  505. if(iCol == 1){
  506. var sDetlGrupRow = grd_histgrup.row;
  507. var sDetlGrupBKRow=0;
  508. if(model.getValue(xHIsgrupListPath+"["+sDetlGrupRow+"]/stat") != "-"){
  509. return;
  510. }
  511. var grupcd = model.getValue(xHIsgrupListPath+"["+sDetlGrupRow+"]/grupcd");
  512. for(var i=1; i<= getNodesetCount(xHIsgrupListBKPath); i++){
  513. if(model.getValue(xHIsgrupListBKPath+"["+i+"]/grupcd") == grupcd){
  514. sDetlGrupBKRow = i;
  515. break;
  516. }
  517. }
  518. // alert(instance1.selectSingleNode(xHIsgrupListPath+"["+sDetlGrupRow+"]").xml);
  519. // alert(instance1.selectSingleNode(xHIsgrupListBKPath+"["+sDetlGrupBKRow+"]").xml);
  520. if(instance1.selectSingleNode(xHIsgrupListPath+"["+sDetlGrupRow+"]").xml != instance1.selectSingleNode(xHIsgrupListBKPath+"["+sDetlGrupBKRow+"]").xml){
  521. // if( model.getValue(xHIsgrupListPath+"["+sDetlGrupRow+"]/supcd") ){
  522. // }
  523. model.setValue(xHIsgrupListPath+"["+sDetlGrupRow+"]/stat","I");
  524. grd_histgrup.rebuild();
  525. fMakeTreeView();
  526. }
  527. }else{
  528. return ;
  529. }
  530. }
  531. /**
  532. * @group :
  533. * @ver : 2007.05.09
  534. * @by : 정찬성
  535. * @---------------------------------------------------
  536. * @type : function
  537. * @access : public
  538. * @desc : 중증도 / 낙상 선택시 중증도 상세내역 리스트 출력
  539. * @param :
  540. * @return :
  541. * @---------------------------------------------------
  542. */
  543. function fSerDiagChoi(arg){
  544. // var iRow = datagrid2.row;
  545. //
  546. // if( model.getValue(xRecgrupListPath+"["+"1"+"]/stat") != "I" ){
  547. //
  548. // messageBox("수정시 중증도/낙상을 변경","E001");
  549. // return;
  550. //
  551. // }
  552. var clsflag = "" ;
  553. var recflag = "" ;
  554. if( arg == "rdo_clsflaga" ){
  555. clsflag = model.getValue("/root/main/topattribute/clsflaga") ;
  556. recflag = '1';
  557. rdo_clsflagb.value = "" ;
  558. } else if ( arg == "rdo_clsflagb" ){
  559. clsflag = model.getValue("/root/main/topattribute/clsflagb") ;
  560. recflag = '2';
  561. rdo_clsflaga.value = "" ;
  562. }
  563. model.makeValue("/root/send/supcd", "00000000");
  564. model.makeValue("/root/send/clsflag", clsflag);
  565. model.makeValue("/root/send/recflag", recflag);
  566. if(submit("TRMNW04006")){
  567. model.copyNode("/root/temp","/root/main");
  568. fMakeTreeView();
  569. }
  570. }
  571. /**
  572. * @group :
  573. * @ver : 2007.03.30
  574. * @by : 정찬성
  575. * @---------------------------------------------------
  576. * @type : function
  577. * @access : public
  578. * @desc : 중증도 값을 저장한다.
  579. * @param :
  580. * @return :
  581. * @---------------------------------------------------
  582. */
  583. function fSave(){
  584. var iRowUpd = datagrid2.row ;
  585. var inpt = "" ;
  586. // alert(model.getValue(xRecgrupListPath+"["+"1"+"]/stat"));
  587. if( model.getValue(xRecgrupListPath+"["+"1"+"]/stat") == "I" ){
  588. inpt = "inpt"
  589. } else {
  590. inpt = "updt"
  591. }
  592. var fstrgstrid = model.getValue(xRecgrupListPath+"["+iRowUpd+"]/fstrgstrid") ;
  593. // alert(fstrgstrid);
  594. //
  595. // alert(inpt);
  596. /* 수정시 입력한 사람과 ID가 동일한지 체크 시작 */
  597. if(inpt == "updt" ){
  598. if( getUserId() == fstrgstrid ){
  599. //alert("1111");
  600. } else {
  601. //alert("222");
  602. //messageBox("등록자와 아이디가 ","E004");
  603. // return ; // 나중에 풀어야 함. 반드시 ****************************************************************************
  604. }
  605. }
  606. /* 수정시 입력한 사람과 ID가 동일한지 체크 끝 */
  607. // return ;
  608. var sRowCnt = datagrid2.rows-datagrid2.fixedrows;
  609. var iRows = datagrid1.rows ;
  610. var iRow = datagrid1.row ;
  611. var sRowCntHist = datagrid2.rows-grd_histgrup.fixedrows;
  612. // alert(iRows);
  613. if( iRows < 2 ){
  614. messageBox("환자정보가 없어 저장","E001");
  615. return;
  616. }
  617. model.removenode("/root/send");
  618. // alert(datagrid2.getupdatedataAll("i"));
  619. // alert(grd_histgrup.getupdatedataAll("i"));
  620. var saveyn = 0 ;
  621. if(inpt == "inpt"){// 등록시
  622. if(sRowCnt <= 0){
  623. messageBox("저장할 데이터를 입력하지 ","E007");
  624. return;
  625. }
  626. if(rdo_clsflaga.value == '' && rdo_clsflagb.value == ''){
  627. messageBox("중증도 구분 / 낙상이 선택되지 ","E007");
  628. return;
  629. }
  630. for(var i=1; i<= sRowCnt; i++){
  631. if(model.getValue(xRecgrupListPath+"["+i+"]/stat") != "-") {
  632. saveyn = 1 ;
  633. }
  634. }
  635. if(saveyn <= 0 ){
  636. messageBox("등록정보가 없어 저장 ","E001");
  637. return;
  638. }
  639. if(cmb_execkind.value == ""){
  640. messageBox("기록활 duty를 선택하지 ","E007");
  641. return;
  642. }
  643. } else if (inpt == "updt") {//수정시
  644. for(var i=1; i<= grd_histgrup.rows ; i++){
  645. //alert(model.getValue(xHIsgrupListPath+"["+i+"]/stat"));
  646. if(model.getValue(xHIsgrupListPath+"["+i+"]/stat") == "U") {
  647. saveyn = 1 ;
  648. }
  649. }
  650. if(saveyn <= 0 ){
  651. messageBox("수정정보가 없어 저장 ","E001");
  652. return;
  653. }
  654. }
  655. if(messageBox("","Q002") != 6) return;// 저장하시겠습니까?
  656. // alert(model.getValue("/root/main/topattribute/clsflaga"));
  657. // alert(model.getValue("/root/main/topattribute/clsflagb"));
  658. var clsflag = '';
  659. var recflag = '';
  660. if ( model.getValue("/root/main/topattribute/clsflagb") == "7" || model.getValue("/root/main/topattribute/clsflagb") == "8"){
  661. //alert("222");
  662. clsflag = model.getValue("/root/main/topattribute/clsflagb") ;
  663. recflag = '2';
  664. }else if( parseInt(model.getValue("/root/main/topattribute/clsflaga")) < 7){
  665. //alert("111");
  666. clsflag = model.getValue("/root/main/topattribute/clsflaga") ;
  667. recflag = '1';
  668. }
  669. //return ;
  670. var iRowCnt = datagrid2.row ;
  671. // alert(clsflag);
  672. // alert(model.getValue("/root/main/detlgrup/detlgruplist["+ iRow +"]/indd"));
  673. // alert(cmb_execkind.value);
  674. model.makeValue("/root/send/clsflag", clsflag);
  675. model.makeValue("/root/send/recflag", recflag);
  676. model.makeValue("/root/send/indd", model.getValue("/root/main/detlgrup/detlgruplist["+ iRow +"]/indd"));
  677. model.makeValue("/root/send/pid", model.getValue("/root/main/topattribute/pid"));
  678. model.makeValue("/root/send/cretno", "1");
  679. model.makeValue("/root/send/seqno", "1");
  680. model.makeValue("/root/send/certkey", "123456");
  681. model.makeValue("/root/send/execkind", cmb_execkind.value);
  682. // alert(cmb_wardcd.value);
  683. model.makeValue("/root/send/wardcd", cmb_wardcd.value );
  684. model.makeValue("/root/send/roomcd", model.getValue("/root/main/topattribute/roomcd"));
  685. model.makeValue("/root/send/grupcdval", model.getValue("/root/main/recgrup/recgruplist["+ iRowCnt +"]/grupcd"));
  686. // alert(model.getValue("/root/main/topattribute/pid"));
  687. // alert(clsflag);
  688. // return ;
  689. var cNt = 0 ;
  690. if(inpt == "inpt"){// 등록시
  691. for(var i = 1 ; i < grd_histgrup.rows; i++ ){// 전체를 돌면서 값이 체크 값을 찾아 중증도 내역 총점에 합산한다.
  692. if(grd_histgrup.textmatrix(i,1) == "Y") {
  693. cNt = cNt + parseInt(model.getValue(xHIsgrupListPath+"["+i+"]/basepnt"));
  694. }
  695. }
  696. datagrid2.textmatrix(iRowCnt,13) = cNt;
  697. // alert(datagrid2.getupdatedataAll("i"));
  698. // alert(grd_histgrup.getupdatedataAll("i"));
  699. //
  700. // return ;
  701. model.makeValue("/root/send/recgrup",datagrid2.getupdatedataAll("i"));
  702. model.makeValue("/root/send/histgrup",grd_histgrup.getupdatedataAll("i"));
  703. if(submit("TXMNW04001")){
  704. model.copyNode("/root/temp","/root/main");
  705. datagrid2.row = 1;// 저장후 저장한 로우를 선택
  706. fReload(iRowCnt);// 업데이트후 화면값 리로딩
  707. }
  708. } else if (inpt == "updt") {//수정시
  709. for(var i = 1 ; i < grd_histgrup.rows; i++ ){// 전체를 돌면서 값이 체크 값을 찾아 중증도 내역 총점에 합산한다.
  710. if(grd_histgrup.textmatrix(i,1) == "Y") {
  711. cNt = cNt + parseInt(model.getValue(xHIsgrupListPath+"["+i+"]/basepnt"));
  712. }
  713. }
  714. // alert(cNt);
  715. datagrid2.textmatrix(iRowCnt,13) = cNt;
  716. model.makeValue("/root/send/recgrup",datagrid2.getupdatedataAll("i"));
  717. model.makeValue("/root/send/histgrup",grd_histgrup.getupdatedataAll("i"));
  718. // alert(model.getValue(xRecgrupListPath+"["+iRowCnt+"]/totpnt"));
  719. //
  720. // return ;
  721. if(submit("TXMNW04002")){
  722. model.copyNode("/root/temp","/root/main");
  723. fReload(iRowCnt);// 업데이트후 화면값 리로딩
  724. }
  725. }
  726. rdo_clsflaga.disabled = true ;// 중증도구분 비활성화 시킨다.
  727. rdo_clsflagb.disabled = true ;// 낙상구분 비활성화 시킨다.
  728. inpt = "" ;// 등록/수정 클리어
  729. }
  730. /**
  731. * @group :
  732. * @ver : 2007.05.09
  733. * @by : 정찬성
  734. * @---------------------------------------------------
  735. * @type : function
  736. * @access : public
  737. * @desc : 중증도 내역 삭제 버튼
  738. * @param :
  739. * @return :
  740. * @---------------------------------------------------
  741. */
  742. function fDel(){
  743. if(messageBox("신규정보를","Q001") != 6) return;
  744. model.removeNodeset("/root/main/rechistpntgrup/rechistpntlist");// 중증도 상세점수 클리어
  745. model.removeNodeset("/root/main/histgrup/histgruplist");// 중증도 상세내역 클리어
  746. datagrid3.refresh();
  747. grd_histgrup.refresh();
  748. model.removeNodeset("/root/main/recgrup/recgruplist");
  749. fSelect() ;// 중증도 내역 리스트
  750. datagrid2.rebuild();
  751. datagrid2.refresh();
  752. datagrid2.row = 1;
  753. }
  754. /**
  755. * @group :
  756. * @ver : 2007.05.09
  757. * @by : 정찬성
  758. * @---------------------------------------------------
  759. * @type : function
  760. * @access : public
  761. * @desc : 중증도 내역 등록 버튼
  762. * @param :
  763. * @return :
  764. * @---------------------------------------------------
  765. */
  766. function fAddInsertRow(){
  767. if(cmb_execkind.value == "" || cmb_execkind.value == "0"){
  768. messageBox("기록활 duty를 선택하지 ","E007");
  769. return;
  770. }
  771. var iRows = datagrid1.rows ;
  772. if( iRows < 2 ){
  773. messageBox("환자정보가 없어 등록","E001");
  774. return;
  775. }
  776. if( model.getValue(xRecgrupListPath+"["+"1"+"]/stat") == "I" ){
  777. messageBox("중증도 내역은 한번에 1건이상 저장할 수","E001");
  778. return;
  779. }
  780. fSelect();//등록버튼 클릭시 현재 최종값을 셋팅
  781. var iRow = datagrid2.rows;
  782. // alert(iRow);
  783. if(iRow < 2){
  784. iRow = 1 ;
  785. datagrid2.addRow(true, true);
  786. } else {
  787. datagrid2.insertRow("1", "above");
  788. // datagrid2.insertRow(datagrid2.row);
  789. }
  790. // alert(getUserName());
  791. rdo_clsflaga.value= "" ;// 중증도 구분 클리어
  792. rdo_clsflagb.value= "" ;//낙상 클리어
  793. model.removeNodeset("/root/main/rechistpntgrup/rechistpntlist");// 중증도 상세점수 클리어
  794. model.setValue(xRecgrupListPath+"["+"1"+"]/stat","I"); //
  795. model.setValue(xRecgrupListPath+"["+"1"+"]/execdt",ipt_execdt.value );
  796. model.setValue(xRecgrupListPath+"["+"1"+"]/exectm",input4.value); //
  797. model.setValue(xRecgrupListPath+"["+"1"+"]/clsgrupkind", ""); //
  798. model.setValue(xRecgrupListPath+"["+"1"+"]/totpnt", ""); //
  799. model.setValue(xRecgrupListPath+"["+"1"+"]/usernm", "테스트"); //
  800. datagrid2.rebuild();
  801. datagrid2.row = 1;
  802. model.makeValue("/root/send/supcd", "00000000");
  803. // model.makeValue("/root/send/clsflag", "1");
  804. // model.makeValue("/root/send/recflag", "1");
  805. /* 처음 등록시 일반병동/ 아니면 마지막 등록한 값 시작 */
  806. if(model.getvalue("/root/main/recgrup/rectmaxvallist/clsflag") == "" || model.getvalue("/root/main/recgrup/rectmaxvallist/recflag") == "" ){
  807. model.makeValue("/root/send/clsflag", "1");
  808. model.makeValue("/root/send/recflag", "1");
  809. rdo_clsflaga.value = "1" ;
  810. rdo_clsflagb.value = "1" ;
  811. } else {
  812. model.makeValue("/root/send/clsflag", model.getvalue("/root/main/recgrup/rectmaxvallist/clsflag"));
  813. model.makeValue("/root/send/recflag", model.getvalue("/root/main/recgrup/rectmaxvallist/recflag"));
  814. // alert(model.getvalue("/root/main/recgrup/rectmaxvallist/clsflag"));
  815. // alert(model.getvalue("/root/main/recgrup/rectmaxvallist/recflag"));
  816. var cLsflag = model.getvalue("/root/main/recgrup/rectmaxvallist/clsflag") ;
  817. /* 최종값을 가지고 중증도/낙상 체크 시작 */
  818. if( cLsflag < 7 ){
  819. if( cLsflag == 1 ){
  820. rdo_clsflaga.select(0);
  821. } else if ( cLsflag == 2 ){
  822. rdo_clsflaga.select(1);
  823. } else if ( cLsflag == 3 ){
  824. rdo_clsflaga.select(2);
  825. } else if ( cLsflag == 4 ){
  826. rdo_clsflaga.select(3);
  827. } else if ( cLsflag == 5 ){
  828. rdo_clsflaga.select(4);
  829. } else if ( cLsflag == 6 ){
  830. rdo_clsflaga.select(5);
  831. }
  832. } else if(cLsflag > 6 ) {
  833. if ( cLsflag == 7 ){
  834. rdo_clsflagb.select(0);
  835. } else if ( cLsflag == 8 ){
  836. rdo_clsflagb.select(1);
  837. }
  838. }
  839. rdo_clsflaga.refresh();
  840. rdo_clsflagb.refresh();
  841. /* 최종값을 가지고 중증도/낙상 체크 끝 */
  842. }
  843. /* 처음 등록시 일반병동/ 아니면 마지막 등록한 값 끝 */
  844. if(submit("TRMNW04006")){
  845. model.copyNode("/root/temp","/root/main");
  846. fMakeTreeView(); //
  847. }
  848. //rdo_clsflaga.value = "1" ;
  849. rdo_clsflaga.disabled = false ;// 중증도구분 등록시 활성화 시킨다.
  850. rdo_clsflagb.disabled = false ;// 낙상구분 등록시 활성화 시킨다.
  851. model.makeValue("/root/main/rechistpntgrup/rechistpntlist/pid",model.getValue(xClsListPath+"["+iRow+"]/pid"));
  852. model.makeValue("/root/main/rechistpntgrup/rechistpntlist/hngnm",model.getValue(xClsListPath+"["+iRow+"]/hngnm"));
  853. fRecHistPntListInsert();//등록버튼 클릭시 마지막 입력한 값으로 셋팅
  854. model.removeNodeset("/root/main/rechistpntgrup/rechistpntlist");// 중증도 상세점수 클리어
  855. datagrid3.refresh();
  856. }
  857. /**
  858. * @group :
  859. * @ver : 2007.05.09
  860. * @by : 정찬성
  861. * @---------------------------------------------------
  862. * @type : function
  863. * @access : public
  864. * @desc : 중증도 상세점수 display : true , false / 총점 중증도
  865. * @param :
  866. * @return :
  867. * @---------------------------------------------------
  868. */
  869. function fColLqidty() {
  870. var cNt = model.getValue("/root/main/rechistpntgrup/rechistpntlist/cnt")
  871. if(cNt > 0 ){
  872. var no = 1 ;
  873. var notitl = 0 ;
  874. for( var i = 0 ; i < cNt ; i++ ) {
  875. no++ ;
  876. notitl++ ;
  877. datagrid3.colhidden(no) = false;
  878. datagrid3.colwidth(no) = 50;
  879. datagrid3.valuematrix(0,no) = model.getValue("/root/main/rechistpntgrup/pnttitlgruplist["+ notitl +"]/hngnm");
  880. }
  881. datagrid3.colhidden(42) = false;
  882. datagrid3.colhidden(43) = false;
  883. datagrid3.colwidth(42) = 50;
  884. datagrid3.colwidth(43) = 50;
  885. var iRow = datagrid1.row ;
  886. datagrid3.valuematrix(1,0) = model.getValue("/root/main/detlgrup/detlgruplist["+ iRow +"]/pid");
  887. datagrid3.valuematrix(1,1) = model.getValue("/root/main/detlgrup/detlgruplist["+ iRow +"]/hngnm");
  888. datagrid3.refresh();
  889. }
  890. }
  891. /**
  892. * @group :
  893. * @ver : 2007.05.09
  894. * @by : 정찬성
  895. * @---------------------------------------------------
  896. * @type : function
  897. * @access : public
  898. * @desc : 중증도 상세점수 내역 / 한글명 / 체크 점수 목록
  899. * @param :
  900. * @return :
  901. * @---------------------------------------------------
  902. */
  903. function fRecHistPntList(){
  904. var iRow = datagrid2.row;
  905. model.removenode("/root/send");
  906. model.makeValue("/root/send/pid", model.getvalue(xRecgrupListPath+"["+iRow+"]/pid"));
  907. model.makeValue("/root/send/execdt", model.getvalue(xRecgrupListPath+"["+iRow+"]/execdt"));
  908. model.makeValue("/root/send/clsflag", model.getvalue(xRecgrupListPath+"["+iRow+"]/clsflag"));
  909. model.makeValue("/root/send/recflag", model.getvalue(xRecgrupListPath+"["+iRow+"]/recflag"));
  910. model.makeValue("/root/send/grupcd", model.getvalue(xRecgrupListPath+"["+iRow+"]/grupcd"));
  911. if(submit("TRMNW04007")){
  912. var iRowNum = datagrid1.row;
  913. }
  914. var iRow = grd_histgrup.row;
  915. var iCol = grd_histgrup.col;
  916. /* 중증도 상세내역 구분 체크 시작 */
  917. var nodelist = bind1.nodeset;
  918. var cNt = nodelist.length;
  919. for(var ins = 1 ; ins <= cNt; ins++ ){// 체크된 값 전체를 돈다.
  920. for(var i = 1 ; i < grd_histgrup.rows; i++ ){// 전체를 돌면서 그룹에 값이 체크되어 있는것 초기화
  921. if(
  922. (model.getValue(xHIsgrupListPath+"["+ i +"]/supcd") == model.getValue("/root/main/rechistpntgrup/serdiaghislist["+ ins +"]/supcd")) &&
  923. (model.getValue(xHIsgrupListPath+"["+ i +"]/basepnt") == model.getValue("/root/main/rechistpntgrup/serdiaghislist["+ ins +"]/timsval"))
  924. ) {
  925. grd_histgrup.textmatrix(i,1) = "Y";
  926. grd_histgrup.textmatrix(i,0) = "-";
  927. }
  928. }
  929. }
  930. /* 중증도 상세내역 구분 체크 끝 */
  931. }
  932. /**
  933. * @group :
  934. * @ver : 2007.03.27
  935. * @by : 정찬성
  936. * @---------------------------------------------------
  937. * @type : function
  938. * @access : public
  939. * @desc : 중증도구분 낙상 구분 체크
  940. * @param :
  941. * @return :
  942. * @---------------------------------------------------
  943. */
  944. function fFlag(){
  945. var iRow = datagrid2.row;
  946. //alert(iRow);
  947. var cLsflag = model.getValue(xRecgrupListPath+"["+iRow+"]/clsflag") ;
  948. //alert(cLsflag);
  949. rdo_clsflaga.value = "" ;
  950. rdo_clsflagb.value = "" ;
  951. if( cLsflag < 7 ){
  952. if( cLsflag == 1 ){
  953. rdo_clsflaga.select(0);
  954. } else if ( cLsflag == 2 ){
  955. rdo_clsflaga.select(1);
  956. } else if ( cLsflag == 3 ){
  957. rdo_clsflaga.select(2);
  958. } else if ( cLsflag == 4 ){
  959. rdo_clsflaga.select(3);
  960. } else if ( cLsflag == 5 ){
  961. rdo_clsflaga.select(4);
  962. } else if ( cLsflag == 6 ){
  963. rdo_clsflaga.select(5);
  964. }
  965. } else if(cLsflag > 6 ) {
  966. if ( cLsflag == 7 ){
  967. rdo_clsflagb.select(0);
  968. } else if ( cLsflag == 8 ){
  969. rdo_clsflagb.select(1);
  970. }
  971. }
  972. rdo_clsflaga.refresh();
  973. rdo_clsflagb.refresh();
  974. }
  975. /**
  976. * @group :
  977. * @ver : 2007.03.27
  978. * @by : 정찬성
  979. * @---------------------------------------------------
  980. * @type : function
  981. * @access : public
  982. * @desc : 중증도 상세내역의 설명을 조회한다.
  983. * @param :
  984. * @return :
  985. * @---------------------------------------------------
  986. */
  987. function fHistDesc(){
  988. var iRow = grd_histgrup.row;
  989. tar_desccnts.value = model.getValue(xHIsgrupListPath+"["+iRow+"]/desccnts") ;
  990. tar_desccnts.refresh();
  991. }
  992. /**
  993. * @group :
  994. * @ver : 2007.03.27
  995. * @by : 정찬성
  996. * @---------------------------------------------------
  997. * @type : function
  998. * @access : public
  999. * @desc : 중증도 상세내역 트리구조로 변환
  1000. * @param :
  1001. * @return :
  1002. * @---------------------------------------------------
  1003. */
  1004. function fMakeTreeView(){
  1005. var sRowCnt = grd_histgrup.rows-grd_histgrup.fixedRows;
  1006. for(var i=1; i<= sRowCnt; i++){
  1007. grd_histgrup.IsSubtotal(i)=true;
  1008. grd_histgrup.outlinelevel(i)=model.getValue(xHIsgrupListPath+"["+i+"]/depth");
  1009. grd_histgrup.colDisabled(11) = true ;
  1010. }
  1011. grd_histgrup.OutlineCol = 3; //
  1012. grd_histgrup.OutlineBar = 4; //
  1013. grd_histgrup.TreeColor="gray";
  1014. model.refresh();
  1015. }
  1016. /**
  1017. * @group :
  1018. * @ver : 2007.04.30
  1019. * @by : 정찬성
  1020. * @---------------------------------------------------
  1021. * @type : function
  1022. * @access : public
  1023. * @desc : 중증도 상세내역 리스트 출력
  1024. * @param :
  1025. * @return :
  1026. * @---------------------------------------------------
  1027. */
  1028. function fHistList(){
  1029. var iRow = datagrid2.row;
  1030. model.removenode("/root/send");
  1031. model.makeValue("/root/send/supcd","00000000");
  1032. model.makeValue("/root/send/clsflag",model.getValue(xRecgrupListPath+"["+iRow+"]/clsflag"));
  1033. model.makeValue("/root/send/recflag",model.getValue(xRecgrupListPath+"["+iRow+"]/recflag"));
  1034. model.makeValue("/root/send/indd",model.getValue(xRecgrupListPath+"["+iRow+"]/indd"));
  1035. if(submit("TRMNW04006")){
  1036. model.copyNode("/root/temp","/root/main");
  1037. //model.copyNode("/root/temp/main","/root/main");
  1038. fMakeTreeView();
  1039. }
  1040. }
  1041. /**
  1042. * @group :
  1043. * @ver : 2007.03.27
  1044. * @by : 정찬성
  1045. * @---------------------------------------------------
  1046. * @type : function
  1047. * @access : public
  1048. * @desc : 설명
  1049. * @param :
  1050. * @return :
  1051. * @---------------------------------------------------
  1052. */
  1053. function fAddHist(){
  1054. datagrid2.insertRow(1);// 0 : 다음줄에 삽입 , 1 : 첫번째 줄에 삽입
  1055. datagrid2.rebuild();
  1056. }
  1057. /**
  1058. * @group :
  1059. * @ver : 2007.04.30
  1060. * @by : 정찬성
  1061. * @---------------------------------------------------
  1062. * @type : function
  1063. * @access : public
  1064. * @desc : 중증도 내역을 더블클릭했을때. 중증도 상세점수 / 중증도 상세내역 리스트를 출력
  1065. * @param :
  1066. * @return :
  1067. * @---------------------------------------------------
  1068. */
  1069. function fSelect(){
  1070. // alert();
  1071. var iRow = datagrid1.row;
  1072. if(iRow < 1) return;
  1073. opt_roomcd.value = model.getValue(xClsListPath+"["+iRow+"]/roomcd");
  1074. opt_pid.value = model.getValue(xClsListPath+"["+iRow+"]/pid");
  1075. opt_hngnm.value = model.getValue(xClsListPath+"["+iRow+"]/hngnm");
  1076. opt_pid.value = model.getValue(xClsListPath+"["+iRow+"]/pid"); // 중증도 상세점수 등록번호
  1077. opt_hngnm.value = model.getValue(xClsListPath+"["+iRow+"]/hngnm"); // 중증도 상세점수 환자명
  1078. //alert(model.getValue(xClsListPath+"["+iRow+"]/pid"));
  1079. // datagrid3.textmatrix(1,0) = model.getValue(xClsListPath+"["+iRow+"]/pid");
  1080. // datagrid3.textmatrix(1,1) = model.getValue(xClsListPath+"["+iRow+"]/hngnm");
  1081. model.makeValue("/root/main/rechistpntgrup/rechistpntlist/pid",model.getValue(xClsListPath+"["+iRow+"]/pid"));
  1082. model.makeValue("/root/main/rechistpntgrup/rechistpntlist/hngnm",model.getValue(xClsListPath+"["+iRow+"]/hngnm"));
  1083. // var no = 1 ;
  1084. //
  1085. // for( var i = 0 ; i < 43 ; i++ ) {
  1086. //
  1087. // no++ ;
  1088. //
  1089. // datagrid3.colhidden(no) = true;// 환자선택시 중증도 상세점수 필드 환자명 다음 컬럼부터 숨기기
  1090. //
  1091. // }
  1092. datagrid3.rebuild();
  1093. model.makeValue("/root/send/pid",model.getValue(xClsListPath+"["+iRow+"]/pid"));
  1094. model.makeValue("/root/send/execdt",ipt_execdt.value);
  1095. model.makeValue("/root/send/execkind",cmb_execkind.value);
  1096. model.makeValue("/root/send/wardcd", model.getValue("/root/temp/wardcd"));
  1097. model.makeValue("/root/send/srchym", model.getValue("/root/temp/srchym"));
  1098. // model.makeValue("/root/main/rechistpntgrup/rechistpntlist["+1+"]", model.getValue(xClsListPath+"["+iRow+"]/hngnm");
  1099. if(submit("TRMNW04005")){
  1100. }
  1101. ipt_execdtrect.value = model.getValue("/root/main/recgrup/rectmaxvallist/execdtrect") ;//최근 저장일을 화면에 표시
  1102. model.setValue("/root/main/hiddengrup/grupcd",model.getValue("/root/main/recgrup/rectmaxvallist/grupcd"));// 등록시 grupcd 를 가지고 마지막 등록값을 가져온다.
  1103. model.setValue("/root/main/hiddengrup/pid",model.getValue("/root/main/recgrup/rectmaxvallist/pid"));// 등록시 pid 를 가지고 마지막 등록값을 가져온다.
  1104. model.setValue("/root/main/hiddengrup/clsflag",model.getValue("/root/main/recgrup/rectmaxvallist/clsflag"));// 등록시 clsflag 를 가지고 마지막 등록값을 가져온다.
  1105. model.setValue("/root/main/hiddengrup/recflag",model.getValue("/root/main/recgrup/rectmaxvallist/recflag"));// 등록시 recflag 를 가지고 마지막 등록값을 가져온다.
  1106. //alert(model.getValue("/root/main/recgrup/rectmaxvallist/grupcd"));
  1107. datagrid2.row = 1;
  1108. rdo_clsflaga.disabled = true ;// 중증도구분 비활성화 시킨다.
  1109. rdo_clsflagb.disabled = true ;// 낙상구분 비활성화 시킨다.
  1110. }
  1111. /**
  1112. * @group :
  1113. * @ver : 2007.07.16
  1114. * @by : 정찬성
  1115. * @---------------------------------------------------
  1116. * @type : function
  1117. * @access : public
  1118. * @desc : 병동내 환자 정보를 조회한다.
  1119. * @param :
  1120. * @return :
  1121. * @---------------------------------------------------
  1122. */
  1123. function fPatientList(){
  1124. model.removenode("/root/send");
  1125. model.makeValue("/root/send/wardcd", model.getValue("/root/main/cond/wardcdgrup/wardcdgruplist/wardcd"));
  1126. model.makeValue("/root/send/srchym", model.getValue("/root/main/cond/srchym"));
  1127. model.removenode("/root/temp");
  1128. model.makeValue("/root/temp/wardcd", model.getValue("/root/main/cond/wardcdgrup/wardcdgruplist/wardcd"));
  1129. model.makeValue("/root/temp/srchym", model.getValue("/root/main/cond/srchym"));
  1130. if(submit("TRMNW04004")){
  1131. //model.copyNode("/root/temp/main", "/root/main");
  1132. //fMakeTreeView();
  1133. }
  1134. datagrid1.row = 1;
  1135. rdo_clsflaga.disabled = true ;// 중증도구분 비활성화 시킨다.
  1136. rdo_clsflagb.disabled = true ;// 낙상구분 비활성화 시킨다.
  1137. }