Index: cprs/branches/foia-cprs/CPRS-Chart/Options/fOptions.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Options/fOptions.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Options/fOptions.pas	(revision 460)
@@ -72,18 +72,34 @@
     btnNotesTitles: TButton;
     imgNotesNotes: TImage;
-    Image1: TImage;
+    imgNotes: TImage;
     imgTeams: TImage;
     tsCprsReports: TTabSheet;
-    Label1: TStaticText;
-    Bevel1: TBevel;
-    Label3: TMemo;
-    Image2: TImage;
-    Button1: TButton;
-    Label2: TStaticText;
-    Image3: TImage;
-    Label4: TMemo;
-    Button2: TButton;
-    Bevel2: TBevel;
+    lblReports: TStaticText;
+    bvlReports: TBevel;
+    memReports: TMemo;
+    imgReports: TImage;
+    btnReports: TButton;
+    lblReport1: TStaticText;
+    memReport1: TMemo;
+    btnReport1: TButton;
+    bvlReport1: TBevel;
     btnDiagnoses: TButton;
+    tsGraphs: TTabSheet;
+    lblGraphSettings: TStaticText;
+    bvlGraphSettings: TBevel;
+    imgGraphSettings: TImage;
+    btnGraphSettings: TButton;
+    bvlGraphViews: TBevel;
+    lblGraphViews: TStaticText;
+    imgGraphViews: TImage;
+    btnGraphViews: TButton;
+    memGraphSettings: TMemo;
+    memGraphViews: TMemo;
+    bvlReport2: TBevel;
+    lblReport2: TStaticText;
+    memReport2: TMemo;
+    imgReport1: TImage;
+    imgReport2: TImage;
+    rdoRDV: TRadioGroup;
     procedure FormCreate(Sender: TObject);
     procedure FormDestroy(Sender: TObject);
@@ -108,10 +124,13 @@
     procedure btnNotesNotesClick(Sender: TObject);
     procedure btnNotesTitlesClick(Sender: TObject);
-    procedure Button1Click(Sender: TObject);
-    procedure Button2Click(Sender: TObject);
+    procedure btnReportsClick(Sender: TObject);
+    procedure btnReport1Click(Sender: TObject);
     procedure lvwNotificationsEnter(Sender: TObject);
     procedure lvwNotificationsMouseDown(Sender: TObject;
       Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
     procedure btnDiagnosesClick(Sender: TObject);
+    procedure btnGraphSettingsClick(Sender: TObject);
+    procedure btnGraphViewsClick(Sender: TObject);
+    procedure rdoRDVClick(Sender: TObject);
   private
     { Private declarations }
@@ -145,5 +164,7 @@
 uses fOptionsDays, fOptionsReminders, fOptionsSurrogate,
      fOptionsPatientSelection, fOptionsLists, fOptionsTeams, fOptionsCombinations,
-     fOptionsOther, fOptionsNotes, fOptionsTitles, fOptionsReportsCustom, fOptionsReportsDefault, rOptions, rCore, uCore, uOptions;
+     fOptionsOther, fOptionsNotes, fOptionsTitles, fOptionsReportsCustom, fOptionsReportsDefault,
+     fGraphs, fGraphSettings, fGraphProfiles, rGraphs, uGraphs,
+     rOptions, rCore, uCore, uOptions, UBACore, fFrame;
      //fTestDialog;
 
@@ -195,10 +216,10 @@
              tsListsTeams.TabVisible := true;
              ActivePage := tsCoverSheet;
-             Label3.Text := 'Change the default date range and occurrence limits for all reports on ' +
+             memReports.Text := 'Change the default date range and occurrence limits for all reports on ' +
                                'the CPRS Reports tab (excluding health summary reports) .';
-             Label4.Text := 'Change the individual date range and occurrence limits for each report on ' +
+             memReport1.Text := 'Change the individual date range and occurrence limits for each report on ' +
                                'the CPRS Reports tab (excluding health summary reports) .';
-             Button1.caption := 'Set All Reports...';
-             Button2.caption := 'Set Individual Reports...';
+             btnReports.caption := 'Set All Reports...';
+             btnReport1.caption := 'Set Individual Reports...';
              if User.IsReportsOnly then // For "Reports Only" users.
                begin
@@ -217,10 +238,10 @@
              if (not User.ToolsRptEdit) then // For users with Reports settings edit parameter not set.
                begin
-                 Label3.Text := 'View the default date range and occurrence limits for all reports on ' +
+                 memReports.Text := 'View the default date range and occurrence limits for all reports on ' +
                                    'the CPRS Reports tab (excluding health summary reports) .';
-                 Label4.Text := 'View the individual date range and occurrence limits for each report on ' +
+                 memReport1.Text := 'View the individual date range and occurrence limits for each report on ' +
                                    'the CPRS Reports tab (excluding health summary reports) .';
-                 Button1.caption := 'View All Report Settings...';
-                 Button2.caption := 'View Individual Report Settings...';
+                 btnReports.caption := 'View All Report Settings...';
+                 btnReport1.caption := 'View Individual Report Settings...';
                end;
            end;
@@ -249,7 +270,8 @@
   FdirtyOtherStuff := false;
   CheckApply;
-  if not BILLING_AWARE then   btnDiagnoses.Enabled := False;
-  if (Encounter.Provider = 0) and not PersonHasKey(Encounter.Provider, 'PROVIDER') then
+
+  if (Encounter.Provider = 0) and not IsCIDCProvider(User.DUZ) then
       btnDiagnoses.Enabled := False;
+  if UseVistaWeb then rdoRDV.ItemIndex := 1;
 
 end;
@@ -641,5 +663,5 @@
 end;
 
-procedure TfrmOptions.Button1Click(Sender: TObject);
+procedure TfrmOptions.btnReportsClick(Sender: TObject);
 var
   topsize, leftsize, value: integer;
@@ -650,5 +672,5 @@
 end;
 
-procedure TfrmOptions.Button2Click(Sender: TObject);
+procedure TfrmOptions.btnReport1Click(Sender: TObject);
 var
   topsize, leftsize, value: integer;
@@ -678,5 +700,5 @@
   topsize, leftsize, value: integer;
 begin
-  if BILLING_AWARE then  {BAV25 Code}
+  if IsCIDCProvider(User.DUZ) then    //(hds7564)
   begin
      value := 0;
@@ -686,4 +708,75 @@
 end;
 
+procedure TfrmOptions.btnGraphSettingsClick(Sender: TObject);
+// display GraphSettings
+var
+  actiontype: boolean;
+  topsize, leftsize: integer;
+begin
+  actiontype := false;
+  Offset(topsize, -60, leftsize, -60);
+  DialogOptionsGraphSettings(topsize, leftsize, Font.Size, actiontype);
+end;
+
+procedure TfrmOptions.btnGraphViewsClick(Sender: TObject);
+// display Graph Views
+var
+  actiontype: boolean;
+  topsize, leftsize: integer;
+begin
+  actiontype := false;
+  Offset(topsize, -60, leftsize, -60);
+  DialogOptionsGraphProfiles(topsize, leftsize, Font.Size, actiontype);
+end;
+
+procedure TfrmOptions.rdoRDVClick(Sender: TObject);
+var
+  iIndex: integer;
+begin
+  iIndex := rdoRDV.ItemIndex;
+   with frmFrame do
+   if iIndex = 0 then
+    begin
+      ChangeVistaWebParam('0');
+      lblCIRN.Caption := ' Remote';
+      lblCIRNData.Caption := 'Data';
+      lblCIRNAvail.Caption := '';
+      lblCIRN.Width := 43;
+      lblCIRNData.Width := 43;
+      lblCIRNData.Alignment := taCenter;
+      lblCIRN.Alignment := taCenter;
+      lstCIRNLocations.Clear;
+      SetUpCIRN;
+    end
+  else
+    begin
+      ChangeVistaWebParam('1');
+      lblCIRN.Caption := 'Remote';
+      lblCIRNData.Caption := 'Data*';  //VistaWeb On
+      lblCIRN.Width := 43;
+      lblCIRNData.Width := 43;
+      lblCIRNData.Alignment := taCenter;
+      lblCIRN.Alignment := taCenter;
+      lblCIRN.Enabled     := True;
+      lblCIRNData.Enabled := True;
+      pnlCIRN.TabStop     := True;
+      if ColorToRGB(clWindowText) = ColorToRGB(clBlack) then
+        begin
+          lblCIRN.Font.Color  := clBlue;
+          lblCIRNData.Font.Color  := clBlue;
+          lblCIRNAvail.Font.Color := clBlue;
+          lstCIRNLocations.Font.Color  := clBlue;
+        end
+      else
+        begin
+          lblCIRN.Font.Color  := clWindowText;
+          lblCIRNData.Font.Color  := clWindowText;
+          lblCIRNAvail.Font.Color := clWindowText;
+          lstCIRNLocations.Font.Color  := clWindowText;
+        end;
+    end;
+
+end;
+
 end.
 
