SMMNE03500.js 44 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085
  1. /*
  2. 응급실 CPCR 기록지 (SMMNE03500.xfm - JScript )
  3. - Version :
  4. 1) : Ver.1.00.01
  5. */
  6. var fCellCheck = "";
  7. var fCaption = "";
  8. var fBottomDay = "";
  9. var fBottomTime = "";
  10. var fBottomMinutes = "";
  11. var fFstCaption = "";
  12. var fScndCaption = "";
  13. var fChartStat = "F";
  14. /**
  15. * @group :
  16. * @ver : 2007.07.21
  17. * @by : 양천덕
  18. * @---------------------------------------------------
  19. * @type : function
  20. * @access : public
  21. * @desc : CPCR 화면 초기화(환자 정보 세팅)
  22. * @param :
  23. * @return :
  24. * @---------------------------------------------------
  25. */
  26. function fInitialize(){
  27. var node = getGlobalVariable("paminfo");
  28. setCSVToNode("/root/main/paminfo", node);
  29. btn_Schrt.visible = false;
  30. btn_Csum.visible = false;
  31. //최초caption 정보 저장
  32. fFstCaption = grd_cpcr.caption;
  33. model.setValue("/root/main/cond/pid", model.getValue("/root/main/paminfo/list/pid") );
  34. model.setValue("/root/main/cond/indd", model.getValue("/root/main/paminfo/list/indd") );
  35. model.setValue("/root/main/cond/cretno", model.getValue("/root/main/paminfo/list/cretno"));
  36. model.setValue("/root/main/cond/deptcd", getUserInfo("dutplcecd") );
  37. model.setValue("/root/main/cond/instcd", getUserInfo("dutplceinstcd"));
  38. var patinfo = "등록번호: " + model.getValue("/root/main/paminfo/list/pid") + ", "
  39. + "환자명: " + model.getValue("/root/main/paminfo/list/hngnm") + ", "
  40. + "성별/나이: " + model.getValue("/root/main/paminfo/list/sex") + "/"
  41. + model.getValue("/root/main/paminfo/list/age") + ", "
  42. + "병실: " + model.getValue("/root/main/paminfo/list/roomcd");
  43. model.setValue("/root/main/patinfo", patinfo);
  44. if(model.getValue("/root/main/cond/pid") == "" ){
  45. fMakeChart();
  46. messageBox("선택된 환자가 없습니다.", "E");
  47. return;
  48. }else {
  49. fCpcrInit();
  50. }
  51. }
  52. /**
  53. * @group :
  54. * @ver : 2007.07.21
  55. * @by : 양천덕
  56. * @---------------------------------------------------
  57. * @type : function
  58. * @access : public
  59. * @desc : 환자의 CPCR 기록 조회
  60. * @param :
  61. * @return :
  62. * @---------------------------------------------------
  63. */
  64. function fCpcrInit(){
  65. fCpcCondNodeSet();
  66. submit("TRMNE03501");
  67. fMakeDate("C");
  68. if(model.getValue("/root/main/srchinfo/srchlist") == "-" ){
  69. submit("TRMNE03502");
  70. }
  71. fMakeChart();
  72. var iRow = grd_cpcr.rows;
  73. for(i=0 ; i<iRow ; i++){
  74. for(j=0 ; j < 31 ; j++){
  75. grd_cpcr.cellStyle("background-color", i+2, j+2, i+2, j+2) = "#ffffff";
  76. if( 5 < j && j <= 10 || 15< j && j <= 20 || 25< j && j <= 30 ){
  77. grd_cpcr.cellStyle("background-color", i+2, j+2, i+2, j+2) = "#ffff99";
  78. }
  79. }
  80. grd_cpcr.cellStyle("background-color", i+2, 33, i+2, 38) = "#ffffff";
  81. if(model.getValue("/root/main/recinfo/reclist/grid["+i+"]/recitemflag") == "M" ){
  82. grd_cpcr.cellStyle("background-color", i+2, 33, i+2, 38) = "#ccecff";
  83. }
  84. }
  85. model.refresh();
  86. }
  87. /**
  88. * @group :
  89. * @ver : 2007.07.21
  90. * @by : 양천덕
  91. * @---------------------------------------------------
  92. * @type : function
  93. * @access : public
  94. * @desc : 부서별 CPCR기록 목록 조회 및 화면 셋팅
  95. * @param :
  96. * @return :
  97. * @---------------------------------------------------
  98. */
  99. function fCpcCondNodeSet(){
  100. var condData = "";
  101. var condHearder = "instcd▦indd▦cretno▦deptcd▦pid▦startdt▩" ;
  102. condData += model.getValue("/root/main/cond/instcd") + "▦"
  103. + model.getValue("/root/main/cond/indd") + "▦"
  104. + model.getValue("/root/main/cond/cretno") + "▦"
  105. + model.getValue("/root/main/cond/deptcd") + "▦"
  106. + model.getValue("/root/main/cond/pid") + "▦"
  107. + model.getValue("/root/main/srchinfo/srchlist") + "▩";
  108. model.makeValue("/root/send/cond", condHearder + condData);
  109. }
  110. /**
  111. * @group :
  112. * @ver : 2007.07.21
  113. * @by : 양천덕
  114. * @---------------------------------------------------
  115. * @type : function
  116. * @access : public
  117. * @desc : Vital Sign 챠트 그리기
  118. * @param :
  119. * @return :
  120. * @---------------------------------------------------
  121. */
  122. function fMakeChart(){
  123. var hrcheck = model.getValue("/root/main/chrtsetup/hryn");
  124. var rrcheck = model.getValue("/root/main/chrtsetup/rryn");
  125. var btcheck = model.getValue("/root/main/chrtsetup/btyn");
  126. TChart1.RemoveAllSeries();
  127. TChart1.Axis.RemoveAllCustom();
  128. //margin 값 정하기
  129. TChart1.Panel.MarginTop = 0;
  130. TChart1.Panel.MarginLeft = 11;
  131. TChart1.Panel.MarginRight = 0;
  132. TChart1.Panel.MarginBottom = -5;
  133. TChart1.Axis.Bottom.TickLength = 1027;
  134. //시간 생성
  135. //var stDate = new Date(2005, 2, 3, 0, 0);
  136. //var endDate = new Date(2005, 2, 10, 0, 0);
  137. //alert(Date.UTC(2005, 2, 3));
  138. //하단축 칸 수 정하기와 눈금 없애기
  139. //TChart1.Axis.Bottom.SetMinMax (0, MinTimeConst * 60 * 24 * 7 - 1); //7일 동안 좌표를 표현
  140. TChart1.Axis.Bottom.SetMinMax (0, 30); //7일 동안 좌표를 표현 (하루는 DivPerDay만큼 나눠짐)
  141. TChart1.Axis.Bottom.Increment = 1;
  142. TChart1.Axis.Bottom.MinorTickCount = 1;
  143. TChart1.Axis.Bottom.AxisPen.Color = 0x000000;
  144. //TChart1.Axis.Bottom.GridPen.Color = 0x0000ff; //축 점선의 색 설정
  145. TChart1.Axis.Bottom.Labels.Font.Color = 0xffffff; //하단 축 눈금 명칭 색을 하얀색으로 하여 보이지 않게 처리
  146. TChart1.Header.Visible = false;
  147. TChart1.Header.Text(0)="Vital Sign"; //헤더제목넣기
  148. TChart1.Header.Font.Bold = true; //헤더 굵게
  149. TChart1.Header.Font.Size = 10; //헤더 사이즈
  150. TChart1.Aspect.View3D = 0; //2d 로 표현하기
  151. //TChart1.Aspect.Chart3DPercent = 2;
  152. TChart1.Zoom.enable = false; // zoom 사용하지 않기
  153. TChart1.Scroll.Enable = true; // scroll 사용하지 않기
  154. TChart1.Legend.Visible = false; // 그래프 참조 박스 띄우지 않기
  155. TChart1.Environment.MouseWheelScroll = true;
  156. TChart1.Panel.Gradient.Visible = true; // 페널에 그라디언트 적용
  157. TChart1.Panel.Gradient.StartColor = 0xffffff;
  158. TChart1.Panel.Gradient.EndColor = 0xffffff;
  159. var cus_axis1 = TChart1.Axis.AddCustom(false); // HR
  160. TChart1.Axis.Custom(0).AxisPen.Color = 0x0000ff;
  161. TChart1.Axis.Custom(0).Title.Caption = "HR/BP"
  162. TChart1.Axis.Custom(0).Title.Font.Size = 8;
  163. TChart1.Axis.Custom(0).Title.Font.Bold = true;
  164. TChart1.Axis.Custom(0).Title.Angle = 90;
  165. TChart1.Axis.Custom(0).PositionPercent = 0;
  166. //TChart1.Axis.Custom(0).StartPosition = 0;
  167. //TChart1.Axis.Custom(0).EndPosition = 100;
  168. TChart1.Axis.Custom(0).Automatic = false;
  169. TChart1.Axis.Custom(0).Maximum = 210;
  170. TChart1.Axis.Custom(0).Minimum = 10;
  171. TChart1.Axis.Custom(0).Increment = 20;
  172. var cus_axis2 = TChart1.Axis.AddCustom(false); // BT
  173. TChart1.Axis.Custom(1).AxisPen.Color = 0x00ff00;
  174. TChart1.Axis.Custom(1).Title.Caption = "BT";
  175. TChart1.Axis.Custom(1).Title.Font.Size = 8;
  176. TChart1.Axis.Custom(1).Title.Font.Bold = true;
  177. TChart1.Axis.Custom(1).Title.Angle = 90;
  178. TChart1.Axis.Custom(1).PositionPercent = -4.5;
  179. TChart1.Axis.Custom(1).Automatic = false;
  180. TChart1.Axis.Custom(1).Maximum = 43;
  181. TChart1.Axis.Custom(1).Minimum = 33;
  182. TChart1.Axis.Custom(1).Increment = 1;
  183. var cus_axis3 = TChart1.Axis.AddCustom(false); // RR
  184. TChart1.Axis.Custom(2).AxisPen.Color = 0xff0000;
  185. TChart1.Axis.Custom(2).Title.Caption = "RR";
  186. TChart1.Axis.Custom(2).Title.Font.Size = 8;
  187. TChart1.Axis.Custom(2).Title.Font.Bold = true;
  188. TChart1.Axis.Custom(2).Title.Angle = 90;
  189. TChart1.Axis.Custom(2).PositionPercent = -8.5;
  190. TChart1.Axis.Custom(2).Automatic = false;
  191. TChart1.Axis.Custom(2).Maximum = 110;
  192. TChart1.Axis.Custom(2).Minimum = 10;
  193. TChart1.Axis.Custom(2).Increment = 10;
  194. TChart1.AddSeries(11); // 혈압
  195. TChart1.AddSeries(11); // abp
  196. TChart1.AddSeries(0); // 맥박
  197. TChart1.AddSeries(0); // 체온
  198. TChart1.AddSeries(0); // 호흡
  199. TChart1.AddSeries(0); // 38선
  200. TChart1.Series(0).VerticalAxisCustom = cus_axis1;
  201. TChart1.Series(1).VerticalAxisCustom = cus_axis1;
  202. TChart1.Series(2).VerticalAxisCustom = cus_axis1;
  203. TChart1.Series(3).VerticalAxisCustom = cus_axis2;
  204. TChart1.Series(4).VerticalAxisCustom = cus_axis3;
  205. TChart1.Series(5).VerticalAxisCustom = cus_axis2;
  206. //라인의 굵기를 정해준다.
  207. TChart1.Series(0).asCandle.CandleStyle = 2;
  208. TChart1.Series(0).asCandle.CandleWidth = 4;
  209. TChart1.Series(1).asCandle.CandleStyle = 2;
  210. TChart1.Series(1).asCandle.CandleWidth = 1;
  211. TChart1.Series(2).asLine.LinePen.Width = 1;
  212. TChart1.Series(3).asLine.LinePen.Width = 2;
  213. TChart1.Series(4).asLine.LinePen.Width = 1;
  214. TChart1.Series(5).asLine.LinePen.Width = 2;
  215. TChart1.Series(0).Color = 0x000000; //black
  216. TChart1.Series(1).Color = 0x000000; //black
  217. TChart1.Series(2).Color = 0x0000ff; //red HR/BP
  218. TChart1.Series(3).Color = 0x00ff00; //green BT
  219. TChart1.Series(4).Color = 0xff0000; //blue RR
  220. TChart1.Series(5).Color = 0x656565; //38선
  221. // error bar test
  222. //Series(0).AsErrorBar.AddErrorBar (1234, 5678, 23, "MyErrorBar", model.rgb(0,255,255));
  223. TChart1.Series(2).asLine.Pointer.Visible = true;
  224. TChart1.Series(2).asLine.Pointer.Style = 1;
  225. TChart1.Series(2).asLine.Pointer.VerticalSize = 2;
  226. TChart1.Series(2).asLine.Pointer.HorizontalSize = 2;
  227. TChart1.Series(3).asLine.Pointer.Visible = true;
  228. TChart1.Series(3).asLine.Pointer.Style = 1;
  229. TChart1.Series(3).asLine.Pointer.VerticalSize = 2;
  230. TChart1.Series(3).asLine.Pointer.HorizontalSize = 2;
  231. TChart1.Series(4).asLine.Pointer.Visible = true;
  232. TChart1.Series(4).asLine.Pointer.Style = 1;
  233. TChart1.Series(4).asLine.Pointer.VerticalSize = 2;
  234. TChart1.Series(4).asLine.Pointer.HorizontalSize = 2;
  235. //기준선 그리기
  236. TChart1.Series(5).AddXY (-5, 38 , "", TChart1.Series(5).Color );
  237. TChart1.Series(5).AddXY (50, 38 , "", TChart1.Series(5).Color );
  238. //depth 정하기
  239. TChart1.Series(1).Depth = 1;
  240. TChart1.Series(2).Depth = 2;
  241. TChart1.Series(3).Depth = 3;
  242. TChart1.Series(4).Depth = 4;
  243. TChart1.Series(5).Depth = 5;
  244. if (hrcheck == "Y"){
  245. for(i =0 ; i <31 ; i ++ ){
  246. if(model.getValue("/root/main/recinfo/reclist/grid[2]/mnt" + i + "" ) != "" && model.getValue("/root/main/recinfo/reclist/grid[2]/mnt" + i + "" ) != "?"
  247. && model.getValue("/root/main/recinfo/reclist/grid[3]/mnt" + i + "" ) != "" && model.getValue("/root/main/recinfo/reclist/grid[3]/mnt" + i + "" ) != "?"){
  248. TChart1.Series(0).asCandle.AddCandle ( i, model.getValue("/root/main/recinfo/reclist/grid[3]/mnt" + i + "" ), 0, 0, model.getValue("/root/main/recinfo/reclist/grid[2]/mnt" + i + "" ));
  249. } else if (model.getValue("/root/main/recinfo/reclist/grid[2]/mnt" + i + "" ) != "" && model.getValue("/root/main/recinfo/reclist/grid[2]/mnt" + i + "" ) != "?"
  250. && model.getValue("/root/main/recinfo/reclist/grid[3]/mnt" + i + "" ) == "" && model.getValue("/root/main/recinfo/reclist/grid[3]/mnt" + i + "" ) == "?"){
  251. TChart1.Series(1).asCandle.AddCandle ( i, model.getValue("/root/main/recinfo/reclist/grid[2]/mnt" + i + "" ), 0, 0, model.getValue("/root/main/recinfo/reclist/grid[2]/mnt" + i + "" ));
  252. } else if (model.getValue("/root/main/recinfo/reclist/grid[2]/mnt" + i + "" ) == "" && model.getValue("/root/main/recinfo/reclist/grid[2]/mnt" + i + "" ) == "?"
  253. && model.getValue("/root/main/recinfo/reclist/grid[3]/mnt" + i + "" ) != "" && model.getValue("/root/main/recinfo/reclist/grid[3]/mnt" + i + "" ) != "?"){
  254. TChart1.Series(1).asCandle.AddCandle ( i, model.getValue("/root/main/recinfo/reclist/grid[3]/mnt" + i + "" ), 0, 0, model.getValue("/root/main/recinfo/reclist/grid[3]/mnt" + i + "" ));
  255. }
  256. if(model.getValue("/root/main/recinfo/reclist/grid[4]/mnt" + i + "" ) != "" && model.getValue("/root/main/recinfo/reclist/grid[4]/mnt" + i + "" ) != "?"){
  257. TChart1.Series(2).AddXY (i, model.getValue("/root/main/recinfo/reclist/grid[4]/mnt" + i + "" ), "", TChart1.Series(2).Color);
  258. }
  259. }
  260. }
  261. if (btcheck == "Y"){
  262. for(i =0 ; i <31 ; i ++ ){
  263. if(model.getValue("/root/main/recinfo/reclist/grid[6]/mnt" + i + "" ) != "" && model.getValue("/root/main/recinfo/reclist/grid[6]/mnt" + i + "" ) != "?" ){
  264. TChart1.Series(3).AddXY (i, model.getValue("/root/main/recinfo/reclist/grid[6]/mnt" + i + "" ), "", TChart1.Series(3).Color);
  265. }
  266. }
  267. }
  268. if (rrcheck == "Y"){
  269. for(i =0 ; i <31 ; i ++ ){
  270. if(model.getValue("/root/main/recinfo/reclist/grid[5]/mnt" + i + "" ) != "" && model.getValue("/root/main/recinfo/reclist/grid[5]/mnt" + i + "" ) != "?"){
  271. TChart1.Series(4).AddXY (i, model.getValue("/root/main/recinfo/reclist/grid[5]/mnt" + i + "" ), "", TChart1.Series(4).Color);
  272. }
  273. }
  274. }
  275. }
  276. /**
  277. * @group :
  278. * @ver : 2007.07.21
  279. * @by : 양천덕
  280. * @---------------------------------------------------
  281. * @type : function
  282. * @access : public
  283. * @desc : 기록 일시 생성
  284. * @param :
  285. * @return :
  286. * @---------------------------------------------------
  287. */
  288. function fMakeDate(pFlag){
  289. if(pFlag == "C"){
  290. if(model.getValue("/root/main/srchinfo/srchlist") == "-"){
  291. //input1.disabled = false;
  292. model.copyNode("/root/main/recinfo/cprinfo", "/root/item");
  293. var BaseDate = getCurrentDate();
  294. var BaseTime = getCurrentTime();
  295. model.setValue("/root/main/recinfo/cprinfo/cpr/startdd", BaseDate);
  296. model.setValue("/root/main/recinfo/cprinfo/cpr/starttm", BaseTime.substr(0,4) );
  297. } else {
  298. //input1.disabled = true;
  299. var BaseDate = model.getValue("/root/main/recinfo/cprinfo/cpr/startdd");
  300. var BaseTime = model.getValue("/root/main/recinfo/cprinfo/cpr/starttm");
  301. }
  302. }else {
  303. var BaseDate = model.getValue("/root/main/recinfo/cprinfo/cpr/startdd");
  304. var BaseTime = model.getValue("/root/main/recinfo/cprinfo/cpr/starttm");
  305. }
  306. var nowDate = (BaseDate + BaseTime).toDate("YYYYMMDDhhmmss");
  307. var fDate = (BaseDate + BaseTime).toDate("YYYYMMDDhhmmss");
  308. var afterDate = fDate.getAddDate(31, "m");
  309. var nowDay = nowDate.getDateFormat("YYYY년 MM월 DD일");
  310. var afterDay = afterDate.getDateFormat("YYYY년 MM월 DD일");
  311. var nowTime = nowDate.getHours();
  312. var afterTime = afterDate.getHours();
  313. var nowMinutes = nowDate.getMinutes();
  314. var afterMinutes = afterDate.getMinutes();
  315. var captionDay = "날짜";
  316. var captionTime = "시간";
  317. var captionMinutes = "분";
  318. var StndDay = "";
  319. var StandTime = "";
  320. var StandMinutes = "";
  321. var StandMinutes1 = "";
  322. fBottomDay = "";
  323. fBottomTime = "";
  324. fBottomMinutes = "";
  325. if(nowTime != afterTime){
  326. for(i = nowMinutes+1 ; i < 60 ; i ++ ){
  327. StndDay += "^" + nowDay ;
  328. StandTime += "^" + nowTime + "시" ;
  329. StandMinutes += "^" + i + "분";
  330. StandMinutes1 += "^" + i;
  331. }
  332. for(i= 0 ; i < afterMinutes ; i++ ) {
  333. StndDay += "^" + afterDay;
  334. StandTime += "^" + afterTime + "시";
  335. if( i < 10 ) {
  336. StandMinutes += "^" +"0" + i + "분";
  337. StandMinutes1 += "^" +"0" + i;
  338. } else {
  339. StandMinutes += "^" + i + "분";
  340. StandMinutes1 += "^" + i;
  341. }
  342. }
  343. } else {
  344. for( i = nowMinutes+1 ; i <afterMinutes ; i ++){
  345. StndDay += "^" + nowDay;
  346. StandTime += "^" + nowTime + "시";
  347. if( i < 10 ) {
  348. StandMinutes += "^" +"0" + i + "분";
  349. StandMinutes1 += "^" +"0" + i;
  350. } else {
  351. StandMinutes += "^" + i + "분";
  352. StandMinutes1 += "^" + i;
  353. }
  354. }
  355. }
  356. var caption = captionDay + StndDay + "|"
  357. + captionTime + StandTime + "|"
  358. + captionMinutes + StandMinutes;
  359. fBottomDay = captionDay+"^"+captionDay +"^"+ nowDay;
  360. fBottomTime = captionTime+"^"+captionTime +"^"+ nowTime + "시";
  361. fBottomMinutes = captionMinutes+"^"+captionMinutes +"^"+ nowMinutes + "분";
  362. var tmpCaption = fFstCaption.split("|");
  363. fScndCaption = "";
  364. fScndCaption = tmpCaption[0] + "|"
  365. + fBottomDay + StndDay + "^^^^^^|"
  366. + fBottomTime + StandTime + "^^^^^^|"
  367. + fBottomMinutes + StandMinutes + "|"
  368. + tmpCaption[1] + "|"
  369. + tmpCaption[2];
  370. // fCaption = "";
  371. // fCaption = captionDay + "|" + captionTime + "|" + captionMinutes ;
  372. grd_chrt.caption = caption;
  373. grd_chrt.refresh();
  374. if(fChartStat == "S"){
  375. fMakeBottomDate(fChartStat);
  376. }
  377. }
  378. /**
  379. * @group :
  380. * @ver : 2007.07.21
  381. * @by : 양천덕
  382. * @---------------------------------------------------
  383. * @type : function
  384. * @access : public
  385. * @desc : 차트 닫기/보기 버튼 선택시 그리드 정보 변경
  386. * @param :
  387. * @return :
  388. * @---------------------------------------------------
  389. */
  390. function fMakeBottomDate(plag){
  391. if(plag == "S"){
  392. grd_cpcr.caption = fScndCaption;
  393. grd_cpcr.refresh();
  394. }else{
  395. grd_cpcr.caption = fFstCaption;
  396. grd_cpcr.refresh();
  397. }
  398. fChartStat = plag;
  399. }
  400. /**
  401. * @group :
  402. * @ver : 2008.07.21
  403. * @by : 성미연
  404. * @---------------------------------------------------
  405. * @type : function
  406. * @access : public
  407. * @desc : 클릭시 'V'체크 표시
  408. * @param :
  409. * @return :
  410. * @---------------------------------------------------
  411. */
  412. function fClickChkData(){
  413. var recitemflag = model.getValue("/root/main/recinfo/reclist/grid[" + (grd_cpcr.row-2) + "]/recitemflag");
  414. if(recitemflag == "P" || recitemflag == "T"){ //PROCEDURE, 검사
  415. if(grd_cpcr.valueMatrix(grd_cpcr.row, grd_cpcr.col) == "V"){
  416. grd_cpcr.valueMatrix(grd_cpcr.row, grd_cpcr.col) = "";
  417. }else{
  418. grd_cpcr.valueMatrix(grd_cpcr.row, grd_cpcr.col) = "V";
  419. }
  420. }
  421. }
  422. /**
  423. * @group :
  424. * @ver : 2007.07.21
  425. * @by : 양천덕
  426. * @---------------------------------------------------
  427. * @type : function
  428. * @access : public
  429. * @desc : 문자입력 제한
  430. * @param :
  431. * @return :
  432. * @---------------------------------------------------
  433. */
  434. function isNumber(str) {
  435. str += ''; // 문자열로 변환
  436. str = str.replace(/^\s*|\s*$/g, ''); // 좌우 공백 제거
  437. if (str == '' || isNaN(str)) return false;
  438. return true;
  439. }
  440. /**
  441. * @group :
  442. * @ver : 2007.07.21
  443. * @by : 양천덕
  444. * @---------------------------------------------------
  445. * @type : function
  446. * @access : public
  447. * @desc : '0' 입력 제한
  448. * @param :
  449. * @return :
  450. * @---------------------------------------------------
  451. */
  452. function fZeroLeft(str){
  453. var i, j = 0;
  454. var cmacheck = "N";
  455. for (i = 0; i < str.length; i++) {
  456. if (str.charAt(i) == '.') cmacheck = "Y";
  457. }
  458. if(cmacheck == "N"){
  459. for (i = 0; i < str.length; i++) {
  460. if (str.charAt(i) == '0') j = j + 1;
  461. else break;
  462. }
  463. return str.substr(j, str.length - j + 1);
  464. }else{
  465. return str;
  466. }
  467. }
  468. /**
  469. * @group :
  470. * @ver : 2007.07.21
  471. * @by : 양천덕
  472. * @---------------------------------------------------
  473. * @type : function
  474. * @access : public
  475. * @desc : 준비수량 초기화
  476. * @param :
  477. * @return :
  478. * @---------------------------------------------------
  479. */
  480. function fCellInitSetting(sRow, sCol){
  481. if(sCol != grd_cpcr.colRef("prepqty")-2){
  482. model.setValue("/root/main/recinfo/reclist/grid["+sRow+"]/mnt"+sCol+"" , "");
  483. } else {
  484. model.setValue("/root/main/recinfo/reclist/grid["+sRow+"]/prepqty" , "");
  485. }
  486. }
  487. /**
  488. * @group :
  489. * @ver : 2007.07.21
  490. * @by : 양천덕
  491. * - 2008.07.21 수정 : 성미연
  492. * @---------------------------------------------------
  493. * @type : function
  494. * @access : public
  495. * @desc : 그리드 데이터 세팅
  496. * @param :
  497. * @return :
  498. * @---------------------------------------------------
  499. */
  500. function fCpcrDataSetting(){
  501. var sCol = grd_cpcr.col - 2; //첫번째 데이터 있는 값의 col이 2이므로(sCol = 35 : 준비수량)
  502. var sRow = grd_cpcr.row - 2;
  503. if(sRow == 0 ){
  504. sRow = 1;
  505. }
  506. fCellCheck = "";
  507. sSum = 0;
  508. tSum = 0;
  509. mSum = 0;
  510. if(sCol != grd_cpcr.colRef("prepqty")-2){
  511. var iptData = model.getValue("/root/main/recinfo/reclist/grid["+sRow+"]/mnt"+sCol+"");
  512. } else {
  513. var iptData = model.getValue("/root/main/recinfo/reclist/grid["+sRow+"]/prepqty");
  514. }
  515. //입력 데이터 공백값 제거
  516. iptData = iptData.setReplaceWord(" ", "");
  517. //입력 데이터 앞쪽 0제거
  518. //if(sRow != 2 && sRow != 3 && sRow != 4 && sRow != 5 && sRow != 6 && sRow != 7 && sRow != 8){
  519. // iptData = fZeroLeft(iptData);
  520. //}
  521. if(sCol != grd_cpcr.colRef("prepqty")-2){
  522. model.setValue("/root/main/recinfo/reclist/grid["+sRow+"]/mnt"+sCol+"" , iptData);
  523. } else {
  524. model.setValue("/root/main/recinfo/reclist/grid["+sRow+"]/prepqty" , iptData);
  525. }
  526. //문자 입력 제한
  527. var medCheck = model.getValue("/root/main/recinfo/reclist/grid["+sRow+"]/recitemflag") ;
  528. if(sRow == 2 || sRow == 3 || sRow == 4 || sRow == 5 || sRow == 7 || sRow == 8 ){ //sRow == 2 : SBP
  529. if(isNumber(iptData) == false && iptData != "" && iptData != "?"){
  530. fCellInitSetting(sRow, sCol);
  531. messageBox("숫자형 데이터만 입력 가능합니다.", "E");
  532. return;
  533. }
  534. }else if(sRow == 6) { // BT
  535. if(isNumber(iptData) == false && iptData != "" && iptData != "?"){
  536. fCellInitSetting(sRow, sCol);
  537. messageBox("숫자형 데이터만 입력 가능합니다.", "E");
  538. return;
  539. }else if(isNumber(iptData) == true && iptData != "" && iptData != "?" && iptData == "0" ){
  540. fCellInitSetting(sRow, sCol);
  541. messageBox("0을 입력 할 수 없습니다.", "E");
  542. return;
  543. }
  544. }else if ( medCheck == "M" ){ // 처방
  545. if(isNumber(iptData) == false && iptData != "" ){
  546. fCellInitSetting(sRow, sCol);
  547. messageBox("숫자형 데이터만 입력 가능합니다.", "E");
  548. return;
  549. }else if(isNumber(iptData) == true && iptData != "" && iptData == "0" ){
  550. fCellInitSetting(sRow, sCol);
  551. messageBox("0을 입력 할 수 없습니다.", "E");
  552. return;
  553. }
  554. }else{
  555. if( iptData == "?" ){
  556. fCellInitSetting(sRow, sCol);
  557. messageBox("입력 할 수 없는 데이터 입니다.", "E");
  558. return;
  559. }
  560. }
  561. cRow = grd_cpcr.row;
  562. cCol = grd_cpcr.col;
  563. if(cRow != grd_cpcr.rows -1 ){
  564. grd_cpcr.row = cRow+1;
  565. grd_cpcr.col = cCol;
  566. }else{
  567. grd_cpcr.row= 3;
  568. grd_cpcr.col= cCol +1 ;
  569. }
  570. //처방 인증 데이터 생성로직
  571. if(model.getValue("/root/main/recinfo/reclist/grid["+sRow+"]/recitemflag") == "M"){
  572. //처방별 합계 구하기
  573. for(i = 0 ; i <= 30 ; i++){
  574. if(model.getValue("/root/main/recinfo/reclist/grid["+sRow+"]/mnt"+ i +"" ) != ""){
  575. //sSum = parseInt(sSum) + parseInt(model.getValue("/root/main/recinfo/reclist/grid["+sRow+"]/mnt"+ i +"" ));
  576. sSum = Number(sSum) + Number(model.getValue("/root/main/recinfo/reclist/grid["+sRow+"]/mnt"+ i +"" ));
  577. }
  578. }
  579. //용량으로 입력시
  580. if(model.getValue("/root/main/recinfo/cprinfo/cpr/drugunit") == "2"){
  581. if(sCol != grd_cpcr.colRef("prepqty")-2){
  582. if(model.getValue("/root/main/recinfo/reclist/grid["+sRow+"]/cntsvol") == 0 || model.getValue("/root/main/recinfo/reclist/grid["+sRow+"]/cntsvol") == "0.0"){
  583. for(i =0 ; i <= 30 ; i++){
  584. model.setValue("/root/main/recinfo/reclist/grid["+sRow+"]/mnt"+ i +"" ,"");
  585. }
  586. messageBox("용량단위로 입력할 수 없습니다.","E");
  587. return;
  588. } else {
  589. model.setValue("/root/main/recinfo/reclist/grid["+sRow+"]/vol", sSum);
  590. dSum = Number(sSum) / Number(model.getValue("/root/main/recinfo/reclist/grid["+sRow+"]/cntsvol"));
  591. model.setValue("/root/main/recinfo/reclist/grid["+sRow+"]/qty", dSum);
  592. model.setValue("/root/main/recinfo/reclist/grid["+sRow+"]/volunit", model.getValue("/root/main/recinfo/reclist/grid["+sRow+"]/cntsunit"));
  593. model.setValue("/root/main/recinfo/reclist/grid["+sRow+"]/qtyunit", model.getValue("/root/main/recinfo/reclist/grid["+sRow+"]/stndunit"));
  594. }
  595. }
  596. /*
  597. if(model.getValue("/root/main/recinfo/reclist/grid["+sRow+"]/prepqty" ) != ""){
  598. tSum = dSum + parseInt(model.getValue("/root/main/recinfo/reclist/grid["+sRow+"]/prepqty"));
  599. model.setValue("/root/main/recinfo/reclist/grid["+sRow+"]/sumqty", tSum);
  600. } else {
  601. model.setValue("/root/main/recinfo/reclist/grid["+sRow+"]/sumqty", dSum);
  602. }
  603. */
  604. //수량으로 입력시
  605. } else {
  606. if(sCol != grd_cpcr.colRef("prepqty")-2){
  607. if(model.getValue("/root/main/recinfo/reclist/grid["+sRow+"]/cntsvol") != 0 ){
  608. mSum = Number(sSum) * Number(model.getValue("/root/main/recinfo/reclist/grid["+sRow+"]/cntsvol"));
  609. model.setValue("/root/main/recinfo/reclist/grid["+sRow+"]/vol", mSum);
  610. model.setValue("/root/main/recinfo/reclist/grid["+sRow+"]/volunit", model.getValue("/root/main/recinfo/reclist/grid["+sRow+"]/cntsunit"));
  611. }
  612. model.setValue("/root/main/recinfo/reclist/grid["+sRow+"]/qty", sSum);
  613. model.setValue("/root/main/recinfo/reclist/grid["+sRow+"]/qtyunit", model.getValue("/root/main/recinfo/reclist/grid["+sRow+"]/stndunit"));
  614. }
  615. /*
  616. if(model.getValue("/root/main/recinfo/reclist/grid["+sRow+"]/prepqty" ) != ""){
  617. tSum = sSum + parseInt(model.getValue("/root/main/recinfo/reclist/grid["+sRow+"]/prepqty"));
  618. model.setValue("/root/main/recinfo/reclist/grid["+sRow+"]/sumqty", tSum);
  619. } else {
  620. model.setValue("/root/main/recinfo/reclist/grid["+sRow+"]/sumqty", sSum);
  621. }
  622. */
  623. }
  624. //총계 계산(SUM의 수량 + 준비수량)
  625. var sumqty = model.getValue("/root/main/recinfo/reclist/grid["+sRow+"]/qty")
  626. var prepqty = model.getValue("/root/main/recinfo/reclist/grid["+sRow+"]/prepqty");
  627. //var totqty = parseInt(sumqty) + parseInt(prepqty);
  628. var totqty = Number(sumqty) + Number(prepqty);
  629. if(model.getValue("/root/main/recinfo/reclist/grid["+sRow+"]/prepqty" ) != ""){
  630. model.setValue("/root/main/recinfo/reclist/grid["+sRow+"]/sumqty", totqty);
  631. }else{
  632. model.setValue("/root/main/recinfo/reclist/grid["+sRow+"]/sumqty", sumqty);
  633. }
  634. }else{
  635. if(sCol == grd_cpcr.colRef("prepqty")-2){
  636. model.setValue("/root/main/recinfo/reclist/grid["+sRow+"]/prepqty", "");
  637. }
  638. }
  639. model.refresh();
  640. if( sRow == 2 || sRow == 3 || sRow == 4 || sRow == 5 || sRow == 6 ){
  641. if( sCol != grd_cpcr.colRef("prepqty")-2 && iptData != "?" ){
  642. fMakeChart();
  643. }
  644. }
  645. }
  646. /**
  647. * @group :
  648. * @ver : 2007.07.21
  649. * @by : 양천덕
  650. * @---------------------------------------------------
  651. * @type : function
  652. * @access : public
  653. * @desc : 그리드 값 변경 (투약단위변경 : 수량/용량)
  654. * @param :
  655. * @return :
  656. * @---------------------------------------------------
  657. */
  658. function fCellValueChange(){
  659. var ChagData = 0;
  660. if(rdo_unit.value == "1"){ //수량
  661. for (i = 0 ; i < grd_cpcr.rows; i++){
  662. if(model.getValue("/root/main/recinfo/reclist/grid["+i+"]/recitemflag") == "M"){
  663. for(j = 0 ; j < 31 ; j++){
  664. if(model.getValue("/root/main/recinfo/reclist/grid["+i+"]/mnt"+j+"") != ""){
  665. ChagData = Number(model.getValue("/root/main/recinfo/reclist/grid["+i+"]/mnt"+j+"")) /
  666. Number(model.getValue("/root/main/recinfo/reclist/grid["+i+"]/cntsvol"));
  667. model.setValue("/root/main/recinfo/reclist/grid["+i+"]/mnt"+j+"" , ChagData );
  668. }
  669. }
  670. }
  671. }
  672. } else { //용량
  673. for (i = 0 ; i < grd_cpcr.rows; i++){
  674. if(model.getValue("/root/main/recinfo/reclist/grid["+i+"]/recitemflag") == "M"){
  675. for(j=0 ; j <31 ; j++){
  676. if(model.getValue("/root/main/recinfo/reclist/grid["+i+"]/mnt"+j+"") != ""){
  677. ChagData = Number(model.getValue("/root/main/recinfo/reclist/grid["+i+"]/mnt"+j+"")) *
  678. Number(model.getValue("/root/main/recinfo/reclist/grid["+i+"]/cntsvol"));
  679. model.setValue("/root/main/recinfo/reclist/grid["+i+"]/mnt"+j+"" , ChagData );
  680. }
  681. }
  682. }
  683. }
  684. }
  685. grd_cpcr.refresh();
  686. }
  687. /**
  688. * @group :
  689. * @ver : 2007.07.21
  690. * @by : 양천덕
  691. * @---------------------------------------------------
  692. * @type : function
  693. * @access : public
  694. * @desc : 팝업메뉴(미구현)
  695. * @param :
  696. * @return :
  697. * @---------------------------------------------------
  698. */
  699. function fSetItem(flag){
  700. alert(flag + "개발 중 입니다.");
  701. }
  702. function fPopupOpen(){
  703. var sCol = grd_cpcr.mouseCol;
  704. var sRow = grd_cpcr.mouseRow;
  705. var iCol = grd_cpcr.mouseCol - 2;
  706. var iRow = grd_cpcr.mouseRow - 2;
  707. if(event.button == 3 && sCol > 2 && sCol < 33 && sRow == 6 && fChartStat == "S" ||
  708. event.button == 3 && sCol > 2 && sCol < 33 && sRow == 3 && fChartStat == "F" ){
  709. if(grd_cpcr.isCell(event.target) && grd_cpcr.mouseRow >= grd_cpcr.fixedrows){
  710. window.setPopupMenu( true, "/root/codedata/popup/item", "name", "func", true);
  711. }else{
  712. window.setPopupMenu(false);
  713. }
  714. }
  715. }
  716. /**
  717. * @group :
  718. * @ver : 2007.07.21
  719. * @by : 양천덕
  720. * @---------------------------------------------------
  721. * @type : function
  722. * @access : public
  723. * @desc : CPCR 기록 저장
  724. * @param :
  725. * @return :
  726. * @---------------------------------------------------
  727. */
  728. function fSaveDataCpcr(flag){
  729. model.removeNode("/root/send/cprbaseinfo");
  730. model.removeNode("/root/send/cprrecinfo");
  731. model.removeNode("/root/send/cprsmminfo");
  732. var sSaveData = "";
  733. var sSaveHeader = "pid▦indd▦cretno▦deptcd▦instcd▦startdd▦starttm▦leaderid▦airwayid▦compressionfstid▦compressionscndid▦medid▦recid▦drugunit▦status▩";
  734. var sSaveData = model.getValue("/root/main/cond/pid") + "▦"
  735. + model.getValue("/root/main/cond/indd") + "▦"
  736. + model.getValue("/root/main/cond/cretno") + "▦"
  737. + model.getValue("/root/main/cond/deptcd") + "▦"
  738. + model.getValue("/root/main/cond/instcd") + "▦"
  739. + model.getValue("/root/main/recinfo/cprinfo/cpr/startdd") + "▦"
  740. + model.getValue("/root/main/recinfo/cprinfo/cpr/starttm") + "▦"
  741. + model.getValue("/root/main/recinfo/cprinfo/cpr/leaderid") + "▦"
  742. + model.getValue("/root/main/recinfo/cprinfo/cpr/airwayid") + "▦"
  743. + model.getValue("/root/main/recinfo/cprinfo/cpr/compressionfstid") + "▦"
  744. + model.getValue("/root/main/recinfo/cprinfo/cpr/compressionscndid") + "▦"
  745. + model.getValue("/root/main/recinfo/cprinfo/cpr/medid") + "▦"
  746. + model.getValue("/root/main/recinfo/cprinfo/cpr/recid") + "▦"
  747. + model.getValue("/root/main/recinfo/cprinfo/cpr/drugunit") + "▦";
  748. if(flag == "I"){
  749. sSaveData += "I" + "▩";
  750. }else{
  751. sSaveData += "U" + "▩";
  752. }
  753. var sRows = grd_cpcr.rows-2;
  754. var sCols = grd_cpcr.cols;
  755. var sSaveGridData = "";
  756. var sSaveGridHeader = "pid▦indd▦cretno▦startdd▦starttm▦deptcd▦recno▦recmnt▦instcd▦recitemflag▦recitemnm▦recmntval▩";
  757. var sSaveSmrData = "";
  758. var sSaveSmrHeader = "pid▦indd▦cretno▦startdd▦starttm▦deptcd▦recno▦instcd▦prcpcd▦drugvol▦drugqty▦prepqty▦sumqty▦cntsunit▦cntsvol▦stndunit▦stndvol▩";
  759. // for(i = 0 ; i < grd_cpcr.rows; i++){
  760. // for(j=1 ; j< grd_cpcr.cols; j++){
  761. for(i = 1 ; i < sRows ; i++){
  762. sSaveGridData += model.getValue("/root/main/cond/pid") + "▦"
  763. + model.getValue("/root/main/cond/indd") + "▦"
  764. + model.getValue("/root/main/cond/cretno") + "▦"
  765. + model.getValue("/root/main/recinfo/cprinfo/cpr/startdd") + "▦"
  766. + model.getValue("/root/main/recinfo/cprinfo/cpr/starttm") + "▦"
  767. + model.getValue("/root/main/cond/deptcd") + "▦"
  768. + i + "▦"
  769. + "99" + "▦"
  770. + model.getValue("/root/main/cond/instcd") + "▦"
  771. + model.getValue("/root/main/recinfo/reclist/grid["+i+"]/recitemflag") + "▦"
  772. + model.getValue("/root/main/recinfo/reclist/grid["+i+"]/subtitl") + "▦"
  773. + "" + "▩"
  774. for(j = 0 ; j < 31; j++){
  775. if(model.getValue("/root/main/recinfo/reclist/grid["+i+"]/mnt" + j + "") != "" ){
  776. sSaveGridData += model.getValue("/root/main/cond/pid") + "▦"
  777. + model.getValue("/root/main/cond/indd") + "▦"
  778. + model.getValue("/root/main/cond/cretno") + "▦"
  779. + model.getValue("/root/main/recinfo/cprinfo/cpr/startdd") + "▦"
  780. + model.getValue("/root/main/recinfo/cprinfo/cpr/starttm") + "▦"
  781. + model.getValue("/root/main/cond/deptcd") + "▦"
  782. + i + "▦"
  783. + j + "▦"
  784. + model.getValue("/root/main/cond/instcd") + "▦"
  785. + model.getValue("/root/main/recinfo/reclist/grid["+i+"]/recitemflag") + "▦"
  786. + model.getValue("/root/main/recinfo/reclist/grid["+i+"]/subtitl") + "▦"
  787. + model.getValue("/root/main/recinfo/reclist/grid["+i+"]/mnt" + j + "") + "▩"
  788. }
  789. }
  790. if(model.getValue("/root/main/recinfo/reclist/grid["+ i +"]/sumqty")!= "") {
  791. sSaveSmrData += model.getValue("/root/main/cond/pid") + "▦"
  792. + model.getValue("/root/main/cond/indd") + "▦"
  793. + model.getValue("/root/main/cond/cretno") + "▦"
  794. + model.getValue("/root/main/recinfo/cprinfo/cpr/startdd") + "▦"
  795. + model.getValue("/root/main/recinfo/cprinfo/cpr/starttm") + "▦"
  796. + model.getValue("/root/main/cond/deptcd") + "▦"
  797. + i + "▦"
  798. + model.getValue("/root/main/cond/instcd") + "▦"
  799. + model.getValue("/root/main/recinfo/reclist/grid["+ i +"]/subtitl") + "▦"
  800. + model.getValue("/root/main/recinfo/reclist/grid["+ i +"]/vol") + "▦"
  801. + model.getValue("/root/main/recinfo/reclist/grid["+ i +"]/qty") + "▦"
  802. + model.getValue("/root/main/recinfo/reclist/grid["+ i +"]/prepqty") + "▦"
  803. + model.getValue("/root/main/recinfo/reclist/grid["+ i +"]/sumqty") + "▦"
  804. + model.getValue("/root/main/recinfo/reclist/grid["+ i +"]/cntsunit") + "▦"
  805. + model.getValue("/root/main/recinfo/reclist/grid["+ i +"]/cntsvol") + "▦"
  806. + model.getValue("/root/main/recinfo/reclist/grid["+ i +"]/stndunit") + "▦"
  807. + model.getValue("/root/main/recinfo/reclist/grid["+ i +"]/stndvol") + "▩"
  808. }
  809. }
  810. model.makeValue("/root/send/cprbaseinfo", sSaveHeader + sSaveData);
  811. model.makeValue("/root/send/cprrecinfo", sSaveGridHeader + sSaveGridData );
  812. model.makeValue("/root/send/cprsmminfo", sSaveSmrHeader + sSaveSmrData);
  813. fCpcCondNodeSet();
  814. if(submit("TXMNE03501") == true ){
  815. var saveDate = model.getValue("/root/main/recinfo/cprinfo/cpr/startdd");
  816. var saveTime = model.getValue("/root/main/recinfo/cprinfo/cpr/starttm");
  817. model.setValue("/root/main/srchinfo/srchlist", saveDate + saveTime);
  818. if(flag == "I"){
  819. messageBox("저장이 완료되었습니다.", "I");
  820. }else if(flag == "U"){
  821. messageBox("수정이 완료되었습니다.", "I");
  822. }
  823. }
  824. submit("TRMNE03502");
  825. cmb_list.refresh();
  826. }
  827. /**
  828. * @group :
  829. * @ver : 2007.07.21
  830. * @by : 양천덕
  831. * @---------------------------------------------------
  832. * @type : function
  833. * @access : public
  834. * @desc : 그리드 Width Size 변경
  835. * @param :
  836. * @return :
  837. * @---------------------------------------------------
  838. */
  839. function fColWidthChange(pWidth){
  840. var sWidth = pWidth.split(", ");
  841. for (i = 0; i < sWidth.length; i++) {
  842. grd_cpcr.colwidth(i) = sWidth[i];
  843. }
  844. }
  845. /**
  846. * @group :
  847. * @ver : 2007.07.21
  848. * @by : 양천덕
  849. * @---------------------------------------------------
  850. * @type : function
  851. * @access : public
  852. * @desc : 차트보기 버튼 이벤트
  853. * @param :
  854. * @return :
  855. * @---------------------------------------------------
  856. */
  857. function fShowChart(){
  858. btn_Cchrt.visible = true;
  859. group2.visible = true;
  860. caption8.visible = true;
  861. caption12.visible = true;
  862. caption13.visible = true;
  863. checkbox1.visible = true;
  864. checkbox2.visible = true;
  865. checkbox3.visible = true;
  866. btn_Schrt.visible = false;
  867. group6.attribute("style") = "left:0px; top:320px; width:1190px; height:446px;;" ;
  868. grd_cpcr.attribute("style") = "left:0px; top:28px; width:1189px; height:415px; text-align:center;" ;
  869. fMakeBottomDate("F");
  870. fMakeChart();
  871. model.refresh();
  872. }
  873. /**
  874. * @group :
  875. * @ver : 2007.07.21
  876. * @by : 양천덕
  877. * @---------------------------------------------------
  878. * @type : function
  879. * @access : public
  880. * @desc : 차트닫기 버튼 이밴트
  881. * @param :
  882. * @return :
  883. * @---------------------------------------------------
  884. */
  885. function fCloseChart(){
  886. btn_Cchrt.visible = false;
  887. group2.visible = false;
  888. caption8.visible = false;
  889. caption12.visible = false;
  890. caption13.visible = false;
  891. checkbox1.visible = false;
  892. checkbox2.visible = false;
  893. checkbox3.visible = false;
  894. btn_Schrt.visible = true;
  895. group6.attribute("style") = "left:0px; top:55px; width:1190px; height:711px; ";
  896. grd_cpcr.attribute("style") = "left:0px; top:28px; width:1189px; height:680px; text-align:center; ";
  897. fMakeBottomDate("S");
  898. }
  899. /**
  900. * @group :
  901. * @ver : 2007.07.21
  902. * @by : 양천덕
  903. * @---------------------------------------------------
  904. * @type : function
  905. * @access : public
  906. * @desc : 간호일지 TypeII 오픈
  907. * @param :
  908. * @return :
  909. * @---------------------------------------------------
  910. */
  911. function fOpenDialRec(){
  912. var sPid = model.getValue("/root/main/cond/pid");
  913. var sIndd = model.getValue("/root/main/cond/indd");
  914. var sCretno = model.getValue("/root/main/cond/cretno");
  915. var sDeptcd = model.getValue("/root/main/cond/deptcd");
  916. var sInstcd = model.getValue("/root/main/cond/instcd");
  917. var sStartdd = model.getValue("/root/main/recinfo/cprinfo/cpr/startdd");
  918. var sStarttm = model.getValue("/root/main/recinfo/cprinfo/cpr/starttm");
  919. //parammsg = "recflag▦dutplaccd▦reclnkkey▩E▦82015▦"+sPid+","+sIndd+","+sCretno+","+sDeptcd+","+sInstcd+"▩";
  920. parammsg = "recflag▦dutplaccd▦reclnkkey▩E▦82015▦"+sPid+","+sIndd+","+sCretno+","+sDeptcd+"▩";
  921. setParameter("SMMNR03400_ParamBase", parammsg); // 파라미터 설정
  922. modal("SMMNR03400"); // 간호일지I 화면 팝업
  923. }
  924. /**
  925. * @group :
  926. * @ver : 2007.07.21
  927. * @by : 양천덕
  928. * @---------------------------------------------------
  929. * @type : function
  930. * @access : public
  931. * @desc : 처방 목록 집계 표 보기
  932. * @param :
  933. * @return :
  934. * @---------------------------------------------------
  935. */
  936. function fShowSmm(){
  937. pWidth = "20, 96, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 34, 32, 31, 31, 31, 28";
  938. //grd_cpcr.attribute("colwidth") = "20, 101, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 33, 31, 30, 30, 30, 28";
  939. fColWidthChange(pWidth);
  940. btn_Ssum.visible = false;
  941. btn_Csum.visible = true;
  942. }
  943. /**
  944. * @group :
  945. * @ver : 2007.07.21
  946. * @by : 양천덕
  947. * @---------------------------------------------------
  948. * @type : function
  949. * @access : public
  950. * @desc : 처방 목록 집계 표 닫기
  951. * @param :
  952. * @return :
  953. * @---------------------------------------------------
  954. */
  955. function fCloseSmm(){
  956. pWidth = "20, 96, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 0, 0, 0, 0, 0, 0";
  957. //grd_cpcr.attribute("colwidth") = "20, 96, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 0, 0, 0, 0, 0, 0";
  958. fColWidthChange(pWidth);
  959. btn_Csum.visible = false;
  960. btn_Ssum.visible = true;
  961. }