Changeset 460 for cprs/branches/foia-cprs/CPRS-Chart/fReports.pas
- Timestamp:
- Jul 6, 2008, 8:20:14 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cprs/branches/foia-cprs/CPRS-Chart/fReports.pas
r459 r460 6 6 Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, 7 7 fHSplit, StdCtrls, ExtCtrls, ORCtrls, ComCtrls, Menus, uConst, ORDtTmRng, 8 OleCtrls, SHDocVw, Buttons, ClipBrd, rECS, Variants ;8 OleCtrls, SHDocVw, Buttons, ClipBrd, rECS, Variants, StrUtils; 9 9 10 10 type … … 47 47 tvProcedures: TORTreeView; 48 48 lblProcTypeMsg: TOROffsetLabel; 49 pnlViews: TORAutoPanel; 50 chkDualViews: TCheckBox; 51 btnChangeView: TORAlignButton; 52 btnGraphSelections: TORAlignButton; 53 lblDateRange: TLabel; 54 lstDateRange: TORListBox; 55 pnlTopViews: TPanel; 49 56 procedure lstQualifierClick(Sender: TObject); 50 57 procedure GotoTop1Click(Sender: TObject); … … 59 66 procedure TabControl1Change(Sender: TObject); 60 67 procedure FormDestroy(Sender: TObject); 61 procedure GoRemote(Dest: TStringList; AItem: string; AQualifier, ARpc: string; AHSTag: string );68 procedure GoRemote(Dest: TStringList; AItem: string; AQualifier, ARpc: string; AHSTag: string; AHDR: string); 62 69 procedure lstHeadersClick(Sender: TObject); 63 70 procedure Splitter1CanResize(Sender: TObject; var NewSize: Integer; … … 99 106 var AllowCollapse: Boolean); 100 107 procedure tvProceduresExpanding(Sender: TObject; Node: TTreeNode; 101 var AllowExpansion: Boolean); 108 var AllowExpansion: Boolean); 102 109 procedure tvProceduresClick(Sender: TObject); 103 110 procedure tvProceduresChange(Sender: TObject; Node: TTreeNode); 104 111 procedure tvProceduresKeyDown(Sender: TObject; var Key: Word; 105 Shift: TShiftState); 112 Shift: TShiftState); 113 procedure chkDualViewsClick(Sender: TObject); 114 procedure btnChangeViewClick(Sender: TObject); 115 procedure btnGraphSelectionsClick(Sender: TObject); 116 procedure lstDateRangeClick(Sender: TObject); 117 procedure sptHorzMoved(Sender: TObject); 106 118 107 119 private … … 109 121 procedure ProcessNotifications; 110 122 procedure ShowTabControl; 111 //procedure UpdateRemoteStatus(aSiteID, aStatus: string); 123 procedure Graph(reportien: integer); 124 procedure GraphPanel(active: boolean); 112 125 113 126 public … … 145 158 ulvSelectOn: boolean; //flag turned on when multiple items in lvReports control have been selected 146 159 uListState: Integer; //Checked state of list of Adhoc components Checked: Abbreviation, UnChecked: Name 147 uNoRemote: boolean;148 160 uECSReport: TECSReport; //Event Capture Report, initiated in fFrame when Click Event Capture under Tools 149 161 UpdatingLvReports: Boolean; //Currently updating lvReports … … 155 167 156 168 uses ORFn, rCore, rReports, fFrame, uCore, uReports, fReportsPrint, 157 fReportsAdhocComponent1, activex, mshtml, dShared ;169 fReportsAdhocComponent1, activex, mshtml, dShared, fGraphs, rGraphs; //***** 158 170 159 171 const … … 182 194 uHTMLPatient: ANSIstring; 183 195 uRptID: String; 196 uDirect: String; 184 197 uEmptyImageList: TImageList; 185 198 ColumnToSort: Integer; 186 199 ColumnSortForward: Boolean; 200 GraphForm: TfrmGraphs; 201 GraphFormActive: boolean; 187 202 188 203 procedure TfrmReports.ClearPtData; … … 200 215 TabControl1.Visible := false; 201 216 TabControl1.TabStop := false; 217 if (GraphForm <> nil) and GraphFormActive then 218 with GraphForm do 219 begin 220 GraphForm.SendToBack; 221 Initialize; 222 DisplayData('top'); 223 DisplayData('bottom'); 224 lstCheck.Items.Clear; 225 GraphFormActive := false; 226 end; 227 begin 228 end; 229 end; 230 231 procedure TfrmReports.Graph(reportien: integer); 232 begin 233 if GraphForm = nil then 234 begin 235 GraphForm := TfrmGraphs.Create(self); 236 try 237 with GraphForm do 238 begin 239 if btnClose.Tag = 1 then 240 Exit; 241 Parent := pnlRight; 242 Align := alClient; 243 pnlFooter.Tag := 1; //suppresses bottom of graph form 244 pnlBottom.Height := 1; 245 pnlMain.BevelInner := bvLowered; 246 pnlMain.BevelOuter := bvRaised; 247 pnlMain.Tag := reportien; 248 Initialize; 249 ResizeAnchoredFormToFont(GraphForm); 250 Show; 251 DisplayData('top'); 252 DisplayData('bottom'); 253 lstCheck.Items.Clear; 254 GraphPanel(true); 255 lstTypes.Hint := Patient.DFN; 256 BringToFront; 257 end; 258 finally 259 if GraphForm.btnClose.Tag = 1 then 260 begin 261 GraphFormActive := false; 262 GraphForm.Free; 263 GraphForm := nil; 264 end 265 else 266 GraphFormActive := true; 267 end; 268 end 269 else if GraphForm.btnClose.Tag = 1 then 270 Exit 271 else if GraphFormActive and (GraphForm.lstTypes.Hint = Patient.DFN) then 272 begin // displaying same patient 273 if Tag <> reportien then 274 with GraphForm do 275 begin // new report 276 pnlMain.Tag := reportien; 277 Initialize; 278 //DisplayData('top'); 279 //DisplayData('bottom'); 280 lstCheck.Items.Clear; 281 GraphPanel(true); 282 BringToFront; 283 end; 284 //no action 285 end 286 else if GraphForm.lstTypes.Hint = Patient.DFN then 287 begin // same patient, bring back graph 288 GraphPanel(true); 289 BringToFront; 290 GraphFormActive := true; 291 end 292 else 293 with GraphForm do 294 begin // new patient 295 pnlMain.Tag := reportien; 296 Initialize; 297 DisplayData('top'); 298 DisplayData('bottom'); 299 lstCheck.Items.Clear; 300 lstTypes.Hint := Patient.DFN; 301 GraphPanel(true); 302 BringToFront; 303 GraphFormActive := true; 304 end; 305 end; 306 307 procedure TfrmReports.GraphPanel(active: boolean); 308 var 309 aQualifier, aStartTime, aStopTime: string; 310 begin 311 if active then 312 begin 313 pnlLeftBottom.Height := pnlLeft.Height div 2; 314 pnlViews.Height := pnlLeftBottom.Height; 315 if pnlLeft.Height < 200 then 316 pnlTopViews.Height := 3 317 else 318 pnlTopViews.Height := 80; 319 lblQualifier.Visible := false; 320 lstQualifier.Visible := false; 321 pnlViews.Visible := true; 322 if lstDateRange.Tag = 0 then 323 begin 324 lstDateRange.Tag := 1; 325 aQualifier := PReportTreeObject(tvReports.Selected.Data)^.Qualifier; 326 aStartTime := Piece(aQualifier,';',1); 327 aStopTime := Piece(aQualifier,';',2); 328 GraphForm.cboDateRange.Items.Add( 329 '^' + aStartTime + ' to ' + aStopTime +'^^^' + aStartTime + ';' + aStopTime + 330 '^' + floattostr(strtofmdatetime(aStartTime)) + '^' + floattostr(strtofmdatetime(aStopTime))); 331 lstDateRange.Items := GraphForm.cboDateRange.Items; 332 //lstDateRange.ItemIndex := lstDateRange.Items.Count - 1; 333 lstDateRange.ItemIndex := lstDateRange.Items.Count - 2; //set to all results till fixed 334 lstDateRangeClick(self); 335 end; 336 pnlLeftBottom.Visible := true; 337 splitter1.Visible := true; 338 end 339 else 340 begin 341 lblQualifier.Visible := true; 342 lstQualifier.Visible := true; 343 pnlViews.Visible := false; 344 pnlLeftBottom.Height := lblHeaders.Height + lblQualifier.Height + 90; 345 end; 202 346 end; 203 347 … … 249 393 end; 250 394 end; 395 if (uReportType = 'G') and GraphFormActive then 396 with GraphForm do 397 begin 398 if (lvwItemsTop.SelCount < 1) and (lvwItemsBottom.SelCount < 1) then 399 begin 400 InfoBox('There are no items graphed.', 'No Items to Print', MB_OK); 401 Exit; 402 end 403 else 404 begin 405 mnuPopGraphPrintClick(mnuPopGraphPrint); 406 Exit; 407 end; 408 end; 251 409 if uQualifierType = QT_DATERANGE then 252 410 begin // = 2 … … 272 430 uUpdateStat := false; 273 431 ulvSelectOn := false; 274 uNoRemote := false;275 432 uListState := GetAdhocLookup(); 276 433 memText.SelStart := 0; … … 285 442 //the preferred method would be to use headers and footers 286 443 //so this is just an interim solution. 287 pnlLeftBottom.Visible := False; 444 if not GraphFormActive then 445 pnlLeftBottom.Visible := False; 288 446 if InitPage then 289 447 begin … … 325 483 begin 326 484 lstQualifier.Clear; 327 tvProcedures.Items.Clear; 485 tvProcedures.Items.Clear; 328 486 lblProcTypeMsg.Visible := FALSE; 329 487 lvReports.SmallImages := uEmptyImageList; … … 338 496 end; 339 497 CC_NOTIFICATION: ProcessNotifications; 340 end; 498 end; 341 499 end; 342 500 … … 373 531 uHTMLDoc := ''; 374 532 WebBrowser1.Navigate('about:blank'); 375 tvProcedures.Items.Clear; 533 tvProcedures.Items.Clear; 376 534 lblProcTypeMsg.Visible := FALSE; 377 535 lvReports.SmallImages := uEmptyImageList; … … 406 564 begin 407 565 if addgrandchild = true then 408 currentNode := tvReports.Items.AddChildObject(grandParentNode,Piece(x,'^',3),MakeReportTreeObject(Pieces(x,'^',2,1 4)))566 currentNode := tvReports.Items.AddChildObject(grandParentNode,Piece(x,'^',3),MakeReportTreeObject(Pieces(x,'^',2,15))) 409 567 else 410 568 if addchild = true then 411 569 begin 412 currentNode := tvReports.Items.AddChildObject(parentNode,Piece(x,'^',3),MakeReportTreeObject(Pieces(x,'^',2,1 4)));570 currentNode := tvReports.Items.AddChildObject(parentNode,Piece(x,'^',3),MakeReportTreeObject(Pieces(x,'^',2,15))); 413 571 addgrandchild := true; 414 572 grandParentNode := currentNode; … … 416 574 else 417 575 begin 418 currentNode := tvReports.Items.AddObject(currentNode,Piece(x,'^',3),MakeReportTreeObject(Pieces(x,'^',2,1 4)));576 currentNode := tvReports.Items.AddObject(currentNode,Piece(x,'^',3),MakeReportTreeObject(Pieces(x,'^',2,15))); 419 577 parentNode := currentNode; 420 578 addchild := true; … … 425 583 begin 426 584 currentNode := tvReports.Items.AddObject(currentNode,Piece(x,'^',2),MakeReportTreeObject(x)); 427 //addchild := true;428 585 parentNode := currentNode; 429 586 end … … 460 617 aTmpAray: TStringList; 461 618 aColCtr, aCurCol, aCurRow, aColID: integer; 462 x, c,aSite: string;619 x,y,z,c,aSite: string; 463 620 ListItem: TListItem; 464 621 begin … … 466 623 aErr := 0; 467 624 ListItem := nil; 468 //RowObjects.Clear;469 625 case uQualifierType of 470 626 QT_HSCOMPONENT: … … 536 692 if piece(uColumns.Strings[aCurCol],'^',4) = '1' then 537 693 c := c + '...'; 538 ListItem.SubItems.Add(c); 694 z := piece(c,'^',1); 695 y := copy(c, (pos('^', c)), 9999); 696 if pos('^',y) > 0 then 697 begin 698 while pos('^',y) > 0 do 699 begin 700 y := copy(y, (pos('^', y)+1), 9999); 701 z := z + '^' + y; 702 end; 703 ListItem.SubItems.Add(z); 704 end 705 else 706 begin 707 ListItem.SubItems.Add(y); 708 end; 539 709 end; 540 710 RowObjects.Add(aSite, IntToStr(aCurRow) + ':' + IntToStr(aCurCol), uColumns.Strings[aCurCol], aTmpAray); … … 548 718 if aColID = aCurCol then 549 719 begin 550 aTmpAray.Add(piece(x,'^',2)); 720 z := ''; 721 y := piece(x,'^',2); 722 if length(y) > 0 then z := y; 723 y := copy(x, (pos('^', x)+1), 9999); 724 if pos('^',y) > 0 then 725 begin 726 while pos('^',y) > 0 do 727 begin 728 y := copy(y, (pos('^', y)+1), 9999); 729 z := z + '^' + y; 730 end; 731 aTmpAray.Add(z); 732 end 733 else 734 begin 735 aTmpAray.Add(y); 736 end; 551 737 continue; 552 738 end; … … 572 758 aCurCol := aColID; 573 759 Inc(aColCtr); 574 aTmpAray.Add(piece(x,'^',2)); 760 y := ''; 761 for k := 2 to 10 do 762 if length(piece(x,'^',k)) > 0 then 763 begin 764 if length(y) > 0 then y := y + '^' + piece(x,'^',k) 765 else y := y + piece(x,'^',k); 766 end; 767 aTmpAray.Add(y); 575 768 if aColCtr > 0 then 576 769 while aColCtr < aCurCol do … … 632 825 var 633 826 MoreID: String; //Restores MaxOcc value 634 aRemote : string;827 aRemote, aHDR: string; 635 828 i: integer; 636 829 begin … … 643 836 MoreID := ';' + Piece(uQualifier,';',3); 644 837 aRemote := piece(uRemoteType,'^',1); 838 aHDR := piece(uRemoteType,'^',7); 645 839 SetPiece(uRemoteType,'^',5,lstQualifier.ItemID); 646 840 uHSComponents.Clear; 647 841 uHSAll.Clear; 648 memText.Lines.Clear; 649 tvProcedures.Items.Clear; 650 lblProcTypeMsg.Visible := FALSE; 651 lvReports.SmallImages := uEmptyImageList; 652 lvReports.Items.Clear; 842 tvProcedures.Items.Clear; 843 lblProcTypeMsg.Visible := FALSE; 653 844 uHTMLDoc := ''; 654 845 if uReportType = 'H' then … … 675 866 TRemoteSite(RemoteSites.SiteList.Items[i]).ReportClear; 676 867 uRemoteCount := 0; 677 DisplayHeading(lstQualifier.ItemID + MoreID); 868 if aHDR = '1' then 869 DisplayHeading(lstQualifier.ItemID) 870 else 871 DisplayHeading(lstQualifier.ItemID + MoreID); 678 872 if lstQualifier.ItemID = 'ds' then 679 873 begin … … 728 922 StatusText('Retrieving ' + lblTitle.Caption + '...'); 729 923 Screen.Cursor := crHourGlass; 730 memText.Lines.Clear;731 924 uReportInstruction := #13#10 + 'Retrieving data...'; 732 925 memText.Lines.Add(uReportInstruction); … … 738 931 case uQualifierType of 739 932 QT_HSCOMPONENT: 740 begin // = 5 741 if (length(piece(uHState,';',2)) > 0) then //and (chkText.Checked = false) then 933 begin // = 5 934 lvReports.SmallImages := uEmptyImageList; 935 lvReports.Items.Clear; 936 memText.Lines.Clear; 937 RowObjects.Clear; 938 if ((aRemote = '1') or (aRemote = '2')) then 939 GoRemote(uRemoteReportData, uRptID, lstQualifier.ItemID + MoreID, uReportRPC, uHState, aHDR); 940 if (length(piece(uHState,';',2)) > 0) then 742 941 begin 743 LoadReportText(uLocalReportData, uRptID, lstQualifier.ItemID + MoreID, uReportRPC, uHState); 744 memText.Lines.Clear; 745 //memText.Lines.Assign(uLocalReportData); 746 RowObjects.Clear; 942 if not(aRemote = '2') then 943 LoadReportText(uLocalReportData, uRptID, lstQualifier.ItemID + MoreID, uReportRPC, uHState); 747 944 LoadListView(uLocalReportData); 748 945 end 749 946 else 750 947 begin 751 if aRemote = '1'then948 if ((aRemote = '1') or (aRemote = '2')) then 752 949 ShowTabControl; 753 950 pnlRightMiddle.Visible := false; … … 764 961 end; 765 962 end; 766 if (aRemote = '1') and (uNoRemote = false) then767 GoRemote(uRemoteReportData, uRptID, lstQualifier.ItemID + MoreID, uReportRPC, uHState);768 963 end; 769 964 QT_HSWPCOMPONENT: 770 965 begin // = 6 966 lvReports.SmallImages := uEmptyImageList; 967 lvReports.Items.Clear; 968 RowObjects.Clear; 969 memText.Lines.Clear; 970 if ((aRemote = '1') or (aRemote = '2')) then 971 begin 972 Screen.Cursor := crDefault; 973 GoRemote(uRemoteReportData, uRptID, lstQualifier.ItemID + MoreID, uReportRPC, uHState, aHDR); 974 end; 771 975 if (length(piece(uHState,';',2)) > 0) then 772 976 begin 773 LoadReportText(uLocalReportData, uRptID, lstQualifier.ItemID + MoreID, uReportRPC, uHState); 774 memText.Lines.Clear; 775 //memText.Lines.Assign(uLocalReportData); 776 RowObjects.Clear; 977 if not(aRemote = '2') then 978 LoadReportText(uLocalReportData, uRptID, lstQualifier.ItemID + MoreID, uReportRPC, uHState); 777 979 LoadListView(uLocalReportData); 778 980 end 779 981 else 780 982 begin 781 if aRemote = '1'then983 if ((aRemote = '1') or (aRemote = '2')) then 782 984 ShowTabControl; 783 985 pnlRightMiddle.Visible := false; 784 LoadReportText(uLocalReportData, uRptID, lstQualifier.ItemID + MoreID, uReportRPC, uHState); 785 if uLocalReportData.Count < 1 then 986 if not (aRemote = '2') then 786 987 begin 787 uReportInstruction := '<No Report Available>'; 788 memText.Lines.Add(uReportInstruction); 789 end 790 else 791 QuickCopy(uLocalReportData,memText); 792 end; 793 if (aRemote = '1') and (uNoRemote = false) then 794 begin 795 Screen.Cursor := crDefault; 796 GoRemote(uRemoteReportData, uRptID, lstQualifier.ItemID + MoreID, uReportRPC, uHState); 988 LoadReportText(uLocalReportData, uRptID, lstQualifier.ItemID + MoreID, uReportRPC, uHState); 989 if uLocalReportData.Count < 1 then 990 begin 991 uReportInstruction := '<No Report Available>'; 992 memText.Lines.Add(uReportInstruction); 993 end 994 else 995 QuickCopy(uLocalReportData,memText); 996 end; 797 997 end; 798 998 end … … 800 1000 begin 801 1001 Screen.Cursor := crDefault; 802 GoRemote(uRemoteReportData, uRptID, lstQualifier.ItemID + MoreID, uReportRPC, uHState );803 if Pos('ECS',Piece(uRptID,':',1))>0 then 1002 GoRemote(uRemoteReportData, uRptID, lstQualifier.ItemID + MoreID, uReportRPC, uHState, aHDR); 1003 if Pos('ECS',Piece(uRptID,':',1))>0 then 804 1004 begin 805 1005 if Pos('OR_ECS1',uRptID)>0 then … … 951 1151 RowObjects := TRowObject.Create; 952 1152 uRemoteCount := 0; 1153 GraphFormActive := false; 953 1154 end; 954 1155 … … 969 1170 break; 970 1171 end; 971 //if not Found then i := -1;972 1172 end; 973 1173 … … 975 1175 976 1176 case Notifications.Followup of 977 NF_IMAGING_RESULTS, NF_ABNORMAL_IMAGING_RESULTS, NF_IMAGING_RESULTS_AMENDED: 1177 NF_IMAGING_RESULTS, NF_ABNORMAL_IMAGING_RESULTS, NF_IMAGING_RESULTS_AMENDED: 978 1178 begin 979 1179 tvReports.Selected := tvReports.Items[i]; … … 1095 1295 i,j,fail: integer; 1096 1296 r0,aSite: String; 1097 1297 aHDR, aID, aRet: String; 1098 1298 begin 1099 1299 inherited; … … 1111 1311 if piece(r0,'^',1) = '1' then 1112 1312 begin 1313 aHDR := piece(TRemoteSite(Items[i]).CurrentReportQuery, '^', 13); 1314 aID := piece(piece(TRemoteSite(Items[i]).CurrentReportQuery, '^', 2),':',1); 1315 if aHDR = '1' then 1316 begin 1317 ModifyHDRData(aRet, TRemoteSite(Items[i]).RemoteHandle ,aID); 1318 end; 1319 GetRemoteData(TRemoteSite(Items[i]).Data, TRemoteSite(Items[i]).RemoteHandle,Items[i]); 1113 1320 RemoteReports.Add(TRemoteSite(Items[i]).CurrentReportQuery, 1114 1321 TRemoteSite(Items[i]).RemoteHandle); 1115 GetRemoteData(TRemoteSite(Items[i]).Data,1116 TRemoteSite(Items[i]).RemoteHandle,Items[i]);1117 1322 TRemoteSite(Items[i]).RemoteHandle := ''; 1118 1323 TabControl1.OnChange(nil); 1119 if (length(piece(uHState,';',2)) > 0) then //and (chkText.Checked = false) then1324 if (length(piece(uHState,';',2)) > 0) then 1120 1325 begin 1121 1326 uRemoteReportData.Clear; 1122 1327 QuickCopy(TRemoteSite(Items[i]).Data,uRemoteReportData); 1123 1328 fail := 0; 1124 //LoadListView(uRemoteReportData);1125 1329 if uRemoteReportData.Count > 0 then 1126 1330 begin … … 1143 1347 begin 1144 1348 uRemoteCount := uRemoteCount + 1; 1145 if uRemoteCount > (90 * Count)then1349 if uRemoteCount > 90 then 1146 1350 begin 1147 1351 TRemoteSite(Items[i]).RemoteHandle := ''; … … 1279 1483 end; 1280 1484 1281 procedure TfrmReports.GoRemote(Dest: TStringList; AItem: string; AQualifier, ARpc: string; AHSTag: string );1485 procedure TfrmReports.GoRemote(Dest: TStringList; AItem: string; AQualifier, ARpc: string; AHSTag: string; AHDR: string); 1282 1486 var 1283 1487 i, j: integer; 1284 1488 LocalHandle, Query, Report: string; 1285 1489 HSType, DaysBack, ExamID, MaxOcc: string; 1286 Alpha, Omega : double;1490 Alpha, Omega, Trans: double; 1287 1491 begin 1288 1492 HSType := ''; … … 1291 1495 Alpha := 0; 1292 1496 Omega := 0; 1497 if UseVistaWeb then 1498 begin 1499 if AHDR = '1' then 1500 InfoBox('You must use VistaWeb to view this report. To use RDV Classic, change your default setting.', 1501 'Use VistaWeb for HDR data', MB_OK); 1502 Exit; 1503 end; 1504 if AHDR = '1' then 1505 begin 1506 if HDRActive = '0' then 1507 begin 1508 InfoBox('The HDR is currently inactive.' + CRLF + 'Unable to retrieve HDR data at this time.', 'HDR Error', MB_OK); 1509 Exit; 1510 end; 1511 if (Piece(AItem, ':', 1) = 'OR_VWAL') or (Piece(AItem, ':', 1) = 'OR_VWRX') then 1512 AQualifier := 'T-75000;T+75000;99999'; 1513 if (Piece(AItem, ':', 1) = 'OR_VWVS') and (CharAt(AQualifier, 1) = ';') then 1514 AQualifier := 'T-75000;T+75000;99999'; 1515 end; 1516 if CharAt(AQualifier, 1) = 'd' then 1517 begin 1518 DaysBack := Copy(AQualifier, 2, Length(AQualifier)); 1519 AQualifier := ('T-' + Piece(DaysBack,';',1) + ';T;' + Pieces(AQualifier,';',2,3)); 1520 DaysBack := ''; 1521 end; 1293 1522 if CharAt(AQualifier, 1) = 'T' then 1294 1523 begin 1524 if Piece(AQualifier,';',1) = 'T-0' then SetPiece(AQualifier,';',1,'T'); 1525 if (Piece(Aqualifier,';',1) = 'T') and (Piece(Aqualifier,';',2) = 'T') 1526 then SetPiece(AQualifier,';',2,'T+1'); 1295 1527 Alpha := StrToFMDateTime(Piece(AQualifier,';',1)); 1296 1528 Omega := StrToFMDateTime(Piece(AQualifier,';',2)); 1529 if Alpha > Omega then 1530 begin 1531 Trans := Omega; 1532 Omega := Alpha; 1533 Alpha := Trans; 1534 end; 1297 1535 MaxOcc := Piece(AQualifier,';',3); 1298 1536 SetPiece(AHSTag,';',4,MaxOcc); 1299 1537 end; 1300 if CharAt(AQualifier, 1) = 'd' then DaysBack := Copy(AQualifier, 2, Length(AQualifier));1301 1538 if CharAt(AQualifier, 1) = 'h' then HSType := Copy(AQualifier, 2, Length(AQualifier)); 1302 1539 if CharAt(AQualifier, 1) = 'i' then ExamID := Copy(AQualifier, 2, Length(AQualifier)); 1303 1540 with RemoteSites.SiteList do for i := 0 to Count - 1 do 1541 begin 1542 if (AHDR='1') and (LeftStr(TRemoteSite(Items[i]).SiteID, 5) = '200HD') then 1543 begin 1544 TRemoteSite(Items[i]).Selected := true; 1545 frmFrame.lstCIRNLocations.Checked[i+2] := true; 1546 end; 1304 1547 if TRemoteSite(Items[i]).Selected then 1305 1548 begin 1306 1549 TRemoteSite(Items[i]).ReportClear; 1550 if (LeftStr(TRemoteSite(Items[i]).SiteID, 5) = '200HD') and not(AHDR = '1') then 1551 begin 1552 TRemoteSite(Items[i]).QueryStatus := '1^Not Included'; 1553 UpdateRemoteStatus(TRemoteSite(Items[i]).SiteID, 'NOT INCLUDED'); 1554 TabControl1.OnChange(nil); 1555 continue; 1556 end; 1557 if (AHDR = '1') and not(LeftStr(TRemoteSite(Items[i]).SiteID, 5) = '200HD') then 1558 begin 1559 TRemoteSite(Items[i]).QueryStatus := '1^Not Included'; 1560 UpdateRemoteStatus(TRemoteSite(Items[i]).SiteID, 'NOT INCLUDED'); 1561 TabControl1.OnChange(nil); 1562 continue; 1563 end; 1307 1564 TRemoteSite(Items[i]).CurrentReportQuery := 'Report' + Patient.DFN + ';' 1308 1565 + Patient.ICN + '^' + AItem + '^^^' + ARpc + '^' + HSType + 1309 '^' + DaysBack + '^' + ExamID + '^' + DateToStr(Alpha) + '^' +1310 DateToStr(Omega) + '^' + TRemoteSite(Items[i]).SiteID + '^' + AHSTag;1566 '^' + DaysBack + '^' + ExamID + '^' + FloatToStr(Alpha) + '^' + 1567 FloatToStr(Omega) + '^' + TRemoteSite(Items[i]).SiteID + '^' + AHSTag + '^' + AHDR; 1311 1568 LocalHandle := ''; 1312 1569 Query := TRemoteSite(Items[i]).CurrentReportQuery; … … 1333 1590 else 1334 1591 begin 1335 RemoteQuery(Dest, AItem, HSType, Daysback, ExamID, Alpha, Omega, TRemoteSite(Items[i]).SiteID, ARpc, AHSTag); 1336 if Dest[0] = '' then 1592 if uDirect = '1' then 1337 1593 begin 1338 TRemoteSite(Items[i]).QueryStatus := '-1^Communication error'; 1339 UpdateRemoteStatus(TRemoteSite(Items[i]).SiteID,'Communication error'); 1594 StatusText('Retrieving reports from ' + TRemoteSite(Items[i]).SiteName + '...'); 1595 TRemoteSite(Items[i]).QueryStatus := '1^Direct Call'; 1596 UpdateRemoteStatus(TRemoteSite(Items[i]).SiteID, 'Direct Call'); 1597 DirectQuery(Dest, AItem, HSType, Daysback, ExamID, Alpha, Omega, TRemoteSite(Items[i]).SiteID, ARpc, AHSTag); 1598 if Copy(Dest[0],1,2) = '-1' then 1599 begin 1600 TRemoteSite(Items[i]).QueryStatus := '-1^Communication error'; 1601 UpdateRemoteStatus(TRemoteSite(Items[i]).SiteID,'Communication error'); 1602 end 1603 else 1604 begin 1605 QuickCopy(Dest,TRemoteSite(Items[i]).Data); 1606 TRemoteSite(Items[i]).RemoteHandle := ''; 1607 TRemoteSite(Items[i]).QueryStatus := '1^Done'; 1608 UpdateRemoteStatus(TRemoteSite(Items[i]).SiteID, 'Done'); 1609 TabControl1.OnChange(nil); 1610 if (length(piece(uHState,';',2)) > 0) then 1611 LoadListView(TRemoteSite(Items[i]).Data); 1612 end; 1613 StatusText(''); 1340 1614 end 1341 1615 else 1342 1616 begin 1343 TRemoteSite(Items[i]).RemoteHandle := Dest[0]; 1344 TRemoteSite(Items[i]).QueryStatus := '0^initialization...'; 1345 UpdateRemoteStatus(TRemoteSite(Items[i]).SiteID, 'initialization'); 1346 Timer1.Enabled := True; 1347 StatusText('Retrieving reports from ' 1348 + TRemoteSite(Items[i]).SiteName + '...'); 1617 RemoteQuery(Dest, AItem, HSType, Daysback, ExamID, Alpha, Omega, TRemoteSite(Items[i]).SiteID, ARpc, AHSTag); 1618 if Dest[0] = '' then 1619 begin 1620 TRemoteSite(Items[i]).QueryStatus := '-1^Communication error'; 1621 UpdateRemoteStatus(TRemoteSite(Items[i]).SiteID,'Communication error'); 1622 end 1623 else 1624 begin 1625 TRemoteSite(Items[i]).RemoteHandle := Dest[0]; 1626 TRemoteSite(Items[i]).QueryStatus := '0^initialization...'; 1627 UpdateRemoteStatus(TRemoteSite(Items[i]).SiteID, 'initialization'); 1628 Timer1.Enabled := True; 1629 StatusText('Retrieving reports from ' + TRemoteSite(Items[i]).SiteName + '...'); 1630 end; 1349 1631 end; 1350 1632 end; 1351 1633 end; 1634 end; 1352 1635 end; 1353 1636 … … 1377 1660 uEmptyImageList.Free; 1378 1661 uECSReport.Free; 1662 if GraphForm <> nil then GraphForm.Release; 1379 1663 end; 1380 1664 … … 1471 1755 aHeading, aReportType, aRPC, aQualifier, aStartTime, aStopTime, aMax, aRptCode, aRemote, aCategory, aSortOrder, aDaysBack, x: string; 1472 1756 aIFN: integer; 1473 aID, aHSTag, aRadParam, aColChange : string;1757 aID, aHSTag, aRadParam, aColChange, aDirect, aHDR, aQualifierID: string; 1474 1758 CurrentParentNode, CurrentNode: TTreeNode; 1475 1759 begin … … 1488 1772 aCategory := PReportTreeObject(tvReports.Selected.Data)^.Category; 1489 1773 aSortOrder := PReportTreeObject(tvReports.Selected.Data)^.SortOrder; 1490 aDaysBack := PReportTreeObject(tvReports.Selected.Data)^.MaxDaysBack;1774 aDaysBack := PReportTreeObject(tvReports.Selected.Data)^.MaxDaysBack; 1491 1775 aIFN := StrToIntDef(PReportTreeObject(tvReports.Selected.Data)^.IFN,0); 1776 aDirect := PReportTreeObject(tvReports.Selected.Data)^.Direct; 1777 aHDR := PReportTreeObject(tvReports.Selected.Data)^.HDR; 1492 1778 aStartTime := Piece(aQualifier,';',1); 1493 1779 aStopTime := Piece(aQualifier,';',2); 1494 1780 aMax := Piece(aQualifier,';',3); 1495 1781 aRptCode := Piece(aQualifier,';',4); 1782 aQualifierID:= ''; 1496 1783 if length(uColChange) > 0 then 1497 1784 begin … … 1514 1801 uReportRPC := aRPC; 1515 1802 uRptID := aID; 1803 uDirect := aDirect; 1516 1804 uReportType := aReportType; 1517 1805 uQualifier := aQualifier; 1518 1806 uSortOrder := aSortOrder; 1519 uRemoteType := aRemote + '^' + aReportType + '^' + IntToStr(aIFN) + '^' + aHeading + '^' + aRptCode + '^' + aDaysBack; 1520 //edtMax.Text := aMax; 1521 {if chkText.Checked = true then 1522 aHState := aHSTag 1523 else 1524 aHState := Pieces(aHSTag,';',1,2); } 1807 uRemoteType := aRemote + '^' + aReportType + '^' + IntToStr(aIFN) + '^' + aHeading + '^' + aRptCode + '^' + aDaysBack + '^' + aHDR; 1808 pnlRightTop.Height := lblTitle.Height; // see below 1525 1809 RedrawSuspend(tvReports.Handle); 1526 1810 RedrawSuspend(memText.Handle); … … 1530 1814 TabControl1.TabStop := false; 1531 1815 sptHorzRight.Visible := false; 1532 pnlRightTop.Height := lblTitle.Height; 1533 lblProcTypeMsg.Visible := FALSE; 1816 lblProcTypeMsg.Visible := FALSE; 1534 1817 pnlRightMiddle.Visible := false; 1535 pnlProcedures.Visible := FALSE; 1536 if aRemote = '1'then1818 pnlProcedures.Visible := FALSE; 1819 if (aRemote = '1') or (aRemote = '2') then 1537 1820 if not(uReportType = 'V') then 1538 1821 if TabControl1.Tabs.Count > 1 then … … 1543 1826 end; 1544 1827 StatusText(''); 1545 //**1546 1828 uHTMLDoc := ''; 1547 1829 WebBrowser1.Navigate('about:blank'); 1548 //**1549 1830 memText.Lines.Clear; 1550 1831 memText.Parent := pnlRightBottom; … … 1558 1839 lvReports.Columns.Clear; 1559 1840 uHSComponents.Clear; 1841 DisplayHeading(''); 1560 1842 if uReportType = 'H' then 1561 1843 begin 1562 1844 pnlRightMiddle.Visible := false; 1563 //lvReports.Visible := false;1564 1845 pnlRightBottom.Visible := true; 1565 1846 WebBrowser1.Visible := true; … … 1577 1858 RedrawSuspend(lvReports.Handle); 1578 1859 Items.BeginUpdate; 1579 //Align := alTop;1580 1860 ViewStyle := vsReport; 1581 1861 ColumnHeaders(uColumns, IntToStr(aIFN)); … … 1598 1878 else 1599 1879 uNewColumn.Width := ColumnHeaderWidth; //ColumnTextWidth for width of text 1600 if (i = 0) and (( aRemote <> '1') or (TabControl1.Tabs.Count < 2)) then1880 if (i = 0) and (((aRemote <> '2') and (aRemote <> '1')) or ((TabControl1.Tabs.Count < 2) and (not (aHDR = '1')))) then 1601 1881 uNewColumn.Width := 0; 1602 1882 end; … … 1641 1921 end; 1642 1922 Screen.Cursor := crHourGlass; 1923 if (GraphForm <> nil) and (aReportType <> 'G') then 1924 begin 1925 GraphForm.SendToBack; 1926 GraphPanel(false); 1927 GraphFormActive := false; 1928 end; 1929 if aReportType = 'G' then 1930 Graph(aIFN) 1931 else 1643 1932 if aReportType = 'M' then 1644 1933 begin … … 1652 1941 QT_OTHER: 1653 1942 begin // = 0 1943 memText.Lines.Clear; 1654 1944 If copy(aRptCode,1,2) = 'h0' then //HS Adhoc 1655 1945 begin … … 1666 1956 TRemoteSite(RemoteSites.SiteList[j]).LabClear; 1667 1957 end; 1668 memText.Clear;1669 1958 uHTMLDoc := ''; 1670 1959 if WebBrowser1.Visible = true then WebBrowser1.Navigate('about:blank'); … … 1692 1981 splitter1.Visible := false; 1693 1982 StatusText('Retrieving ' + tvReports.Selected.Text + '...'); 1694 GoRemote(uRemoteReportData, aID, aRptCode, aRPC, uHState );1983 GoRemote(uRemoteReportData, aID, aRptCode, aRPC, uHState, aHDR); 1695 1984 uReportInstruction := #13#10 + 'Retrieving data...'; 1696 1985 TabControl1.OnChange(nil); … … 1714 2003 begin 1715 2004 lstQualifier.ItemIndex := lstQualifier.Items.Add(aStartTime + ';' + aStopTime + '^' + aStartTime + ' to ' + aStopTime); 1716 uNoRemote := true; 2005 lvReports.SmallImages := uEmptyImageList; 2006 lvReports.Items.Clear; 1717 2007 lstQualifierClick(self); 1718 uNoRemote := false;1719 2008 end 1720 2009 else … … 1738 2027 ViewStyle := vsReport; 1739 2028 SmallImages := dmodShared.imgImages; 1740 CurrentParentNode := nil; 1741 CurrentNode := nil; 2029 CurrentParentNode := nil; 2030 CurrentNode := nil; 1742 2031 for i := 0 to uLocalReportData.Count - 1 do 1743 2032 begin … … 1754 2043 ListItem.SubItemImages[1] := IMG_NO_IMAGES; 1755 2044 end; 1756 LoadProceduresTreeView(uLocalReportData[i], CurrentParentNode, CurrentNode); 2045 LoadProceduresTreeView(uLocalReportData[i], CurrentParentNode, CurrentNode); 1757 2046 if CurrentNode <> nil then 1758 2047 PProcTreeObj(CurrentNode.Data)^.Associate := lvReports.Items.IndexOf(ListItem); 1759 2048 end; 1760 if tvProcedures.Items.Count > 0 then 2049 if tvProcedures.Items.Count > 0 then 1761 2050 tvProcedures.Selected := tvProcedures.Items.GetFirstNode; 1762 lblProcTypeMsg.Visible := TRUE; 1763 pnlRightTop.Height := lblTitle.Height + lblProcTypeMsg.Height; 2051 lblProcTypeMsg.Visible := TRUE; 2052 pnlRightTop.Height := lblTitle.Height + lblProcTypeMsg.Height; 1764 2053 pnlLeftBottom.Visible := FALSE; 1765 2054 pnlProcedures.Visible := TRUE; … … 1824 2113 StatusText('Retrieving ' + tvReports.Selected.Text + '...'); 1825 2114 uReportInstruction := #13#10 + 'Retrieving data...'; 2115 lvReports.SmallImages := uEmptyImageList; 2116 lvReports.Items.Clear; 2117 RowObjects.Clear; 2118 memText.Lines.Clear; 1826 2119 if (length(piece(aHSTag,';',2)) > 0) then 1827 2120 begin 1828 2121 if aCategory <> '0' then 1829 2122 begin 1830 1831 2123 ListReportDateRanges(lstQualifier.Items); 1832 if lstQualifier.ItemID = '' then 2124 aQualifierID := lstQualifier.ItemID; 2125 if aQualifierID = '' then 1833 2126 begin 1834 lstQualifier.ItemIndex := lstQualifier.Items.Add(aStartTime + ';' + aStopTime + '^' + aStartTime + ' to ' + aStopTime); 1835 uNoRemote := true; 2127 if aHDR = '1' then 2128 lstQualifier.ItemIndex := lstQualifier.Items.Add('T-75000' + ';' + 'T+75000' + '^' + 'T-75000' + ' to ' + 'T+75000') 2129 else 2130 if length(aStartTime) > 0 then lstQualifier.ItemIndex := lstQualifier.Items.Add(aStartTime + ';' + aStopTime + '^' + aStartTime + ' to ' + aStopTime); 1836 2131 lstQualifierClick(self); 1837 uNoRemote := false;1838 2132 end 1839 2133 else 1840 lstQualifier.Items.Add(aStartTime + ';' + aStopTime + '^' + aStartTime + ' to ' + aStopTime); 1841 2134 begin 2135 GoRemote(uRemoteReportData, aID, aQualifier, aRPC, uHState, aHDR); 2136 if aHDR = '1' then 2137 lstQualifier.ItemIndex := lstQualifier.Items.Add('T-75000' + ';' + 'T+75000' + '^' + 'T-75000' + ' to ' + 'T+75000') 2138 else 2139 if length(aStartTime) > 0 then lstQualifier.ItemIndex := lstQualifier.Items.Add(aStartTime + ';' + aStopTime + '^' + aStartTime + ' to ' + aStopTime); 2140 end; 1842 2141 lblQualifier.Caption := 'Date Range'; 1843 2142 pnlLeftBottom.Visible := true; … … 1846 2145 else 1847 2146 begin 1848 LoadReportText(uLocalReportData, aID, aQualifier, aRPC, uHState); 1849 memText.Lines.Clear; 1850 //memText.Lines.Assign(uLocalReportData); 1851 RowObjects.Clear; 1852 LoadListView(uLocalReportData); 2147 if not (aRemote = '2' ) then 2148 GoRemote(uRemoteReportData, aID, aQualifier, aRPC, uHState, aHDR); 2149 begin 2150 LoadReportText(uLocalReportData, aID, aQualifier, aRPC, uHState); 2151 LoadListView(uLocalReportData); 2152 end; 1853 2153 end; 1854 2154 end 1855 2155 else 1856 2156 begin 1857 if aRemote = '1'then2157 if (aRemote = '1') or (aRemote = '2') then 1858 2158 if TabControl1.Tabs.Count > 1 then 1859 2159 ShowTabControl; 1860 2160 sptHorzRight.Visible := false; 1861 2161 pnlRightMiddle.Visible := false; 2162 GoRemote(uRemoteReportData, aID, aQualifier, aRPC, uHState, aHDR); 1862 2163 LoadReportText(uLocalReportData, aID, aQualifier, aRPC, uHState); 1863 2164 if uLocalReportData.Count < 1 then … … 1871 2172 if aCategory <> '0' then 1872 2173 begin 1873 1874 2174 ListReportDateRanges(lstQualifier.Items); 1875 2175 if lstQualifier.ItemID = '' then 1876 2176 begin 1877 2177 lstQualifier.ItemIndex := lstQualifier.Items.Add(aStartTime + ';' + aStopTime + '^' + aStartTime + ' to ' + aStopTime); 1878 uNoRemote := true;1879 2178 lstQualifierClick(self); 1880 uNoRemote := false;1881 2179 end 1882 2180 else … … 1889 2187 else 1890 2188 begin 1891 memText.Lines.Clear;1892 //memText.Lines.Assign(uLocalReportData);1893 2189 if uLocalReportData.Count < 1 then 1894 2190 begin … … 1904 2200 end; 1905 2201 StatusText(''); 1906 GoRemote(uRemoteReportData, aID, aQualifier, aRPC, uHState);1907 2202 end; 1908 2203 QT_HSWPCOMPONENT: … … 1914 2209 uReportInstruction := #13#10 + 'Retrieving data...'; 1915 2210 TabControl1.OnChange(nil); 2211 RowObjects.Clear; 2212 memText.Lines.Clear; 2213 lvReports.SmallImages := uEmptyImageList; 2214 lvReports.Items.Clear; 1916 2215 if (length(piece(aHSTag,';',2)) > 0) then 1917 2216 begin 1918 2217 if aCategory <> '0' then 1919 2218 begin 1920 1921 2219 ListReportDateRanges(lstQualifier.Items); 1922 if lstQualifier.ItemID = '' then 2220 aQualifierID := lstQualifier.ItemID; 2221 if aQualifierID = '' then 1923 2222 begin 1924 lstQualifier.ItemIndex := lstQualifier.Items.Add(aStartTime + ';' + aStopTime + '^' + aStartTime + ' to ' + aStopTime); 1925 uNoRemote := true; 2223 if aHDR = '1' then 2224 lstQualifier.ItemIndex := lstQualifier.Items.Add('T-75000' + ';' + 'T+75000' + '^' + 'T-75000' + ' to ' + 'T+75000') 2225 else 2226 if length(aStartTime) > 0 then lstQualifier.ItemIndex := lstQualifier.Items.Add(aStartTime + ';' + aStopTime + '^' + aStartTime + ' to ' + aStopTime); 1926 2227 lstQualifierClick(self); 1927 uNoRemote := false;1928 2228 end 1929 2229 else 1930 lstQualifier.Items.Add(aStartTime + ';' + aStopTime + '^' + aStartTime + ' to ' + aStopTime); 1931 2230 begin 2231 GoRemote(uRemoteReportData, aID, aQualifier, aRPC, uHState, aHDR); 2232 if aHDR = '1' then 2233 lstQualifier.ItemIndex := lstQualifier.Items.Add('T-75000' + ';' + 'T+75000' + '^' + 'T-75000' + ' to ' + 'T+75000') 2234 else 2235 if length(aStartTime) > 0 then lstQualifier.ItemIndex := lstQualifier.Items.Add(aStartTime + ';' + aStopTime + '^' + aStartTime + ' to ' + aStopTime); 2236 end; 1932 2237 lblQualifier.Caption := 'Date Range'; 1933 2238 pnlLeftBottom.Visible := true; … … 1936 2241 else 1937 2242 begin 1938 LoadReportText(uLocalReportData, aID, aQualifier, aRPC, uHState); 1939 memText.Lines.Clear; 1940 //memText.Lines.Assign(uLocalReportData); 1941 RowObjects.Clear; 1942 LoadListView(uLocalReportData); 2243 GoRemote(uRemoteReportData, aID, aQualifier, aRPC, uHState, aHDR); 2244 if not (aRemote = '2' ) then 2245 begin 2246 LoadReportText(uLocalReportData, aID, aQualifier, aRPC, uHState); 2247 LoadListView(uLocalReportData); 2248 end; 1943 2249 end; 1944 2250 end 1945 2251 else 1946 2252 begin 1947 if aRemote = '1'then2253 if (aRemote = '1') or (aRemote = '2') then 1948 2254 ShowTabControl; 1949 2255 sptHorzRight.Visible := false; 1950 2256 pnlRightMiddle.Visible := false; 2257 GoRemote(uRemoteReportData, aID, aQualifier, aRPC, uHState, aHDR); 1951 2258 LoadReportText(uLocalReportData, aID, aQualifier, aRPC, uHState); 1952 2259 if uLocalReportData.Count < 1 then … … 1965 2272 begin 1966 2273 lstQualifier.ItemIndex := lstQualifier.Items.Add(aStartTime + ';' + aStopTime + '^' + aStartTime + ' to ' + aStopTime); 1967 uNoRemote := true;1968 2274 lstQualifierClick(self); 1969 uNoRemote := false;1970 2275 end 1971 2276 else … … 1978 2283 else 1979 2284 begin 1980 memText.Lines.Clear;1981 //memText.Lines.Assign(uLocalReportData);1982 RowObjects.Clear;1983 2285 LoadListView(uLocalReportData); 1984 2286 end; 1985 2287 end; 1986 2288 StatusText(''); 1987 GoRemote(uRemoteReportData, aID, aQualifier, aRPC, uHState);1988 2289 end; 1989 2290 QT_PROCEDURES: … … 2056 2357 splitter1.Visible := false; 2057 2358 StatusText('Retrieving ' + tvReports.Selected.Text + '...'); 2058 GoRemote(uRemoteReportData, aID, aRptCode, aRPC, uHState );2359 GoRemote(uRemoteReportData, aID, aRptCode, aRPC, uHState, aHDR); 2059 2360 uReportInstruction := #13#10 + 'Retrieving data...'; 2060 2361 TabControl1.OnChange(nil); … … 2074 2375 end; 2075 2376 end; 2076 if aCategory <> '0' then 2077 DisplayHeading(uQualifier) 2078 else 2079 DisplayHeading(''); 2080 2377 if not (aHDR = '1') then 2378 if aCategory <> '0' then 2379 DisplayHeading(uQualifier) 2380 else 2381 DisplayHeading(''); 2382 2081 2383 SendMessage(tvReports.Handle, WM_HSCROLL, SB_THUMBTRACK, 0); 2082 2384 RedrawActivate(tvReports.Handle); … … 2086 2388 WebBrowser1.BringToFront; 2087 2389 end 2088 else 2390 else if not GraphFormActive then 2089 2391 begin 2090 2392 memText.Visible := true; … … 2092 2394 memText.BringToFront; 2093 2395 RedrawActivate(memText.Handle); 2396 end 2397 else 2398 begin 2399 GraphPanel(true); 2400 with GraphForm do 2401 begin 2402 lstDateRange.Items := cboDateRange.Items; 2403 lstDateRange.ItemIndex := cboDateRange.ItemIndex; 2404 ViewSelections; 2405 BringToFront; 2406 end; 2094 2407 end; 2095 2408 Screen.Cursor := crDefault; … … 2712 3025 end; 2713 3026 3027 procedure TfrmReports.chkDualViewsClick(Sender: TObject); 3028 begin 3029 inherited; 3030 if (GraphForm <> nil) and GraphFormActive then 3031 GraphForm.chkDualViews.Checked := chkDualViews.Checked; 3032 end; 3033 3034 procedure TfrmReports.btnChangeViewClick(Sender: TObject); 3035 begin 3036 inherited; 3037 if (GraphForm <> nil) and GraphFormActive then 3038 begin 3039 GraphForm.btnChangeSettingsClick(GraphForm); 3040 chkDualViews.Checked := GraphForm.chkDualViews.Checked; 3041 end; 3042 end; 3043 3044 procedure TfrmReports.btnGraphSelectionsClick(Sender: TObject); 3045 begin 3046 inherited; 3047 if (GraphForm <> nil) and GraphFormActive then 3048 begin 3049 GraphForm.btnGraphSelectionsClick(GraphForm); 3050 chkDualViews.Checked := GraphForm.chkDualViews.Checked; 3051 end; 3052 end; 3053 3054 procedure TfrmReports.lstDateRangeClick(Sender: TObject); 3055 begin 3056 inherited; 3057 if (GraphForm <> nil) then 3058 begin 3059 GraphForm.cboDateRange.ItemIndex := lstDateRange.ItemIndex; 3060 GraphForm.cboDateRangeChange(self); 3061 lstDateRange.Items.Assign(GraphForm.cboDateRange.Items); 3062 lstDateRange.ItemIndex := GraphForm.cboDateRange.ItemIndex; 3063 //Exit; 3064 end; 3065 end; 3066 3067 procedure TfrmReports.sptHorzMoved(Sender: TObject); 3068 begin 3069 inherited; 3070 pnlTopViews.Height := 80; 3071 end; 3072 2714 3073 end.
Note:
See TracChangeset
for help on using the changeset viewer.